HUGE REFACTOR / CLEANUP

if there is a issue it's probably something in here that was changed
This commit is contained in:
2021-09-28 20:19:44 +00:00
parent 51eddfede9
commit d0afdd9855
238 changed files with 3127 additions and 8614 deletions

View File

@@ -25,7 +25,7 @@
<script>
export default {
async created() {
let vm = this;
const vm = this;
await fetchTranslatedText(vm);
//NOTE: if extension doesn't support a particular object add it here to the NoType default
if (
@@ -49,8 +49,8 @@ export default {
return true;
},
async doAction() {
let vm = this;
let dialogResult = await window.$gz.dialog.confirmGeneric(
const vm = this;
const dialogResult = await window.$gz.dialog.confirmGeneric(
"EraseMultipleObjectsWarning",
"error"
);
@@ -61,33 +61,20 @@ export default {
vm.$emit("ext-show-job-log", "clear");
//do the batch action
let url = "job-operations/batch-delete";
let body = this.dataListSelection;
const url = "job-operations/batch-delete";
const body = this.dataListSelection;
try {
//call api route
let jobId = await window.$gz.api.upsert(url, body);
if (jobId.error) {
//throw new Error(jobId.error);
throw new Error(window.$gz.errorHandler.errorToString(jobId, vm));
}
jobId = jobId.jobId; //it's in a sub key
//indicate loading by setting on button
vm.jobActive = true;
/* /// <summary>
/// Job status for opsjobs
/// </summary>
public enum JobStatus : int
{
Absent=0,
Sleeping = 1,
Running = 2,
Completed = 3,
Failed = 4
} */
let jobStatus = 1;
//get status
while (vm.jobActive == true) {
await window.$gz.util.sleepAsync(1000);
@@ -117,8 +104,6 @@ export default {
vm.$emit("ext-close-refresh");
} catch (error) {
vm.jobActive = false;
//window.$gz.errorHandler.handleFormError(error, vm);
window.$gz.eventBus.$emit("notify-error", vm.$ay.t("JobFailed"));
}
}