From 8572c326240b0ec7d7aa1a4990d45afe782686ad Mon Sep 17 00:00:00 2001 From: Chester Enright Date: Sat, 16 Sep 2023 15:45:48 -0500 Subject: [PATCH] refactor: changed all var to let --- frontend/labyrinth/src/App.vue | 4 ++-- .../src/components/CreateEditHost.vue | 10 ++++---- .../src/components/CreateEditSubnet.vue | 8 +++---- .../src/components/CustomDashboardsView.vue | 4 ++-- .../labyrinth/src/components/GroupModal.vue | 14 +++++------ .../labyrinth/src/components/HostMetric.vue | 6 ++--- frontend/labyrinth/src/components/Service.vue | 2 +- frontend/labyrinth/src/views/Alerts.vue | 16 ++++++------- frontend/labyrinth/src/views/Checks.vue | 8 +++---- frontend/labyrinth/src/views/Dashboard.vue | 6 ++--- frontend/labyrinth/src/views/Deploy.vue | 24 +++++++++---------- frontend/labyrinth/src/views/Scan.vue | 4 ++-- frontend/labyrinth/src/views/Services.vue | 24 +++++++++---------- .../src/views/Settings/CustomDashboards.vue | 16 ++++++------- .../labyrinth/src/views/Settings/Icons.vue | 12 +++++----- .../src/views/Settings/Maintenance.vue | 2 +- .../labyrinth/src/views/Settings/Telegraf.vue | 4 ++-- 17 files changed, 82 insertions(+), 82 deletions(-) diff --git a/frontend/labyrinth/src/App.vue b/frontend/labyrinth/src/App.vue index 38c53d03..4350b554 100644 --- a/frontend/labyrinth/src/App.vue +++ b/frontend/labyrinth/src/App.vue @@ -143,7 +143,7 @@ export default { }, mounted: /* istanbul ignore next */ function () { try { - var auth = this.$auth; + let auth = this.$auth; if (window.location.href.indexOf("callback") == -1) { Helper.apiCall("secure", "", auth) .then(() => {}) @@ -171,7 +171,7 @@ export default { } }, created: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; try { auth.handleAuthentication(); diff --git a/frontend/labyrinth/src/components/CreateEditHost.vue b/frontend/labyrinth/src/components/CreateEditHost.vue index 3ec980cb..9d7d366c 100644 --- a/frontend/labyrinth/src/components/CreateEditHost.vue +++ b/frontend/labyrinth/src/components/CreateEditHost.vue @@ -353,7 +353,7 @@ export default { }, methods: { listIcons: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("icons", "", auth) .then((res) => { this.icons = res.map((x) => { @@ -368,7 +368,7 @@ export default { }); }, loadServices: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("services", "all", auth) .then((res) => { this.services = res.map((x) => { @@ -383,7 +383,7 @@ export default { }); }, loadMetrics: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("metrics", this.host.mac, auth) .then((res) => { this.metrics = res; @@ -394,7 +394,7 @@ export default { }); }, saveHost: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); if (this.$v.host.$invalid) { @@ -428,7 +428,7 @@ export default { }, deleteHost: /* istanbul ignore next */ function () { var host = this.host; - var auth = this.$auth; + let auth = this.$auth; this.$bvModal .msgBoxConfirm("Are you sure you want to delete this host?") .then((res) => { diff --git a/frontend/labyrinth/src/components/CreateEditSubnet.vue b/frontend/labyrinth/src/components/CreateEditSubnet.vue index 0f5a203b..e21ae1e8 100644 --- a/frontend/labyrinth/src/components/CreateEditSubnet.vue +++ b/frontend/labyrinth/src/components/CreateEditSubnet.vue @@ -152,7 +152,7 @@ export default { }, methods: { loadThemes: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("themes", "", auth) .then((res) => { this.themes = res; @@ -163,7 +163,7 @@ export default { }, listIcons: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("icons", "", auth) .then((res) => { this.icons = res.map((x) => { @@ -185,7 +185,7 @@ export default { ); return -1; } - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("data", JSON.stringify(this.subnet)); Helper.apiPost("subnet", "", "", auth, formData) @@ -199,7 +199,7 @@ export default { }); }, deleteSubnet: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; this.$bvModal .msgBoxConfirm("Are you sure you want to delete this subnet?") .then((res) => { diff --git a/frontend/labyrinth/src/components/CustomDashboardsView.vue b/frontend/labyrinth/src/components/CustomDashboardsView.vue index 77bc77f2..7a01babb 100644 --- a/frontend/labyrinth/src/components/CustomDashboardsView.vue +++ b/frontend/labyrinth/src/components/CustomDashboardsView.vue @@ -119,7 +119,7 @@ export default { return url; }, loadCustomDashboards: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("custom_dashboards", "", auth) .then((res) => { this.custom_dashboards = res.map((x) => { @@ -141,7 +141,7 @@ export default { }); }, loadData: /* istanbul ignore next */ async function (showLoading) { - var auth = this.$auth; + let auth = this.$auth; var url = ""; if (showLoading) { this.loading = true; diff --git a/frontend/labyrinth/src/components/GroupModal.vue b/frontend/labyrinth/src/components/GroupModal.vue index 28076908..9e8118e1 100644 --- a/frontend/labyrinth/src/components/GroupModal.vue +++ b/frontend/labyrinth/src/components/GroupModal.vue @@ -103,7 +103,7 @@ export default { }, methods: { changeMonitor: /* istanbul ignore next */ function (status) { - var auth = this.$auth; + let auth = this.$auth; var url = "monitor/" + this.selected_subnet.subnet + @@ -122,7 +122,7 @@ export default { }); }, changeGroupName: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var url = "name/" + this.selected_subnet.subnet + @@ -140,7 +140,7 @@ export default { }); }, changeIcons: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var url = "icons/" + this.selected_subnet.subnet + @@ -158,7 +158,7 @@ export default { }); }, addService: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var url = "add_service/" + this.selected_subnet.subnet + @@ -176,7 +176,7 @@ export default { }); }, deleteService: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var url = "delete_service/" + this.selected_subnet.subnet + @@ -195,7 +195,7 @@ export default { }, listIcons: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("icons", "", auth) .then((res) => { this.icons = res.map((x) => { @@ -210,7 +210,7 @@ export default { }); }, listServices: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("services", "all", auth) .then((res) => { this.services = res.map((x) => { diff --git a/frontend/labyrinth/src/components/HostMetric.vue b/frontend/labyrinth/src/components/HostMetric.vue index 72268065..50ec59f2 100644 --- a/frontend/labyrinth/src/components/HostMetric.vue +++ b/frontend/labyrinth/src/components/HostMetric.vue @@ -138,7 +138,7 @@ export default { methods: { formatDate: Helper.formatDate, loadLatestMetric: /* istanbul ignore next */ function(){ - var auth = this.$auth + let auth = this.$auth this.loading = true Helper.apiCall("metrics", this.data.ip + "/" + this.data.name + "/latest", auth).then(res=>{ this.latest_metric = res @@ -149,7 +149,7 @@ export default { }) }, deleteMetric: /* istanbul ignore next */ function(metric_id){ - var auth = this.$auth + let auth = this.$auth Helper.apiDelete("metrics", metric_id, auth).then(()=>{ this.loadLatestMetric() }).catch(e=>{ @@ -163,7 +163,7 @@ export default { this.loadLatestMetric() - var auth = this.$auth; + let auth = this.$auth; this.loading = true; this.display = false; await Helper.apiCall( diff --git a/frontend/labyrinth/src/components/Service.vue b/frontend/labyrinth/src/components/Service.vue index a2c5c69c..8dea9cc2 100644 --- a/frontend/labyrinth/src/components/Service.vue +++ b/frontend/labyrinth/src/components/Service.vue @@ -309,7 +309,7 @@ export default { this.comment = ""; return; } - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("redis", "get_comments/" + this.comment_name, auth) .then((res) => { this.comment = res; diff --git a/frontend/labyrinth/src/views/Alerts.vue b/frontend/labyrinth/src/views/Alerts.vue index 974ac3ca..d6c0ce88 100644 --- a/frontend/labyrinth/src/views/Alerts.vue +++ b/frontend/labyrinth/src/views/Alerts.vue @@ -146,7 +146,7 @@ export default { }, methods: { sendTestEmail: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("alertmanager", "test", auth) .then((res) => { this.$store.commit("updateError", JSON.stringify(res)); @@ -156,7 +156,7 @@ export default { }); }, resolveAlert: /* istanbul ignore next */ function (val) { - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("data", JSON.stringify(val)); Helper.apiPost("alertmanager", "", "alert", auth, formData) @@ -169,7 +169,7 @@ export default { }); }, loadAlerts: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; this.active_alerts_loading = true; Helper.apiCall("alertmanager", "alerts", auth) .then((res) => { @@ -181,7 +181,7 @@ export default { }); }, restartAlertManager: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("alertmanager", "restart", auth) .then((res) => { this.$store.commit("updateError", res); @@ -191,7 +191,7 @@ export default { }); }, load: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; this.loading = true; Helper.apiCall("alertmanager", "", auth) .then((res) => { @@ -204,7 +204,7 @@ export default { }); }, loadSample: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; this.sample_loading = true; Helper.apiCall("alertmanager", "alertmanager.sample", auth) .then((res) => { @@ -218,7 +218,7 @@ export default { }, save: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("data", this.file); this.loading = true; @@ -258,7 +258,7 @@ export default { } }, loadIframe: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("alertmanager", "pass", auth) .then((res) => { this.copyToClipboard(res); diff --git a/frontend/labyrinth/src/views/Checks.vue b/frontend/labyrinth/src/views/Checks.vue index 59a674b3..51ddb2a7 100644 --- a/frontend/labyrinth/src/views/Checks.vue +++ b/frontend/labyrinth/src/views/Checks.vue @@ -282,7 +282,7 @@ export default { }, methods: { deleteService: /* istanbul ignore next */ function (name) { - var auth = this.$auth; + let auth = this.$auth; this.$bvModal .msgBoxConfirm("Confirm deleting service " + name + "?") @@ -305,7 +305,7 @@ export default { }); }, loadServices: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; this.servicesLoading = true; Helper.apiCall("services", "all", auth) .then((res) => { @@ -318,7 +318,7 @@ export default { }); }, loadMetrics: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; this.checksLoaded = false; Helper.apiCall("metrics", "25", auth) .then((res) => { @@ -341,7 +341,7 @@ export default { return -1; } - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("data", JSON.stringify(this.selected_service)); Helper.apiPost("service", "", "", auth, formData) diff --git a/frontend/labyrinth/src/views/Dashboard.vue b/frontend/labyrinth/src/views/Dashboard.vue index d55efd41..b5383cc1 100644 --- a/frontend/labyrinth/src/views/Dashboard.vue +++ b/frontend/labyrinth/src/views/Dashboard.vue @@ -327,7 +327,7 @@ export default { }); }, loadThemes: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("themes", "", auth) .then((res) => { this.themes = res; @@ -337,7 +337,7 @@ export default { }); }, onDrop: /* istanbul ignore next */ function (name) { - var auth = this.$auth; + let auth = this.$auth; var url = this.dragged_ip; if (name != "") { url += "/" + name + "/"; @@ -387,7 +387,7 @@ export default { return output; }, loadData: /* istanbul ignore next */ async function (showLoading) { - var auth = this.$auth; + let auth = this.$auth; var url = ""; if (showLoading) { this.loading = true; diff --git a/frontend/labyrinth/src/views/Deploy.vue b/frontend/labyrinth/src/views/Deploy.vue index 1ff275a7..848d00c4 100644 --- a/frontend/labyrinth/src/views/Deploy.vue +++ b/frontend/labyrinth/src/views/Deploy.vue @@ -642,7 +642,7 @@ export default { }, saveAnsibleVault: /* istanbul ignore next */ function (e) { e.preventDefault(); - var auth = this.$auth; + let auth = this.$auth; var type = "become"; var formData = new FormData(); formData.append("file", this.generated_vault_file); @@ -660,7 +660,7 @@ export default { uploadHelper: /* istanbul ignore next */ function (val, type) { if (val) { - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("file", val); Helper.apiPost( @@ -689,7 +689,7 @@ export default { } }, loadPlaybook: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var loadings = this.loadings; this.loadings["playbook"] = 1; Helper.apiCall("get_ansible_file", this.selected_playbook, auth) @@ -704,7 +704,7 @@ export default { }, createPlaybook: /* istanbul ignore next */ function (e) { - var auth = this.$auth; + let auth = this.$auth; e.preventDefault(); Helper.apiCall("new_ansible_file", this.new_ansible_file, auth) .then(async () => { @@ -720,7 +720,7 @@ export default { savePlaybook: /* istanbul ignore next */ function () { this.loadings["save_playbook"] = 1; this.$forceUpdate(); - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("data", this.playbook_contents); Helper.apiPost( @@ -759,7 +759,7 @@ export default { return false; } - var auth = this.$auth; + let auth = this.$auth; this.running = true; if (this.ips.length > 0) { this.ips.forEach((host) => { @@ -810,7 +810,7 @@ export default { }, loadIP: /* istanbul ignore next */ async function () { - var auth = this.$auth; + let auth = this.$auth; this.sample_loading = true; await Helper.apiCall("find_ip", "", auth) .then((res) => { @@ -832,7 +832,7 @@ export default { }, loadFilesList: /* istanbul ignore next */ async function (type) { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("uploads", type, auth) .then((res) => { this.files_list[type] = res; @@ -843,7 +843,7 @@ export default { }); }, loadSubnets: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("subnets", "", auth) .then((res) => { this.subnets = res; @@ -853,7 +853,7 @@ export default { }); }, loadGroups: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("group", this.selected_subnet, auth) .then((res) => { this.groups = res; @@ -864,7 +864,7 @@ export default { }, loadGroupMembers: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall( "group", this.selected_subnet + "/" + this.selected_group, @@ -879,7 +879,7 @@ export default { }, loadHosts: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("hosts", "", auth) .then((res) => { this.hosts = res.map((x) => { diff --git a/frontend/labyrinth/src/views/Scan.vue b/frontend/labyrinth/src/views/Scan.vue index 3b1938b3..6112ea3d 100644 --- a/frontend/labyrinth/src/views/Scan.vue +++ b/frontend/labyrinth/src/views/Scan.vue @@ -52,7 +52,7 @@ export default { }, methods: { loadData: /* istanbul ignore next */ async function () { - var auth = this.$auth; + let auth = this.$auth; await Helper.apiCall("redis", "", auth) .then((res) => { this.data = res; @@ -73,7 +73,7 @@ export default { }); }, startScan: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("scan", "", auth) .then((res) => { this.$store.commit("updateError", res); diff --git a/frontend/labyrinth/src/views/Services.vue b/frontend/labyrinth/src/views/Services.vue index 2ad87a24..2ecae89d 100644 --- a/frontend/labyrinth/src/views/Services.vue +++ b/frontend/labyrinth/src/views/Services.vue @@ -200,7 +200,7 @@ export default { watch: { selected_host: /* istanbul ignore next */ async function (val) { if (val != "" && val != "TEST") { - var auth = this.$auth; + let auth = this.$auth; await Helper.apiCall("load_service", val, auth) .then((res) => { if (res != "") { @@ -262,7 +262,7 @@ export default { }, loadDefaultBackendLocation: /* istanbul ignore next */ async function () { - var auth = this.$auth; + let auth = this.$auth; await Helper.apiCall("settings", "default_telegraf_backend", auth) .then((res) => { this.default_backend = res; @@ -279,7 +279,7 @@ export default { }); }, loadTelegrafKey: /* istanbul ignore next */ async function () { - var auth = this.$auth; + let auth = this.$auth; await Helper.apiCall("telegraf_key", "", auth) .then((res) => { this.telegraf_key = res; @@ -334,7 +334,7 @@ export default { }, loadStructure: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("redis", "get_structure", auth) .then((res) => { this.data = res; @@ -345,7 +345,7 @@ export default { }); }, putStructure: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("redis", "put_structure", auth) .then((res) => { this.$store.commit("updateError", res); @@ -355,7 +355,7 @@ export default { }); }, getAutosave: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("redis", "autosave", auth) .then((res) => { this.output_data = res; @@ -365,7 +365,7 @@ export default { }); }, autoSave: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("data", JSON.stringify(this.output_data)); Helper.apiPost("redis", "", "autosave", auth, formData).catch(() => { @@ -373,7 +373,7 @@ export default { }); }, listHosts: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("hosts", "", auth) .then((res) => { this.raw_hosts = res; @@ -389,7 +389,7 @@ export default { }); }, loadFile: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("load_service", this.selected_host + "/text", auth) .then((res) => { this.loadedFile = res; @@ -399,7 +399,7 @@ export default { }); }, runTest: /* istanbul ignore next */ function (outputs) { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("run_conf", this.selected_host + "/" + outputs, auth) .then((res) => { this.testOutput = res; @@ -409,7 +409,7 @@ export default { }); }, saveRaw: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("raw", this.loadedFile); formData.append("data", "{}"); @@ -433,7 +433,7 @@ export default { }); }, saveConf: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("data", JSON.stringify(this.output_data)); this.saving_conf = true; diff --git a/frontend/labyrinth/src/views/Settings/CustomDashboards.vue b/frontend/labyrinth/src/views/Settings/CustomDashboards.vue index 7e37d788..91058384 100644 --- a/frontend/labyrinth/src/views/Settings/CustomDashboards.vue +++ b/frontend/labyrinth/src/views/Settings/CustomDashboards.vue @@ -504,7 +504,7 @@ export default { }, loadSubnets: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("subnets", "", auth) .then((res) => { this.subnets = res; @@ -514,7 +514,7 @@ export default { }); }, loadGroups: /* istanbul ignore next */ function (selected_subnet) { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("group", selected_subnet, auth) .then((res) => { this.groups = res; @@ -524,7 +524,7 @@ export default { }); }, loadHosts: /* istanbul ignore next */ function (selected_group) { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("group", this.selected_subnet + "/" + selected_group, auth) .then((res) => { this.hosts = res; @@ -535,7 +535,7 @@ export default { }, loadImages: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("custom_dashboard_images", "", auth) .then((res) => { this.available_images = res; @@ -546,7 +546,7 @@ export default { }, uploadHelper: /* istanbul ignore next */ function (val) { if (val) { - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("file", val); console.log(val); @@ -568,7 +568,7 @@ export default { } }, deleteImage: /* istanbul ignore next */ function (val) { - var auth = this.$auth; + let auth = this.$auth; this.$bvModal .msgBoxConfirm("Are you sure you want to delete this image?") .then((res) => { @@ -589,7 +589,7 @@ export default { }); }, loadCustomDashboards: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("custom_dashboards", "", auth) .then((res) => { this.custom_dashboards = res; @@ -601,7 +601,7 @@ export default { saveCustomDashboard: /* istanbul ignore next */ function (e) { e.preventDefault(); - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("data", JSON.stringify(this.drawing)); diff --git a/frontend/labyrinth/src/views/Settings/Icons.vue b/frontend/labyrinth/src/views/Settings/Icons.vue index 8ac76b95..73af7edd 100644 --- a/frontend/labyrinth/src/views/Settings/Icons.vue +++ b/frontend/labyrinth/src/views/Settings/Icons.vue @@ -272,7 +272,7 @@ export default { }, file: /* istanbul ignore next */ function (val) { if (val) { - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("file", val); Helper.apiPost("icon", "", "", auth, formData, true) @@ -298,7 +298,7 @@ export default { this.$refs.uploadFile.$el.click(); }, loadIcons: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("icons", "", auth) .then((res) => { this.icons = res; @@ -314,7 +314,7 @@ export default { if (!res) { return; } - var auth = this.$auth; + let auth = this.$auth; Helper.apiDelete("icon", val, auth) .then(() => { this.loadIcons(); @@ -329,7 +329,7 @@ export default { }, loadThemes: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("themes", "", auth) .then((res) => { this.themes = res; @@ -339,7 +339,7 @@ export default { }); }, saveTheme: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); Object.keys(this.theme.show).forEach((x) => { this.theme.show[x] = false; @@ -362,7 +362,7 @@ export default { }); }, deleteTheme: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; this.$bvModal .msgBoxConfirm("Are you sure you want to delete this host?") .then((res) => { diff --git a/frontend/labyrinth/src/views/Settings/Maintenance.vue b/frontend/labyrinth/src/views/Settings/Maintenance.vue index c3f25d46..1c80e564 100644 --- a/frontend/labyrinth/src/views/Settings/Maintenance.vue +++ b/frontend/labyrinth/src/views/Settings/Maintenance.vue @@ -20,7 +20,7 @@ export default { name: "Maintenance", methods: { restart: /* istanbul ignore next */ function (code) { - var auth = this.$auth; + let auth = this.$auth; this.$bvModal .msgBoxConfirm("Are you sure you want to restart?") .then((res) => { diff --git a/frontend/labyrinth/src/views/Settings/Telegraf.vue b/frontend/labyrinth/src/views/Settings/Telegraf.vue index 431c4eba..bef9669a 100644 --- a/frontend/labyrinth/src/views/Settings/Telegraf.vue +++ b/frontend/labyrinth/src/views/Settings/Telegraf.vue @@ -39,7 +39,7 @@ export default { }, methods: { loadDefaultBackend: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; Helper.apiCall("settings", "default_telegraf_backend", auth) .then((res) => { this.default_backend = res; @@ -51,7 +51,7 @@ export default { }); }, saveDefaultBackend: /* istanbul ignore next */ function () { - var auth = this.$auth; + let auth = this.$auth; var formData = new FormData(); formData.append("name", "default_telegraf_backend"); formData.append("value", this.default_backend);