Online adaptation
authorHongyuan Ma <[email protected]>
Tue, 14 Aug 2018 13:38:11 +0000 (21:38 +0800)
committerHongyuan Ma <[email protected]>
Tue, 14 Aug 2018 13:38:11 +0000 (21:38 +0800)
client/post-example/results.json
client/post-example/upload.py
front-end/src/page/farmerApply/index.jsx
front-end/src/util/util.jsx
front-end/webpack.config.js
web/db_tools/data/user_data.py
web/db_tools/import_user_data.py

index ba57808e62d72e8e34cf9b91d0f9d47471b21590..ba47aaaf8c5083731d22f07910a2be4d5bf2e504 100644 (file)
@@ -4,8 +4,8 @@
             "10": {
                 "1": {
                     "std": 0.0, 
-                    "metric": 30551.681364, 
-                    "median": 30551.681364, 
+                    "metric": 10551.681364, 
+                    "median": 10551.681364, 
                     "results": [
                         {
                             "latency": -1, 
@@ -24,8 +24,8 @@
                 }, 
                 "2": {
                     "std": 0.0, 
-                    "metric": 38238.312979, 
-                    "median": 38238.312979, 
+                    "metric": 28238.312979, 
+                    "median": 28238.312979, 
                     "results": [
                         {
                             "latency": -1, 
@@ -44,8 +44,8 @@
                 }, 
                 "4": {
                     "std": 0.0, 
-                    "metric": 35567.822014, 
-                    "median": 35567.822014, 
+                    "metric": 25567.822014, 
+                    "median": 25567.822014, 
                     "results": [
                         {
                             "latency": -1, 
@@ -68,8 +68,8 @@
             "10": {
                 "1": {
                     "std": 0.0, 
-                    "metric": 116.508045, 
-                    "median": 116.508045, 
+                    "metric": 216.508045, 
+                    "median": 216.508045, 
                     "results": [
                         {
                             "latency": -1, 
     }, 
     "postgres": {
         "commit": "c6736ff76046521f56c50deb31da218bc1b29533", 
-        "branch": "rel_9_5_stable", 
+        "branch": "master", 
         "settings": {
-            "checkpoint_timeout": "20min", 
+            "checkpoint_timeout": "15min", 
             "log_temp_files": "32", 
             "work_mem": "64MB", 
             "log_line_prefix": "%n %t ", 
-            "shared_buffers": "2GB", 
+            "shared_buffers": "1GB", 
             "log_autovacuum_min_duration": "0", 
             "checkpoint_completion_target": "0.9", 
             "maintenance_work_mem": "128MB", 
     "collectd": {}, 
     "meta": {
         "date": "2018-07-17 23:02:57.000000+00", 
-        "uname": "Linux postgresql-gsoc1 4.9.0-6-powerpc64le #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) ppc64le GNU/Linux\n", 
+        "uname": "Linux postgresql-gsoc 4.9.0-6-powerpc64le #1 SMP Centos 4.9.88-1+deb9u1 (2018-05-07) ppc64le GNU/Linux\n", 
         "benchmark": "pgbench", 
         "name": "pgbench-basic"
     }, 
index 467497cd09ffe12009852ab3b1e01de234ce0be2..b0164d4c001fbc9090c12264d92b65e1ac636ab4 100644 (file)
@@ -14,9 +14,9 @@ def byteify(input):
         return input
 
 
-token = '0ae27ecb064ff5283296b297bac77d9e'
-BASE_URL = 'http://140.211.168.111:8080/'
-BASE_URL = 'http://127.0.0.1:8000/'
+token = '0232f37f8e1726684516434441af745'
+BASE_URL = 'http://140.211.168.111:8080/'
+BASE_URL = 'http://127.0.0.1:8000/'
 PATH_URL = 'upload/'
 url = BASE_URL + PATH_URL
 
index 43068e3ead5007acd9e1dbfd7f8c3adec2f75650..46a9a806e6a52a789e05722e7479dc7fb10f7b5f 100644 (file)
@@ -1,5 +1,5 @@
 import React from 'react';
-import {hashHistory} from 'React-router'
+import {hashHistory} from 'react-router'
 import './index.css';
 import {Link}     from 'react-router-dom';
 import UserInfoCard from 'component/userinfo-card/index.jsx'
@@ -97,7 +97,7 @@ class FarmerApply extends React.Component {
             _user.farmerApply(machineInfo).then((res) => {
                 // console.dir(res)
                 alert('add machine success!')
-                hashHistory.push('/portal')
+                //hashHistory.push('/portal')
                 // window.location.href = this.state.redirect;
             }, (err) => {
                 // console.log(err)
index 6a93479989b0b6ef5b3a28c6e9f2afb6c199d9bb..fa4c5040a45b7900514876b4c907e3e161c66f87 100644 (file)
@@ -11,7 +11,7 @@ class PGUtil {
             $.ajax({
                 type: param.type || 'get',
                 url: param.url || '',
-                dataType: param.dataType || 'json',
+                dataType: param.dataType || 'jsonp',
                 data: param.data || null,
                 // headers: {
                 //     'Authorization': 'Token ' + user.token
index 4eeec6b05cce3d6fa3e291d8ff2b7af043d80e62..3cbe0606647e934ac9761d0ab69499904b9b8ea7 100644 (file)
@@ -9,7 +9,7 @@ module.exports = {
     entry: './src/app.jsx',
     output: {
         path: path.resolve(__dirname, 'dist'),
-        publicPath: WEBPACK_ENV === 'dev' ? '' : '//140.211.168.111/front-end-code/dist/',
+        publicPath: WEBPACK_ENV === 'dev' ? '/dist/' : '//140.211.168.111/front-end-code/dist/',
         filename: 'js/app.js'
     },
     resolve: {
index aa4f3f64578e35ee26ecf87c33eb6f863322a415..0ad938f8053f308c9eff862f7b315f943ed6823f 100644 (file)
@@ -1,14 +1,26 @@
 row_data = [
     {
         'password': '123456',
-        'is_superuser': False,
+        'is_superuser': True,
         'username': 'maleic',
         'first_name': 'Maleic',
         'last_name': 'Acid',
-        'date_joined': '2018-06-14 21:34:51+08',
+        'date_joined': '2018-08-10 21:34:51+08',
         'email': '[email protected]',
         'is_staff': False,
         'is_active': True,
         'last_login': '2018-06-14 21:34:51+08',
     },
+    {
+        'password': '123456',
+        'is_superuser': True,
+        'username': 'mark',
+        'first_name': 'Mark',
+        'last_name': 'Wong',
+        'date_joined': '2018-08-10 21:34:51+08',
+        'email': '[email protected]',
+        'is_staff': False,
+        'is_active': True,
+        'last_login': '2018-06-14 21:34:51+08',
+    },
 ]
\ No newline at end of file
index 799e5f981b7cfe95808dc8c2e5650678aaa693fa..987c09513e7b4f99f59bd2e15ca0f6b2e170a62a 100644 (file)
@@ -1,6 +1,6 @@
 import sys
 import os
-from pgperffarm.settings import PORJECT_PATH
+from path import PORJECT_PATH
 # Use django's model independently
 pwd = os.path.dirname(os.path.realpath(__file__))
 sys.path.append(pwd+ "../")