Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.4.0 #185

Merged
merged 6 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion release_note.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.3.1
v1.4.0
143 changes: 112 additions & 31 deletions src/components/TransactionListExplorer/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
<el-popover
width="600"
trigger="click"
@show="handleReceiptDetails(item.row)"
>
<div class="el-popover__title">
交易回执详情
Expand Down Expand Up @@ -215,8 +214,49 @@ export default {
this.buttonState.disablePreClick = true
this.buttonState.disableNextClick = false
},
handleReceiptDetails(val) {
this.txReceipt = val
async handleReceiptDetails(val) {
if (typeof val.properties.byProxy !== 'undefined') {
this.txReceipt = val
return
}
const response = await getTransaction({
path: this.chainValue,
txHash: val.txHash,
blockNumber: val.blockNumber
}).catch(
(error) => {
this.$message({
message: '网络异常:' + error,
type: 'error',
duration: 5000
})
}
)
if (
typeof response.errorCode === 'undefined' ||
response.errorCode !== 0
) {
throw new Error(
'查询交易失败,交易哈希: ' +
val.txHash +
',详情: ' +
JSON.stringify(response)
)
}
if (
typeof response.errorCode === 'undefined' ||
response.errorCode !== 0
) {
throw new Error(
'查询交易失败,交易哈希: ' +
val.txHash +
',详情: ' +
JSON.stringify(response)
)
}
var tx = response.data
this.txReceipt = response.data
this.txHash = tx.txHash
},
handlePrevClick() {
if (this.currentStep <= 0) {
Expand Down Expand Up @@ -366,36 +406,77 @@ export default {
this.buttonState.loading = false
return
}

this.fetchAllTx(chainValue, resp.data.transactions)
.then((response) => {
this.buttonState.loading = false
this.nextBlockNumber = resp.data.nextBlockNumber
this.nextOffset = resp.data.nextOffset

if (response.length === 0) {
this.$message({
type: 'info',
message: '交易列表为空,已查询至数据末尾'
})
this.updateButtonStatus()
return
if (resp.data.transactions.length === 0 && resp.data.transactionWithDetails === 0) {
this.$message({
type: 'info',
message: '交易列表为空,已查询至数据末尾'
})
this.updateButtonStatus()
return
}
if (resp.data.transactionWithDetails.length !== 0) {
this.buttonState.loading = false
this.nextBlockNumber = resp.data.nextBlockNumber
this.nextOffset = resp.data.nextOffset
var txs = []
if (resp.data.transactionWithDetails.length === 0) {
return txs
}
const defaultValue = (value, defaultValue) => {
if (value === 0) {
return value
}

if (this.controlVersion !== version) {
return
if (!value) {
return defaultValue
}

this.transactionList = response
this.historyData[this.currentStep] = response
this.currentStep += 1

this.updateButtonStatus()
})
.catch((err) => {
this.buttonState.loading = false
this.$message({ type: 'error', message: err.toString() })
})
return value
}
if (this.controlVersion !== version) {
return
}
for (const tx of resp.data.transactionWithDetails) {
var newTx = {}
newTx.txHash = defaultValue(tx.txHash, 'unknown')
newTx.username = defaultValue(tx.username, 'unknown')
newTx.txID = defaultValue(tx.xaTransactionID, 'unknown')
newTx.blockNumber = defaultValue(tx.blockNumber, 'unknown')
newTx.path = defaultValue(tx.path, 'unknown')
newTx.method = defaultValue(tx.method, 'unknown')
newTx.properties = defaultValue(tx.properties, 'unknown')
txs[txs.length] = newTx
}
this.transactionList = txs
this.historyData[this.currentStep] = txs
this.currentStep += 1
this.updateButtonStatus()
}
if (resp.data.transactions.length !== 0) {
this.fetchAllTx(chainValue, resp.data.transactions)
.then((response) => {
this.buttonState.loading = false
this.nextBlockNumber = resp.data.nextBlockNumber
this.nextOffset = resp.data.nextOffset
if (response.length === 0) {
this.$message({
type: 'info',
message: '交易列表为空,已查询至数据末尾'
})
this.updateButtonStatus()
return
}
if (this.controlVersion !== version) {
return
}
this.transactionList = response
this.historyData[this.currentStep] = response
this.currentStep += 1
this.updateButtonStatus()
})
.catch((err) => {
this.buttonState.loading = false
this.$message({ type: 'error', message: err.toString() })
})
}
})
.catch((error) => {
this.buttonState.loading = false
Expand Down
22 changes: 22 additions & 0 deletions src/views/homepage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
<el-card style="min-height: 45vh;overflow-y:auto">
<div slot="header">
<span>本地系统信息</span>
<el-button icon="el-icon-refresh-left" type="text" style="padding: 0px;float:right" @click="refreshSystemInfo">刷新</el-button>
</div>
<table>
<tr>
Expand All @@ -194,6 +195,14 @@
<td>操作系统版本:</td>
<td>{{ systemInfo.osVersion }}</td>
</tr>
<tr>
<td>磁盘剩余情况:</td>
<td>{{ systemInfo.totalDiskFreeSpace }} / {{ systemInfo.totalDiskSpace }}</td>
</tr>
<tr>
<td>内存剩余情况:</td>
<td>{{ systemInfo.freeMemorySize }} / {{ systemInfo.totalMemorySize }}</td>
</tr>
<tr>
<td>JVM名称:</td>
<td>{{ systemInfo.javaVMName }}</td>
Expand Down Expand Up @@ -321,6 +330,19 @@ export default {

},
methods: {
refreshSystemInfo() {
systemStatus().then(response => {
if (!response.data) {
this.$message.error('本地系统信息返回为空,请检查后台信息')
}
this.systemInfo = response.data
}).catch(_ => {
this.$message({
type: 'error',
message: '获取系统信息失败,网络错误'
})
})
},
refreshChainsInfo() {
this.chainsInfoLoading = true
this.chainsInfo = []
Expand Down
1 change: 1 addition & 0 deletions src/views/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
v-model="loginForm.username"
placeholder="用户名"
class="input-with-select"
tabindex="1"
/>
</el-form-item>
</el-col>
Expand Down
21 changes: 21 additions & 0 deletions src/views/transaction/transactionSteps/xaTransactionStep.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
export const xaTransactionManagerSteps = [
{
element: '#ChainExplorer',
title: '1. 导航选择',
intro: '第一步:从zone-chain导航中选择对应的链',
position: 'right'
},
{
element: '#xaTransactionListExplorer',
title: '2. 事务列表展示',
intro: '第二步:选择好对应的链之后,就会在资源列表中展示这条链中所有事务',
position: 'left'
},
{
element: '#sendxaTransaction',
title: '发起交易',
intro: '若需要发起事务,请点击"发起事务"按钮',
position: 'left'
}
]

export const startXASteps = [
{
element: '#XAID',
Expand Down
Loading
Loading