Files
system/components/server/DiskInfo.vue
Xuan Loi ae1ea57130 changes
2026-01-09 17:25:23 +07:00

25 lines
631 B
Vue

<template>
<DataView v-bind="vbind" v-if="vbind"></DataView>
</template>
<script>
export default {
props: ['ssh', 'vpagename'],
data() {
return {
showmodal: undefined,
vbind: undefined
}
},
async created() {
await this.getApi()
},
methods: {
async getApi() {
let data = {ssh: this.ssh || 1, path: '', cmd: `df -h`, format: 'diskinfo', user: this.$store.login.id}
let rows = await this.$insertapi('executecommand', data, undefined, false)
console.log('rows', rows)
this.vbind = {pagename: this.vpagename, setting: 'diskinfo-fields', data: rows}
}
}
}
</script>