优化前端页面 新增实时点位数据查看 mqttclienId逻辑优化
This commit is contained in:
parent
8447d1f0f4
commit
1dae83ea2e
File diff suppressed because it is too large
Load Diff
116763
gather-broker/log/gather-broker.2022-09-05.log
Normal file
116763
gather-broker/log/gather-broker.2022-09-05.log
Normal file
File diff suppressed because one or more lines are too long
@ -17,7 +17,12 @@ public class ConfigConstant {
|
||||
|
||||
public static Integer STORTE_STRA = 0;
|
||||
|
||||
//级联客户端前缀
|
||||
public static String CLIENT_PREFIX = "GSGatherClient:";
|
||||
|
||||
//级联客户端测试前缀
|
||||
public static String CLIENT_TEST_PREFIX = "GSGatherClientTest:";
|
||||
|
||||
//级联客户端前缀
|
||||
public static String MQTT_CONNECTION_PREFIX = "GSMC:";
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.idtgz.config.model;
|
||||
|
||||
import cn.hutool.crypto.digest.MD5;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.idtgz.config.ConfigConstant;
|
||||
import com.idtgz.config.StoreConfig;
|
||||
import com.idtgz.config.StoreStrategyConstant;
|
||||
import com.idtgz.context.ConfigContext;
|
||||
@ -67,6 +68,6 @@ public class MqttConnectionConfig extends BaseConntionConfig {
|
||||
this.connetionName = dto.getMqttConnectionName();
|
||||
this.connectionSign = StringUtils.isEmpty(dto.getConnectionSign()) ? MD5.create().digestHex16(dto.getMqttUsername() + dto.getClientId()).toUpperCase() : dto.getConnectionSign();
|
||||
this.device = CommonUtil.getLongId(this.connectionSign);
|
||||
this.clientId = StringUtils.isNotEmpty(dto.getClientId()) ? dto.getClientId() : ConfigContext.localConfig.getBrokerId();
|
||||
this.clientId = StringUtils.isNotEmpty(dto.getClientId()) ? dto.getClientId() : ConfigConstant.MQTT_CONNECTION_PREFIX + (MD5.create().digestHex16(ConfigContext.localConfig.getBrokerId() + this.userName).toUpperCase());
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,6 +20,5 @@ public class TemplateController {
|
||||
@RequestMapping("/")
|
||||
public String index2(HttpServletRequest request) {
|
||||
return "index";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import com.idtgz.config.constant.ProtocolConstant;
|
||||
import com.idtgz.config.model.IEC104Config;
|
||||
import com.idtgz.config.model.MqttConnectionConfig;
|
||||
import com.idtgz.config.model.OPCDaConfig;
|
||||
import com.idtgz.context.BuffContext;
|
||||
import com.idtgz.dao.entity.*;
|
||||
import com.idtgz.dao.mapper.ClientMapper;
|
||||
import com.idtgz.dao.mapper.ConnectionMapper;
|
||||
@ -20,6 +21,7 @@ import com.idtgz.exception.BussinessException;
|
||||
import com.idtgz.model.pipeline.AddClientConnectionItemResultDTO;
|
||||
import com.idtgz.model.pipeline.AvailableItemResponseDTO;
|
||||
import com.idtgz.model.pipeline.AvailableOPCServerDTO;
|
||||
import com.idtgz.model.pipeline.ItemUploadDTO;
|
||||
import com.idtgz.model.web.*;
|
||||
import com.idtgz.service.CenterService;
|
||||
import com.idtgz.service.ConfigService;
|
||||
@ -29,6 +31,8 @@ import org.quartz.SchedulerException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@ -209,6 +213,20 @@ public class WebController {
|
||||
}
|
||||
ConnectionEntity connectionEntity = connectionService.getOne(new QueryWrapper<ConnectionEntity>().eq("connection_sign", connectionSign));
|
||||
IPage<ConnectionItemEntity> list = connectionItemService.page(new Page<>(pageNo, pageSize), new QueryWrapper<ConnectionItemEntity>().like(StringUtils.isNotEmpty(keyword), "item_code", keyword.trim()).eq("connection_id", connectionEntity.getId()));
|
||||
|
||||
list.getRecords().forEach(
|
||||
i -> {
|
||||
if (BuffContext.itemBuff.keySet().contains(connectionEntity.getDeviceId())) {
|
||||
ItemUploadDTO.Value value = BuffContext.itemBuff.get(connectionEntity.getDeviceId()).get(i.getItemCode());
|
||||
if (value != null) {
|
||||
i.setValue(String.valueOf(value.value));
|
||||
i.setItemTimestamp(LocalDateTime.ofEpochSecond(value.getTs() / 1000, 0, ZoneOffset.ofHours(8)));
|
||||
i.setItemStatus(value.getStatus());
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return BaseResponse.success(list);
|
||||
}
|
||||
|
||||
|
||||
@ -29,6 +29,16 @@ public class ConnectionItemEntity {
|
||||
@TableField("item_code")
|
||||
private String itemCode;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String value;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime itemTimestamp;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String itemStatus;
|
||||
|
||||
@TableField("create_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.idtgz.config.ConfigConstant;
|
||||
import com.idtgz.config.UploadStatus;
|
||||
import com.idtgz.config.constant.ProtocolConstant;
|
||||
import com.idtgz.config.model.MqttConnectionConfig;
|
||||
import com.idtgz.context.BuffContext;
|
||||
@ -55,12 +56,18 @@ public class AuthServiceImpl implements MqttAuth {
|
||||
return true;
|
||||
}
|
||||
//Mqtt连接确认
|
||||
List<ConnectionEntity> connectionEntityList = connectionMapper.selectList(new QueryWrapper<ConnectionEntity>().eq("connection_protocol", ProtocolConstant.MQTT));
|
||||
List<ConnectionEntity> connectionEntityList = connectionMapper.selectList(new QueryWrapper<ConnectionEntity>().eq("client_id",clientId).eq("connection_protocol", ProtocolConstant.MQTT));
|
||||
for (ConnectionEntity connectionEntity : connectionEntityList) {
|
||||
MqttConnectionConfig mqttConnectionConfig = JSON.parseObject(connectionEntity.getConnectionJson(), MqttConnectionConfig.class);
|
||||
if (mqttConnectionConfig.getUserName().equals(username) && mqttConnectionConfig.getClientId().equals(clientId)) {
|
||||
if (mqttConnectionConfig.getPassword().equals(password)) {
|
||||
connectionEntity.setConnectionStatus(ConfigConstant.CONNECTION_STATUS_ON);
|
||||
if (connectionEntity.getIsUploaded() == UploadStatus.UPLOADING || connectionEntity.getIsUploaded() == UploadStatus.INTERRUPTED) {
|
||||
connectionEntity.setIsUploaded(UploadStatus.UPLOADING);
|
||||
connectionEntity.setConnectionStatus(ConfigConstant.CONNECTION_STATUS_ON);
|
||||
connectionMapper.updateById(connectionEntity);
|
||||
connectionService.updateSchedule(connectionEntity);
|
||||
}
|
||||
connectionMapper.updateById(connectionEntity);
|
||||
ConfigContext.connections.put(connectionEntity.getDeviceId(), connectionEntity);
|
||||
return true;
|
||||
|
||||
@ -208,6 +208,8 @@ public class ProtocolProcess implements InternalRecvice {
|
||||
String clientId = NettyUtil.getClientId(channel);
|
||||
if (clientId.startsWith(ConfigConstant.CLIENT_PREFIX)) {
|
||||
clientService.clientDisconnect(clientId.replace(ConfigConstant.CLIENT_PREFIX, ""));
|
||||
} else if (clientId.startsWith(ConfigConstant.MQTT_CONNECTION_PREFIX)) {
|
||||
clientService.clientDisconnect(clientId);
|
||||
}
|
||||
boolean isCleanSession = sessionService.isCleanSession(clientId);
|
||||
NettyLog.debug("DISCONNECT - clientId: {}, cleanSession: {}", clientId, isCleanSession);
|
||||
|
||||
@ -65,6 +65,8 @@ public interface ConnectionService extends IService<ConnectionEntity> {
|
||||
//更新上传任务
|
||||
Boolean updateSchedule(String connectionSign, int uploadType, int uploadcycle, Integer storeStrategy, Integer status, boolean throwEx) throws SchedulerException;
|
||||
|
||||
Boolean updateSchedule(ConnectionEntity connectionEntity) throws SchedulerException;
|
||||
|
||||
//暂停上传任务
|
||||
Boolean stopSchedule(Long deviceId);
|
||||
|
||||
|
||||
@ -77,23 +77,24 @@ public class ClientServiceImpl implements ClientService {
|
||||
@Override
|
||||
public void clientDisconnect(String clientId) {
|
||||
//级联客户端断连
|
||||
if (clientId.startsWith(ConfigConstant.CLIENT_PREFIX)) {
|
||||
ClientEntity clientEntity = ConfigContext.clients.get(clientId);
|
||||
clientEntity.setClientStatus(ConfigConstant.CLIENT_STATUS_OFF);
|
||||
clientMapper.updateById(clientEntity);
|
||||
ConfigContext.clients.put(clientId, clientEntity);
|
||||
}
|
||||
//断连处理
|
||||
List<ConnectionEntity> connectionEntities = connectionService.list(new QueryWrapper<ConnectionEntity>().eq("client_id", clientId));
|
||||
for (ConnectionEntity connectionEntity : connectionEntities) {
|
||||
connectionEntity.setConnectionStatus(ConfigConstant.CONNECTION_STATUS_OFF);
|
||||
if (connectionEntity.getIsUploaded() == UploadStatus.UPLOADING) {
|
||||
//停止上传 上传状态改为中断
|
||||
connectionService.stopSchedule(connectionEntity.getDeviceId());
|
||||
connectionEntity.setIsUploaded(UploadStatus.INTERRUPTED);
|
||||
connectionEntity.setConnectionStatus(ConfigConstant.CONNECTION_STATUS_OFF);
|
||||
}
|
||||
connectionService.updateById(connectionEntity);
|
||||
ConfigContext.connections.put(connectionEntity.getDeviceId(), connectionEntity);
|
||||
}
|
||||
}
|
||||
|
||||
BuffContext.clientKeepAlive.remove(clientId);
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.idtgz.config.ConfigConstant;
|
||||
import com.idtgz.config.MqttTopicConstant;
|
||||
import com.idtgz.config.UploadStatus;
|
||||
import com.idtgz.config.constant.ProtocolConstant;
|
||||
import com.idtgz.config.model.BaseConntionConfig;
|
||||
import com.idtgz.config.model.IEC104Config;
|
||||
@ -393,6 +394,7 @@ public class ConnectionServiceImpl extends ServiceImpl<ConnectionMapper, Connect
|
||||
ItemUploadDTO.Value value = new ItemUploadDTO.Value();
|
||||
value.setKey(i.getItemCode());
|
||||
value.setStatus("good");
|
||||
value.setValue(i.getValue());
|
||||
value.setTs(i.getItemTimestamp());
|
||||
maps.put(i.getItemCode(), value);
|
||||
}
|
||||
@ -480,8 +482,8 @@ public class ConnectionServiceImpl extends ServiceImpl<ConnectionMapper, Connect
|
||||
throw new BussinessException("连接{}不存在");
|
||||
}
|
||||
return false;
|
||||
} else if (connectionEntity.getConnectionStatus() == 0) {
|
||||
connectionEntity.setIsUploaded(0);
|
||||
} else if (connectionEntity.getConnectionStatus().equals(ConfigConstant.CONNECTION_STATUS_OFF)) {
|
||||
connectionEntity.setIsUploaded(UploadStatus.STOP_UPLOADING);
|
||||
this.updateById(connectionEntity);
|
||||
ConfigContext.connections.put(connectionEntity.getDeviceId(), connectionEntity);
|
||||
log.error("连接未激活", connectionEntity.getConnectionSign());
|
||||
@ -534,6 +536,11 @@ public class ConnectionServiceImpl extends ServiceImpl<ConnectionMapper, Connect
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateSchedule(ConnectionEntity connectionEntity) throws SchedulerException {
|
||||
return updateSchedule(connectionEntity.getConnectionSign(), connectionEntity.getUploadType(), connectionEntity.getUploadCycle(), connectionEntity.getStoreStrategy(), connectionEntity.getIsUploaded(), false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean stopSchedule(Long deviceId) {
|
||||
try {
|
||||
|
||||
@ -5,18 +5,28 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: #f0f2f5;
|
||||
}
|
||||
</style>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="./umi.c19e50b2.css" />
|
||||
<script>
|
||||
window.routerBase = "/";
|
||||
</script>
|
||||
<script>
|
||||
//! umi version: 3.5.32
|
||||
//! umi version: 3.5.34
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
<script src="./umi.b4969bc8.js"></script>
|
||||
<script src="./umi.6397448f.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
.menuTitle___vfXvH{padding:16px;display:flex;align-items:center;width:256px!important}.menuTitle___vfXvH img{width:32px;height:32px}.menuTitle___vfXvH h1{font-size:18px;color:#fff;margin:0 0 0 12px;display:inline-block;font-weight:700}.menuTitle___vfXvH .menuIcon___2bV5r{font-size:18px;color:#fff;margin-left:auto}.Menu___2m28J{height:100%;width:256px!important;background:#001529}.nav___2VwOK{height:48px;line-height:48px;width:100%;z-index:19;padding:0 16px;box-sizing:border-box;box-shadow:0 3px 3px rgb(0 0 0);border-bottom:1px solid #e0e0e0;background-color:#fff}.childrenPage___1OO9Z{background-color:#f0f2f5;flex:1 1;margin:20px 20px 0;overflow:auto}.layout___2HAIu{height:100%;display:flex;overflow:hidden}.layoutRigth___2Rcww{flex:1 1;display:flex;flex-direction:column}
|
||||
@ -1 +0,0 @@
|
||||
.menuTitle___24fso{padding:16px;display:flex;align-items:center}.menuTitle___24fso img{width:32px;height:32px}.menuTitle___24fso h1{font-size:18px;color:#fff;margin:0 0 0 12px;display:inline-block;font-weight:700}.menuTitle___24fso .menuIcon___2eLFV{font-size:18px;color:#fff;margin-left:auto}.menuHeight___2vf8B{height:calc(100vh - 64px)}.nav___WMB6n{height:48px;line-height:48px;width:100%;z-index:19;padding:0 16px;box-sizing:border-box;box-shadow:0 3px 3px rgb(0 0 0);border-bottom:1px solid #e0e0e0}.connetType___1Xb1M{float:right}.childrenPage___1OO9Z{background-color:#f0f2f5;padding:16px;box-sizing:border-box;min-height:calc(100vh - 48px)}
|
||||
@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[4],{"0+7N":function(e,n,c){"use strict";c.r(n),c.d(n,"default",(function(){return w}));c("FMPM");var t=c("m3pg"),a=c("S3SW"),i=c("x9r5"),s=c("QMUJ"),l=c("JKUY"),o=c("q1tI"),r=c("QttV"),j=c("pHMi"),d=c.n(j),b=c("nKUr");function u(e,n,c,t,a){return{key:n,icon:c,children:t,label:e,type:a}}var g=[u(Object(b["jsx"])(r["b"],{to:"/connectPage",children:"\u8fde\u63a5"}),"/connectPage",Object(b["jsx"])(i["a"],{})),u(Object(b["jsx"])(r["b"],{to:"/clientPage",children:"\u7ea7\u8054\u5ba2\u6237\u7aef"}),"/clientPage",Object(b["jsx"])(s["a"],{})),u(Object(b["jsx"])(r["b"],{to:"/configPage",children:"\u914d\u7f6e"}),"/configPage",Object(b["jsx"])(l["a"],{}))],h=()=>{var e=Object(o["useState"])(!1),n=Object(a["a"])(e,2),c=n[0];n[1];return Object(b["jsxs"])("div",{className:d.a.Menu,children:[Object(b["jsxs"])("div",{className:d.a.menuTitle,children:[Object(b["jsx"])("img",{src:"./favicon.ico"}),Object(b["jsx"])("h1",{children:"\u5de5\u6570\u6570\u636eBroker"})]}),Object(b["jsx"])(t["a"],{defaultSelectedKeys:["1"],mode:"inline",theme:"dark",inlineCollapsed:c,items:g,className:d.a.menuHeight,inlineCollapsed:!1,inlineIndent:24})]})},O=h,m=c("fmLK"),x=c.n(m),_=c("9kvl"),f=e=>(Object(o["useEffect"])((()=>{Object(_["d"])("/web/configInfo",{method:"get",skipErrorHandler:!0,getResponse:!1}).then((n=>{0===n.code&&e.dispatch({type:"global/setConnecting",payload:n.data.isConnected})})).catch((e=>{console.log("err\uff1a"+e)}))}),[]),Object(b["jsx"])(b["Fragment"],{children:Object(b["jsx"])("div",{className:x.a.nav,children:Object(b["jsxs"])("div",{className:x.a.connetType,children:["\u8fde\u63a5\u72b6\u6001\uff1a",1==e.connecting?"\u5df2\u8fde\u63a5":2==e.connecting?"\u4e2d\u65ad":"\u672a\u8fde\u63a5"]})})})),p=Object(_["a"])((e=>({connecting:e.global.connecting})))(f),v=c("bDFH"),y=c.n(v);function w(e){return Object(b["jsx"])(b["Fragment"],{children:Object(b["jsxs"])("div",{className:y.a.layout,children:[Object(b["jsx"])(O,{}),Object(b["jsxs"])("div",{style:{flex:1},className:y.a.layoutRigth,children:[Object(b["jsx"])(p,{}),Object(b["jsx"])("div",{className:y.a.childrenPage,children:e.children})]})]})})}},bDFH:function(e,n,c){e.exports={childrenPage:"childrenPage___1OO9Z",layout:"layout___2HAIu",layoutRigth:"layoutRigth___2Rcww"}},fmLK:function(e,n,c){e.exports={nav:"nav___2VwOK"}},pHMi:function(e,n,c){e.exports={menuTitle:"menuTitle___vfXvH",menuIcon:"menuIcon___2bV5r",Menu:"Menu___2m28J"}}}]);
|
||||
@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[5],{"i6+/":function(n,e,c){"use strict";c.r(e);var r=c("nKUr");e["default"]=function(){return Object(r["jsx"])(r["Fragment"],{children:Object(r["jsx"])("h1",{children:"404"})})}}}]);
|
||||
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[5],{"i6+/":function(n,e,c){"use strict";c.r(e);var i=c("ikfJ");e["default"]=function(){return Object(i["jsx"])(i["Fragment"],{children:Object(i["jsx"])("h1",{children:"404"})})}}}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[7],{"2Akm":function(e,t,a){"use strict";a.r(t);a("M9/W");var n=a("QKnV"),s=(a("QGIz"),a("PIO5")),c=(a("Plpb"),a("WH27")),i=(a("ihNU"),a("BhU0")),r=(a("Cr2i"),a("cOxV")),o=(a("Xmey"),a("kVqo")),l=a("kZID"),d=(a("JVfu"),a("rHr6")),j=a("0gua"),b=a("LRVh"),m=a.n(b),p=a("9kvl"),h=a("T9Mk"),O=a("ikfJ"),g={labelCol:{span:6},wrapperCol:{span:14}},u=e=>{var t=Object(h["useState"])(!1),a=Object(j["a"])(t,2),b=a[0],u=a[1],f=Object(h["useState"])(!1),x=Object(j["a"])(f,2),w=x[0],C=x[1],I=d["a"].useForm(),y=Object(j["a"])(I,1),k=y[0],L=d["a"].useForm(),V=Object(j["a"])(L,1),v=V[0];Object(h["useEffect"])((()=>{F()}),[]);var F=()=>{Object(p["d"])("/web/configInfo",{method:"get",skipErrorHandler:!0,getResponse:!1}).then((t=>{0===t.code&&(k.setFieldsValue(t.data),v.setFieldsValue(t.data),e.dispatch({type:"global/setConnecting",payload:t.data.isConnected}))})).catch((e=>{console.log("err\uff1a"+e)}))},_=()=>{k.validateFields().then((e=>{u(!0),Object(p["d"])("/web/pipeLineConfig",{params:Object(l["a"])({},e.pipeLineConfig),method:"post"}).then((e=>{0===e.code?(F(),o["default"].success(e.msg)):o["default"].warn(e.msg),u(!1)})).catch((e=>{u(!1)}))})).catch((e=>{console.error(e)}))},q=()=>{v.validateFields().then((e=>{C(!0),Object(p["d"])("/web/storeConfig",{params:Object(l["a"])({},e.storeConfig),method:"post"}).then((e=>{0===e.code?o["default"].success(e.msg):o["default"].warn(e.msg),C(!1)})).catch((e=>{C(!1)}))})).catch((e=>{console.error(e)}))};return Object(O["jsxs"])(O["Fragment"],{children:[Object(O["jsx"])(s["a"],{style:{width:700},className:m.a.auto,title:"\u901a\u9053\u914d\u7f6e",children:Object(O["jsx"])(c["a"],{spinning:b,children:Object(O["jsxs"])(d["a"],Object(l["a"])(Object(l["a"])({},g),{},{name:"form_in_modal",form:k,children:[Object(O["jsx"])(d["a"].Item,{name:["pipeLineConfig","host"],label:"host",rules:[{required:!0,message:"\u8bf7\u8f93\u5165host"}],children:Object(O["jsx"])(r["a"],{})}),Object(O["jsx"])(d["a"].Item,{name:["pipeLineConfig","port"],label:"port",rules:[{required:!0,message:"\u8bf7\u8f93\u5165port"}],children:Object(O["jsx"])(r["a"],{})}),Object(O["jsx"])(d["a"].Item,{name:["pipeLineConfig","username"],label:"username",children:Object(O["jsx"])(r["a"],{})}),Object(O["jsx"])(d["a"].Item,{name:["pipeLineConfig","password"],label:"password",children:Object(O["jsx"])(r["a"],{})}),Object(O["jsx"])(d["a"].Item,{name:["pipeLineConfig","clientId"],label:"clientId",children:Object(O["jsx"])(r["a"],{})}),Object(O["jsx"])(i["a"],{onClick:e=>_(),style:{marginLeft:480},type:"primary",children:"\u63d0\u4ea4"})]}))})}),Object(O["jsx"])(s["a"],{style:{width:700,marginTop:20},className:m.a.auto,title:"\u5b58\u50a8\u914d\u7f6e",children:Object(O["jsx"])(c["a"],{spinning:w,children:Object(O["jsxs"])(d["a"],Object(l["a"])(Object(l["a"])({},g),{},{name:"form_in_modal",form:v,children:[Object(O["jsx"])(d["a"].Item,{name:["storeConfig","expirationTime"],label:"\u6570\u636e\u6709\u6548\u671f",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u6570\u636e\u6709\u6548\u671f"}],children:Object(O["jsx"])(n["a"],{min:1,max:60,addonAfter:"\u5929",style:{width:"100%"},parser:e=>/^\d+$/.test(e)?e:parseInt(e)})}),Object(O["jsx"])(i["a"],{onClick:e=>q(),style:{marginLeft:480},type:"primary",children:"\u63d0\u4ea4"})]}))})})]})};t["default"]=Object(p["a"])((e=>({connecting:e.global.connecting})))(u)},LRVh:function(e,t,a){e.exports={auto:"auto___Xamnv"}}}]);
|
||||
@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[7],{"2Akm":function(e,t,a){"use strict";a.r(t);a("Si1/");var s=a("mYEJ"),n=(a("SiZr"),a("gDal")),c=(a("e4PP"),a("lUk2")),i=(a("3i0d"),a("p4vi")),r=(a("q03V"),a("fHXl")),l=(a("f/HG"),a("6iYR")),o=a("e22G"),d=(a("sWfU"),a("VNYO")),j=a("S3SW"),b=a("LRVh"),m=a.n(b),p=a("9kvl"),O=a("q1tI"),h=a("nKUr"),g={labelCol:{span:6},wrapperCol:{span:14}},f=e=>{var t=Object(O["useState"])(!1),a=Object(j["a"])(t,2),b=a[0],f=a[1],u=Object(O["useState"])(!1),x=Object(j["a"])(u,2),w=x[0],C=x[1],y=d["a"].useForm(),I=Object(j["a"])(y,1),L=I[0],k=d["a"].useForm(),v=Object(j["a"])(k,1),F=v[0];Object(O["useEffect"])((()=>{_()}),[]);var _=()=>{Object(p["d"])("/web/configInfo",{method:"get",skipErrorHandler:!0,getResponse:!1}).then((t=>{0===t.code&&(L.setFieldsValue(t.data),F.setFieldsValue(t.data),e.dispatch({type:"global/setConnecting",payload:t.data.isConnected}))})).catch((e=>{console.log("err\uff1a"+e)}))},S=()=>{L.validateFields().then((e=>{f(!0),Object(p["d"])("/web/pipeLineConfig",{params:Object(o["a"])({},e.pipeLineConfig),method:"post"}).then((e=>{0===e.code?(_(),l["default"].success(e.msg)):l["default"].warn(e.msg),f(!1)})).catch((e=>{f(!1)}))})).catch((e=>{console.error(e)}))},V=()=>{F.validateFields().then((e=>{C(!0),Object(p["d"])("/web/storeConfig",{params:Object(o["a"])({},e.storeConfig),method:"post"}).then((e=>{0===e.code?l["default"].success(e.msg):l["default"].warn(e.msg),C(!1)})).catch((e=>{C(!1)}))})).catch((e=>{console.error(e)}))};return Object(h["jsxs"])(h["Fragment"],{children:[Object(h["jsx"])(n["a"],{style:{width:700},className:m.a.auto,title:"\u901a\u9053\u914d\u7f6e",children:Object(h["jsx"])(c["a"],{spinning:b,children:Object(h["jsxs"])(d["a"],Object(o["a"])(Object(o["a"])({},g),{},{name:"form_in_modal",form:L,children:[Object(h["jsx"])(d["a"].Item,{name:["pipeLineConfig","host"],label:"host",rules:[{required:!0,message:"\u8bf7\u8f93\u5165host"}],children:Object(h["jsx"])(r["a"],{})}),Object(h["jsx"])(d["a"].Item,{name:["pipeLineConfig","port"],label:"port",rules:[{required:!0,message:"\u8bf7\u8f93\u5165port"}],children:Object(h["jsx"])(r["a"],{})}),Object(h["jsx"])(d["a"].Item,{name:["pipeLineConfig","username"],label:"username",children:Object(h["jsx"])(r["a"],{})}),Object(h["jsx"])(d["a"].Item,{name:["pipeLineConfig","password"],label:"password",children:Object(h["jsx"])(r["a"],{})}),Object(h["jsx"])(d["a"].Item,{name:["pipeLineConfig","clientId"],label:"clientId",children:Object(h["jsx"])(r["a"],{})}),Object(h["jsx"])(i["a"],{onClick:e=>S(),style:{marginLeft:480},type:"primary",children:"\u63d0\u4ea4"})]}))})}),Object(h["jsx"])(n["a"],{style:{width:700,marginTop:20},className:m.a.auto,title:"\u5b58\u50a8\u914d\u7f6e",children:Object(h["jsx"])(c["a"],{spinning:w,children:Object(h["jsxs"])(d["a"],Object(o["a"])(Object(o["a"])({},g),{},{name:"form_in_modal",form:F,children:[Object(h["jsx"])(d["a"].Item,{name:["storeConfig","expirationTime"],label:"\u6570\u636e\u6709\u6548\u671f",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u6570\u636e\u6709\u6548\u671f"}],children:Object(h["jsx"])(s["a"],{min:1,max:60,addonAfter:"\u5929",style:{width:"100%"},parser:e=>/^\d+$/.test(e)?e:parseInt(e)})}),Object(h["jsx"])(i["a"],{onClick:e=>V(),style:{marginLeft:480},type:"primary",children:"\u63d0\u4ea4"})]}))})})]})};t["default"]=Object(p["a"])((e=>({connecting:e.global.connecting})))(f)},LRVh:function(e,t,a){e.exports={auto:"auto___Xamnv"}}}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{"3LD+":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("a2Ed");function c(e,t){var n=Object(r["a"])({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},"9RdE":function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n("q1tI"),c=r["isValidElement"];function i(e){return e&&e.type===r["Fragment"]}function u(e,t,n){return c(e)?r["cloneElement"](e,"function"===typeof n?n(e.props||{}):n):t}function a(e,t){return u(e,e,t)}},i9BZ:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t}},x2bW:function(e,t,n){"use strict";n.r(t);var r=n("S3SW"),c=(n("3i0d"),n("p4vi")),i=n("q1tI"),u=Object(i["createContext"])({}),a=u,o=n("nKUr"),s=function(){var e=Object(i["useContext"])(a),t=e.fatherName,n=e.setFatherName;return Object(o["jsxs"])(o["Fragment"],{children:[Object(o["jsx"])("h3",{children:"\u5b50\u7ec4\u4ef6"}),Object(o["jsxs"])("p",{children:["\u7236\u7ec4\u4ef6\u6570\u636e\uff1a",t]}),Object(o["jsx"])(c["a"],{type:"primary",onClick:()=>{n("\u6211\u6539\u4e86\u7236\u7ec4\u4ef6")},children:"\u4fee\u6539\u7236\u7ec4\u4ef6\u540d\u79f0"})]})};t["default"]=function(){var e=Object(i["useState"])("\u7236\u7ec4\u4ef6"),t=Object(r["a"])(e,2),n=t[0],c=t[1],u=Object(i["useMemo"])((()=>n),[n]);return Object(o["jsx"])(a.Provider,{value:{fatherName:n,setFatherName:c},children:Object(o["jsxs"])("div",{children:[Object(o["jsx"])("h2",{children:n}),Object(o["jsx"])("p",{children:u}),Object(o["jsx"])(s,{})]})})}}}]);
|
||||
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{"5Nt4":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("ZvKv");function c(e,t){var n=Object(r["a"])({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},TNRq:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t}},x2bW:function(e,t,n){"use strict";n.r(t);var r=n("0gua"),c=(n("ihNU"),n("BhU0")),i=n("T9Mk"),u=Object(i["createContext"])({}),a=u,s=n("ikfJ"),o=function(){var e=Object(i["useContext"])(a),t=e.fatherName,n=e.setFatherName;return Object(s["jsxs"])(s["Fragment"],{children:[Object(s["jsx"])("h3",{children:"\u5b50\u7ec4\u4ef6"}),Object(s["jsxs"])("p",{children:["\u7236\u7ec4\u4ef6\u6570\u636e\uff1a",t]}),Object(s["jsx"])(c["a"],{type:"primary",onClick:()=>{n("\u6211\u6539\u4e86\u7236\u7ec4\u4ef6")},children:"\u4fee\u6539\u7236\u7ec4\u4ef6\u540d\u79f0"})]})};t["default"]=function(){var e=Object(i["useState"])("\u7236\u7ec4\u4ef6"),t=Object(r["a"])(e,2),n=t[0],c=t[1],u=Object(i["useMemo"])((()=>n),[n]);return Object(s["jsx"])(a.Provider,{value:{fatherName:n,setFatherName:c},children:Object(s["jsxs"])("div",{children:[Object(s["jsx"])("h2",{children:n}),Object(s["jsx"])("p",{children:u}),Object(s["jsx"])(o,{})]})})}},znzu:function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var r=n("T9Mk"),c=r["isValidElement"];function i(e,t,n){return c(e)?r["cloneElement"](e,"function"===typeof n?n(e.props||{}):n):t}function u(e,t){return i(e,e,t)}}}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -5,18 +5,28 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: #f0f2f5;
|
||||
}
|
||||
</style>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
|
||||
<link rel="stylesheet" href="./umi.c19e50b2.css" />
|
||||
<script>
|
||||
window.routerBase = "/";
|
||||
</script>
|
||||
<script>
|
||||
//! umi version: 3.5.32
|
||||
//! umi version: 3.5.34
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
<script src="./umi.b4969bc8.js"></script>
|
||||
<script src="./umi.6397448f.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
.menuTitle___24fso{padding:16px;display:flex;align-items:center}.menuTitle___24fso img{width:32px;height:32px}.menuTitle___24fso h1{font-size:18px;color:#fff;margin:0 0 0 12px;display:inline-block;font-weight:700}.menuTitle___24fso .menuIcon___2eLFV{font-size:18px;color:#fff;margin-left:auto}.menuHeight___2vf8B{height:calc(100vh - 64px)}.nav___WMB6n{height:48px;line-height:48px;width:100%;z-index:19;padding:0 16px;box-sizing:border-box;box-shadow:0 3px 3px rgb(0 0 0);border-bottom:1px solid #e0e0e0}.connetType___1Xb1M{float:right}.childrenPage___1OO9Z{background-color:#f0f2f5;padding:16px;box-sizing:border-box;min-height:calc(100vh - 48px)}
|
||||
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[5],{"i6+/":function(n,e,c){"use strict";c.r(e);var i=c("ikfJ");e["default"]=function(){return Object(i["jsx"])(i["Fragment"],{children:Object(i["jsx"])("h1",{children:"404"})})}}}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[7],{"2Akm":function(e,t,a){"use strict";a.r(t);a("M9/W");var n=a("QKnV"),s=(a("QGIz"),a("PIO5")),c=(a("Plpb"),a("WH27")),i=(a("ihNU"),a("BhU0")),r=(a("Cr2i"),a("cOxV")),o=(a("Xmey"),a("kVqo")),l=a("kZID"),d=(a("JVfu"),a("rHr6")),j=a("0gua"),b=a("LRVh"),m=a.n(b),p=a("9kvl"),h=a("T9Mk"),O=a("ikfJ"),g={labelCol:{span:6},wrapperCol:{span:14}},u=e=>{var t=Object(h["useState"])(!1),a=Object(j["a"])(t,2),b=a[0],u=a[1],f=Object(h["useState"])(!1),x=Object(j["a"])(f,2),w=x[0],C=x[1],I=d["a"].useForm(),y=Object(j["a"])(I,1),k=y[0],L=d["a"].useForm(),V=Object(j["a"])(L,1),v=V[0];Object(h["useEffect"])((()=>{F()}),[]);var F=()=>{Object(p["d"])("/web/configInfo",{method:"get",skipErrorHandler:!0,getResponse:!1}).then((t=>{0===t.code&&(k.setFieldsValue(t.data),v.setFieldsValue(t.data),e.dispatch({type:"global/setConnecting",payload:t.data.isConnected}))})).catch((e=>{console.log("err\uff1a"+e)}))},_=()=>{k.validateFields().then((e=>{u(!0),Object(p["d"])("/web/pipeLineConfig",{params:Object(l["a"])({},e.pipeLineConfig),method:"post"}).then((e=>{0===e.code?(F(),o["default"].success(e.msg)):o["default"].warn(e.msg),u(!1)})).catch((e=>{u(!1)}))})).catch((e=>{console.error(e)}))},q=()=>{v.validateFields().then((e=>{C(!0),Object(p["d"])("/web/storeConfig",{params:Object(l["a"])({},e.storeConfig),method:"post"}).then((e=>{0===e.code?o["default"].success(e.msg):o["default"].warn(e.msg),C(!1)})).catch((e=>{C(!1)}))})).catch((e=>{console.error(e)}))};return Object(O["jsxs"])(O["Fragment"],{children:[Object(O["jsx"])(s["a"],{style:{width:700},className:m.a.auto,title:"\u901a\u9053\u914d\u7f6e",children:Object(O["jsx"])(c["a"],{spinning:b,children:Object(O["jsxs"])(d["a"],Object(l["a"])(Object(l["a"])({},g),{},{name:"form_in_modal",form:k,children:[Object(O["jsx"])(d["a"].Item,{name:["pipeLineConfig","host"],label:"host",rules:[{required:!0,message:"\u8bf7\u8f93\u5165host"}],children:Object(O["jsx"])(r["a"],{})}),Object(O["jsx"])(d["a"].Item,{name:["pipeLineConfig","port"],label:"port",rules:[{required:!0,message:"\u8bf7\u8f93\u5165port"}],children:Object(O["jsx"])(r["a"],{})}),Object(O["jsx"])(d["a"].Item,{name:["pipeLineConfig","username"],label:"username",children:Object(O["jsx"])(r["a"],{})}),Object(O["jsx"])(d["a"].Item,{name:["pipeLineConfig","password"],label:"password",children:Object(O["jsx"])(r["a"],{})}),Object(O["jsx"])(d["a"].Item,{name:["pipeLineConfig","clientId"],label:"clientId",children:Object(O["jsx"])(r["a"],{})}),Object(O["jsx"])(i["a"],{onClick:e=>_(),style:{marginLeft:480},type:"primary",children:"\u63d0\u4ea4"})]}))})}),Object(O["jsx"])(s["a"],{style:{width:700,marginTop:20},className:m.a.auto,title:"\u5b58\u50a8\u914d\u7f6e",children:Object(O["jsx"])(c["a"],{spinning:w,children:Object(O["jsxs"])(d["a"],Object(l["a"])(Object(l["a"])({},g),{},{name:"form_in_modal",form:v,children:[Object(O["jsx"])(d["a"].Item,{name:["storeConfig","expirationTime"],label:"\u6570\u636e\u6709\u6548\u671f",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u6570\u636e\u6709\u6548\u671f"}],children:Object(O["jsx"])(n["a"],{min:1,max:60,addonAfter:"\u5929",style:{width:"100%"},parser:e=>/^\d+$/.test(e)?e:parseInt(e)})}),Object(O["jsx"])(i["a"],{onClick:e=>q(),style:{marginLeft:480},type:"primary",children:"\u63d0\u4ea4"})]}))})})]})};t["default"]=Object(p["a"])((e=>({connecting:e.global.connecting})))(u)},LRVh:function(e,t,a){e.exports={auto:"auto___Xamnv"}}}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{"5Nt4":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("ZvKv");function c(e,t){var n=Object(r["a"])({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},TNRq:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t}},x2bW:function(e,t,n){"use strict";n.r(t);var r=n("0gua"),c=(n("ihNU"),n("BhU0")),i=n("T9Mk"),u=Object(i["createContext"])({}),a=u,s=n("ikfJ"),o=function(){var e=Object(i["useContext"])(a),t=e.fatherName,n=e.setFatherName;return Object(s["jsxs"])(s["Fragment"],{children:[Object(s["jsx"])("h3",{children:"\u5b50\u7ec4\u4ef6"}),Object(s["jsxs"])("p",{children:["\u7236\u7ec4\u4ef6\u6570\u636e\uff1a",t]}),Object(s["jsx"])(c["a"],{type:"primary",onClick:()=>{n("\u6211\u6539\u4e86\u7236\u7ec4\u4ef6")},children:"\u4fee\u6539\u7236\u7ec4\u4ef6\u540d\u79f0"})]})};t["default"]=function(){var e=Object(i["useState"])("\u7236\u7ec4\u4ef6"),t=Object(r["a"])(e,2),n=t[0],c=t[1],u=Object(i["useMemo"])((()=>n),[n]);return Object(s["jsx"])(a.Provider,{value:{fatherName:n,setFatherName:c},children:Object(s["jsxs"])("div",{children:[Object(s["jsx"])("h2",{children:n}),Object(s["jsx"])("p",{children:u}),Object(s["jsx"])(o,{})]})})}},znzu:function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var r=n("T9Mk"),c=r["isValidElement"];function i(e,t,n){return c(e)?r["cloneElement"](e,"function"===typeof n?n(e.props||{}):n):t}function u(e,t){return i(e,e,t)}}}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user