修改网络相关

This commit is contained in:
chao.li
2019-01-03 03:48:24 +00:00
parent 6944326187
commit becc085215
6 changed files with 33 additions and 32 deletions

View File

@@ -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: {

View File

@@ -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: {

View File

@@ -1,4 +1,4 @@
import axios from 'axios'
import axios from 'axios'
// import app from './app'
// 控制台应当默认访问控制台所在主机(localhost 或者 window.location.hostname)的 TIC后台或者让用户在控制台启动时自己设置一个节点主机。

View File

@@ -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,

View File

@@ -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 || [])

View File

@@ -1,4 +1,4 @@
<template>
<template>
<div class="network-page">
<div class="card-content">
<div class="app-card elevation-1">
@@ -36,9 +36,9 @@
</template>
<template slot="items" slot-scope="props">
<td>{{ props.item.index }}</td>
<td>{{ props.item.address }}</td>
<td>{{ props.item.status }}</td>
<td>{{ props.item.peerOwnerAddress }}</td>
<td>{{ props.item.accessPoint }}</td>
<td>{{ props.item.ownerAddress }}</td>
<td>{{ props.item.brokenCount }}</td>
</template>
<template slot="no-results">
{{ $t('network.tableNone') }}