Commit bb50f737 authored by combineli's avatar combineli
Browse files

配种中心

parent 4636fea5
Showing with 2277 additions and 396 deletions
+2277 -396
......@@ -74,8 +74,12 @@ if (dcacheConf.enableDcache) {
app.use(async (ctx, next) => {
await next(); ctx.cookies.set('dcache', 'true')
});
// tars-dcache 的包,依赖了很多tars的模块,引用路径是从根目录开始的,防止引用出错,先改后更
let cwd = process.cwd();
process.chdir('./');
// let tarsDcache = require('./../../../nodejs_modules/tars-dcache');
let tarsDcache = require('@tencent/tars-dcache');
process.chdir(cwd);
}
//激活router
......
......@@ -80,7 +80,7 @@ ServerDao.getServerConfByTemplate = async(templateName) => {
})
};
ServerDao.getServerConf4Tree = async(applicationList, serverNameList) => {
ServerDao.getServerConf4Tree = async(applicationList, serverNameList, allAttr) => {
let where = {$or: []};
if (!!applicationList) {
where.$or.push({application: applicationList});
......@@ -91,12 +91,20 @@ ServerDao.getServerConf4Tree = async(applicationList, serverNameList) => {
if (!applicationList && !serverNameList) {
where = {};
}
return await tServerConf.findAll({
attributes: [[Sequelize.literal('distinct `application`'), 'application'],
let option = {};
option.where = where;
if (allAttr) {
} else {
option.attributes = [[Sequelize.literal('distinct `application`'), 'application'],
'server_name', 'enable_set', 'set_name', 'set_area', 'set_group'
],
where: where
});
]
}
return await tServerConf.findAll(option);
};
......
......@@ -109,6 +109,11 @@ ServerService.getNodeNameList = async(params)=> {
return await ServerDao.getNodeNameList(params);
};
// 用服务名数组去获取服务列表
ServerService.getServerNameList = async({applicationList, serverNameList, allAttr=false})=> {
return await ServerDao.getServerConf4Tree(applicationList, serverNameList, allAttr);
};
ServerService.addServerConf = async(params)=> {
let transaction = await ServerDao.sequelize.transaction();
try{
......
......@@ -14,7 +14,7 @@
* specific language governing permissions and limitations under the License.
*/
// **********************************************************************
// **********************************************************************
// This file was generated by a TARS parser!
// TARS version 1.1.0.
// **********************************************************************
......
......@@ -265,6 +265,35 @@ struct TransferRsp
};
struct CacheConfigReq
{
0 optional string id; // config item 表索引id
1 optional string remark; // 备注
2 optional string item; // 配置项名,如:ObjName
3 optional string path; // 配置项路径,如:Main, Main/Cache
4 optional string reload; // 重载配置值
5 optional string period; // 公共配置-U, 一期配置-T, 二期配置-MK
};
struct ServerConfigReq
{
0 optional string appName; // 应用名,如:TestApp
1 optional string moduleName; // 模块名,如:TestAppModule1
2 optional string serverName; // 服务名,如:DCache.TestAppModule1TCache1-1
3 optional string nodeName; // 服务节点ip
4 optional string itemId; // config item 表索引id
5 optional string configValue; // 配置值
6 optional string configFlag; // 默认填 0
7 optional string lastUser; // 最后修改配置的用户名,默认 system
8 optional string indexId; // config table 表索引id
};
struct ConfigRsp
{
0 require string errMsg;
1 optional vector<map<string, string> > configItemList;
};
interface DCacheOpt
{
/*
......@@ -318,6 +347,33 @@ interface DCacheOpt
*/
int expandDCache(ExpandReq expandReq, out ExpandRsp expandRsq);
/*
* 配置中心操作接口
*/
int addCacheConfigItem(CacheConfigReq configReq, out ConfigRsp configRsq);
int updateCacheConfigItem(CacheConfigReq configReq, out ConfigRsp configRsq);
int deleteCacheConfigItem(CacheConfigReq configReq, out ConfigRsp configRsq);
int getCacheConfigItemList(CacheConfigReq configReq, out ConfigRsp configRsq);
int addServerConfigItem(ServerConfigReq configReq, out ConfigRsp configRsq);
int updateServerConfigItem(ServerConfigReq configReq, out ConfigRsp configRsq);
int updateServerConfigItemBatch(vector<ServerConfigReq> configReq, out ConfigRsp configRsq);
int deleteServerConfigItem(ServerConfigReq configReq, out ConfigRsp configRsq);
int deleteServerConfigItemBatch(vector<ServerConfigReq> configReq, out ConfigRsp configRsq);
int getServerNodeConfigItemList(ServerConfigReq configReq, out ConfigRsp configRsq);
int getServerConfigItemList(ServerConfigReq configReq, out ConfigRsp configRsq);
};
};
// **********************************************************************
// Parsed By TarsParser(1.1.0), Generated By tools(20180620)
// TarsParser Maintained By <WSRD> and tools Maintained By <superzheng>
// Parsed By TarsParser(1.1.0), Generated By tars2node(20190109)
// TarsParser Maintained By <TARS> and tars2node Maintained By <superzheng>
// Generated from "DCacheOpt.tars" by Client Mode
// **********************************************************************
/* eslint-disable */
"use strict";
var assert = require("assert");
var TarsStream = require("@tars/stream");
var TarsError = require("@tars/rpc").error;
var _hasOwnProperty = Object.prototype.hasOwnProperty;
var _makeError = function (data, message, type) {
var error = new Error(message || "");
error.request = data.request;
error.response = {
"costtime" : data.request.costtime
};
if (type === TarsError.CLIENT.DECODE_ERROR) {
error.name = "DECODE_ERROR";
error.response.error = {
"code" : type,
"message" : message
};
} else {
error.name = "RPC_ERROR";
error.response.error = data.error;
}
return error;
};
var DCache = DCache || {};
module.exports.DCache = DCache;
DCache.DCacheOptProxy = function () {
this._name = undefined;
this._worker = undefined;
this._name = undefined;
this._worker = undefined;
};
DCache.DCacheOptProxy.prototype.setTimeout = function (iTimeout) {
......@@ -26,21 +48,29 @@ DCache.DCacheOptProxy.prototype.getTimeout = function () {
return this._worker.timeout;
};
DCache.DCacheOptProxy.prototype.setVersion = function (iVersion) {
this._worker.version = iVersion;
};
DCache.DCacheOptProxy.prototype.getVersion = function () {
return this._worker.version;
};
DCache.UninstallType = {
"SERVER" : 0,
"GROUP" : 1,
"MODULE" : 2,
"QUOTA_SERVER" : 3,
"_classname" : "DCache.UninstallType"
"QUOTA_SERVER" : 3
};
DCache.UninstallType._classname = "DCache.UninstallType";
DCache.UninstallType._write = function(os, tag, val) { return os.writeInt32(tag, val); };
DCache.UninstallType._read = function(is, tag, def) { return is.readInt32(tag, true, def); };
DCache.DCacheType = {
"KVCACHE" : 1,
"MKVCACHE" : 2,
"_classname" : "DCache.DCacheType"
"MKVCACHE" : 2
};
DCache.DCacheType._classname = "DCache.DCacheType";
DCache.DCacheType._write = function(os, tag, val) { return os.writeInt32(tag, val); };
DCache.DCacheType._read = function(is, tag, def) { return is.readInt32(tag, true, def); };
......@@ -62,7 +92,7 @@ DCache.RouterParam._classname = "DCache.RouterParam";
DCache.RouterParam._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.RouterParam._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.RouterParam._readFrom = function (is) {
var tmp = new DCache.RouterParam();
var tmp = new DCache.RouterParam;
tmp.installRouter = is.readBoolean(0, true, true);
tmp.serverName = is.readString(1, true, "");
tmp.appName = is.readString(2, true, "");
......@@ -114,17 +144,18 @@ DCache.RouterParam.prototype.toObject = function() {
};
};
DCache.RouterParam.prototype.readFromObject = function(json) {
json.hasOwnProperty("installRouter") && (this.installRouter = json.installRouter);
json.hasOwnProperty("serverName") && (this.serverName = json.serverName);
json.hasOwnProperty("appName") && (this.appName = json.appName);
json.hasOwnProperty("serverIp") && (this.serverIp.readFromObject(json.serverIp));
json.hasOwnProperty("templateFile") && (this.templateFile = json.templateFile);
json.hasOwnProperty("dbName") && (this.dbName = json.dbName);
json.hasOwnProperty("dbIp") && (this.dbIp = json.dbIp);
json.hasOwnProperty("dbPort") && (this.dbPort = json.dbPort);
json.hasOwnProperty("dbUser") && (this.dbUser = json.dbUser);
json.hasOwnProperty("dbPwd") && (this.dbPwd = json.dbPwd);
json.hasOwnProperty("remark") && (this.remark = json.remark);
_hasOwnProperty.call(json, "installRouter") && (this.installRouter = json.installRouter);
_hasOwnProperty.call(json, "serverName") && (this.serverName = json.serverName);
_hasOwnProperty.call(json, "appName") && (this.appName = json.appName);
_hasOwnProperty.call(json, "serverIp") && (this.serverIp.readFromObject(json.serverIp));
_hasOwnProperty.call(json, "templateFile") && (this.templateFile = json.templateFile);
_hasOwnProperty.call(json, "dbName") && (this.dbName = json.dbName);
_hasOwnProperty.call(json, "dbIp") && (this.dbIp = json.dbIp);
_hasOwnProperty.call(json, "dbPort") && (this.dbPort = json.dbPort);
_hasOwnProperty.call(json, "dbUser") && (this.dbUser = json.dbUser);
_hasOwnProperty.call(json, "dbPwd") && (this.dbPwd = json.dbPwd);
_hasOwnProperty.call(json, "remark") && (this.remark = json.remark);
return this;
};
DCache.RouterParam.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -147,7 +178,7 @@ DCache.ProxyAddr._classname = "DCache.ProxyAddr";
DCache.ProxyAddr._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.ProxyAddr._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.ProxyAddr._readFrom = function (is) {
var tmp = new DCache.ProxyAddr();
var tmp = new DCache.ProxyAddr;
tmp.ip = is.readString(0, true, "");
tmp.idcArea = is.readString(1, true, "");
return tmp;
......@@ -172,8 +203,9 @@ DCache.ProxyAddr.prototype.toObject = function() {
};
};
DCache.ProxyAddr.prototype.readFromObject = function(json) {
json.hasOwnProperty("ip") && (this.ip = json.ip);
json.hasOwnProperty("idcArea") && (this.idcArea = json.idcArea);
_hasOwnProperty.call(json, "ip") && (this.ip = json.ip);
_hasOwnProperty.call(json, "idcArea") && (this.idcArea = json.idcArea);
return this;
};
DCache.ProxyAddr.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -199,7 +231,7 @@ DCache.ProxyParam._classname = "DCache.ProxyParam";
DCache.ProxyParam._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.ProxyParam._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.ProxyParam._readFrom = function (is) {
var tmp = new DCache.ProxyParam();
var tmp = new DCache.ProxyParam;
tmp.installProxy = is.readBoolean(0, true, true);
tmp.serverName = is.readString(1, true, "");
tmp.appName = is.readString(2, true, "");
......@@ -233,11 +265,12 @@ DCache.ProxyParam.prototype.toObject = function() {
};
};
DCache.ProxyParam.prototype.readFromObject = function(json) {
json.hasOwnProperty("installProxy") && (this.installProxy = json.installProxy);
json.hasOwnProperty("serverName") && (this.serverName = json.serverName);
json.hasOwnProperty("appName") && (this.appName = json.appName);
json.hasOwnProperty("serverIp") && (this.serverIp.readFromObject(json.serverIp));
json.hasOwnProperty("templateFile") && (this.templateFile = json.templateFile);
_hasOwnProperty.call(json, "installProxy") && (this.installProxy = json.installProxy);
_hasOwnProperty.call(json, "serverName") && (this.serverName = json.serverName);
_hasOwnProperty.call(json, "appName") && (this.appName = json.appName);
_hasOwnProperty.call(json, "serverIp") && (this.serverIp.readFromObject(json.serverIp));
_hasOwnProperty.call(json, "templateFile") && (this.templateFile = json.templateFile);
return this;
};
DCache.ProxyParam.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -263,7 +296,7 @@ DCache.InstallAppReq._classname = "DCache.InstallAppReq";
DCache.InstallAppReq._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.InstallAppReq._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.InstallAppReq._readFrom = function (is) {
var tmp = new DCache.InstallAppReq();
var tmp = new DCache.InstallAppReq;
tmp.appName = is.readString(0, true, "");
tmp.routerParam = is.readStruct(1, true, DCache.RouterParam);
tmp.proxyParam = is.readStruct(2, true, DCache.ProxyParam);
......@@ -297,11 +330,12 @@ DCache.InstallAppReq.prototype.toObject = function() {
};
};
DCache.InstallAppReq.prototype.readFromObject = function(json) {
json.hasOwnProperty("appName") && (this.appName = json.appName);
json.hasOwnProperty("routerParam") && (this.routerParam.readFromObject(json.routerParam));
json.hasOwnProperty("proxyParam") && (this.proxyParam.readFromObject(json.proxyParam));
json.hasOwnProperty("version") && (this.version = json.version);
json.hasOwnProperty("replace") && (this.replace = json.replace);
_hasOwnProperty.call(json, "appName") && (this.appName = json.appName);
_hasOwnProperty.call(json, "routerParam") && (this.routerParam.readFromObject(json.routerParam));
_hasOwnProperty.call(json, "proxyParam") && (this.proxyParam.readFromObject(json.proxyParam));
_hasOwnProperty.call(json, "version") && (this.version = json.version);
_hasOwnProperty.call(json, "replace") && (this.replace = json.replace);
return this;
};
DCache.InstallAppReq.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -323,7 +357,7 @@ DCache.InstallAppRsp._classname = "DCache.InstallAppRsp";
DCache.InstallAppRsp._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.InstallAppRsp._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.InstallAppRsp._readFrom = function (is) {
var tmp = new DCache.InstallAppRsp();
var tmp = new DCache.InstallAppRsp;
tmp.errMsg = is.readString(0, true, "");
return tmp;
};
......@@ -345,7 +379,8 @@ DCache.InstallAppRsp.prototype.toObject = function() {
};
};
DCache.InstallAppRsp.prototype.readFromObject = function(json) {
json.hasOwnProperty("errMsg") && (this.errMsg = json.errMsg);
_hasOwnProperty.call(json, "errMsg") && (this.errMsg = json.errMsg);
return this;
};
DCache.InstallAppRsp.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -383,7 +418,7 @@ DCache.CacheHostParam._classname = "DCache.CacheHostParam";
DCache.CacheHostParam._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.CacheHostParam._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.CacheHostParam._readFrom = function (is) {
var tmp = new DCache.CacheHostParam();
var tmp = new DCache.CacheHostParam;
tmp.serverName = is.readString(0, true, "");
tmp.serverIp = is.readString(1, true, "");
tmp.templateFile = is.readString(2, true, "");
......@@ -453,23 +488,24 @@ DCache.CacheHostParam.prototype.toObject = function() {
};
};
DCache.CacheHostParam.prototype.readFromObject = function(json) {
json.hasOwnProperty("serverName") && (this.serverName = json.serverName);
json.hasOwnProperty("serverIp") && (this.serverIp = json.serverIp);
json.hasOwnProperty("templateFile") && (this.templateFile = json.templateFile);
json.hasOwnProperty("type") && (this.type = json.type);
json.hasOwnProperty("bakSrcServerName") && (this.bakSrcServerName = json.bakSrcServerName);
json.hasOwnProperty("idc") && (this.idc = json.idc);
json.hasOwnProperty("priority") && (this.priority = json.priority);
json.hasOwnProperty("groupName") && (this.groupName = json.groupName);
json.hasOwnProperty("shmSize") && (this.shmSize = json.shmSize);
json.hasOwnProperty("shmKey") && (this.shmKey = json.shmKey);
json.hasOwnProperty("isContainer") && (this.isContainer = json.isContainer);
json.hasOwnProperty("binlogPort") && (this.binlogPort = json.binlogPort);
json.hasOwnProperty("cachePort") && (this.cachePort = json.cachePort);
json.hasOwnProperty("wcachePort") && (this.wcachePort = json.wcachePort);
json.hasOwnProperty("backupPort") && (this.backupPort = json.backupPort);
json.hasOwnProperty("routerPort") && (this.routerPort = json.routerPort);
json.hasOwnProperty("controlackPort") && (this.controlackPort = json.controlackPort);
_hasOwnProperty.call(json, "serverName") && (this.serverName = json.serverName);
_hasOwnProperty.call(json, "serverIp") && (this.serverIp = json.serverIp);
_hasOwnProperty.call(json, "templateFile") && (this.templateFile = json.templateFile);
_hasOwnProperty.call(json, "type") && (this.type = json.type);
_hasOwnProperty.call(json, "bakSrcServerName") && (this.bakSrcServerName = json.bakSrcServerName);
_hasOwnProperty.call(json, "idc") && (this.idc = json.idc);
_hasOwnProperty.call(json, "priority") && (this.priority = json.priority);
_hasOwnProperty.call(json, "groupName") && (this.groupName = json.groupName);
_hasOwnProperty.call(json, "shmSize") && (this.shmSize = json.shmSize);
_hasOwnProperty.call(json, "shmKey") && (this.shmKey = json.shmKey);
_hasOwnProperty.call(json, "isContainer") && (this.isContainer = json.isContainer);
_hasOwnProperty.call(json, "binlogPort") && (this.binlogPort = json.binlogPort);
_hasOwnProperty.call(json, "cachePort") && (this.cachePort = json.cachePort);
_hasOwnProperty.call(json, "wcachePort") && (this.wcachePort = json.wcachePort);
_hasOwnProperty.call(json, "backupPort") && (this.backupPort = json.backupPort);
_hasOwnProperty.call(json, "routerPort") && (this.routerPort = json.routerPort);
_hasOwnProperty.call(json, "controlackPort") && (this.controlackPort = json.controlackPort);
return this;
};
DCache.CacheHostParam.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -501,7 +537,7 @@ DCache.SingleKeyConfParam._classname = "DCache.SingleKeyConfParam";
DCache.SingleKeyConfParam._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.SingleKeyConfParam._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.SingleKeyConfParam._readFrom = function (is) {
var tmp = new DCache.SingleKeyConfParam();
var tmp = new DCache.SingleKeyConfParam;
tmp.avgDataSize = is.readString(0, true, "");
tmp.readDbFlag = is.readString(1, true, "");
tmp.enableErase = is.readString(2, true, "");
......@@ -553,17 +589,18 @@ DCache.SingleKeyConfParam.prototype.toObject = function() {
};
};
DCache.SingleKeyConfParam.prototype.readFromObject = function(json) {
json.hasOwnProperty("avgDataSize") && (this.avgDataSize = json.avgDataSize);
json.hasOwnProperty("readDbFlag") && (this.readDbFlag = json.readDbFlag);
json.hasOwnProperty("enableErase") && (this.enableErase = json.enableErase);
json.hasOwnProperty("eraseRadio") && (this.eraseRadio = json.eraseRadio);
json.hasOwnProperty("saveOnlyKey") && (this.saveOnlyKey = json.saveOnlyKey);
json.hasOwnProperty("dbFlag") && (this.dbFlag = json.dbFlag);
json.hasOwnProperty("dbAccessServant") && (this.dbAccessServant = json.dbAccessServant);
json.hasOwnProperty("startExpireThread") && (this.startExpireThread = json.startExpireThread);
json.hasOwnProperty("expireDb") && (this.expireDb = json.expireDb);
json.hasOwnProperty("hotBackupDays") && (this.hotBackupDays = json.hotBackupDays);
json.hasOwnProperty("coldBackupDays") && (this.coldBackupDays = json.coldBackupDays);
_hasOwnProperty.call(json, "avgDataSize") && (this.avgDataSize = json.avgDataSize);
_hasOwnProperty.call(json, "readDbFlag") && (this.readDbFlag = json.readDbFlag);
_hasOwnProperty.call(json, "enableErase") && (this.enableErase = json.enableErase);
_hasOwnProperty.call(json, "eraseRadio") && (this.eraseRadio = json.eraseRadio);
_hasOwnProperty.call(json, "saveOnlyKey") && (this.saveOnlyKey = json.saveOnlyKey);
_hasOwnProperty.call(json, "dbFlag") && (this.dbFlag = json.dbFlag);
_hasOwnProperty.call(json, "dbAccessServant") && (this.dbAccessServant = json.dbAccessServant);
_hasOwnProperty.call(json, "startExpireThread") && (this.startExpireThread = json.startExpireThread);
_hasOwnProperty.call(json, "expireDb") && (this.expireDb = json.expireDb);
_hasOwnProperty.call(json, "hotBackupDays") && (this.hotBackupDays = json.hotBackupDays);
_hasOwnProperty.call(json, "coldBackupDays") && (this.coldBackupDays = json.coldBackupDays);
return this;
};
DCache.SingleKeyConfParam.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -596,7 +633,7 @@ DCache.MultiKeyConfParam._classname = "DCache.MultiKeyConfParam";
DCache.MultiKeyConfParam._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.MultiKeyConfParam._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.MultiKeyConfParam._readFrom = function (is) {
var tmp = new DCache.MultiKeyConfParam();
var tmp = new DCache.MultiKeyConfParam;
tmp.avgDataSize = is.readString(0, true, "");
tmp.readDbFlag = is.readString(1, true, "");
tmp.enableErase = is.readString(2, true, "");
......@@ -651,18 +688,19 @@ DCache.MultiKeyConfParam.prototype.toObject = function() {
};
};
DCache.MultiKeyConfParam.prototype.readFromObject = function(json) {
json.hasOwnProperty("avgDataSize") && (this.avgDataSize = json.avgDataSize);
json.hasOwnProperty("readDbFlag") && (this.readDbFlag = json.readDbFlag);
json.hasOwnProperty("enableErase") && (this.enableErase = json.enableErase);
json.hasOwnProperty("eraseRadio") && (this.eraseRadio = json.eraseRadio);
json.hasOwnProperty("saveOnlyKey") && (this.saveOnlyKey = json.saveOnlyKey);
json.hasOwnProperty("dbFlag") && (this.dbFlag = json.dbFlag);
json.hasOwnProperty("dbAccessServant") && (this.dbAccessServant = json.dbAccessServant);
json.hasOwnProperty("startExpireThread") && (this.startExpireThread = json.startExpireThread);
json.hasOwnProperty("expireDb") && (this.expireDb = json.expireDb);
json.hasOwnProperty("cacheType") && (this.cacheType = json.cacheType);
json.hasOwnProperty("hotBackupDays") && (this.hotBackupDays = json.hotBackupDays);
json.hasOwnProperty("coldBackupDays") && (this.coldBackupDays = json.coldBackupDays);
_hasOwnProperty.call(json, "avgDataSize") && (this.avgDataSize = json.avgDataSize);
_hasOwnProperty.call(json, "readDbFlag") && (this.readDbFlag = json.readDbFlag);
_hasOwnProperty.call(json, "enableErase") && (this.enableErase = json.enableErase);
_hasOwnProperty.call(json, "eraseRadio") && (this.eraseRadio = json.eraseRadio);
_hasOwnProperty.call(json, "saveOnlyKey") && (this.saveOnlyKey = json.saveOnlyKey);
_hasOwnProperty.call(json, "dbFlag") && (this.dbFlag = json.dbFlag);
_hasOwnProperty.call(json, "dbAccessServant") && (this.dbAccessServant = json.dbAccessServant);
_hasOwnProperty.call(json, "startExpireThread") && (this.startExpireThread = json.startExpireThread);
_hasOwnProperty.call(json, "expireDb") && (this.expireDb = json.expireDb);
_hasOwnProperty.call(json, "cacheType") && (this.cacheType = json.cacheType);
_hasOwnProperty.call(json, "hotBackupDays") && (this.hotBackupDays = json.hotBackupDays);
_hasOwnProperty.call(json, "coldBackupDays") && (this.coldBackupDays = json.coldBackupDays);
return this;
};
DCache.MultiKeyConfParam.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -689,7 +727,7 @@ DCache.RecordParam._classname = "DCache.RecordParam";
DCache.RecordParam._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.RecordParam._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.RecordParam._readFrom = function (is) {
var tmp = new DCache.RecordParam();
var tmp = new DCache.RecordParam;
tmp.fieldName = is.readString(0, true, "");
tmp.keyType = is.readString(1, true, "");
tmp.dataType = is.readString(2, true, "");
......@@ -726,12 +764,13 @@ DCache.RecordParam.prototype.toObject = function() {
};
};
DCache.RecordParam.prototype.readFromObject = function(json) {
json.hasOwnProperty("fieldName") && (this.fieldName = json.fieldName);
json.hasOwnProperty("keyType") && (this.keyType = json.keyType);
json.hasOwnProperty("dataType") && (this.dataType = json.dataType);
json.hasOwnProperty("property") && (this.property = json.property);
json.hasOwnProperty("defaultValue") && (this.defaultValue = json.defaultValue);
json.hasOwnProperty("maxLen") && (this.maxLen = json.maxLen);
_hasOwnProperty.call(json, "fieldName") && (this.fieldName = json.fieldName);
_hasOwnProperty.call(json, "keyType") && (this.keyType = json.keyType);
_hasOwnProperty.call(json, "dataType") && (this.dataType = json.dataType);
_hasOwnProperty.call(json, "property") && (this.property = json.property);
_hasOwnProperty.call(json, "defaultValue") && (this.defaultValue = json.defaultValue);
_hasOwnProperty.call(json, "maxLen") && (this.maxLen = json.maxLen);
return this;
};
DCache.RecordParam.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -754,7 +793,7 @@ DCache.RouterConsistRes._classname = "DCache.RouterConsistRes";
DCache.RouterConsistRes._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.RouterConsistRes._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.RouterConsistRes._readFrom = function (is) {
var tmp = new DCache.RouterConsistRes();
var tmp = new DCache.RouterConsistRes;
tmp.iFlag = is.readInt32(0, true, 0);
tmp.sInfo = is.readString(1, true, "");
return tmp;
......@@ -779,8 +818,9 @@ DCache.RouterConsistRes.prototype.toObject = function() {
};
};
DCache.RouterConsistRes.prototype.readFromObject = function(json) {
json.hasOwnProperty("iFlag") && (this.iFlag = json.iFlag);
json.hasOwnProperty("sInfo") && (this.sInfo = json.sInfo);
_hasOwnProperty.call(json, "iFlag") && (this.iFlag = json.iFlag);
_hasOwnProperty.call(json, "sInfo") && (this.sInfo = json.sInfo);
return this;
};
DCache.RouterConsistRes.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -807,7 +847,7 @@ DCache.InstallKVCacheReq._classname = "DCache.InstallKVCacheReq";
DCache.InstallKVCacheReq._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.InstallKVCacheReq._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.InstallKVCacheReq._readFrom = function (is) {
var tmp = new DCache.InstallKVCacheReq();
var tmp = new DCache.InstallKVCacheReq;
tmp.appName = is.readString(0, true, "");
tmp.moduleName = is.readString(1, true, "");
tmp.kvCacheHost = is.readList(2, true, TarsStream.List(DCache.CacheHostParam));
......@@ -844,12 +884,13 @@ DCache.InstallKVCacheReq.prototype.toObject = function() {
};
};
DCache.InstallKVCacheReq.prototype.readFromObject = function(json) {
json.hasOwnProperty("appName") && (this.appName = json.appName);
json.hasOwnProperty("moduleName") && (this.moduleName = json.moduleName);
json.hasOwnProperty("kvCacheHost") && (this.kvCacheHost.readFromObject(json.kvCacheHost));
json.hasOwnProperty("kvCacheConf") && (this.kvCacheConf.readFromObject(json.kvCacheConf));
json.hasOwnProperty("version") && (this.version = json.version);
json.hasOwnProperty("replace") && (this.replace = json.replace);
_hasOwnProperty.call(json, "appName") && (this.appName = json.appName);
_hasOwnProperty.call(json, "moduleName") && (this.moduleName = json.moduleName);
_hasOwnProperty.call(json, "kvCacheHost") && (this.kvCacheHost.readFromObject(json.kvCacheHost));
_hasOwnProperty.call(json, "kvCacheConf") && (this.kvCacheConf.readFromObject(json.kvCacheConf));
_hasOwnProperty.call(json, "version") && (this.version = json.version);
_hasOwnProperty.call(json, "replace") && (this.replace = json.replace);
return this;
};
DCache.InstallKVCacheReq.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -872,7 +913,7 @@ DCache.InstallKVCacheRsp._classname = "DCache.InstallKVCacheRsp";
DCache.InstallKVCacheRsp._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.InstallKVCacheRsp._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.InstallKVCacheRsp._readFrom = function (is) {
var tmp = new DCache.InstallKVCacheRsp();
var tmp = new DCache.InstallKVCacheRsp;
tmp.rcRes = is.readStruct(0, true, DCache.RouterConsistRes);
tmp.errMsg = is.readString(1, true, "");
return tmp;
......@@ -897,8 +938,9 @@ DCache.InstallKVCacheRsp.prototype.toObject = function() {
};
};
DCache.InstallKVCacheRsp.prototype.readFromObject = function(json) {
json.hasOwnProperty("rcRes") && (this.rcRes.readFromObject(json.rcRes));
json.hasOwnProperty("errMsg") && (this.errMsg = json.errMsg);
_hasOwnProperty.call(json, "rcRes") && (this.rcRes.readFromObject(json.rcRes));
_hasOwnProperty.call(json, "errMsg") && (this.errMsg = json.errMsg);
return this;
};
DCache.InstallKVCacheRsp.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -926,7 +968,7 @@ DCache.InstallMKVCacheReq._classname = "DCache.InstallMKVCacheReq";
DCache.InstallMKVCacheReq._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.InstallMKVCacheReq._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.InstallMKVCacheReq._readFrom = function (is) {
var tmp = new DCache.InstallMKVCacheReq();
var tmp = new DCache.InstallMKVCacheReq;
tmp.appName = is.readString(0, true, "");
tmp.moduleName = is.readString(1, true, "");
tmp.mkvCacheHost = is.readList(2, true, TarsStream.List(DCache.CacheHostParam));
......@@ -966,13 +1008,14 @@ DCache.InstallMKVCacheReq.prototype.toObject = function() {
};
};
DCache.InstallMKVCacheReq.prototype.readFromObject = function(json) {
json.hasOwnProperty("appName") && (this.appName = json.appName);
json.hasOwnProperty("moduleName") && (this.moduleName = json.moduleName);
json.hasOwnProperty("mkvCacheHost") && (this.mkvCacheHost.readFromObject(json.mkvCacheHost));
json.hasOwnProperty("mkvCacheConf") && (this.mkvCacheConf.readFromObject(json.mkvCacheConf));
json.hasOwnProperty("fieldParam") && (this.fieldParam.readFromObject(json.fieldParam));
json.hasOwnProperty("version") && (this.version = json.version);
json.hasOwnProperty("replace") && (this.replace = json.replace);
_hasOwnProperty.call(json, "appName") && (this.appName = json.appName);
_hasOwnProperty.call(json, "moduleName") && (this.moduleName = json.moduleName);
_hasOwnProperty.call(json, "mkvCacheHost") && (this.mkvCacheHost.readFromObject(json.mkvCacheHost));
_hasOwnProperty.call(json, "mkvCacheConf") && (this.mkvCacheConf.readFromObject(json.mkvCacheConf));
_hasOwnProperty.call(json, "fieldParam") && (this.fieldParam.readFromObject(json.fieldParam));
_hasOwnProperty.call(json, "version") && (this.version = json.version);
_hasOwnProperty.call(json, "replace") && (this.replace = json.replace);
return this;
};
DCache.InstallMKVCacheReq.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -995,7 +1038,7 @@ DCache.InstallMKVCacheRsp._classname = "DCache.InstallMKVCacheRsp";
DCache.InstallMKVCacheRsp._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.InstallMKVCacheRsp._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.InstallMKVCacheRsp._readFrom = function (is) {
var tmp = new DCache.InstallMKVCacheRsp();
var tmp = new DCache.InstallMKVCacheRsp;
tmp.rcRes = is.readStruct(0, true, DCache.RouterConsistRes);
tmp.errMsg = is.readString(1, true, "");
return tmp;
......@@ -1020,8 +1063,9 @@ DCache.InstallMKVCacheRsp.prototype.toObject = function() {
};
};
DCache.InstallMKVCacheRsp.prototype.readFromObject = function(json) {
json.hasOwnProperty("rcRes") && (this.rcRes.readFromObject(json.rcRes));
json.hasOwnProperty("errMsg") && (this.errMsg = json.errMsg);
_hasOwnProperty.call(json, "rcRes") && (this.rcRes.readFromObject(json.rcRes));
_hasOwnProperty.call(json, "errMsg") && (this.errMsg = json.errMsg);
return this;
};
DCache.InstallMKVCacheRsp.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1048,7 +1092,7 @@ DCache.DBInfo._classname = "DCache.DBInfo";
DCache.DBInfo._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.DBInfo._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.DBInfo._readFrom = function (is) {
var tmp = new DCache.DBInfo();
var tmp = new DCache.DBInfo;
tmp.ip = is.readString(0, true, "");
tmp.user = is.readString(1, true, "");
tmp.pwd = is.readString(2, true, "");
......@@ -1085,12 +1129,13 @@ DCache.DBInfo.prototype.toObject = function() {
};
};
DCache.DBInfo.prototype.readFromObject = function(json) {
json.hasOwnProperty("ip") && (this.ip = json.ip);
json.hasOwnProperty("user") && (this.user = json.user);
json.hasOwnProperty("pwd") && (this.pwd = json.pwd);
json.hasOwnProperty("port") && (this.port = json.port);
json.hasOwnProperty("charset") && (this.charset = json.charset);
json.hasOwnProperty("dbName") && (this.dbName = json.dbName);
_hasOwnProperty.call(json, "ip") && (this.ip = json.ip);
_hasOwnProperty.call(json, "user") && (this.user = json.user);
_hasOwnProperty.call(json, "pwd") && (this.pwd = json.pwd);
_hasOwnProperty.call(json, "port") && (this.port = json.port);
_hasOwnProperty.call(json, "charset") && (this.charset = json.charset);
_hasOwnProperty.call(json, "dbName") && (this.dbName = json.dbName);
return this;
};
DCache.DBInfo.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1116,7 +1161,7 @@ DCache.UninstallInfo._classname = "DCache.UninstallInfo";
DCache.UninstallInfo._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.UninstallInfo._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.UninstallInfo._readFrom = function (is) {
var tmp = new DCache.UninstallInfo();
var tmp = new DCache.UninstallInfo;
tmp.unType = is.readInt32(0, true, DCache.UninstallType.SERVER);
tmp.moduleName = is.readString(1, true, "");
tmp.serverName = is.readString(2, true, "");
......@@ -1150,11 +1195,12 @@ DCache.UninstallInfo.prototype.toObject = function() {
};
};
DCache.UninstallInfo.prototype.readFromObject = function(json) {
json.hasOwnProperty("unType") && (this.unType = json.unType);
json.hasOwnProperty("moduleName") && (this.moduleName = json.moduleName);
json.hasOwnProperty("serverName") && (this.serverName = json.serverName);
json.hasOwnProperty("groupName") && (this.groupName = json.groupName);
json.hasOwnProperty("routerDb") && (this.routerDb.readFromObject(json.routerDb));
_hasOwnProperty.call(json, "unType") && (this.unType = json.unType);
_hasOwnProperty.call(json, "moduleName") && (this.moduleName = json.moduleName);
_hasOwnProperty.call(json, "serverName") && (this.serverName = json.serverName);
_hasOwnProperty.call(json, "groupName") && (this.groupName = json.groupName);
_hasOwnProperty.call(json, "routerDb") && (this.routerDb.readFromObject(json.routerDb));
return this;
};
DCache.UninstallInfo.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1176,7 +1222,7 @@ DCache.UninstallRsp._classname = "DCache.UninstallRsp";
DCache.UninstallRsp._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.UninstallRsp._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.UninstallRsp._readFrom = function (is) {
var tmp = new DCache.UninstallRsp();
var tmp = new DCache.UninstallRsp;
tmp.errMsg = is.readString(0, true, "");
return tmp;
};
......@@ -1198,7 +1244,8 @@ DCache.UninstallRsp.prototype.toObject = function() {
};
};
DCache.UninstallRsp.prototype.readFromObject = function(json) {
json.hasOwnProperty("errMsg") && (this.errMsg = json.errMsg);
_hasOwnProperty.call(json, "errMsg") && (this.errMsg = json.errMsg);
return this;
};
DCache.UninstallRsp.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1221,7 +1268,7 @@ DCache.UninstallProgressRsp._classname = "DCache.UninstallProgressRsp";
DCache.UninstallProgressRsp._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.UninstallProgressRsp._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.UninstallProgressRsp._readFrom = function (is) {
var tmp = new DCache.UninstallProgressRsp();
var tmp = new DCache.UninstallProgressRsp;
tmp.percent = is.readString(0, true, "");
tmp.errMsg = is.readString(1, true, "");
return tmp;
......@@ -1246,8 +1293,9 @@ DCache.UninstallProgressRsp.prototype.toObject = function() {
};
};
DCache.UninstallProgressRsp.prototype.readFromObject = function(json) {
json.hasOwnProperty("percent") && (this.percent = json.percent);
json.hasOwnProperty("errMsg") && (this.errMsg = json.errMsg);
_hasOwnProperty.call(json, "percent") && (this.percent = json.percent);
_hasOwnProperty.call(json, "errMsg") && (this.errMsg = json.errMsg);
return this;
};
DCache.UninstallProgressRsp.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1278,7 +1326,7 @@ DCache.ReleaseInfo._classname = "DCache.ReleaseInfo";
DCache.ReleaseInfo._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.ReleaseInfo._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.ReleaseInfo._readFrom = function (is) {
var tmp = new DCache.ReleaseInfo();
var tmp = new DCache.ReleaseInfo;
tmp.appName = is.readString(0, true, "");
tmp.serverName = is.readString(1, true, "");
tmp.nodeName = is.readString(2, true, "");
......@@ -1327,16 +1375,17 @@ DCache.ReleaseInfo.prototype.toObject = function() {
};
};
DCache.ReleaseInfo.prototype.readFromObject = function(json) {
json.hasOwnProperty("appName") && (this.appName = json.appName);
json.hasOwnProperty("serverName") && (this.serverName = json.serverName);
json.hasOwnProperty("nodeName") && (this.nodeName = json.nodeName);
json.hasOwnProperty("groupName") && (this.groupName = json.groupName);
json.hasOwnProperty("version") && (this.version = json.version);
json.hasOwnProperty("user") && (this.user = json.user);
json.hasOwnProperty("md5") && (this.md5 = json.md5);
json.hasOwnProperty("status") && (this.status = json.status);
json.hasOwnProperty("error") && (this.error = json.error);
json.hasOwnProperty("ostype") && (this.ostype = json.ostype);
_hasOwnProperty.call(json, "appName") && (this.appName = json.appName);
_hasOwnProperty.call(json, "serverName") && (this.serverName = json.serverName);
_hasOwnProperty.call(json, "nodeName") && (this.nodeName = json.nodeName);
_hasOwnProperty.call(json, "groupName") && (this.groupName = json.groupName);
_hasOwnProperty.call(json, "version") && (this.version = json.version);
_hasOwnProperty.call(json, "user") && (this.user = json.user);
_hasOwnProperty.call(json, "md5") && (this.md5 = json.md5);
_hasOwnProperty.call(json, "status") && (this.status = json.status);
_hasOwnProperty.call(json, "error") && (this.error = json.error);
_hasOwnProperty.call(json, "ostype") && (this.ostype = json.ostype);
return this;
};
DCache.ReleaseInfo.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1358,7 +1407,7 @@ DCache.ReleaseReq._classname = "DCache.ReleaseReq";
DCache.ReleaseReq._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.ReleaseReq._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.ReleaseReq._readFrom = function (is) {
var tmp = new DCache.ReleaseReq();
var tmp = new DCache.ReleaseReq;
tmp.releaseInfo = is.readList(0, true, TarsStream.List(DCache.ReleaseInfo));
return tmp;
};
......@@ -1380,7 +1429,8 @@ DCache.ReleaseReq.prototype.toObject = function() {
};
};
DCache.ReleaseReq.prototype.readFromObject = function(json) {
json.hasOwnProperty("releaseInfo") && (this.releaseInfo.readFromObject(json.releaseInfo));
_hasOwnProperty.call(json, "releaseInfo") && (this.releaseInfo.readFromObject(json.releaseInfo));
return this;
};
DCache.ReleaseReq.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1403,7 +1453,7 @@ DCache.ReleaseRsp._classname = "DCache.ReleaseRsp";
DCache.ReleaseRsp._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.ReleaseRsp._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.ReleaseRsp._readFrom = function (is) {
var tmp = new DCache.ReleaseRsp();
var tmp = new DCache.ReleaseRsp;
tmp.releaseId = is.readInt32(0, true, 0);
tmp.errMsg = is.readString(1, true, "");
return tmp;
......@@ -1428,8 +1478,9 @@ DCache.ReleaseRsp.prototype.toObject = function() {
};
};
DCache.ReleaseRsp.prototype.readFromObject = function(json) {
json.hasOwnProperty("releaseId") && (this.releaseId = json.releaseId);
json.hasOwnProperty("errMsg") && (this.errMsg = json.errMsg);
_hasOwnProperty.call(json, "releaseId") && (this.releaseId = json.releaseId);
_hasOwnProperty.call(json, "errMsg") && (this.errMsg = json.errMsg);
return this;
};
DCache.ReleaseRsp.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1451,7 +1502,7 @@ DCache.ReleaseProgressReq._classname = "DCache.ReleaseProgressReq";
DCache.ReleaseProgressReq._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.ReleaseProgressReq._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.ReleaseProgressReq._readFrom = function (is) {
var tmp = new DCache.ReleaseProgressReq();
var tmp = new DCache.ReleaseProgressReq;
tmp.releaseId = is.readInt32(0, true, 0);
return tmp;
};
......@@ -1473,7 +1524,8 @@ DCache.ReleaseProgressReq.prototype.toObject = function() {
};
};
DCache.ReleaseProgressReq.prototype.readFromObject = function(json) {
json.hasOwnProperty("releaseId") && (this.releaseId = json.releaseId);
_hasOwnProperty.call(json, "releaseId") && (this.releaseId = json.releaseId);
return this;
};
DCache.ReleaseProgressReq.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1498,7 +1550,7 @@ DCache.ReleaseProgressRsp._classname = "DCache.ReleaseProgressRsp";
DCache.ReleaseProgressRsp._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.ReleaseProgressRsp._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.ReleaseProgressRsp._readFrom = function (is) {
var tmp = new DCache.ReleaseProgressRsp();
var tmp = new DCache.ReleaseProgressRsp;
tmp.releaseId = is.readInt32(0, true, 0);
tmp.percent = is.readString(1, true, "");
tmp.releaseInfo = is.readList(2, true, TarsStream.List(DCache.ReleaseInfo));
......@@ -1529,10 +1581,11 @@ DCache.ReleaseProgressRsp.prototype.toObject = function() {
};
};
DCache.ReleaseProgressRsp.prototype.readFromObject = function(json) {
json.hasOwnProperty("releaseId") && (this.releaseId = json.releaseId);
json.hasOwnProperty("percent") && (this.percent = json.percent);
json.hasOwnProperty("releaseInfo") && (this.releaseInfo.readFromObject(json.releaseInfo));
json.hasOwnProperty("errMsg") && (this.errMsg = json.errMsg);
_hasOwnProperty.call(json, "releaseId") && (this.releaseId = json.releaseId);
_hasOwnProperty.call(json, "percent") && (this.percent = json.percent);
_hasOwnProperty.call(json, "releaseInfo") && (this.releaseInfo.readFromObject(json.releaseInfo));
_hasOwnProperty.call(json, "errMsg") && (this.errMsg = json.errMsg);
return this;
};
DCache.ReleaseProgressRsp.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1559,7 +1612,7 @@ DCache.ExpandReq._classname = "DCache.ExpandReq";
DCache.ExpandReq._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.ExpandReq._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.ExpandReq._readFrom = function (is) {
var tmp = new DCache.ExpandReq();
var tmp = new DCache.ExpandReq;
tmp.appName = is.readString(0, true, "");
tmp.moduleName = is.readString(1, true, "");
tmp.cacheHost = is.readList(2, true, TarsStream.List(DCache.CacheHostParam));
......@@ -1596,12 +1649,13 @@ DCache.ExpandReq.prototype.toObject = function() {
};
};
DCache.ExpandReq.prototype.readFromObject = function(json) {
json.hasOwnProperty("appName") && (this.appName = json.appName);
json.hasOwnProperty("moduleName") && (this.moduleName = json.moduleName);
json.hasOwnProperty("cacheHost") && (this.cacheHost.readFromObject(json.cacheHost));
json.hasOwnProperty("cacheType") && (this.cacheType = json.cacheType);
json.hasOwnProperty("version") && (this.version = json.version);
json.hasOwnProperty("replace") && (this.replace = json.replace);
_hasOwnProperty.call(json, "appName") && (this.appName = json.appName);
_hasOwnProperty.call(json, "moduleName") && (this.moduleName = json.moduleName);
_hasOwnProperty.call(json, "cacheHost") && (this.cacheHost.readFromObject(json.cacheHost));
_hasOwnProperty.call(json, "cacheType") && (this.cacheType = json.cacheType);
_hasOwnProperty.call(json, "version") && (this.version = json.version);
_hasOwnProperty.call(json, "replace") && (this.replace = json.replace);
return this;
};
DCache.ExpandReq.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1623,7 +1677,7 @@ DCache.ExpandRsp._classname = "DCache.ExpandRsp";
DCache.ExpandRsp._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.ExpandRsp._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.ExpandRsp._readFrom = function (is) {
var tmp = new DCache.ExpandRsp();
var tmp = new DCache.ExpandRsp;
tmp.errMsg = is.readString(0, true, "");
return tmp;
};
......@@ -1645,7 +1699,8 @@ DCache.ExpandRsp.prototype.toObject = function() {
};
};
DCache.ExpandRsp.prototype.readFromObject = function(json) {
json.hasOwnProperty("errMsg") && (this.errMsg = json.errMsg);
_hasOwnProperty.call(json, "errMsg") && (this.errMsg = json.errMsg);
return this;
};
DCache.ExpandRsp.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1673,7 +1728,7 @@ DCache.TransferReq._classname = "DCache.TransferReq";
DCache.TransferReq._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.TransferReq._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.TransferReq._readFrom = function (is) {
var tmp = new DCache.TransferReq();
var tmp = new DCache.TransferReq;
tmp.appName = is.readString(0, true, "");
tmp.moduleName = is.readString(1, true, "");
tmp.srcGroupName = is.readString(2, true, "");
......@@ -1713,13 +1768,14 @@ DCache.TransferReq.prototype.toObject = function() {
};
};
DCache.TransferReq.prototype.readFromObject = function(json) {
json.hasOwnProperty("appName") && (this.appName = json.appName);
json.hasOwnProperty("moduleName") && (this.moduleName = json.moduleName);
json.hasOwnProperty("srcGroupName") && (this.srcGroupName = json.srcGroupName);
json.hasOwnProperty("hasDestServer") && (this.hasDestServer = json.hasDestServer);
json.hasOwnProperty("cacheHost") && (this.cacheHost.readFromObject(json.cacheHost));
json.hasOwnProperty("cacheType") && (this.cacheType = json.cacheType);
json.hasOwnProperty("version") && (this.version = json.version);
_hasOwnProperty.call(json, "appName") && (this.appName = json.appName);
_hasOwnProperty.call(json, "moduleName") && (this.moduleName = json.moduleName);
_hasOwnProperty.call(json, "srcGroupName") && (this.srcGroupName = json.srcGroupName);
_hasOwnProperty.call(json, "hasDestServer") && (this.hasDestServer = json.hasDestServer);
_hasOwnProperty.call(json, "cacheHost") && (this.cacheHost.readFromObject(json.cacheHost));
_hasOwnProperty.call(json, "cacheType") && (this.cacheType = json.cacheType);
_hasOwnProperty.call(json, "version") && (this.version = json.version);
return this;
};
DCache.TransferReq.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1741,7 +1797,7 @@ DCache.TransferRsp._classname = "DCache.TransferRsp";
DCache.TransferRsp._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.TransferRsp._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.TransferRsp._readFrom = function (is) {
var tmp = new DCache.TransferRsp();
var tmp = new DCache.TransferRsp;
tmp.errMsg = is.readString(0, true, "");
return tmp;
};
......@@ -1763,7 +1819,8 @@ DCache.TransferRsp.prototype.toObject = function() {
};
};
DCache.TransferRsp.prototype.readFromObject = function(json) {
json.hasOwnProperty("errMsg") && (this.errMsg = json.errMsg);
_hasOwnProperty.call(json, "errMsg") && (this.errMsg = json.errMsg);
return this;
};
DCache.TransferRsp.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
......@@ -1777,14 +1834,232 @@ DCache.TransferRsp.create = function (is) {
return DCache.TransferRsp._readFrom(is);
};
DCache.CacheConfigReq = function() {
this.id = "";
this.remark = "";
this.item = "";
this.path = "";
this.reload = "";
this.period = "";
this._classname = "DCache.CacheConfigReq";
};
DCache.CacheConfigReq._classname = "DCache.CacheConfigReq";
DCache.CacheConfigReq._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.CacheConfigReq._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.CacheConfigReq._readFrom = function (is) {
var tmp = new DCache.CacheConfigReq;
tmp.id = is.readString(0, false, "");
tmp.remark = is.readString(1, false, "");
tmp.item = is.readString(2, false, "");
tmp.path = is.readString(3, false, "");
tmp.reload = is.readString(4, false, "");
tmp.period = is.readString(5, false, "");
return tmp;
};
DCache.CacheConfigReq.prototype._writeTo = function (os) {
os.writeString(0, this.id);
os.writeString(1, this.remark);
os.writeString(2, this.item);
os.writeString(3, this.path);
os.writeString(4, this.reload);
os.writeString(5, this.period);
};
DCache.CacheConfigReq.prototype._equal = function () {
assert.fail("this structure not define key operation");
};
DCache.CacheConfigReq.prototype._genKey = function () {
if (!this._proto_struct_name_) {
this._proto_struct_name_ = "STRUCT" + Math.random();
}
return this._proto_struct_name_;
};
DCache.CacheConfigReq.prototype.toObject = function() {
return {
"id" : this.id,
"remark" : this.remark,
"item" : this.item,
"path" : this.path,
"reload" : this.reload,
"period" : this.period
};
};
DCache.CacheConfigReq.prototype.readFromObject = function(json) {
_hasOwnProperty.call(json, "id") && (this.id = json.id);
_hasOwnProperty.call(json, "remark") && (this.remark = json.remark);
_hasOwnProperty.call(json, "item") && (this.item = json.item);
_hasOwnProperty.call(json, "path") && (this.path = json.path);
_hasOwnProperty.call(json, "reload") && (this.reload = json.reload);
_hasOwnProperty.call(json, "period") && (this.period = json.period);
return this;
};
DCache.CacheConfigReq.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
this._writeTo(os);
return os.getBinBuffer();
};
DCache.CacheConfigReq.new = function () {
return new DCache.CacheConfigReq();
};
DCache.CacheConfigReq.create = function (is) {
return DCache.CacheConfigReq._readFrom(is);
};
var __DCache_DCacheOpt$expandDCache$EN = function (expandReq) {
DCache.ServerConfigReq = function() {
this.appName = "";
this.moduleName = "";
this.serverName = "";
this.nodeName = "";
this.itemId = "";
this.configValue = "";
this.configFlag = "";
this.lastUser = "";
this.indexId = "";
this._classname = "DCache.ServerConfigReq";
};
DCache.ServerConfigReq._classname = "DCache.ServerConfigReq";
DCache.ServerConfigReq._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.ServerConfigReq._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.ServerConfigReq._readFrom = function (is) {
var tmp = new DCache.ServerConfigReq;
tmp.appName = is.readString(0, false, "");
tmp.moduleName = is.readString(1, false, "");
tmp.serverName = is.readString(2, false, "");
tmp.nodeName = is.readString(3, false, "");
tmp.itemId = is.readString(4, false, "");
tmp.configValue = is.readString(5, false, "");
tmp.configFlag = is.readString(6, false, "");
tmp.lastUser = is.readString(7, false, "");
tmp.indexId = is.readString(8, false, "");
return tmp;
};
DCache.ServerConfigReq.prototype._writeTo = function (os) {
os.writeString(0, this.appName);
os.writeString(1, this.moduleName);
os.writeString(2, this.serverName);
os.writeString(3, this.nodeName);
os.writeString(4, this.itemId);
os.writeString(5, this.configValue);
os.writeString(6, this.configFlag);
os.writeString(7, this.lastUser);
os.writeString(8, this.indexId);
};
DCache.ServerConfigReq.prototype._equal = function () {
assert.fail("this structure not define key operation");
};
DCache.ServerConfigReq.prototype._genKey = function () {
if (!this._proto_struct_name_) {
this._proto_struct_name_ = "STRUCT" + Math.random();
}
return this._proto_struct_name_;
};
DCache.ServerConfigReq.prototype.toObject = function() {
return {
"appName" : this.appName,
"moduleName" : this.moduleName,
"serverName" : this.serverName,
"nodeName" : this.nodeName,
"itemId" : this.itemId,
"configValue" : this.configValue,
"configFlag" : this.configFlag,
"lastUser" : this.lastUser,
"indexId" : this.indexId
};
};
DCache.ServerConfigReq.prototype.readFromObject = function(json) {
_hasOwnProperty.call(json, "appName") && (this.appName = json.appName);
_hasOwnProperty.call(json, "moduleName") && (this.moduleName = json.moduleName);
_hasOwnProperty.call(json, "serverName") && (this.serverName = json.serverName);
_hasOwnProperty.call(json, "nodeName") && (this.nodeName = json.nodeName);
_hasOwnProperty.call(json, "itemId") && (this.itemId = json.itemId);
_hasOwnProperty.call(json, "configValue") && (this.configValue = json.configValue);
_hasOwnProperty.call(json, "configFlag") && (this.configFlag = json.configFlag);
_hasOwnProperty.call(json, "lastUser") && (this.lastUser = json.lastUser);
_hasOwnProperty.call(json, "indexId") && (this.indexId = json.indexId);
return this;
};
DCache.ServerConfigReq.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, expandReq);
this._writeTo(os);
return os.getBinBuffer();
};
DCache.ServerConfigReq.new = function () {
return new DCache.ServerConfigReq();
};
DCache.ServerConfigReq.create = function (is) {
return DCache.ServerConfigReq._readFrom(is);
};
DCache.ConfigRsp = function() {
this.errMsg = "";
this.configItemList = new TarsStream.List(TarsStream.Map(TarsStream.String, TarsStream.String));
this._classname = "DCache.ConfigRsp";
};
DCache.ConfigRsp._classname = "DCache.ConfigRsp";
DCache.ConfigRsp._write = function (os, tag, value) { os.writeStruct(tag, value); };
DCache.ConfigRsp._read = function (is, tag, def) { return is.readStruct(tag, true, def); };
DCache.ConfigRsp._readFrom = function (is) {
var tmp = new DCache.ConfigRsp;
tmp.errMsg = is.readString(0, true, "");
tmp.configItemList = is.readList(1, false, TarsStream.List(TarsStream.Map(TarsStream.String, TarsStream.String)));
return tmp;
};
DCache.ConfigRsp.prototype._writeTo = function (os) {
os.writeString(0, this.errMsg);
os.writeList(1, this.configItemList);
};
DCache.ConfigRsp.prototype._equal = function () {
assert.fail("this structure not define key operation");
};
DCache.ConfigRsp.prototype._genKey = function () {
if (!this._proto_struct_name_) {
this._proto_struct_name_ = "STRUCT" + Math.random();
}
return this._proto_struct_name_;
};
DCache.ConfigRsp.prototype.toObject = function() {
return {
"errMsg" : this.errMsg,
"configItemList" : this.configItemList.toObject()
};
};
DCache.ConfigRsp.prototype.readFromObject = function(json) {
_hasOwnProperty.call(json, "errMsg") && (this.errMsg = json.errMsg);
_hasOwnProperty.call(json, "configItemList") && (this.configItemList.readFromObject(json.configItemList));
return this;
};
DCache.ConfigRsp.prototype.toBinBuffer = function () {
var os = new TarsStream.TarsOutputStream();
this._writeTo(os);
return os.getBinBuffer();
};
DCache.ConfigRsp.new = function () {
return new DCache.ConfigRsp();
};
DCache.ConfigRsp.create = function (is) {
return DCache.ConfigRsp._readFrom(is);
};
var __DCache_DCacheOpt$addCacheConfigItem$IF = {
"name" : "addCacheConfigItem",
"return" : "int32",
"arguments" : [{
"name" : "configReq",
"class" : "DCache.CacheConfigReq",
"direction" : "in"
}, {
"name" : "configRsq",
"class" : "DCache.ConfigRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$addCacheConfigItem$IE = function (configReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, configReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$expandDCache$DE = function (data) {
var __DCache_DCacheOpt$addCacheConfigItem$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
......@@ -1793,45 +2068,75 @@ var __DCache_DCacheOpt$expandDCache$DE = function (data) {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"expandRsq" : is.readStruct(2, true, DCache.ExpandRsp)
"configRsq" : is.readStruct(2, true, DCache.ConfigRsp)
}
}
};
} catch (e) {
throw {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$addCacheConfigItem$PE = function (configReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("configReq", configReq);
return tup;
};
var __DCache_DCacheOpt$addCacheConfigItem$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : {
"code" : TarsError.CLIENT.DECODE_ERROR,
"message" : e.message
"return" : tup.readInt32("", 0),
"arguments" : {
"configRsq" : tup.readStruct("configRsq", DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$expandDCache$ER = function (data) {
throw {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : data.error
}
var __DCache_DCacheOpt$addCacheConfigItem$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::addCacheConfigItem failed");
};
DCache.DCacheOptProxy.prototype.addCacheConfigItem = function (configReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("addCacheConfigItem", __DCache_DCacheOpt$addCacheConfigItem$PE(configReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$addCacheConfigItem$IF).then(__DCache_DCacheOpt$addCacheConfigItem$PD, __DCache_DCacheOpt$addCacheConfigItem$ER);
} else {
return this._worker.tars_invoke("addCacheConfigItem", __DCache_DCacheOpt$addCacheConfigItem$IE(configReq), arguments[arguments.length - 1], __DCache_DCacheOpt$addCacheConfigItem$IF).then(__DCache_DCacheOpt$addCacheConfigItem$ID, __DCache_DCacheOpt$addCacheConfigItem$ER);
}
};
DCache.DCacheOptProxy.addCacheConfigItem = __DCache_DCacheOpt$addCacheConfigItem$IF;
DCache.DCacheOptProxy.prototype.expandDCache = function (expandReq) {
return this._worker.tars_invoke("expandDCache", __DCache_DCacheOpt$expandDCache$EN(expandReq), arguments[arguments.length - 1]).then(__DCache_DCacheOpt$expandDCache$DE, __DCache_DCacheOpt$expandDCache$ER);
var __DCache_DCacheOpt$addServerConfigItem$IF = {
"name" : "addServerConfigItem",
"return" : "int32",
"arguments" : [{
"name" : "configReq",
"class" : "DCache.ServerConfigReq",
"direction" : "in"
}, {
"name" : "configRsq",
"class" : "DCache.ConfigRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$getReleaseProgress$EN = function (progressReq) {
var __DCache_DCacheOpt$addServerConfigItem$IE = function (configReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, progressReq);
os.writeStruct(1, configReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$getReleaseProgress$DE = function (data) {
var __DCache_DCacheOpt$addServerConfigItem$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
......@@ -1840,45 +2145,75 @@ var __DCache_DCacheOpt$getReleaseProgress$DE = function (data) {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"progressRsp" : is.readStruct(2, true, DCache.ReleaseProgressRsp)
"configRsq" : is.readStruct(2, true, DCache.ConfigRsp)
}
}
};
} catch (e) {
throw {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$addServerConfigItem$PE = function (configReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("configReq", configReq);
return tup;
};
var __DCache_DCacheOpt$addServerConfigItem$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : {
"code" : TarsError.CLIENT.DECODE_ERROR,
"message" : e.message
"return" : tup.readInt32("", 0),
"arguments" : {
"configRsq" : tup.readStruct("configRsq", DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$getReleaseProgress$ER = function (data) {
throw {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : data.error
}
var __DCache_DCacheOpt$addServerConfigItem$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::addServerConfigItem failed");
};
DCache.DCacheOptProxy.prototype.addServerConfigItem = function (configReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("addServerConfigItem", __DCache_DCacheOpt$addServerConfigItem$PE(configReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$addServerConfigItem$IF).then(__DCache_DCacheOpt$addServerConfigItem$PD, __DCache_DCacheOpt$addServerConfigItem$ER);
} else {
return this._worker.tars_invoke("addServerConfigItem", __DCache_DCacheOpt$addServerConfigItem$IE(configReq), arguments[arguments.length - 1], __DCache_DCacheOpt$addServerConfigItem$IF).then(__DCache_DCacheOpt$addServerConfigItem$ID, __DCache_DCacheOpt$addServerConfigItem$ER);
}
};
DCache.DCacheOptProxy.addServerConfigItem = __DCache_DCacheOpt$addServerConfigItem$IF;
DCache.DCacheOptProxy.prototype.getReleaseProgress = function (progressReq) {
return this._worker.tars_invoke("getReleaseProgress", __DCache_DCacheOpt$getReleaseProgress$EN(progressReq), arguments[arguments.length - 1]).then(__DCache_DCacheOpt$getReleaseProgress$DE, __DCache_DCacheOpt$getReleaseProgress$ER);
var __DCache_DCacheOpt$deleteCacheConfigItem$IF = {
"name" : "deleteCacheConfigItem",
"return" : "int32",
"arguments" : [{
"name" : "configReq",
"class" : "DCache.CacheConfigReq",
"direction" : "in"
}, {
"name" : "configRsq",
"class" : "DCache.ConfigRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$getUninstallPercent$EN = function (uninstallInfo) {
var __DCache_DCacheOpt$deleteCacheConfigItem$IE = function (configReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, uninstallInfo);
os.writeStruct(1, configReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$getUninstallPercent$DE = function (data) {
var __DCache_DCacheOpt$deleteCacheConfigItem$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
......@@ -1887,45 +2222,75 @@ var __DCache_DCacheOpt$getUninstallPercent$DE = function (data) {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"progressRsp" : is.readStruct(2, true, DCache.UninstallProgressRsp)
"configRsq" : is.readStruct(2, true, DCache.ConfigRsp)
}
}
};
} catch (e) {
throw {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$deleteCacheConfigItem$PE = function (configReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("configReq", configReq);
return tup;
};
var __DCache_DCacheOpt$deleteCacheConfigItem$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : {
"code" : TarsError.CLIENT.DECODE_ERROR,
"message" : e.message
"return" : tup.readInt32("", 0),
"arguments" : {
"configRsq" : tup.readStruct("configRsq", DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$getUninstallPercent$ER = function (data) {
throw {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : data.error
}
var __DCache_DCacheOpt$deleteCacheConfigItem$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::deleteCacheConfigItem failed");
};
DCache.DCacheOptProxy.prototype.deleteCacheConfigItem = function (configReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("deleteCacheConfigItem", __DCache_DCacheOpt$deleteCacheConfigItem$PE(configReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$deleteCacheConfigItem$IF).then(__DCache_DCacheOpt$deleteCacheConfigItem$PD, __DCache_DCacheOpt$deleteCacheConfigItem$ER);
} else {
return this._worker.tars_invoke("deleteCacheConfigItem", __DCache_DCacheOpt$deleteCacheConfigItem$IE(configReq), arguments[arguments.length - 1], __DCache_DCacheOpt$deleteCacheConfigItem$IF).then(__DCache_DCacheOpt$deleteCacheConfigItem$ID, __DCache_DCacheOpt$deleteCacheConfigItem$ER);
}
};
DCache.DCacheOptProxy.deleteCacheConfigItem = __DCache_DCacheOpt$deleteCacheConfigItem$IF;
DCache.DCacheOptProxy.prototype.getUninstallPercent = function (uninstallInfo) {
return this._worker.tars_invoke("getUninstallPercent", __DCache_DCacheOpt$getUninstallPercent$EN(uninstallInfo), arguments[arguments.length - 1]).then(__DCache_DCacheOpt$getUninstallPercent$DE, __DCache_DCacheOpt$getUninstallPercent$ER);
var __DCache_DCacheOpt$deleteServerConfigItem$IF = {
"name" : "deleteServerConfigItem",
"return" : "int32",
"arguments" : [{
"name" : "configReq",
"class" : "DCache.ServerConfigReq",
"direction" : "in"
}, {
"name" : "configRsq",
"class" : "DCache.ConfigRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$installApp$EN = function (installReq) {
var __DCache_DCacheOpt$deleteServerConfigItem$IE = function (configReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, installReq);
os.writeStruct(1, configReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$installApp$DE = function (data) {
var __DCache_DCacheOpt$deleteServerConfigItem$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
......@@ -1934,45 +2299,75 @@ var __DCache_DCacheOpt$installApp$DE = function (data) {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"instalRsp" : is.readStruct(2, true, DCache.InstallAppRsp)
"configRsq" : is.readStruct(2, true, DCache.ConfigRsp)
}
}
};
} catch (e) {
throw {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$deleteServerConfigItem$PE = function (configReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("configReq", configReq);
return tup;
};
var __DCache_DCacheOpt$deleteServerConfigItem$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : {
"code" : TarsError.CLIENT.DECODE_ERROR,
"message" : e.message
"return" : tup.readInt32("", 0),
"arguments" : {
"configRsq" : tup.readStruct("configRsq", DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$installApp$ER = function (data) {
throw {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : data.error
}
var __DCache_DCacheOpt$deleteServerConfigItem$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::deleteServerConfigItem failed");
};
DCache.DCacheOptProxy.prototype.deleteServerConfigItem = function (configReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("deleteServerConfigItem", __DCache_DCacheOpt$deleteServerConfigItem$PE(configReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$deleteServerConfigItem$IF).then(__DCache_DCacheOpt$deleteServerConfigItem$PD, __DCache_DCacheOpt$deleteServerConfigItem$ER);
} else {
return this._worker.tars_invoke("deleteServerConfigItem", __DCache_DCacheOpt$deleteServerConfigItem$IE(configReq), arguments[arguments.length - 1], __DCache_DCacheOpt$deleteServerConfigItem$IF).then(__DCache_DCacheOpt$deleteServerConfigItem$ID, __DCache_DCacheOpt$deleteServerConfigItem$ER);
}
};
DCache.DCacheOptProxy.deleteServerConfigItem = __DCache_DCacheOpt$deleteServerConfigItem$IF;
DCache.DCacheOptProxy.prototype.installApp = function (installReq) {
return this._worker.tars_invoke("installApp", __DCache_DCacheOpt$installApp$EN(installReq), arguments[arguments.length - 1]).then(__DCache_DCacheOpt$installApp$DE, __DCache_DCacheOpt$installApp$ER);
var __DCache_DCacheOpt$deleteServerConfigItemBatch$IF = {
"name" : "deleteServerConfigItemBatch",
"return" : "int32",
"arguments" : [{
"name" : "configReq",
"class" : "list(DCache.ServerConfigReq)",
"direction" : "in"
}, {
"name" : "configRsq",
"class" : "DCache.ConfigRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$installKVCacheModule$EN = function (kvCacheReq) {
var __DCache_DCacheOpt$deleteServerConfigItemBatch$IE = function (configReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, kvCacheReq);
os.writeList(1, configReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$installKVCacheModule$DE = function (data) {
var __DCache_DCacheOpt$deleteServerConfigItemBatch$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
......@@ -1981,45 +2376,75 @@ var __DCache_DCacheOpt$installKVCacheModule$DE = function (data) {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"kvCacheRsp" : is.readStruct(2, true, DCache.InstallKVCacheRsp)
"configRsq" : is.readStruct(2, true, DCache.ConfigRsp)
}
}
};
} catch (e) {
throw {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$deleteServerConfigItemBatch$PE = function (configReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeList("configReq", configReq);
return tup;
};
var __DCache_DCacheOpt$deleteServerConfigItemBatch$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : {
"code" : TarsError.CLIENT.DECODE_ERROR,
"message" : e.message
"return" : tup.readInt32("", 0),
"arguments" : {
"configRsq" : tup.readStruct("configRsq", DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$installKVCacheModule$ER = function (data) {
throw {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : data.error
}
var __DCache_DCacheOpt$deleteServerConfigItemBatch$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::deleteServerConfigItemBatch failed");
};
DCache.DCacheOptProxy.prototype.deleteServerConfigItemBatch = function (configReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("deleteServerConfigItemBatch", __DCache_DCacheOpt$deleteServerConfigItemBatch$PE(configReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$deleteServerConfigItemBatch$IF).then(__DCache_DCacheOpt$deleteServerConfigItemBatch$PD, __DCache_DCacheOpt$deleteServerConfigItemBatch$ER);
} else {
return this._worker.tars_invoke("deleteServerConfigItemBatch", __DCache_DCacheOpt$deleteServerConfigItemBatch$IE(configReq), arguments[arguments.length - 1], __DCache_DCacheOpt$deleteServerConfigItemBatch$IF).then(__DCache_DCacheOpt$deleteServerConfigItemBatch$ID, __DCache_DCacheOpt$deleteServerConfigItemBatch$ER);
}
};
DCache.DCacheOptProxy.deleteServerConfigItemBatch = __DCache_DCacheOpt$deleteServerConfigItemBatch$IF;
DCache.DCacheOptProxy.prototype.installKVCacheModule = function (kvCacheReq) {
return this._worker.tars_invoke("installKVCacheModule", __DCache_DCacheOpt$installKVCacheModule$EN(kvCacheReq), arguments[arguments.length - 1]).then(__DCache_DCacheOpt$installKVCacheModule$DE, __DCache_DCacheOpt$installKVCacheModule$ER);
var __DCache_DCacheOpt$expandDCache$IF = {
"name" : "expandDCache",
"return" : "int32",
"arguments" : [{
"name" : "expandReq",
"class" : "DCache.ExpandReq",
"direction" : "in"
}, {
"name" : "expandRsq",
"class" : "DCache.ExpandRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$installMKVCacheModule$EN = function (mkvCacheReq) {
var __DCache_DCacheOpt$expandDCache$IE = function (expandReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, mkvCacheReq);
os.writeStruct(1, expandReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$installMKVCacheModule$DE = function (data) {
var __DCache_DCacheOpt$expandDCache$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
......@@ -2028,45 +2453,75 @@ var __DCache_DCacheOpt$installMKVCacheModule$DE = function (data) {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"mkvCacheRsp" : is.readStruct(2, true, DCache.InstallMKVCacheRsp)
"expandRsq" : is.readStruct(2, true, DCache.ExpandRsp)
}
}
};
} catch (e) {
throw {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$expandDCache$PE = function (expandReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("expandReq", expandReq);
return tup;
};
var __DCache_DCacheOpt$expandDCache$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : {
"code" : TarsError.CLIENT.DECODE_ERROR,
"message" : e.message
"return" : tup.readInt32("", 0),
"arguments" : {
"expandRsq" : tup.readStruct("expandRsq", DCache.ExpandRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$installMKVCacheModule$ER = function (data) {
throw {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : data.error
}
var __DCache_DCacheOpt$expandDCache$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::expandDCache failed");
};
DCache.DCacheOptProxy.prototype.expandDCache = function (expandReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("expandDCache", __DCache_DCacheOpt$expandDCache$PE(expandReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$expandDCache$IF).then(__DCache_DCacheOpt$expandDCache$PD, __DCache_DCacheOpt$expandDCache$ER);
} else {
return this._worker.tars_invoke("expandDCache", __DCache_DCacheOpt$expandDCache$IE(expandReq), arguments[arguments.length - 1], __DCache_DCacheOpt$expandDCache$IF).then(__DCache_DCacheOpt$expandDCache$ID, __DCache_DCacheOpt$expandDCache$ER);
}
};
DCache.DCacheOptProxy.expandDCache = __DCache_DCacheOpt$expandDCache$IF;
DCache.DCacheOptProxy.prototype.installMKVCacheModule = function (mkvCacheReq) {
return this._worker.tars_invoke("installMKVCacheModule", __DCache_DCacheOpt$installMKVCacheModule$EN(mkvCacheReq), arguments[arguments.length - 1]).then(__DCache_DCacheOpt$installMKVCacheModule$DE, __DCache_DCacheOpt$installMKVCacheModule$ER);
var __DCache_DCacheOpt$getCacheConfigItemList$IF = {
"name" : "getCacheConfigItemList",
"return" : "int32",
"arguments" : [{
"name" : "configReq",
"class" : "DCache.CacheConfigReq",
"direction" : "in"
}, {
"name" : "configRsq",
"class" : "DCache.ConfigRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$releaseServer$EN = function (releaseInfo) {
var __DCache_DCacheOpt$getCacheConfigItemList$IE = function (configReq) {
var os = new TarsStream.TarsOutputStream();
os.writeList(1, releaseInfo);
os.writeStruct(1, configReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$releaseServer$DE = function (data) {
var __DCache_DCacheOpt$getCacheConfigItemList$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
......@@ -2075,94 +2530,152 @@ var __DCache_DCacheOpt$releaseServer$DE = function (data) {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"releaseRsp" : is.readStruct(2, true, DCache.ReleaseRsp)
"configRsq" : is.readStruct(2, true, DCache.ConfigRsp)
}
}
};
} catch (e) {
throw {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$getCacheConfigItemList$PE = function (configReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("configReq", configReq);
return tup;
};
var __DCache_DCacheOpt$getCacheConfigItemList$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : {
"code" : TarsError.CLIENT.DECODE_ERROR,
"message" : e.message
"return" : tup.readInt32("", 0),
"arguments" : {
"configRsq" : tup.readStruct("configRsq", DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$releaseServer$ER = function (data) {
throw {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : data.error
}
var __DCache_DCacheOpt$getCacheConfigItemList$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::getCacheConfigItemList failed");
};
DCache.DCacheOptProxy.prototype.getCacheConfigItemList = function (configReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("getCacheConfigItemList", __DCache_DCacheOpt$getCacheConfigItemList$PE(configReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$getCacheConfigItemList$IF).then(__DCache_DCacheOpt$getCacheConfigItemList$PD, __DCache_DCacheOpt$getCacheConfigItemList$ER);
} else {
return this._worker.tars_invoke("getCacheConfigItemList", __DCache_DCacheOpt$getCacheConfigItemList$IE(configReq), arguments[arguments.length - 1], __DCache_DCacheOpt$getCacheConfigItemList$IF).then(__DCache_DCacheOpt$getCacheConfigItemList$ID, __DCache_DCacheOpt$getCacheConfigItemList$ER);
}
};
DCache.DCacheOptProxy.getCacheConfigItemList = __DCache_DCacheOpt$getCacheConfigItemList$IF;
DCache.DCacheOptProxy.prototype.releaseServer = function (releaseInfo) {
return this._worker.tars_invoke("releaseServer", __DCache_DCacheOpt$releaseServer$EN(releaseInfo), arguments[arguments.length - 1]).then(__DCache_DCacheOpt$releaseServer$DE, __DCache_DCacheOpt$releaseServer$ER);
var __DCache_DCacheOpt$getReleaseProgress$IF = {
"name" : "getReleaseProgress",
"return" : "int32",
"arguments" : [{
"name" : "progressReq",
"class" : "DCache.ReleaseProgressReq",
"direction" : "in"
}, {
"name" : "progressRsp",
"class" : "DCache.ReleaseProgressRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$EN = function (appName, moduleName, sRouterServerName) {
var __DCache_DCacheOpt$getReleaseProgress$IE = function (progressReq) {
var os = new TarsStream.TarsOutputStream();
os.writeString(1, appName);
os.writeString(2, moduleName);
os.writeString(3, sRouterServerName);
os.writeStruct(1, progressReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$DE = function (data) {
var __DCache_DCacheOpt$getReleaseProgress$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readBoolean(0, true, true),
"return" : is.readInt32(0, true, 0),
"arguments" : {
"sResult" : is.readString(4, true, "")
"progressRsp" : is.readStruct(2, true, DCache.ReleaseProgressRsp)
}
}
};
} catch (e) {
throw {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$getReleaseProgress$PE = function (progressReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("progressReq", progressReq);
return tup;
};
var __DCache_DCacheOpt$getReleaseProgress$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : {
"code" : TarsError.CLIENT.DECODE_ERROR,
"message" : e.message
"return" : tup.readInt32("", 0),
"arguments" : {
"progressRsp" : tup.readStruct("progressRsp", DCache.ReleaseProgressRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$ER = function (data) {
throw {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : data.error
}
var __DCache_DCacheOpt$getReleaseProgress$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::getReleaseProgress failed");
};
DCache.DCacheOptProxy.prototype.getReleaseProgress = function (progressReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("getReleaseProgress", __DCache_DCacheOpt$getReleaseProgress$PE(progressReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$getReleaseProgress$IF).then(__DCache_DCacheOpt$getReleaseProgress$PD, __DCache_DCacheOpt$getReleaseProgress$ER);
} else {
return this._worker.tars_invoke("getReleaseProgress", __DCache_DCacheOpt$getReleaseProgress$IE(progressReq), arguments[arguments.length - 1], __DCache_DCacheOpt$getReleaseProgress$IF).then(__DCache_DCacheOpt$getReleaseProgress$ID, __DCache_DCacheOpt$getReleaseProgress$ER);
}
};
DCache.DCacheOptProxy.getReleaseProgress = __DCache_DCacheOpt$getReleaseProgress$IF;
DCache.DCacheOptProxy.prototype.reloadRouterConfByModuleFromDB = function (appName, moduleName, sRouterServerName) {
return this._worker.tars_invoke("reloadRouterConfByModuleFromDB", __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$EN(appName, moduleName, sRouterServerName), arguments[arguments.length - 1]).then(__DCache_DCacheOpt$reloadRouterConfByModuleFromDB$DE, __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$ER);
var __DCache_DCacheOpt$getServerConfigItemList$IF = {
"name" : "getServerConfigItemList",
"return" : "int32",
"arguments" : [{
"name" : "configReq",
"class" : "DCache.ServerConfigReq",
"direction" : "in"
}, {
"name" : "configRsq",
"class" : "DCache.ConfigRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$transferDCache$EN = function (transferReq) {
var __DCache_DCacheOpt$getServerConfigItemList$IE = function (configReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, transferReq);
os.writeStruct(1, configReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$transferDCache$DE = function (data) {
var __DCache_DCacheOpt$getServerConfigItemList$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
......@@ -2171,45 +2684,75 @@ var __DCache_DCacheOpt$transferDCache$DE = function (data) {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"transferRsp" : is.readStruct(2, true, DCache.TransferRsp)
"configRsq" : is.readStruct(2, true, DCache.ConfigRsp)
}
}
};
} catch (e) {
throw {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$getServerConfigItemList$PE = function (configReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("configReq", configReq);
return tup;
};
var __DCache_DCacheOpt$getServerConfigItemList$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : {
"code" : TarsError.CLIENT.DECODE_ERROR,
"message" : e.message
"return" : tup.readInt32("", 0),
"arguments" : {
"configRsq" : tup.readStruct("configRsq", DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$transferDCache$ER = function (data) {
throw {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : data.error
}
var __DCache_DCacheOpt$getServerConfigItemList$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::getServerConfigItemList failed");
};
DCache.DCacheOptProxy.prototype.getServerConfigItemList = function (configReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("getServerConfigItemList", __DCache_DCacheOpt$getServerConfigItemList$PE(configReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$getServerConfigItemList$IF).then(__DCache_DCacheOpt$getServerConfigItemList$PD, __DCache_DCacheOpt$getServerConfigItemList$ER);
} else {
return this._worker.tars_invoke("getServerConfigItemList", __DCache_DCacheOpt$getServerConfigItemList$IE(configReq), arguments[arguments.length - 1], __DCache_DCacheOpt$getServerConfigItemList$IF).then(__DCache_DCacheOpt$getServerConfigItemList$ID, __DCache_DCacheOpt$getServerConfigItemList$ER);
}
};
DCache.DCacheOptProxy.getServerConfigItemList = __DCache_DCacheOpt$getServerConfigItemList$IF;
DCache.DCacheOptProxy.prototype.transferDCache = function (transferReq) {
return this._worker.tars_invoke("transferDCache", __DCache_DCacheOpt$transferDCache$EN(transferReq), arguments[arguments.length - 1]).then(__DCache_DCacheOpt$transferDCache$DE, __DCache_DCacheOpt$transferDCache$ER);
var __DCache_DCacheOpt$getServerNodeConfigItemList$IF = {
"name" : "getServerNodeConfigItemList",
"return" : "int32",
"arguments" : [{
"name" : "configReq",
"class" : "DCache.ServerConfigReq",
"direction" : "in"
}, {
"name" : "configRsq",
"class" : "DCache.ConfigRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$uninstall4DCache$EN = function (uninstallInfo) {
var __DCache_DCacheOpt$getServerNodeConfigItemList$IE = function (configReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, uninstallInfo);
os.writeStruct(1, configReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$uninstall4DCache$DE = function (data) {
var __DCache_DCacheOpt$getServerNodeConfigItemList$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
......@@ -2218,37 +2761,912 @@ var __DCache_DCacheOpt$uninstall4DCache$DE = function (data) {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"uninstallRsp" : is.readStruct(2, true, DCache.UninstallRsp)
"configRsq" : is.readStruct(2, true, DCache.ConfigRsp)
}
}
};
} catch (e) {
throw {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$getServerNodeConfigItemList$PE = function (configReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("configReq", configReq);
return tup;
};
var __DCache_DCacheOpt$getServerNodeConfigItemList$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : {
"code" : TarsError.CLIENT.DECODE_ERROR,
"message" : e.message
"return" : tup.readInt32("", 0),
"arguments" : {
"configRsq" : tup.readStruct("configRsq", DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$uninstall4DCache$ER = function (data) {
throw {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"error" : data.error
}
var __DCache_DCacheOpt$getServerNodeConfigItemList$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::getServerNodeConfigItemList failed");
};
DCache.DCacheOptProxy.prototype.getServerNodeConfigItemList = function (configReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("getServerNodeConfigItemList", __DCache_DCacheOpt$getServerNodeConfigItemList$PE(configReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$getServerNodeConfigItemList$IF).then(__DCache_DCacheOpt$getServerNodeConfigItemList$PD, __DCache_DCacheOpt$getServerNodeConfigItemList$ER);
} else {
return this._worker.tars_invoke("getServerNodeConfigItemList", __DCache_DCacheOpt$getServerNodeConfigItemList$IE(configReq), arguments[arguments.length - 1], __DCache_DCacheOpt$getServerNodeConfigItemList$IF).then(__DCache_DCacheOpt$getServerNodeConfigItemList$ID, __DCache_DCacheOpt$getServerNodeConfigItemList$ER);
}
};
DCache.DCacheOptProxy.getServerNodeConfigItemList = __DCache_DCacheOpt$getServerNodeConfigItemList$IF;
DCache.DCacheOptProxy.prototype.uninstall4DCache = function (uninstallInfo) {
return this._worker.tars_invoke("uninstall4DCache", __DCache_DCacheOpt$uninstall4DCache$EN(uninstallInfo), arguments[arguments.length - 1]).then(__DCache_DCacheOpt$uninstall4DCache$DE, __DCache_DCacheOpt$uninstall4DCache$ER);
var __DCache_DCacheOpt$getUninstallPercent$IF = {
"name" : "getUninstallPercent",
"return" : "int32",
"arguments" : [{
"name" : "uninstallInfo",
"class" : "DCache.UninstallInfo",
"direction" : "in"
}, {
"name" : "progressRsp",
"class" : "DCache.UninstallProgressRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$getUninstallPercent$IE = function (uninstallInfo) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, uninstallInfo);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$getUninstallPercent$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"progressRsp" : is.readStruct(2, true, DCache.UninstallProgressRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$getUninstallPercent$PE = function (uninstallInfo, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("uninstallInfo", uninstallInfo);
return tup;
};
var __DCache_DCacheOpt$getUninstallPercent$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : tup.readInt32("", 0),
"arguments" : {
"progressRsp" : tup.readStruct("progressRsp", DCache.UninstallProgressRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$getUninstallPercent$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::getUninstallPercent failed");
};
DCache.DCacheOptProxy.prototype.getUninstallPercent = function (uninstallInfo) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("getUninstallPercent", __DCache_DCacheOpt$getUninstallPercent$PE(uninstallInfo, version), arguments[arguments.length - 1], __DCache_DCacheOpt$getUninstallPercent$IF).then(__DCache_DCacheOpt$getUninstallPercent$PD, __DCache_DCacheOpt$getUninstallPercent$ER);
} else {
return this._worker.tars_invoke("getUninstallPercent", __DCache_DCacheOpt$getUninstallPercent$IE(uninstallInfo), arguments[arguments.length - 1], __DCache_DCacheOpt$getUninstallPercent$IF).then(__DCache_DCacheOpt$getUninstallPercent$ID, __DCache_DCacheOpt$getUninstallPercent$ER);
}
};
DCache.DCacheOptProxy.getUninstallPercent = __DCache_DCacheOpt$getUninstallPercent$IF;
var __DCache_DCacheOpt$installApp$IF = {
"name" : "installApp",
"return" : "int32",
"arguments" : [{
"name" : "installReq",
"class" : "DCache.InstallAppReq",
"direction" : "in"
}, {
"name" : "instalRsp",
"class" : "DCache.InstallAppRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$installApp$IE = function (installReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, installReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$installApp$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"instalRsp" : is.readStruct(2, true, DCache.InstallAppRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$installApp$PE = function (installReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("installReq", installReq);
return tup;
};
var __DCache_DCacheOpt$installApp$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : tup.readInt32("", 0),
"arguments" : {
"instalRsp" : tup.readStruct("instalRsp", DCache.InstallAppRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$installApp$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::installApp failed");
};
DCache.DCacheOptProxy.prototype.installApp = function (installReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("installApp", __DCache_DCacheOpt$installApp$PE(installReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$installApp$IF).then(__DCache_DCacheOpt$installApp$PD, __DCache_DCacheOpt$installApp$ER);
} else {
return this._worker.tars_invoke("installApp", __DCache_DCacheOpt$installApp$IE(installReq), arguments[arguments.length - 1], __DCache_DCacheOpt$installApp$IF).then(__DCache_DCacheOpt$installApp$ID, __DCache_DCacheOpt$installApp$ER);
}
};
DCache.DCacheOptProxy.installApp = __DCache_DCacheOpt$installApp$IF;
var __DCache_DCacheOpt$installKVCacheModule$IF = {
"name" : "installKVCacheModule",
"return" : "int32",
"arguments" : [{
"name" : "kvCacheReq",
"class" : "DCache.InstallKVCacheReq",
"direction" : "in"
}, {
"name" : "kvCacheRsp",
"class" : "DCache.InstallKVCacheRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$installKVCacheModule$IE = function (kvCacheReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, kvCacheReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$installKVCacheModule$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"kvCacheRsp" : is.readStruct(2, true, DCache.InstallKVCacheRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$installKVCacheModule$PE = function (kvCacheReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("kvCacheReq", kvCacheReq);
return tup;
};
var __DCache_DCacheOpt$installKVCacheModule$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : tup.readInt32("", 0),
"arguments" : {
"kvCacheRsp" : tup.readStruct("kvCacheRsp", DCache.InstallKVCacheRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$installKVCacheModule$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::installKVCacheModule failed");
};
DCache.DCacheOptProxy.prototype.installKVCacheModule = function (kvCacheReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("installKVCacheModule", __DCache_DCacheOpt$installKVCacheModule$PE(kvCacheReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$installKVCacheModule$IF).then(__DCache_DCacheOpt$installKVCacheModule$PD, __DCache_DCacheOpt$installKVCacheModule$ER);
} else {
return this._worker.tars_invoke("installKVCacheModule", __DCache_DCacheOpt$installKVCacheModule$IE(kvCacheReq), arguments[arguments.length - 1], __DCache_DCacheOpt$installKVCacheModule$IF).then(__DCache_DCacheOpt$installKVCacheModule$ID, __DCache_DCacheOpt$installKVCacheModule$ER);
}
};
DCache.DCacheOptProxy.installKVCacheModule = __DCache_DCacheOpt$installKVCacheModule$IF;
var __DCache_DCacheOpt$installMKVCacheModule$IF = {
"name" : "installMKVCacheModule",
"return" : "int32",
"arguments" : [{
"name" : "mkvCacheReq",
"class" : "DCache.InstallMKVCacheReq",
"direction" : "in"
}, {
"name" : "mkvCacheRsp",
"class" : "DCache.InstallMKVCacheRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$installMKVCacheModule$IE = function (mkvCacheReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, mkvCacheReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$installMKVCacheModule$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"mkvCacheRsp" : is.readStruct(2, true, DCache.InstallMKVCacheRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$installMKVCacheModule$PE = function (mkvCacheReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("mkvCacheReq", mkvCacheReq);
return tup;
};
var __DCache_DCacheOpt$installMKVCacheModule$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : tup.readInt32("", 0),
"arguments" : {
"mkvCacheRsp" : tup.readStruct("mkvCacheRsp", DCache.InstallMKVCacheRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$installMKVCacheModule$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::installMKVCacheModule failed");
};
DCache.DCacheOptProxy.prototype.installMKVCacheModule = function (mkvCacheReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("installMKVCacheModule", __DCache_DCacheOpt$installMKVCacheModule$PE(mkvCacheReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$installMKVCacheModule$IF).then(__DCache_DCacheOpt$installMKVCacheModule$PD, __DCache_DCacheOpt$installMKVCacheModule$ER);
} else {
return this._worker.tars_invoke("installMKVCacheModule", __DCache_DCacheOpt$installMKVCacheModule$IE(mkvCacheReq), arguments[arguments.length - 1], __DCache_DCacheOpt$installMKVCacheModule$IF).then(__DCache_DCacheOpt$installMKVCacheModule$ID, __DCache_DCacheOpt$installMKVCacheModule$ER);
}
};
DCache.DCacheOptProxy.installMKVCacheModule = __DCache_DCacheOpt$installMKVCacheModule$IF;
var __DCache_DCacheOpt$releaseServer$IF = {
"name" : "releaseServer",
"return" : "int32",
"arguments" : [{
"name" : "releaseInfo",
"class" : "list(DCache.ReleaseInfo)",
"direction" : "in"
}, {
"name" : "releaseRsp",
"class" : "DCache.ReleaseRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$releaseServer$IE = function (releaseInfo) {
var os = new TarsStream.TarsOutputStream();
os.writeList(1, releaseInfo);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$releaseServer$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"releaseRsp" : is.readStruct(2, true, DCache.ReleaseRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$releaseServer$PE = function (releaseInfo, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeList("releaseInfo", releaseInfo);
return tup;
};
var __DCache_DCacheOpt$releaseServer$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : tup.readInt32("", 0),
"arguments" : {
"releaseRsp" : tup.readStruct("releaseRsp", DCache.ReleaseRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$releaseServer$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::releaseServer failed");
};
DCache.DCacheOptProxy.prototype.releaseServer = function (releaseInfo) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("releaseServer", __DCache_DCacheOpt$releaseServer$PE(releaseInfo, version), arguments[arguments.length - 1], __DCache_DCacheOpt$releaseServer$IF).then(__DCache_DCacheOpt$releaseServer$PD, __DCache_DCacheOpt$releaseServer$ER);
} else {
return this._worker.tars_invoke("releaseServer", __DCache_DCacheOpt$releaseServer$IE(releaseInfo), arguments[arguments.length - 1], __DCache_DCacheOpt$releaseServer$IF).then(__DCache_DCacheOpt$releaseServer$ID, __DCache_DCacheOpt$releaseServer$ER);
}
};
DCache.DCacheOptProxy.releaseServer = __DCache_DCacheOpt$releaseServer$IF;
var __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$IF = {
"name" : "reloadRouterConfByModuleFromDB",
"return" : "bool",
"arguments" : [{
"name" : "appName",
"class" : "string",
"direction" : "in"
}, {
"name" : "moduleName",
"class" : "string",
"direction" : "in"
}, {
"name" : "sRouterServerName",
"class" : "string",
"direction" : "in"
}, {
"name" : "sResult",
"class" : "string",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$IE = function (appName, moduleName, sRouterServerName) {
var os = new TarsStream.TarsOutputStream();
os.writeString(1, appName);
os.writeString(2, moduleName);
os.writeString(3, sRouterServerName);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readBoolean(0, true, true),
"arguments" : {
"sResult" : is.readString(4, true, "")
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$PE = function (appName, moduleName, sRouterServerName, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeString("appName", appName);
tup.writeString("moduleName", moduleName);
tup.writeString("sRouterServerName", sRouterServerName);
return tup;
};
var __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : tup.readBoolean("", false),
"arguments" : {
"sResult" : tup.readString("sResult")
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::reloadRouterConfByModuleFromDB failed");
};
DCache.DCacheOptProxy.prototype.reloadRouterConfByModuleFromDB = function (appName, moduleName, sRouterServerName) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("reloadRouterConfByModuleFromDB", __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$PE(appName, moduleName, sRouterServerName, version), arguments[arguments.length - 1], __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$IF).then(__DCache_DCacheOpt$reloadRouterConfByModuleFromDB$PD, __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$ER);
} else {
return this._worker.tars_invoke("reloadRouterConfByModuleFromDB", __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$IE(appName, moduleName, sRouterServerName), arguments[arguments.length - 1], __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$IF).then(__DCache_DCacheOpt$reloadRouterConfByModuleFromDB$ID, __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$ER);
}
};
DCache.DCacheOptProxy.reloadRouterConfByModuleFromDB = __DCache_DCacheOpt$reloadRouterConfByModuleFromDB$IF;
var __DCache_DCacheOpt$transferDCache$IF = {
"name" : "transferDCache",
"return" : "int32",
"arguments" : [{
"name" : "transferReq",
"class" : "DCache.TransferReq",
"direction" : "in"
}, {
"name" : "transferRsp",
"class" : "DCache.TransferRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$transferDCache$IE = function (transferReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, transferReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$transferDCache$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"transferRsp" : is.readStruct(2, true, DCache.TransferRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$transferDCache$PE = function (transferReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("transferReq", transferReq);
return tup;
};
var __DCache_DCacheOpt$transferDCache$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : tup.readInt32("", 0),
"arguments" : {
"transferRsp" : tup.readStruct("transferRsp", DCache.TransferRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$transferDCache$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::transferDCache failed");
};
DCache.DCacheOptProxy.prototype.transferDCache = function (transferReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("transferDCache", __DCache_DCacheOpt$transferDCache$PE(transferReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$transferDCache$IF).then(__DCache_DCacheOpt$transferDCache$PD, __DCache_DCacheOpt$transferDCache$ER);
} else {
return this._worker.tars_invoke("transferDCache", __DCache_DCacheOpt$transferDCache$IE(transferReq), arguments[arguments.length - 1], __DCache_DCacheOpt$transferDCache$IF).then(__DCache_DCacheOpt$transferDCache$ID, __DCache_DCacheOpt$transferDCache$ER);
}
};
DCache.DCacheOptProxy.transferDCache = __DCache_DCacheOpt$transferDCache$IF;
var __DCache_DCacheOpt$uninstall4DCache$IF = {
"name" : "uninstall4DCache",
"return" : "int32",
"arguments" : [{
"name" : "uninstallInfo",
"class" : "DCache.UninstallInfo",
"direction" : "in"
}, {
"name" : "uninstallRsp",
"class" : "DCache.UninstallRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$uninstall4DCache$IE = function (uninstallInfo) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, uninstallInfo);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$uninstall4DCache$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"uninstallRsp" : is.readStruct(2, true, DCache.UninstallRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$uninstall4DCache$PE = function (uninstallInfo, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("uninstallInfo", uninstallInfo);
return tup;
};
var __DCache_DCacheOpt$uninstall4DCache$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : tup.readInt32("", 0),
"arguments" : {
"uninstallRsp" : tup.readStruct("uninstallRsp", DCache.UninstallRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$uninstall4DCache$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::uninstall4DCache failed");
};
DCache.DCacheOptProxy.prototype.uninstall4DCache = function (uninstallInfo) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("uninstall4DCache", __DCache_DCacheOpt$uninstall4DCache$PE(uninstallInfo, version), arguments[arguments.length - 1], __DCache_DCacheOpt$uninstall4DCache$IF).then(__DCache_DCacheOpt$uninstall4DCache$PD, __DCache_DCacheOpt$uninstall4DCache$ER);
} else {
return this._worker.tars_invoke("uninstall4DCache", __DCache_DCacheOpt$uninstall4DCache$IE(uninstallInfo), arguments[arguments.length - 1], __DCache_DCacheOpt$uninstall4DCache$IF).then(__DCache_DCacheOpt$uninstall4DCache$ID, __DCache_DCacheOpt$uninstall4DCache$ER);
}
};
DCache.DCacheOptProxy.uninstall4DCache = __DCache_DCacheOpt$uninstall4DCache$IF;
var __DCache_DCacheOpt$updateCacheConfigItem$IF = {
"name" : "updateCacheConfigItem",
"return" : "int32",
"arguments" : [{
"name" : "configReq",
"class" : "DCache.CacheConfigReq",
"direction" : "in"
}, {
"name" : "configRsq",
"class" : "DCache.ConfigRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$updateCacheConfigItem$IE = function (configReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, configReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$updateCacheConfigItem$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"configRsq" : is.readStruct(2, true, DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$updateCacheConfigItem$PE = function (configReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("configReq", configReq);
return tup;
};
var __DCache_DCacheOpt$updateCacheConfigItem$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : tup.readInt32("", 0),
"arguments" : {
"configRsq" : tup.readStruct("configRsq", DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$updateCacheConfigItem$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::updateCacheConfigItem failed");
};
DCache.DCacheOptProxy.prototype.updateCacheConfigItem = function (configReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("updateCacheConfigItem", __DCache_DCacheOpt$updateCacheConfigItem$PE(configReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$updateCacheConfigItem$IF).then(__DCache_DCacheOpt$updateCacheConfigItem$PD, __DCache_DCacheOpt$updateCacheConfigItem$ER);
} else {
return this._worker.tars_invoke("updateCacheConfigItem", __DCache_DCacheOpt$updateCacheConfigItem$IE(configReq), arguments[arguments.length - 1], __DCache_DCacheOpt$updateCacheConfigItem$IF).then(__DCache_DCacheOpt$updateCacheConfigItem$ID, __DCache_DCacheOpt$updateCacheConfigItem$ER);
}
};
DCache.DCacheOptProxy.updateCacheConfigItem = __DCache_DCacheOpt$updateCacheConfigItem$IF;
var __DCache_DCacheOpt$updateServerConfigItem$IF = {
"name" : "updateServerConfigItem",
"return" : "int32",
"arguments" : [{
"name" : "configReq",
"class" : "DCache.ServerConfigReq",
"direction" : "in"
}, {
"name" : "configRsq",
"class" : "DCache.ConfigRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$updateServerConfigItem$IE = function (configReq) {
var os = new TarsStream.TarsOutputStream();
os.writeStruct(1, configReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$updateServerConfigItem$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"configRsq" : is.readStruct(2, true, DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$updateServerConfigItem$PE = function (configReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeStruct("configReq", configReq);
return tup;
};
var __DCache_DCacheOpt$updateServerConfigItem$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : tup.readInt32("", 0),
"arguments" : {
"configRsq" : tup.readStruct("configRsq", DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$updateServerConfigItem$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::updateServerConfigItem failed");
};
DCache.DCacheOptProxy.prototype.updateServerConfigItem = function (configReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("updateServerConfigItem", __DCache_DCacheOpt$updateServerConfigItem$PE(configReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$updateServerConfigItem$IF).then(__DCache_DCacheOpt$updateServerConfigItem$PD, __DCache_DCacheOpt$updateServerConfigItem$ER);
} else {
return this._worker.tars_invoke("updateServerConfigItem", __DCache_DCacheOpt$updateServerConfigItem$IE(configReq), arguments[arguments.length - 1], __DCache_DCacheOpt$updateServerConfigItem$IF).then(__DCache_DCacheOpt$updateServerConfigItem$ID, __DCache_DCacheOpt$updateServerConfigItem$ER);
}
};
DCache.DCacheOptProxy.updateServerConfigItem = __DCache_DCacheOpt$updateServerConfigItem$IF;
var __DCache_DCacheOpt$updateServerConfigItemBatch$IF = {
"name" : "updateServerConfigItemBatch",
"return" : "int32",
"arguments" : [{
"name" : "configReq",
"class" : "list(DCache.ServerConfigReq)",
"direction" : "in"
}, {
"name" : "configRsq",
"class" : "DCache.ConfigRsp",
"direction" : "out"
}]
};
var __DCache_DCacheOpt$updateServerConfigItemBatch$IE = function (configReq) {
var os = new TarsStream.TarsOutputStream();
os.writeList(1, configReq);
return os.getBinBuffer();
};
var __DCache_DCacheOpt$updateServerConfigItemBatch$ID = function (data) {
try {
var is = new TarsStream.TarsInputStream(data.response.sBuffer);
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : is.readInt32(0, true, 0),
"arguments" : {
"configRsq" : is.readStruct(2, true, DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$updateServerConfigItemBatch$PE = function (configReq, __$PROTOCOL$VERSION) {
var tup = new TarsStream.UniAttribute();
tup.tupVersion = __$PROTOCOL$VERSION;
tup.writeList("configReq", configReq);
return tup;
};
var __DCache_DCacheOpt$updateServerConfigItemBatch$PD = function (data) {
try {
var tup = data.response.tup;
return {
"request" : data.request,
"response" : {
"costtime" : data.request.costtime,
"return" : tup.readInt32("", 0),
"arguments" : {
"configRsq" : tup.readStruct("configRsq", DCache.ConfigRsp)
}
}
};
} catch (e) {
throw _makeError(data, e.message, TarsError.CLIENT.DECODE_ERROR);
}
};
var __DCache_DCacheOpt$updateServerConfigItemBatch$ER = function (data) {
throw _makeError(data, "Call DCacheOpt::updateServerConfigItemBatch failed");
};
DCache.DCacheOptProxy.prototype.updateServerConfigItemBatch = function (configReq) {
var version = this._worker.version;
if (version === TarsStream.Tup.TUP_SIMPLE || version === TarsStream.Tup.TUP_COMPLEX) {
return this._worker.tup_invoke("updateServerConfigItemBatch", __DCache_DCacheOpt$updateServerConfigItemBatch$PE(configReq, version), arguments[arguments.length - 1], __DCache_DCacheOpt$updateServerConfigItemBatch$IF).then(__DCache_DCacheOpt$updateServerConfigItemBatch$PD, __DCache_DCacheOpt$updateServerConfigItemBatch$ER);
} else {
return this._worker.tars_invoke("updateServerConfigItemBatch", __DCache_DCacheOpt$updateServerConfigItemBatch$IE(configReq), arguments[arguments.length - 1], __DCache_DCacheOpt$updateServerConfigItemBatch$IF).then(__DCache_DCacheOpt$updateServerConfigItemBatch$ID, __DCache_DCacheOpt$updateServerConfigItemBatch$ER);
}
};
DCache.DCacheOptProxy.updateServerConfigItemBatch = __DCache_DCacheOpt$updateServerConfigItemBatch$IF;
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>DCACHE</title><link href=/static/css/dcache.a2771.css rel=stylesheet></head><body><div id=app></div><script>function isIE(){
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>DCACHE</title><link href=/static/css/dcache.fbbc3.css rel=stylesheet></head><body><div id=app></div><script>function isIE(){
if(!!window.ActiveXObject || "ActiveXObject" in window)
return true;
else
......@@ -7,4 +7,4 @@
if(isIE()) {
var body = document.querySelector('body');
body.innerHTML='<div style="width:500px;margin:0 auto">系统不支持IE浏览器,建议您更换为chrome以获得更好的体验</div>';
}</script><script type=text/javascript src=/static/js/manifest.61e49.js></script><script type=text/javascript src=/static/js/vendor.200e1.js></script><script type=text/javascript src=/static/js/dcache.1fcba.js></script></body></html>
\ No newline at end of file
}</script><script type=text/javascript src=/static/js/manifest.61e49.js></script><script type=text/javascript src=/static/js/vendor.200e1.js></script><script type=text/javascript src=/static/js/dcache.7b8f4.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([1],{"+7yo":function(e,t){},"+VT0":function(e,t){},"3NoR":function(e,t,a){"use strict";var o=a("Dd8w"),r=a.n(o),l=a("pFYg"),i=a.n(l),s=a("7+uW"),n=a("QpGM"),c=a.n(n),d=(a("XSxf"),a("K/Lq")),u=a.n(d),m=(a("s2Rr"),{name:"Icon",props:{name:{type:String,required:!0}}}),p={render:function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{staticClass:"icon"},[t("use",{attrs:{"xlink:href":"#"+this.name}})])},staticRenderFns:[]};var h=a("VU/8")(m,p,!1,function(e){a("wi40")},null,null).exports,f={name:"TarsFormItem",props:{label:String}},v={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("let-form-item",{staticClass:"tars-form-item"},[a("label",{staticClass:"let-form-item__label let-label__position_top clickable",on:{click:function(t){e.$emit("onLabelClick")}}},[e._v(e._s(e.label))]),e._v(" "),e._t("default")],2)},staticRenderFns:[]};var _=a("VU/8")(f,v,!1,function(e){a("VbM7")},null,null).exports,g=a("Z/F5"),b=a.n(g),$=a("aqzs"),y=a.n($);s.default.use(c.a,{locale:{en:y.a,cn:b.a}[u.a.get("locale")||"cn"]||b.a}),s.default.component(h.name,h),s.default.component(_.name,_);var w=s.default.prototype.$Loading;function M(e){this.el=e,this.loading=null}M.prototype.show=function(e,t){"object"===(void 0===e?"undefined":i()(e))&&(t=e,e=null),this.loading&&this.hide();var a=this.el,o=w(r()({fullScreen:!a,target:a&&e?a.querySelector(e):a,boxClass:"loading-inner",background:"rgba(0,0,0,0)",color:"#fff",size:24},t));return o.show(),this.loading=o,this},M.prototype.hide=function(){return this.loading&&(this.loading.hide(),this.loading=null),this},M.show=function(){var e;return M._loading||(M._loading=new M),(e=M._loading).show.apply(e,arguments)},M.hide=function(){return M._loading||(M._loading=new M),M._loading.hide()},w.show=M.show,w.hide=M.hide,Object.defineProperty(s.default.prototype,"$loading",{get:function(){return this._loading||(this._loading=new M(this.$el)),this._loading}}),Object.defineProperty(s.default.prototype,"$tip",{get:function(){return this.$Notice}})},"41Zt":function(e,t){},"7x6k":function(e,t,a){"use strict";var o=a("mvHQ"),r=a.n(o),l=a("pFYg"),i=a.n(l),s={name:"InterfaceDebuger",components:{wrapper:a("mxK3").a},data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},tarsFileList:[],uploadModal:{show:!1,model:{}},showDebug:!1,contextData:[],debuger_panel:!1,inParam:"",outParam:"",selectedFileName:"",selectedMethods:[],objName:"",objList:[],selectedId:""}},methods:{getFileList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/get_file_list",{application:this.serverData.application,server_name:this.serverData.server_name}).then(function(a){t.hide(),e.tarsFileList=a}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})},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:null}},uploadFile:function(e){this.uploadModal.model.file=e},uploadTarsFile: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("server_name",this.uploadModal.model.server_name),a.append("set_name",this.uploadModal.model.set_name),a.append("suse",this.uploadModal.model.file),this.$ajax.postForm("/server/api/upload_tars_file",a).then(function(){t.hide(),e.getFileList(),e.uploadModal.show=!1,e.uploadModal.model=null}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})}},closeUploadModal:function(){this.uploadModal.show=!1},showDebuger:function(e){this.showDebug=!0,this.selectedFileName=e.file_name,this.inParam=null,this.outParam=null,this.selectedId=e.f_id,this.objName=null,this.getContextData(e.f_id),this.getObjList()},deleteTarsFile:function(e){var t=this;this.$confirm(this.$t("inf.dlg.deleteMsg"),this.$t("common.alert")).then(function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_tars_file",{id:e}).then(function(e){a.hide(),t.getFileList()}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})}).catch(function(){})},getObjList:function(){var e=this;this.$ajax.getJSON("/server/api/all_adapter_conf_list",{application:this.serverData.application,server_name:this.serverData.server_name}).then(function(t){t.length&&(e.objList=t,e.objName=t[0].servant)}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},getContextData:function(e){var t=this;this.$ajax.getJSON("/server/api/get_contexts",{id:e,application:this.serverData.application,server_name:this.serverData.server_name,type:"all"}).then(function(e){t.contextData=e}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})},parseFields:function(e){var t={};for(var a in e){var o=e[a].defaultValue;o||("string"===e[a].type?o="":"long"!==e[a].type&&"int"!==e[a].type||(o=0)),t[a]=o}return t},getParams:function(e){var t=this;if(this.selectedMethods=e,3==e.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:e[0],interface_name:e[1],function_name:e[2]}).then(function(o){a.hide();var l={};t.$ajax.getJSON("/server/api/get_structs",{id:t.selectedId,module_name:e[0]}).then(function(e){o.forEach(function(a){if(!a.out)if("string"===a.type)l[a.name]="";else if("array"===a.type)l[a.name]=[];else if("object"===i()(a.type))if(a.type.vector)l[a.name]=[];else if(a.type.isEnum){l[a.name]={}}else a.type.isStruct&&(l[a.name]=t.parseFields(e.structs[a.type.name].fields));else l[a.name]=""}),t.inParam=r()(l)})}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})}},doDebug:function(){var e=this,t=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){t.hide(),e.outParam=a}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getFileList()}},n={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_debuger"},[e.showDebug?e._e():a("wrapper",{ref:"tarsFileListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.openTarsUploadFileModal}},[e._v(e._s(e.$t("operate.add")))]),e._v(" "),a("let-table",{attrs:{data:e.tarsFileList,title:e.$t("inf.title.listTitle"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"application"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"file_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),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){e.showDebuger(t.row)}}},[e._v(e._s(e.$t("inf.list.debug")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.deleteTarsFile(t.row.f_id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1)],1),e._v(" "),e.showDebug?a("div",[a("let-form",{staticClass:"left_align",attrs:{itemWidth:"530px"}},[a("let-form-item",{attrs:{label:e.$t("inf.dlg.selectLabel")}},[a("let-cascader",{attrs:{data:e.contextData,required:"",size:"small"},on:{change:e.getParams}})],1),e._v(" "),e.objList.length?a("let-form-item",{attrs:{label:e.$t("inf.dlg.objName")}},[a("let-select",{model:{value:e.objName,callback:function(t){e.objName=t},expression:"objName"}},e._l(e.objList,function(e){return a("let-option",{key:e.servant,attrs:{value:e.servant}})}))],1):e._e(),e._v(" "),a("let-form-item",[a("let-button",{attrs:{theme:"primary"},on:{click:e.doDebug}},[e._v(e._s(e.$t("inf.list.debug")))])],1)],1),e._v(" "),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:e.$t("inf.dlg.inParam")},model:{value:e.inParam,callback:function(t){e.inParam=t},expression:"inParam"}})],1)],1),e._v(" "),a("let-col",{attrs:{span:12}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area",attrs:{type:"textarea",rows:20,placeholder:e.$t("inf.dlg.outParam")},model:{value:e.outParam,callback:function(t){e.outParam=t},expression:"outParam"}})],1)],1)],1)]),e._v(" "),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showDebug=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.$t("inf.title.dlgTitle"),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.uploadTarsFile(t)}}},[a("let-form-item",{attrs:{itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue"),require:""},on:{upload:e.uploadFile}},[e._v("\n "+e._s(e.$t("common.submit")))]),e._v(" "),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1)],1)},staticRenderFns:[]};var c=a("VU/8")(s,n,!1,function(e){a("+VT0")},null,null);t.a=c.exports},"86n0":function(e,t,a){"use strict";var o=a("mvHQ"),r=a.n(o),l=a("//Fk"),i=a.n(l),s=a("Zrlr"),n=a.n(s),c=a("wxAW"),d=a.n(c),u=a("fZjL"),m=a.n(u),p=a("woOf"),h=a.n(p),f=a("pFYg"),v=a.n(f),_=function(e){return"string"==typeof e},g=Array.isArray,b=function(e){return"object"===(void 0===e?"undefined":v()(e))&&null!==e},$=function(e){return"function"==typeof e},y=h.a;function w(e){return String(e).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(e){return"%"+e.charCodeAt().toString(16).slice(-2).toUpperCase()})}function M(e){if(!e)return"";var t=[];return m()(e).forEach(function(a){var o=e[a];null!==o&&void 0!==o||(o=""),t.push(w(a)+"="+w(o))}),t.join("&").replace(/%20/g,"+")}function k(e){return M(m()(e).reduce(function(t,a){return function e(t,a,o){return g(o)||b(o)?(m()(o).forEach(function(r){e(t,a+"["+r+"]",o[r])}),t):(t[a]=o,t)}(t,a,e[a])},{}))}var x=function(){function e(t){n()(this,e),this.defaults=t}return d()(e,[{key:"get",value:function(e){return y({},this.defaults,e)}},{key:"set",value:function(e,t){var a=this;if(e){if(_(e)){var o=e.split(".");o.reduce(function(e,a,r){return r===o.length-1&&(e[a]=t),e[a]},this.defaults)}b(e)&&m()(e).forEach(function(t){a.set(t,e[t])}),g(e)&&e.forEach(function(e){return a.set(e,t)})}}},{key:"remove",value:function(e){var t=this;if(e){if(_(e)){var a=e.split(".");a.reduce(function(e,t,o){return o===a.length-1&&delete e[t],e[t]},this.defaults)}g(e)&&e.forEach(function(e){return t.remove(e)})}}}]),e}(),C=function(){function e(t){n()(this,e),this.handler=t}return d()(e,[{key:"set",value:function(e){$(e)&&(this.handler=e)}},{key:"exec",value:function(){$(this.handler)&&this.handler.apply(null,arguments)}}]),e}(),L=new(function(){function e(t){n()(this,e),this.base=t||""}return d()(e,[{key:"set",value:function(e){_(e)&&(this.base=e)}},{key:"get",value:function(e){return this.base+(e||"")}}]),e}()),S=new x({credentials:"same-origin",timeout:1e4}),D=new x({"X-Requested-With":"XMLHttpRequest"}),A=new x({}),F=new C,P=new C(function(){return!0});function q(e,t){var a=M(A.get(t));return a&&(a=-1===e.indexOf("?")?"?"+a:"&"+a),e+a}function N(e){var t=e.status;if(t>=200&&t<300||304===t)return e;throw F.exec(t,e),new Error(e.statusText)}function R(e){return e.json().then(null,function(t){return F.exec(500,e),i.a.reject(t)})}function O(e){return P.handler(e)?e:i.a.reject(e)}function T(e){return i.a.reject(e)}t.a={ServerUrl:L,Options:S,Headers:D,Body:A,StatusHandler:F,ResultHandler:P,get:function(e,t){var a=S.get({headers:D.get()});return fetch(L.get(q(e,t)),a).then(N).then(R).catch(T)},getJSON:function(e,t){var a=S.get({headers:D.get()});return fetch(L.get(q(e,t)),a).then(N).then(R).then(O).catch(T)},post:function(e,t){var a=S.get({method:"POST",headers:D.get({"Content-Type":"application/x-www-form-urlencoded"}),body:k(A.get(t))});return fetch(L.get(e),a).then(N).then(R).then(O).catch(T)},postForm:function(e,t){var a=S.get({method:"POST",headers:D.get(),body:t}),o=A.get({});return m()(o).forEach(function(e){t.append(e,o[e])}),fetch(L.get(e),a).then(N).then(R).then(O).catch(T)},postJSON:function(e,t){var a=S.get({method:"POST",headers:D.get({Accept:"application/json","Content-Type":"application/json"}),body:r()(A.get(t))});return fetch(L.get(e),a).then(N).then(R).then(O).catch(T)},put:function(e,t){var a=S.get({method:"PUT",headers:D.get({"Content-Type":"application/x-www-form-urlencoded"}),body:k(A.get(t))});return fetch(L.get(e),a).then(N).then(R).then(O).catch(T)},remove:function(e,t){var a=S.get({method:"DELETE",headers:D.get()});return fetch(L.get(q(e,t)),a).then(N).then(R).then(O).catch(T)},download:function(e,t){window.open(L.get(q(e,t)))}}},A58z:function(e,t){},Azzc:function(e,t){},CPgP:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL8AAAA4CAYAAACsXylmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAejSURBVHja7F07UiNJEH0o8GRs34DeE9A3UGNgD+PIkcHgyGU4gdAJAHPloI1YGStnNLYMpBNM7wmmOcE2BjZrqIhVaFBVVmVm61cZQQyDoFWV+fLVy+rs0tHb2xuiRTtEa0QXRDtUOwKA897rE4B8i8Z1M+0372N4omnYu9p5Z/5sy8ZXxBBFU2f+895rCuDnNg1q2m8exdBE02b+4y1k/TKGp15rd7oXFhyU49FguI/z3kbwR8lTv11bar4ZgL0FfwmgH/j3PYvD5oHXnEUs1m42Apzv66SPp/1mUFabWmEd+L/H3ZqdkTwJgOQQV2LOPn8apcves/5e12Ac8K/TiJj2m1G67I7lthfHo0Fk/g/sNLL+XtjJodZfHPBnh7ZM7qmlhyh5gsF/3ntNLE77J+Jpb2TPcwS/X5EU9f6OWLvTdRW7UfZ4gj9q/v2QPHsfy1Dwryt2q2m/WUVM7YzZSKwajwZVBD/daZH1d8tOD3kFlwb/POJpb2TP3oP/2PcPznuvtej9dqebm2/zwEsU49FgYrn+rdBQSyw6H0WLQ9N2kGHRepAFXmbiuEllu27m6aPKxL8cjwaloB8uzDhb5kcUf8yW8DgHMPtIwh0HjEcN/O1O9wuAS8g8VfbZ8foloeDzGTsATAA8hCaCAfxXAJ8g0217TyCXdZaHxqHd6ZZLvigZfriGve/INvb3f78CqNqd7sN4NLjlyp61OnHab5aBzsrane5PAI9CwC9trL/E2NJ2AeDJJHFI4v/EollQAvhDR8GaQs9SA7ofhO3UX7AA4IfxQyI0ngRAr93pPnLBnzmWGgRM9kk4GA+E39GsTx4JzLoK/EfBYFN8oAn+ZdA9GSanMv6T4ti+LMclBPy5lORZmmwiPMkhUatr2qVHbfMo/N4FoSGtVVNdmZgVkWLfFLCwatdB4Dc9/OsspK3hqwbwifvT2uCnMn9P4b0pK1+G+iwlkkBew1iy0II3EwbTNYXFzBe1z4TC+hiPBrN2pxvyBNtvxg+5QMAzYsBnxgcvxLkNCStu4vA5hUASYhKdCqyUE5PUxTpyM/7MANxZ5peKg9+3h99sYdkCUAE40+wnX63+PcefCujTS0LinyncaXUB9orqd+OHb45rUsZvk0aT8WjwmRDPAkDR7nRPjaqwmq/mb0npfSy282z2eZsfpDBbeBMHW3MCXikB3wl+H78bP9w4fu2ZsALaiNB3hX6hKBRf8KeC4M8dBdsM228voWxnGDMVqF1CrO62hoqRjFUACbZEwS/Zw280py3wf2I3rMXYAHBJD00fpDWDv6g5GW3zm4cwfyY4wIzprG2xlLEBICY9hFfdZ2E/cH1RaMWlIeSwQtD52BHJwwV/i1kvcAp1CL93SqgLQsHvqypyaiL67PasW5rKgB7+EwZopECQmYLzdKnYchVePgXxTDFxtBI29L2DE9kkYyI4Hlcizv7+6w9v8EsWu3VrzlXQ30H3hkrB9IHmc9CuVbesOZ4pk0RW7ZI6Fh/wZ4KByjcR+KU+ogS6VjKXZk0COFWQWymjhsgdvrr1XIFyUfCf917F9D5Bc2oG/q4G4FMSeJM+EF11BRL5xPG6ZPvH9+X/UAteyWo820Tga+wdoczBxr6l8rOzGYOlvePJrH0krVptc6fKnnXZWQX08LucpVXsUbosK2LyJeD1OXH+liv7pImHu3lRFyH9cpf4mAnYEGdpaE5unVFg0U5REkGUm9phXQIXDPBrPmegAf7gRPZ90IVhw/FocL/6wwYTOCGBSoWdT60zbO/b91xxstAE3vCR4KmC3OIksrbkKbFo0rv66EUn8zseWC+FnaV1PJ5Lak0EVy+O5FGVPSD2vHiSCieRXbXkDQf4LkI7ZgKn8HTWRopd1Hv7/JmZiJtifulVnJJQVgmsfae/wZngtN/0DVSyIfC3HEWuZP0wY/hADfiEZsJS2A+URLaN5wXK1mAAZ6bgrEppnmKMJ3CfQjoRpYrdEPCfMBM5Y5BILeDPNlCY1Qn+ShBE23y+pUtuzYSvWTBJBBsFv3lgPamrOKUeceF5zVxYaknXDz6ykGMnCuPmbF5sN/hR/7bk3QZ84As4zaegspADrwSA6i15ajjb/1o78K7dntxS7IZMziUJvpgH2wt4nFbwDryALUtgccDUJ4+VjMN2FB88tjvdngGk7w6M7WxO27hDmgm5tY/LLtqd7r/4/7xNX3PiwQV+6Q+doyRMgrBzIs8YzC/FthS/zOE+xCk1X7knsdxb9HUiDFRu7VMoYgEArriyJxPcGXjf+iohb7ZTkmsrzIlF40Tp7ScWwLlYOiQmLQ6wzVi1YlO5zi6ygl/xQ+euFCbbdzh5WAP2S2KClPA/ioPlA+h81q5EPdhXigUp3o3AZS24mDHseAW5Pe2KwKY3NawApYcPbmE5PjxETjpu5Wt81m7KrSGMJtcgwwcu+BPjmI++WEAyS9LvJvO5Msh5vo15/cwArlIC/9zTBzfGB0OBMbmCnUlKHp+HxD2wMBSKzYzapHiELbClrssM/luPQ99nAEzwUsjuNU84fTlLp5blAWRy67j2rQMss4CxXoSORxELpPm8vb0twP/+TbRoh2aN6IJoh2r/DQCUsM1d12kJpgAAAABJRU5ErkJggg=="},CZtL:function(e,t){e.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=="},CeRa:function(e,t,a){"use strict";var o=a("7+uW"),r=(a("miEh"),a("wQkr"),a("MqDE")),l=a.n(r);o.default.component(l.a.name,l.a);var i=a("Wc9H"),s=a.n(i),n=a("IaZV"),c=a.n(n),d=new s.a({id:"zoom-in",use:"zoom-in-usage",viewBox:"0 0 1024 1024",content:'<symbol class="icon" viewBox="0 0 1024 1024" id="zoom-in"><defs><style></style></defs><path d="M426.65984 42.65984q78.00832 0 149.17632 30.49472t122.49088 81.83808 81.83808 122.49088 30.49472 149.17632q0 66.99008-21.83168 128.32768t-62.1568 111.32928l242.33984 241.99168q12.32896 12.32896 12.32896 30.33088 0 18.3296-12.16512 30.49472t-30.49472 12.16512q-18.00192 0-30.33088-12.32896l-241.99168-242.33984q-49.99168 40.32512-111.32928 62.1568t-128.32768 21.83168q-78.00832 0-149.17632-30.49472t-122.49088-81.83808-81.83808-122.49088-30.49472-149.17632 30.49472-149.17632 81.83808-122.49088 122.49088-81.83808 149.17632-30.49472zM426.65984 128q-60.66176 0-115.99872 23.67488t-95.3344 63.67232-63.67232 95.3344-23.67488 115.99872 23.67488 115.99872 63.67232 95.3344 95.3344 63.67232 115.99872 23.67488 115.99872-23.67488 95.3344-63.67232 63.67232-95.3344 23.67488-115.99872-23.67488-115.99872-63.67232-95.3344-95.3344-63.67232-115.99872-23.67488zM426.65984 256q17.67424 0 30.16704 12.4928t12.4928 30.16704l0 85.34016 85.34016 0q17.67424 0 30.16704 12.4928t12.4928 30.16704-12.4928 30.16704-30.16704 12.4928l-85.34016 0 0 85.34016q0 17.67424-12.4928 30.16704t-30.16704 12.4928-30.16704-12.4928-12.4928-30.16704l0-85.34016-85.34016 0q-17.67424 0-30.16704-12.4928t-12.4928-30.16704 12.4928-30.16704 30.16704-12.4928l85.34016 0 0-85.34016q0-17.67424 12.4928-30.16704t30.16704-12.4928z" /></symbol>'}),u=(c.a.add(d),{props:{title:String,timeColumn:String,dataColumns:Array,data:Array},data:function(){return{enlarge:!1}},computed:{chartOptions:function(){var e={},t=[this.timeColumn];return this.dataColumns.forEach(function(a){var o=a.name,r=a.label;e[o]=r,t.push(o)}),{title:{show:!0,text:this.title},grid:{bottom:40,top:50},legend:{top:5},colors:["#f56c77","#6accab"],settings:{labelMap:e,scale:[!0,!1],lineStyle:{width:1}},data:{columns:t,rows:this.data}}},largeChartOptions:function(){var e={},t=[this.timeColumn];return this.dataColumns.forEach(function(a){var o=a.name,r=a.label;e[o]=r,t.push(o)}),{title:{show:!0,text:this.title},grid:{bottom:40,top:50},legend:{top:5},colors:["#f56c77","#6accab"],settings:{labelMap:e,scale:[!0,!1],lineStyle:{width:1}},data:{columns:t,rows:this.data},dataZoom:[{type:"inside",minValueSpan:12,zoomOnMouseWheel:"alt"},{minValueSpan:12}]}}}}),m={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"compare-chart"},[a("ve-line",e._b({},"ve-line",e.chartOptions,!1)),e._v(" "),a("a",{staticClass:"compare-chart-zoom-in",attrs:{href:"javascript:"},on:{click:function(t){e.enlarge=!0}}},[a("icon",{attrs:{name:"zoom-in"}})],1),e._v(" "),a("let-modal",{attrs:{width:"80%"},on:{close:function(t){e.enlarge=!1}},model:{value:e.enlarge,callback:function(t){e.enlarge=t},expression:"enlarge"}},[e.enlarge?a("ve-line",e._b({},"ve-line",e.largeChartOptions,!1)):e._e(),e._v(" "),a("div",{attrs:{slot:"foot"},slot:"foot"})],1)],1)},staticRenderFns:[]};var p=a("VU/8")(u,m,!1,function(e){a("MeJx")},null,null);t.a=p.exports},Cp0g:function(e,t,a){"use strict";a.d(t,"a",function(){return d}),a.d(t,"c",function(){return u}),t.b=function(){return new r.a(function(e,t){c.a.getJSON("/server/api/get_locale").then(function(t){var a=n.a.get("locale");if("[object Object]"==Object.prototype.toString.call(t)){for(var o in t)d.setLocaleMessage(o,t[o]),u.push({localeCode:o,localeName:t[o].localeName,localeMessages:t});a=t[a]?a:"cn",u=t}d.locale=a,e()}).catch(function(e){t(e)})})};var o=a("//Fk"),r=a.n(o),l=a("7+uW"),i=a("TXmL"),s=a("K/Lq"),n=a.n(s),c=a("86n0");l.default.use(i.a),l.default.use(n.a);var d=new i.a({}),u=[]},DQfC:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("7+uW"),r=(a("3NoR"),a("sVYP")),l=a("m6R6"),i=a.n(l),s=a("v/hR"),n=a.n(s),c=a("Cp0g"),d={data:function(){return{serverIcon:i.a,opaIcon:n.a,locale:this.$cookie.get("locale")||"cn",uid:"--",userOptOpen:!1,enableLogin:!1,localeMessages:c.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("获取用户登录信息: "+(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()}},u={render: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")]),e._v(" "),e._m(0),e._v(" "),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}}),e._v(" "),a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab2"),tabkey:"/operation",icon:e.opaIcon}}),e._v(" "),a("let-tab-pane",{attrs:{tab:e.$t("header.tab.tab3"),tabkey:"/releasePackage",icon:e.opaIcon}})],1),e._v(" "),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),e._v(" "),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)+" ")]),e._v(" "),a("i",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],staticClass:"let-icon let-icon-caret-down",class:{up:e.userOptOpen}}),e._v(" "),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)])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"logo-wrap"},[t("a",{attrs:{href:"/"}},[t("img",{staticClass:"logo",attrs:{src:a("dLd/")}})]),this._v(" "),t("a",{attrs:{href:"/dcache.html"}},[t("img",{staticClass:"logo",attrs:{alt:"dcache",src:a("CPgP")}})])])}]};var m={name:"App",components:{AppDcacheHeader:a("VU/8")(d,u,!1,function(e){a("Qq3b")},null,null).exports,AppFooter:a("m8r6").a}},p={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"app"}},[t("app-dcache-header"),this._v(" "),t("keep-alive",[t("router-view",{staticClass:"main-width"})],1),this._v(" "),t("app-footer",{staticClass:"app_index__footer"})],1)},staticRenderFns:[]};var h=a("VU/8")(m,p,!1,function(e){a("G8Se")},null,null).exports,f=a("/ocq"),v=a("woOf"),_=a.n(v),g={name:"Server",data:function(){return{treeErrMsg:"加载失败",treeData:null,enableAuth:!1,serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""}}},computed:{base:function(){return"/server/"+this.$route.params.treeid}},watch:{"$route.params.treeid":function(e){this.serverData=this.getServerData(),this.isTrueTreeLevel()}},methods:{selectTree:function(e,t){t.children&&t.children.length?this.$set(t,"expand",!t.expand):"/server"===this.$route.path?this.$router.push("/server/"+e+"/manage"):this.$router.push({params:{treeid:e}})},handleData:function(e,t){var a=this;e&&e.length&&e.forEach(function(e){e.label=e.name,e.nodeKey=e.id,t&&(e.iconClass="tree-icon",e.expand=!0),e.children&&e.children.length&&a.handleData(e.children)})},getTreeData:function(){var e=this;this.treeData=null,this.$nextTick(function(){var t=e.$loading.show({target:e.$refs.treeLoading});e.$ajax.getJSON("/server/api/dtree").then(function(a){t.hide(),e.treeData=a,e.handleData(e.treeData,!0)}).catch(function(a){t.hide(),console.error(a),e.treeErrMsg=a.err_msg||a.message||"加载失败",e.treeData=!1})})},getServerData:function(){if(!this.$route.params.treeid)return{};var e={level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""};return this.$route.params.treeid.split(".").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}e.level=a}),e},clickTab:function(e){this.$router.push(_()({},this.$route,{path:e}))},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")}},created:function(){this.serverData=this.getServerData(),this.isTrueTreeLevel()},mounted:function(){this.getTreeData(),window.a=this}},b={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"page_server"},[e.treeData&&e.treeData.length?o("let-tree",{staticClass:"left-tree",attrs:{data:e.treeData,activeKey:e.$route.params.treeid},on:{"on-select":e.selectTree}}):e._e(),e._v(" "),e.treeData&&!e.treeData.length?o("div",{staticClass:"left-tree"},[o("p",{staticClass:"loading"},[e._v(e._s(e.$t("common.noService")))])]):e._e(),e._v(" "),e.treeData?e._e():o("div",{ref:"treeLoading",staticClass:"left-tree"},[!1===e.treeData?o("div",{staticClass:"loading"},[o("p",[e._v(e._s(e.treeErrMsg))]),e._v(" "),o("a",{attrs:{href:"javascript:;"},on:{click:e.getTreeData}},[e._v(e._s(e.$t("common.reTry")))])]):e._e()]),e._v(" "),this.$route.params.treeid?o("div",{staticClass:"right-view"},[o("let-tabs",{attrs:{activekey:e.$route.path},on:{click:e.clickTab}},[o("let-tab-pane",{attrs:{tabkey:e.base+"/manage",tab:e.$t("header.tab.tab1")}}),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/publish",tab:e.$t("index.rightView.tab.patch")}}):e._e(),e._v(" "),5===e.serverData.level||4===e.serverData.level||1===e.serverData.level?o("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(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/server-monitor",tab:e.$t("index.rightView.tab.statMonitor")}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/property-monitor",tab:e.$t("index.rightView.tab.propertyMonitor")}}):e._e(),e._v(" "),5===e.serverData.level&&e.enableAuth?o("let-tab-pane",{attrs:{tabkey:e.base+"/user-manage",tab:e.$t("index.rightView.tab.privileage")}}):e._e()],1),e._v(" "),o("router-view",{key:e.$route.params.treeid,ref:"childView",staticClass:"page_server_child"})],1):o("div",{staticClass:"right-view"},[o("div",{staticClass:"empty"},[o("img",{staticClass:"package",attrs:{src:a("CZtL")}}),e._v(" "),o("p",{staticClass:"title"},[e._v(e._s(e.$t("index.rightView.title")))]),e._v(" "),o("p",{staticClass:"notice",domProps:{innerHTML:e._s(e.$t("index.rightView.tips"))}})])])],1)},staticRenderFns:[]};var $=a("VU/8")(g,b,!1,function(e){a("A58z")},null,null).exports,y=a("KsY+"),w=a("wUS1"),M=a("vOkX"),k=a("SJ4V"),x=a("tqp+"),C=a("E+Yk"),L=a("7x6k"),S={render: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.title"),tabkey:"/operation/apply"}}),e._v(" "),a("let-tab-pane",{attrs:{tab:e.$t("module.title"),tabkey:"/operation/module"}}),e._v(" "),a("let-tab-pane",{attrs:{tab:e.$t("region.title"),tabkey:"/operation/region"}})],1),e._v(" "),a("router-view",{staticClass:"page_operation_children"})],1)},staticRenderFns:[]};var D=a("VU/8")({name:"Oparetion",methods:{onTabClick:function(e){this.$router.replace(e)}}},S,!1,function(e){a("N0Zg")},null,null).exports,A={render: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)}}),e._v(" "),a("let-step",{attrs:{title:e.$t(e.title2)}}),e._v(" "),a("let-step",{attrs:{title:e.$t(e.title3)}})],1),e._v(" "),a("router-view",{staticClass:"page_operation_apply_children"})],1)},staticRenderFns:[]};var F=a("VU/8")({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:{}},A,!1,function(e){a("d2kS")},null,null).exports,P={data:function(){return{regions:[],setRegions:[],model:{name:"",admin:"",idcArea:"",setArea:[]}}},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=this.$Loading.show();this.$ajax.postJSON("/server/api/add_apply",t).then(function(t){a.hide(),e.$tip.success(e.$t("common.success")),e.$router.push("/operation/apply/createService/"+t.id)}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}}},created:function(){window.a=this},beforeRouteEnter:function(e,t,a){r.a.getJSON("/server/api/get_region_list").then(function(e){e.length?a(function(t){t.regions=e}):a(function(e){e.$tip.warning(e.$t("common.warning")+": "+e.$t("apply.createRegionTips")),console.log("abc"),e.$router.push("/operation/region")})}).catch(function(e){alert(e.message||e.err_msg)})}},q={render: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),e._v(" "),a("let-form-item",{attrs:{label:e.$t("common.admin"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.admin,callback:function(t){e.$set(e.model,"admin",t)},expression:"model.admin"}})],1),e._v(" "),a("br"),e._v(" "),a("let-form-item",{attrs:{label:e.$t("region.idcArea"),itemWidth:"240px"}},[a("let-select",{attrs:{size:"small"},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("\n "+e._s(t.region)+"\n ")])}))],1),e._v(" "),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("\n "+e._s(t.region)+"\n ")])}))],1),e._v(" "),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)},staticRenderFns:[]};var N=a("VU/8")(P,q,!1,function(e){a("HiFU")},null,null).exports,R=a("Xxa5"),O=a.n(R),T=a("exGp"),I=a.n(T),z={data:function(){return{templates:[],applyId:this.$route.params.applyId,apply:{Router:{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:"aswRouterServer",template_file:""},Proxy:[{apply_id:17,create_person:"adminUser",idc_area:"sz",server_ip:"",server_name:"aswRouterServer",template_file:""}]}}},methods:{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=t[0],e.apply.Proxy.forEach(function(e){return e.template_file=t[0]})}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},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(e.$t("common.error")+": "+(t.message||t.err_msg))})},createService:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.apply,a=this.$Loading.show();this.$ajax.postJSON("/server/api/save_router_proxy",t).then(function(t){a.hide();var o=e.applyId;e.$router.push("/operation/apply/installAndPublish/"+o)}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}}},created:function(){var e=this;return I()(O.a.mark(function t(){return O.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getApplyInfo();case 2:return t.next=4,e.templateNameList();case 4:case"end":return t.stop()}},t,e)}))()}},j={render: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),e._v(" "),a("let-form-item",{attrs:{label:e.$t("service.serverIp"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.apply.Router.server_ip,callback:function(t){e.$set(e.apply.Router,"server_ip",t)},expression:"apply.Router.server_ip"}})],1),e._v(" "),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),e._v(" "),a("let-form-item",{attrs:{label:e.$t("service.routerDbName"),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_name,callback:function(t){e.$set(e.apply.Router,"router_db_name",t)},expression:"apply.Router.router_db_name"}})],1),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),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"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("service.multipleIp"),prop:"server_ip",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_ip,callback:function(a){e.$set(t.row,"server_ip",a)},expression:"scope.row.server_ip"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("region.idcArea"),prop:"idc_area"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.idc_area)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_file"},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)],1),e._v(" "),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.createService}},[e._v(e._s(e.$t("apply.createRouterProxyService"))+"\n ")])],1)],1)},staticRenderFns:[]};var W=a("VU/8")(z,j,!1,function(e){a("VKlK")},null,null).exports,V={data:function(){return{applyId:this.$route.params.applyId,showModal:!1,items:[],apply:{set_area:[],Router:{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:"aswRouterServer",template_file:""},Proxy:[{apply_id:17,create_person:"adminUser",idc_area:"sz",server_ip:"",server_name:"aswRouterServer",template_file:""}]}}},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(e.$t("common.error")+": "+(t.message||t.err_msg))})},installAndPublish:function(){var e=this,t=this.applyId;this.$ajax.getJSON("/server/api/install_and_publish",{applyId:t}).then(function(t){var a=t.proxy.releaseId,o=t.router.releaseId;e.$ajax.getJSON("/server/api/get_release_progress",{proxyReleaseId:a,routerReleaseId:o}).then(function(t){e.showModal=!0,e.items=t.progress}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))}),e.$tip.success(t.proxy.errMsg)}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}},created:function(){this.getApplyInfo()}},E={render: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("\n "+e._s(e.apply.name)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("common.admin"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.apply.admin)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("region.idcArea"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.apply.idc_area)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("region.setArea"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.apply.set_area.join(","))+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("common.createPerson"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.apply.create_person)+"\n ")])],1),e._v(" "),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("\n "+e._s(e.apply.Router.server_name)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("service.serverIp"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.apply.Router.server_ip)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("service.templateFile"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.apply.Router.template_file)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("service.routerDbName"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.apply.Router.router_db_name)+"\n ")]),e._v(" "),a("br"),e._v(" "),a("let-form-item",{attrs:{label:e.$t("service.routerDbIp"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.apply.Router.router_db_ip)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("service.routerDbPort"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.apply.Router.router_db_port)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("service.routerDbUser"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.apply.Router.router_db_user)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("service.routerDbPass"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.apply.Router.router_db_pass)+"\n ")])],1),e._v(" "),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("\n "+e._s(t.row.server_name)+"\n ")]}}])}),e._v(" "),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("\n "+e._s(t.row.server_ip)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("region.idcArea"),prop:"idc_area"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.idc_area)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("service.templateFile"),prop:"template_file"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.template_file)+"\n ")]}}])})],1)],1),e._v(" "),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.installAndPublish}},[e._v(e._s(e.$t("apply.installAndPublish"))+"\n ")])],1),e._v(" "),a("let-modal",{attrs:{title:e.$t("publishLog.title"),width:"800px"},model:{value:e.showModal,callback:function(t){e.showModal=t},expression:"showModal"}},[a("let-table",{ref:"ProgressTable",attrs:{data:e.items,"empty-msg":e.$t("common.nodata"),title:e.$t("publishLog.sync")}},[a("let-table-column",{attrs:{title:e.$t("module.title"),prop:"module",width:"20%"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("publishLog.releaseId"),prop:"releaseId",width:"20%"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("publishLog.releaseProgress"),prop:"percent"}})],1)],1)],1)},staticRenderFns:[]};var J=a("VU/8")(V,E,!1,function(e){a("fp1K")},null,null).exports,U={render: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)}}),e._v(" "),a("let-step",{attrs:{title:e.$t(e.title2)}}),e._v(" "),a("let-step",{attrs:{title:e.$t(e.title3)}}),e._v(" "),a("let-step",{attrs:{title:e.$t(e.title4)}})],1),e._v(" "),a("router-view",{staticClass:"page_operation_apply_children"})],1)},staticRenderFns:[]};var B=a("VU/8")({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:{}},U,!1,function(e){a("Gnij")},null,null).exports,H=[{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)"}],K={data:function(){return{model:{apply_id:"",follower:"",cache_version:"",mkcache_struct:""},applys:[],types:H}},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:{createModule:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.model,a=this.$Loading.show();this.$ajax.postJSON("/server/api/add_module_base_info",t).then(function(t){a.hide(),e.$tip.success(e.$t("common.success")),e.$router.push("/operation/module/moduleConfig/"+t.id)}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}}},beforeRouteEnter:function(e,t,a){r.a.getJSON("/server/api/get_apply_list").then(function(e){e.length?a(function(t){t.applys=e}):a(function(e){e.$tip.warning(e.$t("common.warning")+": "+e.$t("module.createApplyTips")),e.$router.push("/operation/apply/createApply")})}).catch(function(e){alert(e.message||e.err_msg)})}},G={render: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:"","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("\n "+e._s(t.name)+"\n ")])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("module.cacheType"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",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("\n "+e._s(t.value)+"\n ")])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("module.follower"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.follower,callback:function(t){e.$set(e.model,"follower",t)},expression:"model.follower"}})],1),e._v(" "),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.createModule}},[e._v(e._s(e.$t("common.nextStep")))])],1)],1)],1)},staticRenderFns:[]};var Z=a("VU/8")(K,G,!1,function(e){a("N+45")},null,null).exports,Y=[{key:"1",value:"cache.title"},{key:"2",value:"cache.cachePersistent"}],X=[{key:"0",value:"string"},{key:"1",value:"int"},{key:"2",value:"longlong"}],Q={data:function(){return{cacheTypeOption:[{value:"1",text:this.$t("cache.cacheTypeTip1")},{value:"2",text:this.$t("cache.cacheTypeTip2")},{value:"3",text:this.$t("cache.cacheTypeTip3")}],keyTypeOption:X,cacheModuleType:Y,regions:[],setRegions:[],module:{cache_version:1},model:{admin:"",idc_area:"",key_type:null,module_name:"",cache_module_type:"",cache_type:"",db_data_count:"",per_record_avg:"",total_record:"",max_read_flow:"",max_write_flow:"",module_remark:"",set_area:[],module_id:"",apply_id:""}}},methods:{addModuleConfig:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.model,a=this.$Loading.show();this.$ajax.postJSON("/server/api/add_module_config",t).then(function(t){a.hide(),e.$tip.success(e.$t("common.success")),e.$router.push("/operation/module/serverConfig/"+t.module_id)}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}},changeSelect:function(){var e=this;this.model.set_area=[];var t=this.regions.concat();t.splice(t.indexOf(t.find(function(t){return t.label==e.model.idc_area})),1),this.setRegions=t},getRegionList:function(){var e=this;this.$ajax.getJSON("/server/api/get_region_list").then(function(t){t.length?e.regions=t:(e.$tip.warning(vm.$t("common.warning")+": "+vm.$t("apply.createRegionTips")),e.$router.push("region"))}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},getModuleInfo:function(){var e=this,t=this.$route.params.moduleId;this.$ajax.getJSON("/server/api/get_module_info",{moduleId:t}).then(function(t){e.model.apply_id=t.apply_id,e.model.module_id=t.id,e.module=t}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}},created:function(){this.getRegionList(),this.getModuleInfo()}},ee={render: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:"240px",required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("module.namingRule"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.module_name,callback:function(t){e.$set(e.model,"module_name",t)},expression:"model.module_name"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("module.deployArea"),itemWidth:"240px"}},[a("let-select",{attrs:{size:"small"},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("\n "+e._s(t.region)+"\n ")])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("region.setArea"),itemWidth:"240px"}},[a("let-select",{attrs:{size:"small",multiple:!0},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("\n "+e._s(t.region)+"\n ")])}))],1),e._v(" "),a("br"),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cache.perRecordAvg"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",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),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cache.totalRecord"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("cache.dbDataCountUnit"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.total_record,callback:function(t){e.$set(e.model,"total_record",t)},expression:"model.total_record"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cache.maxReadFlow"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("cache.flowUnit"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.max_read_flow,callback:function(t){e.$set(e.model,"max_read_flow",t)},expression:"model.max_read_flow"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cache.maxWriteFlow"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("cache.flowUnit"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.max_write_flow,callback:function(t){e.$set(e.model,"max_write_flow",t)},expression:"model.max_write_flow"}})],1),e._v(" "),a("br"),e._v(" "),a("let-form-item",{attrs:{label:e.$t("module.scenario"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},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("\n "+e._s(e.$t(t.value))+"\n ")])}))],1),e._v(" "),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",required:"",data:e.cacheTypeOption},model:{value:e.model.cache_type,callback:function(t){e.$set(e.model,"cache_type",t)},expression:"model.cache_type"}})],1):e._e(),e._v(" "),2==e.model.cache_module_type?a("let-form-item",{attrs:{label:e.$t("cache.persistentNumber"),itemWidth:"240px",required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("cache.dbDataCountUnit"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.db_data_count,callback:function(t){e.$set(e.model,"db_data_count",t)},expression:"model.db_data_count"}})],1):e._e(),e._v(" "),a("br"),e._v(" "),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),e._v(" "),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)},staticRenderFns:[]};var te=a("VU/8")(Q,ee,!1,function(e){a("i9Z0")},null,null).exports,ae=a("mvHQ"),oe=a.n(ae),re=a("Dd8w"),le=a.n(re),ie=[{key:"int",value:"int"},{key:"long",value:"long"},{key:"string",value:"string"},{key:"byte",value:"byte"},{key:"float",value:"float"},{key:"double",value:"double"}],se=[{key:"require",value:"require"},{key:"optional",value:"optional"}],ne={data:function(){return{moduleId:this.$route.params.moduleId,moduleData:[],isMkCache:!1,multiKey:!1,dataTypeOption:ie,propertyOption:se,showMKModal:!1,mkCacheStructure:{mainKey:[{fieldName:"",keyType:"mkey",dataType:"",property:"require",defaultValue:"",maxLen:""}],unionKey:[{fieldName:"",keyType:"ukey",dataType:"",property:"require",defaultValue:"",maxLen:""}],value:[{fieldName:"",keyType:"value",dataType:"",property:"",defaultValue:"",maxLen:""}]}}},methods:{submitServerConfig:function(){this.$refs.detailForm.validate()&&(this.isMkCache?this.showMKModal=!0:this.addServerConfig())},addServerConfig:function(){var e=this,t=this.moduleData,a=this.$Loading.show();this.$ajax.postJSON("/server/api/add_server_config",t).then(function(t){a.hide(),e.$tip.success(e.$t("common.success")),e.$router.push("/operation/module/installAndPublish/"+e.moduleId)}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},getModuleConfigInfo:function(){var e=this,t=this.$route.params.moduleId;this.$ajax.getJSON("/server/api/get_module_config_info",{moduleId:t}).then(function(t){var a=1===t.ModuleBase.cache_version?"KV":"MKV";t.group_name=t.module_name+a+"Group1",t.area=t.idc_area,t.server_name=t.module_name+a+"CacheServer1-1",t.server_type=0,t.memory=Math.ceil(t.per_record_avg*t.total_record*1e4/1024/1024/1024),e.moduleData.push(t);var o=le()({},t);o.server_name=t.module_name+a+"CacheServer1-2",o.server_type=1,e.moduleData.push(o),t.set_area.length>0&&t.set_area.forEach(function(o,r){var l=le()({},t);l.area=o,l.server_name=t.module_name+a+"CacheServer1-"+(r+3),l.server_type=2,e.moduleData.push(l)}),e.isMkCache=2===t.ModuleBase.cache_version,e.multiKey=2===t.ModuleBase.cache_version&&1===t.ModuleBase.mkcache_struct}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},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",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:"",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(){this.$refs.multiKeyForm.validate()&&(sessionStorage.setItem("mkCache",oe()(this.mkCacheStructure)),this.addServerConfig())}},created:function(){var e=this;return I()(O.a.mark(function t(){return O.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return sessionStorage.clear(),t.next=3,e.getModuleConfigInfo();case 3:case"end":return t.stop()}},t,e)}))()}},ce={render: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:""}},[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",width:"20%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.module_name)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("module.serverGroup"),prop:"group_name",width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.group_name)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"server_name",width:"20%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.server_name)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("service.serverIp"),prop:"server_ip"},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_ip,callback:function(a){e.$set(t.row,"server_ip",a)},expression:"scope.row.server_ip"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("module.deployArea"),prop:"area"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.area)+"\n ")]}}])}),e._v(" "),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("\n "+e._s(e.mapServerType(t.row.server_type))+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("module.memorySize"),prop:"memory"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.memory)+"\n ")]}}])}),e._v(" "),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"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.shmKey,callback:function(a){e.$set(t.row,"shmKey",a)},expression:"scope.row.shmKey"}})]}}])})],1)],1),e._v(" "),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.submitServerConfig}},[e._v(e._s(e.$t("common.nextStep")))])],1)],1),e._v(" "),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:"30%"},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"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("MKCache.dataType"),prop:"dataType"},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("\n "+e._s(t.value)+"\n ")])}))]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("MKCache.fieldProperty"),prop:"property",width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.property)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("MKCache.defaultValue"),prop:"defaultValue"},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.defaultValue,callback:function(a){e.$set(t.row,"defaultValue",a)},expression:"scope.row.defaultValue"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("MKCache.maxLen"),prop:"maxLen"},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.maxLen,callback:function(a){e.$set(t.row,"maxLen",a)},expression:"scope.row.maxLen"}})]}}])})],1)],1),e._v(" "),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:"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.fieldName,callback:function(a){e.$set(t.row,"fieldName",a)},expression:"scope.row.fieldName"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("MKCache.dataType"),prop:"dataType"},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("\n "+e._s(t.value)+"\n ")])}))]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("MKCache.fieldProperty"),prop:"property",width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.property)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("MKCache.defaultValue"),prop:"defaultValue"},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.defaultValue,callback:function(a){e.$set(t.row,"defaultValue",a)},expression:"scope.row.defaultValue"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("MKCache.maxLen"),prop:"maxLen"},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.maxLen,callback:function(a){e.$set(t.row,"maxLen",a)},expression:"scope.row.maxLen"}})]}}])}),e._v(" "),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")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.deleteUnionKey(t.$index)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1)],1):e._e(),e._v(" "),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:"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.fieldName,callback:function(a){e.$set(t.row,"fieldName",a)},expression:"scope.row.fieldName"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("MKCache.dataType"),prop:"dataType"},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("\n "+e._s(t.value)+"\n ")])}))]}}])}),e._v(" "),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("\n "+e._s(t.value)+"\n ")])}))]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("MKCache.defaultValue"),prop:"defaultValue"},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.defaultValue,callback:function(a){e.$set(t.row,"defaultValue",a)},expression:"scope.row.defaultValue"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("MKCache.maxLen"),prop:"maxLen"},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.maxLen,callback:function(a){e.$set(t.row,"maxLen",a)},expression:"scope.row.maxLen"}})]}}])}),e._v(" "),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")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.deleteValue(t.$index)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1)],1)],1)],1)],1)},staticRenderFns:[]},de=a("VU/8")(ne,ce,!1,null,null,null).exports,ue={data:function(){return{moduleId:this.$route.params.moduleId,moduleData:{},releaseProgress:[],showModal:!1}},methods:{getModuleFullInfo:function(){var e=this,t=this.moduleId;this.$ajax.getJSON("/server/api/get_module_full_info",{moduleId:t}).then(function(t){e.moduleData=t||{}}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},installAndPublish:function(){var e=this,t=this.moduleId,a=sessionStorage.getItem("mkCache");this.$ajax.getJSON("/server/api/module_install_and_publish",{moduleId:t,mkCache:a}).then(function(t){var a=t.releaseRsp.releaseId;e.$ajax.getJSON("/server/api/get_module_release_progress",{releaseId:a}).then(function(t){console.log(t),e.showModal=!0,e.releaseProgress=t.progress}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))}),e.$tip.success(t.releaseRsp.errMsg)}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},getReleaseProgress:function(e){var t=this;this.$ajax.getJSON("/server/api/get_module_release_progress",{releaseId:e}).then(function(e){console.log(e),t.showModal=!0,t.releaseProgress=e.progress}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})},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.$router.push("/server")}},created:function(){this.getModuleFullInfo()}},me={render: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("\n "+e._s(e.moduleData.module_id)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("module.name"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.moduleData.module_name)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("module.cacheType"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.mapCacheType(e.moduleData.ModuleBase))+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("module.follower"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.moduleData.ModuleBase&&e.moduleData.ModuleBase.follower)+"\n ")])],1),e._v(" "),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",required:""}},[e._v("\n "+e._s(e.moduleData.idc_area)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("region.setArea"),itemWidth:"240px"}},[e._v("\n "+e._s(e.moduleData.set_area&&e.moduleData.set_area.join(","))+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("module.scenario"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.mapModuleType(e.moduleData.cache_module_type))+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cache.perRecordAvg"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.moduleData.per_record_avg)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cache.maxReadFlow"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.moduleData.max_read_flow)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cache.totalRecord"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.moduleData.total_record)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cache.maxWriteFlow"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.moduleData.max_write_flow)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cache.moduleRemark"),itemWidth:"240px",required:""}},[e._v("\n "+e._s(e.moduleData.module_remark)+"\n ")])],1),e._v(" "),a("let-form-group",{attrs:{title:e.$t("module.serverInfo"),inline:"","label-position":"top"}},[a("let-table",{ref:"table",attrs:{data:e.moduleData.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("\n "+e._s(t.row.module_name)+"\n ")]}}])}),e._v(" "),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("\n "+e._s(t.row.group_name)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"server_name"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.server_name)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("service.serverIp"),prop:"server_ip"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.server_ip)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("module.deployArea"),prop:"area"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.area)+"\n ")]}}])}),e._v(" "),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("\n "+e._s(e.mapServerType(t.row.server_type))+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("module.memorySize"),prop:"memory"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.memory)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("module.shmKey"),prop:"shmKey"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.shmKey)+"\n ")]}}])})],1)],1),e._v(" "),a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.installAndPublish}},[e._v(e._s(e.$t("apply.installAndPublish"))+"\n ")])],1),e._v(" "),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"),title:e.$t("publishLog.sync")}},[a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"serverName",width:"30%"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("service.serverIp"),prop:"nodeName",width:"30%"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("publishLog.releaseId"),prop:"releaseId",width:"15%"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("publishLog.releaseProgress"),prop:"percent"}})],1)],1)],1)},staticRenderFns:[]},pe=a("VU/8")(ue,me,!1,null,null,null).exports,he={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"page_operation_region"},[a("let-button",{attrs:{theme:"primary",size:"mini"},on:{click:e.addRegion}},[e._v(e._s(e.$t("region.add")))]),e._v(" "),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))]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("region.title"),prop:"region",width:"25%"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("region.label"),prop:"label"}}),e._v(" "),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){e.editRegion(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),e._v(" "),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),e._v(" "),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)},staticRenderFns:[]};var fe=a("VU/8")({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(e.$t("common.error")+": "+(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",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(e.$t("common.error")+": "+(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(t.$t("common.error")+": "+(e.message||e.err_msg))})},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.showModel=!1,this.model={}}}},he,!1,function(e){a("41Zt")},null,null).exports,ve={render: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"}}),e._v(" "),a("let-tab-pane",{attrs:{tab:e.$t("releasePackage.routerList"),tabkey:"/releasePackage/routerList"}}),e._v(" "),a("let-tab-pane",{attrs:{tab:e.$t("releasePackage.cacheList"),tabkey:"/releasePackage/cacheList"}})],1),e._v(" "),a("router-view",{staticClass:"page_operation_children"})],1)},staticRenderFns:[]};var _e=a("VU/8")({name:"Oparetion",methods:{onTabClick:function(e){this.$router.replace(e)}}},ve,!1,function(e){a("Azzc")},null,null).exports,ge=a("Wc9H"),be=a.n(ge),$e=a("IaZV"),ye=a.n($e),we=new be.a({id:"default",use:"default-usage",viewBox:"0 0 1024 1024",content:'<symbol class="icon" viewBox="0 0 1024 1024" id="default"><defs><style></style></defs><path d="M512 0a512 512 0 1 0 512 512A512 512 0 0 0 512 0z m327.554535 373.651898l-342.957664 349.062903a109.334209 109.334209 0 0 1-77.351712 32.822668h-1.064216a109.278197 109.278197 0 0 1-76.903621-31.366372L184.837545 570.811946a36.631441 36.631441 0 1 1 51.25041-52.258615l156.383766 153.359151a36.295372 36.295372 0 0 0 25.709222 10.362105h0.39208a36.463407 36.463407 0 0 0 25.821245-10.866207l342.901651-349.118915a36.631441 36.631441 0 0 1 52.258616 51.306422z m0 0" /></symbol>'}),Me=(ye.a.add(we),{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(e.$t("common.error")+": "+(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(e.$t("common.error")+": "+(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(t.$t("common.error")+": "+(e.message||e.err_msg))})},setDefault:function(e){var t=this,a=e.id,o=e.package_type;this.$ajax.postJSON("/server/api/set_patch_package_default",{id:a,package_type:o,application:this.uploadModal.model.application,module_name:this.uploadModal.model.module_name}).then(function(e){t.getPatchPackage()}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})}},created:function(){this.getPatchPackage()}}),ke={render: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("\n "+e._s(e.$t("releasePackage.uploadPackage"))+"\n ")])],1),e._v(" "),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",width:"1em",height:"1em"},attrs:{title:e.$t("releasePackage.default")}},[1==t.row.default_version?a("icon",{attrs:{name:"default"}}):e._e()],1),e._v("\n "+e._s(t.row.id)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("releasePackage.moduleName"),prop:"server"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.servant.comment"),prop:"comment"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("releasePackage.uploadTime"),prop:"posttime"}}),e._v(" "),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){e.setDefault(t.row)}}},[e._v(e._s(e.$t("operate.default")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.deletePackage(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),e._v(" "),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("\n "+e._s(e.uploadModal.model.application)+"."+e._s(e.uploadModal.model.module_name)+"\n ")]),e._v(" "),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"))+"\n ")]),e._v(" "),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),e._v(" "),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),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1)],1)},staticRenderFns:[]};var xe=a("VU/8")(Me,ke,!1,function(e){a("+7yo")},null,null).exports,Ce={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(e.$t("common.error")+": "+(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(e.$t("common.error")+": "+(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(t.$t("common.error")+": "+(e.message||e.err_msg))})},setDefault:function(e){var t=this,a=e.id,o=e.package_type;this.$ajax.postJSON("/server/api/set_patch_package_default",{id:a,package_type:o,application:this.uploadModal.model.application,module_name:this.uploadModal.model.module_name}).then(function(e){t.getPatchPackage()}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})}},created:function(){this.getPatchPackage()}},Le={render: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("\n "+e._s(e.$t("releasePackage.uploadPackage"))+"\n ")])],1),e._v(" "),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",width:"1em",height:"1em"},attrs:{title:e.$t("releasePackage.default")}},[1==t.row.default_version?a("icon",{attrs:{name:"default"}}):e._e()],1),e._v("\n "+e._s(t.row.id)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("releasePackage.moduleName"),prop:"server"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.servant.comment"),prop:"comment"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("releasePackage.uploadTime"),prop:"posttime"}}),e._v(" "),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){e.setDefault(t.row)}}},[e._v(e._s(e.$t("operate.default")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.deletePackage(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),e._v(" "),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("\n "+e._s(e.uploadModal.model.application)+"."+e._s(e.uploadModal.model.module_name)+"\n ")]),e._v(" "),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"))+"\n ")]),e._v(" "),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),e._v(" "),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),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1)],1)},staticRenderFns:[]};var Se=a("VU/8")(Ce,Le,!1,function(e){a("u6we")},null,null).exports,De={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(e.$t("common.error")+": "+(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(e.$t("common.error")+": "+(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(t.$t("common.error")+": "+(e.message||e.err_msg))})},setDefault:function(e){var t=this,a=e.id,o=e.package_type;this.$ajax.postJSON("/server/api/set_patch_package_default",{id:a,package_type:o,application:this.uploadModal.model.application,module_name:this.uploadModal.model.module_name}).then(function(e){t.getPatchPackage()}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})}},created:function(){this.getPatchPackage()}},Ae={render: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("\n "+e._s(e.$t("releasePackage.uploadPackage"))+"\n ")])],1),e._v(" "),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",width:"1em",height:"1em"},attrs:{title:e.$t("releasePackage.default")}},[1==t.row.default_version?a("icon",{attrs:{name:"default"}}):e._e()],1),e._v("\n "+e._s(t.row.id)+"\n ")]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("releasePackage.moduleName"),prop:"server"}}),e._v(" "),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()]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.servant.comment"),prop:"comment"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("releasePackage.uploadTime"),prop:"posttime"}}),e._v(" "),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){e.setDefault(t.row)}}},[e._v(e._s(e.$t("operate.default")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.deletePackage(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),e._v(" "),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("\n "+e._s(e.uploadModal.model.application)+"."+e._s(e.uploadModal.model.module_name)+"\n ")]),e._v(" "),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")]),e._v(" "),a("let-option",{attrs:{value:"2"}},[e._v("MKVCache")])],1)],1),e._v(" "),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"))+"\n ")]),e._v(" "),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),e._v(" "),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),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1)],1)},staticRenderFns:[]};var Fe=a("VU/8")(De,Ae,!1,function(e){a("z+12")},null,null).exports;o.default.use(f.a);var Pe=new f.a({routes:[{path:"/server",name:"Server",component:$,children:[{path:":treeid/manage",component:y.a},{path:":treeid/publish",component:w.a},{path:":treeid/config",component:M.a},{path:":treeid/server-monitor",component:k.a},{path:":treeid/property-monitor",component:x.a},{path:":treeid/interface-debuger",component:L.a},{path:":treeid/user-manage",component:C.a}]},{path:"/operation",name:"Operation",component:D,redirect:"/operation/apply",children:[{path:"apply",name:"apply",component:F,redirect:"/operation/apply/createApply",children:[{path:"createApply",component:N},{path:"createService/:applyId",component:W},{path:"installAndPublish/:applyId",component:J}]},{path:"module",component:B,redirect:"/operation/module/createModule",children:[{path:"createModule",component:Z},{path:"moduleConfig/:moduleId",component:te},{path:"serverConfig/:moduleId",component:de},{path:"installAndPublish/:moduleId",component:pe}]},{path:"region",name:"region",component:fe}]},{path:"/releasePackage",name:"releasePackage",component:_e,redirect:"/releasePackage/proxyList",children:[{path:"proxyList",component:xe},{path:"routerList",component:Se},{path:"cacheList",component:Fe}]},{path:"*",redirect:"/server"}],scrollBehavior:function(e,t,a){return{x:0,y:0}}});o.default.config.productionTip=!1,c.b.call(this).then(function(){new o.default({i18n:c.a,el:"#app",router:Pe,components:{App:h},template:"<App/>"})})},"E+Yk":function(e,t,a){"use strict";var o=a("woOf"),r=a.n(o),l={name:"ServerUserManage",data:function(){return{serverData:r()({},this.$parent.getServerData()),developer:"",operator:"",hasAuth:!1}},mounted:function(){this.checkHasAuth(),this.getAuthList()},methods:{checkHasAuth:function(){var e=this;this.$ajax.getJSON("/server/api/has_auth",{application:this.serverData.application,server_name:this.serverData.server_name,role:"developer"}).then(function(t){e.hasAuth=t.has_auth||!1}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},getAuthList:function(){var e=this;this.$ajax.getJSON("/server/api/get_auth_list",{application:this.serverData.application,server_name:this.serverData.server_name}).then(function(t){e.operator=(t.operator||[]).join(";"),e.developer=(t.developer||[]).join(";")}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},save:function(){var e=this,t=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){t.hide(),e.$tip.success(""+e.$t("common.error"))}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})}}},i={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("let-form",{attrs:{inline:"",itemWidth:"600px"},nativeOn:{submit:function(t){return t.preventDefault(),e.save(t)}}},[a("let-form-item",{attrs:{label:e.$t("user.op")}},[a("let-input",{attrs:{type:"textarea",disabled:!e.hasAuth},model:{value:e.operator,callback:function(t){e.operator=t},expression:"operator"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("user.dev")}},[a("let-input",{attrs:{type:"textarea",disabled:!e.hasAuth},model:{value:e.developer,callback:function(t){e.developer=t},expression:"developer"}})],1),e._v(" "),a("let-form-item",[e.hasAuth?a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))]):e._e()],1)],1)],1)},staticRenderFns:[]};var s=a("VU/8")(l,i,!1,function(e){a("K5TI")},null,null);t.a=s.exports},G8Se:function(e,t){},Gnij:function(e,t){},HKw7:function(e,t){},HiFU:function(e,t){},K5TI:function(e,t){},"KsY+":function(e,t,a){"use strict";var o=a("//Fk"),r=a.n(o),l=a("Dd8w"),i=a.n(l),s=a("woOf"),n=a.n(s),c={name:"ServerManage",data:function(){return{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","DEBUG","INFO","WARN","ERROR"],moreCmdModal:{show:!1,model:null,currentServer:null},failCount:0}},computed:{showOthers:function(){return 5===this.serverData.level},isEndpointValid:function(){return!(!this.servantDetailModal.model||!this.servantDetailModal.model.endpoint)&&this.checkServantEndpoint(this.servantDetailModal.model.endpoint)}},methods:{getServerList:function(){var e=this,t=this.$refs.serverListLoading.$loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.$route.params.treeid}).then(function(a){t.hide(),e.serverList=a}).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.$route.params.treeid,page_size:this.pageSize,curr_page:e}).then(function(o){a.hide(),t.pageNum=e,t.total=Math.ceil(o.count/t.pageSize),t.serverNotifyList=o.rows}).catch(function(e){a.hide(),t.$tip.error(t.$t("serverList.restart.failed")+": "+(e.err_msg||e.message))})}},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(e.$t("serverList.restart.failed")+": "+(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=n()({},t.configModal.model,e):(e.templates=[],t.configModal.model=e)}).catch(function(e){a.hide(),t.closeConfigModal(),t.$tip.error(t.$t("serverList.restart.failed")+": "+(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",i()({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(e.$t("serverList.restart.failed")+": "+(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 r.a(function(o,r){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: "+t.task_no):r(new Error("taskid: "+t.task_no))}).catch(function(l){t?r(new Error(l.err_msg||l.message||a.$t("common.networkErr"))):setTimeout(function(){o(a.checkTaskStatus(e,!0))},3e3)})})},addTask:function(e,t,a){var o=this,r=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){r.hide(),o.getServerList(),o.$tip.success({title:a.success,message:e})}).catch(function(e){throw e})}).catch(function(e){r.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;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(o){a.hide(),t.servantModal.model=o,t.servantModal.currentServer=e}).catch(function(e){a.hide(),t.$tip.error(t.$t("serverList.restart.failed")+": "+(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=n()({},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=/^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,r=/^p\s\d{4,5}$/i,l=!0;if(/^tcp|udp$/i.test(t[0])){for(var i=0,s=1;s<t.length;s++)if(a&&a.test(t[s])&&(i++,this.servantDetailModal.model.node_name=t[s].split(/\s/)[1],a=null),o&&o.test(t[s])&&(i++,o=null),r&&r.test(t[s])){var n=t[s].substring(2);n<0||n>65535||i++,r=null}l=3===i}else l=!1;return l},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(e.$t("common.error")+": "+(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(e.$t("common.error")+": "+(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.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(t.$t("common.error")+": "+(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(t.$t("common.error")+": "+(e.err_msg||e.message))})},sendCommand:function(e,t,a){var o=this,r=this.$Loading.show();this.$ajax.getJSON("/server/api/send_command",{server_ids:e,command:t}).then(function(e){r.hide();var t=e[0].err_msg.replace(/\n/g,"<br>");if(0!==e[0].ret_code)throw new Error(t);var l={title:o.$t("common.success"),message:t};a&&(l.duration=0),o.$tip.success(l)}).catch(function(e){r.hide(),o.$tip.error({title:o.$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 "+e.setloglevel):"loadconfig"===e.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(t.id,"tars.loadconfig "+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)}},d={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_manage"},[e.serverList?a("let-table",{ref:"serverListLoading",attrs:{data:e.serverList,title:e.$t("serverList.title.serverList"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"140px"}}),e._v(" "),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("\n "+e._s(e.$t("common.set.setName"))+""+e._s(t.row.set_name)),a("br"),e._v("\n "+e._s(e.$t("common.set.setArea"))+""+e._s(t.row.set_area)),a("br"),e._v("\n "+e._s(e.$t("common.set.setGroup"))+""+e._s(t.row.set_group)+"\n ")]):a("span",[e._v(e._s(e.$t("common.disable")))])]}}])}),e._v(" "),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"})]}}])}),e._v(" "),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"})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.processID"),prop:"process_id",width:"80px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version",width:"68px"}}),e._v(" "),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)))])]}}])}),e._v(" "),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){e.configServer(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.restartServer(t.row.id)}}},[e._v(e._s(e.$t("operate.restart")))]),e._v(" "),a("let-table-operation",{staticClass:"danger",on:{click:function(a){e.stopServer(t.row.id)}}},[e._v(e._s(e.$t("operate.stop")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.manageServant(t.row)}}},[e._v(e._s(e.$t("operate.servant")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showMoreCmd(t.row)}}},[e._v(e._s(e.$t("operate.more")))])]}}])})],1):e._e(),e._v(" "),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"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.serviceID"),prop:"server_id"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.threadID"),prop:"thread_id"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result"),prop:"result"}})],1):e._e(),e._v(" "),a("let-pagination",{staticStyle:{"margin-bottom":"32px"},attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}}),e._v(" "),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))]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("common.ip")}},[e._v(e._s(e.configModal.model.node_name))]),e._v(" "),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),e._v(" "),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))])})):a("span",[e._v(e._s(e.configModal.model.template_name))])],1),e._v(" "),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),e._v(" "),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._v(" "),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._v(" "),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._v(" "),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(),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),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){e.configServant()}}},[e._v(e._s(e.$t("operate.add"))+" Servant")]),e._v(" "),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"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.adress"),prop:"endpoint"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.thread"),prop:"thread_num"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.maxConnecttions"),prop:"max_connections"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.maxQueue"),prop:"queuecap"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),prop:"queuetimeout"}}),e._v(" "),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){e.configServant(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{staticClass:"danger",on:{click:function(a){e.deleteServant(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1):a("div",{ref:"servantModalLoading",staticClass:"loading-placeholder"})],1),e._v(" "),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))])]),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.maxConnecttions"),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),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),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")))]),e._v(" "),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),e._v(" "),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")))]),e._v(" "),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),e._v(" "),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")))]),e._v(" "),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),e._v(" "),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),e._v(" "),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)],1)},staticRenderFns:[]};var u=a("VU/8")(c,d,!1,function(e){a("ZRX/")},null,null);t.a=u.exports},MeJx:function(e,t){},"N+45":function(e,t){},N0Zg:function(e,t){},Q1kj:function(e,t){},Qq3b:function(e,t){},SJ4V:function(e,t,a){"use strict";var o=a("Tx4S"),r=a("q2c9"),l=a("CeRa"),i={name:"ServerPropertyMonitor",components:{HoursFilter:r.a,CompareChart:l.a},data:function(){var e=this.$route.params.treeid;return{query:{thedate:Object(o.b)(new Date,"YYYYMMDD"),predate:Object(o.b)(Date.now()-o.a,"YYYYMMDD"),startshowtime:"0000",endshowtime:"2360",master_name:"",slave_name:e.split(".").map(function(e){return e.replace(/^\d+/,"")}).join("."),interface_name:"",master_ip:"",slave_ip:"",group_by:""},formatter:"YYYYMMDD",allItems:[],hour:-1,page:1}},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/20)},pagedItems:function(){return this.filteredItems.slice(20*(this.page-1),20*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:this.$t("monitor.table.curr")+" "+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 e=this,t=this.$refs.charts.$loading.show(),a=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/tarsstat_monitor_data",this.query).then(function(o){t.hide(),a.hide(),e.allItems=o}).catch(function(o){t.hide(),a.hide(),e.$tip.error(e.$t("common.error")+": "+(o.message||o.err_msg))})},groupBy:function(e){this.query.group_by=e,this.fetchData()},search:function(){delete this.query.group_by,this.fetchData()},changePage:function(e){this.page=e}}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_server_monitor"},[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("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),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.search.interfaceName")},on:{onLabelClick:function(t){e.groupBy("interface_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.interface_name,callback:function(t){e.$set(e.query,"interface_name",t)},expression:"query.interface_name"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.search.master")},on:{onLabelClick:function(t){e.groupBy("master_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.master_name,callback:function(t){e.$set(e.query,"master_name",t)},expression:"query.master_name"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.search.slave")},on:{onLabelClick:function(t){e.groupBy("slave_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.slave_name,callback:function(t){e.$set(e.query,"slave_name",t)},expression:"query.slave_name"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.search.masterIP")},on:{onLabelClick:function(t){e.groupBy("master_ip")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.master_ip,callback:function(t){e.$set(e.query,"master_ip",t)},expression:"query.master_ip"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.search.slaveIP")},on:{onLabelClick:function(t){e.groupBy("slave_ip")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.slave_ip,callback:function(t){e.$set(e.query,"slave_ip",t)},expression:"query.slave_ip"}})],1),e._v(" "),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),e._v(" "),a("let-row",{ref:"charts",staticClass:"charts"},e._l(e.charts,function(t){return a("let-col",{key:t.title,attrs:{span:12}},[a("compare-chart",e._b({},"compare-chart",t,!1))],1)})),e._v(" "),a("hours-filter",{model:{value:e.hour,callback:function(t){e.hour=t},expression:"hour"}}),e._v(" "),a("let-table",{ref:"table",attrs:{data:e.pagedItems,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"show_time",width:"80px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.master"),prop:"master_name",width:""}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.slave"),prop:"slave_name",width:""}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.interfaceName"),prop:"interface_name",width:""}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.masterIP"),prop:"master_ip",width:""}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.slaveIP"),prop:"slave_ip",width:""}}),e._v(" "),a("let-table-column",{attrs:{prop:"the_total_count",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.curr"))),a("br"),e._v(e._s(e.$t("monitor.table.total")))])}}])}),e._v(" "),a("let-table-column",{attrs:{prop:"pre_total_count",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.contrast"))),a("br"),e._v(e._s(e.$t("monitor.table.total")))])}}])}),e._v(" "),a("let-table-column",{attrs:{prop:"total_count_wave",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.fluctuating")))])}}])}),e._v(" "),a("let-table-column",{attrs:{align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.curr"))),a("br"),e._v(e._s(e.$t("monitor.table.a")))])}},{key:"default",fn:function(t){return[e._v(e._s(t.row.the_avg_time)+"ms")]}}])}),e._v(" "),a("let-table-column",{attrs:{align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.contrast"))),a("br"),e._v(e._s(e.$t("monitor.table.a")))])}},{key:"default",fn:function(t){return[e._v(e._s(t.row.pre_avg_time)+"ms")]}}])}),e._v(" "),a("let-table-column",{attrs:{prop:"the_fail_rate",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.curr"))),a("br"),e._v(e._s(e.$t("monitor.table.b")))])}}])}),e._v(" "),a("let-table-column",{attrs:{prop:"pre_fail_rate",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.contrast"))),a("br"),e._v(e._s(e.$t("monitor.table.b")))])}}])}),e._v(" "),a("let-table-column",{attrs:{prop:"the_timeout_rate",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.curr"))),a("br"),e._v(e._s(e.$t("monitor.table.c")))])}}])}),e._v(" "),a("let-table-column",{attrs:{prop:"pre_timeout_rate",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.contrast"))),a("br"),e._v(e._s(e.$t("monitor.table.c")))])}}])}),e._v(" "),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()],1)],1)},staticRenderFns:[]};var n=a("VU/8")(i,s,!1,function(e){a("tj/f")},null,null);t.a=n.exports},TFv0:function(e,t){},Tx4S:function(e,t,a){"use strict";a.d(t,"a",function(){return s}),t.b=c;var o=a("fZjL"),r=a.n(o),l=6e4,i=60*l,s=24*i;function n(e){return null==e?new Date:e instanceof Date?e:new Date(e)}function c(e,t){if(e=n(e),t=t||"YYYY-MM-DD HH:mm:ss",isNaN(e.getTime()))return t;var a={"M+":e.getMonth()+1,"D+":e.getDate(),"H+":e.getHours(),"h+":e.getHours()%12==0?12:e.getHours()%12,"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};return/(Y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),/(dd+)/.test(t)&&(t=t.replace(RegExp.$1,"日一二三四五六七".split("")[e.getDay()])),r()(a).forEach(function(e){if(new RegExp("("+e+")").test(t)){var o=RegExp.$1,r=""+a[e];t=t.replace(o,1===o.length?r:("00"+r).substr(r.length))}}),t}},VKlK:function(e,t){},VbM7:function(e,t){},XSxf:function(e,t){},Y20V:function(e,t){},"ZRX/":function(e,t){},d2kS:function(e,t){},"dLd/":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAAA4CAMAAAAvp+0eAAAAjVBMVEUAAABWXGZWXGdXW2ZWXGZbZGdWW2Z2dnhXXWdWXWdWXGdXXGdZX2hXW2dWXGZbX2phY2tXW2dXW2dZXWhWW2ZXW2ZXXGZoaG1XW2ZXW2dYXGdXW2dXXGZWW2dWXGdXXGZWXGZXXGdXXGdYXGdYXWhXXWdWW2ZWXGZXXWdbX2tXW2dXXGdYXGhYXmhWW2ZN3ep6AAAALnRSTlMA86bskRT6BUt8jHYvoPcbD7BtKebVxgrAuGJG2827m/CDZlc5Ud9/QCCHelwkFVYtqQAAA/pJREFUWMPFl91iqjAQhEUlKCKIYEVQi+C/dd7/8U4bQzYSKNFenLlhMeAH685m7aFN2x4pY741iI9ery4LivLNZPm87O2SmPmDD1fcaQQ7gWveAiOtI2UxCFGJ7Rxj2Apc004YYpteawBFm6UpLAfXogkWOJWiKwOG1ZIdA0hKb3Y/uz/h0BAWVclYNsBs5XTE4AciHgL+QcTOFcDZDJZCaN8B6/WB4hHNGHCghQIIzWCfEJp3wVKZxxJI1JUEltMbVvJFPVXnyhcvKli/CzYCVjKLhboy53msNKi+T9OMKrsTJt9nCzzZ8gBMTGAZpGbGsLi6mFZOJrATwc7dsI9HxGA9XVkawlYEm5jC7HrO58DYBJYTrN8N2/Dg8ghIk+Ox6ICRpRNerUdT2F3mU1EHjCy9++AH2xAWkVGNYWTpg8sPmSHMk4Yzh5GlgwM/3AwLxDN/M93ScS/gx9AclrwByyrIkUMNTb1kiN+Anar09R/pNOwgayB6HbaqCmPOg1EXLJRltXodllclv+fB6VfYF3B9RBcmQ3NYJNu9w2296to8S8Uxffs1WEqfclvHHWOBVZ0vNwDysf0K7JO2aJcqpBm2t9TU2Wt8yw8PjjFsQcNH+WglrbC5D6xnikPFODH43JvBZjRWCVtfazB395D781jH4NmjCR4KIxNYRgOjsPX2lyE1FCzSZb5l/HHLDhhZ+lPWGjBohcVZr0l2yq0674bx68ScJGx9f4YN3eHQvU59KlRd+w3A7h2wytIej4Wty8YCOfMyatMyAcIOmLC0z4u3srX7DJtRDmhF052RaXQYWVrsGtLWSTMs5X1GF91a6jDN0mKilra2mmE2+7XPT6lEVJhu6S8eS1tHT7Cl8uyTdtiwcyKesUezGgkVxNZhN8r3W7AMTRo2wzyA2X+AnRphHxpMNpivP8BWjTDLUWGO+n39P8ByNMqrwSjpufM2LEKz0maY8312ruLLJTCHkaWnqraiLxOsRwoBl6plYQwjS8d6/9q0wFIiRMD6NdhCn3AcBoA5dRg1kYvohUBsCCNLa911wyuEYKzWAAtxLz2SGSyr9QvaQIsW2I02Eh8IXoGdqM5JE6oQHeaRCdfAyLARk6VZzTkjqhCCqU0kk5W5U7ts3rHF5DTrkAKatjjMr5eBKzO6flr4ffOM6nDlun0LLAMWdPeBPmdU1hqMLD2uwxJ1VLLkVkpN5CLLduApo7LvtcLov7Te5L411WDURAqagFjo/ihk36yydZSjXfpShxXqL2khf15Nqfh3ULTwWodUsrSlz4BUIQ0wm9EOVMQVan1b1gw05pJpC/hpoY+A/HNRWV9pWVuej+lfknNObz8Xn3v/Qf8AOMI3ricO6pwAAAAASUVORK5CYII="},fp1K:function(e,t){},i9Z0:function(e,t){},m6R6:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsBAMAAADsqkcyAAAAIVBMVEUAAACZsuGasuCbtuRFf/WZseD////q8P3z9vt6o/e2x+iGuTfsAAAABHRSTlMA6aYc+fzKlQAAAGFJREFUKM9jgIBQBEIA+gszK4YiASEDqLBhKAoQhgqrrkhDAl1BUGHRNmThjECYfWkuSCAtFI8w0A50YSDAIUyC2SPOJdMrsZpdlk6MMMIQOoYJZvLBl9gwkybuhDx4choAeHa83egTBYcAAAAASUVORK5CYII="},m8r6:function(e,t,a){"use strict";var o={data:function(){return{thisYear:(new Date).getFullYear()}}},r={render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"app_index__footer"})},staticRenderFns:[]};var l=a("VU/8")(o,r,!1,function(e){a("Y20V")},null,null);t.a=l.exports},mxK3:function(e,t,a){"use strict";var o={render:function(){var e=this.$createElement;return(this._self._c||e)("section",{staticClass:"section"},[this._t("default")],2)},staticRenderFns:[]};var r=a("VU/8")(null,o,!1,function(e){a("pGHe")},"data-v-0da03ec9",null);t.a=r.exports},pGHe:function(e,t){},q2c9:function(e,t,a){"use strict";var o=Array.apply(null,{length:24}).map(function(e,t){return t}).map(function(e){return{val:e,txt:("0"+e).slice(-2)}}),r=[{val:-1,txt:"all"}].concat(o),l={name:"HoursFilter",props:{title:{type:String,default:""},value:Number},filters:{format:function(e){return("0"+e).slice(-2)}},data:function(){return{hours:r}},methods:{onChange:function(e){this.$emit("input",e)}}},i={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"hours-filter"},[a("h4",[e._v(e._s(e.title))]),e._v(" "),a("ul",e._l(e.hours,function(t){return a("li",{key:t.val,class:{active:t.val===e.value},on:{click:function(a){e.onChange(t.val)}}},[e._v(e._s(t.txt))])}))])},staticRenderFns:[]};var s=a("VU/8")(l,i,!1,function(e){a("Q1kj")},null,null);t.a=s.exports},s2Rr:function(e,t){},sVYP:function(e,t,a){"use strict";var o=a("rplX"),r=(a.n(o),a("7+uW")),l=a("86n0");l.a.ServerUrl.set("/pages"),l.a.ResultHandler.set(function(e){return!(!e||200!==e.ret_code||null==e.data)}),["getJSON","postJSON"].forEach(function(e){var t=l.a[e];l.a["_"+e]=t,l.a[e]=function(){for(var e=arguments.length,a=Array(e),o=0;o<e;o++)a[o]=arguments[o];return t.call.apply(t,[null].concat(a)).then(function(e){return e.data})}}),Object.defineProperty(r.default.prototype,"$ajax",{get:function(){return l.a}}),t.a=l.a},"tj/f":function(e,t){},"tqp+":function(e,t,a){"use strict";var o=a("Tx4S"),r=a("q2c9"),l=a("CeRa"),i={name:"ServerPropertyMonitor",components:{HoursFilter:r.a,CompareChart:l.a},data:function(){var e=this.$route.params.treeid;return{query:{thedate:Object(o.b)(new Date,"YYYYMMDD"),predate:Object(o.b)(Date.now()-o.a,"YYYYMMDD"),startshowtime:"0000",endshowtime:"2360",master_name:e.split(".").map(function(e){return e.replace(/^\d+/,"")}).join("."),master_ip:"",property_name:"",policy:"",group_by:""},formatter:"YYYYMMDD",allItems:[],hour:-1,page:1}},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/20)},pagedItems:function(){return this.filteredItems.slice(20*(this.page-1),20*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 e=this,t=this.$refs.chart.$loading.show(),a=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/tarsproperty_monitor_data",this.query).then(function(o){t.hide(),a.hide(),e.allItems=o}).catch(function(o){t.hide(),a.hide(),e.$tip.error(e.$t("common.error")+": "+(o.message||o.err_msg))})},groupBy:function(e){this.query.group_by=e,this.fetchData()},search:function(){delete this.query.group_by,this.fetchData()},changePage:function(e){this.page=e}}},s={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_property_monitor"},[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),e._v(" "),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),e._v(" "),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),e._v(" "),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),e._v(" "),a("let-form-group",[a("tars-form-item",{attrs:{label:e.$t("monitor.search.master")},on:{onLabelClick:function(t){e.groupBy("master_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.master_name,callback:function(t){e.$set(e.query,"master_name",t)},expression:"query.master_name"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.search.masterIP")},on:{onLabelClick:function(t){e.groupBy("master_ip")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.master_ip,callback:function(t){e.$set(e.query,"master_ip",t)},expression:"query.master_ip"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.select.property")},on:{onLabelClick:function(t){e.groupBy("property_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.property_name,callback:function(t){e.$set(e.query,"property_name",t)},expression:"query.property_name"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.select.strategy")},on:{onLabelClick:function(t){e.groupBy("policy")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.policy,callback:function(t){e.$set(e.query,"policy",t)},expression:"query.policy"}})],1),e._v(" "),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._v(" "),a("compare-chart",e._b({ref:"chart",staticClass:"chart"},"compare-chart",e.chartOptions,!1)),e._v(" "),a("hours-filter",{model:{value:e.hour,callback:function(t){e.hour=t},expression:"hour"}}),e._v(" "),a("let-table",{ref:"table",attrs:{data:e.pagedItems,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"show_time",width:"80px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.master"),prop:"master_name",width:""}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.masterIP"),prop:"master_ip",width:"150px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.select.property"),prop:"property_name",width:"150px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.select.strategy"),prop:"policy",width:"150px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.property.property"),prop:"the_value",align:"right",width:"200px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.property.propertyC"),prop:"pre_value",align:"right",width:"230px"}}),e._v(" "),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()],1)],1)},staticRenderFns:[]};var n=a("VU/8")(i,s,!1,function(e){a("tx3H")},null,null);t.a=n.exports},tx3H:function(e,t){},u6we:function(e,t){},"v/hR":function(e,t){e.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=="},vOkX:function(e,t,a){"use strict";var o=a("woOf"),r=a.n(o),l={name:"ServerConfig",components:{wrapper:a("mxK3").a},data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},checkedConfigId:"",configList:[],refFileList:null,nodeConfigList:null,nodeCheckList:[],configModal:{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(e){this.nodeCheckList=e?this.nodeConfigList.map(function(e){return e.id}):[]}}},watch:{checkedConfigId:function(){var e=this;this.$nextTick(function(){e.getRefFileList(),e.getNodeConfigList()})}},methods:{getConfigList:function(e){var t=this,a=this.$refs.configListLoading.$loading.show();this.$ajax.getJSON("/server/api/config_file_list",e).then(function(e){a.hide(),t.configList=e,t.refFileList=[],t.nodeConfigList=[],e[0]&&e[0].id&&(t.checkedConfigId=e[0].id)}).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(){this.configModal.model={filename:"",config:""},this.configModal.isNew=!0,this.configModal.show=!0},changeConfig:function(e,t){this.configModal.model=r()({reason:""},e),this.configModal.target=t,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 o=r()({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",o).then(function(a){t.hide(),e.configList.unshift(a),1===e.configList.length&&(e.checkedConfigId=a.id),e.$tip.success(e.$t("common.success")),e.closeConfigModal()}).catch(function(){t.hide(),e.$tip.error(e.$t("common.error"))})}else this.$ajax.postJSON("/server/api/update_config_file",{config:a.config,id:a.id,reason:a.reason}).then(function(a){t.hide(),e[e.configModal.target]=e[e.configModal.target].map(function(e){return e.id===a.id?a:e}),e.checkedConfigId===a.id&&(e.getRefFileList(),e.getNodeConfigList()),e.$tip.success(e.$t("common.success")),e.closeConfigModal()}).catch(function(){t.hide(),e.$tip.error(e.$t("common.error"))})}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1},deleteConfig:function(e){var t=this;this.$confirm(this.$t("cfg.msg.confirmCfg"),this.$t("common.alert")).then(function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_config_file",{id:e}).then(function(e){a.hide(),t.getConfigList(t.serverData),t.getNodeConfigList(),t.$tip.success(t.$t("common.success"))}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})})},getUnusedFileList:function(e){var t=this;this.showOthers&&this.$ajax.getJSON("/server/api/unused_config_file_list",{config_id:e,application:this.serverData.application}).then(function(e){t.refFileModal.model.fileList=e}).catch(function(e){t.refFileModal.model.fileList=[],t.$tip.error({title:t.$t("common.error"),message:e.err_msg||e.message||t.$t("common.networkErr")})})},getRefFileList:function(){var e=this;if(this.showOthers){var t=this.$refs.refFileListLoading.$loading.show();this.$ajax.getJSON("/server/api/config_ref_list",{config_id:this.checkedConfigId}).then(function(a){t.hide(),a.map(function(e){var t=e.id;return(e=r()(e,e.reference)).refrence_id=e.id,e.id=t,e}),e.refFileList=a}).catch(function(a){t.hide(),e.refFileList=[],e.$tip.error({title:e.$t("common.error"),message:a.err_msg||a.message||e.$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 e=this;if(this.$refs.refForm.validate()){var t=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){t.hide(),e.refFileModal.show=!1,e.refFileModal.isNodeRef?e.getNodeRefFileList(e.refFileModal.id):e.getRefFileList()})}},closeRefFileModal:function(){this.refFileModal.show=!1},deleteRef:function(e,t,a){var o=this;this.$confirm(this.$t("cfg.msg.confirm"),this.$t("common.alert")).then(function(){var r=o.$Loading.show();o.$ajax.getJSON("/server/api/delete_config_ref",{id:e}).then(function(e){r.hide(),"nodeRef"==t?o.getNodeRefFileList(a):o.getRefFileList(),o.$tip.success(o.$t("common.success"))})})},getNodeConfigList:function(){var e=this;if(this.showOthers){var t=this.$refs.nodeConfigListLoading.$loading.show(),a=r()({config_id:this.checkedConfigId},this.serverData);this.$ajax.getJSON("/server/api/node_config_file_list",a).then(function(a){t.hide(),e.nodeConfigList=a}).catch(function(a){t.hide(),e.nodeConfigList=[],e.$tip.error({title:e.$t("common.error"),message:a.err_msg||a.message||e.$t("common.networkErr")})})}},pushNodeConfig:function(){var e=this;if(this.nodeCheckList.length){var t=this.$Loading.show();this.$ajax.getJSON("/server/api/push_config_file",{ids:this.nodeCheckList.join(";")}).then(function(a){t.hide(),e.pushResultModal.model=a,e.pushResultModal.show=!0}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(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(e){this.detailModal.title=this.$t("cfg.title.viewConf"),this.detailModal.model={detail:e.config},this.detailModal.show=!0},showMergedDetail:function(e){var t=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:e}).then(function(e){a.hide(),t.detailModal.model={detail:e}}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})},showHistory:function(e){var t=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:e}).then(function(e){a.hide(),t.detailModal.model={table:e.rows,detail:""}}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})},showTableDeatil:function(e){this.detailModal.model.detail=e.content},closeDetailModal:function(){this.detailModal.show=!1,this.detailModal.model=null},getNodeRefFileList:function(e){var t=this;this.$ajax.getJSON("/server/api/config_ref_list",{config_id:e}).then(function(e){e.map(function(e){var t=e.id;return(e=r()(e,e.reference)).refrence_id=e.id,e.id=t,e}),t.nodeRefFileListModal.model={refFileList:e}}).catch(function(e){t.nodeRefFileListModal.model={refFileList:[]},t.$tip.error({title:t.$t("common.error"),message:e.err_msg||e.message||t.$t("common.networkErr")})})},handleRefFiles:function(e){this.nodeRefFileListModal.show=!0,this.nodeRefFileListModal.model=null,this.refFileModal.id=e,this.getNodeRefFileList(e)}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getConfigList(this.serverData)}},i={render: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("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.addConfig}},[e._v(e._s(e.$t("cfg.btn.add")))]),e._v(" "),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.id},model:{value:e.checkedConfigId,callback:function(t){e.checkedConfigId=t},expression:"checkedConfigId"}},[e._v(" ")])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),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){e.changeConfig(t.row,"configList")}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.deleteConfig(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("cfg.title.viewConf")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.id)}}},[e._v(e._s(e.$t("pub.btn.history")))])]}}])})],1)],1):e._e(),e._v(" "),e.refFileList&&e.showOthers?a("wrapper",{ref:"refFileListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.openRefFileModal}},[e._v(e._s(e.$t("cfg.btn.addRef")))]),e._v(" "),a("let-table",{attrs:{data:e.refFileList,title:e.$t("cfg.title.b"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),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){e.deleteRef(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.id)}}},[e._v(e._s(e.$t("pub.btn.history")))])]}}])})],1)],1):e._e(),e._v(" "),e.nodeConfigList&&e.showOthers?a("wrapper",{ref:"nodeConfigListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.pushNodeConfig}},[e._v(e._s(e.$t("cfg.btn.pushFile")))]),e._v(" "),e.nodeConfigList.length?a("let-checkbox",{staticClass:"check-all",model:{value:e.nodeCheckAll,callback:function(t){e.nodeCheckAll=t},expression:"nodeCheckAll"}}):e._e(),e._v(" "),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.id},model:{value:e.nodeCheckList,callback:function(t){e.nodeCheckList=t},expression:"nodeCheckList"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"400px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.changeConfig(t.row,"nodeConfigList")}}},[e._v(e._s(e.$t("cfg.table.modCfg")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showMergedDetail(t.row.id)}}},[e._v(e._s(e.$t("cfg.table.viewMerge")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("cfg.table.viewIpContent")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.id)}}},[e._v(e._s(e.$t("pub.btn.history")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.handleRefFiles(t.row.id)}}},[e._v(e._s(e.$t("cfg.table.mangeRefFile")))])]}}])})],1)],1):e._e(),e._v(" "),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:"700px"},on:{"on-confirm":e.updateConfigFile,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.filename,callback:function(t){e.$set(e.configModal.model,"filename",t)},expression:"configModal.model.filename"}})],1),e._v(" "),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.reason,callback:function(t){e.$set(e.configModal.model,"reason",t)},expression:"configModal.model.reason"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cfg.btn.content"),required:""}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:4,required:""},model:{value:e.configModal.model.config,callback:function(t){e.$set(e.configModal.model,"config",t)},expression:"configModal.model.config"}})],1)],1):e._e()],1),e._v(" "),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"}},[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:{title:e.$t("common.time"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.reason"),prop:"reason"}}),e._v(" "),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){e.showTableDeatil(t.row)}}},[e._v(e._s(e.$t("operate.view")))])]}}])})],1):e._e(),e._v(" "),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(),e._v(" "),a("div",{ref:"detailModalLoading",staticClass:"detail-loading"})],1),e._v(" "),e.refFileModal.model?a("let-modal",{attrs:{title:this.$t("operate.title.add"),width:"700px"},on:{"on-confirm":e.addRefFile,close:e.closeRefFileModal},model:{value:e.refFileModal.show,callback:function(t){e.$set(e.refFileModal,"show",t)},expression:"refFileModal.show"}},[a("let-form",{ref:"refForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("cfg.msg.refFile"),required:""}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue"),required:""},model:{value:e.refFileModal.model.filename,callback:function(t){e.$set(e.refFileModal.model,"filename",t)},expression:"refFileModal.model.filename"}},e._l(e.refFileModal.model.fileList,function(t){return a("let-option",{key:t.id,attrs:{value:t.id}},[e._v(e._s(t.filename))])}))],1)],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.$t("cfg.table.mangeRefFile"),width:"700px",footShow:!1},on:{close:e.closeDetailModal},model:{value:e.nodeRefFileListModal.show,callback:function(t){e.$set(e.nodeRefFileListModal,"show",t)},expression:"nodeRefFileListModal.show"}},[e.nodeRefFileListModal.model?a("wrapper",[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.openNodeRefFileModal}},[e._v(e._s(e.$t("cfg.btn.addRef")))]),e._v(" "),a("let-table",{attrs:{data:e.nodeRefFileListModal.model.refFileList,title:e.$t("cfg.title.b"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),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){e.deleteRef(t.row.id,"nodeRef",t.row.config_id)}}},[e._v(e._s(e.$t("operate.delete")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.config_id)}}},[e._v(e._s(e.$t("pub.btn.history")))])]}}])})],1)],1):e._e()],1),e._v(" "),a("let-modal",{attrs:{width:"700px",footShow:!1},on:{close:e.closePushResultModal},model:{value:e.pushResultModal.show,callback:function(t){e.$set(e.pushResultModal,"show",t)},expression:"pushResultModal.show"}},[e.pushResultModal.model?a("let-table",{attrs:{data:e.pushResultModal.model,title:e.$t("serverList.table.th.result"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{class:0!==t.row.ret_code?"danger":"success"},[e._v(e._s(t.row.server_name))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"result",class:0!==t.row.ret_code?"danger":"success"},[e._v(e._s(t.row.err_msg))])]}}])})],1):e._e()],1)],1)},staticRenderFns:[]};var s=a("VU/8")(l,i,!1,function(e){a("TFv0")},null,null);t.a=s.exports},wUS1:function(e,t,a){"use strict";var o=a("fZjL"),r=a.n(o),l=a("woOf"),i=a.n(l),s={name:"ServerPublish",data:function(){return{activeKey:"",treeData:[],totalServerList:[],serverList:[],isCheckedAll:!1,totalPage:0,pageSize:20,page:1,publishModal:{show:!1,model: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.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}}},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(e.$t("common.error")+": "+(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.$route.params.treeid}).then(function(a){t.hide();var o=a||[];o.forEach(function(e){e.isChecked=!1}),e.totalServerList=o,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.model={application:a.application,server_name:a.server_name,serverList:t,patchList:[],patch_id:"",update_text:"",show:!0},this.getPatchList(a.application,a.server_name,1,50).then(function(t){e.publishModal.model.patchList=t.rows}),this.publishModal.show=!0}},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})},closePublishModal:function(){this.publishModal.show=!1,this.publishModal.modal=null,this.patchType="patch",this.$refs.publishForm.resetValid()},savePublishServer:function(){var e=this;if(this.$refs.publishForm.validate()){var t=[];this.publishModal.model.serverList.forEach(function(a){t.push({server_id:a.id.toString(),command:"patch_tars",parameters:{patch_id:e.publishModal.model.patch_id.toString(),bak_flag:a.bak_flag,update_text:e.publishModal.model.update_text}})});var a=this.$Loading.show();this.$ajax.postJSON("/server/api/add_task",{serial:!0,items:t}).then(function(t){a.hide(),e.closePublishModal(),e.finishModal.model.task_no=t,e.finishModal.show=!0,e.getTaskRepeat(t)}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}},closeFinishModal:function(){this.finishModal.show=!1,this.finishModal.modal=null,this.$refs.finishForm.resetValid()},getTaskRepeat:function(e){var t=this,a=void 0;a&&clearTimeout(a);!function o(){t.$ajax.getJSON("/server/api/task",{task_no:e}).then(function(e){e.items.forEach(function(e){2===parseInt(e.status,10)||3===parseInt(e.status,10)?clearTimeout(a):a=setTimeout(o,3e3)}),t.finishModal.model.items=e.items}).catch(function(e){clearTimeout(a),t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})}()},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(),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(t.$t("common.error")+": "+(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(e.$t("common.error")+": "+(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(e.$t("common.error")+": "+(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(e.$t("common.error")+": "+(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(e.$t("common.error")+": "+(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}),r={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},l=e.$Loading.show();e.$ajax.postJSON("/server/api/do_compile",r).then(function(t){l.hide(),e.compilerModal.show=!0;var a="string"==typeof t?t:t.data;e.getStatus(a)}).catch(function(t){l.hide(),e.$tip.error(e.$t("common.error")+": "+(t.err_msg||t.message))})}else e.openPubConfModal()}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.err_msg||t.message))})},taskStatus:function(e){this.getStatus(e)},getStatus:function(e){var t=this;!function a(){var o=null;o&&clearTimeout(o),t.$ajax.getJSON("/server/api/compiler_task",{taskNo:e}).then(function(l){var s="array"==typeof l?l:l.data;if(s[0].status=t.statusConfig[s[0].state],1==s[0].state&&(o=setTimeout(a,2e3)),t.compilerModal.model?i()(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,setTimeout(function a(){t.$ajax.getJSON("/server/api/get_server_patch",{task_id:e}).then(function(e){0!==r()(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(t.$t("common.error")+": "+(e.err_msg||e.message))})},2e3)}}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})}()}},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()}}},n={render: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"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),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")))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.set.setName"),prop:"set_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.set.setArea"),prop:"set_area"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.set.setGroup"),prop:"set_group"}}),e._v(" "),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"})]}}])}),e._v(" "),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"})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version"}}),e._v(" "),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)))])]}}])}),e._v(" "),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.totalPage,page:e.page},on:{change:e.changePage},slot:"pagination"}),e._v(" "),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._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()],1)],1):e._e(),e._v(" "),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("\n "+e._s(e.publishModal.model.application)+"·"+e._s(e.publishModal.model.server_name)+"\n ")]),e._v(" "),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))])})),e._v(" "),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._v(" "),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._v(" "),e.publishModal.model.show?a("let-form-item",{attrs:{label:e.$t("pub.dlg.releaseVersion")}},[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("\n "+e._s(t.id)+" | "+e._s(t.posttime)+" | "+e._s(t.comment)+"\n ")])})),e._v(" "),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.showUploadModal}},[e._v(e._s(e.$t("pub.dlg.upload")))]),e._v(" "),a("br"),e._v(" "),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))])})),e._v(" "),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.addCompileTask}},[e._v(e._s(e.$t("pub.dlg.compileAndPublish")))]),e._v(" "),e._e()],1)],1):e._e()],1),e._v(" "),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"))+"\n ")]),e._v(" "),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),e._v(" "),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),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1),e._v(" "),a("let-modal",{attrs:{title:e.$t("serverList.table.th.result"),width:"880px",footShow:!1},on:{"on-cancel":e.closeFinishModal},model:{value:e.finishModal.show,callback:function(t){e.$set(e.finishModal,"show",t)},expression:"finishModal.show"}},[e.finishModal.model?a("let-table",{attrs:{title:e.$t("serverList.servant.taskID")+e.finishModal.model.task_no,data:e.finishModal.model.items}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.status")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-tag",{attrs:{theme:2==t.row.status?"success":3==t.row.status?"danger":"",checked:""}},[e._v("\n "+e._s(e.statusConfig[t.row.status]+(2!=t.row.status&&3!=t.row.status?"...":""))+"\n ")])]}}])})],1):e._e()],1)],1),e._v(" "),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),e._v(" "),a("let-form-item",[a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),e._v(" "),e.totalHistoryList&&e.totalHistoryList.length>0?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"}}),e._v(" "),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")))])]}}])}),e._v(" "),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]||"-"))])]}}])}),e._v(" "),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){e.viewTask(t.row.task_no)}}},[e._v(e._s(e.$t("operate.view")))])]}}])}),e._v(" "),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.historyTotalPage,page:e.historyPage},on:{change:e.changeHistoryPage},slot:"pagination"}),e._v(" "),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):e._e(),e._v(" "),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"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c5"),prop:"command"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.status"),prop:"status_info"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c7"),prop:"execute_info"}})],1):e._e()],1)],1):e._e(),e._v(" "),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),e._v(" "),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"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node"}}),e._v(" "),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))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}})],1):e._e()],1)],1)},staticRenderFns:[]};var c=a("VU/8")(s,n,!1,function(e){a("HKw7")},null,null);t.a=c.exports},wi40:function(e,t){},"z+12":function(e,t){}},["DQfC"]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,6 +14,7 @@
<let-tab-pane :tab="$t('header.tab.tab1')" tabkey="/server" :icon="serverIcon"></let-tab-pane>
<let-tab-pane :tab="$t('header.tab.tab2')" tabkey="/operation" :icon="opaIcon"></let-tab-pane>
<let-tab-pane :tab="$t('header.tab.tab3')" tabkey="/releasePackage" :icon="opaIcon"></let-tab-pane>
<let-tab-pane :tab="$t('header.tab.tab4')" tabkey="/config" :icon="opaIcon"></let-tab-pane>
</let-tabs>
<div class="language-wrap">
<let-select v-model="locale" @change="changeLocale" :clearable="false">
......
......@@ -85,4 +85,17 @@ export default {
margin-left: 16px;
}
}
.page_operation {
padding-top: 30px;
padding-bottom: 40px;
&_children {
padding: 20px 0;
}
}
.danger {
color: var(--off-color);
}
</style>
......@@ -5,6 +5,17 @@
<let-table-column :title="$t('cache.config.path')" prop="path"></let-table-column>
<let-table-column :title="$t('cache.config.item')" prop="item"></let-table-column>
<let-table-column :title="$t('cache.config.value')" prop="config_value"></let-table-column>
<let-table-column :title="$t('cache.config.modify_value')" prop="config_value">
<template slot-scope="{row}">
<let-input size="small" v-model="row.modify_value"></let-input>
</template>
</let-table-column>
<let-table-column :title="$t('operate.operates')" >
<template slot-scope="{row}">
<let-table-operation @click="saveConfig(row)">{{$t('operate.save')}}</let-table-operation>
<let-table-operation @click="deleteConfig(row)" class="danger">{{$t('operate.delete')}}</let-table-operation>
</template>
</let-table-column>
</let-table>
</section>
</template>
......@@ -12,7 +23,6 @@
<script>
export default {
props: {
moduleName: {type: String, required: true},
serverName: {type: String, required: true},
nodeName: {type: String, required: true},
},
......@@ -25,16 +35,37 @@
async getServerConfig () {
try {
let option = {
moduleName: this.moduleName,
serverName: this.serverName,
nodeName: this.nodeName,
};
let configItemList = await this.$ajax.getJSON('/server/api/cache/getServerConfig', option);
let configItemList = await this.$ajax.getJSON('/server/api/cache/getServerNodeConfig', option);
// 添加被修改的空值
configItemList.forEach(item => item.modify_value="");
this.configList = configItemList;
} catch (err) {
console.error(err)
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
},
deleteConfig ({id}) {
this.$confirm(this.$t('cache.config.deleteConfig'), this.$t('common.alert')).then(async () => {
try {
let configItemList = await this.$ajax.getJSON('/server/api/cache/deleteServerConfigItem', {id});
await this.getServerConfig();
} catch (err) {
console.error(err)
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
});
},
async saveConfig ({id, modify_value}) {
try {
let configItemList = await this.$ajax.getJSON('/server/api/cache/updateServerConfigItem', {id, configValue: modify_value});
await this.getServerConfig();
} catch (err) {
console.error(err)
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
}
},
created () {
......
<template>
<section>
<let-table :data="configList" :title="$t('cache.config.tableTitle')" :empty-msg="$t('common.nodata')">
<let-table :data="configList" :empty-msg="$t('common.nodata')">
<let-table-column :title="$t('cache.config.remark')" prop="remark"></let-table-column>
<let-table-column :title="$t('cache.config.path')" prop="path"></let-table-column>
<let-table-column :title="$t('cache.config.item')" prop="item"></let-table-column>
<let-table-column :title="$t('cache.config.config_value')" prop="config_value"></let-table-column>
<let-table-column :title="$t('cache.config.value')" prop="config_value"></let-table-column>
</let-table>
</section>
</template>
<script>
export default {
props: {
moduleName: {type: String, required: true},
serverName: {type: String, required: true},
nodeName: {type: String, required: true},
},
data () {
return {
configList: []
}
},
methods: {
async getServerConfig () {
try {
let option = {
moduleName: this.moduleName,
serverName: this.serverName,
nodeName: this.nodeName,
};
let configItemList = await this.$ajax.getJSON('/server/api/cache/getServerConfig', option);
this.configList = configItemList;
} catch (err) {
console.error(err)
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
}
},
created () {
this.getServerConfig();
}
}
</script>
......
<template>
<section class="container">
abc
<section>
<let-form
ref="addConfigForm"
type="medium"
:title="$t('cache.config.addConfig')"
:columns="2"
>
<let-form-item :label="$t('cache.config.item')" required>
<let-input size="small" v-model="config.item" required></let-input>
</let-form-item>
<let-form-item :label="$t('cache.config.path')" required>
<let-input size="small" v-model="config.path" required></let-input>
</let-form-item>
<let-form-item :label="$t('cache.config.reload')" required>
<let-input size="small" v-model="config.reload" required></let-input>
</let-form-item>
<let-form-item :label="$t('cache.config.period')" required>
<let-input size="small" v-model="config.period" required></let-input>
</let-form-item>
<let-form-item :label="$t('cache.config.remark')" required>
<let-input size="small" v-model="config.remark" required></let-input>
</let-form-item>
<br>
<let-form-item label=" ">
<let-button theme="primary" @click="submit">{{$t('cache.add')}}</let-button>
</let-form-item>
</let-form>
</section>
</template>
<script>
export default {
}
export default {
data () {
return {
config: {
"item": "",
"path": "",
"period": "",
"reload": "",
"remark": ""
}
}
},
methods: {
async submit () {
if (this.$refs.addConfigForm.validate()) {
try {
await this.$ajax.postJSON('/server/api/cache/addConfig', this.config);
this.$tip.success(`${this.$t('cache.config.addSuccess')}`);
Object.assign(this.config, {"item": ""});
this.$emit('call-back');
} catch (err) {
console.error(err)
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
}
}
}
}
</script>
<style>
......
<template>
<section>
<let-form
ref="addConfigForm"
type="medium"
:title="$t('cache.config.addConfig')"
>
<let-form-item :label="$t('cache.config.item')" required>
<let-select v-model="itemId" size="small" required>
<let-option v-for="item in list" :value="item.id">{{item.path}}__{{item.item}}({{item.remark}})</let-option>
</let-select>
</let-form-item>
<let-form-item :label="$t('cache.config.itemValue')" required>
<let-input size="small" v-model="configValue" required></let-input>
</let-form-item>
<br>
<let-form-item label=" ">
<let-button theme="primary" @click="submit">{{$t('cache.add')}}</let-button>
</let-form-item>
</let-form>
</section>
</template>
<script>
export default {
props: {
serverName: {type: String, required: false},
nodeName: {type: String, required: false},
appName: {type: String, required: false},
moduleName: {type: String, required: false},
},
data () {
return {
itemId: '',
list: [],
configValue: '',
}
},
methods: {
async submit () {
if (this.$refs.addConfigForm.validate()) {
try {
let option = {
itemId: this.itemId,
configValue: this.configValue,
serverName: this.serverName,
nodeName: this.nodeName,
appName: this.appName,
moduleName: this.moduleName,
};
await this.$ajax.postJSON('/server/api/cache/addServerConfigItem', option);
this.$tip.success(`${this.$t('cache.config.addSuccess')}`);
this.configValue = null;
this.$emit('call-back');
} catch (err) {
console.error(err)
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
}
},
async getConfig () {
try {
let configItemList = await this.$ajax.getJSON('/server/api/cache/getConfig');
this.list = configItemList;
} catch (err) {
console.error(err)
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
}
},
created() {
this.getConfig()
}
}
</script>
<style>
</style>
<template>
<section class="page_operation">
<let-button theme="primary" size="small">{{$t('cache.config.add')}}</let-button>
<let-button theme="primary" size="small" @click="addConfig">{{$t('cache.config.addConfig')}}</let-button>
<let-table :data="list" :title="$t('cache.config.tableTitle')" :empty-msg="$t('common.nodata')">
<let-table-column title="ID" prop="id"></let-table-column>
<let-table-column title="备注" prop="remark"></let-table-column>
<let-table-column title="路径" prop="path"></let-table-column>
<let-table-column title="配置项" prop="AnalyseLog"></let-table-column>
<let-table-column title="加载生效" prop="reload"></let-table-column>
<let-table-column title="版本" prop="period"></let-table-column>
<let-table-column title="操作" prop="id">
<template slot-scope="scope">
<let-table-operation >{{$t('operate.update')}}</let-table-operation>
<let-table-operation class="danger" >{{$t('operate.delete')}}</let-table-operation>
<let-table-column :title="$t('cache.config.remark')" prop="remark"></let-table-column>
<let-table-column :title="$t('cache.config.path')" prop="path"></let-table-column>
<let-table-column :title="$t('cache.config.item')" prop="item"></let-table-column>
<let-table-column :title="$t('cache.config.reload')" prop="reload"></let-table-column>
<let-table-column :title="$t('cache.config.period')" prop="period"></let-table-column>
<let-table-column :title="$t('operate.operates')" >
<template slot-scope="{row}">
<let-table-operation @click="editConfig(row)">{{$t('operate.update')}}</let-table-operation>
<let-table-operation @click="deleteConfig(row)" class="danger">{{$t('operate.delete')}}</let-table-operation>
</template>
</let-table-column>
</let-table>
<let-modal
v-model="addConfigVisible"
:footShow="false"
:closeOnClickBackdrop="true"
>
<add-config v-if="addConfigVisible" @call-back="getConfig"></add-config>
</let-modal>
<let-modal
v-model="editConfigVisible"
:footShow="false"
:closeOnClickBackdrop="true"
>
<edit-config v-if="editConfigVisible" v-bind="editConfigObj" @call-back="getConfig"></edit-config>
</let-modal>
</section>
</template>
<script>
import AddConfig from './add.vue'
import EditConfig from './edit.vue'
export default {
components: {
AddConfig,
EditConfig
},
data () {
return {
list: []
list: [],
addConfigVisible: false,
editConfigVisible: false,
editConfigObj: null,
}
},
async created () {
methods: {
addConfig () {
this.addConfigVisible = true
},
editConfig (config) {
this.editConfigVisible = true;
this.editConfigObj = config
},
deleteConfig ({id}) {
this.$confirm(this.$t('cache.config.deleteConfig'), this.$t('common.alert')).then(async () => {
try {
let configItemList = await this.$ajax.getJSON('/server/api/cache/deleteConfig', {id});
await this.getConfig();
} catch (err) {
console.error(err)
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
});
},
async getConfig () {
try {
let {configItemList} = await this.$ajax.getJSON('/server/api/cache/getConfig');
let configItemList = await this.$ajax.getJSON('/server/api/cache/getConfig');
this.list = configItemList;
} catch (err) {
console.error(err)
console.error(err)
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
}
},
async created () {
this.getConfig();
}
}
</script>
......
<template>
<section class="">
<let-form
ref="editConfigForm"
type="medium"
:title="$t('cache.config.editConfig')"
:columns="2"
>
<let-form-item :label="$t('cache.config.reload')" required>
<let-input size="small" v-model="config.reload" required></let-input>
</let-form-item>
<let-form-item :label="$t('cache.config.period')" required>
<let-input size="small" v-model="config.period" required></let-input>
</let-form-item>
<let-form-item :label="$t('cache.config.remark')" required>
<let-input size="small" v-model="config.remark" required></let-input>
</let-form-item>
<br>
<let-form-item label=" ">
<let-button theme="primary" @click="submit">{{$t('cache.modification')}}</let-button>
</let-form-item>
</let-form>
</section>
</template>
<script>
export default {
props: {
id: {type: String, required: true},
item: {type: String, required: true},
path: {type: String, required: true},
period: {type: String, required: true},
reload: {type: String, required: true},
remark: {type: String, required: true},
},
data () {
return {
config: {
id: this.id,
item: this.item,
path: this.path,
period: this.period,
reload: this.reload,
remark: this.remark,
}
}
},
methods: {
async submit () {
if (this.$refs.editConfigForm.validate()) {
try {
await this.$ajax.postJSON('/server/api/cache/editConfig', this.config);
this.$tip.success(`${this.$t('cache.config.addSuccess')}`);
this.$emit('call-back');
} catch (err) {
console.error(err)
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
}
}
}
}
</script>
<style>
</style>
<template>
<section class="">
<!-- 服务列表 -->
<let-table v-if="serverList" :data="serverList" :title="$t('serverList.title.serverList')" :empty-msg="$t('common.nodata')" ref="serverListLoading">
<let-table v-if="serverList" :data="serverList" :title="$t('serverList.title.serverList')"
:empty-msg="$t('common.nodata')" ref="serverListLoading">
<let-table-column :title="$t('serverList.table.th.service')" prop="server_name"></let-table-column>
<let-table-column :title="$t('serverList.table.th.ip')" prop="node_name" width="140px"></let-table-column>
<let-table-column :title="$t('serverList.table.th.ip')" width="140px">
......@@ -18,7 +19,8 @@
</let-table-column>
<let-table-column :title="$t('serverList.table.th.currStatus')" width="65px">
<template slot-scope="scope">
<span :class="scope.row.present_state === 'active' ? 'status-active' : scope.row.present_state === 'activating' ? 'status-activating' : 'status-off'"></span>
<span
:class="scope.row.present_state === 'active' ? 'status-active' : scope.row.present_state === 'activating' ? 'status-activating' : 'status-off'"></span>
</template>
</let-table-column>
<let-table-column :title="$t('serverList.table.th.time')">
......@@ -27,9 +29,10 @@
</template>
</let-table-column>
<let-table-column :title="$t('operate.operates')" width="260px">
<template slot-scope="scope">
<let-table-operation >{{$t('operate.update')}}</let-table-operation>
<let-table-operation >{{$t('operate.view')}}</let-table-operation>
<template slot-scope="{row}">
<let-table-operation @click="editServerConfig(row)">{{$t('operate.update')}}</let-table-operation>
<let-table-operation @click="checkServerConfigList(row)">{{$t('operate.view')}}</let-table-operation>
<let-table-operation @click="addServerConfig(row)">{{$t('operate.add')}}</let-table-operation>
</template>
</let-table-column>
</let-table>
......@@ -40,33 +43,81 @@
<let-table-column :title="$t('cache.config.config_value')" prop="config_value"></let-table-column>
<let-table-column :title="$t('cache.config.modify_value')" prop="period">
<template slot-scope="{row}">
<let-input size="small"></let-input>
<let-input size="small" v-model="row.modify_value"></let-input>
</template>
</let-table-column>
<let-table-column :title="$t('operate.operates')" >
<template slot-scope="{row}">
<let-table-operation @click="saveConfig(row)">{{$t('operate.save')}}</let-table-operation>
<let-table-operation @click="deleteConfig(row)" class="danger">{{$t('operate.delete')}}</let-table-operation>
</template>
</let-table-column>
</let-table>
<!-- 查看服务列表配置-->
<let-modal
v-model="serverCacheVisible"
v-model="serverConfigListVisible"
:footShow="false"
:closeOnClickBackdrop="true"
></let-modal>
width="80%"
height="80%"
:title="$t('cache.config.tableTitle')"
class="server_config_list_modal"
>
<server-config-list v-if="serverConfigListVisible" :moduleName="moduleName" v-bind="checkServer"></server-config-list>
</let-modal>
<!-- 修改服务配置-->
<let-modal
v-model="serverConfigVisible"
:footShow="false"
:closeOnClickBackdrop="true"
width="80%"
height="80%"
:title="$t('cache.config.tableTitle')"
class="server_config_list_modal"
>
<server-config v-if="serverConfigVisible" v-bind="checkServer"></server-config>
</let-modal>
<!-- 添加服务配置-->
<let-modal
v-model="addServerConfigVisible"
:footShow="false"
:closeOnClickBackdrop="true"
>
<add-server-config v-if="addServerConfigVisible" v-bind="checkServer"></add-server-config>
</let-modal>
</section>
</template>
<script>
import ServerConfigList from './ServerConfigList.vue'
import ServerConfig from './ServerConfig.vue'
import addServerConfig from './addServerConfig.vue'
export default {
components: {
ServerConfigList,
ServerConfig,
addServerConfig
},
data () {
return {
moduleName: this.$route.params.treeid,
configList: [],
serverList: [],
serverCacheVisible: false
serverConfigListVisible: false,
serverConfigVisible: false,
addServerConfigVisible: false,
checkServer: {}
}
},
methods: {
async getModuleConfig () {
try {
let configItemList = await this.$ajax.getJSON('/server/api/cache/getModuleConfig', {moduleName: this.moduleName});
// 添加被修改的空值
configItemList.forEach(item => item.modify_value="");
this.configList = configItemList;
} catch (err) {
console.error(err)
......@@ -83,6 +134,17 @@
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
},
async saveConfig (row) {
console.log(row);
let {id, modify_value} = row;
try {
let configItemList = await this.$ajax.getJSON('/server/api/cache/updateServerConfigItem', {id, configValue: modify_value});
await this.getModuleConfig();
} catch (err) {
console.error(err)
this.$tip.error(`${this.$t('common.error')}: ${err.message || err.err_msg}`);
}
},
// 处理未发布时间显示
handleNoPublishedTime(timeStr, noPubTip = this.$t('pub.dlg.unpublished')) {
if (timeStr === '0000:00:00 00:00:00') {
......@@ -90,6 +152,28 @@
}
return timeStr;
},
checkServerConfigList (row) {
this.serverConfigListVisible = true;
this.checkServer = {
serverName: row.server_name,
nodeName: row.node_name
}
},
editServerConfig(row) {
this.serverConfigVisible = true;
this.checkServer = {
serverName: row.server_name,
nodeName: row.node_name
}
},
addServerConfig(row) {
this.addServerConfigVisible = true;
this.checkServer = {
serverName: row.server_name,
nodeName: row.node_name
}
},
},
created () {
this.getModuleConfig();
......@@ -99,5 +183,9 @@
</script>
<style>
.server_config_list_modal .let_modal__body{
max-height: 500px;
overflow-y: auto;
margin-top: 20px;
}
</style>
......@@ -23,12 +23,5 @@ export default {
</script>
<style>
.page_operation {
padding-top: 30px;
padding-bottom: 40px;
&_children {
padding: 20px 0;
}
}
</style>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment