From ebe00a6b9124fb5e87ef082acf9819f023facbdc Mon Sep 17 00:00:00 2001 From: "luk.lu" Date: Thu, 20 Dec 2018 11:06:31 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=B8=BA=20=20npm=20ru?= =?UTF-8?q?n=20test/dist/deploy=20=E7=9A=84=E8=84=9A=E6=9C=AC=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d0615c0..412555b 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "0.1.0", "private": true, "scripts": { - "serve": "vue-cli-service serve", - "build": "vue-cli-service build", - "deploy": "node ./deploy.js -r '/home/tic/console.web.site' -u tic", + "test": "vue-cli-service serve", + "dist": "vue-cli-service build", + "deploy": "node ./deploy.js -r '/home/tic/node.console.web.site' -u tic", "lint": "vue-cli-service lint", "test:unit": "vue-cli-service test:unit" }, From 01ca2042dd6986e7028246f6b9be31dfce995b3f Mon Sep 17 00:00:00 2001 From: "luk.lu" Date: Thu, 20 Dec 2018 14:14:05 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E6=8A=8A=20npm=20run=20test=20=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20npm=20run=20dev=20=E5=9B=A0=E4=B8=BA=20test=20?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E8=A2=AB=E7=94=A8=E5=9C=A8=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E4=B8=93=E4=B8=9A=E6=B5=8B=E8=AF=95=E4=B8=8A=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 412555b..8e8def1 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "test": "vue-cli-service serve", + "dev": "vue-cli-service serve", "dist": "vue-cli-service build", "deploy": "node ./deploy.js -r '/home/tic/node.console.web.site' -u tic", "lint": "vue-cli-service lint", From eb0b985a9d419fce81cb2431ee7c2466d6f94c39 Mon Sep 17 00:00:00 2001 From: "luk.lu" Date: Mon, 24 Dec 2018 22:51:59 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=97=B6=E5=85=89?= =?UTF-8?q?=E9=93=BE=E7=AB=AF=E5=8F=A38888=EF=BC=8C=E6=8D=A2=E6=8E=896842.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/axios.js | 2 +- src/views/Chain.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/axios.js b/src/services/axios.js index bf4cb3b..04dd571 100644 --- a/src/services/axios.js +++ b/src/services/axios.js @@ -2,4 +2,4 @@ // import app from './app' // 控制台应当默认访问控制台所在主机(localhost 或者 window.location.hostname)的 TIC后台,或者让用户在控制台启动时,自己设置一个节点主机。 -axios.defaults.baseURL = `http://${window.location.hostname}:6842/api/` +axios.defaults.baseURL = `http://${window.location.hostname}:8888/api/` diff --git a/src/views/Chain.vue b/src/views/Chain.vue index 398835d..af9c729 100644 --- a/src/views/Chain.vue +++ b/src/views/Chain.vue @@ -92,7 +92,7 @@ import io from 'socket.io-client' const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('chain') -Vue.use(VueSocketio, io(`http://${window.location.hostname}:6842/api/`), store) // todo: luk: 整个控制台应当依赖于同一个全局的节点地址变量。 +Vue.use(VueSocketio, io(`http://${window.location.hostname}:8888/api/`), store) // todo: luk: 整个控制台应当依赖于同一个全局的节点地址变量。 export default { name: 'Chain', From 69443261871741a5ec7fd5ad8ff57696354b21d0 Mon Sep 17 00:00:00 2001 From: "luk.lu" Date: Tue, 25 Dec 2018 15:21:02 +0800 Subject: [PATCH 04/14] ConfigSys => ConfigBasic, ConfigUser => ConfigCustom --- ConfigSys.js => ConfigBasic.js | 0 ConfigUser.js => ConfigCustom.js | 0 server.js | 14 +++++++------- 3 files changed, 7 insertions(+), 7 deletions(-) rename ConfigSys.js => ConfigBasic.js (100%) rename ConfigUser.js => ConfigCustom.js (100%) diff --git a/ConfigSys.js b/ConfigBasic.js similarity index 100% rename from ConfigSys.js rename to ConfigBasic.js diff --git a/ConfigUser.js b/ConfigCustom.js similarity index 100% rename from ConfigUser.js rename to ConfigCustom.js diff --git a/server.js b/server.js index 74e5a51..6d87e8b 100644 --- a/server.js +++ b/server.js @@ -9,15 +9,15 @@ function config(){ // 读取配置文件 try { - if (fs.existsSync('./ConfigSys.js')) { - Config=require('./ConfigSys.js') - console.info('ConfigSys loaded') + if (fs.existsSync('./ConfigBasic.js')) { + Config=require('./ConfigBasic.js') + console.info('ConfigBasic loaded') } - if (fs.existsSync('./ConfigUser.js')) { // 如果存在,覆盖掉 ConfigSys 里的默认参数 - Config=deepmerge(Config, require('./ConfigUser.js')) // 注意,objectMerge后,产生了一个新的对象,而不是在原来的Config里添加 - console.info('ConfigUser loaded') + if (fs.existsSync('./ConfigCustom.js')) { // 如果存在,覆盖掉 ConfigBasic 里的默认参数 + Config=deepmerge(Config, require('./ConfigCustom.js')) // 注意,objectMerge后,产生了一个新的对象,而不是在原来的Config里添加 + console.info('ConfigCustom loaded') } - if (fs.existsSync('./ConfigSecret.js')) { // 如果存在,覆盖掉 ConfigSys 和 ConfigUser 里的参数 + if (fs.existsSync('./ConfigSecret.js')) { // 如果存在,覆盖掉 ConfigBasic 和 ConfigCustom 里的参数 Config=deepmerge(Config, require('./ConfigSecret.js')) console.info('ConfigSecret loaded') } From becc0852159ac3a62441cdae8f7b2cdb5da94ca6 Mon Sep 17 00:00:00 2001 From: "chao.li" Date: Thu, 3 Jan 2019 03:48:24 +0000 Subject: [PATCH 05/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/en.js | 14 +++++++------- src/i18n/zh-CN.js | 10 +++++----- src/services/axios.js | 2 +- src/store/modules/chain.js | 10 +++++----- src/store/modules/network.js | 21 +++++++++++---------- src/views/Network.vue | 8 ++++---- 6 files changed, 33 insertions(+), 32 deletions(-) diff --git a/src/i18n/en.js b/src/i18n/en.js index 3d2fe74..d24d932 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -1,4 +1,4 @@ -export default { +export default { login: { title: 'TIC Node Console', inputLabel: '请输入密语,例如:Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, molestias, quisquam?', @@ -27,12 +27,12 @@ tableNone: '暂无数据', }, network: { - tableHeader: '当前邻居', - searchHolder: '请输入该输入的', - thIndex: '序号', - thAddress: '连接地址', - thStatus: '连接状态', - thPeerOwnerAddress: '邻居主人的账户地址', + tableHeader: 'Current neighbouring peer list', + searchHolder: 'Please input peer owner address or network url', + thIndex: 'Nr.', + thAccessPoint: 'Url', + thStatus: 'Status', + thOwnerAddress: 'Owner address', tableNone: '暂无数据', }, chain: { diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index e4b85a3..f1ffe76 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -1,4 +1,4 @@ -export default { +export default { login: { title: 'TIC Node 节点控制台', inputLabel: '请输入密语,例如:Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, molestias, quisquam?', @@ -27,12 +27,12 @@ tableNone: '暂无数据', }, network: { - tableHeader: '当前邻居', - searchHolder: '请输入该输入的', + tableHeader: '当前邻居节点列表', + searchHolder: '请输入主人地址或节点网址', thIndex: '序号', - thAddress: '连接地址', + thAccessPoint: '连接网址', + thOwnerAddress: '邻居主人地址', thStatus: '连接状态', - thPeerOwnerAddress: '邻居主人的账户地址', tableNone: '暂无数据', }, chain: { diff --git a/src/services/axios.js b/src/services/axios.js index 04dd571..e544695 100644 --- a/src/services/axios.js +++ b/src/services/axios.js @@ -1,4 +1,4 @@ -import axios from 'axios' +import axios from 'axios' // import app from './app' // 控制台应当默认访问控制台所在主机(localhost 或者 window.location.hostname)的 TIC后台,或者让用户在控制台启动时,自己设置一个节点主机。 diff --git a/src/store/modules/chain.js b/src/store/modules/chain.js index 8103e1c..57f6403 100644 --- a/src/store/modules/chain.js +++ b/src/store/modules/chain.js @@ -1,4 +1,4 @@ -import axios from 'axios' +import axios from 'axios' export default { namespaced: true, @@ -13,10 +13,10 @@ export default { ], itemList: [ { - height: '1', - timestamp: '2011-11-20', - type: '0', - hash: 'null', + height: 'loading', + timestamp: 'loading', + type: 'loading', + hash: 'loading', }, ], fetching: false, diff --git a/src/store/modules/network.js b/src/store/modules/network.js index 49d1a05..9dd876d 100644 --- a/src/store/modules/network.js +++ b/src/store/modules/network.js @@ -1,4 +1,4 @@ -import axios from 'axios' +import axios from 'axios' export default { namespaced: true, @@ -7,17 +7,17 @@ export default { pageEntity: [5, 10, 25], headers: [ { text: 'network.thIndex', value: 'index', align: 'center' }, - { text: 'network.thAddress', value: 'address', align: 'center' }, + { text: 'network.thAccessPoint', value: 'accessPoint', align: 'center' }, + { text: 'network.thOwnerAddress', value: 'ownerAddress', align: 'center' }, { text: 'network.thStatus', value: 'status', align: 'center' }, - { text: 'network.thPeerOwnerAddress', value: 'peerOwnerAddress', align: 'center' }, ], itemList: [ - // { - // index: '', - // address: '', - // status: '', - // peerOwnerAddress: '', - // }, + { + index: 'loading', + accessPoint: 'loading', + ownerAddress: 'loading', + status: 'loading', + }, ], fetching: false, filter: '', @@ -42,7 +42,8 @@ export default { actions: { async updateNetInfo({ state, commit }) { - let result = await axios.post('Peer/sharePeer', {}) + let result = await axios.post('Peer/getPeerList', {}) + commit('setPeerNumber', (result && result.data) ? result.data.length : 0) commit('setItemList', result.data || []) diff --git a/src/views/Network.vue b/src/views/Network.vue index 4f46b2c..555ce3b 100644 --- a/src/views/Network.vue +++ b/src/views/Network.vue @@ -1,4 +1,4 @@ -