diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 9b3ad380..e6063db2 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -6,11 +6,6 @@ WIFI change 5g channel to 52,56,60 and 2g channel to 8 recheck before doing as it seems to vary, maybe someone else's is auto switching -todo: ensure dbid on about page - No, showing empty for no license mode, wtf? - -todo: about form show real dbid not license dbid or both I guess - todo: license form erase all data? has to go somewhere, it's an ops thing kind of but also a biz thing so... hmm.. diff --git a/ayanova/src/views/adm-license.vue b/ayanova/src/views/adm-license.vue index cfbc2c10..3640abea 100644 --- a/ayanova/src/views/adm-license.vue +++ b/ayanova/src/views/adm-license.vue @@ -326,11 +326,6 @@ export default { if (licenseState == 4 || licenseState == 5) { return "neednotrial"; } - // //LICENSE STATE: REVOKED - //nothing special for revoke - // if (licenseState == 5) { - // return "revoked"; - // } //LICENSE STATE: ActiveTrial or ActivePurchased if (licenseState == 1 || licenseState == 3) { @@ -417,6 +412,34 @@ export default { window.$gz.errorHandler.handleFormError(error, vm); } }, + async erase() { + let vm = this; + try { + let dialogResult = await window.$gz.dialog.confirmGeneric( + "AdminEraseDatabaseWarning" + ); + if (dialogResult == false) { + return; + } + + dialogResult = await window.$gz.dialog.confirmGeneric( + "AdminEraseDatabaseLastWarning" + ); + if (dialogResult == false) { + return; + } + + //call erase + let r = await window.$gz.api.upsertEx( + "license/permanently-erase-all-data", + "I understand" + ); + + vm.$router.push("/login"); + } catch (error) { + window.$gz.errorHandler.handleFormError(error, vm); + } + }, translation() { return window.$gz.translation; }, @@ -446,6 +469,9 @@ function clickHandler(menuItem) { case "fetch": m.vm.fetchKey(); break; + case "erase": + m.vm.erase(); + break; default: window.$gz.eventBus.$emit( @@ -472,14 +498,6 @@ function generateMenu(vm) { }; if (vm.rights.change) { - // menuOptions.menuItems.push({ - // title: vm.$ay.t("Save"), - // icon: "fa-save", - // surface: true, - // key: FORM_KEY + ":save", - // vm: vm - // }); - //Trigger license check menuOptions.menuItems.push({ title: vm.$ay.t("CheckForLicense"), @@ -487,6 +505,14 @@ function generateMenu(vm) { key: FORM_KEY + ":fetch", vm: vm }); + + //erase database + menuOptions.menuItems.push({ + title: vm.$ay.t("AdminEraseDatabase"), + icon: "fa-skull-crossbones", + key: FORM_KEY + ":erase", + vm: vm + }); } window.$gz.eventBus.$emit("menu-change", menuOptions); @@ -540,6 +566,8 @@ function fetchTranslatedText(vm) { "LicenseEmailVerficationHint", "EvaluationRequestReceived", "AdminEraseDatabaseWarning", + "AdminEraseDatabase", + "AdminEraseDatabaseLastWarning", "NewLicenseInstalled", "NewLicenseNotFound", "HelpReleaseKey", diff --git a/ayanova/src/views/ay-about.vue b/ayanova/src/views/ay-about.vue index 181493e3..7081f3eb 100644 --- a/ayanova/src/views/ay-about.vue +++ b/ayanova/src/views/ay-about.vue @@ -77,7 +77,9 @@