merge origin
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export default {
|
||||
export default {
|
||||
login: {
|
||||
title: 'TIC Node Console',
|
||||
title: 'TIC Console',
|
||||
inputLabel: '请输入密语,例如:Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, molestias, quisquam?',
|
||||
loginBtn: 'Sign In',
|
||||
secwordBtn: 'Create Secword',
|
||||
@@ -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: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export default {
|
||||
export default {
|
||||
login: {
|
||||
title: 'TIC Node 节点控制台',
|
||||
title: 'TIC 控制台',
|
||||
inputLabel: '请输入密语,例如:Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, molestias, quisquam?',
|
||||
loginBtn: '登录',
|
||||
secwordBtn: '新密语',
|
||||
@@ -27,12 +27,12 @@
|
||||
tableNone: '暂无数据',
|
||||
},
|
||||
network: {
|
||||
tableHeader: '当前邻居',
|
||||
searchHolder: '请输入该输入的',
|
||||
tableHeader: '当前邻居节点列表',
|
||||
searchHolder: '请输入主人地址或节点网址',
|
||||
thIndex: '序号',
|
||||
thAddress: '连接地址',
|
||||
thAccessPoint: '连接网址',
|
||||
thOwnerAddress: '邻居主人地址',
|
||||
thStatus: '连接状态',
|
||||
thPeerOwnerAddress: '邻居主人的账户地址',
|
||||
tableNone: '暂无数据',
|
||||
},
|
||||
chain: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios'
|
||||
import axios from 'axios'
|
||||
// import app from './app'
|
||||
|
||||
// 控制台应当默认访问控制台所在主机(localhost 或者 window.location.hostname)的 TIC后台,或者让用户在控制台启动时,自己设置一个节点主机。
|
||||
axios.defaults.baseURL = `http://${window.location.hostname}:6842/api/`
|
||||
axios.defaults.baseURL = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/api/`
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 || [])
|
||||
|
||||
@@ -12,10 +12,10 @@ export default {
|
||||
],
|
||||
itemList: [
|
||||
{
|
||||
height: '1',
|
||||
timestamp: '2011-11-20',
|
||||
type: '0',
|
||||
hash: 'null',
|
||||
height: 'loading',
|
||||
timestamp: 'loading',
|
||||
type: 'loading',
|
||||
hash: 'loading',
|
||||
},
|
||||
],
|
||||
fetching: false,
|
||||
|
||||
@@ -89,10 +89,11 @@ import Vue from 'vue'
|
||||
import store from '../store'
|
||||
import VueSocketio from 'vue-socket.io'
|
||||
import io from 'socket.io-client'
|
||||
import axios from 'axios'
|
||||
|
||||
const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('chain')
|
||||
|
||||
Vue.use(VueSocketio, io(`http://${window.location.hostname}:6842`), store) // todo: luk: 整个控制台应当依赖于同一个全局的节点地址变量。
|
||||
Vue.use(VueSocketio, io(axios.defaults.baseURL), store)
|
||||
|
||||
export default {
|
||||
name: 'Chain',
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
|
||||
display: flex;
|
||||
|
||||
$sideWidth: 260px;
|
||||
$sideWidth: 240px;
|
||||
$headerHeight: 64px;
|
||||
.side-menus {
|
||||
&.collapsed {
|
||||
@@ -109,6 +109,7 @@ export default {
|
||||
}
|
||||
|
||||
width: $sideWidth;
|
||||
min-width: 120px;
|
||||
background: url('../assets/images/bg.jpg') center;
|
||||
background-size: cover;
|
||||
overflow-y: auto;
|
||||
|
||||
@@ -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.accessPoint }}</td>
|
||||
<td>{{ props.item.ownerAddress }}</td>
|
||||
<td>{{ props.item.status }}</td>
|
||||
<td>{{ props.item.peerOwnerAddress }}</td>
|
||||
</template>
|
||||
<template slot="no-results">
|
||||
{{ $t('network.tableNone') }}
|
||||
|
||||
Reference in New Issue
Block a user