mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 22:36:23 +00:00
perf: Workbench shortcut command execution and stop buttons switch each other
This commit is contained in:
@@ -8,8 +8,7 @@
|
|||||||
>
|
>
|
||||||
<el-tooltip :content="item.tip" :disabled="!item.tip" placement="top">
|
<el-tooltip :content="item.tip" :disabled="!item.tip" placement="top">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="item.type ==='button'"
|
v-if="item.type ==='button' && !item.isVisible"
|
||||||
:disabled="item.disabled"
|
|
||||||
:type="item.el&&item.el.type"
|
:type="item.el&&item.el.type"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="item.callback()"
|
@click="item.callback()"
|
||||||
|
@@ -102,7 +102,7 @@ export default {
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
icon: 'fa fa-play',
|
icon: 'fa fa-play',
|
||||||
tip: this.$t('RunCommand'),
|
tip: this.$t('RunCommand'),
|
||||||
disabled: this.$store.getters.currentOrgIsRoot,
|
isVisible: this.$store.getters.currentOrgIsRoot,
|
||||||
el: {
|
el: {
|
||||||
type: 'primary'
|
type: 'primary'
|
||||||
},
|
},
|
||||||
@@ -116,7 +116,7 @@ export default {
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
icon: 'fa fa-stop',
|
icon: 'fa fa-stop',
|
||||||
tip: this.$t('StopJob'),
|
tip: this.$t('StopJob'),
|
||||||
disabled: true,
|
isVisible: true,
|
||||||
el: {
|
el: {
|
||||||
type: 'danger'
|
type: 'danger'
|
||||||
},
|
},
|
||||||
@@ -391,7 +391,7 @@ export default {
|
|||||||
|
|
||||||
setCostTimeInterval() {
|
setCostTimeInterval() {
|
||||||
this.toolbar.left.run.icon = 'fa fa-spinner fa-spin'
|
this.toolbar.left.run.icon = 'fa fa-spinner fa-spin'
|
||||||
this.toolbar.left.run.disabled = true
|
this.toolbar.left.run.isVisible = true
|
||||||
this.executionInfo.cancel = setInterval(() => {
|
this.executionInfo.cancel = setInterval(() => {
|
||||||
this.executionInfo.timeCost += 0.1
|
this.executionInfo.timeCost += 0.1
|
||||||
}, 100)
|
}, 100)
|
||||||
@@ -469,8 +469,8 @@ export default {
|
|||||||
clearInterval(this.executionInfo.cancel)
|
clearInterval(this.executionInfo.cancel)
|
||||||
this.toolbar.left.run.icon = 'fa fa-play'
|
this.toolbar.left.run.icon = 'fa fa-play'
|
||||||
}
|
}
|
||||||
this.toolbar.left.run.disabled = this.executionInfo.status === 'running'
|
this.toolbar.left.run.isVisible = this.executionInfo.status === 'running'
|
||||||
this.toolbar.left.stop.disabled = this.executionInfo.status !== 'running'
|
this.toolbar.left.stop.isVisible = this.executionInfo.status !== 'running'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user