# Conflicts:
#	src/i18n/en.js
This commit is contained in:
lim.wang
2019-04-14 22:11:42 +09:00
10 changed files with 52 additions and 51 deletions

View File

@@ -6,8 +6,9 @@
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
"dist": "vue-cli-service build", "dist": "vue-cli-service build",
"deploy": "node ./deploy.js", "deploy": "node ./deploy.js",
"daemon:sup": "cross-env NODE_ENV=production supervisor -i data.log,node_modules,dist server.js", "daemon": "cross-env NODE_ENV=production node server.js",
"daemon": "cross-env NODE_ENV=production pm2 start server.js -n node.console.web", "daemon.sup": "cross-env NODE_ENV=production supervisor -i data.log,node_modules,dist server.js",
"daemon.pm2": "cross-env NODE_ENV=production pm2 start server.js -n node.console.web",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit" "test:unit": "vue-cli-service test:unit"
}, },

View File

@@ -8,15 +8,15 @@ export default {
}, },
home: { home: {
titleOwner: 'Account', titleOwner: 'Account',
titleNode: 'Node', titleNode: 'Netnode',
titleNetwork: 'Network', titleNetwork: 'Network',
titleChain: 'Data', titleChain: 'Data',
titleToken: 'Token', titleToken: 'Token',
titleMarket: 'App', titleMarket: 'App',
}, },
owner: { owner: {
tableHeader: 'my transaction', tableHeader: 'Account',
searchHolder: '请输入该输入的', searchHolder: 'Search',
thId: '交易 ID', thId: '交易 ID',
thType: '类型', thType: '类型',
thSender: '发送者', thSender: '发送者',
@@ -28,8 +28,8 @@ export default {
tableNone: '暂无数据', tableNone: '暂无数据',
}, },
network: { network: {
tableHeader: 'Current neighbouring node list', tableHeader: 'Network',
searchHolder: 'Please input node owner address or network url', searchHolder: 'Search netnode owner address or url',
thIndex: 'Nr.', thIndex: 'Nr.',
thAccessPoint: 'Url', thAccessPoint: 'Url',
thStatus: 'Status', thStatus: 'Status',
@@ -37,24 +37,24 @@ export default {
tableNone: '暂无数据', tableNone: '暂无数据',
}, },
chain: { chain: {
tableHeader: 'Block List', tableHeader: 'Blockchain',
searchHolder: '请输入该输入的', searchHolder: 'Search',
thHeight: 'Height', thHeight: 'Height',
thTimestamp: 'Timestamp', thTimestamp: 'Timestamp',
thType: 'Type', thType: 'Type',
thHash: 'Hash', thHash: 'Hash',
tableNone: '暂无数据', tableNone: 'No data available',
}, },
node: { netnode: {
tableHeader: '本节点打包的区块列表', tableHeader: 'Netnode',
searchHolder: '输入要查询的区块高度或者区块哈希', searchHolder: 'Search block height or hash',
thHeight: '区块高度', thHeight: 'Height',
thTimestamp: '时间戳', thTimestamp: 'Timestamp',
thType: '区块类型', thType: 'Type',
thHash: '区块哈希', thHash: 'Hash',
tableNone: '暂无数据', tableNone: 'No data available',
thWinner: '获胜者', thWinner: 'Winner',
thPacker: '打包区块者', thPacker: 'Packer',
thRewardPacker: '打包奖励', thRewardPacker: 'Reward',
}, },
} }

View File

@@ -15,7 +15,7 @@ export default {
titleMarket: '应用', titleMarket: '应用',
}, },
owner: { owner: {
tableHeader: '我的交易', tableHeader: '交易记录',
searchHolder: '请输入查询内容', searchHolder: '请输入查询内容',
thId: '交易 ID', thId: '交易 ID',
thType: '类型', thType: '类型',
@@ -28,8 +28,8 @@ export default {
tableNone: '暂无数据', tableNone: '暂无数据',
}, },
network: { network: {
tableHeader: '当前邻居节点列表', tableHeader: '网络节点列表',
searchHolder: '请输入主人地址或节点网址', searchHolder: '查询节点主人地址或节点网址',
thIndex: '序号', thIndex: '序号',
thAccessPoint: '连接网址', thAccessPoint: '连接网址',
thOwnerAddress: '邻居主人地址', thOwnerAddress: '邻居主人地址',
@@ -38,16 +38,16 @@ export default {
}, },
chain: { chain: {
tableHeader: '区块链', tableHeader: '区块链',
searchHolder: '输入要查询的区块高度或者区块哈希', searchHolder: '查询',
thHeight: '区块高度', thHeight: '区块高度',
thTimestamp: '时间戳', thTimestamp: '时间戳',
thType: '区块类型', thType: '区块类型',
thHash: '区块哈希', thHash: '区块哈希',
tableNone: '暂无数据', tableNone: '暂无数据',
}, },
node: { netnode: {
tableHeader: '本节点打包区块列表', tableHeader: '打包区块列表',
searchHolder: '输入要查询区块高度或区块哈希', searchHolder: '查询区块高度或区块哈希',
thHeight: '区块高度', thHeight: '区块高度',
thType: '区块类型', thType: '区块类型',
thHash: '区块哈希', thHash: '区块哈希',

View File

@@ -6,7 +6,7 @@ import Home from './views/Home'
import Login from './views/Login' import Login from './views/Login'
import Owner from './views/Owner' import Owner from './views/Owner'
import Chain from './views/Chain' import Chain from './views/Chain'
import Node from './views/Node' import Netnode from './views/Netnode'
import Network from './views/Network' import Network from './views/Network'
import Market from './views/Market' import Market from './views/Market'
@@ -27,8 +27,8 @@ const router = new Router({
component: Owner, component: Owner,
}, },
{ {
path: 'node', path: 'netnode',
component: Node, component: Netnode,
}, },
{ {
path: 'network', path: 'network',

View File

@@ -2,7 +2,7 @@ import axios from 'axios'
import * as Ticrypto from 'tic.crypto' import * as Ticrypto from 'tic.crypto'
import * as ticAction from 'tic.action' import * as ticAction from 'tic.action'
const TicActTransfer = ticAction.ActTransfer const TicActionTransfer = ticAction.ActionTransfer
const TIC_TXFEE = 10 const TIC_TXFEE = 10
@@ -91,7 +91,7 @@ export class TIC {
if (!toAddress || !amount) { if (!toAddress || !amount) {
throw new Error('ERROR:RequiredParamsMissing') throw new Error('ERROR:RequiredParamsMissing')
} // amount cannot be zero } // amount cannot be zero
let action = new TicActTransfer({ let action = new TicActionTransfer({
amount: parseInt(amount), amount: parseInt(amount),
toAddress: toAddress, toAddress: toAddress,
fee: option.gasFee, fee: option.gasFee,
@@ -122,7 +122,7 @@ export class TIC {
if (!option.toAddress || !option.amount) { if (!option.toAddress || !option.amount) {
throw new Error('ERROR:RequiredParamsMissing') throw new Error('ERROR:RequiredParamsMissing')
} }
let action = new TicActTransfer({ let action = new TicActionTransfer({
amount: parseInt(option.amount), amount: parseInt(option.amount),
toAddress: option.toAddress, toAddress: option.toAddress,
fee: option.fee || this._defaultFee, fee: option.fee || this._defaultFee,

View File

@@ -1,6 +1,6 @@
export { default as chain } from './chain' export { default as chain } from './chain'
export { default as market } from './market' export { default as market } from './market'
export { default as network } from './network' export { default as network } from './network'
export { default as node } from './node' export { default as netnode } from './netnode'
export { default as owner } from './owner' export { default as owner } from './owner'
export { default as login } from './login' export { default as login } from './login'

View File

@@ -5,13 +5,13 @@ export default {
state: { state: {
pageEntity: [5, 10, 25], pageEntity: [5, 10, 25],
headers: [ headers: [
{ text: 'node.thHeight', value: 'height', align: 'center' }, { text: 'netnode.thHeight', value: 'height', align: 'center' },
{ text: 'node.thType', value: 'type', align: 'center' }, { text: 'netnode.thType', value: 'type', align: 'center' },
{ text: 'node.thHash', value: 'hash', align: 'center' }, { text: 'netnode.thHash', value: 'hash', align: 'center' },
{ text: 'node.thTimestamp', value: 'timestamp', align: 'center' }, { text: 'netnode.thTimestamp', value: 'timestamp', align: 'center' },
// { text: 'node.thWinner', value: 'winnerPubkey', align: 'center' }, // { text: 'netnode.thWinner', value: 'winnerPubkey', align: 'center' },
{ text: 'node.thPacker', value: 'packerPubkey', align: 'center' }, { text: 'netnode.thPacker', value: 'packerPubkey', align: 'center' },
{ text: 'node.thRewardPacker', value: 'rewardPacker', align: 'center' }, { text: 'netnode.thRewardPacker', value: 'rewardPacker', align: 'center' },
], ],
blockList: [ blockList: [
{ {

View File

@@ -38,7 +38,7 @@ export default {
actions: { actions: {
async updateNetInfo({ state, commit }) { async updateNetInfo({ state, commit }) {
let result = await axios.post('Node/nodeStat', {}) let result = await axios.post('Netnode/nodeStat', {})
commit('setNodeNumber', (result && result.data) ? result.data.length : 0) commit('setNodeNumber', (result && result.data) ? result.data.length : 0)

View File

@@ -29,7 +29,7 @@ const sideMenus = [
{ {
title: 'home.titleNode', title: 'home.titleNode',
icon: 'all_inclusive', icon: 'all_inclusive',
path: '/node', path: '/netnode',
}, },
{ {
title: 'home.titleNetwork', title: 'home.titleNetwork',

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="node-page"> <div class="netnode-page">
<div class="card-content"> <div class="card-content">
<div class="app-card elevation-1"> <div class="app-card elevation-1">
<div>主机地址 <br> {{ ipAddress }}</div> <div>主机地址 <br> {{ ipAddress }}</div>
@@ -12,10 +12,10 @@
<div class="table-content elevation-1"> <div class="table-content elevation-1">
<div class="panel-header"> <div class="panel-header">
<h3>{{ $t('node.tableHeader') }}</h3> <h3>{{ $t('netnode.tableHeader') }}</h3>
<div class="search-input"> <div class="search-input">
<v-text-field <v-text-field
:placeholder="$t('node.searchHolder')" :placeholder="$t('netnode.searchHolder')"
:value="filter" :value="filter"
@input="inputFilter" @input="inputFilter"
append-icon="search" /> append-icon="search" />
@@ -44,7 +44,7 @@
<td>{{ props.item.rewardPacker }}</td> <td>{{ props.item.rewardPacker }}</td>
</template> </template>
<template slot="no-results"> <template slot="no-results">
{{ $t('node.tableNone') }} {{ $t('netnode.tableNone') }}
</template> </template>
</v-data-table> </v-data-table>
</template> </template>
@@ -58,10 +58,10 @@ import {
createNamespacedHelpers, createNamespacedHelpers,
} from 'vuex' } from 'vuex'
const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('node') const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('netnode')
export default { export default {
name: 'Node', name: 'Netnode',
computed: { computed: {
...mapState([ ...mapState([
@@ -94,7 +94,7 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.node-page { .netnode-page {
.card-content { .card-content {
display: flex; display: flex;