From 9050fe25049560964f03cf1264dcab1a83f6b92f Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Mon, 15 Apr 2019 03:36:13 +0000 Subject: [configurator] add ability to mark a config as default --- webapp/src/components/ConfiguratorModule.vue | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'webapp/src') diff --git a/webapp/src/components/ConfiguratorModule.vue b/webapp/src/components/ConfiguratorModule.vue index 0641221..a08eb47 100644 --- a/webapp/src/components/ConfiguratorModule.vue +++ b/webapp/src/components/ConfiguratorModule.vue @@ -9,7 +9,9 @@ "deleteConfigs": "Delete one config | Delete {0} configs", "createConfig": "Create config", "deleteEntries": "Delete one entry | Delete {0} entries", - "createEntry": "Create entry" + "createEntry": "Create entry", + "successSetAsDefault": "Successfully set config as default.", + "defaultConfig": "Default Config" }, "de": { "id": "ID", @@ -20,7 +22,9 @@ "deleteConfigs": "Eine Konfiguration löschen | {0} Konfigurationen löschen", "createConfig": "Konfiguration erstellen", "deleteEntries": "Einen Eintrag löschen | {0} Einträge löschen", - "createEntry": "Eintrag erstellen" + "createEntry": "Eintrag erstellen", + "successSetAsDefault": "Konfiguration erfolgreich als Standard gesetzt.", + "defaultConfig": "Standard Konfiguration" } } @@ -40,7 +44,16 @@ {{ $t('configs') }} -
+
+ + + {{ $t('defaultConfig') }} + + + outlined_flag + {{ row.item.groupCount }}category / @@ -131,7 +144,7 @@ export default { { key: 'id', text: this.$t('id'), width: '50px' }, { key: 'name', text: this.$t('name'), width: '220px' }, { key: 'description', text: this.$t('description') }, - { key: 'actions', width: '200px' } + { key: 'actions', width: '210px' } ] }, entryHeaders () { @@ -168,6 +181,11 @@ export default { }, editEntry (item) { this.setDialog({ show: true, type: 'entry', info: item }) + }, + async setAsDefault (id) { + await this.$http.put('/api/ipxeconfigs/' + id + '/default') + this.$snackbar({ text: this.$t('successSetAsDefault'), color: 'success', timeout: 2000 }) + this.$store.dispatch('configurator/loadData') } }, created () { -- cgit v1.2.3-55-g7522