瀏覽代碼

优化webui重启业务服务时的前端js代码,去掉冗余的操作

niujiuru 4 天之前
父節點
當前提交
541f835534

+ 0 - 2
web-ui.service/web/static/js/page2.js

@@ -158,8 +158,6 @@ function restartNetService(event) {
     if (!r.ok) {
       throw new Error(await r.text());
     }
-    logLevel.value = "info";
-    netLogLevel = logLevel.value;
     alert("重启成功");
   })
   .catch(e => {

+ 0 - 2
web-ui.service/web/static/js/page3.js

@@ -98,8 +98,6 @@ function restartTimeService(event) {
     if (!r.ok) {
       throw new Error(await r.text());
     }
-    logLevel.value = "info";
-    timeLogLevel = logLevel.value;
     alert("重启成功");
   })
   .catch(e => {

+ 0 - 2
web-ui.service/web/static/js/page4.js

@@ -98,8 +98,6 @@ function restartGnssService(event) {
     if (!r.ok) {
       throw new Error(await r.text());
     }
-    logLevel.value = "info";
-    gnssLogLevel = logLevel.value;
     alert("重启成功");
   })
   .catch(e => {

+ 0 - 4
web-ui.service/web/static/js/page5.js

@@ -103,10 +103,6 @@ function restartCameraService(event) {
     if (!r.ok) {
       throw new Error(await r.text());
     }
-    logLevel.value = "info";
-    cameraLogLevel = logLevel.value;
-    disconnectLog();
-    connectLog("yfkj-camera-capture.service", "text1");
     alert("重启成功");
   })
   .catch(e => {

+ 2 - 6
web-ui.service/web/static/js/page6.js

@@ -16,7 +16,7 @@ function setAppInstallLogLevel() {
   });
 }
 
-function getAppInstallLevel() {
+function getAppInstallLogLevel() {
   fetch("/api/app-install/loglevel")
   .then(async r => {
     if (!r.ok) throw new Error(await r.text());
@@ -98,10 +98,6 @@ function restartAppInstallService(event) {
     if (!r.ok) {
       throw new Error(await r.text());
     }
-    logLevel.value = "info";
-    appInsLogLevel = logLevel.value;
-    disconnectLog();
-    connectLog("yfkj-app-install.service", "text1");
     alert("重启成功");
   })
   .catch(e => {
@@ -153,7 +149,7 @@ function getAppInstallStatus() {
       updateAppInstallButtons(-1);
     });
 
-  getAppInstallLevel();
+  getAppInstallLogLevel();
 }
 
 function startAppInstallStatusRefresh() {