summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/IpxeBuilderModuleConfig.vue
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/components/IpxeBuilderModuleConfig.vue')
-rw-r--r--webapp/src/components/IpxeBuilderModuleConfig.vue14
1 files changed, 12 insertions, 2 deletions
diff --git a/webapp/src/components/IpxeBuilderModuleConfig.vue b/webapp/src/components/IpxeBuilderModuleConfig.vue
index 4909227..874c3ee 100644
--- a/webapp/src/components/IpxeBuilderModuleConfig.vue
+++ b/webapp/src/components/IpxeBuilderModuleConfig.vue
@@ -16,7 +16,8 @@
"buildingIpxe": "Building iPXE ...",
"cleanIpxe": "Clean iPXE",
"cleaningIpxe": "Cleaning iPXE ...",
- "alreadyBuiling": "The iPXE building process not finished"
+ "alreadyBuiling": "The iPXE building process not finished",
+ "cancelIpxe": "Cancel iPXE"
},
"de": {
"efi": "EFI",
@@ -34,7 +35,8 @@
"buildingIpxe": "iPXE wird gebaut ...",
"cleanIpxe": "iPXE aufräumen",
"cleaningIpxe": "iPXE wird aufgeräumt ..",
- "alreadyBuiling": "Der iPXE build-Prozess ist noch nicht abgeschlossen"
+ "alreadyBuiling": "Der iPXE build-Prozess ist noch nicht abgeschlossen",
+ "cancelIpxe": "iPXE stoppen"
}
}
</i18n>
@@ -58,6 +60,7 @@
</v-card>
<div class="text-xs-right">
<v-btn flat color="error" @click="cleanIpxe" :disabled=disableButtons><v-icon left>delete</v-icon>{{ $t('cleanIpxe') }}</v-btn>
+ <v-btn flat color="warning" @click="cancelIpxe" :disabled=!disableButtons><v-icon left>cancel</v-icon>{{ $t('cancelIpxe') }}</v-btn>
<v-btn flat color="primary" @click="buildIpxe" :disabled=disableButtons><v-icon left>gavel</v-icon>{{ $t('buildIpxe') }}</v-btn>
</div>
@@ -194,6 +197,11 @@ export default {
if (result.data.status === 'SUCCESS') this.$snackbar({ color: 'primary', text: this.$tc('cleaningIpxe') })
else if (result.data.status === 'ALREADY_BUILDING') this.$snackbar({ color: 'error', text: this.$tc('alreadyBuiling') })
})
+ },
+ cancelIpxe () {
+ axios.get('/api/ipxe/' + this.ipxeVersion + '/cancel').then(result => {
+ if (result.data.status === 'SUCCESS') this.$snackbar({ color: 'primary', text: this.$tc('cleaningIpxe') }) // TODO:
+ })
}
},
created () {
@@ -213,6 +221,8 @@ export default {
axios.get('/api/ipxe/' + this.ipxeVersion + '/log').then(result => {
var lines = result.data.split('\n')
+ // Limit the log to 500 lines, to prevent lagging
+ lines = lines.slice(-500)
for (var line in lines) {
if (lines[line] === '') continue
var attr = lines[line].split('\t')