From f9ecba36e3c2bf35f5fc74bb989d92f6cc953995 Mon Sep 17 00:00:00 2001
From: ruanshudong <ruanshudong@qq.com>
Date: Tue, 18 Jan 2022 14:27:19 +0800
Subject: [PATCH] fix get node config file bug when delete config fix deploy
 server bug in different node

---
 app/controller/server/ServerController.js     | 15 +++++-
 app/index.js                                  |  4 +-
 app/service/config/ConfigService.js           | 47 ++++++++++---------
 client/dist/adminPass.html                    |  2 +-
 client/dist/auth.html                         |  2 +-
 client/dist/dcache.html                       |  2 +-
 client/dist/index.html                        |  2 +-
 client/dist/k8s.html                          |  2 +-
 client/dist/login.html                        |  2 +-
 client/dist/logview.html                      |  2 +-
 client/dist/pass.html                         |  2 +-
 client/dist/static/js/adminPass.b5a2ed51.js   |  1 -
 client/dist/static/js/auth.8b7fee11.js        |  1 -
 .../dist/static/js/chunk-common.30447a47.js   |  1 -
 client/dist/static/js/dcache.a42e19fc.js      |  1 -
 client/dist/static/js/index.70669a24.js       |  1 -
 client/dist/static/js/k8s.ad2b373d.js         |  1 -
 client/dist/static/js/logView.4cf037ad.js     |  1 -
 client/dist/static/js/login.3cb8edbf.js       |  1 -
 client/dist/static/js/pass.22f09659.js        |  1 -
 client/src/pages/dcacheOperation/deploy.vue   |  2 +-
 client/src/pages/operation/deploy.vue         | 34 +++++++++-----
 config/webConf.js                             | 25 +++++++++-
 package.json                                  |  1 +
 24 files changed, 97 insertions(+), 56 deletions(-)
 delete mode 100644 client/dist/static/js/adminPass.b5a2ed51.js
 delete mode 100644 client/dist/static/js/auth.8b7fee11.js
 delete mode 100644 client/dist/static/js/chunk-common.30447a47.js
 delete mode 100644 client/dist/static/js/dcache.a42e19fc.js
 delete mode 100644 client/dist/static/js/index.70669a24.js
 delete mode 100644 client/dist/static/js/k8s.ad2b373d.js
 delete mode 100644 client/dist/static/js/logView.4cf037ad.js
 delete mode 100644 client/dist/static/js/login.3cb8edbf.js
 delete mode 100644 client/dist/static/js/pass.22f09659.js

diff --git a/app/controller/server/ServerController.js b/app/controller/server/ServerController.js
index a56663a1..5bc35f64 100644
--- a/app/controller/server/ServerController.js
+++ b/app/controller/server/ServerController.js
@@ -25,6 +25,7 @@ const util = require('../../../tools/util');
 const AuthService = require('../../service/auth/AuthService');
 const {async} = require('q');
 const webConf = require('../../../config/webConf').webConf;
+const { flatMap } = require('lodash');
 
 const serverConfStruct = {
     id: '',
@@ -100,9 +101,19 @@ ServerController.getServerConfById = async (ctx) => {
 ServerController.serverExist = async (ctx) => {
 	let application = ctx.paramsObj.application;
 	let serverName = ctx.paramsObj.server_name;
-	let nodeName = ctx.paramsObj.node_name;
+	let nodeNames = ctx.paramsObj.node_names;
 	try {
-		ctx.makeResObj(200, '', (await ServerService.getServerConf(application, serverName, nodeName)).length > 0);
+        let data = await ServerService.getServerConf(application, serverName, '');
+
+        let exists = false;
+        data.some(d => {
+            if (nodeNames.indexOf(d.node_name) != -1) {
+                exists = true;
+                return true;
+            }
+            return false;
+        })
+		ctx.makeResObj(200, '', exists);
 	} catch (e) {
 		logger.error('[serverExist]', e, ctx);
 		ctx.makeErrResObj();
diff --git a/app/index.js b/app/index.js
index 389083bf..174eb294 100644
--- a/app/index.js
+++ b/app/index.js
@@ -44,10 +44,10 @@ if (WebConf.enable) {
 		['get', '/server', ServerController.getServerConfById, {
 			id: 'notEmpty'
 		}],
-		['get', '/server_exist', ServerController.serverExist, {
+		['post', '/server_exist', ServerController.serverExist, {
 			application: 'notEmpty',
 			server_name: 'notEmpty',
-			node_name: ''
+			node_names: ''
 		}],
 		['get', '/application_list', ServerController.getApplicationList],
 		['get', '/node_list', ServerController.getNodeList],
diff --git a/app/service/config/ConfigService.js b/app/service/config/ConfigService.js
index d251127f..352db8b6 100644
--- a/app/service/config/ConfigService.js
+++ b/app/service/config/ConfigService.js
@@ -299,28 +299,31 @@ ConfigService.getNodeConfigFile = async (params) => {
 		// }
 		return !exist;
 	});
-	for (let i = 0, len = servers.length; i < len; i++) {
-		let server = servers[i];
-		let newRow = {
-			server_name: `${params.application}.${params.server_name}`,
-			set_name: params.set_name,
-			set_area: params.set_area,
-			set_group: params.set_group,
-			filename: configFile.filename,
-			host: server.node_name,
-			config: '',
-			level: 3,
-			posttime: formatToStr(new Date(), 'yyyy-mm-dd hh:mm:ss')
-		};
-		let config = await ConfigDao.insertConfigFile(newRow).catch(e => logger.error('[insertConfigFile]:', e));
-		config = config.get({'plain': true});
-		let history = {
-			configid: config.id,
-			reason: 'add config',
-			content: config.config,
-			posttime: config.posttime
-		};
-		await ConfigDao.insertConfigFileHistory(history).catch(e => logger.error('[insertConfigFileHistory]:', e));
+
+	if (configFile) {
+		for (let i = 0, len = servers.length; i < len; i++) {
+			let server = servers[i];
+			let newRow = {
+				server_name: `${params.application}.${params.server_name}`,
+				set_name: params.set_name,
+				set_area: params.set_area,
+				set_group: params.set_group,
+				filename: configFile.filename,
+				host: server.node_name,
+				config: '',
+				level: 3,
+				posttime: formatToStr(new Date(), 'yyyy-mm-dd hh:mm:ss')
+			};
+			let config = await ConfigDao.insertConfigFile(newRow).catch(e => logger.error('[insertConfigFile]:', e));
+			config = config.get({ 'plain': true });
+			let history = {
+				configid: config.id,
+				reason: 'add config',
+				content: config.config,
+				posttime: config.posttime
+			};
+			await ConfigDao.insertConfigFileHistory(history).catch(e => logger.error('[insertConfigFileHistory]:', e));
+		}
 	}
 	return await nodeConfigFile;
 
diff --git a/client/dist/adminPass.html b/client/dist/adminPass.html
index 7a486afe..58fc4d5f 100644
--- a/client/dist/adminPass.html
+++ b/client/dist/adminPass.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Set Admin Pass</title><link href=/static/css/adminPass.f2fb101e.css rel=preload as=style><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/js/adminPass.b5a2ed51.js rel=preload as=script><link href=/static/js/chunk-common.30447a47.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/adminPass.f2fb101e.css rel=stylesheet></head><body><div id=admin-pass-app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.30447a47.js></script><script src=/static/js/adminPass.b5a2ed51.js></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Set Admin Pass</title><link href=/static/css/adminPass.f2fb101e.css rel=preload as=style><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/js/adminPass.d3a42dea.js rel=preload as=script><link href=/static/js/chunk-common.07e2039d.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/adminPass.f2fb101e.css rel=stylesheet></head><body><div id=admin-pass-app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.07e2039d.js></script><script src=/static/js/adminPass.d3a42dea.js></script></body></html>
\ No newline at end of file
diff --git a/client/dist/auth.html b/client/dist/auth.html
index 4f269fa1..992394e5 100644
--- a/client/dist/auth.html
+++ b/client/dist/auth.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>User Center</title><link href=/static/css/auth.a4ecbb0a.css rel=preload as=style><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/js/auth.8b7fee11.js rel=preload as=script><link href=/static/js/chunk-common.30447a47.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/auth.a4ecbb0a.css rel=stylesheet></head><body><div id=auth-app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.30447a47.js></script><script src=/static/js/auth.8b7fee11.js></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>User Center</title><link href=/static/css/auth.a4ecbb0a.css rel=preload as=style><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/js/auth.f1ba4a4f.js rel=preload as=script><link href=/static/js/chunk-common.07e2039d.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/auth.a4ecbb0a.css rel=stylesheet></head><body><div id=auth-app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.07e2039d.js></script><script src=/static/js/auth.f1ba4a4f.js></script></body></html>
\ No newline at end of file
diff --git a/client/dist/dcache.html b/client/dist/dcache.html
index edf6ec95..ffb00bd4 100644
--- a/client/dist/dcache.html
+++ b/client/dist/dcache.html
@@ -1 +1 @@
-<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>DCache</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/dcache.e31da409.css rel=preload as=style><link href=/static/js/chunk-common.30447a47.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/dcache.a42e19fc.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/dcache.e31da409.css rel=stylesheet></head><body><noscript><strong>We're sorry but DCache doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.30447a47.js></script><script src=/static/js/dcache.a42e19fc.js></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>DCache</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/dcache.e31da409.css rel=preload as=style><link href=/static/js/chunk-common.07e2039d.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/dcache.594840a8.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/dcache.e31da409.css rel=stylesheet></head><body><noscript><strong>We're sorry but DCache doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.07e2039d.js></script><script src=/static/js/dcache.594840a8.js></script></body></html>
\ No newline at end of file
diff --git a/client/dist/index.html b/client/dist/index.html
index dd155402..4f310d3a 100644
--- a/client/dist/index.html
+++ b/client/dist/index.html
@@ -1 +1 @@
-<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>Tars</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/index.c4bfe4bd.css rel=preload as=style><link href=/static/js/chunk-common.30447a47.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/index.70669a24.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/index.c4bfe4bd.css rel=stylesheet></head><body><noscript><strong>We're sorry but Tars doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.30447a47.js></script><script src=/static/js/index.70669a24.js></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>Tars</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/index.c4bfe4bd.css rel=preload as=style><link href=/static/js/chunk-common.07e2039d.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/index.d2fe7d78.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/index.c4bfe4bd.css rel=stylesheet></head><body><noscript><strong>We're sorry but Tars doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.07e2039d.js></script><script src=/static/js/index.d2fe7d78.js></script></body></html>
\ No newline at end of file
diff --git a/client/dist/k8s.html b/client/dist/k8s.html
index 3a2074e1..ed45d591 100644
--- a/client/dist/k8s.html
+++ b/client/dist/k8s.html
@@ -1 +1 @@
-<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>TarsK8s</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/k8s.670b94b6.css rel=preload as=style><link href=/static/js/chunk-common.30447a47.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/k8s.ad2b373d.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/k8s.670b94b6.css rel=stylesheet></head><body><noscript><strong>We're sorry but TarsK8s doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.30447a47.js></script><script src=/static/js/k8s.ad2b373d.js></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>TarsK8s</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/k8s.670b94b6.css rel=preload as=style><link href=/static/js/chunk-common.07e2039d.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/k8s.411d9873.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/k8s.670b94b6.css rel=stylesheet></head><body><noscript><strong>We're sorry but TarsK8s doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.07e2039d.js></script><script src=/static/js/k8s.411d9873.js></script></body></html>
\ No newline at end of file
diff --git a/client/dist/login.html b/client/dist/login.html
index ca06a706..8219fc24 100644
--- a/client/dist/login.html
+++ b/client/dist/login.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Sign in</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/login.c9c6c482.css rel=preload as=style><link href=/static/js/chunk-common.30447a47.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/login.3cb8edbf.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/login.c9c6c482.css rel=stylesheet></head><body><div id=login-app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.30447a47.js></script><script src=/static/js/login.3cb8edbf.js></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Sign in</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/login.c9c6c482.css rel=preload as=style><link href=/static/js/chunk-common.07e2039d.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/login.04640a96.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/login.c9c6c482.css rel=stylesheet></head><body><div id=login-app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.07e2039d.js></script><script src=/static/js/login.04640a96.js></script></body></html>
\ No newline at end of file
diff --git a/client/dist/logview.html b/client/dist/logview.html
index 73e52155..084dca99 100644
--- a/client/dist/logview.html
+++ b/client/dist/logview.html
@@ -1 +1 @@
-<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>logView</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/logView.f585414f.css rel=preload as=style><link href=/static/js/chunk-common.30447a47.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/logView.4cf037ad.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/logView.f585414f.css rel=stylesheet></head><body><noscript><strong>We're sorry but logView doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.30447a47.js></script><script src=/static/js/logView.4cf037ad.js></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/static/favicon.ico><title>logView</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/logView.f585414f.css rel=preload as=style><link href=/static/js/chunk-common.07e2039d.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/logView.bf6e5b17.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/logView.f585414f.css rel=stylesheet></head><body><noscript><strong>We're sorry but logView doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.07e2039d.js></script><script src=/static/js/logView.bf6e5b17.js></script></body></html>
\ No newline at end of file
diff --git a/client/dist/pass.html b/client/dist/pass.html
index a5f4d305..495850ac 100644
--- a/client/dist/pass.html
+++ b/client/dist/pass.html
@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Modify Pass</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/pass.aa0ebcdb.css rel=preload as=style><link href=/static/js/chunk-common.30447a47.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/pass.22f09659.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/pass.aa0ebcdb.css rel=stylesheet></head><body><div id=pass-app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.30447a47.js></script><script src=/static/js/pass.22f09659.js></script></body></html>
\ No newline at end of file
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Modify Pass</title><link href=/static/css/chunk-common.e941c7c1.css rel=preload as=style><link href=/static/css/chunk-vendors.7e538d84.css rel=preload as=style><link href=/static/css/pass.aa0ebcdb.css rel=preload as=style><link href=/static/js/chunk-common.07e2039d.js rel=preload as=script><link href=/static/js/chunk-vendors.205991fe.js rel=preload as=script><link href=/static/js/pass.e53c74e7.js rel=preload as=script><link href=/static/css/chunk-vendors.7e538d84.css rel=stylesheet><link href=/static/css/chunk-common.e941c7c1.css rel=stylesheet><link href=/static/css/pass.aa0ebcdb.css rel=stylesheet></head><body><div id=pass-app></div><script src=/static/js/chunk-vendors.205991fe.js></script><script src=/static/js/chunk-common.07e2039d.js></script><script src=/static/js/pass.e53c74e7.js></script></body></html>
\ No newline at end of file
diff --git a/client/dist/static/js/adminPass.b5a2ed51.js b/client/dist/static/js/adminPass.b5a2ed51.js
deleted file mode 100644
index efddcfd2..00000000
--- a/client/dist/static/js/adminPass.b5a2ed51.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(e){function t(t){for(var a,o,i=t[0],c=t[1],p=t[2],u=0,d=[];u<i.length;u++)o=i[u],Object.prototype.hasOwnProperty.call(s,o)&&s[o]&&d.push(s[o][0]),s[o]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);l&&l(t);while(d.length)d.shift()();return n.push.apply(n,p||[]),r()}function r(){for(var e,t=0;t<n.length;t++){for(var r=n[t],a=!0,i=1;i<r.length;i++){var c=r[i];0!==s[c]&&(a=!1)}a&&(n.splice(t--,1),e=o(o.s=r[0]))}return e}var a={},s={adminPass:0},n=[];function o(t){if(a[t])return a[t].exports;var r=a[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=a,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(r,a,function(t){return e[t]}.bind(null,a));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],c=i.push.bind(i);i.push=t,i=i.slice();for(var p=0;p<i.length;p++)t(i[p]);var l=c;n.push([6,"chunk-vendors","chunk-common"]),r()})({6:function(e,t,r){e.exports=r("ddcc")},c0a6:function(e,t,r){"use strict";var a=r("e099"),s=r.n(a);s.a},ddcc:function(e,t,r){"use strict";r.r(t);r("e260"),r("e6cf"),r("cca6"),r("a79d");var a=r("a026"),s=(r("42a1"),r("b3f5"),function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"admin_pass_page"},[r("h1",{staticClass:"top-title"},[e._v(" "+e._s(e.$t("pass.adminTitle"))+" "),r("div",{staticClass:"locale-wrap"},[r("locale-select")],1)]),r("let-form",{ref:"form",attrs:{inline:"","label-position":"top",itemWidth:"440px"},nativeOn:{submit:function(t){return t.preventDefault(),e.modify(t)}}},[r("let-form-item",{attrs:{label:e.$t("pass.password"),required:""}},[r("let-input",{attrs:{type:"password",size:"small",required:"","required-tip":e.$t("pass.passwordTips")},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}})],1),r("let-form-item",{attrs:{label:e.$t("pass.repeatPassword"),required:""}},[r("let-input",{attrs:{type:"password",size:"small",required:"","required-tip":e.$t("pass.repeatPasswordTips")},model:{value:e.repeatPassword,callback:function(t){e.repeatPassword=t},expression:"repeatPassword"}})],1),r("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("pass.modify")))])],1)],1)}),n=[],o=(r("99af"),r("c975"),r("ac1f"),r("841c"),r("00b0")),i=r("58b7"),c=r.n(i),p={name:"admin_pass_page",data:function(){return{password:"",repeatPassword:""}},computed:{redirectUrl:function(){var e="redirect_url=",t=location.search.indexOf(e);return t>-1?decodeURIComponent(location.search.substring(t+e.length)):"/"}},components:{localeSelect:o["a"]},methods:{modify:function(){var e=this;if(this.$refs.form.validate())if(this.checkRepeatPwdValid()){var t=this.$Loading.show(),r=c()(this.password);this.$ajax.postJSON("/server/api/adminModifyPass",{password:r,repeat_password:r}).then((function(r){t.hide(),e.$tip.success("".concat(e.$t("pass.modifySucc"))),setTimeout((function(){e.toLoginPage()}),1e3)})).catch((function(r){t.hide(),e.$tip.error("".concat(e.$t("pass.modifyFailed"),": ").concat(r.err_msg||r.message))}))}else this.$tip.error("".concat(this.$t("pass.passwordDiff")))},checkRepeatPwdValid:function(){return this.repeatPassword===this.password},toLoginPage:function(){location.href=this.redirectUrl+(-1===this.redirectUrl.indexOf("?")?"?":"&")+"user=admin"}}},l=p,u=(r("c0a6"),r("2877")),d=Object(u["a"])(l,s,n,!1,null,null,null),f=d.exports,m=r("f51c");a["default"].config.productionTip=!1,m["b"].call(void 0).then((function(){new a["default"]({el:"#admin-pass-app",i18n:m["a"],components:{adminPass:f},template:"<admin-pass/>"})}))},e099:function(e,t,r){}});
\ No newline at end of file
diff --git a/client/dist/static/js/auth.8b7fee11.js b/client/dist/static/js/auth.8b7fee11.js
deleted file mode 100644
index 4fde3621..00000000
--- a/client/dist/static/js/auth.8b7fee11.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(t){function e(e){for(var i,s,l=e[0],r=e[1],c=e[2],d=0,h=[];d<l.length;d++)s=l[d],Object.prototype.hasOwnProperty.call(o,s)&&o[s]&&h.push(o[s][0]),o[s]=0;for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);u&&u(e);while(h.length)h.shift()();return n.push.apply(n,c||[]),a()}function a(){for(var t,e=0;e<n.length;e++){for(var a=n[e],i=!0,l=1;l<a.length;l++){var r=a[l];0!==o[r]&&(i=!1)}i&&(n.splice(e--,1),t=s(s.s=a[0]))}return t}var i={},o={auth:0},n=[];function s(e){if(i[e])return i[e].exports;var a=i[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,s),a.l=!0,a.exports}s.m=t,s.c=i,s.d=function(t,e,a){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},s.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)s.d(a,i,function(e){return t[e]}.bind(null,i));return a},s.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/";var l=window["webpackJsonp"]=window["webpackJsonp"]||[],r=l.push.bind(l);l.push=e,l=l.slice();for(var c=0;c<l.length;c++)e(l[c]);var u=r;n.push([5,"chunk-vendors","chunk-common"]),a()})({"446d":function(t,e,a){},5:function(t,e,a){t.exports=a("63f1")},"63f1":function(t,e,a){"use strict";a.r(e);a("e260"),a("e6cf"),a("cca6"),a("a79d");var i=a("a026"),o=(a("42a1"),a("b3f5"),a("5c96")),n=a.n(o),s=(a("a082"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("app-header"),a("keep-alive",[a("router-view",{staticClass:"main-width"})],1)],1)}),l=[],r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app_index__header"},[a("div",{staticClass:"main-width"},[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"logo-wrap"},["true"===t.enable&&"true"===t.show?a("a",{class:{active:!1},attrs:{href:"/"}},[a("img",{staticClass:"logo",attrs:{src:"/static/img/tars-logo.png"}})]):t._e(),"true"===t.k8s?a("a",{class:{active:!0},attrs:{href:"/k8s.html"}},[a("img",{staticClass:"logo",attrs:{src:"/static/img/K8S.png"}})]):t._e()])]),a("el-col",{attrs:{span:12}},[a("let-tabs",{staticClass:"tabs",attrs:{center:!0,activekey:t.$route.matched[0].path},on:{click:t.clickTab}},[a("let-tab-pane",{attrs:{tab:t.$t("ssoHeader.tab.tab1"),tabkey:"/",icon:t.serverIcon}}),t.isAdmin?a("let-tab-pane",{attrs:{tab:t.$t("ssoHeader.tab.tab2"),tabkey:"/user",icon:t.userIcon}}):t._e(),a("let-tab-pane",{attrs:{tab:t.$t("ssoHeader.tab.tab4"),tabkey:"/token",icon:t.tokenIcon}}),t.isAdmin?a("let-tab-pane",{attrs:{tab:t.$t("ssoHeader.tab.tab5"),tabkey:"/set",icon:t.opaIcon}}):t._e()],1)],1),a("el-col",{attrs:{span:2}},[a("div",{staticClass:"language-wrap"},[a("let-select",{attrs:{clearable:!1},on:{change:t.changeLocale},model:{value:t.locale,callback:function(e){t.locale=e},expression:"locale"}},[t._l(t.localeMessages,(function(e){return[a("let-option",{key:e.localeCode,attrs:{value:e.localeCode}},[t._v(t._s(e.localeName))])]}))],2)],1)]),a("el-col",{attrs:{span:4}},[a("div",{staticClass:"user-wrap"},[a("el-dropdown",{staticStyle:{"margin-bottom":"10px"},on:{command:t.handleCommand}},[a("span",{staticClass:"el-dropdown-link"},[t._v(" "+t._s(t.uid)),a("i",{directives:[{name:"show",rawName:"v-show",value:t.enableLogin,expression:"enableLogin"}],staticClass:"el-icon-arrow-down el-icon--right"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"modifyPass"}},[t._v(t._s(t.$t("header.modifyPass")))]),a("el-dropdown-item",{attrs:{command:"quit"}},[t._v(t._s(t.$t("header.logout")))])],1)],1)],1)])],1)],1)])},c=[],u=(a("99af"),a("ac1f"),a("5319"),a("96cf"),a("1da1")),d=a("1817"),h=a.n(d),p=a("3e1a"),g=a.n(p),m=a("1ca6"),f=a.n(m),v=a("9742d"),b=a.n(v),w=a("4824"),k=a.n(w),$=a("f51c"),C={name:"App",data:function(){return{serverIcon:h.a,opaIcon:f.a,userIcon:g.a,packageIcon:k.a,tokenIcon:b.a,locale:this.$cookie.get("locale")||"cn",localeMessages:$["c"],enableLogin:!0,isAdmin:!1,uid:"--",k8s:this.$cookie.get("k8s")||"false",enable:this.$cookie.get("enable")||"false",show:this.$cookie.get("show")||"false",enableLdap:!1}},methods:{handleCommand:function(t){"modifyPass"==t&&(location.href="/pass.html"),"quit"==t&&(location.href="/logout")},clickTab:function(t){this.$router.replace(t)},changeLocale:function(){this.$cookie.set("locale",this.locale,{expires:"1Y"}),location.reload()},getLoginUid:function(){var t=this;this.$ajax.getJSON("/server/api/getLoginUid").then((function(e){e&&e.uid?t.uid=e.uid:t.uid="***"})).catch((function(e){t.$tip.error("".concat(t.$t("login.getUidFailed"),": ").concat(e.err_msg||e.message))}))},checkEnableLogin:function(){var t=this;this.$ajax.getJSON("/server/api/isEnableLogin").then((function(e){t.enableLogin=e.enableLogin||!1})).catch((function(t){}))},checkEnableLdap:function(){var t=this;this.$ajax.getJSON("/server/api/isEnableLdap").then((function(e){t.enableLdap=e.enableLdap||!1})).catch((function(t){}))},checkAdmin:function(){var t=this;return Object(u["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.isAdmin=!1,e.abrupt("return",t.$ajax.getJSON("/server/api/isAdmin").then((function(e){t.isAdmin=e.admin})).catch((function(t){})));case 2:case"end":return e.stop()}}),e)})))()}},mounted:function(){var t=this;return Object(u["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.getLoginUid(),t.checkEnableLogin(),e.next=4,t.checkAdmin();case 4:t.checkEnableLdap();case 5:case"end":return e.stop()}}),e)})))()}},A=C,x=(a("7097"),a("2877")),L=Object(x["a"])(A,r,c,!1,null,null,null),_=L.exports,S=a("559f"),y={name:"App",components:{AppHeader:_,AppFooter:S["a"]}},T=y,D=(a("7037"),Object(x["a"])(T,s,l,!1,null,null,null)),E=D.exports,M=a("8c4f"),O=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{margin:"20px auto",overflow:"auto"}},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(e){return e.preventDefault(),t.search(e)}}},[a("div",{staticStyle:{float:"center"}},[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:t.addItem}},[t._v(t._s(t.$t("auth.addPrivilege")))]),t._v(" "),t.enableLdap?t._e():a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:t.addUser}},[t._v(t._s(t.$t("auth.addUser")))]),t._v(" "),a("let-button",{attrs:{size:"small",theme:"danger"},on:{click:t.delUser}},[t._v(t._s(t.$t("auth.delUser")))])],1),a("let-form-item",{attrs:{label:t.$t("auth.uid")}},[a("let-input",{attrs:{size:"middle"},model:{value:t.query.uid,callback:function(e){t.$set(t.query,"uid",e)},expression:"query.uid"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[t._v(t._s(t.$t("ssoCommon.search")))])],1)],1),a("let-table",{attrs:{data:t.userListShow,stripe:"","empty-msg":t.$t("ssoCommon.nodata"),title:t.$t("auth.userManageTitle")}},[a("let-table-column",{attrs:{width:"5%"},scopedSlots:t._u([{key:"head",fn:function(e){return[a("let-checkbox",{model:{value:t.isCheckedAll,callback:function(e){t.isCheckedAll=e},expression:"isCheckedAll"}})]}},{key:"default",fn:function(e){return[a("let-checkbox",{attrs:{value:e.row.uid},model:{value:e.row.isChecked,callback:function(a){t.$set(e.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}])}),a("let-table-column",{attrs:{title:t.$t("auth.uid"),prop:"uid",width:"20%"}}),a("let-table-column",{attrs:{title:t.$t("auth.userTime"),prop:"update_time",width:"30%"}}),a("let-table-column",{attrs:{width:"60%",title:t.$t("auth.privileges")},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.authorization,(function(i,o){return a("let-tag",{key:o,staticStyle:{},attrs:{closable:""},on:{close:function(a){return t.delItem(e.row.uid,i)}}},[t._v(t._s(i.flag+" : "+i.role))])}))}}])}),t.pageCount>0?a("let-pagination",{attrs:{slot:"pagination",align:"right","prev-text":t.$t("ssoCommon.prevPage"),"next-text":t.$t("ssoCommon.nextPage"),total:t.pageCount,page:t.page},on:{change:t.changePage},slot:"pagination"}):t._e()],1),a("let-modal",{attrs:{title:t.dialogTitle,width:"600px"},on:{"on-cancel":t.onClose,"on-confirm":t.onConfirm},model:{value:t.showDialog,callback:function(e){t.showDialog=e},expression:"showDialog"}},[a("div",[a("let-form",{ref:"editForm",attrs:{itemWidth:"100%"}},[a("let-input",{attrs:{type:"hidden"},model:{value:t.dialog.id,callback:function(e){t.$set(t.dialog,"id",e)},expression:"dialog.id"}}),a("let-form-item",{attrs:{label:t.$t("auth.uid")}},[a("let-input",{attrs:{size:"small",required:"","required-tip":t.$t("auth.uidTips")},model:{value:t.dialog.uid,callback:function(e){t.$set(t.dialog,"uid",e)},expression:"dialog.uid"}})],1),a("let-form-item",{attrs:{label:t.$t("pass.password"),required:""}},[a("let-input",{attrs:{type:"password",size:"small",required:"","required-tip":t.$t("pass.passwordTips")},model:{value:t.dialog.password,callback:function(e){t.$set(t.dialog,"password",e)},expression:"dialog.password"}})],1)],1)],1)]),a("let-modal",{attrs:{title:t.dialogAuthTitle,width:"600px"},on:{"on-cancel":t.onClose,"on-confirm":t.onAuthConfirm},model:{value:t.showAuthDialog,callback:function(e){t.showAuthDialog=e},expression:"showAuthDialog"}},[a("div",[a("let-form",{ref:"editAuthForm",attrs:{itemWidth:"100%",labelWidth:"100%"}},[a("let-input",{attrs:{type:"hidden"},model:{value:t.dialogAuth.id,callback:function(e){t.$set(t.dialogAuth,"id",e)},expression:"dialogAuth.id"}}),a("let-form-item",{attrs:{label:t.$t("auth.role"),required:""}},[a("let-select",{model:{value:t.dialogAuth.role,callback:function(e){t.$set(t.dialogAuth,"role",e)},expression:"dialogAuth.role"}},[a("let-option",{attrs:{value:"admin"}},[t._v("admin")]),a("let-option",{attrs:{value:"operator"}},[t._v("operator")]),a("let-option",{attrs:{value:"developer"}},[t._v("developer")])],1)],1),a("let-form-item",{attrs:{label:t.$t("auth.uid"),required:""}},[a("let-select",{attrs:{filterable:""},model:{value:t.dialogAuth.uid,callback:function(e){t.$set(t.dialogAuth,"uid",e)},expression:"dialogAuth.uid"}},t._l(t.userList,(function(e){return a("let-option",{key:e.uid,attrs:{value:e.uid}},[t._v(t._s(e.name||e.uid))])})),1)],1),a("let-form-item",{attrs:{label:t.$t("auth.flag"),required:""}},[a("let-input",{attrs:{size:"middle",required:"","required-tip":t.$t("auth.flagTips")},model:{value:t.dialogAuth.flag,callback:function(e){t.$set(t.dialogAuth,"flag",e)},expression:"dialogAuth.flag"}})],1)],1)],1)])],1)},I=[],j=(a("4de4"),a("4160"),a("c975"),a("fb6a"),a("841c"),a("1276"),a("159b"),a("58b7")),P=a.n(j),N=a("c1df"),Y=a.n(N),U={name:"userPage",data:function(){return{uid:"",query:{uid:""},isCheckedAll:!1,userList:[],userListShow:[],totalCount:0,page:1,eachPageCount:20,password:"",dialogTitle:"",showDialog:!1,dialog:{id:"",uid:"",password:""},dialogAuthTitle:"",showAuthDialog:!1,dialogAuth:{id:"",flag:"",role:"",uid:""},enableLdap:!1}},computed:{pageCount:function(){return Math.ceil(this.totalCount/this.eachPageCount)}},methods:{getEnableLdap:function(){var t=this;this.$ajax.getJSON("/server/api/isEnableLdap").then((function(e){e&&(t.enableLdap=e.enableLdap)})).catch((function(t){console.log("get enableLdap:",t)}))},search:function(){var t=this;this.page=1,this.uid=this.query.uid;var e=[];e=this.uid?this.userList.filter((function(e){return-1!=e.uid.indexOf(t.query.uid)})):this.userList.slice((this.page-1)*this.eachPageCount,this.page*this.eachPageCount),this.isCheckedAll=!1,e.forEach((function(t){t.isChecked=!1,t.update_time=Y()(t.update_time).format("YYYY-MM-DD HH:mm:ss")})),this.userListShow=e},getUserList:function(){var t=this,e=this.$Loading.show();this.$ajax.getJSON("/server/api/auth/page/getUserIdList").then((function(a){e.hide(),a.forEach((function(t){t.isChecked=!1,t.role=JSON.stringify(t.authorization)})),t.userList=a,t.totalCount=a.length,t.search()})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("auth.loadUserIdError"),": ").concat(a.err_msg||a.message))}))},changePage:function(t){this.page=t},addItem:function(){this.dialogAuthTitle=this.$t("auth.addPrivilege"),this.showAuthDialog=!0,this.dialogAuth.id="",this.dialogAuth.flag="",this.dialogAuth.role="",this.dialogAuth.uid=""},delItem:function(t,e){var a=this;this.$confirm(this.$t("auth.confirmDelete"),this.$t("ssoCommon.confirmTitle")).then((function(){var i=a.$Loading.show();a.$ajax.postJSON("/server/api/auth/page/pageDeleteAuth",{uid:t,role:e.role,flag:e.flag}).then((function(t){i.hide(),a.$tip.success(a.$t("auth.delSucc")),a.getUserList()})).catch((function(t){i.hide(),a.$tip.error("".concat(a.$t("auth.delError"),": ").concat(t.err_msg||t.message))}))}))},onAuthConfirm:function(){var t=this;if(this.$refs.editAuthForm.validate()){var e=this.dialogAuth.uid?this.dialogAuth.uid.split(/;|,/g):[],a=[];e.forEach((function(e){e&&a.push({flag:t.dialogAuth.flag,role:t.dialogAuth.role,uid:e})}));var i=this.$Loading.show(),o="/server/api/auth/page/addAuth";this.$ajax.postJSON(o,{auth:a}).then((function(e){i.hide(),t.showDialog=!1,t.$tip.success(t.dialogTitle+t.$t("ssoCommon.success")),t.getUserList()})).catch((function(e){i.hide(),t.$tip.error("".concat(t.dialogTitle).concat(t.$t("ssoCommon.failed"),": ").concat(e.err_msg||e.message))}))}},addUser:function(){this.dialogTitle=this.$t("auth.addUser"),this.showDialog=!0,this.dialog.id="",this.dialog.uid="",this.dialog.password=""},onConfirm:function(){var t=this;if(this.$refs.editForm.validate()){var e=this.dialog.uid?this.dialog.uid.split(/;|,/g):[],a=[];e.forEach((function(e){e&&a.push({uid:e,password:P()(t.dialog.password)})}));var i=this.$Loading.show(),o="/server/api/auth/page/addUser";this.$ajax.postJSON(o,{user:a}).then((function(e){i.hide(),t.showDialog=!1,t.$tip.success(t.dialogTitle+t.$t("ssoCommon.success")),t.getUserList()})).catch((function(e){i.hide(),t.$tip.error("".concat(t.dialogTitle).concat(t.$t("ssoCommon.failed"),": ").concat(e.err_msg||e.message))}))}},onClose:function(){},delUser:function(){var t=this;this.$confirm(this.$t("auth.confirmDelete"),this.$t("ssoCommon.confirmTitle")).then((function(){var e=[];if(t.userListShow.forEach((function(a){if(!0===a.isChecked){if("admin"==a.uid)return void t.$tip.error(t.$t("auth.adminDelError"));e.push(a.uid)}})),e.length){var a=t.$Loading.show();t.$ajax.postJSON("/server/api/auth/page/pageDeleteUser",{uids:e}).then((function(e){a.hide(),t.$tip.success(t.$t("auth.delSucc")),t.getUserList()})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("auth.delError"),": ").concat(e.err_msg||e.message))}))}else t.$tips.error(t.$t("auth.selectRecord"))}))}},mounted:function(){this.getEnableLdap(),this.getUserList()},watch:{isCheckedAll:function(){var t=this.isCheckedAll;this.userListShow.forEach((function(e){e.isChecked=t}))},$route:function(t,e){this.getUserList()}}},Z=U,V=(a("6a62"),Object(x["a"])(Z,O,I,!1,null,null,null)),W=V.exports,R=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{margin:"20px auto",overflow:"auto"},attrs:{width:"300px"}},[a("let-table",{attrs:{data:t.authListShow,stripe:"","empty-msg":t.empty_msg}},[a("let-table-column",{attrs:{title:t.$t("auth.role"),prop:"role",width:"20%"}}),a("let-table-column",{attrs:{title:t.$t("auth.flag"),prop:"flag",width:"15%"}}),t.pageCount>0?a("let-pagination",{attrs:{slot:"pagination",align:"right","prev-text":t.$t("ssoCommon.prevPage"),"next-text":t.$t("ssoCommon.nextPage"),total:t.pageCount,page:t.page},on:{change:t.changePage},slot:"pagination"}):t._e()],1)],1)},J=[],q={name:"infoPage",data:function(){return{authList:[],isAdmin:!1,totalCount:0,page:1,eachPageCount:20,empty_msg:""}},computed:{pageCount:function(){return Math.ceil(this.totalCount/this.eachPageCount)},authListShow:function(){return this.authList.slice((this.page-1)*this.eachPageCount,this.page*this.eachPageCount)}},methods:{getAuthList:function(){var t=this,e=this.$Loading.show();this.$ajax.getJSON("/server/api/getMyAuthList").then((function(a){e.hide(),t.authList=a,t.totalCount=a.length})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("auth.loadListError"),": ").concat(a.err_msg||a.message))}))},changePage:function(t){this.page=t},checkAdmin:function(){var t=this;this.isAdmin=!1,this.$ajax.getJSON("/server/api/isAdmin").then((function(e){t.isAdmin=e.admin,t.isAdmin?t.empty_msg=t.$t("ssoCommon.admin"):t.empty_msg=t.$t("ssoCommon.nodata")})).catch((function(t){}))}},mounted:function(){this.checkAdmin(),this.getAuthList()}},F=q,H=(a("b92e"),Object(x["a"])(F,R,J,!1,null,null,null)),G=H.exports,z=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{margin:"20px auto",overflow:"auto"}},[a("div",{staticStyle:{float:"center"}},[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:t.addToken}},[t._v(t._s(t.$t("auth.addToken")))]),t._v(" "),a("let-button",{attrs:{size:"small",theme:"danger"},on:{click:t.delToken}},[t._v(t._s(t.$t("auth.delToken")))])],1),a("let-table",{attrs:{data:t.tokenListShow,stripe:"","empty-msg":t.$t("ssoCommon.nodata"),title:t.$t("auth.tokenManageTitle")}},[a("let-table-column",{attrs:{width:"5%"},scopedSlots:t._u([{key:"head",fn:function(e){return[a("let-checkbox",{model:{value:t.isCheckedAll,callback:function(e){t.isCheckedAll=e},expression:"isCheckedAll"}})]}},{key:"default",fn:function(e){return[a("let-checkbox",{attrs:{value:e.row.token},model:{value:e.row.isChecked,callback:function(a){t.$set(e.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}])}),a("let-table-column",{attrs:{title:t.$t("auth.uid"),prop:"uid",width:"10%"}}),a("let-table-column",{attrs:{title:t.$t("auth.token"),prop:"token",width:"20%"}}),a("let-table-column",{attrs:{title:t.$t("auth.tokenExpireTime"),prop:"expire_time",width:"15%"}}),a("let-table-column",{attrs:{title:t.$t("auth.tokenTime"),prop:"update_time",width:"15%"}}),a("let-table-column",{attrs:{title:t.$t("auth.status"),width:"5%"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{style:t.statusStyle(e.row.valid)},[t._v(t._s(e.row.validDesc))])]}}])}),a("let-table-column",{attrs:{title:t.$t("auth.operator"),width:"5%"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-button",{attrs:{theme:e.row.valid?"primary":"danger"},on:{click:function(a){return t.onTokenValid(e.row)}}},[t._v(t._s(t.isTokenValid(e.row.valid)))])]}}])}),t.pageCount>0?a("let-pagination",{attrs:{slot:"pagination",align:"right","prev-text":t.$t("ssoCommon.prevPage"),"next-text":t.$t("ssoCommon.nextPage"),total:t.pageCount,page:t.page},on:{change:t.changePage},slot:"pagination"}):t._e()],1),a("let-modal",{attrs:{title:t.dialogTitle,width:"600px"},on:{"on-cancel":t.onClose,"on-confirm":t.onConfirm},model:{value:t.showDialog,callback:function(e){t.showDialog=e},expression:"showDialog"}},[a("div",[a("let-form",{ref:"editForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:t.$t("auth.tokenExpireTime")}},[a("let-datetime-picker",{attrs:{required:"","required-tip":t.$t("auth.tokenTips")},model:{value:t.dialog.expire_time,callback:function(e){t.$set(t.dialog,"expire_time",e)},expression:"dialog.expire_time"}})],1)],1)],1)])],1)},Q=[],B={name:"tokenPage",data:function(){return{isCheckedAll:!1,tokenList:[],totalCount:0,page:1,eachPageCount:30,token:"",expireTime:"",dialogTitle:"",showDialog:!1,dialog:{expire_time:""}}},computed:{pageCount:function(){return Math.ceil(this.totalCount/this.eachPageCount)},tokenListShow:function(){var t=this,e=this.tokenList.slice((this.page-1)*this.eachPageCount,this.page*this.eachPageCount);return this.isCheckedAll=!1,e.forEach((function(e){e.isChecked=!1,e.validDesc=1==e.valid?t.$t("auth.valid"):t.$t("auth.notValid"),e.expire_time=Y()(e.expire_time).format("YYYY-MM-DD HH:mm:ss"),e.update_time=Y()(e.update_time).format("YYYY-MM-DD HH:mm:ss")})),e}},methods:{getTokenList:function(){var t=this,e=this.$Loading.show();this.$ajax.getJSON("/server/api/auth/getTokenList").then((function(a){e.hide(),a.forEach((function(t){t.isChecked=!1})),t.tokenList=a,t.totalCount=a.length})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("auth.loadTokenError"),": ").concat(a.err_msg||a.message))}))},statusStyle:function(t){return t?"color: green":"color: red"},onTokenValid:function(t){var e=this;this.$confirm(this.$t("auth.setTokenValid")).then((function(){var a=e.$Loading.show();e.$ajax.postJSON("/server/api/auth/setTokenValid",{token:t.token,valid:1-t.valid}).then((function(t){a.hide(),e.getTokenList(),e.$tip.success("".concat(e.$t("auth.setTokenSucc")))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("auth.setTokenError"),": ").concat(t.err_msg||t.message))}))}))},isTokenValid:function(t){return 1==t?this.$t("auth.notValid"):this.$t("auth.valid")},changePage:function(t){this.page=t},addToken:function(){this.dialogTitle=this.$t("auth.addToken"),this.showDialog=!0,this.dialog.expire_time=""},onConfirm:function(){var t=this;if(this.$refs.editForm.validate()){var e=this.$Loading.show(),a="/server/api/auth/addToken";this.$ajax.postJSON(a,{expire_time:this.dialog.expire_time}).then((function(a){e.hide(),t.showDialog=!1,t.$tip.success(t.dialogTitle+t.$t("ssoCommon.success")),t.getTokenList()})).catch((function(a){e.hide(),t.$tip.error("".concat(t.dialogTitle).concat(t.$t("ssoCommon.failed"),": ").concat(a.err_msg||a.message))}))}},onClose:function(){},delToken:function(){var t=this;this.$confirm(this.$t("auth.confirmTokenDelete"),this.$t("auth.confirmTokenTitle")).then((function(){var e=[];if(t.tokenListShow.forEach((function(t){!0===t.isChecked&&e.push(t.id)})),e.length){var a=t.$Loading.show();t.$ajax.postJSON("/server/api/auth/deleteToken",{tokens:e}).then((function(e){a.hide(),t.$tip.success(t.$t("auth.delSucc")),t.getTokenList()})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("auth.delError"),": ").concat(e.err_msg||e.message))}))}else t.$tips.error(t.$t("auth.selectRecord"))}))}},mounted:function(){this.getTokenList()},watch:{isCheckedAll:function(){var t=this.isCheckedAll;this.tokenListShow.forEach((function(e){e.isChecked=t}))}}},K=B,X=(a("d47f"),Object(x["a"])(K,z,Q,!1,null,null,null)),tt=X.exports,et=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{margin:"20px auto",overflow:"auto"}},[a("let-table",{attrs:{data:t.setListShow,stripe:"","empty-msg":t.$t("ssoCommon.nodata"),title:t.$t("auth.setManageTitle")}},[a("let-table-column",{attrs:{title:t.$t("auth.setTitle"),prop:"title",width:"15%"}}),a("let-table-column",{attrs:{title:t.$t("auth.valid"),prop:"valid",width:"10%"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-switch",{on:{change:function(a){return t.onSetValid(e.row)}},model:{value:e.row.valid,callback:function(a){t.$set(e.row,"valid",a)},expression:"scope.row.valid"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("Open")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("Close")])])]}}])}),a("let-table-column",{attrs:{title:t.$t("auth.about"),prop:"about_cn",width:"60%"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.about_cn))]),a("br"),a("span",[t._v(t._s(e.row.about_en))])]}}])}),a("let-table-column",{attrs:{title:t.$t("auth.operator"),width:"15%"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.editSet(e.row)}}},[t._v(t._s(t.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return t.viewSet(e.row)}}},[t._v(t._s(t.$t("operate.view")))])]}}])}),t.pageCount>0?a("let-pagination",{attrs:{slot:"pagination",align:"right","prev-text":t.$t("ssoCommon.prevPage"),"next-text":t.$t("ssoCommon.nextPage"),total:t.pageCount,page:t.page},on:{change:t.changePage},slot:"pagination"}):t._e()],1),a("let-modal",{attrs:{title:t.dialogTitle,width:"600px"},on:{"on-cancel":t.onClose,"on-confirm":t.onConfirm},model:{value:t.showDialog,callback:function(e){t.showDialog=e},expression:"showDialog"}},[a("div",[a("let-form",{ref:"editForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:t.$t("auth.setTitle"),required:""}},[a("let-input",{attrs:{disabled:"",required:"","required-tip":t.$t("ssoCommon.notEmpty")},model:{value:t.dialog.title,callback:function(e){t.$set(t.dialog,"title",e)},expression:"dialog.title"}})],1),a("let-form-item",{attrs:{label:t.$t("auth.setInfo"),required:""}},[a("let-input",{attrs:{type:"textarea",rows:10,required:"","required-tip":t.$t("ssoCommon.notEmpty"),placeholder:"{ title: 'abcd' }"},model:{value:t.dialog.info,callback:function(e){t.$set(t.dialog,"info",e)},expression:"dialog.info"}})],1)],1)],1)]),a("let-modal",{attrs:{title:t.$t("cfg.msg.viewContent"),width:"800px"},model:{value:t.viewModal.show,callback:function(e){t.$set(t.viewModal,"show",e)},expression:"viewModal.show"}},[a("div",{staticClass:"pre_con"},[t.viewModal.model?a("pre",[t._v(t._s(t.viewModal.model.info))]):t._e()]),a("div",{attrs:{slot:"foot"},slot:"foot"})])],1)},at=[],it={name:"setPage",data:function(){return{setList:[],totalCount:0,page:1,eachPageCount:30,set:"",expireTime:"",dialogTitle:"",showDialog:!1,dialog:{title:"",info:""},viewModal:{show:!1,model:null}}},computed:{pageCount:function(){return Math.ceil(this.totalCount/this.eachPageCount)},setListShow:function(){var t=this.setList.slice((this.page-1)*this.eachPageCount,this.page*this.eachPageCount);return t.forEach((function(t){t.update_time=Y()(t.update_time).format("YYYY-MM-DD HH:mm:ss")})),t}},methods:{getSetList:function(){var t=this,e=this.$Loading.show();this.$ajax.getJSON("/server/api/auth/page/getSetList").then((function(a){e.hide(),t.setList=a,t.totalCount=a.length})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("auth.loadSetError"),": ").concat(a.err_msg||a.message))}))},onSetValid:function(t){var e=this;this.$confirm(this.$t("auth.setSetValid")).then((function(){var a=e.$Loading.show();e.$ajax.postJSON("/server/api/auth/page/setSetValid",{title:t.title,valid:1-(t.valid?0:1)}).then((function(t){a.hide(),e.getSetList(),e.$tip.success("".concat(e.$t("auth.setSetSucc")))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("auth.setSetError"),": ").concat(t.err_msg||t.message))}))})).catch((function(){t.valid=1-t.valid}))},isSetValid:function(t){return 1==t?this.$t("auth.notValid"):this.$t("auth.valid")},changePage:function(t){this.page=t},viewSet:function(t){this.viewModal.model=t,this.viewModal.show=!0},editSet:function(t){this.dialogTitle=this.$t("auth.editSet"),this.dialog=t,this.showDialog=!0},onConfirm:function(){var t=this;if(this.$refs.editForm.validate()){try{JSON.parse(this.dialog.info)}catch(i){return void this.$tip.error("config content must be json!"+i)}var e=this.$Loading.show(),a="/server/api/auth/page/updateSet";this.$ajax.postJSON(a,this.dialog).then((function(a){e.hide(),t.showDialog=!1,t.$tip.success(t.dialogTitle+t.$t("ssoCommon.success")),t.getSetList()})).catch((function(a){e.hide(),t.$tip.error("".concat(t.dialogTitle).concat(t.$t("ssoCommon.failed"),": ").concat(a.err_msg||a.message))}))}},onClose:function(){}},mounted:function(){this.getSetList()}},ot=it,nt=(a("8c4b"),Object(x["a"])(ot,et,at,!1,null,null,null)),st=nt.exports;i["default"].use(M["a"]);var lt=new M["a"]({routes:[{path:"/user",name:"userManage",component:W},{path:"/token",name:"tokenManage",component:tt},{path:"/set",name:"setManage",component:st},{path:"/",name:"infoManage",component:G}]});i["default"].config.productionTip=!1,$["b"].call(void 0).then((function(){i["default"].use(n.a,{i18n:function(t,e){return $["a"].t(t,e)}}),new i["default"]({el:"#auth-app",router:lt,i18n:$["a"],components:{App:E},template:"<App/>"})}))},"6a62":function(t,e,a){"use strict";var i=a("446d"),o=a.n(i);o.a},7037:function(t,e,a){"use strict";var i=a("9df6"),o=a.n(i);o.a},7097:function(t,e,a){"use strict";var i=a("714d"),o=a.n(i);o.a},"714d":function(t,e,a){},"77bd":function(t,e,a){},"8c4b":function(t,e,a){"use strict";var i=a("abf4"),o=a.n(i);o.a},"9742d":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1ZDFiOTQyYS0zZWUyLTkxNGQtOTBiYS1iZTVkYzNjOTU1OTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzY2QzI2NDc2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzY2QzI2NDY2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjEwODNhYzItNzY4Yy02MjRkLWEyYWMtYTFiMTdmOTZhZmZhIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6NzRmMzZhYTgtODFhOC04ZTQ5LWExN2UtMDI2MDYwMWE2ZGMwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+I9/UywAAA2JJREFUeNrsWUtoE1EUvZNM008SbUqQRrBtgtBoV36QLOxGi1pBV7qo0IXYUIti6cKiIIgrQUFdidCKggtBC0q1aZXqUoq/lQUr0qatJlKKVdMYm9947+SNJONEp01m0kAunL508t68M2fufWfmhRMEAYopDFBkUSKsdfDyA32D0yZsLiPaEbYC8VpA3EGcRkS9B+uzE8a4hDhVYCFtjEMEceZ/KdHO2mYEVyA0Mw5eOTlOvqxhSkgHuIE36wom8aFtcyIP5MBJx55cqFRVdK2IAELQGAE2V86rxE2EQwdRHWyunAlrRvb4Hh4Gz1WIrdq5eLUnp/zJFnvPR1ZE+ICnDHgjwP4dPNx4Gl/9xvFoLAZLMQF8L+Oqx6hWeKUq/itIVbXKLkfhoI6if8kH4Q41J8pDfEYcy0dK+LDg9FjWVKVd8T+tKTkdXrke5hFkKTFccrqS05WcruR0YkQR9xBHEE5EOcKaD4U7WPXW5pHsA0Qv1sVH2V2Mrmqnuz08u5kJQm8azjaPeHgSMRLHTFHalOILUWxIlLYSriC6FNJyE4HnDZBExm2e+cq7Y/ZIIZxuAO/UYUZ2CNFiNHDQuMEMrvVmWGtJUfm+GIfJQBgmZsMASfHQYyTdiqSjagnngyxN1sM+XyWy5goj7N5uhxqrKaOjvdokYiNeyLPX8xD+ldjF7sZJPZ3uPqr7CdVtws+dpGyLjOzZW0sipKDvqA/1JVNElZv0dLqHaSuOsbHODDaZsm/9yb+3f7CPu94C41MhIxvbo5fTvWLtPvrjcphVD3TWVkH6WL2cTnpjcYnKrSn7kwZyZaV5tjYY4OLRcqhhfaWxejmdabkXLC3BiaSQXri6OR0VboiZgnvhR0xcCUhBubLyWqFljsW0WoV9bMJcdiM/sHONiFYWDKu+0rS+o9kIf2XtTg2Kj+5UYmImDAuhzMcGytktDZl0qA/1pTGIfvqgtN16DZturZYLI8+BgeMgm3Gkkx1NGQf9ex2d7gSli1IO97LbqMlPBom4ABzOSkSGXsyBu84CTkcVVFtTVL6F4jAV/AnvZxalgnue5pKKhKNM4W6tNrTRtcSHHyTUNe4PGRBK3Wi96yOy0nOEYkpo/ZYhI05262Wm4GJi+VmB9SPRd3K35Uq/hGocvwUYACbzV4iqlXUIAAAAAElFTkSuQmCC"},"9df6":function(t,e,a){},abf4:function(t,e,a){},b92e:function(t,e,a){"use strict";var i=a("ee0e"),o=a.n(i);o.a},d47f:function(t,e,a){"use strict";var i=a("77bd"),o=a.n(i);o.a},ee0e:function(t,e,a){}});
\ No newline at end of file
diff --git a/client/dist/static/js/chunk-common.30447a47.js b/client/dist/static/js/chunk-common.30447a47.js
deleted file mode 100644
index f9caeb1c..00000000
--- a/client/dist/static/js/chunk-common.30447a47.js
+++ /dev/null
@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-common"],{"00b0":function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("let-select",{ref:"localSelect",attrs:{clearable:!1,size:"small"},on:{change:t.changeLocale},model:{value:t.locale,callback:function(e){t.locale=e},expression:"locale"}},[t._l(t.localeMessages,(function(e){return[a("let-option",{key:e.localeCode,attrs:{value:e.localeCode}},[t._v(t._s(e.localeName))])]}))],2)],1)},s=[],n=a("f51c"),i={data:function(){return{locale:this.$cookie.get("locale")||"cn",localeMessages:n["c"]}},methods:{changeLocale:function(){this.$cookie.set("locale",this.locale,{expires:"1Y"}),location.reload()}}},o=i,l=a("2877"),c=Object(l["a"])(o,r,s,!1,null,null,null);e["a"]=c.exports},"04b0":function(t,e,a){"use strict";var r=a("a4e9"),s=a.n(r);s.a},"0585":function(t,e,a){"use strict";var r=a("120f"),s=a.n(r);s.a},"08cb":function(t,e,a){"use strict";var r=a("f614"),s=a.n(r);s.a},"0a5e":function(t,e,a){t.exports=a.p+"static/img/zoom-in.a42f35f1.svg"},"0abb":function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"compare-chart"},[a("ve-line",t._b({},"ve-line",t.chartOptions,!1)),a("a",{staticClass:"compare-chart-zoom-in",attrs:{href:"javascript:"},on:{click:function(e){t.enlarge=!0}}},[a("icon",{attrs:{name:"zoom-in"}})],1),a("let-modal",{attrs:{width:"80%"},on:{close:function(e){t.enlarge=!1}},model:{value:t.enlarge,callback:function(e){t.enlarge=e},expression:"enlarge"}},[t.enlarge?a("ve-line",t._b({},"ve-line",t.largeChartOptions,!1)):t._e(),a("div",{attrs:{slot:"foot"},slot:"foot"})],1)],1)},s=[],n=(a("4160"),a("b0c0"),a("159b"),a("a026")),i=(a("627c"),a("0a6d"),a("ba1a")),o=a.n(i);n["default"].component(o.a.name,o.a);a("0a5e");var l={props:{title:String,timeColumn:String,dataColumns:Array,data:Array},data:function(){return{enlarge:!1}},computed:{chartOptions:function(){var t={},e=[this.timeColumn];return this.dataColumns.forEach((function(a){var r=a.name,s=a.label;t[r]=s,e.push(r)})),{title:{show:!0,text:this.title},grid:{bottom:40,top:50},legend:{top:5},colors:["#f56c77","#6accab"],settings:{labelMap:t,scale:[!0,!1],lineStyle:{width:1}},dataZoom:[{type:"inside",show:!0,xAxisIndex:[0],zoomOnMouseWheel:!0,start:0,end:100}],data:{columns:e,rows:this.data}}},largeChartOptions:function(){var t={},e=[this.timeColumn];return this.dataColumns.forEach((function(a){var r=a.name,s=a.label;t[r]=s,e.push(r)})),{title:{show:!0,text:this.title,left:"center",top:"bottom"},grid:{bottom:40,top:50},legend:{top:5},colors:["#f56c77","#6accab"],settings:{labelMap:t,scale:[!0,!1],lineStyle:{width:1}},data:{columns:e,rows:this.data},dataZoom:[{type:"inside",minValueSpan:12,zoomOnMouseWheel:"alt"},{minValueSpan:12}]}}}},c=l,u=(a("29ab"),a("2877")),d=Object(u["a"])(c,r,s,!1,null,null,null);e["a"]=d.exports},"0b18":function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hours-filter"},[a("h4",[t._v(t._s(t.title))]),a("ul",t._l(t.hours,(function(e){return a("li",{key:e.val,class:{active:e.val===t.value},on:{click:function(a){return t.onChange(e.val)}}},[t._v(t._s(e.txt)+" ")])})),0)])},s=[],n=(a("99af"),a("d81d"),a("fb6a"),a("a9e3"),Array.apply(null,{length:24}).map((function(t,e){return e}))),i=n.map((function(t){return{val:t,txt:"0".concat(t).slice(-2)}})),o=[{val:-1,txt:"all"}].concat(i),l={name:"HoursFilter",props:{title:{type:String,default:""},value:Number},filters:{format:function(t){return"0".concat(t).slice(-2)}},data:function(){return{hours:o}},methods:{onChange:function(t){this.$emit("input",t)}}},c=l,u=(a("25d5"),a("2877")),d=Object(u["a"])(c,r,s,!1,null,null,null);e["a"]=d.exports},"0ce2":function(t,e,a){"use strict";a("99af"),a("6d93");var r=a("a026"),s=a("7ad2"),n=new s["a"];n.ServerUrl.set("http://api.k.tarsyun.com/json"),n.ResultHandler.set((function(t){return!(!t||0!==t.tars_ret)})),n.call=function(t,e,a){return n.Headers.set("X-Token",window.localStorage.ticket||""),n.postJSON("/".concat(t,"/").concat(e),a)},Object.defineProperty(r["default"].prototype,"$market",{get:function(){return n}})},1:function(t,e){},"120f":function(t,e,a){},1342:function(t,e,a){},"13e1":function(t,e,a){"use strict";var r=a("5d02"),s=a.n(r);s.a},1817:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsBAMAAADsqkcyAAAAIVBMVEUAAACZsuGasuCbtuRFf/WZseD////q8P3z9vt6o/e2x+iGuTfsAAAABHRSTlMA6aYc+fzKlQAAAGFJREFUKM9jgIBQBEIA+gszK4YiASEDqLBhKAoQhgqrrkhDAl1BUGHRNmThjECYfWkuSCAtFI8w0A50YSDAIUyC2SPOJdMrsZpdlk6MMMIQOoYJZvLBl9gwkybuhDx4choAeHa83egTBYcAAAAASUVORK5CYII="},"1ca6":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAoCAMAAACyy+glAAAA81BMVEUAAACNpf+ky/+ZsuFFgPaasuJoiv9GgPZHgfZGgPWasuJGgPVKgvdMgf9FgPaZsuBGgPWZseFFgPZFgPaas+FHgPdGgfZHgPabs+JIgflGgf+gu+lQh/9FgPWasuBFgPZFgPZFgPWasuFFgPZGgPWas+FGgPaZsuFGgfaas+FGgfZGgPiatOGcteVIgvqduOVFgPWasuGasuGasuFGgPWasuFFgPaZsuJHgfZGgPeZseFGgfeasuKasuNHgfectuKbs+RIgfids+GZseGZsuCZseBFgPaaseFGgPaZseFFgPZGgPZGgPagtOeZs+ZFf/WZseByc+/7AAAAT3RSTlMABAH493gHUTS5k4IcEvvx6d7Wyn99dE5DKRYQDO7p5eDSsqagiGxrZ2ZURjswLxzxycCfmpmJcG9hX1xWST4rJSMh7NDOwLuuqpOPOhkKbHRT8QAAAbxJREFUOMut1Gl3wUAUxvEniQRB0VZROy0tSvd9Qfd17vf/NBUycZmp40V/L3P+52RyMzP4P0Yku9fOO6uk8VhFeHZWaLMlMbG+zR4+uPY3VBmhabsWkeX2F9uwrsUReayz0fx6D6dtKA8uTVOWDeZcTJ1izi5Jd2xmKT/eg8/JFAEUkjJ+NiFFhC8m26i4x9gmSQeQ2jKuGbIVVxgrPKrxpZA+vToxbkUGHttv6wjciMDGZTuWmi3/xx9IssvWrOpgou+WiY7fybqb/RJFqBiMqpszzTOybjFxH1LjHSgj358s4lBt13oslJ9qA/mSUG1BsU+bGFY0bQMaA8SrmjVsmdBJ1NQ5NCLQKm7MLbTTjDWzCeg5L/zlV8tPc5S/Pby0NRu87QCFJfEpa0tfQC7pGn+156xN9YBbi+ior28zrK0OgRZ5yjld22TtepydTVv9ITesrW3DOKFAffE7w2vsbCRg1olJH4CLsA0c9Xb5NXHJBx6zn/zm+PuPe+K7hx0IOdkWcSN2swXthwnpgscDzFTZBaSryw6/uLVnxyapNT+6lBCVMBh+s7mLu7OXNwB9fWJiJbnX9PE1fL8fY9HHKD9QSQAAAABJRU5ErkJggg=="},"1df8":function(t,e,a){"use strict";var r=a("f990"),s=a.n(r);s.a},"235c":function(t,e,a){"use strict";var r=a("5664"),s=a.n(r);s.a},2435:function(t,e,a){},2494:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"set_inputer"},[a("div",{staticClass:"set_inputer_item"},[a("let-input",{ref:"name",attrs:{size:"small",value:t.name,placeholder:t.$t("common.set.setName"),disabled:!t.enabled,required:t.enabled,"required-tip":t.$t("deployService.form.setNameFormatTips"),pattern:t.enabled?"^[a-z]+$":null,"pattern-tip":t.$t("deployService.form.setNameFormatTips")},on:{input:t.updaters.name}})],1),a("div",{staticClass:"set_inputer_item"},[a("let-input",{ref:"area",attrs:{size:"small",value:t.area,placeholder:t.$t("common.set.setArea"),disabled:!t.enabled,required:t.enabled,"required-tip":t.$t("deployService.form.setAreaTips"),pattern:t.enabled?"^[a-z]+$":null,"pattern-tip":t.$t("deployService.form.setAreaFormatTips")},on:{input:t.updaters.area}})],1),a("div",{staticClass:"set_inputer_item"},[a("let-input",{ref:"group",attrs:{size:"small",value:t.group,placeholder:t.$t("common.set.setGroup"),disabled:!t.enabled,required:t.enabled,"required-tip":t.$t("deployService.form.setGroupTips"),pattern:t.enabled?"^(\\d+|\\*)$":null,"pattern-tip":t.$t("deployService.form.setGroupFormatTips")},on:{input:t.updaters.group}})],1),a("let-checkbox",{staticClass:"set_inputer_switch",attrs:{value:t.enabled},on:{input:t.updaters.enabled,change:t.onEnabledChange}},[t._v(t._s(t.$t("serverList.table.th.enableSet"))+" ")])],1)},s=[],n=(a("b0c0"),a("a9e3"),{props:{enabled:Boolean,name:String,area:String,group:[Number,String]},created:function(){this.updaters={name:this.updater("name"),area:this.updater("area"),group:this.updater("group"),enabled:this.updater("enabled")}},methods:{updater:function(t){var e=this;return function(a){return e.$emit("update:".concat(t),a)}},onEnabledChange:function(){var t=this;this.$nextTick((function(){t.enabled||(t.updaters.name(""),t.$refs.name.resetValid(),t.updaters.area(""),t.$refs.area.resetValid(),t.updaters.group(""),t.$refs.group.resetValid())}))}}}),i=n,o=(a("c1df0"),a("2877")),l=Object(o["a"])(i,r,s,!1,null,null,null);e["a"]=l.exports},"25d5":function(t,e,a){"use strict";var r=a("1342"),s=a.n(r);s.a},2699:function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return l}));a("4160"),a("b64b"),a("4d63"),a("ac1f"),a("25f0"),a("5319"),a("1276"),a("159b");var r=1e3,s=60*r,n=60*s,i=24*n;function o(t){return null==t?new Date:t instanceof Date?t:new Date(t)}function l(t,e){if(t=o(t),e=e||"YYYY-MM-DD HH:mm:ss",isNaN(t.getTime()))return e;var a={"M+":t.getMonth()+1,"D+":t.getDate(),"H+":t.getHours(),"h+":t.getHours()%12===0?12:t.getHours()%12,"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};return/(Y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length))),/(dd+)/.test(e)&&(e=e.replace(RegExp.$1,"鏃ヤ竴浜屼笁鍥涗簲鍏竷".split("")[t.getDay()])),Object.keys(a).forEach((function(t){if(new RegExp("("+t+")").test(e)){var r=RegExp.$1,s="".concat(a[t]);e=e.replace(r,1===r.length?s:"00".concat(s).substr(s.length))}})),e}},2998:function(t,e,a){"use strict";var r=a("a197"),s=a.n(r);s.a},"29ab":function(t,e,a){"use strict";var r=a("6663"),s=a.n(r);s.a},"2d43":function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"progressTable"},[a("let-table",{ref:"ProgressTable",attrs:{data:t.items,"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("service.serverName"),prop:"server_name",width:"30%"}}),a("let-table-column",{attrs:{title:t.$t("service.serverIp"),prop:"node_name",width:"30%"}}),a("let-table-column",{attrs:{title:t.$t("common.status")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-tag",{attrs:{theme:2==e.row.status?"success":3==e.row.status?"danger":"",checked:""}},[t._v(" "+t._s(t.statusConfig[e.row.status]+(2!=e.row.status&&3!=e.row.status&&4!=e.row.status?"...":""))+" ")])]}}])})],1),a("p",{ref:"progressTip"},[t._v(t._s(t.$t(t.success?"dcache.executeSuccess":"dcache.execute")))])],1)},s=[],n=(a("4160"),a("caad"),a("a9e3"),a("159b"),a("96cf"),a("1da1")),i=a("393d"),o={props:{releaseId:{type:[Number,String],required:!0}},data:function(){return{items:[],timer:"",progressTip:"",success:!1,statusConfig:{0:this.$t("serverList.restart.notStart"),1:this.$t("serverList.restart.running"),2:this.$t("serverList.restart.success"),3:this.$t("serverList.restart.failed"),4:this.$t("serverList.restart.cancel"),5:this.$t("serverList.restart.pauseFlow")}}},methods:{getProgress:function(){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function e(){var a,r,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(i["q"])({releaseId:t.releaseId});case 3:a=e.sent,r=a.items,a.serial,a.status,a.task_no,t.items=r,s=!0,r.forEach((function(t){return[2,3,4].includes(t.status)?"":s=!1})),s?(t.timer&&window.clearTimeout(t.timer),t.success=!0,t.$emit("done-fn")):t.timer=window.setTimeout(t.getProgress,1e3),e.next=19;break;case 14:e.prev=14,e.t0=e["catch"](0),t.success=!0,console.error(e.t0),t.$tip.error(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[0,14]])})))()}},created:function(){this.getProgress()},destroyed:function(){this.timer&&window.clearTimeout(this.timer),this.$emit("close-fn")}},l=o,c=(a("5236"),a("2877")),u=Object(c["a"])(l,r,s,!1,null,"99a14be8",null);e["a"]=u.exports},"33c3":function(t,e,a){"use strict";var r=a("4d7d"),s=a.n(r);s.a},3430:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("let-form",{attrs:{inline:"",itemWidth:"600px"},nativeOn:{submit:function(e){return e.preventDefault(),t.save(e)}}},[a("let-form-item",{attrs:{label:t.$t("user.op")}},[a("let-input",{attrs:{type:"textarea",disabled:!t.hasAuth},model:{value:t.operator,callback:function(e){t.operator=e},expression:"operator"}})],1),a("let-form-item",{attrs:{label:t.$t("user.dev")}},[a("let-input",{attrs:{type:"textarea",disabled:!t.hasAuth},model:{value:t.developer,callback:function(e){t.developer=e},expression:"developer"}})],1),a("let-form-item",[t.hasAuth?a("let-button",{attrs:{type:"submit",theme:"primary"}},[t._v(t._s(t.$t("common.submit")))]):t._e()],1)],1)],1)},s=[],n=(a("99af"),a("a15b"),{name:"ServerUserManage",data:function(){return{serverData:Object.assign({},this.$parent.getServerData()),developer:"",operator:"",hasAuth:!1}},mounted:function(){this.checkHasAuth(),this.getAuthList()},methods:{checkHasAuth:function(){var t=this;this.$ajax.getJSON("/server/api/has_auth",{application:this.serverData.application,server_name:this.serverData.server_name,role:"developer"}).then((function(e){t.hasAuth=e.has_auth||!1})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getAuthList:function(){var t=this;this.$ajax.getJSON("/server/api/get_auth_list",{application:this.serverData.application,server_name:this.serverData.server_name}).then((function(e){t.operator=(e.operator||[]).join(";"),t.developer=(e.developer||[]).join(";")})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},save:function(){var t=this,e=this.$Loading.show();this.$ajax.postJSON("/server/api/update_auth",{application:this.serverData.application,server_name:this.serverData.server_name,operator:this.operator,developer:this.developer}).then((function(a){e.hide(),t.$tip.success("".concat(t.$t("common.success")))})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.message||a.err_msg))}))}}}),i=n,o=(a("13e1"),a("2877")),l=Object(o["a"])(i,r,s,!1,null,null,null);e["a"]=l.exports},"346f":function(t,e,a){},"393d":function(t,e,a){"use strict";a.d(e,"d",(function(){return c})),a.d(e,"bb",(function(){return u})),a.d(e,"cb",(function(){return d})),a.d(e,"m",(function(){return m})),a.d(e,"q",(function(){return f})),a.d(e,"n",(function(){return p})),a.d(e,"r",(function(){return h})),a.d(e,"X",(function(){return g})),a.d(e,"w",(function(){return v})),a.d(e,"c",(function(){return b})),a.d(e,"v",(function(){return _})),a.d(e,"Z",(function(){return w})),a.d(e,"Y",(function(){return y})),a.d(e,"p",(function(){return $})),a.d(e,"u",(function(){return k})),a.d(e,"db",(function(){return x})),a.d(e,"g",(function(){return C})),a.d(e,"i",(function(){return M})),a.d(e,"h",(function(){return j})),a.d(e,"s",(function(){return S})),a.d(e,"t",(function(){return N})),a.d(e,"W",(function(){return O})),a.d(e,"a",(function(){return D})),a.d(e,"j",(function(){return F})),a.d(e,"k",(function(){return I})),a.d(e,"ab",(function(){return A})),a.d(e,"l",(function(){return L})),a.d(e,"f",(function(){return R})),a.d(e,"b",(function(){return T})),a.d(e,"e",(function(){return E})),a.d(e,"o",(function(){return z})),a.d(e,"C",(function(){return B})),a.d(e,"D",(function(){return G})),a.d(e,"G",(function(){return q})),a.d(e,"E",(function(){return J})),a.d(e,"F",(function(){return P})),a.d(e,"x",(function(){return Z})),a.d(e,"y",(function(){return U})),a.d(e,"B",(function(){return W})),a.d(e,"z",(function(){return Y})),a.d(e,"A",(function(){return H})),a.d(e,"H",(function(){return V})),a.d(e,"I",(function(){return Q})),a.d(e,"L",(function(){return X})),a.d(e,"J",(function(){return K})),a.d(e,"K",(function(){return tt})),a.d(e,"M",(function(){return et})),a.d(e,"N",(function(){return at})),a.d(e,"Q",(function(){return rt})),a.d(e,"O",(function(){return st})),a.d(e,"P",(function(){return nt})),a.d(e,"R",(function(){return it})),a.d(e,"S",(function(){return ot})),a.d(e,"V",(function(){return lt})),a.d(e,"T",(function(){return ct})),a.d(e,"U",(function(){return ut}));a("ac1f"),a("5319");var r=a("bc3a"),s=a.n(r),n=a("4328"),i=a.n(n),o=s.a.create({baseURL:"/pages/server/api",timeout:25e3,transformRequest:[function(t,e){return"multipart/form-data"===e["Content-Type"]?t:"application/json"===e["Content-Type"]?JSON.stringify(t):i.a.stringify(t)}]});o.interceptors.request.use((function(t){return t}),(function(t){throw new Error(t)})),o.interceptors.response.use((function(t){var e=t.data;if(200===e.ret_code)return e.data;throw new Error(e.err_msg)}),(function(t){throw new Error(t)}));var l=o;function c(t){var e=t.servers,a=t.appName,r=t.moduleName,s=t.status,n=void 0===s?"1":s,i=t.cache_version,o=t.srcGroupName,c=void 0===o?[]:o,u=t.dstGroupName,d=void 0===u?[]:u;return l({method:"post",url:"/cache/expandModule",data:{appName:a,moduleName:r,servers:e,status:n,cache_version:i,srcGroupName:c,dstGroupName:d}})}function u(t){var e=t.servers,a=t.appName,r=t.moduleName,s=t.cache_version,n=t.srcGroupName,i=t.dstGroupName,o=t.transferData;return l({method:"post",url:"/cache/transferDCache",data:{servers:e,appName:a,moduleName:r,cache_version:s,srcGroupName:n,dstGroupName:i,transferData:o}})}function d(t){var e=t.appName,a=t.moduleName,r=t.srcGroupName,s=t.dstGroupName,n=t.transferData;return l({method:"post",url:"/cache/transferDCacheGroup",data:{appName:e,moduleName:a,srcGroupName:r,dstGroupName:s,transferData:n},headers:{"Content-Type":"application/json"}})}function m(t){var e=t.releaseId;return l({method:"get",url:"/cache/getReleaseProgress",params:{releaseId:e}})}function f(t){var e=t.releaseId;return l({method:"get",url:"/task",params:{task_no:e}})}function p(t){var e=t.type,a=void 0===e?"1":e;return l({method:"get",url:"/cache/getRouterChange",params:{type:a}})}function h(t){var e=t.appName,a=t.moduleName,r=t.type,s=t.srcGroupName;return l({method:"get",url:"/cache/hasOperation",params:{appName:e,moduleName:a,type:r,srcGroupName:s}})}function g(t){var e=t.appName,a=void 0===e?"":e,r=t.moduleName,s=void 0===r?"":r,n=t.type,i=void 0===n?"1":n,o=t.srcGroupName,c=void 0===o?[]:o,u=t.dstGroupName,d=void 0===u?[]:u;return l({method:"post",url:"/cache/stopTransfer",data:{appName:a,moduleName:s,type:i,srcGroupName:c,dstGroupName:d}})}function v(t){var e=t.appName,a=void 0===e?"":e,r=t.moduleName,s=void 0===r?"":r,n=t.type,i=void 0===n?"1":n,o=t.srcGroupName,c=void 0===o?[]:o,u=t.dstGroupName,d=void 0===u?[]:u;return l({method:"post",url:"/cache/restartTransfer",data:{appName:a,moduleName:s,type:i,srcGroupName:c,dstGroupName:d}})}function b(t){var e=t.appName,a=void 0===e?"":e,r=t.moduleName,s=void 0===r?"":r,n=t.type,i=void 0===n?"1":n,o=t.srcGroupName,c=void 0===o?[]:o,u=t.dstGroupName,d=void 0===u?[]:u;return l({method:"post",url:"/cache/deleteTransfer",data:{appName:a,moduleName:s,type:i,srcGroupName:c,dstGroupName:d}})}function _(t){var e=t.appName,a=void 0===e?"":e,r=t.moduleName,s=void 0===r?"":r,n=t.srcGroupName,i=void 0===n?[]:n;return l({method:"post",url:"/cache/reduceDcache",data:{appName:a,moduleName:s,srcGroupName:i}})}function w(t){var e=t.appName,a=void 0===e?"":e,r=t.moduleName,s=void 0===r?"":r,n=t.groupName,i=void 0===n?"":n;return l({method:"post",url:"/cache/switchServer",data:{appName:a,moduleName:s,groupName:i}})}function y(t){var e=t.appName,a=void 0===e?"":e,r=t.moduleName,s=void 0===r?"":r,n=t.groupName,i=void 0===n?"":n,o=t.imageIdc,c=void 0===o?"":o;return l({method:"post",url:"/cache/switchMIServer",data:{appName:a,moduleName:s,groupName:i,imageIdc:c}})}function $(t){var e=t.appName,a=void 0===e?"":e,r=t.moduleName,s=void 0===r?"":r,n=t.groupName,i=void 0===n?"":n;return l({method:"get",url:"/cache/getSwitchInfo",params:{appName:a,moduleName:s,groupName:i}})}function k(t){var e=t.appName,a=t.moduleName,r=t.groupName,s=t.mirrorIdc,n=t.dbFlag,i=t.enableErase;return l({method:"post",url:"/cache/recoverMirrorStatus",data:{appName:e,moduleName:a,groupName:r,mirrorIdc:s,dbFlag:n,enableErase:i}})}function x(t){var e=t.unType,a=t.appName,r=t.moduleName,s=t.serverNames;return l({method:"post",url:"/cache/uninstall4DCache",data:{unType:e,appName:a,moduleName:r,serverNames:s}})}function C(t){var e=t.appName,a=t.moduleName;return l({method:"get",url:"/cache/getCacheServerList",params:{appName:e,moduleName:a}})}function M(t){var e=t.appName,a=t.moduleName;return l({method:"get",url:"/cache/getModuleConfig",params:{appName:e,moduleName:a}})}function j(){return l({method:"get",url:"/cache/getConfig"})}function S(t){var e=t.applyId,a=t.replace;return l({method:"get",url:"/cache/install_and_publish",params:{applyId:e,replace:a}})}function N(t){var e=t.thedate,a=t.predate,r=t.startshowtime,s=t.endshowtime,n=t.moduleName,i=t.serverName;return l({method:"get",url:"/cache/queryProperptyData",params:{thedate:e,predate:a,startshowtime:r,endshowtime:s,moduleName:n,serverName:i}})}function O(t){var e=t.application,a=void 0===e?"DCache":e,r=t.moduleName,s=void 0===r?"DCacheServerGroup":r,n=t.currPage,i=void 0===n?1:n,o=t.pageSize,c=void 0===o?5:o,u=t.cacheVersion;return l({method:"get",url:"/server_patch_list",params:{application:a,module_name:s,curr_page:i,page_size:c,package_type:u}})}function D(t){var e=t.serial,a=void 0!==e&&e,r=t.elegant,s=void 0!==r&&r,n=t.eachnum,i=void 0===n?1:n,o=t.items,c=void 0===o?[{server_id:"",command:"patch_tars",parameters:{patch_id:0,bak_flag:"",group_name:""}}]:o;return l({method:"post",url:"/add_task",data:{serial:a,elegant:s,eachnum:i,items:c},headers:{"Content-Type":"application/json"}})}function F(t){var e=t.moduleId;return l({method:"get",url:"/get_module_config_info",params:{moduleId:e}})}function I(t){var e=t.module_name;return l({method:"get",url:"/get_module_group",params:{module_name:e}})}function A(){return l({method:"get",url:"/template_name_list",params:{}})}function L(){return l({method:"get",url:"/get_region_list"})}function R(t){var e=t.application,a=void 0===e?"":e,r=t.server_name,s=void 0===r?"":r,n=t.set,i=void 0===n?"":n,o=t.node_name,c=void 0===o?"":o,u=t.expand_nodes,d=void 0===u?[""]:u,m=t.enable_set,f=void 0!==m&&m,p=t.set_name,h=void 0===p?"":p,g=t.set_area,v=void 0===g?"":g,b=t.set_group,_=void 0===b?"":b,w=t.copy_node_config,y=void 0!==w&&w;return l({method:"post",url:"/expand_server_preview",data:{application:a,server_name:s,set:i,node_name:c,expand_nodes:d,enable_set:f,set_name:h,set_area:v,set_group:_,copy_node_config:y},headers:{"Content-Type":"application/json"}})}function T(t){var e=t.node_name;return l({method:"get",url:"/auto_port",params:{node_name:e}})}function E(t){var e=t.application,a=void 0===e?"":e,r=t.server_name,s=void 0===r?"":r,n=t.set,i=void 0===n?"":n,o=t.node_name,c=void 0===o?"":o,u=t.copy_node_config,d=void 0!==u&&u,m=t.expand_preview_servers,f=void 0===m?[{bind_ip:"",node_name:"",obj_name:"",port:"",set:""}]:m;return l({method:"post",url:"/expand_server",data:{application:a,server_name:s,set:i,node_name:c,copy_node_config:d,expand_preview_servers:f},headers:{"Content-Type":"application/json"}})}function z(){return l({method:"get",url:"/routerTree"})}function B(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerModule/create",data:a})}function G(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerModule/delete",data:a})}function q(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerModule/update",data:a})}function J(t){var e=t.data,a=void 0===e?{}:e;return l({method:"get",url:"/routerModule/find",params:a})}function P(t){var e=t.data,a=void 0===e?{}:e;return l({method:"get",url:"/routerModule/list",params:a})}function Z(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerGroup/create",data:a})}function U(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerGroup/delete",data:a})}function W(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerGroup/update",data:a})}function Y(t){var e=t.data,a=void 0===e?{}:e;return l({method:"get",url:"/routerGroup/find",params:a})}function H(t){var e=t.data,a=void 0===e?{}:e;return l({method:"get",url:"/routerGroup/list",params:a})}function V(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerRecord/create",data:a})}function Q(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerRecord/delete",data:a})}function X(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerRecord/update",data:a})}function K(t){var e=t.data,a=void 0===e?{}:e;return l({method:"get",url:"/routerRecord/find",params:a})}function tt(t){var e=t.data,a=void 0===e?{}:e;return l({method:"get",url:"/routerRecord/list",params:a})}function et(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerServer/create",data:a})}function at(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerServer/delete",data:a})}function rt(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerServer/update",data:a})}function st(t){var e=t.data,a=void 0===e?{}:e;return l({method:"get",url:"/routerServer/find",params:a})}function nt(t){var e=t.data,a=void 0===e?{}:e;return l({method:"get",url:"/routerServer/list",params:a})}function it(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerTransfer/create",data:a})}function ot(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerTransfer/delete",data:a})}function lt(t){var e=t.data,a=void 0===e?{}:e;return l({method:"post",url:"/routerTransfer/udpate",data:a})}function ct(t){var e=t.data,a=void 0===e?{}:e;return l({method:"get",url:"/routerTransfer/find",params:a})}function ut(t){var e=t.data,a=void 0===e?{}:e;return l({method:"get",url:"/routerTransfer/list",params:a})}},"3e1a":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1ZDFiOTQyYS0zZWUyLTkxNGQtOTBiYS1iZTVkYzNjOTU1OTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzZBQzM5NkM2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzZBQzM5NkI2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjEwODNhYzItNzY4Yy02MjRkLWEyYWMtYTFiMTdmOTZhZmZhIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6NzRmMzZhYTgtODFhOC04ZTQ5LWExN2UtMDI2MDYwMWE2ZGMwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+FAOt6wAAAWlJREFUeNrsWUEOwiAQhIY3mNSLj/CqD/DiyR9YX2X8gScP+gD16CM8WBs/gTRBU5ulLlCgVTbZNC2ddroMC0sp55z0yRLSM+sdYWYKXO+u5WEmfCM8RcLuwpfCD6v5KEiEdcgSee8mSIQrBMj2MqCYmxfjB9f8QKcaLuWRC+c1z2Vb5wadSh7WMnBFODVsi3k4Eu4K4XtDW9FFwpmC2E3ObmGnZsD2bWYDV4RLGaRyBsNaEVISmSYBa3kwRzJ4RZy2LQnadsUhl51vwqbLyJ/Jw8oIy0iZmrUkVD3DkC+2Ja4dyL+r6agnSfCfG3T9zBINGYEHkgRVZY7kSwFZfZCqoISwdRwWC+E+sK8I55qbIcPKuTesiPCQ6ewvVPcVyu6RUvKKhQbdEeiSIzIKzrEQ4QnyGgmBjXk4EkYQPgHXzsjnOcdCi5+pRQCcY5lB9VtYVM7W2ESz+oWqXq9YGn97RcKRsF97CjAAb0qmeUJR5DMAAAAASUVORK5CYII="},4201:function(t,e,a){"use strict";var r=a("98c9"),s=a.n(r);s.a},4290:function(t,e,a){"use strict";var r=a("c44a"),s=a.n(r);s.a},"42a1":function(t,e,a){"use strict";a("b0c0");var r=a("5530"),s=a("53ca"),n=a("a026"),i=a("1861"),o=a.n(i),l=(a("8c47"),a("00e7")),c=a.n(l),u=(a("6609"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("svg",{staticClass:"icon"},[a("use",{attrs:{"xlink:href":"#"+t.name}})])}),d=[],m={name:"Icon",props:{name:{type:String,required:!0}}},f=m,p=(a("e166"),a("2877")),h=Object(p["a"])(f,u,d,!1,null,null,null),g=h.exports,v=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("let-form-item",{staticClass:"tars-form-item"},[a("label",{staticClass:"let-form-item__label let-label__position_top clickable",on:{click:function(e){return t.$emit("onLabelClick")}}},[t._v(t._s(t.label))]),t._t("default")],2)},b=[],_={name:"TarsFormItem",props:{label:String}},w=_,y=(a("04b0"),Object(p["a"])(w,v,b,!1,null,null,null)),$=y.exports,k=a("0c80"),x=a.n(k),C=a("c400"),M=a.n(C);n["default"].use(o.a,{locale:{en:M.a,cn:x.a}[c.a.get("locale")||"cn"]||x.a}),n["default"].component(g.name,g),n["default"].component($.name,$);var j=n["default"].prototype.$Loading;function S(t){this.el=t,this.loading=null}S.prototype.show=function(t,e){"object"===Object(s["a"])(t)&&(e=t,t=null),this.loading&&this.hide();var a=this.el,n=j(Object(r["a"])({fullScreen:!a,target:a&&t?a.querySelector(t):a,boxClass:"loading-inner",background:"rgba(0,0,0,0)",color:"#fff",size:24},e));return n.show(),this.loading=n,this},S.prototype.hide=function(){return this.loading&&(this.loading.hide(),this.loading=null),this},S.show=function(){var t;return S._loading||(S._loading=new S),(t=S._loading).show.apply(t,arguments)},S.hide=function(){return S._loading||(S._loading=new S),S._loading.hide()},j.show=S.show,j.hide=S.hide,Object.defineProperty(n["default"].prototype,"$loading",{get:function(){return this._loading||(this._loading=new S(this.$el)),this._loading},set:function(t){}}),Object.defineProperty(n["default"].prototype,"$tip",{get:function(){return this.$Notice},set:function(t){}})},"42a2a":function(t,e,a){"use strict";a("b0c0");var r=a("a026"),s=a("2f62");r["default"].use(s["a"]);var n=new s["a"].Store({state:{name:"",marketUid:""},mutations:{increment:function(t,e){t.name=e},marketUid:function(t,e){console.log("marketUid"),t.marketUid=e}}});e["a"]=n},4527:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page_server_property_monitor"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(e){return e.preventDefault(),t.search(e)}}},[a("let-form-group",[a("let-form-item",{attrs:{label:t.$t("monitor.search.a")}},[a("let-date-picker",{attrs:{size:"small",formatter:t.formatter},model:{value:t.query.thedate,callback:function(e){t.$set(t.query,"thedate",e)},expression:"query.thedate"}})],1),a("let-form-item",{attrs:{label:t.$t("monitor.search.b")}},[a("let-date-picker",{attrs:{size:"small",formatter:t.formatter},model:{value:t.query.predate,callback:function(e){t.$set(t.query,"predate",e)},expression:"query.predate"}})],1),a("let-form-item",{attrs:{label:t.$t("monitor.search.start")}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.startshowtime,callback:function(e){t.$set(t.query,"startshowtime",e)},expression:"query.startshowtime"}})],1),a("let-form-item",{attrs:{label:t.$t("monitor.search.end")}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.endshowtime,callback:function(e){t.$set(t.query,"endshowtime",e)},expression:"query.endshowtime"}})],1)],1),a("let-form-group",[a("tars-form-item",{attrs:{label:t.$t("monitor.search.master")},on:{onLabelClick:function(e){return t.groupBy("master_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.master_name,callback:function(e){t.$set(t.query,"master_name",e)},expression:"query.master_name"}})],1),a("tars-form-item",{attrs:{label:t.$t("monitor.search.masterIP")},on:{onLabelClick:function(e){return t.groupBy("master_ip")}}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.master_ip,callback:function(e){t.$set(t.query,"master_ip",e)},expression:"query.master_ip"}})],1),a("tars-form-item",{attrs:{label:t.$t("monitor.select.property")},on:{onLabelClick:function(e){return t.groupBy("property_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.property_name,callback:function(e){t.$set(t.query,"property_name",e)},expression:"query.property_name"}})],1),a("tars-form-item",{attrs:{label:t.$t("monitor.select.strategy")},on:{onLabelClick:function(e){return t.groupBy("policy")}}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.policy,callback:function(e){t.$set(t.query,"policy",e)},expression:"query.policy"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[t._v(t._s(t.$t("operate.search")))])],1)],1)],1),t.showChart?a("compare-chart",t._b({ref:"chart",staticClass:"chart"},"compare-chart",t.chartOptions,!1)):t._e(),t.enableHourFilter?a("hours-filter",{model:{value:t.hour,callback:function(e){t.hour=e},expression:"hour"}}):t._e(),a("let-table",{ref:"table",attrs:{data:t.pagedItems,"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("common.time"),width:"90px"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.show_time||e.row.show_date))]}}])}),a("let-table-column",{attrs:{title:t.$t("monitor.search.master")},scopedSlots:t._u([{key:"default",fn:function(e){return["%"!=e.row.master_name?a("span",[t._v(t._s(e.row.master_name))]):t._e(),"%"==e.row.master_name?a("span",{staticClass:"btn-link",on:{click:function(a){return t.groupBy("master_name",e.row)}}},[t._v(t._s(e.row.master_name))]):t._e()]}}])}),a("let-table-column",{attrs:{title:t.$t("monitor.search.masterIP"),width:"150px"},scopedSlots:t._u([{key:"default",fn:function(e){return["%"!=e.row.master_ip?a("span",[t._v(t._s(e.row.master_ip))]):t._e(),"%"==e.row.master_ip?a("span",{staticClass:"btn-link",on:{click:function(a){return t.groupBy("master_ip",e.row)}}},[t._v(t._s(e.row.master_ip))]):t._e()]}}])}),a("let-table-column",{attrs:{title:t.$t("monitor.select.property"),width:"150px"},scopedSlots:t._u([{key:"default",fn:function(e){return["%"!=e.row.property_name?a("span",[t._v(t._s(e.row.property_name))]):t._e(),"%"==e.row.property_name?a("span",{staticClass:"btn-link",on:{click:function(a){return t.groupBy("property_name",e.row)}}},[t._v(t._s(e.row.property_name))]):t._e()]}}])}),a("let-table-column",{attrs:{title:t.$t("monitor.select.strategy"),width:"150px"},scopedSlots:t._u([{key:"default",fn:function(e){return["%"!=e.row.policy?a("span",[t._v(t._s(e.row.policy))]):t._e(),"%"==e.row.policy?a("span",{staticClass:"btn-link",on:{click:function(a){return t.groupBy("policy",e.row)}}},[t._v(t._s(e.row.policy))]):t._e()]}}])}),a("let-table-column",{attrs:{title:t.$t("monitor.property.property"),prop:"the_value",align:"right",width:"200px"}}),a("let-table-column",{attrs:{title:t.$t("monitor.property.propertyC"),prop:"pre_value",align:"right",width:"230px"}}),t.pageCount?a("let-pagination",{attrs:{slot:"pagination",total:t.pageCount,page:t.page,sum:t.itemsCount,"show-sums":"",jump:""},on:{change:t.changePage},slot:"pagination"}):t._e()],1)],1)},s=[],n=(a("99af"),a("4de4"),a("4160"),a("d81d"),a("fb6a"),a("b64b"),a("ac1f"),a("1276"),a("159b"),a("5530"),a("2699")),i=a("0b18"),o=a("0abb"),l=20,c="YYYYMMDD",u={name:"ServerPropertyMonitor",components:{HoursFilter:i["a"],CompareChart:o["a"]},data:function(){var t=this.treeid,e=t.split("."),a="",r=!0;return"/k8s.html"==location.pathname?(r=!0,2==e.length&&(a=e[0]+"."+e[1])):(r=!1,2==e.length?a=e[0].substring(1)+"."+e[1].substring(1):5==_slave_name_arr.length&&(a=e[0].substring(1)+"."+e[4].substring(1)+"."+e[1].substring(1)+e[2].substring(1)+e[3].substring(1))),{query:{thedate:Object(n["b"])(new Date,c),predate:Object(n["b"])(Date.now()-n["a"],c),startshowtime:"0000",endshowtime:"2360",master_name:a,master_ip:"",property_name:"",policy:"",group_by:"",k8s:r},formatter:c,allItems:[],hour:-1,page:1,showChart:!0}},props:["treeid"],computed:{enableHourFilter:function(){return this.allItems.length&&this.allItems[0].show_time},filteredItems:function(){var t=this.hour;return t>=0&&this.enableHourFilter?this.allItems.filter((function(e){return+e.show_time.slice(0,2)===t})):this.allItems},itemsCount:function(){return this.filteredItems.length},pageCount:function(){return Math.ceil(this.filteredItems.length/l)},pagedItems:function(){return this.filteredItems.slice(l*(this.page-1),l*this.page)},chartOptions:function(){return{title:this.$t("monitor.table.total"),timeColumn:"show_time",dataColumns:[{name:"the_value",label:this.$t("monitor.property.property")},{name:"pre_value",label:this.$t("monitor.property.propertyC")}],data:this.allItems}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var t=this,e=this.$refs.chart&&this.$refs.chart.$loading.show(),a=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/property_monitor_data",this.query).then((function(r){e&&e.hide(),a.hide(),t.allItems=r})).catch((function(r){e&&e.hide(),a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(r.message||r.err_msg))}))},groupBy:function(t,e){this.query.group_by=t,this.showChart=!1,e&&(e.show_time&&(this.query.startshowtime=e.show_time,this.query.endshowtime=e.show_time),e.master_name&&"%"!=e.master_name&&(this.query.master_name=e.master_name),e.master_ip&&"%"!=e.master_ip&&(this.query.master_ip=e.master_ip),e.property_name&&"%"!=e.property_name&&(this.query.property_name=e.property_name),e.policy&&"%"!=e.policy&&(this.query.policy=e.policy)),this.fetchData()},search:function(){delete this.query.group_by,this.showChart=!0,this.fetchData()},changePage:function(t){this.page=t}}},d=u,m=(a("49de"),a("2877")),f=Object(m["a"])(d,r,s,!1,null,null,null);e["a"]=f.exports},4678:function(t,e,a){var r={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-SG":"cdab","./en-SG.js":"cdab","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-nz":"6f50","./en-nz.js":"6f50","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-tw":"90ea","./zh-tw.js":"90ea"};function s(t){var e=n(t);return a(e)}function n(t){if(!a.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}s.keys=function(){return Object.keys(r)},s.resolve=n,t.exports=s,s.id="4678"},4824:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAADkCAMAAACCPk7wAAAB71BMVEUAAACLq/OXr+BOgv+ZsuGasuGas+FHgvibteSgtOSaseFGgPZFgPZFgPZFgPZFgPWasuFGgPZIgPZIgPhGgPaasuFGgPVGgPZGgPWasuGas+FFgPdFgPaZsuGZsuGasuDX4vbE0/Lt8vyZseBFf/VJzI9PaZ5QZ5ZMcLpUX3VMb7ZNba1Oa6ZVXW5ObKpQaJlLc8RLcsFPaqJSZIlRZY1RZpJSYoNUYHpVXGlPaJtUXnJJdtBRZZBKdcxLcb1WW2dVXGtNbrBSY4ZTYX1Jdc5NbrJVXnBKdMlTYoBJd9VRZItJdtJFfvBFf/RIeNpGfe1TYHxHeuFFjeJIed1SY4VJyJVIuKpGkN9Id9dKdMpGlNlKc8ZLcb9OaqRGn8tJypJGfOhGnc5Ho8ZQZpRHe+ZOa6hHsLRIvKVIvqJFi+VKc8dIxphGktxHrblItq1GfOpFiehGoclHq7xIwJ9IxJtFgfJHeuNHpcNNbrRNba9HsrJUX3dFhuxHtK9Iwp1TYX9IuqdPaaBTX3hFg/BMb7hHqb5Hr7dMcLxGl9ZGmdNHp8BGmNVFfvJFhe5Ied9FiOpHm9FGmtFHpsGiuOTc7vFRzpTT3/S8ze2swOi0xurL2fK75tqo4s+J2rl4169i0p98nNxmjNlWgNem4c3j6vmllDHDAAAAIHRSTlMACvcT5WpKNy8b0MSvlvftknJQI9yz0InnpIJg3cS8tkiDxQgAAAvDSURBVHja3JhPTxpRFMXnsxBTa0ErVgcU7dTyr5VOiykLCJCQgBs27giGhdGYsCF85t77PHjf5b3ppptXfplP8MvJuedN9K8kSVImvhCHRKPRuLi4OGAWz8/PpVKp3a5Wq4/fiDiOO53OV+ITcXNzSlwSZ8R4vM98JM7Pz98ZTpjhcFgoFO6OmPxRPp9/eLi+vq7X6/P5B+Ll5T2z/EwMioNi8Zjp96fTZrPZ610RtVqtUqm0Wq3vTLfb/Un8ZtbrW2Y2m00mk9FkNBrd3/9ifhhW6Srdi0JBRB8y5JmB6BJEk+lH9mxUv3mmz5g2nsfwTKJh+unpVXSBuTOq8wyLZtOkWUyz58GgSNiir8g0axbT3VfRUA3RMM2iiY3p1WqVpmkUCgkD0aT5sAHPlug2Es2WY5VoiCYQaDvR4lkizZ450nVibkRbiVaim1MT6N5WorsMNLNoo5o8E7bnIEWX/dWxWBjT7U2iYbqz8UxYnlV1ZCYagSa4Oua+6ih6qqOiTEui19BMbKoD3RFodSTwbERLokmzMQ3PsUFMnxp0R4tnEa08wzQC/WZ6iUDDdH8K0T14VqKlOWAazcGo6kjTwEQj0hJomEaiJdDeRKM6RLTujoI5hnZ1sGhCHcPlVqL7TXQHiTamW45odQyJ4BNdTuB5e3UsStLRiLR0NGnG7DhzV4ckemhXR97u6Ll0tCQ6a3XIMWSs6ljjFhJ2oJHosDo6gWhJNDraOoZVSTRWB0xfMuTZO++MaTvSMI2OlupYqmMI0YQSjXmn9t2tAfPOFo1ruBdUogmdaJl34hnzDjtajQ7GP+8YdLQ+hjI6VKLdeceiK2p2wLN0h5NomXeBdbQkers6EGlV0rqjsxMN0d7qqG+tjmXW6mDRrFlE6+pAoifW6vg/HizujtbH8G87mnF39Ak862OoOxqmiwxKGp4p0jXC6xkdnX0M03QVVEeXk4yX4cLtaC5peGZePZtE74/FM6oD1xAPFivSujsgGi/DY3mwsGq1OvwdPbu1qoMItzrYs+roAyRaNYeIVoEmVEcTkmiIlo5mvPPOfYKbdaeqQzzrfbfpaCboji4z8CzH0LwMIVre4HEs1ZE17wgEGreQ8FWHMZ21oxFoHEPPjkai1/JgCX1HI9JyC90drf/eYd6dqgdL5jH0rzupDnd14GkI0Ui0rg79906vjmBfhmW5hg363hJ94Oxo/fcOpv3zjpEHi2vaOYZ6R+Ov0pW8wdWDRUyv1Y6+V4kO66dSbseJQiG340ShkNtxolDI7ThRKOR2nCgUcjvOH3boHYWBIAaCqI5iGnRjTTS/YC9qDLYxXoVa6BV6WaUlLJCcsEBywgLJCQskJyyQnLBAcsICyQkLJCcskJywQHLCAj4ba7e21zDEeLxd3fcabVO/5md1jQ4f3Zv+aB0vNTp89KF/DgA1Onx015OOGh0+2pqeNKvR4aOnOmaNjh5t6rIaHTx6qGvU6ODRS12rRgeP3uraNfrJ3p3kKAwDURiuhG7opgd6HoWAFDdGQGAH4qDsEBZIiSO/gMvvP8K3AOclkgNDz89DzwlN6Dih+dNxiH+GJqB5vDuKDywGoPkIfhxHJQPQnEmdOPwbgOarLCe+nDUAzc8NnPgBjYEPaMwk11JhPLmWCuNJ+L6nTSqMJ4CeCH2aIHokdDvQ2QOhW4GWzhehW4GWzkdi0GvF9CIVvf8kBb1QTJ9SWW+QEPRYMfUzqSH9nAz0bqaQbu6lTm/JQIOc8zup138i0KVCyrtSt9ckoJeK6RY6e0yiq1RMf36zh3nolWL69Z09jEMvFdMw8549TEOjnPtZg9nDMjTyAO0/e9iFbvcAXT17WIUGOWtXmtUb2IQu1Ql9gA40e8R3n+FG3cDLaKjZI7r7DFHOI/HJf/aI7T7DrTqhD3bhZo/I7jPc5geayx/svGaPyO4z3LN3pj1NBVEAfYi7VK1LjMaYNq8qIFGrKIiKcQVEUErqAm4ssliK7BikUENYCrInCn7yAz/U2zD0to/y+p52JjNv5vyEk5vb09smk/DMRdjZOXuI9Z7hHx3hIexsnD2Ees8wyTMnYWf97CHSe4a0guMMi397CPSeIS3Pp7VskXt2Z9HivGdoCDval9Fsnz2Eec+Q37CzdvYQ5T3DKlqeTcIuq2cPQd4zrDYEB+WfvCmcPQR5z5DvsLNy9hDjPcNkzzyGnYWzhxDvGfIfdimcEvUPNB6dDudyNDq4xBS9oSfB0WXUhDwRRW/w9JO35bOHgKLX0A1vl1Gzs4dwotf1JHi7jJqdPQQTzcN/Rv+Jo7pQ/PJSwqVRJeekLhRej5cSvrwcjR4HDuoisfrbQ0+071CuRov9u3WRWP3poSnad+K4Roe9u3SRWAPPFEUDR/ZpNNijC8U6WKYqGjh8jLiROTc89EUDbg2QOzdYiAYg8yTPDUaiIfMkzw1WoiHz5M4NZqIh86TODXaiIfNkzg2GoiHzJM4NFqIRt7y5wUQ04pI2N1iJxsyTNDeYicbMkzM32InGzJMyNxiKxsyTMTdYisbMkzA3WIpG3PLlhplo+O/rk4JvJQ8rbz64XnznxsUrty5ce/fp8qX7Xwvzy99ebay4+6i66nXtQt1Q65fnz2oyi0Zc0uWGmeh7pZuix0H0UyK6qAhEPy7Mn/YnRNfXDX20LBozT7LcMBUNE11GJhpEtyQmGkSXo+gFW6Ix8+TKDXPRONHFONFJq+M2mWg7qwMzT6rcyLQ6yow7eku0399Y8SY+0fVkdfywKhozT6bcyDjRBSUvUDTuaPwwtD/RmHkS5YaV6hhPVx1+XB12dzTilic3rFRHJVbH9y3R0zDRn7cmutXmRCMuaXIj8+owTHTRtolesLejjZknSW7Yrg7jF5Za2zvamHly5EZG0VgdLTjR2fgwxMyTIjdMPwxL46sjdUfjN8P//jDEzJMhN1gdlcwzT4Lc4EE0ZJ7zc4MP0T6X43ODE9GQeQ7PDV5EQ+Y5Oze4EQ2Z5+jc4Ec0ZJ6Tc4Mj0ZB5Ds4NnkRj5tnCIxJeSmg2UaKVaCXaIxLEixJtQIlWopVoJZoHiBcl2oASrUQr0Uo0DxAvSrQBJVqJVqKVaB4gXpRoA0q0Eq1EK9E8QLw4S/R5wgcgGAyGQqGBgbGxsf7+/o6Ojvb29mj0JdDd3R2JjIyMtLVNTU2Fw+G+vsnJydmVleHh4ebm5t7e90ATsLwcm5ubm5lpaGjo6up6BQQCgc7Ozp6excXF0dH5+YmJwcHBGp8SDZ6BFNFR4jkCnoG46D4ARM8mRPduil5ajsVi4Hm7aDA9iqJr5BYdTDPRUSBpoono8KZnGGkU3QQsxU2nTHQgSbSaaKPogTSrI5IQHTaZ6J1XB+wONdFoOrR9R5OJxtVBTBt2tOXVMaEm+m87drTSQAxEYfgdBS14Z29aKYpUpSBbEYqwVmTtPrHJOpI2szG52Kyx/ecRPoaTOQlv9O1BdIiz22gHbaUjG7058Y2OXR1r7+pYWue27YkOMjoWHeIs0HN9dbjH0GW0fgw7Z73RnHfiHMzoC++8u1HQ1tltNOddakaLdHyj28DVwUZHoRfpd7Ta6Ngd3XB1qGYYuDrE2RUWldG7Hc0wdaMFOn5Hb/syWp13XB0JFdxldCA6dAUPFpaGZuii45cKrqHljk4tLA3N0EnvR4fc0e4t9JqhvqN7o+OMv46CR1yA9gZooIEGuoQRF6C9ARpooE8P+vvLf/HwfD+f2bK9fjI/zsvXdjW1JeTzrTbVY2JKx11VbR4DRQPoROhzDb1d2WJ9Zb6Xa4FugM4EPe02+v3yB/oD6KGgZ2qj96AroDNHBxk90kaT0cNv9MtBRnfQNdEx5HmnoeW8IzoGhdbR0UpGS3RcEx0ZH0MHPWGjcz6G3NEjFZZuo+sa6OzNkAqeLTo47/4kOsjoMaCNMxWcj3+ggf5HIy5AewM00EADXcKIC9DeAA000ECXMOICtDdAAw000CWMuADtDdBAAw10CSMuQHsDNNBAA13CiAvQ3hwt9BeZfObQe9dnUAAAAABJRU5ErkJggg=="},4998:function(t,e,a){},"49de":function(t,e,a){"use strict";var r=a("e15a"),s=a.n(r);s.a},"4ad0":function(t,e,a){"use strict";var r=a("d6c4"),s=a.n(r);s.a},"4d18":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1ZDFiOTQyYS0zZWUyLTkxNGQtOTBiYS1iZTVkYzNjOTU1OTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzY2QzI2NEY2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzY2QzI2NEU2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjEwODNhYzItNzY4Yy02MjRkLWEyYWMtYTFiMTdmOTZhZmZhIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6NzRmMzZhYTgtODFhOC04ZTQ5LWExN2UtMDI2MDYwMWE2ZGMwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+5sw1KwAAAedJREFUeNpi/P//P8NQAkwMQwyMOnjUwWiAhRLNszc9ROayAXEGEEcCsQ5U7AoQLwfiGUD8C6Yw1U9+YByMBKSBeAsQG6CJW0BxIhD7APHTwZAk2JAcexuIQ4BYAIpDoGIgua1AzD4YHJwOddBNIDYD4rVA/BGK10LFQHL6QJxGqWWM2CoOtLRJCByHRnswEK/DoSYI6vgTQGxJrMHY0joTnmieCMTvgPg/AWwB1bMWj5q1SGmakHnvoHazkZLpuoA4b4BKLkGo3d+BuIJYB8dCads1Z8WO0NO1IcavbIDUYVCKwOZgXElCCERAHesJxM+IiEpKMcgOT6QAEiK3lJgLxJJ0CFxJqF0UF2uSdEwRktRw8GjjZ9TBQ715yThkHAwsxDHEgOUkA6l6BkOSOIyl4D88KJIEjhC1wSVGKAaIqJqpEsLoIYoLUFI1Hx5qpQQjtUoJcKsNS0gOSInCQmqagqbRI1jS8VF6lBLk9pptiVVI7WKQhdq5GE+mRY+RI6R4nNJijVRAdDFIq2KNVExMMTharFECqFYMstAok9GsGGShU3TbUssgXA5+B+1m20BDh2aNGSzAGskNRGe6xVQqHcjBsACaQ0oIl0EzRCx06Iie4D00wGqx5tLRaa9RB486mL4AIMAA17Dgy9SYTKQAAAAASUVORK5CYII="},"4d7d":function(t,e,a){},"4e91":function(t,e,a){},5236:function(t,e,a){"use strict";var r=a("72f1"),s=a.n(r);s.a},"559f":function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app_index__footer"})},s=[],n={data:function(){return{thisYear:(new Date).getFullYear()}}},i=n,o=(a("e73b"),a("2877")),l=Object(o["a"])(i,r,s,!1,null,null,null);e["a"]=l.exports},5664:function(t,e,a){},"5d02":function(t,e,a){},"5da8":function(t,e,a){"use strict";var r=a("2435"),s=a.n(r);s.a},"5e39":function(t,e,a){"use strict";var r=a("f263"),s=a.n(r);s.a},"65f9":function(t,e,a){"use strict";var r=a("346f"),s=a.n(r);s.a},6609:function(t,e,a){},6663:function(t,e,a){},"67ac":function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-tabs",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:t.$t("index.rightView.tab.averageDuration"),name:"first"}},[a("homes")],1),a("el-tab-pane",{attrs:{label:t.$t("index.rightView.tab.trackingNumber"),name:"second"}},[a("times")],1)],1)},s=[],n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"home"},[a("let-form",{ref:"form",staticStyle:{"font-size":"16px"},attrs:{inline:!0}},[a("let-form-item",{attrs:{label:t.$t("callChain.date")}},[a("let-date-picker",{staticStyle:{width:"200px"},attrs:{theme:"primary",size:"small"},model:{value:t.date1,callback:function(e){t.date1=e},expression:"date1"}})],1),a("let-form-item",{attrs:{label:t.$t("callChain.method")}},[a("let-select",{attrs:{size:"small",placeholder:t.$t("callChain.selectMethod"),clearable:""},model:{value:t.funcName,callback:function(e){t.funcName=e},expression:"funcName"}},t._l(t.funcNames,(function(t,e){return a("let-option",{key:e,attrs:{label:t,value:t}})})),1)],1),a("let-form-item",[a("let-button",{ref:"myButton",staticStyle:{"margin-left":"10px"},attrs:{theme:"primary",size:"mini"},on:{click:t.sub}},[t._v(" "+t._s(t.$t("callChain.sub"))+" ")])],1)],1),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.svgLoading,expression:"svgLoading"}],staticStyle:{height:"600px"}},[a("vue-scroll",{staticStyle:{width:"100%",height:"100%"},attrs:{ops:t.ops}},t._l(t.nodeinfos,(function(e,r){return a("div",{key:r},[a("div",{class:"svg"+r,staticStyle:{float:"left",width:"100%"}},[a("svg",{attrs:{id:t.svgId+"-"+r,width:"100%",height:"100%"}},[a("g"),a("rect")]),a("hr")]),a("div",{staticClass:"exportModal",attrs:{id:"exportModal-"+t.svgId+"-"+r}},[a("let-modal",{attrs:{title:"鐢樼壒鍥�",width:"80%",footShow:!1,closeOnClickBackdrop:!0},on:{close:t.closeModel},model:{value:t.exportModal,callback:function(e){t.exportModal=e},expression:"exportModal"}},[a("div",{staticClass:"container",staticStyle:{width:"1400%",height:"500px"},attrs:{id:"container-"+t.svgId+"-"+r}})])],1)])})),0)],1)],1)},i=[],o=(a("99af"),a("4160"),a("c975"),a("a15b"),a("a434"),a("b0c0"),a("b680"),a("4d63"),a("ac1f"),a("5377"),a("25f0"),a("5319"),a("1276"),a("4c53"),a("159b"),a("96cf"),a("1da1")),l=a("b85c"),c=a("1226"),u=a.n(c),d=a("6e58"),m=a("6ace"),f=a("381a"),p=a.n(f),h={components:{},data:function(){var t="/k8s.html"==location.pathname;return{svgLoading:!1,k8s:t,exportModal:!1,changenum:0,surenum:"",svgId:"svg-"+p()(10),funcName:"",funcNames:[],date1:"",today:"",dateTime:"",flags:!1,options:[],resdata:[],restdata:[],value:"",serverArrs:[],datalist:[],dataLists:[],dataarr:[],traceIds:[],nodeinfos:[],edges:[],funcIds:[],begin:"",value1:"",loading:!1,flag2:!1,ops:{vuescroll:{},scrollPanel:{},rail:{keepShow:!0},bar:{hoverStyle:!0,onlyShowBarOnScroll:!1,background:"#9096A3","overflow-x":"hidden"}}}},mounted:function(){var t=new Date,e=t.getMonth()+1,a=t.getDate();e>=1&&e<=9&&(e="0"+e),a>=1&&a<=9&&(a="0"+a),this.date1=t.getFullYear()+"-"+e+"-"+a,this.dateTime=["00:00:00","23:59:59"],this.value=this.$store.state.name.name.application+"."+this.$store.state.name.name.server_name,this.sub()},created:function(){},watch:{changenum:function(t){this.exportModal=!0;var e,a=document.getElementsByClassName("exportModal"),r=Object(l["a"])(a);try{for(r.s();!(e=r.n()).done;){var s=e.value;s.style&&(s.style.display="none")}}catch(o){r.e(o)}finally{r.f()}var n="exportModal-".concat(this.svgId,"-").concat(this.surenum),i=document.getElementById(n);i.style.display="block"}},methods:{sub:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function e(){var a,r,s,n,i,o,l,c,u;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,t.svgLoading=!0,a=new RegExp("-","g"),t.today=t.date1.replace(a,""),t.flags=!0,t.flag2=!0,t.funcName){e.next=11;break}return e.next=9,t.$ajax.getJSON("/server/api/funcList",{id:t.value,nowDate:t.today,k8s:t.k8s});case 9:r=e.sent,t.funcNames=r.funcList;case 11:if(s={},t.funcName){e.next=18;break}return e.next=15,t.$ajax.getJSON("/server/api/getAverage",{label:t.value,nowDate:t.today,k8s:t.k8s});case 15:s=e.sent,e.next=21;break;case 18:return e.next=20,t.$ajax.getJSON("/server/api/getAverageByFuncName",{label:t.funcName,nowDate:t.today,k8s:t.k8s});case 20:s=e.sent;case 21:if(!s.error&&!s.err_msg){e.next=25;break}return t.$Notice({message:s.error||err_msg,type:"error"}),t.svgLoading=!1,e.abrupt("return");case 25:for(l in 0==s.rows.length&&(t.$Notice({message:t.$t("callChain.noResult"),type:"warning"}),t.svgLoading=!1),t.dataarr=[],s.rows.forEach((function(e){var a={};e.forEach((function(t,e){a[s.columns[e].name]=t})),t.dataarr.push(a)})),t.dataarr.forEach((function(t){t.vertexes=JSON.parse(t.vertexes),t.edges=JSON.parse(t.edges)})),t.resdata=[],t.restdata=[],n=[],i=[],t.traceIds=[],t.funcIds=[],o=-1,t.serverArrs=[],t.dataarr.forEach((function(e){t.serverArrs.push(e.id),t.traceIds.push(e.traceIds),t.funcIds.push(e.funcIds),o++,n[o]=[],i[o]=[],t.resdata[t.resdata.length]=e.vertexes,t.restdata[t.restdata.length]=e.edges;var a=e.vertexes,r=e.edges;a.forEach((function(t){n[o].push({id:t.vertex,label:t.vertex,time:0==t.callCount?0:(t.callTime/t.callCount).toFixed(2)})})),r.forEach((function(t){i[o].push({source:t.fromVertex,target:t.toVertex,label:0==t.callCount?0:(t.callTime/t.callCount).toFixed(2)})}))})),i.forEach((function(e,a){var r=[];e.forEach((function(t){r.push(t.target)})),e.forEach((function(e){r.indexOf(e.source)<0&&(t.begin=e.source,n[a].push({id:e.source,label:e.source}))}))})),t.edges=i,t.nodeinfos=n,t.traceIds)c=t.traceIds[l].replace("[","").replace("]","").replace(/\s/g,"").split(","),t.traceIds[l]=c;for(l in t.funcIds)u=t.funcIds[l].replace("[","").replace("]","").replace(/\s/g,"").split(","),t.funcIds[l]=u;t.becomeD3(i,n),t.svgLoading=!1,e.next=50;break;case 47:e.prev=47,e.t0=e["catch"](0),t.svgLoading=!1;case 50:case"end":return e.stop()}}),e,null,[[0,47]])})))()},becomeD3:function(t,e){var a=this;this.$nextTick((function(){var r=function(r){var s=(new u.a.graphlib.Graph).setGraph({});s.setGraph({rankdir:"LR",marginy:60}),e[r].forEach((function(t,e){t.rx=t.ry=5,s.setNode(t.id,{labelType:"html",label:t.time?'<div class="wrap"> <span class="span1" >'.concat(t.id,'</span> <p class="p1" style="height:20px" >( ').concat(t.time," ms )</p></div>"):'<div class="wrap"> <span class="span1" >'.concat(t.id,"</span> </div>"),style:"fill:#457ff5"})})),t[r].forEach((function(t){r%2==0?s.setEdge(t.source,t.target,{label:t.label+"ms",style:"fill:#fff;stroke:#333;stroke-width:1.5px;"}):s.setEdge(t.source,t.target,{label:t.label+"ms",style:"fill:#ffffff;stroke:#333;stroke-width:1.5px;"})}));var i="#".concat(a.svgId,"-").concat(r),o=d["select"](i),l=o.select("g"),c=new u.a.render;c(l,s),l.selectAll(".edgeLabel tspan").attr("dy","-1.2em");var f=document.querySelectorAll("".concat(i," .span1"));for(n in f){if(n==f.length)break;f[n].innerHTML==a.value&&(f[n].style.color="red")}var p=document.querySelector(i);p.style.height=p.getBBox().height+150,l.selectAll("g.node").on("click",(function(e,s){var n=[],o=d["select"](i);o.selectAll("rect").style("fill","#457FF5"),t[r].forEach((function(t,r){e==t.source&&a.begin!=t.target&&n.push(t)})),l.selectAll("rect").style("fill",(function(t){return t==e&&n.length>0?"#3F5AE0":"#457FF5"})),n.length>0&&(Object(m["a"])(n,t[r],0,n.length,e),a.ganTe(n,s,r))}))};for(var s in t){var n;r(s)}}))},closeModel:function(){},ganTe:function(t,e,r){var s=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:s.$nextTick((function(){var n=s,i="container-".concat(s.svgId,"-").concat(r),o=document.getElementById(i);o.style.display="block";var l=t;l.forEach((function(t){s.resdata[r].forEach((function(e){t.target==e.vertex&&(t.server_time=0==e.callCount?0:e.callTime/e.callCount)})),s.restdata[r].forEach((function(e){t.source==e.fromVertex&&t.target==e.toVertex&&(t.client_time=0==e.callCount?0:e.callTime/e.callCount)}))}));var c=[],u=[],d=[],f=[],p=[],h=[];Object(m["b"])(l,c,u,d,f,p,h);var g=new Date,v=b(g);function b(t){var e=t.toLocaleDateString().split("/");return e[1].length<2&&e.splice(1,1,"0"+e[1]),e[2].length<2&&e.splice(2,1,"0"+e[2]),e.join("-")}var _=e,w=a("313e"),y=w.init(o),$=[],k=d.length-1;for(var x in d)$.push({name:d[x],value:[k-parseInt(x),h[x],h[x]+f[x],(f[x]-p[x])/2+h[x],p[x]]});var C=[];$.forEach((function(t){C.push(t.value[2])})),C.sort((function(t,e){return e-t})),d=d.reverse();var M=d;function j(t,e){var a=e.value(0),r=e.coord([e.value(1),a]),s=e.coord([e.value(2),a]),n=.35*e.size([0,1])[1]>30?30:.35*e.size([0,1])[1],i=w.graphic.clipRectByRect({x:r[0],y:r[1],width:s[0]-r[0],height:n},{x:t.coordSys.x,y:t.coordSys.y,width:t.coordSys.width,height:t.coordSys.height}),o=null;if(""!==e.value(3)){var l,c=e.coord([e.value(3),a]),u=e.value(4),d=e.value(3),m=+w.number.parseDate(v);if(m-d<=u)l=e.coord([m,a]);else{var f=d+u;l=e.coord([f,a])}o=w.graphic.clipRectByRect({x:c[0],y:c[1],width:l[0]-c[0],height:n},{x:t.coordSys.x,y:t.coordSys.y,width:t.coordSys.width,height:t.coordSys.height})}return null==o?i&&{type:"group",children:[{type:"rect",shape:i,style:e.style({fill:"#AACCF9"})}]}:i&&o&&{type:"group",children:[{type:"rect",shape:i,style:e.style({fill:"#a1a8f5"})},{type:"rect",shape:o,style:e.style({fill:"#9c9c9c"})}]}}y.setOption({tooltip:{formatter:function(t){return t.name+"<br/>"+n.$t("callChain.stringBtime")+t.value[1].toFixed(2)+"ms<br/>"+n.$t("callChain.stringEtime")+t.value[2].toFixed(2)+"ms<br/>"+n.$t("callChain.clientTime")+(t.value[2].toFixed(2)-t.value[1].toFixed(2))+"ms<br/>"+n.$t("callChain.serverTime")+t.value[4].toFixed(2)+"ms"}},title:{text:s.serverArrs[r]+"锛�"+_,left:"center"},xAxis:{type:"value",min:0,max:C[0].toFixed(2),axisLabel:{interval:0},splitLine:{show:!0}},yAxis:{data:M,axisTick:{alignWithLabel:!0},splitLine:{show:!0}},legend:{left:"70%",top:20,data:["client","server"]},grid:{left:200},series:[{type:"custom",renderItem:j,name:"client",itemStyle:{color:"#a1a8f5"},encode:{x:[1,2],y:0},data:$},{type:"custom",name:"server",itemStyle:{color:"#9c9c9c"}}]}),s.surenum=r,s.changenum+=1}));case 1:case"end":return n.stop()}}),n)})))()}}},g=h,v=(a("7253"),a("2877")),b=Object(v["a"])(g,n,i,!1,null,null,null),_=b.exports,w=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"all"},[a("div",[a("let-form",{attrs:{size:"small",inline:""}},[a("let-form-item",{attrs:{label:t.$t("callChain.date")}},[a("let-date-picker",{staticStyle:{width:"200px"},model:{value:t.today,callback:function(e){t.today=e},expression:"today"}})],1),a("let-form-item",{attrs:{label:t.$t("callChain.btime")}},[a("let-time-picker",{staticStyle:{width:"200px"},model:{value:t.dateTime[0],callback:function(e){t.$set(t.dateTime,0,e)},expression:"dateTime[0]"}})],1),a("let-form-item",{attrs:{label:t.$t("callChain.etime")}},[a("let-time-picker",{staticStyle:{width:"200px"},model:{value:t.dateTime[1],callback:function(e){t.$set(t.dateTime,1,e)},expression:"dateTime[1]"}})],1),a("let-form-item",[a("let-button",{staticStyle:{"margin-left":"10px","margin-bottom":"2px"},attrs:{theme:"primary"},on:{click:t.sub}},[t._v(" "+t._s(t.$t("callChain.sub"))+" ")])],1)],1)],1),a("div",{staticStyle:{height:"500px"}},[a("div",{staticClass:"block"},[a("let-pagination",{attrs:{total:t.total%t.fsize?parseInt(t.total/t.fsize)+1:t.total/t.fsize,page:t.currentPage,size:"small","no-border":"","show-sums":"",sum:t.total,jump:""},on:{change:t.handleCurrentChange}})],1),a("vue-scroll",{staticStyle:{width:"100%",height:"100%","margin-top":"5px"},attrs:{ops:t.ops}},[a("let-table",{ref:"detailsTable",staticStyle:{width:"100%",height:"580px"},attrs:{data:t.dataarrs,stripe:!0,"empty-msg":t.$t("callChain.noResult"),border:"true",sortable:!0}},[a("let-table-column",{attrs:{prop:"name",title:"ID"}}),a("let-table-column",{attrs:{prop:"timeStamp",title:t.$t("callChain.btime"),width:"15%"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.startTime))]}}])}),a("let-table-column",{attrs:{prop:"timeFrame",title:t.$t("callChain.etime"),width:"15%"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.endTime))]}}])}),a("let-table-column",{attrs:{prop:"timeFrame",title:t.$t("callChain.allTime"),width:"10%"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.callTime)+"ms")]}}])}),a("let-table-column",{attrs:{align:"center",title:t.$t("callChain.operation"),width:"10%"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.handleEdit(e.row)}}},[t._v(t._s(t.$t("callChain.detail")))])]}}])})],1)],1),a("let-modal",{staticStyle:{height:"1200px",top:"-120px"},attrs:{width:"90%",footShow:!1},model:{value:t.dialogVisible1s,callback:function(e){t.dialogVisible1s=e},expression:"dialogVisible1s"}},[a("div",{staticStyle:{height:"800px"}},[a("vue-scroll",{staticStyle:{width:"100%",height:"100%"},attrs:{ops:t.ops}},[a("gantt-chart",{attrs:{nodeinfos:t.nodeinfos,serverArrs:t.serverArrs,edges:t.edges,traceIds:t.traceIds,funcIds:t.funcIds,values:t.value,dialogVisible1s:t.dialogVisible1s}})],1)],1)])],1),a("opendiv",{attrs:{flag:t.flag,res:t.res,rest:t.rest,title:t.title}})],1)},y=[],$=(a("fb6a"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"svgs"}},t._l(t.nodeinfos,(function(t,e){return a("div",{key:e},[a("div",{style:e%2==1?"margin-top: 20px; padding: 10px;  background-color: #EBF2FF":"margin-top: 20px; padding: 10px;"},[a("div",{class:"svgs"+e,staticStyle:{float:"left",width:"100%"}},[a("svg",{style:e%2==1?"background-color: #EBF2FF;":"background-color: #ffffff;",attrs:{width:"100%",height:"600"}},[a("g"),a("rect")]),a("div",{staticClass:"containers",staticStyle:{width:"85%",height:"500px",display:"none"},attrs:{id:"containers"+e}})])])])})),0)}),k=[],x=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:t.id}},[a("let-modal",{staticClass:"pop_tit",staticStyle:{"margin-top":"-100px"},attrs:{title:t.title,width:"90%",footShow:!1},on:{close:t.closeDialog},model:{value:t.dialogVisible,callback:function(e){t.dialogVisible=e},expression:"dialogVisible"}},[a("div",t._l(this.datalist.rows,(function(e,r){return a("div",{key:r,style:r%2==1?"background-color: #EBF2FF;":"background-color: #ffffff;"},[a("div",{class:"svgF"+r},[a("svg",{attrs:{id:"svg-"+t.id+"-"+r,width:"100%"}},[a("g"),a("rect")]),a("div",{staticClass:"wcontainer",staticStyle:{width:"85%",height:"500px",display:"none"},attrs:{id:"funccontainer-"+t.id+"-"+r}})])])})),0)])],1)},C=[],M=a("ee72"),j=M["a"],S=(a("8b05"),Object(v["a"])(j,x,C,!1,null,null,null)),N=S.exports;a("e1d2");var O={name:"svgs",components:{opendiv:N},props:["nodeinfos","serverArrs","funcIds","traceIds","values","dialogVisible1s"],data:function(){return{obj:[],value:[],value1:[],value2:[],res:"",rest:"",flag:!1,title:"",funcIdss:[],traceIdss:[],arr1:[],flags:[],ops:{vuescroll:{},scrollPanel:{},rail:{keepShow:!0},bar:{hoverStyle:!0,onlyShowBarOnScroll:!1,background:"#9096A3","overflow-x":"hidden"}}}},created:function(){},mounted:function(){},watch:{funcIds:function(t){var e=this;this.value=[],this.flags=[],t.forEach((function(t){e.flags.push(!0),e.value.push("")}))},nodeinfos:function(t){this.value=[],this.value1=[]},traceIds:function(t){var e=this;this.value=[],this.flags=[],t.forEach((function(t){e.flags.push(!0),e.value1.push("")}))}},computed:{},methods:{}},D=O,F=(a("1df8"),Object(v["a"])(D,$,k,!1,null,"f3fed824",null)),I=F.exports,A=a("c1df"),L=a.n(A),R={components:{ganttChart:I,opendiv:N},data:function(){var t="/k8s.html"==location.pathname;return{dialogVisible1s:!1,form:{},flag:!1,k8s:t,res:"",rest:"",title:"",flags:!1,vname:"",options:[],resdata:[],restdata:[],value:"",serverArrs:[],datalist:[],dataLists:[],dataarr:[],traceIds:[],nodeinfos:[],edges:[],funcIds:[],begin:"",value1:"",today:"",dateTime:["",""],fsize:10,currentPage:1,total:0,dataarrs:[],ops:{vuescroll:{},scrollPanel:{},rail:{keepShow:!0},bar:{hoverStyle:!0,onlyShowBarOnScroll:!1,background:"#F5F5F5",opacity:.5,"overflow-x":"hidden"}}}},mounted:function(){var t=(new Date).setHours(0,0,0,0),e=(new Date).setHours(23,59,59,999);this.value1=[t,e];var a=new Date,r=a.getMonth()+1;r>=1&&r<=9&&(r="0"+r);var s=a.getDate();s>=1&&s<=9&&(s="0"+s),this.today=a.getFullYear()+"-"+r+"-"+s,this.dateTime=["00:00","23:59"],this.vname=this.$store.state.name.name.application+"."+this.$store.state.name.name.server_name,this.sub()},methods:{handleCurrentChange:function(t){this.currentPage=t;var e=(this.currentPage-1)*this.fsize,a=e+this.fsize;this.dataarrs=this.dataarr.slice(e,a)},fortime:function(t){var e=new Date(t);t+="";var a=t.substring(t.length-3);return"".concat(e.getFullYear(),"-").concat(e.getMonth()+1,"-").concat(e.getDate()," ").concat(e.getHours(),":").concat(e.getMinutes(),":").concat(e.getSeconds(),".").concat(a)},sub:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function e(){var a,r,s,n,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.form.label=t.vname,t.dateTime[0]){e.next=4;break}return t.$Notice({message:t.$t("callChain.sbtime"),type:"warning"}),e.abrupt("return");case 4:if(t.dateTime[1]){e.next=7;break}return t.$Notice({message:t.$t("callChain.setime"),type:"warning"}),e.abrupt("return");case 7:if(t.form.stime="".concat(t.today," ").concat(t.dateTime[0]),t.form.etime="".concat(t.today," ").concat(t.dateTime[1]),t.form.stime=new Date(t.form.stime).getTime(),t.form.etime=new Date(t.form.etime).getTime(),t.form.nowDate=t.today,t.form.k8s=t.k8s,""!=t.form.nowDate){e.next=16;break}return t.$Notice({message:t.$t("callChain.sdata"),type:"error"}),e.abrupt("return");case 16:return a=[],e.prev=17,t.$refs.detailsTable.$loading.show(),e.next=21,t.$ajax.getJSON("/server/api/detailByStartEndTime",t.form);case 21:a=e.sent,t.$refs.detailsTable.$loading.hide(),e.next=28;break;case 25:e.prev=25,e.t0=e["catch"](17),t.$refs.detailsTable.$loading.hide();case 28:t.options=[],t.flags=!0,t.dataarr=[],r=Object(l["a"])(a),e.prev=32,r.s();case 34:if((s=r.n()).done){e.next=46;break}if(n=s.value,0!=n.endTime&&0!=n.startTime){e.next=38;break}return e.abrupt("continue",44);case 38:i={},i.name=n.name,i.callTime=n.endTime-n.startTime,i.startTime=L()(n.startTime).format("YYYY-MM-DD HH:mm:ss"),i.endTime=L()(n.endTime).format("YYYY-MM-DD HH:mm:ss"),t.dataarr.push(i);case 44:e.next=34;break;case 46:e.next=51;break;case 48:e.prev=48,e.t1=e["catch"](32),r.e(e.t1);case 51:return e.prev=51,r.f(),e.finish(51);case 54:t.total=t.dataarr.length,t.handleCurrentChange(1);case 56:case"end":return e.stop()}}),e,null,[[17,25],[32,48,51,54]])})))()},handleEdit:function(t){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function a(){var r,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r=new RegExp("-","g"),e.form.nowDate.replace(r,""),a.next=4,e.$ajax.getJSON("/server/api/detailByTraceId",{id:t.name,nowDate:e.form.nowDate.replace(r,""),k8s:e.k8s});case 4:return s=a.sent,e.title="TraceId锛�"+t.name,e.res=s,e.flag=!0,a.abrupt("return");case 9:case"end":return a.stop()}}),a)})))()},becomeD3:function(t,e){var a=this;this.$nextTick((function(){var r=function(r){var s=(new u.a.graphlib.Graph).setGraph({});s.setGraph({rankdir:"LR",marginy:60}),e[r].forEach((function(t,e){t.rx=t.ry=5,s.setNode(t.id,{labelType:"html",label:t.time?'<div class="wrap"> <span class="span1">'.concat(t.id,'</span><p class="p1" style="height:20px" >( ').concat(t.time," ms )</p></div>"):'<div class="wrap"><span class="span1">'.concat(t.id,"</span ></div>"),style:"fill:#457ff5"})})),t[r].forEach((function(t){r%2==0?s.setEdge(t.source,t.target,{label:t.label+"ms",style:"fill:#fff;stroke:#333;stroke-width:1.5px;"}):s.setEdge(t.source,t.target,{label:t.label+"ms",style:"fill:#EBF2FF;stroke:#333;stroke-width:1.5px;"})}));var i=d["select"](".svgs".concat(r," svg")),o=i.select("g"),l=new u.a.render;l(o,s),document.getElementsByClassName("svg".concat(r)),o.selectAll(".edgeLabel tspan").attr("dy","-1.2em");var c=document.querySelectorAll(".svgs".concat(r," svg .span1"));for(n in c)if(n==c.length)break;o.selectAll("g.node").on("click",(function(e,s,n){var i=[],l=d["select"]("#svgs");if(l.selectAll(".all rect").style("fill","white"),t[r].forEach((function(t,r){e==t.source&&a.begin!=t.target&&i.push(t)})),o.selectAll("rect").style("fill",(function(t,a){return t==e&&i.length>0?"#3F5AE0":"#457FF5"})),i.length>0){Object(m["a"])(i,t[r],0,i.length,e);var c=[],u=-1;for(var f in i)i[f-1]&&i[f].source==i[f-1].source||(u+=1,c[u]=[]),c[u].push(i[f]);c.forEach((function(t){t.sort((function(t,e){return t.startTimeStamp-e.startTimeStamp}))}));var p=[];c.forEach((function(t){t.forEach((function(t){p.push(t)}))})),a.ganTe(p,e,r)}}))};for(var s in t){var n;r(s)}}))},ganTe:function(t,e,r){var s=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){var i,o,l,c,u,d,f,p,h,g,v,b,_,w,y,$,k,x,C,M,j,S,N,O,D;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:for(o in O=function(t,e){var a=e.value(0),r=e.coord([e.value(1),a]),s=e.coord([e.value(2),a]),n=.35*e.size([0,1])[1]>30?30:.35*e.size([0,1])[1],i=$.graphic.clipRectByRect({x:r[0],y:r[1],width:s[0]-r[0],height:n},{x:t.coordSys.x,y:t.coordSys.y,width:t.coordSys.width,height:t.coordSys.height}),o=null;if(""!==e.value(3)){var l,c=e.coord([e.value(3),a]),u=e.value(4),d=e.value(3),m=($.number.parseDate(_),d+u);l=e.coord([m,a]),o=$.graphic.clipRectByRect({x:c[0],y:c[1],width:l[0]-c[0],height:n},{x:t.coordSys.x,y:t.coordSys.y,width:t.coordSys.width,height:t.coordSys.height})}return null==o?i&&{type:"group",children:[{type:"rect",shape:i,style:e.style({fill:"#AACCF9"})}]}:i&&o&&{type:"group",children:[{type:"rect",shape:i,style:e.style({fill:"#a1a8f5"})},{type:"rect",shape:o,style:e.style({fill:"#9c9c9c"})}]}},w=function(t){var e=t.toLocaleDateString().split("/");return e[1].length<2&&e.splice(1,1,"0"+e[1]),e[2].length<2&&e.splice(2,1,"0"+e[2]),e.join("-")},i=document.getElementsByClassName("containers"),i)i[o].style&&(i[o].style.display="none");for(M in l=document.getElementById("containers".concat(r)),l.style.display="block",c=t,u=[],c.forEach((function(t){u.push(t.startTimeStamp),s.resdata[r].forEach((function(e){t.target==e.vertex&&(t.server_time=e.callTime/e.callCount)})),s.restdata[r].forEach((function(e){t.source==e.fromVertex&&t.target==e.toVertex&&(t.client_time=e.callTime/e.callCount)}))})),d=[],f=[],p=[],h=[],g=[],v=[],Object(m["c"])(c,d,f,p,h,g,v),b=new Date,_=w(b),y=e,$=a("313e"),k=$.init(l),x=[],C=p.length-1,p)x.push({name:p[M],value:[C-parseInt(M),v[M],v[M]+h[M],(h[M]-g[M])/2+v[M],g[M]]});j=[],S=[],x.forEach((function(t){j.push(t.value[2]),S.push(t.value[1])})),j.sort((function(t,e){return e-t})),S.sort((function(t,e){return t-e})),p=p.reverse(),N=p,D=s,k.setOption({tooltip:{formatter:function(t){return t.name+"<br/>"+D.$t("callChain.stringBtime")+D.fortime(t.value[1])+"ms<br/>"+D.$t("callChain.stringEtime")+D.fortime(t.value[2])+"ms<br/>"+D.$t("callChain.clientTime")+(t.value[2].toFixed(2)-t.value[1].toFixed(2))+"ms<br/>"+D.$t("callChain.serverTime")+t.value[4].toFixed(2)+"ms"}},title:{text:s.serverArrs[r]+"锛�"+y,left:"center"},xAxis:{type:"value",min:S[0],max:j[0],axisLabel:{interval:0,formatter:function(t){return D.fortime(t)}},splitLine:{show:!0}},yAxis:{data:N,axisTick:{alignWithLabel:!0},splitLine:{show:!0}},legend:{left:"70%",top:20,data:["client","server"]},grid:{left:260},series:[{type:"custom",renderItem:O,name:"client",itemStyle:{color:"#a1a8f5"},encode:{x:[1,2],y:0},data:x},{type:"custom",name:"server",itemStyle:{color:"#9c9c9c"}}]});case 33:case"end":return n.stop()}}),n)})))()},getdatas:function(){return Object(o["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})))()}}},T=R,E=(a("4290"),Object(v["a"])(T,w,y,!1,null,null,null)),z=E.exports,B={data:function(){return{activeName:"first"}},components:{homes:_,times:z}},G=B,q=(a("65f9"),Object(v["a"])(G,r,s,!1,null,null,null));e["a"]=q.exports},"6ace":function(t,e,a){"use strict";a.d(e,"b",(function(){return r})),a.d(e,"c",(function(){return s})),a.d(e,"a",(function(){return n}));a("99af"),a("c740"),a("4160"),a("c975"),a("d81d"),a("fb6a"),a("a434"),a("b0c0"),a("d3b7"),a("4d63"),a("ac1f"),a("25f0"),a("6062"),a("3ca3"),a("466d"),a("5319"),a("1276"),a("159b"),a("ddb0"),a("53ca"),a("2909");var r=function(t,e,a,r,s,n,i,o,l,c,u,d){var m=0;t.forEach((function(t){t.btime=m,e.length>=1&&t.source==a[a.length-1]?t.btime=i[i.length-1]+(s[s.length-1]-n[n.length-1])/2:a.length>=1&&e.forEach((function(e,a){e==t.source&&(t.btime=i[a]+s[a])})),i.push(t.btime),e.push(t.source),a.push(t.target),t.source.length>t.target.length?r.push(t.source+"\n璋冪敤"+t.target):r.push(t.source+"璋冪敤\n"+t.target),s.push(t.client_time),n.push(t.server_time),o&&o.push(t.ret),l&&l.push(t.csData),c&&c.push(t.csData),u&&u.push(t.csData),d&&d.push(t.csData)}))},s=function(t,e,a,r,s,n,i){t.forEach((function(t){t.btime=t.startTimeStamp,i.push(t.btime),e.push(t.source),a.push(t.target),t.source.length>t.target.length?r.push(t.source+"\n璋冪敤"+t.target):r.push(t.source+"璋冪敤\n"+t.target),s.push(t.client_time),n.push(t.server_time)}))},n=function t(e,a,r,s,n){if(s>1)for(var i=function(r){var i=!0;a.forEach((function(o,l){e[r].target==o.source&&(i?(e.push(e[r]),e.push(o)):e.push(o),i=!1,t(e,a,e.length-1,1,n)),l==a.length-1&&1==i&&e.push(e[r]),r==s-1&&l==a.length-1&&e.splice(0,s)}))},o=0;o<s;o++)i(o);else a.forEach((function(s){e[r].target==s.source&&e[r].target!=n&&(e.push(s),t(e,a,e.length-1,1,n))}))}},7253:function(t,e,a){"use strict";var r=a("dd29"),s=a.n(r);s.a},"72f1":function(t,e,a){},7720:function(t,e,a){},"78e2":function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("section",{staticClass:"batch-publish",staticStyle:{display:"inline"}},[a("let-button",{attrs:{size:t.size,theme:"primary",disabled:t.disabled},on:{click:t.init}},[t._v(t._s(t.$t("dcache.batch."+t.type)))]),a("let-modal",{attrs:{closeOnClickBackdrop:!0,width:"1000px",title:t.$t("dcache.batch."+t.type)},on:{"on-confirm":t.confirm},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[a("let-form",[a("let-form-item",{attrs:{label:t.$t("service.serverName")}},t._l(t.checkedServers,(function(e){return a("p",[t._v(t._s(e.application+"."+e.server_name+"_"+e.node_name))])})),0)],1),a("let-form",{staticClass:"elegant-form"},[a("div",{staticClass:"elegant-switch"},[a("let-switch",{attrs:{size:"large"},on:{change:t.changeElegantStatus},model:{value:t.elegantChecked,callback:function(e){t.elegantChecked=e},expression:"elegantChecked"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v(t._s(t.$t("dcache.batch.elegantTask")))]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v(t._s(t.$t("dcache.batch.commonTask")))])]),t._v(" "),t.elegantChecked?a("div",{staticClass:"elegant-num"},[a("span",{staticClass:"elegant-label"},[t._v(t._s(t.$t("dcache.batch.elegantEachNum")))]),a("let-input-number",{staticClass:"elegant-box",attrs:{max:20,min:1,step:1,size:"small"},model:{value:t.eachNum,callback:function(e){t.eachNum=e},expression:"eachNum"}})],1):t._e()],1)])],1),a("let-modal",{attrs:{footShow:!1,closeOnClickBackdrop:!0,width:"1000px",title:t.$t("dcache.batch."+t.type)},model:{value:t.releaseIng,callback:function(e){t.releaseIng=e},expression:"releaseIng"}},[t.releaseId&&t.releaseIng?a("tars-release-progress",{attrs:{"release-id":t.releaseId},on:{"close-fn":this.getServerList}}):t._e()],1)],1)},s=[],n=(a("99af"),a("4160"),a("d3b7"),a("25f0"),a("159b"),a("96cf"),a("1da1")),i=a("393d"),o=a("2d43"),l=a("e51e"),c={components:{tarsReleaseProgress:o["a"]},mixins:[l["a"]],props:{size:String,disabled:Boolean,expandServers:{required:!1,type:Array},checkedServers:{required:!1,type:Array},type:String},data:function(){return{versionList:[],releaseId:null,show:!1,publishModal:{moduleName:"DCacheServerGroup",application:"DCache",totalPatchPage:0,pageSize:5,currPage:1},releaseIng:!1,elegantChecked:!1,eachNum:0}},methods:{init:function(){this.show=!0,this.releaseId=null,this.releaseIng=!1},confirm:function(){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function e(){var a,r,s,n,o,l;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=[],r=t.checkedServers,r.forEach((function(e){a.push({server_id:e.id.toString(),command:t.type})})),e.prev=3,s=t.elegantChecked,n=t.eachNum,o=!1,e.next=9,Object(i["a"])({serial:o,elegant:s,eachnum:n,items:a});case 9:l=e.sent,t.releaseIng=!0,t.releaseId=l,e.next=17;break;case 14:e.prev=14,e.t0=e["catch"](3),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.t0.message||e.t0.err_msg));case 17:case"end":return e.stop()}}),e,null,[[3,14]])})))()},getServerList:function(){this.show=!1,this.$emit("success-fn")},changeElegantStatus:function(t){this.checked=t,t&&(this.eachNum=1)}}},u=c,d=(a("4ad0"),a("2877")),m=Object(d["a"])(u,r,s,!1,null,null,null);e["a"]=m.exports},"79c7":function(t,e,a){},"7ad2":function(t,e,a){"use strict";a("99af"),a("4160"),a("c975"),a("a15b"),a("13d5"),a("fb6a"),a("b64b"),a("d3b7"),a("ac1f"),a("25f0"),a("5319"),a("1276"),a("159b");var r=a("d4ec"),s=a("bee2"),n=a("53ca"),i=function(t){return"string"===typeof t},o=Array.isArray,l=function(t){return"object"===Object(n["a"])(t)&&null!==t},c=function(t){return"function"===typeof t},u=Object.assign;function d(t){return String(t).replace(/(?:[\0- "-&\+-\}\x7F-\xA8\xAA-\xAD\xAF-\u2121\u2123-\u23E8\u23F0-\u23F2\u23F4-\u23F7\u23FB-\u24C1\u24C3-\u25B5\u25B7-\u25FF\u27C0-\u2933\u2936-\u2B04\u2B08-\u2B1A\u2B1D-\u2B4F\u2B51-\u2B54\u2B56-\u302F\u3031-\u303C\u303E-\u3296\u3298\u329A-\uD7FF\uE000-\uFFFF]|[\uD800-\uD83B\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD83C[\uDC00-\uDC03\uDC05-\uDCCE\uDCD0-\uDD6F\uDD72-\uDD7D\uDD80-\uDD8D\uDD8F\uDD90\uDE52-\uDEFF]|\uD83D[\uDE50-\uDE7F\uDF00-\uDFFF]|\uD83E[\uDC00-\uDCFF\uDE00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,encodeURIComponent).replace(/ /g,"+").replace(/[!'()~*]/g,(function(t){return"%".concat(t.charCodeAt().toString(16).slice(-2).toUpperCase())}))}function m(t){if(!t)return"";var e=[];return Object.keys(t).forEach((function(a){var r=t[a];null!==r&&void 0!==r||(r=""),e.push("".concat(d(a),"=").concat(d(r)))})),e.join("&").replace(/%20/g,"+")}function f(t){var e=function t(e,a,r){return o(r)||l(r)?(Object.keys(r).forEach((function(s){t(e,"".concat(a,"[").concat(s,"]"),r[s])})),e):(e[a]=r,e)};return m(Object.keys(t).reduce((function(a,r){return e(a,r,t[r])}),{}))}var p=function(){function t(e){Object(r["a"])(this,t),this.defaults=e}return Object(s["a"])(t,[{key:"get",value:function(t){return u({},this.defaults,t)}},{key:"set",value:function(t,e){var a=this;if(t){if(i(t)){var r=t.split(".");r.reduce((function(t,a,s){return s===r.length-1&&(t[a]=e),t[a]}),this.defaults)}l(t)&&Object.keys(t).forEach((function(e){a.set(e,t[e])})),o(t)&&t.forEach((function(t){return a.set(t,e)}))}}},{key:"remove",value:function(t){var e=this;if(t){if(i(t)){var a=t.split(".");a.reduce((function(t,e,r){return r===a.length-1&&delete t[e],t[e]}),this.defaults)}o(t)&&t.forEach((function(t){return e.remove(t)}))}}}]),t}(),h=function(){function t(e){Object(r["a"])(this,t),this.handler=e}return Object(s["a"])(t,[{key:"set",value:function(t){c(t)&&(this.handler=t)}},{key:"exec",value:function(){c(this.handler)&&this.handler.apply(null,arguments)}}]),t}(),g=function(){function t(e){Object(r["a"])(this,t),this.base=e||""}return Object(s["a"])(t,[{key:"set",value:function(t){i(t)&&(this.base=t)}},{key:"get",value:function(t){return this.base+(t||"")}}]),t}(),v=function t(){var e=this;Object(r["a"])(this,t),this.ServerUrl=new g,this.Options=new p({credentials:"same-origin",timeout:5e3}),this.Headers=new p({"X-Requested-With":"XMLHttpRequest"}),this.Body=new p({}),this.StatusHandler=new h,this.ResultHandler=new h((function(){return!0})),this.parseUrl=function(t,a){var r=m(e.Body.get(a));return r&&(r=-1===t.indexOf("?")?"?".concat(r):"&".concat(r)),t+r},this.checkStatus=function(t){var a=t.status;if(a>=200&&a<300||304===a)return t;throw e.StatusHandler.exec(a,t),new Error(t.statusText)},this.parseJSON=function(t){return t.json().then(null,(function(a){return e.StatusHandler.exec(500,t),Promise.reject(a)}))},this.successCallback=function(t){return e.ResultHandler.handler(t)?t:Promise.reject(t)},this.errorCallback=function(t){return Promise.reject(t)},this.get=function(t,a){var r=e.Options.get({headers:e.Headers.get()});return fetch(e.ServerUrl.get(e.parseUrl(t,a)),r).then(e.checkStatus).then(e.parseJSON).catch(e.errorCallback)},this.getJSON=function(t,a){var r=e.Options.get({headers:e.Headers.get()});return fetch(e.ServerUrl.get(e.parseUrl(t,a)),r).then(e.checkStatus).then(e.parseJSON).then(e.successCallback).catch(e.errorCallback)},this.post=function(t,a){var r=e.Options.get({method:"POST",headers:e.Headers.get({"Content-Type":"application/x-www-form-urlencoded"}),body:f(e.Body.get(a))});return fetch(e.ServerUrl.get(t),r).then(e.checkStatus).then(e.parseJSON).then(e.successCallback).catch(e.errorCallback)},this.postForm=function(t,a){var r=e.Options.get({method:"POST",headers:e.Headers.get(),body:a}),s=e.Body.get({});return Object.keys(s).forEach((function(t){a.append(t,s[t])})),fetch(e.ServerUrl.get(t),r).then(e.checkStatus).then(e.parseJSON).then(e.successCallback).catch(e.errorCallback)},this.postJSON=function(t,a){var r=e.Options.get({method:"POST",headers:e.Headers.get({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify(e.Body.get(a))});return fetch(e.ServerUrl.get(t),r).then(e.checkStatus).then(e.parseJSON).then(e.successCallback).catch(e.errorCallback)},this.put=function(t,a){var r=e.Options.get({method:"PUT",headers:e.Headers.get({"Content-Type":"application/x-www-form-urlencoded"}),body:f(e.Body.get(a))});return fetch(e.ServerUrl.get(t),r).then(e.checkStatus).then(e.parseJSON).then(e.successCallback).catch(e.errorCallback)},this.remove=function(t,a){var r=e.Options.get({method:"DELETE",headers:e.Headers.get()});return fetch(e.ServerUrl.get(e.parseUrl(t,a)),r).then(e.checkStatus).then(e.parseJSON).then(e.successCallback).catch(e.errorCallback)},this.getPlain=function(t,a){var r=e.Options.get({method:"GET",headers:e.Headers.get()});return fetch(e.ServerUrl.get(e.parseUrl(t,a)),r).then(e.checkStatus).then(e.successCallback).catch(e.errorCallback)},this.postPlain=function(t,a){var r=e.Options.get({method:"POST",headers:e.Headers.get()});return fetch(e.ServerUrl.get(e.parseUrl(t,a)),r).then(e.checkStatus).then(e.successCallback).catch(e.errorCallback)},this.download=function(t,a){window.open(e.ServerUrl.get(e.parseUrl(t,a)))}};e["a"]=v},8266:function(t,e,a){"use strict";var r=a("79c7"),s=a.n(r);s.a},"8b05":function(t,e,a){"use strict";var r=a("9c4c"),s=a.n(r);s.a},"8b32":function(t,e,a){},"918a":function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page_server_config"},[t.configList?a("wrapper",{ref:"configListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:t.addConfig}},[t._v(t._s(t.$t("cfg.btn.add")))]),a("let-table",{attrs:{data:t.configList,title:t.$t("cfg.title.a"),"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"40px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-radio",{attrs:{label:e.row.id},model:{value:t.checkedConfigId,callback:function(e){t.checkedConfigId=e},expression:"checkedConfigId"}},[a("span")])]}}],null,!1,3616594260)}),a("let-table-column",{attrs:{title:t.$t("serverList.table.th.service"),prop:"server_name"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.fileName"),prop:"filename"}}),a("let-table-column",{attrs:{title:t.$t("serverList.table.th.lastUser"),prop:"lastuser"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"260px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.changeConfig(e.row,"configList")}}},[t._v(t._s(t.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return t.deleteConfig(e.row.id)}}},[t._v(t._s(t.$t("operate.delete")))]),a("let-table-operation",{on:{click:function(a){return t.showDetail(e.row)}}},[t._v(t._s(t.$t("cfg.title.viewConf")))]),a("let-table-operation",{on:{click:function(a){return t.showHistory(e.row.id)}}},[t._v(t._s(t.$t("pub.btn.history")))])]}}],null,!1,854184098)})],1)],1):t._e(),t.refFileList&&t.showOthers?a("wrapper",{ref:"refFileListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:t.openRefFileModal}},[t._v(t._s(t.$t("cfg.btn.addRef")))]),a("let-table",{attrs:{data:t.refFileList,title:t.$t("cfg.title.b"),"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("serverList.table.th.service"),prop:"server_name"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.fileName"),prop:"filename"}}),a("let-table-column",{attrs:{title:t.$t("serverList.table.th.ip"),prop:"node_name"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"260px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.deleteRef(e.row.id)}}},[t._v(t._s(t.$t("operate.delete")))]),a("let-table-operation",{on:{click:function(a){return t.showDetail(e.row)}}},[t._v(t._s(t.$t("operate.view")))])]}}],null,!1,1524090233)})],1)],1):t._e(),t.nodeConfigList&&t.showOthers?a("wrapper",{ref:"nodeConfigListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:t.pushNodeConfig}},[t._v(t._s(t.$t("cfg.btn.pushFile")))]),t.nodeConfigList.length?a("let-checkbox",{staticClass:"check-all",model:{value:t.nodeCheckAll,callback:function(e){t.nodeCheckAll=e},expression:"nodeCheckAll"}}):t._e(),a("let-table",{attrs:{data:t.nodeConfigList,title:t.$t("cfg.title.c"),"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"40px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-checkbox",{attrs:{label:e.row.id},model:{value:t.nodeCheckList,callback:function(e){t.nodeCheckList=e},expression:"nodeCheckList"}})]}}],null,!1,3731714217)}),a("let-table-column",{attrs:{title:t.$t("serverList.table.th.service"),prop:"server_name"}}),a("let-table-column",{attrs:{title:t.$t("serverList.table.th.ip"),prop:"node_name"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.fileName"),prop:"filename"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"400px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.changeConfig(e.row,"nodeConfigList")}}},[t._v(t._s(t.$t("cfg.table.modCfg")))]),a("let-table-operation",{on:{click:function(a){return t.showMergedDetail(e.row.id)}}},[t._v(t._s(t.$t("cfg.table.viewMerge")))]),a("let-table-operation",{on:{click:function(a){return t.showDetail(e.row)}}},[t._v(t._s(t.$t("cfg.table.viewIpContent")))]),a("let-table-operation",{on:{click:function(a){return t.showHistory(e.row.id)}}},[t._v(t._s(t.$t("pub.btn.history")))]),a("let-table-operation",{on:{click:function(a){return t.handleRefFiles(e.row.id)}}},[t._v(t._s(t.$t("cfg.table.mangeRefFile")))])]}}],null,!1,1318823064)})],1)],1):t._e(),a("let-modal",{attrs:{title:t.configModal.isNew?t.$t("operate.title.add")+" "+t.$t("common.config"):t.$t("operate.title.update")+" "+t.$t("common.config"),width:"700px"},on:{"on-confirm":t.configDiff,close:t.closeConfigModal,"on-cancel":t.closeConfigModal},model:{value:t.configModal.show,callback:function(e){t.$set(t.configModal,"show",e)},expression:"configModal.show"}},[t.configModal.model?a("let-form",{ref:"configForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:t.$t("cfg.btn.fileName"),required:""}},[a("let-input",{attrs:{size:"small",disabled:!t.configModal.isNew,required:""},model:{value:t.configModal.model.filename,callback:function(e){t.$set(t.configModal.model,"filename",e)},expression:"configModal.model.filename"}})],1),t.configModal.isNew?t._e():a("let-form-item",{attrs:{label:t.$t("cfg.btn.reason"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:t.configModal.model.reason,callback:function(e){t.$set(t.configModal.model,"reason",e)},expression:"configModal.model.reason"}})],1),a("let-form-item",{attrs:{label:t.$t("cfg.btn.content"),required:""}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:16,required:""},model:{value:t.configContent,callback:function(e){t.configContent=e},expression:"configContent"}})],1)],1):t._e()],1),a("let-modal",{attrs:{title:t.$t("filter.title.diffTxt"),width:"1200px"},on:{"on-confirm":t.updateConfigDiff,close:t.closeConfigDiffModal,"on-cancel":t.closeConfigDiffModal},model:{value:t.configDiffModal.show,callback:function(e){t.$set(t.configDiffModal,"show",e)},expression:"configDiffModal.show"}},[t.configDiffModal.model?a("div",{staticStyle:{"padding-top":"30px"}},[a("div",{staticClass:"codediff_head"},[a("div",{staticClass:"codediff_th"},[t._v("鏃у唴瀹�:")]),a("div",{staticClass:"codediff_th"},[t._v("鏂板唴瀹�:")])]),a("diff",{attrs:{"old-string":t.configDiffModal.model.oldData,"new-string":t.configDiffModal.model.newData,context:10,"output-format":"side-by-side"}})],1):t._e()]),a("let-modal",{attrs:{title:t.detailModal.title,width:"700px",footShow:!1},on:{close:t.closeDetailModal},model:{value:t.detailModal.show,callback:function(e){t.$set(t.detailModal,"show",e)},expression:"detailModal.show"}},[t.detailModal.model&&t.detailModal.model.table?a("let-table",{staticClass:"history-table",attrs:{data:t.detailModal.model.table,"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("common.time"),prop:"posttime"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.reason"),prop:"reason"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.content"),width:"90px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.showTableDeatil(e.row)}}},[t._v(t._s(t.$t("operate.view")))])]}}],null,!1,3538701521)})],1):t._e(),a("div",{staticClass:"pre_con"},[t.detailModal.model&&!t.detailModal.model.table||t.detailModal.model&&t.detailModal.model.table&&t.detailModal.model.detail?a("pre",[t._v(t._s(t.detailModal.model.detail||t.$t("cfg.msg.empty")))]):t._e()]),a("div",{ref:"detailModalLoading",staticClass:"detail-loading"})],1),t.refFileModal.model?a("let-modal",{attrs:{title:this.$t("operate.title.add"),width:"700px"},on:{"on-confirm":t.addRefFile,close:t.closeRefFileModal},model:{value:t.refFileModal.show,callback:function(e){t.$set(t.refFileModal,"show",e)},expression:"refFileModal.show"}},[a("let-form",{ref:"refForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:t.$t("cfg.msg.refFile"),required:""}},[a("let-select",{attrs:{size:"small",placeholder:t.$t("pub.dlg.defaultValue"),required:""},model:{value:t.refFileModal.model.filename,callback:function(e){t.$set(t.refFileModal.model,"filename",e)},expression:"refFileModal.model.filename"}},t._l(t.refFileModal.model.fileList,(function(e){return a("let-option",{key:e.id,attrs:{value:e.id}},[t._v(t._s(e.filename))])})),1)],1)],1)],1):t._e(),a("let-modal",{attrs:{title:t.$t("cfg.table.mangeRefFile"),width:"700px",footShow:!1},on:{close:t.closeDetailModal},model:{value:t.nodeRefFileListModal.show,callback:function(e){t.$set(t.nodeRefFileListModal,"show",e)},expression:"nodeRefFileListModal.show"}},[t.nodeRefFileListModal.model?a("wrapper",[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:t.openNodeRefFileModal}},[t._v(t._s(t.$t("cfg.btn.addRef")))]),a("let-table",{attrs:{data:t.nodeRefFileListModal.model.refFileList,title:t.$t("cfg.title.b"),"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("serverList.table.th.service"),prop:"server_name"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.fileName"),prop:"filename"}}),a("let-table-column",{attrs:{title:t.$t("serverList.table.th.ip"),prop:"node_name"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"260px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.deleteRef(e.row.id,"nodeRef",e.row.config_id)}}},[t._v(t._s(t.$t("operate.delete")))]),a("let-table-operation",{on:{click:function(a){return t.showDetail(e.row)}}},[t._v(t._s(t.$t("operate.view")))]),a("let-table-operation",{on:{click:function(a){return t.showHistory(e.row.config_id)}}},[t._v(t._s(t.$t("pub.btn.history")))])]}}],null,!1,933040328)})],1)],1):t._e()],1),a("let-modal",{attrs:{width:"700px",footShow:!1},on:{close:t.closePushResultModal},model:{value:t.pushResultModal.show,callback:function(e){t.$set(t.pushResultModal,"show",e)},expression:"pushResultModal.show"}},[t.pushResultModal.model?a("let-table",{attrs:{data:t.pushResultModal.model,title:t.$t("serverList.table.th.result"),"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("serverList.table.th.service")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{class:0!==e.row.ret_code?"danger":"success"},[t._v(t._s(e.row.server_name))])]}}],null,!1,1546843640)}),a("let-table-column",{attrs:{title:t.$t("serverList.table.th.result")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"result",class:0!==e.row.ret_code?"danger":"success"},[t._v(t._s(e.row.err_msg))])]}}],null,!1,3216099087)})],1):t._e()],1)],1)},s=[],n=(a("99af"),a("a15b"),a("d81d"),a("d3b7"),a("ac1f"),a("25f0"),a("8a79"),a("5319"),a("dcab")),i=a("e68e"),o={name:"ServerConfig",components:{wrapper:n["a"],diff:i["a"]},data:function(){return{oldStr:"old code",newStr:"new code",serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},checkedConfigId:"",configList:[],refFileList:null,nodeConfigList:null,nodeCheckList:[],configContent:"",configModal:{show:!1,isNew:!0,model:null},configDiffModal:{type:"",show:!1,isNew:!0,model:null},detailModal:{show:!1,title:"",model:null},refFileModal:{show:!1,model:{fileList:[]}},nodeRefFileListModal:{show:!1,model:null},pushResultModal:{show:!1,model:null}}},computed:{showOthers:function(){return 5===this.serverData.level},nodeCheckAll:{get:function(){return!(!this.nodeConfigList||!this.nodeConfigList.length)&&this.nodeCheckList.length===this.nodeConfigList.length},set:function(t){this.nodeCheckList=t?this.nodeConfigList.map((function(t){return t.id})):[]}}},watch:{checkedConfigId:function(){var t=this;this.$nextTick((function(){t.getRefFileList(),t.getNodeConfigList()}))}},methods:{getConfigList:function(t){var e=this,a=this.$refs.configListLoading.$loading.show();this.$ajax.getJSON("/server/api/config_file_list",t).then((function(t){a.hide(),e.configList=t,e.refFileList=[],e.nodeConfigList=[],t[0]&&t[0].id&&(e.checkedConfigId=t[0].id)})).catch((function(t){a.hide(),e.$confirm(t.err_msg||t.message||e.$t("common.error"),e.$t("common.retry"),e.$t("common.alert")).then((function(){e.getConfigList()}))}))},addConfig:function(){this.configModal.model={filename:this.serverData.server_name+".conf",config:""},""==this.serverData.server_name&&(this.configModal.model.filename=this.serverData.application+".conf"),this.configModal.isNew=!0,this.configModal.show=!0},changeConfig:function(t,e){this.configModal.model=Object.assign({reason:""},t),this.configContent=t.config,this.configModal.target=e,this.configModal.isNew=!1,this.configModal.show=!0},updateConfigFile:function(){var t=this;if(this.$refs.configForm.validate()){var e=this.$Loading.show();this.configModal.model.filename=this.configModal.model.filename.replace(/(^\s*)|(\s*$)/g,"");var a=this.configModal.model;if(this.configModal.isNew){var r=Object.assign({application:this.serverData.application,level:this.serverData.level,server_name:this.serverData.server_name,set_name:this.serverData.set_name,set_area:this.serverData.set_area,set_group:this.serverData.set_group},a);this.$ajax.postJSON("/server/api/add_config_file",r).then((function(a){e.hide(),t.configList.unshift(a),1===t.configList.length&&(t.checkedConfigId=a.id),t.$tip.success(t.$t("common.success")),t.closeConfigModal(),t.closeConfigDiffModal()})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.err_msg||a.message))}))}else this.$ajax.postJSON("/server/api/update_config_file",{config:a.config,id:a.id,reason:a.reason}).then((function(a){e.hide(),t[t.configModal.target]=t[t.configModal.target].map((function(t){return t.id===a.id?a:t})),t.checkedConfigId===a.id&&(t.getRefFileList(),t.getNodeConfigList()),t.$tip.success(t.$t("common.success")),t.closeConfigModal(),t.closeConfigDiffModal()})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1},deleteConfig:function(t){var e=this;this.$confirm(this.$t("cfg.msg.confirmCfg"),this.$t("common.alert")).then((function(){var a=e.$Loading.show();e.$ajax.getJSON("/server/api/delete_config_file",{id:t}).then((function(t){a.hide(),e.getConfigList(e.serverData),e.getNodeConfigList(),e.$tip.success(e.$t("common.success"))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))}))},getUnusedFileList:function(t){var e=this;this.showOthers&&this.$ajax.getJSON("/server/api/unused_config_file_list",{config_id:t,application:this.serverData.application}).then((function(t){e.refFileModal.model.fileList=t})).catch((function(t){e.refFileModal.model.fileList=[],e.$tip.error({title:e.$t("common.error"),message:t.err_msg||t.message||e.$t("common.networkErr")})}))},getRefFileList:function(){var t=this;if(this.showOthers){var e=this.$refs.refFileListLoading.$loading.show();this.$ajax.getJSON("/server/api/config_ref_list",{config_id:this.checkedConfigId}).then((function(a){e.hide(),a.map((function(t){var e=t.id;return t=Object.assign(t,t.reference),t.refrence_id=t.id,t.id=e,t})),t.refFileList=a})).catch((function(a){e.hide(),t.refFileList=[],t.$tip.error({title:t.$t("common.error"),message:a.err_msg||a.message||t.$t("common.networkErr")})}))}},openRefFileModal:function(){this.refFileModal.show=!0,this.refFileModal.isNodeRef=!1,this.getUnusedFileList(this.checkedConfigId)},openNodeRefFileModal:function(){this.refFileModal.show=!0,this.refFileModal.isNodeRef=!0,this.getUnusedFileList(this.refFileModal.id)},addRefFile:function(){var t=this;if(this.$refs.refForm.validate()){var e=this.$Loading.show();this.$ajax.getJSON("/server/api/add_config_ref",{config_id:this.refFileModal.isNodeRef?this.refFileModal.id:this.checkedConfigId,reference_id:this.refFileModal.model.filename}).then((function(a){e.hide(),t.refFileModal.show=!1,t.refFileModal.isNodeRef?t.getNodeRefFileList(t.refFileModal.id):t.getRefFileList()})).catch((function(a){e.hide(),t.$tip.error({title:t.$t("common.error"),message:a.err_msg||a.message||t.$t("common.networkErr")})}))}},closeRefFileModal:function(){this.refFileModal.show=!1},deleteRef:function(t,e,a){var r=this;this.$confirm(this.$t("cfg.msg.confirm"),this.$t("common.alert")).then((function(){var s=r.$Loading.show();r.$ajax.getJSON("/server/api/delete_config_ref",{id:t}).then((function(t){s.hide(),"nodeRef"==e?r.getNodeRefFileList(a):r.getRefFileList(),r.$tip.success(r.$t("common.success"))})).catch((function(t){s.hide(),r.$tip.error({title:r.$t("common.error"),message:t.err_msg||t.message||r.$t("common.networkErr")})}))}))},getNodeConfigList:function(){var t=this;if(this.showOthers){var e=this.$refs.nodeConfigListLoading.$loading.show(),a=Object.assign({config_id:this.checkedConfigId},this.serverData);this.$ajax.getJSON("/server/api/node_config_file_list",a).then((function(a){e.hide(),t.nodeConfigList=a})).catch((function(a){e.hide(),t.nodeConfigList=[],t.$tip.error({title:t.$t("common.error"),message:a.err_msg||a.message||t.$t("common.networkErr")})}))}},pushNodeConfig:function(){var t=this;if(this.nodeCheckList.length){var e=this.$Loading.show();this.$ajax.getJSON("/server/api/push_config_file",{ids:this.nodeCheckList.join(";")}).then((function(a){e.hide(),t.pushResultModal.model=a,t.pushResultModal.show=!0})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.err_msg||a.message))}))}else this.$tip.warning(this.$t("cfg.msg.selectNode"))},closePushResultModal:function(){this.pushResultModal.model=null,this.pushResultModal.show=!1},showDetail:function(t){this.detailModal.title=this.$t("cfg.title.viewConf"),this.detailModal.model={detail:t.config},this.detailModal.show=!0},showMergedDetail:function(t){var e=this;this.detailModal.title=this.$t("cfg.title.viewMerged"),this.detailModal.show=!0;var a=this.$loading.show({target:this.$refs.detailModalLoading});this.$ajax.getJSON("/server/api/merged_node_config",{id:t}).then((function(t){a.hide(),e.detailModal.model={detail:t}})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))},showHistory:function(t){var e=this;this.detailModal.title=this.$t("cfg.title.viewHistory"),this.detailModal.show=!0;var a=this.$loading.show({target:this.$refs.detailModalLoading});this.$ajax.getJSON("/server/api/config_file_history_list",{config_id:t}).then((function(t){a.hide(),e.detailModal.model={table:t.rows,detail:""}})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))},showTableDeatil:function(t){this.detailModal.model.detail=t.content},closeDetailModal:function(){this.detailModal.show=!1,this.detailModal.model=null},getNodeRefFileList:function(t){var e=this;this.$ajax.getJSON("/server/api/config_ref_list",{config_id:t}).then((function(t){t.map((function(t){var e=t.id;return t=Object.assign(t,t.reference),t.refrence_id=t.id,t.id=e,t})),e.nodeRefFileListModal.model={refFileList:t}})).catch((function(t){e.nodeRefFileListModal.model={refFileList:[]},e.$tip.error({title:e.$t("common.error"),message:t.err_msg||t.message||e.$t("common.networkErr")})}))},handleRefFiles:function(t){this.nodeRefFileListModal.show=!0,this.nodeRefFileListModal.model=null,this.refFileModal.id=t,this.getNodeRefFileList(t)},configDiff:function(){this.$refs.configForm.validate()&&(this.configDiffModal.type="config",this.configDiffModal.show=!0,this.configDiffModal.isNew=!1,this.configDiffModal.model={oldData:this.configModal.model.config,newData:this.configContent})},updateConfigDiff:function(){var t=this.configDiffModal.type,e=this.configModal.model;if(e.filename.toLowerCase().endsWith(".json"))try{JSON.parse(this.configContent)}catch(i){return void alert("config format error:"+i.toString())}if(e.filename.toLowerCase().endsWith(".xml"))try{var a=new DOMParser,r=a.parseFromString(this.configContent,"text/xml"),s=r.getElementsByTagName("parsererror"),n="";if(s.length>0)return n="parsererror"==r.documentElement.nodeName?r.documentElement.childNodes[0].nodeValue:r.getElementsByTagName("parsererror")[0].innerHTML,void alert("config format error:"+n)}catch(i){return void alert("config format error:"+i.toString())}"config"===t&&(this.configModal.model.config=this.configContent,this.updateConfigFile())},closeConfigDiffModal:function(){this.configDiffModal.show=!1},nodeConfigDiff:function(){this.$refs.nodeConfigForm.validate()&&(this.configDiffModal.type="nodeConfig",this.configDiffModal.show=!0,this.configDiffModal.isNew=!1,this.configDiffModal.model={oldData:this.nodeConfigModal.model.config,newData:this.nodeConfigContent})}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getConfigList(this.serverData)}},l=o,c=(a("4201"),a("2877")),u=Object(c["a"])(l,r,s,!1,null,null,null);e["a"]=u.exports},"98c9":function(t,e,a){},"9bdc":function(t,e,a){"use strict";var r=a("c10a"),s=a.n(r);s.a},"9c4c":function(t,e,a){},"9c65":function(t,e,a){},a082:function(t,e,a){},a197:function(t,e,a){},a4e9:function(t,e,a){},acfd:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("let-modal",{attrs:{title:t.$t("serverList.table.th.result"),width:"880px",footShow:!1},on:{"on-cancel":t.onClose,close:t.onClose},model:{value:t.finishModal.show,callback:function(e){t.$set(t.finishModal,"show",e)},expression:"finishModal.show"}},[t.finishModal.model?a("let-table",{attrs:{title:t.$t("serverList.servant.taskID")+t.finishModal.model.task_no,data:t.finishModal.model.items}},[a("let-table-column",{attrs:{title:t.$t("serverList.table.th.ip"),prop:"node_name",width:"200px"}}),a("let-table-column",{attrs:{title:t.$t("common.status"),width:"120px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-tag",{attrs:{theme:2==e.row.status?"success":3==e.row.status?"danger":"",checked:""}},[t._v(" "+t._s(t.statusConfig[e.row.status]+(2!=e.row.status&&3!=e.row.status?e.row.desc:""))+" ")])]}}],null,!1,228464655)}),a("let-table-column",{attrs:{title:t.$t("serverList.table.th.result"),prop:"execute_info"}})],1):t._e()],1)],1)},s=[],n=(a("99af"),a("4160"),a("caad"),a("d3b7"),a("25f0"),a("159b"),{name:"PublishStatus",data:function(){return{closeCallback:null,finishModal:{show:!1,model:{task_no:"",items:[]}},statusConfig:{0:this.$t("serverList.restart.notStart"),1:this.$t("serverList.restart.running"),2:this.$t("serverList.restart.success"),3:this.$t("serverList.restart.failed"),4:this.$t("serverList.restart.cancel"),5:this.$t("serverList.restart.pauseFlow")},statusMap:{0:"EM_T_NOT_START",1:"EM_T_RUNNING",2:"EM_T_SUCCESS",3:"EM_T_FAILED",4:"EM_T_CANCEL",5:"EM_T_PARIAL"}}},methods:{onClose:function(){this.closeCallback&&this.closeCallback()},savePublishServer:function(t,e,a,r){var s=this;a=a||"",r=r||t.model.patch_id.toString(),this.closeCallback=e;var n=[],i=t.elegant||!1;t.model.serverList.forEach((function(e){n.push({server_id:e.id.toString(),command:t.command||"patch_tars",parameters:{patch_id:r,bak_flag:e.bak_flag||!1,update_text:t.model.update_text||"",group_name:a}})}));var o=this.$Loading.show();this.$ajax.postJSON("/server/api/add_task",{serial:!i,elegant:i,eachnum:t.eachnum||1,items:n}).then((function(t){o.hide(),s.finishModal.model.task_no=t,s.finishModal.show=!0,s.getTaskRepeat(t)})).catch((function(t){o.hide(),s.$tip.error("".concat(s.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getTaskRepeat:function(t){var e,a=this;e&&clearTimeout(e);var r=function r(){a.$ajax.getJSON("/server/api/task",{task_no:t}).then((function(t){var s=!0;t.items.forEach((function(t){[2,3].includes(t.status)||(s=!1),t.percent?t.desc="("+t.percent+"%)":t.desc="..."})),s?clearTimeout(e):e=setTimeout(r,2e3),a.finishModal.model.items=t.items})).catch((function(t){clearTimeout(e),a.$tip.error("".concat(a.$t("common.error"),": ").concat(t.message||t.err_msg))}))};r()}}}),i=n,o=a("2877"),l=Object(o["a"])(i,r,s,!1,null,null,null);e["a"]=l.exports},b3f5:function(t,e,a){"use strict";a("99af"),a("4160"),a("6d93");var r=a("a026"),s=a("7ad2"),n=new s["a"];n.ServerUrl.set("/pages"),n.ResultHandler.set((function(t){return!(!t||200!==t.ret_code||null==t.data)})),["getJSON","postJSON"].forEach((function(t){var e=n[t];n["_".concat(t)]=e,n[t]=function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return e.call.apply(e,[null].concat(a)).then((function(t){return t.data}))}})),Object.defineProperty(r["default"].prototype,"$ajax",{get:function(){return n}}),e["a"]=n},c047:function(t,e,a){"use strict";var r=a("4e91"),s=a.n(r);s.a},c10a:function(t,e,a){},c1df0:function(t,e,a){"use strict";var r=a("ea4d"),s=a.n(r);s.a},c2de:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page_server_debuger"},[t.showDebug||t.showBm||t.addTestCase||t.showCaseList||t.modifyTestCase?t._e():a("wrapper",{ref:"tarsFileListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:t.openTarsUploadFileModal}},[t._v(t._s(t.$t("operate.add")))]),a("let-table",{attrs:{data:t.tarsFileList,title:t.$t("inf.title.listTitle"),"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("deployService.form.app"),prop:"application"}}),a("let-table-column",{attrs:{title:t.$t("serverList.table.th.service"),prop:"server_name"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.fileName"),prop:"file_name"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"260px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.showDebuger(e.row)}}},[t._v(t._s(t.$t("inf.list.debug")))]),a("let-table-operation",{on:{click:function(a){return t.showBenchmark(e.row)}}},[t._v(t._s(t.$t("inf.list.benchmark")))]),a("let-table-operation",{on:{click:function(a){return t.getTestCaseList(e.row)}}},[t._v(t._s(t.$t("operate.testCaseList")))]),a("let-table-operation",{on:{click:function(a){return t.deleteTarsFile(e.row.f_id)}}},[t._v(t._s(t.$t("operate.delete")))])]}}],null,!1,1032352349)})],1)],1),t.showDebug?a("div",[a("let-form",{staticClass:"left_align",attrs:{itemWidth:"530px"}},[a("let-form-item",{attrs:{label:t.$t("inf.dlg.selectLabel")}},[a("let-cascader",{attrs:{data:t.contextData,required:"",size:"small"},on:{change:t.getParams}})],1),t.objList.length?a("let-form-item",{attrs:{label:t.$t("inf.dlg.objName")}},[a("let-select",{model:{value:t.objName,callback:function(e){t.objName=e},expression:"objName"}},t._l(t.objList,(function(t){return a("let-option",{key:t.servant,attrs:{value:t.servant}})})),1)],1):t._e(),a("let-form-item",[a("let-button",{attrs:{theme:"primary"},on:{click:t.doDebug}},[t._v(t._s(t.$t("inf.list.debug")))])],1)],1),a("let-row",[a("div",{staticClass:"params_container"},[a("let-col",{attrs:{span:12,itemWidth:"100%"}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area div_line",attrs:{type:"textarea",rows:20,placeholder:t.$t("inf.dlg.inParam")},model:{value:t.inParam,callback:function(e){t.inParam=e},expression:"inParam"}})],1)],1),a("let-col",{attrs:{span:12}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area",attrs:{type:"textarea",rows:20,placeholder:t.$t("inf.dlg.outParam")},model:{value:t.outParam,callback:function(e){t.outParam=e},expression:"outParam"}})],1)],1)],1)]),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(e){t.showDebug=!1}}},[t._v(t._s(t.$t("operate.goback")))])],1)],1):t._e(),t.showBm?a("InterfaceBenchmark",{ref:"bm",attrs:{servantList:t.objList}}):t._e(),a("let-modal",{attrs:{title:t.$t("inf.title.dlgTitle"),width:"880px",footShow:!1},on:{"on-cancel":t.closeUploadModal},model:{value:t.uploadModal.show,callback:function(e){t.$set(t.uploadModal,"show",e)},expression:"uploadModal.show"}},[t.uploadModal.model?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(e){return e.preventDefault(),t.uploadTarsFile(e)}}},[a("let-form-item",{attrs:{itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:t.$t("pub.dlg.filetype"),accept:".tars",multiple:""},on:{upload:t.uploadFile}},[t._v(t._s(t.$t("common.choose")))]),t._l(t.uploadModal.fileList2Show,(function(e){return a("li",{key:e.index},[t._v(t._s(e.name))])}))],2),a("let-button",{attrs:{type:"submit",theme:"primary"}},[t._v(t._s(t.$t("serverList.servant.upload")))])],1):t._e()],1),a("let-modal",{attrs:{title:t.$t("inf.benchmark.installBenchmark"),width:"400px",headShow:!1},model:{value:t.showInstallBm,callback:function(e){t.showInstallBm=e},expression:"showInstallBm"}},[a("div",[a("p",[t._v(t._s(t.$t("inf.benchmark.installTip")))])])]),t.addTestCase&&!t.showCaseList?a("div",[a("let-form",{staticClass:"left_align",attrs:{itemWidth:"530px"}},[a("let-form-item",{attrs:{label:t.$t("inf.dlg.selectLabel")}},[a("let-cascader",{attrs:{data:t.contextData,required:"",size:"small"},on:{change:t.getParams}})],1),t.objList.length?a("let-form-item",{attrs:{label:t.$t("inf.dlg.objName")}},[a("let-select",{model:{value:t.objName,callback:function(e){t.objName=e},expression:"objName"}},t._l(t.objList,(function(t){return a("let-option",{key:t.servant,attrs:{value:t.servant}})})),1)],1):t._e()],1),a("let-form",{staticClass:"left_align"},[a("let-form-item",{attrs:{label:t.$t("inf.dlg.testCastName")}},[a("let-input",{attrs:{type:"textarea",rows:1,placeholder:t.$t("inf.dlg.testCastName")},model:{value:t.testCastName,callback:function(e){t.testCastName=e},expression:"testCastName"}})],1)],1),a("let-row",[a("div",{staticClass:"params_container"},[a("let-col",{attrs:{itemWidth:"100%"}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area div_line",attrs:{type:"textarea",rows:20,placeholder:t.$t("inf.dlg.inParam")},model:{value:t.inParam,callback:function(e){t.inParam=e},expression:"inParam"}})],1)],1)],1)]),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary"},on:{click:t.doAddTestCast}},[t._v(t._s(t.$t("operate.add")))]),t._v(" "),a("let-button",{attrs:{theme:"primary"},on:{click:function(e){t.addTestCase=!1,t.showCaseList=!0}}},[t._v(t._s(t.$t("operate.goback")))])],1)],1):t._e(),t.showCaseList&&!t.addTestCase?a("div",[a("let-form",{staticClass:"left_align",attrs:{itemWidth:"530px"}},[a("let-form-item",{attrs:{label:t.$t("inf.dlg.selectLabel")}},[a("let-cascader",{attrs:{data:t.contextData,required:"",size:"small"},on:{change:t.getTestCaseByParams}})],1),t.objList.length?a("let-form-item",{attrs:{label:t.$t("inf.dlg.objName")}},[a("let-select",{model:{value:t.objName,callback:function(e){t.objName=e},expression:"objName"}},t._l(t.objList,(function(t){return a("let-option",{key:t.servant,attrs:{value:t.servant}})})),1)],1):t._e()],1),a("let-table",{attrs:{data:t.testCaseList,title:t.$t("operate.testCaseList"),"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("inf.dlg.testCastName"),prop:"test_case_name",width:"100px"}}),a("let-table-column",{attrs:{title:t.$t("inf.dlg.objName"),prop:"object_name",width:"100px"}}),a("let-table-column",{attrs:{title:t.$t("inf.dlg.fileName"),prop:"file_name",width:"100px"}}),a("let-table-column",{attrs:{title:t.$t("module.title"),prop:"module_name",width:"100px"}}),a("let-table-column",{attrs:{title:t.$t("callChain.method"),prop:"function_name",width:"100px"}}),a("let-table-column",{attrs:{title:t.$t("nodes.user"),prop:"modify_user",width:"100px"}}),a("let-table-column",{attrs:{title:t.$t("board.alarm.table.content"),width:"460px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("font",{attrs:{color:"red"}},[t._v(t._s(e.row.context))])]}}],null,!1,3845679684)}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"100px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.gotoModify(e.row)}}},[t._v(t._s(t.$t("operate.modify")))]),a("let-table-operation",{on:{click:function(a){return t.deleteTestCase(e.row.case_id)}}},[t._v(t._s(t.$t("operate.delete")))])]}}],null,!1,1901094221)}),a("let-table-column",{attrs:{title:t.$t("serverList.table.th.ip"),width:"100px"},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(t.totalServerList,(function(r){return a("div",{key:r,attrs:{value:r}},[a("let-table-operation",{on:{click:function(a){return t.doNodedebug(r,e.row)}}},[t._v(t._s(r.node_name))]),a("br")],1)}))}}],null,!1,945768999)})],1),a("let-pagination",{staticStyle:{"margin-bottom":"32px"},attrs:{page:t.pageNum,total:t.total},on:{change:t.gotoPage}}),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(e){return t.gotoAddTestCase()}}},[t._v(t._s(t.$t("operate.addTestCase")))]),t._v(" "),a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(e){t.showCaseList=!1}}},[t._v(t._s(t.$t("operate.goback")))])],1)],1):t._e(),t.modifyTestCase?a("div",[a("let-form",{staticClass:"left_align",attrs:{itemWidth:"530px"}},[a("let-form-item",[a("span",{staticClass:"text-blue"},[t._v(t._s(t.modifyCaseItem.object_name))])]),a("let-form-item",[a("span",{staticClass:"text-blue"},[t._v(t._s(t.modifyCaseItem.module_name))]),a("span",{staticClass:"text-blue"},[t._v(t._s(t.modifyCaseItem.interface_name))]),a("span",{staticClass:"text-blue"},[t._v(t._s(t.modifyCaseItem.function_name))])])],1),a("let-form",{staticClass:"left_align"},[a("let-form-item",{attrs:{label:t.$t("inf.dlg.testCastName")}},[a("let-input",{attrs:{type:"textarea",rows:1,placeholder:t.$t("inf.dlg.testCastName")},model:{value:t.testCastName,callback:function(e){t.testCastName=e},expression:"testCastName"}})],1)],1),a("let-row",[a("div",{staticClass:"params_container"},[a("let-col",{attrs:{itemWidth:"100%"}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area div_line",attrs:{type:"textarea",rows:20,placeholder:t.$t("inf.dlg.inParam")},model:{value:t.inParam,callback:function(e){t.inParam=e},expression:"inParam"}})],1)],1)],1)]),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary"},on:{click:t.doModifyTestCase}},[t._v(t._s(t.$t("operate.modify")))]),t._v(" "),a("let-button",{attrs:{theme:"primary"},on:{click:function(e){t.modifyTestCase=!1,t.showCaseList=!0}}},[t._v(t._s(t.$t("operate.goback")))])],1)],1):t._e(),a("let-modal",{attrs:{title:t.$t("dcache.debug.debugResult"),width:"600px",footShow:!1},on:{close:t.closeDebugModal},model:{value:t.debugModal.show,callback:function(e){t.$set(t.debugModal,"show",e)},expression:"debugModal.show"}},[a("let-row",[a("div",{staticClass:"params_container"},[a("let-col",{attrs:{itemWidth:"100%"}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area div_line",attrs:{type:"textarea",rows:40,placeholder:t.$t("dcache.debug.debugResult")},model:{value:t.debugModal.resultParam,callback:function(e){t.$set(t.debugModal,"resultParam",e)},expression:"debugModal.resultParam"}})],1)],1)],1)])],1)],1)},s=[],n=(a("99af"),a("4160"),a("a630"),a("b0c0"),a("ac1f"),a("3ca3"),a("1276"),a("159b"),a("53ca")),i=a("b85c"),o=a("dcab"),l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"benchmark_wrapper"},[a("let-form",{staticClass:"left_align",attrs:{itemWidth:"350px"}},[a("let-form-item",{attrs:{label:t.$t("inf.dlg.objName")}},[a("let-select",{attrs:{size:"small"},on:{change:t.objChange},model:{value:t.servant,callback:function(e){t.servant=e},expression:"servant"}},t._l(t.servantList,(function(t){return a("let-option",{key:t.servant,attrs:{value:t.servant}})})),1)],1)],1),a("let-table",{attrs:{data:t.fnList,title:t.$t("inf.benchmark.fnlist"),"empty-msg":t.$t("inf.benchmark.nofn"),"row-class-name":t.fnRowClassName}},[a("let-table-column",{attrs:{title:t.$t("inf.benchmark.interface"),prop:"interface",width:"100px"}}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.fnname"),prop:"name",width:"120px"}}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.returnType"),prop:"return",width:"120px"}}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.inParam")},scopedSlots:t._u([{key:"default",fn:function(t){return[a("json-view",{attrs:{maxDepth:0,rootKey:"view",colorScheme:"dark",data:JSON.parse(t.row.inParams)}})]}}])}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.outParam")},scopedSlots:t._u([{key:"default",fn:function(t){return[a("json-view",{attrs:{maxDepth:0,rootKey:"view",colorScheme:"dark",data:JSON.parse(t.row.outParams)}})]}}])}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"80px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.queryCase(e.row)}}},[t._v(t._s(t.$t("inf.benchmark.case")))])]}}])})],1),t.showCase?a("wrapper",[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:t.initCaseContentForm}},[t._v(t._s(t.$t("inf.benchmark.addCase")))]),a("let-table",{attrs:{data:t.bmCaseList,title:t.currentFn.interface+"."+t.currentFn.name+" "+t.$t("inf.benchmark.caselist"),"empty-msg":t.$t("inf.benchmark.nocase")}},[a("let-table-column",{attrs:{title:t.$t("inf.benchmark.des"),prop:"des"}}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.inputValue"),prop:"in_values"}}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"240px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.initCaseContentForm(e.row)}}},[t._v(t._s(t.$t("inf.benchmark.modifyCase")))]),a("let-table-operation",{on:{click:function(a){return t.initCaseConfigForm(e.row,"test")}}},[t._v(t._s(t.$t("inf.benchmark.testCase")))]),a("let-table-operation",{on:{click:function(a){return t.initCaseConfigForm(e.row,"start")}}},[t._v(t._s(t.$t("inf.benchmark.runCase")))]),a("let-table-operation",{on:{click:function(a){return t.queryResult(e.row)}}},[t._v(t._s(t.$t("inf.benchmark.viewResult")))]),a("let-table-operation",{on:{click:function(a){return t.deleteBmCase(e.row)}}},[t._v(t._s(t.$t("inf.benchmark.deleteCase")))])]}}],null,!1,2362952868)})],1)],1):t._e(),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(e){t.$parent.showBm=!1}}},[t._v(t._s(t.$t("operate.goback")))])],1),a("let-modal",{attrs:{title:t.$t("inf.benchmark.case"),width:"700px"},on:{"on-confirm":t.upsertCaseContent},model:{value:t.upsertCaseContentModal,callback:function(e){t.upsertCaseContentModal=e},expression:"upsertCaseContentModal"}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:t.$t("inf.benchmark.des")}},[a("let-input",{attrs:{size:"small"},model:{value:t.caseModel.des,callback:function(e){t.$set(t.caseModel,"des",e)},expression:"caseModel.des"}})],1),a("let-form-item",{attrs:{label:t.$t("inf.benchmark.inParam")}},[a("json-view",{attrs:{maxDepth:0,rootKey:"view",data:JSON.parse(t.currentFn.inParams||"{}")}})],1),a("let-form-item",{attrs:{label:t.$t("inf.benchmark.inputValue")}},[a("let-input",{attrs:{size:"small",rows:10,type:"textarea"},model:{value:t.caseModel.in_values,callback:function(e){t.$set(t.caseModel,"in_values",e)},expression:"caseModel.in_values"}}),a("a",{attrs:{target:"_blank",href:"https://github.com/TarsCloud/TarsDocs/blob/master/benchmark/tars-guide.md"}},[a("let-table-operation",[t._v(t._s(t.$t("inf.benchmark.inputValueDes")))])],1)],1)],1)],1),a("let-modal",{ref:"startBm",attrs:{footShow:!1,title:t.$t("inf.benchmark.bmParams"),width:"700px"},model:{value:t.upsertCaseConfigModal,callback:function(e){t.upsertCaseConfigModal=e},expression:"upsertCaseConfigModal"}},[a("let-form",{staticClass:"start-bm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:"servant"}},[a("let-input",{attrs:{disabled:"",size:"small"},model:{value:t.caseModel.servant,callback:function(e){t.$set(t.caseModel,"servant",e)},expression:"caseModel.servant"}})],1),a("let-form-item",{attrs:{label:t.$t("inf.benchmark.endpoints")}},[t._l(t.endpoints,(function(e,r){return a("let-checkbox",{key:r,staticClass:"checkbox_endpoint_item",model:{value:t.endpoints[r],callback:function(e){t.$set(t.endpoints,r,e)},expression:"endpoints[name]"}},[t._v(t._s(r))])})),a("let-input",{attrs:{size:"small",type:"textarea",placeholder:t.$t("inf.benchmark.endpointsTip")},model:{value:t.caseModel.endpoints,callback:function(e){t.$set(t.caseModel,"endpoints",e)},expression:"caseModel.endpoints"}})],2),a("let-form-group",{attrs:{inline:"","label-position":"top"}},["start"==t.upsertCaseConfigModalName?a("let-form-item",{attrs:{label:t.$t("inf.benchmark.links"),size:5}},[a("let-input",{attrs:{type:"number",size:"small",required:""},model:{value:t.caseModel.links,callback:function(e){t.$set(t.caseModel,"links",e)},expression:"caseModel.links"}})],1):t._e(),"start"==t.upsertCaseConfigModalName?a("let-form-item",{attrs:{label:t.$t("inf.benchmark.speed"),size:5}},[a("let-input",{attrs:{type:"number",size:"small",required:""},model:{value:t.caseModel.speed,callback:function(e){t.$set(t.caseModel,"speed",e)},expression:"caseModel.speed"}})],1):t._e(),"start"==t.upsertCaseConfigModalName?a("let-form-item",{attrs:{label:t.$t("inf.benchmark.duration"),size:5}},[a("let-input",{attrs:{type:"number",size:"small",required:""},model:{value:t.caseModel.duration,callback:function(e){t.$set(t.caseModel,"duration",e)},expression:"caseModel.duration"}})],1):t._e(),t.testResultModal?a("let-form-item",{attrs:{label:t.$t("inf.benchmark.testResult"),size:5}},[a("div",[t._v(" "+t._s(t.testResult.errmsg||t.testResultRsp)+" ")])]):t._e(),a("let-form-item",{attrs:{size:5}},["test"==t.upsertCaseConfigModalName?a("let-button",{staticClass:"start_bm",attrs:{theme:"primary"},on:{click:function(e){return t.execBenchmark("test")}}},[t._v(t._s(t.$t("inf.benchmark.infTest")))]):t._e(),"start"==t.upsertCaseConfigModalName?a("let-button",{staticClass:"start_bm",attrs:{theme:"primary"},on:{click:t.upsertCaseConfig}},[t._v(t._s(t.$t("inf.benchmark.startBenchmark")))]):t._e(),a("let-button",{staticClass:"cancel_bm",on:{click:function(e){t.upsertCaseConfigModal=!1}}},[t._v(t._s(t.$t("inf.benchmark.cancelTest")))])],1)],1)],1)],1),a("let-modal",{attrs:{footShow:!1,title:t.result.fn+" - "+t.$t("inf.benchmark.testResult"),width:"1300px"},model:{value:t.resultModal,callback:function(e){t.resultModal=e},expression:"resultModal"}},[a("wrapper",[a("div",{staticClass:"result_op"},[0==t.result.status?a("let-button",{staticClass:"bmop-btn",attrs:{size:"small",theme:"success"},on:{click:function(e){return t.initCaseConfigForm(t.currentCase,"start")}}},[t._v(t._s(t.$t("inf.benchmark.startBenchmark")))]):t._e(),1==t.result.status?a("let-button",{staticClass:"bmop-btn",attrs:{size:"small",theme:"danger"},on:{click:function(e){return t.execBenchmark("stop")}}},[t._v(t._s(t.$t("inf.benchmark.stopBenchmark")))]):t._e(),a("let-button",{staticClass:"bmop-btn",attrs:{size:"small",theme:"sub-primary"},on:{click:function(e){return t.getResultById(t.result.id)}}},[t._v(t._s(t.$t("inf.benchmark.refresh"))),1==t.result.status?a("span",[t._v("("+t._s(t.nextRefresh)+"s)")]):t._e()])],1),a("div",{staticClass:"result_select"},[a("let-radio",{attrs:{label:"detail"},model:{value:t.resultMode,callback:function(e){t.resultMode=e},expression:"resultMode"}},[t._v(t._s(t.$t("inf.benchmark.detail")))]),a("let-radio",{attrs:{label:"chart"},model:{value:t.resultMode,callback:function(e){t.resultMode=e},expression:"resultMode"}},[t._v(t._s(t.$t("inf.benchmark.stat")))])],1),"detail"==t.resultMode?a("let-table",{staticStyle:{height:"500px",overflow:"auto"},attrs:{data:t.result.results,"empty-msg":"data is empty"}},[a("let-table-column",{attrs:{title:t.$t("inf.benchmark.time"),prop:"time_stamp",width:"150px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[a("span",[t._v(t._s(t.formatDate(1e3*r.time_stamp)))])]}}],null,!1,765786504)}),a("let-table-column",{attrs:{title:"qps",prop:"avg_speed",width:"70px",align:"center"}}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.total"),prop:"total_request",width:"70px",align:"center"}}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.success"),prop:"succ_request",width:"70px",align:"center"}}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.fail"),prop:"fail_request",width:"70px",align:"center"}}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.successRate"),width:"80px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[a("span",[t._v(t._s(t.getSuccessRate(r)))])]}}],null,!1,1802954844)}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.maxCost"),prop:"max_time",width:"80px",align:"center"}}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.minCost"),prop:"min_time",width:"80px",align:"center"}}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.avgCost"),width:"80px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[a("span",[t._v(t._s(0==r.total_request?0:(r.total_time/r.total_request).toFixed(2)))])]}}],null,!1,882222135)}),a("let-table-column",{attrs:{title:"p90",width:"70px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[a("span",[t._v(t._s(r.p90_time.toFixed(2)))])]}}],null,!1,1999143014)}),a("let-table-column",{attrs:{title:"p99",width:"70px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[a("span",[t._v(t._s(r.p99_time.toFixed(2)))])]}}],null,!1,1672509679)}),a("let-table-column",{attrs:{title:"p999",width:"70px",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[a("span",[t._v(t._s(r.p999_time.toFixed(2)))])]}}],null,!1,1192471318)}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.sendBytes"),prop:"send_bytes",width:"80px",align:"center"}}),a("let-table-column",{attrs:{title:t.$t("inf.benchmark.recvBytes"),prop:"recv_bytes",width:"80px",align:"center"}})],1):t._e(),"chart"==t.resultMode?a("div",{staticClass:"return_chart"},[a("ve-pie",{attrs:{legend:t.returnChartOptions.legend,title:t.returnChartOptions.title,data:t.returnChartOptions,width:"500px"}}),a("ve-pie",{attrs:{legend:t.costChartOptions.legend,title:t.costChartOptions.title,data:t.costChartOptions,width:"500px"}})],1):t._e()],1)],1)],1)},c=[],u=(a("4de4"),a("c975"),a("a15b"),a("d81d"),a("a434"),a("b680"),a("b64b"),a("d3b7"),a("6062"),a("5319"),a("ddb0"),a("ade3")),d=a("10be"),m=a.n(d),f=a("3057"),p=a("2699"),h={id:-1,des:"",in_values:""},g=5e3,v={name:"InterfaceBenchmark",components:{wrapper:o["a"],VePie:m.a,"json-view":f["a"]},data:function(){return{showCase:!1,upsertCaseContentModal:!1,upsertCaseConfigModalName:"",upsertCaseConfigModal:!1,resultModal:!1,testResultModal:!1,servant:"",currentFn:{},currentCase:{},resultMode:"detail",endpoints:{},selectedEndpoints:[],fnList:[],bmCaseList:[],result:{results:[],status:0},testResult:{},nextRefresh:6,nextRefreshTimer:0,caseModel:Object.assign({},h)}},methods:{formatDate:p["b"],fnRowClassName:function(t){var e=t.row;t.rowIndex;return e==this.currentFn?"current_fn":""},getSuccessRate:function(t){var e=t.succ_request+t.fail_request;return e?(100*t.succ_request/e).toFixed(2)+"%":"0%"},upsertBmCase:function(t){var e=this,a=this.$Loading.show();t.servant=this.servant,t.fn=this.currentFn.name,this.$ajax.postJSON("/server/api/upsert_bm_case",t).then((function(t){a.hide(),e.getBenchmarkCaseList(),e.upsertCaseContentModal=!1,e.upsertCaseConfigModal=!1})).catch((function(t){a.hide(),e.upsertCaseContentModal=!1,e.upsertCaseConfigModal=!1,e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},initCaseContentForm:function(t){t&&t.id?this.caseModel=Object.assign({},t):(this.caseModel=Object.assign({},h),this.caseModel.in_values=this.currentFn.funInput),this.upsertCaseContentModal=!0},initCaseConfigForm:function(t,e){if(t){this.currentCase=t,this.testResult={},this.testResultModal=!1,this.caseModel=Object.assign({},t),this.caseModel.links||(this.caseModel.links=1),this.caseModel.speed||(this.caseModel.speed=100),this.caseModel.duration||(this.caseModel.duration=20);var a=this.caseModel.endpoints.split("\n");for(var r in this.endpoints){var s=a.indexOf(r);s>-1?(this.endpoints[r]=!0,a.splice(s,1)):this.endpoints[r]=!1}this.caseModel.endpoints=a.join("\n"),this.upsertCaseConfigModalName=e,this.upsertCaseConfigModal=!0,this.resultModal=!1}},upsertCaseContent:function(){var t={};this.caseModel.id>0&&(t.id=this.caseModel.id),t.des=this.caseModel.des,t.in_values=this.caseModel.in_values,this.upsertBmCase(t)},upsertCaseConfig:function(){var t={};t.id=this.caseModel.id,t.links=this.caseModel.links,t.speed=this.caseModel.speed,t.duration=this.caseModel.duration,t.endpoints=this.queryFullEndpoints(),this.upsertBmCase(t),t.endpoints&&this.caseModel.links&&this.caseModel.speed&&this.caseModel.duration?this.execBenchmark():this.$Notice({title:"missing params",type:"error"})},execBenchmark:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"start",a={caseId:this.currentCase.id,servant:this.servant,fn:this.currentFn.name},r="";switch(e){case"start":r="/server/api/start_bencmark",a.para_input=this.currentFn.inParams,a.para_value=this.currentCase.in_values,a.para_output=this.currentFn.outParams,a.endpoints=this.queryFullEndpoints(),a.links=this.caseModel.links,a.speed=this.caseModel.speed,a.duration=this.caseModel.duration;break;case"stop":r="/server/api/stop_bencmark";break;case"test":r="/server/api/test_bencmark",a.para_input=this.currentFn.inParams,a.para_value=this.currentCase.in_values,a.para_output=this.currentFn.outParams,a.endpoints=this.queryFullEndpoints();break}this.$ajax.postJSON(r,a).then((function(a){switch("start"==e&&t.queryResult(),e){case"start":t.result.status=t.currentCase.status=1,t.queryResult();break;case"stop":t.result.status=t.currentCase.status=0,t.stopPollingResult();break;case"test":t.testResult=a,t.testResultModal=!0;break}})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},queryFullEndpoints:function(){var t=[];for(var e in this.endpoints)this.endpoints[e]&&t.push(e);return this.caseModel.endpoints.split("\n").forEach((function(e){t.push(e)})),Array.from(new Set(t)).filter((function(t){return!!t})).join("\n")},queryResult:function(t){t&&(this.currentCase=t),this.getResultById(this.currentCase.id),this.resultModal=!0},queryCase:function(t){this.showCase=!0,this.currentFn=t,this.getBenchmarkCaseList()},getBenchmarkDes:function(t){var e=this;this.$ajax.getJSON("/server/api/get_benchmark_des",{id:t}).then((function(t){e.fnList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getBenchmarkCaseList:function(){var t=this;this.$ajax.getJSON("/server/api/get_bm_case_list",{servant:this.servant,fn:this.currentFn.name}).then((function(e){t.bmCaseList=e})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getResultById:function(t){var e=this;this.result.id=t,this.$ajax.getJSON("/server/api/get_bm_result_by_id",{id:t}).then((function(t){t.results=JSON.parse(t.results||"[]"),t.results.reverse(),e.result=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},deleteBmCase:function(t){var e=this;this.$confirm(this.$t("inf.benchmark.deleteCaseConfirm"),this.$t("common.alert")).then((function(){e.$Loading.show();var a={};a.id=t.id,a.is_deleted=1,e.upsertBmCase(a)}))},startPollingResult:function(){var t=this;this.stopPollingResult(),this.nextRefreshTimer=setInterval((function(){t.nextRefresh--,0==t.nextRefresh?t.queryResult():t.nextRefresh<0&&t.nextRefresh<0&&(t.nextRefresh=g/1e3)}),1e3)},stopPollingResult:function(){this.nextRefresh=g/1e3,clearInterval(this.nextRefreshTimer)},objChange:function(){var t=this;this.servant&&this.$ajax.getJSON("/server/api/get_endpoints",{servant:this.servant}).then((function(e){t.endpoints={},e.forEach((function(e){t.endpoints["".concat(e.istcp?"tcp":"udp"," -h ").concat(e.host," -p ").concat(e.port," -t ").concat(e.timeout)]=!1}))})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},pieFromResult:function(t,e,a,r){var s,n={},o=Object(i["a"])(this.result.results);try{for(o.s();!(s=o.n()).done;){var l=s.value;if(l[r])for(var c in l[r])n[c]||(n[c]=0),n[c]+=l[r][c]}}catch(m){o.e(m)}finally{o.f()}var d=Object.keys(n).map((function(t){var r;return r={},Object(u["a"])(r,e,t),Object(u["a"])(r,a,n[t]),r}));return{title:{text:t||""},legend:{orient:"vertical",top:50,right:0},columns:[e,a],rows:d}}},computed:{testResultRsp:function(){return(this.testResult.rsp||"").replace(/<br>/g,"\n")},costChartOptions:function(){return this.pieFromResult(this.$t("inf.benchmark.costStat"),"杩斿洖鍊�","鏁伴噺","cost_map")},returnChartOptions:function(){return this.pieFromResult(this.$t("inf.benchmark.retStat"),"杩斿洖鍊�","鏁伴噺","ret_map")}},props:{servantList:{type:Array,required:!0}},watch:{servantList:{immediate:!0,handler:function(t,e){t.length&&!this.servant&&(this.servant=t[0].servant,this.objChange())}},resultModal:function(t,e){if(t){if(0==this.currentCase.status)return;this.startPollingResult()}else this.stopPollingResult()}},beforeDestory:function(){this.stopPollingResult()}},b=v,_=(a("2998"),a("2877")),w=Object(_["a"])(b,l,c,!1,null,null,null),y=w.exports,$={name:"InterfaceDebuger",components:{wrapper:o["a"],InterfaceBenchmark:y},data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},tarsFileList:[],totalServerList:[],uploadModal:{show:!1,model:{},fileList2Show:[]},debugModal:{show:!1,resultParam:""},showDebug:!1,showBm:!1,showInstallBm:!1,isBmInstalled:null,contextData:[],debuger_panel:!1,inParam:"",outParam:"",selectedFileName:"",selectedMethods:[],objName:"",objList:[],selectedId:"",testCastName:"",testCaseList:[],showCaseList:!1,pageNum:1,pageSize:20,total:1,addTestCase:!1,modifyTestCase:!1,modifyCaseItem:{},rowData:{}}},props:["treeid"],methods:{getFileList:function(){var t=this,e=this.$Loading.show();this.$ajax.getJSON("/server/api/get_file_list",{application:this.serverData.application,server_name:this.serverData.server_name}).then((function(a){e.hide(),t.tarsFileList=a})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.message||a.err_msg))}))},getBmInstalled:function(){var t=this;this.$ajax.getJSON("/server/api/is_benchmark_installed").then((function(e){t.isBmInstalled=e})).catch((function(e){console.error("get bm installed status error",e),t.$tip.error("error:".concat(e.err_msg||e.message)),t.isBmInstalled=!1}))},openTarsUploadFileModal:function(){this.uploadModal.show=!0,this.uploadModal.model={application:this.serverData.application,server_name:this.serverData.server_name,set_name:this.serverData.set_name,file:[]},this.uploadModal.fileList2Show=[]},uploadFile:function(t){if(this.uploadModal.fileList2Show=[],t.length){var e,a=0,r=Object(i["a"])(t);try{for(r.s();!(e=r.n()).done;){var s=e.value;this.uploadModal.fileList2Show.push({name:s.name,index:100*Math.random()});var n=s.name.split(".");n[n.length-1];a+=1}}catch(o){r.e(o)}finally{r.f()}a===t.length&&(this.uploadModal.model.file=Array.from(t))}},uploadTarsFile:function(){var t=this;if(this.$refs.uploadForm.validate()){var e=this.$Loading.show(),a=new FormData;a.append("application",this.uploadModal.model.application),a.append("server_name",this.uploadModal.model.server_name),a.append("set_name",this.uploadModal.model.set_name),this.uploadModal.model.file.forEach((function(t){return a.append("suse",t)})),this.$ajax.postForm("/server/api/upload_tars_file",a).then((function(){e.hide(),t.getFileList(),t.uploadModal.show=!1,t.uploadModal.model=null})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.message||a.err_msg))}))}},closeUploadModal:function(){this.uploadModal.show=!1},showDebuger:function(t){this.showDebug=!0,this.selectedFileName=t.file_name,this.inParam=null,this.outParam=null,this.selectedId=t.f_id,this.objName=null,this.getContextData(t.f_id),this.getObjList()},showBenchmark:function(t){var e=this;null!==this.isBmInstalled&&(this.isBmInstalled?(this.showBm=!0,this.showDebug=!1,this.$nextTick((function(){e.$refs.bm.getBenchmarkDes(t.f_id)}))):this.showInstallBm=!0)},deleteTarsFile:function(t){var e=this;this.$confirm(this.$t("inf.dlg.deleteMsg"),this.$t("common.alert")).then((function(){var a=e.$Loading.show();e.$ajax.getJSON("/server/api/delete_tars_file",{id:t}).then((function(t){a.hide(),e.getFileList()})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))})).catch((function(){}))},getObjList:function(){var t=this;this.$ajax.getJSON("/server/api/all_adapter_conf_list",{application:this.serverData.application,server_name:this.serverData.server_name}).then((function(e){e.length&&(t.objList=e,t.objName=e[0].servant)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getContextData:function(t){var e=this;this.$ajax.getJSON("/server/api/get_contexts",{id:t,application:this.serverData.application,server_name:this.serverData.server_name,type:"all"}).then((function(t){e.contextData=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},parseFields:function(t){var e={};for(var a in t){var r=t[a].defaultValue;r||("string"===t[a].type?r="":"long"!==t[a].type&&"int"!==t[a].type||(r=0)),e[a]=r}return e},getParams:function(t){var e=this;if(this.selectedMethods=t,3==t.length){var a=this.$Loading.show();this.$ajax.getJSON("/server/api/get_params",{application:this.serverData.application,server_name:this.serverData.server_name,id:this.selectedId,module_name:t[0],interface_name:t[1],function_name:t[2]}).then((function(r){a.hide();var s={};e.$ajax.getJSON("/server/api/get_structs",{id:e.selectedId,module_name:t[0]}).then((function(t){r.forEach((function(a){if(!a.out)if("string"===a.type)s[a.name]="";else if("array"===a.type)s[a.name]=[];else if("object"===Object(n["a"])(a.type))if(a.type.vector)s[a.name]=[];else if(a.type.isEnum){s[a.name]={}}else a.type.isStruct&&(s[a.name]=e.parseFields(t.structs[a.type.name].fields));else s[a.name]=""})),e.inParam=JSON.stringify(s,null,4)}))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},doDebug:function(){var t=this,e=this.$Loading.show();this.$ajax.postJSON("/server/api/interface_test",{id:this.selectedId,application:this.serverData.application,server_name:this.serverData.server_name,file_name:this.selectedFileName,module_name:this.selectedMethods[0],interface_name:this.selectedMethods[1],function_name:this.selectedMethods[2],params:this.inParam,objName:this.objName}).then((function(a){e.hide(),t.outParam=a})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.message||a.err_msg))}))},deleteTestCase:function(t){var e=this;this.$confirm(this.$t("inf.dlg.deleteMsg"),this.$t("common.alert")).then((function(){var a=e.$Loading.show();e.$ajax.getJSON("/server/api/delete_test_case",{case_id:t}).then((function(t){a.hide(),e.getTestCaseListInner(e.pageNum)})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))})).catch((function(){}))},gotoAddTestCase:function(){this.addTestCase=!0,this.showCaseList=!1,this.selectedFileName=this.rowData.file_name,this.inParam="",this.outParam="",this.selectedId=this.rowData.f_id,this.objName="",this.testCastName="",this.selectedMethods=[],this.getContextData(this.rowData.f_id),this.getObjList()},getTestCaseListInner:function(t){var e=this,a=this.$Loading.show();this.showCaseList=!0,this.$ajax.getJSON("/server/api/get_testcase_list",{f_id:this.selectedId,application:this.serverData.application,server_name:this.serverData.server_name,page_size:this.pageSize,curr_page:t}).then((function(r){a.hide(),e.pageNum=t,e.total=Math.ceil(r.count/e.pageSize),e.testCaseList=r.rows})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("get_testcase_list.failed"),": ").concat(t.err_msg||t.message))}))},gotoPage:function(t){this.getTestCaseListInner(t)},getTestCaseList:function(t){this.rowData=t,this.showCaseList=!0,this.testCaseList=[],this.selectedFileName=t.file_name,this.inParam=null,this.outParam=null,this.selectedId=t.f_id,this.objName=null,this.priorSet=null,this.selectedMethods=[],this.getContextData(t.f_id),this.getObjList(),this.getTestCaseListInner(1)},getTestCaseByParams:function(t){this.selectedMethods=t,3==t.length&&this.getTestCaseListInner(1)},doAddTestCast:function(){var t=this,e=this.$Loading.show();this.$ajax.postJSON("/server/api/interface_add_testcase",{f_id:this.selectedId,application:this.serverData.application,server_name:this.serverData.server_name,file_name:this.selectedFileName,module_name:this.selectedMethods[0],interface_name:this.selectedMethods[1],function_name:this.selectedMethods[2],params:this.inParam,test_case_name:this.testCastName,objName:this.objName}).then((function(a){e.hide(),t.addTestCase=!1,t.getTestCaseListInner(t.pageNum)})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.message||a.err_msg))}))},getServerList:function(){var t=this,e=this.$Loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.treeid}).then((function(a){e.hide();var r=a||[];r.forEach((function(t){t.isChecked=!1})),t.totalServerList=r})).catch((function(a){e.hide(),t.$confirm(a.err_msg||a.message||t.$t("serverList.table.msg.fail")).then((function(){t.getServerList()}))}))},gotoModify:function(t){this.modifyCaseItem=t,this.modifyTestCase=!0,this.showCaseList=!1,this.inParam=t.context,this.testCastName=t.test_case_name},doModifyTestCase:function(){var t=this,e=this.$Loading.show();this.$ajax.postJSON("/server/api/modify_test_case",{case_id:this.modifyCaseItem.case_id,params:this.inParam,test_case_name:this.testCastName}).then((function(a){e.hide(),t.modifyTestCase=!1,t.getTestCaseListInner(t.pageNum)})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.message||a.err_msg))}))},doNodedebug:function(t,e){var a=this,r=this.$Loading.show();this.$ajax.getJSON("/server/api/adapter_conf_list",{id:t.id}).then((function(t){var s,n={},o=Object(i["a"])(t);try{for(o.s();!(s=o.n()).done;){var l=s.value;n[l.servant]=l.endpoint}}catch(c){o.e(c)}finally{o.f()}a.$ajax.postJSON("/server/api/interface_test",{id:a.selectedId,application:a.serverData.application,server_name:a.serverData.server_name,file_name:a.selectedFileName,module_name:e.module_name,interface_name:e.interface_name,function_name:e.function_name,params:e.context,objName:e.object_name+"@"+n[e.object_name]}).then((function(t){r.hide(),a.debugModal.show=!0,a.debugModal.resultParam=JSON.stringify(JSON.parse(t),null,4)})).catch((function(t){r.hide(),a.debugModal.show=!0,a.debugModal.resultParam=t.message||t.err_msg}))})).catch((function(t){r.hide(),a.$tip.error("".concat(a.$t("serverList.restart.failed"),": ").concat(t.err_msg||t.message))}))}},created:function(){this.serverData=this.$parent.getServerData(),this.getObjList()},mounted:function(){this.getFileList(),this.getBmInstalled(),this.getServerList()}},k=$,x=(a("5e39"),Object(_["a"])(k,r,s,!1,null,"8a83376a",null));e["a"]=x.exports},c44a:function(t,e,a){},c9e9:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page_server_server_monitor"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(e){return e.preventDefault(),t.search(e)}}},[a("let-form-item",{attrs:{label:t.$t("monitor.search.a")}},[a("let-date-picker",{attrs:{size:"small",formatter:t.formatter},model:{value:t.query.thedate,callback:function(e){t.$set(t.query,"thedate",e)},expression:"query.thedate"}})],1),a("let-form-item",{attrs:{label:t.$t("monitor.search.b")}},[a("let-date-picker",{attrs:{size:"small",formatter:t.formatter},model:{value:t.query.predate,callback:function(e){t.$set(t.query,"predate",e)},expression:"query.predate"}})],1),a("let-form-item",{attrs:{label:t.$t("monitor.search.start")}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.startshowtime,callback:function(e){t.$set(t.query,"startshowtime",e)},expression:"query.startshowtime"}})],1),a("let-form-item",{attrs:{label:t.$t("monitor.search.end")}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.endshowtime,callback:function(e){t.$set(t.query,"endshowtime",e)},expression:"query.endshowtime"}})],1),a("tars-form-item",{attrs:{label:t.$t("monitor.search.interfaceName")},on:{onLabelClick:function(e){return t.groupBy("interface_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.interface_name,callback:function(e){t.$set(t.query,"interface_name",e)},expression:"query.interface_name"}})],1),a("tars-form-item",{attrs:{label:t.$t("monitor.search.master")},on:{onLabelClick:function(e){return t.groupBy("master_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.master_name,callback:function(e){t.$set(t.query,"master_name",e)},expression:"query.master_name"}})],1),a("tars-form-item",{attrs:{label:t.$t("monitor.search.slave")},on:{onLabelClick:function(e){return t.groupBy("slave_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.slave_name,callback:function(e){t.$set(t.query,"slave_name",e)},expression:"query.slave_name"}})],1),a("tars-form-item",{attrs:{label:t.$t("monitor.search.masterIP")},on:{onLabelClick:function(e){return t.groupBy("master_ip")}}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.master_ip,callback:function(e){t.$set(t.query,"master_ip",e)},expression:"query.master_ip"}})],1),a("tars-form-item",{attrs:{label:t.$t("monitor.search.slaveIP")},on:{onLabelClick:function(e){return t.groupBy("slave_ip")}}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.slave_ip,callback:function(e){t.$set(t.query,"slave_ip",e)},expression:"query.slave_ip"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[t._v(t._s(t.$t("operate.search")))])],1)],1),t.showChart?a("let-row",{ref:"charts",staticClass:"charts"},t._l(t.charts,(function(e){return a("let-col",{key:e.title,attrs:{span:12}},[t.allItems.length>0?a("compare-chart",t._b({},"compare-chart",e,!1)):t._e()],1)})),1):t._e(),t.enableHourFilter?a("hours-filter",{model:{value:t.hour,callback:function(e){t.hour=e},expression:"hour"}}):t._e(),a("let-table",{ref:"table",attrs:{data:t.pagedItems,"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("common.time"),width:"90px"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.show_time||e.row.show_date))]}}])}),a("let-table-column",{attrs:{title:t.$t("monitor.search.master")},scopedSlots:t._u([{key:"default",fn:function(e){return["%"!=e.row.master_name?a("span",[t._v(t._s(e.row.master_name))]):t._e(),"%"==e.row.master_name?a("span",{staticClass:"btn-link",on:{click:function(a){return t.groupBy("master_name",e.row)}}},[t._v(t._s(e.row.master_name))]):t._e()]}}])}),a("let-table-column",{attrs:{title:t.$t("monitor.search.slave")},scopedSlots:t._u([{key:"default",fn:function(e){return["%"!=e.row.slave_name?a("span",[t._v(t._s(e.row.slave_name))]):t._e(),"%"==e.row.slave_name?a("span",{staticClass:"btn-link",on:{click:function(a){return t.groupBy("slave_name",e.row)}}},[t._v(t._s(e.row.slave_name))]):t._e()]}}])}),a("let-table-column",{attrs:{title:t.$t("monitor.search.interfaceName")},scopedSlots:t._u([{key:"default",fn:function(e){return["%"!=e.row.interface_name?a("span",[t._v(t._s(e.row.interface_name))]):t._e(),"%"==e.row.interface_name?a("span",{staticClass:"btn-link",on:{click:function(a){return t.groupBy("interface_name",e.row)}}},[t._v(t._s(e.row.interface_name))]):t._e()]}}])}),a("let-table-column",{attrs:{title:t.$t("monitor.search.masterIP")},scopedSlots:t._u([{key:"default",fn:function(e){return["%"!=e.row.master_ip?a("span",[t._v(t._s(e.row.master_ip))]):t._e(),"%"==e.row.master_ip?a("span",{staticClass:"btn-link",on:{click:function(a){return t.groupBy("master_ip",e.row)}}},[t._v(t._s(e.row.master_ip))]):t._e()]}}])}),a("let-table-column",{attrs:{title:t.$t("monitor.search.slaveIP")},scopedSlots:t._u([{key:"default",fn:function(e){return["%"!=e.row.slave_ip?a("span",[t._v(t._s(e.row.slave_ip))]):t._e(),"%"==e.row.slave_ip?a("span",{staticClass:"btn-link",on:{click:function(a){return t.groupBy("slave_ip",e.row)}}},[t._v(t._s(e.row.slave_ip))]):t._e()]}}])}),a("let-table-column",{attrs:{prop:"the_total_count",align:"right"},scopedSlots:t._u([{key:"head",fn:function(e){return a("span",{},[t._v(t._s(t.$t("monitor.table.curr"))),a("br"),t._v(t._s(t.$t("monitor.table.total")))])}}])}),a("let-table-column",{attrs:{prop:"pre_total_count",align:"right"},scopedSlots:t._u([{key:"head",fn:function(e){return a("span",{},[t._v(t._s(t.$t("monitor.table.contrast"))),a("br"),t._v(t._s(t.$t("monitor.table.total")))])}}])}),a("let-table-column",{attrs:{prop:"total_count_wave",align:"right"},scopedSlots:t._u([{key:"head",fn:function(e){return a("span",{},[t._v(t._s(t.$t("monitor.table.fluctuating")))])}}])}),a("let-table-column",{attrs:{align:"right"},scopedSlots:t._u([{key:"head",fn:function(e){return a("span",{},[t._v(t._s(t.$t("monitor.table.curr"))),a("br"),t._v(t._s(t.$t("monitor.table.a")))])}},{key:"default",fn:function(e){return[t._v(t._s(e.row.the_avg_time)+"ms")]}}])}),a("let-table-column",{attrs:{align:"right"},scopedSlots:t._u([{key:"head",fn:function(e){return a("span",{},[t._v(t._s(t.$t("monitor.table.contrast"))),a("br"),t._v(t._s(t.$t("monitor.table.a")))])}},{key:"default",fn:function(e){return[t._v(t._s(e.row.pre_avg_time)+"ms")]}}])}),a("let-table-column",{attrs:{prop:"the_fail_rate",align:"right"},scopedSlots:t._u([{key:"head",fn:function(e){return a("span",{},[t._v(t._s(t.$t("monitor.table.curr"))),a("br"),t._v(t._s(t.$t("monitor.table.b")))])}}])}),a("let-table-column",{attrs:{prop:"pre_fail_rate",align:"right"},scopedSlots:t._u([{key:"head",fn:function(e){return a("span",{},[t._v(t._s(t.$t("monitor.table.contrast"))),a("br"),t._v(t._s(t.$t("monitor.table.b")))])}}])}),a("let-table-column",{attrs:{prop:"the_timeout_rate",align:"right"},scopedSlots:t._u([{key:"head",fn:function(e){return a("span",{},[t._v(t._s(t.$t("monitor.table.curr"))),a("br"),t._v(t._s(t.$t("monitor.table.c")))])}}])}),a("let-table-column",{attrs:{prop:"pre_timeout_rate",align:"right"},scopedSlots:t._u([{key:"head",fn:function(e){return a("span",{},[t._v(t._s(t.$t("monitor.table.contrast"))),a("br"),t._v(t._s(t.$t("monitor.table.c")))])}}])}),t.pageCount?a("let-pagination",{attrs:{slot:"pagination",total:t.pageCount,page:t.page,sum:t.itemsCount,"show-sums":"",jump:""},on:{change:t.changePage},slot:"pagination"}):t._e()],1)],1)},s=[],n=(a("99af"),a("4de4"),a("4160"),a("d81d"),a("fb6a"),a("b64b"),a("ac1f"),a("1276"),a("159b"),a("5530")),i=a("2699"),o=a("0b18"),l=a("0abb"),c=20,u="YYYYMMDD",d=function(t){return t&&t.length>0?t.map((function(t){var e=Object(n["a"])({},t),a=Object.keys(t),r=/^pre_.*/,s=/^the_.*/;return a.forEach((function(a){(r.test(a)||s.test(a))&&"0.00%"===t[a]&&(e[a]="0")})),e})):t},m={name:"ServerPropertyMonitor",components:{HoursFilter:o["a"],CompareChart:l["a"]},data:function(){var t=this.treeid,e=t.split("."),a="",r=!0;return"/k8s.html"==location.pathname?(r=!0,2==e.length&&(a=e[0]+"."+e[1])):(r=!1,2==e.length?a=e[0].substring(1)+"."+e[1].substring(1):5==e.length&&(a=e[0].substring(1)+"."+e[4].substring(1)+"."+e[1].substring(1)+e[2].substring(1)+e[3].substring(1))),{query:{thedate:Object(i["b"])(new Date,"YYYYMMDD"),predate:Object(i["b"])(Date.now()-i["a"],"YYYYMMDD"),startshowtime:"0000",endshowtime:"2360",master_name:"",slave_name:a,interface_name:"",master_ip:"",slave_ip:"",group_by:"",k8s:r},formatter:u,allItems:[],hour:-1,page:1,showChart:!0}},props:["treeid"],computed:{enableHourFilter:function(){return this.allItems.length&&this.allItems[0].show_time},filteredItems:function(){var t=this.hour;return t>=0&&this.enableHourFilter?this.allItems.filter((function(e){return+e.show_time.slice(0,2)===t})):this.allItems},itemsCount:function(){return this.filteredItems.length},pageCount:function(){return Math.ceil(this.filteredItems.length/c)},pagedItems:function(){return this.filteredItems.slice(c*(this.page-1),c*this.page)},charts:function(){return[{title:this.$t("monitor.table.total"),timeColumn:"show_time",dataColumns:[{name:"the_total_count",label:this.$t("monitor.table.curr")},{name:"pre_total_count",label:this.$t("monitor.table.contrast")}],data:this.allItems},{title:this.$t("monitor.table.a"),timeColumn:"show_time",dataColumns:[{name:"the_avg_time",label:this.$t("monitor.table.curr")},{name:"pre_avg_time",label:this.$t("monitor.table.contrast")}],data:this.allItems},{title:this.$t("monitor.table.b"),timeColumn:"show_time",dataColumns:[{name:"the_fail_rate",label:this.$t("monitor.table.curr")},{name:"pre_fail_rate",label:this.$t("monitor.table.contrast")}],data:this.allItems},{title:this.$t("monitor.table.c"),timeColumn:"show_time",dataColumns:[{name:"the_timeout_rate",label:this.$t("monitor.table.curr")},{name:"pre_timeout_rate",label:this.$t("monitor.table.contrast")}],data:this.allItems}]},chartOptions:function(){return{title:{show:!0,text:"".concat(this.$t("monitor.table.curr")," ").concat(this.$t("monitor.table.total"))},grid:{bottom:40,top:50},legend:{top:5},settings:{labelMap:{the_value:this.$t("monitor.property.property"),pre_value:this.$t("monitor.property.propertyC")},scale:[!0,!1]},data:{columns:["show_time","the_value","pre_value"],rows:this.allItems}}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var t=this,e=this.$refs.chart&&this.$refs.chart.$loading.show(),a=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/stat_monitor_data",this.query).then((function(r){e&&e.hide(),a.hide(),t.allItems=d(r)})).catch((function(r){e&&e.hide(),a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(r.message||r.err_msg))}))},groupBy:function(t,e){this.query.group_by=t,this.showChart=!1,e&&(e.show_time&&(this.query.startshowtime=e.show_time,this.query.endshowtime=e.show_time),e.interface_name&&"%"!=e.interface_name&&(this.query.interface_name=e.interface_name),e.master_ip&&"%"!=e.master_ip&&(this.query.master_ip=e.master_ip),e.master_name&&"%"!=e.master_name&&(this.query.master_name=e.master_name),e.slave_ip&&"%"!=e.slave_ip&&(this.query.slave_ip=e.slave_ip),e.slave_name&&"%"!=e.slave_name&&(this.query.slave_name=e.slave_name)),this.fetchData()},search:function(){delete this.query.group_by,this.showChart=!0,this.fetchData()},changePage:function(t){this.page=t}}},f=m,p=(a("9bdc"),a("2877")),h=Object(p["a"])(f,r,s,!1,null,null,null);e["a"]=h.exports},cc08:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1ZDFiOTQyYS0zZWUyLTkxNGQtOTBiYS1iZTVkYzNjOTU1OTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzY4QUI4NjE2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzY4QUI4NjA2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjEwODNhYzItNzY4Yy02MjRkLWEyYWMtYTFiMTdmOTZhZmZhIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6NzRmMzZhYTgtODFhOC04ZTQ5LWExN2UtMDI2MDYwMWE2ZGMwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+1rWp/gAABUtJREFUeNrsWX9MVVUc/94HT/xVEiqIEgwVZCa0VGrZL1OJRUbRWouIWjUasqHJZq7VP23+mJUV9hudo9LppsV4IZbKVlKmYm7MRiiuhkgs5IGCwft13+1z7j338a7vPnn3wRVtfrcP57377rnnc8/5fH+cgyBJEt1IZqEbzG4SNtsi9S5utbWqHx8HVgOZwMQwxzgGLAH6Q+1QlJsU1gyvA2zAw8Mgy+we4FtgjJmSWA68CbiAVcBkQAgDKcAFIBuoBCJMkQSsjLdr9/4Wu2UYzz/79ILOLLQ/AfnARTyv5MqbcM+wZ3ghb7/iLVvOcsAOSCFiLesIgo1onuQaXgFy68yQxC287ebtO8BKIMbAszcCBZz0j3yGRSY1kF5ldlgrDOPZTMPbeaRhpJkDv8hn/wOQLjCTsG9mPyqKoh/eHie3IRiT0m4eKRjpndw/2MtUgnSu6YkjNcGiaUOw8cB3wDxO+kM0G7jD7wLph0wlfOa8V25beBuiTQX2AwmcNAuZn/GXqQYyhhvWglrpVme4/sLI1gJLeWwuBW4DngUOAYtYGLzeaol0Lo/xmGWRO+FBvgIH1BUYUcIGnS5Yqt7FHBKkXTxGs3ojma/AqDudnuXykCeANEsoOX4rcF04nZ4V8Gjhn6CGDu56WySUl+pFNgPEg70pBnkJ/mOitBT+/wX8UE7H9MukYTTEjbUSPbMoku5ItNCUaIGaz/lklXtfegzFTZYdmRVZXwInR4RwuE635gkrLZuvHS5hivwMVtznzU1W6y25yFrJI8lzo+J0FqiSkWXu8vtfXtqw20Wlnzvo8oAs2zz2Z0edm1ZXOOj7Bg/1O+Tr+TyxXPtM58X4Fy9LFD1RoE1VLuq8pPhw0cdOWjIvgs7bvXS0RZmApnY3zZpuoZQZsu+lAb8Oi7BRK1tupTRolpGVdew3YjdeYu9RT0Af6+BG6gugnqfuKtOjREVJFGVnRlJSnDJM7XEPnbMPHSE/rXWrcmGJpETVuakzXJKtEG1p99In+1zkdBP92RlaOG9s9dJL5U6Kj8ZebXYEvbDMqu4zq0wjPDdRWdftB9z0R3sg0TnxAuU/aKWkWIEGUFH80iTSzvpBefRihnsHiE53eFTC95s6w5P4SUZXXyDZWXECbSkeq70GR5seI9C71e7RKS+b2xSim1+JothJ2mxb9IhVtw8LfemJWkpvPOW792dTCW+udlFDs0i3ThDosfna8xPVCfUsI8miyYyL75RFwGLpClMJ35saQZlpCtGmNm2S6esP7nwXLg3+5kaJb1e+s5z9shHC3UYJ5yxU3GPHITcdO6slbNOJvfIg0Ht9s+j7LqLbxj2+RPWAEcJfGyU853ZFt98cFwN+qzkp0p7DWudq/cdLZduccsTwt1NtkuY0KliU6OOnPzF8dl/nZwmFevldz05joIyZAhVnRdL7NYGev63OQwcbRUqNt9C/TomOnNGvTVLjfQ576mqET5ByzFrIyz31FDPkI6aMmZa7WImYtUBJIA5wrqxzaWJya5cEiLr9X0NKT0a/aTGCJkoE23Gw4yUbJ7qGS6LHqCywe2C1wKvqdw+4Pf+eg3r6JaOlaDXfrAadYbYVX0/KGXE5h2FjJ/kWQaB4FOZLM6dSlNVCwhUboHFjKEC3s2f4XGsxP6toD6Vaewto4DK4G5gQDmkvVvBvu0MmyxbzUcTkmhMiifhcmhNJmQh/Xb0SVexHCu+QKGWaIL8Etw5/sleTxIjHZciDHU0VG+jCSsqsgKuM8DVEHmADeoBeYB+QCqwHDgN9wBFgU7BnCDf/E2qy/SfAAC62Smq8ek9cAAAAAElFTkSuQmCC"},d6c4:function(t,e,a){},dcab:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("section",{staticClass:"section"},[t._t("default")],2)},s=[],n=(a("33c3"),a("2877")),i={},o=Object(n["a"])(i,r,s,!1,null,"2643216f",null);e["a"]=o.exports},dd29:function(t,e,a){},e15a:function(t,e,a){},e166:function(t,e,a){"use strict";var r=a("8b32"),s=a.n(r);s.a},e1d2:function(t,e,a){"use strict";a.r(e),a.d(e,"post",(function(){return n})),a.d(e,"get",(function(){return i}));a("4160"),a("d3b7"),a("159b");var r=a("bc3a");r.interceptors.response.use((function(t){if(200==t.status&&-2==t.data.code&&(document.location.href="/login"),400===t.status&&t.data.errors.length>0){var e="";return t.data.errors.forEach((function(t){e+="".concat(t.message,"\n")})),Promise.reject(e)}return t}),(function(t){return console.log(t),Promise.reject(t)}));var s="";function n(t,e){return r.post(s+t,e).then((function(t){return t}))}function i(t,e){return r(s+t,e).then((function(t){return t}))}e["default"]=r},e3f3:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{width:"100%","margin-top":"30px"}},[t.gatewayObj?t._e():a("GatewayObjList",{on:{config:t.config}}),t.gatewayObj?a("let-tabs",[a("let-tab-pane",{attrs:{tab:t.$t("gateway.station")}},[a("Station",{attrs:{gatewayObj:t.gatewayObj}})],1),a("let-tab-pane",{attrs:{tab:t.$t("gateway.upstream")}},[a("Upstream",{attrs:{gatewayObj:t.gatewayObj}})],1),a("let-tab-pane",{attrs:{tab:t.$t("gateway.globalblack")}},[a("BwList",{attrs:{gatewayObj:t.gatewayObj,station:t.globalStation,type:"black"}})],1)],1):t._e(),t.gatewayObj?a("let-button",{attrs:{theme:"sub-primary"},on:{click:function(e){return t.switchGateway()}}},[t._v(t._s(t.$t("gateway.switchGateway")))]):t._e()],1)},s=[],n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page_operation_templates"},[a("div",{staticClass:"between"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(e){return e.preventDefault(),t.search(e)}}},[a("let-form-item",{attrs:{label:t.$t("gateway.stationId")}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.f_station_id,callback:function(e){t.$set(t.query,"f_station_id",e)},expression:"query.f_station_id"}})],1),a("let-form-item",{attrs:{label:t.$t("gateway.stationName")}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.f_name_cn,callback:function(e){t.$set(t.query,"f_name_cn",e)},expression:"query.f_name_cn"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[t._v(t._s(t.$t("operate.search")))])],1)],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:t.addItem}},[t._v(t._s(t.$t("gateway.btn.addGateway")))]),a("let-button",{staticStyle:{"margin-left":"20px"},attrs:{size:"small",theme:"primary"},on:{click:t.loadAll}},[t._v(t._s(t.$t("gateway.btn.loadAll")))])],1)],1),a("let-table",{ref:"table",attrs:{data:t.items,"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("gateway.stationId"),prop:"f_station_id",width:"20%"}}),a("let-table-column",{attrs:{title:t.$t("gateway.stationName"),prop:"f_name_cn",width:"20%"}}),a("let-table-column",{attrs:{title:t.$t("gateway.monitorUrl"),prop:"f_monitor_url",width:"25%"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.lastUpdate"),prop:"f_update_time"}}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"300px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.viewItem(e.row)}}},[t._v(t._s(t.$t("operate.config")))]),a("let-table-operation",{on:{click:function(a){return t.editItem(e.row)}}},[t._v(t._s(t.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return t.removeItem(e.row)}}},[t._v(t._s(t.$t("operate.delete")))])]}}])})],1),a("let-pagination",{attrs:{page:t.pageNum,total:t.total},on:{change:t.gotoPage}}),a("br"),a("let-modal",{attrs:{title:(t.viewModal.model?t.viewModal.model.f_name_cn:"")+" "+t.$t("gateway.config.title"),width:"1000px"},model:{value:t.viewModal.show,callback:function(e){t.$set(t.viewModal,"show",e)},expression:"viewModal.show"}},["http"==t.stationMode?a("let-tabs",[a("let-tab-pane",{attrs:{tab:t.$t("gateway.router.title")}},[t.viewModal.model?a("HttpRouter",{attrs:{gatewayObj:t.gatewayObj,station:t.viewModal.model}}):t._e()],1),a("let-tab-pane",{attrs:{tab:t.$t("gateway.flowControl.title")}},[t.viewModal.model?a("FlowControl",{attrs:{gatewayObj:t.gatewayObj,station:t.viewModal.model}}):t._e()],1),a("let-tab-pane",{attrs:{tab:t.$t("gateway.bwlist.title.black")}},[t.viewModal.model?a("BwList",{attrs:{gatewayObj:t.gatewayObj,station:t.viewModal.model,type:"black"}}):t._e()],1),a("let-tab-pane",{attrs:{tab:t.$t("gateway.bwlist.title.white")}},[t.viewModal.model?a("BwList",{attrs:{gatewayObj:t.gatewayObj,station:t.viewModal.model,type:"white"}}):t._e()],1)],1):t._e(),"tars"==t.stationMode?a("let-tabs",[a("let-tab-pane",{attrs:{tab:t.$t("gateway.flowControl.title")}},[t.viewModal.model?a("FlowControl",{attrs:{gatewayObj:t.gatewayObj,station:t.viewModal.model}}):t._e()],1),a("let-tab-pane",{attrs:{tab:t.$t("gateway.bwlist.title.black")}},[t.viewModal.model?a("BwList",{attrs:{gatewayObj:t.gatewayObj,station:t.viewModal.model,type:"black"}}):t._e()],1),a("let-tab-pane",{attrs:{tab:t.$t("gateway.bwlist.title.white")}},[t.viewModal.model?a("BwList",{attrs:{gatewayObj:t.gatewayObj,station:t.viewModal.model,type:"white"}}):t._e()],1)],1):t._e(),a("div",{attrs:{slot:"foot"},slot:"foot"})],1),a("let-modal",{attrs:{title:t.detailModal.isNew?this.$t("gateway.add.title"):this.$t("gateway.update.title"),width:"800px"},on:{"on-confirm":t.saveItem,"on-cancel":t.closeDetailModal},model:{value:t.detailModal.show,callback:function(e){t.$set(t.detailModal,"show",e)},expression:"detailModal.show"}},[t.detailModal.model?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:t.$t("gateway.stationId"),required:""}},[a("let-radio",{attrs:{label:"http"},model:{value:t.stationMode,callback:function(e){t.stationMode=e},expression:"stationMode"}},[t._v("http")]),a("let-radio",{attrs:{label:"tars"},model:{value:t.stationMode,callback:function(e){t.stationMode=e},expression:"stationMode"}},[t._v("tars")]),"http"==t.stationMode?a("let-input",{attrs:{size:"small",placeholder:t.$t("gateway.add.idFormatTips"),required:"","required-tip":t.$t("gateway.add.idFormatTips"),pattern:"^[a-zA-Z](([a-zA-Z_0-9](?<!obj|Obj))+)?$","pattern-tip":t.$t("gateway.add.idFormatTips")},model:{value:t.detailModal.model.f_station_id,callback:function(e){t.$set(t.detailModal.model,"f_station_id",e)},expression:"detailModal.model.f_station_id"}}):t._e(),"tars"==t.stationMode?a("ServantSelector",{attrs:{gatewayObj:t.gatewayObj},model:{value:t.detailModal.model.f_station_id,callback:function(e){t.$set(t.detailModal.model,"f_station_id",e)},expression:"detailModal.model.f_station_id"}}):t._e()],1),a("let-form-item",{attrs:{label:t.$t("gateway.stationName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:t.$t("gateway.add.stationNameTips"),required:"","required-tip":t.$t("gateway.add.stationNameTips"),"pattern-tip":t.$t("gateway.add.stationNameTips")},model:{value:t.detailModal.model.f_name_cn,callback:function(e){t.$set(t.detailModal.model,"f_name_cn",e)},expression:"detailModal.model.f_name_cn"}})],1),a("let-form-item",{attrs:{label:t.$t("gateway.monitorUrl")}},[a("let-input",{attrs:{size:"small",placeholder:t.$t("gateway.add.monitorUrlTips"),"pattern-tip":t.$t("gateway.add.monitorUrlTips")},model:{value:t.detailModal.model.f_monitor_url,callback:function(e){t.$set(t.detailModal.model,"f_monitor_url",e)},expression:"detailModal.model.f_monitor_url"}})],1)],1):t._e()],1)],1)},i=[],o=(a("99af"),a("ac1f"),a("8a79"),a("5319"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page_operation_bwlist"},[a("div",{staticClass:"between"},[a("let-form",{ref:"detailForm",attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(e){return e.preventDefault(),t.addItem(e)}}},[a("let-form-item",{attrs:{label:"IP",required:""}},[a("let-input",{attrs:{size:"small",placeholder:t.$t("gateway.bwlist.ipTip"),required:"","required-tip":t.$t("gateway.bwlist.ipTip"),pattern:"^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9]|\\*)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d|\\*)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d|\\*)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d|\\*)$","pattern-tip":t.$t("gateway.bwlist.ipTip")},model:{value:t.form.f_ip,callback:function(e){t.$set(t.form,"f_ip",e)},expression:"form.f_ip"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[t._v(t._s(t.$t("operate.add")))])],1),a("let-form-item")],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:t.loadAll}},[t._v(t._s(t.$t("gateway.btn.loadAll")))])],1)],1),a("let-table",{ref:"table",attrs:{data:t.items,"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"IP",prop:"f_ip",width:"300px"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.lastUpdate"),prop:"f_update_time"}}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"80px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.removeItem(e.row)}}},[t._v(t._s(t.$t("operate.delete")))])]}}])})],1)],1)}),l=[],c={name:"BwList",props:{station:{type:Object,required:!0},type:{type:String,required:!0},gatewayObj:{type:String,required:!0}},data:function(){return{items:[],form:{f_ip:""}}},methods:{fetchData:function(){var t=this;return this.$ajax.getJSON("/gateway/api/bwlist",{f_station_id:this.station.f_station_id,type:this.type,gatewayObj:this.gatewayObj}).then((function(e){t.items=e})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},loadAll:function(){var t=this,e=this.$Loading.show();this.$ajax.postJSON("/gateway/api/loadAll_conf",{gatewayObj:this.gatewayObj,command:"loadAll"}).then((function(a){e.hide();var r=a[0].err_msg.replace(/\n/g,"<br>");if(0!==a[0].ret_code)throw new Error(r);var s={title:t.$t("common.success"),message:r,duration:0};t.$tip.success(s)})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.message||a.err_msg))}))},addItem:function(){var t=this;if(this.$refs.detailForm.validate()){var e=this.form;e.f_station_id=this.station.f_station_id,e.type=this.type;var a="/gateway/api/add_bwlist",r=this.$Loading.show();e.gatewayObj=this.gatewayObj,this.$ajax.postJSON(a,e).then((function(){r.hide(),t.$tip.success(t.$t("common.success")),t.form.f_ip="",t.fetchData()})).catch((function(e){r.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}},removeItem:function(t){var e=this;this.$confirm(this.$t("gateway.delete.bwListConfirmTips"),this.$t("common.alert")).then((function(){var a=e.$Loading.show();e.$ajax.postJSON("/gateway/api/delete_bwlist",{f_id:t.f_id,type:e.type,gatewayObj:e.gatewayObj}).then((function(){a.hide(),e.fetchData().then((function(){e.$tip.success(e.$t("common.success"))}))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))})).catch((function(){}))}},watch:{station:function(){this.items=[],this.fetchData()}},mounted:function(){this.fetchData()}},u=c,d=(a("235c"),a("2877")),m=Object(d["a"])(u,o,l,!1,null,"3a99c38a",null),f=m.exports,p=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("let-form",{ref:"detailForm",attrs:{itemWidth:"200px"},nativeOn:{submit:function(e){return e.preventDefault(),t.saveItem(e)}}},[a("let-form-item",{attrs:{label:t.$t("gateway.flowControl.duration"),required:""}},[a("let-input",{attrs:{size:"small",type:"number",disabled:!t.editing,placeholder:t.$t("gateway.flowControl.durationTip"),required:"","required-tip":t.$t("gateway.flowControl.durationTip"),pattern:"^\\d+$","pattern-tip":t.$t("gateway.flowControl.durationTip")},model:{value:t.form.f_duration,callback:function(e){t.$set(t.form,"f_duration",e)},expression:"form.f_duration"}})],1),a("let-form-item",{attrs:{label:t.$t("gateway.flowControl.maxFlow"),required:""}},[a("let-input",{attrs:{size:"small",type:"number",disabled:!t.editing,placeholder:t.$t("gateway.flowControl.maxFlowTip"),required:"","required-tip":t.$t("gateway.flowControl.maxFlowTip"),pattern:"^\\d+$","pattern-tip":t.$t("gateway.flowControl.maxFlowTip")},model:{value:t.form.f_max_flow,callback:function(e){t.$set(t.form,"f_max_flow",e)},expression:"form.f_max_flow"}})],1),a("let-form-item",[t.editing?t._e():a("let-button",{attrs:{size:"small",type:"button",theme:"primary"},on:{click:function(e){e.preventDefault(),t.editing=!0}}},[t._v(t._s(t.$t("operate.modify")))]),t.editing?a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[t._v(t._s(t.$t("operate.save")))]):t._e()],1),a("let-form-item")],1)],1)},h=[],g={name:"FlowControl",props:{station:{type:Object,required:!0},gatewayObj:{type:String,required:!0}},data:function(){return{form:{f_duration:60,f_max_flow:0},editing:!1}},methods:{fetchData:function(){var t=this;return this.$ajax.getJSON("/gateway/api/get_flowcontrol",{f_station_id:this.station.f_station_id,gatewayObj:this.gatewayObj}).then((function(e){t.form=e.f_duration?e:{f_duration:60,f_max_flow:0}})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},saveItem:function(){var t=this;if(this.$refs.detailForm.validate()){var e=this.form;e.f_station_id=this.station.f_station_id;var a="/gateway/api/upsert_flowcontrol",r=this.$Loading.show();e.gatewayObj=this.gatewayObj,this.$ajax.postJSON(a,e).then((function(){r.hide(),t.$tip.success(t.$t("common.success")),t.fetchData(),t.editing=!1})).catch((function(e){r.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}}},watch:{station:function(){this.items=[],this.fetchData()}},mounted:function(){this.fetchData()}},v=g,b=Object(d["a"])(v,p,h,!1,null,"477f3872",null),_=b.exports,w=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page_operation_templates"},[a("div",{staticClass:"between"},[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:t.addItem}},[t._v(t._s(t.$t("gateway.btn.addHttpRouter")))])],1),a("let-table",{ref:"table",attrs:{data:t.items,"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("gateway.serverName"),prop:"f_server_name",width:"20%"}}),a("let-table-column",{attrs:{title:t.$t("gateway.pathRule"),prop:"f_path_rule",width:"20%"}}),a("let-table-column",{attrs:{title:t.$t("gateway.proxyPass"),prop:"f_proxy_pass",width:"25%"}}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.lastUpdate"),prop:"f_update_time",width:"160px"}}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"100px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.editItem(e.row)}}},[t._v(t._s(t.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return t.removeItem(e.row)}}},[t._v(t._s(t.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:t.detailModal.isNew?this.$t("gateway.btn.addHttpRouter"):this.$t("gateway.update.routerTitle"),width:"900px"},on:{"on-confirm":t.saveItem,"on-cancel":t.closeDetailModal},model:{value:t.detailModal.show,callback:function(e){t.$set(t.detailModal,"show",e)},expression:"detailModal.show"}},[t.detailModal.model?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:t.$t("gateway.serverName")}},[a("let-input",{attrs:{size:"small",placeholder:t.$t("gateway.add.serverNameTip")},model:{value:t.detailModal.model.f_server_name,callback:function(e){t.$set(t.detailModal.model,"f_server_name",e)},expression:"detailModal.model.f_server_name"}})],1),a("let-form-item",{attrs:{label:t.$t("gateway.pathRule"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:t.$t("gateway.add.pathRuleTip"),required:"","required-tip":t.$t("gateway.add.pathRuleTip"),"pattern-tip":t.$t("gateway.add.pathRuleTip")},model:{value:t.detailModal.model.f_path_rule,callback:function(e){t.$set(t.detailModal.model,"f_path_rule",e)},expression:"detailModal.model.f_path_rule"}})],1),a("let-form-item",{attrs:{label:t.$t("gateway.proxyPass"),required:""}},[a("let-radio",{attrs:{label:"ipport"},model:{value:t.proxypassMode,callback:function(e){t.proxypassMode=e},expression:"proxypassMode"}},[t._v("ip:port")]),a("let-radio",{attrs:{label:"upstream"},model:{value:t.proxypassMode,callback:function(e){t.proxypassMode=e},expression:"proxypassMode"}},[t._v("upstream")]),a("let-radio",{attrs:{label:"tars"},model:{value:t.proxypassMode,callback:function(e){t.proxypassMode=e},expression:"proxypassMode"}},[t._v("tars")]),"ipport"==t.proxypassMode?a("div",{staticClass:"set_upstream"},[a("let-input",{attrs:{size:"small",placeholder:t.$t("gateway.add.proxyPassTip"),pattern:"^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d):\\d+$",required:"","required-tip":t.$t("gateway.add.proxyPassTip"),"pattern-tip":t.$t("gateway.add.proxyPassTip")},model:{value:t.detailModal.model.f_proxy_pass,callback:function(e){t.$set(t.detailModal.model,"f_proxy_pass",e)},expression:"detailModal.model.f_proxy_pass"}}),a("let-input",{attrs:{size:"small",placeholder:"/some/path",pattern:"^\\/","pattern-tip":"/some/path"},model:{value:t.detailModal.model.f_proxy_pass_path,callback:function(e){t.$set(t.detailModal.model,"f_proxy_pass_path",e)},expression:"detailModal.model.f_proxy_pass_path"}})],1):t._e(),"upstream"==t.proxypassMode?a("div",{staticClass:"set_upstream"},[a("let-select",{attrs:{size:"small",filterable:""},model:{value:t.detailModal.model.f_proxy_pass_upstream,callback:function(e){t.$set(t.detailModal.model,"f_proxy_pass_upstream",e)},expression:"detailModal.model.f_proxy_pass_upstream"}},t._l(t.upstreams,(function(e){return a("let-option",{key:e,attrs:{value:e}},[t._v(" "+t._s(e)+" ")])})),1),a("let-input",{attrs:{size:"small",placeholder:"/some/path",pattern:"^\\/","pattern-tip":"/some/path"},model:{value:t.detailModal.model.f_proxy_pass_path,callback:function(e){t.$set(t.detailModal.model,"f_proxy_pass_path",e)},expression:"detailModal.model.f_proxy_pass_path"}})],1):t._e(),"tars"==t.proxypassMode&&t.detailModal.model?a("ServantSelector",{attrs:{gatewayObj:t.gatewayObj},model:{value:t.detailModal.model.f_proxy_pass,callback:function(e){t.$set(t.detailModal.model,"f_proxy_pass",e)},expression:"detailModal.model.f_proxy_pass"}}):t._e()],1)],1):t._e()],1)],1)},y=[],$=(a("a630"),a("d81d"),a("d3b7"),a("6062"),a("3ca3"),a("1276"),a("498a"),a("ddb0"),a("3835")),k=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"select_wrapper"},[a("let-select",{staticClass:"select_item select_app",attrs:{size:"small"},on:{change:function(e){return t.changeSelect("application")}},model:{value:t.application,callback:function(e){t.application=e},expression:"application"}},t._l(t.applications,(function(e){return a("let-option",{key:e,attrs:{value:e}},[t._v(" "+t._s(e)+" ")])})),1),a("let-select",{staticClass:"select_item select_server",attrs:{size:"small"},on:{change:function(e){return t.changeSelect("server_name")}},model:{value:t.server_name,callback:function(e){t.server_name=e},expression:"server_name"}},t._l(t.serverNames,(function(e){return a("let-option",{key:e,attrs:{value:e}},[t._v(" "+t._s(e)+" ")])})),1),a("let-select",{staticClass:"select_item  select_obj",attrs:{size:"small"},on:{change:function(e){return t.changeSelect("obj")}},model:{value:t.obj,callback:function(e){t.obj=e},expression:"obj"}},t._l(t.objs,(function(e){return a("let-option",{key:e,attrs:{value:e}},[t._v(" "+t._s(e)+" ")])})),1)],1)},x=[],C=(a("c975"),a("fb6a"),{name:"ServantSelector",model:{prop:"servant",event:"input"},props:{servant:String,gatewayObj:{type:String,required:!0}},data:function(){return{applications:[],serverNames:[],objs:[],application:"",server_name:"",obj:""}},methods:{changeSelect:function(t){var e=this;switch(t){case"application":this.serverNames=[],this.application&&this.getCascadeSelectServer({level:2,application:this.application},this.$t("common.error")).then((function(t){e.serverNames=t,e.serverNames.indexOf(e.server_name)<0&&(e.server_name="")}));break;case"server_name":this.objs=[],this.server_name&&this.getCascadeSelectServer({level:5,application:this.application,server_name:this.server_name},this.$t("common.error")).then((function(t){e.objs=t.map((function(t){return t.split(".").slice(-1)[0]})),e.objs.indexOf(e.obj)<0&&(e.obj="")}));break;case"obj":this.obj&&this.$emit("input","".concat(this.application,".").concat(this.server_name,".").concat(this.obj));break;default:break}},getCascadeSelectServer:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("common.error");return t.gatewayObj=this.gatewayObj,this.$ajax.getJSON("/server/api/cascade_select_server",t).then((function(t){return t})).catch((function(t){e.$tip.error("".concat(a,": ").concat(t.message||t.err_msg))}))},initData:function(){if(this.servant&&/^[^.]+.[^.]+.[^.]+obj$/i.test(this.servant)){var t=this.servant.split(".");this.application=t[0]||"",this.server_name=t[1]||"",this.obj=t[2]||""}}},mounted:function(){var t=this;this.initData(),this.getCascadeSelectServer({level:1},this.$t("common.error")).then((function(e){t.applications=e}))},watch:{servant:function(){this.initData()}}}),M=C,j=(a("0585"),Object(d["a"])(M,k,x,!1,null,"eafc7750",null)),S=j.exports,N=/(obj|Obj)$/,O=/^(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d):\d+/,D=/^http:\/\//,F={name:"HttpRouter",components:{ServantSelector:S},props:{station:{type:Object,required:!0},gatewayObj:{type:String,required:!0}},data:function(){return{items:[],upstreams:[],proxypassMode:"ipport",detailModal:{show:!1,model:null,isNew:!1}}},mounted:function(){this.fetchData(),this.fetchUpstreams()},methods:{fetchData:function(){var t=this,e=this.$refs.table.$loading.show();return this.$ajax.getJSON("/gateway/api/httprouter_list",{f_station_id:this.station.f_station_id,gatewayObj:this.gatewayObj}).then((function(a){e.hide(),t.items=a})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.message||a.err_msg))}))},fetchUpstreams:function(){var t=this;return this.$ajax.getJSON("/gateway/api/upstream_list",{gatewayObj:this.gatewayObj}).then((function(e){if(e&&e.rows){var a=e.rows.map((function(t){return t.f_upstream}));a=Array.from(new Set(a)),t.upstreams=a}})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.fetchUpstreams(),this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},editItem:function(t){if(this.fetchUpstreams(),t=Object.assign({},t),this.detailModal.model=t,this.detailModal.show=!0,this.detailModal.isNew=!1,t.f_proxy_pass=t.f_proxy_pass.replace(D,""),this.setProxypassMode(t),"upstream"==this.proxypassMode)t.f_proxy_pass_upstream=t.f_proxy_pass.split("/")[0],t.f_proxy_pass_path="/"+(t.f_proxy_pass.split("/")[1]||""),this.$nextTick((function(){document.querySelector(".set_upstream .let-select__filter__input").value=t.f_proxy_pass_upstream}));else if("ipport"==this.proxypassMode){var e=t.f_proxy_pass.split("/"),a=Object($["a"])(e,2),r=a[0],s=a[1];t.f_proxy_pass=r,t.f_proxy_pass_path="/"+(s||"")}},setProxypassMode:function(t){N.test(t.f_proxy_pass)?this.proxypassMode="tars":O.test(t.f_proxy_pass)?this.proxypassMode="ipport":this.proxypassMode="upstream"},saveItem:function(){var t=this;if(this.$refs.detailForm.validate()){var e=this.detailModal.model;e.f_station_id=this.station.f_station_id;var a=e.f_id?"/gateway/api/update_httprouter":"/gateway/api/add_httprouter",r=this.$Loading.show(),s=Object.assign({},e);if("upstream"==this.proxypassMode){var n=document.querySelector(".set_upstream .let-select__filter__input").value.trim();s.f_proxy_pass_upstream=n,s.f_proxy_pass="".concat(s.f_proxy_pass_upstream).concat(s.f_proxy_pass_path||"")}else"ipport"==this.proxypassMode&&(s.f_proxy_pass="".concat(s.f_proxy_pass).concat(s.f_proxy_pass_path||""));D.test(s.f_proxy_pass)||(s.f_proxy_pass="http://"+s.f_proxy_pass),s.gatewayObj=this.gatewayObj,this.$ajax.postJSON(a,s).then((function(){r.hide(),t.$tip.success(t.$t("common.success")),t.closeDetailModal(),t.fetchData()})).catch((function(e){r.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}},removeItem:function(t){var e=this;this.$confirm(this.$t("gateway.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=e.$Loading.show();e.$ajax.postJSON("/gateway/api/delete_httprouter",{f_id:t.f_id,gatewayObj:e.gatewayObj}).then((function(){a.hide(),e.fetchData().then((function(){e.$tip.success(e.$t("common.success"))}))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))})).catch((function(){}))}},watch:{station:function(){this.items=[],this.fetchData()}}},I=F,A=(a("5da8"),Object(d["a"])(I,w,y,!1,null,"294e7236",null)),L=A.exports,R={name:"Station",components:{BwList:f,FlowControl:_,HttpRouter:L,ServantSelector:S},props:{gatewayObj:{type:String,required:!0}},data:function(){return{query:{f_station_id:"",f_name_cn:""},items:[],stationMode:"http",viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1},pageNum:1,pageSize:12,total:1}},mounted:function(){this.fetchData(1)},methods:{gotoPage:function(t){this.fetchData(t)},fetchData:function(t){var e=this;t&&"number"==typeof t||(t=this.pageNum||1);var a=this.$refs.table.$loading.show();return this.query.gatewayObj=this.gatewayObj,this.query.page_size=this.pageSize,this.query.curr_page=t,this.$ajax.getJSON("/gateway/api/station_list",this.query).then((function(r){a.hide(),e.pageNum=t,e.total=Math.ceil(r.count/e.pageSize),e.items=r.rows})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},loadAll:function(){var t=this,e=this.$Loading.show();this.$ajax.postJSON("/gateway/api/loadAll_conf",{gatewayObj:this.gatewayObj,command:"loadAll"}).then((function(a){e.hide();var r=a[0].err_msg.replace(/\n/g,"<br>");if(0!==a[0].ret_code)throw new Error(r);var s={title:t.$t("common.success"),message:r,duration:0};t.$tip.success(s)})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.message||a.err_msg))}))},viewItem:function(t){this.viewModal.model=t,this.setStationMode(t),this.viewModal.show=!0},editItem:function(t){this.detailModal.model=t,this.setStationMode(t),this.detailModal.show=!0,this.detailModal.isNew=!1},setStationMode:function(t){t.f_station_id.endsWith("obj")||t.f_station_id.endsWith("Obj")?this.stationMode="tars":this.stationMode="http"},saveItem:function(){var t=this;if(this.$refs.detailForm.validate()){var e=this.detailModal.model,a=e.f_id?"/gateway/api/update_station":"/gateway/api/add_station",r=this.$Loading.show();e.gatewayObj=this.gatewayObj,this.$ajax.postJSON(a,e).then((function(){r.hide(),t.$tip.success(t.$t("common.success")),t.closeDetailModal(),t.fetchData()})).catch((function(e){r.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}},removeItem:function(t){var e=this;this.$confirm(this.$t("gateway.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=e.$Loading.show();e.$ajax.postJSON("/gateway/api/delete_station",{f_id:t.f_id,gatewayObj:e.gatewayObj}).then((function(){a.hide(),e.fetchData().then((function(){e.$tip.success(e.$t("common.success"))}))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))})).catch((function(t){console.error(t)}))}}},T=R,E=(a("c047"),Object(d["a"])(T,n,i,!1,null,"e7b76f44",null)),z=E.exports,B=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page_operation_templates"},[a("div",{staticClass:"between"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(e){return e.preventDefault(),t.search(e)}}},[a("let-form-item",{attrs:{label:"upstream"}},[a("let-input",{attrs:{size:"small"},model:{value:t.query.f_upstream,callback:function(e){t.$set(t.query,"f_upstream",e)},expression:"query.f_upstream"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[t._v(t._s(t.$t("operate.search")))])],1)],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:t.addItem}},[t._v(t._s(t.$t("gateway.btn.addUpstream")))]),a("let-button",{staticStyle:{"margin-left":"20px"},attrs:{size:"small",theme:"primary"},on:{click:t.loadAll}},[t._v(t._s(t.$t("gateway.btn.loadAll")))])],1)],1),a("let-table",{ref:"table",attrs:{data:t.items,"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"upstream",prop:"f_upstream",width:"20%"}}),a("let-table-column",{attrs:{title:t.$t("gateway.addr"),prop:"f_addr",width:"20%"}}),a("let-table-column",{attrs:{title:t.$t("gateway.weight"),prop:"f_weight"}}),a("let-table-column",{attrs:{title:t.$t("gateway.fusing"),prop:"f_fusing_onoff"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(1==e.row.f_fusing_onoff?t.$t("gateway.fusingOn"):t.$t("gateway.fusingOff")))])]}}])}),a("let-table-column",{attrs:{title:t.$t("cfg.btn.lastUpdate"),prop:"f_update_time"}}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"200px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.editItem(e.row)}}},[t._v(t._s(t.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return t.removeItem(e.row)}}},[t._v(t._s(t.$t("operate.delete")))])]}}])})],1),a("let-pagination",{attrs:{page:t.pageNum,total:t.total},on:{change:t.gotoPage}}),a("br"),a("let-modal",{attrs:{title:t.detailModal.isNew?this.$t("gateway.btn.addUpstream"):this.$t("gateway.update.upstream"),width:"800px"},on:{"on-confirm":t.saveItem,"on-cancel":t.closeDetailModal},model:{value:t.detailModal.show,callback:function(e){t.$set(t.detailModal,"show",e)},expression:"detailModal.show"}},[t.detailModal.model?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:"upstream",required:""}},[a("let-input",{attrs:{size:"small",placeholder:t.$t("gateway.add.upstreamFormatTips"),required:"","required-tip":t.$t("gateway.add.upstreamFormatTips"),pattern:"^[a-zA-Z](([a-zA-Z0-9_](?<!obj|Obj))+)?$","pattern-tip":t.$t("gateway.add.upstreamFormatTips")},model:{value:t.detailModal.model.f_upstream,callback:function(e){t.$set(t.detailModal.model,"f_upstream",e)},expression:"detailModal.model.f_upstream"}})],1),a("let-form-item",{attrs:{label:t.$t("gateway.addr"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:t.$t("gateway.add.addrFormatTips"),required:"",pattern:"^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d):\\d+$","required-tip":t.$t("gateway.add.addrFormatTips"),"pattern-tip":t.$t("gateway.add.addrFormatTips")},model:{value:t.detailModal.model.f_addr,callback:function(e){t.$set(t.detailModal.model,"f_addr",e)},expression:"detailModal.model.f_addr"}})],1),a("let-form-item",{attrs:{label:t.$t("gateway.weight"),required:""}},[a("let-input",{attrs:{size:"small",type:"number",required:"",pattern:"^\\d+$","required-tip":t.$t("gateway.add.weightFormatTips"),placeholder:t.$t("gateway.add.weightFormatTips"),"pattern-tip":t.$t("gateway.add.weightFormatTips")},model:{value:t.detailModal.model.f_weight,callback:function(e){t.$set(t.detailModal.model,"f_weight",e)},expression:"detailModal.model.f_weight"}})],1),a("let-form-item",{attrs:{label:t.$t("gateway.fusing")}},[a("let-radio",{attrs:{label:1},model:{value:t.detailModal.model.f_fusing_onoff,callback:function(e){t.$set(t.detailModal.model,"f_fusing_onoff",e)},expression:"detailModal.model.f_fusing_onoff"}},[t._v(t._s(t.$t("gateway.fusingOn")))]),a("let-radio",{attrs:{label:0},model:{value:t.detailModal.model.f_fusing_onoff,callback:function(e){t.$set(t.detailModal.model,"f_fusing_onoff",e)},expression:"detailModal.model.f_fusing_onoff"}},[t._v(t._s(t.$t("gateway.fusingOff")))])],1)],1):t._e()],1)],1)},G=[],q={name:"Upstream",props:{gatewayObj:{type:String,required:!0}},data:function(){return{query:{f_upstream:""},items:[],detailModal:{show:!1,model:null,isNew:!1},pageNum:1,pageSize:12,total:1}},mounted:function(){this.fetchData(1)},methods:{gotoPage:function(t){this.fetchData(t)},fetchData:function(t){var e=this;t&&"number"==typeof t||(t=this.pageNum||1);var a=this.$refs.table.$loading.show();return this.query.gatewayObj=this.gatewayObj,this.query.page_size=this.pageSize,this.query.curr_page=t,this.$ajax.getJSON("/gateway/api/upstream_list",this.query).then((function(r){a.hide(),e.pageNum=t,e.total=Math.ceil(r.count/e.pageSize),e.items=r.rows})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},loadAll:function(){var t=this,e=this.$Loading.show();this.$ajax.postJSON("/gateway/api/loadAll_conf",{gatewayObj:this.gatewayObj,command:"loadAll"}).then((function(a){e.hide();var r=a[0].err_msg.replace(/\n/g,"<br>");if(0!==a[0].ret_code)throw new Error(r);var s={title:t.$t("common.success"),message:r,duration:0};t.$tip.success(s)})).catch((function(a){e.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.message||a.err_msg))}))},addItem:function(){this.detailModal.model={f_weight:1,f_fusing_onoff:1},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(t){this.viewModal.model=t,this.viewModal.show=!0},editItem:function(t){this.detailModal.model=t,this.detailModal.show=!0,this.detailModal.isNew=!1},saveItem:function(){var t=this;if(this.$refs.detailForm.validate()){var e=this.detailModal.model,a=e.f_id?"/gateway/api/update_upstream":"/gateway/api/add_upstream",r=this.$Loading.show();e.gatewayObj=this.gatewayObj,this.$ajax.postJSON(a,e).then((function(){r.hide(),t.$tip.success(t.$t("common.success")),t.closeDetailModal(),t.fetchData()})).catch((function(e){r.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}},removeItem:function(t){var e=this;this.$confirm(this.$t("gateway.delete.upstreamConfirmTips"),this.$t("common.alert")).then((function(){var a=e.$Loading.show();e.$ajax.postJSON("/gateway/api/delete_upstream",{f_id:t.f_id,gatewayObj:e.gatewayObj}).then((function(){a.hide(),e.fetchData().then((function(){e.$tip.success(e.$t("common.success"))}))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))})).catch((function(){}))}}},J=q,P=(a("08cb"),Object(d["a"])(J,B,G,!1,null,"f0c6ec80",null)),Z=P.exports,U=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("let-form",{ref:"addForm",attrs:{inline:"",itemWidth:"400px"},nativeOn:{submit:function(e){return e.preventDefault(),t.addItem(e)}}},[a("let-form-item",{attrs:{label:t.$t("gateway.gatewayObj"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:"eg:Base.GatewayServer.FlowControlObj",required:"","required-tip":"please input gateway flowcontrol obj"},model:{value:t.form.gatewayObj,callback:function(e){t.$set(t.form,"gatewayObj",e)},expression:"form.gatewayObj"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[t._v(t._s(t.$t("operate.add")))])],1),a("let-form-item")],1),a("let-table",{ref:"table",attrs:{data:t.objList,"empty-msg":t.$t("common.nodata")}},[a("let-table-column",{attrs:{title:t.$t("gateway.gatewayObj"),prop:"obj"}}),a("let-table-column",{attrs:{title:t.$t("operate.operates"),width:"200px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("let-table-operation",{on:{click:function(a){return t.emitConfig(e.row)}}},[t._v(t._s(t.$t("operate.config")))]),a("let-table-operation",{on:{click:function(a){return t.removeItem(e.row)}}},[t._v(t._s(t.$t("operate.delete")))])]}}])})],1)],1)},W=[],Y={name:"GatewayObjList",props:{},data:function(){return{form:{gatewayObj:""},items:[],gatewayObjList:[]}},methods:{fetchData:function(){var t=this;return this.$ajax.getJSON("/gateway/api/gatewayobj_list",{}).then((function(e){t.gatewayObjList=e})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},emitConfig:function(t){localStorage.setItem("gatewayObj",t.obj),this.$emit("config",t.obj)},addItem:function(){var t=this;if(this.$refs.addForm.validate()){var e=this.form,a="/gateway/api/add_gatewayobj",r=this.$Loading.show();this.$ajax.postJSON(a,e).then((function(){r.hide(),t.$tip.success(t.$t("common.success")),t.form.gatewayObj="",t.fetchData()})).catch((function(e){r.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}},removeItem:function(t){var e=this;this.$confirm("delete this gateway?",this.$t("common.alert")).then((function(){var a=e.$Loading.show();e.$ajax.postJSON("/gateway/api/delete_gatewayobj",{gatewayObj:t.obj}).then((function(){a.hide(),e.fetchData().then((function(){e.$tip.success(e.$t("common.success"))}))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))})).catch((function(){}))}},computed:{objList:function(){return this.gatewayObjList.map((function(t){return{obj:t}}))}},watch:{},mounted:function(){this.fetchData()}},H=Y,V=Object(d["a"])(H,U,W,!1,null,"2332f030",null),Q=V.exports,X={name:"Gateway",components:{Station:z,Upstream:Z,BwList:f,GatewayObjList:Q},data:function(){return{gatewayObj:"",globalStation:{f_station_id:""}}},methods:{config:function(t){this.gatewayObj=t},switchGateway:function(){this.gatewayObj="",localStorage.setItem("gatewayObj","")}},mounted:function(){var t=localStorage.getItem("gatewayObj");t&&(this.gatewayObj=t)}},K=X,tt=(a("8266"),Object(d["a"])(K,r,s,!1,null,null,null));e["a"]=tt.exports},e51e:function(t,e,a){"use strict";a("99af"),a("d81d"),a("fb6a"),a("a434"),a("ac1f"),a("5319");var r=a("5530");e["a"]={data:function(){return{servers:[],transferData:!0,migrationMethods:[{value:!0,text:this.$t("dcache.migrationMethod1")},{value:!1,text:this.$t("dcache.migrationMethod2")}]}},props:{expandServers:{required:!0,type:Array}},computed:{appName:function(){return this.expandServers[0].app_name},moduleName:function(){return this.expandServers[0].module_name},cache_version:function(){return this.expandServers[0].cache_version},srcGroupName:function(){return this.expandServers[0].group_name},dstGroupName:function(){return this.servers[0].group_name}},methods:{getServers:function(){this.servers=this.newGroup(this.expandServers)},addNewGroup:function(){var t=this.servers;this.servers=t.concat(this.newGroup(t.slice(t.length-this.expandServers.length)))},deleteGroup:function(){this.servers.splice(this.servers.length-this.expandServers.length,this.expandServers.length)},newGroup:function(t){return t.map((function(t,e){var a=t.group_name,s=t.server_name;a=a.replace(/^(.*?)(\d+)$/,(function(){return arguments[1]+(+arguments[2]+1)})),s=s.replace(/^(.*?)(\d+)-\d+$/,(function(){return arguments[1]+(+arguments[2]+1)+"-"+(e+1)}));var n=t.server_type;return Object(r["a"])(Object(r["a"])({},t),{},{group_name:a,server_name:s,server_ip:"",shmKey:"",server_type:n})}))}}}},e68e:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"diff_wrap",attrs:{id:"app"}},[a("div",{directives:[{name:"highlight",rawName:"v-highlight"}],domProps:{innerHTML:t._s(t.html)}})])},s=[],n=(a("4160"),a("a9e3"),a("ac1f"),a("5319"),a("159b"),a("bf68")),i=a("0eda"),o=a("1487"),l=a.n(o),c=(a("eba2"),a("1257"),{props:{oldString:{type:String,default:""},newString:{type:String,default:""},context:{type:Number,default:5},outputFormat:{type:String,default:"line-by-line"}},directives:{highlight:function(t){var e=t.querySelectorAll("code");e.forEach((function(t){l.a.highlightBlock(t)}))}},computed:{html:function(){return this.createdHtml(this.oldString,this.newString,this.context,this.outputFormat)}},methods:{createdHtml:function(t,e,a,r){function s(t){return t.replace(/<span class="d2h-code-line-ctn">(.+?)<\/span>/g,'<span class="d2h-code-line-ctn"><code>$1</code></span>')}var o=["",t,e,"","",{context:a}],l=n["createPatch"].apply(void 0,o),c=i["Diff2Html"].getJsonFromDiff(l,{inputFormat:"diff",outputFormat:r,showFiles:!1,matching:"lines"}),u=i["Diff2Html"].getPrettyHtml(c,{inputFormat:"json",outputFormat:r,showFiles:!1,matching:"lines"});return s(u)}}}),u=c,d=(a("f8e0"),a("2877")),m=Object(d["a"])(u,r,s,!1,null,null,null);e["a"]=m.exports},e73b:function(t,e,a){"use strict";var r=a("4998"),s=a.n(r);s.a},ea4d:function(t,e,a){},ee72:function(t,e,a){"use strict";(function(t){a("99af"),a("4160"),a("c975"),a("a15b"),a("a434"),a("b0c0"),a("b680"),a("d3b7"),a("ac1f"),a("25f0"),a("1276"),a("159b"),a("96cf");var r=a("1da1"),s=a("1226"),n=a.n(s),i=a("6e58"),o=a("381a"),l=a.n(o),c=a("6ace");e["a"]={props:["res","rest","title"],data:function(){return{dialogVisible:!1,options:[],resdata:[],restdata:[],value:"",serverArrs:[],dataLists:[],dataarr:[],traceIds:[],nodeinfos:[],edges:[],funcIds:[],datalist:[],arrdata:[],begin:"",id:"opendiv-"+l()(20)}},mounted:function(){},created:function(){},watch:{res:function(t){this.dialogVisible=!0,this.datalist=t,this.getdatas()},rest:function(t){this.dialogVisible=!0,this.datalist=t,this.getdatas()}},methods:{getdatas:function(){var t=this;this.$nextTick((function(){(new Date).getTime();var e=document.getElementsByClassName("wcontainer");(new Date).getTime();for(var a in e)e[a].style&&(e[a].style.display="none");(new Date).getTime();var r=[];t.datalist.rows.forEach((function(e){var a={};e.forEach((function(e,r){a[t.datalist.columns[r].name]=e})),r.push(a)}));(new Date).getTime();var s=[],n=[];r.forEach((function(t,e){t.vertexes=JSON.parse(t.vertexes),t.edges=JSON.parse(t.edges),s[e]=[],n[e]=[],t.vertexes.forEach((function(t){s[e].push({id:t.vertex,label:t.vertex,time:(t.callTime/t.callCount).toFixed(2)})})),t.edges.forEach((function(t){n[e].push({source:t.fromVertex,target:t.toVertex,label:(t.callTime/t.callCount).toFixed(2)})}))}));(new Date).getTime();t.arrdata=r,t.begin="",n.forEach((function(e,a){var r=[];e.forEach((function(t){r.push(t.target)})),e.forEach((function(e){r.indexOf(e.source)<0&&(t.begin=e.source,s[a].push({id:e.source,label:e.source}))}))}));(new Date).getTime();t.becomeD3(n,s)}))},becomeD3:function(t,e){var a=this;this.$nextTick((function(){var r=function(r){var s=(new n.a.graphlib.Graph).setGraph({});s.setGraph({rankdir:"LR",marginy:60}),e[r].forEach((function(t,e){t.rx=t.ry=5,s.setNode(t.id,{labelType:"html",label:t.time?'<div class="wrap"> <span class="span1">'.concat(t.id,'</span><p class="p1" style="height:20px" >( ').concat(t.time," ms )</p></div>"):'<div class="wrap"><span class="span1">'.concat(t.id,"</span ></div>"),style:"fill:#457ff5"})})),t[r].forEach((function(t){r%2==0?s.setEdge(t.source,t.target,{label:t.label+"ms",style:"fill:#fff;stroke:#333;stroke-width:1.5px;"}):s.setEdge(t.source,t.target,{label:t.label+"ms",style:"fill:#EBF2FF;stroke:#333;stroke-width:1.5px;"})}));var l="#svg-".concat(a.id,"-").concat(r),u=i["select"](l),d=u.select("g"),m=new n.a.render;m(d,s),d.selectAll(".edgeLabel tspan").attr("dy","-1.2em");var f=document.querySelectorAll("".concat(l," .span1"));for(o in f){if(o==f.length)break;f[o].innerHTML==a.value&&(f[o].style.color="red")}var p=document.querySelector("#svg-".concat(a.id,"-").concat(r)),h=p.getBBox().height;p.style.height=h+100,d.selectAll("g.node").on("click",(function(e,s){var n=[],o=i["select"]("#".concat(a.id));o.selectAll("rect").style("fill","#457FF5"),t[r].forEach((function(t,r){e==t.source&&a.begin!=t.target&&n.push(t)})),d.selectAll("rect").style("fill",(function(t,a){return t==e&&n.length>0?"#3F5AE0":"#457FF5"})),n.length>0&&(Object(c["a"])(n,t[r],0,n.length),a.ganTe(n,e,r))}))};for(var s in t){var o;r(s)}}))},ganTe:function(e,s,n){var i=this;return Object(r["a"])(regeneratorRuntime.mark((function r(){var o,l,u,d,m,f,p,h,g,v,b,_,w,y,$,k,x,C,M,j,S,N,O,D,F,I,A,L;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:for(u in L=function(t,e){var a=e.value(0),r=e.coord([e.value(1),a]),s=e.coord([e.value(2),a]),n=.35*e.size([0,1])[1]>30?30:.35*e.size([0,1])[1],i=S.graphic.clipRectByRect({x:r[0],y:r[1],width:s[0]-r[0],height:n},{x:t.coordSys.x,y:t.coordSys.y,width:t.coordSys.width,height:t.coordSys.height}),o=null;if(""!==e.value(3)){var l,c=e.coord([e.value(3),a]),u=e.value(4),d=e.value(3),m=(S.number.parseDate(C),d+u);l=e.coord([m,a]),o=S.graphic.clipRectByRect({x:c[0],y:c[1],width:l[0]-c[0],height:n},{x:t.coordSys.x,y:t.coordSys.y,width:t.coordSys.width,height:t.coordSys.height})}return null==o?i&&{type:"group",children:[{type:"rect",shape:i,style:e.style({fill:"#AACCF9"})}]}:i&&o&&{type:"group",children:[{type:"rect",shape:i,style:e.style({fill:"#a1a8f5"})},{type:"rect",shape:o,style:e.style({fill:"#9c9c9c"})}]}},M=function(t){var e=t.toLocaleDateString().split("/");return e[1].length<2&&e.splice(1,1,"0"+e[1]),e[2].length<2&&e.splice(2,1,"0"+e[2]),e.join("-")},o=document.getElementsByClassName("wcontainer"),l=i,o)o[u].style&&(o[u].style.display="none");for(F in d=document.getElementById("funccontainer-".concat(i.id,"-").concat(n)),d.style.display="block",m=e,m.forEach((function(t){i.arrdata[n].vertexes.forEach((function(e){t.target==e.vertex&&(t.server_time=e.callTime/e.callCount)})),i.arrdata[n].edges.forEach((function(e){t.source==e.fromVertex&&t.target==e.toVertex&&(t.client_time=e.callTime/e.callCount,t.ret=e.ret,t.csData=e.csData,t.srData=e.srData,t.ssData=e.ssData,t.crData=e.crData)}))})),f=[],p=[],h=[],g=[],v=[],b=[],_=[],w=[],y=[],$=[],k=[],Object(c["b"])(m,f,p,h,g,v,b,_,w,y,$,k),x=new Date,C=M(x),j=s,S=a("313e"),N=S.init(d),O=[],D=h.length-1,h)O.push({name:h[F],value:[D-parseInt(F),b[F],b[F]+g[F],(g[F]-v[F])/2+b[F],v[F],_[F],w[F],y[F],$[F],k[F]]});I=[],O.forEach((function(t){I.push(t.value[2])})),I.sort((function(t,e){return e-t})),h=h.reverse(),A=h,N.setOption({tooltip:{enterable:!0,appendToBody:!0,position:function(e,a){return new t(a.value[6],"base64").toString().length>=500||new t(a.value[7],"base64").toString().length>=500||new t(a.value[8],"base64").toString().length>=500||new t(a.value[9],"base64").toString().length>=500?[e[0]-100,e[1]-250]:[e[0]-100,e[1]-100]},formatter:function(e){return e.name+"<br/>"+l.$t("callChain.stringBtime")+e.value[1].toFixed(2)+"ms<br/>"+l.$t("callChain.stringEtime")+e.value[2].toFixed(2)+"ms<br/>"+l.$t("callChain.clientTime")+(e.value[2].toFixed(2)-e.value[1].toFixed(2))+"ms<br/>"+l.$t("callChain.serverTime")+e.value[4].toFixed(2)+"ms<br>ret:"+e.value[5]+"<div style='word-wrap:break-word;white-space:normal;max-width: 900px;overflow-y: scroll;max-height: 400px'>csData:"+new t(e.value[6],"base64").toString()+"<br>srData:"+new t(e.value[7],"base64").toString()+"<br>ssData:"+new t(e.value[8],"base64").toString()+"<br>crData:"+new t(e.value[9],"base64").toString()+"</div>"}},title:{text:j,left:"center"},xAxis:{type:"value",min:0,max:I[0].toFixed(2),axisLabel:{interval:0},splitLine:{show:!0}},yAxis:{data:A,axisTick:{alignWithLabel:!0},splitLine:{show:!0}},legend:{left:"70%",top:20,data:["client","server"]},grid:{left:260},series:[{type:"custom",renderItem:L,name:"client",itemStyle:{color:"#a1a8f5"},encode:{x:[1,2],y:0},data:O},{type:"custom",name:"server",itemStyle:{color:"#9c9c9c"}}]});case 32:case"end":return r.stop()}}),r)})))()},closeDialog:function(){var t=a("313e"),e=document.getElementsByClassName("wcontainer");for(var r in e)t.init(e[r]).clear()}}}}).call(this,a("b639").Buffer)},f263:function(t,e,a){},f51c:function(t,e,a){"use strict";a.d(e,"a",(function(){return l})),a.d(e,"c",(function(){return c})),a.d(e,"b",(function(){return u}));a("d3b7"),a("25f0");var r=a("a026"),s=a("a925"),n=a("00e7"),i=a.n(n),o=a("b3f5");r["default"].use(s["a"]),r["default"].use(i.a);var l=new s["a"]({}),c=[];function u(){return new Promise((function(t,e){o["a"].getJSON("/server/api/get_locale").then((function(e){var a=i.a.get("locale");if("[object Object]"==Object.prototype.toString.call(e)){for(var r in e)l.setLocaleMessage(r,e[r]),c.push({localeCode:r,localeName:e[r]["localeName"],localeMessages:e});a=e[a]?a:"cn",c=e}l.locale=a,t()})).catch((function(t){e(t)}))}))}},f614:function(t,e,a){},f8e0:function(t,e,a){"use strict";var r=a("7720"),s=a.n(r);s.a},f990:function(t,e,a){}}]);
\ No newline at end of file
diff --git a/client/dist/static/js/dcache.a42e19fc.js b/client/dist/static/js/dcache.a42e19fc.js
deleted file mode 100644
index 815fe34f..00000000
--- a/client/dist/static/js/dcache.a42e19fc.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(e){function t(t){for(var r,n,l=t[0],i=t[1],c=t[2],u=0,m=[];u<l.length;u++)n=l[u],Object.prototype.hasOwnProperty.call(o,n)&&o[n]&&m.push(o[n][0]),o[n]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);d&&d(t);while(m.length)m.shift()();return s.push.apply(s,c||[]),a()}function a(){for(var e,t=0;t<s.length;t++){for(var a=s[t],r=!0,l=1;l<a.length;l++){var i=a[l];0!==o[i]&&(r=!1)}r&&(s.splice(t--,1),e=n(n.s=a[0]))}return e}var r={},o={dcache:0},s=[];function n(t){if(r[t])return r[t].exports;var a=r[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=r,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/";var l=window["webpackJsonp"]=window["webpackJsonp"]||[],i=l.push.bind(l);l.push=t,l=l.slice();for(var c=0;c<l.length;c++)t(l[c]);var d=i;s.push([3,"chunk-vendors","chunk-common"]),a()})({"0207":function(e,t,a){"use strict";var r=a("9e5a"),o=a.n(r);o.a},"04bd":function(e,t,a){"use strict";var r=a("2982"),o=a.n(r);o.a},"0e157":function(e,t,a){"use strict";var r=a("44bd"),o=a.n(r);o.a},"0e33":function(e,t,a){},1439:function(e,t,a){},1467:function(e,t,a){},1481:function(e,t,a){"use strict";var r=a("f7a5"),o=a.n(r);o.a},"197e":function(e,t,a){"use strict";var r=a("0e33"),o=a.n(r);o.a},"1dcc":function(e,t,a){},"26ba":function(e,t,a){"use strict";var r=a("7c3e"),o=a.n(r);o.a},2982:function(e,t,a){},"2f8b":function(e,t,a){"use strict";a.r(t);a("e260"),a("e6cf"),a("cca6"),a("a79d");var r=a("a026"),o=(a("42a1"),a("b3f5")),s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"app"}},[a("app-dcache-header"),a("keep-alive",[a("router-view",{staticClass:"main-width"})],1)],1)},n=[],l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app_index__header"},[a("div",{staticClass:"main-width"},[a("h1",{staticClass:"hidden"},[e._v("TARS")]),a("div",{staticClass:"logo-wrap"},["true"===e.enable&&"true"===e.show?a("a",{attrs:{href:"/"}},[a("img",{staticClass:"logo",attrs:{src:"/static/img/tars-logo.png"}})]):e._e(),"true"===e.k8s?a("a",{attrs:{href:"/k8s.html"}},[a("img",{staticClass:"logo",attrs:{src:"/static/img/K8S.png"}})]):e._e(),e._m(0)]),a("let-tabs",{staticClass:"tabs",attrs:{center:!0,activekey:e.$route.matched[0]?e.$route.matched[0].path:"/server"},on:{click:e.clickTab}},[a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab1"),tabkey:"/server",icon:e.serverIcon}}),a("let-tab-pane",{attrs:{tab:e.$t("header.dcache.tab2"),tabkey:"/operation",icon:e.opaIcon}}),a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab3"),tabkey:"/releasePackage",icon:e.releaseIcon}}),a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab4"),tabkey:"/config",icon:e.cacheIcon}}),a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab5"),tabkey:"/operationManage",icon:e.operatorIcon}})],1),a("div",{staticClass:"language-wrap"},[a("let-select",{attrs:{clearable:!1},on:{change:e.changeLocale},model:{value:e.locale,callback:function(t){e.locale=t},expression:"locale"}},[e._l(e.localeMessages,(function(t){return[a("let-option",{attrs:{value:t.localeCode}},[e._v(e._s(t.localeName))])]}))],2)],1),a("div",{staticClass:"user-wrap"},[a("p",{staticClass:"user-info",on:{click:function(t){e.userOptOpen=!e.userOptOpen}}},[a("span",{staticClass:"name toe"},[e._v(e._s(e.uid)+" ")]),a("i",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],staticClass:"let-icon let-icon-caret-down",class:{up:e.userOptOpen}}),a("transition",{attrs:{name:"fade"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin&&e.userOptOpen,expression:"enableLogin && userOptOpen"}],staticClass:"user-pop-wrap"},[a("a",{attrs:{href:"/logout"}},[e._v(e._s(e.$t("header.logout")))])])])],1)])],1)])},i=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a",{staticClass:"active",attrs:{href:"/dcache.html"}},[a("img",{staticClass:"logo",attrs:{alt:"dcache",src:"/static/img/dcache-logo.png"}})])}],c=(a("ac1f"),a("5319"),a("1817")),d=a.n(c),u=a("1ca6"),m=a.n(u),p=a("4d18"),h=a.n(p),f=a("cc08"),v=a.n(f),g=a("3e1a"),b=a.n(g),_=a("f51c"),$={data:function(){return{serverIcon:d.a,opaIcon:m.a,releaseIcon:h.a,cacheIcon:v.a,operatorIcon:b.a,locale:this.$cookie.get("locale")||"cn",uid:"--",userOptOpen:!1,enableLogin:!1,k8s:this.$cookie.get("k8s")||"false",enable:this.$cookie.get("enable")||"false",show:this.$cookie.get("show")||"false",localeMessages:_["c"]}},methods:{clickTab:function(e){this.$router.replace(e)},getLoginUid:function(){var e=this;this.$ajax.getJSON("/server/api/get_login_uid").then((function(t){t&&t.uid?e.uid=t.uid:e.uid="***"})).catch((function(t){e.$tip.error("鑾峰彇鐢ㄦ埛鐧诲綍淇℃伅: ".concat(t.err_msg||t.message))}))},changeLocale:function(){this.$cookie.set("locale",this.locale,{expires:"1Y"}),location.reload()},checkEnableLogin:function(){var e=this;this.$ajax.getJSON("/server/api/is_enable_login").then((function(t){e.enableLogin=t.enableLogin||!1})).catch((function(e){}))}},mounted:function(){this.getLoginUid(),this.checkEnableLogin()}},k=$,y=(a("cd6a"),a("2877")),w=Object(y["a"])(k,l,i,!1,null,null,null),x=w.exports,M=a("559f"),S={name:"App",components:{AppDcacheHeader:x,AppFooter:M["a"]}},C=S,L=(a("f76f"),Object(y["a"])(C,s,n,!1,null,null,null)),N=L.exports,O=a("8c4f"),D=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"page_server"},[r("div",{staticClass:"left-view"},[r("div",{staticClass:"tree_wrap"},[r("a",{staticClass:"tree_icon iconfont el-icon-third-shuaxin",attrs:{href:"javascript:;"},on:{click:function(t){return e.getTreeData(1)}}}),e.treeData&&e.treeData.length?r("let-tree",{staticClass:"left-tree",attrs:{data:e.treeData,activeKey:e.treeid},on:{"on-select":e.selectTree}}):e._e(),e.treeData&&!e.treeData.length?r("div",{staticClass:"left-tree"},[r("p",{staticClass:"loading"},[e._v(e._s(e.$t("common.noService")))])]):e._e(),e.treeData?e._e():r("div",{ref:"treeLoading",staticClass:"left-tree"},[!1===e.treeData?r("div",{staticClass:"loading"},[r("p",[e._v(e._s(e.treeErrMsg))]),r("a",{attrs:{href:"javascript:;"},on:{click:e.getTreeData}},[e._v(e._s(e.$t("common.reTry")))])]):e._e()])],1)]),e.treeid?r("div",{staticClass:"right-view"},[r("div",{staticClass:"btabs_wrap"},[r("ul",{directives:[{name:"vscroll",rawName:"v-vscroll"}],ref:"btabs",staticClass:"btabs"},e._l(e.BTabs,(function(t){return r("li",{key:t.id,staticClass:"btabs_item",class:{active:t.id===e.treeid}},[r("a",{staticClass:"btabs_link",attrs:{href:"javascript:;"},on:{click:function(a){return e.clickBTabs(a,t.id)}}},[e._v(e._s(e.getNewServerName(t.id)))]),r("a",{staticClass:"btabs_close",attrs:{href:"javascript:;"},on:{click:function(a){return e.closeBTabs(t.id)}}},[e._v("Close")])])})),0),r("a",{staticClass:"btabs_all",attrs:{href:"javascript:;",title:"CloseAll"},on:{click:e.closeAllBTabs}},[e._v("CloseAll")])]),r("div",{staticClass:"btabs_con"},e._l(e.BTabs,(function(t){return r("div",{directives:[{name:"show",rawName:"v-show",value:t.id===e.treeid,expression:"item.id === treeid"}],key:t.id,staticClass:"btabs_con_item"},[r("let-tabs",{attrs:{activekey:t.path},on:{click:e.clickTab}},[6===e.serverData.level?[r("let-tab-pane",{attrs:{tabkey:e.base+"/cache",tab:e.$t("header.tab.tab1")}}),r("let-tab-pane",{attrs:{tabkey:e.base+"/moduleCache",tab:e.$t("cache.config.configuration")}}),r("let-tab-pane",{attrs:{tabkey:e.base+"/propertyMonitor",tab:e.$t("index.rightView.tab.propertyMonitor")}})]:5===e.serverData.level?[r("let-tab-pane",{attrs:{tabkey:e.base+"/manage",tab:e.$t("header.tab.tab1")}}),r("let-tab-pane",{attrs:{tabkey:e.base+"/publish",tab:e.$t("index.rightView.tab.patch")}}),r("let-tab-pane",{attrs:{tabkey:e.base+"/config",tab:e.$t("index.rightView.tab.serviceConfig")}}),r("let-tab-pane",{attrs:{tabkey:e.base+"/server-monitor",tab:e.$t("index.rightView.tab.statMonitor")}}),e.enableAuth?r("let-tab-pane",{attrs:{tabkey:e.base+"/user-manage",tab:e.$t("index.rightView.tab.privileage")}}):e._e(),"dcache"!=e.serverType?r("let-tab-pane",{attrs:{tabkey:e.base+"/property-monitor",tab:e.$t("index.rightView.tab.propertyMonitor")}}):e._e()]:4===e.serverData.level?[r("let-tab-pane",{attrs:{tabkey:e.base+"/manage",tab:e.$t("header.tab.tab1")}}),r("let-tab-pane",{attrs:{tabkey:e.base+"/config",tab:e.$t("index.rightView.tab.setConfig")}})]:1===e.serverData.level?[r("let-tab-pane",{attrs:{tabkey:e.base+"/manage",tab:e.$t("header.tab.tab1")}}),r("let-tab-pane",{attrs:{tabkey:e.base+"/config",tab:e.$t("index.rightView.tab.appConfig")}})]:e._e()],2),r(e.getName(t.path),{ref:"childView",refInFor:!0,tag:"router-view",staticClass:"page_server_child",attrs:{treeid:t.id,servertype:e.serverType}})],1)})),0)]):r("div",{staticClass:"right-view"},[r("div",{staticClass:"empty",staticStyle:{width:"300px"}},[r("img",{staticClass:"package",attrs:{src:a("4824")}}),r("p",{staticClass:"title"},[e._v(e._s(e.$t("index.rightView.title")))]),r("p",{staticClass:"notice",domProps:{innerHTML:e._s(e.$t("index.rightView.tips"))}}),r("p",{staticClass:"notice"},[e._v("https://github.com/tencent/DCache")])])])])},T=[],j=(a("99af"),a("4160"),a("c975"),a("baa5"),a("a434"),a("b0c0"),a("1276"),a("159b"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_manage"},[a("div",{staticClass:"table_head"},[a("h4",[e._v(e._s(this.$t("serverList.title.serverList"))+" "),a("i",{staticClass:"icon iconfont el-icon-third-shuaxin",on:{click:e.getServerList}})])]),e.serverList?a("let-table",{ref:"serverListLoading",staticClass:"dcache",attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{attrs:{value:e.isCheckedAll},model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}],null,!1,1091570282)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("a",{staticClass:"buttonText",attrs:{href:"/static/logview/logview.html?app="+[t.row.application]+"&server_name="+[t.row.server_name]+"&node_name="+[t.row.node_name],title:"鐐瑰嚮鏌ョ湅鏈嶅姟鏃ュ織(view server logs)",target:"_blank"}},[e._v(" "+e._s(t.row.server_name)+" ")])]}}],null,!1,1650575184)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"140px"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.enableSet")},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.enable_set?a("p",{staticStyle:{"max-width":"200px"}},[e._v(" "+e._s(e.$t("common.set.setName"))+"锛�"+e._s(t.row.set_name)),a("br"),e._v(" "+e._s(e.$t("common.set.setArea"))+"锛�"+e._s(t.row.set_area)),a("br"),e._v(" "+e._s(e.$t("common.set.setGroup"))+"锛�"+e._s(t.row.set_group)+" ")]):a("span",[e._v(e._s(e.$t("common.disable")))])]}}],null,!1,2963707083)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"===e.row.setting_state?"status-active":"status-off"})]}}],null,!1,3224184510)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus"),width:"65px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"===e.row.present_state?"status-active":"activating"===e.row.present_state?"status-activating":"status-off"})]}}],null,!1,4116932289)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.processID"),prop:"process_id",width:"80px"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version",width:"68px"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(t.row.patch_time)))])]}}],null,!1,3144837894)}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.configServer(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),"proxy"===e.serverType||"router"===e.serverType?a("let-table-operation",{on:{click:function(a){return e.openExpandModal(t.row)}}},[e._v(e._s(e.$t("dcache.expand")))]):e._e(),a("let-table-operation",{on:{click:function(a){return e.restartServer(t.row.id)}}},[e._v(e._s(e.$t("operate.restart")))]),a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.stopServer(t.row.id)}}},[e._v(e._s(e.$t("operate.stop")))]),a("let-table-operation",{on:{click:function(a){return e.manageServant(t.row)}}},[e._v(e._s(e.$t("operate.servant")))]),a("let-table-operation",{on:{click:function(a){return e.showMoreCmd(t.row)}}},[e._v(e._s(e.$t("operate.more")))]),a("let-table-operation",{on:{click:function(a){return e.showStatus(t.row.id)}}},[e._v(e._s(e.$t("operate.status")))])]}}],null,!1,3453182281)}),a("template",{slot:"operations"},[a("batch-operation",{attrs:{size:"small",disabled:!e.hasCheckedServer,"checked-servers":e.checkedServers,type:"restart"},on:{"success-fn":e.getServerList}}),a("batch-operation",{attrs:{size:"small",disabled:!e.hasCheckedServer,"checked-servers":e.checkedServers,type:"stop"},on:{"success-fn":e.getServerList}})],1)],2):e._e(),e.serverNotifyList&&e.showOthers?a("h4",[e._v(e._s(this.$t("serverList.title.serverStatus"))+" "),a("i",{staticClass:"icon iconfont",on:{click:function(t){return e.getServerNotifyList()}}},[e._v("畎�")])]):e._e(),e.serverNotifyList&&e.showOthers?a("let-table",{ref:"serverNotifyListLoading",attrs:{data:e.serverNotifyList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"notifytime"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.serviceID"),prop:"server_id"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.threadID"),prop:"thread_id"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{style:e.statusStyle(t.row.result)},[e._v(e._s(t.row.result))])]}}],null,!1,3563771650)})],1):e._e(),a("let-pagination",{staticStyle:{"margin-bottom":"32px"},attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}}),a("let-modal",{attrs:{title:e.$t("serviceExpand.title"),width:"800px",footShow:!(!e.expandModal.model||!e.expandModal.model.server_name)},on:{"on-confirm":e.expandService,close:e.closeExpandModal,"on-cancel":e.closeExpandModal},model:{value:e.expandModal.show,callback:function(t){e.$set(e.expandModal,"show",t)},expression:"expandModal.show"}},[e.expandModal.model&&e.expandModal.model.server_name?a("let-form",{ref:"expandForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("common.service")}},[e._v(e._s(e.expandModal.model.server_name))]),a("let-form-item",{attrs:{label:e.$t("common.ip")}},[e._v(e._s(e.expandModal.model.node_name))]),a("let-form-item",{attrs:{label:e.$t("serviceExpand.form.tarIP"),itemWidth:"100%",required:""}},[a("let-input",{attrs:{type:"textarea",rows:3,placeholder:e.$t("serviceExpand.form.placeholder"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.expandModal.expandIpStr,callback:function(t){e.$set(e.expandModal,"expandIpStr",t)},expression:"expandModal.expandIpStr"}})],1),a("let-form-item",{attrs:{label:e.$t("serviceExpand.form.nodeConfig"),itemWidth:"100%"}},[a("let-checkbox",{model:{value:e.expandModal.model.copy_node_config,callback:function(t){e.$set(e.expandModal.model,"copy_node_config",t)},expression:"expandModal.model.copy_node_config"}},[e._v(" "+e._s(e.$t("serviceExpand.form.copyNodeConfig"))+" ")])],1)],1):e._e()],1),a("let-modal",{attrs:{title:e.$t("serverList.dlg.title.editService"),width:"800px",footShow:!(!e.configModal.model||!e.configModal.model.server_name)},on:{"on-confirm":e.saveConfig,close:e.closeConfigModal,"on-cancel":e.closeConfigModal},model:{value:e.configModal.show,callback:function(t){e.$set(e.configModal,"show",t)},expression:"configModal.show"}},[e.configModal.model&&e.configModal.model.server_name?a("let-form",{ref:"configForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("common.service")}},[e._v(e._s(e.configModal.model.server_name))]),a("let-form-item",{attrs:{label:e.$t("common.ip")}},[e._v(e._s(e.configModal.model.node_name))]),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.isBackup"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:!0,text:e.$t("common.yes")},{value:!1,text:e.$t("common.no")}]},model:{value:e.configModal.model.bak_flag,callback:function(t){e.$set(e.configModal.model,"bak_flag",t)},expression:"configModal.model.bak_flag"}})],1),a("let-form-item",{attrs:{label:e.$t("common.template"),required:""}},[e.configModal.model.templates&&e.configModal.model.templates.length?a("let-select",{attrs:{size:"small",required:""},model:{value:e.configModal.model.template_name,callback:function(t){e.$set(e.configModal.model,"template_name",t)},expression:"configModal.model.template_name"}},e._l(e.configModal.model.templates,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1):a("span",[e._v(e._s(e.configModal.model.template_name))])],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.serviceType"),required:""}},[a("let-select",{attrs:{size:"small",required:""},model:{value:e.configModal.model.server_type,callback:function(t){e.$set(e.configModal.model,"server_type",t)},expression:"configModal.model.server_type"}},e._l(e.serverTypes,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.enableSet"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:!0,text:e.$t("common.enable")},{value:!1,text:e.$t("common.disable")}]},model:{value:e.configModal.model.enable_set,callback:function(t){e.$set(e.configModal.model,"enable_set",t)},expression:"configModal.model.enable_set"}})],1),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setName"),required:"",pattern:"^[a-z]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setName")},model:{value:e.configModal.model.set_name,callback:function(t){e.$set(e.configModal.model,"set_name",t)},expression:"configModal.model.set_name"}})],1):e._e(),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setArea"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setArea"),required:"",pattern:"^[a-z]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setArea")},model:{value:e.configModal.model.set_area,callback:function(t){e.$set(e.configModal.model,"set_area",t)},expression:"configModal.model.set_area"}})],1):e._e(),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setGroup"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setGroup"),required:"",pattern:"^[0-9\\*]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setGroup")},model:{value:e.configModal.model.set_group,callback:function(t){e.$set(e.configModal.model,"set_group",t)},expression:"configModal.model.set_group"}})],1):e._e(),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.asyncThread"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.placeholder.thread"),required:"",pattern:"tars_nodejs"===e.configModal.model.server_type?"^[1-9][0-9]*$":"^([3-9]|[1-9][0-9]+)$","pattern-tip":"$t('serverList.dlg.placeholder.thread')"},model:{value:e.configModal.model.async_thread_num,callback:function(t){e.$set(e.configModal.model,"async_thread_num",t)},expression:"configModal.model.async_thread_num"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.defaultPath")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.base_path,callback:function(t){e.$set(e.configModal.model,"base_path",t)},expression:"configModal.model.base_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.exePath")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.exe_path,callback:function(t){e.$set(e.configModal.model,"exe_path",t)},expression:"configModal.model.exe_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.startScript")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.start_script_path,callback:function(t){e.$set(e.configModal.model,"start_script_path",t)},expression:"configModal.model.start_script_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.stopScript")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.stop_script_path,callback:function(t){e.$set(e.configModal.model,"stop_script_path",t)},expression:"configModal.model.stop_script_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.monitorScript"),itemWidth:"724px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.monitor_script_path,callback:function(t){e.$set(e.configModal.model,"monitor_script_path",t)},expression:"configModal.model.monitor_script_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.privateTemplate"),labelWidth:"150px",itemWidth:"724px"}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:4},model:{value:e.configModal.model.profile,callback:function(t){e.$set(e.configModal.model,"profile",t)},expression:"configModal.model.profile"}})],1)],1):a("div",{ref:"configFormLoading",staticClass:"loading-placeholder"})],1),a("let-modal",{attrs:{title:e.$t("serverList.table.servant.title"),width:"1200px",footShow:!1},on:{close:e.closeServantModal},model:{value:e.servantModal.show,callback:function(t){e.$set(e.servantModal,"show",t)},expression:"servantModal.show"}},[a("let-button",{staticClass:"tbm16",attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.configServant()}}},[e._v(e._s(e.$t("operate.add"))+" Servant")]),e.servantModal.model?a("let-table",{attrs:{data:e.servantModal.model,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("operate.servant"),prop:"servant"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.adress"),prop:"endpoint"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.thread"),prop:"thread_num"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.connections"),prop:"max_connections"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),prop:"queuecap"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),prop:"queuetimeout"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.configServant(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.deleteServant(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}],null,!1,271550836)})],1):a("div",{ref:"servantModalLoading",staticClass:"loading-placeholder"})],1),a("let-modal",{attrs:{title:e.servantDetailModal.isNew?e.$t("operate.title.add")+" Servant":e.$t("operate.title.update")+" Servant",width:"800px",footShow:!!e.servantDetailModal.model},on:{"on-confirm":e.saveServantDetail,close:e.closeServantDetailModal,"on-cancel":e.closeServantDetailModal},model:{value:e.servantDetailModal.show,callback:function(t){e.$set(e.servantDetailModal,"show",t)},expression:"servantDetailModal.show"}},[e.servantDetailModal.model?a("let-form",{ref:"servantDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("serverList.servant.appService"),itemWidth:"724px"}},[a("span",[e._v(e._s(e.servantDetailModal.model.application)+"路"+e._s(e.servantDetailModal.model.server_name))])]),a("let-form-item",{attrs:{label:e.$t("serverList.servant.objName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.servant.c"),required:"",pattern:"^[A-Za-z]+$","pattern-tip":e.$t("serverList.servant.obj")},model:{value:e.servantDetailModal.model.obj_name,callback:function(t){e.$set(e.servantDetailModal.model,"obj_name",t)},expression:"servantDetailModal.model.obj_name"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.numOfThread"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.servant.thread"),required:"",pattern:"^[1-9][0-9]*$","pattern-tip":e.$t("serverList.servant.thread")},model:{value:e.servantDetailModal.model.thread_num,callback:function(t){e.$set(e.servantDetailModal.model,"thread_num",t)},expression:"servantDetailModal.model.thread_num"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.servant.adress"),required:"",itemWidth:"724px"}},[a("let-input",{ref:"endpoint",attrs:{size:"small",placeholder:"tcp -h 127.0.0.1 -t 60000 -p 12000",required:"",extraTip:e.isEndpointValid?"":e.$t("serverList.servant.error")},model:{value:e.servantDetailModal.model.endpoint,callback:function(t){e.$set(e.servantDetailModal.model,"endpoint",t)},expression:"servantDetailModal.model.endpoint"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.connections"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.max_connections,callback:function(t){e.$set(e.servantDetailModal.model,"max_connections",t)},expression:"servantDetailModal.model.max_connections"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.lengthOfQueue"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.queuecap,callback:function(t){e.$set(e.servantDetailModal.model,"queuecap",t)},expression:"servantDetailModal.model.queuecap"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.queueTimeout"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.queuetimeout,callback:function(t){e.$set(e.servantDetailModal.model,"queuetimeout",t)},expression:"servantDetailModal.model.queuetimeout"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.allowIP")}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.allow_ip,callback:function(t){e.$set(e.servantDetailModal.model,"allow_ip",t)},expression:"servantDetailModal.model.allow_ip"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.protocol"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:"tars",text:"TARS"},{value:"not_tars",text:e.$t("serverList.servant.notTARS")}]},model:{value:e.servantDetailModal.model.protocol,callback:function(t){e.$set(e.servantDetailModal.model,"protocol",t)},expression:"servantDetailModal.model.protocol"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.treatmentGroup"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.handlegroup,callback:function(t){e.$set(e.servantDetailModal.model,"handlegroup",t)},expression:"servantDetailModal.model.handlegroup"}})],1)],1):e._e()],1),a("let-modal",{staticClass:"more-cmd",attrs:{title:e.$t("operate.title.more"),width:"700px"},on:{"on-confirm":e.invokeMoreCmd,close:e.closeMoreCmdModal,"on-cancel":e.closeMoreCmdModal},model:{value:e.moreCmdModal.show,callback:function(t){e.$set(e.moreCmdModal,"show",t)},expression:"moreCmdModal.show"}},[e.moreCmdModal.model?a("let-form",{ref:"moreCmdForm"},[a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"setloglevel"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.logLevel")))]),a("let-select",{attrs:{size:"small",disabled:"setloglevel"!==e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.setloglevel,callback:function(t){e.$set(e.moreCmdModal.model,"setloglevel",t)},expression:"moreCmdModal.model.setloglevel"}},e._l(e.logLevels,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"loadconfig"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.pushFile")))]),a("let-select",{attrs:{size:"small",placeholder:e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length?e.$t("pub.dlg.defaultValue"):e.$t("pub.dlg.noConfFile"),disabled:!(e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length)||"loadconfig"!==e.moreCmdModal.model.selected,required:"loadconfig"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.loadconfig,callback:function(t){e.$set(e.moreCmdModal.model,"loadconfig",t)},expression:"moreCmdModal.model.loadconfig"}},e._l(e.moreCmdModal.model.configs,(function(t){return a("let-option",{key:t.filename,attrs:{value:t.filename}},[e._v(e._s(t.filename))])})),1)],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"command"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.sendCommand")))]),a("let-input",{attrs:{size:"small",disabled:"command"!==e.moreCmdModal.model.selected,required:"command"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.command,callback:function(t){e.$set(e.moreCmdModal.model,"command",t)},expression:"moreCmdModal.model.command"}})],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"connection"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.serviceLink")))])],1),"dcache"!==e.serverType?a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{staticClass:"danger",attrs:{label:"undeploy_tars"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("operate.undeploy"))+" "+e._s(e.$t("common.service")))])],1):e._e()],1):e._e()],1)],1)}),q=[],P=(a("4de4"),a("7db0"),a("a15b"),a("d81d"),a("d3b7"),a("25f0"),a("498a"),a("15fd")),I=a("5530"),R=(a("96cf"),a("1da1")),A=a("393d"),E=a("78e2"),z=function(){return{application:"DCache",server_name:"",set:"",node_name:"",expand_nodes:[],enable_set:!1,set_name:"",set_area:"",set_group:"",copy_node_config:!1}},V={name:"ServerManage",components:{batchOperation:E["a"]},data:function(){return{isCheckedAll:!1,serverType:this.servertype||"tars_cpp",serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},serverList:[],serverNotifyList:[],pageNum:1,pageSize:20,total:1,serverTypes:["tars_cpp","tars_java","tars_php","tars_nodejs","not_tars","tars_go"],configModal:{show:!1,model:null},servantModal:{show:!1,model:null,currentServer:null},servantDetailModal:{show:!1,isNew:!0,model:null},logLevels:["NONE","TARS","DEBUG","INFO","WARN","ERROR"],moreCmdModal:{show:!1,model:null,currentServer:null},expandModal:{show:!1,model:z(),expandIpStr:""},failCount:0}},props:["treeid","servertype"],computed:{showOthers:function(){return 5===this.serverData.level},isEndpointValid:function(){return!(!this.servantDetailModal.model||!this.servantDetailModal.model.endpoint)&&this.checkServantEndpoint(this.servantDetailModal.model.endpoint)},hasCheckedServer:function(){return 0!==this.serverList.filter((function(e){return!0===e.isChecked})).length},checkedServers:function(){return this.serverList.filter((function(e){return!0===e.isChecked}))}},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.serverList.forEach((function(t){t.isChecked=e}))},$route:function(e,t){this.getServerList(),this.getServerNotifyList(1)}},methods:{getServerList:function(){var e=this,t=this.$refs.serverListLoading.$loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.treeid}).then(function(){var a=Object(R["a"])(regeneratorRuntime.mark((function a(r){var o,s,n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(t.hide(),r.forEach((function(e){e.isChecked=!1})),e.serverList=r,"dcache"!==e.serverType){a.next=18;break}if(o=e.serverList.length,!(o>0)){a.next=7;break}return a.abrupt("return",!1);case 7:return a.prev=7,a.next=10,e.$ajax.postJSON("/server/api/cache/removeServer",{server_name:e.treeid.split(".")[1].substr(1)});case 10:e.$parent.getTreeData(),a.next=16;break;case 13:a.prev=13,a.t0=a["catch"](7),console.error(a.t0);case 16:a.next=46;break;case 18:if("proxy"!==e.serverType){a.next=33;break}if(s=e.serverList.length,!(s>0)){a.next=22;break}return a.abrupt("return",!1);case 22:return a.prev=22,a.next=25,e.$ajax.postJSON("/server/api/cache/removeProxy",{server_name:e.treeid.split(".")[1].substr(1)});case 25:e.$parent.getTreeData(),a.next=31;break;case 28:a.prev=28,a.t1=a["catch"](22),console.error(a.t1);case 31:a.next=46;break;case 33:if("router"!==e.serverType){a.next=46;break}if(n=e.serverList.length,!(n>0)){a.next=37;break}return a.abrupt("return",!1);case 37:return a.prev=37,a.next=40,e.$ajax.postJSON("/server/api/cache/removeRouter",{server_name:e.treeid.split(".")[1].substr(1)});case 40:e.$parent.getTreeData(),a.next=46;break;case 43:a.prev=43,a.t2=a["catch"](37),console.error(a.t2);case 46:case"end":return a.stop()}}),a,null,[[7,13],[22,28],[37,43]])})));return function(e){return a.apply(this,arguments)}}()).catch((function(a){t.hide(),e.$confirm(a.err_msg||a.message||e.$t("serverList.msg.fail"),e.$t("common.alert")).then((function(){e.getServerList()}))}))},getServerNotifyList:function(e){var t=this;if(this.showOthers){var a=this.$refs.serverNotifyListLoading.$loading.show();this.$ajax.getJSON("/server/api/server_notify_list",{tree_node_id:this.treeid,page_size:this.pageSize,curr_page:e}).then((function(r){a.hide(),t.pageNum=e,t.total=Math.ceil(r.count/t.pageSize),t.serverNotifyList=r.rows})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))}},statusStyle:function(e){return e=e||"","restart"==e||-1!=e.indexOf("[succ]")?"color: green":"stop"==e||-1!=e.indexOf("[alarm]")||-1!=e.indexOf("error")||-1!=e.indexOf("ERROR")?"color: red":""},gotoPage:function(e){this.getServerNotifyList(e)},getTemplateList:function(){var e=this;this.$ajax.getJSON("/server/api/template_name_list").then((function(t){e.configModal.model?e.configModal.model.templates=t:e.configModal.model={templates:t}})).catch((function(t){e.$tip.error("".concat(e.$t("serverList.restart.failed"),": ").concat(t.err_msg||t.message))}))},getServerConfig:function(e){var t=this,a=this.$loading.show({target:this.$refs.configFormLoading});this.$ajax.getJSON("/server/api/server",{id:e}).then((function(e){a.hide(),t.configModal.model?t.configModal.model=Object.assign({},t.configModal.model,e):(e.templates=[],t.configModal.model=e)})).catch((function(e){a.hide(),t.closeConfigModal(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))},configServer:function(e){this.configModal.show=!0,this.getTemplateList(),this.getServerConfig(e)},saveConfig:function(){var e=this;if(this.$refs.configForm.validate()){var t=this.$Loading.show();this.$ajax.postJSON("/server/api/update_server",Object(I["a"])({isBak:this.configModal.model.bak_flag},this.configModal.model)).then((function(a){t.hide(),e.serverList=e.serverList.map((function(e){return e.id===a.id?a:e})),e.closeConfigModal(),e.$tip.success(e.$t("serverList.restart.success"))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("serverList.restart.failed"),": ").concat(a.message||a.err_msg))}))}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1,this.configModal.model=null},checkTaskStatus:function(e,t){var a=this;return new Promise((function(r,o){a.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(t){1===t.status||0===t.status?setTimeout((function(){r(a.checkTaskStatus(e))}),3e3):2===t.status?r("taskid: ".concat(t.task_no)):o(new Error("taskid: ".concat(t.task_no)))})).catch((function(s){t?o(new Error(s.err_msg||s.message||a.$t("common.networkErr"))):setTimeout((function(){r(a.checkTaskStatus(e,!0))}),3e3)}))}))},addTask:function(e,t,a){var r=this,o=this.$Loading.show();return this.$ajax.postJSON("/server/api/add_task",{serial:!0,items:[{server_id:e,command:t}]}).then((function(e){return r.checkTaskStatus(e).then((function(e){o.hide(),r.getServerList(),r.$tip.success({title:a.success,message:e})})).catch((function(e){throw e}))})).catch((function(e){o.hide(),r.getServerList(),r.$tip.error({title:a.error,message:e.err_msg||e.message||r.$t("common.networkErr")})}))},restartServer:function(e){this.addTask(e,"restart",{success:this.$t("serverList.restart.success"),error:this.$t("serverList.restart.failed")})},stopServer:function(e){var t=this;this.$confirm(this.$t("serverList.stopService.msg.stopService"),this.$t("common.alert")).then((function(){t.addTask(e,"stop",{success:t.$t("serverList.restart.success"),error:t.$t("serverList.restart.failed")})}))},undeployServer:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r,o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:r=e.id,o=e.server_name,Object(P["a"])(e,["id","server_name"]),t.$confirm(t.$t("serverList.dlg.msg.undeploy"),t.$t("common.alert")).then(Object(R["a"])(regeneratorRuntime.mark((function e(){var a,s,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=t.serverList,s=t.serverType,!(["proxy","router"].indexOf(s)>-1&&1===a.length)){e.next=15;break}return e.next=4,t.$ajax.getJSON("/server/api/cache/hasModule",{serverType:s,serverName:o});case 4:if(n=e.sent,!n){e.next=7;break}return e.abrupt("return",t.$tip.warning(t.$t("pub.dlg.hasModule")));case 7:return e.prev=7,e.next=10,t.$confirm(t.$t("pub.dlg.cantUseApply"));case 10:e.next=15;break;case 12:return e.prev=12,e.t0=e["catch"](7),e.abrupt("return",!1);case 15:return e.prev=15,e.next=18,t.addTask(r,"undeploy_tars",{success:t.$t("serverList.restart.success"),error:t.$t("serverList.restart.failed")});case 18:e.next=22;break;case 20:e.prev=20,e.t1=e["catch"](15);case 22:return e.prev=22,t.closeMoreCmdModal(),e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[7,12],[15,20,22,25]])}))));case 2:case"end":return a.stop()}}),a)})))()},manageServant:function(e){var t=this;this.servantModal.show=!0;var a=this.$loading.show({target:this.$refs.servantModalLoading});this.$ajax.getJSON("/server/api/adapter_conf_list",{id:e.id}).then((function(r){a.hide(),t.servantModal.model=r,t.servantModal.currentServer=e})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))},closeServantModal:function(){this.servantModal.show=!1,this.servantModal.model=null,this.servantModal.currentServer=null},configServant:function(e){if(this.servantDetailModal.model={application:this.servantModal.currentServer.application,server_name:this.servantModal.currentServer.server_name,obj_name:"",node_name:"",endpoint:"",servant:"",thread_num:"",max_connections:"200000",queuecap:"10000",queuetimeout:"60000",allow_ip:"",protocol:"not_tars",handlegroup:""},this.servantDetailModal.isNew=!0,e){var t=this.servantModal.model.find((function(t){return t.id===e}));t.obj_name=t.servant.split(".")[2],this.servantDetailModal.model=Object.assign({},this.servantDetailModal.model,t),this.servantDetailModal.isNew=!1}this.servantDetailModal.show=!0},closeServantDetailModal:function(){this.$refs.servantDetailForm&&this.$refs.servantDetailForm.resetValid(),this.servantDetailModal.show=!1,this.servantDetailModal.model=null},checkServantEndpoint:function(e){var t=e.split(/\s-/),a=/^tcp|udp$/i,r=/^h\s(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/i,o=/^t\s([1-9]|[1-9]\d+)$/i,s=/^p\s\d{4,5}$/i,n=!0;if(a.test(t[0])){for(var l=0,i=1;i<t.length;i++)if(r&&r.test(t[i])&&(l++,this.servantDetailModal.model.node_name=t[i].split(/\s/)[1],r=null),o&&o.test(t[i])&&(l++,o=null),s&&s.test(t[i])){var c=t[i].substring(2);c<0||c>65535||l++,s=null}n=3===l}else n=!1;return n},saveServantDetail:function(){var e=this;if(this.$refs.servantDetailForm.validate()){var t=this.$Loading.show();if(this.servantDetailModal.isNew){var a=this.servantDetailModal.model;a.servant=[a.application,a.server_name,a.obj_name].join("."),this.$ajax.postJSON("/server/api/add_adapter_conf",a).then((function(a){t.hide(),e.servantModal.model.unshift(a),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}else this.servantDetailModal.model.servant=this.servantDetailModal.model.application+"."+this.servantDetailModal.model.server_name+"."+this.servantDetailModal.model.obj_name,this.$ajax.postJSON("/server/api/update_adapter_conf",this.servantDetailModal.model).then((function(a){t.hide(),e.servantModal.model=e.servantModal.model.map((function(e){return e.id===a.id?a:e})),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},deleteServant:function(e){var t=this;this.$confirm(this.$t("serverList.servant.a"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_adapter_conf",{id:e}).then((function(r){a.hide(),t.servantModal.model=t.servantModal.model.map((function(t){if(t.id!==e)return t})).filter((function(e){return e})),t.$tip.success(t.$t("common.success"))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))}))},showMoreCmd:function(e){var t=this;this.moreCmdModal.model={selected:"setloglevel",setloglevel:"NONE",loadconfig:"",command:"",configs:null},this.moreCmdModal.unwatch=this.$watch("moreCmdModal.model.selected",(function(){t.$refs.moreCmdForm&&t.$refs.moreCmdForm.resetValid()})),this.moreCmdModal.show=!0,this.moreCmdModal.currentServer=e,this.$ajax.getJSON("/server/api/config_file_list",{level:5,application:e.application,server_name:e.server_name}).then((function(e){t.moreCmdModal.model&&(t.moreCmdModal.model.configs=e)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},showStatus:function(e){this.sendCommand(e,"status",!0)},sendCommand:function(e,t,a){var r=this,o=this.$Loading.show();this.$ajax.getJSON("/server/api/send_command",{server_ids:e,command:t}).then((function(e){o.hide();var t=e[0].err_msg.replace(/\n/g,"<br>");if(0!==e[0].ret_code)throw new Error(t);var s={title:r.$t("common.success"),message:t};a&&(s.duration=0),r.$tip.success(s)})).catch((function(e){o.hide(),r.$tip.error({title:r.$t("common.error"),message:e.err_msg||e.message})}))},invokeMoreCmd:function(){var e=this.moreCmdModal.model,t=this.moreCmdModal.currentServer;"undeploy_tars"===e.selected?this.undeployServer(t):"setloglevel"===e.selected?this.sendCommand(t.id,"tars.setloglevel ".concat(e.setloglevel)):"loadconfig"===e.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(t.id,"tars.loadconfig ".concat(e.loadconfig)):"command"===e.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(t.id,e.command):"connection"===e.selected&&this.sendCommand(t.id,"tars.connection",!0)},closeMoreCmdModal:function(){this.$refs.moreCmdForm&&this.$refs.moreCmdForm.resetValid(),this.moreCmdModal.unwatch&&this.moreCmdModal.unwatch(),this.moreCmdModal.show=!1,this.moreCmdModal.model=null},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},openExpandModal:function(e){var t=e.server_name,a=e.node_name;this.expandModal.show=!0,this.expandModal.model.server_name=t,this.expandModal.model.node_name=a},expandService:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n,l,i,c,d,u,m,p,h;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.$refs.expandForm.validate()){t.next=45;break}return a=Object.assign({},e.expandModal.model),a.expand_nodes=e.expandModal.expandIpStr.trim().split(/[,;\n]/),r=e.$Loading.show(),t.prev=4,t.next=7,Object(A["f"])(a);case 7:if(o=t.sent,o){t.next=10;break}throw new Error(e.$t("serviceExpand.form.errTips.noneNodes"));case 10:return s=o.filter((function(t){return t.status===e.$t("serviceExpand.form.noExpand")})),n=[],l=[],s.forEach((function(e){l.push(e.bind_ip)})),t.next=16,Object(A["b"])({node_name:l.join(";")});case 16:return i=t.sent,i.forEach((function(t,a){e.$set(s[a],"port",String(t.port||""))})),s.forEach((function(e){n.push({bind_ip:e.bind_ip,node_name:e.node_name,obj_name:e.obj_name,port:e.port,set:e.set})})),c={application:a.application,server_name:a.server_name,set:a.set,node_name:a.node_name,copy_node_config:a.copy_node_config,expand_preview_servers:n},t.next=22,Object(A["e"])(c);case 22:return d=t.sent,u=d.server_conf,m={serial:!1,items:[]},p=e.serverType,h="","router"===p?h="RouterServer":"proxy"===p?h="ProxyServer":"dcache"===p&&(h="DCacheServerGroup"),u.forEach((function(e){m.items.push({server_id:e.id.toString(),command:"patch_tars",parameters:{patch_id:e.patch_version,bak_flag:e.bak_flag,update_text:"",group_name:h}})})),t.next=31,Object(A["a"])(m);case 31:t.sent,e.$tip.success(e.$t("serviceExpand.form.errTips.success")),e.closeExpandModal(),e.getServerList(),e.getServerNotifyList(1),t.next=42;break;case 38:t.prev=38,t.t0=t["catch"](4),console.error(t.t0),e.$tip.error(t.t0);case 42:return t.prev=42,r.hide(),t.finish(42);case 45:case"end":return t.stop()}}),t,null,[[4,38,42,45]])})))()},closeExpandModal:function(){this.$refs.expandForm&&this.$refs.expandForm.resetValid(),this.expandModal.show=!1,this.expandModal.model=z(),this.expandModal.expandIpStr=""}},created:function(){this.serverData=this.$parent.getServerData(),window.manage=this},mounted:function(){this.getServerList(),this.getServerNotifyList(1)}},F=V,W=(a("a8af"),Object(y["a"])(F,j,q,!1,null,null,null)),K=W.exports,J=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_publish"},[e.showHistory?e._e():a("div",[e.serverList&&e.serverList.length>0?a("let-table",{ref:"table",attrs:{data:e.serverList,title:e.$t("serverList.title.serverList"),"empty-msg":e.$t("common.noService")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}],null,!1,1693185143)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.enableSet")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.enable_set?e.$t("common.enable"):e.$t("common.disable")))])]}}],null,!1,2059146282)}),a("let-table-column",{attrs:{title:e.$t("common.set.setName"),prop:"set_name"}}),a("let-table-column",{attrs:{title:e.$t("common.set.setArea"),prop:"set_area"}}),a("let-table-column",{attrs:{title:e.$t("common.set.setGroup"),prop:"set_group"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus")},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"==e.row.setting_state?"status-active":"status-off"})]}}],null,!1,483453731)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus")},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"==e.row.present_state?"status-active":"status-off"})]}}],null,!1,3783586142)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(t.row.patch_time)))])]}}],null,!1,3144837894)}),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.totalPage,page:e.page},on:{change:e.changePage},slot:"pagination"}),a("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.openPublishModal}},[e._v(e._s(e.$t("pub.btn.pub")))]),e.serverList&&e.serverList.length>0?a("let-button",{attrs:{size:"small"},on:{click:e.gotoHistory}},[e._v(" "+e._s(e.$t("pub.btn.history"))+" ")]):e._e()],1)],1):e._e(),a("let-modal",{attrs:{title:e.$t("index.rightView.tab.patch"),width:"880px",footShow:!1},on:{close:e.closePublishModal,"on-confirm":e.savePublishServer},model:{value:e.publishModal.show,callback:function(t){e.$set(e.publishModal,"show",t)},expression:"publishModal.show"}},[e.publishModal.model?a("let-form",{ref:"publishForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("serverList.servant.appService")}},[e._v(" "+e._s(e.publishModal.model.application)+"路"+e._s(e.publishModal.model.server_name)+" ")]),a("let-form-item",{attrs:{label:e.$t("pub.dlg.ip")}},e._l(e.publishModal.model.serverList,(function(t){return a("div",{key:t.id},[e._v(e._s(t.node_name))])})),0),"tars"==e.serverType?a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("let-input",{model:{value:e.publishModal.model.update_text,callback:function(t){e.$set(e.publishModal.model,"update_text",t)},expression:"publishModal.model.update_text"}})],1):e._e(),e.patchRadioData.length>1?a("let-form-item",{attrs:{label:e.$t("pub.dlg.patchType")}},[a("let-radio-group",{attrs:{type:"button",size:"small",data:e.patchRadioData},on:{change:e.patchChange},model:{value:e.patchType,callback:function(t){e.patchType=t},expression:"patchType"}})],1):e._e(),e.publishModal.model.show?a("let-form-item",{attrs:{label:e.$t("pub.dlg.releaseVersion")}},["tars"==e.serverType?a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("pub.dlg.ab")},model:{value:e.publishModal.model.patch_id,callback:function(t){e.$set(e.publishModal.model,"patch_id",t)},expression:"publishModal.model.patch_id"}},e._l(e.publishModal.model.patchList,(function(t){return a("let-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.id)+" | "+e._s(t.posttime)+" | "+e._s(t.comment)+" ")])})),1):e._e(),"tars"==e.serverType?a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.showUploadModal}},[e._v(" "+e._s(e.$t("pub.dlg.upload"))+" ")]):e._e(),a("br"),"tars"!==e.serverType?a("let-table",{attrs:{data:e.publishModal.model.patchList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:t.row.id},model:{value:e.publishModal.publishId,callback:function(t){e.$set(e.publishModal,"publishId",t)},expression:"publishModal.publishId"}})]}}],null,!1,2512545811)}),a("let-table-column",{attrs:{title:"ID",prop:"id"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.id)+" "),a("span",{staticStyle:{color:"green",display:"inline-block",width:"1em",height:"1em"},attrs:{title:e.$t("releasePackage.default")}},[1==t.row.default_version?a("icon",{attrs:{name:"default"}}):e._e()],1)]}}],null,!1,1246507548)}),a("let-table-column",{attrs:{title:e.$t("releasePackage.moduleName"),prop:"server"}}),"dcache"===e.serverType?a("let-table-column",{attrs:{title:e.$t("releasePackage.cacheType")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(1==t.row.package_type?"KVcache":"MKVcache"))])]}}],null,!1,1195663938)}):e._e(),a("let-table-column",{attrs:{title:e.$t("serverList.servant.comment"),prop:"comment"}}),a("let-table-column",{attrs:{title:e.$t("releasePackage.uploadTime"),prop:"posttime"}}),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.publishModal.totalPatchPage,page:e.publishModal.patchPage},on:{change:e.patchChangePage},slot:"pagination"})],1):e._e(),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.savePublishServer}},[e._v(e._s(e.$t("common.patch"))+" ")])],1):a("let-form-item",{attrs:{label:e.$t("serverList.table.th.version")}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty"),requred:""},model:{value:e.tagVersion,callback:function(t){e.tagVersion=t},expression:"tagVersion"}},e._l(e.tagList,(function(t){return a("let-option",{key:""+t.version,attrs:{value:t.path+"--"+t.version}},[e._v(" "+e._s(t.version)+" ")])})),1),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.addCompileTask}},[e._v(" "+e._s(e.$t("pub.dlg.compileAndPublish"))+" ")]),e._e()],1)],1):e._e()],1),a("let-modal",{attrs:{title:e.$t("pub.dlg.upload"),width:"880px",footShow:!1},on:{"on-cancel":e.closeUploadModal},model:{value:e.uploadModal.show,callback:function(t){e.$set(e.uploadModal,"show",t)},expression:"uploadModal.show"}},[e.uploadModal.model?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadPatchPackage(t)}}},[a("let-form-item",{attrs:{label:e.$t("pub.dlg.releasePkg"),itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue")},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.submit"))+" ")]),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.uploadModal.model.comment,callback:function(t){e.$set(e.uploadModal.model,"comment",t)},expression:"uploadModal.model.comment"}})],1),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1),a("PublishStatus",{ref:"publishStatus"})],1),e.showHistory?a("div",[a("let-form",{attrs:{inline:"",itemWidth:"300px"},nativeOn:{submit:function(t){return t.preventDefault(),e.getHistoryList(t)}}},[a("let-form-item",{attrs:{label:e.$t("pub.date")}},[a("let-date-range-picker",{attrs:{start:e.startTime,end:e.endTime},on:{"update:start":function(t){e.startTime=t},"update:end":function(t){e.endTime=t}}})],1),a("let-form-item",[a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),a("let-table",{ref:"historyTable",attrs:{data:e.totalHistoryList,title:e.$t("historyList.title"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.servant.taskID"),prop:"task_no"}}),a("let-table-column",{attrs:{title:e.$t("historyList.table.th.c2")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.serial?e.$t("common.yes"):e.$t("common.no")))])]}}],null,!1,98019885)}),a("let-table-column",{attrs:{title:e.$t("serverList.dlg.title.taskStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.statusMap[t.row.status]||"-"))])]}}],null,!1,3973050033)}),a("let-table-column",{attrs:{title:e.$t("historyList.table.th.c4")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.viewTask(t.row.task_no)}}},[e._v(e._s(e.$t("operate.view")))])]}}],null,!1,1853944e3)}),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.historyTotalPage,page:e.historyPage},on:{change:e.changeHistoryPage},slot:"pagination"}),a("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showHistory=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1),a("let-modal",{attrs:{title:e.$t("historyList.table.th.c4"),width:"880px",footShow:!1},on:{"on-cancel":function(t){e.taskModal.show=!1}},model:{value:e.taskModal.show,callback:function(t){e.$set(e.taskModal,"show",t)},expression:"taskModal.show"}},[e.taskModal.model?a("let-table",{attrs:{data:e.taskModal.model.items}},[a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c1"),prop:"item_no"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c5"),prop:"command"}}),a("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),a("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}}),a("let-table-column",{attrs:{title:e.$t("common.status"),prop:"status_info"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c7"),prop:"execute_info"}})],1):e._e()],1)],1):e._e(),a("let-modal",{attrs:{title:e.$t("pub.dlg.conf"),width:"800px",footShow:!0},on:{"on-confirm":e.saveCompilerUrl,"on-cancel":function(t){e.publishUrlConfModal.show=!1}},model:{value:e.publishUrlConfModal.show,callback:function(t){e.$set(e.publishUrlConfModal,"show",t)},expression:"publishUrlConfModal.show"}},[e.publishUrlConfModal.model?a("let-form",{ref:"compilerForm",attrs:{itemWidth:"100%",required:""}},[a("let-form-item",{attrs:{label:e.$t("pub.dlg.tag")}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("pub.tips.tag"),"required-tip":e.$t("deployService.table.tips.empty"),required:""},model:{value:e.publishUrlConfModal.model.tag,callback:function(t){e.$set(e.publishUrlConfModal.model,"tag",t)},expression:"publishUrlConfModal.model.tag"}})],1)],1):e._e()],1),a("let-modal",{attrs:{title:e.$t("pub.dlg.compileProgress"),width:"880px",footShow:!1},model:{value:e.compilerModal.show,callback:function(t){e.$set(e.compilerModal,"show",t)},expression:"compilerModal.show"}},[e.compilerModal.model?a("let-table",{attrs:{data:e.compilerModal.model.progress}},[a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c8"),prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return["1"==t.row.state?a("span",{staticClass:"running"},[e._v(e._s(t.row.status))]):"2"==t.row.state?a("span",{staticClass:"success"},[e._v(e._s(t.row.status))]):a("span",{staticClass:"stop"},[e._v(e._s(t.row.status))])]}}],null,!1,3193835083)}),a("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),a("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}})],1):e._e()],1)],1)},B=[],G=(a("fb6a"),a("b64b"),a("acfd")),U={name:"ServerPublish",components:{PublishStatus:G["a"]},data:function(){return{serverType:this.servertype||"tars",activeKey:"",treeData:[],totalServerList:[],serverList:[],isCheckedAll:!1,totalPage:0,pageSize:20,page:1,publishModal:{publishId:null,show:!1,model:null,module_name:"",application:"",totalPatchPage:0,patchPageSize:10,patchPage:1},finishModal:{show:!1,model:{task_no:"",items:[]}},statusConfig:{0:this.$t("serverList.restart.notStart"),1:this.$t("serverList.restart.running"),2:this.$t("serverList.restart.success"),3:this.$t("serverList.restart.failed"),4:this.$t("serverList.restart.cancel"),5:this.$t("serverList.restart.parial")},statusMap:{0:"EM_T_NOT_START",1:"EM_T_RUNNING",2:"EM_T_SUCCESS",3:"EM_T_FAILED",4:"EM_T_CANCEL",5:"EM_T_PARIAL"},showHistory:!1,startTime:"",endTime:"",totalHistoryList:[],historyList:[],historyTotalPage:0,historyPage:1,historyPageSize:20,taskModal:{show:!1,modal:!0},uploadModal:{show:!1,model:null},patchType:"patch",patchRadioData:[{value:"patch",text:this.$t("pub.dlg.upload")}],tagList:[],tagVersion:"",publishUrlConfModal:{show:!1,model:{tag:"",compiler:"",task:""}},compilerModal:{show:!1,model:null},pkgUpload:{show:!1,model:null}}},props:["treeid","servertype"],methods:{getCompileConf:function(){var e=this;this.$ajax.getJSON("/server/api/get_compile_conf").then((function(t){t.enable&&e.patchRadioData.push({value:"compile",text:e.$t("pub.dlg.compileAndPublish")})})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getServerList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.treeid}).then((function(a){t.hide();var r=a||[];r.forEach((function(e){e.isChecked=!1})),e.totalServerList=r,e.totalPage=Math.ceil(e.totalServerList.length/e.pageSize),e.page=1,e.updateServerList()})).catch((function(a){t.hide(),e.$confirm(a.err_msg||a.message||e.$t("serverList.table.msg.fail")).then((function(){e.getServerList()}))}))},changePage:function(e){this.page=e},openPublishModal:function(){var e=this,t=this.serverList.filter((function(e){return e.isChecked}));if(t.length<=0)this.$tip.warning(this.$t("pub.dlg.a"));else{var a=t[0];this.publishModal.publishId=null,this.publishModal.model={application:a.application,server_name:a.server_name,serverList:t,patchList:[],patch_id:"",update_text:"",show:!0};var r=this.serverType,o=a.server_name,s=1,n=5;"router"==r?o="RouterServer":"proxy"==r?o="ProxyServer":"dbaccess"==r?o="CombinDbAccessServer":"dcache"==r&&(o="DCacheServerGroup"),this.publishModal.module_name=o,this.publishModal.application=a.application,this.publishModal.patchPage=s,this.publishModal.patchPageSize=n,this.getPatchList(a.application,o,s,n).then((function(t){e.publishModal.model.patchList=t.rows,e.publishModal.totalPatchPage=Math.ceil(t.count/n),e.publishModal.show=!0}))}},patchChangePage:function(e){var t=this;this.publishModal.patchPage=e;var a=this.publishModal,r=a.module_name,o=a.application,s=a.patchPage,n=a.patchPageSize;this.getPatchList(o,r,s,n).then((function(e){t.publishModal.model.patchList=e.rows,t.publishModal.totalPatchPage=Math.ceil(e.count/n)}))},getPatchList:function(e,t,a,r){return this.$ajax.getJSON("/server/api/server_patch_list",{application:e,module_name:t,curr_page:a,page_size:r})},closePublishModal:function(){this.publishModal.show=!1,this.publishModal.modal=null,this.patchType="patch",this.$refs.publishForm.resetValid()},savePublishServer:function(){if(this.$refs.publishForm.validate()){var e="tars"===this.serverType?this.publishModal.model.patch_id.toString():this.publishModal.publishId;if(!e)return this.$tip.warning(this.$t("pub.dlg.ab"));var t=this.serverType,a="";"router"==t?a="RouterServer":"proxy"==t?a="ProxyServer":"dbaccess"==t?a="CombinDbAccessServer":"dcache"==t&&(a="DCacheServerGroup"),this.$refs.publishStatus.savePublishServer(this.publishModal,this.closePublishModal,a,e)}},closeFinishModal:function(){this.finishModal.show=!1,this.finishModal.modal=null,this.$refs.finishForm.resetValid()},updateServerList:function(){var e=(this.page-1)*this.pageSize,t=this.page*this.pageSize;this.serverList=this.totalServerList.slice(e,t)},gotoHistory:function(){this.showHistory=!0,this.getHistoryList(1)},getHistoryList:function(e){var t=this;"number"!=typeof e&&(e=1);var a=this.$Loading.show(),r={application:this.serverList[0].application||"",server_name:this.serverList[0].server_name||"",from:this.startTime,to:this.endTime,page_size:this.historyPageSize,curr_page:e};this.historyPage=e,this.$ajax.getJSON("/server/api/task_list",r).then((function(e){a.hide(),t.totalHistoryList=e.rows||[],t.historyTotalPage=Math.ceil(e.count/t.historyPageSize)})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},viewTask:function(e){var t=this;this.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(e){t.taskModal.model=e,t.taskModal.show=!0}))},changeHistoryPage:function(e){this.getHistoryList(e)},showUploadModal:function(){this.serverList.length<=0&&this.$tip.warning(this.$t("pub.dlg.a")),this.uploadModal.model={application:this.serverList[0].application||"",server_name:this.serverList[0].server_name||"",file:null,comment:""},this.uploadModal.show=!0},closeUploadModal:function(){this.uploadModal.show=!1,this.uploadModal.model=null,this.$refs.uploadForm.resetValid()},uploadFile:function(e){this.uploadModal.model.file=e},uploadPatchPackage:function(){var e=this;if(this.$refs.uploadForm.validate()){var t=this.$Loading.show(),a=new FormData;a.append("application",this.uploadModal.model.application),a.append("module_name",this.uploadModal.model.server_name),a.append("suse",this.uploadModal.model.file),a.append("comment",this.uploadModal.model.comment),a.append("task_id",(new Date).getTime()),this.$ajax.postForm("/server/api/upload_patch_package",a).then((function(){e.getPatchList(e.uploadModal.model.application,e.uploadModal.model.server_name,1,50).then((function(a){t.hide(),e.publishModal.model.patchList=a.rows,e.closeUploadModal()}))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))}},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},patchChange:function(){"patch"==this.patchType?this.publishModal.model.show=!0:(this.publishModal.model.show=!1,this.getCodeVersion())},getCodeVersion:function(){var e=this;this.$ajax.get("/server/api/get_tag_list",{application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then((function(t){""==t.data?e.openPubConfModal():e.tagList=t.data})).catch((function(t){e.tagList=[],e.$tip.error("".concat(e.$t("common.error"),": ").concat(err.err_msg||err.message))}))},openPubConfModal:function(){var e=this;this.publishUrlConfModal.show=!0,this.$ajax.getJSON("/server/api/get_tag_conf",{application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then((function(t){e.publishUrlConfModal.model.tag=t.path})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))},saveCompilerUrl:function(){var e=this;if(this.$refs.compilerForm.validate()){var t=this.$Loading.show();this.$ajax.getJSON("/server/api/set_tag_conf",{path:this.publishUrlConfModal.model.tag,application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then((function(a){t.hide(),e.$tip.success(e.$t("common.success")),e.publishUrlConfModal.show=!1,e.getCodeVersion()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},addCompileTask:function(){var e=this;this.$ajax.getJSON("/server/api/get_compile_conf").then((function(t){var a=t.getVersionList;if(a){var r=e.publishModal.model.serverList.map((function(e){return e.node_name})),o={application:e.publishModal.model.application,server_name:e.publishModal.model.server_name,node:r.join(";"),path:e.tagVersion.split("--")[0],version:e.tagVersion.split("--")[1],comment:e.publishModal.model.update_text||"",compileUrl:a},s=e.$Loading.show();e.$ajax.postJSON("/server/api/do_compile",o).then((function(t){s.hide(),e.compilerModal.show=!0;var a="string"===typeof t?t:t.data;e.getStatus(a)})).catch((function(t){s.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))}else e.openPubConfModal()})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))},taskStatus:function(e){this.getStatus(e)},getStatus:function(e){var t=this,a=function a(){var r=null;r&&clearTimeout(r),t.$ajax.getJSON("/server/api/compiler_task",{taskNo:e}).then((function(o){var s="array"===typeof o?o:o.data;if(s[0].status=t.statusConfig[s[0].state],1==s[0].state&&(r=setTimeout(a,2e3)),t.compilerModal.model?Object.assign(t.compilerModal.model,{progress:s}):t.compilerModal.model={progress:s},2==s[0].state){var n=t.$Loading({text:"鍥炰紶鍙戝竷鍖�"});n.show(),t.compilerModal.show=!1;var l=function a(){t.$ajax.getJSON("/server/api/get_server_patch",{task_id:e}).then((function(e){0!==Object.keys(e).length?(n.hide(),t.publishModal.model.patch_id=e.id,t.publishModal.show=!1,t.savePublishServer()):setTimeout(a,2e3)})).catch((function(e){n.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))};setTimeout(l,2e3)}})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))};a()}},mounted:function(){this.getServerList(),this.getCompileConf()},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.serverList.forEach((function(t){t.isChecked=e}))},page:function(){this.updateServerList()}}},H=U,Z=(a("0207"),Object(y["a"])(H,J,B,!1,null,null,null)),Y=Z.exports,Q=a("918a"),X=a("c9e9"),ee=a("4527"),te=a("c2de"),ae=a("3430"),re=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_manage"},[a("div",{staticClass:"table_head"},[a("h4",[e._v(e._s(this.$t("serverList.title.serverList"))+" "),a("i",{staticClass:"icon iconfont el-icon-third-shuaxin",on:{click:e.getServerList}})])]),e.serverList?a("let-table",{ref:"serverListLoading",attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{attrs:{value:e.isCheckedAll,change:e.checkedAllChange},model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}],null,!1,2423312602)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.group"),prop:"group_name"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row.group_name;return[e._v(e._s(/.*?(\d+)$/.exec(a)[1]))]}}],null,!1,1174827465)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("a",{staticClass:"buttonText",attrs:{href:"/static/logview/logview.html?app=DCache&server_name="+[t.row.server_name]+"&node_name="+[t.row.node_name],title:"鐐瑰嚮鏌ョ湅鏈嶅姟鏃ュ織(view server logs)",target:"_blank"}},[e._v(" "+e._s(t.row.server_name)+" ")])]}}],null,!1,2286202596)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"125px"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.area"),prop:"area",width:"45px"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.zb"),width:"45px"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row.server_type;return["M"===r?a("span",[e._v(e._s(e.$t("cache.mainEngine")))]):"S"===r?a("span",[e._v(e._s(e.$t("cache.standByEngine")))]):"I"===r?a("span",[e._v(e._s(e.$t("cache.mirror")))]):e._e()]}}],null,!1,888927167)}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.routerPageNo"),prop:"routerPageNo",width:"65px"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus"),width:"65px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"===e.row.setting_state?"status-active":"status-off"})]}}],null,!1,3224184510)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus"),width:"65px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"===e.row.present_state?"status-active":"activating"===e.row.present_state?"status-activating":"status-off"})]}}],null,!1,4116932289)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.processID"),prop:"process_id",width:"65px"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version",width:"45px"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.time"),width:"50px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"white-space":"nowrap"}},[e._v(e._s(e.handleNoPublishedTime(t.row.patch_time)))])]}}],null,!1,453975453)}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"200px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.configServer(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.restartServer(t.row.id)}}},[e._v(e._s(e.$t("operate.restart")))]),a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.stopServer(t.row.id)}}},[e._v(e._s(e.$t("operate.stop"))+" ")]),a("br"),a("let-table-operation",{on:{click:function(a){return e.manageServant(t.row)}}},[e._v(e._s(e.$t("operate.servant")))]),a("let-table-operation",{on:{click:function(a){return e.showMoreCmd(t.row)}}},[e._v(e._s(e.$t("operate.more")))]),a("let-table-operation",{on:{click:function(a){return e.showStatus(t.row.id)}}},[e._v(e._s(e.$t("operate.status")))])]}}],null,!1,1750529072)}),a("template",{slot:"operations"},[a("let-button",{attrs:{theme:"primary"},on:{click:e.expandHandler}},[e._v(e._s(e.$t("dcache.expand")))]),a("let-button",{attrs:{theme:"primary",disabled:!e.hasCheckedServer},on:{click:e.shrinkageHandler}},[e._v(e._s(e.$t("dcache.Shrinkage"))+" ")]),a("let-button",{attrs:{theme:"primary",disabled:!e.hasCheckedServer},on:{click:e.serverMigrationHandler}},[e._v(" "+e._s(e.$t("dcache.serverMigration"))+" ")]),e.serverList.length?a("non-server-migration",{attrs:{disabled:!e.hasCheckedServer,"expand-servers":e.serverList}}):e._e(),a("let-button",{attrs:{theme:"primary",disabled:!e.hasCheckedServer},on:{click:e.switchHandler}},[e._v(e._s(e.$t("dcache.switch"))+" ")]),a("let-button",{attrs:{theme:"primary",disabled:!e.hasCheckedServer},on:{click:e.switchMIHandler}},[e._v(e._s(e.$t("dcache.switchMirrorAsMaster"))+" ")]),a("offline",{attrs:{disabled:!e.hasCheckedServer,"server-list":e.serverList},on:{"success-fn":e.getServerList}}),a("batch-publish",{attrs:{disabled:!e.hasCheckedServer,"checked-servers":e.checkedServers},on:{"success-fn":e.getServerList}}),a("batch-operation",{attrs:{disabled:!e.hasCheckedServer,"checked-servers":e.checkedServers,type:"restart"},on:{"success-fn":e.getServerList}}),a("batch-operation",{attrs:{disabled:!e.hasCheckedServer,"checked-servers":e.checkedServers,type:"stop"},on:{"success-fn":e.getServerList}})],1)],2):e._e(),e.serverNotifyList&&e.showOthers?a("let-table",{ref:"serverNotifyListLoading",attrs:{data:e.serverNotifyList,title:e.$t("serverList.title.serverStatus"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"notifytime"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.serviceID"),prop:"server_id"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.threadID"),prop:"thread_id"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result"),prop:"result"}})],1):e._e(),a("let-modal",{attrs:{title:e.$t("serverList.dlg.title.editService"),width:"800px",footShow:!(!e.configModal.model||!e.configModal.model.server_name)},on:{"on-confirm":e.saveConfig,close:e.closeConfigModal,"on-cancel":e.closeConfigModal},model:{value:e.configModal.show,callback:function(t){e.$set(e.configModal,"show",t)},expression:"configModal.show"}},[e.configModal.model&&e.configModal.model.server_name?a("let-form",{ref:"configForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("common.service")}},[e._v(e._s(e.configModal.model.server_name))]),a("let-form-item",{attrs:{label:e.$t("common.ip")}},[e._v(e._s(e.configModal.model.node_name))]),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.isBackup"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:!0,text:e.$t("common.yes")},{value:!1,text:e.$t("common.no")}]},model:{value:e.configModal.model.bak_flag,callback:function(t){e.$set(e.configModal.model,"bak_flag",t)},expression:"configModal.model.bak_flag"}})],1),a("let-form-item",{attrs:{label:e.$t("common.template"),required:""}},[e.configModal.model.templates&&e.configModal.model.templates.length?a("let-select",{attrs:{size:"small",required:""},model:{value:e.configModal.model.template_name,callback:function(t){e.$set(e.configModal.model,"template_name",t)},expression:"configModal.model.template_name"}},e._l(e.configModal.model.templates,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1):a("span",[e._v(e._s(e.configModal.model.template_name))])],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.serviceType"),required:""}},[a("let-select",{attrs:{size:"small",required:""},model:{value:e.configModal.model.server_type,callback:function(t){e.$set(e.configModal.model,"server_type",t)},expression:"configModal.model.server_type"}},e._l(e.serverTypes,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.enableSet"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:!0,text:e.$t("common.enable")},{value:!1,text:e.$t("common.disable")}]},model:{value:e.configModal.model.enable_set,callback:function(t){e.$set(e.configModal.model,"enable_set",t)},expression:"configModal.model.enable_set"}})],1),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setName"),required:"",pattern:"^[a-z]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setName")},model:{value:e.configModal.model.set_name,callback:function(t){e.$set(e.configModal.model,"set_name",t)},expression:"configModal.model.set_name"}})],1):e._e(),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setArea"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setArea"),required:"",pattern:"^[a-z]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setArea")},model:{value:e.configModal.model.set_area,callback:function(t){e.$set(e.configModal.model,"set_area",t)},expression:"configModal.model.set_area"}})],1):e._e(),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setGroup"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setGroup"),required:"",pattern:"^[0-9\\*]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setGroup")},model:{value:e.configModal.model.set_group,callback:function(t){e.$set(e.configModal.model,"set_group",t)},expression:"configModal.model.set_group"}})],1):e._e(),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.asyncThread"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.placeholder.thread"),required:"",pattern:"tars_nodejs"===e.configModal.model.server_type?"^[1-9][0-9]*$":"^([3-9]|[1-9][0-9]+)$","pattern-tip":"$t('serverList.dlg.placeholder.thread')"},model:{value:e.configModal.model.async_thread_num,callback:function(t){e.$set(e.configModal.model,"async_thread_num",t)},expression:"configModal.model.async_thread_num"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.defaultPath")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.base_path,callback:function(t){e.$set(e.configModal.model,"base_path",t)},expression:"configModal.model.base_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.exePath")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.exe_path,callback:function(t){e.$set(e.configModal.model,"exe_path",t)},expression:"configModal.model.exe_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.startScript")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.start_script_path,callback:function(t){e.$set(e.configModal.model,"start_script_path",t)},expression:"configModal.model.start_script_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.stopScript")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.stop_script_path,callback:function(t){e.$set(e.configModal.model,"stop_script_path",t)},expression:"configModal.model.stop_script_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.monitorScript"),itemWidth:"724px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.monitor_script_path,callback:function(t){e.$set(e.configModal.model,"monitor_script_path",t)},expression:"configModal.model.monitor_script_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.privateTemplate"),labelWidth:"150px",itemWidth:"724px"}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:4},model:{value:e.configModal.model.profile,callback:function(t){e.$set(e.configModal.model,"profile",t)},expression:"configModal.model.profile"}})],1)],1):a("div",{ref:"configFormLoading",staticClass:"loading-placeholder"})],1),a("let-modal",{attrs:{title:e.$t("serverList.table.servant.title"),width:"1200px",footShow:!1},on:{close:e.closeServantModal},model:{value:e.servantModal.show,callback:function(t){e.$set(e.servantModal,"show",t)},expression:"servantModal.show"}},[a("let-button",{staticClass:"tbm16",attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.configServant()}}},[e._v(e._s(e.$t("operate.add"))+" Servant ")]),e.servantModal.model?a("let-table",{attrs:{data:e.servantModal.model,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("operate.servant"),prop:"servant"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.adress"),prop:"endpoint"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.thread"),prop:"thread_num"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.connections"),prop:"max_connections"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),prop:"queuecap"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),prop:"queuetimeout"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.configServant(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.deleteServant(t.row.id)}}},[e._v(e._s(e.$t("operate.delete"))+" ")])]}}],null,!1,291375903)})],1):a("div",{ref:"servantModalLoading",staticClass:"loading-placeholder"})],1),a("let-modal",{attrs:{title:e.servantDetailModal.isNew?e.$t("operate.title.add")+" Servant":e.$t("operate.title.update")+" Servant",width:"800px",footShow:!!e.servantDetailModal.model},on:{"on-confirm":e.saveServantDetail,close:e.closeServantDetailModal,"on-cancel":e.closeServantDetailModal},model:{value:e.servantDetailModal.show,callback:function(t){e.$set(e.servantDetailModal,"show",t)},expression:"servantDetailModal.show"}},[e.servantDetailModal.model?a("let-form",{ref:"servantDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("serverList.servant.appService"),itemWidth:"724px"}},[a("span",[e._v(e._s(e.servantDetailModal.model.application)+"路"+e._s(e.servantDetailModal.model.server_name))])]),a("let-form-item",{attrs:{label:e.$t("serverList.servant.objName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.servant.c"),required:"","pattern-tip":e.$t("serverList.servant.obj")},model:{value:e.servantDetailModal.model.obj_name,callback:function(t){e.$set(e.servantDetailModal.model,"obj_name",t)},expression:"servantDetailModal.model.obj_name"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.numOfThread"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.servant.thread"),required:"",pattern:"^[1-9][0-9]*$","pattern-tip":e.$t("serverList.servant.thread")},model:{value:e.servantDetailModal.model.thread_num,callback:function(t){e.$set(e.servantDetailModal.model,"thread_num",t)},expression:"servantDetailModal.model.thread_num"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.servant.adress"),required:"",itemWidth:"724px"}},[a("let-input",{ref:"endpoint",attrs:{size:"small",placeholder:"tcp -h 127.0.0.1 -t 60000 -p 12000",required:"",extraTip:e.isEndpointValid?"":e.$t("serverList.servant.error")},model:{value:e.servantDetailModal.model.endpoint,callback:function(t){e.$set(e.servantDetailModal.model,"endpoint",t)},expression:"servantDetailModal.model.endpoint"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.connections"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.max_connections,callback:function(t){e.$set(e.servantDetailModal.model,"max_connections",t)},expression:"servantDetailModal.model.max_connections"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.lengthOfQueue"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.queuecap,callback:function(t){e.$set(e.servantDetailModal.model,"queuecap",t)},expression:"servantDetailModal.model.queuecap"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.queueTimeout"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.queuetimeout,callback:function(t){e.$set(e.servantDetailModal.model,"queuetimeout",t)},expression:"servantDetailModal.model.queuetimeout"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.allowIP")}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.allow_ip,callback:function(t){e.$set(e.servantDetailModal.model,"allow_ip",t)},expression:"servantDetailModal.model.allow_ip"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.protocol"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:"tars",text:"TARS"},{value:"not_tars",text:e.$t("serverList.servant.notTARS")}]},model:{value:e.servantDetailModal.model.protocol,callback:function(t){e.$set(e.servantDetailModal.model,"protocol",t)},expression:"servantDetailModal.model.protocol"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.treatmentGroup"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.handlegroup,callback:function(t){e.$set(e.servantDetailModal.model,"handlegroup",t)},expression:"servantDetailModal.model.handlegroup"}})],1)],1):e._e()],1),a("let-modal",{staticClass:"more-cmd",attrs:{title:e.$t("operate.title.more"),width:"700px"},on:{"on-confirm":e.invokeMoreCmd,close:e.closeMoreCmdModal,"on-cancel":e.closeMoreCmdModal},model:{value:e.moreCmdModal.show,callback:function(t){e.$set(e.moreCmdModal,"show",t)},expression:"moreCmdModal.show"}},[e.moreCmdModal.model?a("let-form",{ref:"moreCmdForm"},[a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"setloglevel"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.logLevel"))+" ")]),a("let-select",{attrs:{size:"small",disabled:"setloglevel"!==e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.setloglevel,callback:function(t){e.$set(e.moreCmdModal.model,"setloglevel",t)},expression:"moreCmdModal.model.setloglevel"}},e._l(e.logLevels,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"loadconfig"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.pushFile"))+" ")]),a("let-select",{attrs:{size:"small",placeholder:e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length?e.$t("pub.dlg.defaultValue"):e.$t("pub.dlg.noConfFile"),disabled:!(e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length)||"loadconfig"!==e.moreCmdModal.model.selected,required:"loadconfig"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.loadconfig,callback:function(t){e.$set(e.moreCmdModal.model,"loadconfig",t)},expression:"moreCmdModal.model.loadconfig"}},e._l(e.moreCmdModal.model.configs,(function(t){return a("let-option",{key:t.filename,attrs:{value:t.filename}},[e._v(e._s(t.filename)+" ")])})),1)],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"command"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.sendCommand"))+" ")]),a("let-input",{attrs:{size:"small",disabled:"command"!==e.moreCmdModal.model.selected,required:"command"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.command,callback:function(t){e.$set(e.moreCmdModal.model,"command",t)},expression:"moreCmdModal.model.command"}})],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"connection"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.serviceLink"))+" ")])],1)],1):e._e()],1),a("let-modal",{attrs:{footShow:!1,closeOnClickBackdrop:!1,width:"1200px",title:e.$t("dcache.expand")},model:{value:e.expandShow,callback:function(t){e.expandShow=t},expression:"expandShow"}},[e.expandShow?a("Expand",{attrs:{"expand-servers":e.lastGroupServers},on:{close:e.expandCloseHandler}}):e._e()],1),a("let-modal",{attrs:{footShow:!1,closeOnClickBackdrop:!1,width:"1200px",title:e.$t("dcache.serverMigration")},model:{value:e.serverMigrationShow,callback:function(t){e.serverMigrationShow=t},expression:"serverMigrationShow"}},[e.serverMigrationShow?a("server-migration",{attrs:{"check-src-group-name":e.checkSrcGroupName,"expand-servers":e.lastGroupServers},on:{close:e.serverMigrationCloseHandler}}):e._e()],1)],1)},oe=[],se=(a("a630"),a("6062"),a("3ca3"),a("ddb0"),a("2ef0")),ne=a.n(se),le=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"container"},[a("let-form",{ref:"detailForm",attrs:{inline:""}},[a("let-form-group",{attrs:{inline:"","label-position":"top"}},[a("let-table",{ref:"table",attrs:{data:e.servers,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("module.name"),prop:"module_name"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.module_name)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("module.serverGroup"),prop:"group_name"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.group_name)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"server_name"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.server_name)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("service.serverIp"),prop:"server_ip"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",filterable:"",required:""},model:{value:t.row.server_ip,callback:function(a){e.$set(t.row,"server_ip",a)},expression:"scope.row.server_ip"}},e._l(e.nodeList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)]}}])}),a("let-table-column",{attrs:{title:e.$t("module.deployArea"),prop:"area",width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.area)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.form.serviceType"),width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row.server_type;return["M"===r?a("span",[e._v(e._s(e.$t("cache.mainEngine")))]):"S"===r?a("span",[e._v(e._s(e.$t("cache.standByEngine")))]):"I"===r?a("span",[e._v(e._s(e.$t("cache.mirror")))]):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("module.memorySize"),prop:"memory"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("let-input",{attrs:{size:"small",placeholder:e.$t("module.shmKeyRule")},model:{value:r.memory,callback:function(t){e.$set(r,"memory",t)},expression:"row.memory"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("module.shmKey"),prop:"shmKey",width:"150px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",placeholder:e.$t("module.shmKeyRule")},model:{value:t.row.shmKey,callback:function(a){e.$set(t.row,"shmKey",a)},expression:"scope.row.shmKey"}})]}}])})],1)],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.submitServerConfig}},[e._v(e._s(e.$t("common.submit")))]),a("div",{staticClass:"alignRight"},[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addNewGroup}},[e._v(e._s(e.$t("serviceExpand.newGroup")))]),e._v(" "),a("let-button",{attrs:{size:"small",theme:"danger",disabled:this.servers.length===this.expandServers.length},on:{click:e.deleteGroup}},[e._v(e._s(e.$t("serviceExpand.removeGroup")))])],1)],1)],1)],1)},ie=[],ce=a("e51e"),de={mixins:[ce["a"]],data:function(){return{nodeList:[]}},methods:{submitServerConfig:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.$refs.detailForm.validate()){t.next=15;break}return a=e.servers,r=e.appName,o=e.moduleName,s=e.cache_version,e.dstGroupName,t.prev=2,t.next=5,Object(A["d"])({servers:a,appName:r,moduleName:o,cache_version:s,srcGroupName:[]});case 5:n=t.sent,n.releaseId,e.$tip.success(e.$t("dcache.operationManage.hasExpand")),e.$emit("close"),t.next=15;break;case 11:t.prev=11,t.t0=t["catch"](2),console.error(t.t0),e.$tip.error(t.t0.message);case 15:case"end":return t.stop()}}),t,null,[[2,11]])})))()}},mounted:function(){var e=this;this.$ajax.getJSON("/server/api/node_list").then((function(t){e.nodeList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},created:function(){this.getServers()}},ue=de,me=(a("f3e0"),Object(y["a"])(ue,le,ie,!1,null,null,null)),pe=me.exports,he=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"container"},[a("let-form",{ref:"detailForm",attrs:{inline:""}},[a("let-form-item",{attrs:{required:"",label:e.$t("dcache.migrationMethod")}},[a("let-radio-group",{attrs:{data:e.migrationMethods},model:{value:e.transferData,callback:function(t){e.transferData=t},expression:"transferData"}})],1),a("let-form-group",{attrs:{inline:"","label-position":"top"}},[a("let-table",{ref:"table",attrs:{data:e.servers,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("module.name"),prop:"module_name"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.module_name)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("module.serverGroup"),prop:"group_name"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.group_name)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"server_name"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.server_name)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("service.serverIp"),prop:"server_ip"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",filterable:"",required:""},model:{value:t.row.server_ip,callback:function(a){e.$set(t.row,"server_ip",a)},expression:"scope.row.server_ip"}},e._l(e.nodeList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)]}}])}),a("let-table-column",{attrs:{title:e.$t("module.deployArea"),prop:"area"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.area)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.form.serviceType"),width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row.server_type;return["M"===r?a("span",[e._v(e._s(e.$t("cache.mainEngine")))]):"S"===r?a("span",[e._v(e._s(e.$t("cache.standByEngine")))]):"I"===r?a("span",[e._v(e._s(e.$t("cache.mirror")))]):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("module.memorySize"),prop:"memory"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("let-input",{attrs:{size:"small",placeholder:e.$t("module.shmKeyRule")},model:{value:r.memory,callback:function(t){e.$set(r,"memory",t)},expression:"row.memory"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("module.shmKey"),prop:"shmKey"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",placeholder:e.$t("module.shmKeyRule")},model:{value:t.row.shmKey,callback:function(a){e.$set(t.row,"shmKey",a)},expression:"scope.row.shmKey"}})]}}])})],1)],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.submitServerConfig}},[e._v(e._s(e.$t("common.submit")))])],1)],1)],1)},fe=[],ve={mixins:[ce["a"]],props:{checkSrcGroupName:{required:!0,type:String}},data:function(){return{nodeList:[]}},methods:{submitServerConfig:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n,l,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.$refs.detailForm.validate()){t.next=12;break}return a=e.servers,r=e.appName,o=e.moduleName,s=e.cache_version,n=e.dstGroupName,l=e.transferData,i=e.checkSrcGroupName,t.prev=2,t.next=5,Object(A["bb"])({servers:a,appName:r,moduleName:o,cache_version:s,srcGroupName:i,dstGroupName:n,transferData:l});case 5:e.$tip.success(e.$t("dcache.operationManage.hasServerMigration")),e.$emit("close"),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](2),e.$tip.error(t.t0.message);case 12:case"end":return t.stop()}}),t,null,[[2,9]])})))()}},mounted:function(){var e=this;this.$ajax.getJSON("/server/api/node_list").then((function(t){e.nodeList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},created:function(){this.getServers()}},ge=ve,be=Object(y["a"])(ge,he,fe,!1,null,null,null),_e=be.exports,$e=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticStyle:{display:"inline"}},[a("let-button",{attrs:{theme:"primary",disabled:e.disabled},on:{click:e.init}},[e._v(e._s(e.$t("dcache.nonServerMigration")))]),a("let-modal",{attrs:{footShow:!1,closeOnClickBackdrop:!0,width:"1000px",title:e.$t("dcache.nonServerMigration")},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[e.show?a("let-form",{ref:"detailForm",staticClass:"non-server-migration",attrs:{labelPosition:"right"}},[a("let-form-item",{attrs:{required:"",label:e.$t("dcache.operationManage.appName")+"锛�"}},[e._v(" "+e._s(e.appName)+" ")]),a("let-form-item",{attrs:{required:"",label:e.$t("dcache.operationManage.moduleName")+"锛�"}},[e._v(" "+e._s(e.moduleName)+" ")]),a("let-form-item",{attrs:{required:"",label:e.$t("dcache.operationManage.srcGroupName")+"锛�"}},[e._v(" "+e._s(e.srcGroupName)+" ")]),a("let-form-item",{attrs:{itemWidth:"100%",required:"",label:e.$t("dcache.operationManage.dstGroupName")+"锛�"}},[a("let-select",{attrs:{required:"",size:"small"},model:{value:e.groupName,callback:function(t){e.groupName=t},expression:"groupName"}},e._l(e.dstGroupNames,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{required:"",label:e.$t("dcache.migrationMethod")+"锛�"}},[a("let-radio-group",{staticStyle:{width:"300px"},attrs:{data:e.migrationMethods},model:{value:e.transferData,callback:function(t){e.transferData=t},expression:"transferData"}})],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.submitServerConfig}},[e._v(e._s(e.$t("common.submit")))])],1)],1):e._e()],1)],1)},ke=[],ye={mixins:[ce["a"]],props:{disabled:Boolean,expandServers:{required:!1,type:Array}},data:function(){return{show:!1,groupName:"",dstGroupNames:[]}},computed:{srcGroupName:function(){var e=this.expandServers.find((function(e){return e.isChecked}));return e.group_name}},methods:{init:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n,l,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,e.groupName="",a=e.expandServers.map((function(e){return e.group_name})),a=Array.from(new Set(a)),1!==a.length){t.next=6;break}return t.abrupt("return",e.$tip.error(e.$t("dcache.onlyOneServiceGroup")));case 6:if(r=e.expandServers.filter((function(e){return e.isChecked})),o=r.map((function(e){return e.group_name})),o=Array.from(new Set(o)),!(o.length>1)){t.next=11;break}return t.abrupt("return",e.$tip.error(e.$t("dcache.oneGroup")));case 11:return e.dstGroupNames=a.filter((function(e){return e!==o[0]})),s=e.appName,n=e.moduleName,l=e.srcGroupName,t.next=15,Object(A["r"])({appName:s,moduleName:n,srcGroupName:l});case 15:if(i=t.sent,!i){t.next=18;break}throw new Error(e.$t("dcache.hasMigrationOperation"));case 18:e.show=!0,t.next=25;break;case 21:t.prev=21,t.t0=t["catch"](0),console.error(t.t0),e.$tip.error(t.t0.message);case 25:case"end":return t.stop()}}),t,null,[[0,21]])})))()},submitServerConfig:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.$refs.detailForm.validate()){t.next=13;break}return t.prev=1,a=e.appName,r=e.moduleName,o=e.srcGroupName,s=e.groupName,n=e.transferData,t.next=5,Object(A["cb"])({appName:a,moduleName:r,srcGroupName:o,dstGroupName:s,transferData:n});case 5:t.sent,e.$tip.success(e.$t("dcache.operationManage.hasnonServerMigration")),t.next=13;break;case 9:t.prev=9,t.t0=t["catch"](1),console.error(t.t0),e.$tip.error(t.t0.message);case 13:case"end":return t.stop()}}),t,null,[[1,9]])})))()}}},we=ye,xe=(a("8c1c"),Object(y["a"])(we,$e,ke,!1,null,null,null)),Me=xe.exports,Se=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"batch-publish",staticStyle:{display:"inline"}},[a("let-button",{attrs:{theme:"primary",disabled:e.disabled},on:{click:e.init}},[e._v(e._s(e.$t("dcache.batchPublish")))]),a("let-modal",{attrs:{footShow:!1,closeOnClickBackdrop:!0,width:"1000px",title:e.$t("dcache.batchPublish")},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[a("let-form",[a("let-form-item",{attrs:{label:e.$t("service.serverName")}},e._l(e.checkedServers,(function(t){return a("p",[e._v(e._s(t.server_name))])})),0)],1),a("let-table",{attrs:{data:e.versionList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:t.row.id},model:{value:e.publishId,callback:function(t){e.publishId=t},expression:"publishId"}})]}}])}),a("let-table-column",{attrs:{title:"ID",prop:"id"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.id)+" "),a("span",{staticStyle:{color:"green",display:"inline-block",width:"1em",height:"1em"},attrs:{title:e.$t("releasePackage.default")}},[1==t.row.default_version?a("icon",{attrs:{name:"default"}}):e._e()],1)]}}])}),a("let-table-column",{attrs:{title:e.$t("releasePackage.moduleName"),prop:"server"}}),a("let-table-column",{attrs:{title:e.$t("releasePackage.cacheType")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(1===t.row.package_type?"KVcache":"MKVcache"))])]}}])}),a("let-table-column",{attrs:{title:e.$t("serverList.servant.comment"),prop:"comment"}}),a("let-table-column",{attrs:{title:e.$t("releasePackage.uploadTime"),prop:"posttime"}}),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.publishModal.totalPatchPage,page:e.publishModal.currPage},on:{change:e.patchChangePage},slot:"pagination"},[e._v(" abc ")]),a("template",{slot:"operations"},[a("let-button",{attrs:{disabled:!e.publishId,theme:"primary"},on:{click:e.publish}},[e._v(e._s(e.$t("apply.publish")))])],1)],2)],1),a("let-modal",{attrs:{footShow:!1,closeOnClickBackdrop:!0,width:"1000px",title:e.$t("dcache.batchPublish")},model:{value:e.releaseIng,callback:function(t){e.releaseIng=t},expression:"releaseIng"}},[e.releaseId&&e.releaseIng?a("tars-release-progress",{attrs:{"release-id":e.releaseId},on:{"close-fn":this.getServerList}}):e._e()],1)],1)},Ce=[],Le=a("2d43"),Ne={components:{tarsReleaseProgress:Le["a"]},mixins:[ce["a"]],props:{disabled:Boolean,expandServers:{required:!1,type:Array},checkedServers:{required:!1,type:Array}},computed:{cacheVersion:function(){return this.checkedServers.length?this.checkedServers[0].cache_version:1}},data:function(){return{versionList:[],releaseId:null,show:!1,publishId:null,publishModal:{moduleName:"DCacheServerGroup",application:"DCache",totalPatchPage:0,pageSize:5,currPage:1},releaseIng:!1}},methods:{init:function(){this.show=!0,this.releaseId=null,this.releaseIng=!1,this.publishId=null,this.getVersionList()},patchChangePage:function(e){this.publishModal.currPage=e,this.getVersionList()},getVersionList:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n,l,i,c,d;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.cacheVersion,r=e.publishModal,o=r.moduleName,s=r.application,n=r.currPage,l=r.pageSize,t.next=4,Object(A["W"])({moduleName:o,application:s,currPage:n,pageSize:l,cacheVersion:a});case 4:i=t.sent,c=i.count,d=i.rows,e.publishModal.totalPatchPage=Math.ceil(c/l),e.versionList=d;case 9:case"end":return t.stop()}}),t)})))()},publish:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=[],r=e.publishId,o=e.checkedServers,o.forEach((function(e){a.push({server_id:e.id.toString(),command:"patch_tars",parameters:{patch_id:r,bak_flag:e.bak_flag,update_text:"batch publish cache servers",group_name:"DCacheServerGroup"}})})),t.next=5,Object(A["a"])({items:a});case 5:s=t.sent,e.releaseIng=!0,e.releaseId=s;case 8:case"end":return t.stop()}}),t)})))()},getServerList:function(){this.show=!1,this.$emit("success-fn")}}},Oe=Ne,De=(a("ddc1"),Object(y["a"])(Oe,Se,Ce,!1,null,null,null)),Te=De.exports,je=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticStyle:{display:"inline"}},[a("let-button",{attrs:{theme:"primary",disabled:e.disabled},on:{click:e.init}},[e._v(e._s(e.$t("dcache.offline")))]),a("let-modal",{attrs:{footShow:!1,closeOnClickBackdrop:!0,width:"1000px",title:e.$t("dcache.offline")},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[a("p",{staticStyle:{color:"red"}},[e._v(e._s(e.hasRouterPageNo?e.$t("dcache.hasRouterPageNo"):"")+e._s(e.canOffline?"":e.$t("dcache.cantOffline")))]),a("let-table",{ref:"table",attrs:{data:e.offlineServers,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("module.name"),prop:"module_name"}}),a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("service.serverIp"),prop:"node_name"}}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.routerPageNo"),prop:"routerPageNo"}})],1),a("let-button",{attrs:{disabled:!e.canOffline,size:"small",theme:"primary"},on:{click:e.sureOffline}},[e._v(" "+e._s(e.$t("dcache.sureOffline"))+" ")])],1)],1)},qe=[],Pe={props:{disabled:Boolean,serverList:Array},data:function(){return{show:!1,offlineServers:[],tip:"",unType:0,canOffline:!1}},computed:{checkedServers:function(){return this.serverList.filter((function(e){return!0===e.isChecked}))},hasRouterPageNo:function(){return!!this.checkedServers.find((function(e){return 0!==e.routerPageNo}))},appName:function(){return this.checkedServers[0]&&this.checkedServers[0].app_name},moduleName:function(){return this.checkedServers[0]&&this.checkedServers[0].module_name},hostServers:function(){return this.checkedServers.filter((function(e){return"M"===e.server_type}))},backupServers:function(){return this.checkedServers.filter((function(e){return"S"===e.server_type}))},allBackupServers:function(){return this.serverList.filter((function(e){return"S"===e.server_type}))},mirrorServers:function(){return this.checkedServers.filter((function(e){return"I"===e.server_type}))},allMirrorServers:function(){return this.serverList.filter((function(e){return"I"===e.server_type}))},allBackupMirrorServers:function(){return this.serverList.filter((function(e){return"M"!==e.server_type}))}},methods:{init:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.offlineServers=[],e.unType=0,e.canOffline=!1,e.$t,e.hostServers,e.backupServers,e.allBackupServers,e.mirrorServers,e.allMirrorServers,e.allBackupMirrorServers,a=e.appName,r=e.moduleName,t.next=7,Object(A["r"])({appName:a,moduleName:r});case 7:if(o=t.sent,!o){t.next=10;break}throw new Error(e.$t("dcache.hasMigrationOperation"));case 10:e.offlineServers=e.checkedServers,s=e.getActiveServers(),s.length||(e.canOffline=!0),e.show=!0,t.next=20;break;case 16:t.prev=16,t.t0=t["catch"](0),console.error(t.t0),e.$tip.error(t.t0.message);case 20:case"end":return t.stop()}}),t,null,[[0,16]])})))()},getActiveServers:function(){return this.offlineServers.filter((function(e){return"active"===e.present_state||"active"===e.setting_state}))},sureOffline:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n,l,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.offlineServers,r=e.unType,o=a.map((function(e){return"DCache.".concat(e.server_name)})),s=a[0].app_name,n=a[0].module_name,l={unType:r,appName:s,moduleName:n,serverNames:o},i=e.$Loading({text:"loading..."}),i.show(),t.prev=7,t.next=10,Object(A["db"])(l);case 10:t.sent,e.$tip.success("涓嬬嚎鎴愬姛!"),e.show=!1,e.$emit("success-fn"),t.next=19;break;case 16:t.prev=16,t.t0=t["catch"](7),e.$tip.error(t.t0.message);case 19:return t.prev=19,i.hide(),t.finish(19);case 22:case"end":return t.stop()}}),t,null,[[7,16,19,22]])})))()}}},Ie=Pe,Re=Object(y["a"])(Ie,je,qe,!1,null,null,null),Ae=Re.exports,Ee={components:{Expand:pe,ServerMigration:_e,nonServerMigration:Me,offline:Ae,batchPublish:Te,batchOperation:E["a"]},name:"ServerManage",data:function(){return{expandShow:!1,serverMigrationShow:!1,nonServerMigrationShow:!1,lastGroupServers:[],isCheckedAll:!1,serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},serverList:[],serverNotifyList:[],pageNum:1,pageSize:20,total:1,serverTypes:["tars_cpp","tars_java","tars_php","tars_nodejs","not_tars","tars_go"],configModal:{show:!1,model:null},servantModal:{show:!1,model:null,currentServer:null},servantDetailModal:{show:!1,isNew:!0,model:null},logLevels:["NONE","TARS","DEBUG","INFO","WARN","ERROR"],moreCmdModal:{show:!1,model:null,currentServer:null},failCount:0}},props:["treeid"],computed:{showOthers:function(){return 5===this.serverData.level},isEndpointValid:function(){return!(!this.servantDetailModal.model||!this.servantDetailModal.model.endpoint)&&this.checkServantEndpoint(this.servantDetailModal.model.endpoint)},hasCheckedServer:function(){return 0!==this.serverList.filter((function(e){return!0===e.isChecked})).length},checkedServers:function(){return this.serverList.filter((function(e){return!0===e.isChecked}))},checkSrcGroupName:function(){return this.checkedServers[0]&&this.checkedServers[0].group_name}},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.serverList.forEach((function(t){t.isChecked=e}))},$route:function(e,t){this.getServerList(),this.getServerNotifyList(1)}},methods:{expandCloseHandler:function(){this.expandShow=!1,this.getServerList()},serverMigrationCloseHandler:function(){this.serverMigrationShow=!1,this.getServerList()},expandHandler:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,a=e.checkPatchVersion(),a){t.next=4;break}throw new Error(e.$t("dcache.noTheSamePatchVersion"));case 4:return r=e.serverList[0],o=r.app_name,s=r.module_name,t.next=8,Object(A["r"])({appName:o,moduleName:s});case 8:if(n=t.sent,!n){t.next=11;break}throw new Error(e.$t("dcache.hasExpandOperation"));case 11:e.lastGroupServers=e.getLastGroupServers(),e.expandShow=!0,t.next=18;break;case 15:t.prev=15,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 18:case"end":return t.stop()}}),t,null,[[0,15]])})))()},shrinkageHandler:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n,l,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a=e.serverList[0],r=a.app_name,o=a.module_name,t.next=5,Object(A["r"])({appName:r,moduleName:o});case 5:if(s=t.sent,!s){t.next=8;break}throw new Error(e.$t("dcache.hasShrinkageOperation"));case 8:if(n=e.serverList.map((function(e){return e.group_name})),n=Array.from(new Set(n)),l=e.serverList.filter((function(e){return e.isChecked})),i=l.map((function(e){return e.group_name})),i=Array.from(new Set(i)),n.toString()!==i.toString()){t.next=15;break}throw new Error(e.$t("dcache.leaveOneServiceGroup"));case 15:return t.next=17,e.$confirm(e.$t("dcache.operationManage.ensureShrinkage"));case 17:return t.next=19,Object(A["v"])({appName:r,moduleName:o,srcGroupName:i});case 19:e.$tip.success(e.$t("dcache.operationManage.hasShrinkage")),t.next=26;break;case 22:t.prev=22,t.t0=t["catch"](0),console.error(t.t0),e.$tip.error(t.t0.message);case 26:case"end":return t.stop()}}),t,null,[[0,22]])})))()},serverMigrationHandler:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n,l,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,a=e.checkPatchVersion(),a){t.next=4;break}throw new Error(e.$t("dcache.noTheSamePatchVersion"));case 4:if(r=ne.a.uniqBy(e.checkedServers,"group_name"),!(r.length>1)){t.next=7;break}throw new Error(e.$t("dcache.oneGroup"));case 7:return o=e.checkedServers[0],s=o.app_name,n=o.module_name,l=o.group_name,t.next=11,Object(A["r"])({appName:s,moduleName:n,srcGroupName:l});case 11:if(i=t.sent,!i){t.next=14;break}throw new Error(e.$t("dcache.hasMigrationOperation"));case 14:e.lastGroupServers=e.getLastGroupServers(),e.serverMigrationShow=!0,t.next=22;break;case 18:t.prev=18,t.t0=t["catch"](0),console.error(t.t0),e.$tip.error(t.t0.message);case 22:case"end":return t.stop()}}),t,null,[[0,18]])})))()},switchHandler:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,a=e.serverList[0],r=a.app_name,o=a.module_name,s=e.serverList.filter((function(e){return e.isChecked})),n=s.map((function(e){return e.group_name})),n=Array.from(new Set(n)),1==n.length){t.next=8;break}throw new Error(e.$t("dcache.operationManage.onceSwitch"));case 8:return t.next=10,e.$confirm(e.$t("dcache.operationManage.ensureSwitch"));case 10:return t.next=12,Object(A["Z"])({appName:r,moduleName:o,groupName:n[0]});case 12:e.$tip.success(e.$t("dcache.operationManage.switchSuccess")),e.getServerList(),t.next=20;break;case 16:t.prev=16,t.t0=t["catch"](0),console.error(t.t0),e.$tip.error(t.t0.message);case 20:case"end":return t.stop()}}),t,null,[[0,16]])})))()},switchMIHandler:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n,l,i,c;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,a=e.serverList[0],r=a.app_name,o=a.module_name,s=e.serverList.filter((function(e){return e.isChecked})),n=s.map((function(e){return e.group_name})),n=Array.from(new Set(n)),1==n.length){t.next=8;break}throw new Error(e.$t("dcache.operationManage.onceSwitch"));case 8:for(console.log("==>servers:",s),l="",i="active",c=0;c<s.length;c++)"I"==s[c].server_type?l=s[c].area:"M"==s[c].server_type&&(i=s[c].setting_state);if(""!=l){t.next=14;break}throw new Error(e.$t("dcache.operationManage.switchMINoImage"));case 14:if("inactive"==i){t.next=16;break}throw new Error(e.$t("dcache.operationManage.switchMIMasterNotInactive"));case 16:return t.next=18,e.$confirm(e.$t("dcache.operationManage.ensureSwitchMI")+l);case 18:return t.next=20,Object(A["Y"])({appName:r,moduleName:o,groupName:n[0],imageIdc:l});case 20:e.$tip.success(e.$t("dcache.operationManage.switchSuccess")),e.getServerList(),t.next=28;break;case 24:t.prev=24,t.t0=t["catch"](0),console.error(t.t0),e.$tip.error(t.t0.message);case 28:case"end":return t.stop()}}),t,null,[[0,24]])})))()},getLastGroupServers:function(){var e=this.serverList.sort((function(e,t){return e.group_name>t.group_name}))[this.serverList.length-1].group_name;return this.serverList.filter((function(t){return t.group_name===e}))},checkPatchVersion:function(){var e=!0,t={},a=this.serverList.filter((function(e){return!0===e.isChecked}));return a.forEach((function(a,r){var o=a.patch_version;if(0===r)return t[o]=o;t[o]||(e=!1)})),e},checkedAllChange:function(){},getServerList:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=e.$refs.serverListLoading.$loading.show(),t.prev=1,r=e.treeid&&e.treeid.split(".")||[],o=r[0]&&r[0].substring(1)||"",s=r[1]&&r[1].substring(1)||"",o&&s){t.next=7;break}return t.abrupt("return");case 7:return t.next=9,Object(A["g"])({appName:o,moduleName:s});case 9:n=t.sent,n.forEach((function(t){var a=e.serverList.find((function(e){return e.id===t.id}));t.isChecked=!!a&&a.isChecked})),e.serverList=n.sort((function(e,t){return e.group_name<t.group_name?-1:e.group_name==t.group_name?0:1})),t.next=18;break;case 14:t.prev=14,t.t0=t["catch"](1),console.error(t.t0),e.$tip.error(t.t0.message);case 18:return t.prev=18,a.hide(),t.finish(18);case 21:case"end":return t.stop()}}),t,null,[[1,14,18,21]])})))()},getServerNotifyList:function(e){var t=this;if(this.showOthers){var a=this.$refs.serverNotifyListLoading.$loading.show();this.$ajax.getJSON("/server/api/server_notify_list",{tree_node_id:this.treeid,page_size:this.pageSize,curr_page:e}).then((function(r){a.hide(),t.pageNum=e,t.total=Math.ceil(r.count/t.pageSize),t.serverNotifyList=r.rows})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))}},getTemplateList:function(){var e=this;this.$ajax.getJSON("/server/api/template_name_list").then((function(t){e.configModal.model?e.configModal.model.templates=t:e.configModal.model={templates:t}})).catch((function(t){e.$tip.error("".concat(e.$t("serverList.restart.failed"),": ").concat(t.err_msg||t.message))}))},getServerConfig:function(e){var t=this,a=this.$loading.show({target:this.$refs.configFormLoading});this.$ajax.getJSON("/server/api/server",{id:e}).then((function(e){a.hide(),t.configModal.model?t.configModal.model=Object.assign({},t.configModal.model,e):(e.templates=[],t.configModal.model=e)})).catch((function(e){a.hide(),t.closeConfigModal(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))},configServer:function(e){this.configModal.show=!0,this.getTemplateList(),this.getServerConfig(e)},saveConfig:function(){var e=this;if(this.$refs.configForm.validate()){var t=this.$Loading.show();this.$ajax.postJSON("/server/api/update_server",Object(I["a"])({isBak:this.configModal.model.bak_flag},this.configModal.model)).then((function(a){t.hide(),e.serverList=e.serverList.map((function(e){return e.id===a.id?a:e})),e.closeConfigModal(),e.$tip.success(e.$t("serverList.restart.success"))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("serverList.restart.failed"),": ").concat(a.message||a.err_msg))}))}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1,this.configModal.model=null},checkTaskStatus:function(e,t){var a=this;return new Promise((function(r,o){a.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(t){1===t.status||0===t.status?setTimeout((function(){r(a.checkTaskStatus(e))}),3e3):2===t.status?r("taskid: ".concat(t.task_no)):o(new Error("taskid: ".concat(t.task_no)))})).catch((function(s){t?o(new Error(s.err_msg||s.message||a.$t("common.networkErr"))):setTimeout((function(){r(a.checkTaskStatus(e,!0))}),3e3)}))}))},addTask:function(e,t,a){var r=this,o=this.$Loading.show();this.$ajax.postJSON("/server/api/add_task",{serial:!0,items:[{server_id:e,command:t}]}).then((function(e){return r.checkTaskStatus(e).then((function(e){o.hide(),r.getServerList(),r.$tip.success({title:a.success,message:e})})).catch((function(e){throw e}))})).catch((function(e){o.hide(),r.getServerList(),r.$tip.error({title:a.error,message:e.err_msg||e.message||r.$t("common.networkErr")})}))},restartServer:function(e){this.addTask(e,"restart",{success:this.$t("serverList.restart.success"),error:this.$t("serverList.restart.failed")})},stopServer:function(e){var t=this;this.$confirm(this.$t("serverList.stopService.msg.stopService"),this.$t("common.alert")).then((function(){t.addTask(e,"stop",{success:t.$t("serverList.restart.success"),error:t.$t("serverList.restart.failed")})}))},undeployServer:function(e){var t=this;this.$confirm(this.$t("serverList.dlg.msg.undeploy"),this.$t("common.alert")).then((function(){t.addTask(e,"undeploy_tars",{success:t.$t("serverList.restart.success"),error:t.$t("serverList.restart.failed")}),t.closeMoreCmdModal()}))},manageServant:function(e){var t=this;this.servantModal.show=!0;var a=this.$loading.show({target:this.$refs.servantModalLoading});this.$ajax.getJSON("/server/api/adapter_conf_list",{id:e.id}).then((function(r){a.hide(),t.servantModal.model=r,t.servantModal.currentServer=e})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))},closeServantModal:function(){this.servantModal.show=!1,this.servantModal.model=null,this.servantModal.currentServer=null},configServant:function(e){if(this.servantDetailModal.model={application:this.servantModal.currentServer.application,server_name:this.servantModal.currentServer.server_name,obj_name:"",node_name:"",endpoint:"",servant:"",thread_num:"",max_connections:"200000",queuecap:"10000",queuetimeout:"60000",allow_ip:"",protocol:"not_tars",handlegroup:""},this.servantDetailModal.isNew=!0,e){var t=this.servantModal.model.find((function(t){return t.id===e}));t.obj_name=t.servant.split(".")[2],this.servantDetailModal.model=Object.assign({},this.servantDetailModal.model,t),this.servantDetailModal.isNew=!1}this.servantDetailModal.show=!0},closeServantDetailModal:function(){this.$refs.servantDetailForm&&this.$refs.servantDetailForm.resetValid(),this.servantDetailModal.show=!1,this.servantDetailModal.model=null},checkServantEndpoint:function(e){var t=e.split(/\s-/),a=/^tcp|udp$/i,r=/^h\s(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/i,o=/^t\s([1-9]|[1-9]\d+)$/i,s=/^p\s\d{4,5}$/i,n=!0;if(a.test(t[0])){for(var l=0,i=1;i<t.length;i++)if(r&&r.test(t[i])&&(l++,this.servantDetailModal.model.node_name=t[i].split(/\s/)[1],r=null),o&&o.test(t[i])&&(l++,o=null),s&&s.test(t[i])){var c=t[i].substring(2);c<0||c>65535||l++,s=null}n=3===l}else n=!1;return n},saveServantDetail:function(){var e=this;if(this.$refs.servantDetailForm.validate()){var t=this.$Loading.show();if(this.servantDetailModal.isNew){var a=this.servantDetailModal.model;a.servant=[a.application,a.server_name,a.obj_name].join("."),this.$ajax.postJSON("/server/api/add_adapter_conf",a).then((function(a){t.hide(),e.servantModal.model.unshift(a),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}else this.servantDetailModal.model.servant=this.servantDetailModal.model.application+"."+this.servantDetailModal.model.server_name+"."+this.servantDetailModal.model.obj_name,this.$ajax.postJSON("/server/api/update_adapter_conf",this.servantDetailModal.model).then((function(a){t.hide(),e.servantModal.model=e.servantModal.model.map((function(e){return e.id===a.id?a:e})),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},deleteServant:function(e){var t=this;this.$confirm(this.$t("serverList.servant.a"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_adapter_conf",{id:e}).then((function(r){a.hide(),t.servantModal.model=t.servantModal.model.map((function(t){if(t.id!==e)return t})).filter((function(e){return e})),t.$tip.success(t.$t("common.success"))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))}))},showMoreCmd:function(e){var t=this;this.moreCmdModal.model={selected:"setloglevel",setloglevel:"NONE",loadconfig:"",command:"",configs:null},this.moreCmdModal.unwatch=this.$watch("moreCmdModal.model.selected",(function(){t.$refs.moreCmdForm&&t.$refs.moreCmdForm.resetValid()})),this.moreCmdModal.show=!0,this.moreCmdModal.currentServer=e,this.$ajax.getJSON("/server/api/config_file_list",{level:5,application:e.application,server_name:e.server_name}).then((function(e){t.moreCmdModal.model&&(t.moreCmdModal.model.configs=e)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},showStatus:function(e){this.sendCommand(e,"status")},sendCommand:function(e,t,a){var r=this,o=this.$Loading.show();this.$ajax.getJSON("/server/api/send_command",{server_ids:e,command:t}).then((function(e){o.hide();var t=e[0].err_msg.replace(/\n/g,"<br>");if(0!==e[0].ret_code)throw new Error(t);var s={title:r.$t("common.success"),message:t};a&&(s.duration=0),r.$tip.success(s)})).catch((function(e){o.hide(),r.$tip.error({title:r.$t("common.error"),message:e.err_msg||e.message})}))},invokeMoreCmd:function(){var e=this.moreCmdModal.model,t=this.moreCmdModal.currentServer;"undeploy_tars"===e.selected?this.undeployServer(t.id):"setloglevel"===e.selected?this.sendCommand(t.id,"tars.setloglevel ".concat(e.setloglevel)):"loadconfig"===e.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(t.id,"tars.loadconfig ".concat(e.loadconfig)):"command"===e.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(t.id,e.command):"connection"===e.selected&&this.sendCommand(t.id,"tars.connection",!0)},closeMoreCmdModal:function(){this.$refs.moreCmdForm&&this.$refs.moreCmdForm.resetValid(),this.moreCmdModal.unwatch&&this.moreCmdModal.unwatch(),this.moreCmdModal.show=!1,this.moreCmdModal.model=null},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getServerList(),this.getServerNotifyList(1)}},ze=Ee,Ve=(a("eee6"),Object(y["a"])(ze,re,oe,!1,null,null,null)),Fe=Ve.exports,We=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"moduleCache"},[a("h4",[e._v(e._s(this.$t("serverList.title.serverList"))+" "),a("i",{staticClass:"icon iconfont el-icon-third-shuaxin",on:{click:e.getServerList}})]),a("br"),e.serverList?a("let-table",{ref:"serverListLoading",attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"140px"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.zb"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row.server_type;return["M"===r?a("span",[e._v(e._s(e.$t("cache.mainEngine")))]):"S"===r?a("span",[e._v(e._s(e.$t("cache.standByEngine")))]):"I"===r?a("span",[e._v(e._s(e.$t("cache.mirror")))]):e._e()]}}],null,!1,888927167)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"===e.row.setting_state?"status-active":"status-off"})]}}],null,!1,3224184510)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus"),width:"65px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"===e.row.present_state?"status-active":"activating"===e.row.present_state?"status-activating":"status-off"})]}}],null,!1,4116932289)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(t.row.patch_time)))])]}}],null,!1,3144837894)}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("let-table-operation",{on:{click:function(t){return e.editServerConfig(r)}}},[e._v(e._s(e.$t("cache.config.edit")))]),a("let-table-operation",{on:{click:function(t){return e.checkServerConfigList(r)}}},[e._v(e._s(e.$t("cache.config.view")))]),a("let-table-operation",{on:{click:function(t){return e.addServerConfig(r)}}},[e._v(e._s(e.$t("cache.config.add")))])]}}],null,!1,1655738820)})],1):e._e(),a("let-table",{attrs:{data:e.showConfigList,title:e.$t("cache.config.tableTitle"),"empty-msg":e.$t("common.nodata"),stripe:!0}},[a("let-table-column",{attrs:{width:"50"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{attrs:{value:e.isCheckedAll,change:e.checkedAllChange},model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("cache.config.remark"),prop:"remark",width:"300"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.path"),prop:"path",width:"100"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.item"),prop:"item",width:"100"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.config_value"),prop:"config_value",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row.config_value;return[a("div",{staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(r))])]}}])}),a("let-table-column",{attrs:{title:e.$t("cache.config.modify_value"),prop:"period",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("let-input",{attrs:{size:"small",type:"textarea",rows:1},on:{focus:e.inputFocus,blur:e.inputBlur},model:{value:r.modify_value,callback:function(t){e.$set(r,"modify_value",t)},expression:"row.modify_value"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("operate.operates")},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("let-table-operation",{on:{click:function(t){return e.saveConfig(r)}}},[e._v(e._s(e.$t("operate.save")))]),a("let-table-operation",{staticClass:"danger",on:{click:function(t){return e.deleteConfig(r)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])}),e.total?a("let-pagination",{attrs:{slot:"pagination",total:e.total,page:e.pagination.page,"show-sums":"",sum:e.configList.length,jump:"",align:"right"},on:{change:e.changePage},slot:"pagination"}):e._e(),a("template",{slot:"operations"},[a("let-button",{attrs:{theme:"success",disabled:!e.hasCheckedItem},on:{click:e.saveConfigBatch}},[e._v(e._s(e.$t("cache.config.batchUpdate")))]),a("let-button",{attrs:{theme:"danger",disabled:!e.hasCheckedItem},on:{click:e.deleteServerConfigItemBatch}},[e._v(e._s(e.$t("cache.config.batchDelete")))]),a("let-button",{attrs:{theme:"primary"},on:{click:function(t){return e.addServerConfig({appName:e.appName,moduleName:e.moduleName})}}},[e._v(e._s(e.$t("cache.config.addModuleConfig")))])],1)],2),a("let-modal",{staticClass:"server_config_list_modal",attrs:{footShow:!1,closeOnClickBackdrop:!0,width:"80%",height:"80%",title:e.$t("cache.config.tableTitle")},model:{value:e.serverConfigListVisible,callback:function(t){e.serverConfigListVisible=t},expression:"serverConfigListVisible"}},[e.serverConfigListVisible?a("server-config-list",e._b({attrs:{moduleName:e.moduleName}},"server-config-list",e.checkServer,!1)):e._e()],1),a("let-modal",{staticClass:"server_config_list_modal",attrs:{footShow:!1,closeOnClickBackdrop:!0,width:"80%",height:"80%",title:e.$t("cache.config.tableTitle")},model:{value:e.serverConfigVisible,callback:function(t){e.serverConfigVisible=t},expression:"serverConfigVisible"}},[e.serverConfigVisible?a("server-config",e._b({},"server-config",e.checkServer,!1)):e._e()],1),a("let-modal",{attrs:{footShow:!1,closeOnClickBackdrop:!0},model:{value:e.addServerConfigVisible,callback:function(t){e.addServerConfigVisible=t},expression:"addServerConfigVisible"}},[e.addServerConfigVisible?a("add-server-config",e._b({on:{"call-back":e.getModuleConfig}},"add-server-config",e.checkServer,!1)):e._e()],1)],1)},Ke=[],Je=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",[a("let-table",{attrs:{data:e.configList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("cache.config.remark"),prop:"remark"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.path"),prop:"path"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.item"),prop:"item"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.value"),prop:"config_value"}})],1)],1)},Be=[],Ge={props:{appName:{type:String,required:!0},moduleName:{type:String,required:!0},serverName:{type:String,required:!0},nodeName:{type:String,required:!0}},data:function(){return{configList:[]}},methods:{getServerConfig:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a={appName:e.appName,moduleName:e.moduleName,serverName:e.serverName,nodeName:e.nodeName},t.next=4,e.$ajax.getJSON("/server/api/cache/getServerConfig",a);case 4:r=t.sent,e.configList=r.filter((function(e){var t=r.filter((function(t){return t.path===e.path&&t.item===e.item})),a=t[t.length-1];return e===a})),t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()}},created:function(){this.getServerConfig()}},Ue=Ge,He=Object(y["a"])(Ue,Je,Be,!1,null,null,null),Ze=He.exports,Ye=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",[a("let-table",{attrs:{data:e.configList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("cache.config.remark"),prop:"remark"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.path"),prop:"path"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.item"),prop:"item"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.value"),prop:"config_value"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.modify_value"),prop:"config_value"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("let-input",{attrs:{size:"small"},model:{value:r.modify_value,callback:function(t){e.$set(r,"modify_value",t)},expression:"row.modify_value"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("operate.operates")},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("let-table-operation",{on:{click:function(t){return e.saveConfig(r)}}},[e._v(e._s(e.$t("operate.save")))]),a("let-table-operation",{staticClass:"danger",on:{click:function(t){return e.deleteConfig(r)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1)],1)},Qe=[],Xe={props:{serverName:{type:String,required:!0},nodeName:{type:String,required:!0}},data:function(){return{configList:[]}},methods:{getServerConfig:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a={serverName:e.serverName,nodeName:e.nodeName},t.next=4,e.$ajax.getJSON("/server/api/cache/getServerNodeConfig",a);case 4:r=t.sent,r.forEach((function(e){return e.modify_value=""})),e.configList=r,t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()},deleteConfig:function(e){var t=this,a=e.id;this.$confirm(this.$t("cache.config.deleteConfig"),this.$t("common.alert")).then(Object(R["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$ajax.getJSON("/server/api/cache/deleteServerConfigItem",{id:a});case 3:return e.sent,e.next=6,t.getServerConfig();case 6:e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.t0.message||e.t0.err_msg));case 11:case"end":return e.stop()}}),e,null,[[0,8]])}))))},saveConfig:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r,o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r=e.id,o=e.modify_value,a.prev=1,a.next=4,t.$ajax.getJSON("/server/api/cache/updateServerConfigItem",{id:r,configValue:o});case 4:return a.sent,a.next=7,t.getServerConfig();case 7:a.next=12;break;case 9:a.prev=9,a.t0=a["catch"](1),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.t0.message||a.t0.err_msg));case 12:case"end":return a.stop()}}),a,null,[[1,9]])})))()}},created:function(){this.getServerConfig()}},et=Xe,tt=Object(y["a"])(et,Ye,Qe,!1,null,null,null),at=tt.exports,rt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",[a("let-form",{ref:"addConfigForm",attrs:{type:"medium",title:e.$t("cache.config.addConfig")}},[a("let-form-item",{attrs:{label:e.$t("cache.config.item"),required:""}},[a("let-select",{attrs:{size:"small"},model:{value:e.itemId,callback:function(t){e.itemId=t},expression:"itemId"}},e._l(e.list,(function(t){return a("let-option",{key:t.id,attrs:{value:t.id}},[e._v(e._s(t.path)+"__"+e._s(t.item)+"("+e._s(t.remark)+")")])})),1)],1),a("let-form-item",{attrs:{label:e.$t("cache.config.itemValue"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:e.configValue,callback:function(t){e.configValue=t},expression:"configValue"}})],1),a("br"),a("let-form-item",{attrs:{label:" "}},[a("let-button",{attrs:{theme:"primary"},on:{click:e.submit}},[e._v(e._s(e.$t("cache.add")))])],1)],1)],1)},ot=[],st={props:{serverName:{type:String,required:!1},nodeName:{type:String,required:!1},appName:{type:String,required:!1},moduleName:{type:String,required:!1}},computed:{isModule:function(){return!(!this.appName||!this.moduleName)}},data:function(){return{itemId:"",list:[],configValue:""}},methods:{submit:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.$refs.addConfigForm.validate()){t.next=16;break}return t.prev=1,a={itemId:e.itemId,configValue:e.configValue,serverName:e.serverName,nodeName:e.nodeName,appName:e.appName,moduleName:e.moduleName},t.next=5,e.$ajax.postJSON("/server/api/cache/addServerConfigItem",a);case 5:e.$tip.success("".concat(e.$t("cache.config.addSuccess"))),e.configValue="",e.itemId="",e.getConfig(),e.moduleName&&e.$emit("call-back"),t.next=16;break;case 12:t.prev=12,t.t0=t["catch"](1),console.error(t.t0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 16:case"end":return t.stop()}}),t,null,[[1,12]])})))()},getConfig:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(A["h"])();case 3:if(a=t.sent,r=e.isModule,o=e.appName,s=e.moduleName,!r){t.next=10;break}return t.next=8,Object(A["i"])({appName:o,moduleName:s});case 8:n=t.sent,a=a.filter((function(e){var t=n.filter((function(t){return"".concat(t.path,"__").concat(t.item)==="".concat(e.path,"__").concat(e.item)})).length;return!t}));case 10:e.list=a,t.next=17;break;case 13:t.prev=13,t.t0=t["catch"](0),console.error(t.t0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 17:case"end":return t.stop()}}),t,null,[[0,13]])})))()}},created:function(){this.getConfig(),window.config=this}},nt=st,lt=Object(y["a"])(nt,rt,ot,!1,null,null,null),it=lt.exports,ct={components:{ServerConfigList:Ze,ServerConfig:at,addServerConfig:it},data:function(){return{appName:"",moduleName:"",configList:[],serverList:[],serverConfigListVisible:!1,serverConfigVisible:!1,addServerConfigVisible:!1,checkServer:{},isCheckedAll:!1,pagination:{page:1}}},computed:{showConfigList:function(){return this.configList.slice(100*(this.pagination.page-1),100*this.pagination.page)},total:function(){return Math.ceil(this.configList.length/100)},hasCheckedItem:function(){return 0!==this.showConfigList.filter((function(e){return!0===e.isChecked})).length}},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.showConfigList.forEach((function(t){t.isChecked=e}))}},methods:{checkedAllChange:function(){},changePage:function(e){this.pagination.page=e},inputFocus:function(e){e.target.rows=4},inputBlur:function(e){e.target.rows=1},getModuleConfig:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a=e.appName,r=e.moduleName,t.next=4,Object(A["i"])({appName:a,moduleName:r});case 4:o=t.sent,o.forEach((function(e){e.modify_value="",e.isChecked=!1})),e.configList=o,t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()},getServerList:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.$Loading.show(),t.prev=1,r=e.appName,o=e.moduleName,t.next=5,Object(A["g"])({appName:r,moduleName:o});case 5:s=t.sent,e.serverList=s,t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](1),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 12:a.hide();case 13:case"end":return t.stop()}}),t,null,[[1,9]])})))()},saveConfig:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r,o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r=e.id,o=e.modify_value,a.prev=1,a.next=4,t.$ajax.getJSON("/server/api/cache/updateServerConfigItem",{id:r,configValue:o});case 4:return a.sent,a.next=7,t.getModuleConfig();case 7:a.next=12;break;case 9:a.prev=9,a.t0=a["catch"](1),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.t0.message||a.t0.err_msg));case 12:case"end":return a.stop()}}),a,null,[[1,9]])})))()},saveConfigBatch:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.showConfigList.filter((function(e){return e.isChecked})).map((function(e){return{indexId:e.id,configValue:e.modify_value}})),t.prev=1,t.next=4,e.$ajax.postJSON("/server/api/cache/updateServerConfigItemBatch",{serverConfigList:a});case 4:return t.sent,t.next=7,e.getModuleConfig();case 7:t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](1),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 12:case"end":return t.stop()}}),t,null,[[1,9]])})))()},deleteConfig:function(e){var t=this,a=e.id;this.$confirm(this.$t("cache.config.deleteConfig"),this.$t("common.alert")).then(Object(R["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$ajax.getJSON("/server/api/cache/deleteServerConfigItem",{id:a});case 3:return e.sent,e.next=6,t.getModuleConfig();case 6:e.next=12;break;case 8:e.prev=8,e.t0=e["catch"](0),console.error(e.t0),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.t0.message||e.t0.err_msg));case 12:case"end":return e.stop()}}),e,null,[[0,8]])}))))},deleteServerConfigItemBatch:function(e){var t=this,a=(e.id,this.showConfigList.filter((function(e){return e.isChecked})).map((function(e){return{indexId:e.id}})));this.$confirm(this.$t("cache.config.deleteConfig"),this.$t("common.alert")).then(Object(R["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$ajax.postJSON("/server/api/cache/deleteServerConfigItemBatch",{serverConfigList:a});case 3:return e.sent,e.next=6,t.getModuleConfig();case 6:e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.t0.message||e.t0.err_msg));case 11:case"end":return e.stop()}}),e,null,[[0,8]])}))))},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},checkServerConfigList:function(e){this.serverConfigListVisible=!0,this.checkServer={appName:this.appName,serverName:e.server_name,nodeName:e.node_name}},editServerConfig:function(e){this.serverConfigVisible=!0,this.checkServer={serverName:e.server_name,nodeName:e.node_name}},addServerConfig:function(e){this.addServerConfigVisible=!0,this.checkServer={serverName:e.server_name,nodeName:e.node_name,moduleName:e.moduleName,appName:e.appName}}},created:function(){var e=this.$parent.getServerData(),t=e.application,a=e.module_name;this.appName=t,this.moduleName=a,this.getModuleConfig(),this.getServerList()}},dt=ct,ut=(a("82b4"),Object(y["a"])(dt,We,Ke,!1,null,null,null)),mt=ut.exports,pt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_manage"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-group",[a("let-form-item",{attrs:{label:e.$t("monitor.search.a")}},[a("let-date-picker",{attrs:{size:"small",formatter:e.formatter},model:{value:e.query.thedate,callback:function(t){e.$set(e.query,"thedate",t)},expression:"query.thedate"}})],1),a("let-form-item",{attrs:{label:e.$t("monitor.search.b")}},[a("let-date-picker",{attrs:{size:"small",formatter:e.formatter},model:{value:e.query.predate,callback:function(t){e.$set(e.query,"predate",t)},expression:"query.predate"}})],1),a("let-form-item",{attrs:{label:e.$t("monitor.search.start")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.startshowtime,callback:function(t){e.$set(e.query,"startshowtime",t)},expression:"query.startshowtime"}})],1),a("let-form-item",{attrs:{label:e.$t("monitor.search.end")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.endshowtime,callback:function(t){e.$set(e.query,"endshowtime",t)},expression:"query.endshowtime"}})],1)],1),a("let-form-group",[a("tars-form-item",{attrs:{label:e.$t("module.name")},on:{onLabelClick:function(t){return e.groupBy("moduleName")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.moduleName,callback:function(t){e.$set(e.query,"moduleName",t)},expression:"query.moduleName"}})],1),a("tars-form-item",{attrs:{label:e.$t("service.serverName")},on:{onLabelClick:function(t){return e.groupBy("serverName")}}},[a("let-select",{attrs:{size:"small",filterable:""},model:{value:e.query.serverName,callback:function(t){e.$set(e.query,"serverName",t)},expression:"query.serverName"}},e._l(e.cacheServerList,(function(t){return a("let-option",{key:t.id,attrs:{value:t.application+"."+t.server_name}},[e._v(" "+e._s(t.application+"."+t.server_name)+" ")])})),1)],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1)],1),e.showChart?a("let-row",{ref:"charts",staticClass:"charts"},e._l(e.charts,(function(t){return a("let-col",{key:t.title,attrs:{span:12}},[e.allItems.length>0?a("compare-chart",e._b({},"compare-chart",t,!1)):e._e()],1)})),1):e._e(),a("hours-filter",{model:{value:e.hour,callback:function(t){e.hour=t},expression:"hour"}}),a("let-table",{ref:"table",attrs:{data:e.pagedItems,"empty-msg":e.$t("common.nodata"),stripe:""}},[a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"show_time"}}),a("let-table-column",{attrs:{title:e.$t("module.name"),prop:"moduleName"}}),a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"serverName"}}),e._l(e.keys,(function(t){return[a("let-table-column",{attrs:{title:e.$t("monitor.table.curr")+"/"+e.$t("monitor.table.contrast")+" "+t,prop:"value"}})]})),e.pageCount?a("let-pagination",{attrs:{slot:"pagination",total:e.pageCount,page:e.page,sum:e.itemsCount,"show-sums":"",jump:""},on:{change:e.changePage},slot:"pagination"}):e._e()],2)],1)},ht=[],ft=a("2699"),vt=a("0b18"),gt=a("0abb"),bt=20,_t="YYYYMMDD",$t={name:"ServerPropertyMonitor",components:{HoursFilter:vt["a"],CompareChart:gt["a"]},data:function(){var e=this.treeid;return{query:{thedate:Object(ft["b"])(new Date,_t),predate:Object(ft["b"])(Date.now()-ft["a"],_t),startshowtime:"0000",endshowtime:"2360",moduleName:e.split(".")[1].substr(1),serverName:""},appName:e.split(".")[0].substr(1),cacheServerList:[],formatter:_t,allItems:[],hour:-1,page:1,showChart:!0,keys:[]}},props:["treeid"],computed:{filteredItems:function(){var e=this.hour;return e>=0?this.allItems.filter((function(t){return+t.show_time.slice(0,2)===e})):this.allItems},itemsCount:function(){return this.filteredItems.length},pageCount:function(){return Math.ceil(this.filteredItems.length/bt)},pagedItems:function(){return this.filteredItems.slice(bt*(this.page-1),bt*this.page)},chartOptions:function(){return{title:this.$t("monitor.table.total"),timeColumn:"show_time",dataColumns:[{name:"the_value",label:this.$t("monitor.property.property")},{name:"pre_value",label:this.$t("monitor.property.propertyC")}],data:this.allItems}},charts:function(){var e=this;return this.keys.map((function(t){return{title:t,timeColumn:"show_time",dataColumns:[{name:"the_".concat(t),label:e.$t("monitor.table.curr")},{name:"pre_".concat(t),label:e.$t("monitor.table.contrast")}],data:e.allItems}}))}},mounted:function(){this.fetchCacheServerList()},methods:{fetchCacheServerList:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(A["g"])({appName:e.appName,moduleName:e.query.moduleName});case 3:e.cacheServerList=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t["catch"](0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))()},fetchData:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n,l,i,c,d,u;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.$refs.charts&&e.$refs.charts.$loading.show(),r=e.$refs.table.$loading.show(),t.prev=2,o=e.query,s=e.query,n=s.group_by,l=s.serverName,i=Object(I["a"])({},o),"serverName"===n&&""===l&&(i=Object(I["a"])(Object(I["a"])({},i),{},{serverName:""})),t.next=8,Object(A["t"])(i);case 8:c=t.sent,d=c.data,u=c.keys,e.allItems=d||[],e.keys=u||[],e.keys.forEach((function(t,a){e.allItems.forEach((function(e){e.value=e["the_".concat(t)]+"/"+e["pre_".concat(t)]}))})),t.next=19;break;case 16:t.prev=16,t.t0=t["catch"](2),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 19:return t.prev=19,a&&a.hide(),r.hide(),t.finish(19);case 23:case"end":return t.stop()}}),t,null,[[2,16,19,23]])})))()},groupBy:function(e){this.query.group_by=e,this.showChart=!1,this.fetchData()},search:function(){delete this.query.group_by,this.showChart=!0,this.fetchData()},changePage:function(e){this.page=e}}},kt=$t,yt=(a("197e"),Object(y["a"])(kt,pt,ht,!1,null,null,null)),wt=yt.exports,xt={name:"Server",components:{manage:K,publish:Y,config:Q["a"],"server-monitor":X["a"],"property-monitor":ee["a"],"interface-debuger":te["a"],"user-manage":ae["a"],cache:Fe,moduleCache:mt,propertyMonitor:wt},data:function(){return{treeErrMsg:"鍔犺浇澶辫触",treeData:null,treeid:"",enableAuth:!1,serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:"",module_name:""},serverType:"",BTabs:[],BTabsShow:!1}},computed:{base:function(){return"/server/".concat(this.treeid)}},watch:{treeid:function(){this.serverData=this.getServerData()},$route:function(e,t){"/server"===e.path&&this.getTreeData()}},directives:{vscroll:{componentUpdated:function(e){var t=e||"",a=e.children||[],r="";if(a.forEach((function(e){var t=e.getAttribute("class");t.indexOf("active")>-1&&(r=e)})),r.offsetLeft<t.scrollLeft){var o=r.offsetLeft;t.scrollTo(o,0)}else if(r.offsetLeft+r.offsetWidth>t.scrollLeft+t.offsetWidth){var s=r.offsetLeft+r.offsetWidth-t.offsetWidth;t.scrollTo(s,0)}}}},methods:{getNewServerName:function(e){var t=e&&e.split(".");if(!t)return e;if(1==t.length){var a=e&&e.split(".")[0].substring(1);return"".concat(a)}if(t.length>1){var r=e&&e.split(".")[0].substring(1),o=e&&e.split(".")[1].substring(1);return"".concat(r,".").concat(o)}},getName:function(e){var t="";return e.lastIndexOf("/")>-1&&(t=e.substring(e.lastIndexOf("/")+1,e.length)),t},selectTree:function(e,t){if(t.children&&t.children.length);else{var a=t.serverType;!a&&(a="tars"),this.serverType=a}this.selectBTabs(e,t),this.checkCurrBTabs()},handleData:function(e,t){var a=this;e&&e.length&&e.forEach((function(e){e.label=e.name,e.nodeKey=e.id,a.treeid===e.nodeKey&&(e.expand=!0),e.children&&e.children.length&&a.handleData(e.children)}))},getTreeData:function(e){var t=this;this.treeData=null,this.$nextTick((function(){var a=t.$loading.show({target:t.$refs.treeLoading});t.$ajax.getJSON("/server/api/dtree",{type:e}).then((function(e){a.hide(),t.treeData=e,t.handleData(t.treeData,!0)})).catch((function(e){a.hide(),t.treeErrMsg=e.err_msg||e.message||"鍔犺浇澶辫触",t.treeData=!1}))}))},getServerData:function(){if(!this.treeid)return{};var e=this.treeid.split("."),t={level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""};return e.forEach((function(e){var a=+e.substr(0,1),r=e.substr(1);switch(a){case 1:t.application=r;break;case 2:t.set_name=r;break;case 3:t.set_area=r;break;case 4:t.set_group=r;break;case 5:t.server_name=r;break;case 6:t.module_name=r;break;default:break}t.level=a})),t},checkTreeid:function(){this.treeid=this.getLocalStorage("tars_dcache_treeid")||""},clickTab:function(e){var t=this.treeid,a=this.BTabs;a&&a.forEach((function(a){a.id===t&&(a.path=e)})),this.setLocalStorage("tars_dcache_tabs",JSON.stringify(a))},isTrueTreeLevel:function(){var e=this.$route.path.split("/"),t=e[e.length-1],a=!1;5===this.serverData.level||"publish"!==t&&"server-monitor"!==t&&"property-monitor"!==t&&"user-manage"!==t||(a=!0),5!==this.serverData.level&&4!==this.serverData.level&&1!==this.serverData.level&&"config"===t&&(a=!0),a&&this.$router.replace("manage")},checkBTabs:function(){var e=this.BTabs,t=this.getLocalStorage("tars_dcache_tabs");t&&t.length>0&&t.forEach((function(t){e.push({id:t.id,path:t.path})}))},checkCurrBTabs:function(){var e=this;this.$nextTick((function(){var t=e.$refs.btabs||"",a=t.children||[],r="";if(a.forEach((function(e){var t=e.getAttribute("class");t.indexOf("active")>-1&&(r=e)})),r.offsetLeft<t.scrollLeft){var o=r.offsetLeft;t.scrollTo(o,0)}else if(r.offsetLeft+r.offsetWidth>t.scrollLeft+t.offsetWidth){var s=r.offsetLeft+r.offsetWidth-t.offsetWidth;t.scrollTo(s,0)}}))},selectBTabs:function(e,t){var a=this.BTabs,r=!1;a.forEach((function(a){a.id===e&&(r=!0,a.path=t.moduleName?"/server/".concat(e,"/cache"):"/server/".concat(e,"/manage"))})),r||this.BTabs.push({id:e,path:t.moduleName?"/server/".concat(e,"/cache"):"/server/".concat(e,"/manage")}),this.treeid=e,this.setLocalStorage("tars_dcache_treeid",JSON.stringify(e)),this.setLocalStorage("tars_dcache_tabs",JSON.stringify(a))},clickBTabs:function(e,t){this.treeid=t,this.setLocalStorage("tars_dcache_treeid",JSON.stringify(t))},closeBTabs:function(e){var t=this.BTabs,a=0;t.forEach((function(t,r){t.id===e&&(a=r)})),t.splice(a,1),this.setLocalStorage("tars_dcache_tabs",JSON.stringify(t)),t.length>0?this.treeid=t[t.length-1].id:this.treeid="",this.setLocalStorage("tars_dcache_treeid",JSON.stringify(this.treeid)),this.getTreeData()},closeAllBTabs:function(){this.BTabs=[],this.treeid="",this.setLocalStorage("tars_dcache_tabs",JSON.stringify(this.BTabs)),this.setLocalStorage("tars_dcache_treeid",JSON.stringify(this.treeid)),this.getTreeData()},getLocalStorage:function(e){var t="";return window.localStorage&&(t=JSON.parse(JSON.parse(localStorage.getItem(e)))),t},setLocalStorage:function(e,t){var a="";return window.localStorage&&(a=localStorage.setItem(e,JSON.stringify(t))),a}},created:function(){this.serverData=this.getServerData(),this.isTrueTreeLevel()},mounted:function(){this.checkTreeid(),this.checkBTabs(),this.getTreeData(),window.dcacheIndex=this}},Mt=xt,St=(a("42b8"),Object(y["a"])(Mt,D,T,!1,null,null,null)),Ct=St.exports,Lt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation"},[a("let-tabs",{attrs:{activekey:e.$route.matched[1]?e.$route.matched[1].path:"/operation/apply"},on:{click:e.onTabClick}},[a("let-tab-pane",{attrs:{tab:e.$t("apply.createTitle"),tabkey:"/operation/apply"}}),a("let-tab-pane",{attrs:{tab:e.$t("module.createTitle"),tabkey:"/operation/module"}}),a("let-tab-pane",{attrs:{tab:e.$t("region.title"),tabkey:"/operation/region"}})],1),a("router-view",{staticClass:"page_operation_children"})],1)},Nt=[],Ot={name:"Oparetion",methods:{onTabClick:function(e){this.$router.replace(e)}}},Dt=Ot,Tt=(a("dbb3"),Object(y["a"])(Dt,Lt,Nt,!1,null,null,null)),jt=Tt.exports,qt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_apply"},[a("let-steps",{staticClass:"apply_steps",attrs:{current:e.step}},[a("let-step",{attrs:{title:e.$t(e.title1)}}),a("let-step",{attrs:{title:e.$t(e.title2)}}),a("let-step",{attrs:{title:e.$t(e.title3)}})],1),a("router-view",{staticClass:"page_operation_apply_children"})],1)},Pt=[],It={data:function(){var e=this.$route.fullPath,t=1;return e.indexOf("createApply")>-1?t=1:e.indexOf("createService")>-1?t=2:e.indexOf("installAndPublish")>-1&&(t=3),{title1:"apply.createApply",title2:"apply.createRouterProxyService",title3:"apply.installAndPublish",step:t}},watch:{$route:function(e,t){var a=e.fullPath;a.indexOf("createApply")>-1?this.step=1:a.indexOf("createService")>-1?this.step=2:a.indexOf("installAndPublish")>-1&&(this.step=3)}},methods:{}},Rt=It,At=(a("4ff0"),Object(y["a"])(Rt,qt,Pt,!1,null,null,null)),Et=At.exports,zt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"page_operation_create_apply"},[a("let-form",{ref:"detailForm",attrs:{inline:""}},[a("let-form-item",{attrs:{label:e.$t("apply.title"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.name,callback:function(t){e.$set(e.model,"name",t)},expression:"model.name"}})],1),a("let-form-item",{attrs:{label:e.$t("region.idcArea"),itemWidth:"240px"}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:e.changeSelect},model:{value:e.model.idcArea,callback:function(t){e.$set(e.model,"idcArea",t)},expression:"model.idcArea"}},e._l(e.regions,(function(t){return a("let-option",{key:t.label,attrs:{value:t.label}},[e._v(" "+e._s(t.region)+" ")])})),1)],1),a("let-form-item",{attrs:{label:e.$t("region.setArea"),itemWidth:"240px"}},[a("let-select",{attrs:{size:"small",multiple:!0},model:{value:e.model.setArea,callback:function(t){e.$set(e.model,"setArea",t)},expression:"model.setArea"}},e._l(e.setRegions,(function(t){return a("let-option",{key:t.label,attrs:{value:t.label}},[e._v(" "+e._s(t.region)+" ")])})),1)],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.createApply}},[e._v(e._s(e.$t("apply.createApply")))])],1)],1)],1)},Vt=[],Ft=function(){return{name:"",admin:"",idcArea:"",setArea:[]}},Wt={data:function(){return{regions:[],setRegions:[],model:Ft()}},methods:{changeSelect:function(){var e=this;this.model.setArea=[];var t=this.regions.concat();t.splice(t.indexOf(t.find((function(t){return t.label==e.model.idcArea}))),1),this.setRegions=t},createApply:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.model,a="/server/api/add_apply",r=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(a){r.hide(),a.hasApply?e.$confirm(e.$t("dcache.applyExists"),e.$t("common.alert")).then(Object(R["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:r.show(),e.$ajax.postJSON("/server/api/overwrite_apply",t).then((function(t){r.hide(),e.$tip.success(e.$t("common.success")),e.$router.push("/operation/apply/createService/"+t.id)})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}));case 2:case"end":return a.stop()}}),a)})))).catch((function(){})):(r.hide(),e.$tip.success(e.$t("common.success")),e.$router.push("/operation/apply/createService/"+a.id))})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},getRegionList:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(A["l"])();case 3:a=t.sent,e.regions=a,t.next=9;break;case 7:t.prev=7,t.t0=t["catch"](0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()}},created:function(){this.getRegionList()},beforeRouteEnter:function(e,t,a){o["a"].getJSON("/server/api/has_dcache_patch_package").then((function(e){e?a():a((function(e){e.$tip.warning("".concat(e.$t("common.warning"),": ").concat(e.$t("apply.uploadPatchPackage"))),e.$router.push("/releasePackage/proxyList")}))})).catch((function(e){console.error(e.message||e.err_msg)}))}},Kt=Wt,Jt=Object(y["a"])(Kt,zt,Vt,!1,null,null,null),Bt=Jt.exports,Gt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"page_operation_create_service"},[a("let-form",{ref:"detailForm",attrs:{"label-position":"top"}},[a("let-form-group",{attrs:{title:e.$t("apply.RouterConfigInfo"),inline:"","label-position":"top"}},[a("let-form-item",{attrs:{label:e.$t("service.serverName"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.apply.Router.server_name,callback:function(t){e.$set(e.apply.Router,"server_name",t)},expression:"apply.Router.server_name"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.template"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.templateTips")},model:{value:e.apply.Router.template_file,callback:function(t){e.$set(e.apply.Router,"template_file",t)},expression:"apply.Router.template_file"}},e._l(e.templates,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("service.serverIp"),itemWidth:"300px",required:""}},[a("let-select",{attrs:{size:"small",required:"",placeholder:"Please Choose"},model:{value:e.apply.Router.server_ip,callback:function(t){e.$set(e.apply.Router,"server_ip",t)},expression:"apply.Router.server_ip"}},e._l(e.nodeList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)],1),a("br"),a("span",{staticStyle:{"margin-left":"20px"}},[e._v(e._s(e.$t("service.routerDbNameTip")))]),a("br"),a("br"),a("let-form-item",{attrs:{label:e.$t("service.routerDbName"),itemWidth:"240px",required:""}},[a("let-input",{staticStyle:{display:"inline-block"},attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.apply.Router.router_db_name,callback:function(t){e.$set(e.apply.Router,"router_db_name",t)},expression:"apply.Router.router_db_name"}})],1),a("let-tag",{staticStyle:{"margin-left":"20px"},attrs:{theme:"danger"}},[e._v("娉ㄦ剰: 濡傛灉鏁版嵁搴撴槸涓嶅尯鍒嗗ぇ灏忓啓鐨�, db鍚嶇О鍒欏繀椤讳负灏忓啓瀛楁瘝!!")]),a("br"),a("let-form-item",{attrs:{label:e.$t("service.routerDbName"),itemWidth:"240px",required:""}},[a("let-radio",{attrs:{label:!0},model:{value:e.apply.dbMethod,callback:function(t){e.$set(e.apply,"dbMethod",t)},expression:"apply.dbMethod"}},[e._v(e._s(e.$t("service.chooseRouterDb")))])],1),e.apply.dbMethod?a("let-form-item",{attrs:{label:e.$t("service.routerDbName"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:""},model:{value:e.apply.routerDbId,callback:function(t){e.$set(e.apply,"routerDbId",t)},expression:"apply.routerDbId"}},e._l(e.routerDb,(function(t){return a("let-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.router_db_flag)+" ")])})),1)],1):e._e(),a("br"),a("let-form-item",{attrs:{label:e.$t("service.routerDbName"),itemWidth:"240px",required:""}},[a("let-radio",{attrs:{label:!1},model:{value:e.apply.dbMethod,callback:function(t){e.$set(e.apply,"dbMethod",t)},expression:"apply.dbMethod"}},[e._v(e._s(e.$t("service.inputRouterDb")))])],1),e.apply.dbMethod?e._e():a("span",[a("let-form-item",{attrs:{label:e.$t("service.routerDbIp"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.apply.Router.router_db_ip,callback:function(t){e.$set(e.apply.Router,"router_db_ip",t)},expression:"apply.Router.router_db_ip"}})],1),a("let-form-item",{attrs:{label:e.$t("service.routerDbPort"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.apply.Router.router_db_port,callback:function(t){e.$set(e.apply.Router,"router_db_port",t)},expression:"apply.Router.router_db_port"}})],1),a("let-form-item",{attrs:{label:e.$t("service.routerDbUser"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.apply.Router.router_db_user,callback:function(t){e.$set(e.apply.Router,"router_db_user",t)},expression:"apply.Router.router_db_user"}})],1),a("let-form-item",{attrs:{label:e.$t("service.routerDbPass"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.apply.Router.router_db_pass,callback:function(t){e.$set(e.apply.Router,"router_db_pass",t)},expression:"apply.Router.router_db_pass"}})],1)],1)],1),a("let-form-group",{attrs:{title:e.$t("apply.ProxyConfigInfo"),inline:"","label-position":"top"}},[a("let-table",{ref:"table",attrs:{data:e.apply.Proxy,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"server_name",width:"25%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.server_name,callback:function(a){e.$set(t.row,"server_name",a)},expression:"scope.row.server_name"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("service.multipleIp"),prop:"server_ip",width:"40%",required:""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",required:"",multiple:"",placeholder:"Please Choose"},model:{value:t.row.server_ip,callback:function(a){e.$set(t.row,"server_ip",a)},expression:"scope.row.server_ip"}},e._l(e.nodeList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)]}}])}),a("let-table-column",{attrs:{title:e.$t("region.idcArea"),prop:"idc_area"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.idc_area)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_file",width:"10%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.templateTips")},model:{value:t.row.template_file,callback:function(a){e.$set(t.row,"template_file",a)},expression:"scope.row.template_file"}},e._l(e.templates,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)]}}])}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),prop:"appName",width:"120px"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("let-table-operation",{on:{click:function(t){return e.ensureDelete(r)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1)],1),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.createService}},[e._v(e._s(e.$t("apply.createRouterProxyService"))+" ")])],1)],1)},Ut=[],Ht=(a("3e8f"),function(){return{apply_id:17,create_person:"adminUser",router_db_ip:"",router_db_name:"",router_db_pass:"",router_db_port:"3306",router_db_user:"",server_ip:"",server_name:"",template_file:""}}),Zt=function(){return{apply_id:17,create_person:"adminUser",idc_area:"SZ",server_ip:[],server_name:"",template_file:""}},Yt={data:function(){var e=this.$route.params.applyId;return{nodeList:[],templates:[],applyId:e,apply:{dbMethod:!1,routerDbId:0,Router:Ht(),Proxy:[Zt()]},routerDb:[]}},methods:{getNodeList:function(){var e=this;return this.$ajax.getJSON("/server/api/node_list").then((function(t){e.nodeList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},templateNameList:function(){var e=this;return this.$ajax.getJSON("/server/api/template_name_list").then((function(t){e.templates=t,e.apply.Router.template_file="DCache.Router",e.apply.Proxy.forEach((function(e){return e.template_file="DCache.Proxy"}))})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},changeStatus:function(){},getApplyInfo:function(){var e=this,t=this.applyId;return this.$ajax.getJSON("/server/api/get_apply_and_router_and_proxy",{applyId:t}).then((function(t){e.apply=t||{}})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},createService:function(){var e=this;if(void 0!=this.apply.dbMethod){for(var t=0;t<this.apply.Proxy.length;t++){var a=this.apply.Proxy[t];if(0==a.server_ip.length)return void this.$tip.error("".concat(this.$t("apply.proxyIp")))}if(this.$refs.detailForm.validate()){var r=this.apply,o="/server/api/save_router_proxy",s=this.checkDuplicateIp(r.Proxy);if(s)this.$tip.error(this.$t("apply.duplicateIp"));else{var n=this.$Loading.show();this.$ajax.postJSON(o,r).then((function(t){n.hide();var a=e.applyId;e.$router.push("/operation/apply/installAndPublish/"+a)})).catch((function(t){n.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}}}else this.$tip.error("".concat(this.$t("apply.dbMethod")))},checkDuplicateIp:function(e){var t=[],a=!1;return e.forEach((function(e){e.server_ip.filter((function(e){return e})).forEach((function(e){t.indexOf(e)>-1?a=!0:t.push(e)}))})),a},loadRouterDb:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",e.$ajax.getJSON("/server/api/load_router_db").then((function(t){e.routerDb=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})));case 1:case"end":return t.stop()}}),t)})))()},ensureDelete:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,t.$confirm(t.$t("dcache.operationManage.ensureDelete"));case 3:return a.abrupt("return",t.$ajax.postJSON("/server/api/delete_apply_proxy",{id:e.id}).then((function(a){1==a&&t.apply.Proxy.forEach((function(a,r,o){if(a.id==e.id)return o.splice(r,1),void(t.apply.Proxy=o)}))})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))})));case 6:a.prev=6,a.t0=a["catch"](0),t.$tip.error(a.t0.message);case 9:case"end":return a.stop()}}),a,null,[[0,6]])})))()}},created:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getApplyInfo();case 2:return t.next=4,e.templateNameList();case 4:return t.next=6,e.getNodeList();case 6:return t.next=8,e.loadRouterDb();case 8:case"end":return t.stop()}}),t)})))()}},Qt=Yt,Xt=(a("04bd"),Object(y["a"])(Qt,Gt,Ut,!1,null,null,null)),ea=Xt.exports,ta=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"page_operation_install_and_publish"},[a("let-form",{ref:"detailForm",attrs:{"label-position":"top"}},[a("let-form-group",{attrs:{title:e.$t("common.baseInfo"),inline:"","label-position":"top"}},[a("let-form-item",{attrs:{label:e.$t("apply.name"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.apply.name)+" ")]),a("let-form-item",{attrs:{label:e.$t("common.admin"),itemWidth:"240px"}},[e._v(" "+e._s(e.apply.admin)+" ")]),a("let-form-item",{attrs:{label:e.$t("region.idcArea"),itemWidth:"240px"}},[e._v(" "+e._s(e.apply.idc_area)+" ")]),a("let-form-item",{attrs:{label:e.$t("region.setArea"),itemWidth:"240px"}},[e._v(" "+e._s(e.apply.set_area.join(","))+" ")]),a("let-form-item",{attrs:{label:e.$t("common.createPerson"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.apply.create_person)+" ")])],1),a("let-form-group",{attrs:{title:e.$t("apply.RouterConfigInfo"),inline:"","label-position":"top"}},[a("let-form-item",{attrs:{label:e.$t("service.serverName"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.apply.Router.server_name)+" ")]),a("let-form-item",{attrs:{label:e.$t("service.serverIp"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.apply.Router.server_ip)+" ")]),a("let-form-item",{attrs:{label:e.$t("service.templateFile"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.apply.Router.template_file)+" ")]),a("let-form-item",{attrs:{label:e.$t("service.routerDbName"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.apply.Router.router_db_name)+" ")]),a("br"),a("let-form-item",{attrs:{label:e.$t("service.routerDbIp"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.apply.Router.router_db_ip)+" ")]),a("let-form-item",{attrs:{label:e.$t("service.routerDbPort"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.apply.Router.router_db_port)+" ")]),a("let-form-item",{attrs:{label:e.$t("service.routerDbUser"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.apply.Router.router_db_user)+" ")]),a("let-form-item",{attrs:{label:e.$t("service.routerDbPass"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.apply.Router.router_db_pass)+" ")])],1),a("let-form-group",{attrs:{title:e.$t("apply.ProxyConfigInfo"),inline:"","label-position":"top"}},[a("let-table",{ref:"table",attrs:{data:e.apply.Proxy,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"server_name",width:"25%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.server_name)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("service.multipleIp"),prop:"server_ip",width:"25%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.server_ip)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("region.idcArea"),prop:"idc_area"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.idc_area)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("service.templateFile"),prop:"template_file"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.template_file)+" ")]}}])})],1)],1),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.installAndPublish}},[e._v(e._s(e.$t("apply.installAndPublish"))+" ")])],1),a("let-modal",{attrs:{title:e.$t("publishLog.title"),width:"800px"},on:{"on-confirm":e.confirmPublish},model:{value:e.showModal,callback:function(t){e.showModal=t},expression:"showModal"}},[a("let-table",{ref:"ProgressTable",staticStyle:{"margin-top":"20px"},attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("module.title"),prop:"module",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("publishLog.releaseId"),prop:"releaseId",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("publishLog.releaseProgress"),prop:"percent"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row,o=r.percent,s=r.errMsg;return[s?a("p",{staticStyle:{color:"red"}},[e._v(e._s(s))]):a("span",[e._v(e._s(o))]),100===o||s?e._e():a("icon",{staticClass:"spinner-icon",attrs:{name:"spinner"}})]}}])})],1),a("let-tag",{staticStyle:{margin:"auto"},attrs:{theme:"success",checked:""}},[e._v(e._s(e.$t("publishLog.publishInfo")))])],1)],1)},aa=[],ra=(a("2ff6"),function(){return{apply_id:17,create_person:"adminUser",router_db_ip:"",router_db_name:"",router_db_pass:"",router_db_port:"",router_db_user:"",server_ip:"",server_name:"",template_file:""}}),oa=function(){return{apply_id:17,create_person:"adminUser",idc_area:"sz",server_ip:"",server_name:"",template_file:""}},sa={data:function(){var e=this.$route.params.applyId;return{applyId:e,showModal:!1,items:[],apply:{set_area:[],Router:ra(),Proxy:[oa()]},timerId:null}},methods:{getApplyInfo:function(){var e=this,t=this.applyId;this.$ajax.getJSON("/server/api/get_apply_and_router_and_proxy",{applyId:t}).then((function(t){e.apply=t||{}})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},installAndPublish:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n,l,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.$loading.show(),t.prev=1,r=e.applyId,t.next=5,Object(A["s"])({applyId:r});case 5:o=t.sent,s=o.proxy,n=o.router,e.showModal=!0,l=s.releaseId,i=n.releaseId,e.items=[{module:"ProxyServer",releaseId:l,percent:"0",errMsg:"",timer:""},{module:"RouterServer",releaseId:i,percent:"0",errMsg:"",timer:""}],e.items.forEach((function(t){return e.repeatGetReleaseProgress(t)})),t.next=18;break;case 15:t.prev=15,t.t0=t["catch"](1),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 18:a.hide();case 19:case"end":return t.stop()}}),t,null,[[1,15]])})))()},repeatGetReleaseProgress:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r,o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return clearTimeout(e.timer),a.prev=1,a.next=4,Object(A["m"])({releaseId:e.releaseId});case 4:r=a.sent,o=r.percent,e.percent=o,100===o?clearTimeout(e.timer):e.timer=setTimeout(t.repeatGetReleaseProgress.bind(t,e),1e3),a.next=15;break;case 10:a.prev=10,a.t0=a["catch"](1),t.$tip.error("".concat(t.$t("common.error"),": ").concat(a.t0.message||a.t0.err_msg)),e.errMsg=a.t0,clearTimeout(e.timer);case 15:case"end":return a.stop()}}),a,null,[[1,10]])})))()},confirmPublish:function(){this.showModal=!1,document.body.classList.remove("has-modal-open"),this.$router.push("/operation/module/createModule")}},beforeRouteLeave:function(e,t,a){clearTimeout(this.timerId),a()},created:function(){this.getApplyInfo()}},na=sa,la=(a("0e157"),Object(y["a"])(na,ta,aa,!1,null,null,null)),ia=la.exports,ca=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_module"},[a("let-steps",{staticClass:"apply_steps",attrs:{current:e.step}},[a("let-step",{attrs:{title:e.$t(e.title1)}}),a("let-step",{attrs:{title:e.$t(e.title2)}}),a("let-step",{attrs:{title:e.$t(e.title3)}}),a("let-step",{attrs:{title:e.$t(e.title4)}})],1),a("router-view",{staticClass:"page_operation_apply_children"})],1)},da=[],ua={data:function(){var e=this.$route.fullPath,t=1;return e.indexOf("createApply")>-1?t=1:e.indexOf("moduleConfig")>-1?t=2:e.indexOf("serverConfig")>-1?t=3:e.indexOf("installAndPublish")>-1&&(t=4),{title1:"module.createModule",title2:"module.moduleConfig",title3:"module.serverConfig",title4:"apply.installAndPublish",step:t}},watch:{$route:function(e,t){var a=e.fullPath;a.indexOf("createApply")>-1?this.step=1:a.indexOf("moduleConfig")>-1?this.step=2:a.indexOf("serverConfig")>-1?this.step=3:a.indexOf("installAndPublish")>-1&&(this.step=4)}},methods:{}},ma=ua,pa=(a("1481"),Object(y["a"])(ma,ca,da,!1,null,null,null)),ha=pa.exports,fa=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"page_operation_create_module"},[a("let-form",{ref:"detailForm",attrs:{inline:""}},[a("let-form-item",{attrs:{label:e.$t("apply.title"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"",filterable:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.apply_id,callback:function(t){e.$set(e.model,"apply_id",t)},expression:"model.apply_id"}},e._l(e.applys,(function(t){return a("let-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.name)+" ")])})),1)],1),a("let-form-item",{attrs:{label:e.$t("module.name"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty"),pattern:"^[a-zA-Z0-9]+$"},model:{value:e.model.module_name,callback:function(t){e.$set(e.model,"module_name",t)},expression:"model.module_name"}})],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.createModule}},[e._v(e._s(e.$t("common.nextStep")))])],1)],1),a("let-modal",{attrs:{title:e.$t("module.update"),width:"800px"},on:{"on-confirm":e.onConfirmUpdate},model:{value:e.showUpdate,callback:function(t){e.showUpdate=t},expression:"showUpdate"}},[a("let-form",{attrs:{"label-position":"top"}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:e.changeUpdate},model:{value:e.model.update,callback:function(t){e.$set(e.model,"update",t)},expression:"model.update"}},e._l(e.updateModuleType,(function(t){return a("let-option",{key:t.key,attrs:{value:t.key}},[e._v(" "+e._s(e.$t(t.value))+" ")])})),1),e.info.length>0?a("let-tag",{staticStyle:{"margin-top":"20px"},attrs:{size:"small"}},[e._v(e._s(e.info))]):e._e()],1)],1)],1)},va=[],ga=function(){return{apply_id:"",module_name:"",follower:"",update:0}},ba=[{key:0,value:"cache.installFull",info:"cache.installFullInfo"},{key:1,value:"cache.installDbAccess",info:"cache.installDbAccessInfo"},{key:2,value:"cache.installBackup",info:""},{key:3,value:"cache.installMirror",info:""}],_a={data:function(){return{model:ga(),applys:[],updateModuleType:ba,showUpdate:!1,info:"",moduleInfo:{}}},methods:{changeUpdate:function(){this.info=this.$t(this.updateModuleType[this.model.update].info)},onConfirmUpdate:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a="/server/api/add_module_base_info",t.next=4,e.$ajax.postJSON(a,e.model);case 4:r=t.sent,e.$router.push("/operation/module/moduleConfig/"+r.id),t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},createModule:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s,n,l;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=e.applys.filter((function(t){return t.id==e.model.apply_id}))[0].name,0==e.model.module_name.indexOf(a)&&e.model.module_name.length>a.length){t.next=4;break}return e.$tip.error("".concat(e.$t("module.namingError"))),t.abrupt("return");case 4:if(!e.$refs.detailForm.validate()){t.next=29;break}return r=e.$Loading.show(),t.prev=6,o=e.model,t.next=10,e.$ajax.getJSON("/server/api/has_module_info",o);case 10:if(s=t.sent,s.hasModule){t.next=19;break}return n="/server/api/add_module_base_info",t.next=15,e.$ajax.postJSON(n,o);case 15:l=t.sent,e.$router.push("/operation/module/moduleConfig/"+l.id),t.next=21;break;case 19:e.changeUpdate(),e.showUpdate=!0;case 21:t.next=26;break;case 23:t.prev=23,t.t0=t["catch"](6),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 26:return t.prev=26,r.hide(),t.finish(26);case 29:case"end":return t.stop()}}),t,null,[[6,23,26,29]])})))()}},beforeRouteEnter:function(e,t,a){o["a"].getJSON("/server/api/get_apply_list").then((function(e){e.length?a((function(t){e=e.sort((function(e,t){var a=e.name.toLowerCase(),r=t.name.toLowerCase();return a<r?-1:a>r?1:0})),t.applys=e})):a((function(e){e.$tip.warning("".concat(e.$t("common.warning"),": ").concat(e.$t("module.createApplyTips"))),e.$router.push("/operation/apply/createApply")}))})).catch((function(e){alert(e.message||e.err_msg)}))}},$a=_a,ka=Object(y["a"])($a,fa,va,!1,null,null,null),ya=ka.exports,wa=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"page_operation_module_info"},[a("let-form",{ref:"detailForm",attrs:{inline:""}},[a("let-form-item",{attrs:{label:e.$t("module.name"),itemWidth:"150px",required:""}},[a("let-poptip",{attrs:{placement:"top",content:e.$t("module.namingRule"),trigger:"hover"}},[a("let-input",{attrs:{disabled:"",size:"small",placeholder:e.$t("module.namingRule"),required:"","required-tip":e.$t("deployService.table.tips.empty"),pattern:"^[a-zA-Z][a-zA-Z0-9]+$","pattern-tip":e.$t("module.namingRule")},model:{value:e.moduleInfo.module_name,callback:function(t){e.$set(e.moduleInfo,"module_name",t)},expression:"moduleInfo.module_name"}})],1)],1),a("let-form-item",{attrs:{label:e.$t("module.cacheType"),itemWidth:"200px",required:""}},[a("let-select",{attrs:{size:"small",disabled:0!=e.moduleInfo.update,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},e._l(e.types,(function(t){return a("let-option",{key:t.key,attrs:{value:t.key}},[e._v(" "+e._s(t.value)+" ")])})),1)],1),a("let-form-item",{attrs:{label:e.$t("cache.perRecordAvg"),itemWidth:"200px",required:""}},[a("let-input",{attrs:{size:"small",disabled:0!=e.moduleInfo.update,placeholder:e.$t("cache.perRecordAvgUnit"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.per_record_avg,callback:function(t){e.$set(e.model,"per_record_avg",t)},expression:"model.per_record_avg"}})],1),a("let-form-item",{attrs:{label:e.$t("module.deployArea"),itemWidth:"100px"}},[a("let-select",{attrs:{size:"small",required:"",disabled:0!=e.moduleInfo.update},on:{change:e.changeSelect},model:{value:e.model.idc_area,callback:function(t){e.$set(e.model,"idc_area",t)},expression:"model.idc_area"}},e._l(e.regions,(function(t){return a("let-option",{key:t.label,attrs:{value:t.label}},[e._v(" "+e._s(t.region)+" ")])})),1)],1),a("let-form-item",{attrs:{label:e.$t("module.openBackup"),itemWidth:"100px",required:""}},[a("let-switch",{attrs:{disabled:0!=e.moduleInfo.update},model:{value:e.model.open_backup,callback:function(t){e.$set(e.model,"open_backup",t)},expression:"model.open_backup"}},[a("span",{attrs:{slot:"1"},slot:"1"},[e._v(e._s(e.$t("module.openBackup")))]),a("span",{attrs:{slot:"0"},slot:"0"},[e._v(e._s(e.$t("module.closeBackup")))])])],1),a("let-form-item",{attrs:{label:e.$t("region.setArea"),itemWidth:"200px"}},[a("let-select",{attrs:{size:"small",disabled:0!=e.moduleInfo.update&&3!=e.moduleInfo.update,multiple:""},model:{value:e.model.set_area,callback:function(t){e.$set(e.model,"set_area",t)},expression:"model.set_area"}},e._l(e.setRegions,(function(t){return a("let-option",{key:t.label,attrs:{value:t.label}},[e._v(" "+e._s(t.region)+" ")])})),1)],1),a("br"),a("let-form-item",{attrs:{label:e.$t("module.scenario"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",disabled:0!=e.moduleInfo.update&&1!=e.moduleInfo.update,required:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:e.changeDbAccessServant},model:{value:e.model.cache_module_type,callback:function(t){e.$set(e.model,"cache_module_type",t)},expression:"model.cache_module_type"}},e._l(e.cacheModuleType,(function(t){return a("let-option",{key:t.key,attrs:{value:t.key}},[e._v(" "+e._s(e.$t(t.value))+" ")])})),1)],1),1==e.model.cache_module_type?a("let-form-item",{attrs:{label:e.$t("cache.cacheType"),itemWidth:"500px",required:""}},[a("let-radio-group",{attrs:{size:"small",disabled:0!=e.moduleInfo.update&&1!=e.moduleInfo.update,required:"",data:e.cacheTypeOption},model:{value:e.model.key_type,callback:function(t){e.$set(e.model,"key_type",t)},expression:"model.key_type"}})],1):e._e(),2==e.model.cache_module_type?a("let-form-item",{attrs:{label:e.$t("cache.dbAccessServantObj"),itemWidth:"400px",required:""}},[a("let-input",{attrs:{size:"small",disabled:0!=e.moduleInfo.update&&1!=e.moduleInfo.update,placeholder:e.$t("cache.dbAccessServantObjEx"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.dbAccessServant,callback:function(t){e.$set(e.model,"dbAccessServant",t)},expression:"model.dbAccessServant"}})],1):e._e(),a("br"),a("br"),a("let-form-item",{attrs:{label:e.$t("cache.moduleRemark"),itemWidth:"516px",required:""}},[a("let-input",{attrs:{size:"small",type:"textarea",rows:4,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.module_remark,callback:function(t){e.$set(e.model,"module_remark",t)},expression:"model.module_remark"}})],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addModuleConfig}},[e._v(e._s(e.$t("common.nextStep")))])],1)],1)],1)},xa=[],Ma=a("ade3"),Sa=function(){var e;return e={admin:"",idc_area:"",key_type:null,module_name:"",cache_module_type:2},Object(Ma["a"])(e,"key_type",""),Object(Ma["a"])(e,"dbAccessServant",""),Object(Ma["a"])(e,"per_record_avg","100"),Object(Ma["a"])(e,"total_record","1000"),Object(Ma["a"])(e,"max_read_flow","100000"),Object(Ma["a"])(e,"max_write_flow","100000"),Object(Ma["a"])(e,"module_remark",""),Object(Ma["a"])(e,"set_area",[]),Object(Ma["a"])(e,"module_id",""),Object(Ma["a"])(e,"apply_id",""),Object(Ma["a"])(e,"open_backup",!1),Object(Ma["a"])(e,"cache_version",1),Object(Ma["a"])(e,"mkcache_struct",0),e},Ca=[{key:"1-0",value:"key-value(KVCache)"},{key:"2-1",value:"k-k-row(MKVCache)"},{key:"2-2",value:"Set(MKVCache)"},{key:"2-3",value:"List(MKVCache)"},{key:"2-4",value:"Zset(MKVCache)"}],La=[{key:1,value:"cache.title"},{key:2,value:"cache.cachePersistent"}],Na=[{key:"0",value:"string"}],Oa={data:function(){var e=[{value:"1",text:this.$t("cache.cacheTypeTip1")},{value:"2",text:this.$t("cache.cacheTypeTip2")},{value:"3",text:this.$t("cache.cacheTypeTip3")}];return{cacheTypeOption:e,keyTypeOption:Na,cacheModuleType:La,regions:[],setRegions:[],types:Ca,moduleInfo:{update:0},model:Sa()}},computed:{type:{get:function(){return this.model.cache_version?this.model.cache_version+"-"+this.model.mkcache_struct:""},set:function(e){var t=e.split("-");this.model.cache_version=t[0],this.model.mkcache_struct=t[1]}}},methods:{addModuleConfig:function(){var e=this;if(3!=this.moduleInfo.update||0!=this.model.set_area.length){if(this.$refs.detailForm.validate()){var t=this.model,a=this.$Loading.show();this.$ajax.postJSON("/server/api/overwrite_module_config",t).then((function(t){a.hide(),e.$router.push("/operation/module/serverConfig/"+t.module_id)})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg)),e.$router.push("/operation/module/serverConfig/"+data.module_id)}))}}else this.$tip.error("".concat(this.$t("common.error"),": ").concat(this.$t("module.chooseMirror")))},changeDbAccessServant:function(){1==this.model.cache_module_type?this.model.dbAccessServant="":this.model.dbAccessServant="DCache."+this.moduleInfo.module_name+"DbAccessServer.DbAccessObj"},changeSelect:function(){var e=this;if(3!=this.moduleInfo.update){var t=this.regions.concat();t.splice(t.indexOf(t.find((function(t){return t.label==e.model.idc_area}))),1),this.setRegions=t}else{var a=this.model.set_area.slice(0);a.push(this.model.idc_area);var r=this.regions.concat();r=r.filter((function(e){for(var t=0;t<a.length;t++)if(a[t]==e.label)return!1;return!0})),this.model.set_area=[],this.setRegions=r}},getRegionList:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$ajax.getJSON("/server/api/get_region_list");case 3:e.regions=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t["catch"](0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 9:case 10:case"end":return t.stop()}}),t,null,[[0,6]])})))()},getModuleInfo:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a=e.$route.params.moduleId,t.next=4,e.$ajax.getJSON("/server/api/get_module_info",{moduleId:a});case 4:if(e.moduleInfo=t.sent,0==e.moduleInfo.update){t.next=9;break}return t.next=8,e.$ajax.getJSON("/server/api/get_module_config_info_by_module_name",{module_name:e.moduleInfo.module_name});case 8:e.model=t.sent;case 9:e.model.apply_id=e.moduleInfo.apply_id,e.model.module_id=e.moduleInfo.id,e.model.module_name=e.moduleInfo.module_name,e.changeDbAccessServant(),e.regions&&(e.model.idc_area=e.regions[0].label),t.next=19;break;case 16:t.prev=16,t.t0=t["catch"](0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 19:case 20:case"end":return t.stop()}}),t,null,[[0,16]])})))()}},created:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getRegionList();case 2:e.getModuleInfo();case 3:case"end":return t.stop()}}),t)})))()}},Da=Oa,Ta=(a("ebfe"),Object(y["a"])(Da,wa,xa,!1,null,null,null)),ja=Ta.exports,qa=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"page_operation_create_service"},[a("let-form",{ref:"detailForm",attrs:{inline:""}},[e.moduleData.length>0?a("let-form-group",{attrs:{title:e.$t("module.serverInfo"),inline:"","label-position":"top"}},[a("let-table",{ref:"table",attrs:{data:e.moduleData,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("module.name"),prop:"module_name"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.module_name)+" ")]}}],null,!1,3619543743)}),a("let-table-column",{attrs:{title:e.$t("module.serverGroup"),prop:"group_name"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.group_name)+" ")]}}],null,!1,3294421626)}),a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"server_name"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.server_name)+" ")]}}],null,!1,445723232)}),a("let-table-column",{attrs:{title:e.$t("deployService.form.serviceType"),prop:"server_type"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.mapServerType(t.row.server_type))+" ")]}}],null,!1,2269225375)}),a("let-table-column",{attrs:{title:e.$t("service.serverIp"),prop:"server_ip"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{required:"",size:"small"},model:{value:t.row.server_ip,callback:function(a){e.$set(t.row,"server_ip",a)},expression:"scope.row.server_ip"}},e._l(e.nodeList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)]}}],null,!1,51958731)}),a("let-table-column",{attrs:{title:e.$t("module.shmKey"),prop:"shmKey"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",placeholder:e.$t("module.shmKeyRule")},model:{value:t.row.shmKey,callback:function(a){e.$set(t.row,"shmKey",a)},expression:"scope.row.shmKey"}})]}}],null,!1,627567251)}),a("let-table-column",{attrs:{title:e.$t("deployService.form.template")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.templateTips")},model:{value:t.row.template_name,callback:function(a){e.$set(t.row,"template_name",a)},expression:"scope.row.template_name"}},e._l(e.templates,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)]}}],null,!1,3938279393)}),a("let-table-column",{attrs:{title:e.$t("module.memorySize"),prop:"memory"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{staticStyle:{width:"60px"},attrs:{size:"small",placeholder:e.$t("module.memorySize"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.memory,callback:function(a){e.$set(t.row,"memory",a)},expression:"scope.row.memory"}})]}}],null,!1,882486889)}),a("let-table-column",{attrs:{title:e.$t("module.deployArea"),prop:"area"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.area)+" ")]}}],null,!1,4009109098)})],1)],1):e._e(),e.isDbAccess()?a("div",[a("let-form-group",{attrs:{title:e.$t("module.dbAccessInfo")+"("+e.dbAccess.servant+")",inline:"","label-position":"top"}},[1==this.cacheVersion?a("let-form-item",{attrs:{label:e.$t("service.isSerializated"),itemWidth:"400px",required:""}},[a("let-radio-group",{attrs:{size:"small",data:e.cacheTypeOption},model:{value:e.dbAccess.isSerializated,callback:function(t){e.$set(e.dbAccess,"isSerializated",t)},expression:"dbAccess.isSerializated"}})],1):e._e(),a("br"),a("let-form-item",{attrs:{label:e.$t("service.multipleIp"),itemWidth:"350px",required:""}},[a("let-select",{attrs:{size:"small",required:"",multiple:"",placeholder:"Please Choose"},model:{value:e.dbAccess.dbaccess_ip,callback:function(t){e.$set(e.dbAccess,"dbaccess_ip",t)},expression:"dbAccess.dbaccess_ip"}},e._l(e.nodeList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)],1),a("br"),a("let-form-item",{attrs:{label:e.$t("cache.db.DBPrefix"),itemWidth:"200px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.dbAccess.db_prefix,callback:function(t){e.$set(e.dbAccess,"db_prefix",t)},expression:"dbAccess.db_prefix"}})],1),a("let-form-item",{attrs:{label:e.$t("cache.db.tablePrefix"),itemWidth:"200px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.dbAccess.table_prefix,callback:function(t){e.$set(e.dbAccess,"table_prefix",t)},expression:"dbAccess.table_prefix"}})],1),a("let-form-item",{attrs:{label:e.$t("cache.db.dbNum"),itemWidth:"200px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.dbAccess.db_num,callback:function(t){e.$set(e.dbAccess,"db_num",t)},expression:"dbAccess.db_num"}},[a("let-option",{key:"1",attrs:{value:"1"}},[e._v(" 1 ")]),a("let-option",{key:"10",attrs:{value:"10"}},[e._v(" 10 ")])],1)],1),a("let-form-item",{attrs:{label:e.$t("cache.db.tableNum"),itemWidth:"200px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.dbAccess.table_num,callback:function(t){e.$set(e.dbAccess,"table_num",t)},expression:"dbAccess.table_num"}},[a("let-option",{key:"1",attrs:{value:"1"}},[e._v(" 1 ")]),a("let-option",{key:"10",attrs:{value:"10"}},[e._v(" 10 ")])],1)],1),a("let-form-item",{attrs:{label:e.$t("cache.db.tableCharset"),itemWidth:"200px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.dbAccess.db_charset,callback:function(t){e.$set(e.dbAccess,"db_charset",t)},expression:"dbAccess.db_charset"}},[a("let-option",{key:"utf8mb4",attrs:{value:"utf8mb4"}},[e._v("utf8mb4")]),a("let-option",{key:"utf8",attrs:{value:"utf8"}},[e._v("utf8")]),a("let-option",{key:"gbk",attrs:{value:"gbk"}},[e._v("gbk")]),a("let-option",{key:"latin1",attrs:{value:"latin1"}},[e._v("latin1")])],1)],1),e.accessDb.length>0?a("div",[a("let-form-item",{attrs:{label:e.$t("cache.accessDbName"),itemWidth:"240px",required:""}},[a("let-radio",{attrs:{label:!0},model:{value:e.dbAccess.dbMethod,callback:function(t){e.$set(e.dbAccess,"dbMethod",t)},expression:"dbAccess.dbMethod"}},[e._v(e._s(e.$t("cache.chooseAccessDb")))])],1),e.dbAccess.dbMethod?a("let-form-item",{attrs:{itemWidth:"200px"}},[a("let-select",{attrs:{size:"small",required:""},model:{value:e.dbAccess.accessDbId,callback:function(t){e.$set(e.dbAccess,"accessDbId",t)},expression:"dbAccess.accessDbId"}},e._l(e.accessDb,(function(t){return a("let-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.access_db_flag)+" ")])})),1)],1):e._e()],1):e._e(),a("br"),a("let-form-item",{attrs:{label:e.$t("cache.accessDbName"),itemWidth:"240px",required:""}},[a("let-radio",{attrs:{label:!1},model:{value:e.dbAccess.dbMethod,callback:function(t){e.$set(e.dbAccess,"dbMethod",t)},expression:"dbAccess.dbMethod"}},[e._v(e._s(e.$t("cache.inputAccessDb")))])],1),a("br"),e.dbAccess.dbMethod?e._e():a("span",[a("let-form-item",{attrs:{label:e.$t("cache.db.dbHost"),itemWidth:"200px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.dbAccess.db_host,callback:function(t){e.$set(e.dbAccess,"db_host",t)},expression:"dbAccess.db_host"}})],1),a("let-form-item",{attrs:{label:e.$t("cache.db.dbUser"),itemWidth:"200px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.dbAccess.db_user,callback:function(t){e.$set(e.dbAccess,"db_user",t)},expression:"dbAccess.db_user"}})],1),a("let-form-item",{attrs:{label:e.$t("cache.db.dbPass"),itemWidth:"200px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.dbAccess.db_pwd,callback:function(t){e.$set(e.dbAccess,"db_pwd",t)},expression:"dbAccess.db_pwd"}})],1),a("let-form-item",{attrs:{label:e.$t("cache.db.dbPort"),itemWidth:"200px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.dbAccess.db_port,callback:function(t){e.$set(e.dbAccess,"db_port",t)},expression:"dbAccess.db_port"}})],1)],1)],1)],1):e._e(),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.submitServerConfig}},[e._v(e._s(e.$t("common.nextStep")))])],1)],1),a("let-modal",{attrs:{title:e.$t("module.MultiKeyConfig"),width:"1000px"},on:{"on-confirm":e.submitMKCache},model:{value:e.showMKModal,callback:function(t){e.showMKModal=t},expression:"showMKModal"}},[a("let-form",{ref:"multiKeyForm",attrs:{"label-position":"top"}},[a("let-form-group",{attrs:{title:e.$t("MKCache.mainKey"),inline:"","label-position":"top"}},[a("let-table",{ref:"mainKey",attrs:{data:e.mkCacheStructure.mainKey,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("MKCache.fieldName"),prop:"fieldName",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.fieldName,callback:function(a){e.$set(t.row,"fieldName",a)},expression:"scope.row.fieldName"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("MKCache.dataType"),prop:"dataType",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.dataType,callback:function(a){e.$set(t.row,"dataType",a)},expression:"scope.row.dataType"}},e._l(e.keyTypeOption,(function(t){return a("let-option",{key:t.key,attrs:{value:t.value}},[e._v(" "+e._s(t.value)+" ")])})),1)]}}])}),a("let-table-column",{attrs:{title:e.$t("MKCache.dataType"),prop:"dataType",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.DBType,callback:function(a){e.$set(t.row,"DBType",a)},expression:"scope.row.DBType"}},e._l(e.keyDbTypeOption,(function(t){return a("let-option",{key:t.key,attrs:{value:t.value}},[e._v(" "+e._s(t.value)+" ")])})),1)]}}])}),a("let-table-column",{attrs:{title:e.$t("MKCache.fieldProperty"),prop:"property",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.property)+" ")]}}])})],1)],1),e.multiKey?a("let-form-group",{attrs:{title:e.$t("MKCache.unionKey"),inline:"","label-position":"top"}},[a("let-table",{ref:"unionKey",attrs:{data:e.mkCacheStructure.unionKey,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("MKCache.fieldName"),prop:"fieldName",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.fieldName,callback:function(a){e.$set(t.row,"fieldName",a)},expression:"scope.row.fieldName"}})]}}],null,!1,4011857556)}),a("let-table-column",{attrs:{title:e.$t("MKCache.dataType"),prop:"dataType",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.dataType,callback:function(a){e.$set(t.row,"dataType",a)},expression:"scope.row.dataType"}},e._l(e.keyTypeOption,(function(t){return a("let-option",{key:t.key,attrs:{value:t.value}},[e._v(" "+e._s(t.value)+" ")])})),1)]}}],null,!1,3544666356)}),a("let-table-column",{attrs:{title:e.$t("MKCache.dataDbType"),prop:"DBType",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.DBType,callback:function(a){e.$set(t.row,"DBType",a)},expression:"scope.row.DBType"}},e._l(e.keyDbTypeOption,(function(t){return a("let-option",{key:t.key,attrs:{value:t.value}},[e._v(" "+e._s(t.value)+" ")])})),1)]}}],null,!1,596108868)}),a("let-table-column",{attrs:{title:e.$t("MKCache.fieldProperty"),prop:"property",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.property)+" ")]}}],null,!1,2792689594)}),a("let-table-column",{attrs:{title:e.$t("MKCache.defaultValue"),prop:"defaultValue",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small"},model:{value:t.row.defaultValue,callback:function(a){e.$set(t.row,"defaultValue",a)},expression:"scope.row.defaultValue"}})]}}],null,!1,3960107341)}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:e.addUnionKey}},[e._v(e._s(e.$t("operate.add")))]),a("let-table-operation",{on:{click:function(a){return e.deleteUnionKey(t.$index)}}},[e._v(e._s(e.$t("operate.delete")))])]}}],null,!1,2523220812)})],1)],1):e._e(),a("let-form-group",{attrs:{title:e.$t("MKCache.dataValue"),inline:"","label-position":"top"}},[a("let-table",{ref:"dataValue",attrs:{data:e.mkCacheStructure.value,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("MKCache.fieldName"),prop:"fieldName",width:"20%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.fieldName,callback:function(a){e.$set(t.row,"fieldName",a)},expression:"scope.row.fieldName"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("MKCache.dataType"),prop:"dataType",width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.dataType,callback:function(a){e.$set(t.row,"dataType",a)},expression:"scope.row.dataType"}},e._l(e.dataTypeOption,(function(t){return a("let-option",{key:t.key,attrs:{value:t.value}},[e._v(" "+e._s(t.value)+" ")])})),1)]}}])}),a("let-table-column",{attrs:{title:e.$t("MKCache.dataDbType"),prop:"DBType",width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.DBType,callback:function(a){e.$set(t.row,"DBType",a)},expression:"scope.row.DBType"}},e._l(e.dataDbTypeOption,(function(t){return a("let-option",{key:t.key,attrs:{value:t.value}},[e._v(" "+e._s(t.value)+" ")])})),1)]}}])}),a("let-table-column",{attrs:{title:e.$t("MKCache.fieldProperty"),prop:"property",width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.property,callback:function(a){e.$set(t.row,"property",a)},expression:"scope.row.property"}},e._l(e.propertyOption,(function(t){return a("let-option",{key:t.key,attrs:{value:t.value}},[e._v(" "+e._s(t.value)+" ")])})),1)]}}])}),a("let-table-column",{attrs:{title:e.$t("MKCache.defaultValue"),prop:"defaultValue",width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.defaultValue,callback:function(a){e.$set(t.row,"defaultValue",a)},expression:"scope.row.defaultValue"}})]}}])}),e.dbAccess.isSerializated?a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:e.addValue}},[e._v(e._s(e.$t("operate.add")))]),a("let-table-operation",{on:{click:function(a){return e.deleteValue(t.$index)}}},[e._v(e._s(e.$t("operate.delete")))])]}}],null,!1,3014395180)}):e._e()],1)],1)],1)],1)],1)},Pa=[],Ia=(a("caad"),a("2532"),function(){return{module_id:"",accessDbId:0,dbMethod:!0,isSerializated:!1,dbaccess_ip:[],servant:"",db_num:"1",db_prefix:"db_",table_num:"1",table_prefix:"t_",db_charset:"utf8mb4",db_host:"",db_user:"",db_pwd:"",db_port:"3306"}}),Ra=[{key:"string",value:"string"}],Aa=[{key:"int",value:"int"},{key:"long",value:"long"},{key:"string",value:"string"},{key:"byte",value:"byte"},{key:"float",value:"float"},{key:"double",value:"double"}],Ea=[{key:"varchar(64)",value:"varchar(64)"},{key:"varchar(128)",value:"varchar(128)"},{key:"varchar(180)",value:"varchar(180)"},{key:"varchar(255)",value:"varchar(255)"},{key:"varchar(1000)",value:"varchar(1000)"}],za=[{key:"int",value:"int"},{key:"bigint",value:"bigint"},{key:"varchar(128)",value:"varchar(128)"},{key:"text",value:"MEDIUMTEXT"},{key:"blob",value:"MEDIUMBLOB"},{key:"float",value:"float"},{key:"double",value:"double"}],Va=[{key:"require",value:"require"},{key:"optional",value:"optional"}],Fa={data:function(){var e=[{value:!1,text:this.$t("cache.sTypeTip1")},{value:!0,text:this.$t("cache.sTypeTip2")}],t=this.$route.params.moduleId;return{moduleId:t,accessDb:[],moduleInfo:{ModuleBase:{update:0}},dbAccess:Ia(),moduleData:[],nodeList:[],templates:[],cacheVersion:1,isMkCache:!1,multiKey:!1,cacheTypeOption:e,keyTypeOption:Ra,keyDbTypeOption:Ea,dataDbTypeOption:za,dataTypeOption:Aa,propertyOption:Va,showMKModal:!1,mkCacheStructure:{mainKey:[{fieldName:"USERID",keyType:"mkey",dataType:"string",DBType:"varchar(128)",property:"require",defaultValue:"",maxLen:"100"}],unionKey:[{fieldName:"",keyType:"ukey",dataType:"string",DBType:"varchar(128)",property:"require",defaultValue:"",maxLen:""}],value:[{fieldName:"VALUE",keyType:"value",dataType:"string",DBType:"MEDIUMBLOB",property:"require",defaultValue:"",maxLen:""}]}}},mounted:function(){var e=this;this.$ajax.getJSON("/server/api/node_list").then((function(t){e.nodeList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},methods:{isNewInstall:function(){return 0==this.moduleInfo.ModuleBase.update},isDbAccess:function(){return""!=this.dbAccess.servant&&(0==this.moduleInfo.ModuleBase.update||1==this.moduleInfo.ModuleBase.update)},isBackup:function(){return 2==this.moduleInfo.ModuleBase.update},isMirror:function(){return 3==this.moduleInfo.ModuleBase.update},submitServerConfig:function(){void 0!=this.dbAccess.dbMethod?this.$refs.detailForm.validate()&&(this.isDbAccess()&&this.isMkCache?this.showMKModal=!0:this.checkSameShmKey(this.moduleData)?this.addServerConfig():this.$tip.error(this.$t("module.shmKeyError"))):this.$tip.error("".concat(this.$t("module.dbMethod")))},loadAccessDb:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",e.$ajax.getJSON("/server/api/load_access_db").then((function(t){e.accessDb=t,t.length>0?(e.dbAccess.dbMethod=!0,e.dbAccess.accessDbId=t[0].id):e.dbAccess.dbMethod=!1})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})));case 1:case"end":return t.stop()}}),t)})))()},checkSameShmKey:function(e){return!0},addServerConfig:function(){var e=this,t=this.moduleData,a=this.dbAccess;if(this.isDbAccess()&&0==this.dbAccess.dbaccess_ip.length)this.$tip.error("".concat(this.$t("cache.dbaccessIp")));else{var r="/server/api/add_server_config",o=this.$Loading.show();this.$ajax.postJSON(r,{moduleData:t,dbAccess:a}).then((function(t){o.hide(),e.$tip.success(e.$t("common.success")),e.$router.push("/operation/module/installAndPublish/"+e.moduleId)})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},getModuleConfigInfo:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.delegateYield(regeneratorRuntime.mark((function t(){var n,l,i,c,d,u,m,p,h,f,v,g,b;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(A["ab"])();case 2:return n=t.sent,e.templates=n,l=e.$route.params.moduleId,t.next=7,Object(A["j"])({moduleId:l});case 7:return i=t.sent,e.moduleInfo=i,c=i.module_name,t.next=12,Object(A["k"])({module_name:c});case 12:for(r in d=t.sent,a=0,d)d.hasOwnProperty(r)&&a++;if(i.area=i.idc_area,u=1===i.cache_version?"KV":"MKV",i.group_name=i.module_name+u+"Group1",i.server_name=i.module_name+u+"CacheServer1-1",i.server_type=0,i.memory=50,0!=a){t.next=27;break}e.isNewInstall()&&e.moduleData.push(Object(I["a"])({},i)),(e.isBackup()||e.isNewInstall()&&i.open_backup)&&(m=Object(I["a"])(Object(I["a"])({},i),{},{server_name:i.module_name+u+"CacheServer1-2",server_type:1}),e.moduleData.push(m)),(e.isMirror()||e.isNewInstall())&&i.set_area.length>0&&i.set_area.forEach((function(t,a){var r=Object(I["a"])(Object(I["a"])({},i),{},{area:t,server_name:i.module_name+u+"CacheServer1-"+(a+3),server_type:2});e.moduleData.push(r)})),t.next=50;break;case 27:if(!e.isNewInstall()){t.next=31;break}for(o in d)for(r=0;r<d[o].length;r++)p=d[o][r],h=Object(I["a"])(Object(I["a"])({},i),{},{group_name:i.module_name+u+"Group"+o,server_name:p.server_name,server_type:p.server_type}),e.moduleData.push(h);t.next=50;break;case 31:if(!e.isBackup()){t.next=49;break}t.t0=regeneratorRuntime.keys(d);case 33:if((t.t1=t.t0()).done){t.next=47;break}o=t.t1.value,s=!1,r=0;case 37:if(!(r<d[o].length)){t.next=44;break}if(1!=d[o][r].server_type){t.next=41;break}return s=!0,t.abrupt("break",44);case 41:r++,t.next=37;break;case 44:for(r=0;r<d[o].length;r++)f=d[o][r],v=Object(I["a"])(Object(I["a"])({},i),{},{group_name:i.module_name+u+"Group"+o,server_name:f.server_name,server_type:f.server_type}),s&&1==f.server_type?e.moduleData.push(v):s||(g=Object(I["a"])(Object(I["a"])({},v),{},{server_name:v.module_name+u+"CacheServer"+o+"-2",server_type:1}),e.moduleData.push(g));t.next=33;break;case 47:t.next=50;break;case 49:if(e.isMirror())for(o in b=function(){var t=d[o][0],a=Object(I["a"])(Object(I["a"])({},i),{},{group_name:i.module_name+u+"Group"+o,server_name:t.server_name,server_type:t.server_type});i.set_area.length>0&&i.set_area.forEach((function(t,r){var s=Object(I["a"])(Object(I["a"])({},a),{},{area:t,group_name:i.module_name+u+"Group"+o,server_name:a.module_name+u+"CacheServer"+o+"-"+(r+3),server_type:2});e.moduleData.push(s)}))},d)b();case 50:e.moduleData=e.moduleData.map((function(e){return Object(I["a"])(Object(I["a"])({},e),{},{template_name:n.includes("DCache.Cache")?"DCache.Cache":"tars.default"})})),e.isMkCache=2===i.cache_version,e.multiKey=2===i.cache_version&&1===i.mkcache_struct,e.cacheVersion=i.cache_version,e.multiKey&&(e.dbAccess.isSerializated=!0),e.dbAccess.module_id=e.moduleId,e.dbAccess.db_prefix="db_"+i.module_name+"_",e.dbAccess.table_prefix="t_"+i.module_name+"_",e.dbAccess.servant=i.dbAccessServant;case 59:case"end":return t.stop()}}),t)}))(),"t0",2);case 2:t.next=7;break;case 4:t.prev=4,t.t1=t["catch"](0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t1.message||t.t1.err_msg));case 7:case"end":return t.stop()}}),t,null,[[0,4]])})))()},mapServerType:function(e){return 0===e?this.$t("module.mainServer"):1===e?this.$t("module.backServer"):this.$t("module.mirror")},addUnionKey:function(){this.mkCacheStructure.unionKey.push({fieldName:"",keyType:"ukey",dataType:"",property:"require",DBType:"",defaultValue:"",maxLen:""})},deleteUnionKey:function(e){this.mkCacheStructure.unionKey.length>1?this.mkCacheStructure.unionKey.splice(e,1):this.$tip.error(this.$t("MKCache.error"))},addValue:function(){this.mkCacheStructure.value.push({fieldName:"",keyType:"value",dataType:"",DBType:"",property:"",defaultValue:"",maxLen:""})},deleteValue:function(e){this.mkCacheStructure.value.length>1?this.mkCacheStructure.value.splice(e,1):this.$tip.error(this.$t("MKCache.error"))},submitMKCache:function(){void 0!=this.dbAccess.dbMethod?this.$refs.multiKeyForm.validate()&&(sessionStorage.setItem("mkCache",JSON.stringify(this.mkCacheStructure)),this.showMKModal=!1,document.body.classList.remove("has-modal-open"),this.addServerConfig()):this.$tip.error("".concat(this.$t("module.dbMethod")))}},created:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return sessionStorage.clear(),t.next=3,e.getModuleConfigInfo();case 3:if(!e.isDbAccess()){t.next=6;break}return t.next=6,e.loadAccessDb();case 6:case"end":return t.stop()}}),t)})))()}},Wa=Fa,Ka=Object(y["a"])(Wa,qa,Pa,!1,null,null,null),Ja=Ka.exports,Ba=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"page_operation_install_and_publish"},[a("let-form",{ref:"detailForm",attrs:{"label-position":"top"}},[a("let-form-group",{attrs:{title:e.$t("common.baseInfo"),inline:"","label-position":"top"}},[a("let-form-item",{attrs:{label:e.$t("module.moduleId"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.moduleInfo.module_id)+" ")]),a("let-form-item",{attrs:{label:e.$t("module.name"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.moduleInfo.module_name)+" ")]),a("let-form-item",{attrs:{label:e.$t("module.cacheType"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.mapCacheType(e.moduleInfo))+" ")])],1),a("let-form-group",{attrs:{title:e.$t("module.moduleInfo"),inline:"","label-position":"top"}},[a("let-form-item",{attrs:{label:e.$t("module.deployArea"),itemWidth:"240px"}},[e._v(" "+e._s(e.moduleInfo.idc_area)+" ")]),a("let-form-item",{attrs:{label:e.$t("region.setArea"),itemWidth:"240px"}},[e._v(" "+e._s(e.moduleInfo.set_area&&e.moduleInfo.set_area.join(","))+" ")]),a("let-form-item",{attrs:{label:e.$t("module.scenario"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.mapModuleType(e.moduleInfo.cache_module_type))+" ")]),a("let-form-item",{attrs:{label:e.$t("cache.perRecordAvg"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.moduleInfo.per_record_avg)+" ")]),a("let-form-item",{attrs:{label:e.$t("cache.moduleRemark"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.moduleInfo.module_remark)+" ")])],1),e.serverConf.length>0&&1!=this.moduleInfo.ModuleBase.update?a("let-form-group",{attrs:{title:e.$t("module.serverInfo"),inline:"","label-position":"top"}},[a("let-table",{ref:"table",attrs:{data:e.serverConf,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("module.name"),prop:"module_name",width:"25%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.module_name)+" ")]}}],null,!1,3619543743)}),a("let-table-column",{attrs:{title:e.$t("module.serverGroup"),prop:"group_name",width:"25%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.group_name)+" ")]}}],null,!1,3294421626)}),a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"server_name"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.server_name)+" ")]}}],null,!1,445723232)}),a("let-table-column",{attrs:{title:e.$t("service.serverIp"),prop:"server_ip"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.server_ip)+" ")]}}],null,!1,4116377982)}),a("let-table-column",{attrs:{title:e.$t("module.deployArea"),prop:"area"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.area)+" ")]}}],null,!1,4009109098)}),a("let-table-column",{attrs:{title:e.$t("deployService.form.serviceType"),prop:"server_type"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.mapServerType(t.row.server_type))+" ")]}}],null,!1,2269225375)}),a("let-table-column",{attrs:{title:e.$t("module.memorySize"),prop:"memory"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.memory)+" ")]}}],null,!1,3952335548)}),a("let-table-column",{attrs:{title:e.$t("module.shmKey"),prop:"shmKey"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.shmKey)+" ")]}}],null,!1,462509756)})],1)],1):e._e(),this.isDbAccess()?a("let-form-group",{attrs:{title:e.$t("module.dbAccessInfo"),inline:"","label-position":"top"}},[a("let-form-item",{attrs:{label:e.$t("module.servant"),itemWidth:"400px"}},[e._v(" "+e._s(e.dbAccess.servant)+" ")]),a("let-form-item",{attrs:{label:e.$t("service.isSerializated"),itemWidth:"350px"}},[e._v(" "+e._s(e.mapSerializeType(e.dbAccess.isSerializated))+" ")]),a("let-form-item",{attrs:{label:e.$t("module.dbAccessIp"),itemWidth:"400px"}},[e._v(" "+e._s(e.dbAccess.dbaccess_ip)+" ")]),a("br"),a("let-form-item",{attrs:{label:e.$t("cache.db.dbNum"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.dbAccess.db_num)+" ")]),a("let-form-item",{attrs:{label:e.$t("cache.db.DBPrefix"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.dbAccess.db_prefix)+" ")]),a("let-form-item",{attrs:{label:e.$t("cache.db.tableNum"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.dbAccess.table_num)+" ")]),a("let-form-item",{attrs:{label:e.$t("cache.db.tablePrefix"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.dbAccess.table_prefix)+" ")]),a("br"),a("let-form-item",{attrs:{label:e.$t("cache.db.dbHost"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.dbAccess.db_host)+" ")]),a("let-form-item",{attrs:{label:e.$t("cache.db.dbPort"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.dbAccess.db_port)+" ")]),a("let-form-item",{attrs:{label:e.$t("cache.db.dbUser"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.dbAccess.db_user)+" ")]),a("let-form-item",{attrs:{label:e.$t("cache.db.tableCharset"),itemWidth:"240px",required:""}},[e._v(" "+e._s(e.dbAccess.db_charset)+" ")])],1):e._e(),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.installAndPublish}},[e._v(e._s(e.$t("apply.installAndPublish"))+" ")])],1),a("let-modal",{attrs:{title:e.$t("publishLog.title"),width:"800px"},on:{"on-confirm":e.confirmPublish},model:{value:e.showModal,callback:function(t){e.showModal=t},expression:"showModal"}},[a("let-table",{ref:"ProgressTable",attrs:{data:e.releaseProgress,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"serverName",width:"30%"}}),a("let-table-column",{attrs:{title:e.$t("service.serverIp"),prop:"nodeName",width:"30%"}}),a("let-table-column",{attrs:{title:e.$t("publishLog.releaseId"),prop:"releaseId",width:"15%"}}),a("let-table-column",{attrs:{title:e.$t("publishLog.releaseProgress"),prop:"percent"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.percent))]),100!=t.row.percent?a("icon",{staticClass:"spinner-icon",attrs:{name:"spinner"}}):e._e()]}}])})],1)],1)],1)},Ga=[],Ua={data:function(){var e=this.$route.params.moduleId;return{moduleId:e,moduleInfo:{},serverConf:[],dbAccess:{servant:""},releaseProgress:[],showModal:!1,timerId:null}},methods:{isDbAccess:function(){return""!=this.dbAccess.servant&&(0==this.moduleInfo.ModuleBase.update||1==this.moduleInfo.ModuleBase.update)},getModuleFullInfo:function(){var e=this,t=this.moduleId;this.$ajax.getJSON("/server/api/get_module_full_info",{moduleId:t}).then((function(t){e.moduleInfo=t.item||{},e.serverConf=t.serverConf||[],e.dbAccess=t.dbAccess||{servant:""},e.dbAccess.servant=e.dbAccess.servant||""})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},installAndPublish:function(){var e=this,t=this.$loading.show(),a=this.moduleId,r=sessionStorage.getItem("mkCache");this.$ajax.getJSON("/server/api/module_install_and_publish",{moduleId:a,mkCache:r}).then((function(a){t.hide();var r=a.releaseRsp.releaseId;e.getTaskRepeat({releaseId:r}),e.$tip.success(a.releaseRsp.errMsg)})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},getTaskRepeat:function(e){var t=this,a=e.releaseId;clearTimeout(this.timerId),this.showModal=!0;var r=function e(){t.$ajax.getJSON("/server/api/get_module_release_progress",{releaseId:a}).then((function(a){var r=!0;a.progress.forEach((function(e){100!==parseInt(e.percent,10)&&(r=!1)})),r?clearTimeout(t.timerId):t.timerId=setTimeout(e,1e3),t.releaseProgress=a.progress})).catch((function(e){clearTimeout(t.timerId),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))};r()},getReleaseProgress:function(e){var t=this;this.$ajax.getJSON("/server/api/get_module_release_progress",{releaseId:e}).then((function(e){t.showModal=!0,t.releaseProgress=e.progress})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},mapSerializeType:function(e){return e?this.$t("cache.sTypeTip2"):this.$t("cache.sTypeTip1")},mapServerType:function(e){return 0===e?this.$t("module.mainServer"):1===e?this.$t("module.backServer"):this.$t("module.mirror")},mapModuleType:function(e){return 1===e?this.$t("cache.title"):this.$t("cache.cachePersistent")},mapCacheType:function(e){if(!e)return null;if(1===e.cache_version)return"key-value(KVCache)";switch(e.mkcache_struct){case 1:return"k-k-row(MKVCache)";case 2:return"Set(MKVCache)";case 3:return"List(MKVCache)";case 4:return"Zset(MKVCache)";default:return null}},confirmPublish:function(){this.showModal=!1,document.body.classList.remove("has-modal-open"),this.$router.push("/server"),window.dcacheIndex&&window.dcacheIndex.getTreeData&&window.dcacheIndex.getTreeData()}},beforeRouteLeave:function(e,t,a){clearTimeout(this.timerId),a()},created:function(){this.getModuleFullInfo()}},Ha=Ua,Za=(a("bb06"),Object(y["a"])(Ha,Ba,Ga,!1,null,null,null)),Ya=Za.exports,Qa=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"page_operation_region"},[a("div",[a("let-button",{attrs:{theme:"primary",size:"mini"},on:{click:e.addRegion}},[e._v(e._s(e.$t("region.add")))])],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata"),title:e.$t("region.list")}},[a("let-table-column",{attrs:{title:e.$t("common.serial"),width:"25%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.$index+1))]}}])}),a("let-table-column",{attrs:{title:e.$t("region.title"),prop:"region",width:"25%"}}),a("let-table-column",{attrs:{title:e.$t("region.label"),prop:"label"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editRegion(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.$t(e.title),width:"600px"},on:{"on-confirm":e.saveItem},model:{value:e.showModel,callback:function(t){e.showModel=t},expression:"showModel"}},[a("let-form",{ref:"detailForm"},[a("let-form-item",{attrs:{label:e.$t("region.title"),required:""}},[a("let-input",{attrs:{size:"small",required:"",placeholder:e.$t("region.regionTips")},model:{value:e.model.region,callback:function(t){e.$set(e.model,"region",t)},expression:"model.region"}})],1),a("let-form-item",{attrs:{label:e.$t("region.label"),required:""}},[a("let-input",{attrs:{size:"small",required:"",placeholder:e.$t("region.labelTips")},model:{value:e.model.label,callback:function(t){e.$set(e.model,"label",t)},expression:"model.label"}})],1)],1)],1)],1)},Xa=[],er={data:function(){return{title:"region.add",items:[],showModel:!1,model:{}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this;this.$ajax.getJSON("/server/api/get_region_list").then((function(t){e.items=t||[]})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},addRegion:function(){this.showModel=!0,this.title="region.add",this.model={region:"",label:""}},editRegion:function(e){this.showModel=!0,this.showModel=!0,this.title="region.modify",this.model=e},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.model,a=t.id?"/server/api/update_region":"/server/api/add_region",r=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this,a=e.id;this.$ajax.getJSON("/server/api/delete_region",{id:a}).then((function(e){t.$tip.success(t.$t("common.success")),t.fetchData()})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.showModel=!1,this.model={}}}},tr=er,ar=Object(y["a"])(tr,Qa,Xa,!1,null,null,null),rr=ar.exports,or=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation"},[a("let-tabs",{attrs:{activekey:e.$route.matched[1]?e.$route.matched[1].path:"/operation/apply"},on:{click:e.onTabClick}},[a("let-tab-pane",{attrs:{tab:e.$t("releasePackage.proxyList"),tabkey:"/releasePackage/proxyList"}}),a("let-tab-pane",{attrs:{tab:e.$t("releasePackage.accessList"),tabkey:"/releasePackage/accessList"}}),a("let-tab-pane",{attrs:{tab:e.$t("releasePackage.routerList"),tabkey:"/releasePackage/routerList"}}),a("let-tab-pane",{attrs:{tab:e.$t("releasePackage.cacheList"),tabkey:"/releasePackage/cacheList"}})],1),a("router-view",{staticClass:"page_operation_children"})],1)},sr=[],nr={methods:{onTabClick:function(e){this.$router.replace(e)}}},lr=nr,ir=(a("a4f7"),Object(y["a"])(lr,or,sr,!1,null,null,null)),cr=ir.exports,dr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"container"},[a("div",[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.uploadModal.show=!e.uploadModal.show}}},[e._v(" "+e._s(e.$t("releasePackage.uploadPackage"))+" ")])],1),a("let-table",{attrs:{data:e.packages.rows,title:e.$t("serverList.title.serverList"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"ID",prop:"id"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{attrs:{title:e.$t("releasePackage.default")}},[1==t.row.default_version?a("i",{staticClass:"icon iconfont",staticStyle:{color:"green"}},[e._v("畋�")]):e._e()]),e._v(" "+e._s(t.row.id)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("releasePackage.moduleName"),prop:"server"}}),a("let-table-column",{attrs:{title:e.$t("serverList.servant.comment"),prop:"comment"}}),a("let-table-column",{attrs:{title:e.$t("releasePackage.uploadTime"),prop:"posttime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.setDefault(t.row)}}},[e._v(e._s(e.$t("operate.default")))]),a("let-table-operation",{on:{click:function(a){return e.deletePackage(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.$t("pub.dlg.upload"),width:"880px",footShow:!1},on:{"on-cancel":e.closeUploadModal},model:{value:e.uploadModal.show,callback:function(t){e.$set(e.uploadModal,"show",t)},expression:"uploadModal.show"}},[e.uploadModal.model?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadPatchPackage(t)}}},[a("let-form-item",{attrs:{label:e.$t("releasePackage.moduleName")}},[e._v(" "+e._s(e.uploadModal.model.application)+"."+e._s(e.uploadModal.model.module_name)+" ")]),a("let-form-item",{attrs:{label:e.$t("pub.dlg.releasePkg"),itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue")},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.submit"))+" ")]),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.uploadModal.model.comment,callback:function(t){e.$set(e.uploadModal.model,"comment",t)},expression:"uploadModal.model.comment"}})],1),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1)],1)},ur=[],mr=(a("3ab4"),{data:function(){return{uploadModal:{show:!1,model:{application:"DCache",module_name:"ProxyServer",file:{},comment:""}},packages:{count:0,rows:[]}}},methods:{closeUploadModal:function(){this.uploadModal.show=!1},uploadFile:function(e){this.uploadModal.model.file=e},uploadPatchPackage:function(){var e=this;if(this.$refs.uploadForm.validate()){var t=this.$Loading.show(),a=new FormData;a.append("application",this.uploadModal.model.application),a.append("module_name",this.uploadModal.model.module_name),a.append("task_id",(new Date).getTime()),a.append("suse",this.uploadModal.model.file),a.append("comment",this.uploadModal.model.comment),this.$ajax.postForm("/server/api/upload_patch_package",a).then((function(){t.hide(),e.closeUploadModal(),e.getPatchPackage()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))}},getPatchPackage:function(){var e=this;this.$ajax.getJSON("/server/api/server_patch_list",{application:"DCache",module_name:"ProxyServer"}).then((function(t){e.packages=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},deletePackage:function(e){var t=this;this.$confirm(this.$t("releasePackage.confirmDeleteTip"),this.$t("common.alert")).then((function(){t.$ajax.postJSON("/server/api/delete_patch_package",{id:e}).then((function(e){t.getPatchPackage()}))})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},setDefault:function(e){var t=this,a=e.id,r=e.package_type;this.$ajax.postJSON("/server/api/set_patch_package_default",{id:a,package_type:r,application:this.uploadModal.model.application,module_name:this.uploadModal.model.module_name}).then((function(e){t.$tip.success("".concat(t.$t("common.success"))),t.getPatchPackage()})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}},created:function(){this.getPatchPackage()}}),pr=mr,hr=Object(y["a"])(pr,dr,ur,!1,null,null,null),fr=hr.exports,vr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"container"},[a("div",[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.uploadModal.show=!e.uploadModal.show}}},[e._v(" "+e._s(e.$t("releasePackage.uploadPackage"))+" ")])],1),a("let-table",{attrs:{data:e.packages.rows,title:e.$t("serverList.title.serverList"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"ID",prop:"id"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{color:"green",display:"inline-block"},attrs:{title:e.$t("releasePackage.default")}},[1==t.row.default_version?a("i",{staticClass:"icon iconfont"},[e._v("畋�")]):e._e()]),e._v(" "+e._s(t.row.id)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("releasePackage.moduleName"),prop:"server"}}),a("let-table-column",{attrs:{title:e.$t("serverList.servant.comment"),prop:"comment"}}),a("let-table-column",{attrs:{title:e.$t("releasePackage.uploadTime"),prop:"posttime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.setDefault(t.row)}}},[e._v(e._s(e.$t("operate.default")))]),a("let-table-operation",{on:{click:function(a){return e.deletePackage(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.$t("pub.dlg.upload"),width:"880px",footShow:!1},on:{"on-cancel":e.closeUploadModal},model:{value:e.uploadModal.show,callback:function(t){e.$set(e.uploadModal,"show",t)},expression:"uploadModal.show"}},[e.uploadModal.model?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadPatchPackage(t)}}},[a("let-form-item",{attrs:{label:e.$t("releasePackage.moduleName")}},[e._v(" "+e._s(e.uploadModal.model.application)+"."+e._s(e.uploadModal.model.module_name)+" ")]),a("let-form-item",{attrs:{label:e.$t("pub.dlg.releasePkg"),itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue")},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.submit"))+" ")]),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.uploadModal.model.comment,callback:function(t){e.$set(e.uploadModal.model,"comment",t)},expression:"uploadModal.model.comment"}})],1),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1)],1)},gr=[],br={data:function(){return{uploadModal:{show:!1,model:{application:"DCache",module_name:"CombinDbAccessServer",file:{},comment:""}},packages:{count:0,rows:[]}}},methods:{closeUploadModal:function(){this.uploadModal.show=!1},uploadFile:function(e){this.uploadModal.model.file=e},uploadPatchPackage:function(){var e=this;if(this.$refs.uploadForm.validate()){var t=this.$Loading.show(),a=new FormData;a.append("application",this.uploadModal.model.application),a.append("module_name",this.uploadModal.model.module_name),a.append("task_id",(new Date).getTime()),a.append("suse",this.uploadModal.model.file),a.append("comment",this.uploadModal.model.comment),this.$ajax.postForm("/server/api/upload_patch_package",a).then((function(){t.hide(),e.closeUploadModal(),e.getPatchPackage()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))}},getPatchPackage:function(){var e=this;this.$ajax.getJSON("/server/api/server_patch_list",{application:"DCache",module_name:"CombinDbAccessServer"}).then((function(t){e.packages=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},deletePackage:function(e){var t=this;this.$confirm(this.$t("releasePackage.confirmDeleteTip"),this.$t("common.alert")).then((function(){t.$ajax.postJSON("/server/api/delete_patch_package",{id:e}).then((function(e){t.getPatchPackage()}))})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},setDefault:function(e){var t=this,a=e.id,r=e.package_type;this.$ajax.postJSON("/server/api/set_patch_package_default",{id:a,package_type:r,application:this.uploadModal.model.application,module_name:this.uploadModal.model.module_name}).then((function(e){t.getPatchPackage()})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}},created:function(){this.getPatchPackage()}},_r=br,$r=Object(y["a"])(_r,vr,gr,!1,null,null,null),kr=$r.exports,yr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"container"},[a("div",[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.uploadModal.show=!e.uploadModal.show}}},[e._v(" "+e._s(e.$t("releasePackage.uploadPackage"))+" ")])],1),a("let-table",{attrs:{data:e.packages.rows,title:e.$t("serverList.title.serverList"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"ID",prop:"id"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{color:"green",display:"inline-block"},attrs:{title:e.$t("releasePackage.default")}},[1==t.row.default_version?a("i",{staticClass:"icon iconfont"},[e._v("畋�")]):e._e()]),e._v(" "+e._s(t.row.id)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("releasePackage.moduleName"),prop:"server"}}),a("let-table-column",{attrs:{title:e.$t("serverList.servant.comment"),prop:"comment"}}),a("let-table-column",{attrs:{title:e.$t("releasePackage.uploadTime"),prop:"posttime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.setDefault(t.row)}}},[e._v(e._s(e.$t("operate.default")))]),a("let-table-operation",{on:{click:function(a){return e.deletePackage(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.$t("pub.dlg.upload"),width:"880px",footShow:!1},on:{"on-cancel":e.closeUploadModal},model:{value:e.uploadModal.show,callback:function(t){e.$set(e.uploadModal,"show",t)},expression:"uploadModal.show"}},[e.uploadModal.model?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadPatchPackage(t)}}},[a("let-form-item",{attrs:{label:e.$t("releasePackage.moduleName")}},[e._v(" "+e._s(e.uploadModal.model.application)+"."+e._s(e.uploadModal.model.module_name)+" ")]),a("let-form-item",{attrs:{label:e.$t("pub.dlg.releasePkg"),itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue")},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.submit"))+" ")]),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.uploadModal.model.comment,callback:function(t){e.$set(e.uploadModal.model,"comment",t)},expression:"uploadModal.model.comment"}})],1),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1)],1)},wr=[],xr={data:function(){return{uploadModal:{show:!1,model:{application:"DCache",module_name:"RouterServer",file:{},comment:""}},packages:{count:0,rows:[]}}},methods:{closeUploadModal:function(){this.uploadModal.show=!1},uploadFile:function(e){this.uploadModal.model.file=e},uploadPatchPackage:function(){var e=this;if(this.$refs.uploadForm.validate()){var t=this.$Loading.show(),a=new FormData;a.append("application",this.uploadModal.model.application),a.append("module_name",this.uploadModal.model.module_name),a.append("task_id",(new Date).getTime()),a.append("suse",this.uploadModal.model.file),a.append("comment",this.uploadModal.model.comment),this.$ajax.postForm("/server/api/upload_patch_package",a).then((function(){t.hide(),e.closeUploadModal(),e.getPatchPackage()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))}},getPatchPackage:function(){var e=this;this.$ajax.getJSON("/server/api/server_patch_list",{application:"DCache",module_name:"RouterServer"}).then((function(t){e.packages=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},deletePackage:function(e){var t=this;this.$confirm(this.$t("releasePackage.confirmDeleteTip"),this.$t("common.alert")).then((function(){t.$ajax.postJSON("/server/api/delete_patch_package",{id:e}).then((function(e){t.getPatchPackage()}))})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},setDefault:function(e){var t=this,a=e.id,r=e.package_type;this.$ajax.postJSON("/server/api/set_patch_package_default",{id:a,package_type:r,application:this.uploadModal.model.application,module_name:this.uploadModal.model.module_name}).then((function(e){t.$tip.success("".concat(t.$t("common.success"))),t.getPatchPackage()})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}},created:function(){this.getPatchPackage()}},Mr=xr,Sr=Object(y["a"])(Mr,yr,wr,!1,null,null,null),Cr=Sr.exports,Lr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"container"},[a("div",[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.uploadModal.show=!e.uploadModal.show}}},[e._v(" "+e._s(e.$t("releasePackage.uploadPackage"))+" ")])],1),a("let-table",{attrs:{data:e.packages.rows,title:e.$t("serverList.title.serverList"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"ID",prop:"id"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{color:"green",display:"inline-block"},attrs:{title:e.$t("releasePackage.default")}},[1==t.row.default_version?a("i",{staticClass:"icon iconfont"},[e._v("畋�")]):e._e()]),e._v(" "+e._s(t.row.id)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("releasePackage.moduleName"),prop:"server"}}),a("let-table-column",{attrs:{title:e.$t("releasePackage.cacheType")},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.package_type?a("span",[e._v("KVCache")]):2==t.row.package_type?a("span",[e._v("MKVCache")]):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("serverList.servant.comment"),prop:"comment"}}),a("let-table-column",{attrs:{title:e.$t("releasePackage.uploadTime"),prop:"posttime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.setDefault(t.row)}}},[e._v(e._s(e.$t("operate.default")))]),a("let-table-operation",{on:{click:function(a){return e.deletePackage(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.$t("pub.dlg.upload"),width:"880px",footShow:!1},on:{"on-cancel":e.closeUploadModal},model:{value:e.uploadModal.show,callback:function(t){e.$set(e.uploadModal,"show",t)},expression:"uploadModal.show"}},[e.uploadModal.model?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadPatchPackage(t)}}},[a("let-form-item",{attrs:{label:e.$t("releasePackage.moduleName")}},[e._v(" "+e._s(e.uploadModal.model.application)+"."+e._s(e.uploadModal.model.module_name)+" ")]),a("let-form-item",{attrs:{label:e.$t("releasePackage.cacheType")}},[a("let-select",{attrs:{size:"small"},model:{value:e.uploadModal.model.package_type,callback:function(t){e.$set(e.uploadModal.model,"package_type",t)},expression:"uploadModal.model.package_type"}},[a("let-option",{attrs:{value:"1"}},[e._v("KVCache")]),a("let-option",{attrs:{value:"2"}},[e._v("MKVCache")])],1)],1),a("let-form-item",{attrs:{label:e.$t("pub.dlg.releasePkg"),itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue")},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.submit"))+" ")]),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.uploadModal.model.comment,callback:function(t){e.$set(e.uploadModal.model,"comment",t)},expression:"uploadModal.model.comment"}})],1),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1)],1)},Nr=[],Or={data:function(){return{uploadModal:{show:!1,model:{application:"DCache",module_name:"DCacheServerGroup",package_type:"1",file:{},comment:""}},packages:{count:0,rows:[]}}},methods:{closeUploadModal:function(){this.uploadModal.show=!1},uploadFile:function(e){this.uploadModal.model.file=e},uploadPatchPackage:function(){var e=this;if(this.$refs.uploadForm.validate()){var t=this.$Loading.show(),a=new FormData;a.append("application",this.uploadModal.model.application),a.append("module_name",this.uploadModal.model.module_name),a.append("task_id",(new Date).getTime()),a.append("package_type",this.uploadModal.model.package_type),a.append("suse",this.uploadModal.model.file),a.append("comment",this.uploadModal.model.comment),this.$ajax.postForm("/server/api/upload_patch_package",a).then((function(){t.hide(),e.closeUploadModal(),e.getPatchPackage()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))}},getPatchPackage:function(){var e=this;this.$ajax.getJSON("/server/api/server_patch_list",{application:"DCache",module_name:"DCacheServerGroup"}).then((function(t){e.packages=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},deletePackage:function(e){var t=this;this.$confirm(this.$t("releasePackage.confirmDeleteTip"),this.$t("common.alert")).then((function(){t.$ajax.postJSON("/server/api/delete_patch_package",{id:e}).then((function(e){t.getPatchPackage()}))})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},setDefault:function(e){var t=this,a=e.id,r=e.package_type;this.$ajax.postJSON("/server/api/set_patch_package_default",{id:a,package_type:r,application:this.uploadModal.model.application,module_name:this.uploadModal.model.module_name}).then((function(e){t.$tip.success("".concat(t.$t("common.success"))),t.getPatchPackage()})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}},created:function(){this.getPatchPackage()}},Dr=Or,Tr=Object(y["a"])(Dr,Lr,Nr,!1,null,null,null),jr=Tr.exports,qr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"page_operation"},[a("div",[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addConfig}},[e._v(e._s(e.$t("cache.config.addConfig")))])],1),a("let-table",{attrs:{data:e.list,title:e.$t("cache.config.tableTitle"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"ID",prop:"id"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.remark"),prop:"remark"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.path"),prop:"path"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.item"),prop:"item"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.reload"),prop:"reload"}}),a("let-table-column",{attrs:{title:e.$t("cache.config.period"),prop:"period"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates")},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("let-table-operation",{on:{click:function(t){return e.editConfig(r)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{staticClass:"danger",on:{click:function(t){return e.deleteConfig(r)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{footShow:!1,closeOnClickBackdrop:!0},model:{value:e.addConfigVisible,callback:function(t){e.addConfigVisible=t},expression:"addConfigVisible"}},[e.addConfigVisible?a("add-config",{on:{"call-back":e.getConfig}}):e._e()],1),a("let-modal",{attrs:{footShow:!1,closeOnClickBackdrop:!0},model:{value:e.editConfigVisible,callback:function(t){e.editConfigVisible=t},expression:"editConfigVisible"}},[e.editConfigVisible?a("edit-config",e._b({on:{"call-back":e.getConfig}},"edit-config",e.editConfigObj,!1)):e._e()],1)],1)},Pr=[],Ir=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",[a("let-form",{ref:"addConfigForm",attrs:{type:"medium",title:e.$t("cache.config.addConfig"),columns:2}},[a("let-form-item",{attrs:{label:e.$t("cache.config.item"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:e.config.item,callback:function(t){e.$set(e.config,"item",t)},expression:"config.item"}})],1),a("let-form-item",{attrs:{label:e.$t("cache.config.path"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:e.config.path,callback:function(t){e.$set(e.config,"path",t)},expression:"config.path"}})],1),a("let-form-item",{attrs:{label:e.$t("cache.config.reload"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:e.config.reload,callback:function(t){e.$set(e.config,"reload",t)},expression:"config.reload"}})],1),a("let-form-item",{attrs:{label:e.$t("cache.config.period"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:e.config.period,callback:function(t){e.$set(e.config,"period",t)},expression:"config.period"}})],1),a("let-form-item",{attrs:{label:e.$t("cache.config.remark"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:e.config.remark,callback:function(t){e.$set(e.config,"remark",t)},expression:"config.remark"}})],1),a("br"),a("let-form-item",{attrs:{label:" "}},[a("let-button",{attrs:{theme:"primary"},on:{click:e.submit}},[e._v(e._s(e.$t("cache.add")))])],1)],1)],1)},Rr=[],Ar={data:function(){return{config:{item:"",path:"",period:"",reload:"",remark:""}}},methods:{submit:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.$refs.addConfigForm.validate()){t.next=13;break}return t.prev=1,t.next=4,e.$ajax.postJSON("/server/api/cache/addConfig",e.config);case 4:e.$tip.success("".concat(e.$t("cache.config.addSuccess"))),Object.assign(e.config,{item:""}),e.$emit("call-back"),t.next=13;break;case 9:t.prev=9,t.t0=t["catch"](1),console.error(t.t0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 13:case"end":return t.stop()}}),t,null,[[1,9]])})))()}}},Er=Ar,zr=Object(y["a"])(Er,Ir,Rr,!1,null,null,null),Vr=zr.exports,Fr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{},[a("let-form",{ref:"editConfigForm",attrs:{type:"medium",title:e.$t("cache.config.editConfig"),columns:2}},[a("let-form-item",{attrs:{label:e.$t("cache.config.reload"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:e.config.reload,callback:function(t){e.$set(e.config,"reload",t)},expression:"config.reload"}})],1),a("let-form-item",{attrs:{label:e.$t("cache.config.period"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:e.config.period,callback:function(t){e.$set(e.config,"period",t)},expression:"config.period"}})],1),a("let-form-item",{attrs:{label:e.$t("cache.config.remark"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:e.config.remark,callback:function(t){e.$set(e.config,"remark",t)},expression:"config.remark"}})],1),a("br"),a("let-form-item",{attrs:{label:" "}},[a("let-button",{attrs:{theme:"primary"},on:{click:e.submit}},[e._v(e._s(e.$t("cache.modification")))])],1)],1)],1)},Wr=[],Kr={props:{id:{type:String,required:!0},item:{type:String,required:!0},path:{type:String,required:!0},period:{type:String,required:!0},reload:{type:String,required:!0},remark:{type:String,required:!0}},data:function(){return{config:{id:this.id,item:this.item,path:this.path,period:this.period,reload:this.reload,remark:this.remark}}},methods:{submit:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.$refs.editConfigForm.validate()){t.next=12;break}return t.prev=1,t.next=4,e.$ajax.postJSON("/server/api/cache/editConfig",e.config);case 4:e.$tip.success("".concat(e.$t("cache.config.addSuccess"))),e.$emit("call-back"),t.next=12;break;case 8:t.prev=8,t.t0=t["catch"](1),console.error(t.t0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 12:case"end":return t.stop()}}),t,null,[[1,8]])})))()}}},Jr=Kr,Br=Object(y["a"])(Jr,Fr,Wr,!1,null,null,null),Gr=Br.exports,Ur={components:{AddConfig:Vr,EditConfig:Gr},data:function(){return{list:[],addConfigVisible:!1,editConfigVisible:!1,editConfigObj:null}},methods:{addConfig:function(){this.addConfigVisible=!0},editConfig:function(e){this.editConfigVisible=!0,this.editConfigObj=e},deleteConfig:function(e){var t=this,a=e.id;this.$confirm(this.$t("cache.config.deleteConfig"),this.$t("common.alert")).then(Object(R["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$ajax.getJSON("/server/api/cache/deleteConfig",{id:a});case 3:return e.sent,e.next=6,t.getConfig();case 6:e.next=12;break;case 8:e.prev=8,e.t0=e["catch"](0),console.error(e.t0),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.t0.message||e.t0.err_msg));case 12:case"end":return e.stop()}}),e,null,[[0,8]])}))))},getConfig:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$ajax.getJSON("/server/api/cache/getConfig");case 3:a=t.sent,e.list=a,t.next=11;break;case 7:t.prev=7,t.t0=t["catch"](0),console.error(t.t0),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 11:case"end":return t.stop()}}),t,null,[[0,7]])})))()}},created:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.getConfig();case 1:case"end":return t.stop()}}),t)})))()}},Hr=Ur,Zr=(a("a9dd"),Object(y["a"])(Hr,qr,Pr,!1,null,null,null)),Yr=Zr.exports,Qr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"operation-manage"},[a("let-tabs",{attrs:{activekey:e.getTabKey()},on:{click:e.onTabClick}},[a("let-tab-pane",{attrs:{tab:e.$t("dcache.operationManage.expand"),tabkey:"/operationManage/expand"}}),a("let-tab-pane",{attrs:{tab:e.$t("dcache.operationManage.shrinkage"),tabkey:"/operationManage/shrinkage"}}),a("let-tab-pane",{attrs:{tab:e.$t("dcache.operationManage.migration"),tabkey:"/operationManage/migration"}}),a("let-tab-pane",{attrs:{tab:e.$t("dcache.operationManage.mainBackup"),tabkey:"/operationManage/mainBackup"}}),a("let-tab-pane",{attrs:{tab:e.$t("dcache.operationManage.router"),tabkey:"/operationManage/router"}})],1),a("router-view",{staticClass:"operation-manage-children"})],1)},Xr=[],eo={methods:{onTabClick:function(e){this.$route.path!=e&&this.$router.replace(e)},getTabKey:function(){var e=this.$route.path,t=e.indexOf("/",e.indexOf("/",e.indexOf("/")+1)+1),a=e;return t>0&&(a=e.substr(0,t)),a}}},to=eo,ao=(a("e8b0"),Object(y["a"])(to,Qr,Xr,!1,null,null,null)),ro=ao.exports,oo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("let-table",{ref:"pageTable",attrs:{data:e.showList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.appName"),prop:"appName"}}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.moduleName"),prop:"moduleName"}}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.srcGroupName"),prop:"srcGroupName"}}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.dstGroupName"),prop:"dstGroupName"}}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.status"),prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(e.$t(a.statusText))+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.beginTime"),prop:"beginTime"}}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.progress"),prop:"progress"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.progressText)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),prop:"appName",width:"120px"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[3===r.status?a("let-table-operation",{on:{click:function(t){return e.ensureStop(r)}}},[e._v(e._s(e.$t("operate.stop")))]):e._e(),3!==r.status?a("let-table-operation",{on:{click:function(t){return e.ensureDelete(r)}}},[e._v(e._s(e.$t("operate.delete")))]):e._e(),5===r.status?a("let-table-operation",{on:{click:function(t){return e.restartDask(r)}}},[e._v(e._s(e.$t("operate.retry")))]):e._e()]}}])}),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.total,page:e.page},on:{change:e.changePage},slot:"pagination"})],1)],1)},so=[],no={data:function(){return{list:[],total:0,page:1}},computed:{showList:function(){var e=this.page,t=this.list;return t.slice(10*(e-1),10*e)},type:function(){var e={expand:"1",shrinkage:"2",migration:"0"};return e[this.$route.params.type]||"1"}},methods:{getRouterChange:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(A["n"])({type:e.type});case 3:a=t.sent,r=a.totalNum,o=a.transferRecord,e.list=o.map((function(e){return e.statusText="dcache.operationManage.statusText."+e.status,e.progressText=e.progress+"%",e})),e.total=Math.ceil(r/10),t.next=14;break;case 10:t.prev=10,t.t0=t["catch"](0),console.error(t.t0),e.$tip.error(t.t0.message);case 14:case"end":return t.stop()}}),t,null,[[0,10]])})))()},changePage:function(e){this.page=e},ensureStop:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r,o,s,n,l;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,t.$confirm(t.$t("dcache.operationManage.ensureStop"));case 3:return r=e.appName,o=e.moduleName,s=e.type,n=e.srcGroupName,l=e.dstGroupName,a.next=6,Object(A["X"])({appName:r,moduleName:o,type:s,srcGroupName:n,dstGroupName:l});case 6:t.getRouterChange(),a.next=13;break;case 9:a.prev=9,a.t0=a["catch"](0),console.error(a.t0),t.$tip.error(a.t0.message);case 13:case"end":return a.stop()}}),a,null,[[0,9]])})))()},ensureDelete:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r,o,s,n,l;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,t.$confirm(t.$t("dcache.operationManage.ensureDelete"));case 3:return r=e.appName,o=e.moduleName,s=e.type,n=e.srcGroupName,l=e.dstGroupName,a.next=6,Object(A["c"])({appName:r,moduleName:o,type:s,srcGroupName:n,dstGroupName:l});case 6:t.getRouterChange(),a.next=13;break;case 9:a.prev=9,a.t0=a["catch"](0),console.error(a.t0),t.$tip.error(a.t0.message);case 13:case"end":return a.stop()}}),a,null,[[0,9]])})))()},restartDask:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r,o,s,n,l;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,t.$confirm(t.$t("dcache.operationManage.ensureRestart"));case 3:return r=e.appName,o=e.moduleName,s=e.type,n=e.srcGroupName,l=e.dstGroupName,a.next=6,Object(A["w"])({appName:r,moduleName:o,type:s,srcGroupName:n,dstGroupName:l});case 6:t.getRouterChange(),a.next=13;break;case 9:a.prev=9,a.t0=a["catch"](0),console.error(a.t0),t.$tip.error(a.t0.message);case 13:case"end":return a.stop()}}),a,null,[[0,9]])})))()}},beforeRouteUpdate:function(e,t,a){a(),this.getRouterChange()},created:function(){this.getRouterChange()}},lo=no,io=Object(y["a"])(lo,oo,so,!1,null,null,null),co=io.exports,uo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("let-table",{ref:"pageTable",attrs:{data:e.showList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.appName"),prop:"appName"}}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.moduleName"),prop:"moduleName"}}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.groupName"),prop:"groupName"}}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.switchTime"),prop:"switchTime"}}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.modifyTime"),prop:"modifyTime"}}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.switchType"),prop:"switchType"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row.switchType;return[a("span",{style:{color:e.color[r]}},[e._v(e._s(e.$t("dcache."+e.switchTypeText[r])))])]}}])}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.switchResult"),prop:"switchResult"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row.switchResult;return[a("span",{style:{color:e.color[r]}},[e._v(e._s(e.$t("dcache."+e.switchResultText[r])))])]}}])}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.groupStatus"),prop:"groupStatus"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row.groupStatus;return[a("span",{style:{color:e.color[r]}},[e._v(e._s(e.$t("dcache."+e.groupStatusText[r])))])]}}])}),a("let-table-column",{attrs:{title:e.$t("dcache.operationManage.switchMethod"),prop:"switchProperty"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row.switchProperty;return[a("span",[e._v(e._s(e.$t("dcache."+e.switchPropertyText[r])))])]}}])}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),prop:"appName",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("let-table-operation",{attrs:{title:e.$t("dcache.areset"),disabled:!(2===r.switchType&&2===r.groupStatus)},on:{click:function(t){return e.recoverMirrorStatus(r)}}},[e._v(e._s(e.$t("dcache.oreset")))])]}}])}),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.total,page:e.page},on:{change:e.changePage},slot:"pagination"})],1)],1)},mo=[],po={data:function(){return{list:[],total:0,page:1,switchTypeText:["switch","mirrorSwitch","mirrorOffSwitch","readFail","switchMirrorAsMaster"],switchResultText:["switching","switchSuccess","notSwitch","switchFailure"],groupStatusText:["rw","ro","imageUnavailable"],switchPropertyText:{auto:"auto",manual:"manual"},color:["#00AA90","#6accab","#9096a3","#f56c77"]}},computed:{showList:function(){var e=this.page,t=this.list;return t.slice(10*(e-1),10*e)}},methods:{getSwitchInfo:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(A["p"])({});case 3:a=t.sent,r=a.totalNum,o=a.switchRecord,e.list=o.map((function(e){return e})),e.total=Math.ceil(r/10),t.next=14;break;case 10:t.prev=10,t.t0=t["catch"](0),console.error(t.t0),e.$tip.error(t.t0.message);case 14:case"end":return t.stop()}}),t,null,[[0,10]])})))()},changePage:function(e){this.page=e},switchServer:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r,o,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,r=e.appName,o=e.moduleName,s=e.groupName,a.next=4,Object(A["Z"])({appName:r,moduleName:o,groupName:s});case 4:t.getSwitchInfo(),a.next=11;break;case 7:a.prev=7,a.t0=a["catch"](0),console.error(a.t0),t.$tip.error(a.t0.message);case 11:case"end":return a.stop()}}),a,null,[[0,7]])})))()},recoverMirrorStatus:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r,o,s,n,l,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(2!==e.switchType){a.next=14;break}if(a.prev=1,r=e.appName,o=e.moduleName,s=e.groupName,n=e.mirrorIdc,l=e.dbFlag,i=e.enableErase,n){a.next=5;break}throw new Error(t.$t("dcache.mirrorEmpty"));case 5:return a.next=7,Object(A["u"])({appName:r,moduleName:o,groupName:s,mirrorIdc:n,dbFlag:l,enableErase:i});case 7:t.getSwitchInfo(),a.next=14;break;case 10:a.prev=10,a.t0=a["catch"](1),console.error(a.t0),t.$tip.error(a.t0.message);case 14:case"end":return a.stop()}}),a,null,[[1,10]])})))()}},created:function(){this.getSwitchInfo()}},ho=po,fo=Object(y["a"])(ho,uo,mo,!1,null,null,null),vo=fo.exports,go=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"page_router"},[r("div",{staticClass:"left-view"},[r("div",{staticClass:"tree_wrap"},[e.treeData&&e.treeData.length?r("let-tree",{staticClass:"left-tree",attrs:{data:e.treeData,activeKey:e.getTreeKey()},on:{"on-select":e.selectTree}}):e._e()],1)]),r("div",{staticClass:"right-view"},[e.$route.params.treeid?r("router-view",{staticClass:"router-children"}):r("div",{staticClass:"empty",staticStyle:{width:"300px"}},[r("img",{staticClass:"package",attrs:{src:a("4824")}}),r("p",{staticClass:"notice",domProps:{innerHTML:e._s(e.$t("index.rightView.tips"))}})])],1)])},bo=[],_o={name:"router",data:function(){return{menu:[{title:this.$t("routerManage.routerModule"),nodeKey:"module"},{title:this.$t("routerManage.routerRecord"),nodeKey:"record"},{title:this.$t("routerManage.routerGroup"),nodeKey:"group"},{title:this.$t("routerManage.routerServer"),nodeKey:"server"},{title:this.$t("routerManage.routerTransfer"),nodeKey:"transfer"}],treeData:[]}},mounted:function(){this.loadData()},methods:{loadData:function(){this.getTree()},selectTree:function(e,t){var a=this,r=!1,o=e.split(".")[0]||"",s=e.split(".")[1]||"";if(this.menu.forEach((function(e){e.nodeKey===s&&(r=!0)})),r){var n=this.$route.params.treeid,l=this.$route.path,i=l.substr(l.lastIndexOf("/")+1,l.length);n&&n===o?i!==s&&this.$router.push(s):n?this.$router.push({params:{treeid:o}},(function(){i!==s&&a.$router.push(s)})):this.$router.replace("router/".concat(o,"/").concat(s))}},getTreeKey:function(){var e=this.$route.params.treeid,t=this.$route.path,a=t.substr(t.lastIndexOf("/")+1,t.length);return"".concat(e,".").concat(a)},getTree:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(A["o"])();case 2:a=t.sent,r=[],a&&a.length>0&&a.forEach((function(t){var a=[];e.menu.forEach((function(e){a.push({label:e.title,app:t.name,path:e.nodeKey,nodeKey:"".concat(t.name,".").concat(e.nodeKey)})})),r.push({label:t.name,nodeKey:t.name,children:a})})),e.treeData=r;case 6:case"end":return t.stop()}}),t)})))()}}},$o=_o,ko=(a("4620"),Object(y["a"])($o,go,bo,!1,null,null,null)),yo=ko.exports,wo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"btn_group"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addEvent}},[e._v(e._s(e.$t("operate.add")))]),a("let-button",{attrs:{theme:"danger",size:"small"},on:{click:e.delEvent}},[e._v(e._s(e.$t("operate.delete")))])],1),a("let-table",{ref:"pageTable",attrs:{data:e.tableData,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("routerManage.moduleName"),prop:"module_name"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.version"),prop:"version"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.switchStatus"),prop:"switch_status"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(e.switchStatus,(function(r){return r.val===t.row.switch_status?a("div",{key:r.val},[e._v(e._s(r.label))]):e._e()}))}}])}),a("let-table-column",{attrs:{title:e.$t("routerManage.remark"),prop:"remark"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editEvent(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))])]}}])})],1),a("let-pagination",{attrs:{page:e.pagination.page,total:e.pagination.total},on:{change:e.gotoPage}}),a("let-modal",{attrs:{title:e.dialogModal.isNew?e.$t("operate.add"):e.$t("operate.modify"),width:"800px"},on:{"on-confirm":e.saveDialog,close:e.closeDialog,"on-cancel":e.closeDialog},model:{value:e.dialogModal.show,callback:function(t){e.$set(e.dialogModal,"show",t)},expression:"dialogModal.show"}},[e.dialogModal.model?a("let-form",{ref:"dialogForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("routerManage.moduleName"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.module_name,callback:function(t){e.$set(e.dialogModal.model,"module_name",t)},expression:"dialogModal.model.module_name"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.version"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.version,callback:function(t){e.$set(e.dialogModal.model,"version",t)},expression:"dialogModal.model.version"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.switchStatus"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.switch_status,callback:function(t){e.$set(e.dialogModal.model,"switch_status",t)},expression:"dialogModal.model.switch_status"}},e._l(e.switchStatus,(function(t){return a("let-option",{key:t.val,attrs:{value:t.val}},[e._v(e._s(t.label))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("routerManage.remark")}},[a("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.dialogModal.model.remark,callback:function(t){e.$set(e.dialogModal.model,"remark",t)},expression:"dialogModal.model.remark"}})],1)],1):e._e()],1)],1)},xo=[],Mo={data:function(){return{switchStatus:[{val:0,label:"璇诲啓鑷姩鍒囨崲"},{val:1,label:"鍙鑷姩鍒囨崲"},{val:2,label:"涓嶆敮鎸佽嚜鍔ㄥ垏鎹�"},{val:3,label:"鏃犳晥妯″潡"}],isCheckedAll:!1,tableData:[],pagination:{page:1,size:10,total:1},dialogModal:{show:!1,model:{},isNew:!1}}},mounted:function(){this.loadData()},watch:{$route:function(e,t){this.loadData()},isCheckedAll:function(){var e=this.isCheckedAll;this.tableData.forEach((function(t){t.isChecked=e}))}},methods:{getTreeId:function(){return this.$route.params.treeid},loadData:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.listEvent();case 2:case"end":return t.stop()}}),t)})))()},addEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.dialogModal={show:!0,model:{},isNew:!0};case 1:case"end":return t.stop()}}),t)})))()},delEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a=e.tableData,r=[],a.forEach((function(e){e.isChecked&&r.push(e.id)})),t.next=6,Object(A["D"])({data:{treeid:e.getTreeId(),id:r}});case 6:o=t.sent,o&&(e.listEvent(),e.$tip.success(e.$t("common.success"))),t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})))()},editEvent:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,Object(A["E"])({data:{treeid:t.getTreeId(),id:e}});case 3:r=a.sent,r&&(t.dialogModal={show:!0,model:r,isNew:!1}),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$tip.error(a.t0.message);case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()},listEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(A["F"])({data:{treeid:e.getTreeId(),page:e.pagination.page}});case 3:a=t.sent,a.rows.forEach((function(e){e.isChecked=!1})),e.tableData=a.rows,e.pagination={page:a.page,size:a.size,total:Math.ceil(a.count/a.size)},t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()},gotoPage:function(e){this.pagination.page=e,this.listEvent()},saveDialog:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,!e.$refs.dialogForm.validate()){t.next=16;break}if(a=e.dialogModal,r=a.isNew,o=a.model,o.treeid=e.getTreeId(),s={},!r){t.next=11;break}return t.next=8,Object(A["C"])({data:o});case 8:s=t.sent,t.next=14;break;case 11:return t.next=13,Object(A["G"])({data:o});case 13:s=t.sent;case 14:s&&(e.listEvent(),e.$tip.success(e.$t("common.success"))),e.closeDialog();case 16:t.next=21;break;case 18:t.prev=18,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 21:case"end":return t.stop()}}),t,null,[[0,18]])})))()},closeDialog:function(){this.dialogModal.show=!1,this.dialogModal.model=null}}},So=Mo,Co=(a("7f63"),Object(y["a"])(So,wo,xo,!1,null,null,null)),Lo=Co.exports,No=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"btn_group"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addEvent}},[e._v(e._s(e.$t("operate.add")))]),a("let-button",{attrs:{theme:"danger",size:"small"},on:{click:e.delEvent}},[e._v(e._s(e.$t("operate.delete")))])],1),a("let-table",{ref:"pageTable",attrs:{data:e.tableData,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("routerManage.moduleName"),prop:"module_name"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.fromPageNo"),prop:"from_page_no"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.toPageNo"),prop:"to_page_no"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.groupName"),prop:"group_name"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editEvent(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))])]}}])})],1),a("div",{staticStyle:{overflow:"hidden"}},[a("let-pagination",{staticStyle:{float:"right"},attrs:{align:"right",page:e.pagination.page,total:e.pagination.total},on:{change:e.gotoPage}})],1),a("let-modal",{attrs:{title:e.dialogModal.isNew?e.$t("operate.add"):e.$t("operate.modify"),width:"800px"},on:{"on-confirm":e.saveDialog,close:e.closeDialog,"on-cancel":e.closeDialog},model:{value:e.dialogModal.show,callback:function(t){e.$set(e.dialogModal,"show",t)},expression:"dialogModal.show"}},[e.dialogModal.model?a("let-form",{ref:"dialogForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("routerManage.moduleName"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.module_name,callback:function(t){e.$set(e.dialogModal.model,"module_name",t)},expression:"dialogModal.model.module_name"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.fromPageNo"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.from_page_no,callback:function(t){e.$set(e.dialogModal.model,"from_page_no",t)},expression:"dialogModal.model.from_page_no"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.toPageNo"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.to_page_no,callback:function(t){e.$set(e.dialogModal.model,"to_page_no",t)},expression:"dialogModal.model.to_page_no"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.groupName"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.group_name,callback:function(t){e.$set(e.dialogModal.model,"group_name",t)},expression:"dialogModal.model.group_name"}})],1)],1):e._e()],1)],1)},Oo=[],Do={data:function(){return{isCheckedAll:!1,tableData:[],pagination:{page:1,size:10,total:1},dialogModal:{show:!1,model:{},isNew:!1}}},mounted:function(){this.loadData()},watch:{$route:function(e,t){this.loadData()},isCheckedAll:function(){var e=this.isCheckedAll;this.tableData.forEach((function(t){t.isChecked=e}))}},methods:{getTreeId:function(){return this.$route.params.treeid},loadData:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.listEvent();case 2:case"end":return t.stop()}}),t)})))()},addEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.dialogModal={show:!0,model:{},isNew:!0};case 1:case"end":return t.stop()}}),t)})))()},delEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a=e.tableData,r=[],a.forEach((function(e){e.isChecked&&r.push(e.id)})),t.next=6,Object(A["I"])({data:{treeid:e.getTreeId(),id:r}});case 6:o=t.sent,o&&(e.listEvent(),e.$tip.success(e.$t("common.success"))),t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})))()},editEvent:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,Object(A["J"])({data:{treeid:t.getTreeId(),id:e}});case 3:r=a.sent,r&&(t.dialogModal={show:!0,model:r,isNew:!1}),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$tip.error(a.t0.message);case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()},listEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(A["K"])({data:{treeid:e.getTreeId(),page:e.pagination.page}});case 3:a=t.sent,a.rows.forEach((function(e){e.isChecked=!1})),e.tableData=a.rows,e.pagination={page:a.page,size:a.size,total:Math.ceil(a.count/a.size)},t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()},gotoPage:function(e){this.pagination.page=e,this.listEvent()},saveDialog:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,!e.$refs.dialogForm.validate()){t.next=16;break}if(a=e.dialogModal,r=a.isNew,o=a.model,o.treeid=e.getTreeId(),s={},!r){t.next=11;break}return t.next=8,Object(A["H"])({data:o});case 8:s=t.sent,t.next=14;break;case 11:return t.next=13,Object(A["L"])({data:o});case 13:s=t.sent;case 14:s&&(e.listEvent(),e.$tip.success(e.$t("common.success"))),e.closeDialog();case 16:t.next=21;break;case 18:t.prev=18,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 21:case"end":return t.stop()}}),t,null,[[0,18]])})))()},closeDialog:function(){this.dialogModal.show=!1,this.dialogModal.model=null}}},To=Do,jo=(a("aecb"),Object(y["a"])(To,No,Oo,!1,null,null,null)),qo=jo.exports,Po=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"btn_group"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addEvent}},[e._v(e._s(e.$t("operate.add")))]),a("let-button",{attrs:{theme:"danger",size:"small"},on:{click:e.delEvent}},[e._v(e._s(e.$t("operate.delete")))])],1),a("let-table",{ref:"pageTable",attrs:{data:e.tableData,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("routerManage.moduleName"),prop:"module_name"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.groupName"),prop:"group_name"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.accessStatus"),prop:"access_status"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(e.accessStatus,(function(r){return r.val===t.row.access_status?a("div",{key:r.val},[e._v(e._s(r.label))]):e._e()}))}}])}),a("let-table-column",{attrs:{title:e.$t("routerManage.serverName"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.serverStatus"),prop:"server_status"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(e.serverStatus,(function(r){return r.val===t.row.server_status?a("div",{key:r.val},[e._v(e._s(r.label))]):e._e()}))}}])}),a("let-table-column",{attrs:{title:e.$t("routerManage.pri"),prop:"pri"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.sourceServerName"),prop:"source_server_name"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editEvent(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))])]}}])})],1),a("div",{staticStyle:{overflow:"hidden"}},[a("let-pagination",{staticStyle:{float:"right"},attrs:{align:"right",page:e.pagination.page,total:e.pagination.total},on:{change:e.gotoPage}})],1),a("let-modal",{attrs:{title:e.dialogModal.isNew?e.$t("operate.add"):e.$t("operate.modify"),width:"800px"},on:{"on-confirm":e.saveDialog,close:e.closeDialog,"on-cancel":e.closeDialog},model:{value:e.dialogModal.show,callback:function(t){e.$set(e.dialogModal,"show",t)},expression:"dialogModal.show"}},[e.dialogModal.model?a("let-form",{ref:"dialogForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("routerManage.moduleName"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.module_name,callback:function(t){e.$set(e.dialogModal.model,"module_name",t)},expression:"dialogModal.model.module_name"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.groupName"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.group_name,callback:function(t){e.$set(e.dialogModal.model,"group_name",t)},expression:"dialogModal.model.group_name"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.accessStatus"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.access_status,callback:function(t){e.$set(e.dialogModal.model,"access_status",t)},expression:"dialogModal.model.access_status"}},e._l(e.accessStatus,(function(t){return a("let-option",{key:t.val,attrs:{value:t.val}},[e._v(e._s(t.label))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("routerManage.serverName"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.server_name,callback:function(t){e.$set(e.dialogModal.model,"server_name",t)},expression:"dialogModal.model.server_name"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.serverStatus"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.server_status,callback:function(t){e.$set(e.dialogModal.model,"server_status",t)},expression:"dialogModal.model.server_status"}},e._l(e.serverStatus,(function(t){return a("let-option",{key:t.val,attrs:{value:t.val}},[e._v(e._s(t.label))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("routerManage.pri"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.pri,callback:function(t){e.$set(e.dialogModal.model,"pri",t)},expression:"dialogModal.model.pri"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.sourceServerName"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.source_server_name,callback:function(t){e.$set(e.dialogModal.model,"source_server_name",t)},expression:"dialogModal.model.source_server_name"}})],1)],1):e._e()],1)],1)},Io=[],Ro={data:function(){return{accessStatus:[{val:0,label:"姝e父鐘舵€�"},{val:1,label:"鍙鐘舵€�"},{val:2,label:"闀滃儚鍒囨崲鐘舵€�"}],serverStatus:[{val:"M",label:"涓绘満"},{val:"S",label:"澶囨満"},{val:"I",label:"闀滃儚"}],isCheckedAll:!1,tableData:[],pagination:{page:1,size:10,total:1},dialogModal:{show:!1,model:{},isNew:!1}}},mounted:function(){this.loadData()},watch:{$route:function(e,t){this.loadData()},isCheckedAll:function(){var e=this.isCheckedAll;this.tableData.forEach((function(t){t.isChecked=e}))}},methods:{getTreeId:function(){return this.$route.params.treeid},loadData:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.listEvent();case 2:case"end":return t.stop()}}),t)})))()},addEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.dialogModal={show:!0,model:{},isNew:!0};case 1:case"end":return t.stop()}}),t)})))()},delEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a=e.tableData,r=[],a.forEach((function(e){e.isChecked&&r.push(e.id)})),t.next=6,Object(A["y"])({data:{treeid:e.getTreeId(),id:r}});case 6:o=t.sent,o&&(e.listEvent(),e.$tip.success(e.$t("common.success"))),t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})))()},editEvent:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,Object(A["z"])({data:{treeid:t.getTreeId(),id:e}});case 3:r=a.sent,r&&(t.dialogModal={show:!0,model:r,isNew:!1}),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$tip.error(a.t0.message);case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()},listEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(A["A"])({data:{treeid:e.getTreeId(),page:e.pagination.page}});case 3:a=t.sent,a.rows.forEach((function(e){e.isChecked=!1})),e.tableData=a.rows,e.pagination={page:a.page,size:a.size,total:Math.ceil(a.count/a.size)},t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()},gotoPage:function(e){this.pagination.page=e,this.listEvent()},saveDialog:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,!e.$refs.dialogForm.validate()){t.next=15;break}if(a=e.dialogModal,r=a.isNew,o=a.model,s={},!r){t.next=10;break}return t.next=7,Object(A["x"])({data:o});case 7:s=t.sent,t.next=13;break;case 10:return t.next=12,Object(A["B"])({data:o});case 12:s=t.sent;case 13:s&&(e.listEvent(),e.$tip.success(e.$t("common.success"))),e.closeDialog();case 15:t.next=20;break;case 17:t.prev=17,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 20:case"end":return t.stop()}}),t,null,[[0,17]])})))()},closeDialog:function(){this.dialogModal.show=!1,this.dialogModal.model=null}}},Ao=Ro,Eo=(a("6b7b"),Object(y["a"])(Ao,Po,Io,!1,null,null,null)),zo=Eo.exports,Vo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"btn_group"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addEvent}},[e._v(e._s(e.$t("operate.add")))]),a("let-button",{attrs:{theme:"danger",size:"small"},on:{click:e.delEvent}},[e._v(e._s(e.$t("operate.delete")))])],1),a("let-table",{ref:"pageTable",attrs:{data:e.tableData,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("routerManage.idcArea"),prop:"idc_area"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.serverName"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.ip"),prop:"ip"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.binlogPort"),prop:"binlog_port"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.cachePort"),prop:"cache_port"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.wcachePort"),prop:"wcache_port"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.backupPort"),prop:"backup_port"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.routeclientPort"),prop:"routeclient_port"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.remark"),prop:"remark"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editEvent(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))])]}}])})],1),a("div",{staticStyle:{overflow:"hidden"}},[a("let-pagination",{staticStyle:{float:"right"},attrs:{align:"right",page:e.pagination.page,total:e.pagination.total},on:{change:e.gotoPage}})],1),a("let-modal",{attrs:{title:e.dialogModal.isNew?e.$t("operate.add"):e.$t("operate.modify"),width:"800px"},on:{"on-confirm":e.saveDialog,close:e.closeDialog,"on-cancel":e.closeDialog},model:{value:e.dialogModal.show,callback:function(t){e.$set(e.dialogModal,"show",t)},expression:"dialogModal.show"}},[e.dialogModal.model?a("let-form",{ref:"dialogForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("routerManage.idcArea"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.idc_area,callback:function(t){e.$set(e.dialogModal.model,"idc_area",t)},expression:"dialogModal.model.idc_area"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.serverName"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.server_name,callback:function(t){e.$set(e.dialogModal.model,"server_name",t)},expression:"dialogModal.model.server_name"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.ip"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.ip,callback:function(t){e.$set(e.dialogModal.model,"ip",t)},expression:"dialogModal.model.ip"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.binlogPort"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.binlog_port,callback:function(t){e.$set(e.dialogModal.model,"binlog_port",t)},expression:"dialogModal.model.binlog_port"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.cachePort"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.cache_port,callback:function(t){e.$set(e.dialogModal.model,"cache_port",t)},expression:"dialogModal.model.cache_port"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.wcachePort"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.wcache_port,callback:function(t){e.$set(e.dialogModal.model,"wcache_port",t)},expression:"dialogModal.model.wcache_port"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.backupPort"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.backup_port,callback:function(t){e.$set(e.dialogModal.model,"backup_port",t)},expression:"dialogModal.model.backup_port"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.routeclientPort"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.routeclient_port,callback:function(t){e.$set(e.dialogModal.model,"routeclient_port",t)},expression:"dialogModal.model.routeclient_port"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.remark")}},[a("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.dialogModal.model.remark,callback:function(t){e.$set(e.dialogModal.model,"remark",t)},expression:"dialogModal.model.remark"}})],1)],1):e._e()],1)],1)},Fo=[],Wo={data:function(){return{switchStatus:[{val:0,label:"璇诲啓鑷姩鍒囨崲"},{val:1,label:"鍙鑷姩鍒囨崲"},{val:2,label:"涓嶆敮鎸佽嚜鍔ㄥ垏鎹�"},{val:3,label:"鏃犳晥妯″潡"}],isCheckedAll:!1,tableData:[],pagination:{page:1,size:10,total:1},dialogModal:{show:!1,model:{},isNew:!1}}},mounted:function(){this.loadData()},watch:{$route:function(e,t){this.loadData()},isCheckedAll:function(){var e=this.isCheckedAll;this.tableData.forEach((function(t){t.isChecked=e}))}},methods:{getTreeId:function(){return this.$route.params.treeid},loadData:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.listEvent();case 2:case"end":return t.stop()}}),t)})))()},addEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.dialogModal={show:!0,model:{},isNew:!0};case 1:case"end":return t.stop()}}),t)})))()},delEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a=e.tableData,r=[],a.forEach((function(e){e.isChecked&&r.push(e.id)})),t.next=6,Object(A["N"])({data:{treeid:e.getTreeId(),id:r}});case 6:o=t.sent,o&&(e.listEvent(),e.$tip.success(e.$t("common.success"))),t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})))()},editEvent:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,Object(A["O"])({data:{treeid:t.getTreeId(),id:e}});case 3:r=a.sent,r&&(t.dialogModal={show:!0,model:r,isNew:!1}),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$tip.error(a.t0.message);case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()},listEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(A["P"])({data:{treeid:e.getTreeId(),page:e.pagination.page}});case 3:a=t.sent,a.rows.forEach((function(e){e.isChecked=!1})),e.tableData=a.rows,e.pagination={page:a.page,size:a.size,total:Math.ceil(a.count/a.size)},t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()},gotoPage:function(e){this.pagination.page=e,this.listEvent()},saveDialog:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,!e.$refs.dialogForm.validate()){t.next=16;break}if(a=e.dialogModal,r=a.isNew,o=a.model,o.treeid=e.getTreeId(),s={},!r){t.next=11;break}return t.next=8,Object(A["M"])({data:o});case 8:s=t.sent,t.next=14;break;case 11:return t.next=13,Object(A["Q"])({data:o});case 13:s=t.sent;case 14:s&&(e.listEvent(),e.$tip.success(e.$t("common.success"))),e.closeDialog();case 16:t.next=21;break;case 18:t.prev=18,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 21:case"end":return t.stop()}}),t,null,[[0,18]])})))()},closeDialog:function(){this.dialogModal.show=!1,this.dialogModal.model=null}}},Ko=Wo,Jo=(a("26ba"),Object(y["a"])(Ko,Vo,Fo,!1,null,null,null)),Bo=Jo.exports,Go=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"btn_group"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addEvent}},[e._v(e._s(e.$t("operate.add")))]),a("let-button",{attrs:{theme:"danger",size:"small"},on:{click:e.delEvent}},[e._v(e._s(e.$t("operate.delete")))])],1),a("let-table",{ref:"pageTable",attrs:{data:e.tableData,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("routerManage.moduleName"),prop:"module_name"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.fromPageNo"),prop:"from_page_no"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.toPageNo"),prop:"to_page_no"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.groupName"),prop:"group_name"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.transGroupName"),prop:"trans_group_name"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.transferedPageNo"),prop:"transfered_page_no"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.remark"),prop:"remark"}}),a("let-table-column",{attrs:{title:e.$t("routerManage.state"),prop:"state"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(e.stateStatus,(function(r){return r.val===t.row.state?a("div",{key:r.val},[e._v(e._s(r.label))]):e._e()}))}}])}),a("let-table-column",{attrs:{title:e.$t("routerManage.startTime"),prop:"startTime"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.formatDate(t.row.startTime))+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("routerManage.endTime"),prop:"endTime"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.formatDate(t.row.endTime))+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editEvent(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))])]}}])})],1),a("div",{staticStyle:{overflow:"hidden"}},[a("let-pagination",{staticStyle:{float:"right"},attrs:{align:"right",page:e.pagination.page,total:e.pagination.total},on:{change:e.gotoPage}})],1),a("let-modal",{attrs:{title:e.dialogModal.isNew?e.$t("operate.add"):e.$t("operate.modify"),width:"800px"},on:{"on-confirm":e.saveDialog,close:e.closeDialog,"on-cancel":e.closeDialog},model:{value:e.dialogModal.show,callback:function(t){e.$set(e.dialogModal,"show",t)},expression:"dialogModal.show"}},[e.dialogModal.model?a("let-form",{ref:"dialogForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("routerManage.moduleName"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.module_name,callback:function(t){e.$set(e.dialogModal.model,"module_name",t)},expression:"dialogModal.model.module_name"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.fromPageNo"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.from_page_no,callback:function(t){e.$set(e.dialogModal.model,"from_page_no",t)},expression:"dialogModal.model.from_page_no"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.toPageNo"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.to_page_no,callback:function(t){e.$set(e.dialogModal.model,"to_page_no",t)},expression:"dialogModal.model.to_page_no"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.groupName"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.group_name,callback:function(t){e.$set(e.dialogModal.model,"group_name",t)},expression:"dialogModal.model.group_name"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.transGroupName"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.trans_group_name,callback:function(t){e.$set(e.dialogModal.model,"trans_group_name",t)},expression:"dialogModal.model.trans_group_name"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.transferedPageNo"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.transfered_page_no,callback:function(t){e.$set(e.dialogModal.model,"transfered_page_no",t)},expression:"dialogModal.model.transfered_page_no"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.remark")}},[a("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.dialogModal.model.remark,callback:function(t){e.$set(e.dialogModal.model,"remark",t)},expression:"dialogModal.model.remark"}})],1),a("let-form-item",{attrs:{label:e.$t("routerManage.switchStatus"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.dialogModal.model.state,callback:function(t){e.$set(e.dialogModal.model,"state",t)},expression:"dialogModal.model.state"}},e._l(e.stateStatus,(function(t){return a("let-option",{key:t.val,attrs:{value:t.val}},[e._v(e._s(t.label))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("routerManage.time")}},[a("let-datetime-range-picker",{attrs:{start:e.dialogModal.model.startTime,end:e.dialogModal.model.endTime},on:{"update:start":function(t){return e.$set(e.dialogModal.model,"startTime",t)},"update:end":function(t){return e.$set(e.dialogModal.model,"endTime",t)}}})],1)],1):e._e()],1)],1)},Uo=[],Ho={data:function(){return{stateStatus:[{val:"0",label:"鏈縼绉�"},{val:"1",label:"姝e湪杩佺Щ"},{val:"2",label:"杩佺Щ缁撴潫"},{val:"4",label:"鍋滄杩佺Щ"}],isCheckedAll:!1,tableData:[],pagination:{page:1,size:10,total:1},dialogModal:{show:!1,model:{},isNew:!1}}},mounted:function(){this.loadData()},watch:{$route:function(e,t){this.loadData()},isCheckedAll:function(){var e=this.isCheckedAll;this.tableData.forEach((function(t){t.isChecked=e}))}},methods:{getTreeId:function(){return this.$route.params.treeid},formatDate:function(e){return Object(ft["b"])(e)},loadData:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.listEvent();case 2:case"end":return t.stop()}}),t)})))()},addEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.dialogModal={show:!0,model:{},isNew:!0};case 1:case"end":return t.stop()}}),t)})))()},delEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a=e.tableData,r=[],a.forEach((function(e){e.isChecked&&r.push(e.id)})),t.next=6,Object(A["S"])({data:{treeid:e.getTreeId(),id:r}});case 6:o=t.sent,o&&(e.listEvent(),e.$tip.success(e.$t("common.success"))),t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})))()},editEvent:function(e){var t=this;return Object(R["a"])(regeneratorRuntime.mark((function a(){var r,o,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,Object(A["T"])({data:{treeid:t.getTreeId(),id:e}});case 3:r=a.sent,r&&(o=t.formatDate(r.startTime),o&&19===o.length&&(r.startTime=o.substr(0,16)),s=t.formatDate(r.endTime),s&&19===s.length&&(r.endTime=s.substr(0,16)),t.dialogModal={show:!0,model:r,isNew:!1}),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$tip.error(a.t0.message);case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()},listEvent:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(A["U"])({data:{treeid:e.getTreeId(),page:e.pagination.page}});case 3:a=t.sent,a.rows.forEach((function(e){e.isChecked=!1})),e.tableData=a.rows,e.pagination={page:a.page,size:a.size,total:Math.ceil(a.count/a.size)},t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()},gotoPage:function(e){this.pagination.page=e,this.listEvent()},saveDialog:function(){var e=this;return Object(R["a"])(regeneratorRuntime.mark((function t(){var a,r,o,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,!e.$refs.dialogForm.validate()){t.next=18;break}if(a=e.dialogModal,r=a.isNew,o=a.model,o.startTime&&16===o.startTime.length&&(o.startTime="".concat(o.startTime,":00")),o.endTime&&16===o.endTime.length&&(o.endTime="".concat(o.endTime,":00")),o.treeid=e.getTreeId(),s={},!r){t.next=13;break}return t.next=10,Object(A["R"])({data:o});case 10:s=t.sent,t.next=16;break;case 13:return t.next=15,Object(A["V"])({data:o});case 15:s=t.sent;case 16:s&&(e.listEvent(),e.$tip.success(e.$t("common.success"))),e.closeDialog();case 18:t.next=23;break;case 20:t.prev=20,t.t0=t["catch"](0),e.$tip.error(t.t0.message);case 23:case"end":return t.stop()}}),t,null,[[0,20]])})))()},closeDialog:function(){this.dialogModal.show=!1,this.dialogModal.model=null}}},Zo=Ho,Yo=(a("ba52"),Object(y["a"])(Zo,Go,Uo,!1,null,null,null)),Qo=Yo.exports;r["default"].use(O["a"]);var Xo=new O["a"]({routes:[{path:"/server",name:"Server",component:Ct,children:[{path:":treeid/manage",component:K},{path:":treeid/manage/:serverType",component:K},{path:":treeid/publish/:serverType",component:Y},{path:":treeid/config/:serverType",component:Q["a"]},{path:":treeid/server-monitor/:serverType",component:X["a"]},{path:":treeid/property-monitor/:serverType",component:ee["a"]},{path:":treeid/interface-debuger/:serverType",component:te["a"]},{path:":treeid/user-manage/:serverType",component:ae["a"]},{path:":treeid/cache",component:Fe},{path:":treeid/moduleCache",component:mt},{path:":treeid/propertyMonitor",component:wt,fn:"鐗规€х洃鎺�"}]},{path:"/operation",name:"Operation",component:jt,redirect:"/operation/apply",children:[{path:"apply",name:"apply",component:Et,redirect:"/operation/apply/createApply",children:[{path:"createApply",component:Bt},{path:"createService/:applyId",component:ea},{path:"installAndPublish/:applyId",component:ia}]},{path:"module",component:ha,redirect:"/operation/module/createModule",children:[{path:"createModule",component:ya},{path:"moduleConfig/:moduleId",component:ja},{path:"serverConfig/:moduleId",component:Ja},{path:"installAndPublish/:moduleId",component:Ya}]},{path:"region",name:"region",component:rr}]},{path:"/releasePackage",name:"releasePackage",component:cr,redirect:"/releasePackage/proxyList",children:[{path:"proxyList",component:fr},{path:"accessList",component:kr},{path:"routerList",component:Cr},{path:"cacheList",component:jr}]},{path:"/config",component:Yr},{path:"/operationManage",name:"operationManage",component:ro,redirect:"/operationManage/expand",children:[{path:"mainBackup",component:vo},{path:"router",component:yo,children:[{path:":treeid/module",component:Lo},{path:":treeid/record",component:qo},{path:":treeid/group",component:zo},{path:":treeid/server",component:Bo},{path:":treeid/transfer",component:Qo}]},{path:":type",component:co}]},{path:"*",redirect:"/server"}],scrollBehavior:function(e,t,a){return{x:0,y:0}}});a("9c65");r["default"].config.productionTip=!1,_["b"].call(void 0).then((function(){new r["default"]({i18n:_["a"],el:"#app",router:Xo,components:{dcacheApp:N},template:"<dcacheApp/>"})}))},"2ff6":function(e,t,a){e.exports=a.p+"static/img/spinner.dee5f891.svg"},3:function(e,t,a){e.exports=a("2f8b")},"30e5":function(e,t,a){},"31ec":function(e,t,a){},3217:function(e,t,a){},3331:function(e,t,a){},3779:function(e,t,a){},"3ab4":function(e,t,a){e.exports=a.p+"static/img/default.c68b0cc8.svg"},"42b8":function(e,t,a){"use strict";var r=a("1439"),o=a.n(r);o.a},"44bd":function(e,t,a){},4620:function(e,t,a){"use strict";var r=a("8a0c"),o=a.n(r);o.a},4888:function(e,t,a){},"4ff0":function(e,t,a){"use strict";var r=a("4888"),o=a.n(r);o.a},"6b7b":function(e,t,a){"use strict";var r=a("31ec"),o=a.n(r);o.a},7288:function(e,t,a){},"7b24":function(e,t,a){},"7c3e":function(e,t,a){},"7f63":function(e,t,a){"use strict";var r=a("7b24"),o=a.n(r);o.a},"82b4":function(e,t,a){"use strict";var r=a("f3ba"),o=a.n(r);o.a},"8a0c":function(e,t,a){},"8c1c":function(e,t,a){"use strict";var r=a("30e5"),o=a.n(r);o.a},"95be":function(e,t,a){},"9e5a":function(e,t,a){},a4f7:function(e,t,a){"use strict";var r=a("7288"),o=a.n(r);o.a},a8af:function(e,t,a){"use strict";var r=a("f3d5"),o=a.n(r);o.a},a9dd:function(e,t,a){"use strict";var r=a("3217"),o=a.n(r);o.a},aa5e:function(e,t,a){},aecb:function(e,t,a){"use strict";var r=a("aa5e"),o=a.n(r);o.a},af6d:function(e,t,a){},ba52:function(e,t,a){"use strict";var r=a("f63e"),o=a.n(r);o.a},bb06:function(e,t,a){"use strict";var r=a("1dcc"),o=a.n(r);o.a},bd18:function(e,t,a){},cd6a:function(e,t,a){"use strict";var r=a("af6d"),o=a.n(r);o.a},d1fb:function(e,t,a){},dbb3:function(e,t,a){"use strict";var r=a("d1fb"),o=a.n(r);o.a},ddc1:function(e,t,a){"use strict";var r=a("95be"),o=a.n(r);o.a},e8b0:function(e,t,a){"use strict";var r=a("1467"),o=a.n(r);o.a},ebfe:function(e,t,a){"use strict";var r=a("bd18"),o=a.n(r);o.a},eee6:function(e,t,a){"use strict";var r=a("f281"),o=a.n(r);o.a},f281:function(e,t,a){},f3ba:function(e,t,a){},f3d5:function(e,t,a){},f3e0:function(e,t,a){"use strict";var r=a("3779"),o=a.n(r);o.a},f63e:function(e,t,a){},f76f:function(e,t,a){"use strict";var r=a("3331"),o=a.n(r);o.a},f7a5:function(e,t,a){}});
\ No newline at end of file
diff --git a/client/dist/static/js/index.70669a24.js b/client/dist/static/js/index.70669a24.js
deleted file mode 100644
index 27b78b53..00000000
--- a/client/dist/static/js/index.70669a24.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(e){function t(t){for(var o,l,r=t[0],n=t[1],c=t[2],m=0,p=[];m<r.length;m++)l=r[m],Object.prototype.hasOwnProperty.call(s,l)&&s[l]&&p.push(s[l][0]),s[l]=0;for(o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);d&&d(t);while(p.length)p.shift()();return i.push.apply(i,c||[]),a()}function a(){for(var e,t=0;t<i.length;t++){for(var a=i[t],o=!0,r=1;r<a.length;r++){var n=a[r];0!==s[n]&&(o=!1)}o&&(i.splice(t--,1),e=l(l.s=a[0]))}return e}var o={},s={index:0},i=[];function l(t){if(o[t])return o[t].exports;var a=o[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,l),a.l=!0,a.exports}l.m=e,l.c=o,l.d=function(e,t,a){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(l.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)l.d(a,o,function(t){return e[t]}.bind(null,o));return a},l.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="/";var r=window["webpackJsonp"]=window["webpackJsonp"]||[],n=r.push.bind(r);r.push=t,r=r.slice();for(var c=0;c<r.length;c++)t(r[c]);var d=n;i.push([0,"chunk-vendors","chunk-common"]),a()})({0:function(e,t,a){e.exports=a("b635")},"13f9":function(e,t,a){"use strict";var o=a("98504"),s=a.n(o);s.a},1444:function(e,t,a){},"1eed":function(e,t,a){"use strict";var o=a("319d"),s=a.n(o);s.a},"22f3":function(e,t,a){"use strict";var o=a("afce"),s=a.n(o);s.a},2541:function(e,t,a){"use strict";var o=a("5793"),s=a.n(o);s.a},"2e66":function(e,t,a){"use strict";var o=a("9200"),s=a.n(o);s.a},"319d":function(e,t,a){},"33c32":function(e,t,a){"use strict";var o=a("fd93"),s=a.n(o);s.a},"4dec":function(e,t,a){"use strict";var o=a("ca5f"),s=a.n(o);s.a},"4fc2":function(e,t,a){},"523f":function(e,t,a){"use strict";var o=a("fc15"),s=a.n(o);s.a},5793:function(e,t,a){},"734f":function(e,t,a){},"7f9e":function(e,t,a){"use strict";var o=a("c1ab"),s=a.n(o);s.a},9200:function(e,t,a){},98504:function(e,t,a){},"9ce0":function(e,t,a){"use strict";var o=a("f71f"),s=a.n(o);s.a},a8f5:function(e,t,a){"use strict";var o=a("734f"),s=a.n(o);s.a},afce:function(e,t,a){},b635:function(e,t,a){"use strict";a.r(t);a("e260"),a("e6cf"),a("cca6"),a("a79d");var o=a("a026"),s=(a("9c65"),a("42a2a")),i=a("77a0"),l=a.n(i),r=(a("aaf0"),a("5c96")),n=a.n(r),c=(a("a082"),a("42a1"),a("b3f5"),a("0ce2"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"app"}},[a("app-header"),a("keep-alive",[a("router-view",{staticClass:"main-width"})],1)],1)}),d=[],m=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app_index__header"},[a("div",{staticClass:"main-width"},[a("h1",{staticClass:"hidden"},[e._v("TARS")]),a("div",{staticClass:"logo-wrap"},["true"===e.enable&&"true"===e.show?a("a",{class:{active:!0},attrs:{href:"/"}},[a("img",{staticClass:"logo",attrs:{src:"/static/img/tars-logo.png"}})]):e._e(),"true"===e.k8s?a("a",{attrs:{href:"/k8s.html"}},[a("img",{staticClass:"logo",attrs:{src:"/static/img/K8S.png"}})]):e._e(),"true"===e.enable?a("a",{attrs:{href:"/dcache.html"}},[a("img",{staticClass:"logo",attrs:{alt:"dcache",src:"/static/img/dcache-logo.png"}})]):e._e()]),a("let-tabs",{staticClass:"tabs",attrs:{center:!0,activekey:e.$route.matched[0].path},on:{click:e.clickTab}},[a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab1"),tabkey:"/server",icon:e.serverIcon}}),a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab2"),tabkey:"/operation",icon:e.opaIcon}}),a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab8"),tabkey:"/gateway",icon:e.cacheIcon}}),"true"==e.enableMarket?a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab9"),tabkey:"/market/list",icon:e.packageIcon}}):e._e()],1),a("div",{staticClass:"language-wrap"},[a("let-select",{attrs:{clearable:!1},on:{change:e.changeLocale},model:{value:e.locale,callback:function(t){e.locale=t},expression:"locale"}},[e._l(e.localeMessages,(function(t){return[a("let-option",{key:t.localeCode,attrs:{value:t.localeCode}},[e._v(e._s(t.localeName))])]}))],2)],1),a("div",{staticClass:"version-wrap"},[a("div",[e._v("web:"+e._s(e.web_version))]),a("div",[e._v("framework:"+e._s(e.framework_version))])]),a("div",{staticClass:"user-wrap"},[a("el-dropdown",{staticStyle:{"margin-bottom":"10px"},on:{command:e.handleCommand}},[a("span",{staticClass:"el-dropdown-link"},[e._v(" "+e._s(e.uid)),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],attrs:{command:"center"}},[e._v(e._s(e.$t("header.userCenter")))]),e.enableLdap?e._e():a("el-dropdown-item",{attrs:{command:"modifyPass"}},[e._v(e._s(e.$t("header.modifyPass")))]),e.enableLdap?e._e():a("el-dropdown-item",{attrs:{command:"quit"}},[e._v(e._s(e.$t("header.logout")))])],1)],1)],1)],1)])},p=[],u=(a("ac1f"),a("5319"),a("1817")),h=a.n(u),f=a("1ca6"),v=a.n(f),_=a("cc08"),b=a.n(_),g=a("4d18"),$=a.n(g),w=a("f51c"),y=a("bc3a"),k=a.n(y),M={data:function(){return{serverIcon:h.a,opaIcon:v.a,cacheIcon:b.a,packageIcon:$.a,locale:this.$cookie.get("locale")||"en",uid:"--",enableLogin:!1,isAdmin:!1,localeMessages:w["c"],k8s:this.$cookie.get("k8s")||"false",enable:this.$cookie.get("enable")||"false",show:this.$cookie.get("show")||"false",enableLdap:!1,enableMarket:this.$cookie.get("market")||"false",web_version:"loading路路",framework_version:"loading路路"}},methods:{clickTab:function(e){this.$router.replace(e)},userCenter:function(){window.open("/pages/server/api/userCenter")},handleCommand:function(e){"center"==e?location.href="/auth.html":"modifyPass"==e&&(location.href="/pass.html"),"quit"==e&&(location.href="/logout")},getLoginUid:function(){var e=this;this.$ajax.getJSON("/server/api/get_login_uid").then((function(t){t&&t.uid?e.uid=t.uid:e.uid="***"})).catch((function(t){e.$tip.error("get user login info error: ".concat(t.err_msg||t.message))}))},changeLocale:function(){this.$cookie.set("locale",this.locale,{expires:"1Y"}),location.reload()},checkEnableLogin:function(){var e=this;this.$ajax.getJSON("/server/api/is_enable_login").then((function(t){e.enableLogin=t.enableLogin||!1})).catch((function(e){}))},checkEnableLdap:function(){var e=this;this.$ajax.getJSON("/server/api/isEnableLdap").then((function(t){e.enableLdap=t.enableLdap||!1})).catch((function(e){}))},checkAdmin:function(){var e=this;this.isAdmin=!1,this.$ajax.getJSON("/server/api/isAdmin").then((function(t){e.isAdmin=t.admin})).catch((function(e){}))}},mounted:function(){var e=this;this.getLoginUid(),this.checkEnableLogin(),this.checkAdmin(),this.checkEnableLdap(),k.a.create({baseURL:"/"})({method:"get",url:"/web_version"}).then((function(t){e.web_version=t.data.webVersion,e.framework_version=t.data.frameworkVersion})),window.header=this}},S=M,x=(a("a8f5"),a("2877")),L=Object(x["a"])(S,m,p,!1,null,null,null),C=L.exports,N=a("559f"),E={name:"App",components:{AppHeader:C,AppFooter:N["a"]},data:function(){return{web_version:"Version: loading路路",framework_version:"Version: loading路路"}},mounted:function(){}},T=E,D=(a("7f9e"),Object(x["a"])(T,c,d,!1,null,null,null)),q=D.exports,O=a("8c4f"),I=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server"},[a("div",{staticClass:"left-view"},[a("div",{staticClass:"tree_search"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.treeSearchKey,expression:"treeSearchKey"}],staticClass:"tree_search_key",attrs:{type:"text",placeholder:e.$t("home.placeholder")},domProps:{value:e.treeSearchKey},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.treeSearch(0)},input:function(t){t.target.composing||(e.treeSearchKey=t.target.value)}}})]),a("div",{staticClass:"tree_wrap"},[a("a",{staticClass:"tree_icon iconfont el-icon-third-shuaxin",class:{active:e.isIconPlay},staticStyle:{"font-family":"iconfont  !important"},attrs:{href:"javascript:;",id:"img"},on:{click:function(t){return e.treeSearch(1)}}}),e.treeData&&e.treeData.length?a("let-tree",{staticClass:"left-tree",attrs:{data:e.treeData,activeKey:e.treeid},on:{"on-select":e.selectTree}}):e._e(),e.treeData&&!e.treeData.length?a("div",{staticClass:"left-tree"},[a("p",{staticClass:"loading"},[e._v(e._s(e.$t("common.noService")))])]):e._e(),e.treeData?e._e():a("div",{ref:"treeLoading",staticClass:"left-tree"},[!1===e.treeData?a("div",{staticClass:"loading"},[a("p",[e._v(e._s(e.treeErrMsg))]),a("a",{attrs:{href:"javascript:;"},on:{click:e.getTreeData}},[e._v(e._s(e.$t("common.reTry")))])]):e._e()])],1)]),a("div",{staticClass:"right-view"},[a("div",{staticClass:"btabs_wrap"},[a("ul",{directives:[{name:"vscroll",rawName:"v-vscroll"}],ref:"btabs",staticClass:"btabs"},[a("li",{key:e.homeTab,staticClass:"btabs_item",class:{active:e.homeTab===e.treeid}},[a("a",{staticClass:"btabs_link",staticStyle:{"padding-right":"20px"},attrs:{href:"javascript:;"},on:{click:function(t){return e.clickBTabs(t,e.homeTab)}}},[e._v(" "+e._s(e.$t("home.homeTab"))+" ")])]),e._l(e.BTabs,(function(t){return a("li",{key:t.id,staticClass:"btabs_item",class:{active:t.id===e.treeid}},[a("a",{staticClass:"btabs_link",attrs:{href:"javascript:;"},on:{click:function(a){return e.clickBTabs(a,t.id)}}},[e._v(e._s(e.getNewServerName(t.id)))]),a("a",{staticClass:"btabs_close",attrs:{href:"javascript:;"},on:{click:function(a){return e.closeBTabs(t.id)}}},[e._v(" "+e._s(e.$t("home.close")))])])}))],2),a("a",{staticClass:"btabs_all",attrs:{href:"javascript:;",title:e.$t("home.closeAll")},on:{click:e.closeAllBTabs}},[e._v(" "+e._s(e.$t("home.closeAll")))])]),a("div",{directives:[{name:"show",rawName:"v-show",value:e.treeid===e.homeTab,expression:"treeid === homeTab"}],staticClass:"btabs_con_home",staticStyle:{height:"800px"}},[a("serverHistory")],1),a("div",{staticClass:"btabs_con"},e._l(e.BTabs,(function(t){return a("div",{directives:[{name:"show",rawName:"v-show",value:t.id===e.treeid,expression:"item.id === treeid"}],key:t.id,staticClass:"btabs_con_item"},[a("let-tabs",{attrs:{activekey:t.path},on:{click:e.clickTab}},[a("let-tab-pane",{attrs:{tabkey:e.base+"/manage",tab:e.$t("header.tab.tab1")}}),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/publish",tab:e.$t("index.rightView.tab.patch")}}):e._e(),5===e.serverData.level||4===e.serverData.level||1===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/config",tab:5===e.serverData.level?e.$t("index.rightView.tab.serviceConfig"):4===e.serverData.level?e.$t("index.rightView.tab.setConfig"):1===e.serverData.level?e.$t("index.rightView.tab.appConfig"):""}}):e._e(),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/server-monitor",tab:e.$t("index.rightView.tab.statMonitor")}}):e._e(),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/property-monitor",tab:e.$t("index.rightView.tab.propertyMonitor")}}):e._e(),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/interface-debuger",tab:e.$t("index.rightView.tab.infDebuger")}}):e._e(),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/user-manage",tab:e.$t("index.rightView.tab.privileage")}}):e._e(),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/callChain",tab:e.$t("index.rightView.tab.treeConfig")}}):e._e()],1),a(e.getName(t.path),{ref:"childView",refInFor:!0,tag:"router-view",staticClass:"page_server_child",attrs:{treeid:t.id}})],1)})),0)])])},z=[],j=(a("4160"),a("c975"),a("a15b"),a("baa5"),a("a434"),a("b0c0"),a("1276"),a("159b"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_manage"},[a("div",{staticClass:"table_head"},[a("h4",[e._v(e._s(this.$t("serverList.title.serverList"))+" "),a("i",{staticClass:"icon iconfont el-icon-third-shuaxin",staticStyle:{"font-family":"iconfont  !important"},on:{click:function(t){return e.getServerList(e.serverPageNum)}}})])]),e.serverList?a("let-table",{ref:"serverListLoading",staticClass:"dcache",attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata"),stripe:""}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{attrs:{value:e.isCheckedAll},model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}],null,!1,1091570282)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("a",{staticClass:"buttonText",attrs:{href:"/static/logview/logview.html?app="+[t.row.application]+"&server_name="+[t.row.server_name]+"&node_name="+[t.row.node_name],title:e.$t("serverList.link.remoteLog"),target:"_blank"}},[e._v(" "+e._s(t.row.server_name)+" ")])]}}],null,!1,2262472970)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.is_node_ok?a("span",[a("a",{staticClass:"buttonText",attrs:{href:"/static/logview/logview.html?app="+[t.row.application]+"&server_name="+[t.row.server_name]+"&node_name="+[t.row.node_name],title:e.$t("serverList.link.nodeLog"),target:"_blank"}},[e._v(" "+e._s(t.row.node_name)+" ")])]):a("span",{staticStyle:{color:"#FF0000"}},[e._v(" "+e._s(t.row.node_name)+e._s(e.$t("serverList.link.invalidNode"))+" ")])]}}],null,!1,2244706928)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.enableSet")},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.enable_set?a("p",{staticStyle:{"max-width":"200px"}},[e._v(" "+e._s(e.$t("common.set.setName"))+"锛�"+e._s(t.row.set_name)),a("br"),e._v(" "+e._s(e.$t("common.set.setArea"))+"锛�"+e._s(t.row.set_area)),a("br"),e._v(" "+e._s(e.$t("common.set.setGroup"))+"锛�"+e._s(t.row.set_group)+" ")]):a("span",[e._v(e._s(e.$t("common.disable")))])]}}],null,!1,2963707083)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return["Inactive"===t.row.setting_state?a("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(t.row.setting_state))]):a("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(t.row.setting_state))])]}}],null,!1,4280848039)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return["0"!=t.row.query_ret_code?a("span",{staticStyle:{color:"#FF0000"}},[e._v("Inactive")]):"Active"===t.row.present_state_in_node?a("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(t.row.present_state_in_node))]):a("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(t.row.present_state_in_node))])]}}],null,!1,2058566643)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.flowStatus"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"inactive"===e.row.flow_state?"status-off":"status-flowactive"})]}}],null,!1,1565598863)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.processID"),prop:"process_id"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.operator"),prop:"patch_user"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(t.row.patch_time)))])]}}],null,!1,3144837894)}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"300px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.configServer(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.restartServer(t.row.id)}}},[e._v(e._s(e.$t("operate.restart")))]),a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.stopServer(t.row.id)}}},[e._v(e._s(e.$t("operate.stop")))]),"active"===t.row.flow_state?a("let-table-operation",{on:{click:function(a){return e.updateFlowStatus(t.row.id,!1,t.row.node_name)}}},[e._v(e._s(e.$t("operate.pause")))]):e._e(),"inactive"===t.row.flow_state?a("let-table-operation",{on:{click:function(a){return e.updateFlowStatus(t.row.id,!0,t.row.node_name)}}},[e._v(e._s(e.$t("operate.resume")))]):e._e(),a("let-table-operation",{on:{click:function(a){return e.manageServant(t.row)}}},[e._v(e._s(e.$t("operate.servant")))]),a("let-table-operation",{on:{click:function(a){return e.showStatusModal(t.row)}}},[e._v(e._s(e.$t("operate.statusView")))]),a("let-table-operation",{on:{click:function(a){return e.showTemplateView(t.row)}}},[e._v(e._s(e.$t("operate.templateView")))]),a("let-table-operation",{on:{click:function(a){return e.showMoreCmd(t.row)}}},[e._v(e._s(e.$t("operate.more")))])]}}],null,!1,1475044383)}),a("template",{slot:"operations"},[a("let-button",{attrs:{theme:"primary",size:"small",disabled:!e.hasCheckedServer},on:{click:e.batchshowStatusModal}},[e._v(e._s(e.$t("operate.statusView")))]),a("let-button",{attrs:{theme:"primary",size:"small",disabled:!e.hasCheckedServer},on:{click:e.batchShowMoreCmd}},[e._v(e._s(e.$t("operate.more")))]),a("let-button",{attrs:{theme:"primary",size:"small",disabled:!e.hasCheckedServer},on:{click:e.batchConfigServer}},[e._v(e._s(e.$t("dcache.batch.edit")))]),a("batch-operation",{attrs:{size:"small",disabled:!e.hasCheckedServer,"checked-servers":e.checkedServers,type:"restart"},on:{"success-fn":e.getServerList}}),a("batch-operation",{attrs:{size:"small",disabled:!e.hasCheckedServer,"checked-servers":e.checkedServers,type:"stop"},on:{"success-fn":e.getServerList}})],1)],2):e._e(),e.serverNotifyList&&e.showOthers?e._e():a("let-pagination",{staticStyle:{"margin-bottom":"32px"},attrs:{page:e.serverPageNum,total:e.serverTotal},on:{change:e.gotoServerPage}}),a("div",{staticClass:"table_head"},[e.serverNotifyList&&e.showOthers?a("h4",[e._v(e._s(this.$t("serverList.title.serverStatus"))+" "),a("i",{staticClass:"icon iconfont",on:{click:function(t){return e.getServerNotifyList()}}},[e._v("畎�")])]):e._e()]),e.serverNotifyList&&e.showOthers?a("let-table",{ref:"serverNotifyListLoading",attrs:{data:e.serverNotifyList,stripe:"","empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"20%",title:e.$t("common.time"),prop:"notifytime"}}),a("let-table-column",{attrs:{width:"20%",title:e.$t("serverList.table.th.serviceID"),prop:"server_id"}}),a("let-table-column",{attrs:{width:"15%",title:e.$t("serverList.table.th.threadID"),prop:"thread_id"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{style:e.statusStyle(t.row.result)},[e._v(e._s(t.row.result))])]}}],null,!1,3563771650)})],1):e._e(),e.serverNotifyList&&e.showOthers?a("let-pagination",{staticStyle:{"margin-bottom":"32px"},attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}}):e._e(),a("let-modal",{attrs:{title:e.$t("serverList.dlg.title.editService"),width:"800px",footShow:!(!e.configModal.model||!e.configModal.model.server_name)},on:{"on-confirm":function(t){return e.saveConfig(e.batchEditConf.show)},close:e.closeConfigModal,"on-cancel":e.closeConfigModal},model:{value:e.configModal.show,callback:function(t){e.$set(e.configModal,"show",t)},expression:"configModal.show"}},[e.configModal.model&&e.configModal.model.server_name?a("let-form",{ref:"configForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[e.batchEditConf.show?a("let-form-item",{attrs:{label:e.$t("common.service")}},[e._v(e._s(e.configModal.model.server_name))]):e._e(),e.batchEditConf.show?a("let-form-item",{attrs:{label:e.$t("common.ip")}},[e._v(e._s(e.configModal.model.node_name))]):e._e(),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.useIdc"),required:""}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.enable_group,callback:function(t){e.$set(e.batchEditConf.itemEnable,"enable_group",t)},expression:"batchEditConf.itemEnable.enable_group"}}),a("let-radio-group",{attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.enable_group,data:[{value:!0,text:e.$t("common.yes")},{value:!1,text:e.$t("common.no")}]},model:{value:e.configModal.model.enable_group,callback:function(t){e.$set(e.configModal.model,"enable_group",t)},expression:"configModal.model.enable_group"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.groupName")}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.enable_group,callback:function(t){e.$set(e.batchEditConf.itemEnable,"enable_group",t)},expression:"batchEditConf.itemEnable.enable_group"}}),a("let-select",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.configModal.model.enable_group},model:{value:e.configModal.model.ip_group_name,callback:function(t){e.$set(e.configModal.model,"ip_group_name",t)},expression:"configModal.model.ip_group_name"}},e._l(e.configModal.model.groupList,(function(t){return a("let-option",{key:t.value,attrs:{value:t.key}},[e._v(e._s(t.value))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.isBackup"),required:""}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.bak_flag,callback:function(t){e.$set(e.batchEditConf.itemEnable,"bak_flag",t)},expression:"batchEditConf.itemEnable.bak_flag"}}),a("let-radio-group",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.bak_flag,data:[{value:!0,text:e.$t("common.yes")},{value:!1,text:e.$t("common.no")}]},model:{value:e.configModal.model.bak_flag,callback:function(t){e.$set(e.configModal.model,"bak_flag",t)},expression:"configModal.model.bak_flag"}})],1),a("let-form-item",{attrs:{label:e.$t("common.template"),required:""}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.template_name,callback:function(t){e.$set(e.batchEditConf.itemEnable,"template_name",t)},expression:"batchEditConf.itemEnable.template_name"}}),e.configModal.model.templates&&e.configModal.model.templates.length?a("let-select",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.template_name,required:""},model:{value:e.configModal.model.template_name,callback:function(t){e.$set(e.configModal.model,"template_name",t)},expression:"configModal.model.template_name"}},e._l(e.configModal.model.templates,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1):a("span",[e._v(e._s(e.configModal.model.template_name))])],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.serviceType"),required:""}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.server_type,callback:function(t){e.$set(e.batchEditConf.itemEnable,"server_type",t)},expression:"batchEditConf.itemEnable.server_type"}}),a("let-select",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.server_type,required:""},model:{value:e.configModal.model.server_type,callback:function(t){e.$set(e.configModal.model,"server_type",t)},expression:"configModal.model.server_type"}},e._l(e.serverTypes,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.enableSet"),required:""}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.enable_set,callback:function(t){e.$set(e.batchEditConf.itemEnable,"enable_set",t)},expression:"batchEditConf.itemEnable.enable_set"}}),a("let-radio-group",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.enable_set,data:[{value:!0,text:e.$t("common.enable")},{value:!1,text:e.$t("common.disable")}]},model:{value:e.configModal.model.enable_set,callback:function(t){e.$set(e.configModal.model,"enable_set",t)},expression:"configModal.model.enable_set"}})],1),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setName"),required:""}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.set_name,callback:function(t){e.$set(e.batchEditConf.itemEnable,"set_name",t)},expression:"batchEditConf.itemEnable.set_name"}}),a("let-input",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.set_name,placeholder:e.$t("serverList.dlg.errMsg.setName"),required:"",pattern:"^[a-z]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setName")},model:{value:e.configModal.model.set_name,callback:function(t){e.$set(e.configModal.model,"set_name",t)},expression:"configModal.model.set_name"}})],1):e._e(),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setArea"),required:""}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.set_area,callback:function(t){e.$set(e.batchEditConf.itemEnable,"set_area",t)},expression:"batchEditConf.itemEnable.set_area"}}),a("let-input",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.set_area,placeholder:e.$t("serverList.dlg.errMsg.setArea"),required:"",pattern:"^[a-z]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setArea")},model:{value:e.configModal.model.set_area,callback:function(t){e.$set(e.configModal.model,"set_area",t)},expression:"configModal.model.set_area"}})],1):e._e(),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setGroup"),required:""}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.set_group,callback:function(t){e.$set(e.batchEditConf.itemEnable,"set_group",t)},expression:"batchEditConf.itemEnable.set_group"}}),a("let-input",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.set_group,placeholder:e.$t("serverList.dlg.errMsg.setGroup"),required:"",pattern:"^[0-9\\*]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setGroup")},model:{value:e.configModal.model.set_group,callback:function(t){e.$set(e.configModal.model,"set_group",t)},expression:"configModal.model.set_group"}})],1):e._e(),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.asyncThread"),required:""}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.async_thread_num,callback:function(t){e.$set(e.batchEditConf.itemEnable,"async_thread_num",t)},expression:"batchEditConf.itemEnable.async_thread_num"}}),a("let-input",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.async_thread_num,placeholder:e.$t("serverList.dlg.placeholder.thread"),required:"",pattern:"tars_nodejs"===e.configModal.model.server_type?"^[1-9][0-9]*$":"^([3-9]|[1-9][0-9]+)$","pattern-tip":e.$t("serverList.dlg.placeholder.thread")},model:{value:e.configModal.model.async_thread_num,callback:function(t){e.$set(e.configModal.model,"async_thread_num",t)},expression:"configModal.model.async_thread_num"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.defaultPath")}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.base_path,callback:function(t){e.$set(e.batchEditConf.itemEnable,"base_path",t)},expression:"batchEditConf.itemEnable.base_path"}}),a("let-input",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.base_path},model:{value:e.configModal.model.base_path,callback:function(t){e.$set(e.configModal.model,"base_path",t)},expression:"configModal.model.base_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.exePath")}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.exe_path,callback:function(t){e.$set(e.batchEditConf.itemEnable,"exe_path",t)},expression:"batchEditConf.itemEnable.exe_path"}}),a("let-input",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.exe_path},model:{value:e.configModal.model.exe_path,callback:function(t){e.$set(e.configModal.model,"exe_path",t)},expression:"configModal.model.exe_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.startScript")}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.start_script_path,callback:function(t){e.$set(e.batchEditConf.itemEnable,"start_script_path",t)},expression:"batchEditConf.itemEnable.start_script_path"}}),a("let-input",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.start_script_path},model:{value:e.configModal.model.start_script_path,callback:function(t){e.$set(e.configModal.model,"start_script_path",t)},expression:"configModal.model.start_script_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.stopScript")}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.stop_script_path,callback:function(t){e.$set(e.batchEditConf.itemEnable,"stop_script_path",t)},expression:"batchEditConf.itemEnable.stop_script_path"}}),a("let-input",{staticClass:"form_item_style",attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.stop_script_path},model:{value:e.configModal.model.stop_script_path,callback:function(t){e.$set(e.configModal.model,"stop_script_path",t)},expression:"configModal.model.stop_script_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.monitorScript"),itemWidth:"724px"}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.monitor_script_path,callback:function(t){e.$set(e.batchEditConf.itemEnable,"monitor_script_path",t)},expression:"batchEditConf.itemEnable.monitor_script_path"}}),a("let-input",{staticStyle:{width:"664px"},attrs:{size:"small",disabled:!e.batchEditConf.itemEnable.monitor_script_path},model:{value:e.configModal.model.monitor_script_path,callback:function(t){e.$set(e.configModal.model,"monitor_script_path",t)},expression:"configModal.model.monitor_script_path"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.privateTemplate"),labelWidth:"150px",itemWidth:"724px"}},[a("let-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.batchEditConf.show,expression:"!batchEditConf.show"}],staticClass:"form_item_disabled",model:{value:e.batchEditConf.itemEnable.profile,callback:function(t){e.$set(e.batchEditConf.itemEnable,"profile",t)},expression:"batchEditConf.itemEnable.profile"}}),a("let-input",{staticStyle:{width:"664px"},attrs:{size:"large",type:"textarea",rows:4,disabled:!e.batchEditConf.itemEnable.profile},model:{value:e.configModal.model.profile,callback:function(t){e.$set(e.configModal.model,"profile",t)},expression:"configModal.model.profile"}})],1)],1):a("div",{ref:"configFormLoading",staticClass:"loading-placeholder"})],1),a("let-modal",{attrs:{title:e.$t("serverList.table.servant.title"),width:"1200px",footShow:!1},on:{close:e.closeServantModal},model:{value:e.servantModal.show,callback:function(t){e.$set(e.servantModal,"show",t)},expression:"servantModal.show"}},[a("let-button",{staticClass:"tbm16",attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.configServant()}}},[e._v(e._s(e.$t("operate.add"))+" Servant")]),e.servantModal.model?a("let-table",{attrs:{data:e.servantModal.model,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("operate.servant"),prop:"servant"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.adress"),prop:"endpoint"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.thread"),prop:"thread_num"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.connections"),prop:"max_connections"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),prop:"queuecap"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),prop:"queuetimeout"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"120px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:t.row.servant+"@"+t.row.endpoint,expression:"scope.row.servant+'@'+scope.row.endpoint",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:e.onCopy,expression:"onCopy",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:e.onError,expression:"onError",arg:"error"}]},[e._v(e._s(e.$t("operate.copy")))]),a("let-table-operation",{on:{click:function(a){return e.configServant(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.deleteServant(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}],null,!1,3896885337)})],1):a("div",{ref:"servantModalLoading",staticClass:"loading-placeholder"})],1),a("let-modal",{attrs:{title:e.servantDetailModal.isNew?e.$t("operate.title.add")+" Servant":e.$t("operate.title.update")+" Servant",width:"800px",footShow:!!e.servantDetailModal.model},on:{"on-confirm":e.saveServantDetail,close:e.closeServantDetailModal,"on-cancel":e.closeServantDetailModal},model:{value:e.servantDetailModal.show,callback:function(t){e.$set(e.servantDetailModal,"show",t)},expression:"servantDetailModal.show"}},[e.servantDetailModal.model?a("let-form",{ref:"servantDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("serverList.servant.appService"),itemWidth:"724px"}},[a("span",[e._v(e._s(e.servantDetailModal.model.application)+"路"+e._s(e.servantDetailModal.model.server_name))])]),a("let-form-item",{attrs:{label:e.$t("serverList.servant.objName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.servant.c"),required:"","pattern-tip":e.$t("serverList.servant.obj")},model:{value:e.servantDetailModal.model.obj_name,callback:function(t){e.$set(e.servantDetailModal.model,"obj_name",t)},expression:"servantDetailModal.model.obj_name"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.numOfThread"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.servant.thread"),required:"",pattern:"^[1-9][0-9]*$","pattern-tip":e.$t("serverList.servant.thread")},model:{value:e.servantDetailModal.model.thread_num,callback:function(t){e.$set(e.servantDetailModal.model,"thread_num",t)},expression:"servantDetailModal.model.thread_num"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.servant.adress"),required:""}},[a("let-input",{ref:"endpoint",attrs:{size:"small",placeholder:"tcp -h 127.0.0.1 -t 60000 -p 12000",required:"",extraTip:e.isEndpointValid?"":e.$t("serverList.servant.error")},model:{value:e.servantDetailModal.model.endpoint,callback:function(t){e.$set(e.servantDetailModal.model,"endpoint",t)},expression:"servantDetailModal.model.endpoint"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.servant.nodeName"),required:""}},[a("let-input",{ref:"node_name",attrs:{size:"small",placeholder:"127.0.0.1",required:"",disabled:!e.servantDetailModal.isNew},model:{value:e.servantDetailModal.model.node_name,callback:function(t){e.$set(e.servantDetailModal.model,"node_name",t)},expression:"servantDetailModal.model.node_name"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.connections"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.max_connections,callback:function(t){e.$set(e.servantDetailModal.model,"max_connections",t)},expression:"servantDetailModal.model.max_connections"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.lengthOfQueue"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.queuecap,callback:function(t){e.$set(e.servantDetailModal.model,"queuecap",t)},expression:"servantDetailModal.model.queuecap"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.queueTimeout"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.queuetimeout,callback:function(t){e.$set(e.servantDetailModal.model,"queuetimeout",t)},expression:"servantDetailModal.model.queuetimeout"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.allowIP")}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.allow_ip,callback:function(t){e.$set(e.servantDetailModal.model,"allow_ip",t)},expression:"servantDetailModal.model.allow_ip"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.protocol"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:"tars",text:"TARS"},{value:"not_tars",text:e.$t("serverList.servant.notTARS")}]},model:{value:e.servantDetailModal.model.protocol,callback:function(t){e.$set(e.servantDetailModal.model,"protocol",t)},expression:"servantDetailModal.model.protocol"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.treatmentGroup"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.handlegroup,callback:function(t){e.$set(e.servantDetailModal.model,"handlegroup",t)},expression:"servantDetailModal.model.handlegroup"}})],1)],1):e._e()],1),a("let-modal",{staticClass:"more-cmd",attrs:{title:e.$t("operate.title.more"),width:"700px"},on:{"on-confirm":e.invokeMoreCmd,close:e.closeMoreCmdModal,"on-cancel":e.closeMoreCmdModal},model:{value:e.moreCmdModal.show,callback:function(t){e.$set(e.moreCmdModal,"show",t)},expression:"moreCmdModal.show"}},[e.moreCmdModal.model?a("let-form",{ref:"moreCmdForm"},[a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"setloglevel"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.logLevel")))]),a("let-select",{attrs:{size:"small",disabled:"setloglevel"!==e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.setloglevel,callback:function(t){e.$set(e.moreCmdModal.model,"setloglevel",t)},expression:"moreCmdModal.model.setloglevel"}},e._l(e.logLevels,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),e.isBatchShowCmd?e._e():a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"loadconfig"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.pushFile")))]),a("let-select",{attrs:{size:"small",placeholder:e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length?e.$t("pub.dlg.defaultValue"):e.$t("pub.dlg.noConfFile"),disabled:!(e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length)||"loadconfig"!==e.moreCmdModal.model.selected,required:"loadconfig"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.loadconfig,callback:function(t){e.$set(e.moreCmdModal.model,"loadconfig",t)},expression:"moreCmdModal.model.loadconfig"}},e._l(e.moreCmdModal.model.configs,(function(t){return a("let-option",{key:t.filename,attrs:{value:t.filename}},[e._v(e._s(t.filename))])})),1)],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"command"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.sendCommand")))]),a("let-input",{attrs:{size:"small",disabled:"command"!==e.moreCmdModal.model.selected,required:"command"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.command,callback:function(t){e.$set(e.moreCmdModal.model,"command",t)},expression:"moreCmdModal.model.command"}})],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"connection"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.serviceLink")))])],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{staticClass:"danger",attrs:{label:"undeploy_tars"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("operate.undeploy"))+" "+e._s(e.$t("common.service")))])],1)],1):e._e()],1),a("let-modal",{attrs:{width:"700px",title:e.$t("operate.templateView")},on:{close:e.closeTemplateMoadal},model:{value:e.templateMoadal.show,callback:function(t){e.$set(e.templateMoadal,"show",t)},expression:"templateMoadal.show"}},[a("div",{staticClass:"pre_con"},[e.templateMoadal.show?a("pre",[e._v("            "+e._s(e.templateMoadal.model.template)+"\n        ")]):e._e()]),a("div",{attrs:{slot:"foot"},slot:"foot"})]),a("let-modal",{attrs:{width:"55%",footShow:!1,title:e.$t("operate.templateView")},on:{close:e.closeStatusModal},model:{value:e.serverStatusModal.show,callback:function(t){e.$set(e.serverStatusModal,"show",t)},expression:"serverStatusModal.show"}},[e.serverStatusModal.show?a("let-table",{ref:"serverStatusListLoading",attrs:{data:e.serverStatusModal.model.statusList,stripe:"","empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"20%",title:e.$t("serverList.table.th.serviceID")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.application+"."+t.row.server_name))]),a("br"),a("span",[e._v(e._s(t.row.node_name))])]}}],null,!1,3206327300)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result")},scopedSlots:e._u([{key:"default",fn:function(t){return a("div",{staticClass:"pre_con"},[a("pre",{style:e.serverStatusStyle(t.row.ret_code)},[e._v(e._s(t.row.err_msg))])])}}],null,!1,1143027368)})],1):e._e()],1)],1)}),P=[],A=(a("99af"),a("4de4"),a("7db0"),a("d81d"),a("fb6a"),a("d3b7"),a("5530")),F=a("78e2"),J=a("4eb5"),R=a.n(J);o["default"].use(R.a);var V={id:[],server_name:"batchedit",node_name:"batchedit",server_type:"tars_cpp",enable_set:!1,set_name:"",set_area:"",set_group:"",bak_flag:!0,templates:[],template_name:"tars.default",profile:"",async_thread_num:3,base_path:"",exe_path:"",start_script_path:"",stop_script_path:"",monitor_script_path:"",enable_group:!1,ip_group_name:""},W={components:{batchOperation:F["a"]},name:"ServerManage",data:function(){return{isCheckedAll:!1,serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},serverList:[],groupList:[],serverNotifyList:[],getServerNotifyListTimer:0,pageNum:1,pageSize:20,total:1,serverPageNum:1,serverPageSize:16,serverTotal:1,serverTypes:["tars_cpp","tars_java","tars_php","tars_nodejs","not_tars","tars_go"],configModal:{show:!1,model:null,batch:!1},batchEditConf:{show:!0,itemEnable:null},servantModal:{show:!1,model:null,currentServer:null},servantDetailModal:{show:!1,isNew:!0,model:null},logLevels:["NONE","TARS","DEBUG","INFO","WARN","ERROR"],moreCmdModal:{show:!1,model:null,currentServer:null},templateMoadal:{show:!1,model:null},serverStatusModal:{show:!1,model:null},failCount:0,isBatchShowCmd:!1}},props:["treeid"],computed:{showOthers:function(){return 5===this.serverData.level},isEndpointValid:function(){return!(!this.servantDetailModal.model||!this.servantDetailModal.model.endpoint)&&this.checkServantEndpoint(this.servantDetailModal.model.endpoint)},hasCheckedServer:function(){return 0!==this.serverList.filter((function(e){return!0===e.isChecked})).length},checkedServers:function(){return this.serverList.filter((function(e){return!0===e.isChecked}))}},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.serverList.forEach((function(t){t.isChecked=e}))}},methods:{getServerList:function(e){var t=this;e||(e=this.serverPageNum||1);var a=this.$refs.serverListLoading.$loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.treeid,page_size:this.serverPageSize,cur_page:e,is_page:!(this.serverNotifyList&&this.showOthers)}).then((function(o){a.hide(),t.serverNotifyList&&t.showOthers?(o.forEach((function(e){e.isChecked=!1,e.present_state_in_node="",e.is_node_ok=!0,e.query_ret_code=0,e.setting_state=e.setting_state.charAt(0).toUpperCase()+e.setting_state.slice(1)})),t.serverList=o):(o.rows.forEach((function(e){e.isChecked=!1,e.present_state_in_node="",e.is_node_ok=!0,e.query_ret_code=0,e.setting_state=e.setting_state.charAt(0).toUpperCase()+e.setting_state.slice(1)})),t.serverPageNum=e,t.serverTotal=Math.ceil(o.count/t.serverPageSize),t.serverList=o.rows),t.updateServerState()})).catch((function(e){a.hide(),t.$confirm(e.err_msg||e.message||t.$t("serverList.msg.fail"),t.$t("common.alert")).then((function(){t.getServerList()}))})),this.isCheckedAll=!1},updateServerState:function(){var e=this;if(0!=this.serverList.length){var t=this.serverList.map((function(e){return{application:e.application,server_name:e.server_name,node_name:e.node_name}}));this.$ajax.postJSON("/server/api/server_state",{queryState:t}).then((function(t){e.serverList.forEach((function(e){var a=t.filter((function(t){return t.application==e.application&&t.server_name==e.server_name&t.node_name==e.node_name}));e.present_state_in_node=a[0].present_state_in_node,e.is_node_ok=a[0].is_node_ok,e.query_ret_code=a[0].query_ret_code}))}))}},getServerNotifyList:function(e){var t=this;this.showOthers&&(e||(e=this.pageNum||1),this.$ajax.getJSON("/server/api/server_notify_list",{tree_node_id:this.treeid,page_size:this.pageSize,curr_page:e}).then((function(a){t.pageNum=e,t.total=Math.ceil(a.count/t.pageSize),t.serverNotifyList=a.rows})).catch((function(e){t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))})))},statusStyle:function(e){return e=e||"","restart"==e||-1!=e.indexOf("[succ]")?"color: green":"stop"==e||-1!=e.indexOf("[alarm]")||-1!=e.indexOf("error")||-1!=e.indexOf("ERROR")?"color: red":""},gotoPage:function(e){this.getServerNotifyList(e)},gotoServerPage:function(e){this.getServerList(e)},getTemplateList:function(){var e=this;this.$ajax.getJSON("/server/api/template_name_list").then((function(t){e.configModal.model?e.configModal.model.templates=t:e.configModal.model={templates:t}})).catch((function(t){e.$tip.error("".concat(e.$t("serverList.restart.failed"),": ").concat(t.err_msg||t.message))}))},getGroupList:function(){var e=this;this.$ajax.getJSON("/server/api/dict_idc").then((function(t){var a=[{key:" ",value:"鑷姩"}];t.forEach((function(e){a.push({key:e.group_name,value:e.group_name+"-"+e.group_name_cn})})),e.configModal.model?e.configModal.model.groupList=a:e.configModal.model={groupList:a}})).catch((function(t){e.$tip.error("".concat(e.$t("getGroupList.restart.failed"),": ").concat(t.err_msg||t.message))}))},getServerConfig:function(e){var t=this,a=this.$loading.show({target:this.$refs.configFormLoading});this.$ajax.getJSON("/server/api/server",{id:e}).then((function(e){a.hide(),t.configModal.model?t.configModal.model=Object.assign({},t.configModal.model,e):(e.templates=[],t.configModal.model=e)})).catch((function(e){a.hide(),t.closeConfigModal(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))},configServer:function(e){for(var t in this.configModal.show=!0,this.getTemplateList(),this.getGroupList(),this.getServerConfig(e),this.batchEditConf.itemEnable=Object(A["a"])({},V),this.batchEditConf.itemEnable)this.batchEditConf.itemEnable[t]=!0},batchConfigServer:function(){var e=this.serverList.filter((function(e){return!0===e.isChecked})).map((function(e,t){return e.id}));if(1!=e.length)for(var t in this.configModal.show=!0,this.batchEditConf.show=!1,this.getTemplateList(),this.getGroupList(),this.configModal.model=Object(A["a"])({},V),this.configModal.model.id=e,this.batchEditConf.itemEnable=Object(A["a"])({},V),this.batchEditConf.itemEnable)this.batchEditConf.itemEnable[t]=!1;else this.configServer(e[0])},saveConfig:function(e){var t=this;if(this.$refs.configForm.validate()){if(!e)for(var a in this.batchEditConf.itemEnable.id=!0,this.configModal.model.enable_group&&(this.batchEditConf.itemEnable.ip_group_name=!0),this.batchEditConf.itemEnable)this.batchEditConf.itemEnable[a]||delete this.configModal.model[a];var o=e?"/server/api/update_server":"/server/api/batch_update_server",s=this.$Loading.show();this.$ajax.postJSON(o,Object(A["a"])({isBak:this.configModal.model.bak_flag},this.configModal.model)).then((function(e){s.hide(),t.getServerList(),t.closeConfigModal(),t.$tip.success(t.$t("serverList.restart.success"))})).catch((function(e){s.hide(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.message||e.err_msg))}))}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1,this.batchEditConf.show=!0,this.configModal.model=null},checkTaskStatus:function(e,t){var a=this;return new Promise((function(o,s){a.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(t){1===t.status||0===t.status?setTimeout((function(){o(a.checkTaskStatus(e))}),3e3):2===t.status?o("taskid: ".concat(t.task_no)):s(new Error("taskid: ".concat(t.task_no)))})).catch((function(i){t?s(new Error(i.err_msg||i.message||a.$t("common.networkErr"))):setTimeout((function(){o(a.checkTaskStatus(e,!0))}),3e3)}))}))},updateFlowStatus:function(e,t,a){var o=this,s=this.$Loading.show();this.$ajax.postJSON("/server/api/update_flowstatus",{server_id:e,status:t,node_list:[a]}).then((function(e){s.hide(),o.getServerList(),o.$t("common.success")})).catch((function(e){s.hide(),o.getServerList(),o.$tip.error({title:"update flow status fail.",message:e.err_msg||e.message||o.$t("common.networkErr")})}))},addTask:function(e,t,a){var o=this,s=this.$Loading.show();this.$ajax.postJSON("/server/api/add_task",{serial:!0,items:[{server_id:e,command:t}]}).then((function(e){return o.checkTaskStatus(e).then((function(e){s.hide(),o.getServerList(),o.$tip.success({title:a.success,message:e})})).catch((function(e){throw e}))})).catch((function(e){s.hide(),o.getServerList(),o.$tip.error({title:a.error,message:e.err_msg||e.message||o.$t("common.networkErr")})}))},restartServer:function(e){this.addTask(e,"restart",{success:this.$t("serverList.restart.success"),error:this.$t("serverList.restart.failed")})},stopServer:function(e){var t=this;this.$confirm(this.$t("serverList.stopService.msg.stopService"),this.$t("common.alert")).then((function(){t.addTask(e,"stop",{success:t.$t("serverList.restart.success"),error:t.$t("serverList.restart.failed")})}))},undeployServer:function(e){var t=this;"active"===e.present_state?this.$tip.error("".concat(this.$t("serverList.tips.undeploy"))):this.$confirm(this.$t("serverList.dlg.msg.undeploy"),this.$t("common.alert")).then((function(){t.addTask(e.id,"undeploy_tars",{success:t.$t("serverList.undeploy.success"),error:t.$t("serverList.undeploy.failed")})}))},undeployServers:function(e){var t=this,a=e.filter((function(e){return"active"===e.present_state}));a.length>0?this.$tip.error("".concat(this.$t("serverList.tips.undeploy"))):this.$confirm(this.$t("serverList.dlg.msg.undeploy"),this.$t("common.alert")).then((function(){e.forEach((function(e){t.addTask(e.id,"undeploy_tars",{success:t.$t("serverList.undeploy.success"),error:t.$t("serverList.undeploy.failed")})}))}))},manageServant:function(e){var t=this;this.servantModal.show=!0;var a=this.$loading.show({target:this.$refs.servantModalLoading});this.$ajax.getJSON("/server/api/adapter_conf_list",{id:e.id}).then((function(o){a.hide(),t.servantModal.model=o,t.servantModal.currentServer=e})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))},closeServantModal:function(){this.servantModal.show=!1,this.servantModal.model=null,this.servantModal.currentServer=null},configServant:function(e){if(this.servantDetailModal.model={application:this.servantModal.currentServer.application,server_name:this.servantModal.currentServer.server_name,obj_name:"",node_name:"",endpoint:"",servant:"",thread_num:"",max_connections:"200000",queuecap:"10000",queuetimeout:"60000",allow_ip:"",protocol:"not_tars",handlegroup:""},this.servantDetailModal.isNew=!0,e){var t=this.servantModal.model.find((function(t){return t.id===e}));t.obj_name=t.servant.split(".")[2],this.servantDetailModal.model=Object.assign({},this.servantDetailModal.model,t),this.servantDetailModal.isNew=!1}this.servantDetailModal.show=!0},closeServantDetailModal:function(){this.$refs.servantDetailForm&&this.$refs.servantDetailForm.resetValid(),this.servantDetailModal.show=!1,this.servantDetailModal.model=null},checkServantEndpoint:function(e){var t=e.split(/\s-/),a=/^tcp|udp|ssl$/i,o=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/i,s=/^h\s[^\s]+/i,i=/^t\s([1-9]|[1-9]\d+)$/i,l=/^p\s\d{2,5}$/i,r=!0;if(a.test(t[0])){for(var n=0,c=1;c<t.length;c++){if(s&&s.test(t[c])){n++;var d=t[c].split(/\s/)[1];o.test(d)&&(this.servantDetailModal.model.node_name=d),s=null}if(i&&i.test(t[c])&&(n++,i=null),l&&l.test(t[c])){var m=t[c].substring(2);m<0||m>65535||n++,l=null}}r=3===n}else r=!1;return r},saveServantDetail:function(){var e=this;if(this.$refs.servantDetailForm.validate()){var t=this.$Loading.show();if(this.servantDetailModal.isNew){var a=this.servantDetailModal.model;a.servant=[a.application,a.server_name,a.obj_name].join("."),this.$ajax.postJSON("/server/api/add_adapter_conf",a).then((function(a){t.hide(),e.servantModal.model.unshift(a),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}else this.servantDetailModal.model.servant=this.servantDetailModal.model.application+"."+this.servantDetailModal.model.server_name+"."+this.servantDetailModal.model.obj_name,this.$ajax.postJSON("/server/api/update_adapter_conf",this.servantDetailModal.model).then((function(a){t.hide(),e.servantModal.model=e.servantModal.model.map((function(e){return e.id===a.id?a:e})),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},deleteServant:function(e){var t=this;this.$confirm(this.$t("serverList.servant.a"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_adapter_conf",{id:e}).then((function(o){a.hide(),t.servantModal.model=t.servantModal.model.filter((function(t){return t.id!==e})),t.$tip.success(t.$t("common.success"))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))}))},showMoreCmd:function(e){var t=this;this.moreCmdModal.model={selected:"setloglevel",setloglevel:"NONE",loadconfig:"",command:"",configs:null},this.moreCmdModal.unwatch=this.$watch("moreCmdModal.model.selected",(function(){t.$refs.moreCmdForm&&t.$refs.moreCmdForm.resetValid()})),this.moreCmdModal.show=!0,this.moreCmdModal.currentServer=e,this.isBatchShowCmd=!1,this.$ajax.getJSON("/server/api/config_file_list",{level:5,application:e.application,server_name:e.server_name}).then((function(e){t.moreCmdModal.model&&(t.moreCmdModal.model.configs=e)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},batchShowMoreCmd:function(){var e=this,t=this.serverList.filter((function(e){return!0===e.isChecked}));this.moreCmdModal.model={selected:"setloglevel",setloglevel:"NONE",loadconfig:"",command:"",configs:null},this.moreCmdModal.unwatch=this.$watch("moreCmdModal.model.selected",(function(){e.$refs.moreCmdForm&&e.$refs.moreCmdForm.resetValid()})),this.moreCmdModal.show=!0,this.isBatchShowCmd=!0,1===t.length&&(this.isBatchShowCmd=!1,this.moreCmdModal.currentServer=t[0],this.$ajax.getJSON("/server/api/config_file_list",{level:5,application:t[0].application,server_name:t[0].server_name}).then((function(t){e.moreCmdModal.model&&(e.moreCmdModal.model.configs=t)})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))})))},sendCommand:function(e,t,a){var o=this,s=this.$Loading.show();this.$ajax.getJSON("/server/api/send_command",{server_ids:e,command:t}).then((function(e){s.hide();var t=e[0].err_msg.replace(/\n/g,"<br>");if(0!==e[0].ret_code)throw new Error("".concat(e[0].application,".").concat(e[0].server_name,"_").concat(e[0].node_name,":<br>").concat(t));var i={title:o.$t("common.success"),message:"".concat(e[0].application,".").concat(e[0].server_name,"_").concat(e[0].node_name,":<br>").concat(t)};a&&(i.duration=0),o.$tip.success(i)})).catch((function(e){s.hide();var t={title:o.$t("common.error"),message:e.err_msg||e.message};a&&(t.duration=0),o.$tip.error(t)}))},invokeMoreCmd:function(){var e=this;if(this.isBatchShowCmd){var t=this.serverList.filter((function(e){return!0===e.isChecked})),a=this.moreCmdModal.model;"undeploy_tars"===a.selected?this.undeployServers(t):"setloglevel"===a.selected?t.forEach((function(t){e.sendCommand(t.id,"tars.setloglevel ".concat(a.setloglevel))})):"command"===a.selected&&this.$refs.moreCmdForm.validate()?t.forEach((function(t){e.sendCommand(t.id,a.command,!0)})):"connection"===a.selected&&t.forEach((function(t){e.sendCommand(t.id,"tars.connection",!0)}))}else{var o=this.moreCmdModal.model,s=this.moreCmdModal.currentServer;"undeploy_tars"===o.selected?this.undeployServer(s):"setloglevel"===o.selected?this.sendCommand(s.id,"tars.setloglevel ".concat(o.setloglevel)):"loadconfig"===o.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(s.id,"tars.loadconfig ".concat(o.loadconfig)):"command"===o.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(s.id,o.command,!0):"connection"===o.selected&&this.sendCommand(s.id,"tars.connection",!0)}this.closeMoreCmdModal()},closeMoreCmdModal:function(){this.$refs.moreCmdForm&&this.$refs.moreCmdForm.resetValid(),this.moreCmdModal.unwatch&&this.moreCmdModal.unwatch(),this.moreCmdModal.show=!1,this.moreCmdModal.model=null,this.isBatchShowCmd=!1},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},onCopy:function(e){this.$tip.success(this.$t("common.success"))},onError:function(e){this.$tip.error(this.$t("serverList.servant.copyErr"))},showTemplateView:function(e){var t=this,a=this.$Loading.show();this.$ajax.getJSON("/server/api/view_server_merge",{application:e.application,serverName:e.server_name,nodeName:e.node_name}).then((function(e){a.hide(),t.templateMoadal.model={template:"\n".concat(e.template)},t.templateMoadal.show=!0})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},closeTemplateMoadal:function(){this.templateMoadal.show=!1,this.templateMoadal.model=null},showStatusModal:function(e){this.getServerStatusDatil(e.id)},batchshowStatusModal:function(){var e=this.checkedServers.map((function(e){return e.id}));this.getServerStatusDatil(e)},getServerStatusDatil:function(e){var t=this,a=this.$Loading.show();this.$ajax.getJSON("/server/api/send_command",{server_ids:e,command:"tars.viewstatus"}).then((function(e){a.hide(),e.forEach((function(e){e.service_id="".concat(e.application,".").concat(e.server_name,"_").concat(e.node_name),0==e.ret_code?e.err_msg="".concat(t.$t("serverList.tips.success"),"\n")+e.err_msg:e.err_msg="".concat(t.$t("serverList.tips.error"),"\n")+e.err_msg})),t.serverStatusModal.model={statusList:e},t.serverStatusModal.show=!0})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},serverStatusStyle:function(e){return-1==e?"color: red":"color : #9096A3 "},closeStatusModal:function(){this.serverStatusModal.model=null,this.serverStatusModal.show=!1}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getServerList(),this.getServerNotifyList(1)},beforeRouteEnter:function(e,t,a){a(a((function(e){e.getServerNotifyList(1)})))},beforeRouteUpdate:function(e,t,a){a(a((function(e){e.getServerNotifyList(1)})))},linkDownload:function(e){window.open(e,"_blank")}},U=W,B=(a("2e66"),Object(x["a"])(U,j,P,!1,null,null,null)),H=B.exports,K=a("67ac"),Z=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_publish"},[a("div",[e.serverList&&e.serverList.length>0?a("let-table",{ref:"table",attrs:{data:e.serverList,title:e.$t("serverList.title.serverList"),"empty-msg":e.$t("common.noService")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}],null,!1,1693185143)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.enableSet")},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.enable_set?a("p",{staticStyle:{"max-width":"200px"}},[e._v(" "+e._s(e.$t("common.set.setName"))+"锛�"+e._s(t.row.set_name)),a("br"),e._v(" "+e._s(e.$t("common.set.setArea"))+"锛�"+e._s(t.row.set_area)),a("br"),e._v(" "+e._s(e.$t("common.set.setGroup"))+"锛�"+e._s(t.row.set_group)+" ")]):a("span",[e._v(e._s(e.$t("common.disable")))])]}}],null,!1,2963707083)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return["Inactive"===t.row.setting_state?a("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(t.row.setting_state))]):a("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(t.row.setting_state))])]}}],null,!1,4280848039)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return["0"!=t.row.query_ret_code?a("span",{staticStyle:{color:"#FF0000"}},[e._v("Inactive")]):"Active"===t.row.present_state_in_node?a("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(t.row.present_state_in_node))]):a("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(t.row.present_state_in_node))])]}}],null,!1,2058566643)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(t.row.patch_time)))])]}}],null,!1,3144837894)}),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.totalPage,page:e.page},on:{change:e.changePage},slot:"pagination"}),a("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.uploadPublishModal}},[e._v(e._s(e.$t("pub.dlg.upload")))]),e._v(" "),a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){return e.openPublishModal(!1)}}},[e._v(e._s(e.$t("pub.btn.pub")))]),e._v(" "),e.serverList&&e.serverList.length>0?a("let-button",{attrs:{size:"small"},on:{click:e.gotoHistory}},[e._v(e._s(e.$t("pub.btn.history")))]):e._e(),e._v(" "),a("let-button",{attrs:{size:"small"},on:{click:e.gotoPackage}},[e._v(e._s(e.$t("managePackage.title")))])],1)],1):e._e(),a("let-modal",{attrs:{title:e.$t("index.rightView.tab.patch"),width:"880px",footShow:!1},on:{close:e.closePublishModal,"on-confirm":e.savePublishServer},model:{value:e.publishModal.show,callback:function(t){e.$set(e.publishModal,"show",t)},expression:"publishModal.show"}},[e.publishModal.model?a("let-form",{ref:"publishForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("serverList.servant.appService")}},[e._v(" "+e._s(e.publishModal.model.application)+"路"+e._s(e.publishModal.model.server_name)+" ")]),a("let-form-item",{attrs:{label:e.$t("pub.dlg.ip")}},e._l(e.publishModal.model.serverList,(function(t){return a("div",{key:t.id},[e._v(e._s(t.node_name))])})),0),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("let-input",{model:{value:e.publishModal.model.update_text,callback:function(t){e.$set(e.publishModal.model,"update_text",t)},expression:"publishModal.model.update_text"}})],1),e.patchRadioData.length>1?a("let-form-item",{attrs:{label:e.$t("pub.dlg.patchType")}},[a("let-radio-group",{attrs:{type:"button",size:"small",data:e.patchRadioData},on:{change:e.patchChange},model:{value:e.patchType,callback:function(t){e.patchType=t},expression:"patchType"}})],1):e._e(),e.publishModal.model.show?a("let-form-item",{attrs:{label:e.$t("pub.dlg.releaseVersion")}},[a("div",[a("let-select",{staticStyle:{width:"87%"},attrs:{size:"small",required:"","required-tip":e.$t("pub.dlg.ab")},model:{value:e.publishModal.model.patch_id,callback:function(t){e.$set(e.publishModal.model,"patch_id",t)},expression:"publishModal.model.patch_id"}},e._l(e.publishModal.model.patchList,(function(t,o){return a("let-option",{key:t.id,attrs:{value:t.id,title:t.id+"|PubTime:"+t.publish_time+"|UploadTime:"+t.upload_time+"|"+t.upload_user+"|"+t.comment}},[a("div",[a("span",0==o?{domProps:{innerHTML:e._s(e.imgNew)}}:{domProps:{innerHTML:e._s(e.imgSpace)}}),e.includes(e.nowVersion,t.id)?a("span",{domProps:{innerHTML:e._s(e.imgCur)}}):a("span",{domProps:{innerHTML:e._s(e.imgSpace)}}),e._v(" "+e._s(t.id)+"| "+e._s("PubTime:"+t.publish_time)+" | "+e._s("UploadTime:"+t.upload_time)+" |"+e._s(t.upload_user)+"| "+e._s(t.comment)+" ")])])})),1),e._v(" "),a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.showUploadModal}},[e._v(e._s(e.$t("pub.dlg.upload")))])],1)]):a("let-form-item",{attrs:{label:e.$t("serverList.table.th.version")}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty"),requred:""},model:{value:e.tagVersion,callback:function(t){e.tagVersion=t},expression:"tagVersion"}},e._l(e.tagList,(function(t){return a("let-option",{key:""+t.version,attrs:{value:t.path+"--"+t.version}},[e._v(e._s(t.version))])})),1),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.addCompileTask}},[e._v(e._s(e.$t("pub.dlg.compileAndPublish")))]),e._e()],1),a("let-form-item",[a("div",{staticClass:"elegant-switch"},[a("let-switch",{attrs:{size:"large"},on:{change:e.changeElegantStatus},model:{value:e.elegantChecked,callback:function(t){e.elegantChecked=t},expression:"elegantChecked"}},[a("span",{attrs:{slot:"open"},slot:"open"},[e._v(e._s(e.$t("pub.dlg.elegantPublish")))]),a("span",{attrs:{slot:"close"},slot:"close"},[e._v(e._s(e.$t("pub.dlg.commomPublish")))])]),e._v(" "),e.elegantChecked?a("div",{staticClass:"elegant-num"},[a("span",{staticClass:"elegant-label"},[e._v(e._s(e.$t("pub.dlg.elegantEachNum")))]),a("let-input-number",{staticClass:"elegant-box",attrs:{max:20,min:1,step:1,size:"small"},model:{value:e.eachNum,callback:function(t){e.eachNum=t},expression:"eachNum"}})],1):e._e()],1)]),e._v(" "),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.savePublishServer}},[e._v(e._s(e.$t("common.patch")))]),e._v(" "),a("let-button",{attrs:{size:"small"},on:{click:e.gotoPackage}},[e._v(e._s(e.$t("managePackage.title")))])],1):e._e()],1),a("let-modal",{attrs:{title:e.$t("pub.dlg.upload"),width:"880px",footShow:!1},on:{"on-cancel":e.closeUploadModal},model:{value:e.uploadModal.show,callback:function(t){e.$set(e.uploadModal,"show",t)},expression:"uploadModal.show"}},[e.uploadModal.model?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadPatchPackage(t)}}},[a("let-form-item",{attrs:{label:e.$t("pub.dlg.releasePkg"),itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue")},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.choose"))+" ")]),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.uploadModal.model.comment,callback:function(t){e.$set(e.uploadModal.model,"comment",t)},expression:"uploadModal.model.comment"}})],1),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1),a("PublishStatus",{ref:"publishStatus"})],1),a("let-modal",{attrs:{width:"1000px",footShow:!1,title:e.$t("managePackage.title")},model:{value:e.showPackage,callback:function(t){e.showPackage=t},expression:"showPackage"}},[a("let-table",{ref:"packageTable",attrs:{data:e.packageList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c1"),prop:"id"}}),a("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c2"),prop:"server"}}),a("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c7"),prop:"upload_user"}}),a("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c3"),prop:"upload_time"}}),a("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c4"),prop:"comment"}}),a("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c5"),prop:"publish_time"}}),a("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c6")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",[a("a",{staticClass:"let-table__operation",attrs:{target:"_blank",href:"/pages/server/api/download_package?id="+t.row.id+"&name="+t.row.tgz}},[e._v(e._s(e.$t("operate.download")))])]),a("let-table-operation",{on:{click:function(a){return e.deletePackage(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])}),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.packageTotalPage,page:e.packagePage},on:{change:e.changePackagePage},slot:"pagination"}),a("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showPackage=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1)],1),a("let-modal",{attrs:{width:"1200px",footShow:!1,title:e.$t("pub.btn.history")},model:{value:e.showHistory,callback:function(t){e.showHistory=t},expression:"showHistory"}},[a("let-form",{nativeOn:{submit:function(t){return t.preventDefault(),e.getHistoryList(t)}}},[a("let-form-item",{attrs:{itemWidth:"100%",label:e.$t("pub.date")}},[a("let-date-range-picker",{attrs:{start:e.startTime,end:e.endTime},on:{"update:start":function(t){e.startTime=t},"update:end":function(t){e.endTime=t}}}),a("let-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),a("let-table",{ref:"historyTable",attrs:{data:e.totalHistoryList,title:e.$t("historyList.title"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("historyList.table.th.c1"),prop:"create_time"}}),a("let-table-column",{attrs:{title:e.$t("serverList.servant.taskID"),prop:"task_no"}}),a("let-table-column",{attrs:{title:e.$t("historyList.table.th.c2")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.serial?e.$t("common.yes"):e.$t("common.no")))])]}}])}),a("let-table-column",{attrs:{title:e.$t("historyList.table.th.c3"),prop:"userName"}}),a("let-table-column",{attrs:{title:e.$t("serverList.dlg.title.taskStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.statusMap[t.row.status]||"-"))])]}}])}),a("let-table-column",{attrs:{title:e.$t("historyList.table.th.c4")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.viewTask(t.row.task_no)}}},[e._v(e._s(e.$t("operate.view")))]),a("let-table-operation",{on:{click:function(a){return e.deleteTask(t.row.task_no)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])}),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.historyTotalPage,page:e.historyPage},on:{change:e.changeHistoryPage},slot:"pagination"}),a("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showHistory=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1)],1),a("let-modal",{attrs:{title:e.$t("historyList.table.th.c4"),width:"1200px",footShow:!1},on:{"on-cancel":function(t){e.taskModal.show=!1}},model:{value:e.taskModal.show,callback:function(t){e.$set(e.taskModal,"show",t)},expression:"taskModal.show"}},[e.taskModal.model?a("let-table",{attrs:{data:e.taskModal.model.items}},[a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c1"),prop:"item_no"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c5"),prop:"command"}}),a("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),a("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}}),a("let-table-column",{attrs:{title:e.$t("common.status"),prop:"status_info"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c7"),prop:"execute_info"}})],1):e._e()],1),a("let-modal",{attrs:{title:e.$t("pub.dlg.conf"),width:"800px",footShow:!0},on:{"on-confirm":e.saveCompilerUrl,"on-cancel":function(t){e.publishUrlConfModal.show=!1}},model:{value:e.publishUrlConfModal.show,callback:function(t){e.$set(e.publishUrlConfModal,"show",t)},expression:"publishUrlConfModal.show"}},[e.publishUrlConfModal.model?a("let-form",{ref:"compilerForm",attrs:{itemWidth:"100%",required:""}},[a("let-form-item",{attrs:{label:e.$t("pub.dlg.tag")}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("pub.tips.tag"),"required-tip":e.$t("deployService.table.tips.empty"),required:""},model:{value:e.publishUrlConfModal.model.tag,callback:function(t){e.$set(e.publishUrlConfModal.model,"tag",t)},expression:"publishUrlConfModal.model.tag"}})],1)],1):e._e()],1),a("let-modal",{attrs:{title:e.$t("pub.dlg.compileProgress"),width:"880px",footShow:!1},model:{value:e.compilerModal.show,callback:function(t){e.$set(e.compilerModal,"show",t)},expression:"compilerModal.show"}},[e.compilerModal.model?a("let-table",{attrs:{data:e.compilerModal.model.progress}},[a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c8"),prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return["1"==t.row.state?a("span",{staticClass:"running"},[e._v(e._s(t.row.status))]):"2"==t.row.state?a("span",{staticClass:"success"},[e._v(e._s(t.row.status))]):a("span",{staticClass:"stop"},[e._v(e._s(t.row.status))])]}}],null,!1,3193835083)}),a("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),a("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}})],1):e._e()],1)],1)},G=[],Y=(a("caad"),a("b64b"),a("2532"),a("843c"),a("2ca0"),a("acfd")),Q={name:"ServerPublish",components:{PublishStatus:Y["a"]},data:function(){return{imgNew:'<img class="logo" src="/static/img/new.gif">',imgCur:'<img class="logo" src="/static/img/current.gif">',imgSpace:'<img class="logo" src="/static/img/space.png">',nowVersion:[],activeKey:"",treeData:[],totalServerList:[],serverList:[],isCheckedAll:!0,totalPage:0,pageSize:20,page:1,showPackage:!1,packageList:[],packageTotalPage:0,packagePage:1,packagePageSize:20,publishModal:{show:!1,model:null,elegant:!1,eachnum:1},statusConfig:{0:this.$t("serverList.restart.notStart"),1:this.$t("serverList.restart.running"),2:this.$t("serverList.restart.success"),3:this.$t("serverList.restart.failed"),4:this.$t("serverList.restart.cancel"),5:this.$t("serverList.restart.parial")},statusMap:{0:"EM_T_NOT_START",1:"EM_T_RUNNING",2:"EM_T_SUCCESS",3:"EM_T_FAILED",4:"EM_T_CANCEL",5:"EM_T_PARIAL"},showHistory:!1,startTime:"",endTime:"",totalHistoryList:[],historyList:[],historyTotalPage:0,historyPage:1,historyPageSize:20,taskModal:{show:!1,modal:!0},uploadModal:{show:!1,model:null},patchType:"patch",patchRadioData:[{value:"patch",text:this.$t("pub.dlg.upload")}],tagList:[],tagVersion:"",publishUrlConfModal:{show:!1,model:{tag:"",compiler:"",task:""}},compilerModal:{show:!1,model:null},pkgUpload:{show:!1,model:null},elegantChecked:!1,eachNum:0}},props:["treeid"],methods:{getCompileConf:function(){var e=this;this.$ajax.getJSON("/server/api/get_compile_conf").then((function(t){t.enable&&e.patchRadioData.push({value:"compile",text:e.$t("pub.dlg.compileAndPublish")})})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getServerList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.treeid}).then((function(a){t.hide();var o=a||[];o.forEach((function(t){t.isChecked=e.isCheckedAll,t.present_state_in_node="",t.query_ret_code=0,t.setting_state=t.setting_state.charAt(0).toUpperCase()+t.setting_state.slice(1)})),e.totalServerList=o,e.totalPage=Math.ceil(e.totalServerList.length/e.pageSize),e.page=1,e.updateServerList(),e.updateServerState()})).catch((function(a){t.hide(),e.$confirm(a.err_msg||a.message||e.$t("serverList.table.msg.fail")).then((function(){e.getServerList()}))}))},updateServerState:function(){var e=this;if(0!=this.serverList.length){var t=this.serverList.map((function(e){return{application:e.application,server_name:e.server_name,node_name:e.node_name}}));this.$ajax.postJSON("/server/api/server_state",{queryState:t}).then((function(t){e.serverList.forEach((function(e){var a=t.filter((function(t){return t.application==e.application&&t.server_name==e.server_name&t.node_name==e.node_name}));e.present_state_in_node=a[0].present_state_in_node,e.query_ret_code=a[0].query_ret_code}))}))}},changePage:function(e){this.page=e},changeElegantStatus:function(e){this.checked=e,e&&(this.eachNum=1)},uploadPublishModal:function(){this.openPublishModal(!0)},openPublishModal:function(e){var t=this,a=this.serverList.filter((function(e){return e.isChecked}));if(a.length<=0)this.$tip.warning(this.$t("pub.dlg.a"));else{var o=a[0];this.publishModal.model={application:o.application,server_name:o.server_name,serverList:a,patchList:[],patch_id:"",update_text:"",show:!0},this.getNewVersionList(o).then((function(e){0!=e.length&&e.forEach((function(e){t.nowVersion.push(e.patch_version)}))})),this.getPatchList(o.application,o.server_name,1,50).then((function(a){t.publishModal.model.patchList=a.rows,t.publishModal.show=!0,e&&t.showUploadModal()}))}},getPatchList:function(e,t,a,o){var s=this;return this.$ajax.getJSON("/server/api/server_patch_list",{application:e,module_name:t,curr_page:a,page_size:o}).catch((function(e){s.$tip.error("".concat(s.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getNewVersionList:function(e){var t=this;return this.$ajax.getJSON("/server/api/server_now_version",{application:e.application,serverName:e.server_name,enableSet:e.enable_set,setName:e.set_name,setArea:e.set_area,setGroup:e.set_group,nodeName:e.node_name}).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},closePublishModal:function(){this.publishModal.show=!1,this.nowVersion=[],this.publishModal.modal=null,this.patchType="patch",this.$refs.publishForm.resetValid()},savePublishServer:function(e,t){this.$refs.publishForm.validate()&&(this.publishModal.elegant=this.elegantChecked,this.publishModal.eachnum=this.eachNum,this.publishModal.command=t?"grace_patch_tars":"patch_tars",this.$refs.publishStatus.savePublishServer(this.publishModal,this.closePublishModal))},closeFinishModal:function(){this.$refs.finishForm.resetValid()},updateServerList:function(){var e=(this.page-1)*this.pageSize,t=this.page*this.pageSize;this.serverList=this.totalServerList.slice(e,t)},gotoPackage:function(){this.showPackage=!0,this.getPackageList(1)},getPackageList:function(e){var t=this;if("number"!=typeof e&&(e=1),!(this.serverList.length<=0)){var a=this.$Loading.show(),o=this.serverList[0];this.getPatchList(o.application,o.server_name,e,this.packagePageSize).then((function(o){a.hide(),t.packageList=o.rows,t.packagePage=e,t.packageTotalPage=Math.ceil(o.count/t.packagePageSize)})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))})),this.getPatchList(o.application,o.server_name,1,50).then((function(e){t.publishModal.model.patchList=e.rows}))}},changePackagePage:function(e){this.getPackageList(e)},downloadPackage:function(e){var t="/pages/server/api/download_package?id=".concat(e.id,"&name=").concat(e.tgz);window.open(t,!0)},deletePackage:function(e){var t=this;this.$confirm(this.$t("releasePackage.confirmDeleteTip"),this.$t("common.alert")).then((function(){t.$ajax.postJSON("/server/api/delete_patch_package",{id:e}).then((function(e){t.getPackageList(t.packagePage)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}))},gotoHistory:function(){this.showHistory=!0,this.getHistoryList(1)},getHistoryList:function(e){var t=this;"number"!=typeof e&&(e=1);var a=this.$Loading.show(),o={application:this.serverList[0].application||"",server_name:this.serverList[0].server_name||"",from:this.startTime,to:this.endTime,page_size:this.historyPageSize,curr_page:e};this.historyPage=e,this.$ajax.getJSON("/server/api/task_list",o).then((function(e){a.hide(),t.totalHistoryList=e.rows||[],t.historyTotalPage=Math.ceil(e.count/t.historyPageSize)})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},viewTask:function(e){var t=this;this.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(e){t.taskModal.model=e,t.taskModal.show=!0}))},deleteTask:function(e){var t=this;this.$confirm(this.$t("historyList.delete")).then((function(){t.$ajax.getJSON("/server/api/del_task",{task_no:e}).then((function(e){t.getHistoryList(t.page)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}))},changeHistoryPage:function(e){this.getHistoryList(e)},showUploadModal:function(){this.serverList.length<=0&&this.$tip.warning(this.$t("pub.dlg.a")),this.uploadModal.model={application:this.serverList[0].application||"",server_name:this.serverList[0].server_name||"",file:null,comment:""},this.uploadModal.show=!0},closeUploadModal:function(){this.uploadModal.show=!1,this.uploadModal.model=null,this.$refs.uploadForm.resetValid()},uploadFile:function(e){var t=this.treeid,a=(t&&t.split(".")[0]&&t.split(".")[0].slice(1),t.split(".")),o=t&&a[a.length-1]&&a[a.length-1].slice(1),s=e.name&&e.name.split(".")&&e.name.split(".")[0];if(!s.startsWith(o))return this.$tip.error("".concat(this.$t("releasePackage.uploadPackageTips")));this.uploadModal.model.file=e},uploadPatchPackage:function(){var e=this;if(this.$refs.uploadForm.validate()){var t=this.$Loading.show(),a=new FormData;a.append("application",this.uploadModal.model.application),a.append("module_name",this.uploadModal.model.server_name),a.append("suse",this.uploadModal.model.file),a.append("comment",this.uploadModal.model.comment),a.append("task_id",(new Date).getTime()),this.$ajax.postForm("/server/api/upload_patch_package",a).then((function(){e.getPatchList(e.uploadModal.model.application,e.uploadModal.model.server_name,1,50).then((function(a){t.hide(),e.publishModal.model.patchList=a.rows,e.closeUploadModal()}))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))}},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},patchChange:function(){"patch"==this.patchType?this.publishModal.model.show=!0:(this.publishModal.model.show=!1,this.getCodeVersion())},getCodeVersion:function(){var e=this;this.$ajax.get("/server/api/get_tag_list",{application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then((function(t){""==t.data?e.openPubConfModal():e.tagList=t.data})).catch((function(t){e.tagList=[],e.$tip.error("".concat(e.$t("common.error"),": ").concat(err.err_msg||err.message))}))},openPubConfModal:function(){var e=this;this.publishUrlConfModal.show=!0,this.$ajax.getJSON("/server/api/get_tag_conf",{application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then((function(t){e.publishUrlConfModal.model.tag=t.path})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))},saveCompilerUrl:function(){var e=this;if(this.$refs.compilerForm.validate()){var t=this.$Loading.show();this.$ajax.getJSON("/server/api/set_tag_conf",{path:this.publishUrlConfModal.model.tag,application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then((function(a){t.hide(),e.$tip.success(e.$t("common.success")),e.publishUrlConfModal.show=!1,e.getCodeVersion()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},addCompileTask:function(){var e=this;this.$ajax.getJSON("/server/api/get_compile_conf").then((function(t){var a=t.getVersionList;if(a){var o=e.publishModal.model.serverList.map((function(e){return e.node_name})),s={application:e.publishModal.model.application,server_name:e.publishModal.model.server_name,node:o.join(";"),path:e.tagVersion.split("--")[0],version:e.tagVersion.split("--")[1],comment:e.publishModal.model.update_text||"",compileUrl:a},i=e.$Loading.show();e.$ajax.postJSON("/server/api/do_compile",s).then((function(t){i.hide(),e.compilerModal.show=!0;var a="string"===typeof t?t:t.data;e.getStatus(a)})).catch((function(t){i.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))}else e.openPubConfModal()})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))},taskStatus:function(e){this.getStatus(e)},getStatus:function(e){var t=this,a=function a(){var o=null;o&&clearTimeout(o),t.$ajax.getJSON("/server/api/compiler_task",{taskNo:e}).then((function(s){var i="array"===typeof s?s:s.data;if(i[0].status=t.statusConfig[i[0].state],1==i[0].state&&(o=setTimeout(a,2e3)),t.compilerModal.model?Object.assign(t.compilerModal.model,{progress:i}):t.compilerModal.model={progress:i},2==i[0].state){var l=t.$Loading({text:"鍥炰紶鍙戝竷鍖�"});l.show(),t.compilerModal.show=!1;var r=function a(){t.$ajax.getJSON("/server/api/get_server_patch",{task_id:e}).then((function(e){0!==Object.keys(e).length?(l.hide(),t.publishModal.model.patch_id=e.id,t.publishModal.show=!1,t.savePublishServer()):setTimeout(a,2e3)})).catch((function(e){l.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))};setTimeout(r,2e3)}})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))};a()},includes:function(e,t){return!!e.includes(String(t))},formatString:function(e,t){return null!=e&&e.length<t?e.padEnd(t-e.length):e.substring(0,t)}},mounted:function(){this.getServerList(),this.getCompileConf()},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.serverList.forEach((function(t){t.isChecked=e}))},page:function(){this.updateServerList()}}},X=Q,ee=(a("523f"),Object(x["a"])(X,Z,G,!1,null,null,null)),te=ee.exports,ae=a("918a"),oe=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_history"},[e.serverListShow?a("div",{staticClass:"table_wrap"},[a("div",{staticClass:"table_head"},[a("h4",[e._v(e._s(this.$t("serverList.title.serverList")))])]),a("let-table",{ref:"serverListLoading",staticClass:"dcache",attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata"),stripe:""}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"application"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("a",{staticClass:"buttonText",attrs:{href:"/static/logview/logview.html?app="+[t.row.application]+"&server_name="+[t.row.server_name]+"&node_name="+[t.row.node_name],title:e.$t("serverList.link.remoteLog"),target:"_blank"}},[e._v(" "+e._s(t.row.server_name)+" ")])]}}],null,!1,2262472970)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.is_node_ok?a("span",[a("a",{staticClass:"buttonText",attrs:{href:"/static/logview/logview.html?app="+[t.row.application]+"&server_name="+[t.row.server_name]+"&node_name="+[t.row.node_name],title:e.$t("serverList.link.nodeLog"),target:"_blank"}},[e._v(" "+e._s(t.row.node_name)+" ")])]):a("span",{staticStyle:{color:"#FF0000"}},[e._v(" "+e._s(t.row.node_name)+e._s(e.$t("serverList.link.invalidNode"))+" ")])]}}],null,!1,2244706928)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return["Inactive"===t.row.setting_state?a("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(t.row.setting_state))]):a("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(t.row.setting_state))])]}}],null,!1,4280848039)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return["0"!=t.row.query_ret_code?a("span",{staticStyle:{color:"#FF0000"}},[e._v("Inactive")]):"Active"===t.row.present_state_in_node?a("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(t.row.present_state_in_node))]):a("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(t.row.present_state_in_node))])]}}],null,!1,2058566643)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.processID"),prop:"process_id"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(t.row.patch_time)))])]}}],null,!1,3144837894)}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"300px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.historyLink(t.row.id)}}},[e._v(e._s(e.$t("operate.goto")))])]}}],null,!1,1230847586)})],1),a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.goback}},[e._v(e._s(e.$t("operate.goback")))]),a("let-pagination",{attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}})],1):a("div",{staticClass:"history_search"},[a("label",{staticClass:"history_search_box"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.historySearchKey,expression:"historySearchKey"}],staticClass:"history_search_key",attrs:{type:"text",placeholder:e.$t("home.searchKey")},domProps:{value:e.historySearchKey},on:{blur:e.historySearch,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.historySearch(t)},input:function(t){t.target.composing||(e.historySearchKey=t.target.value)}}})]),a("div",{staticClass:"history_list_wrap"},[a("div",{staticClass:"history_list_title"},[e._v(e._s(e.$t("home.visited"))+"锛�")]),a("ul",{staticClass:"history_list"},e._l(e.historySearchList,(function(t){return a("li",{key:t,staticClass:"history_item"},[a("a",{staticClass:"history_link",attrs:{href:"javascript:;"},on:{click:function(a){return e.historySearchLink(t)}}},[e._v(e._s(t))])])})),0)])])])},se=[],ie={name:"ServerHistory",data:function(){return{historySearchKey:"",historySearchList:[],serverList:[],serverListShow:!1,pageNum:1,pageSize:16,total:1}},mounted:function(){this.updateHistorySearchKey()},methods:{gotoPage:function(e){this.historySearch(e)},historySearch:function(e){var t=this;e&&"number"==typeof e||(e=this.pageNum||1);var a=this.historySearchKey;a&&(this.updateHistorySearchKey(),this.$ajax.getJSON("/server/api/server_search",{searchkey:a,page_size:this.pageSize,curr_page:e}).then((function(a){t.pageNum=e,t.total=Math.ceil(a.count/t.pageSize),a.rows.forEach((function(e){e.present_state_in_node="",e.is_node_ok=!0,e.query_ret_code=0,e.setting_state=e.setting_state.charAt(0).toUpperCase()+e.setting_state.slice(1)})),t.serverList=a.rows,t.updateServerState(),t.serverListShow=!0})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))})))},updateServerState:function(){var e=this;if(0!=this.serverList.length){var t=this.serverList.map((function(e){return{application:e.application,server_name:e.server_name,node_name:e.node_name}}));this.$ajax.postJSON("/server/api/server_state",{queryState:t}).then((function(t){e.serverList.forEach((function(e){var a=t.filter((function(t){return t.application==e.application&&t.server_name==e.server_name&t.node_name==e.node_name}));e.present_state_in_node=a[0].present_state_in_node,e.is_node_ok=a[0].is_node_ok,e.query_ret_code=a[0].query_ret_code}))}))}},historySearchLink:function(e){this.historySearchKey=e,this.historySearch()},historyLink:function(e){var t=this;this.$nextTick((function(){t.$parent.selectTree(e),t.$parent.getTreeData()}))},goback:function(){this.serverListShow=!1,this.historySearchKey=""},updateHistorySearchKey:function(){var e=this.historySearchKey,t=this.getLocalStorage("tars_history_key")||[];if(e){if(t&&t.length>0){var a=-1;t.forEach((function(t,o){t===e&&(a=o)})),-1!==a&&t.splice(a,1),t.unshift(e)}else t=[e];this.historySearchList=t.slice(0,20),this.setLocalStorage("tars_history_key",JSON.stringify(t))}else this.historySearchList=t},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},getLocalStorage:function(e){var t="";return window.localStorage&&(t=JSON.parse(JSON.parse(localStorage.getItem(e)))),t},setLocalStorage:function(e,t){var a="";return window.localStorage&&(a=localStorage.setItem(e,JSON.stringify(t))),a}}},le=ie,re=(a("d985"),Object(x["a"])(le,oe,se,!1,null,null,null)),ne=re.exports,ce=a("c9e9"),de=a("4527"),me=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{margin:"2px 2px"}},[e.tableSHow?a("table",{staticClass:"let-table let-table_stripe"},[a("tbody",[a("tr",[a("td",{staticStyle:{width:"30%"}},[a("a",{attrs:{href:"javascript:void(0)"},on:{click:function(t){return e.link("/user/person")}}},[e._v(e._s(e.$t("alarmConfig.alarmcontact")))])]),a("td",{staticStyle:{width:"40%"}},[a("a",{attrs:{href:"javascript:void(0)"},on:{click:function(t){return e.link("/alarm/conf?app="+e.application+"&server="+e.serverName)}}},[e._v(" "+e._s(e.$t("alarmConfig.alarmUser"))+" ")])]),a("td",{staticStyle:{width:"30%"}},[a("a",{attrs:{href:"javascript:void(0)"},on:{click:function(t){return e.link("/alarm/shield?app="+e.application+"&server="+e.serverName)}}},[a("font",{attrs:{color:"red"}},[e._v(" "+e._s(e.$t("alarmConfig.shieldAlarm"))+" ")])],1)])])])]):e._e(),e.urlShow?a("iframe",{attrs:{src:e.linkUrl,width:"100%",height:"100%",frameborder:"0",scrolling:"auto"}}):e._e()])},pe=[],ue={name:"AlarmConfig",data:function(){return{application:"",serverName:"",alarmHost:"",linkUrl:"",tableSHow:!0,urlShow:!1}},computed:{},watch:{},mounted:function(){var e=this,t=this.treeid;this.application=t&&t.split(".")[0]&&t.split(".")[0].slice(1);var a=t.split(".");this.serverName=t&&a[a.length-1]&&a[a.length-1].slice(1),this.$ajax.getJSON("/server/api/get_alarm_conf",{}).then((function(t){e.alarmHost=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))},props:["treeid"],methods:{link:function(e){this.urlShow=!0,this.tableSHow=!1,this.linkUrl=this.alarmHost+e}}},he=ue,fe=Object(x["a"])(he,me,pe,!1,null,null,null),ve=fe.exports,_e=a("c2de"),be=a("3430"),ge={name:"Server",components:{callChain:K["a"],manage:H,publish:te,config:ae["a"],"server-monitor":ce["a"],"property-monitor":de["a"],alarm:ve,"interface-debuger":_e["a"],"user-manage":be["a"],serverHistory:ne},data:function(){return{treeErrMsg:"load failed",treeData:null,treeSearchKey:"",treeid:"home",isIconPlay:!1,serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},homeTab:"home",BTabs:[]}},computed:{base:function(){return"/server/".concat(this.treeid)}},watch:{treeid:function(){this.serverData=this.getServerData(),this.$store.commit({type:"increment",name:this.serverData})},$route:function(e,t){"/server"===e.path&&this.getTreeData()}},directives:{vscroll:{componentUpdated:function(e){var t=e||"",a=e.children||[],o="";if(a.forEach((function(e){var t=e.getAttribute("class");t.indexOf("active")>-1&&(o=e)})),o.offsetLeft<t.scrollLeft){var s=o.offsetLeft;t.scrollTo(s,0)}else if(o.offsetLeft+o.offsetWidth>t.scrollLeft+t.offsetWidth){var i=o.offsetLeft+o.offsetWidth-t.offsetWidth;t.scrollTo(i,0)}}}},methods:{getNewServerName:function(e){var t=e&&e.split(".");if(!t)return e;var a=[];return t.forEach((function(e){a.push(e.substring(1))})),a.join(".")},getName:function(e){var t="";return e.lastIndexOf("/")>-1&&(t=e.substring(e.lastIndexOf("/")+1,e.length)),t},iconLoading:function(){var e=this;e.isIconPlay||(e.isIconPlay=!0,setTimeout((function(){e.isIconPlay=!1}),1e3))},treeSearch:function(e){this.iconLoading(),this.getTreeData(this.treeSearchKey,e)},selectTree:function(e){this.selectBTabs(e),this.checkCurrBTabs()},handleData:function(e,t){var a=this;e&&e.length&&e.forEach((function(e){e.label=e.name,e.nodeKey=e.id,a.treeSearchKey&&(e.expand=!0),e.children&&e.children.length&&a.handleData(e.children)}))},getTreeData:function(e,t){var a=this;this.treeData=null,this.$nextTick((function(){var o=a.$loading.show({target:a.$refs.treeLoading});a.$ajax.getJSON("/server/api/tree",{searchKey:e||"",type:t}).then((function(e){o.hide(),a.treeData=e,a.handleData(a.treeData,!0)})).catch((function(e){o.hide(),a.treeErrMsg=e.err_msg||e.message||"load failed",a.treeData=!1}))}))},getServerData:function(){var e={level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""};if(!this.treeid)return{};if("home"==this.treeid)return e;var t=this.treeid.split(".");return t.forEach((function(t){var a=+t.substr(0,1),o=t.substr(1);switch(a){case 1:e.application=o;break;case 2:e.set_name=o;break;case 3:e.set_area=o;break;case 4:e.set_group=o;break;case 5:e.server_name=o;break;default:break}e.level=a})),e},checkTreeid:function(){this.treeid=this.getLocalStorage("_treeid_")||""},clickTab:function(e){var t=this.treeid,a=this.BTabs;a&&a.forEach((function(a){a.id===t&&(a.path=e)})),this.setLocalStorage("_tabs_",JSON.stringify(a))},isTrueTreeLevel:function(){var e=this.$route.path.split("/"),t=e[e.length-1],a=!1;5===this.serverData.level||"publish"!==t&&"server-monitor"!==t&&"property-monitor"!==t&&"user-manage"!==t&&"interface-debuger"!==t||(a=!0),5!==this.serverData.level&&4!==this.serverData.level&&1!==this.serverData.level&&"config"===t&&(a=!0),a&&this.$router.replace("manage")},checkBTabs:function(){var e=this.BTabs,t=this.getLocalStorage("_tabs_");t&&t.length>0&&t.forEach((function(t){e.push({id:t.id,path:t.path})}))},checkCurrBTabs:function(){var e=this;this.$nextTick((function(){var t=e.$refs.btabs||"",a=t.children||[],o="";if(a.forEach((function(e){var t=e.getAttribute("class");t.indexOf("active")>-1&&(o=e)})),o.offsetLeft<t.scrollLeft){var s=o.offsetLeft;t.scrollTo(s,0)}else if(o.offsetLeft+o.offsetWidth>t.scrollLeft+t.offsetWidth){var i=o.offsetLeft+o.offsetWidth-t.offsetWidth;t.scrollTo(i,0)}}))},selectBTabs:function(e){var t=this.BTabs,a=!1;t.forEach((function(t){t.id===e&&(a=!0,t.path="/server/".concat(e,"/manage"))})),a||this.BTabs.push({id:e,path:"/server/".concat(e,"/manage")}),this.treeid=e,this.setLocalStorage("_treeid_",JSON.stringify(e)),this.setLocalStorage("_tabs_",JSON.stringify(t))},clickBTabs:function(e,t){t==this.homeTab&&(ne.data.serverListShow=!1),this.treeid=t,this.setLocalStorage("_treeid_",JSON.stringify(t))},closeBTabs:function(e){var t=this.BTabs,a=0;t.forEach((function(t,o){t.id===e&&(a=o)})),t.splice(a,1),this.setLocalStorage("_tabs_",JSON.stringify(t)),t.length>0?this.treeid=t[t.length-1].id:this.treeid="home",this.setLocalStorage("_treeid_",JSON.stringify(this.treeid)),this.getTreeData()},closeAllBTabs:function(){this.BTabs=[],this.treeid="home",this.setLocalStorage("_tabs_",JSON.stringify(this.BTabs)),this.setLocalStorage("_treeid_",JSON.stringify(this.treeid)),this.getTreeData()},getLocalStorage:function(e){var t="";return window.localStorage&&(t=JSON.parse(JSON.parse(localStorage.getItem(e)))),t},setLocalStorage:function(e,t){var a="";return window.localStorage&&(a=localStorage.setItem(e,JSON.stringify(t))),a}},created:function(){this.serverData=this.getServerData(),this.isTrueTreeLevel()},mounted:function(){this.checkTreeid(),this.checkBTabs(),this.getTreeData();var e=this.BTabs;e.forEach((function(e){e.path="/server/".concat(e.id,"/manage")})),this.treeid||(this.treeid="home")}},$e=ge,we=(a("9ce0"),Object(x["a"])($e,I,z,!1,null,null,null)),ye=we.exports,ke=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation"},[a("let-tabs",{attrs:{activekey:e.$route.path},on:{click:e.onTabClick}},[a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.deploy"),tabkey:"/operation/deploy"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.expand"),tabkey:"/operation/expand"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.template"),tabkey:"/operation/templates"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.nodes"),tabkey:"/operation/nodes"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.check"),tabkey:"/operation/check"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.application"),tabkey:"/operation/application"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.business"),tabkey:"/operation/business"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.businessRelation"),tabkey:"/operation/businessRelation"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.idcManage"),tabkey:"/operation/idc"}})],1),a("router-view",{staticClass:"page_operation_children"})],1)},Me=[],Se="/operation/deploy",xe={name:"Oparetion",beforeRouteEnter:function(e,t,a){"/operation"===e.path?a(Se):a()},beforeRouteLeave:function(e,t,a){Se=t.path,a()},methods:{onTabClick:function(e){this.$router.replace(e)}}},Le=xe,Ce=(a("ea8c"),Object(x["a"])(Le,ke,Me,!1,null,null,null)),Ne=Ce.exports,Ee=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_deploy"},[a("let-form",{directives:[{name:"show",rawName:"v-show",value:e.deployShow,expression:"deployShow"}],ref:"form",attrs:{inline:"","label-position":"top",itemWidth:"480px"},nativeOn:{submit:function(t){return t.preventDefault(),e.save(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app"),required:""}},[a("let-select",{attrs:{id:"inputApplication",size:"small",filterable:"",notFoundText:e.$t("deployService.form.appAdd")},model:{value:e.model.application,callback:function(t){e.$set(e.model,"application",t)},expression:"model.application"}},e._l(e.applicationList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.serviceFormatTips"),required:"","required-tip":e.$t("deployService.form.serviceTips"),pattern:"^[a-zA-Z]([a-zA-Z0-9]+)?$","pattern-tip":e.$t("deployService.form.serviceFormatTips")},model:{value:e.model.server_name,callback:function(t){e.$set(e.model,"server_name",t)},expression:"model.server_name"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceType"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.serviceTypeTips")},model:{value:e.model.server_type,callback:function(t){e.$set(e.model,"server_type",t)},expression:"model.server_type"}},e._l(e.types,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("div",{staticStyle:{float:"right"}},[a("let-button",{attrs:{type:"button",theme:"primary"},on:{click:function(t){return e.showBatchDeployModal()}}},[e._v(" "+e._s(e.$t("deployService.form.batchDeploy"))+" ")])],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.template"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.templateTips")},model:{value:e.model.template_name,callback:function(t){e.$set(e.model,"template_name",t)},expression:"model.template_name"}},e._l(e.templates,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{label:"SET"}},[a("SetInputer",{attrs:{enabled:e.model.enable_set,name:e.model.set_name,area:e.model.set_area,group:e.model.set_group},on:{"update:enabled":function(t){return e.$set(e.model,"enable_set",t)},"update:name":function(t){return e.$set(e.model,"set_name",t)},"update:area":function(t){return e.$set(e.model,"set_area",t)},"update:group":function(t){return e.$set(e.model,"set_group",t)}}})],1),a("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],attrs:{label:e.$t("user.op")}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("user.tips.sep")},model:{value:e.model.operator,callback:function(t){e.$set(e.model,"operator",t)},expression:"model.operator"}})],1),a("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],attrs:{label:e.$t("user.dev")}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("user.tips.sep")},model:{value:e.model.developer,callback:function(t){e.$set(e.model,"developer",t)},expression:"model.developer"}})],1),a("let-table",{attrs:{data:e.model.adapters}},[a("let-table-column",{attrs:{title:"OBJ"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.objTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:t.row.obj_name,callback:function(a){e.$set(t.row,"obj_name",a)},expression:"props.row.obj_name"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.form.node_name"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-select",{attrs:{size:"small",required:"",filterable:""},on:{change:function(a){return e.nodeNameChange(t.row)}},model:{value:t.row.node_name,callback:function(a){e.$set(t.row,"node_name",a)},expression:"props.row.node_name"}},e._l(e.nodeList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.endpoint"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",placeholder:"IP",required:"","required-tip":e.$t("deployService.table.tips.ip")},model:{value:t.row.bind_ip,callback:function(a){e.$set(t.row,"bind_ip",a)},expression:"props.row.bind_ip"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),width:"90px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,max:65535,placeholder:"0-65535",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.port,callback:function(a){e.$set(t.row,"port",a)},expression:"props.row.port"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.form.portType"),width:"150px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:"tcp"},model:{value:t.row.port_type,callback:function(a){e.$set(t.row,"port_type",a)},expression:"props.row.port_type"}},[e._v("TCP")]),a("let-radio",{attrs:{label:"udp"},model:{value:t.row.port_type,callback:function(a){e.$set(t.row,"port_type",a)},expression:"props.row.port_type"}},[e._v("UDP")])]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.protocol"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:"tars"},model:{value:t.row.protocol,callback:function(a){e.$set(t.row,"protocol",a)},expression:"props.row.protocol"}},[e._v("TARS")]),a("let-radio",{attrs:{label:"not_tars"},model:{value:t.row.protocol,callback:function(a){e.$set(t.row,"protocol",a)},expression:"props.row.protocol"}},[e._v(e._s(e.$t("serverList.servant.notTARS")))])]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"60px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.thread_num,callback:function(a){e.$set(t.row,"thread_num",a)},expression:"props.row.thread_num"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("serverList.servant.connections"),width:"90px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.max_connections,callback:function(a){e.$set(t.row,"max_connections",a)},expression:"props.row.max_connections"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),width:"90px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.queuecap,callback:function(a){e.$set(t.row,"queuecap",a)},expression:"props.row.queuecap"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0},model:{value:t.row.queuetimeout,callback:function(a){e.$set(t.row,"queuetimeout",a)},expression:"props.row.queuetimeout"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.addAdapter(t.row)}}},[e._v(e._s(e.$t("operate.add")))]),t.$index?a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.model.adapters.splice(t.$index,1)}}},[e._v(e._s(e.$t("operate.delete"))+" ")]):e._e()]}}])})],1),a("let-button",{attrs:{type:"button",theme:"sub-primary"},on:{click:function(t){return e.getAutoPort()}}},[e._v(e._s(e.$t("deployService.form.getPort"))+" ")]),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))])],1),a("let-modal",{staticClass:"more-cmd",staticStyle:{"text-align":"center"},attrs:{width:"700px",footShow:!1},on:{close:e.closeResultModal,"on-cancel":e.closeResultModal},model:{value:e.resultModal.show,callback:function(t){e.$set(e.resultModal,"show",t)},expression:"resultModal.show"}},[a("p",{staticClass:"result-text"},[e._v(e._s(e.$t("deployService.form.ret.success"))+e._s(e.$t("resource.installRstMsg")))]),a("let-table",{attrs:{data:e.resultModal.resultList,"empty-msg":e.$t("common.nodata"),"row-class-name":e.resultModal.rowClassName}},[a("let-table-column",{attrs:{title:"ip",prop:"ip"}}),a("let-table-column",{attrs:{title:e.$t("resource.installResult"),prop:"rst"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("p",{domProps:{textContent:e._s(t.row.rst?e.$t("common.success"):e.$t("common.error"))}})]}}])}),a("let-table-column",{attrs:{title:e.$t("common.message"),prop:"msg"}})],1)],1),a("div",{directives:[{name:"show",rawName:"v-show",value:e.deployModal.show,expression:"deployModal.show"}],staticStyle:{width:"400px",margin:"0 auto"}},[a("let-form",{ref:"deployForm",attrs:{itemWidth:"400px"}},[a("let-form-item",{attrs:{label:e.$t("nodes.node_name")}},[a("let-select",{model:{value:e.deployModal.node_name,callback:function(t){e.$set(e.deployModal,"node_name",t)},expression:"deployModal.node_name"}},e._l(e.nodeList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)],1),a("let-form-item",{attrs:{label:e.$t("pub.dlg.releaseVersion")}},[a("let-select",{attrs:{required:"","required-tip":e.$t("pub.dlg.ab")},model:{value:e.deployModal.model.patch_id,callback:function(t){e.$set(e.deployModal.model,"patch_id",t)},expression:"deployModal.model.patch_id"}},e._l(e.deployModal.model.patchList,(function(t){return a("let-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.id)+" | "+e._s(t.posttime)+" | "+e._s(t.comment)+" ")])})),1)],1)],1),a("div",{staticStyle:{width:"100%","text-align":"center"}},[a("let-tag",[e._v(e._s(e.$t("deployLog.info")))]),a("let-button",{staticStyle:{margin:"20px auto"},attrs:{type:"submit",theme:"primary"},on:{click:e.doDeployLog}},[e._v(" "+e._s(e.$t("deployLog.install"))+" ")])],1)],1),a("PublishStatus",{ref:"publishStatus"})],1)},Te=[],De=(a("4d63"),a("25f0"),a("498a"),a("2494")),qe=["tars_cpp","tars_java","tars_php","tars_nodejs","not_tars","tars_go"],Oe=function(){return{application:"",server_name:"",server_type:qe[0],template_name:"",node_name:"",enable_set:!1,set_name:"",set_area:"",set_group:"",operator:"",developer:"",adapters:[{obj_name:"",bind_ip:"",port:"",port_type:"tcp",protocol:"tars",thread_num:5,max_connections:1e5,queuecap:5e4,queuetimeout:2e4}]}},Ie={name:"OperationDeploy",components:{SetInputer:De["a"],PublishStatus:Y["a"]},data:function(){return{types:qe,applicationList:[],nodeList:[],all_templates:[],templates:[],model:Oe(),enableLogin:!1,deployShow:!1,deployModal:{show:!1,node_name:"",model:{patch_id:"",patchList:[],serverList:[]}},resultModal:{show:!1,resultList:[],rowClassName:function(e){return e&&e.row&&!e.row.rst?"err-row":""}}}},mounted:function(){var e=this;this.$ajax.getJSON("/server/api/isEnableLogin").then((function(t){e.enableLogin=t.enableLogin||!1})).catch((function(e){})),this.$ajax.getJSON("/server/api/application_list").then((function(t){e.applicationList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$ajax.getJSON("/server/api/node_list").then((function(t){e.nodeList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$ajax.getJSON("/server/api/template_name_list").then((function(t){e.templates=t,e.all_templates=t,e.model.template_name=t[0]})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$watch("props.row.node_name",(function(t,a){t!==a&&e.model.adapters.forEach((function(e){e.bind_ip=t}))})),this.checkDeployLog()},methods:{nodeNameChange:function(e){e.bind_ip=e.node_name},addAdapter:function(e){this.model.adapters.push(Object.assign({},e))},deploy:function(){for(var e=this,t=[],a=0;a<this.model.adapters.length;a++){var o=this.model.adapters[a].obj_name+"-"+this.model.adapters[a].node_name;if(-1!=t.indexOf(o))return void this.$tip.error("".concat(this.$t("deployService.infos.objNodedupErr")));t.push(o)}this.$confirm(this.$t("deployService.form.deployServiceTip"),this.$t("common.alert")).then((function(){var t=e.$Loading.show();e.$ajax.postJSON("/server/api/deploy_server",e.model).then((function(a){t.hide(),a.tars_node_rst&&a.tars_node_rst.length?e.showResultModal(a.tars_node_rst):e.$tip.success(e.$t("deployService.form.ret.success")),e.model=Oe(),e.model.template_name=e.templates[0]})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))}))},getAutoPort:function(){var e=this,t=this.$Loading.show(),a=this.model.adapters,o=[];a.forEach((function(e){o.push(e.bind_ip)})),this.$ajax.getJSON("/server/api/auto_port",{node_name:o.join(";")}).then((function(o){t.hide(),o.forEach((function(t,o){e.$set(a[o],"port",String(t.port||""))}))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},save:function(){var e=this,t=document.querySelector("#inputApplication .let-select__filter__input").value.trim();""==this.model.application&&(this.model.application=t);var a=new RegExp("^[a-zA-Z]([a-zA-Z0-9]+)?$");if(this.applicationList.includes(this.model.application)&&a.test(this.model.application)){if(this.$refs.form.validate()){var o=this.model,s=this.$Loading.show();this.$ajax.getJSON("/server/api/server_exist",{application:o.application,server_name:o.server_name}).then((function(t){s.hide(),t?e.$tip.error(e.$t("deployService.form.nameTips")):e.deploy()})).catch((function(t){s.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}}else this.$tip.error("".concat(this.$t("deployService.form.applicationTip")))},showResultModal:function(e){this.resultModal.resultList=e,this.resultModal.show=!0},closeResultModal:function(){this.resultModal.show=!1,this.resultModal.resultList=[]},checkDeployLog:function(){var e=this;this.$ajax.getJSON("/server/api/need_deploy_log").then((function(t){e.deployModal.show=t.need,e.deployShow=!t.need,t.need&&e.showDeployLog()})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getPatchList:function(e,t,a,o){return this.$ajax.getJSON("/server/api/server_patch_list",{application:e,module_name:t,curr_page:a,page_size:o})},showDeployLog:function(){var e=this,t="tars",a="tarslog";this.deployModal.model={application:t,server_name:a,patch_id:"",patchList:[]},this.getPatchList(t,a,1,10).then((function(t){e.deployModal.model.patchList=t.rows}))},doDeployLog:function(){var e=this;this.$refs.deployForm.validate()&&this.$ajax.getJSON("/server/api/expand_deploy_log",{node_name:this.deployModal.node_name}).then((function(t){e.deployModal.model.serverList=t.server,e.$refs.publishStatus.savePublishServer(e.deployModal,e.onCancel)})).catch((function(t){e.$tip.error("".concat(e.$t("deployLog.failed"),": ").concat(t.err_msg||t.message))}))},onCancel:function(){this.checkDeployLog()}}},ze=Ie,je=(a("1eed"),Object(x["a"])(ze,Ee,Te,!1,null,null,null)),Pe=je.exports,Ae=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_expand"},[a("let-form",{ref:"configForm",attrs:{inline:"","label-position":"top",itemWidth:"480px"},nativeOn:{submit:function(t){return t.preventDefault(),e.previewExpand(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"",filterable:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:function(t){return e.changeSelect("application")}},model:{value:e.model.application,callback:function(t){e.$set(e.model,"application",t)},expression:"model.application"}},e._l(e.applications,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.service"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"",filterable:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:function(t){return e.changeSelect("server_name")}},model:{value:e.model.server_name,callback:function(t){e.$set(e.model,"server_name",t)},expression:"model.server_name"}},e._l(e.serverNames,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{label:"Set",itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"",filterable:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:function(t){return e.changeSelect("set")}},model:{value:e.model.set,callback:function(t){e.$set(e.model,"set",t)},expression:"model.set"}},e._l(e.sets,(function(t){return a("let-option",{key:t,attrs:{value:t||-1}},[e._v(" "+e._s(t||e.$t("serviceExpand.form.disableSet"))+" ")])})),1)],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.ip"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",filterable:"",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.node_name,callback:function(t){e.$set(e.model,"node_name",t)},expression:"model.node_name"}},e._l(e.nodeNames,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("serviceExpand.form.tarIP"),itemWidth:"100%",required:""}},[a("let-input",{attrs:{type:"textarea",rows:3,placeholder:e.$t("serviceExpand.form.placeholder"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.expandIpStr,callback:function(t){e.expandIpStr=t},expression:"expandIpStr"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.enableSet")}},[a("SetInputer",{attrs:{enabled:e.model.enable_set,name:e.model.set_name,area:e.model.set_area,group:e.model.set_group},on:{"update:enabled":function(t){return e.$set(e.model,"enable_set",t)},"update:name":function(t){return e.$set(e.model,"set_name",t)},"update:area":function(t){return e.$set(e.model,"set_area",t)},"update:group":function(t){return e.$set(e.model,"set_group",t)}}})],1),a("let-form-item",{attrs:{label:e.$t("serviceExpand.form.nodeConfig"),itemWidth:"100%"}},[a("let-checkbox",{model:{value:e.model.copy_node_config,callback:function(t){e.$set(e.model,"copy_node_config",t)},expression:"model.copy_node_config"}},[e._v(" "+e._s(e.$t("serviceExpand.form.copyNodeConfig"))+" ")])],1),a("let-button",{attrs:{type:"sumbit",theme:"primary"}},[e._v(e._s(e.$t("serviceExpand.form.preExpand")))])],1),a("let-form",{directives:[{name:"show",rawName:"v-show",value:e.previewItems.length>0,expression:"previewItems.length > 0"}],ref:"expandForm",staticClass:"mt40",attrs:{inline:""},nativeOn:{submit:function(t){return t.preventDefault(),e.expand(t)}}},[a("let-table",{ref:"table",attrs:{data:e.previewItems,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[t.row.status==e.$t("serviceExpand.form.noExpand")?a("let-checkbox",{model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}}):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),a("let-table-column",{attrs:{title:"Set",prop:"set"}}),a("let-table-column",{attrs:{title:e.$t("serverList.servant.objName"),prop:"obj_name"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.endpoint")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{model:{value:t.row.bind_ip,callback:function(a){e.$set(t.row,"bind_ip",a)},expression:"scope.row.bind_ip"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{type:"number",min:0,max:65535,placeholder:"0-65535",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.port,callback:function(a){e.$set(t.row,"port",a)},expression:"scope.row.port"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_name"}}),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c8"),prop:"status"}})],1),a("let-button",{attrs:{type:"button",theme:"sub-primary"},on:{click:function(t){return e.getAutoPort()}}},[e._v(e._s(e.$t("deployService.form.getPort"))+" ")]),e._v(" "),a("let-button",{attrs:{type:"sumbit",theme:"primary"}},[e._v(e._s(e.$t("deployService.title.expand")))])],1),a("let-modal",{staticClass:"more-cmd",attrs:{width:"700px",footShow:!1},on:{close:e.closeResultModal,"on-cancel":e.closeResultModal},model:{value:e.resultModal.show,callback:function(t){e.$set(e.resultModal,"show",t)},expression:"resultModal.show"}},[a("p",{staticClass:"result-text"},[e._v(e._s(e.$t("serviceExpand.form.errTips.success"))+e._s(e.$t("resource.installRstMsg")))]),a("let-table",{attrs:{data:e.resultModal.resultList,"empty-msg":e.$t("common.nodata"),"row-class-name":e.resultModal.rowClassName}},[a("let-table-column",{attrs:{title:"ip",prop:"ip"}}),a("let-table-column",{attrs:{title:e.$t("resource.installResult"),prop:"rst"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("p",{domProps:{textContent:e._s(t.row.rst?e.$t("common.success"):e.$t("common.error"))}})]}}])}),a("let-table-column",{attrs:{title:e.$t("common.message"),prop:"msg"}})],1)],1)],1)},Fe=[],Je="((\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])",Re=function(){return{application:"",server_name:"",set:"",node_name:"",expand_nodes:[],enable_set:!1,set_name:"",set_area:"",set_group:"",copy_node_config:!1}},Ve={name:"OperationExpand",components:{SetInputer:De["a"]},data:function(){return{model:Re(),applications:[],serverNames:[],sets:[],nodeNames:[],expandIpStr:"",previewItems:[],ipReg:"^".concat(Je,"$"),isCheckedAll:!1,resultModal:{show:!1,resultList:[],rowClassName:function(e){return e&&e.row&&!e.row.rst?"err-row":""}}}},mounted:function(){var e=this;this.getCascadeSelectServer({level:1},this.$t("common.error")).then((function(t){e.applications=t}))},methods:{changeSelect:function(e){var t=this;switch(e){case"application":this.model.server_name="",this.serverNames=[],this.model.application&&this.getCascadeSelectServer({level:2,application:this.model.application},this.$t("common.error")).then((function(e){t.serverNames=e}));break;case"server_name":this.model.set="",this.sets=[],this.model.server_name&&this.getCascadeSelectServer({level:3,application:this.model.application,server_name:this.model.server_name},this.$t("common.error")).then((function(e){t.sets=e}));break;case"set":if(this.model.node_name="",this.model.nodeName=[],this.model.set){var a=-1===parseInt(this.model.set,10)?"":this.model.set;this.getCascadeSelectServer({level:4,application:this.model.application,server_name:this.model.server_name,set:a},this.$t("common.error")).then((function(e){t.nodeNames=e}))}break;default:break}},getCascadeSelectServer:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("common.error");return this.$ajax.getJSON("/server/api/cascade_select_server",e).then((function(e){return e})).catch((function(e){t.$tip.error("".concat(a,": ").concat(e.message||e.err_msg))}))},indexOf:function(e,t){for(var a=0;a<e.length;a++)if(e[a]==t)return a;return-1},previewExpand:function(){var e=this;if(this.$refs.configForm.validate()){var t=Object.assign({},this.model);t.set=-1===parseInt(t.set,10)?"":t.set,t.expand_nodes=this.expandIpStr.trim().split(/[,;\n]/);var a=this.indexOf(t.expand_nodes,this.model.node_name);if(-1!=a)return void this.$tip.error("".concat(this.$t("serviceExpand.exists")));t.expand_nodes=t.expand_nodes.filter((function(e){return""!=e.trim()}));var o=this.$Loading.show();this.$ajax.postJSON("/server/api/expand_server_preview",t).then((function(t){o.hide();var a=t||[];a.forEach((function(e){e.isChecked=!1})),e.isCheckedAll=!1,e.previewItems=a})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},getAutoPort:function(){var e=this,t=this.previewItems.filter((function(t){return t.status===e.$t("serviceExpand.form.noExpand")&&t.isChecked}));if(0!=t.length){var a=this.$Loading.show(),o=[];t.forEach((function(e){o.push(e.bind_ip)})),this.$ajax.getJSON("/server/api/auto_port",{node_name:o.join(";")}).then((function(o){a.hide(),o.forEach((function(a,o){e.$set(t[o],"port",String(a.port||""))}))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}else this.$tip.error(this.$t("serviceExpand.form.errTips.nodeCheck"))},expand:function(){var e=this;if(this.$refs.expandForm.validate()){var t=this.previewItems.filter((function(t){return t.status===e.$t("serviceExpand.form.noExpand")&&t.isChecked}));if(t.length>0){var a=[];t.forEach((function(e){a.push({bind_ip:e.bind_ip,node_name:e.node_name,obj_name:e.obj_name,port:e.port,set:e.set})}));var o={application:this.model.application,server_name:this.model.server_name,set:-1===parseInt(this.model.set,10)?"":this.model.set,node_name:this.model.node_name,copy_node_config:this.model.copy_node_config,expand_preview_servers:a},s=this.$Loading.show();this.$ajax.postJSON("/server/api/expand_server",o).then((function(t){s.hide(),t.tars_node_rst&&t.tars_node_rst.length?e.showResultModal(t.tars_node_rst):e.$tip.success(e.$t("serviceExpand.form.errTips.success"))})).catch((function(t){s.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}else this.$tip.error(this.$t("serviceExpand.form.errTips.noneNodes"))}},showResultModal:function(e){this.resultModal.resultList=e,this.resultModal.show=!0},closeResultModal:function(){this.resultModal.show=!1,this.resultModal.resultList=[]}},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.previewItems.forEach((function(t){t.isChecked=e}))}}},We=Ve,Ue=(a("2541"),Object(x["a"])(We,Ae,Fe,!1,null,null,null)),Be=Ue.exports,He=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_templates"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.template")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.template_name,callback:function(t){e.$set(e.query,"template_name",t)},expression:"query.template_name"}})],1),a("let-form-item",{attrs:{label:e.$t("template.search.parentTemplate")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.parents_name,callback:function(t){e.$set(e.query,"parents_name",t)},expression:"query.parents_name"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1),a("div",{staticStyle:{float:"right"}},[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("template.btn.addTempate")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_name",width:"25%"}}),a("let-table-column",{attrs:{title:e.$t("template.search.parentTemplate"),prop:"parents_name",width:"25%"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"300px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.mergeItem(t.row)}}},[e._v(e._s(e.$t("operate.merge")))]),a("let-table-operation",{on:{click:function(a){return e.viewItem(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.$t("template.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?a("pre",[e._v(e._s(e.viewModal.model.profile))]):e._e(),a("div",{attrs:{slot:"foot"},slot:"foot"})]),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("template.add.title"):this.$t("template.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.template"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("template.add.templateFormatTips"),required:"","required-tip":e.$t("template.add.templateNameTips"),pattern:"^[a-zA-Z-]([.a-zA-Z0-9-]+)?$","pattern-tip":e.$t("template.add.templateFormatTips")},model:{value:e.detailModal.model.template_name,callback:function(t){e.$set(e.detailModal.model,"template_name",t)},expression:"detailModal.model.template_name"}})],1),a("let-form-item",{attrs:{label:e.$t("template.search.parentTemplate"),required:""}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.detailModal.model.parents_name,callback:function(t){e.$set(e.detailModal.model,"parents_name",t)},expression:"detailModal.model.parents_name"}},[a("let-option",{attrs:{value:""}},[e._v(e._s(e.$t("pub.dlg.defaultValue")))]),e._l(e.items,(function(t){return a("let-option",{key:t.id,attrs:{value:t.template_name}},[e._v(e._s(t.template_name))])}))],2)],1),a("let-form-item",{attrs:{label:e.$t("template.form.content"),required:""}},[a("let-input",{attrs:{type:"textarea",rows:10,size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.detailModal.model.profile,callback:function(t){e.$set(e.detailModal.model,"profile",t)},expression:"detailModal.model.profile"}})],1)],1):e._e()],1)],1)},Ke=[],Ze={name:"OperationTemplates",data:function(){return{query:{template_name:"",parents_name:""},items:[],viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/query_profile_template",this.query).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},editItem:function(e){this.detailModal.model=e,this.detailModal.show=!0,this.detailModal.isNew=!1},mergeItem:function(e){var t=this,a=this.$Loading.show();this.$ajax.getJSON("/server/api/get_merge_profile_template",{template_name:e.template_name}).then((function(o){a.hide(),e.profile=o.template,t.viewModal.model=e,t.viewModal.show=!0})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=t.id?"/server/api/update_profile_template":"/server/api/add_profile_template",o=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){o.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("template.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_profile_template",{id:e.id}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))}}},Ge=Ze,Ye=(a("4dec"),Object(x["a"])(Ge,He,Ke,!1,null,null,null)),Qe=Ye.exports,Xe=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_templates"},[a("el-form",{attrs:{inline:"",itemWidth:"200px"}},[a("el-form-item",{attrs:{label:e.$t("nodes.node_name")+"锛�"}},[a("el-input",{attrs:{size:"small"},model:{value:e.query.node_name,callback:function(t){e.$set(e.query,"node_name",t)},expression:"query.node_name"}})],1),a("el-form-item",[a("el-button",{attrs:{size:"small",type:"submit",theme:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("operate.search")))])],1),a("div",{staticStyle:{float:"right"}},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.manualAddItem}},[e._v(e._s(e.$t("nodes.btn.manualAddNode"))+" ")]),e._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.autoAddItem}},[e._v(e._s(e.$t("nodes.btn.autoAddNode"))+" ")]),e._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.autoUpdateItem}},[e._v(e._s(e.$t("nodes.btn.autoUpdateNode"))+" ")])],1)],1),a("let-modal",{attrs:{title:e.$t("nodes.btn.manualAddNode"),footShow:!1,width:"800px"},model:{value:e.showManualAddItem,callback:function(t){e.showManualAddItem=t},expression:"showManualAddItem"}},[a("div",[a("br"),a("br"),a("let-tag",[e._v(e._s(e.$t("nodes.manualAddNode.OS1.title")))]),a("p",[e._v("1 "+e._s(e.$t("nodes.manualAddNode.OS1.step1")))]),a("p",[e._v("2 "+e._s(e.$t("nodes.manualAddNode.OS1.step2")))]),a("p",[e._v("3 "+e._s(e.$t("nodes.manualAddNode.OS1.step3")))]),a("p",[e._v("4 "+e._s(e.$t("nodes.manualAddNode.OS1.step4")))]),a("p",[e._v("5 "+e._s(e.$t("nodes.manualAddNode.OS1.step5")))]),a("br"),a("let-tag",[e._v(e._s(e.$t("nodes.manualAddNode.OS2.title")))]),a("p",[e._v("1 "+e._s(e.$t("nodes.manualAddNode.OS2.step1")))]),a("p",[e._v("2 "+e._s(e.$t("nodes.manualAddNode.OS2.step2")))]),a("p",[e._v("3 "+e._s(e.$t("nodes.manualAddNode.OS2.step3")))]),a("p",[e._v("4 "+e._s(e.$t("nodes.manualAddNode.OS2.step4")))]),a("p",[e._v("5 "+e._s(e.$t("nodes.manualAddNode.OS2.step5")))]),a("p",[e._v("6 "+e._s(e.$t("nodes.manualAddNode.OS2.step6")))]),a("br"),a("let-tag",{attrs:{theme:"success",checked:""}},[e._v(e._s(e.$t("nodes.manualAddNode.info1")))]),a("br"),a("br"),a("let-tag",{attrs:{theme:"success",checked:""}},[e._v(e._s(e.$t("nodes.manualAddNode.info2")))])],1)]),a("let-table",{ref:"nodeListLoading",attrs:{data:e.nodeList,stripe:"","empty-msg":e.$t("common.nodata"),"row-class-name":e.tableRowClassName}},[a("let-table-column",{attrs:{title:e.$t("nodeList.table.th.node_name"),prop:"node_name"}}),a("let-table-column",{attrs:{title:e.$t("nodeList.table.th.present_state")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{class:"active"===t.row.present_state?"active":"inactive"},[e._v(e._s(t.row.present_state))])]}}])}),a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"last_reg_time"}}),a("let-table-column",{attrs:{title:e.$t("nodeList.table.th.last_heartbeat"),prop:"last_heartbeat"}}),a("let-table-column",{attrs:{title:e.$t("nodeList.table.th.label"),prop:"label",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("nodeList.table.th.tars_version"),prop:"tars_version"}}),a("let-table-column",{attrs:{title:e.$t("nodeList.table.th.load_avg5"),prop:"load_avg5"}}),a("let-table-column",{attrs:{title:e.$t("nodeList.table.th.check")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editNode(t.row.node_name)}}},[e._v(e._s(e.$t("nodeList.table.edit")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){return e.checkNode(t.row.node_name)}}},[e._v(e._s(e.$t("nodeList.table.check")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){return e.deleteNode(t.row.node_name)}}},[e._v(e._s(e.$t("nodeList.table.delete")))])]}}])})],1),a("let-pagination",{staticStyle:{"margin-bottom":"32px"},attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}}),a("let-modal",{attrs:{title:this.$t("connectNodeList.title"),width:"1200px",footShow:!1,showClose:!1},model:{value:e.connectModal.show,callback:function(t){e.$set(e.connectModal,"show",t)},expression:"connectModal.show"}},[a("let-table",{ref:"connectNodeListLoading",staticStyle:{"margin-top":"20px"},attrs:{data:e.connectNodeList,stripe:"","empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{type:"expand",width:"40px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"install_step"},[a("let-steps",{attrs:{current:t.row.step||0}},[a("let-step",{attrs:{title:e.$t("connectNodeList.step1")}}),a("let-step",{attrs:{title:e.$t("connectNodeList.step2")}}),a("let-step",{attrs:{title:e.$t("connectNodeList.step3")}}),a("let-step",{attrs:{title:e.$t("connectNodeList.step4")}}),a("let-step",{attrs:{title:e.$t("connectNodeList.step5")}})],1),"fail"==t.row.installState&&1==t.row.step?a("p",{staticClass:"fail_txt"},[e._v("Error: please check file /usr/local/app/web/files/tarsnode.tgz")]):e._e(),"fail"==t.row.installState&&2==t.row.step?a("p",{staticClass:"fail_txt"},[e._v("Error: please ensure the ssh service is enabled, and the ip/port/user/password config is right")]):e._e(),"fail"==t.row.installState&&3==t.row.step?a("p",{staticClass:"fail_txt"},[e._v("Error: please install curl on the node")]):e._e(),"fail"==t.row.installState&&4==t.row.step?a("p",{staticClass:"fail_txt"},[e._v("Error: please ensure the registry is available")]):e._e(),"fail"==t.row.installState&&5==t.row.step?a("p",{staticClass:"fail_txt"},[e._v("Error: some unknown error, please check log")]):e._e(),a("pre",{staticClass:"stdout"},[e._v(e._s(t.row.stdout))])],1)]}}])}),a("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.node_name"),prop:"ip"}}),a("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.connect"),prop:"connectInfo"}}),a("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.exists"),prop:"existsInfo"}}),a("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.install")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{class:{success_txt:"success"==t.row.installState,fail_txt:"fail"==t.row.installState}},[e._v(e._s(t.row.installInfo))])]}}])})],1),a("let-button",{attrs:{theme:"primary",disabled:e.executeConnect},on:{click:e.connectNode}},[e._v(e._s(e.btnConnectText))]),e._v(" "),a("let-button",{attrs:{theme:"primary",disabled:e.executeInstall},on:{click:e.installNode}},[e._v(e._s(e.btnInstallText))]),e._v(" "),a("let-button",{staticStyle:{float:"right"},attrs:{theme:"primary"},on:{click:e.closeConnectModal}},[e._v(e._s(e.$t("connectNodeList.btnClose")))])],1),a("let-modal",{attrs:{title:this.$t("nodes.add.title"),width:"500px"},on:{"on-confirm":e.showConnectNode,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[a("let-form",{ref:"detailForm",attrs:{itemWidth:"450px"}},[a("let-form-item",{attrs:{label:e.$t("nodes.node_name"),required:""}},[e.detailModal.add?a("let-input",{attrs:{type:"textarea",rows:3,placeholder:e.$t("nodes.nodeNameTips"),required:"","required-tip":e.$t("nodes.nodeNameTips")},model:{value:e.detailModal.model.node_name,callback:function(t){e.$set(e.detailModal.model,"node_name",t)},expression:"detailModal.model.node_name"}}):a("let-select",{attrs:{size:"small",required:"",multiple:""},model:{value:e.detailModal.model.update_node_name,callback:function(t){e.$set(e.detailModal.model,"update_node_name",t)},expression:"detailModal.model.update_node_name"}},e._l(e.nodeList,(function(t){return a("let-option",{key:t.node_name,attrs:{value:t.node_name}},[e._v(" "+e._s(t.node_name+"("+t.tars_version+")")+" ")])})),1)],1),a("let-form-item",{attrs:{label:e.$t("nodes.user"),required:""}},[a("let-input",{attrs:{size:"small"},model:{value:e.detailModal.model.user,callback:function(t){e.$set(e.detailModal.model,"user",t)},expression:"detailModal.model.user"}})],1),a("let-form-item",{attrs:{label:e.$t("nodes.port"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("nodes.portTips"),required:"","required-tip":e.$t("nodes.portTips"),pattern:"^[^\\s]+$","pattern-tip":e.$t("nodes.portTips")},model:{value:e.detailModal.model.port,callback:function(t){e.$set(e.detailModal.model,"port",t)},expression:"detailModal.model.port"}})],1),a("let-form-item",{attrs:{label:e.$t("nodes.password")}},[a("let-input",{attrs:{size:"small"},model:{value:e.detailModal.model.password,callback:function(t){e.$set(e.detailModal.model,"password",t)},expression:"detailModal.model.password"}})],1),a("let-form-item",{attrs:{label:e.$t("nodes.runuser"),required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("nodes.runuserTips"),pattern:"^[^\\s]+$","pattern-tip":e.$t("nodes.runuserTips")},model:{value:e.detailModal.model.runuser,callback:function(t){e.$set(e.detailModal.model,"runuser",t)},expression:"detailModal.model.runuser"}})],1)],1)],1),a("let-modal",{attrs:{title:this.$t("nodes.label.title"),width:"500px"},on:{"on-confirm":e.onAddLabel},model:{value:e.labelModel.show,callback:function(t){e.$set(e.labelModel,"show",t)},expression:"labelModel.show"}},[a("let-form",{ref:"labelForm",attrs:{itemWidth:"450px"}},[a("let-table",{staticStyle:{"margin-top":"20px"},attrs:{data:e.labelModel.labelList,stripe:"","empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("nodes.label.name"),prop:"name"}}),a("let-table-column",{attrs:{title:e.$t("nodes.label.value"),prop:"value"}}),a("let-table-column",{attrs:{title:e.$t("nodes.label.operator")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.deleteLabel(e.labelModel.node_name,t.row.name)}}},[e._v(e._s(e.$t("nodes.label.delete")))])]}}])})],1),a("let-form-item",{attrs:{label:e.$t("nodes.label.name"),required:"",itemWidth:"150"}},[a("let-input",{attrs:{size:"small",required:"",width:"150px",pattern:"^[a-zA-Z0-9]([a-zA-Z0-9]+)?$"},model:{value:e.labelModel.model.name,callback:function(t){e.$set(e.labelModel.model,"name",t)},expression:"labelModel.model.name"}})],1),a("let-form-item",{attrs:{label:e.$t("nodes.label.value"),required:"",itemWidth:"150"}},[a("let-input",{attrs:{size:"small",required:"",width:"150px",pattern:"^[a-zA-Z0-9]([a-zA-Z0-9]+)?$"},model:{value:e.labelModel.model.value,callback:function(t){e.$set(e.labelModel.model,"value",t)},expression:"labelModel.model.value"}})],1)],1)],1)],1)},et=[],tt=a("c1df"),at=a.n(tt),ot={name:"OperationNodes",data:function(){return{query:{node_name:""},nodeList:[],pageNum:1,pageSize:20,total:1,executeInstall:!1,executeConnect:!1,btnConnectText:"",btnInstallText:"",isCheckedAll:!1,connectNodeList:[],connectModal:{show:!1},showManualAddItem:!1,detailModal:{show:!1,add:!0,model:{node_name:"",update_node_name:[],user:"root",password:"",port:"22",runuser:"tars"}},labelModel:{show:!1,node_name:"",labelList:[],model:{name:"",value:""}}}},mounted:function(){this.getNodeList(1)},methods:{updateLabel:function(e,t){for(var a=0;a<this.nodeList.length;a++){var o=this.nodeList[a];if(o.node_name==e)return void(o.label=t)}},updateLabelList:function(e){if(this.labelModel.labelList=[],e){var t=e;for(var a in t)this.labelModel.labelList.push({name:a,value:t[a]})}},editNode:function(e){var t=this;this.$ajax.getJSON("/server/api/load_node_label",{node_name:e}).then((function(a){t.labelModel.node_name=e,t.updateLabelList(a),t.updateLabel(t.labelModel.node_name,a),t.labelModel.show=!0})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},onAddLabel:function(){var e=this;this.$ajax.postJSON("/server/api/add_node_label",{node_name:this.labelModel.node_name,name:this.labelModel.model.name,value:this.labelModel.model.value}).then((function(t){e.updateLabelList(t),e.updateLabel(e.labelModel.node_name,t),e.labelModel.model.name="",e.labelModel.model.value=""})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))},deleteLabel:function(e,t){var a=this;this.$ajax.postJSON("/server/api/delete_node_label",{node_name:e,name:t}).then((function(t){a.updateLabelList(t),a.updateLabel(e,t),a.$tip.success("".concat(a.$t("common.success")))})).catch((function(e){a.$tip.error("".concat(a.$t("common.error"),": ").concat(e.err_msg||e.message))}))},checkNode:function(e){var t=this,a=this.$refs.nodeListLoading.$loading.show();this.$ajax.getJSON("/server/api/check_tars_node",{node_name:e}).then((function(e){a.hide(),e?t.$tip.success("".concat(t.$t("nodeList.checkNode"),": ").concat(e)):t.$tip.error("".concat(t.$t("nodeList.checkNode"),": ").concat(e))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},deleteNode:function(e){var t=this;this.$confirm(this.$t("nodeList.confirmDeleteNode"),this.$t("common.alert")).then((function(){var a=t.$refs.nodeListLoading.$loading.show();t.$ajax.getJSON("/server/api/uninstall_tars_node",{node_name:e}).then((function(e){a.hide(),e.rst?t.$tip.success("".concat(t.$t("nodeList.deleteNode"),": ").concat(e.msg)):t.$tip.error("".concat(t.$t("nodeList.deleteNode"),": ").concat(e.msg))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))}))},tableRowClassName:function(e){var t=e.row;e.rowIndex;return"active"===t.present_state?"red-row":""},getNodeList:function(e){var t=this;e||(e=this.pageNum||1),this.$ajax.getJSON("/server/api/list_tars_node",{node_name:this.query.node_name,page_size:this.pageSize,curr_page:e}).then((function(a){t.pageNum=e,t.total=Math.ceil(a.count/t.pageSize),t.nodeList=a.rows,t.nodeList.forEach((function(e){e.last_heartbeat=at()(e.last_heartbeat).format("YYYY-MM-DD HH:mm:ss"),e.last_reg_time=at()(e.last_reg_time).format("YYYY-MM-DD HH:mm:ss")}))})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},gotoPage:function(e){this.getNodeList(e)},search:function(){this.getNodeList(1)},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1},closeConnectModal:function(){this.executeConnect||this.executeInstall?alert(this.$t("connectNodeList.execute")):(this.btnConnectText=this.$t("connectNodeList.btnConnect"),this.btnInstallText=this.$t("connectNodeList.btnInstall"),this.connectModal.show=!1)},manualAddItem:function(){this.showManualAddItem=!0},autoAddItem:function(){this.detailModal.show=!0,this.detailModal.add=!0},autoUpdateItem:function(){this.detailModal.show=!0,this.detailModal.add=!1},showConnectNode:function(){var e=this;if(this.$refs.detailForm.validate()){this.btnConnectText=this.$t("connectNodeList.btnConnect"),this.btnInstallText=this.$t("connectNodeList.btnInstall"),this.connectNodeList=[];var t=this.detailModal.model,a=[];a=this.detailModal.add?t.node_name.split(/[,;\n]/):t.update_node_name,a.forEach((function(t){if(""!==t.trim()){var a={ip:t,connect:!1,connectInfo:"",exists:!1,existsInfo:"",step:0,stdout:"",installState:"",installInfo:""};e.connectNodeList.push(a)}})),this.connectModal.show=!0}},connectNode:function(e){var t=this;if(this.executeInstall)alert(this.$t("connectNodeList.executeInstall"));else if(0!=this.connectNodeList.length){this.btnConnectText=this.$t("connectNodeList.install.connect"),this.executeConnect=!0;var a=this.connectNodeList.length;this.connectNodeList.forEach((function(e){var o=Object.assign({},t.detailModal.model);o.node_name=e.ip,e.installState="",e.connectInfo="",e.existsInfo="",e.installInfo=t.$t("connectNodeList.install.connect"),t.$ajax.postJSON("/server/api/connect_tars_node",o).then((function(o){e.connectInfo=o.connectInfo,e.existsInfo=o.existsInfo,e.installInfo=o.installInfo,e.connect=o.connect,0==--a&&(t.btnConnectText=t.$t("connectNodeList.btnConnect"),t.executeConnect=!1)})).catch((function(o){t.$tip.error("".concat(t.$t("common.error"),": ").concat(o.message||o.err_msg)),e.installInfo=t.$t("common.error"),0==--a&&(t.btnConnectText=t.$t("connectNodeList.btnConnect"),t.executeConnect=!1)}))}))}},installNode:function(e){var t=this;if(this.executeConnect)alert(this.$t("connectNodeList.executeConnect"));else{var a=[];this.connectNodeList.forEach((function(e){a.push(e.ip),e.installState=""}));var o=this.detailModal.model,s=Object.assign({},o);s.node_name=a.join(";"),this.btnInstallText=this.$t("connectNodeList.btnInstalling"),this.executeInstall=!1,this.$ajax.postJSON("/server/api/install_tars_nodes",s).then((function(e){e.forEach((function(e){var a=t.connectNodeList.filter((function(t){return t.ip==e.ip}));a.length>0&&(a[0].installInfo=e.msg,a[0].installState=e.installState,a[0].step=e.step,a[0].stdout=e.stdout),e.rst||t.$tip.error(e.ip+":"+e.msg)})),t.getNodeList(1),t.btnInstallText=t.$t("connectNodeList.btnInstalled"),t.executeInstall=!1})).catch((function(e){t.btnInstallText=t.$t("connectNodeList.btnInstalled"),t.executeInstall=!1,t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}}}},st=ot,it=(a("33c32"),Object(x["a"])(st,Xe,et,!1,null,"16395c51",null)),lt=it.exports,rt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_templates",staticStyle:{"text-align":"center"}},[a("let-form",{attrs:{inline:"",itemWidth:"200px"}},[a("div",{staticStyle:{float:"right"}},[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.checkFramework}},[e._v(e._s(e.$t("nodes.btn.check")))]),e._v(" "),a("let-button",{attrs:{size:"small",theme:"info"},on:{click:e.openShowProblem}},[e._v(e._s(e.$t("nodes.btn.question")))])],1)]),a("br"),a("let-table",{ref:"checkLoading",attrs:{data:e.servers,stripe:"","row-class-name":e.tableRowClassName,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("checkTable.table.th.server_name"),prop:"serverName",width:"15%"}}),a("let-table-column",{attrs:{title:e.$t("checkTable.table.th.node_name"),prop:"nodeName",width:"15%"}}),a("let-table-column",{attrs:{title:e.$t("checkTable.table.th.obj_name"),prop:"objName",width:"55%"}}),a("let-table-column",{attrs:{title:e.$t("checkTable.table.th.status"),width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"status"},[e._v(e._s(t.row.status))])]}}])})],1),a("let-modal",{attrs:{title:e.$t("checkTable.problemDialog.title"),width:"600px"},model:{value:e.showProblem,callback:function(t){e.showProblem=t},expression:"showProblem"}},[a("div",[a("br"),a("p",[e._v(e._s(e.$t("checkTable.problemDialog.info")))]),a("br"),a("p",[e._v(e._s(e.$t("checkTable.problemDialog.restartFramework")))]),a("p",[e._v(e._s(e.$t("checkTable.problemDialog.stopFramework")))]),a("p",[e._v(e._s(e.$t("checkTable.problemDialog.restartServer")))])])])],1)},nt=[],ct={name:"OperationCheck",data:function(){return{showProblem:!1,servers:[]}},mounted:function(){},methods:{openShowProblem:function(){this.showProblem=!0},tableRowClassName:function(e){var t=e.row;e.rowIndex;return 1===t.check?"":2===t.check?"checking-row":0===t.check?"success-row":-1===t.check?"warning-row":""},checkFramework:function(){var e=this,t=this.$refs.checkLoading.$loading.show();this.$ajax.getJSON("/server/api/get_framework_list").then((function(a){t.hide();for(var o=0;o<a.servers.length;o++)a.servers[o].check=1,a.servers[o].status="waiting";e.servers=a.servers;var s=e;for(o=0;o<s.servers.length;o++)(function(e){setTimeout((function(){s.checkServer(e)}),100*e)})(o)})).catch((function(a){t.hide(),e.$Notice({title:e.$t("checkTable.adminRegistryFailed"),message:e.$t("checkTable.restartAdminRegistry"),type:"error",duration:0})}))},checkServer:function(e){var t=this,a=this.servers[e];a.check=2,a.status="checking",this.$ajax.postJSON("/server/api/check_framework_server",{server:a}).then((function(e){a.check=0,a.status="succ"})).catch((function(e){a.check=-1,a.status=t.$t("checkTable.failed")}))}}},dt=ct,mt=(a("e762"),Object(x["a"])(dt,rt,nt,!1,null,"505bfec0",null)),pt=mt.exports,ut=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_application"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("application.form.application")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.f_name,callback:function(t){e.$set(e.query,"f_name",t)},expression:"query.f_name"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1),a("div",{staticStyle:{float:"right"}},[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("application.btn.add")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("application.form.application"),prop:"f_name"}}),a("let-table-column",{attrs:{title:e.$t("application.form.person"),prop:"f_create_person"}}),a("let-table-column",{attrs:{title:e.$t("application.form.time"),prop:"f_create_time"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.$t("application.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?a("pre",[e._v(e._s(e.viewModal.model.profile))]):e._e(),a("div",{attrs:{slot:"foot"},slot:"foot"})]),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("application.add.title"):this.$t("application.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:e.$t("application.form.application"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("application.add.formatTips"),required:"","required-tip":e.$t("application.add.nameTips"),pattern:"^[a-zA-Z]([a-zA-Z0-9]+)?$","pattern-tip":e.$t("application.add.formatTips")},model:{value:e.detailModal.model.f_name,callback:function(t){e.$set(e.detailModal.model,"f_name",t)},expression:"detailModal.model.f_name"}})],1)],1):e._e()],1)],1)},ht=[],ft={name:"OperationApplication",data:function(){return{query:{f_name:""},items:[],viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/query_application",this.query).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},editItem:function(e){this.detailModal.model=e,this.detailModal.show=!0,this.detailModal.isNew=!1},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=t.id?"/server/api/update_application":"/server/api/add_application",o=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){o.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("application.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_application",{f_id:e.f_id}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))}}},vt=ft,_t=(a("22f3"),Object(x["a"])(vt,ut,ht,!1,null,null,null)),bt=_t.exports,gt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_business"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("business.form.business")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.f_name,callback:function(t){e.$set(e.query,"f_name",t)},expression:"query.f_name"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1),a("div",{staticStyle:{float:"right"}},[a("let-button",{staticStyle:{float:"right"},attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("business.btn.add")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("business.form.business"),prop:"f_name"}}),a("let-table-column",{attrs:{title:e.$t("business.form.showName"),prop:"f_show_name"}}),a("let-table-column",{attrs:{title:e.$t("business.form.order"),prop:"f_order"}}),a("let-table-column",{attrs:{title:e.$t("business.form.person"),prop:"f_create_person"}}),a("let-table-column",{attrs:{title:e.$t("business.form.time"),prop:"f_create_time"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.$t("business.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?a("pre",[e._v(e._s(e.viewModal.model.profile))]):e._e(),a("div",{attrs:{slot:"foot"},slot:"foot"})]),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("business.add.title"):this.$t("business.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:e.$t("business.form.business"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("business.add.formatTips"),required:"","required-tip":e.$t("business.add.nameTips"),pattern:"^[a-zA-Z]([.a-zA-Z0-9]+)?$","pattern-tip":e.$t("business.add.formatTips")},model:{value:e.detailModal.model.f_name,callback:function(t){e.$set(e.detailModal.model,"f_name",t)},expression:"detailModal.model.f_name"}})],1),a("let-form-item",{attrs:{label:e.$t("business.form.showName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("common.notEmpty"),required:"","required-tip":e.$t("common.notEmpty"),"pattern-tip":e.$t("common.notEmpty")},model:{value:e.detailModal.model.f_show_name,callback:function(t){e.$set(e.detailModal.model,"f_show_name",t)},expression:"detailModal.model.f_show_name"}})],1),a("let-form-item",{attrs:{label:e.$t("business.form.order")}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("common.needNumber"),"required-tip":e.$t("common.needNumber"),pattern:"^([0-9]+)?$","pattern-tip":e.$t("common.needNumber")},model:{value:e.detailModal.model.f_order,callback:function(t){e.$set(e.detailModal.model,"f_order",t)},expression:"detailModal.model.f_order"}})],1)],1):e._e()],1)],1)},$t=[],wt={name:"OperationApplication",data:function(){return{query:{f_name:""},items:[],viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/query_business",this.query).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},editItem:function(e){this.detailModal.model=e,this.detailModal.show=!0,this.detailModal.isNew=!1},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=t.f_id?"/server/api/update_business":"/server/api/add_business",o=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){o.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("business.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_business",{f_id:e.f_id}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))}}},yt=wt,kt=(a("c750"),Object(x["a"])(yt,gt,$t,!1,null,null,null)),Mt=kt.exports,St=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_businessRelation"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("business.form.business")}},[e.business&&e.business.length>0?a("let-select",{attrs:{size:"small",filterable:""},model:{value:e.query.f_business_name,callback:function(t){e.$set(e.query,"f_business_name",t)},expression:"query.f_business_name"}},e._l(e.business,(function(t){return a("let-option",{key:t.f_id,attrs:{value:t.f_name}},[e._v(e._s(t.f_name))])})),1):a("let-input",{attrs:{size:"small"},model:{value:e.query.f_business_name,callback:function(t){e.$set(e.query,"f_business_name",t)},expression:"query.f_business_name"}})],1),a("let-form-item",{attrs:{label:e.$t("application.form.application")}},[e.application&&e.application.length>0?a("let-select",{attrs:{size:"small",filterable:""},model:{value:e.query.f_application_name,callback:function(t){e.$set(e.query,"f_application_name",t)},expression:"query.f_application_name"}},e._l(e.application,(function(t){return a("let-option",{key:t.f_id,attrs:{value:t.f_name}},[e._v(e._s(t.f_name))])})),1):a("let-input",{attrs:{size:"small"},model:{value:e.query.f_application_name,callback:function(t){e.$set(e.query,"f_application_name",t)},expression:"query.f_application_name"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1),a("div",{staticStyle:{float:"right"}},[a("let-button",{staticStyle:{float:"right"},attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("businessRelation.btn.add")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("business.form.business"),prop:"f_business_name"}}),a("let-table-column",{attrs:{title:e.$t("application.form.application"),prop:"f_application_name"}}),a("let-table-column",{attrs:{title:e.$t("businessRelation.form.person"),prop:"f_create_person"}}),a("let-table-column",{attrs:{title:e.$t("businessRelation.form.time"),prop:"f_create_time"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.$t("businessRelation.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?a("pre",[e._v(e._s(e.viewModal.model.profile))]):e._e(),a("div",{attrs:{slot:"foot"},slot:"foot"})]),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("businessRelation.add.title"):this.$t("businessRelation.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:e.$t("application.form.application"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.detailModal.model.f_application_name,callback:function(t){e.$set(e.detailModal.model,"f_application_name",t)},expression:"detailModal.model.f_application_name"}},e._l(e.application,(function(t){return a("let-option",{key:t.f_id,attrs:{value:t.f_name}},[e._v(e._s(t.f_name))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("business.form.business"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.detailModal.model.f_business_name,callback:function(t){e.$set(e.detailModal.model,"f_business_name",t)},expression:"detailModal.model.f_business_name"}},e._l(e.business,(function(t){return a("let-option",{key:t.f_id,attrs:{value:t.f_name}},[e._v(e._s(t.f_name))])})),1)],1)],1):e._e()],1)],1)},xt=[],Lt={name:"OperationApplication",data:function(){return{query:{f_business_name:"",f_application_name:""},items:[],viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1},business:[],application:[]}},mounted:function(){this.fetchData(),this.getBusinessData(),this.getApplicationData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/query_business_relation",this.query).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=t.f_id?"/server/api/update_business_relation":"/server/api/add_business_relation",o=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){o.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("businessRelation.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_business_relation",{f_id:e.f_id}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},getBusinessData:function(){var e=this;return this.$ajax.getJSON("/server/api/query_business").then((function(t){e.business=t}))},getApplicationData:function(){var e=this;return this.$ajax.getJSON("/server/api/query_application").then((function(t){e.application=t}))}}},Ct=Lt,Nt=(a("13f9"),Object(x["a"])(Ct,St,xt,!1,null,null,null)),Et=Nt.exports,Tt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_templates"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("idc.grid.groupName")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.group_name,callback:function(t){e.$set(e.query,"group_name",t)},expression:"query.group_name"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1),a("div",{staticStyle:{float:"right"}},[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addGroup}},[e._v(e._s(e.$t("idc.btn.add")))])],1)],1),a("let-table",{ref:"table",staticClass:"hideFir",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{staticStyle:{display:"none"},attrs:{prop:"group_id"}}),a("let-table-column",{attrs:{title:e.$t("idc.grid.groupName"),prop:"group_name"}}),a("let-table-column",{attrs:{title:e.$t("idc.grid.groupNameCN"),prop:"group_name_cn"}}),a("let-table-column",{attrs:{title:e.$t("idc.grid.ipOrder"),prop:"ip_order"}}),a("let-table-column",{attrs:{title:e.$t("idc.grid.allowIpRule"),prop:"allow_ip_rule"}}),a("let-table-column",{attrs:{title:e.$t("idc.grid.dennyIpRule"),prop:"denny_ip_rule"}}),a("let-table-column",{attrs:{title:e.$t("idc.grid.lastuser"),prop:"lastuser"}}),a("let-table-column",{attrs:{title:e.$t("idc.grid.modifyTime"),prop:"modify_time"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"300px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("idc.btn.add"):this.$t("idc.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?a("let-form",{ref:"detailForm",staticClass:"two-columns",attrs:{itemWidth:"300px",columns:"2"}},[e.detailModal.isNew?e._e():a("let-form-item",{attrs:{label:e.$t("idc.grid.groupName"),required:""}},[e._v(" "+e._s(e.detailModal.model.group_name)+" ")]),e.detailModal.isNew?a("let-form-item",{attrs:{label:e.$t("idc.grid.groupName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("idc.valid.groupName"),required:"","required-tip":e.$t("idc.valid.groupName"),pattern:"^[a-zA-Z-]([.a-zA-Z0-9-]+)?$","pattern-tip":e.$t("idc.valid.groupName")},model:{value:e.detailModal.model.group_name,callback:function(t){e.$set(e.detailModal.model,"group_name",t)},expression:"detailModal.model.group_name"}})],1):e._e(),a("let-form-item",{staticStyle:{"margin-left":"40px"},attrs:{label:e.$t("idc.grid.groupNameCN"),required:""}},[a("let-input",{attrs:{size:"small",required:"",placeholder:e.$t("idc.update.placeholder")},model:{value:e.detailModal.model.group_name_cn,callback:function(t){e.$set(e.detailModal.model,"group_name_cn",t)},expression:"detailModal.model.group_name_cn"}})],1),a("let-form-item",{attrs:{label:e.$t("idc.grid.ipOrder"),required:""}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("idc.update.allowType"),required:""},model:{value:e.detailModal.model.ip_order,callback:function(t){e.$set(e.detailModal.model,"ip_order",t)},expression:"detailModal.model.ip_order"}},e._l(e.ipOrders,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item"),a("let-form-item",{attrs:{label:e.$t("idc.grid.allowIpRule")}},[a("let-select",{attrs:{required:"",multiple:""},model:{value:e.detailModal.model.allowList,callback:function(t){e.$set(e.detailModal.model,"allowList",t)},expression:"detailModal.model.allowList"}},e._l(e.allowList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{staticStyle:{"margin-left":"40px"},attrs:{label:e.$t("idc.grid.dennyIpRule")}},[a("let-select",{attrs:{required:"",multiple:""},model:{value:e.detailModal.model.dennyList,callback:function(t){e.$set(e.detailModal.model,"dennyList",t)},expression:"detailModal.model.dennyList"}},e._l(e.dennyList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{itemWidth:"242px"}},[a("let-input",{attrs:{placeholder:e.$t("idc.update.addIp"),size:"small"},model:{value:e.addIp.addAllow,callback:function(t){e.$set(e.addIp,"addAllow",t)},expression:"addIp.addAllow"}})],1),a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addAllowIp}},[e._v(e._s(e.$t("operate.add")))]),a("let-form-item",{staticStyle:{"margin-left":"40px"},attrs:{itemWidth:"242px"}},[a("let-input",{attrs:{placeholder:e.$t("idc.update.addIp"),size:"small"},model:{value:e.addIp.addDenny,callback:function(t){e.$set(e.addIp,"addDenny",t)},expression:"addIp.addDenny"}})],1),a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addDennyIp}},[e._v(e._s(e.$t("operate.add")))])],1):e._e()],1)],1)},Dt=[],qt={name:"OperationIDCManage",data:function(){return{showManualAddItem:!1,items:[],query:{group_name:""},detailModal:{show:!1,model:null,isNew:!1},ipOrders:["denny_allow","allow_denny"],allowList:[],dennyList:[],addIp:{addAllow:"",addDenny:""}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/query_idc",this.query).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},getIpList:function(e){var t=[];return""!=e.trim()&&e.split("|").forEach((function(e){t.push(e.trim())})),t},addGroup:function(){this.allowList=[],this.dennyList=[],this.detailModal.model={group_name:"",group_name_cn:"",ip_order:"denny_allow",allow_ip_rule:"",denny_ip_rule:"",allowList:[],dennyList:[]},this.detailModal.show=!0,this.detailModal.isNew=!0},editItem:function(e){var t=this,a=this.getIpList(e.allow_ip_rule),o=this.getIpList(e.denny_ip_rule);this.detailModal.model={allowList:[],dennyList:[]},this.detailModal.model=Object.assign({},this.detailModal.model,e),this.allowList=a,this.dennyList=o,a.forEach((function(e){t.detailModal.model.allowList.push(e)})),o.forEach((function(e){t.detailModal.model.dennyList.push(e)})),this.detailModal.show=!0,this.detailModal.isNew=!1},removeItem:function(e){var t=this;this.$confirm(this.$t("idc.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_idc",e).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}))},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=this.detailModal.isNew?"/server/api/add_idc":"/server/api/update_idc",o=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){o.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null,this.detailModal.isNew=!1},addAllowIp:function(){if(this.validIp(this.addIp.addAllow)){if(this.allowList.includes(this.addIp.addAllow)&&this.detailModal.model.allowList.includes(this.addIp.addAllow))return void this.$tip.error("".concat(this.$t("idc.update.exists")));this.allowList.includes(this.addIp.addAllow)&&!this.detailModal.model.allowList.includes(this.addIp.addAllow)?(this.detailModal.model.allowList.push(this.addIp.addAllow),this.addIp.addAllow=""):(this.allowList.push(this.addIp.addAllow),this.detailModal.model.allowList.push(this.addIp.addAllow),this.addIp.addAllow="")}else this.$tip.error("".concat(this.$t("idc.update.errorIp")))},addDennyIp:function(){if(this.validIp(this.addIp.addDenny)){if(this.dennyList.includes(this.addIp.addDenny)&&this.detailModal.model.dennyList.includes(this.addIp.addDenny))return void this.$tip.error("".concat(this.$t("idc.update.exists")));this.dennyList.includes(this.addIp.addDenny)&&!this.detailModal.model.dennyList.includes(this.addIp.addDenny)?(this.detailModal.model.dennyList.push(this.addIp.addDenny),this.addIp.addDenny=""):(this.dennyList.push(this.addIp.addDenny),this.detailModal.model.dennyList.push(this.addIp.addDenny),this.addIp.addDenny="")}else this.$tip.error("".concat(this.$t("idc.update.errorIp")))},validIp:function(e){var t=new RegExp("^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.((1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)|\\*)$");return t.test(e)}}},Ot=qt,It=(a("b9b2"),Object(x["a"])(Ot,Tt,Dt,!1,null,null,null)),zt=It.exports,jt=a("e3f3");o["default"].use(O["a"]);var Pt=new O["a"]({routes:[{path:"/server",name:"Server",component:ye,children:[{path:":treeid/manage",component:H},{path:":treeid/publish",component:te},{path:":treeid/config",component:ae["a"]},{path:":treeid/server-monitor",component:ce["a"]},{path:":treeid/property-monitor",component:de["a"]},{path:":treeid/interface-debuger",component:_e["a"]},{path:":treeid/user-manage",component:be["a"]}]},{path:"/operation",name:"Operation",component:Ne,redirect:"/operation/deploy",children:[{path:"deploy",component:Pe},{path:"expand",component:Be},{path:"templates",component:Qe},{path:"nodes",component:lt},{path:"check",component:pt},{path:"application",component:bt},{path:"business",component:Mt},{path:"businessRelation",component:Et},{path:"idc",component:zt}]},{path:"/gateway",name:"Gateway",component:jt["a"]},{path:"*",redirect:"/server"}],scrollBehavior:function(e,t,a){return{x:0,y:0}}});o["default"].config.productionTip=!1,w["b"].call(void 0).then((function(){o["default"].use(n.a,{i18n:function(e,t){return w["a"].t(e,t)}}),o["default"].use(l.a),new o["default"]({i18n:w["a"],el:"#app",store:s["a"],router:Pt,components:{indexApp:q},template:"<indexApp/>"})}))},b92d:function(e,t,a){},b9b2:function(e,t,a){"use strict";var o=a("1444"),s=a.n(o);s.a},c1ab:function(e,t,a){},c750:function(e,t,a){"use strict";var o=a("ed18"),s=a.n(o);s.a},ca5f:function(e,t,a){},cbf2:function(e,t,a){},d985:function(e,t,a){"use strict";var o=a("4fc2"),s=a.n(o);s.a},e762:function(e,t,a){"use strict";var o=a("b92d"),s=a.n(o);s.a},ea8c:function(e,t,a){"use strict";var o=a("cbf2"),s=a.n(o);s.a},ed18:function(e,t,a){},f71f:function(e,t,a){},fc15:function(e,t,a){},fd93:function(e,t,a){}});
\ No newline at end of file
diff --git a/client/dist/static/js/k8s.ad2b373d.js b/client/dist/static/js/k8s.ad2b373d.js
deleted file mode 100644
index 5d0925c5..00000000
--- a/client/dist/static/js/k8s.ad2b373d.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(e){function t(t){for(var r,s,l=t[0],n=t[1],c=t[2],u=0,p=[];u<l.length;u++)s=l[u],Object.prototype.hasOwnProperty.call(o,s)&&o[s]&&p.push(o[s][0]),o[s]=0;for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);d&&d(t);while(p.length)p.shift()();return i.push.apply(i,c||[]),a()}function a(){for(var e,t=0;t<i.length;t++){for(var a=i[t],r=!0,l=1;l<a.length;l++){var n=a[l];0!==o[n]&&(r=!1)}r&&(i.splice(t--,1),e=s(s.s=a[0]))}return e}var r={},o={k8s:0},i=[];function s(t){if(r[t])return r[t].exports;var a=r[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,s),a.l=!0,a.exports}s.m=e,s.c=r,s.d=function(e,t,a){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)s.d(a,r,function(t){return e[t]}.bind(null,r));return a},s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/";var l=window["webpackJsonp"]=window["webpackJsonp"]||[],n=l.push.bind(l);l.push=t,l=l.slice();for(var c=0;c<l.length;c++)t(l[c]);var d=n;i.push([2,"chunk-vendors","chunk-common"]),a()})({"04e5":function(e,t,a){"use strict";var r=a("e93e"),o=a.n(r);o.a},"0810":function(e,t,a){"use strict";var r=a("be1a"),o=a.n(r);o.a},"0d3c":function(e,t,a){"use strict";var r=a("8f5f"),o=a.n(r);o.a},"0d43":function(e,t,a){},"0dbe":function(e,t,a){},"108d":function(e,t,a){},"11e0":function(e,t,a){},"138c":function(e,t,a){},"168e":function(e,t,a){},2:function(e,t,a){e.exports=a("4933")},"244f":function(e,t,a){"use strict";var r=a("138c"),o=a.n(r);o.a},"24ee":function(e,t,a){},2562:function(e,t,a){"use strict";var r=a("626e"),o=a.n(r);o.a},2876:function(e,t,a){},"29ca":function(e,t,a){"use strict";var r=a("c49e"),o=a.n(r);o.a},"2c1d":function(e,t,a){},"2d59":function(e,t,a){},3976:function(e,t,a){"use strict";var r=a("11e0"),o=a.n(r);o.a},"3d87":function(e,t,a){},"437c":function(e,t,a){},"44ae":function(e,t,a){"use strict";var r=a("b2b3"),o=a.n(r);o.a},4917:function(e,t,a){"use strict";var r=a("108d"),o=a.n(r);o.a},4933:function(e,t,a){"use strict";a.r(t);a("e260"),a("e6cf"),a("cca6"),a("a79d");var r=a("a026"),o=(a("9c65"),a("42a2a")),i=(a("42a1"),a("b3f5"),a("0ce2"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"app"}},[a("k8s-header"),a("p",{attrs:{id:"web_version"}},[e._v("Version:"+e._s(e.web_version))]),a("keep-alive",[a("router-view",{staticClass:"main-width"})],1)],1)}),s=[],l=a("bc3a"),n=a.n(l),c=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app_index__header"},[a("div",{staticClass:"main-width"},[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"logo-wrap"},["true"===e.enable&&"true"===e.show?a("a",{attrs:{href:"/"}},[a("img",{staticClass:"logo",attrs:{src:"/static/img/tars-logo.png"}})]):e._e(),"true"===e.k8s?a("a",{class:{active:!0},attrs:{href:"/k8s.html"}},[a("img",{staticClass:"logo",attrs:{src:"/static/img/K8S.png"}})]):e._e(),"true"===e.enable?a("a",{attrs:{href:"/dcache.html"}},[a("img",{staticClass:"logo",attrs:{alt:"dcache",src:"/static/img/dcache-logo.png"}})]):e._e()])]),a("el-col",{attrs:{span:12}},[a("let-tabs",{staticClass:"tabs",attrs:{center:!0,activekey:e.$route.matched[0].path},on:{click:e.clickTab}},[a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab1"),tabkey:"/server",icon:e.serverIcon}}),a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab2"),tabkey:"/operation",icon:e.opaIcon}}),a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab8"),tabkey:"/gateway",icon:e.cacheIcon}}),"true"==e.enableMarket?a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab9"),tabkey:"/market/list",icon:e.packageIcon}}):e._e()],1)],1),a("el-col",{attrs:{span:2}},[a("div",{staticClass:"language-wrap"},[a("let-select",{attrs:{clearable:!1},on:{change:e.changeLocale},model:{value:e.locale,callback:function(t){e.locale=t},expression:"locale"}},[e._l(e.localeMessages,(function(t){return[a("let-option",{key:t.localeCode,attrs:{value:t.localeCode}},[e._v(e._s(t.localeName))])]}))],2)],1)]),a("el-col",{attrs:{span:4}},[a("div",{staticClass:"user-wrap"},[a("el-dropdown",{staticStyle:{display:"block!important"},on:{command:e.handleCommand}},[a("span",{staticClass:"el-dropdown-link"},[e._v(" "+e._s(e.uid)),a("i",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],staticClass:"el-icon-arrow-down el-icon--right"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],attrs:{command:"center"}},[e._v(e._s(e.$t("header.userCenter")))]),a("el-dropdown-item",{attrs:{command:"modifyPass"}},[e._v(e._s(e.$t("header.modifyPass")))]),a("el-dropdown-item",{attrs:{command:"quit"}},[e._v(e._s(e.$t("header.logout")))])],1)],1),e.marketUid?a("el-dropdown",{on:{command:e.handleMarketCommand}},[a("span",{staticClass:"el-dropdown-link"},[a("i",{staticClass:"el-icon-cloudy el-icon--left"}),e._v(" "+e._s(e.marketUid.uid)),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"pass"}},[e._v("璁剧疆浠撳簱瀵嗙爜")]),a("el-dropdown-item",{attrs:{command:"project"}},[e._v("绠$悊浠撳簱椤圭洰")]),a("el-dropdown-item",{attrs:{command:"modify"}},[e._v("淇敼鏈嶅姟甯傚満瀵嗙爜")]),a("el-dropdown-item",{attrs:{command:"quit"}},[e._v("閫€鍑哄競鍦虹櫥褰�")])],1)],1):e._e()],1)])],1)],1)])},d=[],u=(a("ac1f"),a("5319"),a("1817")),p=a.n(u),m=a("1ca6"),f=a.n(m),h=a("4d18"),v=a.n(h),g=a("cc08"),b=a.n(g),$=a("3e1a"),k=a.n($),y=a("f51c"),S={data:function(){return{serverIcon:p.a,opaIcon:f.a,releaseIcon:v.a,cacheIcon:b.a,operatorIcon:k.a,packageIcon:v.a,locale:this.$cookie.get("locale")||"en",enableMarket:this.$cookie.get("market")||"false",uid:"--",enableLogin:!1,isAdmin:!1,localeMessages:y["c"],k8s:this.$cookie.get("k8s")||"false",enable:this.$cookie.get("enable")||"false",show:this.$cookie.get("show")||"false",enableLdap:!1}},computed:{marketUid:function(){return this.$store.state.marketUid}},methods:{handleCommand:function(e){"center"==e?location.href="/auth.html":"modifyPass"==e&&(location.href="/pass.html"),"quit"==e&&(location.href="/logout")},handleMarketCommand:function(e){"quit"==e?(window.localStorage.uid="",window.localStorage.ticket="",this.$router.push("/market/user/login")):"pass"==e?this.$router.push("/market/repo/pass"):"project"==e?this.$router.push("/market/repo/project"):"modify"==e&&this.$router.push("/market/user/modifyPass")},clickTab:function(e){this.$router.replace(e)},userCenter:function(){window.open("/pages/server/api/userCenter")},getLoginUid:function(){var e=this;this.$ajax.getJSON("/server/api/get_login_uid").then((function(t){t&&t.uid?e.uid=t.uid:e.uid="***"})).catch((function(t){e.$tip.error("鑾峰彇鐢ㄦ埛鐧诲綍淇℃伅: ".concat(t.err_msg||t.message))}))},changeLocale:function(){this.$cookie.set("locale",this.locale,{expires:"1Y"}),location.reload()},checkEnableLogin:function(){var e=this;this.$ajax.getJSON("/server/api/is_enable_login").then((function(t){e.enableLogin=t.enableLogin||!1})).catch((function(e){}))},checkEnableLdap:function(){var e=this;this.$ajax.getJSON("/server/api/isEnableLdap").then((function(t){e.enableLdap=t.enableLdap||!1})).catch((function(e){}))},checkAdmin:function(){var e=this;this.isAdmin=!1,this.$ajax.getJSON("/server/api/isAdmin").then((function(t){e.isAdmin=t.admin})).catch((function(e){}))}},mounted:function(){this.getLoginUid(),this.checkEnableLogin(),this.checkAdmin(),this.checkEnableLdap(),window.header=this}},_=S,w=(a("c219"),a("2877")),M=Object(w["a"])(_,c,d,!1,null,null,null),x=M.exports,C=a("559f"),N={name:"App",components:{K8sHeader:x,AppFooter:C["a"]},data:function(){return{web_version:" loading路路"}},mounted:function(){var e=this;n.a.create({baseURL:"/"})({method:"get",url:"/k8s_version"}).then((function(t){e.web_version=t.data}))}},L=N,T=(a("7b9a"),Object(w["a"])(L,i,s,!1,null,null,null)),I=T.exports,A=a("8c4f"),D=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server"},[a("div",{staticClass:"left-view"},[a("div",{staticClass:"tree_search"},[a("el-input",{attrs:{size:"small",placeholder:e.$t("home.placeholder")},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.filterTextChange(t)}},model:{value:e.treeSearchKey,callback:function(t){e.treeSearchKey=t},expression:"treeSearchKey"}})],1),a("div",{staticClass:"tree_wrap"},[a("a",{staticClass:"tree_icon iconfont el-icon-third-shuaxin",class:{active:e.isIconPlay},staticStyle:{"font-family":"iconfont  !important","z-index":"99"},attrs:{href:"javascript:;"},on:{click:function(t){return e.treeSearch(1)}}}),e.treeData&&e.treeData.length?a("el-tree",{ref:"trees",staticClass:"left-tree",attrs:{data:e.treeData,props:e.defaultProps,"filter-node-method":e.filterNode,"highlight-current":"","empty-text":e.$t("common.noService"),"node-key":"id"},on:{"node-click":e.handleNodeClick},scopedSlots:e._u([{key:"default",fn:function(t){t.node;var r=t.data;return a("span",{staticClass:"custom-tree-node"},[a("el-tooltip",{attrs:{content:r.name+"("+r.serverType+")",placement:"bottom-start",effect:"light","open-delay":e.openDelay}},[a("span",[2==r.type?a("i",{class:e._f("serverTypeFilter")(r.serverType)}):e._e(),e._v(" "+e._s(r.name)+" ")])])],1)}}],null,!1,4191436028)}):e._e(),e.treeData?e._e():a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"left-tree"},[!1===e.treeData?a("div",{staticClass:"loading"},[a("p",[e._v(e._s(e.treeErrMsg))]),a("a",{attrs:{href:"javascript:;"},on:{click:e.getTreeData}},[e._v(e._s(e.$t("common.reTry")))])]):e._e()])],1)]),a("div",{staticClass:"right-view"},[a("div",{staticClass:"btabs_wrap"},[a("ul",{directives:[{name:"vscroll",rawName:"v-vscroll"}],ref:"btabs",staticClass:"btabs"},[a("li",{key:e.homeTab,staticClass:"btabs_item",class:{active:e.homeTab===e.treeid}},[a("a",{staticClass:"btabs_link",staticStyle:{"padding-right":"20px"},attrs:{href:"javascript:;"},on:{click:function(t){return e.clickBTabs(t,e.homeTab)}}},[e._v(" "+e._s(e.$t("home.homeTab"))+" ")])]),e._l(e.BTabs,(function(t){return a("li",{key:t.id,staticClass:"btabs_item",class:{active:t.id===e.treeid}},[a("a",{staticClass:"btabs_link",attrs:{href:"javascript:;"},on:{click:function(a){return e.clickBTabs(a,t.id)}}},[e._v(e._s(t.id))]),a("a",{staticClass:"btabs_close",attrs:{href:"javascript:;"},on:{click:function(a){return e.closeBTabs(t.id)}}},[e._v(" "+e._s(e.$t("home.close")))])])}))],2),a("a",{staticClass:"btabs_all",attrs:{href:"javascript:;",title:e.$t("home.closeAll")},on:{click:e.closeAllBTabs}},[e._v(" "+e._s(e.$t("home.closeAll")))])]),a("div",{directives:[{name:"show",rawName:"v-show",value:e.treeid===e.homeTab,expression:"treeid === homeTab"}],staticClass:"btabs_con_home",staticStyle:{height:"800px"}},[a("serverHistory")],1),a("div",{staticClass:"btabs_con"},e._l(e.BTabs,(function(t){return t.id===e.treeid?a("div",{key:t.id,staticClass:"btabs_con_item"},[a("let-tabs",{attrs:{activekey:t.path},on:{click:e.clickTab}},[a("let-tab-pane",{attrs:{tabkey:e.base+"/manage",tab:e.$t("header.tab.tab1")}}),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/history",tab:e.$t("header.tab.tab7")}}):e._e(),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/publish",tab:e.$t("index.rightView.tab.patch")}}):e._e(),5===e.serverData.level||1===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/config",tab:5===e.serverData.level?e.$t("index.rightView.tab.serviceConfig"):1===e.serverData.level?e.$t("index.rightView.tab.appConfig"):""}}):e._e(),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/server-monitor",tab:e.$t("index.rightView.tab.statMonitor")}}):e._e(),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/property-monitor",tab:e.$t("index.rightView.tab.propertyMonitor")}}):e._e(),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/user-manage",tab:e.$t("index.rightView.tab.privileage")}}):e._e(),5===e.serverData.level?a("let-tab-pane",{attrs:{tabkey:e.base+"/callChain",tab:e.$t("index.rightView.tab.treeConfig")}}):e._e()],1),a(e.getName(t.path),{ref:"childView",refInFor:!0,tag:"router-view",staticClass:"page_server_child",attrs:{treeid:t.id}})],1):e._e()})),0)])])},P=[],O=(a("4de4"),a("4160"),a("c975"),a("baa5"),a("a434"),a("b0c0"),a("1276"),a("159b"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_manage"},[a("div",{staticClass:"table_head",staticStyle:{height:"50px"}},[a("h4",{staticStyle:{float:"left"}},[e._v(" "+e._s(this.$t("serverList.title.serverList"))+" "),a("i",{staticClass:"icon iconfont el-icon-third-shuaxin",staticStyle:{"font-family":"iconfont !important",cursor:"pointer"},on:{click:function(t){return e.getServerList()}}})]),e.isApplication?e._e():a("span",{staticClass:"btn_group",staticStyle:{float:"right"}},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.manageK8S}},[e._v(e._s(e.$t("operate.k8s")))]),e._v(" "),a("let-button",{attrs:{theme:"primary",size:"small",disabled:e.isNormal},on:{click:e.configServer}},[e._v(e._s(e.$t("operate.server")))]),e._v(" "),a("let-button",{attrs:{theme:"primary",size:"small",disabled:e.isNormal},on:{click:e.manageServant}},[e._v(e._s(e.$t("operate.servant")))]),e._v(" "),a("let-button",{attrs:{theme:"primary",size:"small",disabled:e.isNormal},on:{click:e.viewTemplate}},[e._v(e._s(e.$t("operate.viewTemplate")))]),e._v(" "),a("let-button",{attrs:{theme:"primary",size:"small",disabled:e.isNormal},on:{click:e.privateTemplateManage}},[e._v(e._s(e.$t("operate.privateTemplateManage")))]),e._v(" "),a("let-button",{attrs:{theme:"primary",size:"small",disabled:e.isNormal},on:{click:e.startServer}},[e._v(e._s(e.$t("operate.startServer")))]),e._v(" "),a("let-button",{attrs:{theme:"primary",size:"small",disabled:e.isNormal},on:{click:e.restartServer}},[e._v(e._s(e.$t("operate.restartServer")))]),e._v(" "),a("let-button",{attrs:{theme:"primary",size:"small",disabled:e.isNormal},on:{click:e.stopServer}},[e._v(e._s(e.$t("operate.stopServer")))]),e._v(" "),a("let-button",{attrs:{theme:"primary",size:"small",disabled:e.isNormal},on:{click:e.showMoreCmd}},[e._v(e._s(e.$t("operate.more")))])],1)]),e.serverList?a("div",{ref:"serverListLoading"},[a("let-table",{attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{on:{change:function(a){return e.checkChange(t.row)}},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}],null,!1,3049151486)}),a("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"ServerApp"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.serviceName"),prop:"ServerName"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.podName"),prop:"PodName"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.gotoLog(t.row)}}},[e._v(e._s(t.row.PodName))])]}}],null,!1,2844911292)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.podIP"),prop:"PodIp"}}),a("let-table-column",{attrs:{title:"pid",prop:"Pid"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"NodeIp"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"ServiceVersion"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{style:e.getState(t.row.SettingState)},[e._v(e._s(t.row.SettingState))])]}}],null,!1,987565344)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{style:e.getState(t.row.PresentState)},[e._v(e._s(t.row.PresentState))])]}}],null,!1,1754665792)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currMessage"),width:"120px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-tooltip",{staticClass:"tooltip",attrs:{placement:"top",content:t.row.PresentMessage||""}},[a("let-table-operation",[a("span",{staticClass:"over"},[e._v(e._s(t.row.PresentMessage))])])],1)]}}],null,!1,874570244)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.createTime"),prop:"CreateTime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.deletePod(t.row)}}},[e._v(e._s(e.$t("operate.deletePod"))+" ")]),a("let-table-operation",{on:{click:function(a){return e.viewEvent(t.row)}}},[e._v(e._s(e.$t("operate.viewEvent"))+" ")])]}}],null,!1,702003604)})],1)],1):e._e(),a("div",{staticClass:"table_head"},[e.serverNotifyList&&e.showOthers?a("h4",[e._v(" "+e._s(this.$t("serverList.title.serverStatus"))+" "),a("i",{staticClass:"icon iconfont",staticStyle:{"font-family":"iconfont !important",cursor:"pointer"},on:{click:function(t){return e.getServerNotifyList()}}},[e._v("畎�")])]):e._e()]),e.serverNotifyList&&e.showOthers?a("let-table",{ref:"serverNotifyListLoading",attrs:{data:e.serverNotifyList,stripe:"","empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("common.time"),width:"160px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"white-space":"nowrap"}},[e._v(e._s(t.row._source.timeStr))])]}}],null,!1,3973901746)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.serviceID"),prop:"AppServer"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"white-space":"nowrap"}},[e._v(e._s(t.row._source.app+"."+t.row._source.server))])]}}],null,!1,4255247636)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.podName"),prop:"PodName"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"white-space":"nowrap"}},[e._v(e._s(t.row._source.podName))])]}}],null,!1,1996751150)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.source"),prop:"NotifySource"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"white-space":"nowrap"}},[e._v(e._s(t.row._source.source))])]}}],null,!1,1994068079)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result"),prop:"NotifyMessage"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{style:e.statusStyle(t.row._source.message)},[e._v(e._s(t.row._source.message))])]}}],null,!1,2929402306)})],1):e._e(),a("div",{staticStyle:{"margin-bottom":"20px"}},[a("let-pagination",{staticStyle:{float:"right"},attrs:{align:"right",page:e.notifyPagination.page,total:e.notifyPagination.total},on:{change:e.notifyGotoPage}})],1),a("let-modal",{attrs:{title:e.$t("serverList.dlg.title.editService"),width:"800px",footShow:!(!e.configModal.model||!e.configModal.model.ServerId)},on:{"on-confirm":e.saveConfig,close:e.closeConfigModal,"on-cancel":e.closeConfigModal},model:{value:e.configModal.show,callback:function(t){e.$set(e.configModal,"show",t)},expression:"configModal.show"}},[e.configModal.model&&e.configModal.model.ServerId?a("let-form",{ref:"configForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("common.template"),required:""}},[e.configModal.model.templates&&e.configModal.model.templates.length?a("let-select",{attrs:{size:"small",required:""},model:{value:e.configModal.model.ServerTemplate,callback:function(t){e.$set(e.configModal.model,"ServerTemplate",t)},expression:"configModal.model.ServerTemplate"}},e._l(e.configModal.model.templates,(function(t){return a("let-option",{key:t.TemplateName,attrs:{value:t.TemplateName}},[e._v(e._s(t.TemplateName)+" ")])})),1):a("span",[e._v(e._s(e.configModal.model.ServerTemplate))])],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.asyncThread"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.placeholder.thread"),required:"",pattern:"tars.nodejs"===e.configModal.model.ServerTemplate?"^[1-9][0-9]*$":"^([3-9]|[1-9][0-9]+)$","pattern-tip":"$t('serverList.dlg.placeholder.thread')"},model:{value:e.configModal.model.AsyncThread,callback:function(t){e.$set(e.configModal.model,"AsyncThread",t)},expression:"configModal.model.AsyncThread"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.privateTemplate"),labelWidth:"150px",itemWidth:"724px"}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:10},model:{value:e.configModal.model.ServerProfile,callback:function(t){e.$set(e.configModal.model,"ServerProfile",t)},expression:"configModal.model.ServerProfile"}})],1)],1):a("div",{ref:"configFormLoading",staticClass:"loading-placeholder"})],1),a("let-modal",{attrs:{title:e.$t("serverList.table.servant.title"),width:"1200px",footShow:!1},on:{close:e.closeServantModal},model:{value:e.servantModal.show,callback:function(t){e.$set(e.servantModal,"show",t)},expression:"servantModal.show"}},[a("let-button",{staticClass:"tbm16",attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.configServant()}}},[e._v(e._s(e.$t("operate.add"))+" Servant ")]),e.servantModal.model?a("let-table",{attrs:{data:e.servantModal.model,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"OBJ",prop:"Name"}}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),prop:"Port"}}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.protocol"),width:"150px"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.IsTars?a("let-radio",{attrs:{label:!0},model:{value:t.row.IsTars,callback:function(a){e.$set(t.row,"IsTars",a)},expression:"props.row.IsTars"}},[e._v("TARS")]):a("let-radio",{attrs:{label:!1},model:{value:t.row.IsTars,callback:function(a){e.$set(t.row,"IsTars",a)},expression:"props.row.IsTars"}},[e._v("NOT TARS")])]}}],null,!1,3719090988)}),a("let-table-column",{attrs:{title:e.$t("deployService.form.portType"),width:"150px"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.IsTcp?a("let-radio",{attrs:{label:!0},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("TCP")]):a("let-radio",{attrs:{label:!1},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("UDP")])]}}],null,!1,2027518380)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.Threads))]}}],null,!1,2683018496)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.connections"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.Connections))]}}],null,!1,192188376)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.Capacity))]}}],null,!1,4133537865)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.Timeout))]}}],null,!1,2137174470)}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.configServant(t.row.AdapterId)}}},[e._v(e._s(e.$t("operate.update"))+" ")]),a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.deleteServant(t.row.AdapterId)}}},[e._v(" "+e._s(e.$t("operate.delete"))+" ")])]}}],null,!1,2769818527)})],1):a("div",{ref:"servantModalLoading",staticClass:"loading-placeholder"})],1),a("let-modal",{attrs:{title:e.servantAddModal.isNew?e.$t("operate.title.add")+" Servant":e.$t("operate.title.update")+" Servant",width:"1200px",footShow:!!e.servantAddModal.model},on:{"on-confirm":e.saveServantAdd,close:e.closeServantAddModal,"on-cancel":e.closeServantAddModal},model:{value:e.servantAddModal.show,callback:function(t){e.$set(e.servantAddModal,"show",t)},expression:"servantAddModal.show"}},[e.servantAddModal.model&&e.servantAddModal.model.ServerServant?a("let-form",{ref:"servantAddForm"},[a("let-table",{attrs:{data:e.servantAddModal.model.ServerServant}},[a("let-table-column",{attrs:{title:"OBJ",width:"150px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.objTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:t.row.Name,callback:function(a){e.$set(t.row,"Name",a)},expression:"props.row.Name"}})]}}],null,!1,3758810427)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),width:"100px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:1,max:3e4,placeholder:"1-30000",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Port,callback:function(a){e.$set(t.row,"Port",a)},expression:"props.row.Port"}})]}}],null,!1,2319070108)}),a("let-table-column",{attrs:{title:e.$t("deployService.form.portType"),width:"150px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:!0},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("TCP")]),a("let-radio",{attrs:{label:!1},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("UDP")])]}}],null,!1,1519152386)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.protocol"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:!0},model:{value:t.row.IsTars,callback:function(a){e.$set(t.row,"IsTars",a)},expression:"props.row.IsTars"}},[e._v("TARS")]),a("let-radio",{attrs:{label:!1},model:{value:t.row.IsTars,callback:function(a){e.$set(t.row,"IsTars",a)},expression:"props.row.IsTars"}},[e._v("NOT TARS")])]}}],null,!1,3031957841)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"80px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Threads,callback:function(a){e.$set(t.row,"Threads",a)},expression:"props.row.Threads"}})]}}],null,!1,1655720946)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.connections"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Connections,callback:function(a){e.$set(t.row,"Connections",a)},expression:"props.row.Connections"}})]}}],null,!1,2060048682)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Capacity,callback:function(a){e.$set(t.row,"Capacity",a)},expression:"props.row.Capacity"}})]}}],null,!1,58581595)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0},model:{value:t.row.Timeout,callback:function(a){e.$set(t.row,"Timeout",a)},expression:"props.row.Timeout"}})]}}],null,!1,1471836343)}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.$index===e.servantAddModal.model.ServerServant.length-1?a("let-table-operation",{on:{click:function(a){return e.addAdapter(t.row)}}},[e._v(" "+e._s(e.$t("operate.add"))+" ")]):a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.servantAddModal.model.ServerServant.splice(t.$index,1)}}},[e._v(e._s(e.$t("operate.delete"))+" ")])]}}],null,!1,1130946150)})],1)],1):e._e()],1),a("let-modal",{attrs:{title:e.servantDetailModal.isNew?e.$t("operate.title.add")+" Servant":e.$t("operate.title.update")+" Servant",width:"800px",footShow:!!e.servantDetailModal.model},on:{"on-confirm":e.saveServantDetail,close:e.closeServantDetailModal,"on-cancel":e.closeServantDetailModal},model:{value:e.servantDetailModal.show,callback:function(t){e.$set(e.servantDetailModal,"show",t)},expression:"servantDetailModal.show"}},[e.servantDetailModal.model&&1===e.servantDetailModal.model.ServerServant.length?a("let-form",{ref:"servantDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("serverList.servant.objName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.servant.c"),required:"",pattern:"^[A-Za-z0-9]+$","pattern-tip":e.$t("serverList.servant.obj")},model:{value:e.servantDetailModal.model.ServerServant[0].Name,callback:function(t){e.$set(e.servantDetailModal.model.ServerServant[0],"Name",t)},expression:"servantDetailModal.model.ServerServant[0].Name"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.table.th.port"),required:""}},[a("let-input",{attrs:{size:"small",type:"number",min:1,max:3e4,placeholder:"1-30000",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.servantDetailModal.model.ServerServant[0].Port,callback:function(t){e.$set(e.servantDetailModal.model.ServerServant[0],"Port",t)},expression:"servantDetailModal.model.ServerServant[0].Port"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.numOfThread"),required:""}},[a("let-input",{attrs:{size:"small",type:"number",placeholder:e.$t("serverList.servant.thread"),required:"",pattern:"^[1-9][0-9]*$","pattern-tip":e.$t("serverList.servant.thread")},model:{value:e.servantDetailModal.model.ServerServant[0].Threads,callback:function(t){e.$set(e.servantDetailModal.model.ServerServant[0],"Threads",t)},expression:"servantDetailModal.model.ServerServant[0].Threads"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.connections"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small",type:"number"},model:{value:e.servantDetailModal.model.ServerServant[0].Connections,callback:function(t){e.$set(e.servantDetailModal.model.ServerServant[0],"Connections",t)},expression:"servantDetailModal.model.ServerServant[0].Connections"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.lengthOfQueue"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small",type:"number"},model:{value:e.servantDetailModal.model.ServerServant[0].Capacity,callback:function(t){e.$set(e.servantDetailModal.model.ServerServant[0],"Capacity",t)},expression:"servantDetailModal.model.ServerServant[0].Capacity"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.queueTimeout"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small",type:"number"},model:{value:e.servantDetailModal.model.ServerServant[0].Timeout,callback:function(t){e.$set(e.servantDetailModal.model.ServerServant[0],"Timeout",t)},expression:"servantDetailModal.model.ServerServant[0].Timeout"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.protocol"),required:""}},[a("let-radio",{attrs:{label:!0},model:{value:e.servantDetailModal.model.ServerServant[0].IsTars,callback:function(t){e.$set(e.servantDetailModal.model.ServerServant[0],"IsTars",t)},expression:"servantDetailModal.model.ServerServant[0].IsTars"}},[e._v("TARS")]),a("let-radio",{attrs:{label:!1},model:{value:e.servantDetailModal.model.ServerServant[0].IsTars,callback:function(t){e.$set(e.servantDetailModal.model.ServerServant[0],"IsTars",t)},expression:"servantDetailModal.model.ServerServant[0].IsTars"}},[e._v("NOT TARS")])],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.portType"),required:""}},[a("let-radio",{attrs:{label:!0},model:{value:e.servantDetailModal.model.ServerServant[0].IsTcp,callback:function(t){e.$set(e.servantDetailModal.model.ServerServant[0],"IsTcp",t)},expression:"servantDetailModal.model.ServerServant[0].IsTcp"}},[e._v("TCP")]),a("let-radio",{attrs:{label:!1},model:{value:e.servantDetailModal.model.ServerServant[0].IsTcp,callback:function(t){e.$set(e.servantDetailModal.model.ServerServant[0],"IsTcp",t)},expression:"servantDetailModal.model.ServerServant[0].IsTcp"}},[e._v("UDP")])],1)],1):e._e()],1),a("k8sManager",{ref:"k8s"}),a("let-modal",{staticClass:"more-cmd",attrs:{title:e.$t("operate.title.more"),width:"700px"},on:{"on-confirm":e.invokeMoreCmd,close:e.closeMoreCmdModal,"on-cancel":e.closeMoreCmdModal},model:{value:e.moreCmdModal.show,callback:function(t){e.$set(e.moreCmdModal,"show",t)},expression:"moreCmdModal.show"}},[e.moreCmdModal.model?a("let-form",{ref:"moreCmdForm"},[a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"setloglevel"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(" "+e._s(e.$t("serverList.servant.logLevel"))+" ")]),a("let-select",{attrs:{size:"small",disabled:"setloglevel"!==e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.setloglevel,callback:function(t){e.$set(e.moreCmdModal.model,"setloglevel",t)},expression:"moreCmdModal.model.setloglevel"}},e._l(e.logLevels,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"loadconfig"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(" "+e._s(e.$t("serverList.servant.pushFile"))+" ")]),a("let-select",{attrs:{size:"small",placeholder:e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length?e.$t("pub.dlg.defaultValue"):e.$t("pub.dlg.noConfFile"),disabled:!(e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length)||"loadconfig"!==e.moreCmdModal.model.selected,required:"loadconfig"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.loadconfig,callback:function(t){e.$set(e.moreCmdModal.model,"loadconfig",t)},expression:"moreCmdModal.model.loadconfig"}},e._l(e.moreCmdModal.model.configs,(function(t){return a("let-option",{key:t.filename,attrs:{value:t.filename}},[e._v(" "+e._s(t.filename)+" ")])})),1)],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"command"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(" "+e._s(e.$t("serverList.servant.sendCommand"))+" ")]),a("let-input",{attrs:{size:"small",disabled:"command"!==e.moreCmdModal.model.selected,required:"command"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.command,callback:function(t){e.$set(e.moreCmdModal.model,"command",t)},expression:"moreCmdModal.model.command"}})],1),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"connection"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(" "+e._s(e.$t("serverList.servant.serviceLink"))+" ")])],1)],1):e._e()],1),a("let-modal",{attrs:{title:e.detailModal.title,width:"700px",footShow:!1},on:{close:e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[a("div",{staticStyle:{padding:"20px 0 0"}},[e.detailModal.model&&e.detailModal.model.detail?a("pre",[e._v(e._s(e.detailModal.model.detail||e.$t("cfg.msg.empty")))]):e._e(),a("div",{ref:"detailModalLoading",staticClass:"detail-loading"})])])],1)}),q=[],j=(a("99af"),a("7db0"),a("d81d"),a("96cf"),a("1da1")),z=a("5530"),V=a("dcab"),E=a("c1df"),R=a.n(E),B=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.DetailModel.show?a("el-dialog",{attrs:{title:e.$t("operate.k8s"),visible:e.DetailModel.show,width:"1060px","before-close":e.closeDetailModel,top:"10px","close-on-click-modal":!1},on:{"update:visible":function(t){return e.$set(e.DetailModel,"show",t)}}},[a("el-collapse",{attrs:{accordion:""},on:{change:e.HandleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-collapse-item",{attrs:{name:"0"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.copyNode")))])]),a("k8s-manger",{attrs:{k8sModel:e.k8sModel,labelMatchArr:e.labelMatchArr,LabelMatchOperator:e.LabelMatchOperator,mode:"copyNode"}})],2),a("el-collapse-item",{attrs:{name:"1"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.nodeSelect")))])]),a("k8s-manger",{attrs:{k8sModel:e.k8sModel,labelMatchArr:e.labelMatchArr,LabelMatchOperator:e.LabelMatchOperator,mode:"nodeSelect"}})],2),a("el-collapse-item",{attrs:{name:"2"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.network")))])]),a("network-mapping",{attrs:{k8sModel:e.k8sModel}})],2),a("el-collapse-item",{attrs:{name:"3"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.disk")))])]),a("disk-manger",{attrs:{k8sModel:e.k8sModel,mounts:e.mounts}})],2),a("el-collapse-item",{attrs:{name:"4"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.resource")))])]),a("resource-manger",{attrs:{sourceModel:e.sourceModel}})],2),a("el-collapse-item",{attrs:{name:"6"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.hpa")))])]),a("div",[a("hpa-manger",{attrs:{hpaModel:e.hpaModel,serverData:e.serverData,sourceModel:e.sourceModel,indicators:e.indicators}})],1)],2),a("el-collapse-item",{attrs:{name:"5"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.yaml")))])]),a("k8s-yaml-edit",{ref:"yamlEdit",on:{flushOthers:e.show}})],2)],1)],1):e._e()},H=[],F=(a("b64b"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",[e.k8sModel?a("let-form",{ref:"k8sDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},["copyNode"==e.mode?a("div",[a("let-form-item",{attrs:{label:e.$t("deployService.table.th.replicas")}},[a("let-input",{attrs:{size:"small",type:"number",min:0,placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.table.tips.empty"),"pattern-tip":e.$t("deployService.form.placeholder")},model:{value:e.k8sModel.Replicas,callback:function(t){e.$set(e.k8sModel,"Replicas",t)},expression:"k8sModel.Replicas"}})],1)],1):e._e(),"nodeSelect"==e.mode?a("div",[a("let-form-item",{attrs:{label:e.$t("deployService.form.affinity"),itemWidth:"45%"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small"},model:{value:e.k8sModel.abilityAffinity,callback:function(t){e.$set(e.k8sModel,"abilityAffinity",t)},expression:"k8sModel.abilityAffinity"}},e._l(e.abilityAffinities,(function(t){return a("el-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),0==e.labelMatchArr.length?a("let-form-item",{attrs:{itemWidth:"45%"}},[a("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"text",size:"mini"},on:{click:function(t){return e.addItems(0,e.labelMatchArr)}}},[e._v(" "+e._s(e.$t("deployService.form.labelMatch.addLabel"))+" ")])],1):e._e(),e._l(e.labelMatchArr,(function(t,r){return a("div",[a("let-form-item",{attrs:{label:e.$t("nodeList.table.th.label"),itemWidth:"30%"}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("nodeList.table.th.label"),"pattern-tip":e.$t("deployService.form.labelMatch.labelValid")},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"item.key"}})],1),a("let-form-item",{attrs:{label:"operator",itemWidth:"15%"}},[a("el-select",{attrs:{size:"small"},on:{change:e.changeLabelOperator},model:{value:t.operator,callback:function(a){e.$set(t,"operator",a)},expression:"item.operator"}},e._l(e.LabelMatchOperator,(function(t){return a("el-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("nodes.label.value"),itemWidth:"40%"}},[a("el-select",{staticStyle:{width:"95%"},attrs:{disabled:t.disableValue,multiple:"",filterable:"","allow-create":"","multiple-limit":63,"default-first-option":"",placeholder:e.$t("deployService.form.labelMatch.labelValue"),size:"small"},on:{change:function(t){e.addLabelValues(t,r)}},model:{value:t.values,callback:function(a){e.$set(t,"values",a)},expression:"item.values"}},e._l(t.values,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("el-button",{attrs:{type:"primary",icon:"el-icon-plus",size:"mini",circle:""},on:{click:function(t){return e.addItems(r,e.labelMatchArr)}}}),a("el-button",{attrs:{type:"danger",icon:"el-icon-minus",size:"mini",circle:""},on:{click:function(t){return e.delItems(r,e.labelMatchArr)}}})],1)}))],2):e._e()]):e._e(),a("el-row",{staticStyle:{"margin-top":"15px"},attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.saveK8sDetail}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)}),J=[],Y=(a("d3b7"),a("498a"),a("ddb0"),a("b85c")),K={props:["k8sModel","labelMatchArr","LabelMatchOperator","mode"],name:"k8sManager",data:function(){return{serverId:"",K8SNodeList:[],K8SisCheckedAll:!1,abilityAffinities:["AppRequired","ServerRequired","AppOrServerPreferred","None"]}},methods:{changeKind:function(){this.$forceUpdate()},adapterServerK8S:function(e){var t=Object.assign({},e),a=this.labelMatchArr.map((function(e){return{key:e.key,operator:e.operator,values:e.values}}));return delete t.NodeSelector.nodeBind,t.NodeSelector=a,t},saveK8sDetail:function(){var e=this;if(this.$refs.k8sDetailForm.validate()&&this.validateLabels(this.k8sModel)){var t=this.$Loading.show(),a=this.adapterServerK8S(this.k8sModel);this.$ajax.postJSON("/k8s/api/server_k8s_update",{ServerId:a.ServerId,Replicas:a.Replicas,abilityAffinity:a.abilityAffinity,NodeSelector:a.NodeSelector}).then((function(a){t.hide(),e.$message.success("".concat(e.$t("common.success")))})).catch((function(a){t.hide(),e.$message.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},validateLabels:function(e){var t=!0;if("LabelMatch"===e.NodeSelector.Kind){var a,r=Object(Y["a"])(this.labelMatchArr);try{for(r.s();!(a=r.n()).done;){var o=a.value;if(""==o.key.trim()){this.$message.error("".concat(this.$t("deployService.form.labelMatch.errorKey"))),t=!1;break}if(-1=="Exists,DoesNotExist".indexOf(o.operator)&&0==o.values.length){this.$message.error("".concat(this.$t("deployService.form.labelMatch.errorValue"))),t=!1;break}}}catch(i){r.e(i)}finally{r.f()}return t}return!0},addLabelValues:function(e,t){var a=this,r=/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]?$/;this.labelMatchArr[t].values.forEach((function(e,t){r.test(e)||(a.labelMatchArr[t].values.splice(t,1),a.$message.error("".concat(a.$t("deployService.form.labelMatch.labelValueValid"))))}))},changeLabelOperator:function(e){var t=this;this.labelMatchArr.forEach((function(e){"Exists"==e.operator||"DoesNotExist"==e.operator?(t.$set(e,"disableValue",!0),t.$set(e,"values",[])):t.$set(e,"disableValue",!1)}))},addItems:function(e,t){t.length>=63?this.$message.error("".concat(this.$t("deployService.form.labelMatch.labelMax"))):(t.splice(e+1,0,{key:"",operator:"In",values:[]}),this.$forceUpdate())},delItems:function(e,t){t.splice(e,1),this.$forceUpdate()}}},U=K,W=Object(w["a"])(U,F,J,!1,null,null,null),Z=W.exports,G=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{attrs:{shadow:"never"}},[e.k8sModel?a("let-form",{ref:"k8sDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("div",[a("div",[a("let-form-item",{attrs:{label:e.$t("deployService.table.th.hostIpc"),itemWidth:"25%"}},[a("el-radio-group",{on:{change:e.changeKind},model:{value:e.k8sModel.HostIpc,callback:function(t){e.$set(e.k8sModel,"HostIpc",t)},expression:"k8sModel.HostIpc"}},[a("el-radio",{attrs:{label:!0}},[e._v(e._s(e.$t("common.true")))]),a("el-radio",{attrs:{label:!1}},[e._v(e._s(e.$t("common.false")))])],1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.table.th.hostNetwork"),itemWidth:"25%"}},[a("el-radio-group",{on:{change:e.changeKind},model:{value:e.k8sModel.HostNetwork,callback:function(t){e.$set(e.k8sModel,"HostNetwork",t)},expression:"k8sModel.HostNetwork"}},[a("el-radio",{attrs:{label:!0}},[e._v(e._s(e.$t("common.true")))]),a("el-radio",{attrs:{label:!1}},[e._v(e._s(e.$t("common.false")))])],1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.table.th.hostPort"),itemWidth:"25%"}},[a("el-radio-group",{on:{change:e.changeKind},model:{value:e.k8sModel.showHostPort,callback:function(t){e.$set(e.k8sModel,"showHostPort",t)},expression:"k8sModel.showHostPort"}},[a("el-radio",{attrs:{label:!0}},[e._v(e._s(e.$t("common.true")))]),a("el-radio",{attrs:{label:!1}},[e._v(e._s(e.$t("common.false")))])],1)],1)],1),e.k8sModel.showHostPort?a("div",{staticStyle:{"padding-right":"30px"}},[a("let-table",{attrs:{data:e.k8sModel.HostPortArr}},[a("let-table-column",{attrs:{title:"OBJ"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.objTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:t.row.obj,callback:function(a){e.$set(t.row,"obj",a)},expression:"props.row.obj"}})]}}],null,!1,910875067)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.hostPort")},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:1,max:65535,placeholder:"1-65535",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.HostPort,callback:function(a){e.$set(t.row,"HostPort",a)},expression:"props.row.HostPort"}})]}}],null,!1,4126442684)}),a("let-table-column",{scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-button",{staticClass:"port-button",attrs:{size:"small",theme:"primary"},on:{click:function(a){return e.generateHostPort(t.row)}}},[e._v(" "+e._s(e.$t("deployService.table.th.checkHostPort"))+" ")])]}}],null,!1,1424865976)})],1)],1):e._e()])]):e._e(),a("el-row",{attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.saveK8sDetail}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)},Q=[],X={props:["k8sModel"],name:"k8sManager",data:function(){return{serverId:"",K8SisCheckedAll:!1}},mounted:function(){},methods:{changeKind:function(){this.$forceUpdate()},adapterServerK8S:function(e){var t=Object.assign({},e);return t.HostNetwork&&t.showHostPort?this.$message.error("".concat(this.$t("deployService.form.portOrNetWork"))):(t.showHostPort&&(t.HostPort=[],t.HostPortArr&&t.HostPortArr.forEach((function(e){t.HostPort.push({NameRef:e.obj,Port:Math.floor(e.HostPort)})}))),t)},saveK8sDetail:function(){var e=this;if(this.$refs.k8sDetailForm.validate()){var t=this.$Loading.show(),a=this.adapterServerK8S(this.k8sModel);this.$ajax.postJSON("/k8s/api/server_k8s_update_network",a).then((function(a){t.hide(),e.$message.success("".concat(e.$t("common.success")))})).catch((function(a){t.hide(),e.$message.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},generateHostPort:function(e){var t=this;this.$ajax.getJSON("/k8s/api/check_host_port",{NodePort:e.HostPort}).then((function(e){var a="";e.forEach((function(e){-1==e.ret?a+="<p>".concat(e.node,":").concat(e.port,": can use</p>"):a+='<p style="color: #F56C6C">'.concat(e.node,":").concat(e.port,": cannot use</p>")})),t.$message.success({dangerouslyUseHTMLString:!0,message:a})})).catch((function(e){t.$message.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}}},ee=X,te=Object(w["a"])(ee,G,Q,!1,null,null,null),ae=te.exports,re=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{attrs:{shadow:"never"}},[0==e.mounts.length?a("div",[a("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"text",size:"mini"},on:{click:function(t){return e.addDisk(0,e.mounts)}}},[e._v(" "+e._s(e.$t("deployService.disk.addDisk"))+" ")])],1):e._e(),a("el-form",{ref:"disk",attrs:{"label-position":"top","label-width":"120px",size:"mini"}},[e._l(e.mounts,(function(t,r){return a("div",{key:r},[a("el-card",[a("el-row",{attrs:{gutter:22}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:e.$t("deployService.disk.diskName"),required:""}},[a("el-input",{model:{value:t.name,callback:function(a){e.$set(t,"name",a)},expression:"disk.name"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:e.$t("deployService.disk.path"),required:""}},[a("el-input",{model:{value:t.mountPath,callback:function(a){e.$set(t,"mountPath",a)},expression:"disk.mountPath"}})],1)],1)],1),a("el-row",{attrs:{gutter:22}},[a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{label:"uid",required:""}},[a("el-input",{attrs:{placeholder:"0"},model:{value:t.source.tLocalVolume.uid,callback:function(a){e.$set(t.source.tLocalVolume,"uid",a)},expression:"disk.source.tLocalVolume.uid"}})],1)],1),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{label:"gid",required:""}},[a("el-input",{attrs:{placeholder:"0"},model:{value:t.source.tLocalVolume.gid,callback:function(a){e.$set(t.source.tLocalVolume,"gid",a)},expression:"disk.source.tLocalVolume.gid"}})],1)],1),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{label:"mode",required:""}},[a("el-input",{attrs:{placeholder:"755"},model:{value:t.source.tLocalVolume.mode,callback:function(a){e.$set(t.source.tLocalVolume,"mode",a)},expression:"disk.source.tLocalVolume.mode"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{offset:18}},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.addDisk(r,e.mounts)}}},[e._v(" "+e._s(e.$t("deployService.disk.addDisk"))+" ")]),a("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"danger",size:"mini"},on:{click:function(t){return e.delDisk(r,e.mounts)}}},[e._v(" "+e._s(e.$t("deployService.disk.delDisk"))+" ")])],1)],1)],1)],1)})),a("el-row",{staticStyle:{"margin-top":"15px"},attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],2)],1)},oe=[],ie={props:["k8sModel","mounts"],name:"disk",methods:{validate:function(){},save:function(){var e=this;if(this.validate){var t=this.$Loading.show();this.$ajax.postJSON("/k8s/api/server_k8s_update_disk",{ServerId:this.k8sModel.ServerId,mounts:this.mounts}).then((function(a){t.hide(),e.$message.success("".concat(e.$t("common.success")))})).catch((function(a){t.hide(),e.$message.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},addDisk:function(e,t){t.splice(e+1,0,{name:"",source:{tLocalVolume:{uid:"",gid:"",mode:""}},mountPath:""}),this.$forceUpdate()},delDisk:function(e,t){t.splice(e,1),this.$forceUpdate()}}},se=ie,le=Object(w["a"])(se,re,oe,!1,null,"3186cc02",null),ne=le.exports,ce=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",[a("el-form",{attrs:{"label-width":"100px","label-position":"top",size:"mini"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.limitCpu"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":1000",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.sourceModel.limitCpu,callback:function(t){e.$set(e.sourceModel,"limitCpu",t)},expression:"sourceModel.limitCpu"}},[a("template",{slot:"append"},[e._v("milli CPUs")])],2)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.limitMem"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":128",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.sourceModel.limitMem,callback:function(t){e.$set(e.sourceModel,"limitMem",t)},expression:"sourceModel.limitMem"}},[a("template",{slot:"append"},[e._v("MiB")])],2)],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.requestCpu"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":1000",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.sourceModel.requestCpu,callback:function(t){e.$set(e.sourceModel,"requestCpu",t)},expression:"sourceModel.requestCpu"}},[a("template",{slot:"append"},[e._v("milli CPUs")])],2)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.requestMem"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":128",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.sourceModel.requestMem,callback:function(t){e.$set(e.sourceModel,"requestMem",t)},expression:"sourceModel.requestMem"}},[a("template",{slot:"append"},[e._v("MiB")])],2)],1)],1)],1),a("el-row",{attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)],1)},de=[],ue={props:["sourceModel"],name:"resource",methods:{save:function(){var e=this;this.$ajax.postJSON("/k8s/api/server_k8s_update_resource",this.sourceModel).then((function(t){e.$message.success("".concat(e.$t("common.success")))})).catch((function(t){e.$message.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))}}},pe=ue,me=Object(w["a"])(pe,ce,de,!1,null,"04ef7cb6",null),fe=me.exports,he=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",[a("el-form",{ref:"hpaForm",attrs:{"label-position":"top",size:"small",model:e.hpaModel}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.hpa.form.minReplicas"),prop:"minReplicas",rules:[{required:!0,message:e.$t("deployService.hpa.tip.minReplicas"),trigger:"blur"}]}},[a("el-input",{attrs:{oninput:"value=value.replace(/[^\\d]/g,'')",placeholder:e.$t("deployService.hpa.tip.minReplicas")},model:{value:e.hpaModel.minReplicas,callback:function(t){e.$set(e.hpaModel,"minReplicas",t)},expression:"hpaModel.minReplicas"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.hpa.form.maxReplicas"),prop:"maxReplicas",rules:[{required:!0,message:e.$t("deployService.hpa.tip.maxReplicas")}]}},[a("el-input",{attrs:{oninput:"value=value.replace(/[^\\d]/g,'')",placeholder:e.$t("deployService.hpa.tip.maxReplicas")},model:{value:e.hpaModel.maxReplicas,callback:function(t){e.$set(e.hpaModel,"maxReplicas",t)},expression:"hpaModel.maxReplicas"}})],1)],1)],1),a("el-divider",{attrs:{"content-position":"left"}},[e._v(e._s(e.$t("inf.benchmark.detail")))]),e._l(e.hpaModel.indicatorData,(function(t,r){return a("el-card",{key:r,staticStyle:{"margin-bottom":"5px"},attrs:{shadow:"hover"}},[a("el-alert",{attrs:{type:"warning",title:e.$t("deployService.hpa.tip.t2"),"show-icon":"",closable:!1}}),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:e.$t("deployService.hpa.form.IndicatorName"),prop:"indicatorData."+r+".name",rules:[{required:!0,message:e.$t("deployService.hpa.tip.IndicatorName"),trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:""},on:{change:function(a){return e.changeType(r,t.name)}},model:{value:t.name,callback:function(a){e.$set(t,"name",a)},expression:"item.name"}},e._l(e.customTargets,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.hpa.form.targetType"),prop:"indicatorData."+r+".targetType",rules:[{required:!0,message:e.$t("deployService.hpa.tip.targetType"),trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100%"},on:{change:function(t){return e.$forceUpdate()}},model:{value:t.targetType,callback:function(a){e.$set(t,"targetType",a)},expression:"item.targetType"}},e._l(e.getTargetTypes(t.name),(function(e,t){return a("el-option",{key:t,attrs:{label:e,value:t}})})),1)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.hpa.form.value"),prop:"indicatorData."+r+".value",rules:[{required:!0,message:e.$t("deployService.hpa.tip.value"),trigger:"change"}]}},[a("el-input",{attrs:{onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"item.value"}},[a("template",{slot:"append"},[e._v(e._s(e._f("getValueUnit")(t.targetType)))])],2)],1)],1)],1),a("el-row",{attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:3}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){return e.addItems(r,e.hpaModel.indicatorData)}}},[e._v(" "+e._s(e.$t("deployService.hpa.form.addIndicator"))+" ")])],1),a("el-col",{attrs:{span:3}},[a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.delItems(r,e.hpaModel.indicatorData)}}},[e._v(" "+e._s(e.$t("deployService.hpa.form.delIndicator"))+" ")])],1)],1)],1)}))],2),a("el-row",{staticStyle:{"margin-top":"15px"},attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)},ve=[],ge=(a("4d63"),a("25f0"),a("466d"),{props:["hpaModel","serverData","sourceModel","indicators"],name:"hpa",data:function(){return{customTargets:["cpu","memory"]}},mounted:function(){},filters:{getValueUnit:function(e){return"averagevalue"==e.toLowerCase()?"MiB":"averageutilization"==e.toLowerCase()?"%":"MiB"}},methods:{save:function(){var e=this;this.sourceModel.limitCpu||this.sourceModel.limitMem||this.sourceModel.requestCpu||this.sourceModel.requestMem?this.$refs.hpaForm.validate((function(t){var a=Object.assign({},{ServerId:e.serverData.ServerId},e.hpaModel,{serverData:e.serverData});t?e.$ajax.postJSON("/k8s/api/create_hpa",a).then((function(t){e.$message.success("".concat(e.$t("common.success")))})).catch((function(t){e.$message.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))})):e.$message.warning("".concat(e.$t("deployService.hpa.tip.checkForm")))})):this.$message.error("".concat(this.$t("deployService.resources.tip.resources")))},addItems:function(e,t){t.splice(e+1,0,{name:"cpu",targetType:"AverageUtilization",value:""}),this.$forceUpdate()},delItems:function(e,t){1!==t.length&&(t.splice(e,1),this.$forceUpdate())},changeType:function(e,t){var a=this.getMatchIndicators(t);this.$set(this.hpaModel.indicatorData[e],"targetType",a.target[0].type),this.$forceUpdate()},getMatchIndicators:function(e){var t,a,r=Object(Y["a"])(this.indicators);try{for(r.s();!(a=r.n()).done;){var o=a.value;if("exact"==o.matchType&&o.match.toLowerCase()==e.toLowerCase()){t=o;break}if("regex"==o.matchType){var i=new RegExp(o.match);if(i.test(e)){t=o;break}}}}catch(s){r.e(s)}finally{r.f()}return t||this.$message.error("".concat(this.$t("deployService.hpa.tip.noIndicator"))),t},getTargetTypes:function(e){var t=this,a=this.getMatchIndicators(e),r={};return a.target.forEach((function(e){e.type.toLowerCase()=="AverageValue".toLowerCase()&&(r[e.type]=t.$t("deployService.hpa.form.averageValue")),e.type.toLowerCase()=="AverageUtilization".toLowerCase()&&(r[e.type]=t.$t("deployService.hpa.form.averageUtilization"))})),r}}}),be=ge,$e=(a("6c7a"),Object(w["a"])(be,he,ve,!1,null,"23ac87cc",null)),ke=$e.exports,ye=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{attrs:{shadow:"never"}},[a("div",{staticStyle:{border:"1px solid #595656","border-radius":"5px"}},[a("yaml-editor",{ref:"yamlEdit",staticStyle:{margin:"1px"},model:{value:e.yamlContent,callback:function(t){e.yamlContent=t},expression:"yamlContent"}})],1),a("div",{staticClass:"bottom"},[a("el-upload",{attrs:{"before-upload":e.uploadFile,"show-file-list":!1,action:"","list-type":"yml/yaml"}},[a("el-button",{attrs:{size:"mini",type:"primary"}},[e._v(e._s(e.$t("deployService.batchDeploy.btn.uploadApplyConf"))+" ")])],1),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"mini"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save"))+" ")])],1)])},Se=[],_e=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"yaml-editor"},[a("textarea",{ref:"textarea",attrs:{id:"textarea"}})])},we=[],Me=a("56b3"),xe=a.n(Me);a("0dd0"),a("a7be"),a("b866"),a("ced0"),a("8822"),a("b8d1");window.jsyaml=a("e2c1");var Ce={name:"yaml-editor",props:["value"],data:function(){return{yamlEditor:!1}},watch:{value:function(e){var t=this.yamlEditor.getValue();e!==t&&this.yamlEditor.setValue(this.value)}},mounted:function(){var e=this;this.yamlEditor=xe.a.fromTextArea(this.$refs.textarea,{lineNumbers:!0,mode:"text/x-yaml",theme:"idea",lint:!0,lineWrapping:!0,autofocus:!0,extraKeys:{"Ctrl-Space":"autocomplete"},foldGutter:!0,gutters:["CodeMirror-lint-markers"],smartIndent:!0}),this.yamlEditor.on("change",(function(t){e.$emit("changed",t.getValue()),e.$emit("input",t.getValue())})),this.yamlEditor.setValue(this.value),this.$nextTick((function(){var t=e;setInterval((function(){t.yamlEditor.refresh()}),500)}))},methods:{getValue:function(){return this.yamlEditor.getValue()},refresh:function(){this.yamlEditor.refresh()},readonly:function(){this.yamlEditor.setOption("readOnly",!0)}}},Ne=Ce,Le=(a("0d3c"),Object(w["a"])(Ne,_e,we,!1,null,"d17a4854",null)),Te=Le.exports,Ie={name:"k8sYamlEdit",components:{YamlEditor:Te},data:function(){return{ServerId:"",plural:"",yamlContent:""}},methods:{refresh:function(){this.$refs.yamlEdit.refresh()},readonly:function(){this.$refs.yamlEdit.readonly()},show:function(e,t){var a=this;this.ServerId=e,this.plural=t,this.$ajax.getJSON("/k8s/api/get_object",{plural:t,ServerId:e}).then((function(e){a.yamlContent=e})).catch((function(e){a.$message.error("".concat(a.$t("common.error"),": ").concat(e.err_msg||e.message))}))},save:function(){var e=this;this.$ajax.postJSON("/k8s/api/update_object",{plural:this.plural,ServerId:this.ServerId,yamlContent:this.yamlContent}).then((function(t){e.$emit("flushOthers",e.ServerId),e.$message.success("".concat(e.$t("common.success"))),e.$emit("successFun")})).catch((function(t){e.$message.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))},uploadFile:function(e){var t=e.name;if(-1==t.lastIndexOf("."))return this.$message.error("".concat(this.$t("deployService.batchDeploy.errFile"))),!1;var a=".yml|.yaml|",r=t.substring(t.lastIndexOf(".")).toLowerCase();if(-1==a.indexOf(r+"|"))return this.$message.error("".concat(this.$t("deployService.batchDeploy.errFile"))),!1;var o=new FileReader;o.readAsText(e,"UTF-8");var i=this;o.onload=function(e){e.target.result;i.$nextTick((function(){i.yamlContent=o.result}))}}}},Ae=Ie,De=(a("ca6f"),Object(w["a"])(Ae,ye,Se,!1,null,"697eb848",null)),Pe=De.exports,Oe={name:"index",components:{k8sManger:Z,diskManger:ne,networkMapping:ae,resourceManger:fe,K8sYamlEdit:Pe,hpaManger:ke},data:function(){return{DetailModel:{show:!1},activeName:"0",k8sModel:{},labelMatchArr:[],LabelMatchOperator:[],sourceModel:{},serverData:{},hpaModel:{minReplicas:"",maxReplicas:"",indicatorData:[]},indicators:[],yamlContent:"",mounts:[],serverId:""}},methods:{HandleClick:function(e){var t=this;"5"==e&&this.$nextTick((function(){t.$refs.yamlEdit.show(t.serverId,"tservers"),t.$refs.yamlEdit.refresh()}))},closeDetailModel:function(){this.DetailModel.show=!1,this.k8sModel={},this.mounts=[],this.labelMatchArr=[],this.sourceModel={},this.serverData={},this.hpaModel={minReplicas:"",maxReplicas:"",indicatorData:[]}},show:function(e){var t=this;this.serverId=e,this.DetailModel.show=!0,this.getDefaultValue(),this.getServerInfo(e),this.getHpaInfo(e),this.$nextTick((function(){t.$refs.yamlEdit.show(e,"tservers")}))},getDefaultValue:function(){var e=this,t=this.LabelMatchOperator,a=this.indicators;this.$ajax.getJSON("/k8s/api/default",{}).then((function(r){e.defaultObj=r.ServerServantElem,r.LabelMatchOperator&&(t=r.LabelMatchOperator),r.indicators&&(a=r.indicators),e.LabelMatchOperator=t,e.indicators=a}))},getServerInfo:function(e){var t=this;this.$ajax.getJSON("/k8s/api/server_k8s_select",{ServerId:e}).then((function(a){if(a=a.Data[0],t.serverData=a,t.sourceModel.ServerId=e,a.resources&&Object.keys(a.resources).length>0&&(a.resources.limits&&(a.resources.limits.cpu&&t.$set(t.sourceModel,"limitCpu",a.resources.limits.cpu.replace(/m/g,"")),a.resources.limits.memory&&t.$set(t.sourceModel,"limitMem",a.resources.limits.memory.replace(/m/g,""))),a.resources.requests&&(a.resources.requests.cpu&&t.$set(t.sourceModel,"requestCpu",a.resources.requests.cpu.replace(/m/g,"")),a.resources.requests.memory&&t.$set(t.sourceModel,"requestMem",a.resources.requests.memory.replace(/m/g,"")))),a.showHostPort=!1,a&&a){var r=[];a.HostPort&&Object.keys(a.HostPort).length>0&&(a.showHostPort=!0,a.HostPort.forEach((function(e){r.push({obj:e.nameRef,HostPort:Math.floor(e.port)})})),a.HostPortArr=r),0===r.length&&t.$ajax.getJSON("/k8s/api/server_adapter_select",{ServerId:e}).then((function(e){e&&e.Data&&(e.Data.forEach((function(e){r.push({obj:e.Name,HostPort:0})})),a.HostPortArr=r)}))}a.NodeSelector=a.NodeSelector,t.labelMatchArr=a.NodeSelector,t.labelMatchArr.forEach((function(e){-1!="Exists,DoesNotExist".indexOf(e.operator)&&(e.disableValue=!0)})),t.k8sModel=a,t.mounts=a.mounts.filter((function(e){return e.source.hasOwnProperty("tLocalVolume")}))})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},getHpaInfo:function(e){var t=this;this.$ajax.getJSON("/k8s/api/get_hpa",{serverId:e.toLowerCase().replace(".","-")}).then((function(e){if(console.log("res:"+JSON.stringify(e,null,4)),e&&Object.keys(e).length>1){var a=e.body.spec;t.$set(t.hpaModel,"minReplicas",a.minReplicas),t.$set(t.hpaModel,"maxReplicas",a.maxReplicas),a.metrics.forEach((function(e,a){var r={};"Resource"==e.type&&(r.name=e.resource.name,"averagevalue"==e.resource.target.type.toLowerCase()?(r.targetType="AverageValue",r.value=e.resource.target.averageValue.replace(/m/g,"")):(r.targetType="AverageUtilization",r.value=e.resource.target.averageUtilization)),"Pods"==e.type&&(r.name=e.pods.metric.name,r.targetType=e.pods.target.type,r.value=e.pods.target.averageValue.replace(/m/g,"")),"object"==e.type.toLowerCase()&&(r.name=e.object.metric.name,"averagevalue"==e.object.target.type.toLowerCase()&&(r.targetType="AverageValue",r.value=e.object.target.averageValue.replace(/m/g,""))),t.$set(t.hpaModel.indicatorData,a,r)})),a.metrics&&0==a.metrics.length&&t.hpaModel.indicatorData.push({name:"cpu",targetType:"AverageValue",value:""})}else t.hpaModel.indicatorData.push({name:"cpu",targetType:"AverageUtilization",value:""})})).catch((function(e){t.$message.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))}}},qe=Oe,je=Object(w["a"])(qe,B,H,!1,null,null,null),ze=je.exports,Ve={name:"ServerManage",components:{wrapper:V["a"],k8sManager:ze},data:function(){return{serverData:{level:5,application:"",server_name:"",server_type:""},isreloadlist:!0,reloadTask:null,reloadlist:null,serverList:[],serverNotifyList:[],notifyPagination:{page:1,size:10,total:1},defaultObj:{},configModal:{show:!1,model:null},servantAddModal:{show:!1,isNew:!0,model:null},servantModal:{show:!1,model:null,currentServer:null},servantDetailModal:{show:!1,isNew:!0,model:null},detailModal:{show:!1,title:"",model:null},logLevels:["NONE","DEBUG","TARS","INFO","WARN","ERROR"],moreCmdModal:{show:!1,model:null,currentServer:null},isCheckedAll:!1,checkedList:[]}},props:["treeid"],computed:{isApplication:function(){return-1==this.treeid.indexOf(".")},showOthers:function(){return 5===this.serverData.level},isEndpointValid:function(){return!(!this.servantDetailModal.model||!this.servantDetailModal.model.endpoint)&&this.checkServantEndpoint(this.servantDetailModal.model.endpoint)},isNormal:function(){return"normal"===this.serverData.server_type}},methods:{gotoLog:function(e){var t="/logview.html?History=false&NodeIP=".concat(e.NodeIp,"&ServerApp=").concat(e.ServerApp,"&ServerName=").concat(e.ServerName,"&PodName=").concat(e.PodName);window.open(t)},getServerId:function(){return this.treeid},getState:function(e){var t=e;switch("".concat(e)){case"Active":t="color: green";break;case"Inactive":case"Activating":case"Deactivating":case"Unknown":t="color: red";break}return t},reloadServerList:function(){var e=this;if(this.$parent.BTabs.length>0){var t=this.$parent.BTabs[0].path,a=t.substring(t.lastIndexOf("/")+1);"manage"!==a&&e.reloadTask||(e.reloadTask=setTimeout((function(){e.isreloadlist&&"#/server"==location.hash&&e.$parent.treeid==e.getServerId()&&(e.getServerList(),e.getServerNotifyList()),e.reloadServerList()}),3e3))}},startServerList:function(){this.isreloadlist=!0},stopServerList:function(){this.isreloadlist=!1},getServerList:function(){var e=this;this.$ajax.getJSON("/k8s/api/pod_list",{ServerId:this.getServerId()}).then((function(t){e.serverList=[],t.hasOwnProperty("Data")&&(t.Data.forEach((function(e){e.isChecked=!1,e.CreateTime=R()(e.CreateTime).format("YYYY-MM-DD HH:mm:ss"),e.StartTime=R()(e.StartTime).format("YYYY-MM-DD HH:mm:ss")})),e.serverList=t.Data)})).catch((function(e){}))},getServerNotifyList:function(){var e=this;this.showOthers&&this.$ajax.getJSON("/k8s/api/server_notify_list",{ServerId:this.getServerId(),size:this.notifyPagination.size,page:this.notifyPagination.page}).then((function(t){e.notifyPagination.total=Math.ceil(t.total.value/e.notifyPagination.size),e.serverNotifyList=t.hits||[],e.serverNotifyList.forEach((function(e){e._source.timeStr=R()(e._source.notifyTime).format("YYYY-MM-DD HH:mm:ss")}))})).catch((function(e){}))},statusStyle:function(e){return e=e||"","restart"==e||-1!=e.indexOf("[succ]")?"color: green":"stop"==e||-1!=e.indexOf("[alarm]")||-1!=e.indexOf("error")||-1!=e.indexOf("ERROR")?"color: red":""},notifyGotoPage:function(e){this.notifyPagination.page=e,this.getServerNotifyList()},getServerConfig:function(e){var t=this;this.stopServerList();var a=this.$loading.show({target:this.$refs.configFormLoading});this.$ajax.getJSON("/k8s/api/server_option_select",{ServerId:e}).then((function(e){a.hide(),t.configModal.model?t.configModal.model=Object.assign({},t.configModal.model,e.Data[0]):(e.templates=[],t.configModal.model=e.Data[0]),t.startServerList()})).catch((function(e){a.hide(),t.closeConfigModal(),t.startServerList(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))},configServer:function(){var e=this;this.stopServerList(),this.configModal.show=!0,this.$ajax.getJSON("/k8s/api/template_select").then((function(t){e.configModal.model?e.configModal.model.templates=t.Data:e.configModal.model={templates:t.Data},e.getServerConfig(e.getServerId()),e.startServerList()})).catch((function(t){e.startServerList(),e.$tip.error("".concat(e.$t("serverList.restart.failed"),": ").concat(t.err_msg||t.message))}))},saveConfig:function(){var e=this;if(this.$refs.configForm.validate()){var t=this.$Loading.show();this.$ajax.postJSON("/k8s/api/server_option_update",Object(z["a"])({isBak:this.configModal.model.bak_flag},this.configModal.model)).then((function(a){t.hide(),e.closeConfigModal(),e.$tip.success(e.$t("common.success"))}))}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1,this.configModal.model=null,this.startServerList()},startServer:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a,r,o,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.checkLauncherType();case 2:if(!t.sent){t.next=5;break}return e.$tip.warning(e.$t("pub.dlg.foregroundTip")),t.abrupt("return");case 5:if(e.stopServerList(),a=e.checkedList.filter((function(e){return e.isChecked})),!(a.length<=0)){t.next=10;break}return e.$tip.warning(e.$t("pub.dlg.a")),t.abrupt("return");case 10:r=a.map((function(e){return e.PodIp})),o=a[0].ServerApp,i=a[0].ServerName,e.$confirm(e.$t("serverList.startService.msg.startService"),e.$t("common.alert")).then((function(){e.$ajax.getJSON("/k8s/api/send_command",{command:"StartServer",podIp:r,serverApp:o,serverName:i}).then((function(t){e.$tip.success(e.$t("common.success")),e.startServerList(),e.getServerNotifyList()})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))})).catch((function(){e.startServerList()}));case 14:case"end":return t.stop()}}),t)})))()},restartServer:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a,r,o,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.checkLauncherType();case 2:if(!t.sent){t.next=5;break}return e.$tip.warning(e.$t("pub.dlg.foregroundTip")),t.abrupt("return");case 5:if(e.stopServerList(),a=e.checkedList.filter((function(e){return e.isChecked})),!(a.length<=0)){t.next=10;break}return e.$tip.warning(e.$t("pub.dlg.a")),t.abrupt("return");case 10:r=a.map((function(e){return e.PodIp})),o=a[0].ServerApp,i=a[0].ServerName,e.$confirm(e.$t("serverList.restartService.msg.restartService"),e.$t("common.alert")).then((function(){e.$ajax.getJSON("/k8s/api/send_command",{command:"RestartServer",podIp:r,serverApp:o,serverName:i}).then((function(t){e.$tip.success(e.$t("common.success")),e.startServerList(),e.getServerNotifyList()})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))})).catch((function(){e.startServerList()}));case 14:case"end":return t.stop()}}),t)})))()},stopServer:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a,r,o,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.checkLauncherType();case 2:if(!t.sent){t.next=5;break}return e.$tip.warning(e.$t("pub.dlg.foregroundTip")),t.abrupt("return");case 5:if(e.stopServerList(),a=e.checkedList.filter((function(e){return e.isChecked})),!(a.length<=0)){t.next=10;break}return e.$tip.warning(e.$t("pub.dlg.a")),t.abrupt("return");case 10:r=a.map((function(e){return e.PodIp})),o=a[0].ServerApp,i=a[0].ServerName,e.$confirm(e.$t("serverList.stopService.msg.stopService"),e.$t("common.alert")).then((function(){e.$ajax.getJSON("/k8s/api/send_command",{command:"StopServer",podIp:r,serverApp:o,serverName:i}).then((function(t){e.$tip.success(e.$t("common.success")),e.startServerList(),e.getServerNotifyList()})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))})).catch((function(){e.startServerList()}));case 14:case"end":return t.stop()}}),t)})))()},deletePod:function(e){var t=this;this.$confirm(this.$t("serverList.tips.deletePod"),this.$t("common.alert")).then((function(){t.$ajax.getJSON("/k8s/api/delete_pod",{PodName:e.PodName}).then((function(e){t.$tip.success("".concat(t.$t("common.success"))),t.getServerList()})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))}))},viewEvent:function(e){var t=Object.assign({},e),a={application:t.ServerApp,serverName:t.ServerName};this.$router.push({path:"/operation/event",query:a})},viewTemplate:function(){var e=this,t=this.$loading.show({target:this.$refs.servantModalLoading});this.$ajax.getJSON("/k8s/api/server_option_template",{ServerId:this.getServerId()}).then((function(a){t.hide(),e.detailModal.title=e.$t("cfg.title.viewTemplate"),e.detailModal.model={detail:a},e.detailModal.show=!0})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))},privateTemplateManage:function(){var e=this,t=this.$loading.show({target:this.$refs.servantModalLoading});this.$ajax.getJSON("/k8s/api/server_option_select",{ServerId:this.getServerId()}).then((function(a){t.hide(),e.detailModal.title=e.$t("cfg.title.viewProfileTemplate"),e.detailModal.model={detail:a&&a.Data[0].ServerProfile||""},e.detailModal.show=!0})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))},manageServant:function(e){var t=this;this.stopServerList(),this.servantModal.show=!0,this.$ajax.getJSON("/k8s/api/server_adapter_select",{ServerId:this.getServerId()}).then((function(a){t.servantModal.model=a.Data,t.servantModal.currentServer=e})).catch((function(e){t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))},manageK8S:function(){this.$refs.k8s.show(this.getServerId())},closeServantModal:function(){this.servantModal.show=!1,this.servantModal.model=null,this.servantModal.currentServer=null,this.startServerList()},addAdapter:function(e){this.servantAddModal.model.ServerServant.push(Object.assign({},e,{Port:this.getPort(e.Port)}))},getPort:function(e){var t=this.defaultObj,a=this.servantModal,r=0;if(e)r=e;else if(r=Math.floor(t.Port),a.model&&a.model.length>0){var o=a.model.sort((function(e,t){return t.Port-e.Port}))||[];r=Math.floor(o[0].Port)}return r++,19385===r&&r++,r},configServant:function(e){var t=this.defaultObj,a={ServerId:this.getServerId(),ServerServant:[{Name:"",Port:this.getPort()||0,Threads:t.Threads||0,Connections:t.Connections||0,Capacity:t.Capacity||0,Timeout:t.Timeout||0,IsTcp:t.IsTcp,IsTars:t.IsTars}]};if(e){this.servantDetailModal.model=a,this.servantDetailModal.isNew=!0;var r=this.servantModal.model.find((function(t){return t.AdapterId===e}));this.servantDetailModal.model={AdapterId:r.AdapterId,ServerServant:[r]},this.servantDetailModal.isNew=!1,this.servantDetailModal.show=!0}else this.servantAddModal.model=a,this.servantAddModal.isNew=!0,this.servantAddModal.show=!0},closeServantAddModal:function(){this.$refs.servantAddForm&&this.$refs.servantAddForm.resetValid(),this.servantAddModal.show=!1,this.servantAddModal.model=null},closeServantDetailModal:function(){this.$refs.servantDetailForm&&this.$refs.servantDetailForm.resetValid(),this.servantDetailModal.show=!1,this.servantDetailModal.model=null},checkServantEndpoint:function(e){var t=e.split(/\s-/),a=/^tcp|udp$/i,r=/^h\s(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/i,o=/^t\s([1-9]|[1-9]\d+)$/i,i=/^p\s\d{4,5}$/i,s=!0;if(a.test(t[0])){for(var l=0,n=1;n<t.length;n++)if(r&&r.test(t[n])&&(l++,this.servantDetailModal.model.node_name=t[n].split(/\s/)[1],r=null),o&&o.test(t[n])&&(l++,o=null),i&&i.test(t[n])){var c=t[n].substring(2);c<0||c>65535||l++,i=null}s=3===l}else s=!1;return s},saveServantAdd:function(){var e=this;if(this.$refs.servantAddForm.validate()){var t=this.$Loading.show();if(this.servantAddModal.isNew){var a=Object.assign({},this.servantAddModal.model);if(a.ServerServant){var r={};a.ServerServant.forEach((function(e){r[e.Name]=e})),a.ServerServant=r}this.$ajax.postJSON("/k8s/api/server_adapter_create",a).then((function(a){t.hide(),e.manageServant(),e.$tip.success(e.$t("common.success")),e.closeServantAddModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}else t.hide()}},saveServantDetail:function(){var e=this;if(this.$refs.servantDetailForm.validate()){var t=this.$Loading.show();if(this.servantDetailModal.isNew){var a=this.servantDetailModal.model;this.$ajax.postJSON("/k8s/api/server_adapter_create",a).then((function(a){t.hide(),e.servantModal.model.unshift(a),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}else{this.servantDetailModal.model.servant=this.servantDetailModal.model.application+"."+this.servantDetailModal.model.server_name+"."+this.servantDetailModal.model.obj_name;var r=Object.assign({},this.servantDetailModal.model);this.$ajax.postJSON("/k8s/api/server_adapter_update",r).then((function(a){t.hide(),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}}},deleteServant:function(e){var t=this;this.$confirm(this.$t("serverList.servant.a"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/k8s/api/server_adapter_delete",{AdapterId:e}).then((function(r){a.hide(),t.servantModal.model=t.servantModal.model.filter((function(t){return t.AdapterId!==e})),t.$tip.success(t.$t("common.success"))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))}))},closeDetailModal:function(){this.detailModal.show=!1,this.detailModal.model=null},showMoreCmd:function(e){var t=this;this.stopServerList();var a=this.checkedList.filter((function(e){return e.isChecked}));if(a.length<=0)this.$tip.warning(this.$t("pub.dlg.a"));else{var r=a.map((function(e){return e.PodIp})),o=a[0].ServerApp,i=a[0].ServerName;this.moreCmdModal.model={podIp:r,serverApp:o,serverName:i,selected:"setloglevel",setloglevel:"NONE",loadconfig:"",command:"",configs:null},this.moreCmdModal.unwatch=this.$watch("moreCmdModal.model.selected",(function(){t.$refs.moreCmdForm&&t.$refs.moreCmdForm.resetValid()})),this.moreCmdModal.show=!0,this.moreCmdModal.currentServer=e}},sendCommand:function(e,t,a,r,o){var i=this,s=this.$Loading.show();this.$ajax.getJSON("/k8s/api/send_command",{serverApp:e,serverName:t,podIp:a,command:r}).then((function(e){s.hide();var t=e[0].err_msg.replace(/\n/g,"<br>");if(0!==e[0].ret_code)throw new Error(t);var a={title:i.$t("common.success"),message:t};o&&(a.duration=0),i.$tip.success(a),i.getServerNotifyList()})).catch((function(e){s.hide(),i.$tip.error({title:i.$t("common.error"),message:e.err_msg||e.message})}))},invokeMoreCmd:function(){var e=this.moreCmdModal.model;this.moreCmdModal.currentServer;"setloglevel"===e.selected?this.sendCommand(e.serverApp,e.serverName,e.podIp,"tars.setloglevel ".concat(e.setloglevel)):"loadconfig"===e.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(e.serverApp,e.serverName,e.podIp,"tars.loadconfig ".concat(e.loadconfig)):"command"===e.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(e.serverApp,e.serverName,e.podIp,e.command):"connection"===e.selected&&this.sendCommand(e.serverApp,e.serverName,e.podIp,"tars.connection",!0)},closeMoreCmdModal:function(){this.$refs.moreCmdForm&&this.$refs.moreCmdForm.resetValid(),this.moreCmdModal.unwatch&&this.moreCmdModal.unwatch(),this.checkedList=[],this.moreCmdModal.show=!1,this.moreCmdModal.model=null,this.startServerList()},checkChange:function(e){this.stopServerList();var t=this.checkedList,a=e.isChecked;if(a){var r=!1;t.forEach((function(t){t.PodId===e.PodId&&(r=!0)})),r||t.push(e)}else{var o=!1,i=-1;t.forEach((function(t,a){t.PodId===e.PodId&&(o=!0,i=a)})),o&&t.splice(i,1)}},checkLauncherType:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$ajax.getJSON("/k8s/api/server_k8s_select",{ServerId:e.getServerId()});case 2:return a=t.sent,r=a.Data[0].launcherType,t.abrupt("return","foreground"==r);case 5:case"end":return t.stop()}}),t)})))()}},created:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.serverData=e.$parent.getServerData(),e.serverData.server_type){t.next=12;break}return t.prev=2,t.next=5,e.$ajax.getJSON("/k8s/api/server_option_select",{ServerId:e.treeid});case 5:a=t.sent,e.$set(e.serverData,"server_type",a.Data[0].serverType),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](2),e.$set(e.serverData,"server_type","normal");case 12:case"end":return t.stop()}}),t,null,[[2,9]])})))()},mounted:function(){this.getServerList(),this.reloadServerList(),this.startServerList(),this.getServerNotifyList()},beforeMount:function(){this.startServerList()},beforeDestroy:function(){this.stopServerList()},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.serverList.forEach((function(t){t.isChecked=e})),this.checkedList=e?[].concat(this.serverList):[]},checkedList:function(){var e=this.checkedList;e.length>0?this.stopServerList():this.startServerList()}}},Ee=Ve,Re=(a("cb44"),Object(w["a"])(Ee,O,q,!1,null,null,null)),Be=Re.exports,He=a("67ac"),Fe=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_publish"},[e.buildList.length>0?a("div",[a("div",{staticClass:"table_head",staticStyle:{height:"50px"}},[a("h4",[e._v(e._s(this.$t("serverList.title.buildList"))+" "),a("i",{staticClass:"icon iconfont el-icon-third-shuaxin",staticStyle:{"font-family":"iconfont  !important",cursor:"pointer"},on:{click:function(t){return e.getBuildList()}}})])]),a("div",[a("let-table",{ref:"table",attrs:{data:e.buildList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.buildId"),prop:"Id"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.image"),prop:"Image"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.phase"),prop:"Phase"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.message"),prop:"Message"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.createTime"),prop:"CreateTime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.deleteBuild(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}],null,!1,1926069341)})],1)],1)]):e._e(),a("div",{staticClass:"table_head",staticStyle:{height:"50px"}},[a("h4",[e._v(e._s(this.$t("serverList.title.patchList"))+" "),a("i",{staticClass:"icon iconfont el-icon-third-shuaxin",staticStyle:{"font-family":"iconfont  !important",cursor:"pointer"},on:{click:function(t){return e.getImageList()}}})])]),a("div",[a("let-table",{ref:"table",attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.id"),prop:"Id"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.image"),prop:"Image"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.secret"),prop:"Secret"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.currStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{class:e.getState(t.row.Enabled)})]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.form.mark"),prop:"Mark"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.createPerson"),prop:"CreatePerson"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.createTime"),prop:"CreateTime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.removeReleaseItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("div",{staticStyle:{overflow:"hidden"},attrs:{slot:"operations"},slot:"operations"},[a("let-button",{staticStyle:{float:"left","margin-right":"20px"},attrs:{theme:"primary",size:"small"},on:{click:e.showUploadModal}},[e._v(e._s(e.$t("pub.dlg.upload")))]),a("let-button",{staticStyle:{float:"left"},attrs:{theme:"primary",size:"small"},on:{click:e.showAddImageModal}},[e._v(e._s(e.$t("pub.dlg.image")))]),a("let-button",{staticStyle:{float:"right"},attrs:{theme:"primary",size:"small"},on:{click:e.openPublishVersionModal}},[e._v(e._s(e.$t("pub.btn.pubk8s")))])],1),a("let-modal",{attrs:{title:e.$t("index.rightView.tab.patch"),width:"880px",footShow:!1},on:{close:e.closePublishModal,"on-confirm":e.savePublishServer},model:{value:e.publishModal.show,callback:function(t){e.$set(e.publishModal,"show",t)},expression:"publishModal.show"}},[e.publishModal.model?a("let-form",{ref:"publishForm",attrs:{itemWidth:"100%"}},[[a("let-form-item",{attrs:{label:e.$t("pub.dlg.releaseVersion"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("pub.dlg.ab")},model:{value:e.publishModal.model.Id,callback:function(t){e.$set(e.publishModal.model,"Id",t)},expression:"publishModal.model.Id"}},e._l(e.publishModal.model.patchList,(function(t){return a("let-option",{key:t.Id,attrs:{value:t.Id}},[""+t.Enabled=="true"?a("span",{domProps:{innerHTML:e._s(e.imgCur)}}):a("span",{domProps:{innerHTML:e._s(e.imgSpace)}}),a("span",[e._v(e._s(t.Id)+" | "+e._s(t.CreateTime)+" | "+e._s(t.Image))])])})),1)],1),a("let-form-item",{attrs:{label:e.$t("pub.dlg.nodeImage"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("pub.dlg.nodeImageTip")},model:{value:e.publishModal.model.NodeImage,callback:function(t){e.$set(e.publishModal.model,"NodeImage",t)},expression:"publishModal.model.NodeImage"}},e._l(e.publishModal.model.nodeList,(function(t){return a("let-option",{key:t.Image,attrs:{value:t.Image}},[t.isDefaultTafNode?a("span",{domProps:{innerHTML:e._s(e.imgNew)}}):a("span",{domProps:{innerHTML:e._s(e.imgSpace)}}),t.isCurrTafNode?a("span",{domProps:{innerHTML:e._s(e.imgCur)}}):a("span",{domProps:{innerHTML:e._s(e.imgSpace)}}),a("span",[e._v(e._s(t.Id)+" | "+e._s(t.CreateTime)+" | "+e._s(t.Image))])])})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.table.th.replicas")}},[a("let-input",{attrs:{size:"small",type:"number",min:1,placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.table.tips.empty"),"pattern-tip":e.$t("deployService.form.placeholder")},model:{value:e.publishModal.model.Replicas,callback:function(t){e.$set(e.publishModal.model,"Replicas",t)},expression:"publishModal.model.Replicas"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("let-input",{model:{value:e.publishModal.model.EnableMark,callback:function(t){e.$set(e.publishModal.model,"EnableMark",t)},expression:"publishModal.model.EnableMark"}}),a("let-button",{staticClass:"mt20",attrs:{theme:"primary",size:"small"},on:{click:e.savePublishServer}},[e._v(e._s(e.$t("common.patch")))])],1)]],2):e._e()],1),a("let-modal",{attrs:{title:e.$t("pub.dlg.upload"),width:"880px",footShow:!1},on:{"on-cancel":e.closeUploadModal},model:{value:e.uploadModal.show,callback:function(t){e.$set(e.uploadModal,"show",t)},expression:"uploadModal.show"}},[e.uploadModal.model?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadPatchPackage(t)}}},[a("let-form-item",{attrs:{label:e.$t("pub.dlg.releasePkg"),itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue")},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.submit"))+" ")]),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceType"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.serviceTypeTips")},on:{change:e.changeServerType},model:{value:e.uploadModal.model.ServerType,callback:function(t){e.$set(e.uploadModal.model,"ServerType",t)},expression:"uploadModal.model.ServerType"}},e._l(e.serverType,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.baseImage"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.baseImageTips")},on:{change:e.changeBaseImage},model:{value:e.uploadModal.model.BaseImage,callback:function(t){e.$set(e.uploadModal.model,"BaseImage",t)},expression:"uploadModal.model.BaseImage"}},e._l(e.baseImage,(function(t){return a("let-option",{key:t.Name,attrs:{value:t.Name}},[e._v(e._s(t.Name+"("+t.Mark+")"))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.baseImageRelease"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.baseImageReleaseTips")},model:{value:e.uploadModal.model.BaseImageRelease,callback:function(t){e.$set(e.uploadModal.model,"BaseImageRelease",t)},expression:"uploadModal.model.BaseImageRelease"}},e._l(e.baseImageRelease,(function(t){return a("let-option",{key:t.Image,attrs:{value:t.Image}},[e._v(e._s(t.Image+"("+(t.Mark||t.Id)+")"))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serverTag")}},[a("let-input",{attrs:{type:"text",size:"small",placeholder:e.$t("deployService.form.serverTagTip")},model:{value:e.uploadModal.model.ServerTag,callback:function(t){e.$set(e.uploadModal.model,"ServerTag","string"===typeof t?t.trim():t)},expression:"uploadModal.model.ServerTag"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.uploadModal.model.comment,callback:function(t){e.$set(e.uploadModal.model,"comment",t)},expression:"uploadModal.model.comment"}})],1),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1),a("let-modal",{attrs:{title:e.$t("pub.dlg.image"),width:"600px",footShow:!1},on:{"on-cancel":e.closeAddImageModal},model:{value:e.addImageModal.show,callback:function(t){e.$set(e.addImageModal,"show",t)},expression:"addImageModal.show"}},[e.addImageModal.model?a("let-form",{ref:"addImageForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.addImage(t)}}},[a("let-form-item",{attrs:{label:e.$t("pub.dlg.imageAddress"),required:""}},[a("let-input",{attrs:{type:"text",size:"small",required:""},model:{value:e.addImageModal.model.Image,callback:function(t){e.$set(e.addImageModal.model,"Image",t)},expression:"addImageModal.model.Image"}})],1),a("let-form-item",{attrs:{label:e.$t("pub.dlg.secret"),required:""}},[a("let-input",{attrs:{type:"text",size:"small"},model:{value:e.addImageModal.model.Secret,callback:function(t){e.$set(e.addImageModal.model,"Secret",t)},expression:"addImageModal.model.Secret"}})],1),a("let-form-item",{attrs:{label:e.$t("pub.dlg.mark")}},[a("let-input",{attrs:{type:"text",size:"small"},model:{value:e.addImageModal.model.Mark,callback:function(t){e.$set(e.addImageModal.model,"Mark",t)},expression:"addImageModal.model.Mark"}})],1),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("pub.dlg.add")))])],1):e._e()],1)],1)])},Je=[],Ye=a("2699"),Ke={name:"ServerPublish",data:function(){return{imgNew:'<img class="logo" src="/static/img/new.gif">',imgCur:'<img class="logo" src="/static/img/current.gif">',imgSpace:'<img class="logo" src="/static/img/space.png">',buildList:[],serverList:[],publishModal:{show:!1,model:{patchList:[],nodeList:[]}},reloadTask:null,serverK8S:{},serverType:[],baseImage:[],baseImageRelease:[],uploadModal:{show:!1,model:null},addImageModal:{show:!1,model:null}}},props:["treeid"],methods:{getServerId:function(){return this.treeid},getServerType:function(){return this.$ajax.getJSON("/k8s/api/server_list",{ServerId:this.getServerId()})},getDefault:function(){var e=this;this.$ajax.getJSON("/k8s/api/default").then((function(t){e.serverK8S=t.ServerK8S||{},e.serverType=t.ServerTypeOptional||[]}))},changeServerType:function(){var e=this;this.$ajax.getJSON("/k8s/api/base_image_list",{ServerType:this.uploadModal.model.ServerType}).then((function(t){e.baseImage=t.Data||[],e.uploadModal.model.BaseImage=e.baseImage[0].Name}))},changeBaseImage:function(){var e=this;this.baseImageRelease=this.baseImage.filter((function(t){return t.Name==e.uploadModal.model.BaseImage}))[0].Release,this.$set(this.uploadModal.model,"BaseImageRelease",this.baseImageRelease[this.baseImageRelease.length-1].Image)},getState:function(e){var t="";switch("".concat(e)){case"true":t="status-active";break}return t},formatDate:function(e,t){return Object(Ye["b"])(e,"YYYY-MM-DD HH:mm:ss")},reloadBuildList:function(){var e=this,t=this.$parent.BTabs[0].path,a=t.substring(t.lastIndexOf("/")+1);"publish"!==a&&e.reloadTask||(e.reloadTask=setTimeout((function(){e.$parent.treeid==e.getServerId()&&e.getBuildList(),e.reloadBuildList()}),3e3))},getBuildList:function(){var e=this;this.$ajax.getJSON("/k8s/api/build_list",{ServerId:this.getServerId()}).then((function(t){t.Data.forEach((function(t){t.CreateTime=e.formatDate(t.CreateTime)})),e.buildList=t.Data})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},deleteBuild:function(e){var t=this;this.$confirm(this.$t("deployService.form.delete"),this.$t("common.alert")).then((function(){t.$ajax.getJSON("/k8s/api/delete_build",{ImageName:e.ImageName}).then((function(){t.getBuildList(),t.getImageList()})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}))},getImageList:function(){var e=this;this.$ajax.getJSON("/k8s/api/patch_list",{ServerId:this.getServerId()}).then((function(t){e.getNowImages().then((function(a){var r=t.Data||[];r.forEach((function(t){t.Id==a.Id&&(t.Enabled=!0),t.CreateTime=e.formatDate(t.CreateTime)})),e.serverList=r})).catch((function(t){e.$confirm(t.err_msg||t.message||e.$t("serverList.table.msg.fail")).then((function(){e.getImageList()}))}))})).catch((function(t){e.$confirm(t.err_msg||t.message||e.$t("serverList.table.msg.fail")).then((function(){e.getImageList()}))}))},openPublishVersionModal:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a,r,o,i,s,l;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.getServerId(),e.publishModal.model={ServerId:a,Replicas:e.serverK8S.Replicas||1,show:!0},t.next=4,e.getPatchList(a);case 4:return r=t.sent,t.next=7,e.getK8SData();case 7:return o=t.sent,t.next=10,e.getNowImages();case 10:return i=t.sent,t.next=13,e.getTafNodes();case 13:return s=t.sent,t.next=16,e.getNodeImage();case 16:l=t.sent,e.publishModal.model.Replicas=o.Data[0].Replicas||e.serverK8S.Replicas||1,r.Data.forEach((function(t){t.CreateTime=e.formatDate(t.CreateTime),t.Image==i.Image&&(t.Enabled=!0)})),s.Data.forEach((function(e){e.Image==i.NodeImage&&(e.isCurrTafNode=!0),e.Image==l&&(e.isDefaultTafNode=!0)})),e.publishModal.model.patchList=r.Data,e.publishModal.model.nodeList=s.Data,e.publishModal.show=!0;case 23:case"end":return t.stop()}}),t)})))()},getPatchList:function(e){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$ajax.getJSON("/k8s/api/patch_list",{ServerId:e});case 2:return a.abrupt("return",a.sent);case 3:case"end":return a.stop()}}),a)})))()},getNowImages:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$ajax.getJSON("/k8s/api/get_now_image",{ServerId:e.getServerId()});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))()},getK8SData:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$ajax.getJSON("/k8s/api/server_k8s_select",{ServerId:e.getServerId()});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))()},getTafNodes:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$ajax.getJSON("/k8s/api/image_node_select");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))()},getNodeImage:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$ajax.getJSON("/k8s/api/get_tfc");case 2:return a=t.sent,r=a.filter((function(e){return"nodeImage.image"===e.column})),t.abrupt("return",1==r.length?r[0].value:"");case 5:case"end":return t.stop()}}),t)})))()},closePublishModal:function(){this.publishModal.show=!1,this.publishModal.modal=null,this.$refs.publishForm.resetValid()},savePublishServer:function(){var e=this,t=this.$Loading.show();this.$refs.publishForm.validate()&&(t.hide(),this.$ajax.postJSON("/k8s/api/patch_publish",{ServerId:this.publishModal.model.ServerId,Id:this.publishModal.model.Id,Replicas:this.publishModal.model.Replicas,EnableMark:this.publishModal.model.EnableMark,NodeImage:this.publishModal.model.NodeImage}).then((function(a){t.hide(),e.getImageList(),e.closePublishModal(),e.$tip.success(e.$t("common.success"))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))})))},updateServerInfo:function(e){this.$ajax.postJSON("/k8s/api/server_update",{ServerId:e.ServerId,ServerType:e.ServerType,ServerMark:e.ServerMark})},showUploadModal:function(){var e=this;this.getServerType().then((function(t){var a=e.getServerId();e.uploadModal.model={ServerId:a,file:null,ServerMark:"",ServerType:t.Data[0].ServerType},e.uploadModal.show=!0}))},showAddImageModal:function(){var e=this.getServerId();this.addImageModal.model={ServerId:e,Id:"",Image:"",Secret:"tars-image-secret",Mark:""},this.addImageModal.show=!0},closeAddImageModal:function(){this.addImageModal.show=!1,this.addImageModal.model=null,this.$refs.addImageForm.resetValid()},closeUploadModal:function(){this.uploadModal.show=!1,this.uploadModal.model=null,this.$refs.uploadForm.resetValid()},removeReleaseItem:function(e){var t=this;this.$confirm(this.$t("imageService.delete.confirmTips"),this.$t("common.alert")).then((function(){t.getServerId();var a=t.$Loading.show();t.$ajax.postJSON("/k8s/api/image_release_delete",{Name:e.Name,Id:e.Id}).then((function(){a.hide(),t.getImageList()})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},uploadFile:function(e){this.uploadModal.model.file=e},uploadPatchPackage:function(){var e=this,t=this.getServerId();if(this.$refs.uploadForm.validate()){var a=this.$Loading.show(),r=new FormData,o="",i=this.baseImageRelease.filter((function(t){return t.Image==e.uploadModal.model.BaseImageRelease}));1==i.length&&(o=i[0].Secret||""),r.append("ServerId",t),r.append("ServerType",this.uploadModal.model.ServerType),r.append("ServerTag",this.uploadModal.model.ServerTag),r.append("BaseImage",this.uploadModal.model.BaseImageRelease),r.append("Secret",o),r.append("suse",this.uploadModal.model.file),r.append("CreateMark",this.uploadModal.model.comment||""),this.$ajax.postForm("/k8s/api/patch_upload",r).then((function(t){e.closeUploadModal(),a.hide(),setTimeout(e.getImageList,1e3)})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},addImage:function(){var e=this,t=this.getServerId();if(this.$refs.addImageForm.validate()){var a=this.$Loading.show(),r=new FormData;r.append("Name",t),r.append("Image",this.addImageModal.model.Image),r.append("Secret",this.addImageModal.model.Secret||""),r.append("Mark",this.addImageModal.model.Mark||""),this.$ajax.postForm("/k8s/api/image_release_create",r).then((function(t){e.closeAddImageModal(),a.hide(),setTimeout(e.getImageList,1e3)})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e}},mounted:function(){this.getImageList(),this.getDefault(),this.reloadBuildList()}},Ue=Ke,We=(a("9df2"),Object(w["a"])(Ue,Fe,Je,!1,null,null,null)),Ze=We.exports,Ge=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_config"},[e.configList?a("wrapper",{ref:"configListLoading"},[a("div",{staticClass:"btn_group"},[a("let-button",{attrs:{size:"small",theme:"sub-primary"},on:{click:e.addConfig}},[e._v(e._s(e.$t("cfg.btn.add")))]),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.nodeConfigAdd(e.configList,e.checkedConfigId)}}},[e._v(e._s(e.$t("filter.btn.addNode")))]),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.changeConfig(e.configList,"ConfigName",e.checkedConfigId,"configList")}}},[e._v(e._s(e.$t("operate.update")))]),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.deleteConfig(e.configList,"ConfigName",e.checkedConfigId)}}},[e._v(e._s(e.$t("operate.delete")))]),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.showDetail(e.configList,"ConfigName",e.checkedConfigId)}}},[e._v(e._s(e.$t("cfg.title.viewConf")))]),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.showHistory(e.configList,"ConfigName",e.checkedConfigId)}}},[e._v(e._s(e.$t("pub.btn.history")))])],1),a("let-table",{attrs:{data:e.configList,title:e.$t("cfg.title.a"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"40px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:t.row.ConfigName},model:{value:e.checkedConfigId,callback:function(t){e.checkedConfigId=t},expression:"checkedConfigId"}},[a("span",{staticStyle:{"font-size":"0"}},[e._v(e._s(t.row.ConfigName))])])]}}],null,!1,367281790)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),width:"250px",prop:"ServerId"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),width:"250px",prop:"ConfigName"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"ConfigVersion"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"CreateTime",width:"250px"}})],1)],1):e._e(),e.nodeConfigList&&e.showOthers?a("wrapper",{ref:"nodeConfigListLoading"},[a("div",{staticClass:"btn_group"},[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.changeConfig(e.nodeConfigList,"ConfigId",e.nodeCheckList,"nodeConfigList")}}},[e._v(e._s(e.$t("cfg.table.modCfg")))]),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.showMergedDetail(e.nodeConfigList,"ConfigId",e.nodeCheckList)}}},[e._v(e._s(e.$t("cfg.table.viewMerge")))]),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.deleteConfig(e.nodeConfigList,"ConfigId",e.nodeCheckList)}}},[e._v(e._s(e.$t("operate.delete")))]),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.showDetail(e.nodeConfigList,"ConfigId",e.nodeCheckList)}}},[e._v(e._s(e.$t("cfg.table.viewIpContent")))]),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:function(t){return e.showHistory(e.nodeConfigList,"ConfigId",e.nodeCheckList)}}},[e._v(e._s(e.$t("pub.btn.history")))])],1),e.nodeConfigList.length?a("let-checkbox",{staticClass:"check-all",model:{value:e.nodeCheckAll,callback:function(t){e.nodeCheckAll=t},expression:"nodeCheckAll"}}):e._e(),a("let-table",{attrs:{data:e.nodeConfigList,title:e.$t("cfg.title.c"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"40px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{label:t.row.ConfigId},model:{value:e.nodeCheckList,callback:function(t){e.nodeCheckList=t},expression:"nodeCheckList"}})]}}],null,!1,1794674851)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),width:"250px",prop:"ServerId"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),width:"250px",prop:"ConfigName"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"PodSeq"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.ServerId.replace(/\./g,"-").toLocaleLowerCase())+"-"+e._s(t.row.PodSeq)+" ")]}}],null,!1,3730132245)}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"CreateTime",width:"180px"}})],1)],1):e._e(),a("let-modal",{attrs:{title:e.configModal.isNew?e.$t("operate.title.add")+" "+e.$t("common.config"):e.$t("operate.title.update")+" "+e.$t("common.config"),width:"800px"},on:{"on-confirm":e.configDiff,close:e.closeConfigModal,"on-cancel":e.closeConfigModal},model:{value:e.configModal.show,callback:function(t){e.$set(e.configModal,"show",t)},expression:"configModal.show"}},[e.configModal.model?a("let-form",{ref:"configForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("cfg.btn.fileName"),required:""}},[a("let-input",{attrs:{size:"small",disabled:!e.configModal.isNew,required:""},model:{value:e.configModal.model.ConfigName,callback:function(t){e.$set(e.configModal.model,"ConfigName",t)},expression:"configModal.model.ConfigName"}})],1),e.configModal.isNew?e._e():a("let-form-item",{attrs:{label:e.$t("cfg.btn.reason"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:e.configModal.model.ConfigMark,callback:function(t){e.$set(e.configModal.model,"ConfigMark",t)},expression:"configModal.model.ConfigMark"}})],1),a("let-form-item",{attrs:{label:e.$t("cfg.btn.content"),required:""}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:16,required:""},model:{value:e.configContent,callback:function(t){e.configContent=t},expression:"configContent"}})],1)],1):e._e()],1),a("let-modal",{attrs:{title:e.nodeConfigModal.isNew?e.$t("operate.title.add")+" "+e.$t("common.config"):e.$t("operate.title.update")+" "+e.$t("common.config"),width:"1000px"},on:{"on-confirm":e.updateNodeConfigFile,close:e.closeNodeConfigModal,"on-cancel":e.closeNodeConfigModal},model:{value:e.nodeConfigModal.show,callback:function(t){e.$set(e.nodeConfigModal,"show",t)},expression:"nodeConfigModal.show"}},[e.nodeConfigModal.model?a("let-form",{ref:"nodeConfigForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("cfg.btn.fileName"),required:""}},[a("let-input",{attrs:{disabled:"",size:"small",required:""},model:{value:e.nodeConfigModal.model.ConfigName,callback:function(t){e.$set(e.nodeConfigModal.model,"ConfigName",t)},expression:"nodeConfigModal.model.ConfigName"}})],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.ip"),required:""}},[a("div",{staticStyle:{display:"flex"}},[a("span",{staticStyle:{display:"block"}},[e._v(e._s(e.nodeConfigModal.model.ServerId.replace(/\./g,"-").toLocaleLowerCase())+"-")]),a("let-input",{staticStyle:{display:"block",flex:"1"},attrs:{type:"number",min:0,max:20,size:"small",required:""},model:{value:e.nodeConfigModal.model.PodSeq,callback:function(t){e.$set(e.nodeConfigModal.model,"PodSeq",t)},expression:"nodeConfigModal.model.PodSeq"}})],1)]),a("let-form-item",{attrs:{label:e.$t("cfg.btn.content"),required:""}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:16,required:""},model:{value:e.nodeConfigModal.model.ConfigContent,callback:function(t){e.$set(e.nodeConfigModal.model,"ConfigContent",t)},expression:"nodeConfigModal.model.ConfigContent"}})],1)],1):e._e()],1),a("let-modal",{attrs:{title:e.$t("filter.title.diffTxt"),width:"1200px"},on:{"on-confirm":e.updateConfigDiff,close:e.closeConfigDiffModal,"on-cancel":e.closeConfigDiffModal},model:{value:e.configDiffModal.show,callback:function(t){e.$set(e.configDiffModal,"show",t)},expression:"configDiffModal.show"}},[e.configDiffModal.model?a("div",{staticStyle:{"padding-top":"30px"}},[a("div",{staticClass:"codediff_head"},[a("div",{staticClass:"codediff_th"},[e._v("OLD:")]),a("div",{staticClass:"codediff_th"},[e._v("NEW:")])]),a("diff",{attrs:{"old-string":e.configDiffModal.model.oldData,"new-string":e.configDiffModal.model.newData,context:10,"output-format":"side-by-side"}})],1):e._e()]),a("let-modal",{attrs:{title:e.detailModal.title,width:"1200px",footShow:!1},on:{close:e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model&&e.detailModal.model.table?a("let-button",{staticStyle:{"margin-top":"20px"},attrs:{theme:"primary",size:"small"},on:{click:e.backConfig}},[e._v("鎭㈠")]):e._e(),e.detailModal.model&&e.detailModal.model.table?a("let-table",{staticClass:"history-table",attrs:{data:e.detailModal.model.table,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"40px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:t.row.ConfigId},model:{value:e.backConfigId,callback:function(t){e.backConfigId=t},expression:"backConfigId"}},[e._v(e._s(""))])]}}],null,!1,316818822)}),a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"CreateTime"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{on:{click:function(a){return e.historyClick(t.row)}}},[e._v(e._s(t.row.CreateTime))])]}}],null,!1,2382811015)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"ConfigVersion"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{on:{click:function(a){return e.historyClick(t.row)}}},[e._v(e._s(t.row.ConfigVersion))])]}}],null,!1,3065663174)}),a("let-table-column",{attrs:{width:"400px",title:e.$t("cfg.btn.reason"),prop:"ConfigMark"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{on:{click:function(a){return e.historyClick(t.row)}}},[e._v(e._s(t.row.ConfigMark||" "))])]}}],null,!1,1879717673)}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.content"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.showTableDeatil(t.row)}}},[e._v(e._s(e.$t("operate.view")))])]}}],null,!1,3538701521)})],1):e._e(),e.detailModal.model&&!e.detailModal.model.table||e.detailModal.model&&e.detailModal.model.table&&e.detailModal.model.detail?a("pre",[e._v(e._s(e.detailModal.model.detail||e.$t("cfg.msg.empty")))]):e._e(),a("div",{ref:"detailModalLoading",staticClass:"detail-loading"})],1)],1)},Qe=[],Xe=(a("8a79"),a("e68e")),et={name:"ServerConfig",components:{wrapper:V["a"],diff:Xe["a"]},data:function(){return{oldStr:"old code",newStr:"new code",serverData:{ServerId:""},checkedConfigId:"",backConfigId:"",configList:[],nodeConfigList:null,nodeCheckList:[],configContent:"",configModal:{show:!1,isNew:!0,model:null},nodeConfigContent:"",nodeConfigModal:{show:!1,isNew:!0,model:null},configDiffModal:{type:"",show:!1,isNew:!0,model:null},detailModal:{show:!1,title:"",model:null},refFileModal:{show:!1,model:{fileList:[]}},nodeRefFileListModal:{show:!1,model:null},pushResultModal:{show:!1,model:null}}},props:["treeid"],computed:{showOthers:function(){return 5===this.serverData.level},nodeCheckAll:{get:function(){return!(!this.nodeConfigList||!this.nodeConfigList.length)&&this.nodeCheckList.length===this.nodeConfigList.length},set:function(e){this.nodeCheckList=e?this.nodeConfigList.map((function(e){return e.ConfigId})):[]}}},watch:{checkedConfigId:function(){var e=this;this.$nextTick((function(){e.getNodeConfigList()}))}},methods:{getServerId:function(){return this.treeid},getConfigList:function(e){var t=this,a=this.$refs.configListLoading.$loading.show(),r=this.getServerId();this.$ajax.getJSON("/k8s/api/server_config_select",{ServerId:r}).then((function(e){a.hide(),t.configList=[],t.refFileList=[],t.nodeConfigList=[],e.hasOwnProperty("Data")&&(e.Data[0]&&e.Data[0].ConfigId&&(t.checkedConfigId=e.Data[0].ConfigName,t.getNodeConfigList()),e.Data.forEach((function(e){e.CreateTime=Object(Ye["b"])(e.CreateTime)})),t.configList=e.Data)})).catch((function(e){a.hide(),t.$confirm(e.err_msg||e.message||t.$t("common.error"),t.$t("common.retry"),t.$t("common.alert")).then((function(){t.getConfigList()}))}))},addConfig:function(){var e=this.getServerId().split(".")[1]||"";this.configContent="",this.configModal.model={ConfigName:e&&"".concat(e,".conf")||"",ConfigContent:""},this.configModal.isNew=!0,this.configModal.show=!0},changeConfig:function(e,t,a,r){var o=e.filter((function(e){return e[t]===a||e[t]===a[0]}));if(!a||0===a.length||0==o.length)return this.$tip.warning(this.$t("dialog.tips.item"));this.configContent=o[0].ConfigContent,this.configModal.model=Object.assign(o[0],{ConfigMark:""}),this.configModal.target=r,this.configModal.isNew=!1,this.configModal.show=!0},updateConfigFile:function(){var e=this;if(this.$refs.configForm.validate()){var t=this.$Loading.show(),a=this.configModal.model;if(this.configModal.isNew){var r=Object.assign({ServerId:this.getServerId()},a);this.$ajax.postJSON("/k8s/api/server_config_create",r).then((function(a){t.hide(),e.$tip.success(e.$t("common.success")),e.getConfigList(),e.closeConfigModal(),e.closeConfigDiffModal()})).catch((function(a){t.hide(),e.$tip.error(e.$t("common.error"))}))}else this.$ajax.postJSON("/k8s/api/server_config_update",{ConfigId:a.ConfigId,ConfigMark:a.ConfigMark,ConfigContent:a.ConfigContent}).then((function(a){t.hide(),e.$tip.success(e.$t("common.success")),e.getConfigList(),e.closeConfigModal(),e.closeConfigDiffModal()})).catch((function(a){t.hide(),e.$tip.error(e.$t("common.error"))}))}},updateNodeConfigFile:function(){var e=this;if(this.$refs.nodeConfigForm.validate()){var t=this.$Loading.show(),a=this.nodeConfigModal.model;if(this.nodeConfigModal.isNew){var r=Object.assign({ServerId:this.getServerId()},a);this.$ajax.postJSON("/k8s/api/server_config_create",r).then((function(a){t.hide(),e.$tip.success(e.$t("common.success")),e.getConfigList(),e.closeNodeConfigModal()})).catch((function(a){t.hide(),e.$tip.error(a.err_msg)}))}}},backConfig:function(){var e=this,t=this.backConfigId;if(!t)return this.$tip.error("璇峰厛閫夋嫨涓€椤�");var a=this.$Loading.show();this.$ajax.postJSON("/k8s/api/server_config_history_back",{HistoryId:t}).then((function(t){a.hide(),e.$tip.success(e.$t("common.success")),e.getConfigList(),e.closeDetailModal()})).catch((function(){a.hide(),e.$tip.error(e.$t("common.error"))}))},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1},closeNodeConfigModal:function(){this.$refs.nodeConfigForm&&this.$refs.nodeConfigForm.resetValid(),this.nodeConfigModal.show=!1},deleteConfig:function(e,t,a){var r=this;if(!a)return this.$tip.warning(this.$t("dialog.tips.item"));var o=e.filter((function(e){return e[t]===a||e[t]===a[0]}));this.$confirm(this.$t("cfg.msg.confirmCfg"),this.$t("common.alert")).then((function(){var e=r.$Loading.show();r.$ajax.getJSON("/k8s/api/server_config_delete",{ConfigId:o[0].ConfigId}).then((function(t){e.hide(),r.getConfigList(r.serverData),r.$tip.success(r.$t("common.success"))})).catch((function(t){e.hide(),r.$tip.error("".concat(r.$t("common.error"),": ").concat(t.err_msg||t.message))}))}))},getNodeConfigList:function(){var e=this;if(this.showOthers){var t={ServerId:this.getServerId(),ConfigName:this.checkedConfigId};this.$ajax.getJSON("/k8s/api/server_config_select",t).then((function(t){t.Data.forEach((function(e){e.CreateTime=Object(Ye["b"])(e.CreateTime)})),e.nodeCheckList=[],e.nodeConfigList=t.Data})).catch((function(t){e.nodeConfigList=[],e.$tip.error({title:e.$t("common.error"),message:t.err_msg||t.message||e.$t("common.networkErr")})}))}},nodeConfigAdd:function(e,t){if(!t)return this.$tip.warning(this.$t("dialog.tips.item"));var a=e.filter((function(e){return e.ConfigName===t}));this.nodeConfigModal.model={ServerId:a[0].ServerId,ConfigName:a[0].ConfigName,ConfigContent:""},this.nodeConfigModal.isNew=!0,this.nodeConfigModal.show=!0},showDetail:function(e,t,a){if(!a||0===a.length)return this.$tip.warning(this.$t("dialog.tips.item"));var r=e.filter((function(e){return e[t]===a||e[t]===a[0]}));this.detailModal.title=this.$t("cfg.title.viewConf"),this.detailModal.model={detail:r[0].ConfigContent},this.detailModal.show=!0},showMergedDetail:function(e,t,a){var r=this;if(!a||0===a.length)return this.$tip.warning(this.$t("dialog.tips.item"));var o=e.filter((function(e){return e[t]===a||e[t]===a[0]}));this.detailModal.title=this.$t("cfg.title.viewMerged"),this.detailModal.show=!0;var i=this.$loading.show({target:this.$refs.detailModalLoading});this.$ajax.getJSON("/k8s/api/merged_node_config",{ServerId:o[0].ServerId,ConfigName:o[0].ConfigName,PodSeq:o[0].PodSeq}).then((function(e){i.hide(),r.detailModal.model={detail:e}})).catch((function(e){i.hide(),r.$tip.error("".concat(r.$t("common.error"),": ").concat(e.err_msg||e.message))}))},showHistory:function(e,t,a){var r=this;if(!a||0===a.length)return this.$tip.warning(this.$t("dialog.tips.item"));var o=e.filter((function(e){return e[t]===a||e[t]===a[0]}));this.detailModal.title=this.$t("cfg.title.viewHistory"),this.detailModal.show=!0;var i=this.$loading.show({target:this.$refs.detailModalLoading});this.$ajax.getJSON("/k8s/api/server_config_history_select",{ConfigId:o[0].ConfigId}).then((function(e){i.hide(),e.Data.forEach((function(e){e.CreateTime=Object(Ye["b"])(e.CreateTime)})),r.detailModal.model={currentVersion:o[0].ConfigVersion,ConfigId:o[0].ConfigId,table:e.Data,detail:""}})).catch((function(e){i.hide(),r.$tip.error("".concat(r.$t("common.error"),": ").concat(e.err_msg||e.message))}))},showTableDeatil:function(e){this.detailModal.model.detail=e.ConfigContent},closeDetailModal:function(){this.backConfigId="",this.detailModal.show=!1,this.detailModal.model=null},configDiff:function(){this.$refs.configForm.validate()&&(this.configDiffModal.type="config",this.configDiffModal.show=!0,this.configDiffModal.isNew=!1,this.configDiffModal.model={oldData:this.configModal.model.ConfigContent,newData:this.configContent})},updateConfigDiff:function(){var e=this.configDiffModal.type,t=this.configModal.model;if(t.ConfigName.toLowerCase().endsWith(".json"))try{JSON.parse(this.configContent)}catch(s){return void alert("config format error:"+s.toString())}if(t.ConfigName.toLowerCase().endsWith(".xml"))try{var a=new DOMParser,r=a.parseFromString(this.configContent,"text/xml"),o=r.getElementsByTagName("parsererror"),i="";if(o.length>0)return i="parsererror"==r.documentElement.nodeName?r.documentElement.childNodes[0].nodeValue:r.getElementsByTagName("parsererror")[0].innerHTML,void alert("config format error:"+i)}catch(s){return void alert("config format error:"+s.toString())}"config"===e&&(this.configModal.model.ConfigContent=this.configContent,this.updateConfigFile())},closeConfigDiffModal:function(){this.configDiffModal.show=!1},nodeConfigDiff:function(){this.$refs.nodeConfigForm.validate()&&(this.configDiffModal.type="nodeConfig",this.configDiffModal.show=!0,this.configDiffModal.isNew=!1,this.configDiffModal.model={oldData:this.nodeConfigModal.model.ConfigContent,newData:this.nodeConfigContent})},historyClick:function(e){this.backConfigId=e.HistoryId}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getConfigList(this.serverData)}},tt=et,at=(a("44ae"),Object(w["a"])(tt,Ge,Qe,!1,null,null,null)),rt=at.exports,ot=a("c9e9"),it=a("4527"),st=a("c2de"),lt=a("3430"),nt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_manage"},[a("div",{staticClass:"table_head",staticStyle:{height:"50px"}},[a("h4",[e._v(e._s(this.$t("serverList.title.serverList"))+" "),a("i",{staticClass:"icon iconfont el-icon-third-shuaxin",staticStyle:{"font-family":"iconfont  !important",cursor:"pointer"},on:{click:function(t){return e.getServerList()}}})])]),e.serverList?a("let-table",{attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"ServerApp"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.serviceName"),prop:"ServerName"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.podName"),prop:"PodName"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.gotoLog(t.row)}}},[e._v(e._s(t.row.PodName))])]}}],null,!1,2844911292)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.podIP"),prop:"PodIp"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"NodeIp"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"ServiceVersion"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.createTime"),prop:"CreateTime"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.deleteTime"),prop:"DeleteTime"}})],1):e._e()],1)},ct=[],dt={name:"ServerManage",data:function(){return{serverList:[]}},props:["treeid"],methods:{gotoLog:function(e){var t="/logview.html?History=true&NodeIP=".concat(e.NodeIp,"&ServerApp=").concat(e.ServerApp,"&ServerName=").concat(e.ServerName,"&PodName=").concat(e.PodName);window.open(t)},getServerId:function(){return this.treeid},getServerList:function(e){var t=this;this.$ajax.getJSON("/k8s/api/pod_history_list",{ServerId:this.getServerId()}).then((function(e){e.Data.forEach((function(e){e.CreateTime=R()(e.CreateTime).format("YYYY-MM-DD HH:mm:ss"),e.DeleteTime=R()(e.DeleteTime).format("YYYY-MM-DD HH:mm:ss")})),t.serverList=e.Data})).catch((function(e){t.$confirm(e.err_msg||e.message||t.$t("serverList.msg.fail"),t.$t("common.alert")).then((function(){t.getServerList()}))}))},more:function(){this.getServerList(this.continue)}},created:function(){},mounted:function(){this.getServerList()}},ut=dt,pt=(a("29ca"),Object(w["a"])(ut,nt,ct,!1,null,null,null)),mt=pt.exports,ft=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_history"},[e.serverListShow?a("div",{staticClass:"table_wrap"},[a("div",{staticClass:"table_head"},[a("h4",[e._v(e._s(this.$t("serverList.title.serverList")))])]),a("let-table",{attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"ServerApp"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.serviceName"),prop:"ServerName"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.podName"),prop:"PodName"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.gotoLog(t.row)}}},[e._v(e._s(t.row.PodName))])]}}],null,!1,2844911292)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.podIP"),prop:"PodIp"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"NodeIp"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"ServiceVersion"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{style:e.getState(t.row.SettingState)},[e._v(e._s(t.row.SettingState))])]}}],null,!1,987565344)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{style:e.getState(t.row.PresentState)},[e._v(e._s(t.row.PresentState))])]}}],null,!1,1754665792)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currMessage"),width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-tooltip",{staticClass:"tooltip",attrs:{placement:"top",content:t.row.PresentMessage||""}},[a("let-table-operation",[e._v(e._s(t.row.PresentMessage))])],1)]}}],null,!1,524765591)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.createTime"),prop:"CreateTime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.historyLink(t.row.id)}}},[e._v(e._s(e.$t("operate.goto")))])]}}],null,!1,1230847586)})],1),a("let-button",{attrs:{theme:"danger"},on:{click:function(t){return e.getMore()}}},[e._v(e._s(e.$t("operate.more")))])],1):a("div",{staticClass:"history_search"},[a("label",{staticClass:"history_search_box"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.historySearchKey,expression:"historySearchKey"}],staticClass:"history_search_key",attrs:{type:"text",placeholder:"璇疯緭鍏� 搴旂敤鍚�/鏈嶅姟鍚�/IP鍦板潃 鎼滅储"},domProps:{value:e.historySearchKey},on:{blur:e.historySearch,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.historySearch(t)},input:function(t){t.target.composing||(e.historySearchKey=t.target.value)}}})]),a("div",{staticClass:"history_list_wrap"},[a("div",{staticClass:"history_list_title"},[e._v("鏈€杩戣闂細")]),a("ul",{staticClass:"history_list"},e._l(e.historySearchList,(function(t){return a("li",{key:t,staticClass:"history_item"},[a("a",{staticClass:"history_link",attrs:{href:"javascript:;"},on:{click:function(a){return e.historySearchLink(t)}}},[e._v(e._s(t))])])})),0)])])])},ht=[],vt=(a("fb6a"),{name:"ServerHistory",data:function(){return{historySearchKey:"",historySearchList:[],serverList:[],serverListShow:!1,continue:null}},mounted:function(){this.updateHistorySearchKey()},methods:{gotoLog:function(e){var t="/logview.html?History=false&NodeIP=".concat(e.NodeIp,"&ServerApp=").concat(e.ServerApp,"&ServerName=").concat(e.ServerName,"&PodName=").concat(e.PodName);window.open(t)},getState:function(e){var t=e;switch("".concat(e)){case"Active":t="color: green";break;case"Inactive":case"Activating":case"Deactivating":case"Unknown":t="color: red";break}return t},getMore:function(){this.historySearch(this.continue)},historySearch:function(e){var t=this,a=this.historySearchKey;a&&(this.updateHistorySearchKey(),this.$ajax.getJSON("/k8s/api/server_search",{searchkey:a,continue:e}).then((function(e){t.continue=e.continue,t.serverList=e.rows,t.serverListShow=!0})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))})))},historySearchLink:function(e){this.historySearchKey=e,this.historySearch()},historyLink:function(e){var t=this;this.$nextTick((function(){t.$parent.selectTree(e),t.$parent.getTreeData()}))},updateHistorySearchKey:function(){var e=this.historySearchKey,t=this.getLocalStorage("taf_history_key")||[];if(e){if(t&&t.length>0){var a=-1;t.forEach((function(t,r){t===e&&(a=r)})),-1!==a&&t.splice(a,1),t.unshift(e)}else t=[e];this.historySearchList=t.slice(0,20),this.setLocalStorage("taf_history_key",JSON.stringify(t))}else this.historySearchList=t},getLocalStorage:function(e){var t="";return window.localStorage&&(t=JSON.parse(JSON.parse(localStorage.getItem(e)))),t},setLocalStorage:function(e,t){var a="";return window.localStorage&&(a=localStorage.setItem(e,JSON.stringify(t))),a}}}),gt=vt,bt=(a("98b3"),Object(w["a"])(gt,ft,ht,!1,null,null,null)),$t=bt.exports,kt={name:"Server",components:{callChain:He["a"],manage:Be,publish:Ze,config:rt,"server-monitor":ot["a"],"property-monitor":it["a"],"interface-debuger":st["a"],"user-manage":lt["a"],history:mt,serverHistory:$t},data:function(){return{treeErrMsg:"load failed",treeData:null,treeSearchKey:"",treeid:"",isIconPlay:!1,serverData:{level:5,application:"",server_name:""},BTabs:[],defaultProps:{children:"children",label:"name"},openDelay:1e3,loading:!1,homeTab:"home"}},computed:{base:function(){return"/k8s/".concat(this.treeid)}},filters:{serverTypeFilter:function(e){return"tars"==e?"el-icon-tickets":"el-icon-document-copy"}},watch:{treeid:function(e){this.serverData=this.getServerData()},$route:function(e,t){"/server"===e.path&&this.getTreeData()}},directives:{vscroll:{componentUpdated:function(e){var t=e||"",a=e.children||[],r="";if(a.forEach((function(e){var t=e.getAttribute("class");t.indexOf("active")>-1&&(r=e)})),r.offsetLeft<t.scrollLeft){var o=r.offsetLeft;t.scrollTo(o,0)}else if(r.offsetLeft+r.offsetWidth>t.scrollLeft+t.offsetWidth){var i=r.offsetLeft+r.offsetWidth-t.offsetWidth;t.scrollTo(i,0)}}}},methods:{getName:function(e){var t="";return e.lastIndexOf("/")>-1&&(t=e.substring(e.lastIndexOf("/")+1,e.length)),t},iconLoading:function(){var e=this;e.isIconPlay||(e.isIconPlay=!0,setTimeout((function(){e.isIconPlay=!1}),1e3))},handleNodeClick:function(e){e.id&&0!=e.type&&(this.selectBTabs(e.id),this.checkCurrBTabs())},filterTextChange:function(){this.$refs.trees.filter(this.treeSearchKey)},filterNode:function(e,t){return!e||-1!==t.name.toLowerCase().indexOf(e.toLowerCase())},treeSearch:function(e){this.iconLoading(),this.getTreeData(this.treeSearchKey,e)},handleData:function(e,t){var a=this;e&&e.length&&e.forEach((function(e){e.label=e.name,e.nodeKey="0"!==e.type?e.id:"",a.treeSearchKey&&(e.expand=!0),e.children&&e.children.length&&a.handleData(e.children)}))},getTreeData:function(e,t){var a=this;this.treeData=null,this.$nextTick((function(){a.loading=!0,a.$ajax.getJSON("/k8s/api/tree",{searchKey:e||"",type:t}).then((function(e){a.loading=!1,a.treeData=e,a.handleData(a.treeData,!0)})).catch((function(e){a.loading=!1,a.treeErrMsg=e.err_msg||e.message||"load failed",a.treeData=!1}))}))},getServerData:function(){this.treeid||(this.treeid=this.getLocalStorage("k8s_treeid"));var e="";if(this.$refs.trees){var t=this.$refs.trees.getNode(this.treeid);t&&(e=t.data.serverType||"")}var a=this.treeid.split("."),r={level:1==a.length?1:5,application:a[0],server_name:a[1]||"",server_type:e};return this.treeid?(this.treeid,r):{}},checkTreeid:function(){this.treeid=this.getLocalStorage("k8s_treeid")||""},clickTab:function(e){var t=this.treeid,a=this.BTabs;a&&a.forEach((function(a){a.id===t&&(a.path=e)})),this.setLocalStorage("k8s_tabs",JSON.stringify(a))},isTrueTreeLevel:function(){var e=this.$route.path.split("/"),t=e[e.length-1],a=!1;"server"===t&&1!==this.serverData.level&&(a=!0),2===this.serverData.level||"manage"!==t&&"history"!==t&&"publish"!==t||(a=!0),a&&(1===this.serverData.level?this.$router.replace("server"):2===this.serverData.level&&this.$router.replace("manage"))},checkBTabs:function(){var e=this.BTabs,t=this.getLocalStorage("k8s_tabs");t&&t.length>0&&t.forEach((function(t){e.push({id:t.id,path:t.path})}))},checkCurrBTabs:function(){var e=this;this.$nextTick((function(){var t=e.$refs.btabs||"",a=t.children||[],r="";if(a.forEach((function(e){var t=e.getAttribute("class");t.indexOf("active")>-1&&(r=e)})),r.offsetLeft<t.scrollLeft){var o=r.offsetLeft;t.scrollTo(o,0)}else if(r.offsetLeft+r.offsetWidth>t.scrollLeft+t.offsetWidth){var i=r.offsetLeft+r.offsetWidth-t.offsetWidth;t.scrollTo(i,0)}}))},selectBTabs:function(e){var t=this.BTabs,a=!1;t.forEach((function(t){t.id===e&&(a=!0,t.path="/server/".concat(e,"/manage"))})),a||this.BTabs.push({id:e,path:"/server/".concat(e,"/manage")}),this.treeid=e,this.setLocalStorage("k8s_treeid",JSON.stringify(e)),this.setLocalStorage("k8s_tabs",JSON.stringify(t))},clickBTabs:function(e,t){t==this.homeTab&&($t.data.serverListShow=!1),this.treeid=t,this.setLocalStorage("k8s_treeid",JSON.stringify(t))},closeBTabs:function(e){var t=this.BTabs,a=0;t.forEach((function(t,r){t.id===e&&(a=r)})),t.splice(a,1),this.setLocalStorage("k8s_tabs",JSON.stringify(t)),t.length>0?this.treeid=t[t.length-1].id:this.treeid="home",this.setLocalStorage("k8s_treeid",JSON.stringify(this.treeid))},closeAllBTabs:function(){this.BTabs=[],this.treeid="home",this.setLocalStorage("k8s_tabs",JSON.stringify(this.BTabs)),this.setLocalStorage("k8s_treeid",JSON.stringify(this.treeid)),this.getTreeData()},getLocalStorage:function(e){var t="";return window.localStorage&&(t=JSON.parse(JSON.parse(localStorage.getItem(e)))),t},setLocalStorage:function(e,t){var a="";return window.localStorage&&(a=localStorage.setItem(e,JSON.stringify(t))),a}},created:function(){this.serverData=this.getServerData(),this.isTrueTreeLevel()},mounted:function(){this.checkTreeid(),this.checkBTabs(),this.getTreeData(),this.treeid||(this.treeid="home")}},yt=kt,St=(a("5d82"),Object(w["a"])(yt,D,P,!1,null,null,null)),_t=St.exports,wt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation"},[a("let-tabs",{attrs:{activekey:e.$route.path},on:{click:e.onTabClick}},[a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.deploy"),tabkey:"/operation/deploy"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.approval"),tabkey:"/operation/approval"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.history"),tabkey:"/operation/history"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.undeploy"),tabkey:"/operation/undeploy"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.template"),tabkey:"/operation/templates"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.business"),tabkey:"/operation/business"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.application"),tabkey:"/operation/application"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.node"),tabkey:"/operation/node"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.event"),tabkey:"/operation/event"}}),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.image"),tabkey:"/operation/image"}}),e.isAdmin?a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.framework"),tabkey:"/operation/tfc"}}):e._e()],1),a("router-view",{staticClass:"page_operation_children"})],1)},Mt=[],xt="/operation/deploy",Ct={name:"Operation",data:function(){return{isAdmin:!1}},beforeRouteEnter:function(e,t,a){"/operation"===e.path?a(xt):a()},beforeRouteLeave:function(e,t,a){xt=t.path,a()},created:function(){this.checkAdmin()},methods:{checkAdmin:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isAdmin=!1,t.abrupt("return",e.$ajax.getJSON("/server/api/isAdmin").then((function(t){e.isAdmin=t.admin})).catch((function(e){})));case 2:case"end":return t.stop()}}),t)})))()},selectTree:function(e){"/operation"===this.$route.path?this.$router.push(xt):this.$router.push({params:{treeid:e}})},onTabClick:function(e){this.$router.replace(e)}}},Nt=Ct,Lt=(a("04e5"),Object(w["a"])(Nt,wt,Mt,!1,null,null,null)),Tt=Lt.exports,It=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_deploy"},[a("let-form",{ref:"form",attrs:{inline:"","label-position":"top",itemWidth:"480px"},nativeOn:{submit:function(t){return t.preventDefault(),e.save(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app"),itemWidth:"45%",required:""}},[a("let-select",{attrs:{disabled:e.k8sApplyShow,size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.appTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:e.model.ServerApp,callback:function(t){e.$set(e.model,"ServerApp",t)},expression:"model.ServerApp"}},e._l(e.appList,(function(t){return a("let-option",{key:t.ServerApp,attrs:{value:t.ServerApp}},[e._v(e._s(t.ServerApp))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName"),itemWidth:"45%",required:""}},[a("let-input",{attrs:{disabled:e.k8sApplyShow,size:"small",placeholder:e.$t("deployService.form.serviceFormatTips"),required:"","required-tip":e.$t("deployService.form.serviceTips"),pattern:"^[a-zA-Z]([a-zA-Z0-9]+)?$","pattern-tip":e.$t("deployService.form.serviceFormatTips")},model:{value:e.model.ServerName,callback:function(t){e.$set(e.model,"ServerName",t)},expression:"model.ServerName"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.template"),itemWidth:"45%",required:""}},[a("let-select",{attrs:{disabled:e.k8sApplyShow,size:"small",placeholder:e.$t("pub.dlg.defaultValue"),required:"","required-tip":e.$t("deployService.form.templateTips")},model:{value:e.model.ServerOption.ServerTemplate,callback:function(t){e.$set(e.model.ServerOption,"ServerTemplate",t)},expression:"model.ServerOption.ServerTemplate"}},e._l(e.templates,(function(t){return a("let-option",{key:t.TemplateName,attrs:{value:t.TemplateName}},[e._v(e._s(t.TemplateName)+" ")])})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceMark"),itemWidth:"45%"}},[a("let-input",{attrs:{disabled:e.k8sApplyShow,size:"small",placeholder:e.$t("deployService.form.serviceMark")},model:{value:e.model.ServerMark,callback:function(t){e.$set(e.model,"ServerMark",t)},expression:"model.ServerMark"}})],1),a("let-table",{attrs:{data:e.model.ServerServant}},[a("let-table-column",{attrs:{title:"OBJ",width:"150px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:e.k8sApplyShow,size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.objTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:t.row.Name,callback:function(a){e.$set(t.row,"Name",a)},expression:"props.row.Name"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),width:"100px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:e.k8sApplyShow,size:"small",type:"number",min:1,max:3e4,placeholder:"1-30000",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Port,callback:function(a){e.$set(t.row,"Port",a)},expression:"props.row.Port"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.form.portType"),width:"150px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:!0,disabled:e.k8sApplyShow},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("TCP")]),a("let-radio",{attrs:{label:!1,disabled:e.k8sApplyShow},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("UDP")])]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.protocol"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:!0,disabled:e.k8sApplyShow},model:{value:t.row.IsTaf,callback:function(a){e.$set(t.row,"IsTaf",a)},expression:"props.row.IsTaf"}},[e._v("TARS")]),a("let-radio",{attrs:{label:!1,disabled:e.k8sApplyShow},model:{value:t.row.IsTaf,callback:function(a){e.$set(t.row,"IsTaf",a)},expression:"props.row.IsTaf"}},[e._v("NOT TARS")])]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"80px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:e.k8sApplyShow,size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Threads,callback:function(a){e.$set(t.row,"Threads",a)},expression:"props.row.Threads"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.connections"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:e.k8sApplyShow,size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Connections,callback:function(a){e.$set(t.row,"Connections",a)},expression:"props.row.Connections"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:e.k8sApplyShow,size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Capacity,callback:function(a){e.$set(t.row,"Capacity",a)},expression:"props.row.Capacity"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:e.k8sApplyShow,size:"small",type:"number",min:0},model:{value:t.row.Timeout,callback:function(a){e.$set(t.row,"Timeout",a)},expression:"props.row.Timeout"}})]}}])}),e.k8sApplyShow?e._e():a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===t.$index?a("let-table-operation",{on:{click:function(a){return e.addAdapter(t.row)}}},[e._v(e._s(e.$t("operate.add"))+" ")]):e._e(),t.$index?a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.model.ServerServant.splice(t.$index,1)}}},[e._v(e._s(e.$t("operate.delete"))+" ")]):e._e()]}}],null,!1,434370726)})],1),e.k8sApplyShow?e._e():a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))])],1),e.k8sApplyShow?a("div",[a("b",[e._v(e._s(e.$t("deployService.form.k8sExtra")))]),a("el-collapse",{staticStyle:{"margin-top":"5px"},attrs:{accordion:""},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[a("el-collapse-item",{attrs:{name:"0"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.nodeSelect")))])]),a("let-form",{ref:"nodeSelect",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.affinity"),itemWidth:"45%"}},[a("el-select",{staticStyle:{width:"95%"},attrs:{size:"small"},model:{value:e.k8sApplyModel.abilityAffinity,callback:function(t){e.$set(e.k8sApplyModel,"abilityAffinity",t)},expression:"k8sApplyModel.abilityAffinity"}},e._l(e.abilityAffinities,(function(t){return a("el-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),0==e.k8sApplyModel.NodeSelector.length?a("let-form-item",{attrs:{itemWidth:"45%"}},[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.addItems(0,e.k8sApplyModel.NodeSelector)}}},[e._v(" "+e._s(e.$t("deployService.form.labelMatch.addLabel"))+" ")])],1):e._e(),e._l(e.k8sApplyModel.NodeSelector,(function(t,r){return a("div",[a("let-form-item",{attrs:{label:e.$t("nodeList.table.th.label"),itemWidth:"15%"}},[a("el-input",{staticStyle:{width:"95%"},attrs:{size:"small"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"item.key"}})],1),a("let-form-item",{attrs:{label:"operator",itemWidth:"10%"}},[a("el-select",{staticStyle:{width:"95%"},attrs:{size:"small"},on:{change:e.changeLabelOperator},model:{value:t.operator,callback:function(a){e.$set(t,"operator",a)},expression:"item.operator"}},e._l(e.LabelMatchOperator,(function(t){return a("el-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("nodes.label.value"),itemWidth:"20%"}},[a("el-select",{staticStyle:{width:"95%"},attrs:{disabled:t.disableValue,multiple:"",filterable:"","allow-create":"","multiple-limit":63,"default-first-option":"",placeholder:e.$t("deployService.form.labelMatch.labelValue"),size:"small"},on:{change:function(t){e.addLabelValues(t,r)}},model:{value:t.values,callback:function(a){e.$set(t,"values",a)},expression:"item.values"}},e._l(t.values,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("el-button",{attrs:{type:"primary",icon:"el-icon-plus",size:"mini",circle:""},on:{click:function(t){return e.addItems(r,e.k8sApplyModel.NodeSelector)}}}),a("el-button",{attrs:{type:"danger",icon:"el-icon-minus",size:"mini",circle:""},on:{click:function(t){return e.delItems(r,e.k8sApplyModel.NodeSelector)}}})],1)}))],2)],2),a("el-collapse-item",{attrs:{name:"1"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.network")))])]),a("let-form",{ref:"networkForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("deployService.table.th.hostIpc"),itemWidth:"25%"}},[a("el-radio-group",{on:{change:e.changeKind},model:{value:e.k8sApplyModel.HostIpc,callback:function(t){e.$set(e.k8sApplyModel,"HostIpc",t)},expression:"k8sApplyModel.HostIpc"}},[a("el-radio",{attrs:{label:!0}},[e._v(e._s(e.$t("common.true")))]),a("el-radio",{attrs:{label:!1}},[e._v(e._s(e.$t("common.false")))])],1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.table.th.hostNetwork"),itemWidth:"25%"}},[a("el-radio-group",{on:{change:e.changeKind},model:{value:e.k8sApplyModel.HostNetwork,callback:function(t){e.$set(e.k8sApplyModel,"HostNetwork",t)},expression:"k8sApplyModel.HostNetwork"}},[a("el-radio",{attrs:{label:!0}},[e._v(e._s(e.$t("common.true")))]),a("el-radio",{attrs:{label:!1}},[e._v(e._s(e.$t("common.false")))])],1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.table.th.hostPort"),itemWidth:"25%"}},[a("el-radio-group",{on:{change:e.changeKind},model:{value:e.k8sApplyModel.showHostPort,callback:function(t){e.$set(e.k8sApplyModel,"showHostPort",t)},expression:"k8sApplyModel.showHostPort"}},[a("el-radio",{attrs:{label:!0}},[e._v(e._s(e.$t("common.true")))]),a("el-radio",{attrs:{label:!1}},[e._v(e._s(e.$t("common.false")))])],1)],1),e.k8sApplyModel.showHostPort?a("div",{staticStyle:{"padding-right":"30px"}},[a("let-table",{attrs:{data:e.k8sApplyModel.HostPortArr}},[a("let-table-column",{attrs:{title:"OBJ"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.objTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:t.row.obj,callback:function(a){e.$set(t.row,"obj",a)},expression:"props.row.obj"}})]}}],null,!1,910875067)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.hostPort")},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:1,max:65535,placeholder:"1-65535",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.HostPort,callback:function(a){e.$set(t.row,"HostPort",a)},expression:"props.row.HostPort"}})]}}],null,!1,4126442684)}),a("let-table-column",{scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-button",{staticClass:"port-button",attrs:{size:"small",theme:"primary"},on:{click:function(a){return e.generateHostPort(t.row)}}},[e._v(" "+e._s(e.$t("deployService.table.th.checkHostPort"))+" ")])]}}],null,!1,642882776)})],1)],1):e._e()],1)],2),a("el-collapse-item",{attrs:{name:"2"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.disk")))])]),0==e.k8sApplyModel.mounts.length?a("div",[a("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"text",size:"mini"},on:{click:function(t){return e.addDisk(0,e.k8sApplyModel.mounts)}}},[e._v(" "+e._s(e.$t("deployService.disk.addDisk"))+" ")])],1):e._e(),a("el-form",{ref:"disk",attrs:{"label-position":"top","label-width":"120px",size:"mini"}},e._l(e.k8sApplyModel.mounts,(function(t,r){return a("div",{key:r},[a("el-card",[a("el-row",{attrs:{gutter:18}},[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:e.$t("deployService.disk.diskName"),required:""}},[a("el-input",{model:{value:t.name,callback:function(a){e.$set(t,"name",a)},expression:"disk.name"}})],1)],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:e.$t("deployService.disk.path"),required:""}},[a("el-input",{model:{value:t.mountPath,callback:function(a){e.$set(t,"mountPath",a)},expression:"disk.mountPath"}})],1)],1)],1),a("el-row",{attrs:{gutter:18}},[a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"uid",required:""}},[a("el-input",{attrs:{placeholder:"0"},model:{value:t.source.tLocalVolume.uid,callback:function(a){e.$set(t.source.tLocalVolume,"uid",a)},expression:"disk.source.tLocalVolume.uid"}})],1)],1),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"gid",required:""}},[a("el-input",{attrs:{placeholder:"0"},model:{value:t.source.tLocalVolume.gid,callback:function(a){e.$set(t.source.tLocalVolume,"gid",a)},expression:"disk.source.tLocalVolume.gid"}})],1)],1),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"mode",required:""}},[a("el-input",{attrs:{placeholder:"755"},model:{value:t.source.tLocalVolume.mode,callback:function(a){e.$set(t.source.tLocalVolume,"mode",a)},expression:"disk.source.tLocalVolume.mode"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{offset:9}},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.addDisk(r,e.k8sApplyModel.mounts)}}},[e._v(" "+e._s(e.$t("deployService.disk.addDisk"))+" ")]),a("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"danger",size:"mini"},on:{click:function(t){return e.delDisk(r,e.k8sApplyModel.mounts)}}},[e._v(" "+e._s(e.$t("deployService.disk.delDisk"))+" ")])],1)],1)],1)],1)})),0)],2),a("el-collapse-item",{attrs:{name:"3"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.resource")))])]),a("el-form",{attrs:{"label-width":"100px","label-position":"top",size:"mini"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.limitCpu"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":1000",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.k8sApplyModel.resources.limitCpu,callback:function(t){e.$set(e.k8sApplyModel.resources,"limitCpu",t)},expression:"k8sApplyModel.resources.limitCpu"}},[a("template",{slot:"append"},[e._v("milli CPUs")])],2)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.limitMem"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":128",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.k8sApplyModel.resources.limitMem,callback:function(t){e.$set(e.k8sApplyModel.resources,"limitMem",t)},expression:"k8sApplyModel.resources.limitMem"}},[a("template",{slot:"append"},[e._v("MiB")])],2)],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.requestCpu"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":1000",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.k8sApplyModel.resources.requestCpu,callback:function(t){e.$set(e.k8sApplyModel.resources,"requestCpu",t)},expression:"k8sApplyModel.resources.requestCpu"}},[a("template",{slot:"append"},[e._v("milli CPUs")])],2)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.requestMem"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":128",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.k8sApplyModel.resources.requestMem,callback:function(t){e.$set(e.k8sApplyModel.resources,"requestMem",t)},expression:"k8sApplyModel.resources.requestMem"}},[a("template",{slot:"append"},[e._v("MiB")])],2)],1)],1)],1)],1)],2)],1),a("el-button",{staticStyle:{"margin-top":"10px"},on:{click:e.editYaml}},[e._v("yaml缂栬緫")]),a("el-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"primary"},on:{click:e.saveK8s}},[e._v(e._s(e.$t("operate.save")))])],1):e._e(),a("let-modal",{staticClass:"more-cmd",attrs:{width:"1000px",footShow:!1},on:{close:e.closeYamlModel,"on-cancel":e.closeYamlModel},model:{value:e.yamlModel.show,callback:function(t){e.$set(e.yamlModel,"show",t)},expression:"yamlModel.show"}},[a("k8s-yaml-edit",{ref:"yamlEdit",on:{successFun:e.closeYamlModel}})],1),a("let-modal",{staticClass:"more-cmd",attrs:{width:"700px",footShow:!1},on:{close:e.closeResultModal,"on-cancel":e.closeResultModal},model:{value:e.resultModal.show,callback:function(t){e.$set(e.resultModal,"show",t)},expression:"resultModal.show"}},[a("p",{staticClass:"result-text"},[e._v(" "+e._s(e.$t("deployService.form.ret.success"))+e._s(e.$t("resource.installRstMsg"))+" ")]),a("let-table",{attrs:{data:e.resultModal.resultList,"empty-msg":e.$t("common.nodata"),"row-class-name":e.resultModal.rowClassName}},[a("let-table-column",{attrs:{title:"ip",prop:"ip"}}),a("let-table-column",{attrs:{title:e.$t("resource.installResult"),prop:"rst"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("p",{domProps:{textContent:e._s(t.row.rst?e.$t("common.success"):e.$t("common.error"))}})]}}])}),a("let-table-column",{attrs:{title:e.$t("common.message"),prop:"msg"}})],1)],1)],1)},At=[],Dt=a("2494"),Pt=a("2ef0"),Ot=a.n(Pt),qt=["taf_cpp","taf_java","taf_php","taf_node","not_taf","taf_go"],jt=function(){return{ServerApp:"",ServerName:"",ServerMark:"",ServerServant:[{Name:"",Port:"",HostPort:0,showHostPort:!1,Threads:0,Connections:0,Capacity:0,Timeout:0,IsTcp:!0,IsTars:!1}],ServerOption:{ServerImportant:0}}},zt={name:"OperationDeploy",components:{SetInputer:Dt["a"],K8sYamlEdit:Pe},data:function(){return{types:qt,templates:[],appList:[],isCheckedAll:!1,NodeList:[],NodeListArr:[],model:jt(),enableAuth:!1,resultModal:{show:!1,resultList:[],rowClassName:function(e){return e&&e.row&&!e.row.rst?"err-row":""}},DeployId:"",activeTab:"0",k8sApplyShow:!1,k8sApplyModel:{NodeSelector:[],tars:{},resources:{},mounts:[]},abilityAffinities:["AppRequired","ServerRequired","AppOrServerPreferred","None"],LabelMatchOperator:[],yamlModel:{show:!1}}},mounted:function(){var e=this;this.getServerTemplate(),this.getDefaultValue(),this.getAppList(),this.getNodeList(),this.$watch("model.ServerName",(function(e,t){})),this.$watch("model.node_name",(function(t,a){t!==a&&e.model.ServerServant.forEach((function(e){e.bind_ip=t}))}))},methods:{showHostPort:function(e){e.showHostPort=!0},hideHostPort:function(e){e.HostPort=0,e.showHostPort=!1},checkedChange:function(e){this.NodeListArr.indexOf(e)>-1?this.NodeListArr.splice(this.NodeListArr.indexOf(e),1):this.NodeListArr.push(e),0===this.NodeListArr.length&&(this.isCheckedAll=!1)},addAdapter:function(e){e=this.model.ServerServant[this.model.ServerServant.length-1];var t=e.Port+1,a=Object.assign({},e,{Port:t});this.model.ServerServant.push(Object.assign({},a))},deploy:function(){var e=this;this.$refs.form.validate()&&this.$confirm(this.$t("deployService.form.deployServiceTip"),this.$t("common.alert")).then((function(){var t=e.$Loading.show();e.$ajax.postJSON("/k8s/api/deploy_create",e.model).then((function(a){t.hide(),e.DeployId=a.metadata.name,e.showK8sExtra(a.metadata.name)})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))}))},getServerTemplate:function(){var e=this;this.$ajax.getJSON("/k8s/api/template_select",{isAll:!0}).then((function(t){e.templates=t.Data})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},save:function(){this.deploy()},showResultModal:function(e){this.resultModal.resultList=e,this.resultModal.show=!0},closeResultModal:function(){this.resultModal.show=!1,this.resultModal.resultList=[]},getDefaultValue:function(){var e=this,t=this.model,a=t.ServerServant,r=t.ServerOption;this.$ajax.getJSON("/k8s/api/default",{}).then((function(t){t.ServerServantElem&&a.forEach((function(e){e.Port=t.ServerServantElem.Port,e.HostPort=t.ServerServantElem.HostPort,e.showHostPort=!1,e.Capacity=t.ServerServantElem.Capacity,e.Connections=t.ServerServantElem.Connections,e.Threads=t.ServerServantElem.Threads,e.Timeout=t.ServerServantElem.Timeout,e.IsTcp=t.ServerServantElem.IsTcp,e.IsTars=t.ServerServantElem.IsTars})),t.ServerOption&&(r=t.ServerOption),e.model.ServerServant=a,e.model.ServerOption=r,e.LabelMatchOperator=t.LabelMatchOperator})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getAppList:function(){var e=this;this.$ajax.getJSON("/k8s/api/application_select",{isAll:!0}).then((function(t){e.appList=t.Data}))},getNodeList:function(){var e=this;this.$ajax.getJSON("/k8s/api/node_list",{isAll:!0}).then((function(t){e.NodeList=t}))},showK8sExtra:function(e){var t=this;this.k8sApplyShow=!0,this.$ajax.getJSON("/k8s/api/deploy_select",{deployName:e}).then((function(e){var a=Ot.a.cloneDeep(e.Data[0]);console.log("deploy:"+JSON.stringify(a,null,4)),t.k8sApplyModel={abilityAffinity:a.ServerK8S.abilityAffinity,NodeSelector:a.ServerK8S.NodeSelector,HostIpc:a.ServerK8S.HostIpc,HostNetwork:a.ServerK8S.HostNetwork,mounts:a.Mounts.filter((function(e){return e.source.hasOwnProperty("tLocalVolume")})),resources:a.resources};var r=[];if(a.ServerK8S.HostPort&&Object.keys(a.ServerK8S.HostPort).length>0&&(t.k8sApplyModel.showHostPort=!0,a.ServerK8S.HostPort.forEach((function(e){r.push({obj:e.NameRef,HostPort:Math.floor(e.Port)})})),t.k8sApplyModel.HostPortArr=r),0==r.length)for(var o in t.k8sApplyModel.showHostPort=!1,t.k8sApplyModel.HostPortArr=[],a.ServerServant)t.k8sApplyModel.HostPortArr.push({obj:o,HostPort:0})})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},addItems:function(e,t){t.length>=63?this.$message.error("".concat(this.$t("deployService.form.labelMatch.labelMax"))):(t.splice(e+1,0,{key:"",operator:"In",values:[]}),this.$forceUpdate())},delItems:function(e,t){t.splice(e,1),this.$forceUpdate()},addLabelValues:function(e,t){var a=this,r=/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]?$/;this.labelMatchArr[t].values.forEach((function(e,t){r.test(e)||(a.labelMatchArr[t].values.splice(t,1),a.$message.error("".concat(a.$t("deployService.form.labelMatch.labelValueValid"))))}))},changeLabelOperator:function(e){var t=this;this.labelMatchArr.forEach((function(e){"Exists"==e.operator||"DoesNotExist"==e.operator?(t.$set(e,"disableValue",!0),t.$set(e,"values",[])):t.$set(e,"disableValue",!1)}))},changeKind:function(){this.$forceUpdate()},generateHostPort:function(e){var t=this;this.$ajax.getJSON("/k8s/api/check_host_port",{NodePort:e.HostPort}).then((function(e){var a="";e.forEach((function(e){-1==e.ret?a+="<p>".concat(e.node,":").concat(e.port,": can use</p>"):a+='<p style="color: #F56C6C">'.concat(e.node,":").concat(e.port,": cannot use</p>")})),t.$message.success({dangerouslyUseHTMLString:!0,message:a})})).catch((function(e){t.$message.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},addDisk:function(e,t){t.splice(e+1,0,{name:"",source:{tLocalVolume:{uid:"",gid:"",mode:""}},mountPath:""}),this.$forceUpdate()},delDisk:function(e,t){t.splice(e,1),this.$forceUpdate()},saveK8s:function(){var e=this;console.log("this.model:"+JSON.stringify(this.model,null,4)),console.log("this.k8sApplyModel:"+JSON.stringify(this.k8sApplyModel,null,4)),this.$ajax.postJSON("/k8s/api/deploy_update",{DeployId:this.DeployId,ServerServant:this.model.ServerServant,ServerOption:this.model.ServerOption,ServerK8S:this.k8sApplyModel}).then((function(t){e.$tip.success("".concat(e.$t("common.success"))),e.$router.replace("/operation/approval")})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},editYaml:function(){this.yamlModel.show=!0,this.$refs.yamlEdit.show(this.DeployId,"tdeploys")},closeYamlModel:function(){this.yamlModel.show=!1}}},Vt=zt,Et=(a("4917"),Object(w["a"])(Vt,It,At,!1,null,null,null)),Rt=Et.exports,Bt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_approval"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.ServerApp,callback:function(t){e.$set(e.query,"ServerApp",t)},expression:"query.ServerApp"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.ServerName,callback:function(t){e.$set(e.query,"ServerName",t)},expression:"query.ServerName"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"ServerApp",width:"15%"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.serviceName"),prop:"ServerName",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("serviceApproval.RequestPerson"),prop:"RequestPerson",width:"15%"}}),a("let-table-column",{attrs:{title:e.$t("serviceApproval.RequestMark"),prop:"RequestMark"}}),a("let-table-column",{attrs:{title:e.$t("serviceApproval.RequestTime"),prop:"RequestTime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.approvalItem(t.row)}}},[e._v(e._s(e.$t("operate.approval")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.$t("template.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?a("pre",[e._v(e._s(e.viewModal.model))]):e._e(),a("div",{attrs:{slot:"foot"},slot:"foot"})]),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("dialog.title.add"):this.$t("dialog.title.edit"),width:"80%"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?a("let-form",{ref:"detailForm",attrs:{inline:""}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app"),itemWidth:"45%",required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.appTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:e.detailModal.model.ServerApp,callback:function(t){e.$set(e.detailModal.model,"ServerApp",t)},expression:"detailModal.model.ServerApp"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName"),itemWidth:"45%",required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.serviceFormatTips"),required:"","required-tip":e.$t("deployService.form.serviceTips"),pattern:"^[a-zA-Z]([a-zA-Z0-9]+)?$","pattern-tip":e.$t("deployService.form.serviceFormatTips")},model:{value:e.detailModal.model.ServerName,callback:function(t){e.$set(e.detailModal.model,"ServerName",t)},expression:"detailModal.model.ServerName"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.template"),itemWidth:"45%",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.templateTips")},model:{value:e.detailModal.model.ServerOption.ServerTemplate,callback:function(t){e.$set(e.detailModal.model.ServerOption,"ServerTemplate",t)},expression:"detailModal.model.ServerOption.ServerTemplate"}},e._l(e.templates,(function(t){return a("let-option",{key:t.TemplateName,attrs:{value:t.TemplateName}},[e._v(e._s(t.TemplateName))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceMark"),itemWidth:"45%"}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.serviceMark")},model:{value:e.detailModal.model.ServerMark,callback:function(t){e.$set(e.detailModal.model,"ServerMark",t)},expression:"detailModal.model.ServerMark"}})],1),a("let-table",{attrs:{data:e.detailModal.model.ServerServant}},[a("let-table-column",{attrs:{title:"OBJ",width:"150px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.objTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:t.row.Name,callback:function(a){e.$set(t.row,"Name",a)},expression:"props.row.Name"}})]}}],null,!1,3758810427)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),width:"100px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,max:65535,placeholder:"0-65535",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Port,callback:function(a){e.$set(t.row,"Port",a)},expression:"props.row.Port"}})]}}],null,!1,826062684)}),a("let-table-column",{attrs:{title:e.$t("deployService.form.portType"),width:"150px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:!0},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("TCP")]),a("let-radio",{attrs:{label:!1},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("UDP")])]}}],null,!1,1519152386)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.protocol"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:!0},model:{value:t.row.IsTars,callback:function(a){e.$set(t.row,"IsTars",a)},expression:"props.row.IsTars"}},[e._v("TARS")]),a("let-radio",{attrs:{label:!1},model:{value:t.row.IsTars,callback:function(a){e.$set(t.row,"IsTars",a)},expression:"props.row.IsTars"}},[e._v("NOT TARS")])]}}],null,!1,3031957841)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"80px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Threads,callback:function(a){e.$set(t.row,"Threads",a)},expression:"props.row.Threads"}})]}}],null,!1,1655720946)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.connections"),width:"100px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Connections,callback:function(a){e.$set(t.row,"Connections",a)},expression:"props.row.Connections"}})]}}],null,!1,2060048682)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),width:"120px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Capacity,callback:function(a){e.$set(t.row,"Capacity",a)},expression:"props.row.Capacity"}})]}}],null,!1,58581595)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"150px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0},model:{value:t.row.Timeout,callback:function(a){e.$set(t.row,"Timeout",a)},expression:"props.row.Timeout"}})]}}],null,!1,1471836343)}),a("let-table-column",{attrs:{width:"10px"}})],1)],1):e._e()],1),a("let-modal",{attrs:{title:(e.approvalModal.isNew,this.$t("deployService.title.approval")),width:"80%"},on:{"on-confirm":e.saveApprovalItem,"on-cancel":e.closeApprovalModal},model:{value:e.approvalModal.show,callback:function(t){e.$set(e.approvalModal,"show",t)},expression:"approvalModal.show"}},[e.approvalModal.model?a("let-form",{ref:"approvalForm",attrs:{inline:""}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app"),itemWidth:"45%",required:""}},[a("let-input",{attrs:{disabled:"",size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.appTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:e.approvalModal.model.ServerApp,callback:function(t){e.$set(e.approvalModal.model,"ServerApp",t)},expression:"approvalModal.model.ServerApp"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName"),itemWidth:"45%",required:""}},[a("let-input",{attrs:{disabled:"",size:"small",placeholder:e.$t("deployService.form.serviceFormatTips"),required:"","required-tip":e.$t("deployService.form.serviceTips"),pattern:"^[a-zA-Z]([a-zA-Z0-9]+)?$","pattern-tip":e.$t("deployService.form.serviceFormatTips")},model:{value:e.approvalModal.model.ServerName,callback:function(t){e.$set(e.approvalModal.model,"ServerName",t)},expression:"approvalModal.model.ServerName"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.template"),itemWidth:"45%",required:""}},[a("let-select",{attrs:{disabled:"",size:"small",required:"","required-tip":e.$t("deployService.form.templateTips")},model:{value:e.approvalModal.model.ServerOption.ServerTemplate,callback:function(t){e.$set(e.approvalModal.model.ServerOption,"ServerTemplate",t)},expression:"approvalModal.model.ServerOption.ServerTemplate"}},e._l(e.templates,(function(t){return a("let-option",{key:t.TemplateName,attrs:{value:t.TemplateName}},[e._v(e._s(t.TemplateName))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceMark"),itemWidth:"45%"}},[a("let-input",{attrs:{disabled:"",size:"small",placeholder:e.$t("deployService.form.serviceMark")},model:{value:e.approvalModal.model.ServerMark,callback:function(t){e.$set(e.approvalModal.model,"ServerMark",t)},expression:"approvalModal.model.ServerMark"}})],1),a("let-table",{attrs:{data:e.approvalModal.model.ServerServant}},[a("let-table-column",{attrs:{title:"OBJ",width:"150px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:"",size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.objTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:t.row.Name,callback:function(a){e.$set(t.row,"Name",a)},expression:"props.row.Name"}})]}}],null,!1,3088624381)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),width:"100px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:"",size:"small",type:"number",min:0,max:65535,placeholder:"0-65535",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Port,callback:function(a){e.$set(t.row,"Port",a)},expression:"props.row.Port"}})]}}],null,!1,2426397722)}),a("let-table-column",{attrs:{title:e.$t("deployService.form.portType"),width:"150px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{disabled:"",label:!0},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("TCP")]),a("let-radio",{attrs:{disabled:"",label:!1},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("UDP")])]}}],null,!1,1671426050)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.protocol"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{disabled:"",label:!0},model:{value:t.row.IsTars,callback:function(a){e.$set(t.row,"IsTars",a)},expression:"props.row.IsTars"}},[e._v("TARS")]),a("let-radio",{attrs:{disabled:"",label:!1},model:{value:t.row.IsTars,callback:function(a){e.$set(t.row,"IsTars",a)},expression:"props.row.IsTars"}},[e._v("NOT TARS")])]}}],null,!1,2516800849)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"80px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:"",size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Threads,callback:function(a){e.$set(t.row,"Threads",a)},expression:"props.row.Threads"}})]}}],null,!1,2306495156)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.connections"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:"",size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Connections,callback:function(a){e.$set(t.row,"Connections",a)},expression:"props.row.Connections"}})]}}],null,!1,2695745772)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:"",size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.Capacity,callback:function(a){e.$set(t.row,"Capacity",a)},expression:"props.row.Capacity"}})]}}],null,!1,1268742429)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{disabled:"",size:"small",type:"number",min:0},model:{value:t.row.Timeout,callback:function(a){e.$set(t.row,"Timeout",a)},expression:"props.row.Timeout"}})]}}],null,!1,882398385)}),a("let-table-column",{attrs:{width:"10px"}})],1),a("div",[a("let-form-item",{attrs:{label:e.$t("serviceApproval.ApprovalResult"),required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.approvalModal.model.ApprovalResult,callback:function(t){e.$set(e.approvalModal.model,"ApprovalResult",t)},expression:"approvalModal.model.ApprovalResult"}},e._l(e.approvalResult,(function(t){return a("let-option",{key:t.label,attrs:{value:t.value}},[e._v(e._s(t.label))])})),1)],1)],1),a("div",[a("let-form-item",{attrs:{label:e.$t("serviceApproval.ApprovalMark"),required:""}},[a("let-input",{attrs:{type:"textarea",rows:3,placeholder:e.$t("serviceApproval.ApprovalMark"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.approvalModal.model.ApprovalMark,callback:function(t){e.$set(e.approvalModal.model,"ApprovalMark",t)},expression:"approvalModal.model.ApprovalMark"}})],1)],1)],1):e._e()],1)],1)},Ht=[],Ft=[{label:"Approve",value:"true"},{label:"Reject",value:"false"}],Jt={name:"OperationApproval",data:function(){return{approvalResult:Ft,templates:[],query:{ServerApp:"",ServerName:""},items:[],K8SisCheckedAll:!1,K8SNodeList:[],K8SNodeListArr:[],viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1},approvalModal:{show:!1,model:null,isNew:!1},k8sApplyModel:{NodeSelector:[],tars:{},resources:{},mounts:[]}}},watch:{K8SisCheckedAll:function(){var e=this,t=this.K8SisCheckedAll;t?this.K8SNodeList.forEach((function(t){-1===e.K8SNodeListArr.indexOf(t)&&e.K8SNodeListArr.push(t)})):this.K8SNodeListArr=[]}},mounted:function(){this.getServerTemplate(),this.getNodeList(),this.fetchData()},methods:{K8ScheckedChange:function(e){this.K8SNodeListArr.indexOf(e)>-1?this.K8SNodeListArr.splice(this.K8SNodeListArr.indexOf(e),1):this.K8SNodeListArr.push(e),0===this.K8SNodeListArr.length&&(this.K8SisCheckedAll=!1)},fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/k8s/api/deploy_select",{ServerApp:this.query.ServerApp,ServerName:this.query.ServerName}).then((function(a){if(t.hide(),e.items=[],a.hasOwnProperty("Data")){for(var r=0;r<a.Data.length;r++){a.Data[r].RequestTime=Object(Ye["b"])(a.Data[r].RequestTime,"YYYY-MM-DD HH:mm:ss");var o=[];for(var i in a.Data[r].ServerServant)o.push(a.Data[r].ServerServant[i]);if(a.Data[r].ServerServant=o,0==a.Data[r].ServerK8S.HostPort.length)for(var s in a.Data[r].ServerServant)a.Data[r].ServerK8S.HostPort.push({NameRef:a.Data[r].ServerServant[s].Name,Port:a.Data[r].ServerServant[s].Port})}e.items=a.Data}})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},closeApprovalModal:function(){this.$refs.approvalForm.resetValid(),this.approvalModal.show=!1,this.approvalModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},editItem:function(e){this.detailModal.model=e,this.detailModal.show=!0,this.detailModal.isNew=!1},approvalItem:function(e){this.approvalModal.model=e,this.approvalModal.show=!0,this.approvalModal.isNew=!1},adapterServerK8S:function(e){var t=Object.assign({},e),a={};return t.ServerServant.forEach((function(e){a[e.Name]=e})),t.ServerServant=a,t},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.adapterServerK8S(this.detailModal.model);if(!t)return;var a=this.$Loading.show();this.k8sApplyModel={abilityAffinity:t.ServerK8S.abilityAffinity,NodeSelector:t.ServerK8S.NodeSelector,HostIpc:t.ServerK8S.HostIpc,HostNetwork:t.ServerK8S.HostNetwork,mounts:t.Mounts.filter((function(e){return e.source.hasOwnProperty("tLocalVolume")})),resources:t.resources};var r=[];if(t.ServerK8S.HostPort&&Object.keys(t.ServerK8S.HostPort).length>0&&(this.k8sApplyModel.showHostPort=!0,t.ServerK8S.HostPort.forEach((function(e){r.push({obj:e.NameRef,HostPort:Math.floor(e.Port)})})),this.k8sApplyModel.HostPortArr=r),0==r.length)for(var o in this.k8sApplyModel.showHostPort=!1,this.k8sApplyModel.HostPortArr=[],t.ServerServant)this.k8sApplyModel.HostPortArr.push({obj:o,HostPort:0});this.$ajax.postJSON("/k8s/api/deploy_update",{DeployId:t.DeployId,ServerServant:t.ServerServant,ServerOption:t.ServerOption,ServerK8S:this.k8sApplyModel}).then((function(){a.hide(),e.fetchData().then((function(){e.detailModal.show=!1,e.$tip.success(e.$t("common.success"))}))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},saveApprovalItem:function(){var e=this;if(this.$refs.approvalForm.validate()){var t=this.approvalModal.model,a=this.$Loading.show();this.$ajax.postJSON("/k8s/api/approval_create",t).then((function(){a.hide(),e.fetchData().then((function(){e.approvalModal.show=!1,e.$tip.success(e.$t("common.success"))}))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("template.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/k8s/api/deploy_delete",{DeployId:e.DeployId}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},getServerTemplate:function(){var e=this;this.$ajax.getJSON("/k8s/api/template_select",{isAll:!0}).then((function(t){e.templates=t.Data})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getNodeList:function(){var e=this;this.$ajax.getJSON("/k8s/api/node_list",{isAll:!0}).then((function(t){e.K8SNodeList=t}))}}},Yt=Jt,Kt=(a("244f"),Object(w["a"])(Yt,Bt,Ht,!1,null,null,null)),Ut=Kt.exports,Wt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_history"},[a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"ServerApp",width:"15%"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.serviceName"),prop:"ServerName",width:"15%"}}),a("let-table-column",{attrs:{title:e.$t("serviceApproval.RequestPerson"),prop:"RequestPerson",width:"15%"}}),a("let-table-column",{attrs:{title:e.$t("serviceApproval.ApprovalTime"),prop:"ApprovalTime"}}),a("let-table-column",{attrs:{title:e.$t("serviceApproval.ApprovalResult"),prop:"ApprovalResult"},scopedSlots:e._u([{key:"default",fn:function(t){return[""+t.row.ApprovalResult==="true"?a("span",{staticClass:"success"},[e._v("Approval")]):""+t.row.ApprovalResult==="false"?a("span",{staticClass:"warn"},[e._v("Reject")]):a("span",[e._v(e._s(t.row.ApprovalResult))])]}}])}),a("let-table-column",{attrs:{title:e.$t("serviceApproval.ApprovalMark"),prop:"ApprovalMark"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.viewItem(t.row)}}},[e._v(e._s(e.$t("operate.view")))])]}}])})],1),""!=this.Continue?a("let-button",{on:{click:e.fetchData}},[e._v("more")]):e._e(),a("let-modal",{attrs:{title:e.$t("deployService.title.history"),width:"80%"},on:{"on-confirm":e.closeViewModal,"on-cancel":e.closeViewModal},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?a("let-form",{ref:"viewForm",attrs:{inline:""}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app"),itemWidth:"45%"}},[e._v(e._s(e.viewModal.model.ServerApp))]),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName"),itemWidth:"45%"}},[e._v(e._s(e.viewModal.model.ServerName))]),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceMark"),itemWidth:"45%"}},[e._v(e._s(e.viewModal.model.ServerMark))]),a("let-table",{attrs:{data:e.viewModal.model.ServerServant}},[a("let-table-column",{attrs:{title:"OBJ"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.Name))]}}],null,!1,1485259994)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port")},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[e._v(e._s(t.row.Port))]}}],null,!1,1805883483)}),a("let-table-column",{attrs:{title:e.$t("deployService.form.portType")},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.IsTcp?a("let-radio",{attrs:{label:!0},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("TCP")]):a("let-radio",{attrs:{label:!1},model:{value:t.row.IsTcp,callback:function(a){e.$set(t.row,"IsTcp",a)},expression:"props.row.IsTcp"}},[e._v("UDP")])]}}],null,!1,2027518380)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.protocol")},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.IsTars?a("let-radio",{attrs:{label:!0},model:{value:t.row.IsTars,callback:function(a){e.$set(t.row,"IsTars",a)},expression:"props.row.IsTars"}},[e._v("TARS")]):a("let-radio",{attrs:{label:!1},model:{value:t.row.IsTars,callback:function(a){e.$set(t.row,"IsTars",a)},expression:"props.row.IsTars"}},[e._v(e._s(e.$t("serverList.servant.notTARS")))])]}}],null,!1,387019230)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.Threads))]}}],null,!1,2683018496)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.connections"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.Connections))]}}],null,!1,192188376)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.Capacity))]}}],null,!1,4133537865)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.Timeout))]}}],null,!1,2137174470)}),a("let-table-column",{attrs:{width:"10px"}})],1),a("let-form-item",{attrs:{label:e.$t("serviceApproval.ApprovalResult")}},[e.viewModal.model.ApprovalResult?a("span",{class:e.viewModal.model.ApprovalResult?"success":"warn"},[e._v(e._s(e.viewModal.model.ApprovalResult?"閫氳繃":"椹冲洖"))]):e._e()]),a("let-form-item",{attrs:{label:e.$t("serviceApproval.ApprovalMark"),itemWidth:"100%"}},[e._v(e._s(e.viewModal.model.ApprovalMark))])],1):e._e()],1)],1)},Zt=[],Gt={name:"OperationHistory",data:function(){return{items:[],Continue:null,viewModal:{show:!1,model:null},K8SisCheckedAll:!1,K8SNodeList:[]}},mounted:function(){this.getDefaultValue(),this.getNodeList(),this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/k8s/api/approval_select",{Continue:this.Continue}).then((function(a){t.hide(),e.Continue=a.Continue,a.Data&&a.Data.forEach((function(t){var a=[];if(t.ServerServant){for(var r in t.ServerServant)a.push(t.ServerServant[r]);t.ServerServant=a}t.ApprovalTime=Object(Ye["b"])(t.ApprovalTime,"YYYY-MM-DD HH:mm:ss"),e.items.push(t)}))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},getNodeList:function(){var e=this;this.$ajax.getJSON("/k8s/api/node_list",{isAll:!0}).then((function(t){e.K8SNodeList=t}))},search:function(){this.fetchData()},closeViewModal:function(){this.viewModal.show=!1,this.viewModal.model=null},viewItem:function(e){var t=this.adapterServerK8S(e);this.viewModal.model=t,this.viewModal.show=!0},adapterServerK8S:function(e){return e}}},Qt=Gt,Xt=(a("afb9"),Object(w["a"])(Qt,Wt,Zt,!1,null,null,null)),ea=Xt.exports,ta=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_undeploy"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.ServerApp,callback:function(t){e.$set(e.query,"ServerApp",t)},expression:"query.ServerApp"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.ServerName,callback:function(t){e.$set(e.query,"ServerName",t)},expression:"query.ServerName"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"60px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{on:{change:function(a){return e.checkChange(t.row)}},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}])}),a("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"ServerApp"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.serviceName"),prop:"ServerName"}})],1),a("div",{staticStyle:{overflow:"hidden"}},[a("div",{staticClass:"btn_group"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.undeployServer}},[e._v(e._s(e.$t("operate.undeploy")))])],1),a("let-pagination",{staticStyle:{float:"right"},attrs:{align:"right",page:e.pagination.page,total:e.pagination.total},on:{change:e.gotoPage}})],1)],1)},aa=[],ra={name:"OperationUndeploy",data:function(){return{query:{ServerApp:"",ServerName:""},pagination:{page:1,size:10,total:1},viewModal:{show:!1,model:null},serverList:[],isCheckedAll:!1,checkedList:[]}},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.serverList.forEach((function(t){t.isChecked=e})),this.checkedList=e?[].concat(this.serverList):[]}},mounted:function(){this.fetchData()},methods:{gotoPage:function(e){this.pagination.page=e,this.fetchData()},fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/k8s/api/server_list",{ServerApp:this.query.ServerApp,ServerName:this.query.ServerName,page:this.pagination.page,size:this.pagination.size}).then((function(a){t.hide(),e.serverList=[],a.hasOwnProperty("Data")&&(a.Data.forEach((function(e){e.isChecked=!1})),e.serverList=a.Data),e.pagination.total=Math.ceil(a.Count.AllCount/e.pagination.size)})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},closeViewModal:function(){this.viewModal.show=!1,this.viewModal.model=null},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},checkChange:function(e){var t=this.checkedList,a=e.isChecked;if(a){var r=!1;t.forEach((function(t){t.ServerId===e.ServerId&&(r=!0)})),r||t.push(e)}else{var o=!1,i=-1;t.forEach((function(t,a){t.ServerId===e.ServerId&&(o=!0,i=a)})),o&&t.splice(i,1)}},undeployServer:function(){var e=this,t=this.checkedList.filter((function(e){return e.isChecked}));if(t.length<=0)this.$tip.warning(this.$t("dialog.tips.item"));else{var a=t.map((function(e){return e.ServerId}));this.$confirm(this.$t("serverList.dlg.msg.undeploy"),this.$t("common.alert")).then((function(){var t=e.$Loading.show();e.$ajax.postJSON("/k8s/api/server_undeploy",{ServerId:a}).then((function(a){t.hide(),e.fetchData(),e.$tip.success(e.$t("common.success"))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}))}}}},oa=ra,ia=(a("4e15"),Object(w["a"])(oa,ta,aa,!1,null,null,null)),sa=ia.exports,la=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_templates"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.template")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.template_name,callback:function(t){e.$set(e.query,"template_name",t)},expression:"query.template_name"}})],1),a("let-form-item",{attrs:{label:e.$t("template.search.parentTemplate")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.parents_name,callback:function(t){e.$set(e.query,"parents_name",t)},expression:"query.parents_name"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))]),e._v(" "),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("template.btn.addTempate")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"TemplateName",width:"25%"}}),a("let-table-column",{attrs:{title:e.$t("template.search.parentTemplate"),prop:"TemplateParent",width:"25%"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"UpdateTime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.viewItem(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.$t("template.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?a("pre",[e._v(e._s(e.viewModal.model.TemplateContent))]):e._e(),a("div",{attrs:{slot:"foot"},slot:"foot"})]),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("template.add.title"):this.$t("template.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.template"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("template.add.templateFormatTips"),required:"","required-tip":e.$t("template.add.templateNameTips"),pattern:"^[a-zA-Z]([.a-zA-Z0-9]+)?$","pattern-tip":e.$t("template.add.templateFormatTips")},model:{value:e.detailModal.model.TemplateName,callback:function(t){e.$set(e.detailModal.model,"TemplateName",t)},expression:"detailModal.model.TemplateName"}})],1),a("let-form-item",{attrs:{label:e.$t("template.search.parentTemplate"),required:""}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.detailModal.model.TemplateParent,callback:function(t){e.$set(e.detailModal.model,"TemplateParent",t)},expression:"detailModal.model.TemplateParent"}},[a("let-option",{attrs:{value:""}},[e._v(e._s(e.$t("pub.dlg.defaultValue")))]),e._l(e.items,(function(t){return a("let-option",{key:t.id,attrs:{value:t.TemplateName}},[e._v(e._s(t.TemplateName))])}))],2)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceMark")}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.serviceMark")},model:{value:e.detailModal.model.CreateMark,callback:function(t){e.$set(e.detailModal.model,"CreateMark",t)},expression:"detailModal.model.CreateMark"}})],1),a("let-form-item",{attrs:{label:e.$t("template.form.content"),required:""}},[a("let-input",{attrs:{type:"textarea",rows:10,size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.detailModal.model.TemplateContent,callback:function(t){e.$set(e.detailModal.model,"TemplateContent",t)},expression:"detailModal.model.TemplateContent"}})],1)],1):e._e()],1)],1)},na=[],ca={name:"OperationTemplates",data:function(){return{query:{template_name:"",parents_name:""},items:[],viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1}}},mounted:function(){this.fetchData()},methods:{gotoPage:function(e){this.pagination.page=e,this.fetchData()},fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/k8s/api/template_select",{TemplateName:this.query.template_name,ParentName:this.query.parents_name}).then((function(a){t.hide(),e.items=a.Data,e.items.forEach((function(e){e.UpdateTime=R()(e.UpdateTime).format("YYYY-MM-DD HH:mm:ss")}))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},editItem:function(e){this.detailModal.model=e,this.detailModal.show=!0,this.detailModal.isNew=!1},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=t.TemplateId?"/k8s/api/template_update":"/k8s/api/template_create",r=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("template.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/k8s/api/template_delete",{TemplateId:e.TemplateId}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))}}},da=ca,ua=(a("3976"),Object(w["a"])(da,la,na,!1,null,null,null)),pa=ua.exports,ma=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_approval"},[a("el-card",{staticStyle:{"margin-top":"10px",padding:"15px"}},[a("div",[a("span",[e._v(e._s(e.$t("deployService.title.baseImage")))]),a("el-button",{staticStyle:{float:"right","margin-bottom":"10px"},attrs:{type:"primary",size:"small"},on:{click:e.addItem}},[e._v(e._s(e.$t("imageService.btn.add"))+" ")])],1),a("let-table",{ref:"table",attrs:{data:e.baseLists,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("imageService.form.SupportedType"),prop:"SupportedTypeShow"}}),a("let-table-column",{attrs:{title:e.$t("imageService.form.Count"),prop:"Count",width:"25%"}}),a("let-table-column",{attrs:{title:e.$t("imageService.form.Mark"),prop:"Mark"}}),a("let-table-column",{attrs:{title:e.$t("imageService.form.CreateTime"),prop:"CreateTime"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update"))+" ")]),a("let-table-operation",{on:{click:function(a){return e.viewItem(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete"))+" ")])]}}])})],1)],1),a("el-card",{staticStyle:{"margin-top":"10px",padding:"15px"}},[a("div",[a("span",[e._v(e._s(e.$t("deployService.title.nodeImage")))]),a("el-button",{staticStyle:{float:"right","margin-bottom":"10px"},attrs:{type:"primary",size:"small"},on:{click:e.addNodeImage}},[e._v(e._s(e.$t("imageService.btn.add"))+" ")])],1),a("let-table",{ref:"table",attrs:{data:e.tafNodeImages,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"ID"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{color:"green",display:"inline-block"},attrs:{title:e.$t("releasePackage.default")}},[t.row.isDefault?a("i",{staticClass:"icon iconfont"},[e._v("畋�")]):e._e()]),e._v(" "+e._s(t.row.Id)+" ")]}}])}),a("let-table-column",{attrs:{title:e.$t("pub.dlg.imageAddress"),prop:"Image"}}),a("let-table-column",{attrs:{title:e.$t("pub.dlg.mark"),prop:"Mark"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editNodeImage(t.row)}}},[e._v(e._s(e.$t("operate.update"))+" ")]),a("let-table-operation",{on:{click:function(a){return e.setDefault(t.row)}}},[e._v(e._s(e.$t("operate.default"))+" ")]),a("let-table-operation",{on:{click:function(a){return e.deleteNodeImage(t.row)}}},[e._v(e._s(e.$t("operate.delete"))+" ")])]}}])})],1)],1),a("let-modal",{attrs:{title:e.baseModal.isNew?this.$t("dialog.title.add"):this.$t("dialog.title.edit"),width:"600px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.baseModal.show,callback:function(t){e.$set(e.baseModal,"show",t)},expression:"baseModal.show"}},[e.baseModal.model?a("let-form",{ref:"detailForm",attrs:{inline:""}},[a("let-form-item",{attrs:{label:e.$t("imageService.form.SupportedType"),itemWidth:"600px",required:""}},e._l(e.SupportedType,(function(t){return a("let-checkbox",{key:t,attrs:{value:e.baseModal.model.SupportedType.indexOf(t)>-1},on:{change:function(a){return e.SupportedTypeChange(t)}}},[e._v(" "+e._s(t)+" ")])})),1),a("let-form-item",{attrs:{label:e.$t("imageService.form.Mark"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.Mark")},model:{value:e.baseModal.model.Mark,callback:function(t){e.$set(e.baseModal.model,"Mark",t)},expression:"baseModal.model.Mark"}})],1)],1):e._e()],1),a("let-modal",{attrs:{footShow:!1,title:this.$t("imageService.title.view"),width:"80%"},model:{value:e.releaseListsModal.show,callback:function(t){e.$set(e.releaseListsModal,"show",t)},expression:"releaseListsModal.show"}},[a("br"),e.releaseListsModal.model?a("let-table",{ref:"table",attrs:{data:e.releaseListsModal.model,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("imageService.form.Image"),prop:"Image",width:"40%"}}),a("let-table-column",{attrs:{title:e.$t("imageService.form.CreatePerson"),prop:"CreatePerson",width:"10%"}}),a("let-table-column",{attrs:{title:e.$t("imageService.form.CreateTime"),prop:"CreateTime",width:"15%"}}),a("let-table-column",{attrs:{title:e.$t("imageService.form.Mark"),prop:"Mark"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editReleaseItem(t.row)}}},[e._v(e._s(e.$t("operate.view"))+" ")]),a("let-table-operation",{on:{click:function(a){return e.removeReleaseItem(t.row)}}},[e._v(e._s(e.$t("operate.delete"))+" ")])]}}],null,!1,3590708250)})],1):e._e()],1),a("let-modal",{attrs:{title:e.releaseModal.isNew?this.$t("dialog.title.add"):this.$t("dialog.title.edit"),width:"600px"},on:{"on-confirm":e.saveReleaseItem,"on-cancel":e.closeReleaseModal},model:{value:e.releaseModal.show,callback:function(t){e.$set(e.releaseModal,"show",t)},expression:"releaseModal.show"}},[e.releaseModal.model?a("let-form",{ref:"releaseForm"},[a("let-form-item",{attrs:{label:e.$t("imageService.form.Image"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.ImageHolder"),required:"","required-tip":e.$t("imageService.form.ImageTips")},model:{value:e.releaseModal.model.Image,callback:function(t){e.$set(e.releaseModal.model,"Image",t)},expression:"releaseModal.model.Image"}})],1),a("let-form-item",{attrs:{label:e.$t("imageService.form.Secret")}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.SecretTips"),required:"","required-tip":e.$t("imageService.form.SecretTips")},model:{value:e.releaseModal.model.Secret,callback:function(t){e.$set(e.releaseModal.model,"Secret",t)},expression:"releaseModal.model.Secret"}})],1),a("let-form-item",{attrs:{label:e.$t("imageService.form.Mark"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.Mark")},model:{value:e.releaseModal.model.Mark,callback:function(t){e.$set(e.releaseModal.model,"Mark",t)},expression:"releaseModal.model.Mark"}})],1)],1):e._e()],1),a("el-dialog",{attrs:{title:e.nodeImageModal.isNew?this.$t("dialog.title.add"):this.$t("dialog.title.edit"),visible:e.nodeImageModal.show,width:"600px","before-close":e.closeNodeModal,"close-on-click-modal":!1},on:{"update:visible":function(t){return e.$set(e.nodeImageModal,"show",t)}}},[a("el-form",{ref:"nodeForm",attrs:{model:e.nodeImageModal.model,size:"small","label-position":"top",rules:e.rules}},[a("el-form-item",{attrs:{label:"Id",prop:"Id"}},[a("el-input",{staticStyle:{width:"80%"},model:{value:e.nodeImageModal.model.Id,callback:function(t){e.$set(e.nodeImageModal.model,"Id",t)},expression:"nodeImageModal.model.Id"}})],1),a("el-form-item",{attrs:{label:e.$t("pub.dlg.imageAddress"),prop:"Image"}},[a("el-input",{staticStyle:{width:"80%"},model:{value:e.nodeImageModal.model.Image,callback:function(t){e.$set(e.nodeImageModal.model,"Image",t)},expression:"nodeImageModal.model.Image"}})],1),a("el-form-item",{attrs:{label:e.$t("pub.dlg.mark"),prop:"Mark"}},[a("el-input",{staticStyle:{width:"80%"},model:{value:e.nodeImageModal.model.Mark,callback:function(t){e.$set(e.nodeImageModal.model,"Mark",t)},expression:"nodeImageModal.model.Mark"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.closeNodeModal}},[e._v(e._s(e.$t("common.cancel")))]),a("el-button",{attrs:{type:"primary"},on:{click:e.saveNodeModal}},[e._v(e._s(e.$t("common.submit")))])],1)],1)],1)},fa=[],ha=(a("a15b"),{name:"OperationImage",data:function(){return{baseLists:[],tafNodeImages:[],SupportedType:["cpp","nodejs","java-war","java-jar","go"],baseModal:{show:!1,model:null,isNew:!1},releaseListsModal:{Name:"",show:!1,model:null,isNew:!1},releaseModal:{Name:"",show:!1,model:null,isNew:!1},nodeImageModal:{show:!1,model:{},isNew:!1},rules:{Id:[{required:!0,message:"".concat(this.$t("imageService.node.idTip")),trigger:"blur"}],Image:[{required:!0,message:"".concat(this.$t("imageService.node.imageAddressTip")),trigger:"blur"}],Mark:[{required:!0,message:"".concat(this.$t("imageService.node.markTip")),trigger:"blur"}]}}},mounted:function(){this.fetchData(),this.getTafNodeList()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/k8s/api/image_select",{}).then((function(a){t.hide(),e.baseLists=a.Data,e.baseLists.forEach((function(e){e.SupportedTypeShow=e.SupportedType.join(", "),e.CreateTime=R()(e.CreateTime).format("YYYY-MM-DD HH:mm:ss")}))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},SupportedTypeChange:function(e){this.baseModal.model.SupportedType.indexOf(e)>-1?this.baseModal.model.SupportedType.splice(this.baseModal.model.SupportedType.indexOf(e),1):this.baseModal.model.SupportedType.push(e)},addItem:function(){this.baseModal.model={SupportedType:[]},this.baseModal.show=!0,this.baseModal.isNew=!0},fetchReleaseData:function(e){var t=this,a=this.$refs.table.$loading.show();return this.$ajax.getJSON("/k8s/api/image_release_select",{Name:e}).then((function(r){a.hide(),t.releaseListsModal.Name=e,t.releaseListsModal.model=r.Data,t.releaseListsModal.model.forEach((function(t){t.CreateTime=R()(t.CreateTime).format("YYYY-MM-DD HH:mm:ss"),t.Name=e}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},viewItem:function(e){var t=this;this.fetchReleaseData(e.Name).then((function(){t.releaseListsModal.show=!0}))},editItem:function(e){this.baseModal.model=e,this.baseModal.show=!0,this.baseModal.isNew=!1},removeItem:function(e){var t=this,a=this.$refs.table.$loading.show();this.$confirm(this.$t("imageService.delete.confirmTips"),this.$t("common.alert")).then((function(){return t.$ajax.postJSON("/k8s/api/image_delete",{Name:e.Name}).then((function(e){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.baseModal.show=!1,this.baseModal.model=null},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.baseModal.model,a=this.$Loading.show(),r=t.Name?"/k8s/api/image_update":"/k8s/api/image_create";this.$ajax.postJSON(r,t).then((function(){a.hide(),e.fetchData().then((function(){e.baseModal.show=!1,e.$tip.success(e.$t("common.success"))}))})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},addReleaseItem:function(e){this.releaseModal.model={Name:e},this.releaseModal.show=!0,this.releaseModal.isNew=!0},closeReleaseModal:function(){this.$refs.releaseForm.resetValid(),this.releaseModal.show=!1,this.releaseModal.model=null},editReleaseItem:function(e){this.releaseModal.model=e,this.releaseModal.show=!0,this.releaseModal.isNew=!1},removeReleaseItem:function(e){var t=this;this.$confirm(this.$t("imageService.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.postJSON("/k8s/api/image_release_delete",{Name:e.Name,Id:e.Id}).then((function(){a.hide(),t.fetchReleaseData(e.Name).then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},saveReleaseItem:function(){var e=this;if(this.$refs.releaseForm.validate()){var t=this.releaseModal.model,a=this.$Loading.show();this.$ajax.postJSON("/k8s/api/image_release_create",t).then((function(){a.hide(),e.$tip.success(e.$t("common.success")),e.fetchReleaseData(t.Name),e.releaseModal.show=!1})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},getTafNodeList:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getDefaultNodeImage();case 2:a=t.sent,e.$ajax.getJSON("/k8s/api/image_node_select").then((function(t){t.Data.forEach((function(e){e.Image==a&&(e.isDefault=!0)})),e.tafNodeImages=t.Data})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}));case 4:case"end":return t.stop()}}),t)})))()},getDefaultNodeImage:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$ajax.getJSON("/k8s/api/get_tfc");case 2:return a=t.sent,r=a.filter((function(e){return"nodeImage.image"===e.column})),t.abrupt("return",1==r.length?r[0].value:"");case 5:case"end":return t.stop()}}),t)})))()},setDefault:function(e){var t=this;this.$ajax.postJSON("/k8s/api/save_tfc_item",{column:"nodeImage.image",value:e.Image}).then((function(e){t.getTafNodeList(),t.$message.success("".concat(t.$t("common.success")))})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},addNodeImage:function(){this.nodeImageModal.show=!0,this.nodeImageModal.isNew=!0},editNodeImage:function(e){this.nodeImageModal.model=Object.assign({},e),this.nodeImageModal.show=!0,this.nodeImageModal.isNew=!1},saveNodeModal:function(){var e=this;this.$refs.nodeForm.validate((function(t){if(!t)return!1;e.$ajax.postJSON("/k8s/api/image_node_update",e.nodeImageModal.model).then((function(t){e.closeNodeModal(),e.getTafNodeList(),e.$message.success("".concat(e.$t("common.success")))})).catch((function(t){e.$message.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}))},deleteNodeImage:function(e){var t=this;if(e.isDefault)this.$message.warning("".concat(this.$t("imageService.node.deleteTip")));else{var a=Object.assign({},e);this.$ajax.postJSON("/k8s/api/image_node_delete",a).then((function(e){t.getTafNodeList(),t.$message.success("".concat(t.$t("common.success")))})).catch((function(e){t.$message.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}},closeNodeModal:function(){this.nodeImageModal.show=!1,this.nodeImageModal.model={},this.$refs.nodeForm.resetFields()}}}),va=ha,ga=(a("c914"),a("c3f0"),Object(w["a"])(va,ma,fa,!1,null,"4ad5a006",null)),ba=ga.exports,$a=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_base_affinity"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("filter.title.node")}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue")},model:{value:e.query.NodeName,callback:function(t){e.$set(e.query,"NodeName",t)},expression:"query.NodeName"}},e._l(e.NodeList,(function(t){return a("let-option",{key:t.NodeName,attrs:{value:t.NodeName}},[e._v(e._s(t.NodeNameShow))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("filter.title.app")}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue")},on:{change:e.changeApp},model:{value:e.query.ServerApp,callback:function(t){e.$set(e.query,"ServerApp",t)},expression:"query.ServerApp"}},e._l(e.AppList,(function(t){return a("let-option",{key:t.ServerApp,attrs:{value:t.ServerApp}},[e._v(e._s(t.AppNameShow))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("filter.title.serverName")}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue")},model:{value:e.query.ServerName,callback:function(t){e.$set(e.query,"ServerName",t)},expression:"query.ServerName"}},e._l(e.ServerNameList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))]),e._v(" "),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("filter.btn.addAffinity")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("filter.title.app")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"table_con"},[a("let-tag",{attrs:{theme:"success",checked:""}},[e._v(e._s(e._f("showTag")(t.row)))])],1)]}}])}),a("let-table-column",{attrs:{title:e.$t("filter.title.node")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"table_con"},e._l(t.row.NodeName,(function(t){return a("let-tag",{key:t,attrs:{value:t,theme:"success",checked:""}},[e._v(e._s(t)+" ")])})),1)]}}])}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"150px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),t.row.del?a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete"))+" ")]):e._e()]}}])})],1),a("let-modal",{attrs:{title:this.$t("filter.title.node"),width:"800px"},on:{"on-confirm":e.addServerItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:e.$t("filter.title.app"),required:""}},[e.detailModal.isNew?a("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue"),required:""},on:{change:e.changeApp},model:{value:e.detailModal.model.ServerApp,callback:function(t){e.$set(e.detailModal.model,"ServerApp",t)},expression:"detailModal.model.ServerApp"}},e._l(e.AppList,(function(t){return a("let-option",{key:t.ServerApp,attrs:{value:t.ServerApp}},[e._v(e._s(t.ServerApp))])})),1):e._e(),e.detailModal.isNew?e._e():a("let-input",{attrs:{size:"small",disabled:""},model:{value:e.detailModal.model.ServerApp,callback:function(t){e.$set(e.detailModal.model,"ServerApp",t)},expression:"detailModal.model.ServerApp"}})],1),a("let-form-item",{attrs:{label:e.$t("filter.title.serverName")}},[e.detailModal.isNew?a("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue")},model:{value:e.detailModal.model.ServerName,callback:function(t){e.$set(e.detailModal.model,"ServerName",t)},expression:"detailModal.model.ServerName"}},e._l(e.detailModal.ServerNameList,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1):e._e(),e.detailModal.isNew?e._e():a("let-input",{attrs:{size:"small",disabled:""},model:{value:e.detailModal.model.ServerName,callback:function(t){e.$set(e.detailModal.model,"ServerName",t)},expression:"detailModal.model.ServerName"}})],1),a("let-form-item",{attrs:{label:e.$t("filter.title.node")}},[a("let-checkbox",{attrs:{value:e.isCheckedAll},model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}},[e._v(e._s(e.$t("cache.config.allSelected")))]),a("div",{staticClass:"checkbox_list"},e._l(e.NodeList,(function(t){return a("let-checkbox",{key:t.NodeName,staticClass:"checkbox_item",staticStyle:{"margin-right":"15px"},attrs:{value:e.detailModal.model.checkBoxAddList.indexOf(t.NodeName)>-1},on:{change:function(a){return e.checkedChange(t.NodeName)}}},[e._v(e._s(t.NodeName)+" ")])})),1)],1)],1):e._e()],1)],1)},ka=[],ya={name:"BaseAffinityServer",data:function(){return{isCheckedAll:!1,query:{NodeName:"",ServerApp:"",ServerName:""},totalPage:0,pageSize:20,page:1,items:[],AppList:[],NodeList:[],ServerNameList:[],viewModal:{show:!1,model:null},detailModal:{ServerNameList:[],show:!1,model:{checkBoxAddList:[],checkBoxDelList:[]},isNew:!1}}},filters:{showTag:function(e){return e.ServerName?e.ServerApp+"."+e.ServerName:e.ServerApp}},mounted:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getAppList();case 2:e.fetchData(),e.getNodeList();case 4:case"end":return t.stop()}}),t)})))()},watch:{isCheckedAll:function(){var e=this,t=this.isCheckedAll;t?this.NodeList.forEach((function(t){-1===e.detailModal.model.checkBoxAddList.indexOf(t.NodeName)&&e.detailModal.model.checkBoxAddList.push(t.NodeName),e.detailModal.model.checkBoxDelList=[]})):this.NodeList.forEach((function(t){-1===e.detailModal.model.checkBoxDelList.indexOf(t.NodeName)&&e.detailModal.model.checkBoxDelList.push(t.NodeName),e.detailModal.model.checkBoxAddList=[]}))}},methods:{checkedChange:function(e){-1===this.detailModal.model.checkBoxAddList.indexOf(e)?(this.detailModal.model.checkBoxAddList.push(e),this.detailModal.model.checkBoxDelList.splice(this.detailModal.model.checkBoxDelList.indexOf(e),1)):(this.detailModal.model.checkBoxDelList.push(e),this.detailModal.model.checkBoxAddList.splice(this.detailModal.model.checkBoxAddList.indexOf(e),1)),0===this.detailModal.model.checkBoxAddList.length&&(this.isCheckedAll=!1)},changePage:function(e){this.page=e},fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/k8s/api/affinity_list_server",this.query).then((function(a){t.hide(),e.items=a.Data,e.items.forEach((function(t){t.del=!e.AppList.find((function(e){return e.ServerApp==t.ServerApp}))}))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.changePage(1),this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={checkBoxAddList:[],checkBoxDelList:[],ServerName:"",ServerApp:""},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},editItem:function(e){this.detailModal.model=e,this.detailModal.model.checkBoxAddList=JSON.parse(JSON.stringify(e.NodeName||[])),this.detailModal.model.checkBoxDelList=[],this.detailModal.show=!0,this.detailModal.isNew=!1},addServerItem:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.$refs.detailForm.validate()){t.next=17;break}if(a=e.detailModal.model,r=e.$Loading.show(),t.prev=3,!(a.checkBoxDelList&&a.checkBoxDelList.length>0)){t.next=7;break}return t.next=7,e.$ajax.postJSON("/k8s/api/affinity_del_node",{ServerApp:a.ServerApp,NodeName:a.checkBoxDelList,Force:"true"});case 7:return t.next=9,e.$ajax.postJSON("/k8s/api/affinity_add_node",{ServerApp:a.ServerApp,ServerName:a.ServerName,NodeName:a.checkBoxAddList}).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}));case 9:t.next=17;break;case 11:t.prev=11,t.t0=t["catch"](3),r.hide(),e.closeDetailModal(),e.fetchData(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 17:case"end":return t.stop()}}),t,null,[[3,11]])})))()},removeItem:function(e){var t=this;this.$confirm(this.$t("template.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.postJSON("/k8s/api/affinity_del_node",{ServerApp:e.ServerApp,NodeName:e.NodeName,ServerName:e.ServerName,Force:"false"}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},getAppList:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$ajax.getJSON("/k8s/api/application_select",{});case 2:a=t.sent,e.AppList=[],a.Data.forEach((function(t){t.AppNameShow=t.ServerApp,e.AppList.push(t)}));case 5:case"end":return t.stop()}}),t)})))()},getServerList:function(e){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function a(){var r,o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$ajax.getJSON("/k8s/api/server_list",{ServerApp:e,isAll:!0});case 2:return r=a.sent,o=r.Data.map((function(e){return e.ServerName})),a.abrupt("return",o);case 5:case"end":return a.stop()}}),a)})))()},changeApp:function(e){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(!t.detailModal.show){a.next=7;break}return a.next=3,t.getServerList(e);case 3:t.detailModal.ServerNameList=a.sent,t.$nextTick((function(){t.detailModal.model.ServerName=""})),a.next=11;break;case 7:return t.query.ServerName="",a.next=10,t.getServerList(e);case 10:t.ServerNameList=a.sent;case 11:case"end":return a.stop()}}),a)})))()},getNodeList:function(){var e=this;this.$ajax.getJSON("/k8s/api/node_select",{}).then((function(t){e.NodeList=[],t.Data.forEach((function(t){t.NodeNameShow=t.NodeName,e.NodeList.push(t)}))}))}}},Sa=ya,_a=(a("5dd2"),Object(w["a"])(Sa,$a,ka,!1,null,null,null)),wa=_a.exports,Ma=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_base_application"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.ServerApp,callback:function(t){e.$set(e.query,"ServerApp",t)},expression:"query.ServerApp"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.business")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.BusinessName,callback:function(t){e.$set(e.query,"BusinessName",t)},expression:"query.BusinessName"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))]),e._v(" "),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("template.btn.addApplication")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"ServerApp",width:"25%"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.business"),prop:"BusinessName",width:"25%"}}),a("let-table-column",{attrs:{title:e.$t("deployService.form.appMark"),prop:"AppMark"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.createTime"),prop:"CreateTime"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.createPerson"),prop:"CreatePerson"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("div",{staticStyle:{overflow:"hidden"}},[a("let-pagination",{staticStyle:{float:"right"},attrs:{align:"right",page:e.pagination.page,total:e.pagination.total},on:{change:e.gotoPage}})],1),a("let-modal",{attrs:{title:e.$t("template.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?a("pre",[e._v(e._s(e.viewModal.model.TemplateContent))]):e._e(),a("div",{attrs:{slot:"foot"},slot:"foot"})]),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("dialog.title.add"):this.$t("dialog.title.edit"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app"),required:""}},[a("let-input",{attrs:{disabled:!e.detailModal.isNew,size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.appTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:e.detailModal.model.ServerApp,callback:function(t){e.$set(e.detailModal.model,"ServerApp",t)},expression:"detailModal.model.ServerApp"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.business")}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue")},model:{value:e.detailModal.model.BusinessName,callback:function(t){e.$set(e.detailModal.model,"BusinessName",t)},expression:"detailModal.model.BusinessName"}},e._l(e.BusinessList,(function(t){return a("let-option",{key:t.BusinessName,attrs:{value:t.BusinessName}},[e._v(e._s(t.BusinessShow))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.appMark")}},[a("let-input",{attrs:{size:"small"},model:{value:e.detailModal.model.AppMark,callback:function(t){e.$set(e.detailModal.model,"AppMark",t)},expression:"detailModal.model.AppMark"}})],1)],1):e._e()],1)],1)},xa=[],Ca={name:"BaseApplication",data:function(){return{query:{ServerApp:"",BusinessName:""},items:[],BusinessList:[],pagination:{page:1,size:10,total:1},viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1}}},mounted:function(){this.fetchData(),this.getBusinessList()},methods:{gotoPage:function(e){this.pagination.page=e,this.fetchData()},fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/k8s/api/application_select",Object.assign(this.query,{page:this.pagination.page,size:this.pagination.size})).then((function(a){t.hide(),e.items=a.Data,e.items.forEach((function(e){e.CreateTime=R()(e.CreateTime).format("YYYY-MM-DD HH:mm:ss")})),e.pagination.total=Math.ceil(a.Count.AllCount/e.pagination.size)})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.pagination.page=1,this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},editItem:function(e){this.detailModal.model=e,this.detailModal.show=!0,this.detailModal.isNew=!1},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=this.detailModal.isNew?"/k8s/api/application_create":"/k8s/api/application_update",r=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("template.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/k8s/api/application_delete",{ServerApp:e.ServerApp}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},getBusinessList:function(){var e=this;this.$ajax.getJSON("/k8s/api/business_select",{isAll:!0}).then((function(t){e.BusinessList=[{BusinessMark:"",BusinessName:"",BusinessOrder:0,BusinessShow:"",CreatePerson:"",CreateTime:new Date}].concat(t.Data)}))}}},Na=Ca,La=(a("5de2"),Object(w["a"])(Na,Ma,xa,!1,null,null,null)),Ta=La.exports,Ia=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_base_business"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("filter.title.business")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.BusinessName,callback:function(t){e.$set(e.query,"BusinessName",t)},expression:"query.BusinessName"}})],1),a("let-form-item",{attrs:{label:e.$t("filter.title.name")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.BusinessShow,callback:function(t){e.$set(e.query,"BusinessShow",t)},expression:"query.BusinessShow"}})],1),a("let-form-item",{attrs:{label:e.$t("filter.title.mark")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.BusinessMark,callback:function(t){e.$set(e.query,"BusinessMark",t)},expression:"query.BusinessMark"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))]),e._v(" "),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("filter.btn.add")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("filter.title.business"),prop:"BusinessName",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("filter.title.name"),prop:"BusinessShow",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("filter.title.mark"),prop:"BusinessMark",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("filter.title.order"),prop:"BusinessOrder"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.appListItem(t.row)}}},[e._v(e._s(e.$t("table.btn.appList")))]),a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("div",{staticStyle:{overflow:"hidden"}},[a("let-pagination",{staticStyle:{float:"right"},attrs:{align:"right",page:e.pagination.page,total:e.pagination.total},on:{change:e.gotoPage}})],1),a("let-modal",{attrs:{title:e.$t("template.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?a("pre",[e._v(e._s(e.viewModal.model.TemplateContent))]):e._e(),a("div",{attrs:{slot:"foot"},slot:"foot"})]),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("dialog.title.add"):this.$t("dialog.title.edit"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:e.$t("filter.title.business"),required:""}},[a("let-input",{attrs:{disabled:!e.detailModal.isNew,size:"small",placeholder:e.$t("deployService.form.placeholder"),required:""},model:{value:e.detailModal.model.BusinessName,callback:function(t){e.$set(e.detailModal.model,"BusinessName",t)},expression:"detailModal.model.BusinessName"}})],1),a("let-form-item",{attrs:{label:e.$t("filter.title.name"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.placeholder"),required:""},model:{value:e.detailModal.model.BusinessShow,callback:function(t){e.$set(e.detailModal.model,"BusinessShow",t)},expression:"detailModal.model.BusinessShow"}})],1),a("let-form-item",{attrs:{label:e.$t("filter.title.order"),required:""}},[a("let-input",{attrs:{size:"small",type:"number",min:0,max:100,required:""},model:{value:e.detailModal.model.BusinessOrder,callback:function(t){e.$set(e.detailModal.model,"BusinessOrder",t)},expression:"detailModal.model.BusinessOrder"}})],1),a("let-form-item",{attrs:{label:e.$t("filter.title.mark")}},[a("let-input",{attrs:{size:"small"},model:{value:e.detailModal.model.BusinessMark,callback:function(t){e.$set(e.detailModal.model,"BusinessMark",t)},expression:"detailModal.model.BusinessMark"}})],1)],1):e._e()],1),a("let-modal",{attrs:{title:e.AppModal.isNew?this.$t("dialog.title.add"):this.$t("dialog.title.edit"),width:"800px"},on:{"on-confirm":e.appListSaveItem,"on-cancel":e.closeAppModal},model:{value:e.AppModal.show,callback:function(t){e.$set(e.AppModal,"show",t)},expression:"AppModal.show"}},[e.AppModal.model?a("let-form",{ref:"AppForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:e.$t("filter.title.business"),required:""}},[a("let-input",{attrs:{disabled:!e.AppModal.isNew,size:"small",placeholder:e.$t("deployService.form.placeholder"),required:""},model:{value:e.AppModal.model.BusinessName,callback:function(t){e.$set(e.AppModal.model,"BusinessName",t)},expression:"AppModal.model.BusinessName"}})],1),a("let-form-item",{attrs:{label:e.$t("filter.title.name"),required:""}},[a("let-input",{attrs:{disabled:!e.AppModal.isNew,size:"small",placeholder:e.$t("deployService.form.placeholder"),required:""},model:{value:e.AppModal.model.BusinessShow,callback:function(t){e.$set(e.AppModal.model,"BusinessShow",t)},expression:"AppModal.model.BusinessShow"}})],1),a("let-form-item",{attrs:{label:e.$t("filter.title.app")}},[a("let-checkbox",{attrs:{value:e.isCheckedAll},model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}},[e._v("鍏ㄩ€�")]),a("div",{staticClass:"checkbox_list"},e._l(e.AppList,(function(t){return a("let-checkbox",{key:t.ServerApp,staticClass:"checkbox_item",attrs:{value:e.checkBoxAddList.indexOf(t.ServerApp)>-1},on:{change:function(a){return e.checkedChange(t.ServerApp)}}},[e._v(e._s(t.ServerApp))])})),1)],1)],1):e._e()],1)],1)},Aa=[],Da={name:"BaseBusiness",data:function(){return{isCheckedAll:!1,checkBoxAddList:[],checkBoxDelList:[],query:{BusinessName:"",BusinessShow:"",BusinessMark:""},items:[],AppList:[],pagination:{page:1,size:10,total:1},viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1},AppServerArr:[],AppServerStr:"",AppServerDeleteArr:[],AppModal:{show:!1,model:null,isNew:!1}}},mounted:function(){this.fetchData()},watch:{isCheckedAll:function(){var e=this,t=this.isCheckedAll;t?this.AppList.forEach((function(t){-1===e.checkBoxAddList.indexOf(t.ServerApp)&&e.checkBoxAddList.push(t.ServerApp),e.checkBoxDelList=[]})):this.AppList.forEach((function(t){-1===e.checkBoxDelList.indexOf(t.ServerApp)&&e.checkBoxDelList.push(t.ServerApp),e.checkBoxAddList=[]}))}},methods:{checkedChange:function(e){-1===this.checkBoxAddList.indexOf(e)?(this.checkBoxAddList.push(e),this.checkBoxDelList.splice(this.checkBoxDelList.indexOf(e),1)):(this.checkBoxDelList.push(e),this.checkBoxAddList.splice(this.checkBoxAddList.indexOf(e),1)),0===this.checkBoxAddList.length&&(this.isCheckedAll=!1)},gotoPage:function(e){this.pagination.page=e,this.fetchData()},fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/k8s/api/business_select",Object.assign(this.query,{isAll:!1,page:this.pagination.page,size:this.pagination.size})).then((function(a){t.hide(),e.items=a.Data,e.pagination.total=Math.ceil(a.Count.AllCount/e.pagination.size)})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.pagination.page=1,this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},closeAppModal:function(){this.$refs.AppForm.resetValid(),this.AppModal.show=!1,this.AppModal.model=null},addItem:function(){this.checkBoxAddList=[],this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},editItem:function(e){this.checkBoxAddList=e.AppServer||[],this.detailModal.model=e,this.detailModal.show=!0,this.detailModal.isNew=!1},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=this.detailModal.isNew?"/k8s/api/business_create":"/k8s/api/business_update",r=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("template.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/k8s/api/business_delete",{BusinessName:e.BusinessName}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},getAppList:function(){var e=this;this.$ajax.getJSON("/k8s/api/application_select",{isAll:!0}).then((function(t){e.AppList=t.Data}))},appListItem:function(e){var t=this;this.getAppList();var a=this.$refs.table.$loading.show();return this.$ajax.postJSON("/k8s/api/business_list_app",{BusinessNames:[e.BusinessName]}).then((function(e){a.hide(),t.appListEditItem(e[0])})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},appListEditItem:function(e){this.checkBoxAddList=e.App||[],this.AppModal.model=e,this.AppModal.show=!0,this.AppModal.isNew=!1},appListSaveItem:function(){var e=this;if(this.$refs.AppForm.validate()){var t=this.AppModal.model,a=(this.AppModal.isNew,"/k8s/api/business_add_app"),r=this.$Loading.show();this.checkBoxAddList&&this.checkBoxAddList.length>0?this.$ajax.postJSON(a,{BusinessName:t.BusinessName,AppNames:this.checkBoxAddList}).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.closeAppModal(),e.fetchData()})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})):(r.hide(),this.closeAppModal())}}}},Pa=Da,Oa=(a("b50eb"),Object(w["a"])(Pa,Ia,Aa,!1,null,null,null)),qa=Oa.exports,ja=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_base_node"},[e.showDetail?e._e():[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("filter.title.node")}},[a("el-input",{attrs:{size:"small"},model:{value:e.query.NodeName,callback:function(t){e.$set(e.query,"NodeName",t)},expression:"query.NodeName"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.app")}},[a("el-select",{attrs:{clearable:"",size:"small",filterable:""},on:{change:e.queryAppChange},model:{value:e.query.ServerApp,callback:function(t){e.$set(e.query,"ServerApp",t)},expression:"query.ServerApp"}},e._l(e.appList,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",size:"small"},model:{value:e.query.ServerName,callback:function(t){e.$set(e.query,"ServerName",t)},expression:"query.ServerName"}},e._l(e.serList,(function(e){return a("el-option",{key:e,attrs:{label:e,filterable:"",value:e}})})),1)],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("filter.btn.searchAffinity")))])],1),a("let-form-item",{attrs:{itemWidth:"600px"}},[a("el-tag",{staticStyle:{"margin-right":"10px"},attrs:{effect:"plain"}},[e._v(" "+e._s(e.$t("filter.title.CommonTag"))+" ")]),a("el-tag",{staticStyle:{"margin-right":"10px"},attrs:{effect:"plain",type:"warning"}},[e._v(" "+e._s(e.$t("filter.title.FrameWorkTag"))+" ")])],1),a("div",{staticStyle:{float:"right","margin-top":"30px"}},[a("let-button",{staticStyle:{"margin-right":"10px"},attrs:{size:"small",type:"submit",theme:"primary",disabled:!e.batchEnabled},on:{click:e.batchEditCommon}},[e._v(" "+e._s(e.$t("filter.btn.editTag"))+" ")]),a("let-button",{attrs:{size:"small",type:"submit",theme:"primary",disabled:!e.batchEnabled},on:{click:e.batchEditAffinity}},[e._v(" "+e._s(e.$t("filter.btn.editAffinity"))+" ")])],1)],1),a("br"),a("el-table",{ref:"table",attrs:{data:e.items,width:"100%",border:"",stripe:"","highlight-current-row":""},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:e.$t("filter.title.nodeName"),prop:"NodeName",width:"150"}}),a("el-table-column",{attrs:{label:e.$t("common.status"),width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return["Active"==t.row.status?a("el-tag",{attrs:{size:"small",effect:"plain",type:"success"}},[e._v(" "+e._s(t.row.status)+" ")]):e._e(),"Unavailable"==t.row.status?a("el-tag",{attrs:{size:"small",effect:"plain",type:"danger"}},[e._v(" "+e._s(t.row.status)+" ")]):e._e()]}}],null,!1,3672167682)}),a("el-table-column",{attrs:{label:"Version",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.NodInfo.kubeletVersion)+" ")]}}],null,!1,2972685414)}),a("el-table-column",{attrs:{label:e.$t("filter.title.nodeFramework"),width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-switch",{on:{change:function(a){return e.changeStatus(t.row)}},model:{value:t.row.NodePublic,callback:function(a){e.$set(t.row,"NodePublic",a)},expression:"scope.row.NodePublic"}},[a("span",{attrs:{slot:"open"},slot:"open"},[e._v("寮€")]),a("span",{attrs:{slot:"close"},slot:"close"},[e._v("鍏�")])])]}}],null,!1,1705370074)}),a("el-table-column",{attrs:{label:e.$t("filter.title.nodeLabels")},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.commonLabels,(function(t,r){return a("el-tag",{key:r,staticStyle:{margin:"2px 2px"},attrs:{effect:"plain",type:e._f("tagType")(r)}},[e._v(" "+e._s(r+":"+t)+" ")])}))}}],null,!1,2926056322)}),a("el-table-column",{attrs:{label:e.$t("filter.title.AbilityTag"),width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.NodeAbility,(function(t){return a("el-tag",{key:t,staticStyle:{margin:"2px 2px"},attrs:{effect:"plain",type:e._f("abilityType")(t)}},[e._v(" "+e._s(t)+" ")])}))}}],null,!1,3467388542)}),a("el-table-column",{attrs:{label:e.$t("filter.title.nodeAddress"),width:"210"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.NodeAddress,(function(t){return a("div",{key:t.NodeName,staticStyle:{margin:"2px 2px"}},[a("el-tag",{attrs:{effect:"plain",type:"info"}},[e._v(e._s(t.type+":"+t.address)+" ")])],1)}))}}],null,!1,402632902)}),a("el-table-column",{attrs:{label:e.$t("operate.operates"),width:"150px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.viewItem(t.row)}}},[e._v(" "+e._s(e.$t("operate.view"))+" ")]),a("br"),a("let-table-operation",{on:{click:function(a){return e.editCommonTag(t.row)}}},[e._v(" "+e._s(e.$t("filter.btn.editTag"))+" ")]),a("br"),a("let-table-operation",{on:{click:function(a){return e.editAbilityTag(t.row)}}},[e._v(" "+e._s(e.$t("filter.btn.editAffinity"))+" ")])]}}],null,!1,1007266554)})],1),a("br"),a("let-pagination",{staticStyle:{float:"right"},attrs:{align:"right",page:e.pagination.page,total:e.pagination.total},on:{change:e.gotoPage}}),a("el-dialog",{attrs:{title:e.$t("filter.dialog.editCommonTag"),visible:e.commonTagDialog.show,width:"40%","before-close":e.closeCommonTagDialog,"close-on-click-modal":!1},on:{"update:visible":function(t){return e.$set(e.commonTagDialog,"show",t)}}},[a("el-form",{ref:"commonForm",attrs:{model:e.commonTagDialog.model,"inline-message":""}},[a("el-table",{attrs:{data:e.commonTagDialog.model.commonArr,border:""}},[a("template",{slot:"empty"},[a("let-table-operation",{on:{click:function(t){return e.addCommonTag(0,e.commonTagDialog.model.commonArr)}}},[e._v(" "+e._s(e.$t("deployService.form.labelMatch.addLabel"))+" ")])],1),a("el-table-column",{attrs:{label:e.$t("filter.title.tagName")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form-item",{attrs:{prop:"commonArr."+t.$index+".name",rules:[{validator:function(a,r,o){e.validateTagName(a,r,o,t.row.name)},trigger:"blur"}]}},[a("el-input",{model:{value:t.row.name,callback:function(a){e.$set(t.row,"name",a)},expression:"scope.row.name"}})],1)]}}],null,!1,1739047982)}),a("el-table-column",{attrs:{label:e.$t("filter.title.tagName")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{model:{value:t.row.value,callback:function(a){e.$set(t.row,"value",a)},expression:"scope.row.value"}})]}}],null,!1,4065949250)}),a("el-table-column",{attrs:{label:e.$t("operate.operates"),width:"120px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.addCommonTag(t.$index,e.commonTagDialog.model.commonArr)}}},[e._v(" "+e._s(e.$t("operate.add"))+" ")]),a("let-table-operation",{on:{click:function(a){return e.delCommonTag(t.$index,e.commonTagDialog.model.commonArr)}}},[e._v(" "+e._s(e.$t("operate.delete"))+" ")])]}}],null,!1,2871227552)})],2)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.closeCommonTagDialog}},[e._v(e._s(e.$t("common.cancel")))]),a("el-button",{attrs:{type:"primary"},on:{click:e.saveCommonTag}},[e._v(e._s(e.$t("common.submit")))])],1)],1),a("el-dialog",{attrs:{title:e.$t("filter.dialog.editAbilityTag"),visible:e.abilityTagDialog.show,width:"40%","before-close":e.closeAbilityTagDialog,"close-on-click-modal":!1},on:{"update:visible":function(t){return e.$set(e.abilityTagDialog,"show",t)}}},[a("el-form",{ref:"abilityForm",attrs:{model:e.abilityTagDialog.model,"inline-message":""}},[a("el-table",{attrs:{data:e.abilityTagDialog.model.abilityArr,border:""}},[a("template",{slot:"empty"},[a("let-table-operation",{on:{click:function(t){return e.addAbilityTag(0,e.abilityTagDialog.model.abilityArr)}}},[e._v(" "+e._s(e.$t("filter.tip.addAffinityGroup"))+" ")])],1),a("el-table-column",{attrs:{label:e.$t("filter.title.app")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form-item",{attrs:{prop:"abilityArr."+t.$index+".application",rules:[{validator:function(a,r,o){e.validateAppName(a,r,o,t.row.application)},trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("pub.dlg.defaultValue"),filterable:""},on:{change:function(a){return e.changeApp(t.$index,t.row.application)}},model:{value:t.row.application,callback:function(a){e.$set(t.row,"application",a)},expression:"scope.row.application"}},e._l(e.appList,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)]}}],null,!1,3541109157)}),a("el-table-column",{attrs:{label:e.$t("filter.title.serverName")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("pub.dlg.defaultValue"),clearable:"",filterable:""},model:{value:t.row.serverName,callback:function(a){e.$set(t.row,"serverName",a)},expression:"scope.row.serverName"}},e._l(t.row.serverNames,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)]}}],null,!1,695734775)}),a("el-table-column",{attrs:{label:e.$t("operate.operates"),width:"120px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.addAbilityTag(t.$index,e.abilityTagDialog.model.abilityArr)}}},[e._v(" "+e._s(e.$t("operate.add"))+" ")]),a("let-table-operation",{on:{click:function(a){return e.delAbilityTag(t.$index,e.abilityTagDialog.model.abilityArr)}}},[e._v(" "+e._s(e.$t("operate.delete"))+" ")])]}}],null,!1,2609683168)})],2)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.closeAbilityTagDialog}},[e._v(e._s(e.$t("common.cancel")))]),a("el-button",{attrs:{type:"primary"},on:{click:e.saveAbilityTag}},[e._v(e._s(e.$t("common.submit")))])],1)],1)],e.showDetail?a("node-detail",{attrs:{nodeDetail:e.nodeDetail},on:{closeDetail:e.closeDetail}}):e._e()],2)},za=[],Va=(a("2ca0"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",[a("span",{staticClass:"title"},[e._v(e._s(e.nodeDetail.NodeName))]),a("span",{staticStyle:{"margin-left":"10px"}},["Active"==e.nodeDetail.status?a("el-tag",{attrs:{effect:"plain",type:"success"}},[e._v(" "+e._s(e.nodeDetail.status)+" ")]):e._e(),"Unavailable"==e.nodeDetail.status?a("el-tag",{attrs:{effect:"plain",type:"danger"}},[e._v(" "+e._s(e.nodeDetail.status)+" ")]):e._e()],1),a("span",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-back",size:"small"},on:{click:e.closeDetail}})],1)]),a("div",{staticStyle:{"margin-top":"10px"}},[a("span",[e._v("Age:"+e._s(e.getAge(e.nodeDetail.CreationTimestamp)))])]),a("el-divider"),a("div",[e._l(e.nodeDetail.NodeAddress,(function(t){return a("span",{staticClass:"item"},[e._v(e._s(t.type+":"+t.address))])})),a("span",{staticClass:"item"},[e._v("Version:"+e._s(e.nodeDetail.NodInfo.kernelVersion))]),a("span",{staticClass:"item"},[e._v("OS:"+e._s(e.nodeDetail.NodInfo.osImage))]),a("span",{staticClass:"item"},[e._v("containerRuntimeVersion:"+e._s(e.nodeDetail.NodInfo.containerRuntimeVersion))])],2),a("div",{staticStyle:{"margin-top":"10px"}},[e._v(" Labels: "),e._l(e.nodeDetail.Labels,(function(t,r){return a("el-tag",{key:r,staticStyle:{margin:"2px 2px"},attrs:{effect:"plain",type:e._f("tagType")(r)}},[e._v(" "+e._s(r+":"+t)+" ")])}))],2),a("el-divider"),a("div",{staticStyle:{"margin-top":"10px"}},[e._v(" Conditions: "),e._l(e.nodeDetail.Conditions,(function(t){return a("el-tooltip",{key:t.type,attrs:{placement:"top"}},[a("div",{attrs:{slot:"content"},slot:"content"},e._l(t,(function(t,r){return a("p",{key:r,staticStyle:{margin:"4px 0","font-size":"12px"}},[e._v(" "+e._s(r+":"+t)+" ")])})),0),a("el-tag",{staticStyle:{margin:"2px 15px"},attrs:{effect:"dark",type:e._f("conditionsStatus")(t)}},[e._v(" "+e._s(t.type)+" ")])],1)})),a("el-row",{staticStyle:{"margin-top":"20px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-card",{attrs:{shadow:"never"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",{staticStyle:{"font-weight":"bold"}},[e._v("CPU")]),a("span",{staticStyle:{float:"right"}},[e._v("0 of 4")])]),a("el-progress",{attrs:{"text-inside":!0,"stroke-width":20,percentage:1}})],1)],1),a("el-col",{attrs:{span:8}},[a("el-card",{attrs:{shadow:"never"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",{staticStyle:{"font-weight":"bold"}},[e._v("MEMORY")]),a("span",{staticStyle:{float:"right"}},[e._v("0 of 7.78 GiB ")])]),a("el-progress",{attrs:{"text-inside":!0,"stroke-width":20,percentage:1}})],1)],1),a("el-col",{attrs:{span:8}},[a("el-card",{attrs:{shadow:"never"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",{staticStyle:{"font-weight":"bold"}},[e._v("PODS")]),a("span",{staticStyle:{float:"right"}},[e._v("8 of 110")])]),a("el-progress",{attrs:{"text-inside":!0,"stroke-width":20,percentage:7.3}})],1)],1)],1)],2),a("el-divider"),a("el-tabs",{attrs:{type:"border-card"}},[a("el-tab-pane",{attrs:{label:"Info"}},[a("el-form",{attrs:{"label-width":"300px","label-position":"left"}},e._l(e.nodeDetail.NodInfo,(function(t,r){return a("div",{key:r},[a("el-form-item",{attrs:{label:r}},[e._v(" "+e._s(t)+" ")])],1)})),0)],1),a("el-tab-pane",{attrs:{label:"Images"}},[a("el-table",{ref:"table",attrs:{data:e.nodeDetail.Images,border:"",stripe:"","highlight-current-row":"",height:"400px"}},[a("el-table-column",{attrs:{label:"names"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.names,(function(t){return a("p",{key:t},[e._v(" "+e._s(t)+" ")])}))}}])}),a("el-table-column",{attrs:{label:"size",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(Math.ceil(t.row.sizeBytes/1024/1024)+"M")+" ")]}}])})],1)],1),a("el-tab-pane",{attrs:{label:"Taints"}},[a("el-table",{ref:"table",attrs:{data:e.nodeDetail.Taints,border:"",stripe:"","highlight-current-row":"",height:"400px"}},[a("el-table-column",{attrs:{label:"effect",prop:"effect",width:"300"}}),a("el-table-column",{attrs:{label:"key",prop:"key"}})],1)],1),a("el-tab-pane",{attrs:{label:"Conditions"}},[a("el-table",{ref:"table",attrs:{data:e.nodeDetail.Conditions,border:"",stripe:"","highlight-current-row":"",height:"400px"}},[a("el-table-column",{attrs:{label:"type",prop:"type",width:"150"}}),a("el-table-column",{attrs:{label:"status",prop:"status",width:"80"}}),a("el-table-column",{attrs:{label:"message",prop:"message"}}),a("el-table-column",{attrs:{label:"reason",prop:"reason"}}),a("el-table-column",{attrs:{label:"lastTransitionTime",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("timeFormat")(t.row.lastTransitionTime)))]}}])}),a("el-table-column",{attrs:{label:"lastHeartbeatTime",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("timeFormat")(t.row.lastHeartbeatTime)))]}}])})],1)],1)],1)],1)}),Ea=[],Ra={name:"node-detail",props:["nodeDetail"],filters:{tagType:function(e){return e.startsWith("tars.io/node")?"warning":e.startsWith("tars.io/ability")?"success":""},conditionsStatus:function(e){return"False"==e.status?"danger":"success"},timeFormat:function(e){return R()(e).format("YYYY-MM-DD HH:mm:ss")}},methods:{closeDetail:function(){this.$emit("closeDetail")},getAge:function(e){var t=Math.ceil((new Date-new Date(e))/36e5),a=0,r=0;return t>=24&&(a=Math.ceil(t/24),r=t%24),"".concat(a,"d").concat(r>0?r+"h":"")}}},Ba=Ra,Ha=(a("f333"),Object(w["a"])(Ba,Va,Ea,!1,null,"38a1db4e",null)),Fa=Ha.exports,Ja={name:"BaseBusiness",components:{nodeDetail:Fa},data:function(){return{multipleSelection:[],query:{NodeName:""},items:[],pagination:{page:1,size:10,total:1},commonTagDialog:{flag:"one",show:!1,model:{}},abilityTagDialog:{flag:"one",show:!1,model:{}},appList:[],serList:[],showDetail:!1,nodeDetail:{}}},filters:{tagType:function(e){return e.startsWith("taf.io/node")?"warning":""},abilityType:function(e){return-1!=e.indexOf(".")?"success":""}},computed:{batchEnabled:function(){return this.multipleSelection.length>0}},mounted:function(){this.fetchData(),this.getAppList()},methods:{handleSelectionChange:function(e){this.multipleSelection=e},gotoPage:function(e){this.pagination.page=e,this.getServerList()},fetchData:function(){var e=this;return this.$ajax.getJSON("/k8s/api/node_select",Object.assign(this.query,{page:this.pagination.page,size:this.pagination.size})).then((function(t){t.Data.forEach((function(e){var t="";e.Conditions.forEach((function(e){"Ready"==e.Type&&(t=e.status)})),e.status="False"==t?"Unavailable":"Active"})),e.items=t.Data,e.pagination.total=Math.ceil(t.Count.AllCount/e.pagination.size)})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},search:function(){this.pagination.page=1,this.fetchData()},editCommonTag:function(e){for(var t in this.commonTagDialog.show=!0,this.commonTagDialog.flag="one",this.commonTagDialog.model=Ot.a.cloneDeep(e),this.commonTagDialog.model.commonArr=[],e.Labels)t.startsWith("taf.io/node")||t.startsWith("taf.io/ability")||this.commonTagDialog.model.commonArr.push({name:t,value:e.Labels[t]})},batchEditCommon:function(){1==this.multipleSelection.length?this.editCommonTag(this.multipleSelection[0]):(this.commonTagDialog.show=!0,this.commonTagDialog.flag="batch",this.commonTagDialog.model.nodes=this.multipleSelection,this.commonTagDialog.model.commonArr=[{name:"",value:""}])},saveCommonTag:function(){var e=this;if(this.validate(this.$refs.commonForm)){var t=[];this.commonTagDialog.model.nodes&&(t=this.commonTagDialog.model.nodes.map((function(e){return e.NodeName})));var a="",r={};"one"==this.commonTagDialog.flag?(a="/k8s/api/edit_common_tag",r={nodeName:this.commonTagDialog.model.NodeName,tags:this.commonTagDialog.model.commonArr}):(a="/k8s/api/batch_edit_common_tag",r={nodeNames:t,tags:this.commonTagDialog.model.commonArr}),this.$ajax.postJSON(a,r).then((function(){e.$message.success("".concat(e.$t("common.success"))),e.closeCommonTagDialog(),e.fetchData()})).catch((function(t){e.$message.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},closeCommonTagDialog:function(){this.commonTagDialog={flag:"one",show:!1,model:{}}},editAbilityTag:function(e){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function a(){var r,o,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:t.abilityTagDialog.show=!0,t.abilityTagDialog.flag="one",t.abilityTagDialog.model=Ot.a.cloneDeep(e),t.abilityTagDialog.model.abilityArr=[],r=Object(Y["a"])(e.NodeAbility),a.prev=5,r.s();case 7:if((o=r.n()).done){a.next=19;break}return i=o.value,a.t0=t.abilityTagDialog.model.abilityArr,a.t1=i.split(".")[0],a.t2=i.split(".")[1]||"",a.next=14,t.getServerList(i.split(".")[0]);case 14:a.t3=a.sent,a.t4={application:a.t1,serverName:a.t2,serverNames:a.t3},a.t0.push.call(a.t0,a.t4);case 17:a.next=7;break;case 19:a.next=24;break;case 21:a.prev=21,a.t5=a["catch"](5),r.e(a.t5);case 24:return a.prev=24,r.f(),a.finish(24);case 27:case"end":return a.stop()}}),a,null,[[5,21,24,27]])})))()},batchEditAffinity:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(1!=e.multipleSelection.length){t.next=5;break}return t.next=3,e.editCommonTag(e.multipleSelection[0]);case 3:t.next=9;break;case 5:e.abilityTagDialog.show=!0,e.abilityTagDialog.flag="batch",e.abilityTagDialog.model.nodes=e.multipleSelection,e.abilityTagDialog.model.abilityArr=[{application:"",serverName:"",serverNames:""}];case 9:case"end":return t.stop()}}),t)})))()},saveAbilityTag:function(){var e=this;if(this.validate(this.$refs.abilityForm)){var t=[];this.abilityTagDialog.model.nodes&&(t=this.abilityTagDialog.model.nodes.map((function(e){return e.NodeName})));var a=this.abilityTagDialog.model.abilityArr.map((function(e){return{application:e.application,serverName:e.serverName}})),r="",o={};"one"==this.abilityTagDialog.flag?(r="/k8s/api/edit_ability_tag",o={nodeName:this.abilityTagDialog.model.NodeName,tags:a}):(r="/k8s/api/batch_edit_ability_tag",o={nodeNames:t,tags:a}),this.$ajax.postJSON(r,o).then((function(){e.$message.success("".concat(e.$t("common.success"))),e.closeAbilityTagDialog(),e.fetchData()})).catch((function(t){e.$message.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},closeAbilityTagDialog:function(){this.abilityTagDialog={flag:"one",show:!1,model:{}}},validate:function(e){var t=!0;return e.validate((function(e){e||(t=!1)})),t},viewItem:function(e){this.showDetail=!0,this.nodeDetail=Ot.a.cloneDeep(e)},closeDetail:function(){this.showDetail=!1,this.fetchData()},changeStatus:function(e){if(e.NodePublic){if(e.Labels.hasOwnProperty("node-role.kubernetes.io/master"))return void this.fetchData();this.addTafTag(e.NodeName)}else this.delTafTag(e.NodeName)},addTafTag:function(e){var t=this;this.$ajax.postJSON("/k8s/api/taf_ability_open",{NodeName:e}).then((function(){t.$tip.success(t.$t("common.success")),t.fetchData()})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},delTafTag:function(e){var t=this;this.$ajax.postJSON("/k8s/api/taf_ability_close",{NodeName:e}).then((function(){t.$tip.success(t.$t("common.success")),t.fetchData()})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getAppList:function(){var e=this;this.$ajax.getJSON("/k8s/api/application_select",{}).then((function(t){e.appList=t.Data.map((function(e){return e.ServerApp}))})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getServerList:function(e){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function a(){var r,o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$ajax.getJSON("/k8s/api/server_list",{ServerApp:e,isAll:!0});case 2:return r=a.sent,o=r.Data.map((function(e){return e.ServerName})),a.abrupt("return",o);case 5:case"end":return a.stop()}}),a)})))()},changeApp:function(e,t){var a=this;return Object(j["a"])(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,a.getServerList(t);case 2:o=r.sent,a.$set(a.abilityTagDialog.model.abilityArr[e],"serverNames",o);case 4:case"end":return r.stop()}}),r)})))()},queryAppChange:function(){var e=this;return Object(j["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getServerList(e.query.ServerApp);case 2:a=t.sent,e.$set(e.query,"ServerName",""),e.serList=a;case 5:case"end":return t.stop()}}),t)})))()},addCommonTag:function(e,t){t.splice(e+1,0,{name:"",value:""}),this.$forceUpdate()},delCommonTag:function(e,t){t.splice(e,1),this.$forceUpdate()},addAbilityTag:function(e,t){t.splice(e+1,0,{application:"",serverName:"",serverNames:[]}),this.$forceUpdate()},delAbilityTag:function(e,t){t.splice(e,1),this.$forceUpdate()},validateTagName:function(e,t,a,r){""===r?a(new Error("".concat(this.$t("filter.tip.notNull")))):r.toLowerCase().startsWith("taf.io")?a(new Error("".concat(this.$t("filter.tip.notTaf")))):a()},validateAppName:function(e,t,a,r){""===r?a(new Error("".concat(this.$t("filter.tip.application")))):a()}}},Ya=Ja,Ka=(a("e81f"),a("cdeb"),Object(w["a"])(Ya,ja,za,!1,null,"78a7d013",null)),Ua=Ka.exports,Wa=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("let-form",{attrs:{inline:"",itemWidth:"180px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{staticStyle:{width:"400px"},attrs:{label:e.$t("callChain.date")}},[a("el-date-picker",{attrs:{size:"small",type:"datetimerange","range-separator":"~","start-placeholder":e.$t("board.alarm.form.startDate"),"end-placeholder":e.$t("board.alarm.form.endDate"),"value-format":"timestamp"},model:{value:e.eventDate,callback:function(t){e.eventDate=t},expression:"eventDate"}})],1),a("let-form-item",{attrs:{label:e.$t("filter.title.app")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("pub.dlg.defaultValue"),size:"small",disabled:!e.serverEnable,clearable:""},on:{change:function(t){return e.getServerList(e.query.application)}},model:{value:e.query.application,callback:function(t){e.$set(e.query,"application",t)},expression:"query.application"}},e._l(e.appList,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("let-form-item",{attrs:{label:e.$t("filter.title.serverName")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("pub.dlg.defaultValue"),clearable:"",disabled:!e.serverEnable,size:"small"},on:{change:e.getPods},model:{value:e.query.serverName,callback:function(t){e.$set(e.query,"serverName",t)},expression:"query.serverName"}},e._l(e.serverNames,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.podName")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("pub.dlg.defaultValue"),clearable:"",disabled:!e.serverEnable,size:"small"},on:{change:e.search},model:{value:e.query.pod,callback:function(t){e.$set(e.query,"pod",t)},expression:"query.pod"}},e._l(e.pods,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("let-form-item",{attrs:{label:e.$t("event.eventLevel")}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("pub.dlg.defaultValue"),clearable:"",size:"small"},on:{change:e.search},model:{value:e.query.level,callback:function(t){e.$set(e.query,"level",t)},expression:"query.level"}},e._l(e.levels,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("let-form-item",{staticStyle:{width:"240px"}},[a("el-radio-group",{attrs:{size:"small"},on:{change:e.checkedChange},model:{value:e.query.check,callback:function(t){e.$set(e.query,"check",t)},expression:"query.check"}},[a("el-radio-button",{attrs:{label:"Server"}},[e._v(e._s(e.$t("event.type.server")))]),a("el-radio-button",{attrs:{label:"Cluster"}},[e._v(e._s(e.$t("event.type.cluster")))]),a("el-radio-button",{attrs:{label:"Downtime"}},[e._v(e._s(e.$t("event.type.downtime")))])],1)],1),a("let-form-item",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("operate.search")))])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"table",attrs:{data:e.events,border:"",stripe:"","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"kind",width:"200","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.involvedObject.kind||""))]}}])}),a("el-table-column",{attrs:{label:"namespace",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.involvedObject.namespace||""))]}}])}),a("el-table-column",{attrs:{label:"name",width:"200","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.involvedObject.name||""))]}}])}),a("el-table-column",{attrs:{label:"type",prop:"type",width:"150"}}),a("el-table-column",{attrs:{label:"reason",prop:"reason",width:"200"}}),a("el-table-column",{attrs:{label:"message",prop:"message","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"firstTime",width:"180","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("timeFormat")(t.row.firstTimestamp)))]}}])}),a("el-table-column",{attrs:{label:"lastTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("timeFormat")(t.row.lastTimestamp)))]}}])})],1),a("br"),a("let-pagination",{staticStyle:{float:"right"},attrs:{align:"right",page:e.pagination.page,total:e.pagination.total},on:{change:e.handleCurrentChange}})],1)},Za=[],Ga=(a("841c"),{name:"event",data:function(){return{query:{application:"",serverName:"",check:"Server"},eventDate:[new Date((new Date).getTime()-72e5).getTime(),(new Date).getTime()],appList:[],serverNames:[],pods:[],levels:["Normal","Warning"],loading:!1,pagination:{page:1,size:20,total:1},events:[]}},filters:{timeFormat:function(e){return R()(e).format("YYYY-MM-DD HH:mm:ss")}},watch:{$route:function(e,t){this.$set(this.query,"application",this.$route.query.application||""),this.$set(this.query,"serverName",this.$route.query.serverName||""),this.search()}},mounted:function(){this.$set(this.query,"application",this.$route.query.application||""),this.$set(this.query,"serverName",this.$route.query.serverName||""),this.getAppList(),this.search()},computed:{serverEnable:function(){return"Server"==this.query.check}},methods:{checkedChange:function(){this.pagination.page=1,this.loadData(1)},handleCurrentChange:function(e){this.loadData(e)},search:function(){this.loadData(1)},loadData:function(e){var t=this;e||(e=1);var a="",r="";this.eventDate&&(a=this.eventDate[0],r=this.eventDate[1]);var o=Object.assign({},this.query,{currPage:e,pageSize:this.pagination.size},{startDate:a,endDate:r});this.loading=!0,this.$ajax.getJSON("/k8s/api/get_events",o).then((function(e){t.events=e.rows,t.pagination.total=e.total,t.loading=!1})).catch((function(e){t.loading=!1,t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getAppList:function(){var e=this;this.$ajax.getJSON("/k8s/api/application_select",{}).then((function(t){e.appList=t.Data.map((function(e){return e.ServerApp}))})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getServerList:function(e){var t=this;return Object(j["a"])(regeneratorRuntime.mark((function a(){var r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return t.$set(t.query,"serverName",""),a.next=3,t.$ajax.getJSON("/k8s/api/server_list",{ServerApp:e,isAll:!0});case 3:r=a.sent,t.serverNames=r.Data.map((function(e){return e.ServerName})),t.search();case 6:case"end":return a.stop()}}),a)})))()},getPods:function(){var e=this;this.$set(this.query,"pod","");var t="",a="";this.eventDate&&(t=this.eventDate[0],a=this.eventDate[1]);var r=Object.assign({},this.query,{startDate:t,endDate:a});this.$ajax.getJSON("/k8s/api/get_pods",r).then((function(t){e.pods=t,e.search()})).catch((function(t){e.$set(e,"pods","")})),this.search()}}}),Qa=Ga,Xa=Object(w["a"])(Qa,Wa,Za,!1,null,"5419c7a2",null),er=Xa.exports,tr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_framework_config"},[[a("el-button",{staticStyle:{width:"100px",margin:"10px 0 5px 0",float:"right"},attrs:{size:"mini",type:"primary"},on:{click:e.showYaml}},[e._v(e._s(e.$t("operate.yaml"))+" ")]),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.config,stripe:"",border:""}},[a("el-table-column",{attrs:{prop:"column",label:"key",width:"300"}}),a("el-table-column",{attrs:{prop:"remark",label:"remark",width:"300"}}),a("el-table-column",{attrs:{label:"value"},scopedSlots:e._u([{key:"default",fn:function(t){return["nodeImage.image"==t.row.column?a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small"},model:{value:t.row.value,callback:function(a){e.$set(t.row,"value",a)},expression:"scope.row.value"}},e._l(e.nodeList,(function(t){return a("el-option",{key:t.Image,attrs:{value:t.Image}},[a("span",[e._v(e._s(t.Image))])])})),1):a("el-input",{attrs:{type:"textarea",autosize:{minRows:1,maxRows:8},placeholder:"璇疯緭鍏ュ唴瀹�"},model:{value:t.row.value,callback:function(a){e.$set(t.row,"value",a)},expression:"scope.row.value"}})]}}])}),a("el-table-column",{attrs:{label:e.$t("operate.operates"),width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.saveTfcItem(t.row)}}},[e._v(" "+e._s(e.$t("operate.save"))+" ")])]}}])})],1),a("el-dialog",{attrs:{title:"Framework config",width:"50%",top:"50px",visible:e.showDialog,"before-close":e.closeDialog,"close-on-click-modal":!1},on:{"update:visible":function(t){e.showDialog=t}}},[a("k8s-yaml-edit",{ref:"yamlEdit",on:{successFun:e.closeDialog}})],1)]],2)},ar=[],rr={name:"frameworkConfig",data:function(){return{showDialog:!1,config:[],nodeList:[]}},components:{K8sYamlEdit:Pe},mounted:function(){this.getTfc(),this.getTafNodeList()},methods:{getTfc:function(){var e=this;this.$ajax.getJSON("/k8s/api/get_tfc").then((function(t){e.config=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getTafNodeList:function(){var e=this;this.$ajax.getJSON("/k8s/api/image_node_select").then((function(t){e.nodeList=t.Data}))},saveTfcItem:function(e){var t=this;this.$ajax.postJSON("/k8s/api/save_tfc_item",e).then((function(e){t.$message.success("".concat(t.$t("common.success")))})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},showYaml:function(){var e=this;this.showDialog=!0,this.$nextTick((function(){e.$refs.yamlEdit.show("111","tframeworkconfigs"),e.$refs.yamlEdit.refresh()}))},closeDialog:function(){this.showDialog=!1,this.getTfc()}}},or=rr,ir=(a("2562"),Object(w["a"])(or,tr,ar,!1,null,"3e5fdd24",null)),sr=ir.exports,lr=a("e3f3"),nr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("router-view",{ref:"childView"})},cr=[],dr={name:"Index",data:function(){return{}},watch:{$route:function(e,t){"/market"==e.path&&this.checkLogin()}},methods:{onLogin:function(e){e||location.hash.startsWith("#/market/user")?e&&"#/market"==location.hash&&this.$router.push("/market/list"):this.$router.push("/market/user/login")},checkLogin:function(){var e=this,t=window.localStorage.ticket;t?this.$market.call("cloud-user","isLogin",{ticket:t}).then((function(t){t.uid?(window.localStorage.uid=t.uid,e.onLogin(!0)):e.onLogin(!1)})).catch((function(t){e.$message({message:t,type:"error"})})):this.onLogin(!1)}},mounted:function(){this.checkLogin()}},ur=dr,pr=Object(w["a"])(ur,nr,cr,!1,null,null,null),mr=pr.exports,fr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server"},[a("div",{staticClass:"left-view"},[a("div",[a("span",[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:e.$t("home.placeholder")},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.filterTextChange(t)}},model:{value:e.treeSearchKey,callback:function(t){e.treeSearchKey=t},expression:"treeSearchKey"}}),e._v(" "),a("i",{staticClass:"iconfont el-icon-third-shuaxin",class:{active:e.isIconPlay},staticStyle:{cursor:"pointer","font-family":"iconfont  !important","z-index":"99"},on:{click:e.treeSearch}})],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.serviceList,stripe:"","show-header":!1},on:{"row-click":e.selectService}},[a("el-table-column",{attrs:{label:e.$t("market.table.version")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:4}},[a("el-avatar",{attrs:{size:30,src:t.row.logo}})],1),a("el-col",{attrs:{span:20}},[a("span",[a("span",[e._v(e._s(t.row.group+"/"+t.row.name))]),a("span",{staticClass:"overflow"},[e._v(e._s(t.row.description))])])])],1)]}}])})],1)],1)]),a("div",{staticClass:"right-view"},[a("router-view",{ref:"childView"})],1)])},hr=[],vr={name:"Market",data:function(){return{uid:"",treeErrMsg:"load failed",treeData:null,treeSearchKey:"",isIconPlay:!1,serviceList:[],group:"",name:"",version:"",total:0,offset:0,limit:20}},methods:{iconLoading:function(){var e=this;e.isIconPlay||(e.isIconPlay=!0,setTimeout((function(){e.isIconPlay=!1}),1e3))},treeSearch:function(){this.iconLoading(),this.fetchServiceData()},selectService:function(e,t,a){this.group=e.group,this.name=e.name,this.version=e.version,this.$router.push("/market/service/"+this.group+"/"+this.name+"/"+this.version)},fetchServiceData:function(){var e=this;this.$market.call("cloud-market","getServiceBaseList",{req:{offset:this.offset,limit:this.limit}}).then((function(t){e.serviceList=t.rsp.services,e.serviceList.forEach((function(e){e.create_time=R()(e.create_time).format("YYYY-MM-DD HH:mm:ss"),e.update_time=R()(e.update_time).format("YYYY-MM-DD HH:mm:ss"),e.logo=e.prefix+e.logo+"?t="+e.update_time})),e.total=t.rsp.total})).catch((function(t){e.$message({message:t,type:"error"})}))},onLogin:function(e){e?(this.uid=window.localStorage.uid,this.$store.commit({type:"marketUid",uid:this.uid}),this.fetchServiceData()):this.$router.push("/market/user/login")},checkLogin:function(){var e=this,t=window.localStorage.ticket;t?this.$market.call("cloud-user","isLogin",{ticket:t}).then((function(t){t.uid?(window.localStorage.uid=t.uid,e.onLogin(!0)):e.onLogin(!1)})).catch((function(t){e.$message({message:t,type:"error"})})):this.onLogin(!1)}},created:function(){},mounted:function(){this.checkLogin()}},gr=vr,br=(a("c2e9"),Object(w["a"])(gr,fr,hr,!1,null,null,null)),$r=br.exports,kr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"list"},[e._l(e.row,(function(t){return a("el-row",{key:t,staticStyle:{"padding-bottom":"10px"},attrs:{gutter:24}},e._l(e.column,(function(r){return a("el-col",{key:r,attrs:{span:24/e.column}},[e.valid(t,r)?a("el-card",{staticClass:"box-card",attrs:{"body-style":{padding:"0px"}}},[a("div",{staticStyle:{"line-height":"25px",position:"relative"},attrs:{slot:"header"},slot:"header"},[a("el-avatar",{attrs:{size:25,src:e.getServerLogo(t,r)}}),a("span",{staticStyle:{"margin-left":"5px",position:"absolute"}},[e._v(e._s(e.getServerName(t,r)))]),a("el-popover",{staticStyle:{float:"right"},attrs:{placement:"bottom"},model:{value:e.isVisible[t+"_"+r],callback:function(a){e.$set(e.isVisible,t+"_"+r,a)},expression:"isVisible[i + '_' + j]"}},[e._v(" 鐗堟湰鍒楄〃: "),e.serviceVersion?a("el-select",{staticStyle:{width:"100px"},model:{value:e.version,callback:function(t){e.version=t},expression:"version"}},e._l(e.versions,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1):e._e(),a("el-button",{staticStyle:{"line-height":"25px",padding:"0px 10px 0 10px"},attrs:{size:"small"},on:{click:function(a){return e.changeVersion(t,r)}}},[e._v("鍒囨崲")]),e.isUpgrade(t,r)?a("el-badge",{staticClass:"item",attrs:{slot:"reference","is-dot":""},slot:"reference"},[a("el-button",{staticStyle:{"line-height":"25px",padding:"0px 10px 0 10px"},attrs:{size:"small"},on:{click:function(a){return e.fetchVersionListData(t,r)}}},[e._v("鍒囨崲鐗堟湰")])],1):a("el-button",{staticStyle:{"line-height":"25px",padding:"0px 10px 0 10px"},attrs:{slot:"reference",size:"small"},on:{click:function(a){return e.fetchVersionListData(t,r)}},slot:"reference"},[e._v("鍒囨崲鐗堟湰")])],1)],1),a("div",{attrs:{slot:"header"},slot:"header"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.goService(e.getCloudServerName(t,r))}}},[e._v(e._s(e.getCloudServerName(t,r)))]),a("br"),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.getDigest(t,r),placement:"top-start"}},[a("span",{staticStyle:{"font-size":"10px"}},[e._v(e._s(e.getDigest(t,r,10)))])])],1)]):e._e()],1)})),1)})),e.upgradeServiceVersion?a("upgrade",{ref:"upgrade",attrs:{serviceVersion:e.upgradeServiceVersion},on:{upgradeSucc:e.upgradeSucc}}):e._e()],2)},yr=[],Sr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-dialog",{attrs:{title:"鍗囩骇",visible:e.dialogVisible,width:"70%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-alert",{staticStyle:{margin:"5px 0 5px 0"},attrs:{title:"鐗堟湰鍒囨崲涓嶄細鍙樻洿閰嶇疆鏂囦欢, 濡傛湁闇€瑕佽鑷繁鍙樻洿閰嶇疆",type:"error"}}),a("el-alert",{staticStyle:{margin:"5px 0 5px 0"},attrs:{title:"鐗堟湰鍒囨崲涓嶄細鍙樻洿鏈嶅姟妯℃澘, 濡傛湁闇€瑕佽鑷繁鍙樻洿鏈嶅姟妯℃澘",type:"error"}}),a("yaml-editor",{ref:"yamlEdit",staticStyle:{margin:"1px",height:"70%"},model:{value:e.deploy,callback:function(t){e.deploy=t},expression:"deploy"}}),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("鍙� 娑�")]),a("el-button",{attrs:{type:"primary"},on:{click:e.doUpgrade}},[e._v("鍒囨崲鐗堟湰")])],1)],1)],1)},_r=[],wr=a("7ad2"),Mr=a("e2c1"),xr={name:"Upgrade",components:{YamlEditor:Te},props:["serviceVersion"],data:function(){return{dialogVisible:!1,deploy:""}},methods:{show:function(){this.dialogVisible=!0,this.fetchDeploy()},doGet:function(e,t,a){var r=this;this.$ajax.postJSON("/market/api/get",{app:e,server:t}).then((function(e){a(e)})).catch((function(e){r.$message({message:"".concat(r.$t("common.error"),": ").concat(e.message||e.err_msg),type:"error"})}))},doUpgrade:function(){var e=this;this.$ajax.postJSON("/market/api/upgrade",{deploy:this.deploy,serviceVersion:this.serviceVersion}).then((function(t){e.$message({message:"".concat(e.$t("common.success")),type:"success"}),e.dialogVisible=!1,e.$emit("upgradeSucc")})).catch((function(t){e.$message({message:"".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg),type:"error"})}))},fetchDeploy:function(){var e=this;(new wr["a"]).getPlain(this.serviceVersion.deploy).then((function(t){t.ok&&t.text().then((function(t){var a=Mr["default"].load(t);delete a.cloud,delete a.config,delete a.appConfig,delete a.nodeConfig,a.repo.id="",a.app=e.serviceVersion.installData.group,a.server=e.serviceVersion.installData.name,e.doGet(a.app,a.server,(function(t){a.replicas=t.spec.k8s.replicas,a.hostNetwork=t.spec.k8s.hostNetwork,a.hostIPC=t.spec.k8s.hostIpc,a.hostPorts=t.spec.k8s.hostPorts||[],a.mounts=t.spec.k8s.mounts,a.nodeSelector=t.spec.k8s.nodeSelector,a.notStacked=t.spec.k8s.notStacked,a.abilityAffinity=t.spec.k8s.abilityAffinity,""==a.profile&&(a.profile=t.spec.tars.profile),a.asyncThread=t.spec.tars.asyncThread,a.template=t.spec.tars.template,t.spec.tars.servants.forEach((function(e){var t=a.servants.filter((function(t){return t.name==e.name}));t||a.servants.push(e)})),e.deploy=Mr["default"].dump(a)}))}))})).catch((function(t){e.$message({message:t,type:"error"})}))}},created:function(){},mounted:function(){}},Cr=xr,Nr=Object(w["a"])(Cr,Sr,_r,!1,null,null,null),Lr=Nr.exports,Tr={name:"List",components:{upgrade:Lr},data:function(){return{column:4,row:0,data:[],upgrade:{},isVisible:{},serviceVersion:null,upgradeServiceVersion:null,version:"",versions:[]}},methods:{valid:function(e,t){return(e-1)*this.column+t-1<this.data.length},get:function(e,t){var a=(e-1)*this.column+t-1;return this.data[a]},isUpgrade:function(e,t){var a=this.getUpgrade(this.get(e,t));return this.upgrade[a.group+"-"+a.name+"-"+a.version]},getServerLogo:function(e,t){return this.get(e,t)["tars.io/CloudLogo"]},getServerName:function(e,t){return this.get(e,t)["tars.io/ServerApp"]+"/"+this.get(e,t)["tars.io/ServerName"]},getCloudServerName:function(e,t){return this.get(e,t)["tars.io/CloudInstall"]},getDigest:function(e,t,a){return a?this.get(e,t)["tars.io/CloudDigest"].substr(0,a+7):this.get(e,t)["tars.io/CloudDigest"]},getUpgrade:function(e){var t=e["tars.io/CloudInstall"],a=t.indexOf("-"),r=t.substr(0,a),o=t.indexOf("-",a+1),i=t.substr(a+1,o-a-1),s=t.substr(o+1);return{group:r,name:i,version:s,digest:e["tars.io/CloudDigest"]}},goService:function(e){this.$router.push("/market/service/"+e.replace(/-/g,"/"))},fetchInstallFromCloud:function(){var e=this;this.$ajax.getJSON("/market/api/list_install_from_cloud").then((function(t){e.data=t,e.row=Math.ceil((e.data.length+1)/e.column),e.fetchCheckUpgrade()})).catch((function(t){e.$message({message:t.err_msg,type:"error"})}))},fetchServiceVersionData:function(e,t,a){var r=this,o=this.getUpgrade(this.get(e,t));this.$market.call("cloud-market","getServiceVersion",{req:{group:o.group,name:o.name,version:o.version}}).then((function(e){r.serviceVersion=null,r.$nextTick((function(){r.serviceVersion=e.rsp,r.version=r.serviceVersion.version,a&&a()}))})).catch((function(e){r.$message({message:e,type:"error"})}))},fetchVersionListData:function(e,t){var a=this;this.fetchServiceVersionData(e,t,(function(){var r=a.getUpgrade(a.get(e,t));a.$market.call("cloud-market","getServiceVersionList",{req:{group:r.group,name:r.name}}).then((function(r){a.versions=r.rsp.versions,a.isVisible[e+"_"+t]=!0})).catch((function(e){a.$message({message:e,type:"error"})}))}))},changeVersion:function(e,t){var a=this,r=this.getUpgrade(this.get(e,t));this.$market.call("cloud-market","getServiceVersion",{req:{group:r.group,name:r.name,version:this.version}}).then((function(r){a.upgradeServiceVersion=r.rsp,a.upgradeServiceVersion.logo=a.upgradeServiceVersion.prefix+a.upgradeServiceVersion.logo+"?t="+a.upgradeServiceVersion.update_time,a.upgradeServiceVersion.readme=a.upgradeServiceVersion.prefix+a.upgradeServiceVersion.readme+"?t="+a.upgradeServiceVersion.update_time,a.upgradeServiceVersion.deploy=a.upgradeServiceVersion.prefix+a.upgradeServiceVersion.deploy+"?t="+a.upgradeServiceVersion.update_time,a.upgradeServiceVersion.changelist=a.upgradeServiceVersion.prefix+a.upgradeServiceVersion.changelist+"?t="+a.upgradeServiceVersion.update_time,a.upgradeServiceVersion.create_time=R()(a.upgradeServiceVersion.create_time).format("YYYY-MM-DD"),a.upgradeServiceVersion.update_time=R()(a.upgradeServiceVersion.update_time).format("YYYY-MM-DD"),a.upgradeServiceVersion.installData={group:a.get(e,t)["tars.io/ServerApp"],name:a.get(e,t)["tars.io/ServerName"]},a.$nextTick((function(){a.$refs.upgrade.show()}))})).catch((function(e){a.$message({message:e,type:"error"})}))},upgradeSucc:function(){this.fetchInstallFromCloud()},fetchCheckUpgrade:function(){var e=this,t=[];this.data.forEach((function(a){var r=e.getUpgrade(a);t.push(r)})),this.$market.call("cloud-market","checkUpgrade",{req:{info:t}}).then((function(t){e.upgrade={},t.rsp.info.forEach((function(t){e.upgrade[t.group+"-"+t.name+"-"+t.version]=t.upgrade}))})).catch((function(t){e.$message({message:t,type:"error"})}))}},created:function(){},mounted:function(){this.fetchInstallFromCloud()}},Ir=Tr,Ar=(a("c2e92"),Object(w["a"])(Ir,kr,yr,!1,null,null,null)),Dr=Ar.exports,Pr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-header",{staticClass:"header"},[e.serviceVersion?a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:3}},[a("el-avatar",{attrs:{size:100,src:e.serviceVersion.logo}})],1),a("el-col",{attrs:{span:21}},[a("span",[a("div",{staticStyle:{"margin-bottom":"5px"}},[a("span",{staticClass:"title"},[e._v(e._s(e.serviceVersion.name))]),a("el-select",{staticStyle:{width:"100px"},on:{"visible-change":e.visibleChange,change:e.change},model:{value:e.serviceVersion.version,callback:function(t){e.$set(e.serviceVersion,"version",t)},expression:"serviceVersion.version"}},e._l(e.versions,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("div",{staticStyle:{"margin-bottom":"5px"}},[a("span",{staticStyle:{"margin-bottom":"10px","margin-right":"10px"}},[a("el-tag",{staticStyle:{"margin-right":"5px"},attrs:{effect:"dark",size:"mini"}},[e._v("璇█")]),a("el-tag",{attrs:{effect:"plain",type:"success",size:"mini"}},[e._v(e._s(e.serviceVersion.lang))])],1)]),a("div",{staticStyle:{"margin-bottom":"5px"}},[a("span",{staticStyle:{"margin-bottom":"10px","margin-right":"10px"}},[a("el-tag",{staticStyle:{"margin-right":"5px"},attrs:{effect:"dark",size:"mini"}},[e._v("璐$尞鑰�")]),e._l(e.serviceVersion.collaborators.split(","),(function(t){return a("el-tag",{key:t,staticStyle:{"margin-right":"5px"},attrs:{effect:"plain",type:"success",size:"mini"}},[e._v(e._s(t))])}))],2)]),a("div",{staticStyle:{"margin-bottom":"5px"}},[a("span",{staticStyle:{"margin-bottom":"10px","margin-right":"10px"}},[a("el-tag",{staticStyle:{"margin-right":"5px"},attrs:{effect:"dark",type:"warning",size:"mini"}},[e._v("浠撳簱")]),a("el-tag",{staticStyle:{cursor:"pointer"},attrs:{effect:"plain",type:"warning",size:"mini"},on:{click:function(t){return e.goRepository(e.serviceVersion.repository)}}},[e._v(e._s(e.serviceVersion.repository))])],1)]),a("div",{staticStyle:{"margin-bottom":"5px"}},[a("span",{staticStyle:{"margin-bottom":"10px","margin-right":"10px"}},[a("el-tag",{staticStyle:{"margin-right":"5px"},attrs:{effect:"dark",size:"mini",type:"danger"}},[e._v("鍒涘缓")]),a("el-tag",{attrs:{effect:"plain",type:"danger",size:"mini"}},[e._v(e._s(e.serviceVersion.create_time))])],1),a("span",[a("el-tag",{staticStyle:{"margin-right":"5px"},attrs:{effect:"dark",size:"mini",type:"danger"}},[e._v("鏇存柊")]),a("el-tag",{attrs:{effect:"plain",type:"danger",size:"mini"}},[e._v(e._s(e.serviceVersion.update_time))])],1)]),a("span",{staticClass:"description"},[a("el-alert",{attrs:{title:e.serviceVersion.description,type:"info",closable:!1}})],1),a("el-tag",{staticStyle:{"margin-top":"10px",cursor:"pointer"},attrs:{type:"danger"},on:{click:e.showInstall}},[e._v("瀹夎")])],1)])],1):e._e()],1),e.serviceVersion?a("el-main",[a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"鏈嶅姟璇存槑",name:"readme"}},[a("markdown",{attrs:{serviceVersion:e.serviceVersion,file:e.serviceVersion.readme}})],1),a("el-tab-pane",{attrs:{label:"閮ㄧ讲鏂囦欢",name:"deploy"}},[a("deploy",{attrs:{serviceVersion:e.serviceVersion}})],1),a("el-tab-pane",{attrs:{label:"鍗忚鏂囦欢",name:"protocols"}},[a("protocols",{attrs:{serviceVersion:e.serviceVersion}})],1),a("el-tab-pane",{attrs:{label:"鍙樻洿鍘嗗彶",name:"changelist"}},[a("markdown",{attrs:{serviceVersion:e.serviceVersion,file:e.serviceVersion.changelist}})],1),a("el-tab-pane",{attrs:{label:"鏃ュ織",name:"logs"}},[a("logs",{attrs:{serviceVersion:e.serviceVersion}})],1)],1)],1):e._e(),e.serviceVersion?a("install",{ref:"install",attrs:{serviceVersion:e.serviceVersion}}):e._e()],1)},Or=[],qr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"markdown-body hljs",domProps:{innerHTML:e._s(e.html)}})},jr=[],zr=a("7c5c"),Vr=a("1487"),Er=a.n(Vr);a("2876");zr["marked"].setOptions({renderer:new zr["marked"].Renderer,highlight:function(e,t){var a=Er.a.getLanguage(t)?t:"plaintext";return Er.a.highlight(e,{language:a}).value},langPrefix:"hljs language-",pedantic:!1,gfm:!0,breaks:!1,sanitize:!1,smartLists:!0,smartypants:!1,xhtml:!1});var Rr=new wr["a"],Br={name:"Markdown",data:function(){return{html:""}},props:["serviceVersion","file"],methods:{markdownToHtml:function(e){this.html=zr["marked"].parse(e)},fetchReadme:function(){var e=this;Rr.getPlain(this.file).then((function(t){t.ok&&t.text().then((function(t){e.markdownToHtml(t)}))})).catch((function(t){e.$message({message:t,type:"error"})}))}},created:function(){},mounted:function(){var e=this,t={link:function(e,t,a){var r="";return 0==e.indexOf("#")?r="<a href=\"javascript:document.getElementById('"+e.substring(1)+"').scrollIntoView();\"":0==e.indexOf("http://")||0==e.indexOf("https://")?r='<a target="_black" href="'+e+'"':(e="/#"+path.join(hrefPath,e),r='<a href="'+e+'"'),t&&(r+=' title="'+t+'"'),r+=">"+a+"</a>",r},image:function(t,a,r){0!=t.indexOf("/")&&(t=e.serviceVersion.prefix+t);var o='<div class="images" v-viewer><img src="'+t+'" alt="'+r+'"';return o+="> </div>",o}};zr["marked"].use({renderer:t}),e.fetchReadme()}},Hr=Br,Fr=(a("a462"),Object(w["a"])(Hr,qr,jr,!1,null,null,null)),Jr=Fr.exports,Yr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("yaml-editor",{ref:"yamlEdit",staticStyle:{margin:"1px"},model:{value:e.data.deploy,callback:function(t){e.$set(e.data,"deploy",t)},expression:"data.deploy"}})],1)},Kr=[],Ur={name:"Deploy",components:{YamlEditor:Te},props:["serviceVersion"],data:function(){return{data:{deploy:""}}},methods:{fetchDeploy:function(){var e=this;(new wr["a"]).getPlain(this.serviceVersion.deploy).then((function(t){t.ok&&t.text().then((function(t){e.data.deploy=t}))})).catch((function(t){e.$message({message:t,type:"error"})}))}},created:function(){},mounted:function(){this.$refs.yamlEdit.readonly(),this.fetchDeploy()}},Wr=Ur,Zr=Object(w["a"])(Wr,Yr,Kr,!1,null,null,null),Gr=Zr.exports,Qr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-tabs",{attrs:{type:"border-card"}},e._l(e.protocols,(function(t){return a("el-tab-pane",{key:t.name,attrs:{label:t.name}},[a("el-tag",{attrs:{type:"success"},on:{click:function(a){return e.download(t.name)}}},[e._v(e._s(e.$t("market.download")))]),a("br"),a("br"),a("div",{staticStyle:{border:"1px solid grey"}},[a("pre",{staticStyle:{margin:"5px 10px 10px 10px"},domProps:{innerHTML:e._s(t.content)}})])],1)})),1)],1)},Xr=[],eo={name:"Protocols",components:{},props:["serviceVersion"],data:function(){return{protocols:[]}},methods:{download:function(e){(new wr["a"]).download(this.serviceVersion.prefix+e)},fetchProtocol:function(){var e=this,t=function(t){(new wr["a"]).getPlain(e.serviceVersion.prefix+e.serviceVersion.protocols[t]).then((function(a){a.ok&&a.text().then((function(a){e.protocols.push({name:t,content:Er.a.highlight(a,{language:"cpp"}).value})}))})).catch((function(t){e.$message({message:t,type:"error"})}))};for(var a in this.serviceVersion.protocols)t(a)}},created:function(){},mounted:function(){this.fetchProtocol()}},to=eo,ao=Object(w["a"])(to,Qr,Xr,!1,null,null,null),ro=ao.exports,oo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-dialog",{attrs:{title:"瀹夎",visible:e.dialogVisible,width:"70%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-alert",{staticStyle:{margin:"5px 0 5px 0"},attrs:{title:"璇锋牴鎹疄闄呮儏鍐靛彉鏇碼pp/server",type:"error"}}),a("el-alert",{staticStyle:{margin:"5px 0 5px 0"},attrs:{title:"濡傛灉鏈夐厤缃枃浠�, 璇锋牴鎹疄闄呮儏鍐佃皟鏁撮厤缃枃浠�",type:"error"}}),a("el-alert",{staticStyle:{margin:"5px 0 5px 0"},attrs:{title:"璇蜂笉瑕侀殢鎰忓彉鏇磗ervants閰嶇疆淇℃伅鍜岄暅鍍忓湴鍧€",type:"error"}}),a("el-alert",{staticStyle:{margin:"5px 0 5px 0"},attrs:{title:"涓轰簡椤哄埄鎷夊彇闀滃儚, 璇峰湪K8S闆嗙兢涓厤缃ソ浠撳簱鐨剆ecret: cloud-market-secret",type:"error"}}),a("yaml-editor",{ref:"yamlEdit",staticStyle:{margin:"1px",height:"70%"},model:{value:e.deploy,callback:function(t){e.deploy=t},expression:"deploy"}}),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("鍙� 娑�")]),a("el-button",{attrs:{type:"primary"},on:{click:e.doInstall}},[e._v("瀹夎")])],1)],1),e.upgradeServiceVersion?a("upgrade",{ref:"upgrade",attrs:{serviceVersion:e.upgradeServiceVersion},on:{upgradeSucc:e.upgradeSucc}}):e._e()],1)},io=[],so={name:"Install",components:{YamlEditor:Te,upgrade:Lr},props:["serviceVersion"],data:function(){return{dialogVisible:!1,upgradeServiceVersion:null,deploy:""}},methods:{showInstall:function(){this.dialogVisible=!0},upgradeSucc:function(){},doInstall:function(){var e=this;this.$confirm("纭畾瀹夎璇ユ湇鍔′箞?","鎻愮ず",{confirmButtonText:"纭畾",cancelButtonText:"鍙栨秷",type:"warning"}).then((function(){e.$ajax.postJSON("/market/api/install",{deploy:e.deploy,serviceVersion:e.serviceVersion}).then((function(t){e.$message({message:"".concat(e.$t("common.success")),type:"success"}),e.dialogVisible=!1})).catch((function(t){201==t.ret_code?e.$confirm("鏈嶅姟宸茬粡瀛樺湪, 鏄惁瑕嗙洊瀹夎?","鎻愮ず",{confirmButtonText:"瑕嗙洊瀹夎",cancelButtonText:"鍙栨秷",type:"warning"}).then((function(){e.dialogVisible=!1,e.upgradeServiceVersion=e.serviceVersion;var t=Mr["default"].load(e.deploy);e.upgradeServiceVersion.installData={group:t.app,name:t.server},e.$nextTick((function(){e.$refs.upgrade.show()}))})).catch():e.$message({message:"".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg),type:"error"})}))})).catch((function(){}))},fetchDeploy:function(){var e=this;(new wr["a"]).getPlain(this.serviceVersion.deploy).then((function(t){t.ok&&t.text().then((function(t){var a=Mr["default"].load(t);delete a.cloud,a.repo.id="",e.deploy=Mr["default"].dump(a)}))})).catch((function(t){e.$message({message:t,type:"error"})}))}},created:function(){},mounted:function(){this.fetchDeploy()}},lo=so,no=Object(w["a"])(lo,oo,io,!1,null,null,null),co=no.exports,uo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.logs,stripe:"","show-header":!1}},[a("el-table-column",{attrs:{label:e.$t("market.table.version")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:24}},[a("span",[a("span",{style:e.getLogStyle(t.row.logLevel)},[e._v(e._s(t.row.text))])])])],1)]}}])})],1)},po=[],mo={name:"Logs",data:function(){return{logs:[]}},props:["serviceVersion"],methods:{getLogStyle:function(e){return 1==e?"color:green":2==e?"color:red":""},fetchLogs:function(){var e=this;this.$market.call("cloud-market","getServiceLogs",{req:{group:this.serviceVersion.group,name:this.serviceVersion.name,version:this.serviceVersion.version}}).then((function(t){e.logs=t.logs})).catch((function(t){e.$message({message:t,type:"error"})}))}},created:function(){},mounted:function(){this.fetchLogs()}},fo=mo,ho=(a("da9f"),Object(w["a"])(fo,uo,po,!1,null,null,null)),vo=ho.exports,go={name:"ServiceInfo",components:{markdown:Jr,deploy:Gr,protocols:ro,install:co,logs:vo},data:function(){return{group:"",name:"",version:"",versions:[],serviceVersion:null,activeName:"readme"}},watch:{$route:function(e,t){e.path.startsWith("/market/service")&&this.loadData(e.params.group,e.params.name,e.params.version)}},methods:{handleClick:function(){},goRepository:function(e){window.open(e)},loadData:function(e,t,a){this.group=e,this.name=t,this.version=a,this.fetchServiceVersionData(this.version)},change:function(e){this.version=e,this.fetchServiceVersionData(e)},visibleChange:function(e){e&&this.fetchVersionListData()},fetchServiceVersionData:function(e){var t=this;this.$market.call("cloud-market","getServiceVersion",{req:{group:this.group,name:this.name,version:e}}).then((function(e){t.serviceVersion=null,t.$nextTick((function(){t.serviceVersion=e.rsp,t.serviceVersion.logo=t.serviceVersion.prefix+t.serviceVersion.logo+"?t="+t.serviceVersion.update_time,t.serviceVersion.readme=t.serviceVersion.prefix+t.serviceVersion.readme+"?t="+t.serviceVersion.update_time,t.serviceVersion.deploy=t.serviceVersion.prefix+t.serviceVersion.deploy+"?t="+t.serviceVersion.update_time,t.serviceVersion.changelist=t.serviceVersion.prefix+t.serviceVersion.changelist+"?t="+t.serviceVersion.update_time,t.serviceVersion.create_time=R()(t.serviceVersion.create_time).format("YYYY-MM-DD"),t.serviceVersion.update_time=R()(t.serviceVersion.update_time).format("YYYY-MM-DD")}))})).catch((function(e){t.$message({message:e,type:"error"})}))},fetchVersionListData:function(){var e=this;this.$market.call("cloud-market","getServiceVersionList",{req:{group:this.group,name:this.name}}).then((function(t){e.versions=t.rsp.versions})).catch((function(t){e.$message({message:t,type:"error"})}))},showInstall:function(){this.$refs.install.showInstall()}},created:function(){},mounted:function(){this.loadData(this.$route.params.group,this.$route.params.name,this.$route.params.version)}},bo=go,$o=(a("c762"),Object(w["a"])(bo,Pr,Or,!1,null,null,null)),ko=$o.exports,yo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("div",[a("h1",{staticClass:"top_txt"},[e._v(" "+e._s(e.$t("market.login.loginTitle"))+" ")])]),a("el-form",{ref:"ruleFormLogin",attrs:{"label-width":"0",model:e.login,rules:e.rules,autocomplete:"on"}},[a("el-form-item",{attrs:{prop:"uid"}},[a("el-input",{attrs:{placeholder:e.$t("market.login.userName"),"prefix-icon":"el-icon-message",autocomplete:"on"},model:{value:e.login.uid,callback:function(t){e.$set(e.login,"uid",t)},expression:"login.uid"}})],1),a("el-form-item",{attrs:{prop:"password"}},[a("el-input",{attrs:{placeholder:e.$t("market.login.password"),"show-password":"","prefix-icon":"el-icon-lock",autocomplete:"on"},model:{value:e.login.password,callback:function(t){e.$set(e.login,"password",t)},expression:"login.password"}})],1),a("el-form-item",{attrs:{required:""}},[a("div",{staticClass:"captcha_box"},[a("el-input",{attrs:{"prefix-icon":"el-icon-finished",type:"text",placeholder:e.$t("market.login.captcha"),required:"","required-tip":e.$t("market.login.captchaTips")},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.login(t)}},model:{value:e.login.captcha,callback:function(t){e.$set(e.login,"captcha",t)},expression:"login.captcha"}}),a("img",{staticClass:"captcha_code",attrs:{title:e.$t("market.login.refresh"),src:e.login.captchaUrl},on:{click:e.reloadCaptcha}})],1)]),a("el-button",{staticClass:"btn_long",attrs:{type:"primary",size:"small",round:""},on:{click:e.doLogin}},[e._v(e._s(e.$t("market.login.login")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("div",{staticClass:"bot_txt"},[a("span",[e._v(e._s(e.$t("market.login.registerInfo"))+" "),a("a",{attrs:{size:"small",round:""},on:{click:e.show_registry}},[e._v(e._s(e.$t("market.login.register")))]),e._v(" "+e._s(e.$t("market.login.and"))+" "),a("a",{attrs:{size:"small",round:""},on:{click:e.show_active}},[e._v(e._s(e.$t("market.login.activated")))])]),a("br"),a("span",[e._v(e._s(e.$t("market.login.forget"))+" "),a("a",{staticStyle:{float:"right"},attrs:{size:"small",round:""},on:{click:e.forget_pass}},[e._v(e._s(e.$t("market.login.findPassword")))]),e._v(" "+e._s(e.$t("market.login.and"))+" "),a("a",{staticStyle:{float:"right"},attrs:{size:"small",round:""},on:{click:e.reset_pass}},[e._v(e._s(e.$t("market.login.resetPassword")))]),e._v(" "+e._s(e.$t("market.login.password"))+" ")])])])],1)],1)],1)},So=[],_o=a("58b7"),wo=a.n(_o),Mo=(a("83a3"),{name:"Login",data:function(){var e=this,t=function(e){var t=e.match(/^.*[A-Z]+.*$/);if(null==t)return!1;t=e.match(/^.*[a-z]+.*$/);if(null==t)return!1;t=e.match(/^.*[0-9]+.*$/);return null!=t},a=function(a,r,o){r.length<8?o(new Error(e.$t("market.login.passwordInfo"))):t(r)?o():o(new Error(e.$t("market.login.passwordInfo")))},r=function(t,a,r){var o=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(e.$t("market.login.userNameRegTips")));setTimeout((function(){o.test(a)?r():r(new Error(e.$t("market.login.userNameRegTips")))}),100)};return{login:{ticket:"",uid:window.localStorage.uid||"",captcha:"",password:"",captchaUrl:"",session:""},rules:{uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:r,trigger:"blur"}],password:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:a,trigger:"blur"}]}}},methods:{reloadCaptcha:function(){var e=this;this.$market.call("cloud-user","captcha").then((function(t){e.login.captchaUrl="data:image/svg+xml;base64,"+t.ci.captchaBase64,e.login.session=t.ci.session})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))},forget_pass:function(){this.$router.push("/market/user/forget")},show_registry:function(){this.$router.push("/market/user/register")},show_active:function(){this.$router.push("/market/user/activate")},reset_pass:function(){this.$router.push("/market/user/resetPass")},doLogin:function(){var e=this;this.$refs["ruleFormLogin"].validate((function(t){if(!t)return!1;e.$market.call("cloud-user","login",{li:{uid:e.login.uid,password:wo()(e.login.password),captcha:e.login.captcha,session:e.login.session}}).then((function(t){t.ticket?(e.login.ticket=t.ticket,e.login.isLogin=!0,window.localStorage.ticket=t.ticket,window.localStorage.uid=e.login.uid,e.$router.push("/market/list")):(e.login.ticket="",e.login.isLogin=!1,window.localStorage.ticket="")})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))}))}},mounted:function(){this.reloadCaptcha(),this.$refs["ruleFormLogin"].resetFields()}}),xo=Mo,Co=Object(w["a"])(xo,yo,So,!1,null,null,null),No=Co.exports,Lo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("h1",{staticClass:"top_txt"},[e._v(" "+e._s(e.$t("market.login.register"))+" ")]),a("el-form",{ref:"ruleRegisterForm",attrs:{"label-width":"120px",model:e.login,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.login.userName"),prop:"uid",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputUserName"),"prefix-icon":"el-icon-message"},model:{value:e.login.uid,callback:function(t){e.$set(e.login,"uid",t)},expression:"login.uid"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.password"),prop:"password"}},[a("el-input",{attrs:{"prefix-icon":"el-icon-key",placeholder:e.$t("market.login.passwordInfo"),"show-password":""},model:{value:e.login.password,callback:function(t){e.$set(e.login,"password",t)},expression:"login.password"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.repeatPassword"),prop:"checkPass",required:""}},[a("el-input",{attrs:{"prefix-icon":"el-icon-key",placeholder:e.$t("market.login.inputRepeatPassword"),"show-password":""},model:{value:e.login.checkPass,callback:function(t){e.$set(e.login,"checkPass",t)},expression:"login.checkPass"}})],1),a("el-button",{staticClass:"btn_long",attrs:{type:"primary",size:"small",round:""},on:{click:e.register}},[e._v(e._s(e.$t("market.login.register")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.show_login}},[e._v(e._s(e.$t("market.login.back")))])])],1)],1)],1)},To=[],Io=a("ade3"),Ao={name:"Register",data:function(){var e=this,t=function(e){var t=e.match(/^.*[A-Z]+.*$/);if(null==t)return!1;t=e.match(/^.*[a-z]+.*$/);if(null==t)return!1;t=e.match(/^.*[0-9]+.*$/);return null!=t},a=function(a,r,o){r.length<8?o(new Error(e.$t("market.login.passwordInfo"))):t(r)?o():o(new Error(e.$t("market.login.passwordInfo")))},r=function(t,a,r){""===a?r(new Error(e.$t("market.login.inputPasswordAgain"))):a!==e.login.password?r(new Error(e.$t("market.login.passwordDiff"))):r()},o=function(t,a,r){var o=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(e.$t("market.login.userNameRegTips")));setTimeout((function(){o.test(a)?r():r(new Error(e.$t("market.login.userNameRegTips")))}),100)};return{login:{ticket:"",uid:window.localStorage.uid||"",captcha:"",password:"",checkPass:"",captchaUrl:"",session:""},rules:Object(Io["a"])({uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:o,trigger:"blur"}],password:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:a,trigger:"blur"}],checkPass:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:a,trigger:"blur"}]},"checkPass",[{validator:r,trigger:"blur"}])}},methods:{show_login:function(){this.$router.push("/market/user/login")},show_activate:function(){this.$router.push("/market/user/activate")},register:function(){var e=this;this.$refs["ruleRegisterForm"].validate((function(t){if(!t)return!1;e.$market.call("cloud-user","register",{uid:e.login.uid,password:wo()(e.login.password),origin:window.location.origin}).then((function(t){window.localStorage.uid=e.login.uid,e.show_activate()})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))}))}},mounted:function(){}},Do=Ao,Po=Object(w["a"])(Do,Lo,To,!1,null,null,null),Oo=Po.exports,qo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("el-alert",{attrs:{title:e.$t("market.login.registerSucc"),type:"success"}}),a("div",[a("h1",{staticClass:"top_txt"},[e._v(" "+e._s(e.$t("market.login.activing"))+" ")])]),a("el-form",{ref:"ruleForgetForm",attrs:{"label-width":"80px",model:e.login,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.login.userName"),prop:"uid",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputUserName"),"prefix-icon":"el-icon-message"},model:{value:e.login.uid,callback:function(t){e.$set(e.login,"uid",t)},expression:"login.uid"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.activeCode"),prop:"activeCode",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputActiveCode"),"prefix-icon":"el-icon-bell"},model:{value:e.login.activeCode,callback:function(t){e.$set(e.login,"activeCode",t)},expression:"login.activeCode"}})],1),a("el-button",{staticClass:"btn_long btn_submit",attrs:{type:"primary",size:"small",round:""},on:{click:e.activate}},[e._v(e._s(e.$t("market.login.activate")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.show_login}},[e._v(e._s(e.$t("market.login.back")))])])],1)],1)],1)},jo=[],zo={name:"Activate",data:function(){var e=this,t=function(t,a,r){var o=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(e.$t("market.login.userNameRegTips")));setTimeout((function(){o.test(a)?r():r(new Error(e.$t("market.login.userNameRegTips")))}),100)};return{login:{uid:window.localStorage.uid||"",activeCode:""},rules:{uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:t,trigger:"blur"}],activeCode:[{required:!0,message:this.$t("market.login.inputActiveCode"),trigger:"blur"}]}}},mounted:function(){console.log(this.$route.params),this.login.activeCode=this.$route.params.uid},methods:{show_login:function(){this.$router.push("/market/user/login")},activate:function(){var e=this;this.$market.call("cloud-user","activate",{uid:this.login.uid,activeCode:this.login.activeCode}).then((function(){e.$message({message:e.$t("market.login.activateSuccAndRedirect"),type:"success"}),setTimeout((function(){e.$router.push("/market/user/login")}),1e3)})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"warning"})}))}}},Vo=zo,Eo=Object(w["a"])(Vo,qo,jo,!1,null,null,null),Ro=Eo.exports,Bo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("h1",{staticClass:"top_txt"},[e._v(" "+e._s(e.$t("market.login.findPasswordTitle"))+" ")]),a("el-form",{ref:"ruleForgetForm",attrs:{"label-width":"80px",model:e.login,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.login.userName"),prop:"uid",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputUserName"),"prefix-icon":"el-icon-message"},model:{value:e.login.uid,callback:function(t){e.$set(e.login,"uid",t)},expression:"login.uid"}})],1),a("el-button",{staticClass:"btn_long btn_submit",attrs:{type:"primary",size:"small",round:""},on:{click:e.forget}},[e._v(e._s(e.$t("market.login.submit")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.show_login}},[e._v(e._s(e.$t("market.login.back")))])])],1)],1)],1)},Ho=[],Fo={name:"Forget",data:function(){var e=this,t=function(t,a,r){var o=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(e.$t("market.login.userNameRegTips")));setTimeout((function(){o.test(a)?r():r(new Error(e.$t("market.login.userNameRegTips")))}),100)};return{login:{ticket:"",uid:window.localStorage.uid||""},rules:{uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:t,trigger:"blur"}]}}},methods:{show_login:function(){this.$router.push("/market/user/login")},forget:function(){var e=this;this.$refs["ruleForgetForm"].validate((function(t){if(!t)return!1;e.$market.call("cloud-user","forget",{uid:e.login.uid,origin:window.location.origin}).then((function(t){e.$message({message:e.$t("market.login.findPasswordSucc"),type:"success"}),window.localStorage.uid=e.login.uid,e.$router.push("/market/user/resetPass")})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))}))}},mounted:function(){}},Jo=Fo,Yo=Object(w["a"])(Jo,Bo,Ho,!1,null,null,null),Ko=Yo.exports,Uo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("h1",{staticClass:"top_txt"},[e._v(e._s(e.$t("market.login.modifyPass")))]),a("el-form",{ref:"ruleForm",attrs:{"label-width":"150px",model:e.data,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.login.inputOldPass"),prop:"oldPassword",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.passwordInfo"),"show-password":""},model:{value:e.data.oldPassword,callback:function(t){e.$set(e.data,"oldPassword",t)},expression:"data.oldPassword"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.inputNewPass"),prop:"newPassword",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.passwordInfo"),"show-password":""},model:{value:e.data.newPassword,callback:function(t){e.$set(e.data,"newPassword",t)},expression:"data.newPassword"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.repeatInputNewPass"),prop:"checkPass",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.repeatInputNewPass"),"show-password":""},model:{value:e.data.checkPass,callback:function(t){e.$set(e.data,"checkPass",t)},expression:"data.checkPass"}})],1),a("el-button",{staticClass:"btn_long",attrs:{type:"primary",size:"small",round:""},on:{click:e.modifyPass}},[e._v(e._s(e.$t("market.login.modifyPass")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.back}},[e._v(e._s(e.$t("market.login.back")))])])],1)],1)],1)},Wo=[],Zo={name:"ModifyPass",data:function(){var e=this,t=function(e){var t=e.match(/^.*[A-Z]+.*$/);if(null==t)return!1;t=e.match(/^.*[a-z]+.*$/);if(null==t)return!1;t=e.match(/^.*[0-9]+.*$/);return null!=t},a=function(a,r,o){r.length<8?o(new Error(e.$t("market.login.passwordInfo"))):t(r)?o():o(new Error(e.$t("market.login.passwordInfo")))},r=function(t,a,r){""===a?r(new Error(e.$t("login.inputPasswordAgain"))):a!==e.data.newPassword?r(new Error(e.$t("login.passwordDiff"))):r()};return{data:{newPassword:"",oldPassword:"",checkPass:""},rules:Object(Io["a"])({newPassword:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:a,trigger:"blur"}],oldPassword:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:a,trigger:"blur"}],checkPass:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"}]},"checkPass",[{validator:r,trigger:"blur"}])}},methods:{back:function(){this.$router.go(-1)},modifyPass:function(){var e=this;this.$refs["ruleForm"].validate((function(t){if(!t)return!1;e.$market.call("cloud-user","resetPass",{ticket:window.localStorage.ticket,oldPassword:wo()(e.data.oldPassword),newPassword:wo()(e.data.newPassword)}).then((function(t){e.$message({message:e.$t("market.login.modifySucc"),type:"success"}),e.$router.push("/market/list")})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))}))}}},Go=Zo,Qo=Object(w["a"])(Go,Uo,Wo,!1,null,null,null),Xo=Qo.exports,ei=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("h1",{staticClass:"top_txt"},[e._v(e._s(e.$t("market.login.resetPass")))]),a("el-form",{ref:"ruleForm",attrs:{"label-width":"120px",model:e.data,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.login.userName"),prop:"uid",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputUserName"),"prefix-icon":"el-icon-message"},model:{value:e.data.uid,callback:function(t){e.$set(e.data,"uid",t)},expression:"data.uid"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.inputPassword"),prop:"password",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.passwordInfo"),"show-password":""},model:{value:e.data.password,callback:function(t){e.$set(e.data,"password",t)},expression:"data.password"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.repeatPassword"),prop:"checkPass",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputRepeatPassword"),"show-password":""},model:{value:e.data.checkPass,callback:function(t){e.$set(e.data,"checkPass",t)},expression:"data.checkPass"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.activeCode"),prop:"activeCode",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputActiveCode"),"show-password":""},model:{value:e.data.activeCode,callback:function(t){e.$set(e.data,"activeCode",t)},expression:"data.activeCode"}})],1),a("el-form-item",{attrs:{required:""}},[a("div",{staticClass:"captcha_box"},[a("el-input",{attrs:{"prefix-icon":"el-icon-finished",type:"text",placeholder:e.$t("market.login.captcha"),required:"","required-tip":e.$t("market.login.captchaTips")},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.login(t)}},model:{value:e.data.captcha,callback:function(t){e.$set(e.data,"captcha",t)},expression:"data.captcha"}}),a("img",{staticClass:"captcha_code",attrs:{title:e.$t("market.login.refresh"),src:e.data.captchaUrl},on:{click:e.reloadCaptcha}})],1)]),a("el-button",{attrs:{type:"primary",size:"small",round:""},on:{click:e.resetPass}},[e._v(e._s(e.$t("market.login.resetPass")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.show_login}},[e._v(e._s(e.$t("market.login.back")))])])],1)],1)],1)},ti=[],ai={name:"ResetPass1",data:function(){var e,t=this,a=function(e){var t=e.match(/^.*[A-Z]+.*$/);if(null==t)return!1;t=e.match(/^.*[a-z]+.*$/);if(null==t)return!1;t=e.match(/^.*[0-9]+.*$/);return null!=t},r=function(e,r,o){r.length<8?o(new Error(t.$t("market.login.passwordInfo"))):a(r)?o():o(new Error(t.$t("market.login.passwordInfo")))},o=function(e,a,r){var o=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(t.$t("market.login.userNameRegTips")));setTimeout((function(){o.test(a)?r():r(new Error(t.$t("market.login.userNameRegTips")))}),100)},i=function(e,a,r){""===a?r(new Error(t.$t("market.login.inputPasswordAgain"))):a!==t.data.password?r(new Error(t.$t("market.login.passwordDiff"))):r()};return{data:{uid:window.localStorage.uid||"",activeCode:"",password:"",checkPass:"",captchaUrl:"",session:"",captcha:""},rules:(e={uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:o,trigger:"blur"}],password:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:r,trigger:"blur"}],checkPass:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"}]},Object(Io["a"])(e,"checkPass",[{validator:i,trigger:"blur"}]),Object(Io["a"])(e,"activeCode",[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"}]),e)}},methods:{show_login:function(){this.$router.push("/market/user/login")},reloadCaptcha:function(){var e=this;this.$market.call("cloud-user","captcha").then((function(t){e.data.captchaUrl="data:image/svg+xml;base64,"+t.ci.captchaBase64,e.data.session=t.ci.session})).catch((function(t){e.$message({message:t.err_msg,type:"error"})}))},resetPass:function(){var e=this;this.$refs["ruleForm"].validate((function(t){if(!t)return!1;e.$market.call("cloud-user","resetPassByActiveCode",{rp:{uid:e.data.uid,activeCode:e.data.activeCode,password:wo()(e.data.password),captcha:e.data.captcha,session:e.data.session}}).then((function(t){e.$message({message:e.$t("market.login.findPasswordSucc"),type:"success"}),window.localStorage.uid=e.data.uid,e.$router.push("/market/user/login")})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))}))}},mounted:function(){this.reloadCaptcha()}},ri=ai,oi=Object(w["a"])(ri,ei,ti,!1,null,null,null),ii=oi.exports,si=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("h1",{staticClass:"top_txt"},[e._v(e._s(e.$t("market.repo.resetPass")))]),a("el-form",{ref:"ruleForm",attrs:{"label-width":"120px",model:e.data,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.repo.inputPassword"),prop:"password",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.repo.passwordInfo"),"show-password":""},model:{value:e.data.password,callback:function(t){e.$set(e.data,"password",t)},expression:"data.password"}})],1),a("el-form-item",{attrs:{label:e.$t("market.repo.repeatPassword"),prop:"checkPass",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.repo.inputRepeatPassword"),"show-password":""},model:{value:e.data.checkPass,callback:function(t){e.$set(e.data,"checkPass",t)},expression:"data.checkPass"}})],1),a("el-button",{attrs:{type:"primary",size:"small",round:""},on:{click:e.createRepoUser}},[e._v(e._s(e.$t("market.repo.resetPass")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.back}},[e._v(e._s(e.$t("market.repo.back")))])])],1)],1)],1)},li=[],ni={name:"createRepoUser",data:function(){var e,t=this,a=function(e){var t=e.match(/^.*[A-Z]+.*$/);if(null==t)return!1;t=e.match(/^.*[a-z]+.*$/);if(null==t)return!1;t=e.match(/^.*[0-9]+.*$/);return null!=t},r=function(e,r,o){r.length<8?o(new Error(t.$t("market.repo.passwordInfo"))):a(r)?o():o(new Error(t.$t("market.repo.passwordInfo")))},o=function(e,a,r){""===a?r(new Error(t.$t("market.login.inputPasswordAgain"))):a!==t.data.password?r(new Error(t.$t("market.login.passwordDiff"))):r()};return{data:{uid:window.localStorage.uid||"",password:"",checkPass:""},rules:(e={password:[{required:!0,message:this.$t("market.repo.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.repo.passwordInfo"),trigger:"blur"},{validator:r,trigger:"blur"}],checkPass:[{required:!0,message:this.$t("market.repo.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.repo.passwordInfo"),trigger:"blur"}]},Object(Io["a"])(e,"checkPass",[{validator:o,trigger:"blur"}]),Object(Io["a"])(e,"activeCode",[{required:!0,message:this.$t("market.repo.inputPassword"),trigger:"blur"}]),e)}},methods:{back:function(){this.$router.go(-1)},createRepoUser:function(){var e=this;this.$refs["ruleForm"].validate((function(t){if(!t)return!1;e.$market.call("cloud-harbor","createRepoUser",{password:e.data.password}).then((function(t){e.$message({message:e.$t("market.repo.resetPassSucc"),type:"success"}),setTimeout((function(){e.$router.go(-1)}),1e3)})).catch((function(t){e.$message({message:e.$t("market.marketRet."+t.tars_ret||!1),type:"error"})}))}))}},mounted:function(){}},ci=ni,di=Object(w["a"])(ci,si,li,!1,null,null,null),ui=di.exports,pi=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"primary",size:"small"},on:{click:function(t){return e.showAddProject()}}},[e._v("娣诲姞椤圭洰")]),a("br"),a("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:e.data,stripe:"",border:""}},[a("el-table-column",{attrs:{prop:"project",label:"椤圭洰鍚嶇О","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return e.showListRepo(t.row.name)}}},[e._v(e._s(t.row.name))])]}}])}),a("el-table-column",{attrs:{prop:"repo_count",label:"闀滃儚浠撳簱鏁�","min-width":"100"}}),a("el-table-column",{attrs:{label:"寮€鍙戣€�","min-width":"800px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._l(t.row.uids,(function(r){return a("el-tag",{key:r,staticStyle:{"margin-right":"5px"},attrs:{closable:e.closable[r]},on:{close:function(a){return e.deleteMember(t.row,r)}}},[e._v(" "+e._s(r)+" ")])})),a("el-tag",{staticStyle:{cursor:"pointer"},on:{click:function(a){return e.showAddMember(t.row.name)}}},[e._v("+")])]}}])}),a("el-table-column",{attrs:{prop:"update_time",label:"鏇存柊鏃堕棿","min-width":"200"}}),a("el-table-column",{attrs:{label:"鎿嶄綔","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticStyle:{"text-align":"center"},attrs:{type:"danger",size:"small"},on:{click:function(a){return e.deleteProject(t.row)}}},[e._v("鍒犻櫎")])]}}])})],1),a("br"),a("div",[a("el-pagination",{staticStyle:{display:"inline"},attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.page_size,"current-page":e.page},on:{"update:pageSize":function(t){e.page_size=t},"update:page-size":function(t){e.page_size=t},"update:currentPage":function(t){e.page=t},"update:current-page":function(t){e.page=t},"current-change":e.changePage,"prev-click":e.changePage,"next-click":e.changePage}})],1),a("addProject",{ref:"addProject",on:{addProjectSucc:e.addProjectSucc}}),a("addMember",{ref:"addMember",on:{addMemberSucc:e.addMemberSucc}}),a("listRepo",{ref:"listRepo",on:{showListArtifacts:e.showListArtifacts}}),a("listArtifacts",{ref:"listArtifacts"})],1)},mi=[],fi=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"娣诲姞椤圭洰",visible:e.project.addDialogVisible,width:"500px"},on:{"update:visible":function(t){return e.$set(e.project,"addDialogVisible",t)}}},[a("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.project}},[a("el-form-item",{attrs:{required:"",label:"椤圭洰鍚嶇О",prop:"project","label-width":"200"}},[a("el-input",{attrs:{placeholder:"璇疯緭鍏ラ」鐩悕绉�",maxlength:"40","suffix-icon":e.suffixIcon},on:{input:e.inputProjectName},model:{value:e.project.project,callback:function(t){e.$set(e.project,"project",t)},expression:"project.project"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.project.addDialogVisible=!1}}},[e._v("鍙� 娑�")]),a("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("娣诲姞椤圭洰")])],1)],1)},hi=[],vi={name:"addProject",data:function(){var e=this,t=function(e){var t=e.match(/^.*[A-Z]|[a-z]+.*$/);return null!=t},a=function(a,r,o){t(r)?o():o(new Error(e.$t("market.repo.projectNameInfo")))};return{project:{addDialogVisible:!1,project:""},suffixIcon:"",interval:null,rules:{project:[{required:!0,message:"椤圭洰鍚嶇О涓嶈兘涓虹┖",trigger:"blur"},{message:this.$t("market.repo.projectNameRegTips"),trigger:"blur"},{validator:a,trigger:"blur"}]}}},methods:{show:function(){this.project.addDialogVisible=!0},closeDialog:function(){this.project.addDialogVisible=!1,this.$emit("addProjectSucc")},inputProjectName:function(e){var t=this;e&&(this.interval&&(clearTimeout(this.interval),this.interval=null),this.interval=setTimeout((function(){t.$market.call("cloud-harbor","hasProject",{project:e}).then((function(a){t.interval=null,e==t.project.project&&(a.exists?t.suffixIcon="el-icon-close":t.suffixIcon="el-icon-check")})).catch((function(e){}))}),500))},submit:function(){var e=this;this.$refs["ruleForm"].validate((function(t){t&&e.$market.call("cloud-harbor","createProject",{project:e.project.project}).then((function(t){e.$message({message:e.$t("market.repo.createProjectSucc"),type:"success"}),e.closeDialog()})).catch((function(t){e.$message({message:e.$t("market.marketRet."+t.tars_ret||!1),type:"error"})}))}))}},created:function(){},mounted:function(){}},gi=vi,bi=Object(w["a"])(gi,fi,hi,!1,null,null,null),$i=bi.exports,ki=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"鎺堟潈鐢ㄦ埛",visible:e.project.addDialogVisible,width:"500px"},on:{"update:visible":function(t){return e.$set(e.project,"addDialogVisible",t)}}},[a("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.project}},[a("el-form-item",{attrs:{required:"",label:"鐢ㄦ埛鍚�",prop:"uid","label-width":"200"}},[a("el-autocomplete",{staticStyle:{width:"100%"},attrs:{"fetch-suggestions":e.searchUserName,placeholder:"璇疯緭鍏ョ敤鎴峰悕","trigger-on-focus":!1,"suffix-icon":e.suffixIcon},on:{select:e.handleSelect},model:{value:e.project.uid,callback:function(t){e.$set(e.project,"uid",t)},expression:"project.uid"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.project.addDialogVisible=!1}}},[e._v("鍙� 娑�")]),a("el-button",{attrs:{type:"primary",disabled:"el-icon-check"!=e.suffixIcon},on:{click:e.submit}},[e._v("鎺堟潈鐢ㄦ埛")])],1)],1)},yi=[],Si={name:"addMember",data:function(){var e=this,t=function(t,a,r){var o=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(e.$t("market.login.userNameRegTips")));setTimeout((function(){o.test(a)?r():r(new Error(e.$t("market.login.userNameRegTips")))}),100)};return{project:{addDialogVisible:!1,project:"",uid:""},uids:[],suffixIcon:"",interval:null,rules:{uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:t,trigger:"blur"}]}}},methods:{show:function(e){this.project.project=e,this.project.uid="",this.project.addDialogVisible=!0},closeDialog:function(){this.project.addDialogVisible=!1,this.$emit("addMemberSucc")},searchUserName:function(e,t){var a=this;if(e){var r=this.uids.filter((function(t){return 0==t.toLowerCase().indexOf(e.toLowerCase())})),o=function(r){var o=[];r.forEach((function(e){o.push({value:e})})),r.length>0&&e==r[0]?a.suffixIcon="el-icon-check":a.suffixIcon="el-icon-close",t(o)};0==r.length&&e?this.$market.call("cloud-harbor","searchRepoUser",{userId:e}).then((function(e){a.uids=e.uids,o(a.uids)})).catch((function(e){})):o(r||[])}},handleSelect:function(e){this.suffixIcon="el-icon-check"},submit:function(){var e=this;this.$refs["ruleForm"].validate((function(t){t&&e.$market.call("cloud-harbor","addProjectDeveloper",{project:e.project.project,uid:e.project.uid}).then((function(t){e.$message({message:e.$t("market.repo.createMemberSucc"),type:"success"}),e.closeDialog()})).catch((function(t){e.$message({message:e.$t("market.marketRet."+t.tars_ret||!1),type:"error"})}))}))}},created:function(){},mounted:function(){var e=this;setInterval((function(){e.searchUserName()}),200)}},_i=Si,wi=Object(w["a"])(_i,ki,yi,!1,null,null,null),Mi=wi.exports,xi=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"浠撳簱鍒楄〃",visible:e.addDialogVisible,width:"80%"},on:{"update:visible":function(t){e.addDialogVisible=t}}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.repos,border:"",stripe:""}},[a("el-table-column",{attrs:{label:"闀滃儚浠撳簱鍚嶇О","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return e.showListArtifacts(t.row.name)}}},[e._v(e._s(t.row.name))])]}}])}),a("el-table-column",{attrs:{prop:"artifact_count",label:"Artifacts"}}),a("el-table-column",{attrs:{prop:"pull_count",label:"涓嬭浇鏁�","min-width":"50"}}),a("el-table-column",{attrs:{prop:"update_time",label:"鍙樻洿鏃堕棿","min-width":"200"}}),a("el-table-column",{attrs:{label:"鎿嶄綔","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticStyle:{"text-align":"center"},attrs:{type:"danger",size:"small"},on:{click:function(a){return e.deleteRepo(t.row)}}},[e._v("鍒犻櫎")])]}}])})],1),a("br"),a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.page_size,"current-page":e.page},on:{"update:pageSize":function(t){e.page_size=t},"update:page-size":function(t){e.page_size=t},"update:currentPage":function(t){e.page=t},"update:current-page":function(t){e.page=t},"current-change":e.changePage,"prev-click":e.changePage,"next-click":e.changePage}})],1)},Ci=[],Ni={name:"ListRepo",components:{},data:function(){return{project:"",repos:[],total:0,page_size:15,page:1,addDialogVisible:!1}},methods:{show:function(e){this.project=e,this.fetchRepoList(),this.addDialogVisible=!0},showListArtifacts:function(e){this.$emit("showListArtifacts",this.project,e)},changePage:function(e){this.page=e,this.fetchRepoList()},fetchRepoList:function(){var e=this;this.$loading.show(),this.$market.call("cloud-harbor","getRepositoryList",{project:this.project,page_size:this.page_size,page:this.page}).then((function(t){t.info.gList.forEach((function(e){e.update_time=R()(e.update_time).format("YYYY-MM-DD HH:mm:ss"),e.create_time=R()(e.create_time).format("YYYY-MM-DD HH:mm:ss")})),e.total=t.info.total,e.repos=t.info.gList,e.$loading.hide()})).catch((function(t){e.$loading.hide(),e.$message({message:e.$t("market.marketRet."+t.tars_ret||!1),type:"error"})}))},deleteRepo:function(e){var t=this;this.$confirm("纭畾鍙栨秷璇ラ暅鍍忎粨搴撲箞?","鎻愮ず",{confirmButtonText:"纭畾",cancelButtonText:"鍙栨秷",type:"warning"}).then((function(){t.$market.call("cloud-harbor","delRepository",{project:t.project,repo:e.repo.substr(t.repo.length+1)}).then((function(e){t.$message({message:t.$t("market.repo.deleteRepoSucc"),type:"success"}),t.fetchRepoList()})).catch((function(e){t.$message({message:t.$t("market.marketRet."+e.tars_ret||!1),type:"error"})}))})).catch((function(){}))}},created:function(){},mounted:function(){}},Li=Ni,Ti=Object(w["a"])(Li,xi,Ci,!1,null,null,null),Ii=Ti.exports,Ai=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"Artifacts",visible:e.addDialogVisible,width:"80%"},on:{"update:visible":function(t){e.addDialogVisible=t}}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.artifacts,border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"digest_short",label:"digest","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"}},[e._v(e._s(t.row.digest_short))])]}}])}),a("el-table-column",{attrs:{label:"tag","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.tags,(function(t){return a("el-tag",{key:t,staticStyle:{"margin-right":"5px"}},[e._v(" "+e._s(t)+" ")])}))}}])}),a("el-table-column",{attrs:{prop:"push_time",label:"鎺ㄩ€佹椂闂�","min-width":"100"}}),a("el-table-column",{attrs:{prop:"pull_time",label:"鎷夊彇鏃堕棿","min-width":"100"}}),a("el-table-column",{attrs:{label:"鎿嶄綔","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticStyle:{"text-align":"center"},attrs:{type:"danger",size:"small"},on:{click:function(a){return e.deleteArtifact(t.row)}}},[e._v("鍒犻櫎")])]}}])})],1),a("br"),a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.page_size,"current-page":e.page},on:{"update:pageSize":function(t){e.page_size=t},"update:page-size":function(t){e.page_size=t},"update:currentPage":function(t){e.page=t},"update:current-page":function(t){e.page=t},"current-change":e.changePage,"prev-click":e.changePage,"next-click":e.changePage}})],1)},Di=[],Pi={name:"ListArtifacts",components:{},data:function(){return{project:"",name:"",artifacts:[],total:0,page_size:5,page:1,addDialogVisible:!1}},methods:{show:function(e,t){this.project=e,this.repo=t,this.fetchArtifactsList(),this.addDialogVisible=!0},changePage:function(e){this.page=e,this.fetchArtifactsList()},fetchArtifactsList:function(){var e=this;this.$loading.show(),this.$market.call("cloud-harbor","getArtifactsList",{project:this.project,repo:this.repo.substr(this.project.length+1),page_size:this.page_size,page:this.page}).then((function(t){t.info.gList.forEach((function(e){e.digest_short=e.digest.substr(0,17),e.pull_time=R()(e.pull_time).format("YYYY-MM-DD HH:mm:ss"),e.push_time=R()(e.push_time).format("YYYY-MM-DD HH:mm:ss")})),e.total=t.info.total,e.artifacts=t.info.gList,e.$loading.hide()})).catch((function(t){e.$message({message:e.$t("market.marketRet."+t.tars_ret||!1),type:"error"}),e.$loading.hide()}))},deleteArtifact:function(e){var t=this;this.$confirm("纭畾鍙栨秷璇rtifact涔�?","鎻愮ず",{confirmButtonText:"纭畾",cancelButtonText:"鍙栨秷",type:"warning"}).then((function(){t.$loading.show(),t.$market.call("cloud-harbor","delArtifacts",{project:t.project,repo:t.repo.substr(t.project.length+1),reference:e.digest}).then((function(e){t.$message({message:t.$t("market.repo.deleteArtifactSucc"),type:"success"}),t.$loading.hide(),t.fetchArtifactsList()})).catch((function(e){t.$message({message:t.$t("market.marketRet."+e.tars_ret||!1),type:"error"}),t.$loading.hide()}))})).catch((function(){}))}},created:function(){},mounted:function(){}},Oi=Pi,qi=Object(w["a"])(Oi,Ai,Di,!1,null,null,null),ji=qi.exports,zi={name:"ListProject",components:{addProject:$i,addMember:Mi,listRepo:Ii,listArtifacts:ji},data:function(){return{data:[],total:0,page_size:2,page:1,closable:{}}},methods:{showAddProject:function(){this.$refs.addProject.show()},showAddMember:function(e){this.$refs.addMember.show(e)},showListRepo:function(e){this.$refs.listRepo.show(e)},showListArtifacts:function(e,t){this.$refs.listArtifacts.show(e,t)},addMemberSucc:function(){this.fetchProjects()},addProjectSucc:function(){this.fetchProjects()},deleteMember:function(e,t){var a=this;this.$confirm("纭畾鍙栨秷璇ョ敤鎴风殑鏉冮檺涔�?","鎻愮ず",{confirmButtonText:"纭畾",cancelButtonText:"鍙栨秷",type:"warning"}).then((function(){a.$market.call("cloud-harbor","delProjectDeveloper",{project:e.name,uid:t}).then((function(r){a.$message({message:a.$t("market.repo.deleteMemberSucc"),type:"success"}),e.uids.splice(e.uids.indexOf(t),1)})).catch((function(e){a.$message({message:a.$t("market.marketRet."+e.tars_ret||!1),type:"error"})}))})).catch((function(){}))},deleteProject:function(e){var t=this;this.$confirm("纭畾鍒犻櫎璇ラ」鐩箞?","鎻愮ず",{confirmButtonText:"纭畾",cancelButtonText:"鍙栨秷",type:"warning"}).then((function(){t.$market.call("cloud-harbor","delProject",{project:e.name}).then((function(e){t.$message({message:t.$t("market.repo.deleteProjectSucc"),type:"success"}),t.fetchProjects()})).catch((function(e){t.$message({message:t.$t("market.marketRet."+e.tars_ret||!1),type:"error"})}))})).catch((function(){}))},changePage:function(e){this.page=e,this.fetchProjects()},fetchProjects:function(){var e=this;this.$loading.show(),this.$market.call("cloud-harbor","getProjectList",{page_size:this.page_size,page:this.page}).then((function(t){e.data=t.info.gList,e.data.forEach((function(t){t.update_time=R()(t.update_time).format("YYYY-MM-DD HH:mm:ss"),t.uids.forEach((function(t){e.closable[t]=t!=window.localStorage.uid}))})),e.total=t.info.total,e.$loading.hide()})).catch((function(t){e.$loading.hide(),e.$message({message:e.$t("market.marketRet."+t.tars_ret||!1),type:"error"})}))}},created:function(){},mounted:function(){this.fetchProjects()}},Vi=zi,Ei=(a("0810"),Object(w["a"])(Vi,pi,mi,!1,null,null,null)),Ri=Ei.exports,Bi=A["a"].prototype.push;A["a"].prototype.push=function(e){return Bi.call(this,e).catch((function(e){return e}))},r["default"].use(A["a"]);var Hi=new A["a"]({routes:[{path:"/server",name:"Server",component:_t,children:[{path:":treeid/manage",component:Be},{path:":treeid/history",component:mt},{path:":treeid/publish",component:Ze},{path:":treeid/config",component:rt},{path:":treeid/server-monitor",component:ot["a"]},{path:":treeid/property-monitor",component:it["a"]},{path:":treeid/interface-debuger",component:st["a"]},{path:":treeid/user-manage",component:lt["a"]}]},{path:"/operation",name:"Operation",component:Tt,redirect:"/operation/deploy",children:[{path:"deploy",component:Rt},{path:"approval",component:Ut},{path:"history",component:ea},{path:"undeploy",component:sa},{path:"templates",component:pa},{path:"image",component:ba},{path:"affinity",component:wa},{path:"application",component:Ta},{path:"business",component:qa},{path:"node",component:Ua},{path:"event",component:er},{path:"tfc",component:sr}]},{path:"/gateway",name:"Gateway",component:lr["a"]},{path:"/market/user",name:"MarketIndex",component:mr,children:[{path:"login",component:No},{path:"register",component:Oo},{path:"activate",component:Ro},{path:"forget",component:Ko},{path:"modifyPass",component:Xo},{path:"resetPass",component:ii}]},{path:"/market/repo",name:"MarketRepo",component:mr,children:[{path:"pass",component:ui},{path:"project",component:Ri}]},{path:"/market/service",component:$r,children:[{path:":group/:name/:version",component:ko}]},{path:"/market/list",component:$r,children:[{path:"/",component:Dr}]},{path:"*",redirect:"/server"}],scrollBehavior:function(e,t,a){return{x:0,y:0}}}),Fi=a("5c96"),Ji=a.n(Fi),Yi=(a("a082"),a("0808"),a("6944")),Ki=a.n(Yi);r["default"].config.productionTip=!1,y["b"].call(void 0).then((function(){r["default"].use(Ki.a),r["default"].use(Ji.a,{i18n:function(e,t){return y["a"].t(e,t)}}),new r["default"]({i18n:y["a"],el:"#app",router:Hi,store:o["a"],components:{k8sApp:I},template:"<k8sApp/>"})}))},"4e15":function(e,t,a){"use strict";var r=a("0d43"),o=a.n(r);o.a},"5bc8":function(e,t,a){},"5d82":function(e,t,a){"use strict";var r=a("ff5a"),o=a.n(r);o.a},"5dd2":function(e,t,a){"use strict";var r=a("af03"),o=a.n(r);o.a},"5de2":function(e,t,a){"use strict";var r=a("c37c"),o=a.n(r);o.a},"5e23":function(e,t,a){},"626e":function(e,t,a){},"67f3":function(e,t,a){},"6c7a":function(e,t,a){"use strict";var r=a("0dbe"),o=a.n(r);o.a},"6e59":function(e,t,a){},"7b9a":function(e,t,a){"use strict";var r=a("24ee"),o=a.n(r);o.a},"83a3":function(e,t,a){},8636:function(e,t,a){},8924:function(e,t,a){},"8f5f":function(e,t,a){},"98b3":function(e,t,a){"use strict";var r=a("e779"),o=a.n(r);o.a},"9df2":function(e,t,a){"use strict";var r=a("8924"),o=a.n(r);o.a},a462:function(e,t,a){"use strict";var r=a("2d59"),o=a.n(r);o.a},ad4b:function(e,t,a){},ae6e:function(e,t,a){},af03:function(e,t,a){},afb9:function(e,t,a){"use strict";var r=a("3d87"),o=a.n(r);o.a},b2b3:function(e,t,a){},b50eb:function(e,t,a){"use strict";var r=a("c26a"),o=a.n(r);o.a},be1a:function(e,t,a){},c219:function(e,t,a){"use strict";var r=a("168e"),o=a.n(r);o.a},c26a:function(e,t,a){},c2e9:function(e,t,a){"use strict";var r=a("5bc8"),o=a.n(r);o.a},c2e92:function(e,t,a){"use strict";var r=a("8636"),o=a.n(r);o.a},c37c:function(e,t,a){},c3f0:function(e,t,a){"use strict";var r=a("e5f7"),o=a.n(r);o.a},c49e:function(e,t,a){},c762:function(e,t,a){"use strict";var r=a("ad4b"),o=a.n(r);o.a},c914:function(e,t,a){"use strict";var r=a("2c1d"),o=a.n(r);o.a},ca4b:function(e,t,a){},ca6f:function(e,t,a){"use strict";var r=a("6e59"),o=a.n(r);o.a},cb44:function(e,t,a){"use strict";var r=a("5e23"),o=a.n(r);o.a},cdeb:function(e,t,a){"use strict";var r=a("67f3"),o=a.n(r);o.a},da9f:function(e,t,a){"use strict";var r=a("ae6e"),o=a.n(r);o.a},e5f7:function(e,t,a){},e779:function(e,t,a){},e81f:function(e,t,a){"use strict";var r=a("ca4b"),o=a.n(r);o.a},e93e:function(e,t,a){},f333:function(e,t,a){"use strict";var r=a("437c"),o=a.n(r);o.a},ff5a:function(e,t,a){}});
\ No newline at end of file
diff --git a/client/dist/static/js/logView.4cf037ad.js b/client/dist/static/js/logView.4cf037ad.js
deleted file mode 100644
index 55a84833..00000000
--- a/client/dist/static/js/logView.4cf037ad.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(e){function t(t){for(var o,s,c=t[0],a=t[1],l=t[2],p=0,d=[];p<c.length;p++)s=c[p],Object.prototype.hasOwnProperty.call(r,s)&&r[s]&&d.push(r[s][0]),r[s]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);u&&u(t);while(d.length)d.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],o=!0,c=1;c<n.length;c++){var a=n[c];0!==r[a]&&(o=!1)}o&&(i.splice(t--,1),e=s(s.s=n[0]))}return e}var o={},r={logView:0},i=[];function s(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=e,s.c=o,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)s.d(n,o,function(t){return e[t]}.bind(null,o));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/";var c=window["webpackJsonp"]=window["webpackJsonp"]||[],a=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var u=a;i.push([8,"chunk-vendors","chunk-common"]),n()})({"4b42":function(e,t,n){},5805:function(e,t,n){"use strict";n.r(t);n("e260"),n("e6cf"),n("cca6"),n("a79d");var o=n("a026"),r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("logView")},i=[],s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"xterm-container",attrs:{id:"xterm"}})},c=[],a=(n("ac1f"),n("841c"),n("1276"),n("abb2"),n("fcf3")),l=n("47d0"),u=n("408b"),p={data:function(){return{pingOk:!0,resize:!1,term:"",socket:"",app:"",server:"",pod:"",history:"",nodeip:""}},mounted:function(){this.app=this.getQueryVariable("ServerApp"),this.server=this.getQueryVariable("ServerName"),this.pod=this.getQueryVariable("PodName"),this.history=this.getQueryVariable("History"),this.nodeip=this.getQueryVariable("NodeIP");var e=window.location.search.substring(1);"http:"==window.location.protocol?this.init("ws://"+window.location.host+"/shell?"+e):"https:"==window.location.protocol?this.init("wss://"+window.location.host+"/shell?"+e):console.log("unknown protocol",window.location)},methods:{debounce:function(e,t){var n=null;return function(){null!==n&&clearTimeout(n),n=setTimeout(e,t)}},resizeScreen:function(){var e=new l["FitAddon"];this.term.loadAddon(e),e.fit(),this.send(JSON.stringify({operation:"resize",width:Math.floor(this.term.cols),height:Math.floor(this.term.rows)}))},ping:function(){var e=this;this.pingOk?(this.pingOk=!1,this.send(JSON.stringify({operation:"ping"})),setTimeout((function(){console.log("ping"),e.ping()}),5e3)):location.reload()},getQueryVariable:function(e){for(var t=window.location.search.substring(1),n=t.split("&"),o=0;o<n.length;o++){var r=n[o].split("=");if(r[0]==e)return r[1]}return!1},initXterm:function(){this.term=new a["Terminal"]({rendererType:"canvas",convertEol:!0,scrollback:2e3,disableStdin:!1,cursorStyle:"block",cursorBlink:!0}),this.term.open(document.getElementById("xterm")),this.resizeScreen(),this.term.loadAddon(new u["WebLinksAddon"]),window.addEventListener("resize",this.debounce(this.resizeScreen,1e3),!1),this.term.focus();var e=this;this.term.onData((function(t){var n={operation:"stdin",data:t};e.socket.onsend(JSON.stringify(n)),e.resize||(e.resize=!0,e.resizeScreen())}))},init:function(e){var t=this;this.socket=new WebSocket(e,"echo-protocol"),this.socket.onopen=this.open,this.socket.onerror=this.error,this.socket.onmessage=this.getMessage,this.socket.onsend=this.send,setTimeout((function(){t.ping()}),5e3)},open:function(){this.initXterm(),this.term.writeln("connecting to pod  ".concat(this.pod,"  ... \r\n"))},error:function(){console.log("[error] Connection error"),setTimeout((function(){location.reload()}),1e3)},close:function(){this.socket.close(),console.log("[close] Connection closed cleanly"),term.writeln(""),window.removeEventListener("resize",this.resizeScreen)},getMessage:function(e){var t=e.data&&JSON.parse(e.data);"stdout"===t.operation?this.term.write(t.data):"pong"===t.operation&&(this.pingOk=!0)},send:function(e){this.socket.send(e)}}},d=p,h=(n("a950"),n("2877")),f=Object(h["a"])(d,s,c,!1,null,null,null),g=f.exports,m={components:{logView:g},data:function(){return{}}},w=m,b=Object(h["a"])(w,r,i,!1,null,null,null),v=b.exports;n("b3f5");o["default"].config.productionTip=!1,new o["default"]({el:"#app",components:{App:v},template:"<App/>"})},8:function(e,t,n){e.exports=n("5805")},a950:function(e,t,n){"use strict";var o=n("4b42"),r=n.n(o);r.a}});
\ No newline at end of file
diff --git a/client/dist/static/js/login.3cb8edbf.js b/client/dist/static/js/login.3cb8edbf.js
deleted file mode 100644
index 66200bf0..00000000
--- a/client/dist/static/js/login.3cb8edbf.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(t){function e(e){for(var a,o,c=e[0],l=e[1],s=e[2],p=0,d=[];p<c.length;p++)o=c[p],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&d.push(r[o][0]),r[o]=0;for(a in l)Object.prototype.hasOwnProperty.call(l,a)&&(t[a]=l[a]);u&&u(e);while(d.length)d.shift()();return i.push.apply(i,s||[]),n()}function n(){for(var t,e=0;e<i.length;e++){for(var n=i[e],a=!0,c=1;c<n.length;c++){var l=n[c];0!==r[l]&&(a=!1)}a&&(i.splice(e--,1),t=o(o.s=n[0]))}return t}var a={},r={login:0},i=[];function o(e){if(a[e])return a[e].exports;var n=a[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=a,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)o.d(n,a,function(e){return t[e]}.bind(null,a));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/";var c=window["webpackJsonp"]=window["webpackJsonp"]||[],l=c.push.bind(c);c.push=e,c=c.slice();for(var s=0;s<c.length;s++)e(c[s]);var u=l;i.push([4,"chunk-vendors","chunk-common"]),n()})({"39b4":function(t,e,n){},4:function(t,e,n){t.exports=n("adec")},"82c5":function(t,e,n){"use strict";var a=n("39b4"),r=n.n(a);r.a},adec:function(t,e,n){"use strict";n.r(e);n("e260"),n("e6cf"),n("cca6"),n("a79d");var a=n("a026"),r=(n("42a1"),n("b3f5"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"login-page"},[n("div",{staticClass:"login-page_wrap"},[n("h1",{staticClass:"top-title"},[t._v(" "+t._s(t.$t("login.loginTitle"))+" "),n("div",{staticClass:"locale-wrap"},[n("locale-select")],1)]),n("let-form",{ref:"form",attrs:{inline:"","label-position":"top",itemWidth:"440px"},nativeOn:{submit:function(e){return e.preventDefault(),t.login(e)}}},[n("let-form-item",{attrs:{label:t.$t("login.userName"),required:""}},[n("let-input",{attrs:{size:"small",required:"","required-tip":t.$t("login.userNameTips"),pattern:"^[a-zA-Z0-9_]+$","pattern-tip":t.$t("login.userNameRegTips")},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.login(e)}},model:{value:t.uid,callback:function(e){t.uid=e},expression:"uid"}})],1),n("let-form-item",{attrs:{label:t.$t("login.password"),required:""}},[n("let-input",{attrs:{type:"password",size:"small",required:"","required-tip":t.$t("login.passwordTips")},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.login(e)}},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1),n("let-form-item",{attrs:{label:t.$t("login.captcha"),required:""}},[n("div",{staticClass:"captcha_box"},[n("let-input",{attrs:{type:"text",size:"small",required:"","required-tip":t.$t("login.captchaTips")},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.login(e)}},model:{value:t.captcha,callback:function(e){t.captcha=e},expression:"captcha"}}),n("img",{staticClass:"captcha_code",attrs:{title:"鐐瑰嚮鍒锋柊",src:t.captchaUrl},on:{click:t.reloadCaptcha}})],1)]),n("let-button",{staticClass:"btn_long",attrs:{type:"submit",theme:"primary"}},[t._v(t._s(t.$t("login.login")))])],1)],1)])}),i=[],o=(n("99af"),n("4160"),n("c975"),n("ac1f"),n("841c"),n("1276"),n("159b"),n("00b0")),c=n("58b7"),l=n.n(c),s={name:"loginPage",data:function(){return{uid:"",password:"",captcha:"",enableLdap:!1,captchaUrl:"/captcha?".concat(Math.random())}},computed:{redirectUrl:function(){return this.getQueryParam("redirect_url","/")}},components:{localeSelect:o["a"]},methods:{checkEnableLdap:function(){var t=this;this.$ajax.getJSON("/server/api/isEnableLdap").then((function(e){t.enableLdap=e.enableLdap||!1})).catch((function(t){}))},login:function(){var t=this;if(this.$refs.form.validate()){var e=this.password;this.enableLdap&&"admin"!=this.uid||(e=l()(this.password));var n=this.$Loading.show();this.$ajax.postJSON("/server/api/login",{uid:this.uid,password:e,captcha:this.captcha}).then((function(e){n.hide();var a=t.redirectUrl,r=a+(-1===a.indexOf("?")?"?":"&")+"ticket="+e.ticket;location.href=r})).catch((function(e){n.hide(),t.$tip.error("".concat(t.$t("login.loginFailed"),": ").concat(e.err_msg||e.message))}))}},getQueryParam:function(t,e){if(!t)return e;var n=e,a=window.location.search?window.location.search.substr(1):"";return a&&a.split("&").forEach((function(e){var a=e.split("=");a[0]==t&&(n=decodeURIComponent(a[1]))})),n},reloadCaptcha:function(){this.captchaUrl="/captcha?".concat(Math.random())}},mounted:function(){this.uid=this.getQueryParam("user",""),this.checkEnableLdap()}},u=s,p=(n("82c5"),n("2877")),d=Object(p["a"])(u,r,i,!1,null,null,null),f=d.exports,h=n("f51c");a["default"].config.productionTip=!1,h["b"].call(void 0).then((function(){new a["default"]({el:"#login-app",i18n:h["a"],components:{login:f},template:"<login/>"})}))}});
\ No newline at end of file
diff --git a/client/dist/static/js/pass.22f09659.js b/client/dist/static/js/pass.22f09659.js
deleted file mode 100644
index 8a8f85d8..00000000
--- a/client/dist/static/js/pass.22f09659.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(e){function t(t){for(var n,o,i=t[0],p=t[1],l=t[2],u=0,d=[];u<i.length;u++)o=i[u],Object.prototype.hasOwnProperty.call(s,o)&&s[o]&&d.push(s[o][0]),s[o]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);c&&c(t);while(d.length)d.shift()();return a.push.apply(a,l||[]),r()}function r(){for(var e,t=0;t<a.length;t++){for(var r=a[t],n=!0,i=1;i<r.length;i++){var p=r[i];0!==s[p]&&(n=!1)}n&&(a.splice(t--,1),e=o(o.s=r[0]))}return e}var n={},s={pass:0},a=[];function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],p=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var c=p;a.push([7,"chunk-vendors","chunk-common"]),r()})({"197c":function(e,t,r){"use strict";var n=r("a511"),s=r.n(n);s.a},7:function(e,t,r){e.exports=r("d5fd")},a511:function(e,t,r){},d5fd:function(e,t,r){"use strict";r.r(t);r("e260"),r("e6cf"),r("cca6"),r("a79d");var n=r("a026"),s=(r("42a1"),r("b3f5"),function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"pass_page"},[r("h1",{staticClass:"top-title"},[e._v(" "+e._s(e.$t("pass.title"))+" "),r("div",{staticClass:"locale-wrap"},[r("locale-select")],1)]),r("let-form",{ref:"form",attrs:{inline:"","label-position":"top",itemWidth:"440px"},nativeOn:{submit:function(t){return t.preventDefault(),e.modify(t)}}},[r("let-form-item",{attrs:{label:e.$t("pass.password"),required:""}},[r("let-input",{attrs:{type:"password",size:"small",required:"","required-tip":e.$t("pass.passwordTips")},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.register(t)}},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}})],1),r("let-form-item",{attrs:{label:e.$t("pass.repeatPassword"),required:""}},[r("let-input",{attrs:{type:"password",size:"small",required:"","required-tip":e.$t("pass.repeatPasswordTips")},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.register(t)}},model:{value:e.repeatPassword,callback:function(t){e.repeatPassword=t},expression:"repeatPassword"}})],1),r("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("pass.modify")))]),r("let-button",{staticStyle:{float:"right","margin-right":"12px"},attrs:{type:"button"},on:{click:function(t){return t.preventDefault(),e.toIndexPage(t)}}},[e._v(e._s(e.$t("pass.toIndexPage")))])],1)],1)}),a=[],o=(r("99af"),r("00b0")),i=r("58b7"),p=r.n(i),l={name:"pass_page",data:function(){return{password:"",repeatPassword:""}},components:{localeSelect:o["a"]},methods:{modify:function(){var e=this;if(this.$refs.form.validate())if(this.checkRepeatPwdValid()){var t=this.$Loading.show(),r=p()(this.password);this.$ajax.postJSON("/server/api/modifyPass",{password:r,repeat_password:r}).then((function(r){t.hide(),e.$tip.success("".concat(e.$t("pass.modifySucc"))),setTimeout((function(){e.toIndexPage()}),1e3)})).catch((function(r){t.hide(),e.$tip.error("".concat(e.$t("pass.modifyFailed"),": ").concat(r.err_msg||r.message))}))}else this.$tip.error("".concat(this.$t("pass.passwordDiff")))},checkRepeatPwdValid:function(){return this.repeatPassword===this.password},toIndexPage:function(){location.href="/index.html"}}},c=l,u=(r("197c"),r("2877")),d=Object(u["a"])(c,s,a,!1,null,null,null),f=d.exports,h=r("f51c");n["default"].config.productionTip=!1,h["b"].call(void 0).then((function(){new n["default"]({el:"#pass-app",i18n:h["a"],components:{pass:f},template:"<pass/>"})}))}});
\ No newline at end of file
diff --git a/client/src/pages/dcacheOperation/deploy.vue b/client/src/pages/dcacheOperation/deploy.vue
index 07de5f7b..93bdc19f 100644
--- a/client/src/pages/dcacheOperation/deploy.vue
+++ b/client/src/pages/dcacheOperation/deploy.vue
@@ -387,7 +387,7 @@ export default {
         const model = this.model;
 
         const loading = this.$Loading.show();
-        this.$ajax.getJSON('/server/api/server_exist', {
+        this.$ajax.postJSON('/server/api/server_exist', {
           application: model.application,
           server_name: model.server_name,
           node_name: model.server_name,
diff --git a/client/src/pages/operation/deploy.vue b/client/src/pages/operation/deploy.vue
index 4a6ff84d..1e93fe9c 100644
--- a/client/src/pages/operation/deploy.vue
+++ b/client/src/pages/operation/deploy.vue
@@ -38,13 +38,13 @@
                     <let-option v-for="d in types" :key="d" :value="d">{{d}}</let-option>
                 </let-select>
             </let-form-item>
-
+<!--
             <div style="float: right">
                 <let-button type="button" theme="primary" @click="showBatchDeployModal()">
                     {{$t('deployService.form.batchDeploy')}}
                 </let-button>
             </div>
-
+-->
             <let-form-item :label="$t('deployService.form.template')" required>
                 <let-select
                         size="small"
@@ -512,22 +512,34 @@ export default {
       if(this.model.application == '') {
         this.model.application = application;
       }
-                let appReg = new RegExp("^[a-zA-Z]([a-zA-Z0-9]+)?$");
-                if (!this.applicationList.includes(this.model.application) || !appReg.test(this.model.application)) {
-                    this.$tip.error(`${this.$t('deployService.form.applicationTip')}`);
-                    return;
-                }
+
+      let appReg = new RegExp("^[a-zA-Z]([a-zA-Z0-9]+)?$");
+      if (!this.applicationList.includes(this.model.application) || !appReg.test(this.model.application)) {
+          this.$tip.error(`${this.$t('deployService.form.applicationTip')}`);
+          return;
+      }
+
       if (this.$refs.form.validate()) {
         const model = this.model;
 
         const loading = this.$Loading.show();
-        this.$ajax.getJSON('/server/api/server_exist', {
+
+        let node_names = [];
+        model.adapters.forEach(a=>{
+          node_names.push(a.node_name);
+        });
+
+        this.$ajax.postJSON('/server/api/server_exist', {
           application: model.application,
           server_name: model.server_name,
-          //node_name: model.node_name,
-        }).then((isExists) => {
+          node_names: node_names,
+        }).then((data) => {
           loading.hide();
-          if (isExists) {
+
+          // console.log(data, model.adapters);
+
+          
+          if (data) {
             this.$tip.error(this.$t('deployService.form.nameTips'));
           } else {
             this.deploy();
diff --git a/config/webConf.js b/config/webConf.js
index d8a291ef..7dfc5117 100644
--- a/config/webConf.js
+++ b/config/webConf.js
@@ -110,7 +110,30 @@ if (process.env.NODE_ENV == "local") {
     conf.client = path.join(cwd, 'config/tars-dev.conf');
     process.env.ENABLE_K8S = "false";
 
-} else if (process.env.NODE_ENV == "dev") {
+}
+else if (process.env.NODE_ENV == "remote") {
+
+    conf.dbConf = {
+        host: '172.30.0.4', // 鏁版嵁搴撳湴鍧€
+        port: '3306', // 鏁版嵁搴撶鍙�
+        user: 'tarsAdmin', // 鐢ㄦ埛鍚�
+        password: 'Tars@2019', // 瀵嗙爜
+        charset: 'utf8', // 鏁版嵁搴撶紪鐮�
+        pool: {
+            max: 10, // 杩炴帴姹犱腑鏈€澶ц繛鎺ユ暟閲�
+            min: 0, // 杩炴帴姹犱腑鏈€灏忚繛鎺ユ暟閲�
+            idle: 10000 // 濡傛灉涓€涓嚎绋� 10 绉掗挓鍐呮病鏈夎浣跨敤杩囩殑璇濓紝閭d箞灏遍噴鏀剧嚎绋�
+        }
+    };
+
+    conf.webConf.host = '0.0.0.0';
+    conf.webConf.port = 3000;
+    conf.webConf.alter = true;
+
+    conf.client = path.join(cwd, 'config/tars-remote.conf');
+    process.env.ENABLE_K8S = "false";
+
+}else if (process.env.NODE_ENV == "dev") {
 
     conf.dbConf = {
         host: '172.16.8.227', // 鏁版嵁搴撳湴鍧€
diff --git a/package.json b/package.json
index b25ad434..9c88d8d0 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
         "start": "node bin/www",
         "startc": "./node_modules/.bin/nodemon bin/www",
         "local": "cross-env NODE_ENV=local ./node_modules/.bin/nodemon bin/www",
+        "remote": "cross-env NODE_ENV=remote ./node_modules/.bin/nodemon bin/www",
         "dev": "cross-env NODE_ENV=dev ./node_modules/.bin/nodemon bin/www",
         "k8s": "cross-env NODE_ENV=k8s ./node_modules/.bin/nodemon bin/www",
         "kdev": "cross-env NODE_ENV=kdev ./node_modules/.bin/nodemon bin/www",
-- 
GitLab