Skip to content

Commit

Permalink
Show stdout and stderr when exec cmd on web.
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <[email protected]>
  • Loading branch information
Jianhui Zhao committed Jan 12, 2019
1 parent 7ae8eb6 commit d813be2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions html/src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<Button type="error" size="large" :disabled="cmdStatus.execing == 0" @click="ignoreCmdResp">{{$t('Ignore')}}</Button>
</div>
</Modal>
<Modal v-model="cmdStatus.respModal" :title="$t('Response of executive command')" :width="900">
<Modal v-model="cmdStatus.respModal" :title="$t('Response of executive command')" :width="1000">
<Table :columns="cmdStatus.response.columns" :data="cmdStatus.response.data" height="300"></Table>
<div slot="footer"></div>
</Modal>
Expand Down Expand Up @@ -114,17 +114,25 @@ export default {
title: this.$t('Command'),
key: 'cmd'
},
{
title: this.$t('Status Code'),
key: 'code'
},
{
title: this.$t('Error Code'),
key: 'err'
},
{
title: this.$t('Error Message'),
key: 'msg'
},
{
title: this.$t('Status Code'),
key: 'code'
},
{
title: this.$t('Stdout'),
key: 'stdout'
},
{
title: this.$t('Stderr'),
key: 'stderr'
}
],
data: []
Expand Down Expand Up @@ -211,8 +219,8 @@ export default {
code: resp.code,
err: resp.err,
msg: resp.msg,
stdout: resp.stdout,
stderr: resp.stderr
stdout: window.atob(resp.stdout),
stderr: window.atob(resp.stderr)
});
delete this.cmdStatus.running[token];
Expand Down
2 changes: 1 addition & 1 deletion statik/statik.go

Large diffs are not rendered by default.

0 comments on commit d813be2

Please sign in to comment.