summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchenjinsong <[email protected]>2019-11-21 11:55:55 +0800
committerchenjinsong <[email protected]>2019-11-21 11:55:55 +0800
commit9a054344eb21532700f5a926a61c5ad36fb3cc62 (patch)
treedf34bdeedfc87b8c2cd161d29a971caf902b7f5e
parentaf9711717a93311f3d9c939f7abd63ee006577ab (diff)
init
-rw-r--r--.project34
-rw-r--r--docker-compose.yml4
-rw-r--r--nezha-admin/.project29
-rw-r--r--nezha-admin/src/main/java/com/nis/common/aspect/SystemIdAspect.java35
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/controller/DashboardController.java113
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/dao/DashboardDao.java18
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartEntity.java12
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartSeriesEntity.java13
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartSingleEntity.java35
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartStatisticalEntity.java30
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartTableEntity.java23
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartType.java61
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/entity/DashboardEntity.java56
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ThresholdValueEntity.java9
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/entity/UserSql.java28
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/service/DashboardService.java29
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/service/impl/DashboardServiceImpl.java231
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/utils/DateUtils.java183
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/dashboard/utils/TimeUtils.java324
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteSetController.java171
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteTypeController.java187
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteWarnController.java150
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteSetInfoDao.java40
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteSetNodeRelDao.java20
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeInfoDao.java29
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeMetaDao.java9
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeMetaMappingDao.java9
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeParamDao.java9
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteWarnInfoDao.java17
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteWarnRelDao.java16
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteSetInfoEntity.java105
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteSetNodeRelEntity.java53
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeInfoEntity.java54
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaEntity.java57
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaMappingEntity.java33
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaMapppingVO.java15
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeParamEntity.java36
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteWarnInfoEntity.java104
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteWarnRelEntity.java42
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/DeteCommonService.java18
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/DeteMetaMappingService.java21
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/DeteMetaService.java10
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/DeteParamService.java7
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/DeteSetInfoService.java41
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/DeteSetNodeRelService.java25
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/DeteTypeInfoService.java28
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/DeteWarnInfoService.java40
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/DeteWarnRelService.java10
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteCommonServiceImpl.java260
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteMetaMappingServiceImpl.java155
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteMetaServiceImpl.java37
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteParamServiceImpl.java23
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteSetInfoServiceImpl.java451
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteSetNodeRelServiceImpl.java52
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteTypeInfoServiceImpl.java667
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteWarnInfoServiceImpl.java275
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteWarnRelServiceImpl.java17
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/controller/MissionController.java219
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionInfoDao.java51
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionNodeRelDao.java28
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionResultDao.java21
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/Backup.java19
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/CoverUpdate.java32
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionDto.java35
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionExecuteType.java32
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionInfoEntity.java144
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionLoopEntity.java14
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionNodeRelEntity.java54
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionResultEntity.java66
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionType.java42
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionUpgradeType.java26
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForExecuteInstruct.java80
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForFilePush.java48
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForUpgrade.java92
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/service/MissionInfoService.java42
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/service/MissionNodeRelService.java20
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/service/MissionResultService.java22
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionInfoServiceImpl.java1039
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionNodeRelServiceImpl.java29
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionResultServiceImpl.java26
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/utils/ApiJsonObject.java16
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/utils/ApiJsonProperty.java21
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/utils/DESUtil.java83
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/utils/FileUtil.java267
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/utils/MD5.java342
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/utils/MD5Util.java87
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/mission/utils/MapApiReader.java116
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/controller/NodeCabinetController.java116
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/controller/NodeGroupInfoController.java160
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/controller/NodeInfoController.java144
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/controller/NodeRoomController.java110
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/dao/NodeCabinetDao.java35
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/dao/NodeGroupInfoDao.java31
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/dao/NodeGroupRelDao.java24
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/dao/NodeInfoDao.java43
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/dao/NodeRoomDao.java33
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/dao/SystemNodeRelDao.java26
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/entity/AvailCabinetEntity.java30
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/entity/NodeCabinetEntity.java84
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/entity/NodeGroupInfoEntity.java75
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/entity/NodeGroupRelEntity.java61
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/entity/NodeInfoEntity.java366
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/entity/NodeRoomEntity.java72
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/entity/SystemNodeRelEntity.java79
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/NodeCabinetService.java40
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/NodeGroupInfoService.java45
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/NodeGroupRelService.java22
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/NodeInfoService.java65
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/NodeRoomService.java32
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/SystemNodeRelService.java12
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeCabinetServiceImpl.java321
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeGroupInfoServiceImpl.java551
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeGroupRelServiceImpl.java40
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeInfoServiceImpl.java852
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeRoomServiceImpl.java232
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/service/impl/SystemNodeRelServiceImpl.java27
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/node/util/IpCovert.java78
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/controller/DownloadFile.java64
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/controller/SystemInfoController.java278
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/controller/UserGroupController.java133
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/dao/PermissionInfoDao.java11
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/dao/SystemInfoDao.java52
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/dao/SystemUsergroupDao.java11
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/dao/UserGroupDao.java27
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/dao/UserUsergroupDao.java20
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/entity/PermissionInfoEntity.java51
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/entity/SystemInfoEntity.java107
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/entity/UserGroupEntity.java54
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/entity/UserGroupEntity2.java49
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/entity/UserUsergroupEntity.java51
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/service/PermissionInfoService.java7
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/service/SystemInfoService.java38
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/service/SystemUsergroupService.java8
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/service/UserGroupService.java32
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/service/UserUsergroupService.java27
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/service/impl/PermissionInfoServiceImpl.java13
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SystemInfoServiceImpl.java464
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SystemUsergroupServiceImpl.java13
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/service/impl/UserGroupServiceImpl.java286
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/sys/service/impl/UserUsergroupServiceImpl.java87
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/controller/TopoController.java174
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoInfoDao.java28
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoLineInfoDao.java24
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoNodeInfoDao.java24
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoInfoEntity.java90
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoLineInfoEntity.java71
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoNodeInfoEntity.java101
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/service/TopoInfoService.java24
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/service/TopoLineInfoService.java21
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/service/TopoNodeInfoService.java22
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoInfoServiceImpl.java58
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoLineInfoServiceImpl.java29
-rw-r--r--nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoNodeInfoServiceImpl.java29
-rw-r--r--nezha-admin/src/main/resources/mapper/dashboard/DashboardDao.xml57
-rw-r--r--nezha-admin/src/main/resources/mapper/detect/DeteSetInfoDao.xml121
-rw-r--r--nezha-admin/src/main/resources/mapper/detect/DeteSetNodeRelDao.xml29
-rw-r--r--nezha-admin/src/main/resources/mapper/detect/DeteTypeInfoDao.xml39
-rw-r--r--nezha-admin/src/main/resources/mapper/detect/DeteTypeMetaDao.xml7
-rw-r--r--nezha-admin/src/main/resources/mapper/detect/DeteTypeMetaMappingDao.xml7
-rw-r--r--nezha-admin/src/main/resources/mapper/detect/DeteTypeParamDao.xml7
-rw-r--r--nezha-admin/src/main/resources/mapper/detect/DeteWarnInfoDao.xml58
-rw-r--r--nezha-admin/src/main/resources/mapper/detect/DeteWarnRelDao.xml20
-rw-r--r--nezha-admin/src/main/resources/mapper/mission/MissionInfoDao.xml148
-rw-r--r--nezha-admin/src/main/resources/mapper/mission/MissionNodeRelDao.xml30
-rw-r--r--nezha-admin/src/main/resources/mapper/mission/MissionResultDao.xml29
-rw-r--r--nezha-admin/src/main/resources/mapper/node/NodeCabinetDao.xml95
-rw-r--r--nezha-admin/src/main/resources/mapper/node/NodeGroupInfoDao.xml57
-rw-r--r--nezha-admin/src/main/resources/mapper/node/NodeGroupRelDao.xml38
-rw-r--r--nezha-admin/src/main/resources/mapper/node/NodeInfoDao.xml335
-rw-r--r--nezha-admin/src/main/resources/mapper/node/NodeRoomDao.xml49
-rw-r--r--nezha-admin/src/main/resources/mapper/node/SystemNodeRelDao.xml13
-rw-r--r--nezha-admin/src/main/resources/mapper/sys/SystemInfoDao.xml91
-rw-r--r--nezha-admin/src/main/resources/mapper/sys/UserGroupDao.xml61
-rw-r--r--nezha-admin/src/main/resources/mapper/sys/UserUsergroupDao.xml24
-rw-r--r--nezha-admin/src/main/resources/mapper/topo/TopoInfoDao.xml112
-rw-r--r--nezha-admin/src/main/resources/mapper/topo/TopoLineInfoDao.xml19
-rw-r--r--nezha-admin/src/main/resources/mapper/topo/TopoNodeInfoDao.xml25
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/common/componets.js967
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/common/nodeRel.js627
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/dashboard/dashboard.js1433
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/detect/addType.js1219
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/detect/deteSet.js548
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/detect/deteType.js149
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/detect/deteType2.js696
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/detect/deteWarn.js798
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/detect/main.js83
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/detect/metaMapping.js597
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/mission/filepush.js188
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/mission/mission.js500
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/mission/singleExec.js184
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/mission/upgradeBackup.js172
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/mission/upgradeExecOrStart.js239
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/mission/upgradeKillProcess.js123
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/mission/upgradeRecover.js169
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/mission/upgradeServer.js390
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/mission/upgradeUpdate.js189
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/node/nodeCabinet.js363
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/node/nodeGroup.js479
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/node/nodeInfo.js1627
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/node/nodeRoom.js310
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/node/roomTest.js570
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/sys/system.js300
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/sys/usergroup.js194
-rw-r--r--nezha-admin/src/main/resources/templates/modules/common/nodeRel.html125
-rw-r--r--nezha-admin/src/main/resources/templates/modules/common/template.html85
-rw-r--r--nezha-admin/src/main/resources/templates/modules/dashboard/index.html85
-rw-r--r--nezha-admin/src/main/resources/templates/modules/dashboard/setting.html414
-rw-r--r--nezha-admin/src/main/resources/templates/modules/detect/addTypeTemplate.html392
-rw-r--r--nezha-admin/src/main/resources/templates/modules/detect/deteSet.html219
-rw-r--r--nezha-admin/src/main/resources/templates/modules/detect/deteType.html41
-rw-r--r--nezha-admin/src/main/resources/templates/modules/detect/deteType2.html550
-rw-r--r--nezha-admin/src/main/resources/templates/modules/detect/deteWarn.html12
-rw-r--r--nezha-admin/src/main/resources/templates/modules/detect/main.html8
-rw-r--r--nezha-admin/src/main/resources/templates/modules/detect/metaMapping.html138
-rw-r--r--nezha-admin/src/main/resources/templates/modules/detect/warnTemplate.html214
-rw-r--r--nezha-admin/src/main/resources/templates/modules/mission/mission.html450
-rw-r--r--nezha-admin/src/main/resources/templates/modules/node/nodeCabinet.html152
-rw-r--r--nezha-admin/src/main/resources/templates/modules/node/nodeGroup.html255
-rw-r--r--nezha-admin/src/main/resources/templates/modules/node/nodeInfo.html546
-rw-r--r--nezha-admin/src/main/resources/templates/modules/node/nodeRoom.html162
-rw-r--r--nezha-admin/src/main/resources/templates/modules/node/roomTest.html299
-rw-r--r--nezha-admin/src/main/resources/templates/modules/sys/system.html81
-rw-r--r--nezha-admin/src/main/resources/templates/modules/sys/usergroup.html72
-rw-r--r--nezha-common/.project23
-rw-r--r--nezha-common/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--nezha-common/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--nezha-common/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--nezha-common/src/main/java/com/nis/common/utils/RCode.java262
-rw-r--r--nz-admin/.classpath (renamed from nezha-admin/.classpath)64
-rw-r--r--nz-admin/.settings/org.eclipse.core.resources.prefs (renamed from nezha-admin/.settings/org.eclipse.core.resources.prefs)0
-rw-r--r--nz-admin/.settings/org.eclipse.jdt.core.prefs (renamed from nezha-admin/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--nz-admin/.settings/org.eclipse.wst.common.project.facet.core.xml (renamed from nezha-admin/.settings/org.eclipse.wst.common.project.facet.core.xml)0
-rw-r--r--nz-admin/Dockerfile (renamed from nezha-admin/Dockerfile)0
-rw-r--r--nz-admin/db/mysql.sql (renamed from nezha-admin/db/mysql.sql)0
-rw-r--r--nz-admin/db/oracle.sql (renamed from nezha-admin/db/oracle.sql)0
-rw-r--r--nz-admin/db/postgresql.sql (renamed from nezha-admin/db/postgresql.sql)0
-rw-r--r--nz-admin/db/sqlserver.sql (renamed from nezha-admin/db/sqlserver.sql)0
-rw-r--r--nz-admin/pom.xml (renamed from nezha-admin/pom.xml)10
-rw-r--r--nz-admin/src/main/java/com/nis/AdminApplication.java (renamed from nezha-admin/src/main/java/com/nis/AdminApplication.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/annotation/DataFilter.java (renamed from nezha-admin/src/main/java/com/nis/common/annotation/DataFilter.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/annotation/SysLog.java (renamed from nezha-admin/src/main/java/com/nis/common/annotation/SysLog.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/aspect/DataFilterAspect.java (renamed from nezha-admin/src/main/java/com/nis/common/aspect/DataFilterAspect.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/aspect/SysLogAspect.java (renamed from nezha-admin/src/main/java/com/nis/common/aspect/SysLogAspect.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/config/FilterConfig.java (renamed from nezha-admin/src/main/java/com/nis/common/config/FilterConfig.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/config/FreemarkerConfig.java (renamed from nezha-admin/src/main/java/com/nis/common/config/FreemarkerConfig.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/config/I18nConfig.java (renamed from nezha-admin/src/main/java/com/nis/common/config/I18nConfig.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/config/KaptchaConfig.java (renamed from nezha-admin/src/main/java/com/nis/common/config/KaptchaConfig.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/config/LocaleConfig.java (renamed from nezha-admin/src/main/java/com/nis/common/config/LocaleConfig.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/config/MybatisPlusConfig.java (renamed from nezha-admin/src/main/java/com/nis/common/config/MybatisPlusConfig.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/config/ShiroConfig.java (renamed from nezha-admin/src/main/java/com/nis/common/config/ShiroConfig.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/config/SwaggerConfig.java (renamed from nezha-admin/src/main/java/com/nis/common/config/SwaggerConfig.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/config/WebConfig.java (renamed from nezha-admin/src/main/java/com/nis/common/config/WebConfig.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/exception/NZExceptionHandler.java (renamed from nezha-admin/src/main/java/com/nis/common/exception/NZExceptionHandler.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/utils/ConfigConstant.java (renamed from nezha-admin/src/main/java/com/nis/common/utils/ConfigConstant.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/utils/Constant.java (renamed from nezha-admin/src/main/java/com/nis/common/utils/Constant.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/utils/Query.java (renamed from nezha-admin/src/main/java/com/nis/common/utils/Query.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/utils/RedisKeys.java (renamed from nezha-admin/src/main/java/com/nis/common/utils/RedisKeys.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/validator/group/AliyunGroup.java (renamed from nezha-admin/src/main/java/com/nis/common/validator/group/AliyunGroup.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/validator/group/QcloudGroup.java (renamed from nezha-admin/src/main/java/com/nis/common/validator/group/QcloudGroup.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/common/validator/group/QiniuGroup.java (renamed from nezha-admin/src/main/java/com/nis/common/validator/group/QiniuGroup.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/config/ScheduleConfig.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/config/ScheduleConfig.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobController.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobController.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobLogController.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobLogController.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobDao.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobDao.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobLogDao.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobLogDao.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobEntity.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobLogEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobLogEntity.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/service/ScheduleJobLogService.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/service/ScheduleJobLogService.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/service/ScheduleJobService.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/service/ScheduleJobService.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobLogServiceImpl.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobLogServiceImpl.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobServiceImpl.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobServiceImpl.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/task/ITask.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/task/ITask.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/task/TestTask.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/task/TestTask.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/utils/ScheduleJob.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/utils/ScheduleJob.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/job/utils/ScheduleUtils.java (renamed from nezha-admin/src/main/java/com/nis/modules/job/utils/ScheduleUtils.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/controller/AbstractController.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/controller/AbstractController.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/controller/SysConfigController.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/controller/SysConfigController.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/controller/SysDictController.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/controller/SysDictController.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/controller/SysI18nController.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/controller/SysI18nController.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/controller/SysLogController.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/controller/SysLogController.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/controller/SysLoginController.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/controller/SysLoginController.java)64
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/controller/SysMenuController.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/controller/SysMenuController.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/controller/SysPageController.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/controller/SysPageController.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/controller/SysRoleController.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/controller/SysRoleController.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/controller/SysUserController.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/controller/SysUserController.java)9
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/dao/SysConfigDao.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/dao/SysConfigDao.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/dao/SysDictDao.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/dao/SysDictDao.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/dao/SysI18nDao.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/dao/SysI18nDao.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/dao/SysLogDao.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/dao/SysLogDao.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/dao/SysMenuDao.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/dao/SysMenuDao.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/dao/SysRoleDao.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/dao/SysRoleDao.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/dao/SysRoleMenuDao.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/dao/SysRoleMenuDao.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/dao/SysUserDao.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/dao/SysUserDao.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/dao/SysUserRoleDao.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/dao/SysUserRoleDao.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/entity/SysConfigEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/entity/SysConfigEntity.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/entity/SysDictEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/entity/SysDictEntity.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/entity/SysI18nEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/entity/SysI18nEntity.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/entity/SysLogEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/entity/SysLogEntity.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/entity/SysMenuEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/entity/SysMenuEntity.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/entity/SysRoleEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/entity/SysRoleEntity.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/entity/SysRoleMenuEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/entity/SysRoleMenuEntity.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/entity/SysUserEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/entity/SysUserEntity.java)17
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/entity/SysUserRoleEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/entity/SysUserRoleEntity.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/entity/SystemUsergroupEntity.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/entity/SystemUsergroupEntity.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/redis/SysConfigRedis.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/redis/SysConfigRedis.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/SysConfigService.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/SysConfigService.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/SysDictService.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/SysDictService.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/SysI18nService.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/SysI18nService.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/SysLogService.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/SysLogService.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/SysMenuService.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/SysMenuService.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/SysRoleMenuService.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/SysRoleMenuService.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/SysRoleService.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/SysRoleService.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/SysUserRoleService.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/SysUserRoleService.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/SysUserService.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/SysUserService.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysConfigServiceImpl.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysConfigServiceImpl.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysDictServiceImpl.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysDictServiceImpl.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysI18nServiceImpl.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysI18nServiceImpl.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysLogServiceImpl.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysLogServiceImpl.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysMenuServiceImpl.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysMenuServiceImpl.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleMenuServiceImpl.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleMenuServiceImpl.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleServiceImpl.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleServiceImpl.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserRoleServiceImpl.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserRoleServiceImpl.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserServiceImpl.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserServiceImpl.java)9
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/shiro/ShiroTag.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/shiro/ShiroTag.java)0
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/shiro/ShiroUtils.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/shiro/ShiroUtils.java)15
-rw-r--r--nz-admin/src/main/java/com/nis/modules/sys/shiro/UserRealm.java (renamed from nezha-admin/src/main/java/com/nis/modules/sys/shiro/UserRealm.java)0
-rw-r--r--nz-admin/src/main/resources/application-dev.yml (renamed from nezha-admin/src/main/resources/application-dev.yml)0
-rw-r--r--nz-admin/src/main/resources/application-prod.yml (renamed from nezha-admin/src/main/resources/application-prod.yml)0
-rw-r--r--nz-admin/src/main/resources/application-test.yml (renamed from nezha-admin/src/main/resources/application-test.yml)0
-rw-r--r--nz-admin/src/main/resources/application.properties (renamed from nezha-admin/src/main/resources/application.properties)0
-rw-r--r--nz-admin/src/main/resources/application.yml (renamed from nezha-admin/src/main/resources/application.yml)2
-rw-r--r--nz-admin/src/main/resources/banner.txt (renamed from nezha-admin/src/main/resources/banner.txt)0
-rw-r--r--nz-admin/src/main/resources/logback-spring.xml (renamed from nezha-admin/src/main/resources/logback-spring.xml)0
-rw-r--r--nz-admin/src/main/resources/mapper/job/ScheduleJobDao.xml (renamed from nezha-admin/src/main/resources/mapper/job/ScheduleJobDao.xml)0
-rw-r--r--nz-admin/src/main/resources/mapper/job/ScheduleJobLogDao.xml (renamed from nezha-admin/src/main/resources/mapper/job/ScheduleJobLogDao.xml)0
-rw-r--r--nz-admin/src/main/resources/mapper/sys/SysConfigDao.xml (renamed from nezha-admin/src/main/resources/mapper/sys/SysConfigDao.xml)0
-rw-r--r--nz-admin/src/main/resources/mapper/sys/SysDictDao.xml (renamed from nezha-admin/src/main/resources/mapper/sys/SysDictDao.xml)0
-rw-r--r--nz-admin/src/main/resources/mapper/sys/SysI18nDao.xml (renamed from nezha-admin/src/main/resources/mapper/sys/SysI18nDao.xml)0
-rw-r--r--nz-admin/src/main/resources/mapper/sys/SysLogDao.xml (renamed from nezha-admin/src/main/resources/mapper/sys/SysLogDao.xml)0
-rw-r--r--nz-admin/src/main/resources/mapper/sys/SysMenuDao.xml (renamed from nezha-admin/src/main/resources/mapper/sys/SysMenuDao.xml)0
-rw-r--r--nz-admin/src/main/resources/mapper/sys/SysRoleDao.xml (renamed from nezha-admin/src/main/resources/mapper/sys/SysRoleDao.xml)0
-rw-r--r--nz-admin/src/main/resources/mapper/sys/SysRoleMenuDao.xml (renamed from nezha-admin/src/main/resources/mapper/sys/SysRoleMenuDao.xml)0
-rw-r--r--nz-admin/src/main/resources/mapper/sys/SysUserDao.xml (renamed from nezha-admin/src/main/resources/mapper/sys/SysUserDao.xml)0
-rw-r--r--nz-admin/src/main/resources/mapper/sys/SysUserRoleDao.xml (renamed from nezha-admin/src/main/resources/mapper/sys/SysUserRoleDao.xml)0
-rw-r--r--nz-admin/src/main/resources/public/favicon.ico (renamed from nezha-admin/src/main/resources/public/favicon.ico)bin4286 -> 4286 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/css/print.css (renamed from nezha-admin/src/main/resources/public/swagger/css/print.css)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/css/reset.css (renamed from nezha-admin/src/main/resources/public/swagger/css/reset.css)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/css/screen.css (renamed from nezha-admin/src/main/resources/public/swagger/css/screen.css)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/css/style.css (renamed from nezha-admin/src/main/resources/public/swagger/css/style.css)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/css/typography.css (renamed from nezha-admin/src/main/resources/public/swagger/css/typography.css)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/fonts/DroidSans-Bold.ttf (renamed from nezha-admin/src/main/resources/public/swagger/fonts/DroidSans-Bold.ttf)bin42480 -> 42480 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/fonts/DroidSans.ttf (renamed from nezha-admin/src/main/resources/public/swagger/fonts/DroidSans.ttf)bin41028 -> 41028 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/images/collapse.gif (renamed from nezha-admin/src/main/resources/public/swagger/images/collapse.gif)bin69 -> 69 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/images/expand.gif (renamed from nezha-admin/src/main/resources/public/swagger/images/expand.gif)bin73 -> 73 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/images/explorer_icons.png (renamed from nezha-admin/src/main/resources/public/swagger/images/explorer_icons.png)bin5115 -> 5115 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/images/favicon-16x16.png (renamed from nezha-admin/src/main/resources/public/swagger/images/favicon-16x16.png)bin445 -> 445 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/images/favicon-32x32.png (renamed from nezha-admin/src/main/resources/public/swagger/images/favicon-32x32.png)bin1141 -> 1141 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/images/favicon.ico (renamed from nezha-admin/src/main/resources/public/swagger/images/favicon.ico)bin5430 -> 5430 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/images/logo_small.png (renamed from nezha-admin/src/main/resources/public/swagger/images/logo_small.png)bin455 -> 455 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/images/pet_store_api.png (renamed from nezha-admin/src/main/resources/public/swagger/images/pet_store_api.png)bin631 -> 631 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/images/throbber.gif (renamed from nezha-admin/src/main/resources/public/swagger/images/throbber.gif)bin9257 -> 9257 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/images/wordnik_api.png (renamed from nezha-admin/src/main/resources/public/swagger/images/wordnik_api.png)bin670 -> 670 bytes
-rw-r--r--nz-admin/src/main/resources/public/swagger/index.html (renamed from nezha-admin/src/main/resources/public/swagger/index.html)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/index.yaml (renamed from nezha-admin/src/main/resources/public/swagger/index.yaml)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lang/en.js (renamed from nezha-admin/src/main/resources/public/swagger/lang/en.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lang/translator.js (renamed from nezha-admin/src/main/resources/public/swagger/lang/translator.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lang/zh-cn.js (renamed from nezha-admin/src/main/resources/public/swagger/lang/zh-cn.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/backbone-min.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/backbone-min.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/es5-shim.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/es5-shim.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/handlebars-4.0.5.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/handlebars-4.0.5.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack_extended.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack_extended.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/jquery-1.8.0.min.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/jquery-1.8.0.min.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/jquery.ba-bbq.min.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/jquery.ba-bbq.min.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/jquery.slideto.min.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/jquery.slideto.min.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/jquery.wiggle.min.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/jquery.wiggle.min.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/js-yaml.min.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/js-yaml.min.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/jsoneditor.min.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/jsoneditor.min.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/lodash.min.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/lodash.min.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/marked.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/marked.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/object-assign-pollyfill.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/object-assign-pollyfill.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/sanitize-html.min.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/sanitize-html.min.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/lib/swagger-oauth.js (renamed from nezha-admin/src/main/resources/public/swagger/lib/swagger-oauth.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/o2c.html (renamed from nezha-admin/src/main/resources/public/swagger/o2c.html)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/swagger-ui.js (renamed from nezha-admin/src/main/resources/public/swagger/swagger-ui.js)0
-rw-r--r--nz-admin/src/main/resources/public/swagger/swagger-ui.min.js (renamed from nezha-admin/src/main/resources/public/swagger/swagger-ui.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/css/AdminLTE.min.css (renamed from nezha-admin/src/main/resources/statics/css/AdminLTE.min.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/addDetectType.css (renamed from nezha-admin/src/main/resources/statics/css/addDetectType.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/all-skins.min.css (renamed from nezha-admin/src/main/resources/statics/css/all-skins.min.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/bootstrap-table.min.css (renamed from nezha-admin/src/main/resources/statics/css/bootstrap-table.min.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/bootstrap.min.css (renamed from nezha-admin/src/main/resources/statics/css/bootstrap.min.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/dashboard.css (renamed from nezha-admin/src/main/resources/statics/css/dashboard.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/detect.css (renamed from nezha-admin/src/main/resources/statics/css/detect.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/font-awesome.min.css (renamed from nezha-admin/src/main/resources/statics/css/font-awesome.min.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/index.css (renamed from nezha-admin/src/main/resources/statics/css/index.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/index1.css (renamed from nezha-admin/src/main/resources/statics/css/index1.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/main.css (renamed from nezha-admin/src/main/resources/statics/css/main.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/mission.css (renamed from nezha-admin/src/main/resources/statics/css/mission.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/myfont.css (renamed from nezha-admin/src/main/resources/statics/css/myfont.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/nodeRel.css (renamed from nezha-admin/src/main/resources/statics/css/nodeRel.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/nodeRoom.css (renamed from nezha-admin/src/main/resources/statics/css/nodeRoom.css)0
-rw-r--r--nz-admin/src/main/resources/statics/css/nzNodeSelector.css (renamed from nezha-admin/src/main/resources/statics/css/nzNodeSelector.css)0
-rw-r--r--nz-admin/src/main/resources/statics/fonts/FontAwesome.otf (renamed from nezha-admin/src/main/resources/statics/fonts/FontAwesome.otf)bin134808 -> 134808 bytes
-rw-r--r--nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.eot (renamed from nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.eot)bin165742 -> 165742 bytes
-rw-r--r--nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.svg (renamed from nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.svg)0
-rw-r--r--nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.ttf (renamed from nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.ttf)bin165548 -> 165548 bytes
-rw-r--r--nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff (renamed from nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff)bin98024 -> 98024 bytes
-rw-r--r--nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff2 (renamed from nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff2)bin77160 -> 77160 bytes
-rw-r--r--nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.eot (renamed from nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.eot)bin20127 -> 20127 bytes
-rw-r--r--nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.svg (renamed from nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.svg)0
-rw-r--r--nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.ttf (renamed from nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.ttf)bin45404 -> 45404 bytes
-rw-r--r--nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff (renamed from nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff)bin23424 -> 23424 bytes
-rw-r--r--nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff2 (renamed from nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff2)bin18028 -> 18028 bytes
-rw-r--r--nz-admin/src/main/resources/statics/fonts/myfont/fonts.svg (renamed from nezha-admin/src/main/resources/statics/fonts/myfont/fonts.svg)0
-rw-r--r--nz-admin/src/main/resources/statics/fonts/myfont/fonts.ttf (renamed from nezha-admin/src/main/resources/statics/fonts/myfont/fonts.ttf)bin1724 -> 1724 bytes
-rw-r--r--nz-admin/src/main/resources/statics/fonts/myfont/fonts.woff (renamed from nezha-admin/src/main/resources/statics/fonts/myfont/fonts.woff)bin1800 -> 1800 bytes
-rw-r--r--nz-admin/src/main/resources/statics/images/chart-active.png (renamed from nezha-admin/src/main/resources/statics/images/chart-active.png)bin4784 -> 4784 bytes
-rw-r--r--nz-admin/src/main/resources/statics/images/chart.png (renamed from nezha-admin/src/main/resources/statics/images/chart.png)bin3503 -> 3503 bytes
-rw-r--r--nz-admin/src/main/resources/statics/images/query-active.png (renamed from nezha-admin/src/main/resources/statics/images/query-active.png)bin5137 -> 5137 bytes
-rw-r--r--nz-admin/src/main/resources/statics/images/query.png (renamed from nezha-admin/src/main/resources/statics/images/query.png)bin4295 -> 4295 bytes
-rw-r--r--nz-admin/src/main/resources/statics/images/set-active.png (renamed from nezha-admin/src/main/resources/statics/images/set-active.png)bin5795 -> 5795 bytes
-rw-r--r--nz-admin/src/main/resources/statics/images/set.png (renamed from nezha-admin/src/main/resources/statics/images/set.png)bin4682 -> 4682 bytes
-rw-r--r--nz-admin/src/main/resources/statics/js/common.js (renamed from nezha-admin/src/main/resources/statics/js/common.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/index1.js (renamed from nezha-admin/src/main/resources/statics/js/index1.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/modules/job/schedule.js (renamed from nezha-admin/src/main/resources/statics/js/modules/job/schedule.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/modules/job/schedule_log.js (renamed from nezha-admin/src/main/resources/statics/js/modules/job/schedule_log.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/modules/sys/config.js (renamed from nezha-admin/src/main/resources/statics/js/modules/sys/config.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/modules/sys/dict.js (renamed from nezha-admin/src/main/resources/statics/js/modules/sys/dict.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/modules/sys/log.js (renamed from nezha-admin/src/main/resources/statics/js/modules/sys/log.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/modules/sys/menu.js (renamed from nezha-admin/src/main/resources/statics/js/modules/sys/menu.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/modules/sys/role.js (renamed from nezha-admin/src/main/resources/statics/js/modules/sys/role.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/modules/sys/system.js (renamed from nezha-admin/src/main/resources/statics/js/modules/sys/system.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/modules/sys/user.js (renamed from nezha-admin/src/main/resources/statics/js/modules/sys/user.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/modules/sys/usergroup.js (renamed from nezha-admin/src/main/resources/statics/js/modules/sys/usergroup.js)0
-rw-r--r--nz-admin/src/main/resources/statics/js/navtab.js (renamed from nezha-admin/src/main/resources/statics/js/navtab.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/ajaxupload.js (renamed from nezha-admin/src/main/resources/statics/libs/ajaxupload.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/app.js (renamed from nezha-admin/src/main/resources/statics/libs/app.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/app.min.js (renamed from nezha-admin/src/main/resources/statics/libs/app.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/axios.min.js (renamed from nezha-admin/src/main/resources/statics/libs/axios.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/bootstrap-table.min.js (renamed from nezha-admin/src/main/resources/statics/libs/bootstrap-table.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/bootstrap.min.js (renamed from nezha-admin/src/main/resources/statics/libs/bootstrap.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/fastclick.min.js (renamed from nezha-admin/src/main/resources/statics/libs/fastclick.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/jquery.min.js (renamed from nezha-admin/src/main/resources/statics/libs/jquery.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/jquery.slimscroll.min.js (renamed from nezha-admin/src/main/resources/statics/libs/jquery.slimscroll.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/lodash.min.js (renamed from nezha-admin/src/main/resources/statics/libs/lodash.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/router.js (renamed from nezha-admin/src/main/resources/statics/libs/router.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/validator.js (renamed from nezha-admin/src/main/resources/statics/libs/validator.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/validators.min.js (renamed from nezha-admin/src/main/resources/statics/libs/validators.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/vue-easytable.css (renamed from nezha-admin/src/main/resources/statics/libs/vue-easytable.css)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/vue-easytable.js (renamed from nezha-admin/src/main/resources/statics/libs/vue-easytable.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/vue-multiselect.min.css (renamed from nezha-admin/src/main/resources/statics/libs/vue-multiselect.min.css)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/vue-multiselect.min.js (renamed from nezha-admin/src/main/resources/statics/libs/vue-multiselect.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/vue-validator.min.js (renamed from nezha-admin/src/main/resources/statics/libs/vue-validator.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/vue.js (renamed from nezha-admin/src/main/resources/statics/libs/vue.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/vue.min.js (renamed from nezha-admin/src/main/resources/statics/libs/vue.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/vue.upper.js (renamed from nezha-admin/src/main/resources/statics/libs/vue.upper.js)0
-rw-r--r--nz-admin/src/main/resources/statics/libs/vuelidate.min.js (renamed from nezha-admin/src/main/resources/statics/libs/vuelidate.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/WdatePicker.js (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/WdatePicker.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/calendar.js (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/calendar.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-cn.js (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-cn.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-tw.js (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-tw.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/readme.txt (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/readme.txt)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/default/datepicker.css (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/default/datepicker.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/twoer/datepicker.css (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/twoer/datepicker.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/whyGreen/datepicker.css (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/whyGreen/datepicker.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/css/base.css (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/css/base.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/index.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/index.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.1.asp.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.1.asp.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.2.asp.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.2.asp.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.3.asp.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.3.asp.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.4.asp.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.4.asp.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp-.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp-.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.6.asp.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.6.asp.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/3.asp.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/3.asp.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp-.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp-.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo.css (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe2.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe2.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/left.htm (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/left.htm)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/main.asp (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/main.asp)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic1.jpg (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic1.jpg)bin10075 -> 10075 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic2.jpg (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic2.jpg)bin10375 -> 10375 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic3.jpg (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic3.jpg)bin10085 -> 10085 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-body.gif (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-body.gif)bin61 -> 61 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-bottom.gif (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-bottom.gif)bin135 -> 135 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-top.gif (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-top.gif)bin915 -> 915 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/body.jpg (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/body.jpg)bin396 -> 396 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/footer.jpg (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/footer.jpg)bin2537 -> 2537 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/lang/en.js (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/lang/en.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-cn.js (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-cn.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-tw.js (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-tw.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/WdatePicker.css (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/WdatePicker.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/datePicker.gif (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/datePicker.gif)bin1030 -> 1030 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/datepicker.css (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/datepicker.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/img.gif (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/img.gif)bin1578 -> 1578 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/datepicker.css (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/datepicker.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.gif (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.gif)bin475 -> 475 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.png (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.png)bin49301 -> 49301 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/bg.jpg (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/bg.jpg)bin307 -> 307 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/datepicker.css (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/datepicker.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/img.gif (renamed from nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/img.gif)bin1679 -> 1679 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.css (renamed from nezha-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.js (renamed from nezha-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/daterangepicker/moment.min.js (renamed from nezha-admin/src/main/resources/statics/plugins/daterangepicker/moment.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/echarts/echarts.min.js (renamed from nezha-admin/src/main/resources/statics/plugins/echarts/echarts.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ar.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ar.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-bg.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-bg.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ca.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ca.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-cs.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-cs.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-de.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-de.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-dk.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-dk.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-el.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-el.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-en.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-en.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-es.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-es.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fa.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fa.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fi.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fi.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fr.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fr.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-gl.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-gl.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-he.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-he.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hr.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hr.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hu.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hu.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-id.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-id.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-is.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-is.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-it.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-it.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ja.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ja.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-kr.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-kr.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-lt.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-lt.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-me.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-me.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-nl.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-nl.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-no.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-no.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pl.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pl.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt-br.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt-br.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ro.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ro.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ru.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ru.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sk.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sk.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sq.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sq.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr-latin.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr-latin.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sv.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sv.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-th.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-th.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tr.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tr.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tw.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tw.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ua.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ua.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-uk.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-uk.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-vi.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-vi.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-zh.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-zh.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/jquery.jqGrid.min.js (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/jquery.jqGrid.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap-ui.css (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap-ui.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap.css (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid.css (renamed from nezha-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.css (renamed from nezha-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.js (renamed from nezha-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layer/layer.js (renamed from nezha-admin/src/main/resources/statics/plugins/layer/layer.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layer/mobile/layer.js (renamed from nezha-admin/src/main/resources/statics/plugins/layer/mobile/layer.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layer/mobile/need/layer.css (renamed from nezha-admin/src/main/resources/statics/plugins/layer/mobile/need/layer.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layer/skin/default/icon-ext.png (renamed from nezha-admin/src/main/resources/statics/plugins/layer/skin/default/icon-ext.png)bin5911 -> 5911 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layer/skin/default/icon.png (renamed from nezha-admin/src/main/resources/statics/plugins/layer/skin/default/icon.png)bin11493 -> 11493 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layer/skin/default/layer.css (renamed from nezha-admin/src/main/resources/statics/plugins/layer/skin/default/layer.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layer/skin/default/loading-0.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layer/skin/default/loading-0.gif)bin5793 -> 5793 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layer/skin/default/loading-1.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layer/skin/default/loading-1.gif)bin701 -> 701 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layer/skin/default/loading-2.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layer/skin/default/loading-2.gif)bin1787 -> 1787 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layer/skin/moon/default.png (renamed from nezha-admin/src/main/resources/statics/plugins/layer/skin/moon/default.png)bin7563 -> 7563 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layer/skin/moon/style.css (renamed from nezha-admin/src/main/resources/statics/plugins/layer/skin/moon/style.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/layui.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/layui.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/code.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/code.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/_all.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/_all.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.png)bin1520 -> 1520 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected])bin3218 -> 3218 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.png)bin1518 -> 1518 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected])bin3217 -> 3217 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.png)bin1515 -> 1515 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected])bin3217 -> 3217 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.png)bin1444 -> 1444 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected])bin3117 -> 3117 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.png)bin1516 -> 1516 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected])bin3217 -> 3217 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.png)bin1518 -> 1518 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected])bin3275 -> 3275 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.png)bin1522 -> 1522 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected])bin3218 -> 3218 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.png)bin1519 -> 1519 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected])bin3218 -> 3218 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.png)bin1516 -> 1516 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected])bin3276 -> 3276 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.png)bin1516 -> 1516 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected])bin3216 -> 3216 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.png)bin1734 -> 1734 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/[email protected])bin3446 -> 3446 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/icheck.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/icheck.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/_all.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/_all.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/aero.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/aero.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/blue.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/blue.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/green.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/green.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/grey.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/grey.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.png)bin588 -> 588 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/[email protected])bin1073 -> 1073 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/orange.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/orange.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/pink.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/pink.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/purple.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/purple.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/red.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/red.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/yellow.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/yellow.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/_all.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/_all.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.png)bin1151 -> 1151 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected])bin1409 -> 1409 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.png)bin1132 -> 1132 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected])bin1410 -> 1410 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.png)bin1143 -> 1143 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected])bin1408 -> 1408 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.png)bin1142 -> 1142 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected])bin1407 -> 1407 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.png)bin1114 -> 1114 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected])bin1410 -> 1410 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.png)bin1139 -> 1139 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected])bin1407 -> 1407 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.png)bin1150 -> 1150 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected])bin1409 -> 1409 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.png)bin1132 -> 1132 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected])bin1409 -> 1409 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.png)bin1130 -> 1130 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected])bin1410 -> 1410 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.png)bin1135 -> 1135 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected])bin1406 -> 1406 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.png)bin6401 -> 6401 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/[email protected])bin16760 -> 16760 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/_all.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/_all.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.png)bin2167 -> 2167 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected])bin4455 -> 4455 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.png)bin2185 -> 2185 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected])bin4485 -> 4485 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.png)bin2193 -> 2193 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected])bin4498 -> 4498 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.png)bin2186 -> 2186 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected])bin4483 -> 4483 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.png)bin2181 -> 2181 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected])bin4474 -> 4474 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.png)bin2189 -> 2189 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected])bin4479 -> 4479 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.png)bin2188 -> 2188 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected])bin4501 -> 4501 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.png)bin2190 -> 2190 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected])bin4490 -> 4490 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.png)bin2175 -> 2175 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected])bin4478 -> 4478 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.png)bin2131 -> 2131 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected])bin4385 -> 4385 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/icon.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/icon.png)bin314 -> 314 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/laydate.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/laydate.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon-ext.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon-ext.png)bin5911 -> 5911 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon.png (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon.png)bin11493 -> 11493 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/layer.css (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/layer.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-0.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-0.gif)bin5793 -> 5793 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-1.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-1.gif)bin701 -> 701 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-2.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-2.gif)bin1787 -> 1787 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.eot (renamed from nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.eot)bin51906 -> 51906 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.svg (renamed from nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.svg)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.ttf (renamed from nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.ttf)bin51620 -> 51620 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.woff (renamed from nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.woff)bin27904 -> 27904 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/0.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/0.gif)bin2689 -> 2689 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/1.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/1.gif)bin5514 -> 5514 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/10.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/10.gif)bin2797 -> 2797 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/11.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/11.gif)bin4121 -> 4121 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/12.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/12.gif)bin3361 -> 3361 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/13.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/13.gif)bin7425 -> 7425 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/14.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/14.gif)bin2375 -> 2375 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/15.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/15.gif)bin1793 -> 1793 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/16.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/16.gif)bin6721 -> 6721 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/17.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/17.gif)bin4439 -> 4439 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/18.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/18.gif)bin3017 -> 3017 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/19.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/19.gif)bin3040 -> 3040 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/2.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/2.gif)bin3222 -> 3222 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/20.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/20.gif)bin5144 -> 5144 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/21.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/21.gif)bin5191 -> 5191 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/22.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/22.gif)bin9823 -> 9823 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/23.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/23.gif)bin3792 -> 3792 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/24.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/24.gif)bin8096 -> 8096 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/25.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/25.gif)bin3127 -> 3127 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/26.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/26.gif)bin3291 -> 3291 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/27.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/27.gif)bin4377 -> 4377 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/28.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/28.gif)bin2793 -> 2793 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/29.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/29.gif)bin4854 -> 4854 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/3.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/3.gif)bin4017 -> 4017 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/30.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/30.gif)bin2555 -> 2555 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/31.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/31.gif)bin2002 -> 2002 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/32.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/32.gif)bin3481 -> 3481 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/33.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/33.gif)bin2454 -> 2454 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/34.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/34.gif)bin3700 -> 3700 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/35.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/35.gif)bin1800 -> 1800 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/36.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/36.gif)bin2331 -> 2331 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/37.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/37.gif)bin1513 -> 1513 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/38.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/38.gif)bin3615 -> 3615 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/39.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/39.gif)bin6495 -> 6495 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/4.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/4.gif)bin5689 -> 5689 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/40.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/40.gif)bin3154 -> 3154 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/41.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/41.gif)bin3644 -> 3644 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/42.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/42.gif)bin5305 -> 5305 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/43.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/43.gif)bin2674 -> 2674 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/44.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/44.gif)bin4126 -> 4126 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/45.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/45.gif)bin3417 -> 3417 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/46.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/46.gif)bin3007 -> 3007 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/47.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/47.gif)bin2333 -> 2333 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/48.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/48.gif)bin2689 -> 2689 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/49.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/49.gif)bin2315 -> 2315 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/5.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/5.gif)bin4567 -> 4567 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/50.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/50.gif)bin5866 -> 5866 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/51.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/51.gif)bin2785 -> 2785 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/52.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/52.gif)bin777 -> 777 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/53.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/53.gif)bin2127 -> 2127 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/54.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/54.gif)bin2196 -> 2196 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/55.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/55.gif)bin1971 -> 1971 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/56.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/56.gif)bin2034 -> 2034 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/57.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/57.gif)bin2705 -> 2705 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/58.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/58.gif)bin2258 -> 2258 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/59.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/59.gif)bin10311 -> 10311 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/6.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/6.gif)bin2213 -> 2213 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/60.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/60.gif)bin3245 -> 3245 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/61.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/61.gif)bin2495 -> 2495 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/62.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/62.gif)bin2017 -> 2017 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/63.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/63.gif)bin5871 -> 5871 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/64.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/64.gif)bin6448 -> 6448 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/65.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/65.gif)bin3576 -> 3576 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/66.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/66.gif)bin3029 -> 3029 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/67.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/67.gif)bin2701 -> 2701 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/68.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/68.gif)bin1424 -> 1424 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/69.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/69.gif)bin2431 -> 2431 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/7.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/7.gif)bin3398 -> 3398 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/70.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/70.gif)bin4590 -> 4590 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/71.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/71.gif)bin5304 -> 5304 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/8.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/8.gif)bin4050 -> 4050 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/images/face/9.gif (renamed from nezha-admin/src/main/resources/statics/plugins/layui/images/face/9.gif)bin4221 -> 4221 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.all.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.all.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.mod.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.mod.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/lib/jquery.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/lib/jquery.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/code.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/code.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/element.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/element.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/flow.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/flow.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/form.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/form.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/laydate.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/laydate.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/layedit.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/layedit.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/layer.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/layer.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/laypage.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/laypage.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/laytpl.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/laytpl.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/tree.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/tree.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/upload.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/upload.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/lay/modules/util.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/util.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/layui.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/layui.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/modules/icheck.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/modules/icheck.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/layui/modules/pjax.js (renamed from nezha-admin/src/main/resources/statics/plugins/layui/modules/pjax.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.css (renamed from nezha-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.js (renamed from nezha-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.png (renamed from nezha-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.png)bin30304 -> 30304 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/pagination/pagination.css (renamed from nezha-admin/src/main/resources/statics/plugins/pagination/pagination.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/pagination/pagination.js (renamed from nezha-admin/src/main/resources/statics/plugins/pagination/pagination.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.css (renamed from nezha-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.js (renamed from nezha-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.css (renamed from nezha-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.js (renamed from nezha-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/treegrid/img/collapse.png (renamed from nezha-admin/src/main/resources/statics/plugins/treegrid/img/collapse.png)bin2886 -> 2886 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/treegrid/img/expand.png (renamed from nezha-admin/src/main/resources/statics/plugins/treegrid/img/expand.png)bin2894 -> 2894 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/treegrid/img/file.png (renamed from nezha-admin/src/main/resources/statics/plugins/treegrid/img/file.png)bin342 -> 342 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/treegrid/img/folder.png (renamed from nezha-admin/src/main/resources/statics/plugins/treegrid/img/folder.png)bin537 -> 537 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js (renamed from nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.css (renamed from nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.extension.js (renamed from nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.extension.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.min.js (renamed from nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.min.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/treegrid/tree.table.js (renamed from nezha-admin/src/main/resources/statics/plugins/treegrid/tree.table.js)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.css (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.less (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.less)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/fa.less (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/fa.less)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/img/loading.gif (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/img/loading.gif)bin381 -> 381 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/line_conn.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/line_conn.png)bin933 -> 933 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/loading.gif (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/loading.gif)bin381 -> 381 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.gif (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.gif)bin4679 -> 4679 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.png)bin5283 -> 5283 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/metroStyle.css (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/metroStyle.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_close.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_close.png)bin601 -> 601 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_open.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_open.png)bin580 -> 580 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/2.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/2.png)bin570 -> 570 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/3.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/3.png)bin762 -> 762 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/4.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/4.png)bin399 -> 399 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/5.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/5.png)bin710 -> 710 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/6.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/6.png)bin432 -> 432 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/7.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/7.png)bin534 -> 534 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/8.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/8.png)bin529 -> 529 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/9.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/9.png)bin467 -> 467 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/line_conn.gif (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/line_conn.gif)bin45 -> 45 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/loading.gif (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/loading.gif)bin381 -> 381 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.gif (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.gif)bin5564 -> 5564 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.png (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.png)bin11173 -> 11173 bytes
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/zTreeStyle.css (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/zTreeStyle.css)0
-rw-r--r--nz-admin/src/main/resources/statics/plugins/ztree/jquery.ztree.all.min.js (renamed from nezha-admin/src/main/resources/statics/plugins/ztree/jquery.ztree.all.min.js)0
-rw-r--r--nz-admin/src/main/resources/templates/404.html (renamed from nezha-admin/src/main/resources/templates/404.html)0
-rw-r--r--nz-admin/src/main/resources/templates/header.html (renamed from nezha-admin/src/main/resources/templates/header.html)0
-rw-r--r--nz-admin/src/main/resources/templates/index.html (renamed from nezha-admin/src/main/resources/templates/index.html)7
-rw-r--r--nz-admin/src/main/resources/templates/index1.html (renamed from nezha-admin/src/main/resources/templates/index1.html)0
-rw-r--r--nz-admin/src/main/resources/templates/js/index.js (renamed from nezha-admin/src/main/resources/templates/js/index.js)30
-rw-r--r--nz-admin/src/main/resources/templates/js/modules/sys/i18n.js (renamed from nezha-admin/src/main/resources/templates/js/modules/sys/i18n.js)0
-rw-r--r--nz-admin/src/main/resources/templates/js/modules/sys/icon.js (renamed from nezha-admin/src/main/resources/templates/js/modules/sys/icon.js)0
-rw-r--r--nz-admin/src/main/resources/templates/js/modules/sys/menu.js (renamed from nezha-admin/src/main/resources/templates/js/modules/sys/menu.js)0
-rw-r--r--nz-admin/src/main/resources/templates/js/modules/sys/user.js (renamed from nezha-admin/src/main/resources/templates/js/modules/sys/user.js)12
-rw-r--r--nz-admin/src/main/resources/templates/login.html (renamed from nezha-admin/src/main/resources/templates/login.html)57
-rw-r--r--nz-admin/src/main/resources/templates/main.html (renamed from nezha-admin/src/main/resources/templates/main.html)0
-rw-r--r--nz-admin/src/main/resources/templates/modules/job/schedule.html (renamed from nezha-admin/src/main/resources/templates/modules/job/schedule.html)0
-rw-r--r--nz-admin/src/main/resources/templates/modules/job/schedule_log.html (renamed from nezha-admin/src/main/resources/templates/modules/job/schedule_log.html)0
-rw-r--r--nz-admin/src/main/resources/templates/modules/sys/config.html (renamed from nezha-admin/src/main/resources/templates/modules/sys/config.html)0
-rw-r--r--nz-admin/src/main/resources/templates/modules/sys/dict.html (renamed from nezha-admin/src/main/resources/templates/modules/sys/dict.html)0
-rw-r--r--nz-admin/src/main/resources/templates/modules/sys/i18n.html (renamed from nezha-admin/src/main/resources/templates/modules/sys/i18n.html)0
-rw-r--r--nz-admin/src/main/resources/templates/modules/sys/icons.html (renamed from nezha-admin/src/main/resources/templates/modules/sys/icons.html)0
-rw-r--r--nz-admin/src/main/resources/templates/modules/sys/log.html (renamed from nezha-admin/src/main/resources/templates/modules/sys/log.html)0
-rw-r--r--nz-admin/src/main/resources/templates/modules/sys/menu.html (renamed from nezha-admin/src/main/resources/templates/modules/sys/menu.html)0
-rw-r--r--nz-admin/src/main/resources/templates/modules/sys/role.html (renamed from nezha-admin/src/main/resources/templates/modules/sys/role.html)0
-rw-r--r--nz-admin/src/main/resources/templates/modules/sys/user.html (renamed from nezha-admin/src/main/resources/templates/modules/sys/user.html)11
-rw-r--r--nz-admin/src/main/resources/templates/spring.ftl (renamed from nezha-admin/src/main/resources/templates/spring.ftl)0
-rw-r--r--nz-admin/src/test/java/com/nis/RedisTest.java (renamed from nezha-admin/src/test/java/com/nis/RedisTest.java)0
-rw-r--r--nz-common/.classpath (renamed from nezha-common/.classpath)0
-rw-r--r--nz-common/pom.xml (renamed from nezha-common/pom.xml)6
-rw-r--r--nz-common/src/main/java/com/nis/common/aspect/RedisAspect.java (renamed from nezha-common/src/main/java/com/nis/common/aspect/RedisAspect.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/config/RedisConfig.java (renamed from nezha-common/src/main/java/com/nis/common/config/RedisConfig.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/exception/NZException.java (renamed from nezha-common/src/main/java/com/nis/common/exception/NZException.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/Test.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/Test.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ValidateCache.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateCache.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ValidateHandler.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateHandler.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ValidateProcess.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateProcess.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ValidateUtils.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateUtils.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/Chinese.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Chinese.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/Date.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Date.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/Email.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Email.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/English.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/English.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/IP.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/IP.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/IdCard.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/IdCard.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/Max.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Max.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/MaxLength.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/MaxLength.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/Min.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Min.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/MinLength.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/MinLength.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/NotNull.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/NotNull.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/Phone.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Phone.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/ann/Regex.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Regex.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/utils/CharUtil.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/utils/CharUtil.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/utils/CommonUtil.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/utils/CommonUtil.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/utils/ReflectUtils.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/utils/ReflectUtils.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/smartvalidate/utils/RegexUtil.java (renamed from nezha-common/src/main/java/com/nis/common/smartvalidate/utils/RegexUtil.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/DateUtils.java (renamed from nezha-common/src/main/java/com/nis/common/utils/DateUtils.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/HttpContextUtils.java (renamed from nezha-common/src/main/java/com/nis/common/utils/HttpContextUtils.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/IPUtils.java (renamed from nezha-common/src/main/java/com/nis/common/utils/IPUtils.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/PageUtils.java (renamed from nezha-common/src/main/java/com/nis/common/utils/PageUtils.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/R.java (renamed from nezha-common/src/main/java/com/nis/common/utils/R.java)15
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/RCode.java57
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/RedisUtils.java (renamed from nezha-common/src/main/java/com/nis/common/utils/RedisUtils.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/SQLUtils.java (renamed from nezha-common/src/main/java/com/nis/common/utils/SQLUtils.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/SpringContextUtils.java (renamed from nezha-common/src/main/java/com/nis/common/utils/SpringContextUtils.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/SqlHelper/KeywordsType.java (renamed from nezha-common/src/main/java/com/nis/common/utils/SqlHelper/KeywordsType.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/SqlHelper/MysqlHelper.java (renamed from nezha-common/src/main/java/com/nis/common/utils/SqlHelper/MysqlHelper.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/SqlHelper/OracleHelper.java (renamed from nezha-common/src/main/java/com/nis/common/utils/SqlHelper/OracleHelper.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/utils/SqlHelper/PostgresqlHelper.java (renamed from nezha-common/src/main/java/com/nis/common/utils/SqlHelper/PostgresqlHelper.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/validator/Assert.java (renamed from nezha-common/src/main/java/com/nis/common/validator/Assert.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/validator/ValidatorUtils.java (renamed from nezha-common/src/main/java/com/nis/common/validator/ValidatorUtils.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/validator/group/AddGroup.java (renamed from nezha-common/src/main/java/com/nis/common/validator/group/AddGroup.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/validator/group/Group.java (renamed from nezha-common/src/main/java/com/nis/common/validator/group/Group.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/validator/group/UpdateGroup.java (renamed from nezha-common/src/main/java/com/nis/common/validator/group/UpdateGroup.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/xss/HTMLFilter.java (renamed from nezha-common/src/main/java/com/nis/common/xss/HTMLFilter.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/xss/SQLFilter.java (renamed from nezha-common/src/main/java/com/nis/common/xss/SQLFilter.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/xss/XssFilter.java (renamed from nezha-common/src/main/java/com/nis/common/xss/XssFilter.java)0
-rw-r--r--nz-common/src/main/java/com/nis/common/xss/XssHttpServletRequestWrapper.java (renamed from nezha-common/src/main/java/com/nis/common/xss/XssHttpServletRequestWrapper.java)0
-rw-r--r--pom.xml8
900 files changed, 126 insertions, 33508 deletions
diff --git a/.project b/.project
index 98255acd..9c077d12 100644
--- a/.project
+++ b/.project
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>nezha-web</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>nz-web</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/docker-compose.yml b/docker-compose.yml
index 1e432261..5694097c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,7 +1,7 @@
version: '2'
services:
- nezha-admin:
- image: nezha/admin
+ nz-admin:
+ image: nz/admin
ports:
- "8080:8080"
environment:
diff --git a/nezha-admin/.project b/nezha-admin/.project
deleted file mode 100644
index 57c84c58..00000000
--- a/nezha-admin/.project
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>nezha-admin</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/nezha-admin/src/main/java/com/nis/common/aspect/SystemIdAspect.java b/nezha-admin/src/main/java/com/nis/common/aspect/SystemIdAspect.java
deleted file mode 100644
index 70a8ef52..00000000
--- a/nezha-admin/src/main/java/com/nis/common/aspect/SystemIdAspect.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.nis.common.aspect;
-
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.aspectj.lang.annotation.Around;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Pointcut;
-import org.springframework.stereotype.Component;
-
-import com.nis.modules.sys.entity.SysUserEntity;
-import com.nis.modules.sys.shiro.ShiroUtils;
-
-@Aspect
-@Component
-public class SystemIdAspect {
-
- @Pointcut("execution(* com.nis.modules.*.controller.*.*(..)) && !execution(* com.nis.modules.sys.controller.SysLoginController.*(..)) && !execution(* *login(..))")
- public void systemIdCheck(){}
-
- /**
- * 对没有业务系统的请求进行登出处理
- *
- * @param point
- * @return
- * @throws Throwable
- */
- @Around("systemIdCheck()")
- public Object check(ProceedingJoinPoint point) throws Throwable {
- SysUserEntity user = ShiroUtils.getUserEntity();
- if (user != null && (user.getCurrSystem() == null || user.getCurrSystem().getId() < 1l)) {
- ShiroUtils.logout();
- }
- Object result = point.proceed();
- return result;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/controller/DashboardController.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/controller/DashboardController.java
deleted file mode 100644
index d614ff7e..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/controller/DashboardController.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package com.nis.modules.dashboard.controller;
-
-import java.util.List;
-
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PatchMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.dashboard.entity.ChartEntity;
-import com.nis.modules.dashboard.entity.ChartSeriesEntity;
-import com.nis.modules.dashboard.entity.DashboardEntity;
-import com.nis.modules.dashboard.service.DashboardService;
-import com.nis.modules.sys.controller.AbstractController;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
-@Controller
-@Api(tags="仪表盘相关")
-@RequestMapping("/dashboard")
-public class DashboardController extends AbstractController {
- @Autowired
- private DashboardService dashboardService;
-
- @GetMapping("/list")
- @ResponseBody
- @ApiOperation(httpMethod="GET",value="查询所有仪表盘信息", notes="暂无任何条件")
- public R list() {
- List<DashboardEntity> dashboards = dashboardService.queryAllDashboards();
- return R.ok().put("data", dashboards);
- }
-
- @GetMapping("/querySingleDashboard")
- @ResponseBody
- @ApiOperation(httpMethod="GET",value="查询单个仪表盘信息", notes="id")
- public R querySingleDashboard(@RequestParam Long id) {
- DashboardEntity dashboard = dashboardService.queryDashboardById(id);
- return R.ok().put("data", dashboard);
- }
-
- @DeleteMapping("/delete")
- @ApiImplicitParam(name = "id", value = "id值", required = false, dataType = "long", defaultValue="")
- @ApiOperation(httpMethod="DELETE",value="删除仪表盘信息", notes="仪表盘ID")
- @RequiresPermissions("dashboard:dashboard:delete")
- @ResponseBody
- public R delete(@RequestParam Long id) {
- ValidateUtils.is(id).notNull(RCode.DASHBOARD_ID_NULL);
- dashboardService.removeDashboardById(id);
- return R.ok();
- }
-
- @PostMapping("/save")
- @ApiOperation(httpMethod="POST",value="新增仪表盘信息", notes="仪表盘各项属性")
- @RequiresPermissions("dashboard:dashboard:insert")
- @ResponseBody
- public R save(@RequestBody DashboardEntity dashboard) {
- // 验证用户传参数 是否能生成有效图形
- ValidateUtils.is(dashboard.getName()).notNull(RCode.DASHBOARD_NAME_NULL);
- dashboardService.validateDashboardData(dashboard);
- dashboardService.addDashboard(dashboard);
- return R.ok();
- }
-
- @PutMapping("/update")
- @ApiOperation(httpMethod="PUT",value="修改仪表盘信息", notes="仪表盘各项属性")
- @RequiresPermissions("dashboard:dashboard:update")
- @ResponseBody
- public R update(@RequestBody DashboardEntity dashboard) {
- ValidateUtils.is(dashboard.getId()).notNull(RCode.DASHBOARD_ID_NULL);
- // 验证用户传参数 是否能生成有效图形
- dashboardService.validateDashboardData(dashboard);
- dashboardService.modifyDashboard(dashboard);
- return R.ok();
- }
-
- @PutMapping("/modifyShape")
- @ApiOperation(httpMethod="PUT",value="修改仪表盘位置大小信息", notes="仪表盘各项属性")
- @RequiresPermissions("dashboard:dashboard:update")
- @ResponseBody
- public R modifyShape(@RequestBody List<DashboardEntity> dashboards) {
- for(DashboardEntity dashboard:dashboards) {
- ValidateUtils.is(dashboard.getId()).notNull(RCode.DASHBOARD_ID_NULL);
- ValidateUtils.is(dashboard.getX()).notNull(RCode.DASHBOARD_X_NULL);
- ValidateUtils.is(dashboard.getY()).notNull(RCode.DASHBOARD_Y_NULL);
- ValidateUtils.is(dashboard.getHeight()).notNull(RCode.DASHBOARD_HEIGHT_NULL);
- ValidateUtils.is(dashboard.getWidth()).notNull(RCode.DASHBOARD_WIDTH_NULL);
- }
- dashboardService.modifyDashboards(dashboards);
- return R.ok();
- }
-
- @GetMapping("/queryData")
- @ResponseBody
- @ApiOperation(httpMethod="GET",value="根据用户sql查询信息", notes="仪表盘属性")
- public R queryData(String sql,String timeFormat,Integer chartType) {
- List<ChartSeriesEntity> queryDatas = dashboardService.queryData(sql,timeFormat,chartType);
- return R.ok().put("result", queryDatas);
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/dao/DashboardDao.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/dao/DashboardDao.java
deleted file mode 100644
index b21dd1aa..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/dao/DashboardDao.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.nis.modules.dashboard.dao;
-
-import java.util.List;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.dashboard.entity.ChartSeriesEntity;
-import com.nis.modules.dashboard.entity.DashboardEntity;
-
-@Mapper
-public interface DashboardDao extends BaseMapper<DashboardEntity>{
-
- List<DashboardEntity> selectAllDashboards(@Param("systemId")Long systemId);
-
- List<ChartSeriesEntity> selectResultData(@Param("userSql")String userSql);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartEntity.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartEntity.java
deleted file mode 100644
index 872983b9..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartEntity.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.nis.modules.dashboard.entity;
-
-import java.io.Serializable;
-
-import lombok.Data;
-@Data
-public class ChartEntity implements Serializable {
- private static final long serialVersionUID = 1L;
- private ChartSingleEntity chartSingleEntity;
- private ChartTableEntity chartTableEntity;
- private ChartStatisticalEntity chartStatisticalEntity;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartSeriesEntity.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartSeriesEntity.java
deleted file mode 100644
index 20dc548a..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartSeriesEntity.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.nis.modules.dashboard.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import lombok.Data;
-@Data
-public class ChartSeriesEntity implements Serializable{
- private static final long serialVersionUID = 1L;
- private Double value;
- private Date time;
- private String formatTime;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartSingleEntity.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartSingleEntity.java
deleted file mode 100644
index 6d3e1fed..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartSingleEntity.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.nis.modules.dashboard.entity;
-
-import java.io.Serializable;
-import java.util.List;
-
-import lombok.Data;
-@Data
-public class ChartSingleEntity implements Serializable{
- private static final long serialVersionUID = 1L;
- private Integer x; // x轴
- private Integer y; // y轴
- private Integer height; // 图形高度
- private Integer width; // 图形宽度
- private String colorSuffix; // 后缀字体颜色是否填充 0-不填充 1-填充
- private String colorPrefix; // 前缀字体颜色是否填充 0-不填充 1-填充
- private String colorValue; // 值字体颜色是否填充 0-不填充 1-填充
- private Integer decimal; // 控制图例值显示的小数位数(以及图形悬停工具提示)
- private String suffix; // 后缀名称
- private Integer suffixFontSize; // 后缀字体大小
- private String prefix; // 前缀名称
- private Integer prefixFontSize; // 前缀字体大小
- private String title; // 标题
- private Integer valueFontSize; // 值展示的大小
- private String descr; //图表的描述信息
- private Integer isGauge=0; //是否开启仪表盘
- private Integer isThreshold=0; //是否开启阈值
- private Integer isScale=0; //是否开启刻度
- private Integer maxValue; //最大值
- private Integer minValue; //最小值
- private String threshold; //阈值
- private List<UserSql> userSqls; // 用户sql
- private String series; // 结果数据
- private String describe;
- private List<ThresholdValueEntity> thresholdValues;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartStatisticalEntity.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartStatisticalEntity.java
deleted file mode 100644
index 10afc012..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartStatisticalEntity.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.nis.modules.dashboard.entity;
-
-import java.io.Serializable;
-import java.util.List;
-
-import lombok.Data;
-
-@Data
-public class ChartStatisticalEntity implements Serializable{
- private static final long serialVersionUID = 1L;
- private Integer bars=0; // 是否以柱状图展示 0-不展示 1-展示
- private Integer lines=0; // 是否以线条图形展示 0-不展示 1-展示
- private Integer points=0; // 是否以点展示 0-不展示 1-展示
- private Integer fill; // 系列的颜色填充量 0代表没有
- private Integer lineWidth; // 线条的宽度
- private String title; // 标题
- private Integer yaxes; // 是否展示左Y轴 0-不展示 1-展示
- private Integer yaxis; // 是否展示右Y轴 0-不展示 1-展示
- private Integer xaxis; // 是否展示X轴 0-不展示 1-展示
- private String yaxesName; // Y轴自定义名称
- private String yaxisName; // Y轴自定义名称
- private String xaxisName; // X轴自定义名称
- private Integer legend=0; // 是否展示legend
- private String legendXPosition; // legendX设置位置
- private String legendYPosition; // legendY设置位置
- private String descr; // 描述信息
- private List<UserSql> userSqls; // 用户sql
- private String series; // 结果数据
- private String describe;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartTableEntity.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartTableEntity.java
deleted file mode 100644
index 8cc764a5..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartTableEntity.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.nis.modules.dashboard.entity;
-
-import java.io.Serializable;
-import java.util.List;
-
-import lombok.Data;
-
-@Data
-public class ChartTableEntity implements Serializable{
- private static final long serialVersionUID = 1L;
- private Integer fontSize; //表格字体大小
- private String title; //标题
- private String descr; //描述
- private String vName; //值列展示名
- private String tName; //时间列展示名
- private Integer decimal; //小数位格式化
- private String timeFormat; //时间格式化
- private Integer pageSize; //表格分页数量
- private List<UserSql> userSqls; // 用户sql
- private String series; // 结果数据
- private String describe;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartType.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartType.java
deleted file mode 100644
index de5bb02b..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ChartType.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.nis.modules.dashboard.entity;
-
-import java.util.List;
-
-public enum ChartType {
- STATISTICAL(1,"statistical","/images/icn-graph-panel.png","chartType.statistical","chart_statistical"),
- SINGLE(2,"single","/images/icn-singlestat-panel.png","chartType.single","chart_single"),
- TABLE(3,"table","/images/icn-table-panel.png","chartType.table","chart_table"),
- PIE(4,"pie","/images/icn-pie.png","chartType.pie","chart_pie"),
- TEXT(5,"text","/images/icn-text-panel.png","chartType.text","chart_text");
-
- private int chartTypeId;
- private String chartTypeName;
- private String iconPath;
- private String i18nChartName;
- private String chartTableName;
-
- private ChartType(int chartTypeId,String chartTypeName,String iconPath,String i18nChartName,String chartTableName) {
- this.chartTypeId=chartTypeId;
- this.chartTypeName=chartTypeName;
- this.iconPath=iconPath;
- this.i18nChartName=i18nChartName;
- this.chartTableName=chartTableName;
- }
-
- public static ChartType getChartNameByTypeId(Integer typeId) {
- ChartType[] values = ChartType.values();
- int length = values.length;
- for (int i = 0; i < length; i++) {
- if (typeId==values[i].chartTypeId) {
- return values[i];
- }
- }
- return null;
- }
-
- public static List<ChartType> getAllChartTypes(){
- ChartType[] values = ChartType.values();
- return java.util.Arrays.asList(values);
- }
-
- public int getChartTypeId() {
- return chartTypeId;
- }
-
- public String getChartTypeName() {
- return chartTypeName;
- }
-
- public String getIconPath() {
- return iconPath;
- }
-
- public String getI18nChartName() {
- return i18nChartName;
- }
-
- public String getChartTableName() {
- return chartTableName;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/DashboardEntity.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/DashboardEntity.java
deleted file mode 100644
index 44ec6547..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/DashboardEntity.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.nis.modules.dashboard.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.nis.modules.sys.shiro.ShiroUtils;
-
-import lombok.Data;
-
-@Data
-@TableName("dashboard")
-@KeySequence(value="seq_dashboard")
-public class DashboardEntity implements Serializable {
- private static final long serialVersionUID = 1L;
- @TableId(type= IdType.INPUT)
- private Long id;
- private String name;
- @NotBlank(message="业务系统ID不能为空")
- private Long systemId;
- @NotBlank(message="仪表盘类型不能为空")
- private Integer chartType;
- @NotNull(message="仪表盘x轴不能为空")
- private Integer x;
- @NotNull(message="仪表盘y轴不能为空")
- private Integer y;
- @NotNull(message="仪表盘宽度不能为空")
- private Integer width;
- @NotNull(message="仪表盘高度不能为空")
- private Integer height;
- private String data;
- private Long operator;
- private Date opTime;
- /*@TableField(exist = false)
- private ChartSingleEntity chartSingleEntity;
- @TableField(exist = false)
- private ChartTableEntity chartTableEntity;
- @TableField(exist = false)
- private ChartStatisticalEntity chartStatisticalEntity;*/
-
-
- public void setOperator() {
- this.operator=ShiroUtils.getUserEntity().getUserId();
- }
- public void setOptime() {
- this.opTime=new Date();
- }
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ThresholdValueEntity.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ThresholdValueEntity.java
deleted file mode 100644
index 2fa3a76b..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/ThresholdValueEntity.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.nis.modules.dashboard.entity;
-
-import lombok.Data;
-
-@Data
-public class ThresholdValueEntity {
- private String color;
- private Double value;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/UserSql.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/UserSql.java
deleted file mode 100644
index 318c0849..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/entity/UserSql.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
- */
-package com.nis.modules.dashboard.entity;
-
-import java.io.Serializable;
-
-import org.hibernate.validator.constraints.Length;
-
-import lombok.Data;
-
-
-
-/**
- * user_sqlEntity
- * @author th
- * @version 2019-05-09
- */
-@Data
-public class UserSql implements Serializable {
- private String sql; // 用户自定义sql查询语句
- private Integer type; // 图表类型
- private String vTime; // 时间变量字段
- private String describe; //查询数据描述
-
-
-
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/service/DashboardService.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/service/DashboardService.java
deleted file mode 100644
index 1ecadf91..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/service/DashboardService.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.nis.modules.dashboard.service;
-
-import java.util.List;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.RCode;
-import com.nis.modules.dashboard.entity.ChartEntity;
-import com.nis.modules.dashboard.entity.ChartSeriesEntity;
-import com.nis.modules.dashboard.entity.DashboardEntity;
-
-public interface DashboardService extends IService<DashboardEntity>{
-
- List<DashboardEntity> queryAllDashboards();
-
- DashboardEntity queryDashboardById(Long id);
-
- void removeDashboardById(Long id);
-
- void addDashboard(DashboardEntity dashboard);
-
- void modifyDashboard(DashboardEntity dashboard);
-
- void modifyDashboards(List<DashboardEntity> dashboards);
-
- void validateDashboardData(DashboardEntity dashboard);
-
- List<ChartSeriesEntity> queryData(String sql,String timeFormat,Integer chartType);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/service/impl/DashboardServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/service/impl/DashboardServiceImpl.java
deleted file mode 100644
index 04f8ecbe..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/service/impl/DashboardServiceImpl.java
+++ /dev/null
@@ -1,231 +0,0 @@
-package com.nis.modules.dashboard.service.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.exception.NZException;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.modules.dashboard.utils.DateUtils;
-import com.nis.modules.dashboard.utils.TimeUtils;
-import com.nis.common.utils.RCode;
-import com.nis.modules.dashboard.dao.DashboardDao;
-import com.nis.modules.dashboard.entity.ChartEntity;
-import com.nis.modules.dashboard.entity.ChartSeriesEntity;
-import com.nis.modules.dashboard.entity.ChartSingleEntity;
-import com.nis.modules.dashboard.entity.ChartStatisticalEntity;
-import com.nis.modules.dashboard.entity.ChartTableEntity;
-import com.nis.modules.dashboard.entity.ChartType;
-import com.nis.modules.dashboard.entity.DashboardEntity;
-import com.nis.modules.dashboard.entity.UserSql;
-import com.nis.modules.dashboard.service.DashboardService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-
-@Service("dashboardService")
-public class DashboardServiceImpl extends ServiceImpl<DashboardDao, DashboardEntity> implements DashboardService{
- private final static Logger logger=LoggerFactory.getLogger(DashboardServiceImpl.class);
- @Override
- public List<DashboardEntity> queryAllDashboards() {
- // 获取当前用户的所在系统信息
- Long currSystemId = ShiroUtils.getCurrSystemId();
- logger.info("systemID is "+currSystemId);
- // 根据查询出来的信息 获取用户sql语句
- // 根据sql语句查询数据信息
- // 组装数据返回前端
- QueryWrapper<DashboardEntity> s=new QueryWrapper<DashboardEntity>();
- s.eq("system_id",currSystemId);
- List<DashboardEntity> dashboardEntitys = baseMapper.selectList(s);
- for (DashboardEntity dashboardEntity : dashboardEntitys) {
- List<UserSql> userSqls=null;
- switch(ChartType.getChartNameByTypeId(Integer.valueOf(dashboardEntity.getChartType()))) {
- case STATISTICAL:
- ChartStatisticalEntity chartStatisticalEntity = JSON.parseObject(dashboardEntity.getData(), ChartStatisticalEntity.class);
- userSqls = chartStatisticalEntity.getUserSqls();
- List<List<ChartSeriesEntity>> seriess=new ArrayList<List<ChartSeriesEntity>>();
- for (UserSql userSql : userSqls) {
- // 验证用户输入sql是否有问题
- List<ChartSeriesEntity> chartStatisticalSeries = baseMapper.selectResultData(userSql.getSql());
- seriess.add(chartStatisticalSeries);
- }
- String series = JSON.toJSONString(seriess);
- chartStatisticalEntity.setSeries(series);
- String chartStatisticalEntityData = JSON.toJSONString(chartStatisticalEntity);
- dashboardEntity.setData(chartStatisticalEntityData);
- logger.info("dashboardEntity data info "+JSON.toJSONString(dashboardEntity));
- break;
- case SINGLE:
- ChartSingleEntity chartSingleEntity = JSON.parseObject(dashboardEntity.getData(), ChartSingleEntity.class);
- userSqls = chartSingleEntity.getUserSqls();
- List<ChartSeriesEntity> chartSingleSeries = baseMapper.selectResultData(userSqls.get(0).getSql());
- String singleResult = JSON.toJSONString(chartSingleSeries);
- chartSingleEntity.setSeries(singleResult);
- String chartSingleEntityData = JSON.toJSONString(chartSingleEntity);
- dashboardEntity.setData(chartSingleEntityData);
- logger.info("dashboardEntity data info "+JSON.toJSONString(dashboardEntity));
- break;
- case TABLE:
- ChartTableEntity chartTableEntity = JSON.parseObject(dashboardEntity.getData(), ChartTableEntity.class);
- userSqls = chartTableEntity.getUserSqls();
- List<ChartSeriesEntity> chartTableSeries = baseMapper.selectResultData(userSqls.get(0).getSql());
- if(chartTableEntity.getTimeFormat() != null && !chartTableEntity.getTimeFormat() .isEmpty()) {
- for(ChartSeriesEntity resultData : chartTableSeries) {
- resultData.setFormatTime(DateUtils.formatDate(resultData.getTime(),chartTableEntity.getTimeFormat()));
- }
- }
- String tableResult = JSON.toJSONString(chartTableSeries);
- chartTableEntity.setSeries(tableResult);
- String chartTableEntityData = JSON.toJSONString(chartTableEntity);
- dashboardEntity.setData(chartTableEntityData);
- logger.info("dashboardEntity data info "+JSON.toJSONString(dashboardEntity));
- break;
- default:
- break;
- }
- }
- return dashboardEntitys;
- }
-
- public DashboardEntity queryDashboardById(Long id) {
- DashboardEntity dashboardEntity = baseMapper.selectById(id);
- List<UserSql> userSqls=null;
- switch(ChartType.getChartNameByTypeId(Integer.valueOf(dashboardEntity.getChartType()))) {
- case STATISTICAL:
- ChartStatisticalEntity chartStatisticalEntity = JSON.parseObject(dashboardEntity.getData(), ChartStatisticalEntity.class);
- userSqls = chartStatisticalEntity.getUserSqls();
- List<List<ChartSeriesEntity>> seriess=new ArrayList<List<ChartSeriesEntity>>();
- for (UserSql userSql : userSqls) {
- // 验证用户输入sql是否有问题
- List<ChartSeriesEntity> chartStatisticalSeries = baseMapper.selectResultData(userSql.getSql());
- seriess.add(chartStatisticalSeries);
- }
- String series = JSON.toJSONString(seriess);
- chartStatisticalEntity.setSeries(series);
- String chartStatisticalEntityData = JSON.toJSONString(chartStatisticalEntity);
- dashboardEntity.setData(chartStatisticalEntityData);
- logger.info("dashboardEntity data info "+JSON.toJSONString(dashboardEntity));
- break;
- case SINGLE:
- ChartSingleEntity chartSingleEntity = JSON.parseObject(dashboardEntity.getData(), ChartSingleEntity.class);
- userSqls = chartSingleEntity.getUserSqls();
- List<ChartSeriesEntity> chartSingleSeries = baseMapper.selectResultData(userSqls.get(0).getSql());
- String singleResult = JSON.toJSONString(chartSingleSeries);
- chartSingleEntity.setSeries(singleResult);
- String chartSingleEntityData = JSON.toJSONString(chartSingleEntity);
- dashboardEntity.setData(chartSingleEntityData);
- logger.info("dashboardEntity data info "+JSON.toJSONString(dashboardEntity));
- break;
- case TABLE:
- ChartTableEntity chartTableEntity = JSON.parseObject(dashboardEntity.getData(), ChartTableEntity.class);
- userSqls = chartTableEntity.getUserSqls();
- List<ChartSeriesEntity> chartTableSeries = baseMapper.selectResultData(userSqls.get(0).getSql());
- if(chartTableEntity.getTimeFormat() != null && !chartTableEntity.getTimeFormat() .isEmpty()) {
- for(ChartSeriesEntity resultData : chartTableSeries) {
- resultData.setFormatTime(DateUtils.formatDate(resultData.getTime(),chartTableEntity.getTimeFormat()));
- }
- }
- String tableResult = JSON.toJSONString(chartTableSeries);
- chartTableEntity.setSeries(tableResult);
- String chartTableEntityData = JSON.toJSONString(chartTableEntity);
- dashboardEntity.setData(chartTableEntityData);
- logger.info("dashboardEntity data info "+JSON.toJSONString(dashboardEntity));
- break;
- default:
- break;
- }
- return dashboardEntity;
- }
-
- @Override
- @Transactional(readOnly = false)
- public void removeDashboardById(Long id) {
- baseMapper.deleteById(id);
- }
-
- @Override
- @Transactional(readOnly = false)
- public void addDashboard(DashboardEntity dashboard) {
- dashboard.setX(1);
- dashboard.setY(1);
- dashboard.setHeight(300);
- dashboard.setWidth(300);
- dashboard.setSystemId(ShiroUtils.getCurrSystemId());
- dashboard.setOperator();
- dashboard.setOptime();
- baseMapper.insert(dashboard);
- }
-
- @Override
- @Transactional(readOnly = false)
- public void modifyDashboard(DashboardEntity dashboard) {
- dashboard.setOperator();
- dashboard.setOptime();
- baseMapper.updateById(dashboard);
- }
-
- @Override
- @Transactional(readOnly = false)
- public void modifyDashboards(List<DashboardEntity> dashboards) {
- for(DashboardEntity dashboard:dashboards) {
- dashboard.setOperator();
- dashboard.setOptime();
- baseMapper.updateById(dashboard);
- }
- }
-
- @Override
- public void validateDashboardData(DashboardEntity dashboard) {
- List<UserSql> userSqls = null;
- String data = dashboard.getData();
- switch(ChartType.getChartNameByTypeId(Integer.valueOf(dashboard.getChartType()))) {
- case STATISTICAL:
- ChartStatisticalEntity chartStatisticalEntity = JSON.parseObject(data,ChartStatisticalEntity.class);
- userSqls = chartStatisticalEntity.getUserSqls();
- break;
- case SINGLE:
- ChartSingleEntity chartSingleEntity = JSON.parseObject(data,ChartSingleEntity.class);
- userSqls = chartSingleEntity.getUserSqls();
- break;
- case TABLE:
- ChartTableEntity chartTableEntity = JSON.parseObject(data,ChartTableEntity.class);
- userSqls = chartTableEntity.getUserSqls();
- break;
- default:
- break;
- }
- logger.info("userSql content is"+ userSqls);
- logger.info("start validate userSql");
- ValidateUtils.is(userSqls).notNull(RCode.DASHBOARD_USERSQL_NULL);
- try {
- for (UserSql userSql : userSqls) {
- // 验证用户输入sql是否有问题
- baseMapper.selectResultData(userSql.getSql());
- }
- }catch(Exception e) {
- throw new NZException(RCode.DASHBOARD_USERSQL_ERROR);
- }
- }
-
- @Override
- public List<ChartSeriesEntity> queryData(String sql, String timeFormat, Integer chartType) {
- if(sql != null && !sql.isEmpty()) {
- sql=sql.replace("&lt;","<").replace("&gt;", ">");
- }else {
- return new ArrayList<ChartSeriesEntity>();
- }
- List<ChartSeriesEntity> resultDatas = baseMapper.selectResultData(sql);
- if(timeFormat != null && !timeFormat.isEmpty()&& chartType==3) {
- for(ChartSeriesEntity resultData : resultDatas) {
- resultData.setFormatTime(DateUtils.formatDate(resultData.getTime(),timeFormat));
- }
- }
- return resultDatas;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/utils/DateUtils.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/utils/DateUtils.java
deleted file mode 100644
index b9fb1ea2..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/utils/DateUtils.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/**
- * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
- */
-package com.nis.modules.dashboard.utils;
-
-import java.text.ParseException;
-import java.util.Date;
-
-import org.apache.commons.lang3.time.DateFormatUtils;
-
-/**
- * 日期工具类, 继承org.apache.commons.lang.time.DateUtils类
- * @author ThinkGem
- * @version 2014-4-15
- */
-public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
-
- private static String[] parsePatterns = {
- "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
- "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
- "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
-
- /**
- * 得到当前日期字符串 格式(yyyy-MM-dd)
- */
- public static String getDate() {
- return getDate("yyyy-MM-dd");
- }
-
- /**
- * 得到当前日期字符串 格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E"
- */
- public static String getDate(String pattern) {
- return DateFormatUtils.format(new Date(), pattern);
- }
-
- /**
- * 得到日期字符串 默认格式(yyyy-MM-dd) pattern可以为:"yyyy-MM-dd" "HH:mm:ss" "E"
- */
- public static String formatDate(Date date, Object... pattern) {
- String formatDate = null;
- if (pattern != null && pattern.length > 0) {
- formatDate = DateFormatUtils.format(date, pattern[0].toString());
- } else {
- formatDate = DateFormatUtils.format(date, "yyyy-MM-dd");
- }
- return formatDate;
- }
-
- /**
- * 得到日期时间字符串,转换格式(yyyy-MM-dd HH:mm:ss)
- */
- public static String formatDateTime(Date date) {
- return formatDate(date, "yyyy-MM-dd HH:mm:ss");
- }
-
- /**
- * 得到当前时间字符串 格式(HH:mm:ss)
- */
- public static String getTime() {
- return formatDate(new Date(), "HH:mm:ss");
- }
-
- /**
- * 得到当前日期和时间字符串 格式(yyyy-MM-dd HH:mm:ss)
- */
- public static String getDateTime() {
- return formatDate(new Date(), "yyyy-MM-dd HH:mm:ss");
- }
-
- /**
- * 得到当前年份字符串 格式(yyyy)
- */
- public static String getYear() {
- return formatDate(new Date(), "yyyy");
- }
-
- /**
- * 得到当前月份字符串 格式(MM)
- */
- public static String getMonth() {
- return formatDate(new Date(), "MM");
- }
-
- /**
- * 得到当天字符串 格式(dd)
- */
- public static String getDay() {
- return formatDate(new Date(), "dd");
- }
-
- /**
- * 得到当前星期字符串 格式(E)星期几
- */
- public static String getWeek() {
- return formatDate(new Date(), "E");
- }
-
- /**
- * 日期型字符串转化为日期 格式
- * { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm",
- * "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm",
- * "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm" }
- */
- public static Date parseDate(Object str) {
- if (str == null){
- return null;
- }
- try {
- return parseDate(str.toString(), parsePatterns);
- } catch (ParseException e) {
- return null;
- }
- }
-
- /**
- * 获取过去的天数
- * @param date
- * @return
- */
- public static long pastDays(Date date) {
- long t = new Date().getTime()-date.getTime();
- return t/(24*60*60*1000);
- }
-
- /**
- * 获取过去的小时
- * @param date
- * @return
- */
- public static long pastHour(Date date) {
- long t = new Date().getTime()-date.getTime();
- return t/(60*60*1000);
- }
-
- /**
- * 获取过去的分钟
- * @param date
- * @return
- */
- public static long pastMinutes(Date date) {
- long t = new Date().getTime()-date.getTime();
- return t/(60*1000);
- }
-
- /**
- * 转换为时间(天,时:分:秒.毫秒)
- * @param timeMillis
- * @return
- */
- public static String formatDateTime(long timeMillis){
- long day = timeMillis/(24*60*60*1000);
- long hour = (timeMillis/(60*60*1000)-day*24);
- long min = ((timeMillis/(60*1000))-day*24*60-hour*60);
- long s = (timeMillis/1000-day*24*60*60-hour*60*60-min*60);
- long sss = (timeMillis-day*24*60*60*1000-hour*60*60*1000-min*60*1000-s*1000);
- return (day>0?day+",":"")+hour+":"+min+":"+s+"."+sss;
- }
-
- /**
- * 获取两个日期之间的天数
- *
- * @param before
- * @param after
- * @return
- */
- public static double getDistanceOfTwoDate(Date before, Date after) {
- long beforeTime = before.getTime();
- long afterTime = after.getTime();
- return (afterTime - beforeTime) / (1000 * 60 * 60 * 24);
- }
-
- /**
- * @param args
- * @throws ParseException
- */
- public static void main(String[] args) throws ParseException {
-// System.out.println(formatDate(parseDate("2010/3/6")));
-// System.out.println(getDate("yyyy年MM月dd日 E"));
-// long time = new Date().getTime()-parseDate("2012-11-19").getTime();
-// System.out.println(time/(24*60*60*1000));
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/dashboard/utils/TimeUtils.java b/nezha-admin/src/main/java/com/nis/modules/dashboard/utils/TimeUtils.java
deleted file mode 100644
index 6d6e6579..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/dashboard/utils/TimeUtils.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/**
- * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
- */
-package com.nis.modules.dashboard.utils;
-
-import java.util.Arrays;
-import java.util.Date;
-
-import org.apache.commons.lang3.time.DateFormatUtils;
-
-/**
- * 时间计算工具类
- * @author ThinkGem
- * @version 2013-11-03
- */
-public class TimeUtils {
-
- public static String toTimeString(long time) {
- TimeUtils t = new TimeUtils(time);
- int day = t.get(TimeUtils.DAY);
- int hour = t.get(TimeUtils.HOUR);
- int minute = t.get(TimeUtils.MINUTE);
- int second = t.get(TimeUtils.SECOND);
- StringBuilder sb = new StringBuilder();
- if (day > 0){
- sb.append(day).append("天");
- }
- if (hour > 0){
- sb.append(hour).append("时");
- }
- if (minute > 0){
- sb.append(minute).append("分");
- }
- if (second > 0){
- sb.append(second).append("秒");
- }
- return sb.toString();
- }
-
- /**
- * 时间字段常量,表示“秒”
- */
- public final static int SECOND = 0;
-
- /**
- * 时间字段常量,表示“分”
- */
- public final static int MINUTE = 1;
-
- /**
- * 时间字段常量,表示“时”
- */
- public final static int HOUR = 2;
-
- /**
- * 时间字段常量,表示“天”
- */
- public final static int DAY = 3;
-
- /**
- * 各常量允许的最大值
- */
- private final int[] maxFields = { 59, 59, 23, Integer.MAX_VALUE - 1 };
-
- /**
- * 各常量允许的最小值
- */
- private final int[] minFields = { 0, 0, 0, Integer.MIN_VALUE };
-
- /**
- * 默认的字符串格式时间分隔符
- */
- private String timeSeparator = ":";
-
- /**
- * 时间数据容器
- */
- private int[] fields = new int[4];
-
- /**
- * 无参构造,将各字段置为 0
- */
- public TimeUtils() {
- this(0, 0, 0, 0);
- }
-
- /**
- * 使用时、分构造一个时间
- * @param hour 小时
- * @param minute 分钟
- */
- public TimeUtils(int hour, int minute) {
- this(0, hour, minute, 0);
- }
-
- /**
- * 使用时、分、秒构造一个时间
- * @param hour 小时
- * @param minute 分钟
- * @param second 秒
- */
- public TimeUtils(int hour, int minute, int second) {
- this(0, hour, minute, second);
- }
-
- /**
- * 使用一个字符串构造时间<br/>
- * Time time = new Time("14:22:23");
- * @param time 字符串格式的时间,默认采用“:”作为分隔符
- */
- public TimeUtils(String time) {
- this(time, null);
-// System.out.println(time);
- }
-
- /**
- * 使用时间毫秒构建时间
- * @param time
- */
- public TimeUtils(long time){
- this(new Date(time));
- }
-
- /**
- * 使用日期对象构造时间
- * @param date
- */
- public TimeUtils(Date date){
- this(DateFormatUtils.formatUTC(date, "HH:mm:ss"));
- }
-
- /**
- * 使用天、时、分、秒构造时间,进行全字符的构造
- * @param day 天
- * @param hour 时
- * @param minute 分
- * @param second 秒
- */
- public TimeUtils(int day, int hour, int minute, int second) {
- initialize(day, hour, minute, second);
- }
-
- /**
- * 使用一个字符串构造时间,指定分隔符<br/>
- * Time time = new Time("14-22-23", "-");
- * @param time 字符串格式的时间
- */
- public TimeUtils(String time, String timeSeparator) {
- if(timeSeparator != null) {
- setTimeSeparator(timeSeparator);
- }
- parseTime(time);
- }
-
- /**
- * 设置时间字段的值
- * @param field 时间字段常量
- * @param value 时间字段的值
- */
- public void set(int field, int value) {
- if(value < minFields[field]) {
- throw new IllegalArgumentException(value + ", time value must be positive.");
- }
- fields[field] = value % (maxFields[field] + 1);
- // 进行进位计算
- int carry = value / (maxFields[field] + 1);
- if(carry > 0) {
- int upFieldValue = get(field + 1);
- set(field + 1, upFieldValue + carry);
- }
- }
-
- /**
- * 获得时间字段的值
- * @param field 时间字段常量
- * @return 该时间字段的值
- */
- public int get(int field) {
- if(field < 0 || field > fields.length - 1) {
- throw new IllegalArgumentException(field + ", field value is error.");
- }
- return fields[field];
- }
-
- /**
- * 将时间进行“加”运算,即加上一个时间
- * @param time 需要加的时间
- * @return 运算后的时间
- */
- public TimeUtils addTime(TimeUtils time) {
- TimeUtils result = new TimeUtils();
- int up = 0; // 进位标志
- for (int i = 0; i < fields.length; i++) {
- int sum = fields[i] + time.fields[i] + up;
- up = sum / (maxFields[i] + 1);
- result.fields[i] = sum % (maxFields[i] + 1);
- }
- return result;
- }
-
- /**
- * 将时间进行“减”运算,即减去一个时间
- * @param time 需要减的时间
- * @return 运算后的时间
- */
- public TimeUtils subtractTime(TimeUtils time) {
- TimeUtils result = new TimeUtils();
- int down = 0; // 退位标志
- for (int i = 0, k = fields.length - 1; i < k; i++) {
- int difference = fields[i] + down;
- if (difference >= time.fields[i]) {
- difference -= time.fields[i];
- down = 0;
- } else {
- difference += maxFields[i] + 1 - time.fields[i];
- down = -1;
- }
- result.fields[i] = difference;
- }
- result.fields[DAY] = fields[DAY] - time.fields[DAY] + down;
- return result;
- }
-
- /**
- * 获得时间字段的分隔符
- * @return
- */
- public String getTimeSeparator() {
- return timeSeparator;
- }
-
- /**
- * 设置时间字段的分隔符(用于字符串格式的时间)
- * @param timeSeparator 分隔符字符串
- */
- public void setTimeSeparator(String timeSeparator) {
- this.timeSeparator = timeSeparator;
- }
-
- private void initialize(int day, int hour, int minute, int second) {
- set(DAY, day);
- set(HOUR, hour);
- set(MINUTE, minute);
- set(SECOND, second);
- }
-
- private void parseTime(String time) {
- if(time == null) {
- initialize(0, 0, 0, 0);
- return;
- }
- String t = time;
- int field = DAY;
- set(field--, 0);
- int p = -1;
- while((p = t.indexOf(timeSeparator)) > -1) {
- parseTimeField(time, t.substring(0, p), field--);
- t = t.substring(p + timeSeparator.length());
- }
- parseTimeField(time, t, field--);
- }
-
- private void parseTimeField(String time, String t, int field) {
- if(field < SECOND || t.length() < 1) {
- parseTimeException(time);
- }
- char[] chs = t.toCharArray();
- int n = 0;
- for(int i = 0; i < chs.length; i++) {
- if(chs[i] <= ' ') {
- continue;
- }
- if(chs[i] >= '0' && chs[i] <= '9') {
- n = n * 10 + chs[i] - '0';
- continue;
- }
- parseTimeException(time);
- }
- set(field, n);
- }
-
- private void parseTimeException(String time) {
- throw new IllegalArgumentException(time + ", time format error, HH"
- + this.timeSeparator + "mm" + this.timeSeparator + "ss");
- }
-
- public String toString() {
- StringBuilder sb = new StringBuilder(16);
- sb.append(fields[DAY]).append(',').append(' ');
- buildString(sb, HOUR).append(timeSeparator);
- buildString(sb, MINUTE).append(timeSeparator);
- buildString(sb, SECOND);
- return sb.toString();
- }
-
- private StringBuilder buildString(StringBuilder sb, int field) {
- if(fields[field] < 10) {
- sb.append('0');
- }
- return sb.append(fields[field]);
- }
-
- public int hashCode() {
- final int PRIME = 31;
- int result = 1;
- result = PRIME * result + Arrays.hashCode(fields);
- return result;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final TimeUtils other = (TimeUtils) obj;
- if (!Arrays.equals(fields, other.fields)) {
- return false;
- }
- return true;
- }
-
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteSetController.java b/nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteSetController.java
deleted file mode 100644
index 25f8a8d6..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteSetController.java
+++ /dev/null
@@ -1,171 +0,0 @@
-package com.nis.modules.detect.controller;
-
-import com.nis.common.exception.NZException;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.detect.entity.DeteSetInfoEntity;
-import com.nis.modules.detect.service.DeteSetInfoService;
-import com.nis.modules.node.service.NodeGroupInfoService;
-import com.nis.modules.node.service.SystemNodeRelService;
-import com.nis.modules.sys.service.UserUsergroupService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Map;
-
-
-
-/**
- * 监测设置信息表
- *
- * @author nezha
- * @email
- * @date 2019-07-25 16:35:48
- */
-@Controller
-@RequestMapping("/deteSet")
-@Api(tags="监测设置")
-public class DeteSetController {
- @Autowired
- private DeteSetInfoService deteSetInfoService;
- @Autowired
- private NodeGroupInfoService nodeGroupInfoService;
- @Autowired
- private SystemNodeRelService systemNodeRelService;
- @Autowired
- private UserUsergroupService userUsergroupService;
-
- /**
- * 列表
- */
- @GetMapping(value = "/list")
- @ResponseBody
- @ApiOperation(value = "查询列表", notes = "可使用name字段模糊查询列表")
- public R list(@RequestParam Map<String, Object> params){
- PageUtils page = deteSetInfoService.queryPage(params);
-
- return R.ok(page);
- }
-
-
- /**
- * 信息
- */
- @GetMapping(value = "/detail")
- @ResponseBody
- @ApiOperation(value = "查询详细信息")
- public R info(@RequestParam("id") Long id){
- DeteSetInfoEntity deteSetInfo = deteSetInfoService.queryDetail(id);
-
- return R.ok(deteSetInfo);
- }
-
- /**
- * 保存
- */
- @PostMapping("/save")
- @ApiOperation("新增监测设置")
- @ResponseBody
- public R save(@RequestBody DeteSetInfoEntity deteSetInfo){
- ValidateUtils.is(deteSetInfo.getName()).notNull(RCode.SET_NAME_ISNULL);
- ValidateUtils.is(deteSetInfo.getTypeId()).notNull(RCode.SET_TYPE_ISNULL);
- if((deteSetInfo.getNodeGroupIds()==null||deteSetInfo.getNodeGroupIds().length<1)&&(deteSetInfo.getNodeIds()==null||deteSetInfo.getNodeIds().length<1)){
- throw new NZException(RCode.SET_NO_DETECT_NODE_DISTRIBUTE);
- }
- if(deteSetInfoService.checkNameExists(deteSetInfo.getName(),null)){
- throw new NZException(RCode.SET_NAME_EXISTS);
- }
- if(deteSetInfo.getNodeGroupIds()!=null && deteSetInfo.getNodeGroupIds().length>0 && !nodeGroupInfoService.isCurrentSystem(deteSetInfo.getNodeGroupIds())){
- throw new NZException(RCode.SET_NODEGROUP_ISNOT_CURRENTSYSTEM);
- }
- if(deteSetInfo.getNodeIds()!=null && deteSetInfo.getNodeIds().length>0 && !systemNodeRelService.isCurrentSystem(deteSetInfo.getNodeIds())){
- throw new NZException(RCode.SET_NODE_ISNOT_CURRENTSYSTEM);
- }
- if(!deteSetInfoService.checkTypeExists(deteSetInfo.getTypeId())){
- throw new NZException(RCode.SET_TYPE_NOTEXISTS);
- }
-
- if(Constant.VIEWLEVEL_UG.equals(deteSetInfo.getViewLevel())&&!userUsergroupService.checkUserGroupCorrect(ShiroUtils.getUserId(),deteSetInfo.getViewerId())){
- throw new NZException(RCode.SYS_USERGROUP_MATCH_ERROR);
- }
-
- if(!deteSetInfoService.checkViewLevelValide(deteSetInfo.getViewLevel())){
- throw new NZException(RCode.VIEWLEVEL_INVALID);
- }
-
- if(!deteSetInfoService.nodeOrNodeGroupValide(deteSetInfo)){
- throw new NZException(RCode.SET_NODE_INVALIDE);
- }
- deteSetInfoService.saveEntity(deteSetInfo);
-
- return R.ok();
- }
-
- /**
- * 修改
- */
- @PutMapping("/update")
- @ResponseBody
- @ApiOperation("修改监测设置")
- public R update(@RequestBody DeteSetInfoEntity deteSetInfo){
- if(deteSetInfoService.isBuildIn(deteSetInfo)){
- throw new NZException(RCode.BUILDIN_CONFIG);
- }
- ValidateUtils.is(deteSetInfo.getName()).notNull(RCode.SET_NAME_ISNULL);
- ValidateUtils.is(deteSetInfo.getTypeId()).notNull(RCode.SET_TYPE_ISNULL);
- if(deteSetInfoService.checkNameExists(deteSetInfo.getName(),deteSetInfo.getId())){
- throw new NZException(RCode.SET_NAME_EXISTS);
- }
- if(deteSetInfo.getNodeGroupIds()!=null && deteSetInfo.getNodeGroupIds().length>0&& !nodeGroupInfoService.isCurrentSystem(deteSetInfo.getNodeGroupIds())){
- throw new NZException(RCode.SET_NODEGROUP_ISNOT_CURRENTSYSTEM);
- }
- if(deteSetInfo.getNodeIds()!=null&&deteSetInfo.getNodeIds().length>0&& !systemNodeRelService.isCurrentSystem(deteSetInfo.getNodeIds())){
- throw new NZException(RCode.SET_NODE_ISNOT_CURRENTSYSTEM);
- }
- if(!deteSetInfoService.checkTypeExists(deteSetInfo.getTypeId())){
- throw new NZException(RCode.SET_TYPE_NOTEXISTS);
- }
-
- if(Constant.VIEWLEVEL_UG.equals(deteSetInfo.getViewLevel())&&!userUsergroupService.checkUserGroupCorrect(ShiroUtils.getUserId(),deteSetInfo.getViewerId())){
- throw new NZException(RCode.SYS_USERGROUP_MATCH_ERROR);
- }
- if(!deteSetInfoService.nodeOrNodeGroupValide(deteSetInfo)){
- throw new NZException(RCode.SET_NODE_INVALIDE);
- }
- deteSetInfoService.updateEntity(deteSetInfo);
- return R.ok();
- }
-
- /**
- * 修改设置状态
- */
- @PutMapping("/changeState")
- @ResponseBody
- @ApiOperation(value="修改设置状态")
- public R changeState(@RequestParam String state,@RequestParam Long... ids){
-
- deteSetInfoService.changeStateByIds(ids,state);
- return R.ok();
- }
-
- @GetMapping("/nameCheck")
- @ResponseBody
- @ApiOperation(value="监测类别名称校验")
- public R nameCheck(@RequestParam String name,Long id){
- if(deteSetInfoService.checkNameExists(name,id)){
- return R.error(RCode.SET_NAME_EXISTS);
- }else{
- return R.ok("true");
- }
-
- }
-
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteTypeController.java b/nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteTypeController.java
deleted file mode 100644
index d3681ee2..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteTypeController.java
+++ /dev/null
@@ -1,187 +0,0 @@
-package com.nis.modules.detect.controller;
-
-import com.alibaba.fastjson.JSON;
-import com.nis.common.exception.NZException;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.detect.entity.DeteTypeInfoEntity;
-import com.nis.modules.detect.entity.DeteTypeMetaMappingEntity;
-import com.nis.modules.detect.entity.DeteTypeMetaMapppingVO;
-import com.nis.modules.detect.service.DeteTypeInfoService;
-import com.nis.modules.detect.service.DeteMetaMappingService;
-import com.nis.modules.detect.service.DeteMetaService;
-import com.nis.modules.detect.service.DeteParamService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.File;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-@Controller
-@RequestMapping("/deteType")
-@Api(tags = "监测类别")
-public class DeteTypeController {
- @Autowired
- private DeteTypeInfoService deteTypeInfoService;
- @Autowired
- private DeteMetaService deteTypeMetaService;
- @Autowired
- private DeteParamService deteTypeParamService;
- @Autowired
- private DeteMetaMappingService deteTypeMetaMappingService;
-
- private Logger log = LoggerFactory.getLogger(DeteTypeController.class);
-
- @RequestMapping(value = "/list", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
- @ResponseBody
- @ApiOperation(value = "查询列表", notes = "可使用name字段模糊查询列表")
- public R list(@RequestParam Map<String, Object> params) {
- PageUtils page = deteTypeInfoService.queryPage(params);
- return R.ok(page);
- }
-
- @GetMapping(value = "/detail", produces = MediaType.APPLICATION_JSON_VALUE)
- @ResponseBody
- @ApiOperation(value = "查询详细信息")
- public R detail(@RequestParam Long id) {
- DeteTypeInfoEntity deteTypeInfo = deteTypeInfoService.queryDetail(id);
-
- return R.ok(deteTypeInfo);
- }
-
-// @PostMapping(value = "/save", produces = MediaType.APPLICATION_JSON_VALUE)
- @PostMapping(value = "/save")
- @ResponseBody
- @ApiOperation(value = "保存监测类别")
- public R save(@RequestParam(value="deteTypeInfo",required = true) String jsonTypeInfo,@RequestParam(value="file",required = false) MultipartFile file) {
- DeteTypeInfoEntity deteTypeInfo= JSON.parseObject(jsonTypeInfo,DeteTypeInfoEntity.class);
- deteTypeInfoService.validatePassDate(deteTypeInfo,file);
- if(deteTypeInfo.getDeteInterval()==null||deteTypeInfo.getDeteInterval()<0){
- deteTypeInfo.setDeteInterval(60);
- }
- deteTypeInfoService.saveEntity(deteTypeInfo,file);
-
- return R.ok();
- }
-
-
- @PutMapping(value = "/update")
-// @PutMapping(value = "/update", produces = MediaType.APPLICATION_JSON_VALUE)
- @ResponseBody
- @ApiOperation(value = "更新监测类别")
- public R update(@RequestParam(value="deteTypeInfo",required = true) String jsonTypeInfo,@RequestParam(value="file",required = false) MultipartFile file) {
- DeteTypeInfoEntity deteTypeInfo= JSON.parseObject(jsonTypeInfo,DeteTypeInfoEntity.class);
- if(deteTypeInfoService.isBuildIn(deteTypeInfo)){ //内置配置,不允许修改
- throw new NZException(RCode.BUILDIN_CONFIG);
- }
- deteTypeInfoService.validatePassDate(deteTypeInfo,file);
- deteTypeInfoService.updateEntity(deteTypeInfo,file);
- return R.ok();
- }
-
- @DeleteMapping(value = "/delete", produces = MediaType.APPLICATION_JSON_VALUE)
- @ResponseBody
- @ApiOperation(value = "删除监测类别")
- public R delete(@RequestBody Long... ids) {
-
- deteTypeInfoService.deleteEntity(ids);
- return R.ok();
- }
-
- @GetMapping(value = "/nameCheck", produces = MediaType.APPLICATION_JSON_VALUE)
- @ResponseBody
- @ApiOperation(value = "监测类别名称校验")
- public R nameCheck( Long id,@RequestParam String name) {
- boolean nameExists = deteTypeInfoService.checkNameExists(name,id);
- if(nameExists){ //名称存在
- return R.error(RCode.TYPE_NAME_EXISTS);
- }else{
- return R.ok("true");
- }
- }
-
- @GetMapping(value = "/dicList", produces = MediaType.APPLICATION_JSON_VALUE)
- @ResponseBody
- @ApiOperation(value = "监测类别元数据字典查询")
- public R dicList(@RequestParam Map<String, Object> params ) {
- PageUtils page = deteTypeMetaMappingService.queryMetaMappingPage(params);
- return R.ok(page);
- }
-
- @PostMapping(value = "/saveDic", produces = MediaType.APPLICATION_JSON_VALUE)
- @ResponseBody
- @ApiOperation(value = "保存监测类别字典数据")
- public R saveDic(@RequestBody DeteTypeMetaMapppingVO deteTypeMetaMapppingVO) {
- ValidateUtils.is(deteTypeMetaMapppingVO.getType()).notNull(RCode.DICT_TYPE_ISNULL);
- ValidateUtils.is(deteTypeMetaMapppingVO.getMappings()).notNull(RCode.DICT_MAPPINGS_ISNULL);
- if(deteTypeMetaMappingService.checkMetaMappingTypeExists(deteTypeMetaMapppingVO.getType())){
- throw new NZException(RCode.METAMAPPING_TYPE_EXISTS);
- }
- Long userId = ShiroUtils.getUserId();
- Date date=new Date();
-
-
- List<DeteTypeMetaMappingEntity> mappings = deteTypeMetaMapppingVO.getMappings();
-
- for(DeteTypeMetaMappingEntity mapping:mappings){
- mapping.setType(deteTypeMetaMapppingVO.getType());
- mapping.setOperator(userId);
- mapping.setOpTime(date);
- }
-
- deteTypeMetaMappingService.saveDicts(mappings);
- return R.ok();
- }
-
- @PutMapping(value = "/updateDic", produces = MediaType.APPLICATION_JSON_VALUE)
- @ResponseBody
- @ApiOperation(value = "更新监测类别字典数据")
- public R updateDic(@RequestBody DeteTypeMetaMapppingVO deteTypeMetaMapppingVO) {
- ValidateUtils.is(deteTypeMetaMapppingVO.getType()).notNull(RCode.DICT_TYPE_ISNULL);
- ValidateUtils.is(deteTypeMetaMapppingVO.getMappings()).notNull(RCode.DICT_MAPPINGS_ISNULL);
- int count=0;
- for(DeteTypeMetaMappingEntity mapping:deteTypeMetaMapppingVO.getMappings()){
-
- if(mapping.getDelFlag()!=null&& !Constant.DELFLAG_FALSE.equals(mapping.getDelFlag())){
- count++;
- }
- }
- if(count==deteTypeMetaMapppingVO.getMappings().size()){
- return deteTypeMetaMappingService.deleteDic(deteTypeMetaMapppingVO.getType());
- }
- deteTypeMetaMappingService.updateDict(deteTypeMetaMapppingVO);
- return R.ok();
- }
-
- @DeleteMapping(value = "/deleteDic", produces = MediaType.APPLICATION_JSON_VALUE)
- @ResponseBody
- @ApiOperation(value = "删除监测类别字典")
- public R deleteDic(@RequestBody String ... types) {
- return deteTypeMetaMappingService.deleteDic(types);
- }
-
- @GetMapping(value="/dicNameCheck")
- @ResponseBody
- @ApiOperation(value="元数据字典type校验")
- public R dicNameCheck(String type){
- if(deteTypeMetaMappingService.checkMetaMappingTypeExists(type)){
- return R.error(RCode.METAMAPPING_TYPE_EXISTS);
- }else{
- return R.ok("true");
- }
- }
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteWarnController.java b/nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteWarnController.java
deleted file mode 100644
index e48337e7..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/controller/DeteWarnController.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package com.nis.modules.detect.controller;
-
-import com.alibaba.fastjson.JSON;
-import com.nis.common.exception.NZException;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.detect.entity.DeteWarnInfoEntity;
-import com.nis.modules.detect.service.DeteSetInfoService;
-import com.nis.modules.detect.service.DeteWarnInfoService;
-import com.nis.modules.sys.service.PermissionInfoService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.Map;
-
-@Controller
-@Api(tags = "监测告警")
-@RequestMapping("/deteWarn")
-public class DeteWarnController {
- @Autowired
- private DeteWarnInfoService deteWarnInfoService;
- @Autowired
- private DeteSetInfoService deteSetInfoService;
- @Autowired
- private PermissionInfoService permissionInfoService;
-
- /**
- * 列表
- */
- @GetMapping(value = "/list")
- @ResponseBody
- @ApiOperation(value = "查询列表", notes = "可使用name字段模糊查询列表")
- public R list(@RequestParam Map<String, Object> params) {
- PageUtils page=deteWarnInfoService.queryPage(params);
- return R.ok(page);
- }
-
-
- /**
- * 信息
- */
- @GetMapping(value = "/detail")
- @ResponseBody
- @ApiOperation(value = "查询详细信息")
- public R info(@RequestParam("id") Long id) {
- DeteWarnInfoEntity deteWarnInfoEntity=deteWarnInfoService.queryDetail(id);
- return R.ok(deteWarnInfoEntity);
- }
-
- /**
- * 保存
- */
- @PostMapping("/save")
- @ApiOperation("新增告警配置")
- @ResponseBody
- public R save(@RequestParam(value="deteWarnInfo",required = true) String jsonWarnInfo,@RequestParam(value="file",required = false) MultipartFile file) {
- DeteWarnInfoEntity deteWarnInfoEntity= JSON.parseObject(jsonWarnInfo,DeteWarnInfoEntity.class);
-
- ValidateUtils.is(deteWarnInfoEntity.getName()).notNull(RCode.WARN_NAME_ISNULL);
- ValidateUtils.is(deteWarnInfoEntity.getDeteTypeId()).notNull(RCode.WARN_TYPE_ISNULL);
- if(deteWarnInfoService.checkNameExists(deteWarnInfoEntity.getName(),null)){
- throw new NZException(RCode.WARN_NAME_EXISTS);
- }
- if(!deteWarnInfoService.checkTriggerTypeIsValide(deteWarnInfoEntity)){
- throw new NZException(RCode.WARN_TRIGGERTYPE_INVALID);
- }
- if(!deteWarnInfoService.checkWarnModeIsValide(deteWarnInfoEntity)){
- throw new NZException(RCode.WARN_WARNMODE_INVALID);
- }
- //告警模式为汇总时校验统计方式
- if("2".equals(deteWarnInfoEntity.getWarnMode())&& !deteWarnInfoService.checkStatTypeIsValide(deteWarnInfoEntity)){
- throw new NZException(RCode.WARN_STATTYPE_INVALID);
- }
- //触发方式为阈值触发时校验比较符是否合法
- if("1".equals(deteWarnInfoEntity.getTriggerType()) && !deteWarnInfoService.checkSymbolIsValide(deteWarnInfoEntity)){
- throw new NZException(RCode.WARN_SYMBOL_INVALID);
- }
- if("1".equals(deteWarnInfoEntity.getTriggerType()) && !deteWarnInfoService.checkThresholdIsValide(deteWarnInfoEntity)){
- throw new NZException(RCode.WARN_SYMBOL_INVALID);
- }
- if(!deteWarnInfoService.checkWarnLevelIsValide(deteWarnInfoEntity)){
- throw new NZException(RCode.WARN_WARNLEVEL_INVALID);
- }
- if(!deteWarnInfoService.checkCallbackTypeIsValide(deteWarnInfoEntity)){
- throw new NZException(RCode.WARN_CALLBACKTYPE_INVALID);
- }
- if(!deteWarnInfoService.checkCallbackContentIsValide(deteWarnInfoEntity)){
- throw new NZException(RCode.WARN_CALLBACKCONTENT_ISNULL);
- }
- if(!deteWarnInfoService.checkCallbackScirptFileIsValide(deteWarnInfoEntity,file)){
- throw new NZException(RCode.DETE_UPLOAD_FILE_ISNULL);
- }
-// if(!deteWarnInfoService.checkViewLevelValide(deteWarnInfoEntity.getViewLevel())){
-// throw new NZException(RCode.VIEWLEVEL_INVALID);
-// }
-
- if(!deteWarnInfoService.checkTypeExists(deteWarnInfoEntity.getDeteTypeId())){
- throw new NZException(RCode.WARN_TYPE_NOTEXISTS);
- }
-
- if(!deteSetInfoService.checkDeteSetExsits(deteWarnInfoEntity.getDeteSetIds())){
- throw new NZException(RCode.WARN_SET_NOTEXISTS);
- }
-
-
- deteWarnInfoService.saveEntity(deteWarnInfoEntity,file);
- return R.ok();
- }
-
- /**
- * 修改
- */
- @PutMapping("/update")
- @ResponseBody
- @ApiOperation("修改告警配置")
- public R update(@RequestParam(value="deteWarnInfo",required = true) String jsonWarnInfo,@RequestParam(value="file",required = false) MultipartFile file) {
- DeteWarnInfoEntity deteWarnInfoEntity=JSON.parseObject(jsonWarnInfo,DeteWarnInfoEntity.class);
- ValidateUtils.is(deteWarnInfoEntity.getName()).notNull(RCode.WARN_NAME_ISNULL);
- if(deteWarnInfoService.checkNameExists(deteWarnInfoEntity.getName(),deteWarnInfoEntity.getId())){
- throw new NZException(RCode.WARN_NAME_EXISTS);
- }
- deteWarnInfoService.updateEntity(deteWarnInfoEntity,file);
- return R.ok();
- }
-
- @DeleteMapping("/delete")
- @ResponseBody
- @ApiOperation("删除告警配置")
- public R delete(@RequestBody Long ... ids){
-
- deteWarnInfoService.deleteEntity(ids);
- return R.ok();
- }
- @GetMapping("nameCheck")
- @ResponseBody
- @ApiOperation(value="名称校验")
- public R nameCheck(@RequestParam String name,Long id){
- if(deteWarnInfoService.checkNameExists(name,id)){
- return R.error(RCode.WARN_NAME_EXISTS);
- }else{
- return R.ok("true");
- }
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteSetInfoDao.java b/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteSetInfoDao.java
deleted file mode 100644
index 0769d8fa..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteSetInfoDao.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.nis.modules.detect.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.nis.modules.detect.entity.DeteSetInfoEntity;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import com.nis.modules.sys.entity.UserGroupEntity;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 监测设置信息表
- *
- * @author nezha
- * @date 2019-07-25 16:35:48
- */
-@Mapper
-public interface DeteSetInfoDao extends BaseMapper<DeteSetInfoEntity> {
-
- List<DeteSetInfoEntity> queryByPermission(PermissionInfoEntity entity);
-
- List<NodeGroupInfoEntity> queryNodeGroups(@Param("setId")Long id);
-
- List<NodeInfoEntity> queryNodes(@Param("setId")Long id);
-
- DeteSetInfoEntity queryById(@Param("id")Long id);
-
- List<UserGroupEntity> queryUserGroup(@Param("setId")Long id);
-
- List<SystemInfoEntity> querySystem(@Param("setId")Long id);
-
-
- IPage<DeteSetInfoEntity> queryList(IPage<DeteSetInfoEntity> page, @Param("name") String name, @Param("typeId") Long typeId,@Param("isGlobal") Integer isGlobal, @Param("sysPermissionInfo")PermissionInfoEntity syspermissionInfo,@Param("permissionInfoVL3") List<PermissionInfoEntity> permissionInfoVL3);
- List<Long> queryAllowedIds(@Param("isGlobal") Integer isGlobal, @Param("sysPermissionInfo")PermissionInfoEntity syspermissionInfo,@Param("permissionInfoVL1") List<PermissionInfoEntity> permissionInfoVL1);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteSetNodeRelDao.java b/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteSetNodeRelDao.java
deleted file mode 100644
index 82afb6ee..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteSetNodeRelDao.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.nis.modules.detect.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.detect.entity.DeteSetNodeRelEntity;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.List;
-
-/**
- * 监测信息节点关系表
- *
- * @author nezha
- * @email
- * @date 2019-07-25 16:35:48
- */
-@Mapper
-public interface DeteSetNodeRelDao extends BaseMapper<DeteSetNodeRelEntity> {
- List<DeteSetNodeRelEntity> queryBySystemId(PermissionInfoEntity entity);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeInfoDao.java b/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeInfoDao.java
deleted file mode 100644
index 6eff5c29..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeInfoDao.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.nis.modules.detect.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.detect.entity.DeteTypeInfoEntity;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.Map;
-
-@Mapper
-public interface DeteTypeInfoDao extends BaseMapper<DeteTypeInfoEntity> {
- Map<String, String> queryTables(@Param("sql") String sql);
-
- void createTable(@Param("sql") String sql);
-
- int checkDetectSetConfigExists(@Param("typeId")Long typeId);
-
- void addTableFields(@Param("sql") String sql);
-
- void delTableFields(@Param("sql") String sql);
-
- void alterTableFields(@Param("sql") String sql);
-
- void addTableIndexs(@Param("sql") String sql);
-
- void delTableIndexs(@Param("sql") String sql);
-
- void dropTable(@Param("sql") String sql);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeMetaDao.java b/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeMetaDao.java
deleted file mode 100644
index e6b154e7..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeMetaDao.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.nis.modules.detect.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.detect.entity.DeteTypeMetaEntity;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface DeteTypeMetaDao extends BaseMapper<DeteTypeMetaEntity> {
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeMetaMappingDao.java b/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeMetaMappingDao.java
deleted file mode 100644
index e52a9b1b..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeMetaMappingDao.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.nis.modules.detect.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.detect.entity.DeteTypeMetaMappingEntity;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface DeteTypeMetaMappingDao extends BaseMapper<DeteTypeMetaMappingEntity> {
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeParamDao.java b/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeParamDao.java
deleted file mode 100644
index 8772f29f..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteTypeParamDao.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.nis.modules.detect.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.detect.entity.DeteTypeParamEntity;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface DeteTypeParamDao extends BaseMapper<DeteTypeParamEntity> {
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteWarnInfoDao.java b/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteWarnInfoDao.java
deleted file mode 100644
index 13b0bab0..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteWarnInfoDao.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.nis.modules.detect.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.nis.modules.detect.entity.DeteWarnInfoEntity;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-import java.util.Map;
-
-@Mapper
-public interface DeteWarnInfoDao extends BaseMapper<DeteWarnInfoEntity> {
-
- IPage<DeteWarnInfoEntity> queryList(IPage<DeteWarnInfoEntity> page,@Param("typeId") Long typeId,@Param("setId") Long setId,@Param("name") String name,@Param("allowedSetIds")Long[] allowedSetIds);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteWarnRelDao.java b/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteWarnRelDao.java
deleted file mode 100644
index c5d92573..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/dao/DeteWarnRelDao.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.nis.modules.detect.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.detect.entity.DeteWarnRelEntity;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-import java.util.Map;
-
-@Mapper
-public interface DeteWarnRelDao extends BaseMapper<DeteWarnRelEntity> {
- DeteWarnRelEntity queryWarnRel(@Param("warnId")Long warnId);
-
- List<DeteWarnRelEntity> queryByTypeId(@Param("typeId")Long typeId);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteSetInfoEntity.java b/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteSetInfoEntity.java
deleted file mode 100644
index fe3b2604..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteSetInfoEntity.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package com.nis.modules.detect.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.nis.modules.detect.entity.DeteTypeInfoEntity;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-/**
- * 监测设置信息表
- *
- * @author nezha
- * @email
- * @date 2019-07-25 16:35:48
- */
-@Data
-@TableName("dete_set_info")
-@KeySequence(value="seq_dete_set_info")
-public class DeteSetInfoEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @TableId(type=IdType.INPUT)
- private Long id;
- /**
- * 设置名称,唯一索引
- */
- private String name;
- /**
- * 类别id
- */
- private Long typeId;
- /**
- * 1:内置,2:用户自定义,默认2
- */
- private String buildIn;
- /**
- * 类别定义的参数,多个逗号分隔,参数内逗号需要转义
- */
- private String params;
- /**
- * 1:用户组,2:系统内全部人员,3:无限制,默认2
- */
- private String viewLevel;
- /**
- * 状态,1:删除,2:停止,3:监控中
- */
- private String state;
- /**
- * 备注
- */
- private String remark;
- /**
- * name i18n code值
- */
- private String i18nCode;
- /**
- * 操作人
- */
- private Long operator;
- /**
- * 操作时间
- */
- private Date opTime;
-
-
- /**
- * 权限记录
- */
- @TableField(exist=false)
- private PermissionInfoEntity permission;
- /**
- * 节点组id
- * */
- @TableField(exist=false)
- private Long[] nodeGroupIds;
- /**
- * 节点seqId
- * */
- @TableField(exist=false)
- private Long[] nodeIds;
-
- @TableField(exist=false)
- private DeteTypeInfoEntity type;
-
- @TableField(exist=false)
- private List<NodeGroupInfoEntity> nodeGroups;
-
- @TableField(exist=false)
- private List<NodeInfoEntity> nodes;
-
- @TableField(exist=false)
- private Long[] viewerId;
-
- @TableField(exist=false)
- private List viewer;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteSetNodeRelEntity.java b/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteSetNodeRelEntity.java
deleted file mode 100644
index 100f9f5a..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteSetNodeRelEntity.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.nis.modules.detect.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 监测信息节点关系表
- *
- * @author nezha
- * @email
- * @date 2019-07-25 16:35:48
- */
-@Data
-@TableName("dete_set_node_rel")
-@KeySequence(value="seq_dete_set_node_rel")
-public class DeteSetNodeRelEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- *
- */
- @TableId(type=IdType.INPUT)
- private Long id;
- /**
- * 设置id
- */
- private Long setId;
- /**
- * 1、node,2、nodeGroup
- */
- private Long type;
- /**
- * 关联id
- */
- private Long relId;
- /**
- * 是否删除,1:删除,0:未删除,默认:0
- */
- @TableLogic
- private String delFlag;
- /**
- *
- */
- private Long operator;
- /**
- * 操作时间
- */
- private Date opTime;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeInfoEntity.java b/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeInfoEntity.java
deleted file mode 100644
index 2c75d613..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeInfoEntity.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.nis.modules.detect.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-@Data
-@TableName("dete_type_info")
-@KeySequence("seq_dete_type_info")
-public class DeteTypeInfoEntity implements Serializable {
- private static final long serialVersionUID = 1L;
- @TableId(type=IdType.INPUT)
- private Long id;
- //类别名称
- private String name;
- //查看权限
- private String viewLevel; //1:用户组,2:系统内全部人员,3:无限制,默认2
- //监控方式
- private String method; //1、脚本,2、snmp,3、内置,默认:1
- //监控间隔
- private Integer deteInterval; //监控间隔,单位:s,默认:60
- //内容
- private String content; //1、脚本储存路径,2、oid,可以为空,3、类全路径
- //是否内置
- private String buildIn; //1、隐藏界面不显示,2、内置,不允许修改,3、用户自定义,默认3
- //表名
- private String tableName; //di_name,用户不在填写
- //版本号
- private Integer version;
- //国际化code
- private String i18nCode; //name 的国际化 code,不为空时name显示翻译后的内容,为空直接显示
- //备注
- private String remark; //备注
- //是否删除
- @TableLogic
- private String delFlag; //是否删除,1:删除,0:未删除,默认:0
- //操作人
- private Long operator; //操作人
- //操作时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date opTime;
- //监测类别对应监测元数据
- @TableField(exist = false)
- private List<DeteTypeMetaEntity> deteTypeMetas;
- //监测类别对应参数信息
- @TableField(exist = false)
- private List<DeteTypeParamEntity> deteTypeParams;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaEntity.java b/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaEntity.java
deleted file mode 100644
index 1f609337..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaEntity.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.nis.modules.detect.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-@Data
-@TableName("dete_type_meta")
-@KeySequence("seq_dete_type_meta")
-public class DeteTypeMetaEntity implements Serializable {
- private static final long serialVersionUID = 1L;
- @TableId(type= IdType.INPUT)
- private Long id;
- //显示名称
- private String name; //显示名称,唯一索引
- //数据库字段名称
- private String fieldName; //数据库字段名称,不需要用户填写,使用name值去除特殊字符
- //类别id
- private Long typeId;
- //字段分类
- private String fieldType; //字段分类,1:Tag 数据库添加索引 ,2:field 普通字段, 3:temp 临时字段,数据传输不入库, 4:cal 计算字段,根据field,temp计算得出
- //数据类型
- private String dataType; //数据类型,1:counter,需要根据上一个监测周期的数据差值计算2:gauge瞬时值 3:string 字符类型
- //数据长度
- private Integer dataLenth;
- @TableField(exist = false)
- private Integer decimalPointLimit=2;
- //排序
- private Integer sort;
- //snmp oid
- private String oid;
- //单位
- private String unit;
- //字典类型
- private String dicType; //与DETE_TYPE_META_MAPPING表的type关联
-
- //国际化code
- private String i18nCode; //name 的国际化 code,不为空时name显示翻译后的内容,为空直接显示
- //备注
- private String remark; //备注
- //是否删除
- @TableLogic
- private String delFlag; //是否删除,1:删除,0:未删除,默认:0
- //操作人
- private Long operator; //操作人
- //操作时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date opTime;
-
-
- @Override
- public String toString() {
- return "fieldName="+fieldName;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaMappingEntity.java b/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaMappingEntity.java
deleted file mode 100644
index b513255c..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaMappingEntity.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.nis.modules.detect.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-@Data
-@TableName("dete_type_meta_mapping")
-@KeySequence("seq_dete_type_meta_mapping")
-public class DeteTypeMetaMappingEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @TableId(type= IdType.INPUT)
- private Long id;
- //映射类型
- private String type;
- //原值
- private String val;
- //映射后值
- private String mapping;
- //是否删除
- @TableLogic
- private String delFlag; //是否删除,1:删除,0:未删除,默认:0
- //操作人
- private Long operator; //操作人
- //操作时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date opTime;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaMapppingVO.java b/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaMapppingVO.java
deleted file mode 100644
index d0866341..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeMetaMapppingVO.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.nis.modules.detect.entity;
-
-import lombok.Data;
-
-import java.util.List;
-@Data
-public class DeteTypeMetaMapppingVO {
-
- private String type;
- private List<DeteTypeMetaMappingEntity> mappings;
-
- public void setMappings(List<DeteTypeMetaMappingEntity> mappings) {
- this.mappings = mappings;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeParamEntity.java b/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeParamEntity.java
deleted file mode 100644
index 97256ea2..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteTypeParamEntity.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.nis.modules.detect.entity;
-
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-@Data
-@TableName("dete_type_param")
-@KeySequence("seq_dete_type_param")
-public class DeteTypeParamEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @TableId(type= IdType.INPUT)
- private Long id;
-
- private Long typeId;
-
- private String name;
- //参数索引
- private Integer paramIndex;
- //参数默认值
- private String defVal;
-
- //是否删除
- @TableLogic
- private String delFlag; //是否删除,1:删除,0:未删除,默认:0
- //操作人
- private Long operator; //操作人
- //操作时间
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date opTime;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteWarnInfoEntity.java b/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteWarnInfoEntity.java
deleted file mode 100644
index 009faa3c..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteWarnInfoEntity.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.nis.modules.detect.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import lombok.Data;
-
-import java.util.Date;
-import java.util.List;
-
-@Data
-@TableName("dete_warn_info")
-@KeySequence("seq_dete_warn_info")
-public class DeteWarnInfoEntity {
- @TableId(type = IdType.INPUT)
- private Long id;
-
- /**
- * 告警名称
- * 唯一字段
- * */
- private String name;
- /**
- * 告警字段
- * */
- private Long metaId;
-
- /**
- * 触发条件
- * 1:阈值触发,
- * 2:变化触发,当本次监测数值与上次不一致时触发,用于配置文件是否修改等,
- * 3:主动,默认:1
- * */
- private String triggerType;
- /**
- *告警模式,1、单台,2、汇总
- * */
- private String warnMode;
- /**
- * 统计方式
- *1:avg2:count3:sum4:min5:max,默认:1
- * */
- private String statType;
- /**
- *符号
- * 1:>,2:<,3:=,4:equals,5:include,6:exclude,默认:1
- * */
- private String symbol;
-
- /**
- *阈值
- * */
- private String threshold;
- /**
- *告警提示信息
- * */
- private String tips;
- /**
- *告警级别,1:normal,2:info,3:warning,4:error,默认:3
- * */
- private String warnLevel;
- /**
- *回调方式,0:无,1:shell,2:http,默认:0
- * */
- private String callbackType;
- /**
- *回调内容
- */
- private String callbackContent;
-
- /**
- * 查看权限 1:用户组,2:系统内全部人员,3:无限制,默认2
- * */
- private String viewLevel;
-
- /**
- *备注
- * */
- private String remark;
- /**
- * 是否删除,1:删除,0:未删除,默认:0
- * */
- @TableLogic
- private String delFlag;
-
- private Long operator;
-
- private Date opTime;
-
- @TableField(exist = false)
- private DeteTypeInfoEntity deteType;
-
- @TableField(exist = false)
- private List<DeteSetInfoEntity> deteSet;
- @TableField(exist = false)
- private DeteTypeMetaEntity meta;
-
- @TableField(exist = false)
- private Long deteTypeId;
-
- @TableField(exist = false)
- private Long[] deteSetIds;
-
-
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteWarnRelEntity.java b/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteWarnRelEntity.java
deleted file mode 100644
index 5c2e1b33..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/entity/DeteWarnRelEntity.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.nis.modules.detect.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import lombok.Data;
-
-import java.util.Date;
-
-@Data
-@TableName("dete_warn_rel")
-@KeySequence("seq_dete_warn_rel")
-public class DeteWarnRelEntity {
- @TableId(type= IdType.INPUT)
- private Long id;
- /**
- *告警id
- * */
- private Long warnId;
-
- /**
- *关联方式,1、type,2、set
- * */
- private String relType;
- /**
- *关联id
- * */
- private Long relId;
-
- @TableLogic
- private String delFlag;
-
- /**
- * 操作人
- */
- private Long operator;
- /**
- * 操作时间
- */
- private Date opTime;
-
- @TableField(exist = false)
- private String relIds;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteCommonService.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteCommonService.java
deleted file mode 100644
index a3289505..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteCommonService.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.nis.modules.detect.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.springframework.web.multipart.MultipartFile;
-
-public interface DeteCommonService<T> extends IService<T>{
- boolean checkFieldExists(Long id,String field,String value);
- String formatString(String tableName);
-
- boolean checkNameExists(String name,Long id);
- boolean checkFieldIsValide(String type,String code);
- boolean checkViewLevelValide(String code);
- boolean checkTypeExists(Long typeId);
-
- String getUploadFileJson(MultipartFile file);
- void uploadFile(String jsonInfo,MultipartFile file);
- void delUploadFile(String jsonInfo);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteMetaMappingService.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteMetaMappingService.java
deleted file mode 100644
index 62886a21..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteMetaMappingService.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.nis.modules.detect.service;
-
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.modules.detect.entity.DeteTypeMetaMappingEntity;
-import com.nis.modules.detect.entity.DeteTypeMetaMapppingVO;
-
-import java.util.List;
-import java.util.Map;
-
-public interface DeteMetaMappingService extends DeteCommonService<DeteTypeMetaMappingEntity> {
- PageUtils queryMetaMappingPage(Map<String, Object> params);
-
- void saveDicts(List<DeteTypeMetaMappingEntity> mappings);
-
- void updateDict(DeteTypeMetaMapppingVO deteTypeMetaMapppingVO);
-
- R deleteDic(String ... types);
-
- boolean checkMetaMappingTypeExists(String type);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteMetaService.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteMetaService.java
deleted file mode 100644
index 3dfe5746..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteMetaService.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.nis.modules.detect.service;
-
-import com.nis.modules.detect.entity.DeteTypeMetaEntity;
-
-public interface DeteMetaService extends DeteCommonService<DeteTypeMetaEntity> {
- boolean checkFieldTypeIsValide(DeteTypeMetaEntity deteTypeMetaEntity);
- boolean checkDataTypeIsValide(DeteTypeMetaEntity deteTypeMetaEntity);
- boolean checkFieldNameExists(DeteTypeMetaEntity deteTypeMetaEntity);
- boolean checkNameExists(DeteTypeMetaEntity deteTypeMetaEntity);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteParamService.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteParamService.java
deleted file mode 100644
index 533feaff..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteParamService.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.nis.modules.detect.service;
-
-import com.nis.modules.detect.entity.DeteTypeParamEntity;
-
-public interface DeteParamService extends DeteCommonService<DeteTypeParamEntity> {
- boolean checkNameExists(DeteTypeParamEntity deteTypeParamEntity);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteSetInfoService.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteSetInfoService.java
deleted file mode 100644
index 9b5d7b05..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteSetInfoService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.nis.modules.detect.service;
-
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.detect.entity.DeteSetInfoEntity;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 监测设置信息表
- *
- * @author nezha
- * @email
- * @date 2019-07-25 16:35:48
- */
-public interface DeteSetInfoService extends DeteCommonService<DeteSetInfoEntity> {
-
- PageUtils queryPage(Map<String, Object> params);
-
- List<DeteSetInfoEntity> queryByPermission(PermissionInfoEntity entity);
-
- void saveEntity(DeteSetInfoEntity deteSetInfo);
-
- void updateEntity(DeteSetInfoEntity deteSetInfo);
-
- void changeStateByIds(Long[] ids, String state);
-
- void deleteByTypeId(Long typeId);
-
- DeteSetInfoEntity queryDetail(Long id);
-
- List<Long> queryAllowedSetIds();
-
- boolean checkDeteSetExsits(Long[] ids);
-
- boolean isBuildIn(DeteSetInfoEntity deteSetInfoEntity);
-
- boolean nodeOrNodeGroupValide(DeteSetInfoEntity deteSetInfoEntity);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteSetNodeRelService.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteSetNodeRelService.java
deleted file mode 100644
index 5bf23720..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteSetNodeRelService.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.nis.modules.detect.service;
-
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.detect.entity.DeteSetNodeRelEntity;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 监测信息节点关系表
- *
- * @author nezha
- * @email
- * @date 2019-07-25 16:35:48
- */
-public interface DeteSetNodeRelService extends DeteCommonService<DeteSetNodeRelEntity> {
-
- PageUtils queryPage(Map<String, Object> params);
-
- List<DeteSetNodeRelEntity> queryBySystemId(PermissionInfoEntity entity);
-
- void deleteBySetId(Long id);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteTypeInfoService.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteTypeInfoService.java
deleted file mode 100644
index d65545fc..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteTypeInfoService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.nis.modules.detect.service;
-
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.detect.entity.DeteTypeInfoEntity;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.Map;
-
-public interface DeteTypeInfoService extends DeteCommonService<DeteTypeInfoEntity> {
- PageUtils queryPage(Map<String, Object> params);
-
- DeteTypeInfoEntity queryDetail(Long id);
-
- void saveEntity(DeteTypeInfoEntity deteTypeInfo,MultipartFile file);
-
- void updateEntity(DeteTypeInfoEntity deteTypeInfo,MultipartFile file);
-
- boolean checkTablesExists(String tableName);
-
- void validatePassDate(DeteTypeInfoEntity deteTypeInfo, MultipartFile file);
-
- void deleteEntity(Long... id);
-
- boolean checkDeteMethodIsValide(DeteTypeInfoEntity deteTypeInfo);
-
- boolean isBuildIn(DeteTypeInfoEntity deteTypeInfoEntity);
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteWarnInfoService.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteWarnInfoService.java
deleted file mode 100644
index 33f0bee3..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteWarnInfoService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.nis.modules.detect.service;
-
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.detect.entity.DeteWarnInfoEntity;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.Map;
-
-public interface DeteWarnInfoService extends DeteCommonService<DeteWarnInfoEntity> {
- void saveEntity(DeteWarnInfoEntity deteWarnInfoEntity,MultipartFile file);
-
- void updateEntity(DeteWarnInfoEntity deteWarnInfoEntity,MultipartFile file);
-
- void deleteEntity(Long[] ids);
-
- PageUtils queryPage(Map<String, Object> params);
-
- DeteWarnInfoEntity queryDetail(Long id);
-
- void deleteByTypeId(Long typeId);
-
- boolean checkTriggerTypeIsValide(DeteWarnInfoEntity deteWarnInfoEntity);
-
- boolean checkWarnModeIsValide(DeteWarnInfoEntity deteWarnInfoEntity);
-
- boolean checkStatTypeIsValide(DeteWarnInfoEntity deteWarnInfoEntity);
-
- boolean checkSymbolIsValide(DeteWarnInfoEntity deteWarnInfoEntity);
-
- boolean checkWarnLevelIsValide(DeteWarnInfoEntity deteWarnInfoEntity);
-
- boolean checkCallbackTypeIsValide(DeteWarnInfoEntity deteWarnInfoEntity);
-
- boolean checkCallbackContentIsValide(DeteWarnInfoEntity deteWarnInfoEntity);
-
- boolean checkThresholdIsValide(DeteWarnInfoEntity deteWarnInfoEntity);
-
- boolean checkCallbackScirptFileIsValide(DeteWarnInfoEntity deteWarnInfoEntity, MultipartFile file);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteWarnRelService.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteWarnRelService.java
deleted file mode 100644
index b42cc607..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/DeteWarnRelService.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.nis.modules.detect.service;
-
-import com.nis.modules.detect.entity.DeteWarnRelEntity;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface DeteWarnRelService extends DeteCommonService<DeteWarnRelEntity> {
- List<DeteWarnRelEntity> queryByTypeId(@Param("typeId")Long typeId);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteCommonServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteCommonServiceImpl.java
deleted file mode 100644
index e65b761d..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteCommonServiceImpl.java
+++ /dev/null
@@ -1,260 +0,0 @@
-package com.nis.modules.detect.service.impl;
-
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.toolkit.StringUtils;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.exception.NZException;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.RCode;
-import com.nis.modules.detect.entity.DeteTypeInfoEntity;
-import com.nis.modules.detect.service.DeteCommonService;
-import com.nis.modules.detect.service.DeteTypeInfoService;
-import com.nis.modules.mission.utils.FileUtil;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import com.nis.modules.sys.entity.SysDictEntity;
-import com.nis.modules.sys.entity.UserUsergroupEntity;
-import com.nis.modules.sys.service.SysDictService;
-import com.nis.modules.sys.service.UserUsergroupService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.ApplicationArguments;
-import org.springframework.boot.ApplicationRunner;
-import org.springframework.core.env.Environment;
-import org.springframework.util.ResourceUtils;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.File;
-import java.util.*;
-
-public class DeteCommonServiceImpl<M extends BaseMapper<T>,T> extends ServiceImpl<M ,T> implements DeteCommonService<T> , ApplicationRunner {
-
- @Autowired
- private UserUsergroupService userUsergroupService;
- @Autowired
- private SysDictService sysDictService;
- @Autowired
- private DeteTypeInfoService deteTypeInfoService;
- @Autowired
- private Environment environment;
-
- public static Map<String,Set<String>> sysDic=new HashMap<String, Set<String>>();
-
- protected final String DIC_VIEWLEVEL="viewLevel";
- protected final String DIC_DETEMETHOD="dtmethond";
- protected final String DIC_FIELDTYPE="fieldType";
- protected final String DIC_DATATYPE="dataType";
- protected final String DIC_TRIGGERTYPE="triggerType";
- protected final String DIC_WARNMODE="warnMode";
- protected final String DIC_STATTYPE="statType";
- protected final String DIC_SYMBOL="symbol";
- protected final String DIC_WARNLEVEL="warnLevel";
- protected final String DIC_CALLBACKTYPE="callbackType";
- /**
- * @Description 查询表字段是否存在相同的值 不检查自身(update时)
- * @Author rui
- * @Date 2019/8/16
- * @Param
- * @Return
- * @Exception
- */
- public boolean checkFieldExists(Long id,String field,String value){
- if(StringUtils.isEmpty(field)||StringUtils.isEmpty(value)){
- throw new NZException(RCode.DETE_ERROR);
- }
- List<T> list = this.list(new QueryWrapper<T>()
- .ne(id!=null,"id",id)
- .eq(field, value));
-
- return list!=null&&list.size()>0;
- }
- /**
- * @Description去除字符串中的特殊字符
- * @Author rui
- * @Date 2019/7/26
- * @Param
- * @Return
- * @Exception
- */
- public String formatString(String str) {
-
- return str.replaceAll("\\W", "").toUpperCase();
- }
-
- /**
- * @Description 返回viewLevel=1的queryWrapper
- * @Author rui
- * @Date 2019/8/16
- * @Param type --> Constant.PM_TYPE_DETESET = "2";Constant.PM_TYPE_DETEWARN = "3";
- * @Return
- * @Exception
- */
- public QueryWrapper<PermissionInfoEntity> getPermissionInfoVL1QueryWrapper(String type,Long userId){
- QueryWrapper<PermissionInfoEntity> permissionInfoVL1QueryWrapper = new QueryWrapper<>();
- permissionInfoVL1QueryWrapper.eq("type",type);
- permissionInfoVL1QueryWrapper.eq("view_level",Constant.VIEWLEVEL_UG);
-
- //查询当前用户所在用户组
- QueryWrapper<UserUsergroupEntity> userUsergroupQueryWrapper = new QueryWrapper<>();
- userUsergroupQueryWrapper.eq("user_id",userId);
- List<UserUsergroupEntity> userUserGroupList = userUsergroupService.list(userUsergroupQueryWrapper);
- Long[] groupIds=new Long[userUserGroupList.size()];
- for(int i=0;i<userUserGroupList.size();i++){
- groupIds[i]=userUserGroupList.get(i).getGroupId();
- }
-
- permissionInfoVL1QueryWrapper.in("rel_id",groupIds);
- return permissionInfoVL1QueryWrapper;
- }
-
- /**
- * @Description 返回viewLevel=2的queryWrapper
- * @Author rui
- * @Date 2019/8/16
- * @Param
- * @Return
- * @Exception
- */
- public QueryWrapper<PermissionInfoEntity> getPermissionInfoVL2QueryWrapper(String type,Long systemId){
- QueryWrapper<PermissionInfoEntity> permissionInfoVL2QueryWrapper = new QueryWrapper<>();
- permissionInfoVL2QueryWrapper.eq("type", type);
- permissionInfoVL2QueryWrapper.eq("view_level",Constant.VIEWLEVEL_SYS);
- permissionInfoVL2QueryWrapper.eq("rel_id",systemId);
- return permissionInfoVL2QueryWrapper;
- }
-
- public boolean checkNameExists(String name,Long id){
- return checkFieldExists(id,"name",name);
- }
-
- public boolean checkFieldIsValide(String type,String code){
-
- return sysDic.get(type).contains(code);
- }
-
- /**
- * @Description 校验viewLevel合法性
- * @Author rui
- * @Date
- * @Param [code]
- * @Return boolean
- * @Exception
- */
- public boolean checkViewLevelValide(String code){
- return checkFieldIsValide(DIC_VIEWLEVEL,code);
- }
-
- @Override
- public boolean checkTypeExists(Long typeId) {
- DeteTypeInfoEntity typeInfo = deteTypeInfoService.getById(typeId);
- return typeInfo!=null;
- }
- @Override
- public void run(ApplicationArguments args) throws Exception {
- if(sysDic.size()!=0){
- return ;
- }
- List<SysDictEntity> sysDics = sysDictService.list();
- for (SysDictEntity sysDicEntity:sysDics){
- String type=sysDicEntity.getType();
- String code=sysDicEntity.getCode();
- Set<String> codes = sysDic.get(type);
- if(codes==null){
- codes=new HashSet<String>();
- }
- codes.add(code);
- sysDic.put(type,codes);
- }
- }
- @Override
- public String getUploadFileJson(MultipartFile file){
-
- Map<String,String> map=new HashMap<String,String>();
- String originalFilename = file.getOriginalFilename();
- map.put("fileName",originalFilename);
-
- long size = file.getSize();
- String formetSize = new FileUtil().FormetFileSize(size);
-
- map.put("fileSize",formetSize);
-
-// String rootPath=null;
-// try{
-// rootPath= ResourceUtils.getURL("classpath:").getPath();
-// System.out.println(rootPath);
-// }catch (Exception e){
-// e.printStackTrace();
-// }
-
- String configUploadPath= environment.getProperty("upload.path");
-
-// String uploadPath=rootPath+configUploadPath;
- map.put("uploadPath",configUploadPath);
-
- String fileName=configUploadPath+ FileUtil.addTimeTagForUploadFileName(originalFilename);
-
- map.put("filePath",fileName);
-
- return JSON.toJSONString(map);
- }
- @Override
- public void uploadFile(String jsonInfo,MultipartFile file){
-
- Map<String,String> map=JSON.parseObject(jsonInfo,HashMap.class);
-
- String rootPath=null;
- try{
- rootPath= ResourceUtils.getURL("classpath:").getPath();
- }catch (Exception e){
- e.printStackTrace();
- }
-
- String uploadPath=rootPath+map.get("uploadPath");
- String filePath=map.get("filePath");
-
- File uploadDir=new File(uploadPath);
- if(!uploadDir.exists()){
- uploadDir.mkdirs();
- }else{//存在同名文件/文件夹
- if(!uploadDir.isDirectory()){//是一个同名文件
- uploadDir.delete();
- uploadDir.mkdirs();
- }
- }
-
- File destFile=new File(rootPath+filePath);
- if(destFile.exists()){
- destFile.delete();
- }
- try{
- file.transferTo(destFile);
-
- }catch (Exception e){
- System.out.println(e);
- e.printStackTrace();
- }
-
- }
-
- public void delUploadFile(String jsonInfo){
- try {
- Map<String,String> map=JSON.parseObject(jsonInfo,HashMap.class);
- String filePath = map.get("filePath");
-
- String rootPath=null;
- try{
- rootPath= ResourceUtils.getURL("classpath:").getPath();
- }catch (Exception e){
- e.printStackTrace();
- }
-
- File file=new File(rootPath+filePath);
- if(file.exists()){
- file.delete();
- }
- }catch (Exception e){
- e.printStackTrace();
- }
-
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteMetaMappingServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteMetaMappingServiceImpl.java
deleted file mode 100644
index d72e74a8..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteMetaMappingServiceImpl.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package com.nis.modules.detect.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.nis.common.exception.NZException;
-import com.nis.common.utils.*;
-import com.nis.modules.detect.dao.DeteTypeMetaMappingDao;
-import com.nis.modules.detect.entity.DeteTypeMetaEntity;
-import com.nis.modules.detect.entity.DeteTypeMetaMappingEntity;
-import com.nis.modules.detect.entity.DeteTypeMetaMapppingVO;
-import com.nis.modules.detect.service.DeteMetaMappingService;
-import com.nis.modules.detect.service.DeteMetaService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import sun.rmi.runtime.Log;
-
-import java.util.*;
-
-@Service("deteTypeMetaMappingService")
-public class DeteMetaMappingServiceImpl extends DeteCommonServiceImpl<DeteTypeMetaMappingDao, DeteTypeMetaMappingEntity> implements DeteMetaMappingService {
- private Logger log= LoggerFactory.getLogger(DeteMetaMappingServiceImpl.class);
- @Autowired
- private DeteMetaService deteTypeMetaService;
- @Override
- public PageUtils queryMetaMappingPage(Map<String, Object> params) {
- String type = (String) params.get("type");
-
- IPage<DeteTypeMetaMappingEntity> page =this.page(
- new Query<DeteTypeMetaMappingEntity>().getPage(params),
- new QueryWrapper<DeteTypeMetaMappingEntity>()
- .like(StringUtils.isNotBlank(type), "type", type)
- .groupBy("type")
- );
- List<String> types=new ArrayList<String>();
- for(DeteTypeMetaMappingEntity metaMapping:page.getRecords()){
- types.add(metaMapping.getType());
- }
-
- QueryWrapper<DeteTypeMetaMappingEntity> queryWrapper=new QueryWrapper<DeteTypeMetaMappingEntity>();
- queryWrapper.in("type",types);
-
- List<DeteTypeMetaMappingEntity> records = this.list(queryWrapper);
-
-// List<DeteTypeMetaMappingEntity> records = page.getRecords();
- HashMap<String, DeteTypeMetaMapppingVO> metaMappingFilter = new HashMap<>();
- List<DeteTypeMetaMapppingVO> mappingInfos=new ArrayList<>();
- for(DeteTypeMetaMappingEntity metaMappingEntity:records){
- String typeName = metaMappingEntity.getType();
- if(metaMappingFilter.containsKey(typeName)){
- DeteTypeMetaMapppingVO deteTypeMetaMapppingVO = metaMappingFilter.get(typeName);
- List<DeteTypeMetaMappingEntity> mappings = deteTypeMetaMapppingVO.getMappings();
- mappings.add(metaMappingEntity);
- }else{
- DeteTypeMetaMapppingVO deteTypeMetaMapppingVO=new DeteTypeMetaMapppingVO();
- deteTypeMetaMapppingVO.setType(typeName);
- List<DeteTypeMetaMappingEntity> list=new ArrayList<DeteTypeMetaMappingEntity>();
- list.add(metaMappingEntity);
- deteTypeMetaMapppingVO.setMappings(list);
- metaMappingFilter.put(typeName,deteTypeMetaMapppingVO);
- mappingInfos.add(deteTypeMetaMapppingVO);
- }
- }
-
-
- return new PageUtils(mappingInfos,(int)page.getTotal(),(int)page.getSize(),(int)page.getCurrent());
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void saveDicts(List<DeteTypeMetaMappingEntity> mappings) {
- this.saveBatch(mappings);
- log.info("save detect type meta mapping info success! size[{}]",mappings.size());
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void updateDict(DeteTypeMetaMapppingVO deteTypeMetaMapppingVO) {
- String oldTypeName=null;
- Long userId=ShiroUtils.getUserId();
- Date curDate=new Date();
- List<DeteTypeMetaMappingEntity> mappings = deteTypeMetaMapppingVO.getMappings();
- for(int i=0;i<mappings.size();i++){
- DeteTypeMetaMappingEntity mapping=mappings.get(i);
- if(mapping.getId()!=null){
- DeteTypeMetaMappingEntity oldMapping = this.getById(mapping.getId());
- if(oldMapping==null){
- if(i != mappings.size()-1){
- continue;
- }else{
- throw new NZException(RCode.METAMAPPING_TYPE_INVALID);
- }
- }else{
- oldTypeName=oldMapping.getType();
- }
-
- }
- break;
- }
- int saveCount=0;
- int updateCount=0;
- for(DeteTypeMetaMappingEntity mapping:mappings){
- mapping.setType(oldTypeName); //type不允许修改
- mapping.setOpTime(curDate);
- mapping.setOperator(userId);
- if(mapping.getId()==null){
- this.save(mapping);
- saveCount++;
- }else{
- UpdateWrapper<DeteTypeMetaMappingEntity> updateWrapper = new UpdateWrapper<>();
- updateWrapper.set("operator",userId);
- updateWrapper.set("op_time",curDate);
- updateWrapper.set(mapping.getDelFlag()!=null,"del_flag",mapping.getDelFlag());
- updateWrapper.eq("id",mapping.getId());
- this.update(mapping,updateWrapper);
- updateCount++;
- }
- }
- log.info("update deteTypeMetaMapping success! new[{}] , update[{}]",saveCount,updateCount);
-
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public R deleteDic(String ... types) {
- if(checkTypeUsed(types)){
- return R.error(RCode.DICT_TYPE_USED);
- }else{
- UpdateWrapper<DeteTypeMetaMappingEntity> updateWrapper = new UpdateWrapper<>();
- updateWrapper.set("del_flag", Constant.DELFLAG_TRUE);
- updateWrapper.set("operator",ShiroUtils.getUserId());
- updateWrapper.set("op_time",new Date());
- updateWrapper.in("type",types);
- this.update(updateWrapper);
- log.info("delete deteTypeMetaMapping {} success!",Arrays.asList(types));
- return R.ok();
- }
-
- }
-
- private boolean checkTypeUsed(String ... type) {
- List<DeteTypeMetaEntity> list = deteTypeMetaService.list(new QueryWrapper<DeteTypeMetaEntity>().in("dic_type", type));
- return list!=null&&list.size()>0;
- }
-
- @Override
- public boolean checkMetaMappingTypeExists(String type) {
- return checkFieldExists(null,"type",type);
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteMetaServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteMetaServiceImpl.java
deleted file mode 100644
index 073de13d..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteMetaServiceImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.nis.modules.detect.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.nis.modules.detect.dao.DeteTypeMetaDao;
-import com.nis.modules.detect.entity.DeteTypeMetaEntity;
-import com.nis.modules.detect.service.DeteMetaService;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service("deteTypeMetaService")
-public class DeteMetaServiceImpl extends DeteCommonServiceImpl<DeteTypeMetaDao, DeteTypeMetaEntity> implements DeteMetaService {
- public boolean checkFieldTypeIsValide(DeteTypeMetaEntity deteTypeMetaEntity){
- return checkFieldIsValide(DIC_FIELDTYPE,deteTypeMetaEntity.getFieldType());
- }
- public boolean checkDataTypeIsValide(DeteTypeMetaEntity deteTypeMetaEntity){
- return checkFieldIsValide(DIC_DATATYPE,deteTypeMetaEntity.getDataType());
- }
-
- public boolean checkNameExists(DeteTypeMetaEntity deteTypeMetaEntity){
- QueryWrapper<DeteTypeMetaEntity> deteTypeMetaQueryWrapper = new QueryWrapper<>();
- deteTypeMetaQueryWrapper.ne(deteTypeMetaEntity.getId()!=null,"id",deteTypeMetaEntity.getId());
- deteTypeMetaQueryWrapper.eq("type_id",deteTypeMetaEntity.getTypeId());
- deteTypeMetaQueryWrapper.eq("name",deteTypeMetaEntity.getName());
- List<DeteTypeMetaEntity> list = this.list(deteTypeMetaQueryWrapper);
- return list!=null&&list.size()>0;
- }
-
- public boolean checkFieldNameExists(DeteTypeMetaEntity deteTypeMetaEntity){
- QueryWrapper<DeteTypeMetaEntity> deteTypeMetaQueryWrapper = new QueryWrapper<>();
- deteTypeMetaQueryWrapper.ne(deteTypeMetaEntity.getId()!=null,"id",deteTypeMetaEntity.getId());
- deteTypeMetaQueryWrapper.eq("type_id",deteTypeMetaEntity.getTypeId());
- deteTypeMetaQueryWrapper.eq("field_name",deteTypeMetaEntity.getFieldName());
- List<DeteTypeMetaEntity> list = this.list(deteTypeMetaQueryWrapper);
- return list!=null&&list.size()>0;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteParamServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteParamServiceImpl.java
deleted file mode 100644
index 62a0e175..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteParamServiceImpl.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.nis.modules.detect.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.nis.modules.detect.dao.DeteTypeParamDao;
-import com.nis.modules.detect.entity.DeteTypeMetaEntity;
-import com.nis.modules.detect.entity.DeteTypeParamEntity;
-import com.nis.modules.detect.service.DeteParamService;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service("deteTypeParamService")
-public class DeteParamServiceImpl extends DeteCommonServiceImpl<DeteTypeParamDao, DeteTypeParamEntity> implements DeteParamService {
- public boolean checkNameExists(DeteTypeParamEntity deteTypeParamEntity){
- QueryWrapper<DeteTypeParamEntity> deteParamQueryWrapper = new QueryWrapper<DeteTypeParamEntity>();
- deteParamQueryWrapper.ne(deteTypeParamEntity.getId()!=null,"id",deteTypeParamEntity.getId());
- deteParamQueryWrapper.eq("type_id",deteTypeParamEntity.getTypeId());
- deteParamQueryWrapper.eq("name",deteTypeParamEntity.getName());
- List<DeteTypeParamEntity> list = this.list(deteParamQueryWrapper);
- return list!=null&&list.size()>0;
- }
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteSetInfoServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteSetInfoServiceImpl.java
deleted file mode 100644
index fe61ce65..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteSetInfoServiceImpl.java
+++ /dev/null
@@ -1,451 +0,0 @@
-package com.nis.modules.detect.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.nis.common.exception.NZException;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.Query;
-import com.nis.common.utils.RCode;
-import com.nis.modules.detect.dao.DeteSetInfoDao;
-import com.nis.modules.detect.entity.DeteSetInfoEntity;
-import com.nis.modules.detect.entity.DeteSetNodeRelEntity;
-import com.nis.modules.detect.entity.DeteTypeInfoEntity;
-import com.nis.modules.detect.entity.DeteWarnRelEntity;
-import com.nis.modules.detect.service.*;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.node.service.NodeGroupRelService;
-import com.nis.modules.node.service.NodeInfoService;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import com.nis.modules.sys.entity.UserGroupEntity;
-import com.nis.modules.sys.service.PermissionInfoService;
-import com.nis.modules.sys.service.UserUsergroupService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-
-@Service("deteSetInfoService")
-public class DeteSetInfoServiceImpl extends DeteCommonServiceImpl<DeteSetInfoDao, DeteSetInfoEntity> implements DeteSetInfoService {
- private Logger log= LoggerFactory.getLogger(DeteSetInfoServiceImpl.class);
- @Autowired
- private DeteSetNodeRelService deteSetNodeRelService;
- @Autowired
- private PermissionInfoService permissionInfoService;
- @Autowired
- private DeteTypeInfoService deteTypeInfoService;
- @Autowired
- private UserUsergroupService userUsergroupService;
- @Autowired
- private DeteWarnRelService warnRelService;
- @Autowired
- private DeteWarnInfoService deteWarnInfoService;
- @Autowired
- private NodeGroupRelService nodeGroupRelService;
- @Autowired
- private NodeInfoService nodeInfoService;
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
- String sidx=(String)params.get("sidx");
- if(!StringUtils.isNotBlank(sidx)){
- params.put("sidx","state");
- params.put("order","desc");
- }
- IPage<DeteSetInfoEntity> page = new Query<DeteSetInfoEntity>().getPage(params);
- String name=(String)params.get("name");
- String typeIdStr=(String)params.get("typeId");
- Long typeId=null;
- if(StringUtils.isNotBlank(typeIdStr)){
- typeId=Long.parseLong(typeIdStr);
- }
- Integer isGlobal=0; //是否是global业务系统 0:不是 1 是
- if(ShiroUtils.isGlobal()){
- isGlobal=1;
- page=this.getBaseMapper().queryList(page,name,typeId,isGlobal,null,null);
- log.info("global system query... size[{}]",page.getRecords()==null?null:page.getRecords().size());
- }else{
- Long userId = ShiroUtils.getUserId();
- Long currSystemId = ShiroUtils.getCurrSystemId();
-
- //view_level=2 系统内可见
- QueryWrapper<PermissionInfoEntity> permissionInfoVL2QueryWrapper = getPermissionInfoVL2QueryWrapper(Constant.PM_TYPE_DETESET,currSystemId);
- List<PermissionInfoEntity> permissionInfoVL2 = permissionInfoService.list(permissionInfoVL2QueryWrapper);
- PermissionInfoEntity sysPermissionInfo=permissionInfoVL2!=null&&permissionInfoVL2.size()>0?permissionInfoVL2.get(0):null;
- //view_level=1 用户组内可见
- QueryWrapper<PermissionInfoEntity> permissionInfoVL1QueryWrapper = getPermissionInfoVL1QueryWrapper(Constant.PM_TYPE_DETESET,userId);
- List<PermissionInfoEntity> permissionInfoVL1 = permissionInfoService.list(permissionInfoVL1QueryWrapper);
-
- page=this.getBaseMapper().queryList(page,name,typeId,isGlobal,sysPermissionInfo,permissionInfoVL1);
- log.info("#{} system query... size[{}]",currSystemId, page.getRecords()==null?null:page.getRecords().size());
- }
-
- List<DeteSetInfoEntity> list = page.getRecords();
- for(DeteSetInfoEntity setInfo:list){
- setViewer(setInfo);
- }
- return new PageUtils(page);
- }
-
- /**
- * @Description 查询当前用户可见的所有监测设置的id
- * @Author rui
- * @Date 2019/8/19
- * @Param
- * @Return
- * @Exception
- */
- public List<Long> queryAllowedSetIds(){
- List<Long> allowedSetIds=null;
- Integer isGlobal=0; //是否是global业务系统 0:不是 1 是
- if(ShiroUtils.isGlobal()){
- isGlobal=1;
- allowedSetIds = this.getBaseMapper().queryAllowedIds(isGlobal, null, null);
- }else{
- Long userId = ShiroUtils.getUserId();
- Long currSystemId = ShiroUtils.getCurrSystemId();
-
- //view_level=2 系统内可见
- QueryWrapper<PermissionInfoEntity> permissionInfoVL2QueryWrapper = getPermissionInfoVL2QueryWrapper(Constant.PM_TYPE_DETESET,currSystemId);
- List<PermissionInfoEntity> permissionInfoVL2 = permissionInfoService.list(permissionInfoVL2QueryWrapper);
- PermissionInfoEntity sysPermissionInfo=permissionInfoVL2!=null&&permissionInfoVL2.size()>0?permissionInfoVL2.get(0):null;
- //view_level=1 用户组内可见
- QueryWrapper<PermissionInfoEntity> permissionInfoVL1QueryWrapper = getPermissionInfoVL1QueryWrapper(Constant.PM_TYPE_DETESET,userId);
- List<PermissionInfoEntity> permissionInfoVL1 = permissionInfoService.list(permissionInfoVL1QueryWrapper);
- allowedSetIds=this.getBaseMapper().queryAllowedIds(isGlobal,sysPermissionInfo,permissionInfoVL1);
- }
- return allowedSetIds;
- }
-
- @Override
- public List<DeteSetInfoEntity> queryByPermission(PermissionInfoEntity entity) {
- List<DeteSetInfoEntity> queryByPermission = baseMapper.queryByPermission(entity);
- return queryByPermission;
- }
-
-
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void saveEntity(DeteSetInfoEntity deteSetInfo) {
- if(StringUtils.isBlank(deteSetInfo.getViewLevel())){
- deteSetInfo.setViewLevel(Constant.VIEWLEVEL_SYS);
- }
- Long userId = ShiroUtils.getUserId();
- Date date=new Date();
- deteSetInfo.setOperator(userId);
- deteSetInfo.setOpTime(date);
- deteSetInfo.setBuildIn(Constant.SYSTEM_BUILDIN_NO);
- //保存setInfo
- this.save(deteSetInfo);
-
-
- List<PermissionInfoEntity> permissionInfos=new ArrayList<PermissionInfoEntity>();
- //维护set_node_rel
- List<DeteSetNodeRelEntity> setNodeRels=buildRels(deteSetInfo, userId, date);
- deteSetNodeRelService.saveBatch(setNodeRels);
-
- //维护权限表 无限制则不维护权限表
- buildPermissionInfoRel(deteSetInfo, userId, date);
- log.info("save deteSetInfo success! setId[{}],viewLevel[{}],viewer[{}]",deteSetInfo.getId(),deteSetInfo.getViewLevel(),deteSetInfo.getViewerId());
- }
-
-
-
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void updateEntity(DeteSetInfoEntity deteSetInfo) {
- DeteSetInfoEntity oldSet = this.getById(deteSetInfo.getId());
- deteSetInfo.setViewLevel(oldSet.getViewLevel());
- Long userId = ShiroUtils.getUserId();
- Date date=new Date();
- deteSetInfo.setOperator(userId);
- deteSetInfo.setOpTime(date);
- deteSetInfo.setBuildIn(oldSet.getBuildIn());
- this.updateById(deteSetInfo);
-
- //删除以前已经建立的关系
- deteSetNodeRelService.deleteBySetId(deteSetInfo.getId());
-
- //添加新的关系
- List<DeteSetNodeRelEntity> setNodeRels = buildRels(deteSetInfo, userId, date);
- deteSetNodeRelService.saveBatch(setNodeRels);
-
- //viewLevel 不允许修改,viewer可以修改,用于用户组变化时
-
- if(Constant.VIEWLEVEL_UG.equals(oldSet.getViewLevel())){
- //删除之前建立的权限关系
- UpdateWrapper<PermissionInfoEntity> permissionInfoUpdateWrapper = new UpdateWrapper<PermissionInfoEntity>();
- permissionInfoUpdateWrapper.set("operator",userId);
- permissionInfoUpdateWrapper.set("op_time",date);
- permissionInfoUpdateWrapper.set("del_flag",Constant.DELFLAG_TRUE);
- permissionInfoUpdateWrapper.eq("type",Constant.PM_TYPE_DETESET);
- permissionInfoUpdateWrapper.eq("type_id",deteSetInfo.getId());
- permissionInfoService.update(permissionInfoUpdateWrapper);
- //添加新的权限信息
- buildPermissionInfoRel(deteSetInfo,userId,date);
- }
-
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void changeStateByIds(Long[] ids, String state) {
- Long userId = ShiroUtils.getUserId();
- Date date=new Date();
- //更新监测设置
- UpdateWrapper<DeteSetInfoEntity> setInfoUpdateWrapper = new UpdateWrapper<DeteSetInfoEntity>();
- setInfoUpdateWrapper.in("id",ids);
- setInfoUpdateWrapper.set("state",state);//状态,1:删除,2:停止,3:监控中
- setInfoUpdateWrapper.set("operator",userId);
- setInfoUpdateWrapper.set("op_time",date);
- this.update(setInfoUpdateWrapper);
-
- if("1".equals(state)){ //删除监测设置
- //删除setRel
- UpdateWrapper<DeteSetNodeRelEntity> setRelUpdateWrapper = new UpdateWrapper<DeteSetNodeRelEntity>();
- setRelUpdateWrapper.set("operator",userId);
- setRelUpdateWrapper.set("op_time",date);
- setRelUpdateWrapper.set("del_flag", Constant.DELFLAG_TRUE);
- setRelUpdateWrapper.in("set_id",ids);
- deteSetNodeRelService.update(setRelUpdateWrapper);
- //删除权限信息
- UpdateWrapper<PermissionInfoEntity> permissionUpdateWrapper = new UpdateWrapper<>();
- permissionUpdateWrapper.set("operator",userId);
- permissionUpdateWrapper.set("op_time",date);
- permissionUpdateWrapper.set("del_flag",Constant.DELFLAG_TRUE);
- permissionUpdateWrapper.eq("type",Constant.PM_TYPE_DETESET);//1、dete_type,2、dete_set,3、dete_warn,4、mission
- permissionUpdateWrapper.in("type_id",ids);
- permissionInfoService.update(permissionUpdateWrapper);
-
- //删除告警信息
- QueryWrapper<DeteWarnRelEntity> deteWarnRelQueryWrapper = new QueryWrapper<>();
- deteWarnRelQueryWrapper.eq("rel_type",Constant.WARN_REL_SET);
- deteWarnRelQueryWrapper.in("rel_id",ids);
-
- List<DeteWarnRelEntity> deteWarnRels = warnRelService.list(deteWarnRelQueryWrapper);
- if(deteWarnRels!=null&&deteWarnRels.size()>0){
- Long[] warnIds=new Long[deteWarnRels.size()];
- for(int i=0;i<deteWarnRels.size();i++){
- DeteWarnRelEntity warnRelEntity=deteWarnRels.get(i);
- warnIds[i]=warnRelEntity.getWarnId();
- }
- deteWarnInfoService.deleteEntity(warnIds);
- }
-
- }
-
- log.info("change deteSetInfo state to [{}],is delete [{}]",state,"1".equals(state));
- }
- @Transactional(rollbackFor = Exception.class)
- public void deleteByTypeId(Long typeId){
- List<DeteSetInfoEntity> setInfos = this.list(new QueryWrapper<DeteSetInfoEntity>().eq("type_id", typeId));
- if(setInfos.size()>0){
- Long[] setIds=new Long[setInfos.size()];
- for(int i=0;i<setInfos.size();i++){
- DeteSetInfoEntity deteSetInfoEntity = setInfos.get(i);
- setIds[i]=deteSetInfoEntity.getId();
- }
- this.changeStateByIds(setIds,Constant.DELFLAG_TRUE );
- }
- }
-
- @Override
- public DeteSetInfoEntity queryDetail(Long id) {
- QueryWrapper<DeteSetInfoEntity> setInfoQueryWrapper = new QueryWrapper<>();
- setInfoQueryWrapper.eq("id",id);
- setInfoQueryWrapper.ne("state",Constant.DELFLAG_TRUE);
- DeteSetInfoEntity deteSetInfoEntity = this.getBaseMapper().selectOne(setInfoQueryWrapper);
- if(deteSetInfoEntity!=null){
- DeteTypeInfoEntity deteTypeInfoEntity = deteTypeInfoService.queryDetail(deteSetInfoEntity.getTypeId());
-
- deteSetInfoEntity.setType(deteTypeInfoEntity);
-
- List<NodeGroupInfoEntity> nodeGroups=this.baseMapper.queryNodeGroups(id);
-
- List<NodeInfoEntity> nodes=this.baseMapper.queryNodes(id);
-
- deteSetInfoEntity.setNodeGroups(nodeGroups);
- deteSetInfoEntity.setNodes(nodes);
-
- setViewer(deteSetInfoEntity);
- }
-
-
- return deteSetInfoEntity;
- }
-
- public boolean checkDeteSetExsits(Long[] ids){
- QueryWrapper<DeteSetInfoEntity> deteSetInfoQueryWrapper = new QueryWrapper<>();
- deteSetInfoQueryWrapper.in("id", ids);
- List<DeteSetInfoEntity> list = this.list(deteSetInfoQueryWrapper);
-
- return list!=null&&list.size()==ids.length;
- }
-
- public boolean isBuildIn(DeteSetInfoEntity deteSetInfoEntity){
- DeteSetInfoEntity oldSet = this.getById(deteSetInfoEntity.getId());
- return Constant.SYSTEM_BUILDIN_YES.equals(oldSet.getBuildIn());
- }
-
- public boolean nodeOrNodeGroupValide(DeteSetInfoEntity deteSetInfoEntity){
- DeteTypeInfoEntity deteTypeInfo = deteTypeInfoService.getById(deteSetInfoEntity.getTypeId());
- if(Constant.DETE_DETEMETHOD_SNMP.equals(deteTypeInfo.getMethod())){//snmp 监测,节点类型为网元
-// for(Long nodeGroupId:deteSetInfoEntity.getNodeGroupIds()){
-// if(!this.nodeGroupIsPurely(nodeGroupId,Constant.NODE_TYPE_NET)){
-// return false;
-// }
-// }
-
- if(!this.nodeIsValide(Constant.NODE_TYPE_NET,deteSetInfoEntity.getNodeIds())){
- return false;
- }
- }else{ //节点类型为服务器
-// for(Long nodeGroupId:deteSetInfoEntity.getNodeGroupIds()){
-// if(!this.nodeGroupIsPurely(nodeGroupId,Constant.NODE_TYPE_SERVER)){
-// return false;
-// }
-// }
-
- if(!this.nodeIsValide(Constant.NODE_TYPE_SERVER,deteSetInfoEntity.getNodeIds())){
- return false;
- }
- }
- return true;
- }
-
- /**
- * @Description 校验节点组内的节点是否全部是网元/服务器
- * @Author rui
- * @Date 2019/9/2
- * @Param
- * @Return
- * @Exception
- */
- private boolean nodeGroupIsPurely(Long nodeGroupId,String nodeType){
- Integer total = nodeGroupRelService.queryCount(nodeGroupId, null); //节点组下 节点的个数
- Integer typeCount=nodeGroupRelService.queryCount(nodeGroupId,nodeType);
- if(total ==0|| typeCount==0){
- throw new NZException(RCode.VALIDE_NODE_NOTEXISTS);
- }
- return total-typeCount ==0;
- }
-
- /**
- * @Description 校验所选节点是否都是网元/服务器
- * @Author rui
- * @Date 2019/9/2
- * @Param
- * @Return
- * @Exception
- */
- private boolean nodeIsValide(String nodeType,Long ... nodeUUID){
- if(nodeUUID==null||nodeUUID.length<1){
- return true;
- }
- QueryWrapper<NodeInfoEntity> nodeInfoQueryWrapper =new QueryWrapper<NodeInfoEntity>();
- nodeInfoQueryWrapper.eq("type",nodeType);
- nodeInfoQueryWrapper.in("uuid",nodeUUID);
-
- int count = nodeInfoService.count(nodeInfoQueryWrapper);
-
- return nodeUUID.length-count==0;
- }
-
- private void setViewer(DeteSetInfoEntity deteSetInfoEntity) {
- if(Constant.VIEWLEVEL_UG.equals(deteSetInfoEntity.getViewLevel())){
- List<UserGroupEntity> userGroups=this.getBaseMapper().queryUserGroup(deteSetInfoEntity.getId());
- deteSetInfoEntity.setViewer(userGroups);
- }else if(Constant.VIEWLEVEL_SYS.equals(deteSetInfoEntity.getViewLevel())){
- List<SystemInfoEntity> system=this.getBaseMapper().querySystem(deteSetInfoEntity.getId());
- deteSetInfoEntity.setViewer(system);
- }
- }
-
- private List<DeteSetNodeRelEntity> buildRels(DeteSetInfoEntity deteSetInfo, Long userId, Date date) {
- List<DeteSetNodeRelEntity> setNodeRels=new ArrayList<DeteSetNodeRelEntity>();
- for (Long ngId:deteSetInfo.getNodeGroupIds()){
- DeteSetNodeRelEntity deteSetNodeRelEntity = new DeteSetNodeRelEntity();
- deteSetNodeRelEntity.setOperator(userId);
- deteSetNodeRelEntity.setOpTime(date);
- deteSetNodeRelEntity.setType(Constant.DETESET_NODE_RELTYPE_NODEGROUP);//'1、node,2、nodeGroup',
- deteSetNodeRelEntity.setSetId(deteSetInfo.getId());
- deteSetNodeRelEntity.setRelId(ngId);
- setNodeRels.add(deteSetNodeRelEntity);
-
-
- }
- for (Long nodeId:deteSetInfo.getNodeIds()){
- DeteSetNodeRelEntity deteSetNodeRelEntity = new DeteSetNodeRelEntity();
- deteSetNodeRelEntity.setOperator(userId);
- deteSetNodeRelEntity.setOpTime(date);
- deteSetNodeRelEntity.setType(Constant.DETESET_NODE_RELTYPE_NODE);//'1、node,2、nodeGroup',
- deteSetNodeRelEntity.setSetId(deteSetInfo.getId());
- deteSetNodeRelEntity.setRelId(nodeId);
-
- setNodeRels.add(deteSetNodeRelEntity);
- }
-
- return setNodeRels;
- }
- private void buildPermissionInfoRel(DeteSetInfoEntity deteSetInfo, Long userId, Date date) {
- Long setId =deteSetInfo.getId() ;
- List<PermissionInfoEntity> permissionInfos =new ArrayList<PermissionInfoEntity>();
- switch (deteSetInfo.getViewLevel()){//1:用户组,2:系统内全部人员,3:无限制,默认2
- case Constant.VIEWLEVEL_UG:
- Long[] usergroupIds = deteSetInfo.getViewerId();
- for(Long userGroupId:usergroupIds){
- PermissionInfoEntity permissionInfoEntity=new PermissionInfoEntity();
- permissionInfoEntity.setType(Constant.PM_TYPE_DETESET);//'1、dete_type,2、dete_set,3、dete_warn,4、mission'
- permissionInfoEntity.setTypeId(setId);
- permissionInfoEntity.setViewLevel(deteSetInfo.getViewLevel());
- permissionInfoEntity.setRelId(userGroupId);
- permissionInfoEntity.setOperator(userId);
- permissionInfoEntity.setOpTime(date);
-
- permissionInfos.add(permissionInfoEntity);
- }
- break;
- case Constant.VIEWLEVEL_SYS:
- Long currSystemId = ShiroUtils.getCurrSystemId();
- PermissionInfoEntity permissionInfoEntity=new PermissionInfoEntity();
- permissionInfoEntity.setType(Constant.PM_TYPE_DETESET);//'1、dete_type,2、dete_set,3、dete_warn,4、mission'
- permissionInfoEntity.setTypeId(setId);
- permissionInfoEntity.setViewLevel(deteSetInfo.getViewLevel());
- permissionInfoEntity.setRelId(currSystemId);
- permissionInfoEntity.setOperator(userId);
- permissionInfoEntity.setOpTime(date);
-
- permissionInfos.add(permissionInfoEntity);
- break;
- case Constant.VIEWLEVEL_ALL:
-
- break;
- }
- if(permissionInfos.size()>0){
- permissionInfoService.saveBatch(permissionInfos);
- }
- }
-
- public boolean checkNameExists(String name,Long id){
- List<DeteSetInfoEntity> list = this.list(new QueryWrapper<DeteSetInfoEntity>()
- .ne(id!=null,"id",id)
- .eq("name", name)
- .ne("state",'1'));
-
- return list!=null&&list.size()>0;
- }
-
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteSetNodeRelServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteSetNodeRelServiceImpl.java
deleted file mode 100644
index 2dd5dbc2..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteSetNodeRelServiceImpl.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.nis.modules.detect.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.Query;
-import com.nis.modules.detect.dao.DeteSetNodeRelDao;
-import com.nis.modules.detect.entity.DeteSetNodeRelEntity;
-import com.nis.modules.detect.service.DeteSetNodeRelService;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-
-@Service("deteSetNodeRelService")
-public class DeteSetNodeRelServiceImpl extends DeteCommonServiceImpl<DeteSetNodeRelDao, DeteSetNodeRelEntity> implements DeteSetNodeRelService {
-
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
- IPage<DeteSetNodeRelEntity> page = this.page(
- new Query<DeteSetNodeRelEntity>().getPage(params),
- new QueryWrapper<DeteSetNodeRelEntity>()
- );
-
- return new PageUtils(page);
- }
-
- @Override
- public List<DeteSetNodeRelEntity> queryBySystemId(PermissionInfoEntity entity) {
- List<DeteSetNodeRelEntity> queryBySystemId = baseMapper.queryBySystemId(entity);
- return queryBySystemId;
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void deleteBySetId(Long setId) {
-
- UpdateWrapper<DeteSetNodeRelEntity> updateWrapper = new UpdateWrapper<>();
- updateWrapper.set("del_flag", Constant.DELFLAG_TRUE);
- updateWrapper.set("operator",ShiroUtils.getUserId());
- updateWrapper.set("op_time",new Date());
- updateWrapper.eq("set_id",setId);
- this.update(updateWrapper);
- }
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteTypeInfoServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteTypeInfoServiceImpl.java
deleted file mode 100644
index 2b842a5c..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteTypeInfoServiceImpl.java
+++ /dev/null
@@ -1,667 +0,0 @@
-package com.nis.modules.detect.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.nis.common.exception.NZException;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.*;
-import com.nis.common.utils.SqlHelper.KeywordsType;
-import com.nis.modules.detect.dao.DeteTypeInfoDao;
-import com.nis.modules.detect.entity.DeteSetInfoEntity;
-import com.nis.modules.detect.entity.DeteTypeInfoEntity;
-import com.nis.modules.detect.entity.DeteTypeMetaEntity;
-import com.nis.modules.detect.entity.DeteTypeParamEntity;
-import com.nis.modules.detect.service.*;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import io.netty.util.internal.StringUtil;
-import org.apache.commons.lang.StringUtils;
-import org.apache.http.impl.auth.NTLMEngineException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.ApplicationArguments;
-import org.springframework.boot.ApplicationRunner;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.nio.channels.MulticastChannel;
-import java.util.*;
-
-@Service("deteTypeInfoService")
-public class DeteTypeInfoServiceImpl extends DeteCommonServiceImpl<DeteTypeInfoDao, DeteTypeInfoEntity> implements DeteTypeInfoService, ApplicationRunner {
- private Logger log= LoggerFactory.getLogger(DeteTypeInfoServiceImpl.class);
- @Autowired
- private DeteMetaService deteTypeMetaService;
- @Autowired
- private DeteParamService deteTypeParamService;
- @Autowired
- private DeteMetaMappingService deteTypeMetaMappingService;
- @Autowired
- private DeteSetInfoService deteSetInfoService;
- @Autowired
- private DeteWarnInfoService deteWarnInfoService;
-
- private SQLUtils sqlUtils;
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
- String deteTypeName = (String) params.get("name");
-
- IPage<DeteTypeInfoEntity> page = this.page(
- new Query<DeteTypeInfoEntity>().getPage(params),
- new QueryWrapper<DeteTypeInfoEntity>()
- .like(StringUtils.isNotBlank(deteTypeName), "name", deteTypeName)
- );
- return new PageUtils(page);
- }
-
- @Override
- public DeteTypeInfoEntity queryDetail(Long id) {
- DeteTypeInfoEntity deteTypeInfo = this.getById(id);
- if (deteTypeInfo == null || deteTypeInfo.getId() == null) {
- return null;
- }
- List<DeteTypeMetaEntity> deteTypeMetas = deteTypeMetaService.list(new QueryWrapper<DeteTypeMetaEntity>().eq("type_id", deteTypeInfo.getId()));
- deteTypeInfo.setDeteTypeMetas(deteTypeMetas);
-
- List<DeteTypeParamEntity> deteTypeParams = deteTypeParamService.list(new QueryWrapper<DeteTypeParamEntity>().eq("type_id", deteTypeInfo.getId()));
- deteTypeInfo.setDeteTypeParams(deteTypeParams);
- return deteTypeInfo;
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void saveEntity(DeteTypeInfoEntity deteTypeInfo,MultipartFile file) {
- Long userId = ShiroUtils.getUserId();//操作员
- deteTypeInfo.setOperator(userId);
- Date date = new Date(); //操作时间
- deteTypeInfo.setOpTime(date);
- deteTypeInfo.setBuildIn(Constant.SYSTEM_BUILDIN_NO);
- if(Constant.DETE_DETEMETHOD_SCRIPT.equals(deteTypeInfo.getMethod())){
-
- String content=this.getUploadFileJson(file);
- this.uploadFile(content,file);
- deteTypeInfo.setContent(content);
- }
-
- List<DeteTypeMetaEntity> deteTypeMetas = deteTypeInfo.getDeteTypeMetas();
-
- if(deteTypeMetas!=null&&deteTypeMetas.size()>0){
- Set<String> fieldNameFilter = new HashSet<String>();
- for (int i=0;i< deteTypeMetas.size();i++) {
- DeteTypeMetaEntity deteTypeMetaEntity =deteTypeMetas.get(i);
- //field_name字段默认为 f_元数据名称去除特殊字符
- String fieldName = ("f_" + this.formatString(deteTypeMetaEntity.getName())).toUpperCase();
- //防止处理后的字段名称重复
- if (fieldNameFilter.contains(fieldName)) {
- throw new NZException(RCode.META_FIELDNAME_EXISTS);
- } else {
- deteTypeMetaEntity.setFieldName(fieldName);
- fieldNameFilter.add(fieldName);
- }
- deteTypeMetaEntity.setTypeId(deteTypeInfo.getId());
- deteTypeMetaEntity.setOperator(userId);
- deteTypeMetaEntity.setOpTime(date);
- deteTypeMetaEntity.setSort(i);
- }
- }
-
-
-
- List<DeteTypeParamEntity> deteTypeParams = deteTypeInfo.getDeteTypeParams();
- if(deteTypeParams!=null&& deteTypeParams.size()>0){
- for (int i = 0; i < deteTypeParams.size(); i++) {
- DeteTypeParamEntity deteTypeParamEntity = deteTypeParams.get(i);
- deteTypeParamEntity.setParamIndex(i);
- deteTypeParamEntity.setTypeId(deteTypeInfo.getId());
- deteTypeParamEntity.setOperator(userId);
- deteTypeParamEntity.setOpTime(date);
- }
- }
-
-
-
- createTable(deteTypeInfo);
- log.info("create table [{}]",deteTypeInfo.getTableName());
- //为避免在DDL语句发出时会自动commit,故将所有的数据操作放在DDL后
- this.save(deteTypeInfo);
-
- for (DeteTypeMetaEntity deteTypeMetaEntity : deteTypeMetas) {
- deteTypeMetaEntity.setTypeId(deteTypeInfo.getId());
- }
- deteTypeMetaService.saveBatch(deteTypeMetas);
- for (int i = 0; i < deteTypeParams.size(); i++) {
- DeteTypeParamEntity deteTypeParamEntity = deteTypeParams.get(i);
- deteTypeParamEntity.setTypeId(deteTypeInfo.getId());
- }
- deteTypeParamService.saveBatch(deteTypeParams);
- log.info("save detectType success! typeId [{}]",deteTypeInfo.getId());
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void updateEntity(DeteTypeInfoEntity deteTypeInfo,MultipartFile file) {
- DeteTypeInfoEntity old = this.getById(deteTypeInfo.getId());
- List<DeteTypeMetaEntity> deteTypeMetas = deteTypeInfo.getDeteTypeMetas();
- List<DeteTypeParamEntity> deteTypeParams = deteTypeInfo.getDeteTypeParams();
- Long userId = ShiroUtils.getUserId();//操作员
- deteTypeInfo.setOperator(userId);
- Date date = new Date(); //操作时间
- deteTypeInfo.setOpTime(date);
- deteTypeInfo.setTableName(old.getTableName());
- deteTypeInfo.setBuildIn(old.getBuildIn());//buildIn 字段不允许修改
- if(Constant.DETE_DETEMETHOD_SCRIPT.equals(deteTypeInfo.getMethod())&&file!=null&&!file.isEmpty()){
- this.delUploadFile(old.getContent());//删除旧文件
- String content=this.getUploadFileJson(file);
- this.uploadFile(content,file);
- deteTypeInfo.setContent(content);
- }
- //需要修改表字段
- List<DeteTypeMetaEntity> metaUpdateList = new ArrayList<DeteTypeMetaEntity>();
- //需要添加表字段
- List<DeteTypeMetaEntity> metaAddList = new ArrayList<DeteTypeMetaEntity>();
- //需要删除表字段
- List<DeteTypeMetaEntity> metaDelList = new ArrayList<DeteTypeMetaEntity>();
- //需要添加索引
- List<DeteTypeMetaEntity> indexAddList = new ArrayList<DeteTypeMetaEntity>();
- //需要删除索引
- List<DeteTypeMetaEntity> indexDelList = new ArrayList<DeteTypeMetaEntity>();
- Set<String> fieldNameFilter = new HashSet<String>();
- if (deteTypeMetas != null) {
- for (DeteTypeMetaEntity deteTypeMetaEntity : deteTypeMetas) {
- deteTypeMetaEntity.setOperator(userId);
- deteTypeMetaEntity.setOpTime(date);
- //field_name字段默认为 f_元数据名称去除特殊字符
- String fieldName = ("f_" + this.formatString(deteTypeMetaEntity.getName())).toUpperCase();
- //防止处理后的字段名称重复
- if (fieldNameFilter.contains(fieldName)) {
- throw new NZException(RCode.META_FIELDNAME_EXISTS);
- } else {
-
- fieldNameFilter.add(fieldName);
- }
-
- if (deteTypeMetaEntity.getId() != null) {
- if (Constant.DELFLAG_TRUE.equals(deteTypeMetaEntity.getDelFlag())) {
- metaDelList.add(deteTypeMetaEntity);
- } else {
- metaUpdateList.add(deteTypeMetaEntity);
- }
- } else {
- //字段名称不允许修改,故只在此set
- deteTypeMetaEntity.setFieldName(fieldName);
- metaAddList.add(deteTypeMetaEntity);
- }
- }
-
-
- }
-
- this.judgeTableFields(metaUpdateList, metaAddList, metaDelList, indexAddList, indexDelList);
- log.info("modify field{},add field{},delete field{},add index{},delete index{}",metaUpdateList,metaAddList,metaDelList,indexAddList,indexDelList);
- //处理添加索引
- if (indexAddList.size() > 0) {
- Map<String, String[]> map = new HashMap<String, String[]>();
- for (DeteTypeMetaEntity meta : indexAddList) {
- String indexName = deteTypeInfo.getTableName().toUpperCase() + "_" + meta.getFieldName().toUpperCase() + "_INDEX";
- String fieldName = meta.getFieldName();
- map.put(indexName, new String[]{fieldName});
- }
- addIndexs(deteTypeInfo.getTableName(), map);
- }
- //处理删除索引
- if (indexDelList.size() > 0) {
- String[] indexs = new String[indexDelList.size()];
- for (int i = 0; i < indexDelList.size(); i++) {
- DeteTypeMetaEntity meta = indexDelList.get(i);
- String indexName = deteTypeInfo.getTableName().toUpperCase() + "_" + meta.getFieldName().toUpperCase() + "_INDEX";
- indexs[i] = indexName;
- }
- dropIndexs(deteTypeInfo.getTableName(), indexs);
- }
- //处理字段添加
- if (metaAddList.size() > 0) {
- Map<String, String> fields = new LinkedHashMap<String, String>();
- Map<String, String[]> indexs = new HashMap<String, String[]>();
-
- preFieldAdd(deteTypeInfo.getTableName(), fields, indexs, metaAddList);
-
- dropFields(deteTypeInfo.getTableName(), fields.keySet().toArray(new String[fields.size()]));
-
- String sql = sqlUtils.addFields(deteTypeInfo.getTableName(), fields);
- this.getBaseMapper().addTableFields(sql);
-
- addIndexs(deteTypeInfo.getTableName(), indexs);
- }
- //处理字段删除
- if (metaDelList.size() > 0) {
- String[] fields = new String[metaDelList.size()];
- for (int i = 0; i < metaDelList.size(); i++) {
- fields[i] = metaDelList.get(i).getFieldName();
- }
-
- dropFields(deteTypeInfo.getTableName(), fields);
- }
- //处理字段修改
- //如果是已经创建了监测设置的,则不允许修改字段类型和长度
- if (!checkDetectSetConfigExists(deteTypeInfo.getId()) && metaUpdateList.size() > 0) {
- Map<String, String> fields = new LinkedHashMap<String, String>();
- preFieldAdd(deteTypeInfo.getTableName(), fields, null,metaUpdateList );
-
- String sql = sqlUtils.modifyFields(deteTypeInfo.getTableName(), fields);
- this.getBaseMapper().alterTableFields(sql);
- }
-
- this.updateById(deteTypeInfo);
- for (int i=0;i< deteTypeMetas.size();i++) {
- DeteTypeMetaEntity deteTypeMetaEntity=deteTypeMetas.get(i);
- deteTypeMetaEntity.setSort(i);
- if (deteTypeMetaEntity.getId() != null) {
- if (deteTypeMetaEntity.getDelFlag() != null && !Constant.DELFLAG_FALSE.equals(deteTypeMetaEntity.getDelFlag())) {
- deteTypeMetaService.removeById(deteTypeMetaEntity.getId());
- } else {
- if(deteTypeMetaService.checkNameExists(deteTypeMetaEntity)){
- throw new NZException(RCode.META_NAME_EXISTS);
- }
- if(deteTypeMetaService.checkFieldNameExists(deteTypeMetaEntity)){
- throw new NZException(RCode.META_FIELDNAME_EXISTS);
- }
- deteTypeMetaService.updateById(deteTypeMetaEntity);
- }
- } else {
- deteTypeMetaEntity.setTypeId(deteTypeInfo.getId());
- if(deteTypeMetaService.checkNameExists(deteTypeMetaEntity)){
- throw new NZException(RCode.META_NAME_EXISTS);
- }
- if(deteTypeMetaService.checkFieldNameExists(deteTypeMetaEntity)){
- throw new NZException(RCode.META_FIELDNAME_EXISTS);
- }
- deteTypeMetaService.save(deteTypeMetaEntity);
- }
- }
-
- if (deteTypeParams != null && deteTypeParams.size() > 0) {
- for (int i = 0; i < deteTypeParams.size(); i++) {
- DeteTypeParamEntity deteTypeParamEntity = deteTypeParams.get(i);
-
- deteTypeParamEntity.setOperator(userId);
- deteTypeParamEntity.setOpTime(date);
- deteTypeParamEntity.setParamIndex(i);
- if (deteTypeParamEntity.getId() == null) {
-
- deteTypeParamEntity.setTypeId(deteTypeInfo.getId());
- }
- if(deteTypeParamService.checkNameExists(deteTypeParamEntity)){
- throw new NZException(RCode.PARAM_NAME_EXISTS);
- }
- if (deteTypeParamEntity.getId() != null) {
- if (deteTypeParamEntity.getDelFlag() != null && !Constant.DELFLAG_FALSE.equals(deteTypeParamEntity.getDelFlag())) {
- deteTypeParamService.removeById(deteTypeParamEntity.getId());
- } else {
- deteTypeParamService.updateById(deteTypeParamEntity);
- }
- } else {
- deteTypeParamEntity.setTypeId(deteTypeInfo.getId());
- deteTypeParamService.save(deteTypeParamEntity);
- }
- }
- }
- log.info("deteType update success!");
- }
-
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void deleteEntity(Long... ids) {
- Long userId = ShiroUtils.getUserId();
- Date date=new Date();
-
- for (Long id :ids){
- DeteTypeInfoEntity oldType = this.getById(id);
- if(oldType!=null&& StringUtils.isNotBlank(oldType.getTableName())&&checkTablesExists(oldType.getTableName())){
- //drop对应的表
- this.dropTable(oldType.getTableName());
- //如果是脚本监测,删除脚本
- if(Constant.DETE_DETEMETHOD_SCRIPT.equals(oldType.getMethod())){
- this.delUploadFile(oldType.getContent());
- }
- }
-
- }
- //删除detectType
- this.update(new UpdateWrapper<DeteTypeInfoEntity>()
- .in("id", ids)
- .set("del_flag", Constant.DELFLAG_TRUE)
- .set("operator",userId)
- .set("op_time",date));
- //删除detectTypeMeta
- deteTypeMetaService.update(new UpdateWrapper<DeteTypeMetaEntity>()
- .in("type_id", ids)
- .set("del_flag", Constant.DELFLAG_TRUE)
- .set("operator",userId)
- .set("op_time",date));
- //删除detectTypeParam
- deteTypeParamService.update(new UpdateWrapper<DeteTypeParamEntity>()
- .in("type_id", ids)
- .set("del_flag", Constant.DELFLAG_TRUE)
- .set("operator",userId)
- .set("op_time",date));
- //删除detectSetInfo 相关
- for(Long id:ids){
- deteSetInfoService.deleteByTypeId(id);
- }
- //删除deteWarnInfo相关
- for(Long id:ids){
- deteWarnInfoService.deleteByTypeId(id);
- }
-
- }
-
-
- /**
- * @Description通过表名判断表是否存在
- * @Author rui
- * @Date 2019/7/23
- * @Param
- * @Return
- * @Exception
- */
- public boolean checkTablesExists(String tableName) {
- String sql = sqlUtils.queryTables(tableName);
- Map<String, String> tables = this.getBaseMapper().queryTables(sql);
-
- return tables != null && tables.size() > 0;
- }
-
- public void createTable(DeteTypeInfoEntity detectTypeInfo) {
- String tableName = detectTypeInfo.getTableName();
-
- Map<String, String> fields = new LinkedHashMap<String, String>();
- fields.put("ID", sqlUtils.getRestrict(KeywordsType.PRIMARYKEY,null,null));
- fields.put("TIME", sqlUtils.getRestrict(KeywordsType.DATE,null,null));
- fields.put("TYPE_ID", sqlUtils.getRestrict(KeywordsType.NUMBER,20,null));
- fields.put("SET_ID", sqlUtils.getRestrict(KeywordsType.NUMBER,20,null));
- fields.put("DEVICE_ID", sqlUtils.getRestrict(KeywordsType.NUMBER,20,null));
- fields.put("TAG", sqlUtils.getRestrict(KeywordsType.NUMBER,20,null));
-
- Map<String, String[]> indexs = new HashMap<String, String[]>();
- indexs.put(tableName.toUpperCase() + "_TIME_INDEX", new String[]{"TIME"});
- indexs.put(tableName.toUpperCase() + "_TYPEID_INDEX", new String[]{"TYPE_ID"});
- indexs.put(tableName.toUpperCase() + "_SETID_INDEX", new String[]{"SET_ID"});
- indexs.put(tableName.toUpperCase() + "_DEVICEID_INDEX", new String[]{"DEVICE_ID"});
- indexs.put(tableName.toUpperCase() + "_TAG_INDEX", new String[]{"TAG"});
-
- List<DeteTypeMetaEntity> deteTypeMetas = detectTypeInfo.getDeteTypeMetas();
- if(deteTypeMetas!=null && deteTypeMetas.size()>0){
- preFieldAdd(tableName, fields, indexs, deteTypeMetas);
-
- String createTableSql = sqlUtils.createTable(tableName, fields);
- this.getBaseMapper().createTable(createTableSql);
-
- addIndexs(tableName, indexs);
- }
-
-
- }
-
- private void preFieldAdd(String tableName, Map<String, String> fields, Map<String, String[]> indexs, List<DeteTypeMetaEntity> deteTypeMetas) {
- for (DeteTypeMetaEntity meta : deteTypeMetas) {
- String fieldName = meta.getFieldName();
- String fieldType = meta.getFieldType();
- String dataType = meta.getDataType();
- Integer dataLen = meta.getDataLenth();
- //fieldType==3 临时字段不入库
- if ("3".equals(fieldType)) {
- continue;
- }
-
- if ("1".equals(fieldType) && StringUtils.isNotBlank(fieldName) && indexs != null) {
- String indexName = tableName.toUpperCase() + "_" + fieldName.toUpperCase() + "_INDEX";
- indexs.put(indexName, new String[]{fieldName});
- }
- if (fields != null) {
- if ("3".equals(dataType)) {
-
- fields.put(fieldName, sqlUtils.getRestrict(KeywordsType.STRING,dataLen,null) );
- } else {
-
- fields.put(fieldName, sqlUtils.getRestrict(KeywordsType.COMPUTE,dataLen,2));
- }
- }
- }
- }
-
- public void dropFields(String tableName, String... fields) {
- String sql = sqlUtils.delFields(tableName, fields);
- this.getBaseMapper().delTableFields(sql);
- }
-
- public void addIndexs(String tableName, Map<String, String[]> indexs) {
- String sql = sqlUtils.addIndexs(tableName, indexs);
- this.getBaseMapper().addTableIndexs(sql);
- }
-
- public void dropIndexs(String tableName, String[] indexNames) {
-
- String sql = sqlUtils.delIndexs(tableName, indexNames);
-
- this.getBaseMapper().delTableIndexs(sql);
- }
-
- public void dropTable(String tableName) {
- String sql = sqlUtils.dropTable(tableName);
- this.getBaseMapper().dropTable(sql);
- }
-
-
- /**
- * @Description 校验监测类别下是否已经存在监测设置
- * @Author rui
- * @Date 2019/8/30
- * @Param
- * @Return
- * @Exception
- */
- public boolean checkDetectSetConfigExists(Long id) {
- int count = this.getBaseMapper().checkDetectSetConfigExists(id);
- return count > 0;
- }
-
-
- /**
- * @Description 校验监测方式合法性
- * @Author rui
- * @Date 2019/8/30
- * @Param
- * @Return
- * @Exception
- */
- public boolean checkDeteMethodIsValide(DeteTypeInfoEntity deteTypeInfo){
-
- return checkFieldIsValide(DIC_DETEMETHOD,deteTypeInfo.getMethod());
- }
-
- /**
- * @Description 校验监测类别元数据字段类型合法性
- * @Author rui
- * @Date 2019/8/30
- * @Param
- * @Return
- * @Exception
- */
- public boolean checkFieldTypeIsValide(DeteTypeInfoEntity deteTypeInfo){
- for (DeteTypeMetaEntity deteTypeMetaEntity:deteTypeInfo.getDeteTypeMetas()){
- if(!deteTypeMetaService.checkFieldTypeIsValide(deteTypeMetaEntity)){
- return false;
- }
- }
- return true;
- }
-
- /**
- * @Description 校验监测类别元数据数据类型合法性
- * @Author rui
- * @Date 2019/8/30
- * @Param
- * @Return
- * @Exception
- */
- public boolean checkDataTypeIsValide(DeteTypeInfoEntity deteTypeInfo){
- for (DeteTypeMetaEntity deteTypeMetaEntity:deteTypeInfo.getDeteTypeMetas()){
- if(!deteTypeMetaService.checkDataTypeIsValide(deteTypeMetaEntity)){
- return false;
- }
- }
- return true;
- }
-
- public boolean isBuildIn(DeteTypeInfoEntity deteTypeInfoEntity){
- DeteTypeInfoEntity oldType = this.getById(deteTypeInfoEntity.getId());
- return Constant.SYSTEM_BUILDIN_YES.equals(oldType.getBuildIn());
- }
- /**
- * @Description校验前段传递的数据
- * @Author rui
- * @Date 2019/7/24
- * @Param
- * @Return
- * @Exception
- */
- public void validatePassDate(DeteTypeInfoEntity deteTypeInfo, MultipartFile file) {
- ValidateUtils.is(deteTypeInfo).notNull(RCode.DETE_ERROR);
-
- if(!checkDeteMethodIsValide(deteTypeInfo)){
- throw new NZException(RCode.TYPE_METHOD_INVALID);
- }
- if(Constant.DETE_DETEMETHOD_SCRIPT.equals(deteTypeInfo.getMethod())){
- if(!StringUtils.isNotBlank(deteTypeInfo.getContent()) && (file==null||file.isEmpty())){
- throw new NZException(RCode.DETE_UPLOAD_FILE_ISNULL);
- }
- }
- if(!checkFieldTypeIsValide(deteTypeInfo)){
- throw new NZException(RCode.META_FIELDTYPE_INVALID);
- }
-
- if(!checkDataTypeIsValide(deteTypeInfo)){
- throw new NZException(RCode.META_DATATYPE_INVALID);
- }
-
- if(!checkViewLevelValide(deteTypeInfo.getViewLevel())){
- throw new NZException(RCode.VIEWLEVEL_INVALID);
- }
- ValidateUtils.is(deteTypeInfo.getName()).notNull(RCode.TYPE_NAME_ISNULL);
- boolean typeNameExists = this.checkFieldExists(deteTypeInfo.getId(), "name", deteTypeInfo.getName());
- if (typeNameExists) {
- throw new NZException(RCode.TYPE_NAME_EXISTS);
- }
- if (deteTypeInfo.getId() == null) {//说明更新操作,表已经存在,表名不允许修改
- String tableName = "DI_" + deteTypeInfo.getName();
- tableName = this.formatString(tableName);
- //检查是否存在表
- boolean tableExists = this.checkTablesExists(tableName);
- if (tableExists) {
- throw new NZException(RCode.TYPE_TABLE_EXISTS);
- }
-
- deteTypeInfo.setTableName(tableName.toUpperCase());
- }
- Set<String> nameFilter = new HashSet<String>();
- List<DeteTypeMetaEntity> deteTypeMetas = deteTypeInfo.getDeteTypeMetas();
- if(deteTypeMetas==null||deteTypeMetas.size()<1){
- throw new NZException(RCode.NOT_NULL_ERROR);
- }
- for (DeteTypeMetaEntity deteTypeMetaEntity : deteTypeMetas) {
- ValidateUtils.is(deteTypeMetaEntity.getName()).notNull(RCode.META_NAME_ISNULL);
- String name = deteTypeMetaEntity.getName();
- if (nameFilter.contains(name)) {
- throw new NZException(RCode.META_NAME_EXISTS);
- } else {
- if (deteTypeMetaEntity.getDelFlag() != null && Constant.DELFLAG_FALSE.equals(deteTypeMetaEntity.getDelFlag())) {
- nameFilter.add(name);
- }
- }
-
-
- }
- nameFilter.clear();
- List<DeteTypeParamEntity> deteTypeParams = deteTypeInfo.getDeteTypeParams();
- if(deteTypeParams==null||deteTypeParams.size()<1){
- throw new NZException(RCode.NOT_NULL_ERROR);
- }
- for (int i = 0; i < deteTypeParams.size(); i++) {
- DeteTypeParamEntity deteTypeParamEntity = deteTypeParams.get(i);
- if (deteTypeParamEntity.getId() == null) {
- ValidateUtils.is(deteTypeParamEntity.getName()).notNull(RCode.PARAM_NAME_ISNULL);
- deteTypeParamEntity.setParamIndex(i);
- String name = deteTypeParamEntity.getName();
- if (nameFilter.contains(name)) {
- throw new NZException(RCode.PARAM_NAME_EXISTS);
- } else {
- if (deteTypeParamEntity.getDelFlag() != null && Constant.DELFLAG_FALSE.equals(deteTypeParamEntity.getDelFlag())) {
- nameFilter.add(name);
- }
- }
- }
- }
- nameFilter = null;
- }
-
- private void judgeTableFields(List<DeteTypeMetaEntity> metaUpdateList,
- List<DeteTypeMetaEntity> metaAddList, List<DeteTypeMetaEntity> metaDelList,
- List<DeteTypeMetaEntity> indexAddList, List<DeteTypeMetaEntity> indexDelList) {
- if (metaUpdateList.size() < 1) {
- return;
- }
- Iterator<DeteTypeMetaEntity> iterator = metaUpdateList.iterator();
-
- while (iterator.hasNext()) {
- DeteTypeMetaEntity deteTypeMetaEntity = iterator.next();
- DeteTypeMetaEntity oldMeta = deteTypeMetaService.getById(deteTypeMetaEntity.getId());
- //判断是否更改fieldType
- if (!oldMeta.getFieldType().equals(deteTypeMetaEntity.getFieldType())) {
- if ("3".equals(oldMeta.getFieldType())) {//临时字段-->入库字段
- iterator.remove();
- metaAddList.add(deteTypeMetaEntity);
- continue;
- }
- if ("3".equals(deteTypeMetaEntity.getFieldType())) {//入库字段-->临时字段
- iterator.remove();
- metaDelList.add(deteTypeMetaEntity);
- continue;
- }
-
- if ("1".equals(oldMeta.getFieldType())) {//有索引-->无索引
- indexDelList.add(deteTypeMetaEntity);
- }
-
- if ("1".equals(deteTypeMetaEntity.getFieldType())) {//无索引-->有索引
- indexAddList.add(deteTypeMetaEntity);
- }
- }
-
- //判断dataTpye
- String dataType = deteTypeMetaEntity.getDataType();
- if (oldMeta.getDataType().equals(dataType)) {
- if (oldMeta.getDataLenth() == deteTypeMetaEntity.getDataLenth()) {
- iterator.remove();
- continue;
- }
- } else {
- //数据长度相等,且都为数值型,不做修改(都是decimal)
- if (oldMeta.getDataLenth() == deteTypeMetaEntity.getDataLenth() && !"3".equals(oldMeta.getDataType()) && !"3".equals(dataType)) {
- iterator.remove();
- continue;
- }
- }
-
- }
-
- //至此,metaUpdateList中的数据都是需要修改字段类型或字段长度的
- }
-
- @Override
- public void run(ApplicationArguments args) throws Exception {
- sqlUtils=SpringContextUtils.getBean("getSqlUtils",SQLUtils.class);
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteWarnInfoServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteWarnInfoServiceImpl.java
deleted file mode 100644
index fb53cc16..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteWarnInfoServiceImpl.java
+++ /dev/null
@@ -1,275 +0,0 @@
-package com.nis.modules.detect.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.Query;
-import com.nis.modules.detect.dao.DeteWarnInfoDao;
-import com.nis.modules.detect.dao.DeteWarnRelDao;
-import com.nis.modules.detect.entity.*;
-import com.nis.modules.detect.service.*;
-import com.nis.modules.sys.service.PermissionInfoService;
-import com.nis.modules.sys.service.UserUsergroupService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-
-@Service("deteWarnInfoService")
-public class DeteWarnInfoServiceImpl extends DeteCommonServiceImpl<DeteWarnInfoDao, DeteWarnInfoEntity> implements DeteWarnInfoService {
- private Logger log= LoggerFactory.getLogger(DeteWarnInfoServiceImpl.class);
- @Autowired
- private DeteWarnRelService deteWarnRelService;
- @Autowired
- private DeteWarnRelDao deteWarnRelDao;
- @Autowired
- private PermissionInfoService permissionInfoService;
- @Autowired
- private DeteTypeInfoService deteTypeInfoService;
- @Autowired
- private DeteSetInfoService deteSetInfoService;
- @Autowired
- private DeteMetaService deteTypeMetaService;
-
- @Autowired
- private UserUsergroupService userUsergroupService;
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void saveEntity(DeteWarnInfoEntity deteWarnInfoEntity,MultipartFile file) {
- Long userId = ShiroUtils.getUserId();
- Date date = new Date();
- deteWarnInfoEntity.setOperator(userId);
- deteWarnInfoEntity.setOpTime(date);
- if(Constant.DETE_WARN_CALLBACK_SCRIPT.equals(deteWarnInfoEntity.getCallbackType())){
-
- String content=this.getUploadFileJson(file);
- this.uploadFile(content,file);
- deteWarnInfoEntity.setCallbackContent(content);
- }
- this.save(deteWarnInfoEntity);
- Long deteTypeId = deteWarnInfoEntity.getDeteTypeId();
- Long[] deteSetIds = deteWarnInfoEntity.getDeteSetIds();
-
- List<DeteWarnRelEntity> deteWarnRelEntities = new ArrayList<DeteWarnRelEntity>();
- //当type和set均不为空时,保存set关系,set为空时保存type关系
- if (deteSetIds != null && deteSetIds.length > 0) {
- for (Long setId : deteSetIds) {
- DeteWarnRelEntity deteWarnRelEntity = new DeteWarnRelEntity();
- deteWarnRelEntity.setOperator(userId);
- deteWarnRelEntity.setOpTime(date);
- deteWarnRelEntity.setRelType(Constant.WARN_REL_SET);//关联方式,1、type,2、set
- deteWarnRelEntity.setRelId(setId);
- deteWarnRelEntity.setWarnId(deteWarnInfoEntity.getId());
-
- deteWarnRelEntities.add(deteWarnRelEntity);
- }
- } else {
- DeteWarnRelEntity deteWarnRelEntity = new DeteWarnRelEntity();
- deteWarnRelEntity.setOperator(userId);
- deteWarnRelEntity.setOpTime(date);
- deteWarnRelEntity.setRelType(Constant.WARN_REL_TYPE);//关联方式,1、type,2、set
- deteWarnRelEntity.setRelId(deteTypeId);
- deteWarnRelEntity.setWarnId(deteWarnInfoEntity.getId());
-
- deteWarnRelEntities.add(deteWarnRelEntity);
- }
-
- deteWarnRelService.saveBatch(deteWarnRelEntities);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void updateEntity(DeteWarnInfoEntity deteWarnInfoEntity,MultipartFile file) {
- Long userId = ShiroUtils.getUserId();
- Date date = new Date();
- deteWarnInfoEntity.setOperator(userId);
- deteWarnInfoEntity.setOpTime(date);
- if(Constant.DETE_WARN_CALLBACK_SCRIPT.equals(deteWarnInfoEntity.getCallbackType())&&file!=null&&!file.isEmpty()){
-
- String content=this.getUploadFileJson(file);
- this.uploadFile(content,file);
- deteWarnInfoEntity.setCallbackContent(content);
- }
- this.updateById(deteWarnInfoEntity);
- }
-
- @Transactional(rollbackFor = Exception.class)
- public void deleteEntity(Long... ids) {
- Long userId = ShiroUtils.getUserId();
- Date date = new Date();
-
- UpdateWrapper<DeteWarnInfoEntity> warnInfoUpdateWrapper = new UpdateWrapper<DeteWarnInfoEntity>();
- warnInfoUpdateWrapper.set("operator", userId);
- warnInfoUpdateWrapper.set("op_time", date);
- warnInfoUpdateWrapper.set("del_flag", Constant.DELFLAG_TRUE);
- warnInfoUpdateWrapper.in("id", ids);
- this.update(warnInfoUpdateWrapper);
-
- UpdateWrapper<DeteWarnRelEntity> warnRelUpdateWrapper = new UpdateWrapper<DeteWarnRelEntity>();
- warnRelUpdateWrapper.set("operator", userId);
- warnRelUpdateWrapper.set("op_time", date);
- warnRelUpdateWrapper.set("del_flag", Constant.DELFLAG_TRUE);
- warnRelUpdateWrapper.in("warn_id", ids);
- deteWarnRelService.update(warnRelUpdateWrapper);
- }
-
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
- List<Long> queryAllowedSetIds = deteSetInfoService.queryAllowedSetIds();
- log.debug("allowed setInfo id{}",queryAllowedSetIds);
- Long[] allowedSetIds=new Long[queryAllowedSetIds.size()];
- allowedSetIds=queryAllowedSetIds.toArray(allowedSetIds);
- Long typeId = null;
- Long setId = null;
- try {
- typeId = Long.parseLong((String) params.get("typeId"));
- } catch (Exception e) {
-
- }
- try {
- setId = Long.parseLong((String) params.get("setId"));
- } catch (Exception e) {
-
- }
- String name = (String) params.get("name");
- IPage<DeteWarnInfoEntity> page = new Query<DeteWarnInfoEntity>().getPage(params);
- page=this.getBaseMapper().queryList(page,typeId,setId,name,allowedSetIds);
-
-
- List<DeteWarnInfoEntity> list = page.getRecords();
- for (DeteWarnInfoEntity warnInfo : list) {
- DeteWarnRelEntity deteWarnRelEntity = deteWarnRelDao.queryWarnRel(warnInfo.getId());
- if (Constant.WARN_REL_TYPE.equals(deteWarnRelEntity.getRelType())) {
- DeteTypeInfoEntity deteTypeInfoEntity = deteTypeInfoService.getById(deteWarnRelEntity.getRelIds());
- warnInfo.setDeteType(deteTypeInfoEntity);
- } else {
- String[] split = deteWarnRelEntity.getRelIds().split(",");
- Long[] ids = new Long[split.length];
- for (int i = 0; i < split.length; i++) {
- ids[i] = Long.parseLong(split[i]);
- }
- QueryWrapper<DeteSetInfoEntity> setInfoQueryWrapper = new QueryWrapper<>();
- setInfoQueryWrapper.in("id", ids);
- List<DeteSetInfoEntity> setInfos = deteSetInfoService.list(setInfoQueryWrapper);
- warnInfo.setDeteSet(setInfos);
- DeteTypeInfoEntity deteTypeInfoEntity = deteTypeInfoService.getById(setInfos.get(0).getTypeId());
- warnInfo.setDeteType(deteTypeInfoEntity);
- }
- }
-
- return new PageUtils(page);
- }
-
- @Override
- public DeteWarnInfoEntity queryDetail(Long id) {
- DeteWarnInfoEntity warnInfo = this.getById(id);
- QueryWrapper<DeteWarnRelEntity> warnRelQueryWrapper = new QueryWrapper<DeteWarnRelEntity>();
- warnRelQueryWrapper.eq("warn_id", id);
-
- List<DeteWarnRelEntity> warnRelInfos = deteWarnRelService.list(warnRelQueryWrapper);
- if (warnRelInfos != null && warnRelInfos.size() > 0) {
- if (warnRelInfos.size() == 1 && Constant.WARN_REL_TYPE.equals(warnRelInfos.get(0).getRelType())) {
- DeteWarnRelEntity deteWarnRelEntity = warnRelInfos.get(0);
- DeteTypeInfoEntity deteTypeInfoEntity = deteTypeInfoService.getById(deteWarnRelEntity.getRelId());
- warnInfo.setDeteType(deteTypeInfoEntity);
- } else {
- Long[] setIds = new Long[warnRelInfos.size()];
- for (int i = 0; i < warnRelInfos.size(); i++) {
- setIds[i] = warnRelInfos.get(i).getRelId();
- }
- QueryWrapper<DeteSetInfoEntity> setInfoQueryWrapper = new QueryWrapper<>();
- setInfoQueryWrapper.in("id",setIds);
- List<DeteSetInfoEntity> list = deteSetInfoService.list(setInfoQueryWrapper);
- warnInfo.setDeteSet(list);
- DeteTypeInfoEntity deteTypeInfoEntity = deteTypeInfoService.getById(list.get(0).getTypeId());
- warnInfo.setDeteType(deteTypeInfoEntity);
- }
- }
- if(warnInfo!=null){
- DeteTypeMetaEntity meta = deteTypeMetaService.getById(warnInfo.getMetaId());
- warnInfo.setMeta(meta);
- }
-
-
- return warnInfo;
- }
-
- @Override
- public void deleteByTypeId(Long typeId) {
-
- List<DeteWarnRelEntity> warnRels=deteWarnRelService.queryByTypeId(typeId);
- if(warnRels!=null&& warnRels.size()>0){
- Long[] warnIds=new Long[warnRels.size()];
- for(int i=0;i<warnRels.size();i++){
- DeteWarnRelEntity warnRel=warnRels.get(i);
- warnIds[i]=warnRel.getWarnId();
- }
-
- deleteEntity(warnIds);
- }
-
- }
-
- public boolean checkTriggerTypeIsValide(DeteWarnInfoEntity deteWarnInfoEntity){
- return checkFieldIsValide(DIC_TRIGGERTYPE,deteWarnInfoEntity.getTriggerType());
- }
-
- public boolean checkWarnModeIsValide(DeteWarnInfoEntity deteWarnInfoEntity){
- return checkFieldIsValide(DIC_WARNMODE,deteWarnInfoEntity.getWarnMode());
- }
-
- public boolean checkStatTypeIsValide(DeteWarnInfoEntity deteWarnInfoEntity){
- return checkFieldIsValide(DIC_STATTYPE,deteWarnInfoEntity.getStatType());
- }
-
- public boolean checkSymbolIsValide(DeteWarnInfoEntity deteWarnInfoEntity){
- return checkFieldIsValide(DIC_SYMBOL,deteWarnInfoEntity.getSymbol());
- }
-
- public boolean checkWarnLevelIsValide(DeteWarnInfoEntity deteWarnInfoEntity){
- return checkFieldIsValide(DIC_WARNLEVEL,deteWarnInfoEntity.getWarnLevel());
- }
-
- public boolean checkCallbackTypeIsValide(DeteWarnInfoEntity deteWarnInfoEntity){
- return checkFieldIsValide(DIC_CALLBACKTYPE,deteWarnInfoEntity.getCallbackType());
- }
-
- public boolean checkCallbackContentIsValide(DeteWarnInfoEntity deteWarnInfoEntity){
- if(deteWarnInfoEntity.getCallbackType()!=null&& Constant.DETE_WARN_CALLBACK_HTTP.equals(deteWarnInfoEntity.getCallbackType())){
- return StringUtils.isNotBlank(deteWarnInfoEntity.getCallbackContent());
- }else{
- return true;
- }
- }
-
- public boolean checkCallbackScirptFileIsValide(DeteWarnInfoEntity deteWarnInfoEntity, MultipartFile file){
- if(deteWarnInfoEntity.getCallbackType()!=null&& Constant.DETE_WARN_CALLBACK_SCRIPT.equals(deteWarnInfoEntity.getCallbackType())){
- return file!=null&&!file.isEmpty();
- }else{
- return true;
- }
- }
-
- @Override
- public boolean checkThresholdIsValide(DeteWarnInfoEntity deteWarnInfoEntity) {
- if(deteWarnInfoEntity.getTriggerType()!=null && "1".equals(deteWarnInfoEntity.getTriggerType())){
- return StringUtils.isNotBlank(deteWarnInfoEntity.getThreshold());
- }else{
- return true;
- }
- }
-
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteWarnRelServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteWarnRelServiceImpl.java
deleted file mode 100644
index 1d28509c..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/detect/service/impl/DeteWarnRelServiceImpl.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.nis.modules.detect.service.impl;
-
-import com.nis.modules.detect.dao.DeteWarnRelDao;
-import com.nis.modules.detect.entity.DeteWarnRelEntity;
-import com.nis.modules.detect.service.DeteWarnRelService;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-
-@Service("deteWarnRelService")
-public class DeteWarnRelServiceImpl extends DeteCommonServiceImpl<DeteWarnRelDao, DeteWarnRelEntity> implements DeteWarnRelService {
- @Override
- public List<DeteWarnRelEntity> queryByTypeId(Long typeId) {
- return this.getBaseMapper().queryByTypeId(typeId);
- }
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/controller/MissionController.java b/nezha-admin/src/main/java/com/nis/modules/mission/controller/MissionController.java
deleted file mode 100644
index 4a5952ed..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/controller/MissionController.java
+++ /dev/null
@@ -1,219 +0,0 @@
-package com.nis.modules.mission.controller;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.smartvalidate.utils.CommonUtil;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.mission.entity.MissionInfoEntity;
-import com.nis.modules.mission.service.MissionInfoService;
-import com.nis.modules.mission.service.MissionResultService;
-import com.nis.modules.mission.utils.ApiJsonObject;
-import com.nis.modules.mission.utils.ApiJsonProperty;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
-
-
-/**
- *
- * @ClassName:MissionController
- * @Description:任务模块
- * @author th
- * @date 2019年7月18日
- */
-@Api(tags="任务模块")
-@RestController
-@RequestMapping("mission")
-public class MissionController {
- @Autowired
- private MissionInfoService missionInfoService;
- @Autowired
- private MissionResultService missionResultService;
-
- /**
- *
- * @Title: list
- * @Description: 任务列表查询
- * @param @param params map封装对应的条件信息
- * @param @return 设定文件
- * @return R 返回类型
- * @throws
- */
- @ApiOperation(httpMethod="GET", response = MissionInfoEntity.class, value="获取任务列表", notes="根据url的id来获取用户详细信息")
- @ApiImplicitParams({
- @ApiImplicitParam(paramType="query", name = "page", value = "页码,为空时默认为1", required = false, dataType = "int", defaultValue=""),
- @ApiImplicitParam(paramType="query", name = "limit", value = "每页条数,为空时默认为10", required = false, dataType = "int", defaultValue=""),
- @ApiImplicitParam(paramType="query", name = "sidx", value = "排序字段", required = false, dataType = "string", defaultValue=""),
- @ApiImplicitParam(paramType="query", name = "order", value = "排序方式,如:asc、desc", required = false, dataType = "string", defaultValue=""),
- @ApiImplicitParam(paramType="query", name = "isLoop", value = "是否周期任务 0:不是,1:是", required = false, dataType = "string", defaultValue=""),
- @ApiImplicitParam(paramType="query", name = "type", value = "任务类型 1:文件推送,2:命令执行,3:升级部署", required = false, dataType = "string", defaultValue=""),
- @ApiImplicitParam(paramType="query", name = "name", value = "任务名称", required = false, dataType = "string", defaultValue="")
- })
- @RequestMapping("/list")
- /* @RequiresPermissions("mission:missioninfo:list")*/
- public R list(Integer page,Integer limit,String sidx,String order,String isLoop,String type,String name){
- Page queryPage=new Page();
- if(limit!=null) {
- queryPage.setSize(limit);
- }
- if(page!=null) {
- queryPage.setCurrent(page);
- }
- if(!CommonUtil.isNull(order) && !CommonUtil.isNull(sidx)) {
- if(order.equalsIgnoreCase("asc")) {
- queryPage.setAsc(sidx);
- }
- if(order.equalsIgnoreCase("desc")) {
- queryPage.setDesc(sidx);
- }
- }
- MissionInfoEntity missionInfoEntity = new MissionInfoEntity();
- missionInfoEntity.setSidx(sidx);
- missionInfoEntity.setOrder(order);
- missionInfoEntity.setIsLoop(isLoop);
- missionInfoEntity.setType(type);
- missionInfoEntity.setName(name);
-
- PageUtils Ipage = missionInfoService.queryPage(queryPage,missionInfoEntity);
- return R.ok().put("page", Ipage);
- }
-
-
- /**
- *
- * @Title: detail
- * @Description: 任务详情查询
- * @param @param id 任务id
- * @return R 返回类型
- * @throws
- */
- @ApiOperation(value="获取详情查询", notes="根据url的id来获取任务详细信息")
- @RequestMapping(value="/detail",method=RequestMethod.GET)
- //@RequiresPermissions("mission:missioninfo:list")
- public R detail(@RequestParam Integer id){
- ValidateUtils.check(id).notNull(RCode.MISSION_ID_ISNULL);
-
- MissionInfoEntity missionInfoEntity = missionInfoService.getMissionById(id);
- return R.ok().put("data", missionInfoEntity);
- }
-
- /**
- * 任务结果查询
- * @param id
- * @return
- */
- @ApiOperation(value="获取任务结果", notes="根据url的id来获取任务结果")
- @RequestMapping(value="/result",method=RequestMethod.GET)
- public R result(Integer page,Integer limit,Integer id) {
- ValidateUtils.check(id).notNull(RCode.MISSION_ID_ISNULL);
- Page queryPage=new Page();
- if(limit!=null) {
- queryPage.setSize(limit);
- }
- if(page!=null) {
- queryPage.setCurrent(page);
- }
- PageUtils missionResults = missionResultService.queryPage(queryPage,id);
- return R.ok().put("page", missionResults);
- }
-
-
- /**
- * 保存
- */
- @PostMapping("/save")
- /*@RequiresPermissions("mission:missioninfo:save")*/
- @ApiOperation(httpMethod="POST",value="新增任务", notes="任务各项属性")
- public R save(MissionInfoEntity missionInfo,MultipartFile[] files){
- // 验证处理参数
- missionInfoService.validateMissionInfoData(missionInfo,files);
- missionInfoService.saveMission(missionInfo);
-
- return R.ok();
- }
-
-
- /**
- * 信息
- */
- @RequestMapping("/info/{id}")
- @RequiresPermissions("mission:missioninfo:info")
- public R info(@PathVariable("id") Long id){
- MissionInfoEntity missionInfo = missionInfoService.getById(id);
-
- return R.ok().put("missionInfo", missionInfo);
- }
-
-
-
- /**
- * 任务仅能修改名称和备注 周期任务可以修改任务运行和暂停
- */
- @PutMapping("/update")
- /*@RequiresPermissions("mission:missioninfo:update")*/
- @ApiOperation(httpMethod="PUT",value="修改任务名称备注", notes="任务名称备注")
- public R update(@RequestBody MissionInfoEntity missionInfo){
- ValidateUtils.is(missionInfo.getId()).notNull(RCode.MISSION_ID_ISNULL);
- ValidateUtils.is(missionInfo.getName()).notNull(RCode.MISSION_NAME_ISNULL);
- missionInfoService.updateMission(missionInfo);
- return R.ok();
- }
-
- /**
- * 周期任务停用启用
- */
- @PutMapping("/loopStateChange")
- /*@RequiresPermissions("mission:missioninfo:update")*/
- @ApiOperation(httpMethod="PUT",value="修改任务周期状态", notes="任务周期")
- public R loopStateChange(@RequestBody MissionInfoEntity missionInfo){
- ValidateUtils.is(missionInfo.getIds()).notNull(RCode.MISSION_ID_ISNULL);
- ValidateUtils.is(missionInfo.getState()).notNull(RCode.MISSION_STATE_ISNULL);
- //验证周期任务启用停用参数是否正确
- List<MissionInfoEntity> updateMissions=missionInfoService.validateLoopMissionInfoData(missionInfo.getIds(),missionInfo.getState());
- missionInfoService.updateBatchById(updateMissions);
- return R.ok();
- }
-
-
- /**
- *
- * @Title: detail
- * @Description: 获取逆向任务详情
- * @param @param id 任务id
- * @return R 返回类型
- * @throws
- */
- @ApiOperation(value="获取逆向任务详情", notes="根据url的id来获取任务详细信息")
- @RequestMapping(value="/converse",method=RequestMethod.GET)
- //@RequiresPermissions("mission:missioninfo:list")
- public R converse(@RequestParam Long id){
- ValidateUtils.check(id).notNull(RCode.MISSION_ID_ISNULL);
- MissionInfoEntity missionInfoEntity = missionInfoService.getConverseMissionById(id);
- return R.ok().put("data", missionInfoEntity);
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionInfoDao.java b/nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionInfoDao.java
deleted file mode 100644
index 6309e217..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionInfoDao.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.nis.modules.mission.dao;
-
-import com.nis.modules.mission.entity.MissionDto;
-import com.nis.modules.mission.entity.MissionInfoEntity;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import com.nis.modules.sys.entity.UserGroupEntity;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Constants;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-/**
- * 任务信息表
- *
- * @author th
- * @email ${email}
- * @date 2019-07-18 10:37:19
- */
-@Mapper
-public interface MissionInfoDao extends BaseMapper<MissionInfoEntity> {
-
- // 查询当前用户可查看任务详情列表
- Page<MissionInfoEntity> selectMissionInfoList(Page page,@Param("missionInfo") MissionInfoEntity missionInfoEntity);
-
- List<MissionInfoEntity> queryByPermission(PermissionInfoEntity entity);
-
- MissionDto checkNodeGroupCorrect(@Param("nodeGroupIds")List nodeGroupIds);
-
- MissionDto checkNodeCorrect(@Param("nodeGroupIds")List nodeGroupIds,@Param("nodeIds")List nodeIds);
-
- MissionDto selectNodeGroupOrNodeForCheck(@Param("nodeGroupIds")List nodeGroupIds,@Param("nodeIds")List nodeIds);
-
- List<NodeGroupInfoEntity> selectNodeGroupByMissionid(@Param("missionId")Long missionId);
-
- List<NodeInfoEntity> selectNodeByMissionid(@Param("missionId")Long missionId);
-
- List<UserGroupEntity> selectUserGroup(@Param("missionId")Long missionId);
-
- List<SystemInfoEntity> selectSystem(@Param("missionId")Long missionId);
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionNodeRelDao.java b/nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionNodeRelDao.java
deleted file mode 100644
index 72324b0d..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionNodeRelDao.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.nis.modules.mission.dao;
-
-import com.nis.modules.mission.entity.MissionNodeRelEntity;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-import java.util.List;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-/**
- * 任务节点关系表
- *
- * @author th
- * @email ${email}
- * @date 2019-07-18 10:37:19
- */
-@Mapper
-public interface MissionNodeRelDao extends BaseMapper<MissionNodeRelEntity> {
-
- //根据任务id查询该任务下所有节点组信息详情
- List<NodeGroupInfoEntity> selectNodeGroupEntityByMissionid(@Param("missionId")Long missionId);
-
- //根据任务id查询该任务下所有节点组信息详情
- List<NodeInfoEntity> selectNodeEntityByMissionid(@Param("missionId")Long missionId);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionResultDao.java b/nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionResultDao.java
deleted file mode 100644
index dc1fb41c..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/dao/MissionResultDao.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.nis.modules.mission.dao;
-
-import com.nis.modules.mission.entity.MissionResultEntity;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-/**
- * 任务结果表
- *
- * @author th
- * @email ${email}
- * @date 2019-07-18 10:37:19
- */
-@Mapper
-public interface MissionResultDao extends BaseMapper<MissionResultEntity> {
- // 查询当前用户可查看任务结果详情列表
- Page<MissionResultEntity> selectMissionResultInfoList(Page page,@Param("id") Integer missionId);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/Backup.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/Backup.java
deleted file mode 100644
index eaf1cf7d..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/Backup.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.nis.modules.mission.entity;
-
-import java.io.Serializable;
-
-import com.alibaba.fastjson.JSON;
-
-import lombok.Data;
-
-@Data
-public class Backup implements Serializable{
-
- private static final long serialVersionUID = 1L;
- private String backup;
- private String backupTo;
- private String[] except;
- private String exceptTmpStr;
- private String isAbs;
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/CoverUpdate.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/CoverUpdate.java
deleted file mode 100644
index a2294518..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/CoverUpdate.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.nis.modules.mission.entity;
-
-import java.io.Serializable;
-
-import lombok.Data;
-
-@Data
-public class CoverUpdate implements Serializable{
-
- private static final long serialVersionUID = 1L;
- /**
- * 指定更新需要的文件
- */
- private String source = null;
- /**
- * 指定文件覆盖目录
- */
- private String cover = null;
- /**
- * 是否创建覆盖目录,暂时没用
- */
- private String isCreateCover = null;
- /**
- * 删除的文件或目录,如果是相对路径,则相对需要更新的目录
- */
- private String[] delete = null;
- /**
- * 如果更新源文件是个压缩包:Y 按绝对路径解压即在根目录下解压,N 按进入备份目录解压(这个属性只针对Linux有效,Windows下只按进入备份目录解压)
- */
- private String deleteTmpStr;//删除文件临时字符串
- private String isAbs = null;//解压标识
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionDto.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionDto.java
deleted file mode 100644
index d1404ed7..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionDto.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.nis.modules.mission.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-import lombok.Data;
-/**
- * 此类用于做任务数据组装使用
- * @author Th
- *
- */
-@Data
-public class MissionDto implements Serializable{
-
- private static final long serialVersionUID = 1L;
- private String commandEnname;
- private Integer commandType;
- /**
- * 升级时间
- */
- private Date startTime;
- private List<ParamForExecuteInstruct> paramForExecuteInstructs; // 用于命令执行力的 备份
- private ParamForExecuteInstruct paramForExecuteInstruct; // 用于命令执行里的 停止进程
- private MissionLoopEntity missionLoopEntity;
- private ParamForUpgrade paramForUpgrade;
- private List<ParamForUpgrade> paramForUpgrades;
-
- private Integer dgnic; // 去重之后的nodeGroupId总数 distinct group node id count
- private Integer ngnnc; // 节点组下空节点的节点组个数 node group node null count
- private Integer nnc; // 节点为网元的个数 node net count
- private Integer total; // 总数
- private List<Long> nodeGroupIds; // 节点组id
- private List<Long> nodeIds; // 节点id
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionExecuteType.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionExecuteType.java
deleted file mode 100644
index 6e1c9183..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionExecuteType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.nis.modules.mission.entity;
-
-public enum MissionExecuteType {
- UPGRADE_KILL_PROCESS("upgrade_kill_process"), //停用进程
- UPGRADE_START("upgrade_start"), //启动
- UPGRADE_BACKUP("upgrade_backup"), //备份
- UPGRADE_UPDATE("upgrade_update"), //覆盖更新
- UPGRADE_RECOVER("upgrade_recover"), //恢复
- UPGRADE_EXEC("upgrade_exec"), //可执行命令
- SINGLE_EXEC("single_exec"); //单次执行命令
-
- private String name;
-
- private MissionExecuteType(String name) {
- this.name=name;
- }
-
- public static MissionExecuteType getMissionExecuteType(String name) {
- MissionExecuteType[] missionExecuteTypes = MissionExecuteType.values();
- for(MissionExecuteType missionExecuteType:missionExecuteTypes) {
- if(missionExecuteType.getName().equals(name)) {
- return missionExecuteType;
- }
- }
- return null;
- }
-
- public String getName() {
- return name;
- }
-
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionInfoEntity.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionInfoEntity.java
deleted file mode 100644
index 13d0d7a1..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionInfoEntity.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package com.nis.modules.mission.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import com.nis.modules.sys.entity.SysUserEntity;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-import org.springframework.web.multipart.MultipartFile;
-
-import lombok.Data;
-
-/**
- * 任务信息表
- *
- * @author th
- * @email ${email}
- * @date 2019-07-18 10:37:19
- */
-@Data
-@TableName("mission_info")
-@KeySequence(value="seq_mission_info")
-public class MissionInfoEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- *
- */
- @TableId(type= IdType.INPUT)
- private Long id;
-
- @TableField(exist=false)
- private Long[] ids;
- /**
- *
- */
- private String name;
- /**
- * 任务类型,1、文件推送,2、命令执行,3、升级部署
- */
- private String type;
- /**
- * 任务状态,周期任务有效,0、非周期任务,1、运行,2、暂停,3、终止
- */
- private String state;
- /**
- * 1:用户组,2:系统内全部人员,3:无限制,默认2
- */
- private String viewLevel;
- /**
- * 是否周期任务,0:不是,1:是
- */
- private String isLoop;
- /**
- * 周期间隔,单位分钟
- */
- private Integer loopInterval;
- /**
- * 任务参数,json方式保存
- */
- private String param;
- /**
- * 备注
- */
- private String remark;
- /**
- * 是否删除,1:删除,0:未删除,默认:0
- */
- private String delFlag;
- /**
- *
- */
- private Long operator;
- /**
- * 操作时间
- */
- private Date opTime;
- /**
- * 任务状态描述
- */
- @TableField(exist=false)
- private Integer[] stateDesc;
-
- //关联节点组列表
- @TableField(exist=false)
- private List<MissionNodeRelEntity> mnrList;
-
- //节点组id
- @TableField(exist=false)
- private List<Long> nodeGroupIds;
-
- //节点uuid
- @TableField(exist=false)
- private List<Long> nodeIds;
-
- //节点组
- @TableField(exist=false)
- private List<NodeGroupInfoEntity> nodeGroups;
-
- //节点
- @TableField(exist=false)
- private List<NodeInfoEntity> nodes;
-
- /**
- * 权限记录
- */
- @TableField(exist=false)
- private PermissionInfoEntity permission;
-
- @TableField(exist=false)
- private SysUserEntity user;
-
- @TableField(exist=false)
- private String sidx;
-
- @TableField(exist=false)
- private String order;
-
- /*@TableField(exist=false)
- private List<ParamForFilePush> paramForFilePushs;*/
-
- @TableField(exist=false)
- private String commandEnname; // 具体任务名称 只有指令执行和升级部署有值
-
- @TableField(exist=false)
- private Integer commandType; // 具体任务名称对应类型
-
- @TableField(exist=false)
- private Integer isGlobal;
-
- @TableField(exist=false)
- private Long[] viewerId;
-
- @TableField(exist=false)
- private List viewer;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionLoopEntity.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionLoopEntity.java
deleted file mode 100644
index 02544df3..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionLoopEntity.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.nis.modules.mission.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import lombok.Data;
-
-@Data
-public class MissionLoopEntity implements Serializable{
-
- private static final long serialVersionUID = 1L;
- private Date startTime;
- private Date endTime;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionNodeRelEntity.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionNodeRelEntity.java
deleted file mode 100644
index f8a77f1d..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionNodeRelEntity.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.nis.modules.mission.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.Data;
-
-/**
- * 任务节点关系表
- *
- * @author th
- * @email ${email}
- * @date 2019-07-18 10:37:19
- */
-@Data
-@TableName("mission_node_rel")
-@KeySequence(value="seq_mission_node_rel")
-public class MissionNodeRelEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- *
- */
- @TableId(type= IdType.INPUT)
- private Long id;
- /**
- * 任务id
- */
- private Long missionId;
- /**
- * 关联类型,1:节点组,2:节点
- */
- private String type;
- /**
- * 关联id
- */
- private Long relId;
- /**
- * 是否删除,1:删除,0:未删除,默认:0
- */
- private String delFlag;
- /**
- * 操作时间
- */
- private Date opTime;
- /**
- *
- */
- private Long operator;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionResultEntity.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionResultEntity.java
deleted file mode 100644
index 0d893735..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionResultEntity.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.nis.modules.mission.entity;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.nis.modules.node.entity.NodeInfoEntity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import lombok.Data;
-
-/**
- * 任务结果表
- *
- * @author th
- * @email ${email}
- * @date 2019-07-18 10:37:19
- */
-@Data
-@TableName("mission_result")
-public class MissionResultEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- *
- */
- @TableId
- private Long id;
- /**
- *
- */
- private Long missionId;
- /**
- *
- */
- private Long uuid;
- /**
- * 任务结果描述信息
- */
- private String descr;
- /**
- * 任务执行状态
- */
- private String state;
- /**
- * 第几周期
- */
- private Integer cycle;
- /**
- * 回传文件路径
- */
- private String file;
- /**
- * 操作时间
- */
- private Date opTime;
- /**
- *
- */
- private Long operator;
-
- @TableField(exist=false)
- private NodeInfoEntity nodeInfoEntity;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionType.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionType.java
deleted file mode 100644
index 3af2a162..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionType.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.nis.modules.mission.entity;
-
-public enum MissionType{
- FILE_PUSH(1,"FilePush"),
- EXECUTE_INSTRUCT(2,"ExecuteInstruct"),
- UGPRADE(3,"Ugprade");
-
- private int missionTypeId;
- private String missionTypeName;
-
- private MissionType(int missionTypeId,String missionTypeName) {
- this.missionTypeId=missionTypeId;
- this.missionTypeName=missionTypeName;
- }
-
- public static MissionType getMissionNameByTypeId(Integer typeId) {
- MissionType[] values = MissionType.values();
- int length = values.length;
- for (int i = 0; i < length; i++) {
- if (typeId==values[i].missionTypeId) {
- return values[i];
- }
- }
- return null;
- }
-
- public int getMissionTypeId() {
- return missionTypeId;
- }
-
- public void setMissionTypeId(int missionTypeId) {
- this.missionTypeId = missionTypeId;
- }
-
- public String getMissionTypeName() {
- return missionTypeName;
- }
-
- public void setMissionTypeName(String missionTypeName) {
- this.missionTypeName = missionTypeName;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionUpgradeType.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionUpgradeType.java
deleted file mode 100644
index 1f7c7b4d..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/MissionUpgradeType.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.nis.modules.mission.entity;
-
-public enum MissionUpgradeType {
- UPGRADE_AGENT("upgrade_agent"),
- UPGRADE_OTHER("upgrade_other"),
- UPGRADE_SERVER("upgrade_server");
- private String name;
-
- private MissionUpgradeType(String name) {
- this.name=name;
- }
-
- public static MissionUpgradeType getMissionUpgradeType(String name) {
- MissionUpgradeType[] missionUpgradeTypes = MissionUpgradeType.values();
- for(MissionUpgradeType missionUpgradeType:missionUpgradeTypes) {
- if(missionUpgradeType.getName().equals(name)) {
- return missionUpgradeType;
- }
- }
- return null;
- }
-
- public String getName() {
- return name;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForExecuteInstruct.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForExecuteInstruct.java
deleted file mode 100644
index ee6a087b..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForExecuteInstruct.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.nis.modules.mission.entity;
-
-import java.io.Serializable;
-
-import lombok.Data;
-
-@Data
-public class ParamForExecuteInstruct implements Serializable{
-
- private static final long serialVersionUID = 1L;
- /**
- * 执行文件或命令
- */
- private String execCmd;
- /**
- * 执行文件或命令的参数序列
- */
- private String [] execParams;
- private String execParamsTmpStr;
- /**
- * 该命令是否强制执行:Y是,N否
- */
- private String forceExec;
- /**
- * 常驻内存标识: Y是,N否
- */
- private String residentFlag;
- /**
- * 存放执行结果标识的文件:1、常驻内存的,写入PID,2、非常驻的,写执行结果:结果标识(0 成功 1 失败)|结果描述
- */
- private String execResult;
- /**
- * 回传标识: Y是,N否
- */
- private String returnFlag;
- /**
- * 回传文件或目录路径
- */
- private String returnPath;
- /**
- * 最终结果获取最大等待时间(单位:分钟)
- */
- private String maxWaitTime;
- /**
- * 执行文件或命令的用户名
- */
- private String username;
- /**
- * 用户密码
- */
- private String pw;
-
- /**
- * 类型
- */
- private Long commandType;
- /**
- * 返回结果最大长度 不能为空,缺省1024,返回结果的最大长度
- */
- private Long maxReturn;
-
-
- //--批量备份
- private String backup; //需要备份的文件
- private String backupTo; //备份到的路径
- private String[] except;
- private String exceptTmpStr; //排除文件
- private String isAbs; //是否为绝对路径 1-是
-
- //--批量更新
- private String source;
- private String cover;
- private String isCreateCover;
- private String[] delete;
- private String deleteTmpStr;
- //--批量停用
- private String pidFile;
- private String[] pidFiles;
- private String commandEnname; // 具体任务名称
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForFilePush.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForFilePush.java
deleted file mode 100644
index 8ed42eda..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForFilePush.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.nis.modules.mission.entity;
-
-import java.io.Serializable;
-
-import org.springframework.web.multipart.MultipartFile;
-
-import lombok.Data;
-
-@Data
-public class ParamForFilePush implements Serializable{
- private static final long serialVersionUID = 1L;
- /**
- * 推送文件名
- */
- private String fileName;
- /**
- * 处理后的文件名称
- */
- private String upFileName;
- /**
- * 推送目的地
- */
- private String destPath;
- /**
- * 推送文件的MD5值
- */
- private String md5Value;
- /**
- * 是否覆盖:Y是,N否
- */
- private String isCover;
- /**
- * 推送文件的属主(只针对Linux有效)
- */
- private String username;
- /**
- * 属主密码
- */
- private String pw;
- /**
- * 推送文件的属群(只针对Linux有效)
- */
- private String groupName;
- /**
- * 推送文件拥有的权限(只针对Linux有效)
- */
- private String permisson;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForUpgrade.java b/nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForUpgrade.java
deleted file mode 100644
index 68a0ac13..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/entity/ParamForUpgrade.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package com.nis.modules.mission.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-import lombok.Data;
-
-@Data
-public class ParamForUpgrade implements Serializable{
-
- private static final long serialVersionUID = 1L;
- /**
- * 指定更新需要的文件,如果是相对路径,则相对推送目的地
- */
- private String fileName;
- /**
- * 处理过后的文件名称
- */
- private String upFileName;
- /**
- * 指定文件覆盖目录
- */
- private String cover;
- /**
- * 是否创建覆盖目录
- */
- private String isCreateCover;
- /**
- * 如果更新源文件是个压缩包:Y 按绝对路径解压即在根目录下解压,N 按进入备份目录解压(这个属性只针对Linux有效,Windows下只按进入备份目录解压)
- */
- private String isAbs;
- /**
- * 备份目录,如果是相对路径,则相对覆盖目录
- */
- private List<Backup> backups;
- /**
- * 恢复目录
- */
- private List<CoverUpdate> recoverys;
- /**
- * 需要删除的目录,如果是相对路径,则相对覆盖目录
- */
- private String [] delete;
- /**
- * 进程PID文件全路径
- */
- private String pidFile;
- /**
- * 进程启动文件全路径
- */
- private String startupFile;
- /**
- * 执行文件的参数序列
- */
- private String[] execParams;
- /**
- * 该命令是否强制执行:Y是,N否
- */
- private String forceExec;
- /**
- * 最终结果获取最大等待时间(单位:分钟)
- */
- private String maxWaitTime;
- /**
- * 文件的属主或运行的用户(只针对Linux有效)
- */
- private String username;
- /**
- * 用记密码
- */
- private String pw;
- /**
- * 文件的属组(只针对Linux有效)
- */
- private String groupName;
- /**
- * 权限设置
- */
- private String permisson;
- /**
- * 配合页面修改用的属性
- */
- private String deleteTmpStr;
- private String execParamsTmpStr;
- /**
- * 推送文件的MD5值
- */
- private String md5Value;
-
- private Long version; // 用于逆向任务标识 储存被逆向任务的id 只有逆向任务此属性有值
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/service/MissionInfoService.java b/nezha-admin/src/main/java/com/nis/modules/mission/service/MissionInfoService.java
deleted file mode 100644
index 378dbefe..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/service/MissionInfoService.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.nis.modules.mission.service;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.mission.entity.MissionInfoEntity;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.web.multipart.MultipartFile;
-
-/**
- * 任务信息表
- *
- * @author th
- * @email ${email}
- * @date 2019-07-18 10:37:19
- */
-public interface MissionInfoService extends IService<MissionInfoEntity> {
-
- PageUtils queryPage(Page page,MissionInfoEntity missionInfoEntity);
-
- void validateMissionInfoData(MissionInfoEntity missionInfoEntity,MultipartFile[] files);
-
- //根据任务id获取任务详情
- MissionInfoEntity getMissionById(Integer id);
-
- List<MissionInfoEntity> queryByPermission(PermissionInfoEntity entity);
-
- void saveMission(MissionInfoEntity missionInfoEntity);
-
- List<MissionInfoEntity> validateLoopMissionInfoData(Long[] missionIds,String state);
-
- void updateMission(MissionInfoEntity missionInfoEntity);
-
- MissionInfoEntity getConverseMissionById(Long id);
-
- void checkNodeGroupOrNodeCorrect(List<Long> nodeGroupIds,List<Long> nodeIds);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/service/MissionNodeRelService.java b/nezha-admin/src/main/java/com/nis/modules/mission/service/MissionNodeRelService.java
deleted file mode 100644
index 456b1720..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/service/MissionNodeRelService.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.nis.modules.mission.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.mission.entity.MissionNodeRelEntity;
-
-import java.util.Map;
-
-/**
- * 任务节点关系表
- *
- * @author th
- * @email ${email}
- * @date 2019-07-18 10:37:19
- */
-public interface MissionNodeRelService extends IService<MissionNodeRelEntity> {
-
- PageUtils queryPage(Map<String, Object> params);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/service/MissionResultService.java b/nezha-admin/src/main/java/com/nis/modules/mission/service/MissionResultService.java
deleted file mode 100644
index a91d8d86..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/service/MissionResultService.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.nis.modules.mission.service;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.mission.entity.MissionInfoEntity;
-import com.nis.modules.mission.entity.MissionResultEntity;
-
-import java.util.Map;
-
-/**
- * 任务结果表
- *
- * @author th
- * @email ${email}
- * @date 2019-07-18 10:37:19
- */
-public interface MissionResultService extends IService<MissionResultEntity> {
-
- PageUtils queryPage(Page page,Integer missionId);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionInfoServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionInfoServiceImpl.java
deleted file mode 100644
index a6fc2649..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionInfoServiceImpl.java
+++ /dev/null
@@ -1,1039 +0,0 @@
-package com.nis.modules.mission.service.impl;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.ResourceUtils;
-import org.springframework.web.multipart.MultipartFile;
-
-import static org.junit.Assert.assertNotNull;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.exception.NZException;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.smartvalidate.utils.CommonUtil;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.RCode;
-import com.nis.modules.mission.dao.MissionInfoDao;
-import com.nis.modules.mission.dao.MissionNodeRelDao;
-import com.nis.modules.mission.dao.MissionResultDao;
-import com.nis.modules.mission.entity.Backup;
-import com.nis.modules.mission.entity.MissionDto;
-import com.nis.modules.mission.entity.MissionExecuteType;
-import com.nis.modules.mission.entity.MissionUpgradeType;
-import com.nis.modules.mission.entity.ParamForExecuteInstruct;
-import com.nis.modules.mission.entity.MissionInfoEntity;
-import com.nis.modules.mission.entity.MissionLoopEntity;
-import com.nis.modules.mission.entity.MissionNodeRelEntity;
-import com.nis.modules.mission.entity.MissionResultEntity;
-import com.nis.modules.mission.service.MissionInfoService;
-import com.nis.modules.mission.service.MissionNodeRelService;
-import com.nis.modules.mission.utils.DESUtil;
-import com.nis.modules.mission.utils.FileUtil;
-import com.nis.modules.mission.utils.MD5Util;
-import com.nis.modules.node.entity.NodeCabinetEntity;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.sys.dao.SysUserDao;
-import com.nis.modules.sys.dao.UserUsergroupDao;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import com.nis.modules.sys.entity.SysUserEntity;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import com.nis.modules.sys.entity.UserGroupEntity;
-import com.nis.modules.sys.service.PermissionInfoService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-
-
-import com.nis.modules.mission.entity.MissionType;
-import com.nis.modules.mission.entity.ParamForFilePush;
-import com.nis.modules.mission.entity.ParamForUpgrade;
-
-
-@Service("missionInfoService")
-public class MissionInfoServiceImpl extends ServiceImpl<MissionInfoDao, MissionInfoEntity> implements MissionInfoService {
- private final static Logger logger=LoggerFactory.getLogger(MissionInfoServiceImpl.class);
- @Autowired
- private MissionInfoDao missionInfoDao;
- @Autowired
- private MissionResultDao missionResultDao;
- @Autowired
- private SysUserDao sysUserDao;
- @Autowired
- private Environment en;
- @Autowired
- private MissionNodeRelService missionNodeRelService;
- @Autowired
- private PermissionInfoService permissionInfoService;
- @Autowired
- private UserUsergroupDao userUsergroupDao;
- @Autowired
- private MissionNodeRelDao missionNodeRelDao;
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public PageUtils queryPage(Page queryPage,MissionInfoEntity entity) {
- //获取当前用户信息
- SysUserEntity user = ShiroUtils.getUserEntity();
- entity.setUser(user);
- logger.info(" user info is "+user);
- if(ShiroUtils.isGlobal()) {
- entity.setIsGlobal(1);
- }
- IPage<MissionInfoEntity> page = baseMapper.selectMissionInfoList(queryPage,entity);
- logger.info(" query page content :"+JSON.toJSONString(page));
- //获取MissionInfoEntity 列表
- List<MissionInfoEntity> list=page.getRecords();
- //遍历查询任务执行情况
- for(MissionInfoEntity missionInfoEntity:list) {
- //任务id下对应的各个节点任务的执行情况
- List<MissionResultEntity> missionResultList=missionResultDao.selectList(
- new QueryWrapper<MissionResultEntity>()
- .eq("mission_id", missionInfoEntity.getId())
- );
-
- //遍历 missionResultList 进行任务执行情况统计
- int success=0;
- int fail=0;
- int timeOut=0;
- for(MissionResultEntity missionResult:missionResultList) {
- if(Constant.MISSION_RESULT_SUCCESS.equals(missionResult.getState())) {
- //成功
- success++;
- }else if(Constant.MISSION_RESULT_FAIL.equals(missionResult.getState())) {
- fail++;
- }else if(Constant.MISSION_RESULT_TIMEOUT.equals(missionResult.getState())) {
- timeOut++;
- }
-
- }
-
- //String res=success+","+fail+","+timeOut;
- Integer[] res = new Integer[3];
- res[0]=success;
- res[1]=fail;
- res[2]=timeOut;
- missionInfoEntity.setStateDesc(res);
-
- //查询任务查看用户组或者系统信息
- if(Constant.VIEWLEVEL_UG.equals(missionInfoEntity.getViewLevel())){
- List<UserGroupEntity> userGroups=this.getBaseMapper().selectUserGroup(missionInfoEntity.getId());
- missionInfoEntity.setViewer(userGroups);
- }else if(Constant.VIEWLEVEL_SYS.equals(missionInfoEntity.getViewLevel())){
- List<SystemInfoEntity> system=this.getBaseMapper().selectSystem(missionInfoEntity.getId());
- missionInfoEntity.setViewer(system);
- }
-
- //根据用户id获取用户名
- missionInfoEntity.setOperator(ShiroUtils.getUserId());
- }
- page.setRecords(list);
- return new PageUtils(page);
- }
-
- public MissionInfoEntity getMissionById(Integer id) {
-
- MissionInfoEntity missionInfoEntity=this.getById(id);
-
- //任务id下对应的各个节点任务的执行情况
- List<MissionResultEntity> missionResultList=missionResultDao.selectList(
- new QueryWrapper<MissionResultEntity>()
- .eq(true, "mission_id", missionInfoEntity.getId())
- );
-
- //进行任务执行情况统计
- int success=0;
- int fail=0;
- int timeOut=0;
- for(MissionResultEntity missionResult:missionResultList) {
- if(Constant.MISSION_RESULT_SUCCESS.equals(missionResult.getState())) {
- //成功
- success++;
- }else if(Constant.MISSION_RESULT_FAIL.equals(missionResult.getState())) {
- fail++;
- }else if(Constant.MISSION_RESULT_TIMEOUT.equals(missionResult.getState())) {
- timeOut++;
- }
-
- }
-
- //String res=success+","+fail+","+timeOut;
- Integer[] res = new Integer[3];
- res[0]=success;
- res[1]=fail;
- res[2]=timeOut;
- missionInfoEntity.setStateDesc(res);
-
- //查询节点组
- List<NodeGroupInfoEntity> nodeGroups = missionNodeRelDao.selectNodeGroupEntityByMissionid(missionInfoEntity.getId());
- //查询节点
- List<NodeInfoEntity> nodes = missionNodeRelDao.selectNodeEntityByMissionid(missionInfoEntity.getId());
-
- //查询任务查看用户组或者系统信息
- if(Constant.VIEWLEVEL_UG.equals(missionInfoEntity.getViewLevel())){
- List<UserGroupEntity> userGroups=this.getBaseMapper().selectUserGroup(missionInfoEntity.getId());
- missionInfoEntity.setViewer(userGroups);
- }else if(Constant.VIEWLEVEL_SYS.equals(missionInfoEntity.getViewLevel())){
- List<SystemInfoEntity> system=this.getBaseMapper().selectSystem(missionInfoEntity.getId());
- missionInfoEntity.setViewer(system);
- }
-
- missionInfoEntity.setNodeGroups(nodeGroups);
- missionInfoEntity.setNodes(nodes);
- //根据用户id获取用户名
- missionInfoEntity.setOperator(ShiroUtils.getUserId());
-
- return missionInfoEntity;
- }
-
- @Override
- public List<MissionInfoEntity> queryByPermission(PermissionInfoEntity entity) {
- List<MissionInfoEntity> queryByPermission = baseMapper.queryByPermission(entity);
- return queryByPermission;
- }
-
- @Override
- @Transactional(readOnly = false)
- public void saveMission(MissionInfoEntity missionInfoEntity) {
- logger.info("start save missionInfo");
- missionInfoEntity.setOperator(ShiroUtils.getUserId());
- missionInfoEntity.setOpTime(new Date());
- logger.info("save missionInfo content :"+JSON.toJSONString(missionInfoEntity));
- baseMapper.insert(missionInfoEntity);
- logger.info(" save missionInfo success");
- //添加任务与节点之间的关系
- List<MissionNodeRelEntity> missionNodeRelEntitys=new ArrayList<MissionNodeRelEntity>();
- List<Long> nodeIds = missionInfoEntity.getNodeIds();
- List<Long> nodeGroupIds = missionInfoEntity.getNodeGroupIds();
- //添加权限相关设置信息
- List<PermissionInfoEntity> permissionInfoEntitys = new ArrayList<PermissionInfoEntity>();
- Long relId = null;
- boolean permissionFlag=false;
- logger.info("start save node missionInfo and permissionInfo data");
- if(Constant.VIEWLEVEL_UG.equals(missionInfoEntity.getViewLevel())) {
- ValidateUtils.is(missionInfoEntity.getViewerId()).notNull(RCode.MISSION_VIEWERID_ISNULL);
- permissionFlag=true;
- } else if(Constant.VIEWLEVEL_SYS.equals(missionInfoEntity.getViewLevel())) {
- relId = ShiroUtils.getCurrSystemId();
- permissionFlag=true;
- }
- if(null!=nodeIds&&nodeIds.size()>0) {
- for(Long nodeId : nodeIds) {
- MissionNodeRelEntity missionNodeRelEntity=new MissionNodeRelEntity();
- missionNodeRelEntity.setMissionId(missionInfoEntity.getId());
- missionNodeRelEntity.setType(Constant.MISSION_NODE_REL_TYPE_NODE);
- missionNodeRelEntity.setRelId(nodeId);
- missionNodeRelEntity.setOpTime(new Date());
- missionNodeRelEntity.setOperator(ShiroUtils.getUserId());
- missionNodeRelEntitys.add(missionNodeRelEntity);
- }
- }
- if(null!=nodeGroupIds&&nodeGroupIds.size()>0) {
- for(Long nodeGroupId : nodeGroupIds) {
- MissionNodeRelEntity missionNodeRelEntity=new MissionNodeRelEntity();
- missionNodeRelEntity.setMissionId(missionInfoEntity.getId());
- missionNodeRelEntity.setType(Constant.MISSION_NODE_REL_TYPE_GROUP);
- missionNodeRelEntity.setRelId(nodeGroupId);
- missionNodeRelEntity.setOpTime(new Date());
- missionNodeRelEntity.setOperator(ShiroUtils.getUserId());
- missionNodeRelEntitys.add(missionNodeRelEntity);
- }
- }
-
- if(permissionFlag) {
- if(null!=missionInfoEntity.getViewerId()&&missionInfoEntity.getViewerId().length>0) {
- //验证前台传递的用户组信息是否跟当前用户所在用户组信息一致
- Integer count = userUsergroupDao.checkUserGroupCorrect(ShiroUtils.getUserId(), missionInfoEntity.getViewerId());
- if(count!=missionInfoEntity.getViewerId().length) {
- throw new NZException(RCode.SYS_USERGROUP_MATCH_ERROR);
- }
- for(Long viewId : missionInfoEntity.getViewerId()) {
- PermissionInfoEntity permissionInfoEntity = new PermissionInfoEntity();
- permissionInfoEntity.setType(Constant.PM_TYPE_MISSION);
- permissionInfoEntity.setTypeId(missionInfoEntity.getId());
- permissionInfoEntity.setViewLevel(missionInfoEntity.getViewLevel());
- permissionInfoEntity.setRelId(viewId);
- permissionInfoEntity.setOperator(ShiroUtils.getUserId());
- permissionInfoEntity.setOpTime(new Date());
- permissionInfoEntitys.add(permissionInfoEntity);
- }
- }else {
- PermissionInfoEntity permissionInfoEntity = new PermissionInfoEntity();
- permissionInfoEntity.setType(Constant.PM_TYPE_MISSION);
- permissionInfoEntity.setTypeId(missionInfoEntity.getId());
- permissionInfoEntity.setViewLevel(missionInfoEntity.getViewLevel());
- permissionInfoEntity.setRelId(relId);
- permissionInfoEntity.setOperator(ShiroUtils.getUserId());
- permissionInfoEntity.setOpTime(new Date());
- permissionInfoEntitys.add(permissionInfoEntity);
- }
- }
- logger.info("missionNodeRelEntitys :"+JSON.toJSONString(missionNodeRelEntitys));
- logger.info("permissionInfoEntitys :"+JSON.toJSONString(permissionInfoEntitys));
- missionNodeRelService.saveBatch(missionNodeRelEntitys);
- if(null!=permissionInfoEntitys && permissionInfoEntitys.size()>0) {
- permissionInfoService.saveBatch(permissionInfoEntitys);
- }
- }
-
- /**
- * 传入节点组或者节点信息 验证是否有效
- */
- @Override
- public void checkNodeGroupOrNodeCorrect(List<Long> nodeGroupIds,List<Long> nodeIds) {
- logger.info("check Node Or NodeGroup correct");
- if(null != nodeIds && nodeIds.size()>0) {
- logger.info("node info :"+JSON.toJSONString(nodeIds));
- //查询所有节点是否存在以及是否满足条件
- MissionDto nodeDto = baseMapper.checkNodeCorrect(nodeGroupIds,nodeIds);
- if(null != nodeDto.getTotal() && nodeDto.getTotal() != nodeIds.size()) {
- throw new NZException(RCode.MISSION_NODEINFO_ERROR);
- }else if(null != nodeDto.getNnc() && nodeDto.getNnc()>0 ) {
- // 所选节点组下存在网元
- throw new NZException(RCode.MISSION_NODE_NET_ERROR);
- }
- /* //如果节点全部满足条件 去除节点所在节点组的信息
- MissionDto removeGroupDto = baseMapper.selectNodeGroupOrNodeForCheck(nodeGroupIds,nodeIds);
- List<Long> queryNodeGroupIds = removeGroupDto.getNodeGroupIds();
- if(null != queryNodeGroupIds && queryNodeGroupIds.size()>0) {
- nodeGroupIds.removeAll(queryNodeGroupIds);
- }*/
- }
- if(null != nodeGroupIds && nodeGroupIds.size()>0) {
- logger.info("nodeGroup info :"+JSON.toJSONString(nodeGroupIds));
- MissionDto groupDto = baseMapper.checkNodeGroupCorrect(nodeGroupIds);
- if(null != groupDto.getDgnic() && groupDto.getDgnic() != nodeGroupIds.size()) {
- // 总数不对应 存在无效的节点组
- throw new NZException(RCode.MISSION_NODEINFO_ERROR);
- }else if(null != groupDto.getNgnnc() && groupDto.getNgnnc()>0) {
- // 存在节点组下无节点
- throw new NZException(RCode.MISSION_NODEINFO_ERROR);
- }else if(null != groupDto.getNnc() && groupDto.getNnc()>0 ) {
- // 所选节点组下存在网元
- throw new NZException(RCode.MISSION_NODE_NET_ERROR);
- }
- }
- }
-
- /**
- * 处理任务相关参数 校验参数正确性
- */
- @Override
- public void validateMissionInfoData(MissionInfoEntity missionInfoEntity,MultipartFile[] files) {
- logger.info("validate missionInfo content :"+JSON.toJSONString(missionInfoEntity));
- ValidateUtils.is(missionInfoEntity.getType()).notNull(RCode.MISSION_TYPE_ISNULL);
- ValidateUtils.is(missionInfoEntity.getName()).notNull(RCode.MISSION_NAME_ISNULL);
- ValidateUtils.is(missionInfoEntity.getParam()).notNull(RCode.MISSION_PARAM_ISNULL);
- /*ValidateUtils.is(missionInfoEntity.getViewLevel()).notNull(RCode.MISSION_STATE_ISNULL);*/
- if(Constant.VIEWLEVEL_SYS.equals(missionInfoEntity.getViewLevel())) {
- ValidateUtils.is(missionInfoEntity.getViewerId()).notNull(RCode.MISSION_GROUPNODE_OR_NODE_ISNULL);
- }
- if((null == missionInfoEntity.getNodeGroupIds() || missionInfoEntity.getNodeGroupIds().size()<=0)&&
- (null==missionInfoEntity.getNodeIds() || missionInfoEntity.getNodeIds().size()<=0)) {
- throw new NZException(RCode.MISSION_GROUPNODE_OR_NODE_ISNULL);
- }
- //验证保存节点 节点组是否有效
- checkNodeGroupOrNodeCorrect(missionInfoEntity.getNodeGroupIds(),missionInfoEntity.getNodeIds());
- MissionType missionNameByTypeId = MissionType.getMissionNameByTypeId(Integer.valueOf(missionInfoEntity.getType()));
- if(null!=missionNameByTypeId) {
- switch(missionNameByTypeId) {
- case FILE_PUSH:
- List<ParamForFilePush> paramForFilePushs = JSON.parseArray(missionInfoEntity.getParam(), ParamForFilePush.class);
- if(null==files || files.length<=0) {
- throw new NZException(RCode.MISSION_FILEPUSH_FILE_ISNULL);
- }
- if(null!=paramForFilePushs&&paramForFilePushs.size()>0) {
- logger.info("mission_file_push start file upload");
- // 记录文件单个大小 记录日志 记录总大小 判断是否超过限制
- long onefile = 0l;
- long sum = 0l;
- File[] removeFiles=new File[paramForFilePushs.size()];
- boolean outSizeFlag=false;
- fu:for(int i=0;i<paramForFilePushs.size();i++) {
- ParamForFilePush paramForFilePush = paramForFilePushs.get(i);
- MultipartFile uploadFile = files[i];
- ValidateUtils.is(uploadFile.getOriginalFilename()).notNull(RCode.MISSION_FILEPUSH_FILE_ISNULL);
- ValidateUtils.is(paramForFilePush.getDestPath()).notNull(RCode.MISSION_FILEPUSH_DESTPATH_ISNULL);
- if(CommonUtil.isNull(paramForFilePush.getIsCover())) {
- paramForFilePush.setIsCover("0");
- }
- //处理文件推送中密码
- if (paramForFilePush.getPw() != null && paramForFilePush.getPw().trim().length() > 0) {// 密码加密保存
- try {
- paramForFilePush.setPw(DESUtil.desEncrypt(paramForFilePush.getPw().trim()));
- } catch (Exception e) {
- //加密密码出现错误
- e.printStackTrace();
- throw new NZException(RCode.MISSION_FILEPUSH_PASSWORD_HANDLE_ERROR);
- }
- }
- //获取配置文件内的上传路径
- File rootPath=null;
- try {
- rootPath = new File(ResourceUtils.getURL("classpath:").getPath());
- } catch (FileNotFoundException e1) {
- e1.printStackTrace();
- }
- String uploadPath = en.getProperty("upload.path");
- File upload = new File(rootPath.getAbsolutePath(), uploadPath);
- // -- 上传目录不存在则创建
- if (!upload.exists()) {
- upload.mkdirs();
- }
- String path=upload+File.separator;
- //处理文件名称
- String upFileName=FileUtil.addTimeTagForUploadFileName(uploadFile.getOriginalFilename());
- //上传文件
- File dest = new File(path + upFileName);
- try {
- uploadFile.transferTo(dest);
- onefile=uploadFile.getSize();
- sum=sum+onefile;
- removeFiles[i]=dest;
- } catch (Exception e) {
- e.printStackTrace();
- throw new NZException(RCode.MISSION_FILEPUSH_FILE_UPLOAD_ERROR);
- }
- //判断上传文件的总大小是否超出
- if(sum>104857600) {
- outSizeFlag=true;
- break fu;
- }
- String fileMd5=null;
- try {
- fileMd5 = MD5Util.getFileMD5String(dest);
- } catch (IOException e) {
- e.printStackTrace();
- throw new NZException(RCode.MISSION_FILEPUSH_MD5_ERROR);
- }
- paramForFilePush.setMd5Value(fileMd5);
- paramForFilePush.setUpFileName(upFileName);
- paramForFilePush.setFileName(uploadFile.getOriginalFilename());
- }
- logger.info("mission_file_push finish file upload");
- //如果超出100M文件大小 则将已上传文件删除
- if(outSizeFlag) {
- logger.info("mission_file_push outsize start delete file");
- for(int j = 0; j<removeFiles.length;j++) {
- File file = removeFiles[j];
- if(file.exists()) {
- file.delete();
- }
- }
- throw new NZException(RCode.MISSION_FILEPUSH_OUTSIZE_ERROR);
- }else {
- String param = JSON.toJSONString(paramForFilePushs);
- missionInfoEntity.setParam(param);
- }
- }else {
- throw new NZException(RCode.MISSION_PARAM_ERROR);
- }
- break;
- case EXECUTE_INSTRUCT:
- ValidateUtils.is(missionInfoEntity.getCommandEnname()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_COMMANDENNAME_ISNULL);
- MissionExecuteType missionExecuteType = MissionExecuteType.getMissionExecuteType(missionInfoEntity.getCommandEnname());
- switch(missionExecuteType) {
- case UPGRADE_KILL_PROCESS:
- MissionDto missionDto =JSON.parseObject(missionInfoEntity.getParam(), MissionDto.class);
- ParamForExecuteInstruct paramForExecuteInstruct = missionDto.getParamForExecuteInstruct();
- String[] pidFiles = paramForExecuteInstruct.getPidFiles();
- if(null == pidFiles || pidFiles.length<=0) {
- throw new NZException(RCode.MISSION_PARAM_ERROR);
- }
- for(String pidFile : pidFiles) {
- ValidateUtils.is(pidFile).notNull(RCode.MISSION_EXECUTE_INSTRUCT_KILLPROCESS_PIDFILE_ISNULL);
- }
- missionDto.setCommandEnname(missionInfoEntity.getCommandEnname());
- missionDto.setCommandType(missionInfoEntity.getCommandType());
- // 判断停用任务是否为周期任务
- if((Constant.MISSION_LOOP_TRUE).equals(missionInfoEntity.getIsLoop())) {
- MissionLoopEntity missionLoopEntity = missionDto.getMissionLoopEntity();
- //判断周期任务的结束时间不能小于当前时间
- Date endTime = missionLoopEntity.getEndTime();
- if(endTime.getTime()<new Date().getTime()) {
- throw new NZException(RCode.MISSION_EXECUTE_INSTRUCT_KILLPROCESS_LOOPTIME_ERROR);
- }
- }
- missionInfoEntity.setParam(JSON.toJSONString(missionDto));
- break;
- // 可执行命令与 启动命令逻辑一致 使用case switch穿透特性
- case UPGRADE_EXEC:
- case UPGRADE_START:
- MissionDto missionDto2 =JSON.parseObject(missionInfoEntity.getParam(), MissionDto.class);
- List<ParamForExecuteInstruct> paramForStart = missionDto2.getParamForExecuteInstructs();
- if(null==paramForStart || paramForStart.size()<=0) {
- throw new NZException(RCode.MISSION_PARAM_ERROR);
- }
- for(ParamForExecuteInstruct paramForExecuteInstruct2 : paramForStart) {
- ValidateUtils.is(paramForExecuteInstruct2.getExecCmd()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_START_EXECCMD_ISNULL);
- ValidateUtils.is(paramForExecuteInstruct2.getExecResult()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_START_EXECRESULT_ISNULL);
- if(CommonUtil.isNull(paramForExecuteInstruct2.getForceExec())) {
- paramForExecuteInstruct2.setForceExec("0");
- }
- if(CommonUtil.isNull(paramForExecuteInstruct2.getResidentFlag())) {
- paramForExecuteInstruct2.setResidentFlag("0");
- }
- if(CommonUtil.isNull(paramForExecuteInstruct2.getReturnFlag())) {
- paramForExecuteInstruct2.setReturnFlag("0");
- }else if(paramForExecuteInstruct2.getReturnFlag().equals("1")){
- ValidateUtils.is(paramForExecuteInstruct2.getReturnPath()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_START_RETURNPATH_ISNULL);
- }
- if(CommonUtil.isNull(paramForExecuteInstruct2.getMaxWaitTime())) {
- paramForExecuteInstruct2.setMaxWaitTime("3");
- }
- if (paramForExecuteInstruct2.getExecParamsTmpStr() != null && paramForExecuteInstruct2.getExecParamsTmpStr().trim().length() > 0) {
- // 将\r,\n,\t字符替换为空
- String execParamsTmpStr = paramForExecuteInstruct2.getExecParamsTmpStr().trim();
- execParamsTmpStr = execParamsTmpStr.replaceAll("[\n,\r,\t]", "");
- if (execParamsTmpStr.contains(Constant.STR_PARAM_SEPRATOR)) {
- paramForExecuteInstruct2.setExecParams(execParamsTmpStr.split(Constant.STR_PARAM_SEPRATOR));
- } else {
- paramForExecuteInstruct2.setExecParams(new String[] { execParamsTmpStr });
- }
- paramForExecuteInstruct2.setExecParamsTmpStr(null);
- }
- }
- missionDto2.setCommandEnname(missionInfoEntity.getCommandEnname());
- missionDto2.setCommandType(missionInfoEntity.getCommandType());
- // 判断停用任务是否为周期任务
- if((Constant.MISSION_LOOP_TRUE).equals(missionInfoEntity.getIsLoop())) {
- MissionLoopEntity missionLoopEntity = missionDto2.getMissionLoopEntity();
- //判断周期任务的结束时间不能小于当前时间
- Date endTime = missionLoopEntity.getEndTime();
- if(endTime.getTime()<new Date().getTime()) {
- throw new NZException(RCode.MISSION_EXECUTE_INSTRUCT_START_LOOPTIME_ERROR);
- }
- }
- missionInfoEntity.setParam(JSON.toJSONString(missionDto2));
- break;
- case UPGRADE_BACKUP:
- MissionDto missionDto3 =JSON.parseObject(missionInfoEntity.getParam(), MissionDto.class);
- List<ParamForExecuteInstruct> paramForBackup = missionDto3.getParamForExecuteInstructs();
- if(null==paramForBackup || paramForBackup.size()<=0) {
- throw new NZException(RCode.MISSION_PARAM_ERROR);
- }
- for(ParamForExecuteInstruct paramForExecuteInstruct3 : paramForBackup) {
- ValidateUtils.is(paramForExecuteInstruct3.getBackup()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_BACKUP_FILE_ISNULL);
- ValidateUtils.is(paramForExecuteInstruct3.getBackupTo()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_BACKUP_PATH_ISNULL);
- if(CommonUtil.isNull(paramForExecuteInstruct3.getIsAbs())) {
- paramForExecuteInstruct3.setIsAbs("0");
- }
- if (paramForExecuteInstruct3.getExceptTmpStr() != null && paramForExecuteInstruct3.getExceptTmpStr().trim().length() > 0) {
- // 将\r,\n,\t字符替换为空
- String exceptTmpStr = paramForExecuteInstruct3.getExceptTmpStr().trim();
- exceptTmpStr = exceptTmpStr.replaceAll("[\n,\r,\t]", "");
- if (exceptTmpStr.contains(Constant.STR_PARAM_SEPRATOR)) {
- paramForExecuteInstruct3.setExcept(exceptTmpStr.split(Constant.STR_PARAM_SEPRATOR));
- } else {
- paramForExecuteInstruct3.setExcept(new String[] { exceptTmpStr });
- }
- paramForExecuteInstruct3.setExceptTmpStr(null);
- }
- }
- missionDto3.setCommandEnname(missionInfoEntity.getCommandEnname());
- missionDto3.setCommandType(missionInfoEntity.getCommandType());
- // 判断停用任务是否为周期任务
- if((Constant.MISSION_LOOP_TRUE).equals(missionInfoEntity.getIsLoop())) {
- MissionLoopEntity missionLoopEntity = missionDto3.getMissionLoopEntity();
- //判断周期任务的结束时间不能小于当前时间
- Date endTime = missionLoopEntity.getEndTime();
- if(endTime.getTime()<new Date().getTime()) {
- throw new NZException(RCode.MISSION_EXECUTE_INSTRUCT_BACKUP_LOOPTIME_ERROR);
- }
- }
- missionInfoEntity.setParam(JSON.toJSONString(missionDto3));
- break;
- case UPGRADE_UPDATE:
- MissionDto missionDto4 =JSON.parseObject(missionInfoEntity.getParam(), MissionDto.class);
- List<ParamForExecuteInstruct> paramForUpdate = missionDto4.getParamForExecuteInstructs();
- if(null==paramForUpdate || paramForUpdate.size()<=0) {
- throw new NZException(RCode.MISSION_PARAM_ERROR);
- }
- for(ParamForExecuteInstruct paramForExecuteInstruct4 : paramForUpdate) {
- ValidateUtils.is(paramForExecuteInstruct4.getSource()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_UPDATE_SOURCE_ISNULL);
- ValidateUtils.is(paramForExecuteInstruct4.getCover()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_UPDATE_COVER_ISNULL);
- if(CommonUtil.isNull(paramForExecuteInstruct4.getIsAbs())) {
- paramForExecuteInstruct4.setIsAbs("0");
- }
- if(CommonUtil.isNull(paramForExecuteInstruct4.getIsCreateCover())) {
- paramForExecuteInstruct4.setIsCreateCover("0");
- }
- if (paramForExecuteInstruct4.getDeleteTmpStr() != null && paramForExecuteInstruct4.getDeleteTmpStr().trim().length() > 0) {
- // 将\r,\n,\t字符替换为空
- String deleteTmpStr = paramForExecuteInstruct4.getDeleteTmpStr().trim();
- deleteTmpStr = deleteTmpStr.replaceAll("[\n,\r,\t]", "");
- if (deleteTmpStr.contains(Constant.STR_PARAM_SEPRATOR)) {
- paramForExecuteInstruct4.setDelete(deleteTmpStr.split(Constant.STR_PARAM_SEPRATOR));
- } else {
- paramForExecuteInstruct4.setDelete(new String[] { deleteTmpStr });
- }
- paramForExecuteInstruct4.setDeleteTmpStr(null);
- }
- }
- missionDto4.setCommandEnname(missionInfoEntity.getCommandEnname());
- missionDto4.setCommandType(missionInfoEntity.getCommandType());
- // 判断停用任务是否为周期任务
- if((Constant.MISSION_LOOP_TRUE).equals(missionInfoEntity.getIsLoop())) {
- MissionLoopEntity missionLoopEntity = missionDto4.getMissionLoopEntity();
- //判断周期任务的结束时间不能小于当前时间
- Date endTime = missionLoopEntity.getEndTime();
- if(endTime.getTime()<new Date().getTime()) {
- throw new NZException(RCode.MISSION_EXECUTE_INSTRUCT_UPDATE_LOOPTIME_ERROR);
- }
- }
- missionInfoEntity.setParam(JSON.toJSONString(missionDto4));
- break;
- case UPGRADE_RECOVER:
- MissionDto missionDto5 =JSON.parseObject(missionInfoEntity.getParam(), MissionDto.class);
- List<ParamForExecuteInstruct> paramForRecover = missionDto5.getParamForExecuteInstructs();
- if(null==paramForRecover || paramForRecover.size()<=0) {
- throw new NZException(RCode.MISSION_PARAM_ERROR);
- }
- for(ParamForExecuteInstruct paramForExecuteInstruct5 : paramForRecover) {
- ValidateUtils.is(paramForExecuteInstruct5.getSource()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_RECOVER_SOURCE_ISNULL);
- ValidateUtils.is(paramForExecuteInstruct5.getCover()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_RECOVER_COVER_ISNULL);
- if(CommonUtil.isNull(paramForExecuteInstruct5.getIsAbs())) {
- paramForExecuteInstruct5.setIsAbs("0");
- }
- if (paramForExecuteInstruct5.getDeleteTmpStr() != null && paramForExecuteInstruct5.getDeleteTmpStr().trim().length() > 0) {
- // 将\r,\n,\t字符替换为空
- String deleteTmpStr = paramForExecuteInstruct5.getDeleteTmpStr().trim();
- deleteTmpStr = deleteTmpStr.replaceAll("[\n,\r,\t]", "");
- if (deleteTmpStr.contains(Constant.STR_PARAM_SEPRATOR)) {
- paramForExecuteInstruct5.setDelete(deleteTmpStr.split(Constant.STR_PARAM_SEPRATOR));
- } else {
- paramForExecuteInstruct5.setDelete(new String[] { deleteTmpStr });
- }
- paramForExecuteInstruct5.setDeleteTmpStr(null);
- }
- }
- missionDto5.setCommandEnname(missionInfoEntity.getCommandEnname());
- missionDto5.setCommandType(missionInfoEntity.getCommandType());
- // 判断停用任务是否为周期任务
- if((Constant.MISSION_LOOP_TRUE).equals(missionInfoEntity.getIsLoop())) {
- MissionLoopEntity missionLoopEntity = missionDto5.getMissionLoopEntity();
- //判断周期任务的结束时间不能小于当前时间
- Date endTime = missionLoopEntity.getEndTime();
- if(endTime.getTime()<new Date().getTime()) {
- throw new NZException(RCode.MISSION_EXECUTE_INSTRUCT_RECOVER_LOOPTIME_ERROR);
- }
- }
- missionInfoEntity.setParam(JSON.toJSONString(missionDto5));
- break;
- case SINGLE_EXEC:
- MissionDto missionDto6 =JSON.parseObject(missionInfoEntity.getParam(), MissionDto.class);
- List<ParamForExecuteInstruct> paramForSingleExec = missionDto6.getParamForExecuteInstructs();
- if(null==paramForSingleExec || paramForSingleExec.size()<=0) {
- throw new NZException(RCode.MISSION_PARAM_ERROR);
- }
- for(ParamForExecuteInstruct paramForExecuteInstruct6 : paramForSingleExec) {
- ValidateUtils.is(paramForExecuteInstruct6.getExecCmd()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_SINGLEEXEC_EXECCMD_ISNULL);
- if(CommonUtil.isNull(paramForExecuteInstruct6.getReturnFlag())) {
- paramForExecuteInstruct6.setReturnFlag("0");
- }else if(paramForExecuteInstruct6.getReturnFlag().equals("1")){
- ValidateUtils.is(paramForExecuteInstruct6.getReturnPath()).notNull(RCode.MISSION_EXECUTE_INSTRUCT_SINGLEEXEC_RETURNPATH_ISNULL);
- }
- if(CommonUtil.isNull(paramForExecuteInstruct6.getMaxWaitTime())) {
- paramForExecuteInstruct6.setMaxWaitTime("3");
- }
- }
- missionDto6.setCommandEnname(missionInfoEntity.getCommandEnname());
- missionDto6.setCommandType(missionInfoEntity.getCommandType());
- // 判断停用任务是否为周期任务
- if((Constant.MISSION_LOOP_TRUE).equals(missionInfoEntity.getIsLoop())) {
- MissionLoopEntity missionLoopEntity = missionDto6.getMissionLoopEntity();
- //判断周期任务的结束时间不能小于当前时间
- Date endTime = missionLoopEntity.getEndTime();
- if(endTime.getTime()<new Date().getTime()) {
- throw new NZException(RCode.MISSION_EXECUTE_INSTRUCT_SINGLEEXEC_LOOPTIME_ERROR);
- }
- }
- missionInfoEntity.setParam(JSON.toJSONString(missionDto6));
- break;
- }
- break;
- case UGPRADE:
- MissionUpgradeType missionUpgradeType = MissionUpgradeType.getMissionUpgradeType(missionInfoEntity.getCommandEnname());
- switch(missionUpgradeType) {
- case UPGRADE_AGENT:
- MissionDto upgradeMissionDto = JSON.parseObject(missionInfoEntity.getParam(),MissionDto.class);
- ParamForUpgrade upgradeAgent = upgradeMissionDto.getParamForUpgrade();
- if(null==upgradeAgent) {
- throw new NZException(RCode.MISSION_PARAM_ERROR);
- }
- ValidateUtils.is(upgradeAgent.getCover()).notNull(RCode.MISSION_UPGRADE_COVER_ISNULL);
- if(null==files || files.length<=0) {
- throw new NZException(RCode.MISSION_UPGRADE_UPLOADFILE_ISNULL);
- }
- logger.info("UPGRADE_AGENT file upload start");
- MultipartFile uploadFile = files[0];
- long size = uploadFile.getSize();
- //判断上传文件的总大小是否超出
- if(size>104857600) {
- throw new NZException(RCode.MISSION_UPGRADE_UPLOADFILE_OUTSIZE);
- }
- ValidateUtils.is(uploadFile.getOriginalFilename()).notNull(RCode.MISSION_UPGRADE_UPLOADFILE_ISNULL);
- //处理文件推送中密码
- if (upgradeAgent.getPw() != null && upgradeAgent.getPw().trim().length() > 0) {// 密码加密保存
- try {
- upgradeAgent.setPw(DESUtil.desEncrypt(upgradeAgent.getPw().trim()));
- } catch (Exception e) {
- //加密密码出现错误
- e.printStackTrace();
- throw new NZException(RCode.MISSION_UPGRADE_PASSWORD_HANDLE_ERROR);
- }
- }
- //获取配置文件内的上传路径
- File rootPath=null;
- try {
- rootPath = new File(ResourceUtils.getURL("classpath:").getPath());
- } catch (FileNotFoundException e1) {
- e1.printStackTrace();
- }
- String uploadPath = en.getProperty("upload.path");
- File upload = new File(rootPath.getAbsolutePath(), uploadPath);
- // -- 上传目录不存在则创建
- if (!upload.exists()) {
- upload.mkdirs();
- }
- String path=upload+File.separator;
- //处理文件名称
- String upFileName=FileUtil.addTimeTagForUploadFileName(uploadFile.getOriginalFilename());
- //上传文件
- File dest = new File(path + upFileName);
- try {
- uploadFile.transferTo(dest);
- } catch (Exception e) {
- e.printStackTrace();
- throw new NZException(RCode.MISSION_UPGRADE_FILE_UPLOAD_ERROR);
- }
- logger.info("UPGRADE_AGENT file upload finish");
- String fileMd5=null;
- try {
- fileMd5 = MD5Util.getFileMD5String(dest);
- } catch (IOException e) {
- e.printStackTrace();
- throw new NZException(RCode.MISSION_UPGRADE_MD5_ERROR);
- }
- if(CommonUtil.isNull(upgradeAgent.getIsAbs())) {
- upgradeAgent.setIsAbs("0");
- }
- if(CommonUtil.isNull(upgradeAgent.getIsCreateCover())) {
- upgradeAgent.setIsCreateCover("0");
- }
- upgradeAgent.setFileName(uploadFile.getOriginalFilename());
- upgradeAgent.setMd5Value(fileMd5);
- upgradeAgent.setUpFileName(upFileName);
- if (upgradeAgent.getDeleteTmpStr() != null && upgradeAgent.getDeleteTmpStr().trim().length() > 0) {
- // 将\r,\n,\t字符替换为空
- String deleteTmpStr = upgradeAgent.getDeleteTmpStr().trim();
- deleteTmpStr = deleteTmpStr.replaceAll("[\n,\r,\t]", "");
- if (deleteTmpStr.contains(Constant.STR_PARAM_SEPRATOR)) {
- upgradeAgent.setDelete(deleteTmpStr.split(Constant.STR_PARAM_SEPRATOR));
- } else {
- upgradeAgent.setDelete(new String[] { deleteTmpStr });
- }
- upgradeAgent.setDeleteTmpStr(null);
- }
- List<Backup> backups = upgradeAgent.getBackups();
- if(null!=backups&&backups.size()>0) {
- for(Backup backUp : backups) {
- ValidateUtils.is(backUp.getBackup()).notNull(RCode.MISSION_UPGRADE_BACKUP_PATH_ISNULL);
- ValidateUtils.is(backUp.getBackupTo()).notNull(RCode.MISSION_UPGRADE_BACKUPTO_ISNULL);
- if(CommonUtil.isNull(backUp.getIsAbs())) {
- backUp.setIsAbs("0");
- }
- if (backUp.getExceptTmpStr() != null && backUp.getExceptTmpStr().trim().length() > 0) {
- // 将\r,\n,\t字符替换为空
- String exceptTmpStr = backUp.getExceptTmpStr().trim();
- exceptTmpStr = exceptTmpStr.replaceAll("[\n,\r,\t]", "");
- if (exceptTmpStr.contains(Constant.STR_PARAM_SEPRATOR)) {
- backUp.setExcept(exceptTmpStr.split(Constant.STR_PARAM_SEPRATOR));
- } else {
- backUp.setExcept(new String[] { exceptTmpStr });
- }
- backUp.setExceptTmpStr(null);
- }
-
- }
- }
- upgradeMissionDto.setCommandEnname(missionInfoEntity.getCommandEnname());
- missionInfoEntity.setParam(JSON.toJSONString(upgradeMissionDto));
- break;
- // nc升级与第三方升级逻辑一致 使用case switch穿透特性
- case UPGRADE_OTHER:
- case UPGRADE_SERVER:
- MissionDto upgradeDto = JSON.parseObject(missionInfoEntity.getParam(),MissionDto.class);
- List<ParamForUpgrade> paramForUpgrades = upgradeDto.getParamForUpgrades();
- if(null==paramForUpgrades || paramForUpgrades.size()<=0) {
- throw new NZException(RCode.MISSION_PARAM_ERROR);
- }
- if(null==files || files.length<=0) {
- throw new NZException(RCode.MISSION_UPGRADE_UPLOADFILE_ISNULL);
- }
- long onefile = 0l;
- long sum = 0l;
- File[] removeFiles=new File[paramForUpgrades.size()];
- boolean outSizeFlag=false;
- uu:for(int i=0;i<paramForUpgrades.size();i++) {
- logger.info("UPGRADE_SERVER or UPGRADE_OTHER file upload start");
- ParamForUpgrade paramForUpgrade = paramForUpgrades.get(i);
- MultipartFile file = files[i];
- ValidateUtils.is(file.getOriginalFilename()).notNull(RCode.MISSION_UPGRADE_UPLOADFILE_ISNULL);
- //处理文件推送中密码
- if (paramForUpgrade.getPw() != null && paramForUpgrade.getPw().trim().length() > 0) {// 密码加密保存
- try {
- paramForUpgrade.setPw(DESUtil.desEncrypt(paramForUpgrade.getPw().trim()));
- } catch (Exception e) {
- //加密密码出现错误
- e.printStackTrace();
- throw new NZException(RCode.MISSION_UPGRADE_PASSWORD_HANDLE_ERROR);
- }
- }
- //获取配置文件内的上传路径
- File upgradeRootPath=null;
- try {
- upgradeRootPath = new File(ResourceUtils.getURL("classpath:").getPath());
- } catch (FileNotFoundException e1) {
- e1.printStackTrace();
- }
- String upgradeUploadPath = en.getProperty("upload.path");
- File upgradeUpload = new File(upgradeRootPath.getAbsolutePath(), upgradeUploadPath);
- // -- 上传目录不存在则创建
- if (!upgradeUpload.exists()) {
- upgradeUpload.mkdirs();
- }
- String upgradePath=upgradeUpload+File.separator;
- //处理文件名称
- String upgradeUpFileName=FileUtil.addTimeTagForUploadFileName(file.getOriginalFilename());
- //上传文件
- File upgradeDest = new File(upgradePath + upgradeUpFileName);
- try {
- file.transferTo(upgradeDest);
- onefile=file.getSize();
- sum=sum+onefile;
- removeFiles[i]=upgradeDest;
- } catch (Exception e) {
- e.printStackTrace();
- throw new NZException(RCode.MISSION_UPGRADE_FILE_UPLOAD_ERROR);
- }
- logger.info("UPGRADE_SERVER or UPGRADE_OTHER file upload finish");
- //判断上传文件的总大小是否超出
- if(sum>104857600) {
- outSizeFlag=true;
- break uu;
- }
- String upgradeFileMd5=null;
- try {
- upgradeFileMd5 = MD5Util.getFileMD5String(upgradeDest);
- } catch (IOException e) {
- e.printStackTrace();
- throw new NZException(RCode.MISSION_UPGRADE_MD5_ERROR);
- }
- paramForUpgrade.setFileName(file.getOriginalFilename());
- paramForUpgrade.setMd5Value(upgradeFileMd5);
- paramForUpgrade.setUpFileName(upgradeUpFileName);
-
- ValidateUtils.is(paramForUpgrade.getCover()).notNull(RCode.MISSION_UPGRADE_COVER_ISNULL);
- ValidateUtils.is(paramForUpgrade.getStartupFile()).notNull(RCode.MISSION_UPGRADE_STARTUPFILE_ISNULL);
- ValidateUtils.is(paramForUpgrade.getPidFile()).notNull(RCode.MISSION_UPGRADE_PIDFILE_ISNULL);
-
- if(CommonUtil.isNull(paramForUpgrade.getIsAbs())) {
- paramForUpgrade.setIsAbs("0");
- }
- if(CommonUtil.isNull(paramForUpgrade.getIsCreateCover())) {
- paramForUpgrade.setIsCreateCover("0");
- }
- if(CommonUtil.isNull(paramForUpgrade.getForceExec())) {
- paramForUpgrade.setForceExec("0");
- }
- if(CommonUtil.isNull(paramForUpgrade.getMaxWaitTime())) {
- paramForUpgrade.setMaxWaitTime("3");
- }
- if (paramForUpgrade.getExecParamsTmpStr() != null && paramForUpgrade.getExecParamsTmpStr().trim().length() > 0) {
- // 将\r,\n,\t字符替换为空
- String execParamsTmpStr = paramForUpgrade.getExecParamsTmpStr().trim();
- execParamsTmpStr = execParamsTmpStr.replaceAll("[\n,\r,\t]", "");
- if (execParamsTmpStr.contains(Constant.STR_PARAM_SEPRATOR)) {
- paramForUpgrade.setExecParams(execParamsTmpStr.split(Constant.STR_PARAM_SEPRATOR));
- } else {
- paramForUpgrade.setExecParams(new String[] { execParamsTmpStr });
- }
- paramForUpgrade.setExecParamsTmpStr(null);
- }
- if (paramForUpgrade.getDeleteTmpStr() != null && paramForUpgrade.getDeleteTmpStr().trim().length() > 0) {
- // 将\r,\n,\t字符替换为空
- String deleteTmpStr = paramForUpgrade.getDeleteTmpStr().trim();
- deleteTmpStr = deleteTmpStr.replaceAll("[\n,\r,\t]", "");
- if (deleteTmpStr.contains(Constant.STR_PARAM_SEPRATOR)) {
- paramForUpgrade.setDelete(deleteTmpStr.split(Constant.STR_PARAM_SEPRATOR));
- } else {
- paramForUpgrade.setDelete(new String[] { deleteTmpStr });
- }
- paramForUpgrade.setDeleteTmpStr(null);
- }
- List<Backup> upgradeBackups = paramForUpgrade.getBackups();
- if(null!=upgradeBackups&&upgradeBackups.size()>0) {
- for(Backup backUp : upgradeBackups) {
- ValidateUtils.is(backUp.getBackup()).notNull(RCode.MISSION_UPGRADE_BACKUP_PATH_ISNULL);
- ValidateUtils.is(backUp.getBackupTo()).notNull(RCode.MISSION_UPGRADE_BACKUPTO_ISNULL);
- if(CommonUtil.isNull(backUp.getIsAbs())) {
- backUp.setIsAbs("0");
- }
- if (backUp.getExceptTmpStr() != null && backUp.getExceptTmpStr().trim().length() > 0) {
- // 将\r,\n,\t字符替换为空
- String exceptTmpStr = backUp.getExceptTmpStr().trim();
- exceptTmpStr = exceptTmpStr.replaceAll("[\n,\r,\t]", "");
- if (exceptTmpStr.contains(Constant.STR_PARAM_SEPRATOR)) {
- backUp.setExcept(exceptTmpStr.split(Constant.STR_PARAM_SEPRATOR));
- } else {
- backUp.setExcept(new String[] { exceptTmpStr });
- }
- backUp.setExceptTmpStr(null);
- }
-
- }
- }
- }
- upgradeDto.setCommandEnname(missionInfoEntity.getCommandEnname());
- //如果超出100M文件大小 则将已上传文件删除
- if(outSizeFlag) {
- logger.info("UPGRADE_SERVER or UPGRADE_OTHER outsize delete file");
- for(int j = 0; j<removeFiles.length;j++) {
- File file = removeFiles[j];
- if(file.exists()) {
- file.delete();
- }
- }
- throw new NZException(RCode.MISSION_UPGRADE_UPLOADFILE_OUTSIZE);
- }else {
- missionInfoEntity.setParam(JSON.toJSONString(upgradeDto));
- }
- break;
- }
- break;
- default:
- break;
- }
- }else {
- throw new NZException(RCode.MISSION_TYPE_ERROR);
- }
- }
-
- @Override
- public List<MissionInfoEntity> validateLoopMissionInfoData(Long[] missionIds, String state) {
- logger.info("validateLoopMissionInfoData content missionId:"+missionIds);
- List<MissionInfoEntity> loopMissions =new ArrayList<MissionInfoEntity>();
- for(Long missionId : missionIds) {
- MissionInfoEntity mission = baseMapper.selectById(missionId);
- // 判断任务是否为周期任务
- if(mission.getIsLoop().equals(Constant.MISSION_LOOP_FALSE)) {
- throw new NZException(RCode.MISSION_UNLOOP_MISSION_ERROR);
- }
- //已经终止的任务不可修改为运行状态
- if(state.equals(Constant.MISSION_LOOP_RUN)||state.equals(Constant.MISSION_LOOP_SUSPEND)) {
- if(mission.getState().equals(Constant.MISSION_LOOP_STOP)) {
- throw new NZException(RCode.MISSION_LOOP_START_OR_STOP_ERROR);
- }
- }
- mission.setState(state);
- loopMissions.add(mission);
- }
- logger.info("result loopMissions :"+JSON.toJSONString(loopMissions));
- return loopMissions;
- }
-
- @Override
- @Transactional(readOnly = false)
- public void updateMission(MissionInfoEntity missionInfoEntity) {
- logger.info("updateMission info :"+JSON.toJSONString(missionInfoEntity));
- MissionInfoEntity updateMission =new MissionInfoEntity();
- String state = missionInfoEntity.getState();
- if(!CommonUtil.isNull(state)) {
- MissionInfoEntity mission = baseMapper.selectById(missionInfoEntity.getId());
- if(mission.getIsLoop().equals(Constant.MISSION_LOOP_TRUE)) {
- if(!(state.equals(Constant.MISSION_LOOP_RUN)||state.equals(Constant.MISSION_LOOP_SUSPEND))) {
- throw new NZException(RCode.MISSION_LOOP_STATE_ERROR);
- }
- updateMission.setState(state);
- }/*else {
- throw new NZException(RCode.MISSION_UNLOOP_MISSION_ERROR);
- }*/
- }
- updateMission.setName(missionInfoEntity.getName());
- updateMission.setId(missionInfoEntity.getId());
- updateMission.setRemark(missionInfoEntity.getRemark());
- updateMission.setOperator(ShiroUtils.getUserId());
- updateMission.setOpTime(new Date());
- this.updateById(updateMission);
- }
-
- /**
- * 检查选中的任务是否符合逆向任务的条件:是否升级部署+非逆向任务+是否任务完成+是否有备份(从大到小判断,先任务类型,再完成,再备份)
- */
- @Override
- public MissionInfoEntity getConverseMissionById(Long id) {
- logger.info("ConverseMissionById is :"+id);
- MissionInfoEntity mission = baseMapper.selectById(id);
- logger.info("query mission info :"+JSON.toJSONString(mission));
- Long missionId = mission.getId();
- MissionDto upgradeDto = null;
- List<ParamForUpgrade> paramForUpgrades =null;
- if(Integer.valueOf(mission.getType()).equals(MissionType.UGPRADE.getMissionTypeId())) {
- //当前任务类型为升级部署
- upgradeDto = JSON.parseObject(mission.getParam(), MissionDto.class);
- logger.info("query MissionDto info :"+JSON.toJSONString(upgradeDto));
- paramForUpgrades = upgradeDto.getParamForUpgrades();
- ParamForUpgrade paramForUpgrade = paramForUpgrades.get(0);
- Long version = paramForUpgrade.getVersion();
- if(null == version) {
- List<MissionResultEntity> missionResults = missionResultDao.selectList(new QueryWrapper<MissionResultEntity>()
- .eq("mission_id", id));
- if(null != missionResults && missionResults.size()>0) {
- List<Backup> backups = paramForUpgrade.getBackups();
- if(null == backups || backups.size()<=0) {
- throw new NZException(RCode.MISSION_UPGRADE_BACKUP_NULL);
- }
- }else {
- throw new NZException(RCode.MISSION_UPGRADE_NOT_FINISH);
- }
- }else {
- throw new NZException(RCode.MISSION_UPGRADE_NOT_REVERSED_ERROR);
- }
- }else {
- throw new NZException(RCode.MISSION_UPGRADE_TYPE_ERROR);
- }
-
- // 通过以上校验 任务可以新建逆向任务 查询任务信息 用于界面展示
- // 校验节点组有效性 补全系统名称、节点组名称信息 补全用户组信息
- List<NodeGroupInfoEntity> nodeGroupInfoEntitys = baseMapper.selectNodeGroupByMissionid(missionId);
- logger.info("query nodeGroups content :"+JSON.toJSONString(nodeGroupInfoEntitys));
- List<NodeInfoEntity> nodeInfoEntitys = baseMapper.selectNodeByMissionid(missionId);
- logger.info("query nodes content :"+JSON.toJSONString(nodeInfoEntitys));
- //没有备份的任务指令要移除
- for(int i=paramForUpgrades.size()-1; i>=0;i--) {
- List<Backup> backups = paramForUpgrades.get(i).getBackups();
- if(null == backups ||CommonUtil.isNull(backups)) {
- paramForUpgrades.remove(i);
- }
- }
- mission.setNodeGroups(nodeGroupInfoEntitys);
- mission.setNodes(nodeInfoEntitys);
- logger.info("result mission content :"+mission);
- return mission;
- }
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionNodeRelServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionNodeRelServiceImpl.java
deleted file mode 100644
index cb3cb214..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionNodeRelServiceImpl.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.nis.modules.mission.service.impl;
-
-import org.springframework.stereotype.Service;
-import java.util.Map;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.Query;
-
-import com.nis.modules.mission.dao.MissionNodeRelDao;
-import com.nis.modules.mission.entity.MissionNodeRelEntity;
-import com.nis.modules.mission.service.MissionNodeRelService;
-
-
-@Service("missionNodeRelService")
-public class MissionNodeRelServiceImpl extends ServiceImpl<MissionNodeRelDao, MissionNodeRelEntity> implements MissionNodeRelService {
-
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
- IPage<MissionNodeRelEntity> page = this.page(
- new Query<MissionNodeRelEntity>().getPage(params),
- new QueryWrapper<MissionNodeRelEntity>()
- );
-
- return new PageUtils(page);
- }
-
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionResultServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionResultServiceImpl.java
deleted file mode 100644
index 598a44e7..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/service/impl/MissionResultServiceImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.nis.modules.mission.service.impl;
-
-import org.springframework.stereotype.Service;
-import java.util.Map;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.Query;
-
-import com.nis.modules.mission.dao.MissionResultDao;
-import com.nis.modules.mission.entity.MissionInfoEntity;
-import com.nis.modules.mission.entity.MissionResultEntity;
-import com.nis.modules.mission.service.MissionResultService;
-
-
-@Service("missionResultService")
-public class MissionResultServiceImpl extends ServiceImpl<MissionResultDao, MissionResultEntity> implements MissionResultService {
-
- @Override
- public PageUtils queryPage(Page page, Integer missionId) {
- Page<MissionResultEntity> missionResults = baseMapper.selectMissionResultInfoList(page, missionId);
- return new PageUtils(missionResults);
- }
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/utils/ApiJsonObject.java b/nezha-admin/src/main/java/com/nis/modules/mission/utils/ApiJsonObject.java
deleted file mode 100644
index 9fb2705d..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/utils/ApiJsonObject.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.nis.modules.mission.utils;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.PARAMETER, ElementType.FIELD, ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ApiJsonObject {
-
- ApiJsonProperty[] value(); //对象属性值
-
- String name(); //对象名称
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/utils/ApiJsonProperty.java b/nezha-admin/src/main/java/com/nis/modules/mission/utils/ApiJsonProperty.java
deleted file mode 100644
index 471f6a6e..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/utils/ApiJsonProperty.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.nis.modules.mission.utils;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target(ElementType.ANNOTATION_TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ApiJsonProperty {
-
- String key(); //key
-
- String example() default "";
-
- String type() default "string"; //支持string 和 int
-
- String description() default "";
-
- boolean required() default true; // 是否必传
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/utils/DESUtil.java b/nezha-admin/src/main/java/com/nis/modules/mission/utils/DESUtil.java
deleted file mode 100644
index 30e66297..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/utils/DESUtil.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.nis.modules.mission.utils;
-
-import javax.crypto.Cipher;
-import javax.crypto.SecretKey;
-import javax.crypto.SecretKeyFactory;
-import javax.crypto.spec.DESKeySpec;
-import javax.crypto.spec.IvParameterSpec;
-
-import sun.misc.BASE64Decoder;
-import sun.misc.BASE64Encoder;
-
-/**
- * 通过DES加密解密实现一个String字符串的加密和解密.
- *
- */
-public class DESUtil {
-
- private final static String key = "longstar";
- /**
- * DES加密方法
- *
- */
- public static String desEncrypt(String message) throws Exception {
- Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
-
- DESKeySpec desKeySpec = new DESKeySpec(key.getBytes("ASCII"));
-
- SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
- SecretKey secretKey = keyFactory.generateSecret(desKeySpec);
- IvParameterSpec iv = new IvParameterSpec(key.getBytes("ASCII"));
- cipher.init(Cipher.ENCRYPT_MODE, secretKey, iv);
-
- byte data[] = message.getBytes("ASCII");
- byte[] encryptedData = cipher.doFinal(data);
-
- return getBASE64(encryptedData);
- }
-
- /**
- * DES解密方法
- *
- */
- public static String desDecrypt(String message) throws Exception {
- Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
-
- DESKeySpec desKeySpec = new DESKeySpec(key.getBytes("ASCII"));
-
- SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
- SecretKey secretKey = keyFactory.generateSecret(desKeySpec);
- IvParameterSpec iv = new IvParameterSpec(key.getBytes("ASCII"));
- cipher.init(Cipher.DECRYPT_MODE, secretKey, iv);
-
- byte data[] = getFromBASE64(message);
- byte[] encryptedData = cipher.doFinal(data);
-
- return new String(encryptedData);
- }
-
- // 对base64编码的string解码成byte数组
- private static byte[] getFromBASE64(String s) {
- if (s == null)
- return null;
- BASE64Decoder decoder = new BASE64Decoder();
- try {
- byte[] b = decoder.decodeBuffer(s);
- return b;
- } catch (Exception e) {
- return null;
- }
- }
-
- //将 byte数组 进行 BASE64 编码
- private static String getBASE64(byte[] b) {
- if (b == null)
- return null;
- try {
- String returnstr = (new BASE64Encoder()).encode(b);
- return returnstr;
- } catch (Exception e) {
- return null;
- }
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/utils/FileUtil.java b/nezha-admin/src/main/java/com/nis/modules/mission/utils/FileUtil.java
deleted file mode 100644
index c19aa17c..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/utils/FileUtil.java
+++ /dev/null
@@ -1,267 +0,0 @@
-package com.nis.modules.mission.utils;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-public class FileUtil {
- /**
- * 上传文件时,判断该文件是否已存在,如存在,则在后面加入时间戳
- *
- * @param fileName
- * 单纯的文件名
- */
- public static String addTimeTagForUploadFileName(String fileName) {
- Calendar calendar = new GregorianCalendar();
- long timestamp = calendar.getTimeInMillis();
- // 去掉后缀的文件名
- String fielType = "";
- if (fileName.lastIndexOf(".") != -1) {
- fielType = fileName.substring(fileName.lastIndexOf("."));
- fileName = fileName.substring(0, fileName.lastIndexOf("."));
- }
- fileName += "_" + timestamp;
- fileName += fielType;
- return fileName;
- }
- /**
- * 去掉文件名后的时间戳
- *
- * @param fileName
- * 带时间戳的文件名
- */
- public static String removeTimeTagForDownLoad(String fileName) {
- if (fileName.contains("_")) {
- String timeTag = fileName.substring(fileName.lastIndexOf("_"),
- fileName.lastIndexOf("."));
- fileName = fileName.replace(timeTag, "");
- }
- return fileName;
- }
-
- public long getFileSizes(File f) throws Exception {// 取得文件大小
- long s = 0;
- if (f.exists()) {
- FileInputStream fis = null;
- fis = new FileInputStream(f);
- s = fis.available();
- } else {
- f.createNewFile();
- System.out.println("文件不存在");
- }
- return s;
- }
-
- // 递归
- public long getFileSize(File f) throws Exception// 取得文件夹大小
- {
- long size = 0;
- File flist[] = f.listFiles();
- for (int i = 0; i < flist.length; i++) {
- if (flist[i].isDirectory()) {
- size = size + getFileSize(flist[i]);
- } else {
- size = size + flist[i].length();
- }
- }
- return size;
- }
-
- public String FormetFileSize(long fileS) {// 转换文件大小
- DecimalFormat df = new DecimalFormat("#.00");
- String fileSizeString = "";
- if (fileS < 1024) {
- fileSizeString = df.format((double) fileS) + "B";
- } else if (fileS < 1048576) {
- fileSizeString = df.format((double) fileS / 1024) + "K";
- } else if (fileS < 1073741824) {
- fileSizeString = df.format((double) fileS / 1048576) + "M";
- } else {
- fileSizeString = df.format((double) fileS / 1073741824) + "G";
- }
- return fileSizeString;
- }
-
- public long getlist(File f) {// 递归求取目录文件个数
- long size = 0;
- File flist[] = f.listFiles();
- size = flist.length;
- for (int i = 0; i < flist.length; i++) {
- if (flist[i].isDirectory()) {
- size = size + getlist(flist[i]);
- size--;
- }
- }
- return size;
-
- }
- /**
- * 获取目录下所有指定后缀名的文件
- * @param file
- * @return
- */
- public File[] getDirectoryArray(String filepath, final String suffix) {
- File file = new File(filepath);
- if (!file.isDirectory()) {
- new Exception(file.getAbsolutePath() + " Not A Directory");
- }
- return file.listFiles(new FilenameFilter() {
- // 使用匿名内部类重写accept方法;
- public boolean accept(File dir, String name) {
- if (new File(dir, name).isDirectory()) {
- return false;
- } else
- return name.endsWith(suffix); // 过滤出注定后缀名称的文件
- }
- });
- }
-
- //根据给定的目录产生所有的文件对象数组
- public static File[] listAllFilesEndWith(File file,String suffix) {
- File[] files = new File[0];
- List<File> fileGroup = new ArrayList<File>();
- try {
- generateAllFilesEndWith(file,suffix,fileGroup);
- }catch(Exception e) {
- e.printStackTrace();
- }
-
- return fileGroup.toArray(files);
- }
-
- public static void generateAllFilesEndWith(File file,String suffix,List<File> fileGroup) {
- try {
- if(file.exists()&&file.isDirectory()) {
- File[] fileList = file.listFiles();
- for(File f:fileList) {
- if(f.exists()) {//文件夹作为节点
- if(f.isDirectory()) {
- generateAllFilesEndWith(f,suffix,fileGroup);
- }else if(isRightSuffix(f,suffix)) {
- fileGroup.add(f);
- }
- }
- }
- }else {
- fileGroup.add(file);
- }
- }catch(Exception e) {
- e.printStackTrace();
- }
-
- }
-
- //文件后缀名是否符合指定字符串
- public static boolean isRightSuffix(File file,String suffix) {
- boolean canRead = false;
- String fileName = file.getName();
- String extensionName = fileName.substring(fileName.lastIndexOf(".")+1);
- if(file.isFile()&&suffix.equals(extensionName)) {
- canRead = true;
- }
- return canRead;
- }
-
- public static Calendar getModifiedTime(File f){
- Calendar cal = Calendar.getInstance();
- long time = f.lastModified();
-// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- cal.setTimeInMillis(time);
-// Date date = cal.getTime();
-// System.out.println("修改时间[2] " + formatter.format(cal.getTime())); //输出:修改时间[2] 2009-08-17 10:32:38
-
- return cal;
- }
-
-
- static void main(String[] args) {
-
- // File file = new
- // File("E:/tomacat/apache-tomcat-6.0.14/webapps/share/attached/image/share/20111018/1318925123906.jpg");
- // FileInputStream fis = null;
- // try{
- // fis = new FileInputStream(file);
- // System.out.println("文件size:"+String.valueOf((double)fis.available()/1024)+"K");
- // // fileSizeString = df.format((double) fileS / 1048576) + "M";
- //
- // }catch(IOException e1){
- // System.out.println("IO出错!");
- // }
-
- FileUtil g = new FileUtil();
- long startTime = System.currentTimeMillis();
- try {
- long l = 0;
- String path = "D:\testSize";
- File ff = new File(path);
- if (ff.isDirectory()) { // 如果路径是文件夹的时候
- System.out.println("文件个数 " + g.getlist(ff));
- System.out.println("目录");
- l = g.getFileSize(ff);
- System.out.println(path + "目录的大小为:" + g.FormetFileSize(l));
- } else {
- System.out.println(" 文件个数 1");
- System.out.println("文件");
- l = g.getFileSizes(ff);
- System.out.println(path + "文件的大小为:" + g.FormetFileSize(l));
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- }
- long endTime = System.currentTimeMillis();
- System.out.println("总共花费时间为:" + (endTime - startTime) + "毫秒...");
- }
-
- public static void copy(File src, File dst, int bufferSize) {
- try {
- long start = System.currentTimeMillis();
- InputStream in = null;
- OutputStream out = null;
- try {
- in = new BufferedInputStream(new FileInputStream(src), bufferSize);
- out = new BufferedOutputStream(new FileOutputStream(dst), bufferSize);
- byte[] buffer = new byte[bufferSize];
-
-
- int length = -1;
- while((length = in.read(buffer)) != -1)
- {
- out.write(buffer, 0, length);
- }
-
- /***** 原先的 *****/
- /*
- while (in.read(buffer) > 0) {
- out.write(buffer);
- }
- */
- /**********/
-
- out.flush();
- System.out.println("上传文件耗时:"+(System.currentTimeMillis()-start)+"毫秒!");
- } finally {
- if (null != in) {
- in.close();
- }
- if (null != out) {
- out.close();
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- System.out.println("上传文件时出错!!!");
- }
- }
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/utils/MD5.java b/nezha-admin/src/main/java/com/nis/modules/mission/utils/MD5.java
deleted file mode 100644
index 4b0a6cf1..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/utils/MD5.java
+++ /dev/null
@@ -1,342 +0,0 @@
-package com.nis.modules.mission.utils;
-/************************************************
- MD5 算法的Java Bean
- Last Modified:10,Mar,2001
- *************************************************/
-
-/*******************************************************************************
- * md5 类实现了RSA Data Security, Inc.在提交给IETF 的RFC1321中的MD5 message-digest 算法。
- ******************************************************************************/
-public class MD5 {
- /*
- * 下面这些S11-S44实际上是一个4*4的矩阵,在原始的C实现中是用#define 实现的, 这里把它们实现成为static
- * final是表示了只读,切能在同一个进程空间内的多个 Instance间共享
- */
- static final int S11 = 7;
-
- static final int S12 = 12;
-
- static final int S13 = 17;
-
- static final int S14 = 22;
-
- static final int S21 = 5;
-
- static final int S22 = 9;
-
- static final int S23 = 14;
-
- static final int S24 = 20;
-
- static final int S31 = 4;
-
- static final int S32 = 11;
-
- static final int S33 = 16;
-
- static final int S34 = 23;
-
- static final int S41 = 6;
-
- static final int S42 = 10;
-
- static final int S43 = 15;
-
- static final int S44 = 21;
-
- static final byte[] PADDING = { -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0 };
-
- /*
- * 下面的三个成员是MD5计算过程中用到的3个核心数据,在原始的C实现中 被定义到MD5_CTX结构中
- */
- private long[] state = new long[4];// state (ABCD)
-
- private long[] count = new long[2];// number of bits, modulo 2^64 (lsb
-
- // first)
-
- private byte[] buffer = new byte[64]; // input buffer
-
- /*
- * digestHexStr是MD5的唯一一个公共成员,是最新一次计算结果的 16进制ASCII表示.
- */
- public String digestHexStr;
-
- /*
- * digest,是最新一次计算结果的2进制内部表示,表示128bit的MD5值.
- */
- private byte[] digest = new byte[16];
-
- /*
- * getMD5Code是类MD5最主要的公共方法,入口参数是你想要进行MD5变换的字符串
- * 返回的是变换完的结果,这个结果是从公共成员digestHexStr取得的.
- */
- public String getMD5Code(String inbuf) {
- md5Init();
- md5Update(inbuf.getBytes(), inbuf.length());
- md5Final();
- digestHexStr = "";
- for (int i = 0; i < 16; i++) {
- digestHexStr += byteHEX(digest[i]);
- }
- return digestHexStr;
- }
-
- // 这是MD5这个类的标准构造函数,JavaBean要求有一个public的并且没有参数的构造函数��
- public MD5() {
- md5Init();
- return;
- }
-
- /* md5Init是一个初始化函数,初始化核心变量,装入标准的幻数 */
- private void md5Init() {
- count[0] = 0L;
- count[1] = 0L;
- // /* Load magic initialization constants.
- state[0] = 0x67452301L;
- state[1] = 0xefcdab89L;
- state[2] = 0x98badcfeL;
- state[3] = 0x10325476L;
- return;
- }
-
- /*
- * F, G, H ,I 是4个基本的MD5函数,在原始的MD5的C实现中,由于它们是
- * 简单的位运算,可能出于效率的考虑把它们实现成了宏,在java中,我们把它们 实现成了private方法,名字保持了原来C中的。
- */
- private long F(long x, long y, long z) {
- return (x & y) | ((~x) & z);
- }
-
- private long G(long x, long y, long z) {
- return (x & z) | (y & (~z));
- }
-
- private long H(long x, long y, long z) {
- return x ^ y ^ z;
- }
-
- private long I(long x, long y, long z) {
- return y ^ (x | (~z));
- }
-
- /*
- * FF,GG,HH和II将调用F,G,H,I进行近一步变换 FF, GG, HH, and II transformations for
- * rounds 1, 2, 3, and 4. Rotation is separate from addition to prevent
- * recomputation.
- */
- private long FF(long a, long b, long c, long d, long x, long s, long ac) {
- a += F(b, c, d) + x + ac;
- a = ((int) a << s) | ((int) a >>> (32 - s));
- a += b;
- return a;
- }
-
- private long GG(long a, long b, long c, long d, long x, long s, long ac) {
- a += G(b, c, d) + x + ac;
- a = ((int) a << s) | ((int) a >>> (32 - s));
- a += b;
- return a;
- }
-
- private long HH(long a, long b, long c, long d, long x, long s, long ac) {
- a += H(b, c, d) + x + ac;
- a = ((int) a << s) | ((int) a >>> (32 - s));
- a += b;
- return a;
- }
-
- private long II(long a, long b, long c, long d, long x, long s, long ac) {
- a += I(b, c, d) + x + ac;
- a = ((int) a << s) | ((int) a >>> (32 - s));
- a += b;
- return a;
- }
-
- /*
- * md5Update是MD5的主计算过程,inbuf是要变换的字节串,inputlen是长度,这个
- * 函数由getMD5Code调用,调用之前需要调用md5init,因此把它设计成private的
- */
- private void md5Update(byte[] inbuf, int inputLen) {
- int i, index, partLen;
- byte[] block = new byte[64];
- index = (int) (count[0] >>> 3) & 0x3F;
- // /* Update number of bits */
- if ((count[0] += (inputLen << 3)) < (inputLen << 3))
- count[1]++;
- count[1] += (inputLen >>> 29);
- partLen = 64 - index;
- // Transform as many times as possible.
- if (inputLen >= partLen) {
- md5Memcpy(buffer, inbuf, index, 0, partLen);
- md5Transform(buffer);
- for (i = partLen; i + 63 < inputLen; i += 64) {
- md5Memcpy(block, inbuf, 0, i, 64);
- md5Transform(block);
- }
- index = 0;
- } else
- i = 0;
- // /* Buffer remaining input */
- md5Memcpy(buffer, inbuf, index, i, inputLen - i);
- }
-
- /*
- * md5Final整理和填写输出结果
- */
- private void md5Final() {
- byte[] bits = new byte[8];
- int index, padLen;
- // /* Save number of bits */
- Encode(bits, count, 8);
- // /* Pad out to 56 mod 64.
- index = (int) (count[0] >>> 3) & 0x3f;
- padLen = (index < 56) ? (56 - index) : (120 - index);
- md5Update(PADDING, padLen);
- // /* Append length (before padding) */
- md5Update(bits, 8);
- // /* Store state in digest */
- Encode(digest, state, 16);
- }
-
- /*
- * md5Memcpy是一个内部使用的byte数组的块拷贝函数,从input的iniss开始把len长度的
- * 字节拷贝到output的outpos位置开始
- */
- private void md5Memcpy(byte[] output, byte[] input, int outpos, int iniss,
- int len) {
- int i;
- for (i = 0; i < len; i++)
- output[outpos + i] = input[iniss + i];
- }
-
- /*
- * md5Transform是MD5核心变换程序,有md5Update调用,block是分块的原始字节
- */
- private void md5Transform(byte block[]) {
- long a = state[0], b = state[1], c = state[2], d = state[3];
- long[] x = new long[16];
- Decode(x, block, 64);
- /* Round 1 */
- a = FF(a, b, c, d, x[0], S11, 0xd76aa478L); /* 1 */
- d = FF(d, a, b, c, x[1], S12, 0xe8c7b756L); /* 2 */
- c = FF(c, d, a, b, x[2], S13, 0x242070dbL); /* 3 */
- b = FF(b, c, d, a, x[3], S14, 0xc1bdceeeL); /* 4 */
- a = FF(a, b, c, d, x[4], S11, 0xf57c0fafL); /* 5 */
- d = FF(d, a, b, c, x[5], S12, 0x4787c62aL); /* 6 */
- c = FF(c, d, a, b, x[6], S13, 0xa8304613L); /* 7 */
- b = FF(b, c, d, a, x[7], S14, 0xfd469501L); /* 8 */
- a = FF(a, b, c, d, x[8], S11, 0x698098d8L); /* 9 */
- d = FF(d, a, b, c, x[9], S12, 0x8b44f7afL); /* 10 */
- c = FF(c, d, a, b, x[10], S13, 0xffff5bb1L); /* 11 */
- b = FF(b, c, d, a, x[11], S14, 0x895cd7beL); /* 12 */
- a = FF(a, b, c, d, x[12], S11, 0x6b901122L); /* 13 */
- d = FF(d, a, b, c, x[13], S12, 0xfd987193L); /* 14 */
- c = FF(c, d, a, b, x[14], S13, 0xa679438eL); /* 15 */
- b = FF(b, c, d, a, x[15], S14, 0x49b40821L); /* 16 */
- /* Round 2 */
- a = GG(a, b, c, d, x[1], S21, 0xf61e2562L); /* 17 */
- d = GG(d, a, b, c, x[6], S22, 0xc040b340L); /* 18 */
- c = GG(c, d, a, b, x[11], S23, 0x265e5a51L); /* 19 */
- b = GG(b, c, d, a, x[0], S24, 0xe9b6c7aaL); /* 20 */
- a = GG(a, b, c, d, x[5], S21, 0xd62f105dL); /* 21 */
- d = GG(d, a, b, c, x[10], S22, 0x2441453L); /* 22 */
- c = GG(c, d, a, b, x[15], S23, 0xd8a1e681L); /* 23 */
- b = GG(b, c, d, a, x[4], S24, 0xe7d3fbc8L); /* 24 */
- a = GG(a, b, c, d, x[9], S21, 0x21e1cde6L); /* 25 */
- d = GG(d, a, b, c, x[14], S22, 0xc33707d6L); /* 26 */
- c = GG(c, d, a, b, x[3], S23, 0xf4d50d87L); /* 27 */
- b = GG(b, c, d, a, x[8], S24, 0x455a14edL); /* 28 */
- a = GG(a, b, c, d, x[13], S21, 0xa9e3e905L); /* 29 */
- d = GG(d, a, b, c, x[2], S22, 0xfcefa3f8L); /* 30 */
- c = GG(c, d, a, b, x[7], S23, 0x676f02d9L); /* 31 */
- b = GG(b, c, d, a, x[12], S24, 0x8d2a4c8aL); /* 32 */
- /* Round 3 */
- a = HH(a, b, c, d, x[5], S31, 0xfffa3942L); /* 33 */
- d = HH(d, a, b, c, x[8], S32, 0x8771f681L); /* 34 */
- c = HH(c, d, a, b, x[11], S33, 0x6d9d6122L); /* 35 */
- b = HH(b, c, d, a, x[14], S34, 0xfde5380cL); /* 36 */
- a = HH(a, b, c, d, x[1], S31, 0xa4beea44L); /* 37 */
- d = HH(d, a, b, c, x[4], S32, 0x4bdecfa9L); /* 38 */
- c = HH(c, d, a, b, x[7], S33, 0xf6bb4b60L); /* 39 */
- b = HH(b, c, d, a, x[10], S34, 0xbebfbc70L); /* 40 */
- a = HH(a, b, c, d, x[13], S31, 0x289b7ec6L); /* 41 */
- d = HH(d, a, b, c, x[0], S32, 0xeaa127faL); /* 42 */
- c = HH(c, d, a, b, x[3], S33, 0xd4ef3085L); /* 43 */
- b = HH(b, c, d, a, x[6], S34, 0x4881d05L); /* 44 */
- a = HH(a, b, c, d, x[9], S31, 0xd9d4d039L); /* 45 */
- d = HH(d, a, b, c, x[12], S32, 0xe6db99e5L); /* 46 */
- c = HH(c, d, a, b, x[15], S33, 0x1fa27cf8L); /* 47 */
- b = HH(b, c, d, a, x[2], S34, 0xc4ac5665L); /* 48 */
- /* Round 4 */
- a = II(a, b, c, d, x[0], S41, 0xf4292244L); /* 49 */
- d = II(d, a, b, c, x[7], S42, 0x432aff97L); /* 50 */
- c = II(c, d, a, b, x[14], S43, 0xab9423a7L); /* 51 */
- b = II(b, c, d, a, x[5], S44, 0xfc93a039L); /* 52 */
- a = II(a, b, c, d, x[12], S41, 0x655b59c3L); /* 53 */
- d = II(d, a, b, c, x[3], S42, 0x8f0ccc92L); /* 54 */
- c = II(c, d, a, b, x[10], S43, 0xffeff47dL); /* 55 */
- b = II(b, c, d, a, x[1], S44, 0x85845dd1L); /* 56 */
- a = II(a, b, c, d, x[8], S41, 0x6fa87e4fL); /* 57 */
- d = II(d, a, b, c, x[15], S42, 0xfe2ce6e0L); /* 58 */
- c = II(c, d, a, b, x[6], S43, 0xa3014314L); /* 59 */
- b = II(b, c, d, a, x[13], S44, 0x4e0811a1L); /* 60 */
- a = II(a, b, c, d, x[4], S41, 0xf7537e82L); /* 61 */
- d = II(d, a, b, c, x[11], S42, 0xbd3af235L); /* 62 */
- c = II(c, d, a, b, x[2], S43, 0x2ad7d2bbL); /* 63 */
- b = II(b, c, d, a, x[9], S44, 0xeb86d391L); /* 64 */
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
- }
-
- /*
- * Encode把long数组按顺序拆成byte数组,因为java的long类型是64bit的, 只拆低32bit,以适应原始C实现的用途
- */
- private void Encode(byte[] output, long[] input, int len) {
- int i, j;
- for (i = 0, j = 0; j < len; i++, j += 4) {
- output[j] = (byte) (input[i] & 0xffL);
- output[j + 1] = (byte) ((input[i] >>> 8) & 0xffL);
- output[j + 2] = (byte) ((input[i] >>> 16) & 0xffL);
- output[j + 3] = (byte) ((input[i] >>> 24) & 0xffL);
- }
- }
-
- /*
- * Decode把byte数组按顺序合成成long数组,因为java的long类型是64bit的,
- * 只合成低32bit,高32bit清零,以适应原始C实现的用途
- */
- private void Decode(long[] output, byte[] input, int len) {
- int i, j;
- for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = b2iu(input[j]) | (b2iu(input[j + 1]) << 8)
- | (b2iu(input[j + 2]) << 16) | (b2iu(input[j + 3]) << 24);
- return;
- }
-
- /*
- * b2iu是我写的一个把byte按照不考虑正负号的原则的"升位"程序,因为java没有unsigned运算
- */
- public static long b2iu(byte b) {
- return b < 0 ? b & 0x7F + 128 : b;
- }
-
- /*
- * byteHEX(),用来把一个byte类型的数转换成十六进制的ASCII表示,
- * 因为java中的byte的toString无法实现这一点,我们又没有C语言中的 sprintf(outbuf,"%02X",ib)
- */
- public static String byteHEX(byte ib) {
- char[] Digit = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A',
- 'B', 'C', 'D', 'E', 'F' };
- char[] ob = new char[2];
- ob[0] = Digit[(ib >>> 4) & 0X0F];
- ob[1] = Digit[ib & 0X0F];
- String s = new String(ob);
- return s;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/utils/MD5Util.java b/nezha-admin/src/main/java/com/nis/modules/mission/utils/MD5Util.java
deleted file mode 100644
index d7e56856..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/utils/MD5Util.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package com.nis.modules.mission.utils;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.nio.MappedByteBuffer;
-import java.nio.channels.FileChannel;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-public class MD5Util {
- /**
- * 默认的密码字符串组合,apache校验下载的文件的正确性用的就是默认的这个组合
- */
- protected static char hexDigits[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9','a', 'b', 'c', 'd', 'e', 'f' };
- protected static MessageDigest messagedigest = null;
- static{
- try{
- messagedigest = MessageDigest.getInstance("MD5");
- }catch(NoSuchAlgorithmException nsaex){
- System.err.println(MD5Util.class.getName()+"初始化失败,MessageDigest不支持MD5Util。");
- nsaex.printStackTrace();
- }
- }
-
- public static void main(String[] args) throws IOException {
- long begin = System.currentTimeMillis();
-
- //2EA3E66AC37DF7610F5BD322EC4FFE48 670M 11s kuri双核1.66G 2G内存
- File big = new File("I:/大型安装程序的压缩版本/Rational rose 2003.rar");
-
- String md5=getFileMD5String(big);
-
- long end = System.currentTimeMillis();
- System.out.println("md5:"+md5+" time:"+((end-begin)/1000)+"s");
- }
-
- /**
- * 适用于上G大的文件
- * @param file
- * @return
- * @throws IOException
- */
- public static String getFileMD5String(File file) throws IOException {
- FileInputStream in = new FileInputStream(file);
- FileChannel ch = in.getChannel();
- MappedByteBuffer byteBuffer = ch.map(FileChannel.MapMode.READ_ONLY, 0, file.length());
- messagedigest.update(byteBuffer);
- return bufferToHex(messagedigest.digest());
- }
-
- public static String getMD5String(String s) {
- return getMD5String(s.getBytes());
- }
-
- public static String getMD5String(byte[] bytes) {
- messagedigest.update(bytes);
- return bufferToHex(messagedigest.digest());
- }
-
- private static String bufferToHex(byte bytes[]) {
- return bufferToHex(bytes, 0, bytes.length);
- }
-
- private static String bufferToHex(byte bytes[], int m, int n) {
- StringBuffer stringbuffer = new StringBuffer(2 * n);
- int k = m + n;
- for (int l = m; l < k; l++) {
- appendHexPair(bytes[l], stringbuffer);
- }
- return stringbuffer.toString();
- }
-
-
- private static void appendHexPair(byte bt, StringBuffer stringbuffer) {
- char c0 = hexDigits[(bt & 0xf0) >> 4];
- char c1 = hexDigits[bt & 0xf];
- stringbuffer.append(c0);
- stringbuffer.append(c1);
- }
-
- public static boolean checkPassword(String password, String md5PwdStr) {
- String s = getMD5String(password);
- return s.equals(md5PwdStr);
- }
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/mission/utils/MapApiReader.java b/nezha-admin/src/main/java/com/nis/modules/mission/utils/MapApiReader.java
deleted file mode 100644
index 94f0edc9..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/mission/utils/MapApiReader.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package com.nis.modules.mission.utils;
-
-import java.lang.reflect.Modifier;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.annotation.Order;
-import org.springframework.stereotype.Component;
-
-import com.fasterxml.classmate.TypeResolver;
-import com.google.common.base.Optional;
-
-import javassist.CannotCompileException;
-import javassist.ClassPool;
-import javassist.CtClass;
-import javassist.CtField;
-import javassist.NotFoundException;
-import javassist.bytecode.AnnotationsAttribute;
-import javassist.bytecode.ConstPool;
-import javassist.bytecode.annotation.Annotation;
-import javassist.bytecode.annotation.IntegerMemberValue;
-import javassist.bytecode.annotation.StringMemberValue;
-import springfox.documentation.schema.ModelRef;
-import springfox.documentation.service.ResolvedMethodParameter;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spi.service.ParameterBuilderPlugin;
-import springfox.documentation.spi.service.contexts.ParameterContext;
-
-@Component
-@Order //plugin加载顺序,默认是最后加载
-public class MapApiReader implements ParameterBuilderPlugin {
- @Autowired
- private TypeResolver typeResolver;
-
- @Override
- public void apply(ParameterContext parameterContext) {
- ResolvedMethodParameter methodParameter = parameterContext.resolvedMethodParameter();
-
- if (methodParameter.getParameterType().canCreateSubtype(Map.class) || methodParameter.getParameterType().canCreateSubtype(String.class)) { //判断是否需要修改对象ModelRef,这里我判断的是Map类型和String类型需要重新修改ModelRef对象
- Optional<ApiJsonObject> optional = methodParameter.findAnnotation(ApiJsonObject.class); //根据参数上的ApiJsonObject注解中的参数动态生成Class
- if (optional.isPresent()) {
- String name = optional.get().name(); //model 名称
- ApiJsonProperty[] properties = optional.get().value();
-
- parameterContext.getDocumentationContext().getAdditionalModels().add(typeResolver.resolve(createRefModel(properties, name))); //像documentContext的Models中添加我们新生成的Class
-
- parameterContext.parameterBuilder() //修改Map参数的ModelRef为我们动态生成的class
- .parameterType("body")
- .modelRef(new ModelRef(name))
- .name(name);
- }
- }
-
- }
-
- private final static String basePackage = "com.nis.modules.mission.utils."; //动态生成的Class名
-
- /**
- * 根据propertys中的值动态生成含有Swagger注解的javaBeen
- */
- private Class createRefModel(ApiJsonProperty[] propertys, String name) {
- ClassPool pool = ClassPool.getDefault();
- CtClass ctClass = pool.makeClass(basePackage + name);
-
- try {
- for (ApiJsonProperty property : propertys) {
- ctClass.addField(createField(property, ctClass));
- }
- return ctClass.toClass();
- } catch (Exception e) {
- e.printStackTrace();
- return null;
- }
- }
-
- /**
- * 根据property的值生成含有swagger apiModelProperty注解的属性
- */
- private CtField createField(ApiJsonProperty property, CtClass ctClass) throws NotFoundException, CannotCompileException {
- CtField ctField = new CtField(getFieldType(property.type()), property.key(), ctClass);
- ctField.setModifiers(Modifier.PUBLIC);
-
- ConstPool constPool = ctClass.getClassFile().getConstPool();
-
- AnnotationsAttribute attr = new AnnotationsAttribute(constPool, AnnotationsAttribute.visibleTag);
- Annotation ann = new Annotation("io.swagger.annotations.ApiModelProperty", constPool);
- ann.addMemberValue("value", new StringMemberValue(property.description(), constPool));
- if (ctField.getType().subclassOf(ClassPool.getDefault().get(String.class.getName())))
- ann.addMemberValue("example", new StringMemberValue(property.example(), constPool));
- if (ctField.getType().subclassOf(ClassPool.getDefault().get(Integer.class.getName())))
- ann.addMemberValue("example", new IntegerMemberValue(Integer.parseInt(property.example()), constPool));
-
- attr.addAnnotation(ann);
- ctField.getFieldInfo().addAttribute(attr);
-
- return ctField;
- }
-
- private CtClass getFieldType(String type) throws NotFoundException {
- CtClass fileType = null;
- switch (type) {
- case "string":
- fileType = ClassPool.getDefault().get(String.class.getName());
- break;
- case "int":
- fileType = ClassPool.getDefault().get(Integer.class.getName());
- break;
- }
- return fileType;
- }
-
- @Override
- public boolean supports(DocumentationType delimiter) {
- return true;
- }
- }
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeCabinetController.java b/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeCabinetController.java
deleted file mode 100644
index 001e65ad..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeCabinetController.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package com.nis.modules.node.controller;
-
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.node.entity.AvailCabinetEntity;
-import com.nis.modules.node.entity.NodeCabinetEntity;
-import com.nis.modules.node.service.NodeCabinetService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * 机柜信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@RestController
-@RequestMapping("/cab")
-@Api(tags = "机柜node-cabinet")
-public class NodeCabinetController {
-
- @Autowired
- private NodeCabinetService nodeCabinetService;
-
- @ApiOperation("机柜列表查询")
- @GetMapping("/list")
- public R list(@RequestParam Map<String, Object> params) {
- PageUtils page = nodeCabinetService.queryPage(params);
- return R.ok(page);
- }
-
- @ApiOperation("机柜详情查询")
- @GetMapping(value = "/detail")
- public R detail(Long id) {
- ValidateUtils.is(id).notNull(RCode.NODECABINET_ID_ISNULL);
-
- NodeCabinetEntity detail = nodeCabinetService.detail(id);
- return R.ok(detail);
- }
-
- @ApiOperation("机柜新增")
- @PostMapping("/save")
- public R save(@RequestBody NodeCabinetEntity nodeCabinet) {
- ValidateUtils.is(nodeCabinet).notNull(RCode.NOT_NULL_ERROR)
- .and(nodeCabinet.getName()).notNull(RCode.NODECABINET_NAME_ISNULL)
- .and(nodeCabinet.getRoomId()).notNull(RCode.NODEROOM_ID_ISNULL)
- .and(nodeCabinet.getUbit()).notNull(RCode.NODECABINET_UBIT_ISNULL).min(1, RCode.NODECABINET_UBIT_MINNUM);
-
- nodeCabinetService.saveNodeCabinet(nodeCabinet);
- return R.ok();
- }
-
- @ApiOperation("机柜修改")
- @PutMapping("/update")
- public R update(@RequestBody NodeCabinetEntity nodeCabinet) {
- ValidateUtils.is(nodeCabinet).notNull(RCode.NOT_NULL_ERROR)
- .and(nodeCabinet.getId()).notNull(RCode.NODECABINET_ID_ISNULL)
- .and(nodeCabinet.getName()).notNull(RCode.NODECABINET_NAME_ISNULL)
- .and(nodeCabinet.getRoomId()).notNull(RCode.NODEROOM_ID_ISNULL)
- .and(nodeCabinet.getUbit()).notNull(RCode.NODECABINET_UBIT_ISNULL).min(1, RCode.NODECABINET_UBIT_MINNUM);
-
- nodeCabinetService.updateNodeCabinet(nodeCabinet);
- return R.ok();
- }
-
- @ApiOperation("机柜删除")
- @DeleteMapping("/delete")
- public R delete(Long[] ids) {
- ValidateUtils.is(ids).notNull(RCode.NODECABINET_ID_ISNULL);
-
- nodeCabinetService.delete(ids);
- return R.ok();
- }
-
- @ApiOperation("机柜名称校验")
- @GetMapping("/cabNameCheck")
- public R cabNameCheck(Long id, String name, Long roomId) {
- ValidateUtils.is(name).notNull(RCode.NODECABINET_NAME_ISNULL)
- .and(roomId).notNull(RCode.NODEROOM_ID_ISNULL);
-
- if (nodeCabinetService.cabNameCheck(id, name, roomId)) {
- return R.ok();
- }
- return R.error(RCode.NODECABINET_NAME_DUPLICATE);// 机柜名称重复错误
- }
-
-
- @ApiOperation("校验U位数量是否可用")
- @GetMapping("/cabUbitCheck")
- public R cabUbitCheck(Long id, Integer ubit) {
- ValidateUtils.is(id).notNull(RCode.NODECABINET_ID_ISNULL)
- .and(ubit).notNull(RCode.NODECABINET_UBIT_ISNULL).min(1, RCode.NODECABINET_UBIT_MINNUM);
-
- return nodeCabinetService.cabUbitCheck(id, ubit);
- }
-
-
- @ApiOperation("查询机柜下可选的机房及行号列号")
- @GetMapping("/optionalRoom")
- public R optionalRoom(Long id) {
- List<AvailCabinetEntity> availCabinetEntities = nodeCabinetService.optionalRoom(id);
- Map map = new HashMap();
- map.put("list", availCabinetEntities);
- return R.ok(map);
- }
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeGroupInfoController.java b/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeGroupInfoController.java
deleted file mode 100644
index b36c5753..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeGroupInfoController.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package com.nis.modules.node.controller;
-
-import com.nis.common.exception.NZException;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.service.NodeGroupInfoService;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * 节点组信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@RestController
-@RequestMapping("/nodegroup")
-@Api(tags = "节点组node-group")
-class NodeGroupInfoController {
-
- @Autowired
- private NodeGroupInfoService nodegroupInfoService;
-
- @ApiOperation("节点组列表")
- @GetMapping("/list")
- public R list() {
- List<SystemInfoEntity> list = nodegroupInfoService.getSysNodeGroups();
- Map<String, List<SystemInfoEntity>> map = new HashMap();
- map.put("list", list);
- return R.ok(map);
- }
-
- @ApiOperation(" 节点组详情查询")
- @GetMapping("/detail")
- public R detail(Long id) {
- ValidateUtils.is(id).notNull(RCode.NODEGROUP_GROUPID_ISNULL);
-
- NodeGroupInfoEntity nodeGroup = nodegroupInfoService.detail(id);
- return R.ok(nodeGroup);
- }
-
-
- @ApiOperation(" 节点组新增")
- @PostMapping("/save")
- public R save(@RequestBody NodeGroupInfoEntity nodegroupInfo) {
- ValidateUtils.is(nodegroupInfo).notNull(RCode.NOT_NULL_ERROR)
- .and(nodegroupInfo.getName()).notNull(RCode.NODEGROUP_NAME_ISNULL)
- .and(nodegroupInfo.getPid()).notNull(RCode.NODEGROUP_PID_ISNULL);
-
- nodegroupInfoService.saveNodeGroupInfo(nodegroupInfo);
- return R.ok();
- }
-
- @ApiOperation(" 节点组删除")
- @DeleteMapping("/delete")
- public R delete(Long id) {
- ValidateUtils.is(id).notNull(RCode.NODEGROUP_GROUPID_ISNULL);
-
- nodegroupInfoService.delete(id);
- return R.ok();
- }
-
- @ApiOperation(" 节点组修改")
- @PutMapping("/update")
- public R update(@RequestBody NodeGroupInfoEntity nodegroupInfo) {
- ValidateUtils.is(nodegroupInfo).notNull(RCode.NOT_NULL_ERROR)
- .and(nodegroupInfo.getName()).notNull(RCode.NODEGROUP_NAME_ISNULL)
- .and(nodegroupInfo.getId()).notNull(RCode.NODEGROUP_ID_ISNULL);
- nodegroupInfoService.updateNodeGroupInfo(nodegroupInfo);
- return R.ok();
- }
-
-
- @ApiOperation(" 节点组名称校验")
- @GetMapping("/groupNameCheck")
- public R groupNameCheck(Long id, String name, Long pid, Long systemId) {
- ValidateUtils.is(name).notNull(RCode.NODEGROUP_NAME_ISNULL).and(pid).notNull(RCode.NODEGROUP_PID_ISNULL);
-
- if (nodegroupInfoService.groupNameCheck(id, name, pid, systemId)) {
- return R.ok();
- }
- return R.error(RCode.NODEGROUP_NAME_DUPLICATE);//节点组名称重复错误
- }
-
- @ApiOperation(" 节点组移除节点")
- @DeleteMapping("/deleteNodeRel")
- public R deleteNodeRel(Long id, Long[] uuids) {
- ValidateUtils.is(id).notNull(RCode.NODEGROUP_GROUPID_ISNULL)
- .and(uuids).notNull(RCode.NODE_UUID_ISNULL);
-
- nodegroupInfoService.deleteNodeRel(id, uuids);
- return R.ok();
- }
-
- @ApiOperation("节点组分配节点 建立关系")
- @PostMapping("/saveNodeRel")
- public R saveNodeRel(Long id, Long[] uuids) {
- ValidateUtils.is(id).notNull(RCode.NODEGROUP_GROUPID_ISNULL)
- .and(uuids).notNull(RCode.NODE_UUID_ISNULL);
-
- nodegroupInfoService.saveNodeRel(id, uuids);
- return R.ok();
- }
-
- @ApiOperation("可分配节点查询")
- @GetMapping("/assList")
- public R assList(@RequestParam Map<String, Object> params) {
- ValidateUtils.is(params).notNull(RCode.NOT_NULL_ERROR);
- if (params.get("systemId") == null || StringUtils.isBlank(params.get("systemId").toString())) {
- throw new NZException(RCode.NODEGROUP_SYSTEMID_ISNULL);
- }
- if (params.get("groupId") == null || StringUtils.isBlank(params.get("groupId").toString())) {
- throw new NZException(RCode.NODEGROUP_GROUPID_ISNULL);
- }
-
- PageUtils page = nodegroupInfoService.assList(params);
- return R.ok(page);
- }
-
-
- /**
- * 获取当前节点组包含的节点个数
- *
- * @return
- */
- @GetMapping("/getNodeCount")
- public R getNodeCount(Long id) {
- ValidateUtils.is(id).notNull(RCode.NODEGROUP_ID_ISNULL);
- Integer nodeCount = nodegroupInfoService.getNodeCount(id);
- return R.ok(nodeCount);
- }
-
-
- /**
- * 分配节点 / 移除节点
- * @param id 节点组ID
- * @param addUuids 要维护的节点UUIDS
- * @param removeUuids 要移除的节点UUIDS
- * @return
- */
- @PostMapping("/assignNode")
- public R assignNode(Long id, Long[] addUuids, Long[] removeUuids) {
- ValidateUtils.is(id).notNull(RCode.NODEGROUP_ID_ISNULL);
-
- nodegroupInfoService.assignNode(id, addUuids, removeUuids);
- return R.ok();
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeInfoController.java b/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeInfoController.java
deleted file mode 100644
index de92ab45..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeInfoController.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package com.nis.modules.node.controller;
-
-import com.nis.common.exception.NZException;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.node.entity.AvailCabinetEntity;
-import com.nis.modules.node.entity.NodeGroupRelEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.node.service.NodeInfoService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.collections.CollectionUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * 节点信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@RestController
-@RequestMapping("/node")
-@Api(tags = "节点node-info")
-public class NodeInfoController {
-
- @Autowired
- private NodeInfoService nodeInfoService;
-
- @ApiOperation("节点列表")
- @GetMapping("/list")
- public R list(@RequestParam Map<String, Object> params) {
- PageUtils page = nodeInfoService.queryPage(params);
- return R.ok(page);
- }
-
- @ApiOperation("节点详情查询")
- @GetMapping("/detail")
- public R detail(Long uuid) {
- ValidateUtils.is(uuid).notNull(RCode.NODE_UUID_ISNULL);
-
- NodeInfoEntity nodeInfoDetail = nodeInfoService.detail(uuid);
- return R.ok(nodeInfoDetail);
- }
-
- @ApiOperation("节点新增")
- @PostMapping("/save")
- public R save(@RequestBody NodeInfoEntity nodeInfoEntity) {
- ValidateUtils.is(nodeInfoEntity).notNull(RCode.NOT_NULL_ERROR)
- .and(nodeInfoEntity.getIp()).notNull(RCode.NODE_IPADDRESS_ISNULL).ip(RCode.NODE_IPADDRESS_FORMAT)
- .and(nodeInfoEntity.getName()).notNull(RCode.NODE_NAME_ISNULL)
- .and(nodeInfoEntity.getType()).notNull(RCode.NODE_TYPE_ISNULL);
-
- nodeInfoService.saveNodeInfo(nodeInfoEntity);
- return R.ok();
- }
-
- @ApiOperation("节点修改")
- @PutMapping("/update")
- public R update(@RequestBody NodeInfoEntity nodeInfoEntity) {
- ValidateUtils.is(nodeInfoEntity).notNull(RCode.NOT_NULL_ERROR)
- .and(nodeInfoEntity.getUuid()).notNull(RCode.NODE_UUID_ISNULL)
- .and(nodeInfoEntity.getIp()).notNull(RCode.NODE_IPADDRESS_ISNULL).ip(RCode.NODE_IPADDRESS_FORMAT)
- .and(nodeInfoEntity.getName()).notNull(RCode.NODE_NAME_ISNULL)
- .and(nodeInfoEntity.getType()).notNull(RCode.NODE_TYPE_ISNULL);
-
- nodeInfoService.updateNodeInfo(nodeInfoEntity);
- return R.ok();
- }
-
-
- @ApiOperation("IP地址校验")
- @GetMapping("/ipCheck")
- public R ipCheck(Long uuid, String ip) {
- ValidateUtils.is(ip).notNull(RCode.NODE_IPADDRESS_ISNULL).and(ip).ip(RCode.NODE_IPADDRESS_FORMAT);
-
- return nodeInfoService.ipCheck(uuid, ip);
- }
-
- @ApiOperation("name唯一校验")
- @GetMapping("/nodeNameCheck")
- public R nodeNameCheck(Long uuid, String name) {
- ValidateUtils.is(name).notNull(RCode.NODE_NAME_ISNULL);
-
- if (nodeInfoService.nodeNameCheck(uuid, name)) {
- return R.ok();
- }
- return R.error(RCode.NODE_NAME_DUPLICATE);//名称重复
- }
-
- @ApiOperation("节点状态变更")
- @PutMapping("/changeState")
- public R changeState(Long[] uuids, String state) {
- ValidateUtils.is(uuids).notNull(RCode.NODE_UUID_ISNULL).and(state).notNull(RCode.NODE_STATE_ISNULL);
-
- nodeInfoService.changeState(uuids, state);
- return R.ok();
- }
-
- @ApiOperation("查询可用机柜")
- @GetMapping("/selectCab")
- public R selectCab(Long uuid, Integer uSize) {
- ValidateUtils.is(uSize).notNull(RCode.NODE_USIZE_ISNULL);
- if (uSize < 1) {
- throw new NZException(RCode.NODE_USIZE_NOTTRUE); // u位大小值不正确
- }
-
- List<AvailCabinetEntity> availCabinetEntities = nodeInfoService.selectCab(uuid, uSize);
- Map<String, List<AvailCabinetEntity>> map = new HashMap();
- map.put("list", availCabinetEntities);
- return R.ok(map);
- }
-
-
- /**
- * 根据节点UUID 查询所属节点组集合
- * @param uuid
- * @return
- */
- @GetMapping("/getGroupsById")
- public R getGroupsById(Long uuid) {
- ValidateUtils.is(uuid).notNull(RCode.NODE_UUID_ISNULL);
- return R.ok(nodeInfoService.getGroupsById(uuid));
- }
-
- /**
- * 根据节点的UUID 查询所属业务系统集合
- * @param uuid
- * @return
- */
- @GetMapping("/querySystemsByUuid")
- public R querySystemByUuid(Long uuid) {
- ValidateUtils.is(uuid).notNull(RCode.NODE_UUID_ISNULL);
- return R.ok(nodeInfoService.querySystemsByUuid(uuid));
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeRoomController.java b/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeRoomController.java
deleted file mode 100644
index a1ae45ea..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/controller/NodeRoomController.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package com.nis.modules.node.controller;
-
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.node.entity.NodeRoomEntity;
-import com.nis.modules.node.service.NodeRoomService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Map;
-
-
-/**
- * 机房 controller
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@RestController
-@RequestMapping("/room")
-@Api(tags = "机房node-room")
-public class NodeRoomController {
-
- @Autowired
- private NodeRoomService nodeRoomService;
-
- @ApiOperation("机房列表查询")
- @GetMapping("/list")
- public R list(@RequestParam Map<String, Object> params) {
- PageUtils page = nodeRoomService.queryPage(params);
- return R.ok().put("page", page);
- }
-
- @ApiOperation("机房详情查询")
- @GetMapping("/detail")
- public R detail(Long id) {
- ValidateUtils.is(id).notNull(RCode.NODEROOM_ID_ISNULL);
-
- NodeRoomEntity nodeRoom = nodeRoomService.detail(id);
- return R.ok(nodeRoom);
- }
-
-
- @ApiOperation("机房新增")
- @PostMapping("/save")
- public R save(@RequestBody NodeRoomEntity nodeRoom) {
- ValidateUtils.is(nodeRoom).notNull(RCode.NOT_NULL_ERROR)
- .and(nodeRoom.getName()).notNull(RCode.NODEROOM_NAME_ISNULL)
- .and(nodeRoom.getRoomRows()).notNull(RCode.NODEROOM_ROWS_ISNULL).min(1, RCode.NODEROOM_ROWS_MINNUM)
- .and(nodeRoom.getRoomCols()).notNull(RCode.NODEROOM_COLS_ISNULL).min(1, RCode.NODEROOM_COLS_MINNUM)
- .and(nodeRoom.getAddr()).notNull(RCode.NODEROOM_ADDR_ISNULL);
-
- nodeRoomService.saveNodeRoom(nodeRoom);
- return R.ok();
- }
-
-
- @ApiOperation("机房修改")
- @PutMapping("/update")
- public R update(@RequestBody NodeRoomEntity nodeRoom) {
- ValidateUtils.is(nodeRoom).notNull(RCode.NOT_NULL_ERROR)
- .and(nodeRoom.getId()).notNull(RCode.NODEROOM_ID_ISNULL)
- .and(nodeRoom.getName()).notNull(RCode.NODEROOM_NAME_ISNULL)
- .and(nodeRoom.getRoomRows()).notNull(RCode.NODEROOM_ROWS_ISNULL).min(1, RCode.NODEROOM_ROWS_MINNUM)
- .and(nodeRoom.getRoomCols()).notNull(RCode.NODEROOM_COLS_ISNULL).min(1, RCode.NODEROOM_COLS_MINNUM)
- .and(nodeRoom.getAddr()).notNull(RCode.NODEROOM_ADDR_ISNULL);
-
- nodeRoomService.updateNodeRoom(nodeRoom);
- return R.ok();
- }
-
-
- @ApiOperation("机房删除")
- @DeleteMapping("/delete")
- public R delete(Long[] ids) {
- ValidateUtils.is(ids).notNull(RCode.NODEROOM_ID_ISNULL);
-
- nodeRoomService.delete(ids);
- return R.ok();
- }
-
- @ApiOperation("机房名称校验")
- @GetMapping("/roomNameCheck")
- public R roomNameCheck(Long id, String name) {
- ValidateUtils.is(name).notNull(RCode.NODEROOM_NAME_ISNULL);
-
- if (nodeRoomService.roomNameCheck(id, name)) {
- return R.ok();
- }
- return R.error(RCode.NODEROOM_NAME_DUPLICATE);// 机房名称重复
- }
-
- @ApiOperation("机房修改时行列校验")
- @GetMapping("/roomSizeCheck")
- public R roomSizeCheck(Long id, Integer roomRows, Integer roomCols) {
- ValidateUtils.is(id).notNull(RCode.NODEROOM_ID_ISNULL)
- .and(roomRows).notNull(RCode.NODEROOM_ROWS_ISNULL)
- .and(roomCols).notNull(RCode.NODEROOM_COLS_ISNULL);
-
- return nodeRoomService.roomSizeCheck(id, roomRows, roomCols);
- }
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeCabinetDao.java b/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeCabinetDao.java
deleted file mode 100644
index 1e5d786f..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeCabinetDao.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.nis.modules.node.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.nis.modules.node.entity.NodeCabinetEntity;
-import com.nis.modules.node.entity.NodeRoomEntity;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 机柜信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@Mapper
-@Repository
-public interface NodeCabinetDao extends BaseMapper<NodeCabinetEntity> {
-
- // 根据 机房 ID 得到包含机柜中的最大行 列 号
- NodeCabinetEntity getCabMaxRowCol(@Param("roomId") Long id);
-
- // 根据机房行得到列的集合
- List<Integer> getColsByRow(@Param("roomId") Long roomId, @Param("roomRow") int roomRow);
-
- // 分页 查询 机柜列表
- List<NodeCabinetEntity> queryPage(IPage<NodeCabinetEntity> page, @Param("params") Map<String, Object> params);
-
- // 机柜详情查询
- NodeCabinetEntity detail(Long id);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeGroupInfoDao.java b/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeGroupInfoDao.java
deleted file mode 100644
index d2c0a1a5..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeGroupInfoDao.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.nis.modules.node.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 节点组信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@Mapper
-@Repository
-public interface NodeGroupInfoDao extends BaseMapper<NodeGroupInfoEntity> {
-
- List<NodeInfoEntity> assList(IPage<NodeInfoEntity> page, @Param("params") Map<String, Object> params);
-
- // 节点组详情查询
- NodeGroupInfoEntity detail(Long id);
-
- // 获取当前节点组包含的节点个数
- Integer getNodeCount(Long id);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeGroupRelDao.java b/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeGroupRelDao.java
deleted file mode 100644
index f1accb70..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeGroupRelDao.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.nis.modules.node.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.node.entity.NodeGroupRelEntity;
-
-import java.util.List;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Repository;
-
-/**
- * 节点节点组关系表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@Mapper
-@Repository
-public interface NodeGroupRelDao extends BaseMapper<NodeGroupRelEntity> {
-
- List<NodeGroupRelEntity> queryBySystemId(Long id);
- Integer queryCountByGroupId(Long nodeGroupId,String nodeType);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeInfoDao.java b/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeInfoDao.java
deleted file mode 100644
index 7775b893..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeInfoDao.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.nis.modules.node.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 节点信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@Mapper
-@Repository
-public interface NodeInfoDao extends BaseMapper<NodeInfoEntity> {
-
- void changeState(@Param("uuids") Long[] uuids, @Param("state") String state);
-
- void save(NodeInfoEntity nodeInfoEntity);
-
- // 查询机房下所包含的节点
- List<NodeInfoEntity> selectListByRoomId(IPage<NodeInfoEntity> page, @Param("params") Map<String, Object> params);
-
- //查询节点组和包含子节点组的节点
- List<NodeInfoEntity> selectListByGroups(IPage<NodeInfoEntity> page, @Param("params") Map<String, Object> params, @Param("groupdIds") Long[] groupdIds);
-
- List<NodeInfoEntity> queryNodeBySystemId(IPage page, @Param("id") Long id);
-
- List<NodeInfoEntity> querySelectableNodeBySystemId(IPage page, @Param("id") Long id);
-
- // 查询详情
- NodeInfoEntity detail(@Param("uuid")Long uuid);
-
- // 根据节点的UUID 查询所属业务系统集合
- List<SystemInfoEntity> querySystemsByUuid(Long uuid);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeRoomDao.java b/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeRoomDao.java
deleted file mode 100644
index 174369c6..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/dao/NodeRoomDao.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.nis.modules.node.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.node.entity.NodeRoomEntity;
-import org.apache.ibatis.annotations.Mapper;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-/**
- * 机房信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@Mapper
-@Repository
-public interface NodeRoomDao extends BaseMapper<NodeRoomEntity> {
-
- /**
- * 查询存在关联节点的机房 包含有节点的机柜和节点信息
- * @return
- */
- List<NodeRoomEntity> queryRoomsNodes();
-
-
- /**
- * 查询所有存在机柜的机房列表 并含有机柜列表
- * @return
- */
- List<NodeRoomEntity> queryRoomCabinets();
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/dao/SystemNodeRelDao.java b/nezha-admin/src/main/java/com/nis/modules/node/dao/SystemNodeRelDao.java
deleted file mode 100644
index a9c4756b..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/dao/SystemNodeRelDao.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.nis.modules.node.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.node.entity.SystemNodeRelEntity;
-
-import java.util.Date;
-import java.util.List;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Repository;
-
-/**
- * 业务系统 节点 关联表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@Mapper
-@Repository
-public interface SystemNodeRelDao extends BaseMapper<SystemNodeRelEntity> {
-
- void deleteByIds(@Param("oldSysNodeRel")List<SystemNodeRelEntity> oldSysNodeRel, @Param("operator")Long userId, @Param("opTime")Date date);
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/entity/AvailCabinetEntity.java b/nezha-admin/src/main/java/com/nis/modules/node/entity/AvailCabinetEntity.java
deleted file mode 100644
index 57b0f99a..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/entity/AvailCabinetEntity.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.nis.modules.node.entity;
-
-import lombok.Data;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 两处 使用该实体 作为返回对象
- * 1. 节点查询可用机柜的返回对象
- * 2. 机柜查询机房可选行列值
- *
- * @author shizhendong
- */
-@Data
-public class AvailCabinetEntity {
-
- // 机房ID 公共属性
- private Long roomId;
-
- //机房名称 公共属性
- private String roomName;
-
- //节点查询 其中包含起始位置starts 可用起始位置时 使用属性
- private List<NodeCabinetEntity> cabinets;
-
- //机柜查询 机房可用行列时 使用属性
- private List<Map<String, Object>> roomRows;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeCabinetEntity.java b/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeCabinetEntity.java
deleted file mode 100644
index 91aa9c46..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeCabinetEntity.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package com.nis.modules.node.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-import lombok.Data;
-
-/**
- * 机柜信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@Data
-@TableName("node_cabinet")
-@KeySequence("seq_node_cabinet")
-public class NodeCabinetEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 机柜ID
- */
- @TableId(type = IdType.INPUT)
- private Long id;
- /**
- * 机柜名称
- */
- private String name;
- /**
- * 机房id
- */
- private Long roomId;
- /**
- * 行号
- */
- private Integer roomRow;
- /**
- * 列号
- */
- private Integer roomCol;
- /**
- * u位数量
- */
- private Integer ubit;
- /**
- * 备注
- */
- private String remarks;
- /**
- * 操作人
- */
- private Long operator;
- /**
- * 操作时间
- */
- private Date opTime;
-
- /**
- * 是否删除,1:删除,0:未删除,默认:0
- */
- @TableLogic
- private String delFlag;
-
- //机房名称
- @TableField(exist = false)
- private String roomName;
-
- //机柜关联的节点信息
- @TableField(exist = false)
- private List<NodeInfoEntity> nodes;
-
- //可用位置的起始下标
- @TableField(exist = false)
- private List<Integer> starts;
-
- @TableField(exist = false)
- private Integer maxRows;
-
- @TableField(exist = false)
- private Integer maxCols;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeGroupInfoEntity.java b/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeGroupInfoEntity.java
deleted file mode 100644
index 3b401266..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeGroupInfoEntity.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package com.nis.modules.node.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import lombok.Data;
-
-/**
- * 节点组信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@Data
-@TableName("nodegroup_info")
-@KeySequence(value="seq_nodegroup_info")
-public class NodeGroupInfoEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * ID 主键
- */
- @TableId(type= IdType.INPUT)
- private Long id;
-
- /**
- * 节点组名称
- */
- private String name;
- /**
- * 业务系统ID
- */
- private Long systemId;
- /**
- * 父级ID 默认为0
- */
- private Long pid;
- /**
- * 所有上级ID
- */
- private String pids;
- /**
- * 备注
- */
- private String remark;
- /**
- * 是否删除,1:删除,0:未删除,默认:0
- */
- @TableLogic
- private String delFlag;
- /**
- * 操作人id
- */
- private Long operator;
- /**
- * 操作时间
- */
- private Date opTime;
-
-
- //能否分配节点 0不能,1可以 必须是叶子节点才能分配节点
- @TableField(exist = false)
- private String allowAss;
-
- //能否增加子节点组 0不能,1可以 只要跟自己没有直接关联的节点就可以
- @TableField(exist = false)
- private String allowSub;
-
- //父级名称
- @TableField(exist = false)
- private String pname;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeGroupRelEntity.java b/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeGroupRelEntity.java
deleted file mode 100644
index ac0c978d..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeGroupRelEntity.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.nis.modules.node.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.Data;
-
-/**
- * 节点 节点组 关系表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@Data
-@TableName("node_group_rel")
-@KeySequence(value="seq_node_group_rel")
-public class NodeGroupRelEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键ID
- */
- @TableId(type= IdType.INPUT)
- private Long id;
- /**
- * 节点组id
- */
- private Long groupId;
- /**
- * 节点uuid
- */
- private Long uuid;
- /**
- * 描述信息
- */
- private String descr;
- /**
- * 操作人
- */
- private Long operator;
- /**
- * 是否删除,1:删除,0:未删除,默认:0
- */
- @TableLogic
- private String delFlag;
- /**
- * 操作时间
- */
- private Date opTime;
-
- public NodeGroupRelEntity(Long groupId, Long uuid, Long operator, Date opTime) {
- this.groupId = groupId;
- this.uuid = uuid;
- this.operator = operator;
- this.opTime = opTime;
- }
-
- public NodeGroupRelEntity() {
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeInfoEntity.java b/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeInfoEntity.java
deleted file mode 100644
index a862344e..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeInfoEntity.java
+++ /dev/null
@@ -1,366 +0,0 @@
-package com.nis.modules.node.entity;
-
-import com.baomidou.mybatisplus.annotation.FieldStrategy;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-/**
- * 节点信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@TableName("node_info")
-public class NodeInfoEntity implements Serializable {
- private static final long serialVersionUID = 1L;
- //表 ID
- private Long id;
- /**
- * 名称
- */
- private String name;
- /**
- * 主机名
- */
- private String hostName;
- /**
- * ip
- */
- private String ip;
- /**
- * ip整型
- */
- private Long ipLong;
- /**
- * 全局唯一
- */
- private Long uuid;
- /**
- * 设备类型,1、server,2、net
- */
- private String type;
- /**
- * 设备标签,与sys_dict关联
- */
- @TableField(strategy = FieldStrategy.IGNORED)
- private String tag;
- /**
- * snmpv3 用户名
- */
- private String userName;
- /**
- * snmpv3 密码
- */
- private String password;
- /**
- * 设备状态,1:在线,2:下线,3:删除
- */
- private String state;
- /**
- * 机柜id
- */
- @TableField(strategy = FieldStrategy.IGNORED)
- private Long cabinetId;
- /**
- * u位大小
- */
- @TableField(strategy = FieldStrategy.IGNORED)
- private Integer uSize;
- /**
- * 机柜起始位置
- */
- @TableField(strategy = FieldStrategy.IGNORED)
- private Integer cabinetStart;
- /**
- * snmp默认端口号
- */
- @TableField(strategy = FieldStrategy.IGNORED)
- private Integer snmpPort;
- /**
- * snmp团体字
- */
- @TableField(strategy = FieldStrategy.IGNORED)
- private String snmpCommunity;
- /**
- * 备注
- */
- private String remark;
- /**
- * 操作人
- */
- private Long operator;
- /**
- * 操作时间
- */
- private Date opTime;
-
-
-
-
- // 机房名称
- @TableField(exist = false)
- private String roomName;
-
- //所属机柜
- @TableField(exist = false)
- private NodeCabinetEntity cabinetInfo;
-
- //所在业务系统
- @TableField(exist = false)
- private List<SystemInfoEntity> systemInfo;
-
- //设备标签名称,与sys_dict code关联,type:node-type
- @TableField(exist = false)
- private String tagName;
-
-
- /**
- * 节点组IDS 节点添加/修改选择节点组
- */
- @TableField(exist = false)
- private List<NodeGroupInfoEntity> groups;
-
- /**
- * 业务系统集合
- */
- @TableField(exist = false)
- private List<SystemInfoEntity> systems;
-
- public List<SystemInfoEntity> getSystems() {
- return systems;
- }
-
- public void setSystems(List<SystemInfoEntity> systems) {
- this.systems = systems;
- }
-
- public List<NodeGroupInfoEntity> getGroups() {
- return groups;
- }
-
- public void setGroups(List<NodeGroupInfoEntity> groups) {
- this.groups = groups;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getHostName() {
- return hostName;
- }
-
- public void setHostName(String hostName) {
- this.hostName = hostName;
- }
-
- public String getIp() {
- return ip;
- }
-
- public void setIp(String ip) {
- this.ip = ip;
- }
-
- public Long getIpLong() {
- return ipLong;
- }
-
- public void setIpLong(Long ipLong) {
- this.ipLong = ipLong;
- }
-
- public Long getUuid() {
- return uuid;
- }
-
- public void setUuid(Long uuid) {
- this.uuid = uuid;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getTag() {
- return tag;
- }
-
- public void setTag(String tag) {
- this.tag = tag;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public String getState() {
- return state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public Long getCabinetId() {
- return cabinetId;
- }
-
- public void setCabinetId(Long cabinetId) {
- this.cabinetId = cabinetId;
- }
-
- public Integer getuSize() {
- return uSize;
- }
-
- public void setuSize(Integer uSize) {
- this.uSize = uSize;
- }
-
- public Integer getCabinetStart() {
- return cabinetStart;
- }
-
- public void setCabinetStart(Integer cabinetStart) {
- this.cabinetStart = cabinetStart;
- }
-
- public Integer getSnmpPort() {
- return snmpPort;
- }
-
- public void setSnmpPort(Integer snmpPort) {
- this.snmpPort = snmpPort;
- }
-
- public String getSnmpCommunity() {
- return snmpCommunity;
- }
-
- public void setSnmpCommunity(String snmpCommunity) {
- this.snmpCommunity = snmpCommunity;
- }
-
- public String getRemark() {
- return remark;
- }
-
- public void setRemark(String remark) {
- this.remark = remark;
- }
-
- public Long getOperator() {
- return operator;
- }
-
- public void setOperator(Long operator) {
- this.operator = operator;
- }
-
- public Date getOpTime() {
- return opTime;
- }
-
- public void setOpTime(Date opTime) {
- this.opTime = opTime;
- }
-
- public String getRoomName() {
- return roomName;
- }
-
- public void setRoomName(String roomName) {
- this.roomName = roomName;
- }
-
- public NodeCabinetEntity getCabinetInfo() {
- return cabinetInfo;
- }
-
- public void setCabinetInfo(NodeCabinetEntity cabinetInfo) {
- this.cabinetInfo = cabinetInfo;
- }
-
- public List<SystemInfoEntity> getSystemInfo() {
- return systemInfo;
- }
-
- public void setSystemInfo(List<SystemInfoEntity> systemInfo) {
- this.systemInfo = systemInfo;
- }
-
- public String getTagName() {
- return tagName;
- }
-
- public void setTagName(String tagName) {
- this.tagName = tagName;
- }
-
- public NodeInfoEntity() {
- }
-
- @Override
- public String toString() {
- return "NodeInfoEntity{" +
- "id=" + id +
- ", name='" + name + '\'' +
- ", hostName='" + hostName + '\'' +
- ", ip='" + ip + '\'' +
- ", ipLong=" + ipLong +
- ", uuid=" + uuid +
- ", type='" + type + '\'' +
- ", tag='" + tag + '\'' +
- ", userName='" + userName + '\'' +
- ", password='" + password + '\'' +
- ", state='" + state + '\'' +
- ", cabinetId=" + cabinetId +
- ", uSize=" + uSize +
- ", cabinetStart=" + cabinetStart +
- ", snmpPort=" + snmpPort +
- ", snmpCommunity='" + snmpCommunity + '\'' +
- ", remark='" + remark + '\'' +
- ", operator=" + operator +
- ", opTime=" + opTime +
- ", roomName='" + roomName + '\'' +
- ", cabinetInfo=" + cabinetInfo +
- ", systemInfo=" + systemInfo +
- ", tagName='" + tagName + '\'' +
- '}';
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeRoomEntity.java b/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeRoomEntity.java
deleted file mode 100644
index a188155a..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/entity/NodeRoomEntity.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.nis.modules.node.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-import lombok.Data;
-
-/**
- * 机房信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-@Data
-@TableName("node_room")
-@KeySequence(value="seq_node_room")
-public class NodeRoomEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 主键
- */
- @TableId(type= IdType.INPUT)
- private Long id;
- /**
- * 机房名称
- */
- private String name;
- /**
- * 行数
- */
- private Integer roomRows;
- /**
- * 列数
- */
- private Integer roomCols;
- /**
- * 地区
- */
- private Long addr;
- /**
- * 备注
- */
- private String remarks;
- /**
- * 操作人
- */
- private Long operator;
- /**
- * 操作时间
- */
- private Date opTime;
-
- /**
- * 是否删除,1:删除,0:未删除,默认:0
- */
- @TableLogic
- private String delFlag;
-
- // 位置名称
- @TableField(exist = false)
- private String addrName;
-
- /**
- * 机房关联的机柜信息
- */
- @TableField(exist = false)
- private List<NodeCabinetEntity> cabinets;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/entity/SystemNodeRelEntity.java b/nezha-admin/src/main/java/com/nis/modules/node/entity/SystemNodeRelEntity.java
deleted file mode 100644
index b8cbe8d0..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/entity/SystemNodeRelEntity.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.nis.modules.node.entity;
-
-
-import com.baomidou.mybatisplus.annotation.*;
-import jdk.nashorn.internal.objects.annotations.Constructor;
-import lombok.Data;
-
-import java.util.Date;
-import java.util.Objects;
-
-/**
- * 业务系统和节点关联关系实体
- * @author shizhendong
- */
-@Data
-@TableName("system_node_rel")
-@KeySequence(value = "seq_system_node_rel")
-public class SystemNodeRelEntity {
-
- /**
- * 主键ID
- */
- @TableId(type = IdType.INPUT)
- private Long id;
-
- /**
- * 业务系统ID
- */
- private Long systemId;
-
- /**
- * 全局唯一
- */
- private Long uuid;
-
- /**
- * 操作人
- */
- private Long operator;
-
-
- /**
- * 删除标识 0:正常 1:删除
- */
- @TableLogic
- private String delFlag;
-
- /**
- * 操作时间
- */
- private Date opTime;
-
- public SystemNodeRelEntity() {
- }
-
- public SystemNodeRelEntity(Long systemId, Long uuid, Long operator, Date opTime) {
- this.systemId = systemId;
- this.uuid = uuid;
- this.operator = operator;
- this.opTime = opTime;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (!(o instanceof SystemNodeRelEntity)) {
- return false;
- }
- SystemNodeRelEntity that = (SystemNodeRelEntity) o;
- return this.getSystemId().equals(that.getSystemId());
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(this.getId(), this.getSystemId(), this.getUuid());
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/NodeCabinetService.java b/nezha-admin/src/main/java/com/nis/modules/node/service/NodeCabinetService.java
deleted file mode 100644
index b6056110..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/NodeCabinetService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.nis.modules.node.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.modules.node.entity.AvailCabinetEntity;
-import com.nis.modules.node.entity.NodeCabinetEntity;
-import org.apache.commons.logging.impl.AvalonLogger;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 机柜信息表
- *
- * @author shizhendong
- * @email ${email}
- * @date 2019-07-18 09:58:18
- */
-public interface NodeCabinetService extends IService<NodeCabinetEntity> {
-
- PageUtils queryPage(Map<String, Object> params);
-
- NodeCabinetEntity detail(Long id);
-
- boolean cabNameCheck(Long id, String name, Long roomId);
-
- // 查询机柜可选的机房及行号列号
- List<AvailCabinetEntity> optionalRoom(Long id);
-
- void saveNodeCabinet(NodeCabinetEntity nodeCabinet);
-
- void updateNodeCabinet(NodeCabinetEntity nodeCabinet);
-
- void delete(Long[] ids);
-
- // 校验U位数量是否可用
- R cabUbitCheck(Long id, Integer ubit);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/NodeGroupInfoService.java b/nezha-admin/src/main/java/com/nis/modules/node/service/NodeGroupInfoService.java
deleted file mode 100644
index 7150d85d..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/NodeGroupInfoService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.nis.modules.node.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 节点组信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-public interface NodeGroupInfoService extends IService<NodeGroupInfoEntity> {
-
- List<SystemInfoEntity> getSysNodeGroups();
-
- NodeGroupInfoEntity detail(Long id);
-
- void saveNodeGroupInfo(NodeGroupInfoEntity nodegroupInfo);
-
- boolean groupNameCheck(Long id, String name, Long pid, Long systemId);
-
- void updateNodeGroupInfo(NodeGroupInfoEntity nodegroupInfo);
-
- void delete(Long id);
-
- void deleteNodeRel(Long id, Long[] uuids);
-
- void saveNodeRel(Long id, Long[] uuids);
-
- PageUtils assList(Map<String, Object> params);
-
- boolean isCurrentSystem(Long[] ids);
-
- // 根据当前节点组ID获取包含的节点个数
- Integer getNodeCount(Long id);
-
- // 节点组 分配 / 移除 节点
- void assignNode(Long id, Long[] addUuids, Long[] removeUuids);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/NodeGroupRelService.java b/nezha-admin/src/main/java/com/nis/modules/node/service/NodeGroupRelService.java
deleted file mode 100644
index 1fca87de..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/NodeGroupRelService.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.nis.modules.node.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.node.entity.NodeGroupRelEntity;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 节点节点组关系表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-public interface NodeGroupRelService extends IService<NodeGroupRelEntity> {
-
- List<NodeGroupRelEntity> queryBySystemId(Long id);
-
- Integer queryCount(Long nodeGroupId, String type);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/NodeInfoService.java b/nezha-admin/src/main/java/com/nis/modules/node/service/NodeInfoService.java
deleted file mode 100644
index 1bb8ac95..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/NodeInfoService.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package com.nis.modules.node.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.modules.node.entity.AvailCabinetEntity;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeGroupRelEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 节点信息表
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-public interface NodeInfoService extends IService<NodeInfoEntity> {
- PageUtils queryPage(Map<String, Object> params);
-
- // 节点详情查询
- NodeInfoEntity detail(Long uuid);
-
- // ip 是否重复校验
- R ipCheck(Long uuid, String ip);
-
- // 名称是否重复校验
- boolean nodeNameCheck(Long uuid, String name);
-
- // 节点状态变更 (上线/下线/删除)
- void changeState(Long[] uuids, String state);
-
- // 保存
- void saveNodeInfo(NodeInfoEntity nodeInfoEntity);
-
- // 修改
- void updateNodeInfo(NodeInfoEntity nodeInfoEntity);
-
- // 查询可用可用 机房 下 机柜 的 起始位置
- List<AvailCabinetEntity> selectCab(Long uuid, Integer uSize);
-
- // 查询业务系统的节点列表
- PageUtils queryPageBySystemId(Map<String, Object> params);
-
- void getTagName(List<NodeInfoEntity> nodeInfoEntities);
-
- PageUtils querySelectableNodeBySystemId(Map<String, Object> params);
-
- /**
- * 根据节点UUID 获取所属节点组集合
- * @param uuid
- * @return
- */
- List<NodeGroupRelEntity> getGroupsById(Long uuid);
-
- /**
- * 根据节点的UUID 查询所属业务系统集合
- * @param uuid
- * @return
- */
- List<SystemInfoEntity> querySystemsByUuid(Long uuid);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/NodeRoomService.java b/nezha-admin/src/main/java/com/nis/modules/node/service/NodeRoomService.java
deleted file mode 100644
index e2cbc4e8..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/NodeRoomService.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.nis.modules.node.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.modules.node.entity.NodeRoomEntity;
-
-import java.util.Map;
-
-/**
- * 机房信息表
- *
- * @author shizhendong
- * @date 2019-07-18 09:58:18
- */
-public interface NodeRoomService extends IService<NodeRoomEntity> {
-
- PageUtils queryPage(Map<String, Object> params);
-
- NodeRoomEntity detail(Long id);
-
- void saveNodeRoom(NodeRoomEntity nodeRoom);
-
- boolean roomNameCheck(Long id, String name);
-
- void delete(Long[] ids);
-
- void updateNodeRoom(NodeRoomEntity nodeRoom);
-
- R roomSizeCheck(Long id, Integer roomRows, Integer roomCols);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/SystemNodeRelService.java b/nezha-admin/src/main/java/com/nis/modules/node/service/SystemNodeRelService.java
deleted file mode 100644
index 8d1479cd..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/SystemNodeRelService.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.nis.modules.node.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.modules.node.entity.SystemNodeRelEntity;
-
-/**
- * 业务系统 节点 关联表
- * @author shizhendong
- */
-public interface SystemNodeRelService extends IService<SystemNodeRelEntity> {
- boolean isCurrentSystem(Long [] nodeIds);
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeCabinetServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeCabinetServiceImpl.java
deleted file mode 100644
index b7a643fc..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeCabinetServiceImpl.java
+++ /dev/null
@@ -1,321 +0,0 @@
-package com.nis.modules.node.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.exception.NZException;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.Query;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.node.dao.NodeCabinetDao;
-import com.nis.modules.node.entity.AvailCabinetEntity;
-import com.nis.modules.node.entity.NodeCabinetEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.node.entity.NodeRoomEntity;
-import com.nis.modules.node.service.NodeCabinetService;
-import com.nis.modules.node.service.NodeInfoService;
-import com.nis.modules.node.service.NodeRoomService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-
-
-@Service("nodeCabinetService")
-public class NodeCabinetServiceImpl extends ServiceImpl<NodeCabinetDao, NodeCabinetEntity> implements NodeCabinetService {
-
- // 机房 service
- @Autowired
- private NodeRoomService nodeRoomService;
-
- // 节点 service
- @Autowired
- private NodeInfoService nodeInfoService;
-
- // 机柜 dao
- @Autowired
- private NodeCabinetDao nodeCabinetDao;
-
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
- IPage<NodeCabinetEntity> page = new Query<NodeCabinetEntity>().getPage(params);
- List<NodeCabinetEntity> list = nodeCabinetDao.queryPage(page, params);
- page.setRecords(list);
- return new PageUtils(page);
- }
-
- @Override
- public NodeCabinetEntity detail(Long id) {
- NodeCabinetEntity nodeCabinet = nodeCabinetDao.detail(id);
- if (nodeCabinet == null) {
- throw new NZException(RCode.NODECABINET_NOT_EXISTS);
- }
- return nodeCabinet;
- }
-
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void saveNodeCabinet(NodeCabinetEntity nodeCabinet) {
- // 1. 校验参数
- this.checkParams(nodeCabinet);
-
- // 2. 验证机柜名称是否可用
- if (this.cabNameCheck(null, nodeCabinet.getName(), nodeCabinet.getRoomId())) {
-
- // 3. 判断机房行列是否可用
- NodeCabinetEntity cab = this.getOne(new QueryWrapper<NodeCabinetEntity>()
- .eq("room_id", nodeCabinet.getRoomId())
- .eq("room_row", nodeCabinet.getRoomRow())
- .eq("room_col", nodeCabinet.getRoomCol()));
- if (cab == null) { // 所选机房行列未占用
- nodeCabinet.setOperator(ShiroUtils.getCurrSystemId());
- nodeCabinet.setOpTime(new Date());
- this.save(nodeCabinet);
- } else {
- throw new NZException(RCode.NODEROOM_POSITION_OCCUPIED); // 所选位置已被占用
- }
- } else {
- throw new NZException(RCode.NODECABINET_NAME_DUPLICATE); // 机柜名称重复
- }
- }
-
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void updateNodeCabinet(NodeCabinetEntity nodeCabinet) {
- // 1. 校验参数
- this.checkParams(nodeCabinet);
-
- // 2. 验证机柜名称是否可用
- if (this.cabNameCheck(nodeCabinet.getId(), nodeCabinet.getName(), nodeCabinet.getRoomId())) {
-
- // 3. 判断机房位置是否可用
- NodeCabinetEntity cab = this.getOne(new QueryWrapper<NodeCabinetEntity>()
- .eq("room_id", nodeCabinet.getRoomId())
- .eq("room_row", nodeCabinet.getRoomRow())
- .eq("room_col", nodeCabinet.getRoomCol()));
-
- if (cab == null || nodeCabinet.getId() - cab.getId() == 0) { // 机房行列未被占用 或 修改时没有改变行列
-
- // 4. U位是否可用校验
- R r = this.cabUbitCheck(nodeCabinet.getId(), nodeCabinet.getUbit());
- if (r.get("code").equals(RCode.SUCCESS.getCode())) {
- nodeCabinet.setOperator(ShiroUtils.getCurrSystemId());
- nodeCabinet.setOpTime(new Date());
- this.updateById(nodeCabinet);
- } else {
- throw new NZException(RCode.NODECABINET_UBIT_OCCUPIED); // 机柜U位被占用 修改U位小了
- }
-
- } else {
- throw new NZException(RCode.NODEROOM_POSITION_OCCUPIED); // 所选位置已被占用
- }
-
- } else {
- throw new NZException(RCode.NODECABINET_NAME_DUPLICATE); // 机柜名称重复
- }
- }
-
-
- /**
- * 删除
- *
- * @param ids R
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void delete(Long[] ids) {
- for (Long id : ids) {
- // 1. 判断是否存在关联节点
- int count = nodeInfoService.count(new QueryWrapper<NodeInfoEntity>().eq("cabinet_id", id).ne("state", 3));
- if (count > 0) {
- NodeCabinetEntity cabinet = this.getById(id);
- throw new NZException(cabinet.getName() + " related nodes , not deletable ", 204006);
- }
- }
- // 2. 进行逻辑删除
- this.removeByIds(Arrays.asList(ids));
- }
-
-
- /**
- * 校验U位数量是否可用
- *
- * @param id R
- * @param ubit R
- */
- @Override
- public R cabUbitCheck(Long id, Integer ubit) {
- // 1. 校验机柜是否存在
- NodeCabinetEntity cab = this.getById(id);
- if (cab == null) {
- throw new NZException(RCode.NODECABINET_NOT_EXISTS);
- }
-
- // 2. 根据机柜ID得到其中节点最大存放位置
- List<NodeInfoEntity> list = nodeInfoService.list(new QueryWrapper<NodeInfoEntity>().eq("cabinet_id", id).ne(
- "state", 3).orderByDesc("cabinet_start"));
-
- Integer occPosition = null;
-
- if (list != null && list.size() > 0) {
- occPosition = list.get(0).getCabinetStart() + list.get(0).getuSize() - 1;
- } else {
- return R.ok();
- }
-
- if (ubit >= occPosition) {
- return R.ok();
- } else {
- return R.error(RCode.NODECABINET_UBIT_OCCUPIED).put("data", occPosition);
- }
- }
-
-
- /**
- * 查询机柜可选的机房及行号列号
- *
- * @param id O 添加时为 null 修改时为指定Id
- */
- @Override
- public List<AvailCabinetEntity> optionalRoom(Long id) {
- // 修改机柜的时候
- Long roomId = null;
- Integer roomRow = null;
- Integer roomCol = null;
- if (id != null) { // 修改的情况 需要将位置加入现有位置中
- NodeCabinetEntity cab = this.getById(id);
- if (cab == null) {
- throw new NZException(RCode.NODECABINET_NOT_EXISTS);// 机柜不存在异常
- }
- roomId = cab.getRoomId();
- roomRow = cab.getRoomRow();
- roomCol = cab.getRoomCol();
- }
-
- // 返回对象
- List<AvailCabinetEntity> freePosition = new ArrayList<>();
-
- // 1.0 得到机房列表
- List<NodeRoomEntity> nodeRooms = nodeRoomService.list();
- // 2.0 遍历
- for (NodeRoomEntity entity : nodeRooms) {
-
- AvailCabinetEntity availCabinetEntity = new AvailCabinetEntity();
-
- // 3.0 得到总行列数
- Integer roomRows = entity.getRoomRows();
- Integer roomCols = entity.getRoomCols();
-
- List<Map<String, Object>> list = new ArrayList<>();
- // 4.0 判断行是否可用 列如果占满表示行不可用
- for (int i = 1; i <= roomRows; i++) {
-
- // 根据 机房ID 和 机房行号 得到有多少列在被占用
- int count = this.count(new QueryWrapper<NodeCabinetEntity>().eq("room_id", entity.getId()).eq(
- "room_row", i));
-
- if (id != null && roomId.equals(entity.getId()) && roomRow - i == 0) { // 修改的机柜 在这个机房中 在这一行中
- if (count - roomCols == 0) { // 如果该行已满 但修改仍要找出该位置
- count++; // ++是为了让下面的判断不生效
- }
- }
-
- if (count - roomCols == 0) { // 此行已被占满
- continue;
- }
-
- // 5.0 行是可用 开始查找可用列
- List<Integer> colList = new ArrayList<>();
- for (int j = 1; j <= roomCols; j++) {
- colList.add(j);
- }
- List<Integer> colsByRow = nodeCabinetDao.getColsByRow(entity.getId(), i);
-
- if (id != null && roomId.equals(entity.getId()) && roomRow - i == 0) { // 修改的机柜 在这个机房中 在这一行中
- for (int j = 0; j < colsByRow.size(); j++) {
- if (colsByRow.get(j) - roomCol == 0) {
- colsByRow.remove(j);
- }
- }
- }
-
- colList.removeAll(colsByRow);
-
- Map<String, Object> map = new HashMap<>();
- map.put("roomRow", i); // 可用行
- map.put("roomCols", colList); // 可用列
-
- list.add(map);
- }
-
- availCabinetEntity.setRoomId(entity.getId());
- availCabinetEntity.setRoomName(entity.getName());
- availCabinetEntity.setRoomRows(list);
-
- freePosition.add(availCabinetEntity);
- }
-
- return freePosition;
- }
-
-
- /**
- * 机柜名称校验,同机房下名称不能重复
- *
- * @param id O
- * @param name R
- * @param roomId R
- * @return
- */
- @Override
- public boolean cabNameCheck(Long id, String name, Long roomId) {
-
- // 校验机房是否存在
- NodeRoomEntity nodeRoom = nodeRoomService.getById(roomId);
- if (nodeRoom == null) {
- throw new NZException(RCode.NODEROOM_NOT_EXISTS);
- }
-
- List<NodeCabinetEntity> list = this.list(new QueryWrapper<NodeCabinetEntity>().eq("name", name).eq("room_id", roomId));
- boolean flag = false;
-
- //当只有一个结果并且这个结果是自身时,或没有结果时,说明名称不重复
- if ((list == null || list.size() == 0) ||
- (list != null && list.size() == 1 && list.get(0).getId().equals(id))) {
- flag = true;
- }
- return flag;
- }
-
- /**
- * 参数校验
- * 最小值为1
- * 最大值为机房最大行列
- *
- * @param nodeCabinet
- */
- public void checkParams(NodeCabinetEntity nodeCabinet) {
-
- NodeRoomEntity nodeRoom = nodeRoomService.getById(nodeCabinet.getRoomId());
- // 增加机房校验
- if (nodeRoom == null) {
- throw new NZException(RCode.NODEROOM_NOT_EXISTS);
- }
-
- // 参数不合理 输入的机房行列小于1
- ValidateUtils.is(nodeCabinet.getRoomRow()).notNull(RCode.NODECABINET_ROW_ISNULL)
- .and(nodeCabinet.getRoomRow()).min(1, RCode.NODECABINET_ROW_INCORRECT);
- ValidateUtils.is(nodeCabinet.getRoomCol()).notNull(RCode.NODECABINET_COL_ISNULL)
- .and(nodeCabinet.getRoomCol()).min(1, RCode.NODECABINET_COL_NCORRECT);
-
- // 输入的行列超过机房最大行列数
- ValidateUtils.is(nodeCabinet.getRoomRow()).max(nodeRoom.getRoomRows(), RCode.NODECABINET_ROW_MAXNUM);
- ValidateUtils.is(nodeCabinet.getRoomCol()).max(nodeRoom.getRoomCols(), RCode.NODECABINET_COL_MAXNUM);
- }
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeGroupInfoServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeGroupInfoServiceImpl.java
deleted file mode 100644
index a8fe7825..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeGroupInfoServiceImpl.java
+++ /dev/null
@@ -1,551 +0,0 @@
-package com.nis.modules.node.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.exception.NZException;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.Query;
-import com.nis.common.utils.RCode;
-import com.nis.modules.node.dao.NodeGroupInfoDao;
-import com.nis.modules.node.dao.NodeGroupRelDao;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeGroupRelEntity;
-import com.nis.modules.node.entity.NodeInfoEntity;
-import com.nis.modules.node.service.NodeGroupInfoService;
-import com.nis.modules.node.service.NodeInfoService;
-import com.nis.modules.sys.dao.SystemInfoDao;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import com.nis.modules.sys.service.SystemInfoService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang.ArrayUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.scripting.xmltags.ForEachSqlNode;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-
-
-@Service("nodeGroupInfoService")
-public class NodeGroupInfoServiceImpl extends ServiceImpl<NodeGroupInfoDao, NodeGroupInfoEntity> implements NodeGroupInfoService {
-
- // 节点组 dao
- @Autowired
- private NodeGroupInfoDao nodegroupInfoDao;
-
- // 节点组 节点 关联 service
- @Autowired
- private NodeGroupRelServiceImpl nodeGroupRelService;
-
- // 节点 节点组 关联 dao
- @Autowired
- private NodeGroupRelDao nodeGroupRelDao;
-
- @Autowired
- private SystemInfoDao systemInfoDao;
-
- @Autowired
- private NodeInfoService nodeInfoService;
-
- /**
- * 涉及权限 global下列出所有业务系统和其下节点组,普通业务系统只列出自身的节点组;
- *
- * @return
- */
- @Override
- public List<SystemInfoEntity> getSysNodeGroups() {
- // 进行权限判断 global 权限 看到所有的节点组信息
- if (ShiroUtils.isGlobal()) {
- List<SystemInfoEntity> systemInfoEntities = systemInfoDao.querySystemInfosWithNodeGroup(null);
- for (SystemInfoEntity systemInfoEntity : systemInfoEntities) {
- handleEntity(systemInfoEntity.getNodegroups());
- }
- return systemInfoEntities;
- } else { // 其他权限登录 只能看到自己权限下的节点组信息
- List<SystemInfoEntity> systemInfoEntities = systemInfoDao.querySystemInfosWithNodeGroup(ShiroUtils.getCurrSystemId());
- handleEntity(systemInfoEntities.get(0).getNodegroups());
- return systemInfoEntities;
- }
- }
-
- public void handleEntity(List<NodeGroupInfoEntity> nodegroups) {
- for (NodeGroupInfoEntity entity : nodegroups) {
- if (this.count(new QueryWrapper<NodeGroupInfoEntity>().eq("pid", entity.getId())) < 1) {//证明自己是叶子节点
- entity.setAllowAss("1");
- } else {
- entity.setAllowAss("0");
- }
- //2.2 能否增加子节点组 0不能,1可以 只要跟自己没有直接关联的节点就可以
- if (nodeGroupRelService.count(new QueryWrapper<NodeGroupRelEntity>().eq("group_id", entity.getId())) < 1) {//此节点组下没有关联的节点
- entity.setAllowSub("1");
- } else {
- entity.setAllowSub("0");
- }
- }
- }
-
- @Override
- public NodeGroupInfoEntity detail(Long id) {
- NodeGroupInfoEntity nodegroup = nodegroupInfoDao.detail(id);
- return nodegroup;
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void saveNodeGroupInfo(NodeGroupInfoEntity nodegroupInfo) {
- if (ShiroUtils.isGlobal()) {
- if (nodegroupInfo.getSystemId() == null) {
- nodegroupInfo.setSystemId(ShiroUtils.getCurrSystemId());
- }
- } else {
- nodegroupInfo.setSystemId(ShiroUtils.getCurrSystemId());// 不是gelob 全选 添加就是当前的
- }
- if (this.groupNameCheck(null, nodegroupInfo.getName(), nodegroupInfo.getPid(), nodegroupInfo.getSystemId())) {
- if (Constant.NODEGROUP_TOP_PID.equals(nodegroupInfo.getPid())) { // 如果添加的是顶级节点组
- // 顶级节点组 pid为 0,
- nodegroupInfo.setPids(nodegroupInfo.getPid() + ",");
- } else {
- // 校验父级节点组是否可以添加子节点组
- NodeGroupInfoEntity parentNodeGroup = null;
- List<SystemInfoEntity> sysNodeGroups = this.getSysNodeGroups();
- for (SystemInfoEntity entity : sysNodeGroups) {
- for (NodeGroupInfoEntity nodeGroupInfo : entity.getNodegroups()) {
- if (nodegroupInfo.getPid() - nodeGroupInfo.getId() == 0) {
- parentNodeGroup = nodeGroupInfo;
- break;
- }
- }
- if (parentNodeGroup != null) {
- break;
- }
- }
-
- if (parentNodeGroup == null) {
- throw new NZException(RCode.NODEGROUP_PARENT_NOT_EXISTS); // 上级节点组不存在
- }
-
- if (Constant.NODEGROUP_REFUSE.equals(parentNodeGroup.getAllowSub())) { // 该父节点不可添加子节点组
- throw new NZException(RCode.NODEGROUP_ADD_REFUSE);
- }
-
- // 校验添加的节点组和父级节点组系统一致性
- if (!parentNodeGroup.getSystemId().equals(nodegroupInfo.getSystemId())) {
- throw new NZException(RCode.NODEGROUP_PARENT_SYSTEM_NOT_EQUALS); // 父子级systemId保持一致
- }
-
- // 非顶级节点组情况下 pids的赋值
- NodeGroupInfoEntity parentGroup = this.getById(nodegroupInfo.getPid());
- nodegroupInfo.setPids(parentGroup.getPids() + nodegroupInfo.getPid() + ",");
- }
-
- nodegroupInfo.setOperator(ShiroUtils.getCurrSystemId());
- nodegroupInfo.setOpTime(new Date());
- this.save(nodegroupInfo);
- } else {
- throw new NZException(RCode.NODEGROUP_NAME_DUPLICATE);//节点组名称重复
- }
- }
-
- /**
- * 节点组修改 只能修改节点组的名称
- * id R
- * name R
- * remark O
- *
- * @param nodegroupInfo
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void updateNodeGroupInfo(NodeGroupInfoEntity nodegroupInfo) {
- // 1. 根据当前的ID查到当前数据库对象
- NodeGroupInfoEntity nodeGroup = getById(nodegroupInfo.getId());
- if (nodeGroup == null) {
- throw new NZException(RCode.NODEGROUP_NOT_EXISTS);
- }
- // 业务系统 父级节点 所有父级节点不润许修改
- if (nodegroupInfo.getSystemId() != null && !nodeGroup.getSystemId().equals(nodegroupInfo.getSystemId())) {
- throw new NZException(RCode.NODEGROUP_SYSTEMID_NOT_MODIFIED);
- }
- if (nodegroupInfo.getPid() != null && !nodeGroup.getPid().equals(nodegroupInfo.getPid())) {
- throw new NZException(RCode.NODEGROUP_PARENTID_NOT_MODIFIED);
- }
- if (StringUtils.isNotBlank(nodegroupInfo.getPids()) && !nodeGroup.getPids().equals(nodegroupInfo.getPids())) {
- throw new NZException(RCode.NODEGROUP_PARENTIDS_NOT_MODIFIED);
- }
- nodegroupInfo.setOperator(ShiroUtils.getCurrSystemId());
- nodegroupInfo.setOpTime(new Date());
- // 2. 做名称校验
- if (nodeGroup.getName().equals(nodegroupInfo.getName())) {// 名称没有发生改变
- nodegroupInfoDao.updateById(nodegroupInfo);
- } else {
- if (this.groupNameCheck(nodegroupInfo.getId(), nodegroupInfo.getName(), nodeGroup.getPid(), nodeGroup.getSystemId())) {// 名称不重复
- nodegroupInfoDao.updateById(nodegroupInfo);
- } else {
- throw new NZException(RCode.NODEGROUP_NAME_DUPLICATE);// 节点组名称重复
- }
- }
- }
-
- /**
- * 删掉所有子节点组及其关联节点 逻辑删除
- *
- * @param id
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void delete(Long id) {
- // 1. 查询此节点组和包含的子节点组
- NodeGroupInfoEntity nodegroupInfo = getById(id);
- if (nodegroupInfo == null) { // 没有查询到数据
- throw new NZException(RCode.NODEGROUP_NOT_EXISTS);
- }
- List<NodeGroupInfoEntity> list = list(new QueryWrapper<NodeGroupInfoEntity>().like("pids", nodegroupInfo.getPids() + nodegroupInfo.getId()));
- list.add(nodegroupInfo);
-
- Long[] ids = new Long[list.size()];
- for (int i = 0; i < list.size(); i++) {
- ids[i] = list.get(i).getId();
- }
- // 2. 删除自身 和 子节点组
- nodegroupInfoDao.deleteBatchIds(Arrays.asList(ids));
-
- // 3. 删除关联节点
- nodeGroupRelDao.delete(new QueryWrapper<NodeGroupRelEntity>().in("group_id", ids));
- }
-
- /**
- * 移除对应关系
- *
- * @param id R 节点组 ID
- * @param uuids R 节点UUIDS
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void deleteNodeRel(Long id, Long[] uuids) {
- NodeGroupInfoEntity nodeGroup = this.getById(id);
- if (nodeGroup == null) {
- throw new NZException(RCode.NODEGROUP_NOT_EXISTS);
- }
- nodeGroupRelDao.delete(new QueryWrapper<NodeGroupRelEntity>().in("uuid", uuids).eq("group_id", id));
- }
-
- /**
- * 建立关联关系前 先验证是否重复 重复直接跳过
- *
- * @param id R 节点组 ID
- * @param uuids R 节点UUIDS
- */
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void saveNodeRel(Long id, Long[] uuids) {
-
- List<SystemInfoEntity> sysNodeGroups = this.getSysNodeGroups();
- NodeGroupInfoEntity nodeGroup = null;
- for (SystemInfoEntity entity : sysNodeGroups) {
- for (NodeGroupInfoEntity nodeGroupInfo : entity.getNodegroups()) {
- if (id - nodeGroupInfo.getId() == 0) {
- nodeGroup = nodeGroupInfo;
- break;
- }
- }
- if (nodeGroup != null) {
- break;
- }
- }
- if (nodeGroup == null) {
- throw new NZException(RCode.NODEGROUP_NOT_EXISTS);
- }
- if (Constant.NODEGROUP_REFUSE.equals(nodeGroup.getAllowAss())) { // 节点组不可以分配节点
- throw new NZException(RCode.NODEGROUP_ASSIG_REFUSE);
- }
-
- // 校验节点有效性
- NodeGroupInfoEntity group = this.getById(id);
- Map<String, Object> map = new HashMap<>(1);
- map.put("id", group.getSystemId());
- List<NodeInfoEntity> nodes = (List<NodeInfoEntity>) nodeInfoService.queryPageBySystemId(map).getList();
- for (Long uuid : uuids) {
- boolean flag = false;
- for (NodeInfoEntity node : nodes) {
- if (uuid.equals(node.getUuid())) {
- flag = true;
- break;
- }
- }
- if (!flag) {
- throw new NZException("Nodes with UUID " + uuid + " do not exist group's system", 201014);
- }
- }
-
- /* List<NodeGroupRelEntity> list = new ArrayList<>();
-
- Date now = new Date();
- Long systemId = ShiroUtils.getCurrSystemId();
- for (Long uuid : uuids) {
- int count = nodeGroupRelService.count(new QueryWrapper<NodeGroupRelEntity>().eq("group_id", id).eq("uuid", uuid));
- if (count > 0) {
- continue; // 重复跳过
- }
- list.add(new NodeGroupRelEntity(id, uuid, systemId, now));
- }
-
- // 在此处添加
- if (list != null && list.size() > 0) {
- nodeGroupRelService.saveBatch(list);
- }*/
-
- // 当前节点组和节点关系集合
- List<NodeGroupRelEntity> currentNodeGroupRels = nodeGroupRelService.list(new QueryWrapper<NodeGroupRelEntity>().eq("group_id", id));
-
- // 去重
- Set<Long> addUuidSet = new HashSet(Arrays.asList(uuids));
-
- if (CollectionUtils.isNotEmpty(currentNodeGroupRels)) {
- List<Long> currentNodeGroupRelUuids = new ArrayList<>();
- for (NodeGroupRelEntity entity : currentNodeGroupRels) {
- currentNodeGroupRelUuids.add(entity.getUuid());
- }
- // 重复则不添加
- addUuidSet.addAll(currentNodeGroupRelUuids);
- // 去除当前关系 剩余不重复的
- addUuidSet.removeAll(currentNodeGroupRelUuids);
- }
-
- Date now = new Date();
- Long systemId = ShiroUtils.getCurrSystemId();
-
- List<NodeGroupRelEntity> list = new ArrayList<>();
- for (Long uuid : addUuidSet) {
- list.add(new NodeGroupRelEntity(id, uuid, systemId, now));
- }
- // 入库
- nodeGroupRelService.saveBatch(list);
- }
-
- /**
- * 查询可以分配给指定节点组的节点
- * page O
- * limit O
- * sidx O
- * order O
- * groupId R
- * systemId R
- * ip O
- *
- * @param params
- */
- @Override
- public PageUtils assList(Map<String, Object> params) {
- Integer groupId = Integer.valueOf(params.get("groupId").toString());
- NodeGroupInfoEntity nodeGroup = null;
-
- List<SystemInfoEntity> sysNodeGroups = this.getSysNodeGroups();
- for (SystemInfoEntity entity : sysNodeGroups) {
- for (NodeGroupInfoEntity nodeGroupInfo : entity.getNodegroups()) {
- if (groupId - nodeGroupInfo.getId() == 0) {
- nodeGroup = nodeGroupInfo;
- break;
- }
- }
- if (nodeGroup != null) {
- break;
- }
- }
- if (nodeGroup == null) {
- throw new NZException(RCode.NODEGROUP_NOT_EXISTS);
- }
- if (Constant.NODEGROUP_REFUSE.equals(nodeGroup.getAllowAss())) { // 节点组不可以分配节点
- throw new NZException(RCode.NODEGROUP_ASSIG_REFUSE);
- }
-
- // 校验业务系统有效性
- Long systemId = Long.valueOf(params.get("systemId").toString());
- SystemInfoEntity sysDetail = systemInfoDao.detail(systemId);
- if (sysDetail == null) {
- throw new NZException(RCode.SYS_SYS_NOTEXISTS);// 业务系统不存在
- }
-
- // 校验自身节点组和填写业务系统是否一致
- if (!nodeGroup.getSystemId().equals(systemId)) {
- throw new NZException(RCode.NODEGROUP_NOT_EXISTS_THIS_SYSTEM); // 节点组不在这个业务系统中
- }
-
- IPage<NodeInfoEntity> page = new Query<NodeInfoEntity>().getPage(params);
- List<NodeInfoEntity> assNodeList = baseMapper.assList(page, params);
-
- // 获取tagName
- nodeInfoService.getTagName(assNodeList);
-
- page.setRecords(assNodeList);
- return new PageUtils(page);
- }
-
- /**
- * 节点组名称校验,同父节点下名称不能重复
- *
- * @param id
- * @param name
- * @param pid
- */
- @Override
- public boolean groupNameCheck(Long id, String name, Long pid, Long systemId) {
-
- List<NodeGroupInfoEntity> list = null;
-
- // 顶级的情况下 同业务系统顶级名称不可相同,不同业务系统无限制
- if (Constant.NODEGROUP_TOP_PID.equals(pid)) {
- boolean flag = false;
- list = this.list(new QueryWrapper<NodeGroupInfoEntity>().eq("name", name).eq("pid", Constant.NODEGROUP_TOP_PID));
- if ((list == null || list.size() == 0)) {
- flag = true;
- } else {
- flag = true;
- for (NodeGroupInfoEntity entity : list) {
- if (entity.getName().equals(name) && entity.getSystemId().equals(systemId) && !entity.getId().equals(id)) { // 名称相等并且系统ID相等
- flag = false;
- break;
- }
- }
- }
- return flag;
- } else {
- // 非顶级情况
- NodeGroupInfoEntity parentNodeGroup = this.getById(pid);
- if (parentNodeGroup == null) {
- throw new NZException(RCode.NODEGROUP_PARENT_NOT_EXISTS); // 节点组父级不存在
- }
- list = this.list(new QueryWrapper<NodeGroupInfoEntity>().eq("name", name).eq("pid", pid));
- boolean flag = false;
-
- //当只有一个结果并且这个结果是自身时,或没有结果时,说明名称不重复
- if ((list == null || list.size() == 0) ||
- (list != null && list.size() == 1 && list.get(0).getId().equals(id))) {
- flag = true;
- }
- return flag;
- }
- }
-
- /**
- * @Description 校验节点组是否属于当前业务系统
- * @Author rui
- * @Date 2019/8/13
- * @Param
- * @Return
- * @Exception
- */
- @Override
- public boolean isCurrentSystem(Long[] ids) {
- Long currSystemId = ShiroUtils.getCurrSystemId();
- QueryWrapper<NodeGroupInfoEntity> nodeGroupInfoQueryWrapper = new QueryWrapper<NodeGroupInfoEntity>();
- nodeGroupInfoQueryWrapper.in("id", ids);
- nodeGroupInfoQueryWrapper.ne("system_id", currSystemId);
- List<NodeGroupInfoEntity> list = this.list(nodeGroupInfoQueryWrapper);
-
- return list == null || list.size() < 1;
- }
-
- /**
- * 根据节点组ID 获取包含的节点个数
- *
- * @param id
- * @return
- */
- @Override
- public Integer getNodeCount(Long id) {
- // 判断是否为叶子节点组 暂未
- // 获取当前节点组包含的节点个数
- Integer nodeCount = nodegroupInfoDao.getNodeCount(id);
- return nodeCount;
- }
-
- /**
- * 分配节点 / 移除节点
- *
- * @param id 节点组ID
- * @param addUuids 要维护的节点UUIDS
- * @param removeUuids 要移除的节点UUIDS
- * @return
- */
- @Override
- public void assignNode(Long id, Long[] addUuids, Long[] removeUuids) {
- NodeGroupInfoEntity nodeGroup = this.getById(id);
- if (nodeGroup == null) {
- throw new NZException(RCode.NODEGROUP_NOT_EXISTS);
- }
-
- // 维护
- if (ArrayUtils.isNotEmpty(addUuids)) {
- List<SystemInfoEntity> sysNodeGroups = this.getSysNodeGroups();
- NodeGroupInfoEntity group = null;
- for (SystemInfoEntity entity : sysNodeGroups) {
- for (NodeGroupInfoEntity nodeGroupInfo : entity.getNodegroups()) {
- if (id - nodeGroupInfo.getId() == 0) {
- group = nodeGroupInfo;
- break;
- }
- }
- if (group != null) {
- break;
- }
- }
- if (Constant.NODEGROUP_REFUSE.equals(group.getAllowAss())) { // 节点组不可以分配节点
- throw new NZException(RCode.NODEGROUP_ASSIG_REFUSE);
- }
-
- // 校验节点有效性
- Map<String, Object> map = new HashMap<>();
- map.put("id", nodeGroup.getSystemId());
- List<NodeInfoEntity> nodes = (List<NodeInfoEntity>) nodeInfoService.queryPageBySystemId(map).getList();
- for (Long uuid : addUuids) {
- boolean flag = false;
- for (NodeInfoEntity node : nodes) {
- if (uuid.equals(node.getUuid())) {
- flag = true;
- break;
- }
- }
- if (!flag) {
- throw new NZException("Nodes with UUID " + uuid + " do not exist group's system", 201014);
- }
- }
-
- // 当前节点组和节点关系集合
- List<NodeGroupRelEntity> currentNodeGroupRels = nodeGroupRelService.list(new QueryWrapper<NodeGroupRelEntity>().eq("group_id", id));
-
- // 去重
- Set<Long> addUuidSet = new HashSet(Arrays.asList(addUuids));
-
- if (CollectionUtils.isNotEmpty(currentNodeGroupRels)) {
- List<Long> currentNodeGroupRelUuids = new ArrayList<>();
- for (NodeGroupRelEntity entity : currentNodeGroupRels) {
- currentNodeGroupRelUuids.add(entity.getUuid());
- }
- // 重复则不添加
- addUuidSet.addAll(currentNodeGroupRelUuids);
- // 去除当前关系 剩余不重复的
- addUuidSet.removeAll(currentNodeGroupRelUuids);
- }
-
- Date now = new Date();
- Long systemId = ShiroUtils.getCurrSystemId();
-
- List<NodeGroupRelEntity> list = new ArrayList<>();
- for (Long uuid : addUuidSet) {
- list.add(new NodeGroupRelEntity(id, uuid, systemId, now));
- }
- // 入库
- nodeGroupRelService.saveBatch(list);
- }
-
- // 移除
- if (ArrayUtils.isNotEmpty(removeUuids)) {
- nodeGroupRelDao.delete(new QueryWrapper<NodeGroupRelEntity>().in("uuid", removeUuids).eq("group_id", id));
- }
- }
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeGroupRelServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeGroupRelServiceImpl.java
deleted file mode 100644
index c5786f7a..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeGroupRelServiceImpl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.nis.modules.node.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.modules.node.dao.NodeGroupRelDao;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeGroupRelEntity;
-import com.nis.modules.node.service.NodeGroupRelService;
-
-import java.util.List;
-
-import org.springframework.stereotype.Service;
-
-/**
- * 节点 节点组关系表
- * @author shizhendong
- */
-@Service("nodeGroupRelService")
-public class NodeGroupRelServiceImpl extends ServiceImpl<NodeGroupRelDao, NodeGroupRelEntity> implements NodeGroupRelService {
-
- @Override
- public List<NodeGroupRelEntity> queryBySystemId(Long id) {
- List<NodeGroupRelEntity> queryBySystemId = baseMapper.queryBySystemId(id);
- return queryBySystemId;
- }
-
-
- /**
- * @Description 查询单个节点组下,某种类型节点的数量
- * @Author rui
- * @Date 2019/9/2
- * @Param nodeGroupId 节点组id type 节点的类型
- * @Return
- * @Exception
- */
- @Override
- public Integer queryCount(Long nodeGroupId,String type){
- return this.baseMapper.queryCountByGroupId(nodeGroupId, type);
- }
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeInfoServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeInfoServiceImpl.java
deleted file mode 100644
index 3c54f45f..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeInfoServiceImpl.java
+++ /dev/null
@@ -1,852 +0,0 @@
-package com.nis.modules.node.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.exception.NZException;
-import com.nis.common.utils.*;
-import com.nis.modules.node.dao.NodeGroupRelDao;
-import com.nis.modules.node.dao.NodeInfoDao;
-import com.nis.modules.node.dao.NodeRoomDao;
-import com.nis.modules.node.entity.*;
-import com.nis.modules.node.service.*;
-import com.nis.modules.node.util.IpCovert;
-import com.nis.modules.sys.dao.SystemInfoDao;
-import com.nis.modules.sys.entity.SysDictEntity;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import com.nis.modules.sys.service.SysDictService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import com.sun.org.apache.xalan.internal.lib.NodeInfo;
-import oracle.net.aso.s;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang.ArrayUtils;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-
-@Service("nodeInfoService")
-public class NodeInfoServiceImpl extends ServiceImpl<NodeInfoDao, NodeInfoEntity> implements NodeInfoService {
-
- // 节点 dao
- @Autowired
- private NodeInfoDao nodeInfoDao;
-
- // 节点 节点组 关联 关系
- @Autowired
- private NodeGroupRelDao nodeGroupRelDao;
-
- // 业务系统 节点 关联 关系
- @Autowired
- private SystemNodeRelService systemNodeRelService;
-
- // 节点组service
- @Autowired
- private NodeGroupInfoService nodeGroupInfoService;
-
- @Autowired
- private NodeRoomDao nodeRoomDao;
-
- // 字典service
- @Autowired
- private SysDictService sysDictService;
-
- // 机柜service
- @Autowired
- private NodeCabinetService nodeCabinetService;
-
- @Autowired
- private NodeGroupRelService nodeGroupRelService;
-
- @Autowired
- private SystemInfoDao systemInfoDao;
-
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
-
- // 获取当前业务系统 ID
- Long systemId = ShiroUtils.getCurrSystemId();
- params.put("systemId", systemId);
-
- // 1. groupId 存在 以 group 关联 为主
- IPage<NodeInfoEntity> page = new Query<NodeInfoEntity>().getPage(params);
- if (StringUtils.isNotBlank((String) params.get("groupId"))) {
- // 1.1 查询出选中节点组的子节点组的ID
- Long groupId = Long.valueOf(params.get("groupId").toString());
- NodeGroupInfoEntity nodeGroup = nodeGroupInfoService.getOne(new QueryWrapper<NodeGroupInfoEntity>().eq("id", groupId));
-
- if (nodeGroup == null) {
- throw new NZException(RCode.NODEGROUP_NOT_EXISTS);
- }
-
- // 1.2 获取包含的子节点组
- List<NodeGroupInfoEntity> childe = nodeGroupInfoService.list(new QueryWrapper<NodeGroupInfoEntity>().like("pids", nodeGroup.getPids() + nodeGroup.getId()));
- childe.add(nodeGroup);
- Long[] groupdIds = new Long[childe.size()];
- for (int i = 0; i < childe.size(); i++) {
- groupdIds[i] = childe.get(i).getId();
- }
- List<NodeInfoEntity> nodeInfoEntities = nodeInfoDao.selectListByGroups(page, params, groupdIds);
- // 1.3 获取 tagName 的值
- this.getTagName(nodeInfoEntities);
- page.setRecords(nodeInfoEntities);
- return new PageUtils(page);
- }
-
- // 2. 节点自身的过滤 包含机房
- List<NodeInfoEntity> nodeInfoEntities = nodeInfoDao.selectListByRoomId(page, params);
- // 获取 tagName 的值
- this.getTagName(nodeInfoEntities);
- page.setRecords(nodeInfoEntities);
- return new PageUtils(page);
- }
-
- @Override
- public void getTagName(List<NodeInfoEntity> nodeInfoEntities) {
- Map<String, Object> map = new HashMap();
- map.put("type", Constant.DICT_NODE_TAG_TYPE + Constant.NODE_TYPE_SERVER); // 节点类型为 server
- List<SysDictEntity> serverTags = sysDictService.queryList(map);
-
- map.put("type", Constant.DICT_NODE_TAG_TYPE + Constant.NODE_TYPE_NET); // 节点类型为 Net
- List<SysDictEntity> netTags = sysDictService.queryList(map);
-
- for (NodeInfoEntity nodeInfo : nodeInfoEntities) {
- if (Constant.NODE_TYPE_SERVER.equals(nodeInfo.getType())) { // 节点类型为 server
- for (SysDictEntity entity : serverTags) {
- if (entity.getCode().equals(nodeInfo.getTag())) {
- nodeInfo.setTagName(entity.getValue());
- break;
- }
- }
- } else if (Constant.NODE_TYPE_NET.equals(nodeInfo.getType())) { // 节点类型为 net
- for (SysDictEntity entity : netTags) {
- if (entity.getCode().equals(nodeInfo.getTag())) {
- nodeInfo.setTagName(entity.getValue());
- break;
- }
- }
- } else {
- throw new NZException("Nodes with UUID " + nodeInfo.getUuid() + " type not found", 201012);
- }
- }
- }
-
- // 节点详情查询
- @Override
- public NodeInfoEntity detail(Long uuid) {
- NodeInfoEntity nodeInfoEntity = nodeInfoDao.detail(uuid);
- if (nodeInfoEntity == null) {
- throw new NZException(RCode.NODE_NOT_EXISTS);
- }
-
- String tag = nodeInfoEntity.getTag();
- Map<String, Object> map = new HashMap();
-
- if (Constant.NODE_TYPE_SERVER.equals(nodeInfoEntity.getType())) {
- map.put("type", Constant.DICT_NODE_TAG_TYPE + Constant.NODE_TYPE_SERVER); // 节点类型为 server
- } else if (Constant.NODE_TYPE_NET.equals(nodeInfoEntity.getType())) {
- map.put("type", Constant.DICT_NODE_TAG_TYPE + Constant.NODE_TYPE_NET); // 节点类型为 Net
- } else {
- throw new NZException(RCode.NODE_TYPE_NOTFOUND); // 节点类型未找到
- }
-
- // tag 值不是必须的 ,在tag值存在的时候进行校验
- if (tag != null && StringUtils.isNotBlank(tag)) {
- List<SysDictEntity> sysDictEntities = sysDictService.queryList(map);
- boolean flag = false;
- for (SysDictEntity entity : sysDictEntities) {
- if (tag.equals(entity.getCode())) {
- nodeInfoEntity.setTagName(entity.getValue());
- flag = true;
- break;
- }
- }
- if (!flag) {
- throw new NZException(RCode.NODE_TAG_NOTFOUND);
- }
- }
-
- if (nodeInfoEntity != null && StringUtils.isNotBlank(nodeInfoEntity.getPassword())) {
- nodeInfoEntity.setPassword(new String(Base64.getDecoder().decode(nodeInfoEntity.getPassword())));
- }
- return nodeInfoEntity;
- }
-
- // IP校验,分三种情况:1.校验不通过;2.校验通过;3.ip已在其他业务系统里存在,此时返回node实体,询问用户是否关联;
- @Override
- public R ipCheck(Long uuid, String ip) {
- if (ShiroUtils.isGlobal()) { // global
- if (checkFieldExist(uuid, "ip", ip)) { // 通过
- return R.ok();
- } else { // 不通过
- return R.error(RCode.NODE_IPADDRESS_DUPLICATE);
- }
- } else { // 当前业务系统
- if (checkFieldExist(uuid, "ip", ip)) { // 通过
- return R.ok();
- } else { // 其他业务系统已存在 返回详情
- NodeInfoEntity node = this.getOne(new QueryWrapper<NodeInfoEntity>().eq("ip", ip).ne("state", 3));
- NodeInfoEntity nodeDetail = this.detail(node.getUuid());
- List<SystemInfoEntity> systemInfo = nodeDetail.getSystemInfo();
- for (SystemInfoEntity entity : systemInfo) {
- if (entity.getId().equals(ShiroUtils.getCurrSystemId())) {
- return R.error(RCode.NODE_IPADDRESS_DUPLICATE); // 本系统已存在该IP
- }
- }
- return R.ok(nodeDetail);
- }
- }
- }
-
- // 名称是否重复校验
- @Override
- public boolean nodeNameCheck(Long uuid, String name) {
- return checkFieldExist(uuid, "name", name);
- }
-
- public boolean checkFieldExist(Long uuid, String column, String colValue) {
- List<NodeInfoEntity> list = this.list(new QueryWrapper<NodeInfoEntity>().eq(column, colValue).ne("state", 3));
- boolean flag = false;
-
- if (list == null || list.size() == 0 || (list != null && list.size() == 1 && list.get(0).getUuid().equals(uuid))) {
- flag = true;
- }
- return flag;
- }
-
- // 节点状态变更 (上线/下线/删除)
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void changeState(Long[] uuids, String state) {
- nodeInfoDao.changeState(uuids, state);
- if ("3".equals(state)) { // 删除节点
-
- // 1. 逻辑删除 和 节点组 之间的关系
- nodeGroupRelDao.delete(new QueryWrapper<NodeGroupRelEntity>().in("uuid", uuids));
-
- // 2. 逻辑删除 和 业务系统 之间的关系
- systemNodeRelService.remove(new QueryWrapper<SystemNodeRelEntity>().in("uuid", uuids));
- }
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void saveNodeInfo(NodeInfoEntity nodeInfoEntity) {
- if (ShiroUtils.isGlobal()) {
- // 校验IP
- if (this.checkFieldExist(null, "ip", nodeInfoEntity.getIp())) {
-
- // 正常入库流程
- saveNode(nodeInfoEntity);
-
- // 校验是否已经存在关联关系
- SystemNodeRelEntity entity = systemNodeRelService.getOne(new QueryWrapper<SystemNodeRelEntity>().eq(
- "system_id",
- Constant.GLOBAL_ID).eq("uuid", nodeInfoEntity.getUuid()));
- if (entity != null) {
- throw new NZException(RCode.NODE_SYSTEM_REL_EXISTS); // 节点和业务系统已经关联
- }
-
- Date now = new Date();
- Long systemId = ShiroUtils.getCurrSystemId();
-
- // 节点业务系统关联实体集合
- List<SystemNodeRelEntity> sysRelList = new ArrayList<>();
- // 添加节点和global的关系
- sysRelList.add(new SystemNodeRelEntity(Constant.GLOBAL_ID, nodeInfoEntity.getUuid(), systemId, now));
-
- // 1.判断是否选择节点组
- if (CollectionUtils.isNotEmpty(nodeInfoEntity.getGroups())) {
-
- List<NodeGroupRelEntity> groupRelList = new ArrayList<>();
-
- for (NodeGroupInfoEntity group : nodeInfoEntity.getGroups()) {
- groupRelList.add(new NodeGroupRelEntity(group.getId(), nodeInfoEntity.getUuid(), systemId, now));
- sysRelList.add(new SystemNodeRelEntity(group.getSystemId(), nodeInfoEntity.getUuid(), systemId, now));
- }
-
- if (CollectionUtils.isNotEmpty(groupRelList)) {
- nodeGroupRelService.saveBatch(groupRelList);
- }
- }
-
- // 2.判断是否选择了业务系统
- if (CollectionUtils.isNotEmpty(nodeInfoEntity.getSystems())) {
- for (SystemInfoEntity systemInfo : nodeInfoEntity.getSystems()) {
- sysRelList.add(new SystemNodeRelEntity(systemInfo.getId(), nodeInfoEntity.getUuid(), systemId, now));
- }
- }
-
- // 去重 根据 systemId
- Set systemRels = new HashSet(sysRelList);
-
- // 维护关系
- systemNodeRelService.saveBatch(systemRels);
- } else {
- // ip 已存在 抛异常
- throw new NZException(RCode.NODE_IPADDRESS_DUPLICATE);
- }
- } else {
- // 校验IP
- if (this.checkFieldExist(null, "ip", nodeInfoEntity.getIp())) {
-
- // 正常入库流程
- saveNode(nodeInfoEntity);
-
- Long systemId = ShiroUtils.getCurrSystemId();
- // 校验是否已经存在关联关系
- SystemNodeRelEntity entity = systemNodeRelService.getOne(new QueryWrapper<SystemNodeRelEntity>().eq(
- "system_id", systemId).eq("uuid", nodeInfoEntity.getUuid()));
- if (entity != null) {
- throw new NZException(RCode.NODE_SYSTEM_REL_EXISTS); // 节点和业务系统已经关联
- }
- // 维护系统中间表 维护global 和 自身业务系统 关系
- List<SystemNodeRelEntity> list = new ArrayList<>();
-
- Date date = new Date();
- SystemNodeRelEntity currSystem = new SystemNodeRelEntity(systemId, nodeInfoEntity.getUuid(), systemId
- , date);
- SystemNodeRelEntity global = new SystemNodeRelEntity(Constant.GLOBAL_ID, nodeInfoEntity.getUuid(), systemId, date);
- list.add(currSystem);
- list.add(global);
- systemNodeRelService.saveBatch(list);
- } else {
-
- // 如果此节点和自身业务系统存在关系 则不让添加
- NodeInfoEntity node = this.getOne(new QueryWrapper<NodeInfoEntity>().eq("ip", nodeInfoEntity.getIp()).ne("state", 3));
- List<SystemNodeRelEntity> systemInfo = systemNodeRelService.list(new QueryWrapper<SystemNodeRelEntity>().eq("uuid", node.getUuid()));
- for (SystemNodeRelEntity entity : systemInfo) {
- if (entity.getSystemId() - ShiroUtils.getCurrSystemId() == 0) {
- throw new NZException(RCode.NODE_SYSTEM_REL_EXISTS); // 节点和业务系统已经关联
- }
- }
- // ip已经存在 和自身没有关联 则建立关联
- SystemNodeRelEntity nodeRelEntity = new SystemNodeRelEntity(ShiroUtils.getCurrSystemId(), node.getUuid(),
- ShiroUtils.getCurrSystemId(), new Date());
- systemNodeRelService.save(nodeRelEntity);
-
- // 如果选择了节点组 则维护和节点组的关系
- if (CollectionUtils.isNotEmpty(nodeInfoEntity.getGroups())) {
- // 1. 维护和节点组的关联关系
- List<NodeGroupRelEntity> groupRelList = new ArrayList<>();
-
- for (NodeGroupInfoEntity group : nodeInfoEntity.getGroups()) {
- groupRelList.add(new NodeGroupRelEntity(group.getId(), node.getUuid(), ShiroUtils.getCurrSystemId(), new Date()));
- }
- // 2.在此处批量添加
- if (CollectionUtils.isNotEmpty(groupRelList)) {
- nodeGroupRelService.saveBatch(groupRelList);
- }
- }
- }
- }
- }
-
- // 添加节点正常操作 名称校验 机柜校验 密码加密 入库 并返回当前的UUID序列值
- @Transactional(rollbackFor = Exception.class)
- public void saveNode(NodeInfoEntity nodeInfoEntity) {
- // 1. 名称校验
- if (this.nodeNameCheck(null, nodeInfoEntity.getName())) {
-
- //2. 校验可用机柜
- if (nodeInfoEntity.getCabinetId() != null && nodeInfoEntity.getCabinetId() > 0) { // 指定了机柜的情况
-
- NodeCabinetEntity cab = nodeCabinetService.getById(nodeInfoEntity.getCabinetId());
- if (cab == null) {
- throw new NZException(RCode.NODECABINET_NOT_EXISTS);
- }
-
- // 查询该机柜的可选起始位置
- List<Integer> starts = this.checkPosition(nodeInfoEntity);
- if (starts == null) {
- throw new NZException(RCode.NODECABINET_NOT_HAVE_POSITION); // 所选机柜 U位已被占用 或 不存在该位置
- }
- if (nodeInfoEntity.getCabinetStart() == null) {
- throw new NZException(RCode.NODE_USTART_ISNULL);
- }
- if (starts.size() > 0 && !starts.contains(nodeInfoEntity.getCabinetStart())) {
- throw new NZException(RCode.NODE_USTART_OCCUPIED); // 所选机柜 U位已被占用 或 不存在该位置
- }
- } else { // 没有指定机柜的情况 不可以填写起始位置
- if (nodeInfoEntity.getCabinetStart() != null) {
- throw new NZException(RCode.NODECABINET_ID_ISNULL); // 指定机柜起始位置,需要指定机柜ID
- }
- }
-
- // 校验节点类型和节点标签
- this.checkTypeAndTag(nodeInfoEntity);
-
- //3. IP地址转换 IP整数
- nodeInfoEntity.setIpLong(IpCovert.ipToLong(nodeInfoEntity.getIp()));
- if (nodeInfoEntity.getPassword() != null && StringUtils.isNotBlank(nodeInfoEntity.getPassword())) {
- //4. 密码加密 base64
- nodeInfoEntity.setPassword(Base64.getEncoder().encodeToString(nodeInfoEntity.getPassword().getBytes()));
- }
- nodeInfoEntity.setOperator(ShiroUtils.getCurrSystemId());
- nodeInfoEntity.setOpTime(new Date());
-
- //5. 入库
- nodeInfoDao.save(nodeInfoEntity);
- } else {
- throw new NZException(RCode.NODE_NAME_DUPLICATE);// 名称重复
- }
- }
-
- // 校验节点类型和节点标签
- public void checkTypeAndTag(NodeInfoEntity nodeInfoEntity) {
- Map<String, Object> map = new HashMap();
-
- if (Constant.NODE_TYPE_SERVER.equals(nodeInfoEntity.getType())) {
- map.put("type", Constant.DICT_NODE_TAG_TYPE + Constant.NODE_TYPE_SERVER); // 节点类型为 server
- if (nodeInfoEntity.getSnmpPort() != null) {
- throw new NZException(RCode.NODE_SERVER_CANNOT_HAVE_SNMPPORT);
- }
- if (nodeInfoEntity.getSnmpCommunity() != null) {
- throw new NZException(RCode.NODE_SERVER_CANNOT_HAVE_SNMPCOMMUNITY);
- }
- } else if (Constant.NODE_TYPE_NET.equals(nodeInfoEntity.getType())) {
- map.put("type", Constant.DICT_NODE_TAG_TYPE + Constant.NODE_TYPE_NET); // 节点类型为 Net
- if (nodeInfoEntity.getSnmpPort() == null) {
- nodeInfoEntity.setSnmpPort(161);
- }
- if (StringUtils.isBlank(nodeInfoEntity.getSnmpCommunity())) {
- nodeInfoEntity.setSnmpCommunity("public");
- }
- } else {
- throw new NZException(RCode.NODE_TYPE_NOTFOUND); // 节点类型未找到
- }
-
- // 如果存在tag则校验tag是否存在
- if (nodeInfoEntity.getTag() != null && StringUtils.isNotBlank(nodeInfoEntity.getTag())) {
- // 得到相应的tag 集合
- List<SysDictEntity> sysDictEntities = sysDictService.queryList(map);
- boolean flag = false;
- for (SysDictEntity entity : sysDictEntities) {
- if (entity.getCode().equals(nodeInfoEntity.getTag())) {
- flag = true;
- break;
- }
- }
- if (!flag) {
- throw new NZException(RCode.NODE_TAG_NOTFOUND); // 节点标签未找到
- }
- }
- }
-
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void updateNodeInfo(NodeInfoEntity nodeInfoEntity) {
- if (ShiroUtils.isGlobal()) { // global 系统下
- // 1.校验IP
- if (this.checkFieldExist(nodeInfoEntity.getUuid(), "ip", nodeInfoEntity.getIp())) {
- // 正常修改操作
- this.updateNode(nodeInfoEntity);
-
- Date now = new Date();
- Long systemId = ShiroUtils.getCurrSystemId();
-
- // 当前关联的节点组
- List<NodeGroupRelEntity> currRelList = nodeGroupRelService.list(new QueryWrapper<NodeGroupRelEntity>().eq("uuid", nodeInfoEntity.getUuid()));
-
- // 节点业务系统关联实体集合
- List<SystemNodeRelEntity> sysRelList = new ArrayList<>();
- // 添加节点和global的关系
- sysRelList.add(new SystemNodeRelEntity(Constant.GLOBAL_ID, nodeInfoEntity.getUuid(), systemId, now));
-
- // 判断是否选择节点组 1. 原来没有节点组,选择了节点组 2.原来有节点组 删除了
- if (CollectionUtils.isNotEmpty(nodeInfoEntity.getGroups()) || CollectionUtils.isNotEmpty(currRelList)) {
-
- // 先删除
- nodeGroupRelService.remove(new QueryWrapper<NodeGroupRelEntity>().eq("uuid", nodeInfoEntity.getUuid()));
-
- if (CollectionUtils.isNotEmpty(nodeInfoEntity.getGroups())) {
- // 再添加
- List<NodeGroupRelEntity> groupRelList = new ArrayList<>();
-
- for (NodeGroupInfoEntity group : nodeInfoEntity.getGroups()) {
- groupRelList.add(new NodeGroupRelEntity(group.getId(), nodeInfoEntity.getUuid(), systemId, now));
- sysRelList.add(new SystemNodeRelEntity(group.getSystemId(), nodeInfoEntity.getUuid(), systemId, now));
- }
-
- nodeGroupRelService.saveBatch(groupRelList);
- }
- }
-
- // 2. 判断业务系统
- if (CollectionUtils.isNotEmpty(nodeInfoEntity.getSystems())) {
- for (SystemInfoEntity systemInfo : nodeInfoEntity.getSystems()) {
- sysRelList.add(new SystemNodeRelEntity(systemInfo.getId(), nodeInfoEntity.getUuid(), systemId, now));
- }
- }
-
- // 去重 根据 systemId
- Set systemRels = new HashSet(sysRelList);
-
- // 先删除
- systemNodeRelService.remove(new QueryWrapper<SystemNodeRelEntity>().eq("uuid", nodeInfoEntity.getUuid()));
-
- // 再维护关系
- systemNodeRelService.saveBatch(systemRels);
-
- } else {
- // ip 已存在 抛异常
- throw new NZException(RCode.NODE_IPADDRESS_DUPLICATE);
- }
- } else {
- // 校验IP
- if (this.checkFieldExist(nodeInfoEntity.getUuid(), "ip", nodeInfoEntity.getIp())) {
- // 正常修改操作
- this.updateNode(nodeInfoEntity);
-
- // 获取本系统的节点组
- List<SystemInfoEntity> systemInfoEntities = systemInfoDao.querySystemInfosWithNodeGroup(ShiroUtils.getCurrSystemId());
- List<NodeGroupInfoEntity> nodegroups = new ArrayList<>();
- if (CollectionUtils.isNotEmpty(systemInfoEntities)) {
- SystemInfoEntity systemInfoEntity = systemInfoEntities.get(0);
- nodegroups = systemInfoEntity.getNodegroups();
- }
- List<Long> groupIds = new ArrayList<>();
- if (CollectionUtils.isNotEmpty(nodegroups)) {
- for (NodeGroupInfoEntity group : nodegroups) {
- groupIds.add(group.getId());
- }
- }
- // 当前和此节点关联的节点组
- List<NodeGroupRelEntity> currRelList = new ArrayList<>();
- if (CollectionUtils.isNotEmpty(groupIds)) {
- currRelList = nodeGroupRelService.list(new QueryWrapper<NodeGroupRelEntity>().eq("uuid", nodeInfoEntity.getUuid()).in("group_id", groupIds));
- }
-
- // 判断是否选择节点组 1. 原来没有节点组,选择了节点组 2.原来有节点组 删除了
- if (CollectionUtils.isNotEmpty(nodeInfoEntity.getGroups()) || CollectionUtils.isNotEmpty(currRelList)) {
- // 先删除此节点选中本系统内的节点组
- if (CollectionUtils.isNotEmpty(groupIds)) {
- // 删除本系统内关联的节点组
- nodeGroupRelService.remove(new QueryWrapper<NodeGroupRelEntity>().eq("uuid", nodeInfoEntity.getUuid()).in("group_id", groupIds));
- }
-
- // 再添加
- if (CollectionUtils.isNotEmpty(nodeInfoEntity.getGroups())) {
- List<NodeGroupRelEntity> groupRelList = new ArrayList<>();
-
- for (NodeGroupInfoEntity group : nodeInfoEntity.getGroups()) {
- groupRelList.add(new NodeGroupRelEntity(group.getId(), nodeInfoEntity.getUuid(), ShiroUtils.getCurrSystemId(), new Date()));
- }
- nodeGroupRelService.saveBatch(groupRelList);
- }
- }
- } else {
- // 维护关系 IP在其他业务系统存在的情况
- NodeInfoEntity node = this.getOne(new QueryWrapper<NodeInfoEntity>().eq("ip", nodeInfoEntity.getIp()).ne("state", 3));
- List<SystemNodeRelEntity> systemInfo = systemNodeRelService.list(new QueryWrapper<SystemNodeRelEntity>().eq("uuid", node.getUuid()));
- for (SystemNodeRelEntity entity : systemInfo) {
- if (entity.getSystemId() - ShiroUtils.getCurrSystemId() == 0) {
- throw new NZException(RCode.NODE_SYSTEM_REL_EXISTS); // 节点和业务系统已经关联
- }
- }
- // ip已经存在 和自身没有关联 则建立关联
- SystemNodeRelEntity nodeRelEntity = new SystemNodeRelEntity(ShiroUtils.getCurrSystemId(), node.getUuid(),
- ShiroUtils.getCurrSystemId(), new Date());
- systemNodeRelService.save(nodeRelEntity);
-
- // 如果选择了节点组 则维护关系 这种情况肯定没有选择当前业务系统的节点组 有的话就存在该系统 不会产生此情况
- if (CollectionUtils.isNotEmpty(nodeInfoEntity.getGroups())) {
- List<NodeGroupRelEntity> groupRelList = new ArrayList<>();
- for (NodeGroupInfoEntity group : nodeInfoEntity.getGroups()) {
- groupRelList.add(new NodeGroupRelEntity(group.getId(), nodeInfoEntity.getUuid(), ShiroUtils.getCurrSystemId(), new Date()));
- }
- nodeGroupRelService.saveBatch(groupRelList);
- }
- }
- }
- }
-
- // 正常修改流程
- public void updateNode(NodeInfoEntity nodeInfoEntity) {
- if (this.nodeNameCheck(nodeInfoEntity.getUuid(), nodeInfoEntity.getName())) {
-
- // 1. 校验可用机柜
- if (nodeInfoEntity.getCabinetId() != null && nodeInfoEntity.getCabinetId() > 0) { // 指定了 机柜
- // 指定机柜的情况下 必须指定机柜起始位置
- if (nodeInfoEntity.getCabinetStart() == null) {
- throw new NZException(RCode.NODE_USTART_ISNULL);
- }
-
- NodeCabinetEntity cab = nodeCabinetService.getById(nodeInfoEntity.getCabinetId());
- if (cab == null) {
- throw new NZException(RCode.NODECABINET_NOT_EXISTS);
- }
-
- // 2.查询该机柜的可选起始位置
- List<Integer> starts = this.checkPosition(nodeInfoEntity);
-
- if (starts == null) {
- throw new NZException(RCode.NODECABINET_NOT_HAVE_POSITION); // 所选机柜 U位已被占用 或 不存在该位置
- }
- if (!starts.contains(nodeInfoEntity.getCabinetStart())) {
- throw new NZException(RCode.NODE_USTART_OCCUPIED); // 所选机柜 U位已被占用 或 不存在该位置
- }
- }
-
- // 校验节点类型和标签是否正确
- this.checkTypeAndTag(nodeInfoEntity);
-
- //3 IP地址转换 IP整数
- Date now = new Date();
- Long systemId = ShiroUtils.getCurrSystemId();
- nodeInfoEntity.setIpLong(IpCovert.ipToLong(nodeInfoEntity.getIp()));
- //4. 密码加密 base64
- if (nodeInfoEntity.getPassword() != null && StringUtils.isNotBlank(nodeInfoEntity.getPassword())) {
- nodeInfoEntity.setPassword(Base64.getEncoder().encodeToString(nodeInfoEntity.getPassword().getBytes()));
- }
- nodeInfoEntity.setOperator(systemId);
- nodeInfoEntity.setOpTime(now);
-
- //5. 入库
- update(nodeInfoEntity, new UpdateWrapper<NodeInfoEntity>().eq("uuid", nodeInfoEntity.getUuid()));
- } else {
- throw new NZException(RCode.NODE_NAME_DUPLICATE);// 名称重复
- }
- }
-
- // 添加修改时根据 指定的USize获取可用位置的集合
- public List<Integer> checkPosition(NodeInfoEntity nodeInfoEntity) {
- if (nodeInfoEntity.getuSize() != null && nodeInfoEntity.getuSize() > 0) { // 指定机柜 且 指定U位正确情况下
- List<AvailCabinetEntity> availCabinetEntities = this.selectCab(nodeInfoEntity.getUuid(), nodeInfoEntity.getuSize());
- for (AvailCabinetEntity entity : availCabinetEntities) {
- for (NodeCabinetEntity cab : entity.getCabinets()) {
- if (cab.getId() - nodeInfoEntity.getCabinetId() == 0) {
- return cab.getStarts();
- }
- }
- }
- } else {
- throw new NZException(RCode.NODE_USIZE_NOTTRUE); // U位不正确
- }
- return null;
- }
-
- /**
- * 查询可用机柜 返回机房 机柜 和 可用下标
- *
- * @param uuid O
- * @param uSize R
- * @return
- */
- @Override
- public List<AvailCabinetEntity> selectCab(Long uuid, Integer uSize) {
- //定义返回集合
- List<AvailCabinetEntity> retAvailCabs = new ArrayList<>();
-
- // 1.0 得到所有机房 有机柜的机房
- List<NodeRoomEntity> nodeRooms = nodeRoomDao.queryRoomCabinets();
-
- // 所有包含节点的机房
- List<NodeRoomEntity> list = nodeRoomDao.queryRoomsNodes();
-
- Map<Long, List<NodeInfoEntity>> map = new HashMap<>();
- for (NodeRoomEntity entity : list) { // 占用节点的机房集合
- if (entity != null && entity.getCabinets() != null && entity.getCabinets().size() > 0) {// 找到占用节点的机柜信息
- for (NodeCabinetEntity cab : entity.getCabinets()) {
- map.put(cab.getId(), cab.getNodes());
- }
- }
- }
-
- for (NodeRoomEntity entity : nodeRooms) {
- for (NodeCabinetEntity cab : entity.getCabinets()) {
- List<NodeInfoEntity> nodeInfoEntities = map.get(cab.getId());
- if (nodeInfoEntities != null && nodeInfoEntities.size() > 0) {// 该机柜中存在节点
- cab.setNodes(nodeInfoEntities);
- }
- }
- }
-
- Long cabinetId = null;
- if (uuid != null) { // 修改的情况 需要将自身节点补充到所属机柜的位置中去 再次重新计算可用位置
- NodeInfoEntity updateNodeInfo = this.getOne(new QueryWrapper<NodeInfoEntity>().eq("uuid", uuid).ne("state", 3));
- if (updateNodeInfo == null) {
- throw new NZException(RCode.NODE_NOT_EXISTS); // 节点不存在
- }
- cabinetId = updateNodeInfo.getCabinetId();
- }
-
- for (NodeRoomEntity nodeRoom : nodeRooms) {
- //定义返回格式
- AvailCabinetEntity availCab = new AvailCabinetEntity();
- availCab.setRoomId(nodeRoom.getId());
- availCab.setRoomName(nodeRoom.getName());
-
- // 1.1 查询每个机房下所有的机柜
- List<NodeCabinetEntity> nodeCabinets = nodeRoom.getCabinets();
-
- // 2.0 遍历机柜 得到下面的所有节点
- for (NodeCabinetEntity cab : nodeCabinets) {
-
- // 2.1 得到每个机柜下包含的节点信息
- List<NodeInfoEntity> nodeInfos = cab.getNodes();
- // 2.2 获取当前机柜的全部位置
- Integer[] allPosition = new Integer[cab.getUbit()];
- for (int i = 0; i < allPosition.length; i++) {
- allPosition[i] = i + 1;
- } //操作之后 allPosition 中的数据格式应为 1,2,3,4 ... 从1开始到uBit 也就是所有位置
-
- List<Integer> occList = new ArrayList<>(); // 记录的是整个机柜下 节点所占用的位置
-
- if (cabinetId != null && cabinetId - cab.getId() == 0) { // 修改时节点的所属的机柜 应还回节点
-
- // 2.3 根据得到的节点信息 得到占用的位置
- for (NodeInfoEntity nodeInfo : nodeInfos) {
- if (nodeInfo.getUuid().equals(uuid)) { // 修改的情况下
- continue;
- }
- for (int i = nodeInfo.getCabinetStart(); i < nodeInfo.getCabinetStart() + nodeInfo.getuSize(); i++) {
- //2.4 这里 i 就是要从 allPostion 中剔除的数据 例如 5,7 那这里的I 就是 5 ,6
- occList.add(i);
- }
- }
-
- } else {
-
- for (NodeInfoEntity nodeInfo : nodeInfos) {
- for (int i = nodeInfo.getCabinetStart(); i < nodeInfo.getCabinetStart() + nodeInfo.getuSize(); i++) {
- //2.4 这里 i 就是要从 allPostion 中剔除的数据 例如 5,7 那这里的I 就是 5 ,6
- occList.add(i);
- }
- }
-
- }
- // 3.0 根据全部的位置 去除已经占用的位置 得到空闲的位置
- List<Integer> freePosition = new ArrayList<>(Arrays.asList(allPosition));
- freePosition.removeAll(occList); // freePosition 为剩余的位置 例如 1,2,3,4,(5,6,) 7,8,(9),10
- // 4.0 在此处处理一下可用位置
- String convertStr = this.convertStr(freePosition);// 处理之后的格式 '1-4,7,10'
- //5.0 拿到处理好的格式之后进行判断U位规格
- String[] handleArr = convertStr.split(","); // 格式例如 [ "1-4" , "7" , "10"]
-
- // 6.0 记录符合返回段的数据
- List<String> availPostion = new ArrayList<>();
- if (uSize > 1) {
- //进行U位大小的判断 查询可用位置
- for (String str : handleArr) {
- if (str.contains("-")) { // 如果包含 ‘-’ 绝对是连续 不包含就是单条的 此处条件为uSize > 1
- String[] split = str.split("-");// 继续分割 找到可用的起始位置 5,7
- Integer u = Integer.valueOf(split[1]) - Integer.valueOf(split[0]) + 1;//得到这个范围的位置个数 1-4 为4个位置 4-1 = 3
- if (u < uSize) {// 这个连续段的大小不符合U位
- continue;
- } else {
- availPostion.add(str); // 输入的U位大小符合这个范围段
- }
- }
- }
-
- // 6.1 此处对可用的范围段做出相应的处理 availPostion中记录的是范围段 多个返回段 6-10 13-17 .... 这种
- List<Integer> endList = new ArrayList<>();
- if (ArrayUtils.isNotEmpty(allPosition)) {
- for (String str : availPostion) {
- String[] split = str.split("-");
- for (int i = Integer.valueOf(split[0]); i < Integer.valueOf(split[1]); i++) { // 1 4 2
- if (Integer.valueOf(split[1]) - i + 1 >= uSize) {//从后往前判断可以从哪些开始
- //可以开始的位置 记录并返回前台
- endList.add(i);
- }
- continue;
- }
- }
- }
- // 此处的endList 为开始下标了
- cab.setStarts(endList);
- } else {
- //这种情况就是用户输入的U位是1 可以把所有的位置都返回 都可以选择 如果存在可用位置的情况下 如果不存在返回 Null 合理
- cab.setStarts(freePosition);
- }
- }
- availCab.setCabinets(nodeCabinets);
-
- // 如果机房下所有机柜都不含可用位置 则不反悔此机房
- if (availCab.getCabinets() != null && availCab.getCabinets().size() > 0) {
- retAvailCabs.add(availCab);
- }
- }
-
- return retAvailCabs;
- }
-
- //判断是否连续的 并用字符串的形式返回
- public String convertStr(List<Integer> list) {
- int state = 0;
- String result = "";
- for (int i = 0; i < list.size(); i++) {
- if (i == list.size() - 1) state = 2;
- if (state == 0) {
- if (list.get(i + 1) == list.get(i) + 1) {
- result += list.get(i);
- result += "-";
- state = 1;
- } else {
- result += list.get(i);
- result += ",";
- }
- } else if (state == 1) {
- if (list.get(i + 1) != list.get(i) + 1) {
- result += list.get(i);
- result += ",";
- state = 0;
- }
- } else {
- result += list.get(i);
- }
- }
- return result;
- }
-
- @Override
- public PageUtils queryPageBySystemId(Map<String, Object> params) {
- IPage<NodeInfoEntity> page = new Query<NodeInfoEntity>().getPage(params);
- List<NodeInfoEntity> queryNodeBySystemId = nodeInfoDao.queryNodeBySystemId(page, (Long) params.get("id"));
- this.getTagName(queryNodeBySystemId);
- page.setRecords(queryNodeBySystemId);
- return new PageUtils(page);
- }
-
- @Override
- public PageUtils querySelectableNodeBySystemId(Map<String, Object> params) {
- IPage<NodeInfoEntity> page = new Query<NodeInfoEntity>().getPage(params);
- List<NodeInfoEntity> queryNodeBySystemId = nodeInfoDao.querySelectableNodeBySystemId(page, (Long) params.get("id"));
- this.getTagName(queryNodeBySystemId);
- page.setRecords(queryNodeBySystemId);
- return new PageUtils(page);
- }
-
- /**
- * 根据节点UUID 获取所属节点组集合
- *
- * @param uuid
- * @return
- */
- @Override
- public List<NodeGroupRelEntity> getGroupsById(Long uuid) {
- List<NodeGroupRelEntity> list = nodeGroupRelService.list(new QueryWrapper<NodeGroupRelEntity>().eq("uuid", uuid));
- return list;
- }
-
- /**
- * 根据节点的UUID 查询所属业务系统集合
- *
- * @param uuid
- * @return
- */
- @Override
- public List<SystemInfoEntity> querySystemsByUuid(Long uuid) {
- List<SystemInfoEntity> systems = nodeInfoDao.querySystemsByUuid(uuid);
- return systems;
- }
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeRoomServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeRoomServiceImpl.java
deleted file mode 100644
index 60aabff0..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/NodeRoomServiceImpl.java
+++ /dev/null
@@ -1,232 +0,0 @@
-package com.nis.modules.node.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.exception.NZException;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.Query;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.node.dao.NodeCabinetDao;
-import com.nis.modules.node.dao.NodeRoomDao;
-import com.nis.modules.node.entity.NodeCabinetEntity;
-import com.nis.modules.node.entity.NodeRoomEntity;
-import com.nis.modules.node.service.NodeCabinetService;
-import com.nis.modules.node.service.NodeRoomService;
-import com.nis.modules.sys.entity.SysDictEntity;
-import com.nis.modules.sys.service.SysDictService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import com.sun.org.apache.bcel.internal.generic.RETURN;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.*;
-
-
-@Service("nodeRoomService")
-public class NodeRoomServiceImpl extends ServiceImpl<NodeRoomDao, NodeRoomEntity> implements NodeRoomService {
-
- // 机柜 dao
- @Autowired
- private NodeCabinetDao nodeCabinetDao;
-
- // 机柜 service
- @Autowired
- private NodeCabinetService nodeCabinetService;
-
- // 字典service
- @Autowired
- private SysDictService sysDictService;
-
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
- String name = null;
- String addr = null;
- if (params != null && params.size() > 0) {
- name = (String) params.get("name"); // room name
- addr = (String) params.get("addr"); // room addr
- if (addr != null && StringUtils.isNotBlank(addr)) {
- // 校验传入地址是否存在
- NodeRoomEntity roomEntity = new NodeRoomEntity();
- roomEntity.setAddr(Long.valueOf(addr));
- this.checkAddrExist(roomEntity);
- }
- }
-
- IPage<NodeRoomEntity> page = this.page(
- new Query<NodeRoomEntity>().getPage(params),
- new QueryWrapper<NodeRoomEntity>()
- .like(StringUtils.isNotBlank(name), "name", name)
- .eq(StringUtils.isNotBlank(addr), "addr", addr)
- );
- // 查询地区名称
- Map<String, Object> map = new HashMap<>();
- map.put("name", "addr");
- List<SysDictEntity> sysDictes = sysDictService.queryList(map);
- for (NodeRoomEntity room : page.getRecords()) {
- for (SysDictEntity dict : sysDictes) {
- if (room.getAddr().toString().equals(dict.getCode())) {
- room.setAddrName(dict.getValue());
- break;
- }
- }
- }
- return new PageUtils(page);
- }
-
- @Override
- public NodeRoomEntity detail(Long id) {
- NodeRoomEntity nodeRoom = this.getById(id);
-
- if (nodeRoom == null) {
- throw new NZException(RCode.NODEROOM_NOT_EXISTS);
- }
- if (nodeRoom.getAddr() == null) {
- throw new NZException(RCode.NODEROOM_ADDR_ISNULL);
- }
- // 查询地区名称
- Map<String, Object> map = new HashMap<>();
- map.put("name", "addr");
- List<SysDictEntity> sysDictes = sysDictService.queryList(map);
- for (SysDictEntity entity : sysDictes) {
- if (entity.getCode().equals(nodeRoom.getAddr().toString())) {
- nodeRoom.setAddrName(entity.getValue());
- break;
- }
- }
- return nodeRoom;
- }
-
-
- @Override
- public void saveNodeRoom(NodeRoomEntity nodeRoom) {
- if (this.roomNameCheck(null, nodeRoom.getName())) { // 名称唯一校验
-
- // 校验地区是否存在
- this.checkAddrExist(nodeRoom);
-
- nodeRoom.setOperator(ShiroUtils.getCurrSystemId());
- nodeRoom.setOpTime(new Date());
- this.save(nodeRoom);
- } else {
- throw new NZException(RCode.NODEROOM_NAME_DUPLICATE);// 名称重复异常
- }
- }
-
- public void checkAddrExist(NodeRoomEntity nodeRoom) {
- // 校验地区是否存在
- Map<String, Object> map = new HashMap<>();
- map.put("name", "addr");
- List<SysDictEntity> sysDictes = sysDictService.queryList(map);
- boolean flag = false;
- for (SysDictEntity entity : sysDictes) {
- if (Long.valueOf(entity.getCode()) - nodeRoom.getAddr() == 0) {
- flag = true;
- }
- }
- if (!flag) {
- throw new NZException(RCode.NODEROOM_ADDR_NOTFOUND); // 位置未找到
- }
- }
-
- /**
- * 修改时前后端都需要校验行列是否已被机柜占用
- *
- * @param nodeRoom
- */
- @Override
- public void updateNodeRoom(NodeRoomEntity nodeRoom) {
- if (this.roomNameCheck(nodeRoom.getId(), nodeRoom.getName())) { // 名称唯一校验
-
- // 修改前校验机房的大小是否可用
- R r = this.roomSizeCheck(nodeRoom.getId(), nodeRoom.getRoomRows(), nodeRoom.getRoomCols());
- if (!r.get("code").equals(RCode.SUCCESS.getCode())) {
- throw new NZException(r.get("msg").toString(), Integer.valueOf(r.get("code").toString()));
- }
-
- // 校验地区是否存在
- this.checkAddrExist(nodeRoom);
-
- nodeRoom.setOperator(ShiroUtils.getCurrSystemId());
- nodeRoom.setOpTime(new Date());
-
- this.updateById(nodeRoom);
- } else {
- throw new NZException(RCode.NODEROOM_NAME_DUPLICATE);// 名称重复异常
- }
- }
-
- /**
- * 机房删除 删除时需要校验是否存在关联的机柜
- *
- * @param ids R
- */
- @Override
- public void delete(Long[] ids) {
- // 1. 校验是否存在关联的机柜信息
- for (Long id : ids) {
- int count = nodeCabinetService.count(new QueryWrapper<NodeCabinetEntity>().eq("room_id", id));
- if (count > 0) {
- NodeRoomEntity nodeRoom = this.getById(id);
- throw new NZException(nodeRoom.getName() + " related cabinets , not deletable ", 203004); // 机房下存在机柜信息
- }
- }
- // 2. 进行逻辑删除
- this.removeByIds(Arrays.asList(ids));
- }
-
-
- /**
- * 机房名称校验
- *
- * @param id O
- * @param name R
- * @return
- */
- @Override
- public boolean roomNameCheck(Long id, String name) {
- List<NodeRoomEntity> list = this.list(new QueryWrapper<NodeRoomEntity>().eq("name", name));
- boolean flag = false;
-
- //当只有一个结果并且这个结果是自身时,或没有结果时,说明名称不重复
- if ((list == null || list.size() == 0) ||
- (list != null && list.size() == 1 && list.get(0).getId().equals(id))) {
- flag = true;
- }
- return flag;
- }
-
- /**
- * 机房修改时行列校验,行、列数不能小于已被机柜占用的数
- *
- * @param id R
- * @param roomRows R
- * @param roomCols R
- * @return
- */
- @Override
- public R roomSizeCheck(Long id, Integer roomRows, Integer roomCols) {
- NodeRoomEntity room = this.getById(id);
-
- if (room == null) {
- throw new NZException(RCode.NODEROOM_NOT_EXISTS);
- }
-
- // 1. 根据当前的 roomId 拿到机柜的最大行列数
- NodeCabinetEntity cab = nodeCabinetDao.getCabMaxRowCol(id);
-
- if (cab != null && cab.getMaxRows() != null && cab.getMaxCols() != null) {
- if (roomRows < cab.getMaxRows()) {
- return R.error(RCode.NODEROOM_ROW_OCCUPIED).put("data", cab.getMaxRows());
- //throw new NZException(RCode.NODEROOM_ROW_OCCUPIED); // 输入行小于已使用的行
- }
- if (roomCols < cab.getMaxCols()) {
- // throw new NZException(RCode.NODEROOM_COL_OCCUPIED); // 输入列小于已使用的列
- return R.error(RCode.NODEROOM_COL_OCCUPIED).put("data", cab.getMaxCols());
- }
- }
- return R.ok();
- }
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/SystemNodeRelServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/node/service/impl/SystemNodeRelServiceImpl.java
deleted file mode 100644
index d6591611..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/service/impl/SystemNodeRelServiceImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.nis.modules.node.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.modules.node.dao.SystemNodeRelDao;
-import com.nis.modules.node.entity.SystemNodeRelEntity;
-import com.nis.modules.node.service.SystemNodeRelService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-
-@Service("systemNodeRelService")
-public class SystemNodeRelServiceImpl extends ServiceImpl<SystemNodeRelDao, SystemNodeRelEntity> implements SystemNodeRelService {
-
- @Override
- public boolean isCurrentSystem(Long[] nodeIds) {
- Long currSystemId = ShiroUtils.getCurrSystemId();
- QueryWrapper<SystemNodeRelEntity> systemNodeRelQueryWrapper = new QueryWrapper<SystemNodeRelEntity>();
- systemNodeRelQueryWrapper.in("uuid", nodeIds);
- systemNodeRelQueryWrapper.eq("system_id", currSystemId);
- List<SystemNodeRelEntity> list = this.list(systemNodeRelQueryWrapper);
-
- return list != null && list.size() == nodeIds.length;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/node/util/IpCovert.java b/nezha-admin/src/main/java/com/nis/modules/node/util/IpCovert.java
deleted file mode 100644
index 9f0b128f..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/node/util/IpCovert.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.nis.modules.node.util;
-
-import java.util.regex.Pattern;
-
-public class IpCovert {
-
- /**
- * 正则表达式:验证IP地址
- */
- public static final String REGEX_IP_ADDR = "^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}$";
-
- //将127.0.0.1 形式的IP地址转换成10进制整数,这里没有进行任何错误处理
- public static long ipToLong(String strIP) {
- int j = 0;
- int i = 0;
- long[] ip = new long[4];
- int position1 = strIP.indexOf(".");
- int position2 = strIP.indexOf(".", position1 + 1);
- int position3 = strIP.indexOf(".", position2 + 1);
- ip[0] = Long.parseLong(strIP.substring(0, position1));
- ip[1] = Long.parseLong(strIP.substring(position1 + 1, position2));
- ip[2] = Long.parseLong(strIP.substring(position2 + 1, position3));
- ip[3] = Long.parseLong(strIP.substring(position3 + 1));
- return (ip[0] << 24) + (ip[1] << 16) + (ip[2] << 8) + ip[3];
- }
-
- //将10进制整数形式转换成127.0.0.1形式的IP地址,按主机序
- public static String longToIP(long longIP) {
- StringBuffer sb = new StringBuffer("");
- sb.append(String.valueOf(longIP >>> 24 & 0xFF));//直接右移24位
- sb.append("."); //将高8位置0,然后右移16位
- sb.append(String.valueOf((longIP & 0x00FFFFFF) >>> 16));
- sb.append(".");
- sb.append(String.valueOf((longIP & 0x0000FFFF) >>> 8));
- sb.append(".");
- sb.append(String.valueOf(longIP & 0x000000FF));
- return sb.toString();
- }
-
- //将10进制整数形式转换成127.0.0.1形式的IP地址,按网络序
- public static String longToNetIp(long longIP) {
- StringBuffer sb = new StringBuffer("");
- sb.append(String.valueOf(longIP & 0x000000FF));
- sb.append(".");
- sb.append(String.valueOf((longIP & 0x0000FFFF) >>> 8));
- sb.append(".");//将高8位置0,然后右移16位
- sb.append(String.valueOf((longIP & 0x00FFFFFF) >>> 16));
- sb.append(".");
- sb.append(String.valueOf(longIP >>> 24 & 0xFF));//直接右移24位
- return sb.toString();
- }
-
- //将127.0.0.1 形式的IP地址转换成10进制整数,这里没有进行任何错误处理
- public static long netIpToLong(String strIP) {
- int j = 0;
- int i = 0;
- long[] ip = new long[4];
- int position1 = strIP.indexOf(".");
- int position2 = strIP.indexOf(".", position1 + 1);
- int position3 = strIP.indexOf(".", position2 + 1);
- ip[0] = Long.parseLong(strIP.substring(0, position1));
- ip[1] = Long.parseLong(strIP.substring(position1 + 1, position2));
- ip[2] = Long.parseLong(strIP.substring(position2 + 1, position3));
- ip[3] = Long.parseLong(strIP.substring(position3 + 1));
- return (ip[0]) + (ip[1] << 8) + (ip[2] << 16) + (ip[3] << 24);
- }
-
-
- /**
- * 校验IP地址
- * @param ipAddr
- * @return
- */
- public static boolean isIPAddr(String ipAddr) {
- return Pattern.matches(REGEX_IP_ADDR, ipAddr);
- }
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/DownloadFile.java b/nezha-admin/src/main/java/com/nis/modules/sys/controller/DownloadFile.java
deleted file mode 100644
index fa8e82a0..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/DownloadFile.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.nis.modules.sys.controller;
-
-import com.nis.common.exception.NZException;
-import com.nis.common.utils.RCode;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.util.ResourceUtils;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.*;
-
-@RestController
-@RequestMapping("/sys/")
-public class DownloadFile {
- @GetMapping("/download")
- @ResponseBody
- @ApiOperation(value="文件下载")
- public String download(HttpServletRequest request, HttpServletResponse response){
- String filePath=request.getParameter("filePath");
- String fileName=request.getParameter("fileName");
- String rootPath=null;
- try{
- rootPath= ResourceUtils.getURL("classpath:").getPath();
- }catch (Exception e){
- e.printStackTrace();
- }
- File file = new File(rootPath+filePath);
- if(!file.exists()){
- throw new NZException(RCode.SYS_DOWNLOAD_NO_FILE);
- }
- try {
- fileName = new String(fileName.getBytes("GBK"), "UTF-8");
- } catch (UnsupportedEncodingException e) {
- e.printStackTrace();
- }
- response.reset();
- response.setContentType("application/octet-stream");
- response.setCharacterEncoding("utf-8");
- response.setContentLength((int) file.length());
- response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
- byte[] buff = new byte[1024];
- BufferedInputStream bis = null;
- OutputStream os = null;
- try {
- os = response.getOutputStream();
- bis = new BufferedInputStream(new FileInputStream(file));
- int i = 0;
- while ((i = bis.read(buff)) != -1) {
- os.write(buff, 0, i);
- os.flush();
- }
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- try {
- bis.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return null;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SystemInfoController.java b/nezha-admin/src/main/java/com/nis/modules/sys/controller/SystemInfoController.java
deleted file mode 100644
index 61c9e094..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SystemInfoController.java
+++ /dev/null
@@ -1,278 +0,0 @@
-package com.nis.modules.sys.controller;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.baomidou.mybatisplus.core.toolkit.StringUtils;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.smartvalidate.utils.CommonUtil;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.node.service.NodeInfoService;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import com.nis.modules.sys.service.SystemInfoService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-@Api(tags="业务系统")
-@RestController
-@RequestMapping("/system")
-public class SystemInfoController extends AbstractController {
-
- @Autowired
- private SystemInfoService systemInfoService;
- @Autowired
- private NodeInfoService nodeInfoService;
-
- @RequestMapping(value = "list", method = RequestMethod.GET)
- @ApiOperation(httpMethod = "GET", value = "业务系统列表查询")
- public R list(@RequestParam Map<String, Object> params){
- PageUtils queryPage = systemInfoService.queryPage(params);
- return R.ok(queryPage);
- }
-
- @RequestMapping(value = "detail", method = RequestMethod.GET)
- @ApiOperation(httpMethod = "GET", value = "业务系统详情查询")
- public R detail(Long id) {
- if (id == null) {
- return R.ok(systemInfoService.queryDetail(ShiroUtils.getCurrSystem().getId()));
- }
- SystemInfoEntity queryDetail = systemInfoService.queryDetail(id);
- return R.ok(queryDetail);
- }
-
- @RequestMapping(value = "save", method = RequestMethod.POST)
- @ApiOperation(httpMethod = "POST", response = R.class, value = "保存业务系统")
- public R save(@RequestBody SystemInfoEntity systemInfo){
- //global限制
- if (!ShiroUtils.isGlobal()) {
- return R.error(RCode.NO_PERMISSION_ERROR);
- }
-
- ValidateUtils.is(systemInfo.getName()).notNull(RCode.SYS_SYS_NULLNAME);
- //校验名称重复
- if (systemInfoService.checkName(systemInfo)) {
- return R.error(RCode.SYS_SYS_DUPLICATENAME);
- }
-
- Date now = new Date();
-
- systemInfo.setCreateBy(getUserId());
- systemInfo.setUpdateBy(getUserId());
- systemInfo.setCreateDate(now);
- systemInfo.setUpdateDate(now);
-
- systemInfoService.save(systemInfo);
-
- return R.ok();
- }
-
- @RequestMapping(value = "update", method = RequestMethod.PUT)
- @ApiOperation(httpMethod = "PUT", response = R.class, value = "修改业务系统")
- public R update(@RequestBody SystemInfoEntity systemInfo){
- //global限制
- if (!ShiroUtils.isGlobal()) {
- return R.error(RCode.NO_PERMISSION_ERROR);
- }
-
- ValidateUtils.is(systemInfo.getName()).notNull(RCode.SYS_SYS_NULLNAME)
- .and(systemInfo.getId()).notNull(RCode.NOT_NULL_ERROR);
- //校验是否是内置系统,内置系统不让改
- SystemInfoEntity old = systemInfoService.queryDetail(systemInfo.getId());
- if (Constant.SYSTEM_BUILDIN_YES.equals(old.getBuildIn())) {
- return R.error(RCode.SYS_SYS_BUILTIN);
- }
- //校验名称重复
- if (systemInfoService.checkName(systemInfo)) {
- return R.error(RCode.SYS_SYS_DUPLICATENAME);
- }
-
- Date now = new Date();
-
- systemInfo.setUpdateBy(getUserId());
- systemInfo.setUpdateDate(now);
-
- systemInfoService.updateById(systemInfo);
-
- return R.ok();
- }
-
- @RequestMapping(value = "delete", method = RequestMethod.DELETE)
- @ApiOperation(httpMethod = "DELETE", response = R.class, value = "删除业务系统")
- public R delete(@ApiParam @RequestBody Long[] ids){
- ValidateUtils.is(ids).notNull(RCode.NOT_NULL_ERROR);
- List<Long> asList = Arrays.asList(ids);
- if (!ShiroUtils.isGlobal()) {//global限制
- return R.error(RCode.NO_PERMISSION_ERROR);
- }
- if (asList.contains(Constant.GLOBAL_ID)) {//不能删除global
- return R.error(RCode.SYS_SYS_DELGLOBAL);
- }
- Collection<SystemInfoEntity> listByIds = systemInfoService.listByIds(Arrays.asList(ids));
- for (SystemInfoEntity s : listByIds) {
- if (Constant.SYSTEM_BUILDIN_YES.equals(s.getBuildIn())) {
- return R.error(RCode.SYS_SYS_BUILTIN);
- }
- }
- systemInfoService.delete(asList);
- return R.ok();
- }
-
- /**
- * 查询业务系统下的节点
- */
- @RequestMapping(value = "nodes", method = RequestMethod.GET)
- @ApiOperation(httpMethod = "GET", response = R.class, value = "查询业务系统下的节点")
- public R nodes(@RequestParam Map<String, Object> params){
- Long id = null;
- if (ShiroUtils.isGlobal()) {
- if (params.get("id") == null || CommonUtil.isNull(params.get("id").toString())) {
- id = ShiroUtils.getCurrSystemId();
- } else {
- id = Long.valueOf((String)params.get("id"));
- }
- } else {
- id = ShiroUtils.getCurrSystemId();
- }
- params.put("id", id);
-
- PageUtils queryPageBySystemId = nodeInfoService.queryPageBySystemId(params);
- return R.ok(queryPageBySystemId);
- }
-
- /**
- * 分配节点时查询可选节点
- */
- @RequestMapping(value = "selectableNodes", method = RequestMethod.GET)
- @ApiOperation(httpMethod = "GET", response = R.class, value = "可选节点")
- public R selectableNodes(@RequestParam Map<String, Object> params){
- ValidateUtils.is(params.get("id")).notNull(RCode.NOT_NULL_ERROR);
- params.put("id", Long.valueOf((String)params.get("id")));
-
- PageUtils queryPageBySystemId = nodeInfoService.querySelectableNodeBySystemId(params);
- return R.ok(queryPageBySystemId);
- }
-
- /**
- * 分配节点
- */
- @RequestMapping(value = "saveNodeRel", method = RequestMethod.POST)
- @ApiOperation(httpMethod = "POST", response = R.class, value = "分配节点")
- public R saveNodeRel(@ApiParam @RequestBody SystemInfoEntity entity){
- if (!ShiroUtils.isGlobal()) {
- entity.setId(ShiroUtils.getCurrSystemId());
- }
- ValidateUtils.is(entity.getId()).notNull(RCode.NOT_NULL_ERROR)
- .and(entity.getUuids()).notNull(RCode.NOT_NULL_ERROR);
-
- systemInfoService.saveNodeRel(entity);
- return R.ok();
- }
-
- /**
- * 移除节点
- */
- @RequestMapping(value = "deleteNodeRel", method = RequestMethod.DELETE)
- @ApiOperation(httpMethod = "DELETE", response = R.class, value = "移除节点")
- public R deleteNodeRel(@ApiParam @RequestBody SystemInfoEntity entity){
- if (!ShiroUtils.isGlobal()) {
- entity.setId(ShiroUtils.getCurrSystemId());
- }
- ValidateUtils.is(entity.getId()).notNull(RCode.NOT_NULL_ERROR)
- .and(entity.getUuids()).notNull(RCode.NOT_NULL_ERROR);
-
- systemInfoService.deleteNodeRel(entity);
- return R.ok();
- }
-
- /**
- * 业务系统名称校验
- * @param params
- * @return
- */
- @RequestMapping(value = "nameCheck", method = RequestMethod.GET)
- @ApiOperation(httpMethod = "GET", response = R.class, value = "业务系统名称校验")
- public R nameCheck(@RequestParam Map<String, Object> params){
- ValidateUtils.is(params.get("name")).notNull();
- //校验名称重复
- SystemInfoEntity queryParam = new SystemInfoEntity();
- Object object = params.get("id");
- if (object != null && !StringUtils.isEmpty(object.toString())) {
- queryParam.setId(Long.valueOf((String)object));
- }
- queryParam.setName((String)params.get("name"));
-
- if (systemInfoService.checkName(queryParam)) {
- return R.error(RCode.SYS_SYS_DUPLICATENAME);
- } else {
- return R.ok();
- }
- }
-
- /**
- * 用户所属业务系统的列表
- * @return
- */
- @RequestMapping(value = "listByUser", method = RequestMethod.GET)
- @ApiOperation(httpMethod = "GET", response = R.class, value = "用户所属业务系统的列表")
- public R listByUser(){
- Long userId = getUserId();
- //检查是否有可用的业务系统
- List<SystemInfoEntity> systemInfosByUserId = systemInfoService.querySystemInfosByUserId(userId);
- if (systemInfosByUserId == null || systemInfosByUserId.size() == 0) {
- return R.error(RCode.SYS_LOGIN_SELECTSYS);
- } else {
- return R.ok(systemInfosByUserId);
- }
- }
-
- /**
- * 切换业务系统
- * @param id
- * @return
- */
- @RequestMapping(value = "changeSystem", method = RequestMethod.GET)
- @ApiOperation(httpMethod = "GET", response = R.class, value = "切换业务系统")
- public R changeSystem(@ApiParam @RequestParam Long id){
- ValidateUtils.is(id).notNull();
- Long userId = getUserId();
- SystemInfoEntity newSystem = null;
- //检查是否有可用的业务系统
- List<SystemInfoEntity> systemInfosByUserId = systemInfoService.querySystemInfosByUserId(userId);
- if (CommonUtil.isNull(systemInfosByUserId)) {
- return R.error(RCode.SYS_LOGIN_SELECTSYS);
- } else {
- boolean flag = false;
- for (SystemInfoEntity si : systemInfosByUserId) {
- if (si.getId() == id) {
- newSystem = si;
- flag = true;
- break;
- }
- }
- if (flag) {
- ShiroUtils.getUserEntity().setCurrSystem(newSystem);
- return R.ok(newSystem);
- } else {
- return R.error(RCode.SYS_LOGIN_SELECTSYS);
- }
- }
- }
-
-
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/UserGroupController.java b/nezha-admin/src/main/java/com/nis/modules/sys/controller/UserGroupController.java
deleted file mode 100644
index aee3b9aa..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/UserGroupController.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package com.nis.modules.sys.controller;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.nis.modules.sys.entity.UserGroupEntity;
-import com.nis.modules.sys.entity.UserGroupEntity2;
-import com.nis.modules.sys.service.UserGroupService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-import com.baomidou.mybatisplus.core.toolkit.StringUtils;
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-
-
-
-/**
- * 用户组
- *
- * @author song
- * @email
- * @date 2019-07-26 11:22:14
- */
-@Api(tags="用户组")
-@RestController
-@RequestMapping("sys/usergroup")
-public class UserGroupController {
- @Autowired
- private UserGroupService userGroupService;
-
- /**
- * 列表
- */
- @RequestMapping(value = "list", method = RequestMethod.GET)
- @ApiOperation(httpMethod = "GET", value = "用户组列表查询")
- public R list(@RequestParam Map<String, Object> params){
- PageUtils page = userGroupService.queryPage(params);
- return R.ok(page);
- }
-
-
- /**
- * 信息
- */
- @RequestMapping(value = "detail", method = RequestMethod.GET)
- @ApiOperation(httpMethod = "GET", value = "用户组详情查询")
- public R detail(@ApiParam @RequestParam Long id){
- UserGroupEntity2 userGroup = userGroupService.queryDetail(id);
- return R.ok(userGroup);
- }
-
- /**
- * 保存
- */
- @RequestMapping("/save")
- @ApiOperation(httpMethod = "POST", value = "新增用户组")
- public R save(@RequestBody UserGroupEntity userGroup){
- ValidateUtils.is(userGroup.getName()).notNull();
- if (userGroupService.checkName(userGroup)) {
- return R.error(RCode.SYS_USERGROUP_DUPLICATENAME);
- }
- userGroupService.save(userGroup);
- return R.ok();
- }
-
- /**
- * 修改
- */
- @RequestMapping("/update")
- @ApiOperation(httpMethod = "PUT", value = "修改用户组")
- public R update(@ApiParam @RequestBody UserGroupEntity userGroup){
- ValidateUtils.is(userGroup.getName()).notNull()
- .and(userGroup.getId()).notNull();
- if (userGroupService.checkName(userGroup)) {
- return R.error(RCode.SYS_USERGROUP_DUPLICATENAME);
- }
- userGroupService.update(userGroup);
- return R.ok();
- }
-
- /**
- * 删除
- */
- @RequestMapping("/delete")
- @ApiOperation(httpMethod = "DELETE", value = "删除用户组")
- public R delete(@RequestBody Long[] ids){
- ValidateUtils.is(ids).notNull();
- List<Long> asList = Arrays.asList(ids);
- if (!ShiroUtils.isGlobal()) {//global限制
- return R.error(RCode.NO_PERMISSION_ERROR);
- }
- userGroupService.delete(asList);
- return R.ok();
- }
-
- /**
- * 业务系统名称校验
- * @param params
- * @return
- */
- @RequestMapping(value = "nameCheck", method = RequestMethod.GET)
- @ApiOperation(httpMethod = "GET", response = R.class, value = "业务系统名称校验")
- public R nameCheck(@RequestParam Map<String, Object> params){
- ValidateUtils.is(params.get("name")).notNull();
- //校验名称重复
- UserGroupEntity queryParam = new UserGroupEntity();
- Object object = params.get("id");
- if (object != null && !StringUtils.isEmpty(object.toString())) {
- queryParam.setId(Long.valueOf((String)object));
- }
- queryParam.setName((String)params.get("name"));
-
- if (userGroupService.checkName(queryParam)) {
- return R.error(RCode.SYS_USERGROUP_DUPLICATENAME);
- } else {
- return R.ok();
- }
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/PermissionInfoDao.java b/nezha-admin/src/main/java/com/nis/modules/sys/dao/PermissionInfoDao.java
deleted file mode 100644
index 08eba60b..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/PermissionInfoDao.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.nis.modules.sys.dao;
-
-import org.apache.ibatis.annotations.Mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-
-@Mapper
-public interface PermissionInfoDao extends BaseMapper<PermissionInfoEntity> {
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SystemInfoDao.java b/nezha-admin/src/main/java/com/nis/modules/sys/dao/SystemInfoDao.java
deleted file mode 100644
index a778986c..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SystemInfoDao.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
-
- *
-
- *
-
- */
-
-package com.nis.modules.sys.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 系统用户
- *
-
- */
-@Mapper
-public interface SystemInfoDao extends BaseMapper<SystemInfoEntity> {
-
- /**
- * 查询用户所有的业务系统
- * @param userId 用户ID
- */
- List<SystemInfoEntity> querySystemInfosByUserId(Long userId);
-
- /**
- * 查询业务系统分页列表,可筛选用户组
- * @param entity systemInfoEntity
- */
- List<SystemInfoEntity> list(IPage page, @Param("sys")SystemInfoEntity entity);
-
- /**
- * 查询业务系统详情
- * @param id
- * @return
- */
- SystemInfoEntity detail(Long id);
-
- /**
- * 查询节点组使用
- * @param id 业务系统ID
- * @return
- */
- List<SystemInfoEntity> querySystemInfosWithNodeGroup(@Param("id") Long id);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SystemUsergroupDao.java b/nezha-admin/src/main/java/com/nis/modules/sys/dao/SystemUsergroupDao.java
deleted file mode 100644
index f3d3d011..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SystemUsergroupDao.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.nis.modules.sys.dao;
-
-import org.apache.ibatis.annotations.Mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.sys.entity.SystemUsergroupEntity;
-
-@Mapper
-public interface SystemUsergroupDao extends BaseMapper<SystemUsergroupEntity> {
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/UserGroupDao.java b/nezha-admin/src/main/java/com/nis/modules/sys/dao/UserGroupDao.java
deleted file mode 100644
index 6ce6b428..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/UserGroupDao.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.nis.modules.sys.dao;
-
-import com.nis.modules.sys.entity.UserGroupEntity;
-import com.nis.modules.sys.entity.UserGroupEntity2;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-
-import java.util.List;
-
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * 用户组信息表
- *
- * @author song
- * @email
- * @date 2019-07-26 11:22:14
- */
-@Mapper
-public interface UserGroupDao extends BaseMapper<UserGroupEntity> {
-
- List<UserGroupEntity> queryByUser(Long userId);
-
- List<UserGroupEntity2> list(IPage<UserGroupEntity2> page);
-
- UserGroupEntity2 queryDetail(Long id);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/UserUsergroupDao.java b/nezha-admin/src/main/java/com/nis/modules/sys/dao/UserUsergroupDao.java
deleted file mode 100644
index 2a0d508c..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/UserUsergroupDao.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.nis.modules.sys.dao;
-
-import com.nis.modules.sys.entity.UserUsergroupEntity;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-/**
- *
- *
- * @author song
- * @email
- * @date 2019-08-01 14:56:46
- */
-@Mapper
-public interface UserUsergroupDao extends BaseMapper<UserUsergroupEntity> {
- //验证用户和用户组信息是否一致
- Integer checkUserGroupCorrect(@Param("userId")Long userId,@Param("userGroupIds")Long[] userGroupIds);
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/PermissionInfoEntity.java b/nezha-admin/src/main/java/com/nis/modules/sys/entity/PermissionInfoEntity.java
deleted file mode 100644
index 8020e928..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/PermissionInfoEntity.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.nis.modules.sys.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-import lombok.Data;
-
-@Data
-@TableName("permission_info")
-@KeySequence(value="seq_permission_info")
-public class PermissionInfoEntity implements Serializable {
-
- private static final long serialVersionUID = -458579718666963915L;
-
- @TableId(type=IdType.INPUT)
- private Long id;
-
- private String type; //1.dete_type,2.dete_set,3.dete_warn,4.mission; 暂时只用2、4
-
- private Long typeId;
-
- private String viewLevel;
-
- private Long relId;
-
- private String delFlag;
-
- private Long operator;
-
- private Date opTime;
-
- @JsonIgnore
- @TableField(exist = false)
- private List<Long> uuids;
-
- @JsonIgnore
- @TableField(exist = false)
- private String queryColumn;
-
- @JsonIgnore
- @TableField(exist = false)
- private List<Long> relIds;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SystemInfoEntity.java b/nezha-admin/src/main/java/com/nis/modules/sys/entity/SystemInfoEntity.java
deleted file mode 100644
index eb01ec86..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SystemInfoEntity.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package com.nis.modules.sys.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.nis.common.smartvalidate.ann.NotNull;
-import com.nis.common.utils.RCode;
-
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-/**
- * 系统用户
- *
-
- */
-@Data
-@TableName("system_info")
-@KeySequence(value="seq_system_info")
-public class SystemInfoEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 业务系统id
- */
- @TableId(type=IdType.INPUT)
- private Long id;
-
- /**
- * 业务系统名
- */
- @NotNull(code = RCode.SYS_SYS_NULLNAME)
- private String name;
-
- /**
- * 是否内置 1:内置,2:非内置
- */
- private String buildIn;
-
- /**
- * 创建人
- */
- private Long createBy;
-
- /**
- * 创建时间
- */
- private Date createDate;
-
- /**
- * 更新人
- */
- private Long updateBy;
-
- /**
- * 更新时间
- */
- private Date updateDate;
-
- /**
- * 备注
- */
- private String remarks;
-
- /**
- * 删除标识 0:正常 1:删除
- */
- private Integer delFlag;
-
- /**
- * 关联的用户组
- */
- @TableField(exist=false)
- private List<UserGroupEntity> usergroups;
-
- @TableField(exist=false)
- private List<Integer> usergroupIds;
-
- @TableField(exist=false)
- private Long usergroupId;
-
- @TableField(exist=false)
- private List<Long> uuids;
-
- @TableField(exist=false)
- private List<Long> addUuids;
-
- @TableField(exist=false)
- private List<Long> removeUuids;
-
- @TableField(exist=false)
- private Integer nodeNum;
-
-
- /**
- * 关联的节点组
- */
- @TableField(exist = false)
- private List<NodeGroupInfoEntity> nodegroups;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/UserGroupEntity.java b/nezha-admin/src/main/java/com/nis/modules/sys/entity/UserGroupEntity.java
deleted file mode 100644
index 08ffe28c..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/UserGroupEntity.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.nis.modules.sys.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-/**
- * 系统用户组
- *
- */
-@Data
-@TableName("user_group")
-@KeySequence(value="seq_user_group")
-public class UserGroupEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 用户组ID
- */
- @TableId(type=IdType.INPUT)
- private Long id;
-
- /**
- * 用户组名
- */
- private String name;
-
- /**
- * 操作人
- */
- private Long operator;
-
- /**
- * 备注
- */
- private String remark;
-
- private Date opTime;
-
- private String delFlag;
-
- @TableField(exist = false)
- private List<Long> userIds;
-
- @TableField(exist = false)
- private List<Long> systemIds;
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/UserGroupEntity2.java b/nezha-admin/src/main/java/com/nis/modules/sys/entity/UserGroupEntity2.java
deleted file mode 100644
index ce3b9290..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/UserGroupEntity2.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.nis.modules.sys.entity;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-/**
- * 系统用户组
- * 此实体类仅用来接收查询结果,创建此类是因为多个实体类之间若存在对方的嵌套变量,启动会出错;
- * 如:UserGroupEntity里定义变量"List<SystemInfoEntity> systems",SystemInfoEntity里定义变量"List<UserGroupEntity> usergroups",则无法启动
- */
-@Data
-public class UserGroupEntity2 implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * 用户组ID
- */
- private Long id;
-
- /**
- * 用户组名
- */
- private String name;
-
- /**
- * 操作人
- */
- private Long operator;
-
- /**
- * 备注
- */
- private String remark;
-
- private Date opTime;
-
- private String delFlag;
-
- @TableField(exist = false)
- private List<SysUserEntity> users;
-
- @TableField(exist = false)
- private List<SystemInfoEntity> systems;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/UserUsergroupEntity.java b/nezha-admin/src/main/java/com/nis/modules/sys/entity/UserUsergroupEntity.java
deleted file mode 100644
index 8ce84ebc..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/UserUsergroupEntity.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.nis.modules.sys.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.Data;
-
-/**
- *
- *
- * @author song
- * @email
- * @date 2019-08-01 14:56:46
- */
-@Data
-@TableName("user_usergroup")
-@KeySequence(value="seq_user_usergroup")
-public class UserUsergroupEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- *
- */
- @TableId(type=IdType.INPUT)
- private Long id;
- /**
- *
- */
- private Long userId;
- /**
- *
- */
- private Long groupId;
- /**
- * 1:删除,0:未删除
- */
- private String delFlag;
- /**
- *
- */
- private Long operator;
- /**
- *
- */
- private Date opTime;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/PermissionInfoService.java b/nezha-admin/src/main/java/com/nis/modules/sys/service/PermissionInfoService.java
deleted file mode 100644
index e415a805..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/PermissionInfoService.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.nis.modules.sys.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-
-public interface PermissionInfoService extends IService<PermissionInfoEntity> {
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/SystemInfoService.java b/nezha-admin/src/main/java/com/nis/modules/sys/service/SystemInfoService.java
deleted file mode 100644
index e2d682a6..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/SystemInfoService.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
-
- *
-
- *
-
- */
-
-package com.nis.modules.sys.service;
-
-import java.util.List;
-import java.util.Map;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-
-
-/**
- * 业务系统
- *
- */
-public interface SystemInfoService extends IService<SystemInfoEntity> {
-
- List<SystemInfoEntity> querySystemInfosByUserId(Long userId);
-
- PageUtils queryPage(Map<String, Object> params);
-
- SystemInfoEntity queryDetail(Long id);
-
- boolean checkName(SystemInfoEntity systemInfo);
-
- boolean delete(List<Long> ids);
-
- boolean saveNodeRel(SystemInfoEntity entity);
-
- boolean deleteNodeRel(SystemInfoEntity entity);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/SystemUsergroupService.java b/nezha-admin/src/main/java/com/nis/modules/sys/service/SystemUsergroupService.java
deleted file mode 100644
index 7cb281c7..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/SystemUsergroupService.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.nis.modules.sys.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.modules.sys.entity.SystemUsergroupEntity;
-
-public interface SystemUsergroupService extends IService<SystemUsergroupEntity> {
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/UserGroupService.java b/nezha-admin/src/main/java/com/nis/modules/sys/service/UserGroupService.java
deleted file mode 100644
index 062fd830..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/UserGroupService.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.nis.modules.sys.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.sys.entity.UserGroupEntity;
-import com.nis.modules.sys.entity.UserGroupEntity2;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 用户组信息表
- *
- * @author song
- * @email
- * @date 2019-07-26 11:22:14
- */
-public interface UserGroupService extends IService<UserGroupEntity> {
-
- PageUtils queryPage(Map<String, Object> params);
-
- List<UserGroupEntity> queryByUser(Long userId);
-
- UserGroupEntity2 queryDetail(Long id);
-
- boolean update(UserGroupEntity userGroup);
-
- boolean delete(List<Long> asList);
-
- boolean checkName(UserGroupEntity entity);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/UserUsergroupService.java b/nezha-admin/src/main/java/com/nis/modules/sys/service/UserUsergroupService.java
deleted file mode 100644
index 15497711..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/UserUsergroupService.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.nis.modules.sys.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.common.utils.PageUtils;
-import com.nis.modules.sys.entity.UserUsergroupEntity;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- *
- *
- * @author song
- * @email
- * @date 2019-08-01 14:56:46
- */
-public interface UserUsergroupService extends IService<UserUsergroupEntity> {
-
- PageUtils queryPage(Map<String, Object> params);
-
- boolean checkUserGroupCorrect(Long userId,Long[] userGroupIds);
-
- List<Long> queryByUserId(Long userId);
-
- boolean saveOrUpdate(Long userId, List<Long> usergroupIds);
-}
-
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/PermissionInfoServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/PermissionInfoServiceImpl.java
deleted file mode 100644
index f5371ed6..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/PermissionInfoServiceImpl.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.nis.modules.sys.service.impl;
-
-import org.springframework.stereotype.Service;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.modules.sys.dao.PermissionInfoDao;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import com.nis.modules.sys.service.PermissionInfoService;
-
-@Service("permissionInfoService")
-public class PermissionInfoServiceImpl extends ServiceImpl<PermissionInfoDao, PermissionInfoEntity> implements PermissionInfoService {
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SystemInfoServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SystemInfoServiceImpl.java
deleted file mode 100644
index 26aa2b9e..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SystemInfoServiceImpl.java
+++ /dev/null
@@ -1,464 +0,0 @@
-package com.nis.modules.sys.service.impl;
-
-import com.alibaba.druid.util.StringUtils;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.smartvalidate.utils.CommonUtil;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.Query;
-import com.nis.modules.detect.entity.DeteSetInfoEntity;
-import com.nis.modules.detect.entity.DeteSetNodeRelEntity;
-import com.nis.modules.detect.service.DeteSetInfoService;
-import com.nis.modules.detect.service.DeteSetNodeRelService;
-import com.nis.modules.mission.entity.MissionInfoEntity;
-import com.nis.modules.mission.service.MissionInfoService;
-import com.nis.modules.node.entity.NodeGroupInfoEntity;
-import com.nis.modules.node.entity.NodeGroupRelEntity;
-import com.nis.modules.node.entity.SystemNodeRelEntity;
-import com.nis.modules.node.service.NodeGroupInfoService;
-import com.nis.modules.node.service.NodeGroupRelService;
-import com.nis.modules.node.service.SystemNodeRelService;
-import com.nis.modules.sys.dao.SystemInfoDao;
-import com.nis.modules.sys.entity.PermissionInfoEntity;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import com.nis.modules.sys.entity.SystemUsergroupEntity;
-import com.nis.modules.sys.service.PermissionInfoService;
-import com.nis.modules.sys.service.SystemInfoService;
-import com.nis.modules.sys.service.SystemUsergroupService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import com.nis.modules.topo.entity.TopoInfoEntity;
-import com.nis.modules.topo.service.TopoInfoService;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-
-/**
- * 业务系统
- *
- */
-@Service("systemInfoService")
-public class SystemInfoServiceImpl extends ServiceImpl<SystemInfoDao, SystemInfoEntity> implements SystemInfoService {
-
- private final static Logger logger = LoggerFactory.getLogger(SystemInfoServiceImpl.class);
-
- @Autowired
- private SystemUsergroupService sysUsergroupService;
- @Autowired
- private SystemNodeRelService sysNodeService;
- @Autowired
- private NodeGroupInfoService nodegroupService;
- @Autowired
- private NodeGroupRelService nodeGroupRelService;
- @Autowired
- private PermissionInfoService permissionService;
- @Autowired
- private DeteSetInfoService deteSetService;
- @Autowired
- private DeteSetNodeRelService deteSetNodeService;
- @Autowired
- private MissionInfoService missionService;
- @Autowired
- private TopoInfoService topoService;
-
- @Override
- public List<SystemInfoEntity> querySystemInfosByUserId(Long userId) {
- List<SystemInfoEntity> systemInfos = baseMapper.querySystemInfosByUserId(userId);
- return systemInfos;
- }
-
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
- String usergroupIdStr = (String)params.get("usergroupId");
- Long id = (Long)params.get("id");
- SystemInfoEntity se = new SystemInfoEntity();
- IPage<SystemInfoEntity> page = new Query<SystemInfoEntity>().getPage(params);
- if (!StringUtils.isEmpty(usergroupIdStr)) {
- se.setUsergroupId(Long.valueOf(usergroupIdStr));
- }
- if (id != null) {
- se.setId(id);
- }
-
- List<SystemInfoEntity> list = baseMapper.list(page, se);
- page.setRecords(list);
- return new PageUtils(page);
- }
-
- @Override
- public SystemInfoEntity queryDetail(Long id) {
- SystemInfoEntity detail = baseMapper.detail(id);
- return detail;
- }
-
- @Override
- public boolean checkName(SystemInfoEntity systemInfo) {
- List<SystemInfoEntity> list = this.list(new QueryWrapper<SystemInfoEntity>()
- .eq(true, "name", systemInfo.getName())
- .eq(true, "del_flag", Constant.DELFLAG_FALSE));
- boolean dumpFlag = true; //是否名称重复,true为重复
-
- //当只有一个结果并且这个结果是自身时,或没有结果时,说明名称不重复
- if ((list == null || list.size() == 0) ||
- (list != null && list.size() == 1 && list.get(0).getId().longValue() == systemInfo.getId().longValue())) {
- dumpFlag = false;
- }
- return dumpFlag;
- }
-
- @Transactional(rollbackFor = Exception.class)
- public boolean save(SystemInfoEntity systemInfo) {
- logger.info("新增systemInfo...");
- //新增system
- baseMapper.insert(systemInfo);
-
- //新增system-usergroup记录
- List<Integer> usergroupIds = systemInfo.getUsergroupIds();
- if (usergroupIds != null && usergroupIds.size() > 0) {
- List<SystemUsergroupEntity> toSave = new ArrayList<>();
- StringBuilder log = new StringBuilder("保存system-usergroup:");
- for (Integer uid : usergroupIds) {
- SystemUsergroupEntity su = new SystemUsergroupEntity();
- su.setSystemId(systemInfo.getId());
- su.setUsergroupId(Long.valueOf(uid.toString()));
- su.setOpTime(systemInfo.getUpdateDate());
- su.setOperator(systemInfo.getUpdateBy());
- toSave.add(su);
-
- log.append("system:" + systemInfo.getId() + ",usergroup:" + uid + "; ");
- }
- logger.info(log.toString());
- sysUsergroupService.saveBatch(toSave);
- }
-
- //新增拓扑图
- TopoInfoEntity topo = new TopoInfoEntity();
- topo.setName(systemInfo.getName());
- topo.setHeight(Constant.TOPO_DEFAULT_HEIGHT);
- topo.setWidth(Constant.TOPO_DEFAULT_WIDTH);
- topo.setOperator(ShiroUtils.getUserId());
- topo.setOpTime(systemInfo.getUpdateDate());
- topo.setSystemId(systemInfo.getId());
- topo.setStyle("");
- topoService.save(topo);
-
- //新增节点关联
- if (CommonUtil.isNull(systemInfo.getAddUuids())) {
- saveNodeRel(systemInfo);
- }
-
- return true;
- }
-
- @Transactional(rollbackFor = Exception.class)
- public boolean updateById(SystemInfoEntity systemInfo) {
- Date now = new Date();
- logger.info("update systemInfo...");
- //topo改名
- SystemInfoEntity old = baseMapper.selectById(systemInfo.getId());
- if (!old.getName().equals(systemInfo.getName())) {
- UpdateWrapper<TopoInfoEntity> tiWrapper = new UpdateWrapper<>();
- tiWrapper.eq("del_flag", Constant.DELFLAG_FALSE);
- tiWrapper.eq("system_id", systemInfo.getId());
- tiWrapper.set("name", systemInfo.getName());
- tiWrapper.set("operator", ShiroUtils.getUserId());
- tiWrapper.set("op_time", now);
- topoService.update(tiWrapper);
- }
- //修改system
- baseMapper.updateById(systemInfo);
-
- /**修改system-usergroup记录。
- *
- * 1.旧记录为空、新纪录不为空时,新增新纪录;
- * 2.旧记录新纪录都不为空时,删掉旧记录,新增新纪录
- * 3.新旧记录都为空时,不处理
- * 4.旧记录不为空,新纪录为空时,删掉旧记录
- *
- * 即有旧记录就删掉,有新纪录就新增
- */
- //删掉旧记录
- QueryWrapper<SystemUsergroupEntity> sugQuery = new QueryWrapper<SystemUsergroupEntity>();
- sugQuery.eq(true, "system_id", systemInfo.getId());
- sugQuery.eq(true, "del_flag", Constant.DELFLAG_FALSE);
- List<SystemUsergroupEntity> oldSystemUsergroups = sysUsergroupService.list(sugQuery);
- if (!CommonUtil.isNull(oldSystemUsergroups)) {
- StringBuilder log = new StringBuilder("删除旧system-usergroup:");
- for (SystemUsergroupEntity suEntity : oldSystemUsergroups) {
- suEntity.setDelFlag(Constant.DELFLAG_TRUE);
- suEntity.setOperator(systemInfo.getUpdateBy());
- suEntity.setOpTime(systemInfo.getUpdateDate());
-
- log.append(suEntity.getId() + "; ");
- }
- logger.info(log.toString());
- sysUsergroupService.updateBatchById(oldSystemUsergroups);
- }
- //新增新纪录
- List<Integer> usergroupIds = systemInfo.getUsergroupIds();
- if (!CommonUtil.isNull(usergroupIds)) {
- List<SystemUsergroupEntity> toSave = new ArrayList<>();
- StringBuilder log = new StringBuilder("增加新system-usergroup:");
- for (Integer ugId : usergroupIds) {
- SystemUsergroupEntity su = new SystemUsergroupEntity();
- su.setUsergroupId(Long.valueOf(ugId.toString()));
- su.setOperator(systemInfo.getUpdateBy());
- su.setOpTime(systemInfo.getUpdateDate());
- su.setSystemId(systemInfo.getId());
- toSave.add(su);
-
- log.append("system:" + systemInfo.getId() + ",Usergroup:" + ugId + "; ");
- }
- logger.info(log.toString());
- sysUsergroupService.saveBatch(toSave);
- }
-
- //修改节点关联
- if (!CommonUtil.isNull(systemInfo.getAddUuids())) {
- saveNodeRel(systemInfo);
- }
- if (!CommonUtil.isNull(systemInfo.getRemoveUuids())) {
- deleteNodeRel(systemInfo);
- }
-
- return true;
- }
-
- @Transactional(rollbackFor = Exception.class)
- public boolean delete(List<Long> ids) {
- /**解除与节点、用户组、节点组、监测设置、告警、任务、拓扑的关联*/
- Date now = new Date();
- //等待删除的permission记录
- List<PermissionInfoEntity> waitingDeletePermissions = new ArrayList<>();
- //解除节点关联
- UpdateWrapper<SystemNodeRelEntity> sysNodeWrapper = new UpdateWrapper<>();
- sysNodeWrapper.in(true, "system_id", ids);
- sysNodeWrapper.eq(true, "del_flag", Constant.DELFLAG_FALSE);
- sysNodeWrapper.set(true, "del_flag", Constant.DELFLAG_TRUE);
- sysNodeWrapper.set(true, "operator", ShiroUtils.getUserId());
- sysNodeWrapper.set(true, "op_time", now);
- sysNodeService.update(sysNodeWrapper);
-
- //解除用户组关联
- UpdateWrapper<SystemUsergroupEntity> sugWrapper = new UpdateWrapper<>();
- sugWrapper.in(true, "system_id", ids);
- sugWrapper.eq(true, "del_flag", Constant.DELFLAG_FALSE);
- sugWrapper.set(true, "del_flag", Constant.DELFLAG_TRUE);
- sugWrapper.set(true, "operator", ShiroUtils.getUserId());
- sugWrapper.set(true, "op_time", now);
- sysUsergroupService.update(sugWrapper);
-
- //删除节点组
- UpdateWrapper<NodeGroupInfoEntity> nodegroupWrapper = new UpdateWrapper<>();
- nodegroupWrapper.in(true, "system_id", ids);
- nodegroupWrapper.eq(true, "del_flag", Constant.DELFLAG_FALSE);
- nodegroupWrapper.set(true, "del_flag", Constant.DELFLAG_TRUE);
- nodegroupWrapper.set(true, "operator", ShiroUtils.getUserId());
- nodegroupWrapper.set(true, "op_time", now);
- nodegroupService.update(nodegroupWrapper);
-
- //删除拓扑
- UpdateWrapper<TopoInfoEntity> tpWrapper = new UpdateWrapper<>();
- tpWrapper.eq(true, "del_flag", Constant.DELFLAG_FALSE);
- tpWrapper.in(true, "system_id", ids);
- tpWrapper.set(true, "del_flag", Constant.DELFLAG_TRUE);
- tpWrapper.set(true, "operator", ShiroUtils.getUserId());
- tpWrapper.set(true, "op_time", now);
-
- //删除监测设置,系统内可见的设置解除关联并删除,全体可见和组内可见的设置不处理
- PermissionInfoEntity pi = new PermissionInfoEntity();
- pi.setType(Constant.PM_TYPE_DETESET);
- pi.setRelIds(ids);
- pi.setViewLevel(Constant.VIEWLEVEL_SYS);
- List<DeteSetInfoEntity> dsByPermission = deteSetService.queryByPermission(pi);
- if (!CommonUtil.isNull(dsByPermission)) {
- Long[] setIds = new Long[50];
- for (int i = 0; i < dsByPermission.size(); i++) {
- setIds[i] = dsByPermission.get(i).getId();
- //List<Long> setIds = new ArrayList<>();
- /*for (DeteSetInfoEntity ds : dsByPermission) {
- setIds.add(ds.getId());
-
- PermissionInfoEntity waitingDelete = ds.getPermission();
- waitingDelete.setDelFlag(Constant.DELFLAG_TRUE);
- waitingDelete.setOperator(ShiroUtils.getUserId());
- waitingDelete.setOpTime(now);
- waitingDeletePermissions.add(waitingDelete);
-
- ds.setState(Constant.DELFLAG_TRUE);
- ds.setOperator(ShiroUtils.getUserId());
- ds.setOpTime(now);*/
- }
- deteSetService.changeStateByIds(setIds, "1");
- //删除set
- //deteSetService.updateBatchById(dsByPermission);
- //删除warn
- /*QueryWrapper<DeteWarnRelEntity> dwrQuery = new QueryWrapper<>();
- dwrQuery.eq("rel_type", Constant.WARN_REL_SET);
- dwrQuery.in("rel_id", setIds);
- List<DeteWarnRelEntity> warnRelList = deteWarnRelService.list(dwrQuery);
- if (!CommonUtil.isNull(warnRelList)) {
- List<Long> warnIds = new ArrayList<>();
- for (DeteWarnRelEntity dwr : warnRelList) {
- warnIds.add(dwr.getWarnId());
- }
- UpdateWrapper<DeteWarnInfoEntity> dwiWrapper = new UpdateWrapper<>();
- dwiWrapper.in("id", warnIds);
- dwiWrapper.eq("del_flag", Constant.DELFLAG_FALSE);
- dwiWrapper.set("del_flag", Constant.DELFLAG_TRUE);
- dwiWrapper.set("operator", ShiroUtils.getUserId());
- dwiWrapper.set("op_time", now);
- deteWarnInfoService.update(dwiWrapper);
- }*/
- }
-
- //删除任务
- pi.setType(Constant.PM_TYPE_MISSION);
- List<MissionInfoEntity> msByPermission = missionService.queryByPermission(pi);
- if (!CommonUtil.isNull(msByPermission)) {
- for (MissionInfoEntity ds : msByPermission) {
- PermissionInfoEntity waitingDelete = ds.getPermission();
- waitingDelete.setDelFlag(Constant.DELFLAG_TRUE);
- waitingDelete.setOperator(ShiroUtils.getUserId());
- waitingDelete.setOpTime(now);
- waitingDeletePermissions.add(waitingDelete);
-
- ds.setDelFlag(Constant.DELFLAG_TRUE);
- ds.setOperator(ShiroUtils.getUserId());
- ds.setOpTime(now);
- }
- missionService.updateBatchById(msByPermission);
- }
-
- //删除permission_info记录
- if (!CommonUtil.isNull(waitingDeletePermissions)) {
- permissionService.updateBatchById(waitingDeletePermissions);
- }
-
- //删除systemInfo
- UpdateWrapper<SystemInfoEntity> siWrapper = new UpdateWrapper<>();
- siWrapper.eq(true, "del_flag", Constant.DELFLAG_FALSE);
- siWrapper.in(true, "id", ids);
- siWrapper.set(true, "del_flag", Constant.DELFLAG_TRUE);
- siWrapper.set(true, "update_by", ShiroUtils.getUserId());
- siWrapper.set(true, "update_date", now);
- update(siWrapper);
-
- return true;
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean saveNodeRel(SystemInfoEntity entity) {
- Date now = new Date();
- List<Long> uuids = entity.getAddUuids();
- if (uuids.size() > 0) {
- //先查出已有的关联,用于去重
- List<SystemNodeRelEntity> oldSysNodeRel = sysNodeService.list(
- new QueryWrapper<SystemNodeRelEntity>()
- .eq(true, "del_flag", Constant.DELFLAG_FALSE)
- .eq(true, "system_id", entity.getId()));
- //保存sys-node
- List<SystemNodeRelEntity> toSaveSysNodeRel = new ArrayList<>();
- for (Long uuid : uuids) {
- if (!checkDuplicate(oldSysNodeRel, entity.getId(), uuid)) {
- continue;
- }
-
- SystemNodeRelEntity snr = new SystemNodeRelEntity();
- snr.setUuid(uuid);
- snr.setSystemId(entity.getId());
- snr.setOperator(ShiroUtils.getUserId());
- snr.setOpTime(now);
- toSaveSysNodeRel.add(snr);
- }
-
- if (toSaveSysNodeRel.size() > 0) {
- sysNodeService.saveBatch(toSaveSysNodeRel);
- }
- }
- return true;
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean deleteNodeRel(SystemInfoEntity entity) {
- Date now = new Date();
- /*
- * 一共更新三个表:system_node_rel、node_group_rel、dete_set_node_rel
- * 即删除系统-节点、系统专属监测设置-节点、节点组-节点三个关联
- */
-
- //system_node_rel
- UpdateWrapper<SystemNodeRelEntity> sysNodeWrapper = new UpdateWrapper<>();
- sysNodeWrapper.eq("del_flag", Constant.DELFLAG_FALSE);
- sysNodeWrapper.eq("system_id", entity.getId());
- sysNodeWrapper.in("uuid", entity.getRemoveUuids());
- sysNodeWrapper.set("del_flag", Constant.DELFLAG_TRUE);
- sysNodeWrapper.set("operator", ShiroUtils.getUserId());
- sysNodeWrapper.set("op_time", now);
-
- sysNodeService.update(sysNodeWrapper);
-
- //node_group_rel
- List<NodeGroupRelEntity> queryBySystemId = nodeGroupRelService.queryBySystemId(entity.getId());
- if (!CommonUtil.isNull(queryBySystemId)) {
- for (NodeGroupRelEntity en : queryBySystemId) {
- if (!entity.getUuids().contains(en.getUuid())) {
- continue;
- }
- en.setDelFlag(Constant.DELFLAG_TRUE);
- en.setOperator(ShiroUtils.getUserId());
- en.setOpTime(now);
- }
- nodeGroupRelService.updateBatchById(queryBySystemId);
- }
-
- //dete_set_node_rel
- PermissionInfoEntity queryParam = new PermissionInfoEntity();
- queryParam.setRelId(entity.getId());
- queryParam.setType(Constant.PM_TYPE_DETESET);
- queryParam.setViewLevel(Constant.VIEWLEVEL_SYS);
- queryParam.setQueryColumn(Constant.DETESET_NODE_RELTYPE_NODE + "");
- queryParam.setUuids(entity.getRemoveUuids());
- List<DeteSetNodeRelEntity> queryBySystemId2 = deteSetNodeService.queryBySystemId(queryParam);
- if (!CommonUtil.isNull(queryBySystemId2)) {
- for (DeteSetNodeRelEntity en : queryBySystemId2) {
- en.setDelFlag(Constant.DELFLAG_TRUE);
- en.setOperator(ShiroUtils.getUserId());
- en.setOpTime(now);
- }
- deteSetNodeService.updateBatchById(queryBySystemId2);
- }
-
- return true;
- }
-
- /**
- * oldSysNodeRel-uuid查重,重复返回false,不重复返回true
- * @param oldSysNodeRel
- * @param uuid
- * @return
- */
- private boolean checkDuplicate(List<SystemNodeRelEntity> oldSysNodeRel, Long systemId, Long uuid) {
- boolean flag = true;
- for (SystemNodeRelEntity o : oldSysNodeRel) {
- if (o.getUuid() == uuid && o.getSystemId() == systemId) {
- flag = false;
- break;
- }
- }
- return flag;
- }
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SystemUsergroupServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SystemUsergroupServiceImpl.java
deleted file mode 100644
index ba6f3c17..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SystemUsergroupServiceImpl.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.nis.modules.sys.service.impl;
-
-import org.springframework.stereotype.Service;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.modules.sys.dao.SystemUsergroupDao;
-import com.nis.modules.sys.entity.SystemUsergroupEntity;
-import com.nis.modules.sys.service.SystemUsergroupService;
-
-@Service("systemUsergroupService")
-public class SystemUsergroupServiceImpl extends ServiceImpl<SystemUsergroupDao, SystemUsergroupEntity> implements SystemUsergroupService {
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/UserGroupServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/UserGroupServiceImpl.java
deleted file mode 100644
index 5bddf17a..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/UserGroupServiceImpl.java
+++ /dev/null
@@ -1,286 +0,0 @@
-package com.nis.modules.sys.service.impl;
-
-import com.alibaba.druid.util.StringUtils;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.smartvalidate.utils.CommonUtil;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.Query;
-import com.nis.modules.detect.entity.DeteSetInfoEntity;
-import com.nis.modules.detect.service.DeteSetInfoService;
-import com.nis.modules.mission.entity.MissionInfoEntity;
-import com.nis.modules.mission.service.MissionInfoService;
-import com.nis.modules.sys.dao.UserGroupDao;
-import com.nis.modules.sys.entity.*;
-import com.nis.modules.sys.service.PermissionInfoService;
-import com.nis.modules.sys.service.SystemUsergroupService;
-import com.nis.modules.sys.service.UserGroupService;
-import com.nis.modules.sys.service.UserUsergroupService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-
-
-@Service("userGroupService")
-public class UserGroupServiceImpl extends ServiceImpl<UserGroupDao, UserGroupEntity> implements UserGroupService {
-
- @Autowired
- private UserUsergroupService userUsergroupService;
- @Autowired
- private SystemUsergroupService systemUsergroupService;
- @Autowired
- private DeteSetInfoService deteSetService;
- @Autowired
- private MissionInfoService missionService;
- @Autowired
- private PermissionInfoService permissionService;
-
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
- IPage<UserGroupEntity2> page = new Query<UserGroupEntity2>().getPage(params);
- List<UserGroupEntity2> list = baseMapper.list(page);
- String systemIdStr = (String) params.get("systemId");
- Integer totalCount = null;
- if (!CommonUtil.isNull(list) && !StringUtils.isEmpty(systemIdStr)) {
- Long systemId = Long.valueOf(systemIdStr);
- Iterator<UserGroupEntity2> it = list.iterator();
- while (it.hasNext()) {
- UserGroupEntity2 ug = it.next();
- List<SystemInfoEntity> systems = ug.getSystems();
- if (systems != null && systems.size() > 0) {
- boolean removeFlag = true;
- for (SystemInfoEntity si : systems) {
- if (si.getId() == systemId) {
- removeFlag = false;
- break;
- }
- }
- if (removeFlag) {
- it.remove();
- }
- } else {
- it.remove();
- }
- }
- totalCount = list.size();
- }
- page.setRecords(list);
- if (totalCount != null) {
- page.setTotal(totalCount);
- }
- return new PageUtils(page);
- }
-
- @Override
- public List<UserGroupEntity> queryByUser(Long userId) {
- List<UserGroupEntity> queryByUser = baseMapper.queryByUser(userId);
- return queryByUser;
- }
-
- @Override
- public UserGroupEntity2 queryDetail(Long id) {
- UserGroupEntity2 entity = baseMapper.queryDetail(id);
- return entity;
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean save(UserGroupEntity entity) {
- /*
- * insert三个表:user_group、system_usergroup_rel、user_usergroup
- * */
- Date now = new Date();
- entity.setOperator(ShiroUtils.getUserId());
- entity.setOpTime(now);
- baseMapper.insert(entity);
-
- List<Long> userIds = entity.getUserIds();
- if (!CommonUtil.isNull(userIds)) {
- List<UserUsergroupEntity> uugs = new ArrayList<>();
- for (Long userId : userIds) {
- UserUsergroupEntity uug = new UserUsergroupEntity();
- uug.setGroupId(entity.getId());
- uug.setOperator(ShiroUtils.getUserId());
- uug.setOpTime(now);
- uug.setUserId(userId);
- uugs.add(uug);
- }
- userUsergroupService.saveBatch(uugs);
- }
-
- List<Long> systemIds = entity.getSystemIds();
- if (!CommonUtil.isNull(systemIds)) {
- List<SystemUsergroupEntity> sugs = new ArrayList<>();
- for (Long systemId : systemIds) {
- SystemUsergroupEntity sug = new SystemUsergroupEntity();
- sug.setOperator(ShiroUtils.getUserId());
- sug.setOpTime(now);
- sug.setUsergroupId(entity.getId());
- sug.setSystemId(systemId);
- sugs.add(sug);
- }
- systemUsergroupService.saveBatch(sugs);
- }
-
- return true;
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean update(UserGroupEntity userGroup) {
- Date now = new Date();
-
- UserGroupEntity2 oldEntity = baseMapper.queryDetail(userGroup.getId());
-
- userGroup.setOperator(ShiroUtils.getUserId());
- userGroup.setOpTime(now);
- baseMapper.updateById(userGroup);
-
- /*和system、user的关联,旧的全删,新的全加*/
- //删旧
- List<SystemInfoEntity> systems = oldEntity.getSystems();
- List<SysUserEntity> users = oldEntity.getUsers();
- List<Long> oldSystemIds = new ArrayList<>();
- List<Long> oldUserIds = new ArrayList<>();
- for (SystemInfoEntity system : systems) {
- oldSystemIds.add(system.getId());
- }
- for (SysUserEntity user : users) {
- oldUserIds.add(user.getUserId());
- }
- if (oldSystemIds.size() > 0) {
- UpdateWrapper<SystemUsergroupEntity> sugWrapper = new UpdateWrapper<>();
- sugWrapper.in(true, "system_id", oldSystemIds);
- sugWrapper.eq(true, "usergroup_id", userGroup.getId());
- sugWrapper.eq(true, "del_flag", Constant.DELFLAG_FALSE);
- sugWrapper.set(true, "del_flag", Constant.DELFLAG_TRUE);
- systemUsergroupService.update(sugWrapper);
- }
- if (oldUserIds.size() > 0) {
- UpdateWrapper<UserUsergroupEntity> uugWrapper = new UpdateWrapper<>();
- uugWrapper.in(true, "user_id", oldUserIds);
- uugWrapper.eq(true, "group_id", userGroup.getId());
- uugWrapper.eq(true, "del_flag", Constant.DELFLAG_FALSE);
- uugWrapper.set(true, "del_flag", Constant.DELFLAG_TRUE);
- userUsergroupService.update(uugWrapper);
- }
- //加新
- List<Long> systemIds = userGroup.getSystemIds();
- List<Long> userIds = userGroup.getUserIds();
- if (!CommonUtil.isNull(systemIds)) {
- List<SystemUsergroupEntity> newSugs = new ArrayList<>();
- for (Long systemId : systemIds) {
- SystemUsergroupEntity newSug = new SystemUsergroupEntity();
- newSug.setOperator(ShiroUtils.getUserId());
- newSug.setOpTime(now);
- newSug.setSystemId(systemId);
- newSug.setUsergroupId(userGroup.getId());
- newSugs.add(newSug);
- }
- systemUsergroupService.saveBatch(newSugs);
- }
- if (!CommonUtil.isNull(userIds)) {
- List<UserUsergroupEntity> newUugs = new ArrayList<>();
- for (Long userId : userIds) {
- UserUsergroupEntity newUug = new UserUsergroupEntity();
- newUug.setOperator(ShiroUtils.getUserId());
- newUug.setOpTime(now);
- newUug.setGroupId(userGroup.getId());
- newUug.setUserId(userId);
- newUugs.add(newUug);
- }
- userUsergroupService.saveBatch(newUugs);
- }
- return true;
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public boolean delete(List<Long> ids) {
- Date now = new Date();
- /*删除user_group、user_usergroup、system_usergroup_rel、permission_info(分为任务和监测设置)*/
- //待删除的permission
- List<PermissionInfoEntity> waitingDeletePermissions = new ArrayList<>();
-
- //删除user_group
- UpdateWrapper<UserGroupEntity> ugWrapper = new UpdateWrapper<>();
- ugWrapper.in(true, "id", ids);
- ugWrapper.eq(true, "del_flag", Constant.DELFLAG_FALSE);
- ugWrapper.set(true, "del_flag", Constant.DELFLAG_TRUE);
- ugWrapper.set(true, "op_time", now);
- ugWrapper.set(true, "operator", ShiroUtils.getUserId());
- update(ugWrapper);
-
- //删除user_usergroup
- UpdateWrapper<UserUsergroupEntity> uugWrapper = new UpdateWrapper<>();
- uugWrapper.in(true, "group_id", ids);
- uugWrapper.eq(true, "del_flag", Constant.DELFLAG_FALSE);
- uugWrapper.set(true, "del_flag", Constant.DELFLAG_TRUE);
- uugWrapper.set(true, "op_time", now);
- uugWrapper.set(true, "operator", ShiroUtils.getUserId());
- userUsergroupService.update(uugWrapper);
-
- //删除system_usergroup_rel
- UpdateWrapper<SystemUsergroupEntity> sugWrapper = new UpdateWrapper<>();
- sugWrapper.in(true, "usergroup_id", ids);
- sugWrapper.eq(true, "del_flag", Constant.DELFLAG_FALSE);
- sugWrapper.set(true, "del_flag", Constant.DELFLAG_TRUE);
- sugWrapper.set(true, "op_time", now);
- sugWrapper.set(true, "operator", ShiroUtils.getUserId());
- systemUsergroupService.update(sugWrapper);
-
- //删除permission_info
- //--监测设置
- PermissionInfoEntity pi = new PermissionInfoEntity();
- pi.setType(Constant.PM_TYPE_DETESET);
- pi.setRelIds(ids);
- pi.setViewLevel(Constant.VIEWLEVEL_UG);
- List<DeteSetInfoEntity> dsByPermission = deteSetService.queryByPermission(pi);
- if (!CommonUtil.isNull(dsByPermission)) {
- for (DeteSetInfoEntity ds : dsByPermission) {
- PermissionInfoEntity waitingDelete = ds.getPermission();
- waitingDelete.setDelFlag(Constant.DELFLAG_TRUE);
- waitingDelete.setOperator(ShiroUtils.getUserId());
- waitingDelete.setOpTime(now);
- waitingDeletePermissions.add(waitingDelete);
- }
- }
- //--任务
- pi.setType(Constant.PM_TYPE_MISSION);
- List<MissionInfoEntity> msByPermission = missionService.queryByPermission(pi);
- if (!CommonUtil.isNull(msByPermission)) {
- for (MissionInfoEntity ds : msByPermission) {
- PermissionInfoEntity waitingDelete = ds.getPermission();
- waitingDelete.setDelFlag(Constant.DELFLAG_TRUE);
- waitingDelete.setOperator(ShiroUtils.getUserId());
- waitingDelete.setOpTime(now);
- waitingDeletePermissions.add(waitingDelete);
- }
- }
- //--删除permission
- if (!CommonUtil.isNull(waitingDeletePermissions)) {
- permissionService.updateBatchById(waitingDeletePermissions);
- }
-
- return true;
- }
-
- @Override
- public boolean checkName(UserGroupEntity entity) {
- List<UserGroupEntity> list = this.list(new QueryWrapper<UserGroupEntity>().eq(true, "name", entity.getName()).eq(true, "del_flag", Constant.DELFLAG_FALSE));
- boolean dumpFlag = true; //是否名称重复,true为重复
-
- //当只有一个结果并且这个结果是自身时,或没有结果时,说明名称不重复
- if (CommonUtil.isNull(list) ||
- (list != null && list.size() == 1 && list.get(0).getId().longValue() == entity.getId().longValue())) {
- dumpFlag = false;
- }
- return dumpFlag;
- }
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/UserUsergroupServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/UserUsergroupServiceImpl.java
deleted file mode 100644
index 01e2e5cd..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/UserUsergroupServiceImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package com.nis.modules.sys.service.impl;
-
-import com.nis.common.exception.NZException;
-import com.nis.common.smartvalidate.utils.CommonUtil;
-import com.nis.common.utils.RCode;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.utils.Constant;
-import com.nis.common.utils.PageUtils;
-import com.nis.common.utils.Query;
-
-import com.nis.modules.sys.dao.UserUsergroupDao;
-import com.nis.modules.sys.entity.UserUsergroupEntity;
-import com.nis.modules.sys.service.UserUsergroupService;
-import com.nis.modules.sys.shiro.ShiroUtils;
-
-
-@Service("userUsergroupService")
-public class UserUsergroupServiceImpl extends ServiceImpl<UserUsergroupDao, UserUsergroupEntity> implements UserUsergroupService {
-
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
- IPage<UserUsergroupEntity> page = this.page(
- new Query<UserUsergroupEntity>().getPage(params),
- new QueryWrapper<UserUsergroupEntity>()
- );
-
- return new PageUtils(page);
- }
-
- public boolean checkUserGroupCorrect(Long userId,Long[] userGroupIds){
- if(userGroupIds==null||userGroupIds.length<1){
- throw new NZException(RCode.SYS_USERGROUPLIST_ISNULL);
- }
- Integer count=this.getBaseMapper().checkUserGroupCorrect(userId,userGroupIds);
- return userGroupIds.length==count.intValue();
- }
-
- @Override
- public List<Long> queryByUserId(Long userId) {
- QueryWrapper<UserUsergroupEntity> wrapper = new QueryWrapper<>();
- wrapper.eq("user_id", userId);
- wrapper.eq("del_flag", Constant.DELFLAG_FALSE);
- List<UserUsergroupEntity> selectList = baseMapper.selectList(wrapper);
- List<Long> usergroupIds = new ArrayList<>();
- for (UserUsergroupEntity e : selectList) {
- usergroupIds.add(e.getGroupId());
- }
- return usergroupIds;
- }
-
- @Override
- public boolean saveOrUpdate(Long userId, List<Long> usergroupIds) {
- Date now = new Date();
- UpdateWrapper<UserUsergroupEntity> w = new UpdateWrapper<>();
- w.eq("del_flag", Constant.DELFLAG_FALSE);
- w.eq("user_id", userId);
- w.set("del_flag", Constant.DELFLAG_TRUE);
- w.set("operator", ShiroUtils.getUserId());
- w.set("op_time", now);
- this.update(w);
-
- if (!CommonUtil.isNull(usergroupIds)) {
- List<UserUsergroupEntity> ls = new ArrayList<>();
- for (Long ugId : usergroupIds) {
- UserUsergroupEntity u = new UserUsergroupEntity();
- u.setDelFlag(Constant.DELFLAG_FALSE);
- u.setGroupId(ugId);
- u.setUserId(userId);
- u.setOperator(ShiroUtils.getUserId());
- u.setOpTime(now);
- ls.add(u);
- }
- this.saveBatch(ls);
- }
- return true;
- }
-
-} \ No newline at end of file
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/controller/TopoController.java b/nezha-admin/src/main/java/com/nis/modules/topo/controller/TopoController.java
deleted file mode 100644
index 0bb10541..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/controller/TopoController.java
+++ /dev/null
@@ -1,174 +0,0 @@
-package com.nis.modules.topo.controller;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.nis.common.smartvalidate.ValidateUtils;
-import com.nis.common.utils.R;
-import com.nis.common.utils.RCode;
-import com.nis.modules.sys.controller.AbstractController;
-import com.nis.modules.sys.entity.SysDictEntity;
-import com.nis.modules.sys.shiro.ShiroUtils;
-import com.nis.modules.topo.entity.TopoInfoEntity;
-import com.nis.modules.topo.entity.TopoLineInfoEntity;
-import com.nis.modules.topo.entity.TopoNodeInfoEntity;
-import com.nis.modules.topo.service.TopoInfoService;
-import com.nis.modules.topo.service.TopoLineInfoService;
-import com.nis.modules.topo.service.TopoNodeInfoService;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
-
-
-/**
- *
- * @ClassName:TopoController
- * @Description:拓扑图模块
- * @author hyx
- * @date 2019年7月24日
- */
-@Api(tags="拓扑图模块")
-@RestController
-@RequestMapping("/topo")
-public class TopoController extends AbstractController{
- @Autowired
- private TopoInfoService topoInfoService;
- @Autowired
- private TopoNodeInfoService topoNodeInfoService;
- @Autowired
- private TopoLineInfoService topoLineInfoService;
-
- /**
- *
- * @Title: list
- * @Description: 拓扑图列表查询
- * @param @param params map封装对应的条件信息
- * @param @return 设定文件
- * @return R 返回类型
- * @throws
- */
- @ApiOperation(httpMethod="GET", response = TopoInfoEntity.class, value="拓扑图列表查询", notes="拓扑图列表查询")
- @ApiImplicitParams({
- @ApiImplicitParam(paramType="query", name = "id", value = "拓扑图id", required = false, dataType = "long", defaultValue=""),
- @ApiImplicitParam(paramType="query", name = "systemId", value = "业务系统id", required = false, dataType = "long", defaultValue="")
- })
- @RequestMapping("/list")
- public R list(Long id,Long systemId){
- //global业务系统,systemId的值来自请求参数,普通业务系统systemId的值,则后台获取
- if(!ShiroUtils.isGlobal()) {
- systemId = ShiroUtils.getCurrSystemId();
- }
-
- Map<String, Object> params=new HashMap<String, Object>();
- params.put("id", id);
- params.put("systemId", systemId);
- List<TopoInfoEntity> topoInfoList = topoInfoService.queryTopoInfoList(params);
- Map<String, List<TopoInfoEntity>> map = new HashMap<String, List<TopoInfoEntity>>();
- map.put("list", topoInfoList);
- return R.ok().put("data", map);
- }
-
- /**
- *
- * @Title: detail
- * @Description: 拓扑图详情查询
- * @param @param params map封装对应的条件信息
- * @param @return 设定文件
- * @return R 返回类型
- * @throws
- */
- @ApiOperation(httpMethod="GET", response = TopoInfoEntity.class, value="拓扑图详情查询", notes="拓扑图详情查询,查出所有点、线")
- @ApiImplicitParams({
- @ApiImplicitParam(paramType="query", name = "id", value = "拓扑图id", required = true, dataType = "long", defaultValue="")
- })
- @RequestMapping("/detail")
- public R detail(@RequestParam("id") Long id){
- ValidateUtils.is(id).notNull(RCode.NOT_NULL_ERROR);
- TopoInfoEntity topoInfo = topoInfoService.queryTopoInfoById(id);
- return R.ok().put("data", topoInfo);
- }
-
- @ApiOperation(httpMethod = "POST", value = "拓扑图节点新增")
- @RequestMapping("/saveNode")
-// @RequiresPermissions("topo:toponodeinfo:save")
- public R saveNode(@RequestBody TopoNodeInfoEntity topoNodeInfoEntity) {
- topoNodeInfoEntity.setOperator(getUserId());
- topoNodeInfoEntity.setOpTime(new Date());
- topoNodeInfoService.save(topoNodeInfoEntity);
- return R.ok();
- }
-
- @ApiOperation(httpMethod = "PUT", value = " 拓扑图节点修改")
- @RequestMapping("/updateNode")
-// @RequiresPermissions("topo:toponodeinfo:update")
- public R updateNode(@RequestBody TopoNodeInfoEntity topoNodeInfoEntity) {
- ValidateUtils.is(topoNodeInfoEntity.getId()).notNull(RCode.NOT_NULL_ERROR);
- topoNodeInfoService.updateById(topoNodeInfoEntity);
- return R.ok();
- }
-
- @ApiOperation(httpMethod = "DELETE", value = " 拓扑图节点删除")
- @RequestMapping("/deleteNode")
-// @RequiresPermissions("topo:toponodeinfo:delete")
- public R deleteNode(@RequestParam("id") Long id){
- ValidateUtils.is(id).notNull(RCode.NOT_NULL_ERROR);
- topoNodeInfoService.delete(id);
- return R.ok();
- }
-
- @ApiOperation(httpMethod = "POST", value = " 拓扑图连线新增")
- @RequestMapping("/saveLine")
-// @RequiresPermissions("topo:topolineinfo:save")
- public R saveLine(@RequestBody TopoLineInfoEntity topoLineInfoEntity) {
- topoLineInfoEntity.setOperator(getUserId());
- topoLineInfoEntity.setOpTime(new Date());
- topoLineInfoService.save(topoLineInfoEntity);
- return R.ok();
- }
-
- @ApiOperation(httpMethod = "PUT", value = " 拓扑图连线修改")
- @RequestMapping("/updateLine")
-// @RequiresPermissions("topo:topolineinfo:update")
- public R updateLine(@RequestBody TopoLineInfoEntity topoLineInfoEntity) {
- ValidateUtils.is(topoLineInfoEntity.getId()).notNull(RCode.NOT_NULL_ERROR);
- topoLineInfoService.updateById(topoLineInfoEntity);
- return R.ok();
- }
-
- @ApiOperation(httpMethod = "DELETE", value = " 拓扑图连线删除")
- @RequestMapping("/deleteLine")
-// @RequiresPermissions("topo:topolineinfo:delete")
- public R deleteLine(@RequestParam("id") Long id){
- ValidateUtils.is(id).notNull(RCode.NOT_NULL_ERROR);
- topoLineInfoService.delete(id);
- return R.ok();
- }
-
- /**
- *
- * @Title: list
- * @Description: 拓扑节点静态图片列表查询
- * @return R 返回类型
- * @throws
- */
- @ApiOperation(httpMethod="GET", response = TopoInfoEntity.class, value="拓扑节点静态图片列表查询", notes="拓扑节点静态图片列表查询,查询sys_dict表获取所有节点图片")
- @RequestMapping("/imgList")
- public R imgList(){
- List<SysDictEntity> topoInfoList = topoInfoService.queryNodeImgList();
- Map<String, List<SysDictEntity>> map = new HashMap<String, List<SysDictEntity>>();
- map.put("list", topoInfoList);
- return R.ok().put("data", map);
- }
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoInfoDao.java b/nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoInfoDao.java
deleted file mode 100644
index a7335700..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoInfoDao.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.nis.modules.topo.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.topo.entity.TopoInfoEntity;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 拓扑图 Dao
- *
-
- */
-@Mapper
-public interface TopoInfoDao extends BaseMapper<TopoInfoEntity> {
- /**
- * 查询拓扑图列表信息
- */
- List<TopoInfoEntity> queryTopoInfoList(@Param("id") Long id,@Param("systemId")Long systemId);
-
- /**
- * 查询拓扑图详情
- */
- TopoInfoEntity queryTopoInfoById(@Param("id") Long id);
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoLineInfoDao.java b/nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoLineInfoDao.java
deleted file mode 100644
index a9c958b0..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoLineInfoDao.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
-
- *
-
- *
-
- */
-
-package com.nis.modules.topo.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.topo.entity.TopoLineInfoEntity;
-
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * 拓扑图-线
- *
-
- */
-@Mapper
-public interface TopoLineInfoDao extends BaseMapper<TopoLineInfoEntity> {
- public void delete(Long id);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoNodeInfoDao.java b/nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoNodeInfoDao.java
deleted file mode 100644
index 9739e5d5..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/dao/TopoNodeInfoDao.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
-
- *
-
- *
-
- */
-
-package com.nis.modules.topo.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.nis.modules.topo.entity.TopoNodeInfoEntity;
-
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * 拓扑图-点
- *
-
- */
-@Mapper
-public interface TopoNodeInfoDao extends BaseMapper<TopoNodeInfoEntity> {
- public void delete(Long id);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoInfoEntity.java b/nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoInfoEntity.java
deleted file mode 100644
index ad5081b8..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoInfoEntity.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package com.nis.modules.topo.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonInclude;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-/**
- * 拓扑图
- *
- */
-@Data
-@TableName("topo_info")
-@KeySequence(value="seq_topo_info")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class TopoInfoEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- **拓扑图ID
- */
- @TableId(type=IdType.INPUT)
- private Long id;
-
- /**
- * 拓扑图名称
- */
- private String name;
-
- /**
- * 业务系统ID
- */
- private Long systemId;
-
- /**
- * 图片宽度
- */
- private Integer width;
-
- /**
- * 图片高度
- */
- private Integer height;
-
- /**
- * 样式
- */
- private String style;
-
- /**
- * 创建时间
- */
- private Date opTime;
-
- /**
- * 创建人
- */
- private Long operator;
-
- /**
- * 备注
- */
- private String remarks;
-
- /**
- * 删除标识,1:删除,0:未删除
- */
- private String delFlag;
-
- /**
- * 拓扑图对于的点
- */
- @TableField(exist = false)
- private List<TopoNodeInfoEntity> topoNodes;
-
- /**
- * 拓扑图对于的线
- */
- @TableField(exist = false)
- private List<TopoLineInfoEntity> topoLines;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoLineInfoEntity.java b/nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoLineInfoEntity.java
deleted file mode 100644
index 07fe091b..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoLineInfoEntity.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.nis.modules.topo.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonInclude;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 拓扑线
- *
- */
-@Data
-@TableName("topo_line_info")
-@KeySequence(value="seq_topo_line_info")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class TopoLineInfoEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- **拓扑线ID
- */
- @TableId(type=IdType.INPUT)
- private Long id;
-
- /**
- **线起点 TOPO_NODE_INFO 表的ID
- */
- private Long src;
-
- /**
- **线终点 TOPO_NODE_INFO 表的ID
- */
- private Long dest;
-
- /**
- * 样式
- */
- private String style;
-
- /**
- * 线条文本内容
- */
- private String text;
-
- /**
- **TOPO图ID,TOPO图ID 与TOPO_INFO关联
- */
- private Long topoId;
-
- /**
- * 创建人
- */
- private Long operator;
-
- /**
- * 创建时间
- */
- private Date opTime;
-
- /**
- * 删除标识,1:删除,0:未删除
- */
- private String delFlag;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoNodeInfoEntity.java b/nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoNodeInfoEntity.java
deleted file mode 100644
index 259b535d..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/entity/TopoNodeInfoEntity.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package com.nis.modules.topo.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonInclude;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 拓扑节点
- *
- */
-@Data
-@TableName("topo_node_info")
-@KeySequence(value="seq_topo_node_info")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-public class TopoNodeInfoEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- **拓扑节点ID
- */
- @TableId(type=IdType.INPUT)
- private Long id;
-
- /**
- * 图片,字典表code值,code,sys_dict 表关联,字典type=topo-img
- */
- private String img;
-
- /**
- **TOPO图ID,TOPO图ID 与TOPO_INFO关联
- */
- private Long topoId;
-
- /**
- **NODE类型 1:节点组,2:节点,3:其它 4:topo
- */
- private Integer type;
-
- /**
- **NODE对应的节点组或节点ID 当:TYPE = 1时,为节点组ID,TYPE = 2时,为节点ID,TYPE =3 时,无意义 type=4时 topo
- */
- private Integer typeId;
-
- /**
- **x轴
- */
- private Integer x;
-
- /**
- **y轴
- */
- private Integer y;
-
- /**
- **图片宽度
- */
- private Integer width;
-
- /**
- **图片高度
- */
- private Integer height;
-
- /**
- **NODE提示文本信息
- */
- private String text;
-
- /**
- * 样式
- */
- private String style;
-
- /**
- * 阀值
- */
- private Double threshold;
-
- /**
- * 创建人
- */
- private Long operator;
-
- /**
- * 创建时间
- */
- private Date opTime;
-
- /**
- * 删除标识,1:删除,0:未删除
- */
- private String delFlag;
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/service/TopoInfoService.java b/nezha-admin/src/main/java/com/nis/modules/topo/service/TopoInfoService.java
deleted file mode 100644
index 5c4a8eff..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/service/TopoInfoService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.nis.modules.topo.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.modules.sys.entity.SysDictEntity;
-import com.nis.modules.topo.entity.TopoInfoEntity;
-
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * 拓扑图 Service
- *
- */
-public interface TopoInfoService extends IService<TopoInfoEntity> {
-
-
- List<TopoInfoEntity> queryTopoInfoList(Map<String, Object> params);
-
- TopoInfoEntity queryTopoInfoById(Long id);
-
- List<SysDictEntity> queryNodeImgList();
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/service/TopoLineInfoService.java b/nezha-admin/src/main/java/com/nis/modules/topo/service/TopoLineInfoService.java
deleted file mode 100644
index 6902f58d..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/service/TopoLineInfoService.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
-
- *
-
- *
-
- */
-
-package com.nis.modules.topo.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.modules.topo.entity.TopoLineInfoEntity;
-
-/**
- * 系统用户
- *
-
- */
-public interface TopoLineInfoService extends IService<TopoLineInfoEntity> {
- void delete(Long id);
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/service/TopoNodeInfoService.java b/nezha-admin/src/main/java/com/nis/modules/topo/service/TopoNodeInfoService.java
deleted file mode 100644
index 23c9164f..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/service/TopoNodeInfoService.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
-
- *
-
- *
-
- */
-
-package com.nis.modules.topo.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.nis.modules.topo.entity.TopoNodeInfoEntity;
-
-/**
- * 系统用户
- *
-
- */
-public interface TopoNodeInfoService extends IService<TopoNodeInfoEntity> {
- void delete(Long id);
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoInfoServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoInfoServiceImpl.java
deleted file mode 100644
index d694c3cc..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoInfoServiceImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.nis.modules.topo.service.impl;
-
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.modules.sys.dao.SysDictDao;
-import com.nis.modules.sys.entity.SysDictEntity;
-import com.nis.modules.topo.dao.TopoInfoDao;
-import com.nis.modules.topo.entity.TopoInfoEntity;
-import com.nis.modules.topo.service.TopoInfoService;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * 拓扑图 Service 实现
- *
-
- */
-@Service("topoInfoService")
-public class TopoInfoServiceImpl extends ServiceImpl<TopoInfoDao, TopoInfoEntity> implements TopoInfoService {
-
- @Autowired
- private TopoInfoDao topoInfoDao;
-
- @Autowired
- private SysDictDao sysDictDao;
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public List<TopoInfoEntity> queryTopoInfoList(Map<String, Object> params) {
- Long id= (Long)params.get("id");
- Long systemId= (Long)params.get("systemId");
-
- List<TopoInfoEntity> topoInfoList = topoInfoDao.queryTopoInfoList(id,systemId);
- return topoInfoList;
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public TopoInfoEntity queryTopoInfoById(Long id) {
- TopoInfoEntity topoInfo = topoInfoDao.queryTopoInfoById(id);
- return topoInfo;
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public List<SysDictEntity> queryNodeImgList() {
- List<SysDictEntity> sysDictList = sysDictDao.queryNodeImgList();
- return sysDictList;
- }
-
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoLineInfoServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoLineInfoServiceImpl.java
deleted file mode 100644
index cb96fefd..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoLineInfoServiceImpl.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.nis.modules.topo.service.impl;
-
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.modules.topo.dao.TopoLineInfoDao;
-import com.nis.modules.topo.dao.TopoNodeInfoDao;
-import com.nis.modules.topo.entity.TopoLineInfoEntity;
-import com.nis.modules.topo.service.TopoLineInfoService;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * 拓扑线
- *
-
- */
-@Service("topoLineInfoService")
-public class TopoLineInfoServiceImpl extends ServiceImpl<TopoLineInfoDao, TopoLineInfoEntity> implements TopoLineInfoService {
- @Autowired
- private TopoLineInfoDao topoLineInfoDao;
-
- @Override
- public void delete(Long id) {
- topoLineInfoDao.delete(id);
-
- }
-
-}
diff --git a/nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoNodeInfoServiceImpl.java b/nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoNodeInfoServiceImpl.java
deleted file mode 100644
index 1d4979aa..00000000
--- a/nezha-admin/src/main/java/com/nis/modules/topo/service/impl/TopoNodeInfoServiceImpl.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.nis.modules.topo.service.impl;
-
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.modules.topo.dao.TopoNodeInfoDao;
-import com.nis.modules.topo.entity.TopoNodeInfoEntity;
-import com.nis.modules.topo.service.TopoNodeInfoService;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * 拓扑节点
- *
-
- */
-@Service("topoNodeInfoService")
-public class TopoNodeInfoServiceImpl extends ServiceImpl<TopoNodeInfoDao, TopoNodeInfoEntity> implements TopoNodeInfoService {
- @Autowired
- private TopoNodeInfoDao topoNodeInfoDao;
-
- @Override
- public void delete(Long id) {
- topoNodeInfoDao.delete(id);
-
- }
-
-
-}
diff --git a/nezha-admin/src/main/resources/mapper/dashboard/DashboardDao.xml b/nezha-admin/src/main/resources/mapper/dashboard/DashboardDao.xml
deleted file mode 100644
index a3b82cb9..00000000
--- a/nezha-admin/src/main/resources/mapper/dashboard/DashboardDao.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.nis.modules.dashboard.dao.DashboardDao">
-
- <select id="selectAllDashboards" parameterType="java.lang.Long" resultType="com.nis.modules.dashboard.entity.DashboardEntity">
- select * from dashboard where system_id=#{systemId}
- </select>
-
- <select id="selectResultData" parameterType="java.lang.String" resultType="com.nis.modules.dashboard.entity.ChartSeriesEntity">
- ${userSql}
- </select>
-<!--
- <delete id="deleteDashboardById" parameterType="java.lang.Long">
- delete from dashboard where id=#{id}
- </delete>
-
- <insert id="insertDashboard" parameterType="com.nis.modules.dashboard.entity.DashboardEntity" useGeneratedKeys="true" keyProperty="chartId">
- insert into dashboard(
- name,
- system_id,
- chart_type,
- x,
- y,
- width,
- height,
- data,
- operator,
- op_time
- ) values (
- #{dashboard.name},
- #{dashboard.systemId},
- #{dashboard.chartType},
- #{dashboard.x},
- #{dashboard.y},
- #{dashboard.width},
- #{dashboard.height},
- #{dashboard.data},
- #{dashboard.sysUserEntity.userId},
- now()
- )
- </insert>
-
- <update id="updateDashboard">
- UPDATE dashboard SET
- name=#{dashboard.name},
- system_id=#{dashboard.systemId},
- chart_type=#{dashboard.chartType},
- x=#{dashboard.x},
- y=#{dashboard.y},
- width=#{dashboard.width},
- height=#{dashboard.height},
- data=#{dashboard.data},
- operator=#{dashboard.sysUserEntity.userId},
- op_time=now()
- WHERE id = #{dashboard.id}
- </update> -->
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/detect/DeteSetInfoDao.xml b/nezha-admin/src/main/resources/mapper/detect/DeteSetInfoDao.xml
deleted file mode 100644
index 6ad3cc1f..00000000
--- a/nezha-admin/src/main/resources/mapper/detect/DeteSetInfoDao.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.detect.dao.DeteSetInfoDao">
-
- <resultMap type="com.nis.modules.detect.entity.DeteSetInfoEntity" id="deteSetInfoMap">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="typeId" column="type_id"/>
- <result property="buildIn" column="build_in"/>
- <result property="params" column="params"/>
- <result property="viewLevel" column="view_level"/>
- <result property="state" column="state"/>
- <result property="remark" column="remark"/>
- <result property="i18nCode" column="i18n_code"/>
- <result property="operator" column="operator"/>
- <result property="permission.id" column="pm_id"/>
- <result property="permission.type" column="pm_type"/>
- <result property="permission.typeId" column="pm_type_id"/>
- <result property="permission.viewLevel" column="pm_view_level"/>
- <result property="permission.relId" column="pm_rel_id"/>
- </resultMap>
-
- <resultMap type="com.nis.modules.detect.entity.DeteSetInfoEntity" id="deteSetTypeInfo">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="typeId" column="type_id"/>
- <result property="buildIn" column="build_in"/>
- <result property="params" column="params"/>
- <result property="viewLevel" column="view_level"/>
- <result property="state" column="state"/>
- <result property="remark" column="remark"/>
- <result property="i18nCode" column="i18n_code"/>
- <result property="operator" column="operator"/>
- <association property="type" select="com.nis.modules.detect.dao.DeteTypeInfoDao.selectById" column="type_id"></association>
- </resultMap>
-
- <select id="queryList" resultMap="deteSetTypeInfo">
- select dsi.* from dete_set_info dsi where
- 1=1
- <if test="isGlobal == 0">
- and (dsi.view_level='3'
- or (dsi.view_level='2' and dsi.id=#{sysPermissionInfo.typeId})
- or(dsi.view_level='1' and dsi.id in (
- <if test="permissionInfoVL1 !=null and permissionInfoVL1.size>0 ">
- <foreach collection="permissionInfoVL1" item="pmi" open="" close="" separator=",">
- #{pmi.typeId}
- </foreach>
- </if>
- <if test="permissionInfoVL1 ==null or permissionInfoVL1.size == 0 " >
- -1
- </if>
- )))
- </if>
- <if test="name != null and name != ''">
- and dsi.name like
- <if test="_databaseId == 'oracle'">'%'||#{name}||'%'</if>
- <if test="_databaseId == 'mysql'">concat('%',#{name},'%')</if>
- <if test="_databaseId == 'postgresql'">concat('%',#{name},'%')</if>
- </if>
-
- <if test="typeId != null">
- and dsi.type_id=#{typeId}
- </if>
- and dsi.state!='1'
- </select>
- <select id="queryAllowedIds" resultType="java.lang.Long">
- select dsi.id from dete_set_info dsi where
- 1=1
- <if test="isGlobal == 0">
- and (dsi.view_level='3'
- or (dsi.view_level='2' and dsi.id=#{sysPermissionInfo.typeId})
- or(dsi.view_level='1' and dsi.id in (
- <if test="permissionInfoVL1 !=null and permissionInfoVL1.size>0 ">
- <foreach collection="permissionInfoVL1" item="pmi" open="" close="" separator=",">
- #{pmi.typeId}
- </foreach>
- </if>
- <if test="permissionInfoVL1 ==null or permissionInfoVL1.size == 0 " >
- -1
- </if>
- )))
- </if>
-
- and dsi.state!='1'
- </select>
-
- <select id="queryNodeGroups" resultType="nodeGroupInfoEntity">
- select ngi.* from nodegroup_info ngi join dete_set_node_rel snr
- on ngi.id=snr.rel_id and snr.type=2 and snr.set_id=#{setId} and ngi.del_flag='0' and snr.del_flag='0'
- </select>
-
- <select id="queryNodes" resultType="nodeInfoEntity">
- select ni.* from node_info ni join dete_set_node_rel snr on ni.id=snr.rel_id and snr.type=1 and snr.set_id=#{setId} and ni.state!='3' and snr.del_flag='0'
- </select>
-
- <select id="queryById" resultMap="deteSetTypeInfo">
- select * from dete_set_info where id=#{id} and state !='1'
- </select>
-
- <select id="queryUserGroup" resultType="userGroupEntity">
- select * from user_group where id in (select rel_id from permission_info where type='2' and view_level=1 and type_id=#{setId} and del_flag='0') and del_flag='0'
- </select>
-
- <select id="querySystem" resultType="systemInfoEntity">
- select * from system_info where id in (select rel_id from permission_info where type='2' and view_level=2 and type_id=#{setId} and del_flag='0') and del_flag='0'
- </select>
-
- <select id="queryByPermission" parameterType="permissionInfoEntity" resultMap="deteSetInfoMap">
- SELECT dsi.*, pmi.id as "pm_id", pmi.type as "pm_type", pmi.type_id as "pm_type_id",
- pmi.view_level as "pm_view_level", pmi.rel_id as "pm_rel_id"
- FROM dete_set_info dsi
- LEFT JOIN permission_info pmi ON pmi.type_id=dsi.id
- WHERE pmi.type=#{type} AND dsi.view_level=#{viewLevel} AND pmi.del_flag=0
- AND dsi.state!=1 AND pmi.rel_id IN
- <foreach collection="relIds" item="relId" index="no" open="(" separator="," close=")">
- #{relId}
- </foreach>
- </select>
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/detect/DeteSetNodeRelDao.xml b/nezha-admin/src/main/resources/mapper/detect/DeteSetNodeRelDao.xml
deleted file mode 100644
index 1a413d0b..00000000
--- a/nezha-admin/src/main/resources/mapper/detect/DeteSetNodeRelDao.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.detect.dao.DeteSetNodeRelDao">
-
- <!-- 可根据自己的需求,是否要使用 -->
- <resultMap type="com.nis.modules.detect.entity.DeteSetNodeRelEntity" id="deteSetNodeRelMap">
- <result property="id" column="id"/>
- <result property="setId" column="set_id"/>
- <result property="type" column="type"/>
- <result property="relId" column="rel_id"/>
- <result property="delFlag" column="del_flag"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
- </resultMap>
-
- <select id="queryBySystemId" parameterType="permissionInfoEntity" resultType="deteSetNodeRelEntity">
- SELECT dsnr.*
- FROM dete_set_info dsi
- LEFT JOIN permission_info pmi ON pmi.type_id=dsi.id
- LEFT JOIN dete_set_node_rel dsnr ON dsnr.set_id=dsi.id
- WHERE pmi.type=#{type} AND pmi.rel_id=#{relId} AND dsi.view_level=#{viewLevel} AND pmi.del_flag=0
- AND dsi.state!=1 AND dsnr.del_flag=0 AND dsnr.type=#{queryColumn} AND dsnr.rel_id in
- <foreach collection="uuids" item="quuid" open="(" close=")" separator=",">
- #{quuid}
- </foreach>
- </select>
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/detect/DeteTypeInfoDao.xml b/nezha-admin/src/main/resources/mapper/detect/DeteTypeInfoDao.xml
deleted file mode 100644
index 50c263cd..00000000
--- a/nezha-admin/src/main/resources/mapper/detect/DeteTypeInfoDao.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.detect.dao.DeteTypeInfoDao">
-
- <select id="queryTables" parameterType="java.lang.String" resultType="java.util.HashMap" >
- ${sql}
- </select>
-
- <update id="createTable">
- ${sql}
- </update>
-
- <select id="checkDetectSetConfigExists" parameterType="Long" resultType="Integer">
- select count(1) from dete_set_info where type_id = #{typeId}
- </select>
-
- <update id="addTableFields">
- ${sql}
- </update>
-
- <update id="delTableFields">
- ${sql}
- </update>
-
- <update id="alterTableFields">
- ${sql}
- </update>
-
- <update id="addTableIndexs">
- ${sql}
- </update>
- <update id="delTableIndexs">
- ${sql}
- </update>
- <update id="dropTable">
- ${sql}
- </update>
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/detect/DeteTypeMetaDao.xml b/nezha-admin/src/main/resources/mapper/detect/DeteTypeMetaDao.xml
deleted file mode 100644
index 3d169a06..00000000
--- a/nezha-admin/src/main/resources/mapper/detect/DeteTypeMetaDao.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.detect.dao.DeteTypeMetaDao">
-
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/detect/DeteTypeMetaMappingDao.xml b/nezha-admin/src/main/resources/mapper/detect/DeteTypeMetaMappingDao.xml
deleted file mode 100644
index 548e96de..00000000
--- a/nezha-admin/src/main/resources/mapper/detect/DeteTypeMetaMappingDao.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.detect.dao.DeteTypeMetaMappingDao">
-
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/detect/DeteTypeParamDao.xml b/nezha-admin/src/main/resources/mapper/detect/DeteTypeParamDao.xml
deleted file mode 100644
index 02b5f4cc..00000000
--- a/nezha-admin/src/main/resources/mapper/detect/DeteTypeParamDao.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.detect.dao.DeteTypeParamDao">
-
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/detect/DeteWarnInfoDao.xml b/nezha-admin/src/main/resources/mapper/detect/DeteWarnInfoDao.xml
deleted file mode 100644
index 862e2725..00000000
--- a/nezha-admin/src/main/resources/mapper/detect/DeteWarnInfoDao.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.detect.dao.DeteWarnInfoDao">
- <resultMap id="deteWarnInfoEntity" type="deteWarnInfoEntity">
- <id property="id" column="id" javaType="Long"/>
- <result property="name" column="name"/>
- <result property="metaId" column="meta_id"/>
- <result property="triggerType" column="trigger_type"/>
- <result property="mode" column="mode"/>
- <result property="statType" column="stat_type"/>
- <result property="symbol" column="symbol"/>
- <result property="threshold" column="threshold"/>
- <result property="tips" column="tips"/>
- <result property="level" column="level"/>
- <result property="callbackType" column="callback_type"/>
- <result property="callbackContent" column="callback_content"/>
- <result property="viewLevel" column="view_level"/>
- <result property="remark" column="remark"/>
- <result property="delFlag" column="del_flag"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
- <association property="meta" column="meta_id" select="com.nis.modules.detect.dao.DeteTypeMetaDao.selectById" javaType="deteTypeMetaEntity" />
- </resultMap>
- <select id="queryList" resultMap="deteWarnInfoEntity">
- select dwi.* from dete_warn_info dwi where
- 1=1
- <if test="name !=null and name != ''">
- and dwi.name like
- <if test="_databaseId == 'oracle'">'%'||#{name}||'%'</if>
- <if test="_databaseId == 'mysql'">concat('%',#{name},'%')</if>
- <if test="_databaseId == 'postgresql'">concat('%',#{name},'%')</if>
- </if>
- and dwi.del_flag='0'
- AND EXISTS ( SELECT * from dete_warn_rel dwr WHERE dwr.del_flag = '0'
- AND dwi.id = dwr.warn_id
- and (dwr.rel_type='1' or dwr.rel_type='2' and dwr.rel_id in (
- <if test="allowedSetIds != null and allowedSetIds.length gt 0">
- <foreach collection="allowedSetIds" open="" close="" separator="," item="setId">
- #{setId}
- </foreach>
- </if>
- <if test="allowedSetIds == null or allowedSetIds.length == 0">
- -1
- </if>
- ))
- <if test="typeId != null and setId == null">
- and dwr.rel_type='1' and dwr.rel_id=#{typeId}
- </if>
- <if test="setId != null">
- and dwr.rel_type='2' and dwr.rel_id=#{setId}
- </if>
- )
- order by dwi.warn_level desc,dwi.op_time desc
- </select>
-
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/detect/DeteWarnRelDao.xml b/nezha-admin/src/main/resources/mapper/detect/DeteWarnRelDao.xml
deleted file mode 100644
index 3fa3a22e..00000000
--- a/nezha-admin/src/main/resources/mapper/detect/DeteWarnRelDao.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.detect.dao.DeteWarnRelDao">
- <select id="queryWarnRel" resultType="deteWarnRelEntity">
- select warn_id,rel_type,
- <if test="_databaseId == 'oracle'">WM_CONCAT(rel_id) rel_ids</if>
- <if test="_databaseId == 'mysql'">GROUP_CONCAT(rel_id) rel_ids </if>
- <if test="_databaseId == 'postgresql'">string_agg(rel_id,',') rel_ids</if>
- from dete_warn_rel where warn_id=#{warnId} and del_flag='0' group by warn_id,rel_type
- </select>
-
- <select id="queryByTypeId" resultType="deteWarnRelEntity">
- select * from dete_warn_rel dwr where (dwr.rel_type='1' and dwr.rel_id=#{typeId})
- or (dwr.rel_type='2' and exists(select * from dete_set_info dsi where dsi.type_id=#{typeId} and dsi.state!='1' and dwr.rel_id=dsi.id))
- and dwr.del_flag='0'
-
- </select>
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/mission/MissionInfoDao.xml b/nezha-admin/src/main/resources/mapper/mission/MissionInfoDao.xml
deleted file mode 100644
index 5e5dd284..00000000
--- a/nezha-admin/src/main/resources/mapper/mission/MissionInfoDao.xml
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.mission.dao.MissionInfoDao">
-
- <!-- 可根据自己的需求,是否要使用 -->
- <resultMap type="com.nis.modules.mission.entity.MissionInfoEntity" id="missionInfoMap">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="type" column="type"/>
- <result property="state" column="state"/>
- <result property="viewLevel" column="view_level"/>
- <result property="isLoop" column="is_loop"/>
- <result property="loopInterval" column="loop_interval"/>
- <result property="param" column="param"/>
- <result property="remark" column="remark"/>
- <result property="delFlag" column="del_flag"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
- <result property="permission.id" column="pm_id"/>
- <result property="permission.type" column="pm_type"/>
- <result property="permission.typeId" column="pm_type_id"/>
- <result property="permission.viewLevel" column="pm_view_level"/>
- <result property="permission.relId" column="pm_rel_id"/>
- </resultMap>
-
- <!-- 关联表查询结果封装 -->
- <resultMap type="com.nis.modules.mission.entity.MissionInfoEntity" id="missionInfoUnio">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="type" column="type"/>
- <result property="state" column="state"/>
- <result property="viewLevel" column="view_level"/>
- <result property="isLoop" column="is_loop"/>
- <result property="loopInterval" column="loop_interval"/>
- <result property="param" column="param"/>
- <result property="remark" column="remark"/>
- <result property="delFlag" column="del_flag"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
- </resultMap>
-
-
- <!-- 任务列表查询 -->
- <select id="selectMissionInfoList" resultMap="missionInfoMap">
- SELECT mi.*
- FROM mission_info mi
- INNER JOIN permission_info p
- WHERE 1=1
- <if test="missionInfo.isGlobal==null">
- (mi.view_level='3'
- OR (mi.view_level='2' AND p.type=4 AND p.type_id=mi.id AND p.rel_id=#{missionInfo.user.currSystemId})
- OR (mi.view_level='1' AND p.type=4 AND p.type_id=mi.id AND p.rel_id in
- <foreach collection="missionInfo.user.usergroups" item="item" open="" close="" separator=",">
- #{item.id}
- </foreach>
- ))
- </if>
- <if test="missionInfo.isLoop != null and missionInfo.isLoop !=''">
- AND mi.is_loop=#{missionInfo.isLoop}
- </if>
- <if test="missionInfo.type != null and missionInfo.type !=''">
- AND mi.type=#{missionInfo.type}
- </if>
- <if test="missionInfo.name != null and missionInfo.name !=''">
- AND mi.name like
- <if test="_databaseId == 'oracle'">'%'||#{missionInfo.name}||'%'</if>
- <if test="_databaseId == 'mysql'">concat('%',#{missionInfo.name},'%')</if>
- <if test="_databaseId == 'postgresql'">concat('%',#{missionInfo.name},'%')</if>
- </if>
- and mi.del_flag=0 and p.del_flag=0
- GROUP BY mi.id
- </select>
-
- <select id="queryByPermission" parameterType="permissionInfoEntity" resultMap="missionInfoMap">
- SELECT mi.*, pmi.id as pm_id, pmi.type as pm_type, pmi.type_id as pm_type_id,
- pmi.view_level as pm_view_level, pmi.rel_id as pm_rel_id
- FROM mission_info mi
- LEFT JOIN permission_info pmi ON pmi.type_id=mi.id
- WHERE pmi.type=#{type} AND mi.view_level=#{viewLevel} AND pmi.del_flag=0
- AND mi.del_flag=0 AND pmi.rel_id IN
- <foreach collection="relIds" item="relId" index="no" open="(" separator="," close=")">
- #{relId}
- </foreach>
- </select>
-
- <select id="checkNodeGroupCorrect" resultType="com.nis.modules.mission.entity.MissionDto">
- select count(DISTINCT ngi.id) dgnic,
- count(case when ni.uuid is null then 1 end) ngnnc,
- count(case when ni.type = 2 then 1 end) nnc
- from nodegroup_info ngi left join node_group_rel ngr on ngi.id = ngr.group_id
- left join node_info ni on ngr.uuid=ni.uuid
- where ngi.del_flag=0 and ngi.id in
- <foreach collection="nodeGroupIds" item="nodeGroupId" open="(" separator="," close=")">
- #{nodeGroupId}
- </foreach>
- </select>
- <select id="checkNodeCorrect" resultType="com.nis.modules.mission.entity.MissionDto">
- select count(1) total,
- count(case when ni.type = 2 then 1 end) nnc
- from node_info ni
- where
- ni.id in
- <foreach collection="nodeIds" item="nodeId" open="(" separator="," close=")">
- #{nodeId}
- </foreach>
- </select>
- <select id="selectNodeGroupOrNodeForCheck" resultType="com.nis.modules.mission.entity.MissionDto">
- select ngi.id nodeGroupIds
- from nodegroup_info ngi left join node_group_rel ngr on ngi.id = ngr.group_id
- left join node_info ni on ngr.uuid=ni.uuid
- where ngi.del_flag=0 and ni.state!=2
- <if test="nodeGroupIds!=null">
- and ngi.id in
- <foreach collection="nodeGroupIds" item="nodeGroupId" open="(" separator="," close=")">
- #{nodeGroupId}
- </foreach>
- </if>
- <if test="nodeIds!=null">
- and ni.id in
- <foreach collection="nodeIds" item="nodeId" open="(" separator="," close=")">
- #{nodeId}
- </foreach>
- </if>
- </select>
-
-
- <select id="selectNodeGroupByMissionid" resultType="com.nis.modules.node.entity.NodeGroupInfoEntity">
- select ngi.* from
- mission_node_rel mnr left join nodegroup_info ngi on mnr.rel_id = ngi.id
- where mnr.type=1 and ngi.del_flag=0 and mnr.mission_id=#{missionId}
- </select>
-
- <select id="selectNodeByMissionid" resultType="com.nis.modules.node.entity.NodeInfoEntity">
- select ni.* from
- mission_node_rel mnr left join node_info ni on mnr.rel_id = ni.id
- where mnr.type=2 and ni.state=1 and mnr.mission_id=#{missionId}
- </select>
-
-
- <select id="selectUserGroup" resultType="com.nis.modules.sys.entity.UserGroupEntity">
- select * from user_group where id in (select rel_id from permission_info where type='4' and view_level=1 and type_id=#{missionId} and del_flag='0') and del_flag='0'
- </select>
-
- <select id="selectSystem" resultType="com.nis.modules.sys.entity.SystemInfoEntity">
- select * from system_info where id in (select rel_id from permission_info where type='4' and view_level=2 and type_id=#{missionId} and del_flag='0') and del_flag='0'
- </select>
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/mission/MissionNodeRelDao.xml b/nezha-admin/src/main/resources/mapper/mission/MissionNodeRelDao.xml
deleted file mode 100644
index 831432cc..00000000
--- a/nezha-admin/src/main/resources/mapper/mission/MissionNodeRelDao.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.mission.dao.MissionNodeRelDao">
-
- <!-- 可根据自己的需求,是否要使用 -->
- <resultMap type="com.nis.modules.mission.entity.MissionNodeRelEntity" id="missionNodeRelMap">
- <result property="id" column="id"/>
- <result property="missionId" column="mission_id"/>
- <result property="type" column="type"/>
- <result property="relId" column="rel_id"/>
- <result property="delFlag" column="del_flag"/>
- <result property="opTime" column="op_time"/>
- <result property="operator" column="operator"/>
- </resultMap>
-
- <select id="selectNodeGroupEntityByMissionid" parameterType="java.lang.Long" resultType="com.nis.modules.node.entity.NodeGroupInfoEntity">
- select ni.* from
- mission_node_rel mnr,nodegroup_info ni
- where mnr.del_flag=0 and mnr.type=1 and mnr.mission_id=#{missionId}
- and ni.del_flag=0 and ni.id=mnr.rel_id
- </select>
-
- <select id="selectNodeEntityByMissionid" parameterType="java.lang.Long" resultType="com.nis.modules.node.entity.NodeGroupInfoEntity">
- select ni.* from
- mission_node_rel mnr,node_info ni
- where mnr.del_flag=0 and mnr.type=2 and mnr.mission_id=#{missionId}
- and ni.id=mnr.rel_id and ni.state=1
- </select>
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/mission/MissionResultDao.xml b/nezha-admin/src/main/resources/mapper/mission/MissionResultDao.xml
deleted file mode 100644
index bda72c06..00000000
--- a/nezha-admin/src/main/resources/mapper/mission/MissionResultDao.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.mission.dao.MissionResultDao">
-
- <!-- 可根据自己的需求,是否要使用 -->
- <resultMap type="com.nis.modules.mission.entity.MissionResultEntity" id="missionResultMap">
- <result property="id" column="id"/>
- <result property="missionId" column="mission_id"/>
- <result property="uuid" column="uuid"/>
- <result property="desc" column="desc"/>
- <result property="state" column="state"/>
- <result property="cycle" column="cycle"/>
- <result property="file" column="file"/>
- <result property="opTime" column="op_time"/>
- <result property="operator" column="operator"/>
- <association property="nodeInfoEntity" javaType="com.nis.modules.node.entity.NodeInfoEntity" columnPrefix="node_">
- <id column="id" property="id"/>
- <result column="name" property="name"/>
- <result column="ip" property="ip"/>
- <result column="uuid" property="uuid"/>
- </association>
- </resultMap>
-
- <select id="selectMissionResultInfoList" resultMap="missionResultMap">
- select mr.*,ni.uuid node_uuid,ni.ip node_ip,ni.name node_name from mission_result mr left join node_info ni on mr.uuid=ni.uuid
- where mr.mission_id=#{id}
- </select>
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/node/NodeCabinetDao.xml b/nezha-admin/src/main/resources/mapper/node/NodeCabinetDao.xml
deleted file mode 100644
index 4bcd23bf..00000000
--- a/nezha-admin/src/main/resources/mapper/node/NodeCabinetDao.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.node.dao.NodeCabinetDao">
-
- <resultMap type="com.nis.modules.node.entity.NodeCabinetEntity" id="cabinetsWithRoom">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="roomId" column="room_id"/>
- <result property="roomRow" column="room_row"/>
- <result property="roomCol" column="room_col"/>
- <result property="ubit" column="ubit"/>
- <result property="remarks" column="remarks"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
-
- <!-- 机房名称 -->
- <result property="roomName" column="roomName"/>
- </resultMap>
-
- <resultMap type="com.nis.modules.node.entity.NodeCabinetEntity" id="cabinetsWithNodes">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="roomId" column="room_id"/>
- <result property="roomRow" column="room_row"/>
- <result property="roomCol" column="room_col"/>
- <result property="ubit" column="ubit"/>
- <result property="remarks" column="remarks"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
-
- <!-- 机房名称 -->
- <result property="roomName" column="roomName"/>
-
- <!-- 节点列表 -->
- <collection property="nodes" column="id" select="queryNodesByCabinetId"
- ofType="com.nis.modules.node.entity.NodeInfoEntity" >
- <id property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="ip" column="ip"/>
- <result property="uuid" column="uuid"/>
- <result property="uSize" column="u_size"/>
- <result property="cabinetStart" column="cabinet_start"/>
- </collection>
- </resultMap>
-
- <!-- 返回选择机房下占用机柜最大行列 -->
- <resultMap type="com.nis.modules.node.entity.NodeCabinetEntity" id="cabMaxRowCols">
- <result property="maxRows" column="MAXROWS" javaType="Integer" jdbcType="NUMERIC"/>
- <result property="maxCols" column="MAXCOLS" javaType="Integer" jdbcType="NUMERIC"/>
- </resultMap>
-
- <!-- 根据 机房 ID 得到包含机柜中的最大行号 -->
- <select id="getCabMaxRowCol" resultMap="cabMaxRowCols">
- SELECT MAX(room_row) AS MAXROWS , MAX(room_col) AS MAXCOLS FROM node_cabinet WHERE room_id = #{roomId} AND
- del_flag = 0
- </select>
-
- <!-- 根据机房的行 的到目前占用的列 -->
- <select id="getColsByRow" resultType="java.lang.Integer">
- SELECT room_col FROM node_cabinet WHERE room_row = #{roomRow} AND room_id = #{roomId} AND del_flag = 0 ORDER BY room_col
- </select>
-
-
- <!-- 机柜列表查询 包含机房名称 -->
- <select id="queryPage" resultMap="cabinetsWithRoom">
- SELECT nc.*,nr.name AS roomName FROM node_cabinet nc
- LEFT JOIN node_room nr ON nc.room_id = nr.id
- WHERE nc.del_flag = 0 AND nr.del_flag = 0
-
- <if test="params.name != null and params.name != ''">
- AND nc.name LIKE
- <if test="_databaseId == 'oracle'">'%'||#{params.name}||'%'</if>
- <if test="_databaseId == 'mysql'">CONCAT('%', #{params.name}, '%')</if>
- <if test="_databaseId == 'postgresql'">CONCAT('%', #{params.name}, '%')</if>
- </if>
-
- <if test="params.roomId != null and params.roomId != ''">
- AND nc.room_id = #{params.roomId}
- </if>
- </select>
-
- <!-- 机柜详情查询 包含机房名称 包含节点列表 -->
- <select id="detail" resultMap="cabinetsWithNodes">
- SELECT nc.*,nr.name AS roomName FROM node_cabinet nc
- LEFT JOIN node_room nr ON nc.room_id = nr.id
- WHERE nc.del_flag = 0 AND nr.del_flag = 0 AND nc.id = #{id}
- </select>
-
- <select id="queryNodesByCabinetId" resultType="com.nis.modules.node.entity.NodeInfoEntity">
- SELECT ni.id,ni.name,ni.ip,ni.uuid,ni.u_size,ni.cabinet_start FROM node_info ni WHERE ni.cabinet_id = #{id}
- AND ni.state != 3
- </select>
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/node/NodeGroupInfoDao.xml b/nezha-admin/src/main/resources/mapper/node/NodeGroupInfoDao.xml
deleted file mode 100644
index e85dea34..00000000
--- a/nezha-admin/src/main/resources/mapper/node/NodeGroupInfoDao.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.node.dao.NodeGroupInfoDao">
-
- <!-- 可根据自己的需求,是否要使用 -->
- <resultMap type="com.nis.modules.node.entity.NodeGroupInfoEntity" id="nodegroupInfoMap">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="systemId" column="system_id"/>
- <result property="pid" column="pid"/>
- <result property="pids" column="pids"/>
- <result property="remark" column="remark"/>
- <result property="delFlag" column="del_flag"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
- </resultMap>
-
-
- <select id="assList" resultType="com.nis.modules.node.entity.NodeInfoEntity">
- SELECT t.name,t.host_name,t.ip,t.ip_long,t.uuid,t.type,t.tag FROM
- (
- SELECT ni.name,ni.host_name,ni.ip,ni.ip_long,ni.uuid,ni.type,ni.tag FROM system_node_rel snr
- LEFT JOIN node_info ni ON snr.uuid = ni.uuid
- WHERE snr.system_id = #{params.systemId} AND snr.del_flag = 0 AND ni.state != 3
-
- <if test="params.ip != null and params.ip != ''">
- AND ni.ip LIKE
-
- <if test="_databaseId == 'oracle'">'%'||#{params.ip}||'%'</if>
- <if test="_databaseId == 'mysql'">CONCAT('%', #{params.ip}, '%')</if>
- <if test="_databaseId == 'postgresql'">CONCAT('%', #{params.ip}, '%')</if>
- </if>
- ) t
-
- LEFT JOIN
-
- (
- SELECT ni.uuid AS i FROM node_group_rel ngr
- LEFT JOIN node_info ni ON ngr.uuid = ni.uuid
- WHERE ngr.del_flag = 0 AND ni.state != 3 AND ngr.group_id = #{params.groupId}
- ) t1 ON t.uuid = t1.i
-
- WHERE t1.i IS NULL
- </select>
-
- <!-- 节点组详情查询 -->
- <select id="detail" resultType="com.nis.modules.node.entity.NodeGroupInfoEntity">
- SELECT ni.*,(SELECT NAME FROM nodegroup_info WHERE id = ni.pid) AS pname FROM nodegroup_info ni WHERE ni.id =
- #{id} AND ni.del_flag = 0
- </select>
-
- <!-- 查询当前节点组下包含的节点数 -->
- <select id="getNodeCount" resultType="integer">
- SELECT COUNT(1) FROM node_group_rel ngr WHERE ngr.group_id = #{id} AND ngr.del_flag = 0
- </select>
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/node/NodeGroupRelDao.xml b/nezha-admin/src/main/resources/mapper/node/NodeGroupRelDao.xml
deleted file mode 100644
index 8f6e095b..00000000
--- a/nezha-admin/src/main/resources/mapper/node/NodeGroupRelDao.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.node.dao.NodeGroupRelDao">
-
- <!-- 可根据自己的需求,是否要使用 -->
- <resultMap type="com.nis.modules.node.entity.NodeGroupRelEntity" id="groupRelMap">
- <result property="id" column="id"/>
- <result property="groupId" column="group_id"/>
- <result property="uuid" column="uuid"/>
- <result property="descr" column="descr"/>
- <result property="operator" column="operator"/>
- <result property="delFlag" column="del_flag"/>
- <result property="opTime" column="op_time"/>
- </resultMap>
-
- <select id="queryBySystemId" resultType="nodeGroupRelEntity">
- select ngr.*
- from nodegroup_info ngi
- left join node_group_rel ngr on ngr.group_id=ngi.id
- where ngi.del_flag=0 and ngr.del_flag=0 and ngi.system_id=#{id}
- </select>
-
- <select id="queryCountByGroupId" resultType="integer">
- SELECT
- count( 1 )
- FROM
- `node_group_rel` ngr
- LEFT JOIN node_info ni ON ngr.uuid = ni.uuid
- WHERE
- ngr.del_flag = '0'
- AND ni.state = '1'
- AND ngr.group_id = #{nodeGroupId}
- <if test="nodeType != null and nodeType != ''">
- and ni.type=#{nodeType}
- </if>
- </select>
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/node/NodeInfoDao.xml b/nezha-admin/src/main/resources/mapper/node/NodeInfoDao.xml
deleted file mode 100644
index c207d8e9..00000000
--- a/nezha-admin/src/main/resources/mapper/node/NodeInfoDao.xml
+++ /dev/null
@@ -1,335 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.node.dao.NodeInfoDao">
-
-
- <sql id="node_info_columns">
- ni.name,
- ni.host_name,
- ni.ip,
- ni.ip_long,
- ni.uuid,
- ni.type,
- ni.tag,
- ni.user_name,
- ni.password,
- ni.state,
- ni.u_size,
- ni.cabinet_start,
- ni.snmp_port,
- ni.snmp_community,
- ni.remark,
- ni.cabinet_id,
-
- <!-- 关联机柜 -->
- nc.id AS cab_id ,
- nc.name AS cab_name,
-
- <!-- 关联机房 -->
- nr.name AS room_name
- </sql>
-
- <!-- 节点关联机柜 -->
- <resultMap type="com.nis.modules.node.entity.NodeInfoEntity" id="nodeinfoWithCab">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="hostName" column="host_name"/>
- <result property="ip" column="ip"/>
- <result property="ipLong" column="ip_long"/>
- <result property="uuid" column="uuid"/>
- <result property="type" column="type"/>
- <result property="tag" column="tag"/>
- <result property="userName" column="user_name"/>
- <result property="password" column="password"/>
- <result property="state" column="state"/>
- <result property="cabinetId" column="cabinet_id"/>
- <result property="uSize" column="u_size"/>
- <result property="cabinetStart" column="cabinet_start"/>
- <result property="snmpPort" column="snmp_port"/>
- <result property="snmpCommunity" column="snmp_community"/>
- <result property="remark" column="remark"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
-
- <!-- 关联机房名称 -->
- <result property="roomName" column="room_name"/>
-
- <!-- 一对一 关联机柜 -->
- <result property="cabinetInfo.id" column="cab_id"/>
- <result property="cabinetInfo.name" column="cab_name"/>
- </resultMap>
-
- <!-- 节点关联机柜和业务系统 -->
- <resultMap type="com.nis.modules.node.entity.NodeInfoEntity" id="nodeinfoWithCabSys">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="hostName" column="host_name"/>
- <result property="ip" column="ip"/>
- <result property="ipLong" column="ip_long"/>
- <result property="uuid" column="uuid"/>
- <result property="type" column="type"/>
- <result property="tag" column="tag"/>
- <result property="userName" column="user_name"/>
- <result property="password" column="password"/>
- <result property="state" column="state"/>
- <result property="cabinetId" column="cabinet_id"/>
- <result property="uSize" column="u_size"/>
- <result property="cabinetStart" column="cabinet_start"/>
- <result property="snmpPort" column="snmp_port"/>
- <result property="snmpCommunity" column="snmp_community"/>
- <result property="remark" column="remark"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
-
- <!-- 关联机房名称 -->
- <result property="roomName" column="room_name"/>
-
- <!-- 一对一 关联机柜 -->
- <result property="cabinetInfo.id" column="cab_id"/>
- <result property="cabinetInfo.name" column="cab_name"/>
-
- <!-- 一对多 关联系统表 -->
- <collection property="systemInfo" column="uuid" select="querySystemsByUuid"
- ofType="com.nis.modules.sys.entity.SystemInfoEntity">
- <id property="id" column="id"/>
- <result property="name" column="name"/>
- </collection>
- </resultMap>
-
-
- <!-- 状态变更 -->
- <update id="changeState">
- UPDATE node_info SET state = #{state}
- WHERE uuid IN
- <foreach collection="uuids" item="uuids" index="no" open="(" separator="," close=")">
- #{uuids}
- </foreach>
- </update>
-
- <!-- 保存 -->
- <insert id="save">
- INSERT INTO node_info(
- id,
- name,
- host_name,
- ip,
- ip_long,
- uuid,
- type,
- tag,
- user_name,
- password,
- cabinet_id,
- u_size,
- cabinet_start,
- snmp_port,
- snmp_community,
- remark,
- operator,
- op_time
- )VALUES(
- <if test="_databaseId == 'oracle'">SEQ_NODE_INFO.NEXTVAL,</if>
- <if test="_databaseId == 'mysql'">seq_nextval('seq_node_info'),</if>
- <if test="_databaseId == 'postgresql'">nextval(''),</if>
- #{name},
- #{hostName},
- #{ip},
- #{ipLong},
- <if test="_databaseId == 'oracle'">SEQ_NODE_INFO.CURRVAL,</if>
- <if test="_databaseId == 'mysql'">seq_currval('seq_node_info'),</if>
- <if test="_databaseId == 'postgresql'">currval(''),</if>
- #{type},
- #{tag},
- #{userName},
- #{password},
- #{cabinetId},
- #{uSize},
- #{cabinetStart},
- #{snmpPort},
- #{snmpCommunity},
- #{remark},
- #{operator},
- #{opTime}
- )
-
- <selectKey keyProperty="uuid" order="AFTER" resultType="java.lang.Long">
- SELECT
- <if test="_databaseId == 'oracle'">SEQ_NODE_INFO.CURRVAL</if>
- <if test="_databaseId == 'mysql'">seq_currval('seq_node_info')</if>
- <if test="_databaseId == 'postgresql'">currval('')</if>
- AS uuid
- <if test="_databaseId == 'oracle'">FROM DUAL</if>
- </selectKey>
- </insert>
-
-
-
- <!-- 查询机房下所包含的所有节点 包含节点自身的过滤条件 -->
- <select id="selectListByRoomId" resultMap="nodeinfoWithCab">
-
- <if test="params.systemId != null and params.systemId != '' and params.systemId != 1">
- SELECT tempni.* FROM (
- </if>
-
- SELECT
- <include refid="node_info_columns"/>
- FROM node_info ni
-
- LEFT JOIN node_cabinet nc ON ni.cabinet_id = nc.id
- LEFT JOIN node_room nr ON nc.room_id = nr.id
-
- WHERE ni.state != 3
- <if test="params.roomId != null and params.roomId != ''">
- AND nc.room_id = #{params.roomId} AND nc.del_flag = 0
- </if>
-
- <if test="params.ip != null and params.ip != ''">
- AND ni.ip LIKE
- <if test="_databaseId == 'oracle'">'%'||#{params.ip}||'%'</if>
- <if test="_databaseId == 'mysql'">CONCAT('%', #{params.ip}, '%')</if>
- <if test="_databaseId == 'postgresql'">CONCAT('%', #{params.ip}, '%')</if>
- </if>
-
- <if test="params.name != null and params.name != ''">
- AND ni.name LIKE
- <if test="_databaseId == 'oracle'">'%'||#{params.name}||'%'</if>
- <if test="_databaseId == 'mysql'">CONCAT('%', #{params.name}, '%')</if>
- <if test="_databaseId == 'postgresql'">CONCAT('%', #{params.name}, '%')</if>
- </if>
-
- <if test="params.state != null and params.state != ''">
- AND ni.state = #{params.state}
- </if>
-
- <if test="params.type != null and params.type != ''">
- AND ni.type = #{params.type}
- </if>
-
- <if test="params.tag != null and params.tag != ''">
- AND ni.tag = #{params.tag}
- </if>
-
- <if test="params.cabinetId != null and params.cabinetId != ''">
- AND ni.cabinet_id = #{params.cabinetId}
- </if>
-
-
- <!-- 如果是gloab 权限 则不需要关联业务系统 可以查看所有的节点 -->
- <if test="params.systemId != null and params.systemId != '' and params.systemId != 1">
-
- ) tempni
-
- INNER JOIN
-
- system_node_rel snr ON tempni.uuid = snr.uuid
-
- WHERE snr.system_id = #{params.systemId} AND snr.del_flag = 0
- </if>
-
-
- </select>
-
- <select id="selectListByGroups" resultMap="nodeinfoWithCab">
-
- <if test="params.systemId != null and params.systemId != '' and params.systemId != 1">
- SELECT tempni.* FROM
- (
- </if>
-
- SELECT <include refid="node_info_columns"/> FROM
- (
- SELECT DISTINCT n.* FROM node_group_rel ngr
- LEFT JOIN node_info n on ngr.uuid = n.uuid
- WHERE ngr.del_flag = 0 AND ngr.group_id IN
- <foreach collection="groupdIds" item="groupdIds" index="no" open="(" separator="," close=")">
- #{groupdIds}
- </foreach>
- ) ni
-
- LEFT JOIN node_cabinet nc ON ni.cabinet_id = nc.id
- LEFT JOIN node_room nr ON nc.room_id = nr.id
-
- WHERE ni.state != 3
-
- <if test="params.roomId != null and params.roomId != ''">
- AND nc.room_id = #{params.roomId}
- </if>
-
- <if test="params.ip != null and params.ip != ''">
- AND ni.ip LIKE
- <if test="_databaseId == 'oracle'">'%'||#{params.ip}||'%'</if>
- <if test="_databaseId == 'mysql'">CONCAT('%', #{params.ip}, '%')</if>
- <if test="_databaseId == 'postgresql'">CONCAT('%', #{params.ip}, '%')</if>
- </if>
-
- <if test="params.name != null and params.name != ''">
- AND ni.name LIKE
- <if test="_databaseId == 'oracle'">'%'||#{params.name}||'%'</if>
- <if test="_databaseId == 'mysql'">CONCAT('%', #{params.name}, '%')</if>
- <if test="_databaseId == 'postgresql'">CONCAT('%', #{params.name}, '%')</if>
- </if>
-
- <if test="params.state != null and params.state != ''">
- AND ni.state = #{params.state}
- </if>
-
- <if test="params.type != null and params.type != ''">
- AND ni.type = #{params.type}
- </if>
-
- <if test="params.tag != null and params.tag != ''">
- AND ni.tag = #{params.tag}
- </if>
-
- <if test="params.cabinetId != null and params.cabinetId != ''">
- AND ni.cabinet_id = #{params.cabinetId}
- </if>
-
- <!-- 如果是gloab 权限 则不需要关联业务系统 可以查看所有的节点 -->
- <if test="params.systemId != null and params.systemId != '' and params.systemId != 1">
-
- ) tempni
-
- INNER JOIN
-
- system_node_rel snr ON tempni.uuid = snr.uuid
-
- WHERE snr.system_id = #{params.systemId} AND snr.del_flag = 0
- </if>
-
- </select>
-
- <select id="queryNodeBySystemId" resultMap="nodeinfoWithCabSys">
- SELECT ni.* FROM system_info si
- LEFT JOIN system_node_rel snr ON si.id=snr.system_id
- LEFT JOIN node_info ni ON snr.uuid=ni.uuid
- WHERE si.id=#{id} AND si.del_flag=0 AND snr.del_flag=0 AND ni.state != 3
- </select>
-
- <select id="querySelectableNodeBySystemId" resultMap="nodeinfoWithCabSys">
- SELECT ni.* FROM node_info ni
- WHERE ni.uuid NOT IN (
- SELECT snr.uuid FROM system_node_rel snr
- LEFT JOIN system_info si ON si.id=snr.system_id
- WHERE si.id=#{id} AND si.del_flag=0 AND snr.del_flag=0
- ) AND ni.state != 3
- </select>
-
-
- <!-- 节点详情查询 -->
- <select id="detail" resultMap="nodeinfoWithCabSys">
- SELECT <include refid="node_info_columns"/> FROM node_info ni
- LEFT JOIN node_cabinet nc ON ni.cabinet_id = nc.id
- LEFT JOIN node_room nr on nc.room_id = nr.id
- WHERE ni.uuid = #{uuid} AND ni.state != 3
- </select>
-
-
-
- <select id="querySystemsByUuid" resultType="com.nis.modules.sys.entity.SystemInfoEntity">
- SELECT si.id,si.name FROM system_info si
- LEFT JOIN system_node_rel snr ON si.id = snr.system_id
- WHERE snr.uuid = #{uuid} AND si.del_flag = 0 AND snr.del_flag = 0
- </select>
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/node/NodeRoomDao.xml b/nezha-admin/src/main/resources/mapper/node/NodeRoomDao.xml
deleted file mode 100644
index 17c478e6..00000000
--- a/nezha-admin/src/main/resources/mapper/node/NodeRoomDao.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.node.dao.NodeRoomDao">
-
- <!-- 可根据自己的需求,是否要使用 -->
- <resultMap type="com.nis.modules.node.entity.NodeRoomEntity" id="roomWithCabsNodes">
- <id property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="roomRows" column="room_rows"/>
- <result property="roomCols" column="room_cols"/>
- <result property="addr" column="addr"/>
- <result property="remarks" column="remarks"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
- <result property="delFlag" column="del_flag"/>
-
- <collection property="cabinets" ofType="com.nis.modules.node.entity.NodeCabinetEntity">
- <id property="id" column="cabId"/>
- <result property="ubit" column="cabUbit"/>
- <result property="name" column="cabName"/>
- <result property="roomId" column="room_id"/>
- <!-- 机柜中包含的节点列表 -->
- <collection property="nodes" ofType="com.nis.modules.node.entity.NodeInfoEntity">
- <result property="uuid" column="uuid"/>
- <result property="uSize" column="u_size"/>
- <result property="cabinetStart" column="cabinet_start"/>
- </collection>
- </collection>
- </resultMap>
-
- <!-- 查询机房列表 包含 机柜 以及 机柜包含的节点信息 -->
- <select id="queryRoomsNodes" resultMap="roomWithCabsNodes">
- SELECT nr.*,nc.id AS cabId,nc.name AS cabName,nc.ubit AS cabUbit,nc.room_id,ni.uuid,ni.u_size,ni.cabinet_start
- FROM node_room nr
- LEFT JOIN node_cabinet nc ON nc.room_id=nr.id
- LEFT JOIN node_info ni ON nc.id=ni.cabinet_id
- WHERE nr.del_flag=0 AND nc.del_flag=0 AND ni.state!=3
- </select>
-
-
- <!-- 查询所有存在机柜的机房列表 并含有机柜列表 -->
- <select id="queryRoomCabinets" resultMap="roomWithCabsNodes">
- SELECT nr.*,nc.id AS cabId,nc.name AS cabName,nc.ubit AS cabUbit,nc.room_id FROM node_room nr
- LEFT JOIN node_cabinet nc ON nr.id = nc.room_id
- WHERE nr.del_flag = 0 AND nc.del_flag = 0
- </select>
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/node/SystemNodeRelDao.xml b/nezha-admin/src/main/resources/mapper/node/SystemNodeRelDao.xml
deleted file mode 100644
index 8bcb8573..00000000
--- a/nezha-admin/src/main/resources/mapper/node/SystemNodeRelDao.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.node.dao.SystemNodeRelDao">
- <update id="deleteByIds">
- UPDATE system_node_rel
- SET del_flag=1, operator=#{operator}, op_time=#{opTime}
- WHERE id IN
- <foreach collection="oldSysNodeRel" item="o" index="no" open="(" separator="," close=")">
- #{o.id}
- </foreach>
- </update>
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/sys/SystemInfoDao.xml b/nezha-admin/src/main/resources/mapper/sys/SystemInfoDao.xml
deleted file mode 100644
index 997bc6e4..00000000
--- a/nezha-admin/src/main/resources/mapper/sys/SystemInfoDao.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.sys.dao.SystemInfoDao">
-
- <resultMap type="com.nis.modules.sys.entity.SystemInfoEntity" id="systemWithUsergroup">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="buildIn" column="build_in"/>
- <result property="createBy" column="create_by"/>
- <result property="createDate" column="create_date"/>
- <result property="updateBy" column="update_by"/>
- <result property="updateDate" column="update_date"/>
- <result property="nodeNum" column="node_num"/>
- <result property="remark" column="remark"/>
- <result property="delFlag" column="del_flag"/>
- <collection property="usergroups" column="id" select="queryUgBySysId" ofType="com.nis.modules.sys.entity.UsergroupEntity">
- <id property="id" column="id"/>
- <result property="name" column="name"/>
- </collection>
- </resultMap>
-
-
- <!-- 节点组列表时使用 -->
- <resultMap type="com.nis.modules.sys.entity.SystemInfoEntity" id="systemWithNodegroup">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
-
- <!-- 一对多 节点组 -->
- <collection property="nodegroups" column="id" ofType="com.nis.modules.node.entity.NodeGroupInfoEntity">
- <id property="id" column="group_id"/>
- <result property="name" column="group_name"/>
- <result property="pid" column="group_pid"/>
- <result property="systemId" column="system_id"/>
- </collection>
- </resultMap>
-
-
-
- <select id="querySystemInfosByUserId" resultType="systemInfoEntity">
- SELECT si.id,si.name
- FROM system_info si
- LEFT JOIN system_usergroup_rel sur ON si.id=sur.system_id
- LEFT JOIN user_usergroup uu ON uu.group_id=sur.usergroup_id
- WHERE uu.user_id=#{userId} and si.del_flag=0
- GROUP BY si.id, si.name
- ORDER BY si.id asc
- </select>
-
- <select id="list" resultType="systemInfoEntity">
- SELECT si.id, si.name, si.build_in, si.remarks, si.del_flag, si.create_date, si.update_date
- FROM system_info si
- <if test="sys.usergroupId != null and sys.usergroupId != ''">
- LEFT JOIN system_usergroup_rel sur ON sur.system_id=si.id
- </if>
- WHERE si.del_flag=0
- <if test="sys.usergroupId != null and sys.usergroupId != ''">
- AND sur.usergroup_id=#{sys.usergroupId}
- AND sur.del_flag=0
- </if>
- <if test="sys.id != null and sys.id != ''">
- AND si.id=#{sys.id}
- </if>
- </select>
-
- <select id="detail" resultMap="systemWithUsergroup">
- SELECT si.id, si.name, si.build_in, si.remarks, si.del_flag, si.create_date, (SELECT COUNT(snr.id) FROM system_node_rel snr WHERE snr.system_id=#{id} AND snr.del_flag=0) as node_num
- FROM system_info si
- WHERE si.id=#{id} AND si.del_flag=0
- </select>
-
- <select id="queryUgBySysId" resultType="usergroupEntity">
- SELECT ug.id, ug.name
- FROM system_info si
- LEFT JOIN system_usergroup_rel sur ON sur.system_id=si.id
- LEFT JOIN user_group ug ON ug.id=sur.usergroup_id
- WHERE si.id=#{id} AND si.del_flag=0 AND sur.del_flag=0 AND ug.del_flag=0
- </select>
-
-
-
- <!-- 节点组列表查询 -->
- <select id="querySystemInfosWithNodeGroup" resultMap="systemWithNodegroup">
- SELECT si.*,ni.id AS group_id , ni.name AS group_name ,ni.pid as group_pid,ni.system_id FROM system_info si
- LEFT JOIN nodegroup_info ni ON si.id = ni.system_id AND ni.del_flag = 0
- WHERE si.del_flag = 0
- <if test="id != null and id != ''">
- AND si.id = #{id}
- </if>
- </select>
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/sys/UserGroupDao.xml b/nezha-admin/src/main/resources/mapper/sys/UserGroupDao.xml
deleted file mode 100644
index 24307a54..00000000
--- a/nezha-admin/src/main/resources/mapper/sys/UserGroupDao.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.sys.dao.UserGroupDao">
-
- <resultMap type="com.nis.modules.sys.entity.UserGroupEntity" id="userGroupMap">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="remark" column="remark"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
- <result property="delFlag" column="del_flag"/>
- </resultMap>
-
- <resultMap type="com.nis.modules.sys.entity.UserGroupEntity2" id="userGroupMap2">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="remark" column="remark"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
- <result property="delFlag" column="del_flag"/>
- <collection property="systems" column="id" select="querySys" ofType="com.nis.modules.sys.entity.SystemInfoEntity">
- <id property="id" column="id"/>
- <result property="name" column="name"/>
- </collection>
- <collection property="users" column="id" select="queryUsr" ofType="com.nis.modules.sys.entity.SysUserEntity">
- <id property="userId" column="user_id"/>
- <result property="username" column="username"/>
- </collection>
- </resultMap>
-
- <select id="queryByUser" resultMap="userGroupMap">
- SELECT ug.* FROM sys_user su
- LEFT JOIN user_usergroup uu ON su.user_id=uu.user_id
- LEFT JOIN user_group ug ON ug.id=uu.group_id
- WHERE su.user_id=1 AND uu.del_flag=0 AND ug.del_flag=0
- </select>
-
- <select id="list" resultMap="userGroupMap2">
- SELECT ug.* from USER_GROUP ug WHERE ug.del_flag=0
- </select>
-
- <select id="queryDetail" resultMap="userGroupMap2">
- SELECT ug.* from USER_GROUP ug WHERE ug.del_flag=0 AND ug.id=#{id}
- </select>
-
- <select id="querySys" resultType="systemInfoEntity">
- SELECT si.id, si.name
- FROM system_info si
- LEFT JOIN system_usergroup_rel sur ON sur.system_id=si.id
- WHERE sur.usergroup_id=#{id} AND sur.del_flag=0 AND si.del_flag=0
- </select>
-
- <select id="queryUsr" resultType="sysUserEntity">
- SELECT su.user_id, su.username
- FROM sys_user su
- LEFT JOIN user_usergroup uu ON uu.user_id=su.user_id
- WHERE uu.group_id=#{id} AND uu.del_flag=0 AND su.status=1
- </select>
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/sys/UserUsergroupDao.xml b/nezha-admin/src/main/resources/mapper/sys/UserUsergroupDao.xml
deleted file mode 100644
index 3035bee6..00000000
--- a/nezha-admin/src/main/resources/mapper/sys/UserUsergroupDao.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.sys.dao.UserUsergroupDao">
-
- <!-- 可根据自己的需求,是否要使用 -->
- <resultMap type="com.nis.modules.sys.entity.UserUsergroupEntity" id="userUsergroupMap">
- <result property="id" column="id"/>
- <result property="userId" column="user_id"/>
- <result property="groupId" column="group_id"/>
- <result property="delFlag" column="del_flag"/>
- <result property="operator" column="operator"/>
- <result property="opTime" column="op_time"/>
- </resultMap>
-
- <select id="checkUserGroupCorrect" resultType="java.lang.Integer">
- select count(1) from sys_user u left join user_usergroup uug on u.user_id=uug.user_id
- left join user_group ug on uug.group_id=ug.id
- where u.user_id=#{userId} and ug.del_flag=0 and uug.del_flag=0 and ug.id in
- <foreach collection="userGroupIds" item="userGroupId" open="(" separator="," close=")">
- #{userGroupId}
- </foreach>
- </select>
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/topo/TopoInfoDao.xml b/nezha-admin/src/main/resources/mapper/topo/TopoInfoDao.xml
deleted file mode 100644
index a938bf02..00000000
--- a/nezha-admin/src/main/resources/mapper/topo/TopoInfoDao.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.topo.dao.TopoInfoDao">
-
- <sql id="topo_info_columns">
- id,
- name,
- system_id,
- width,
- height,
- style,
- op_time,
- operator,
- remarks
- </sql>
- <sql id="topo_node_info_columns">
- tni.id,
- tni.img,
- tni.topo_id,
- tni.type,
- tni.type_id,
- tni.x,
- tni.y,
- tni.width,
- tni.height,
- tni.text,
- tni.style,
- tni.threshold
- </sql>
- <sql id="topo_line_info_columns">
- tli.id,
- tli.src,
- tli.dest,
- tli.style,
- tli.text,
- tli.topo_id
- </sql>
-
- <select id="queryTopoInfoList" resultType="topoInfoEntity">
- SELECT <include refid="topo_info_columns"></include>
- FROM topo_info
- <where>
- del_flag=0
- <if test="id != null ">
- AND id=#{id}
- </if>
- <if test="systemId != null ">
- AND system_id=#{systemId}
- </if>
- </where>
- </select>
-
- <resultMap type="com.nis.modules.topo.entity.TopoInfoEntity" id="topoInfoWithNodeAndLine">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="systemId" column="system_id"/>
- <result property="width" column="width"/>
- <result property="height" column="height"/>
- <result property="style" column="style"/>
- <result property="opTime" column="op_time"/>
- <result property="operator" column="operator"/>
- <result property="remarks" column="remarks"/>
- <collection property="topoNodes" column="id" select="queryNodeByTopoId" ofType="com.nis.modules.topo.entity.TopoNodeInfoEntity">
- <id property="id" column="id"/>
- <result property="img" column="img"/>
- <result property="topoId" column="topo_id"/>
- <result property="type" column="type"/>
- <result property="typeId" column="type_id"/>
- <result property="x" column="x"/>
- <result property="y" column="y"/>
- <result property="width" column="width"/>
- <result property="height" column="height"/>
- <result property="text" column="text"/>
- <result property="style" column="style"/>
- <result property="threshold" column="threshold"/>
- </collection>
- <collection property="topoLines" column="id" select="queryLineByTopoId" ofType="com.nis.modules.topo.entity.TopoLineInfoEntity">
- <id property="id" column="id"/>
- <result property="src" column="src"/>
- <result property="dest" column="dest"/>
- <result property="style" column="style"/>
- <result property="text" column="text"/>
- <result property="topoId" column="topo_id"/>
- </collection>
- </resultMap>
-
- <select id="queryTopoInfoById" resultMap="topoInfoWithNodeAndLine">
- SELECT <include refid="topo_info_columns"></include>
- FROM topo_info ti
- <where>
- ti.del_flag=0
- <if test="id != null ">
- AND ti.id=#{id}
- </if>
- </where>
- </select>
-
- <select id="queryNodeByTopoId" resultType="topoNodeInfoEntity">
- SELECT <include refid="topo_node_info_columns"></include>
- FROM topo_info ti
- LEFT JOIN topo_node_info tni ON tni.topo_id=ti.id
- WHERE ti.id=#{id} AND tni.del_flag=0 AND ti.del_flag=0
- </select>
-
- <select id="queryLineByTopoId" resultType="topoLineInfoEntity">
- SELECT <include refid="topo_line_info_columns"></include>
- FROM topo_info ti
- LEFT JOIN topo_line_info tli ON tli.topo_id=ti.id
- WHERE ti.id=#{id} AND tli.del_flag=0 AND ti.del_flag=0
- </select>
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/topo/TopoLineInfoDao.xml b/nezha-admin/src/main/resources/mapper/topo/TopoLineInfoDao.xml
deleted file mode 100644
index 0518e31c..00000000
--- a/nezha-admin/src/main/resources/mapper/topo/TopoLineInfoDao.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.topo.dao.TopoLineInfoDao">
-
- <sql id="topo_line_info_columns">
- id,
- src,
- desc,
- style,
- text,
- top0_id
- </sql>
-
- <update id="delete" parameterType="long">
- update topo_line_info set del_flag = 1 where id = #{id}
- </update>
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/mapper/topo/TopoNodeInfoDao.xml b/nezha-admin/src/main/resources/mapper/topo/TopoNodeInfoDao.xml
deleted file mode 100644
index f4014435..00000000
--- a/nezha-admin/src/main/resources/mapper/topo/TopoNodeInfoDao.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.nis.modules.topo.dao.TopoNodeInfoDao">
-
- <sql id="topo_node_info_columns">
- tni.id,
- tni.img,
- tni.topo_id,
- tni.type,
- tni.type_id,
- tni.x,
- tni.y,
- tni.width,
- tni.height,
- tni.text,
- tni.style,
- tni.threshold
- </sql>
-
- <update id="delete" parameterType="long">
- update topo_node_info set del_flag = 1 where id = #{id}
- </update>
-
-</mapper> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/common/componets.js b/nezha-admin/src/main/resources/templates/js/modules/common/componets.js
deleted file mode 100644
index d43c3cd8..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/common/componets.js
+++ /dev/null
@@ -1,967 +0,0 @@
-<script>
-
-Vue.directive('id', function (el, binding, vnode) {
- el.id = binding.arg + "-" + binding.value;
- }
-)
-Vue.directive('width', function (el, binding, vnode) {
- el.width = binding.value + "px";
-
- }
-)
-
-var rRow = Vue.extend({
- template: "#rRow",
- components: {},
- props: {
- tabNo:{},
- rowData: {
- type: Object,
- required: true
- },
- colModel: {
- type: Array,
- required: true
- },
- index: {
- type: Number,
- required: true
- },
- refKey:{
- type:String,
- required:true
- },
- identification:{
- type:String,
- required:true
- },
- trId: {
- type: String,
- default: "r-tr-id"
- },
- tdId: {
- type: String,
- default: "r-td-id"
- }
- },
-
- data: function () {
- return {
- ref:'',
- checked: false, //选中状态
- trSelector: "",
- checkboxSelector: "",
- trDom: null,
- checkboxDom: null,
- checkboxDomParent: null,
- }
- },
- methods: {
- init: function () {
- var temp = this;
- temp.reset();
- if (!temp.rowData.disabled&&temp.rowData.checked != undefined && temp.rowData.checked != null) {
- temp.checked = temp.rowData.checked;
- }
-
- temp.rowData.trIndex=temp.index;
-
- temp.ref=temp.refKey+temp.rowData[temp.identification];
-
- temp.trSelector = "#tab-"+temp.tabNo+"-" + this.trId + "-" + this.index;
- temp.checkboxSelector = temp.trSelector + "-checkbox";
-
- console.log(temp.trSelector)
- console.log(temp.checkboxSelector)
-
- temp.trDom = $(temp.trSelector);
- temp.checkboxDom = $(temp.checkboxSelector);
- temp.checkboxDomParent = temp.checkboxDom.parent();
-
- if(temp.rowData.disabled==undefined || temp.rowData.disabled==null||!temp.rowData.disabled){
- temp.trDom.off('mouseover').on('mouseover', temp.trMouseover);
- temp.trDom.off('mouseout').on('mouseout', temp.trMouseout);
-
- temp.checkboxDom.off('mouseover').on('mouseover', temp.checkboxMouseover);
- temp.checkboxDom.off('mouseout').on('mouseout', temp.checkboxMouseout);
-
- temp.trDom.off('click').on('click', temp.trDomClick)
- temp.checkboxDomParent.off("click").on("click", temp.checkboxDomClick)
- }else{
- temp.trDom.addClass("danger")
- temp.checkboxDom.off('mouseover').on('mouseover', function(){
- temp.checkboxDom.get(0).style.cursor="not-allowed"
- });
-
- }
-
- },
- reset: function () {
- var temp = this;
- temp.checked = false;
- temp.trSelector = '';
- temp.checkboxSelector = '';
- temp.trDom = null;
- temp.checkboxDom = null;
- temp.checkboxDomParent = null;
- },
- changeChecked: function () {
- this.checked = !this.checked;
- },
- trMouseover: function () {
- this.trDom.addClass("active")
- this.checkboxMouseover();
- },
- trMouseout: function () {
- this.trDom.removeClass("active")
- this.checkboxMouseout();
- },
- trDomClick: function () {
- var temp = this;
- temp.changeChecked();
- if (temp.checked) {
- temp.trDom.addClass("success");
- } else {
- temp.trDom.removeClass("success");
- }
- temp.checkboxDomClick();
- },
- checkboxMouseover: function () {
- var temp = this;
- temp.removeCheckboxClass();
- if (temp.checked) {
- temp.checkboxDom.addClass("checkbox_true_full_focus");
- } else {
- temp.checkboxDom.addClass("checkbox_false_full_focus");
- }
- },
- checkboxMouseout: function () {
- var temp = this;
- temp.removeCheckboxClass();
- if (temp.checked) {
- temp.checkboxDom.addClass("checkbox_true_full");
- } else {
- temp.checkboxDom.addClass("checkbox_false_full");
- }
- },
- checkboxDomClick: function (e) {
- var temp = this;
- temp.removeCheckboxClass();
- if (temp.checked) {
- temp.checkboxDom.addClass("checkbox_true_full");
- temp.submitCheckData();
- } else {
- temp.checkboxDom.addClass("checkbox_false_full");
- temp.submitUnCheckData();
- }
- temp.appendCheckState();
- temp.checkboxMouseover();
-
- },
- removeCheckboxClass: function () {
- var temp = this;
- temp.checkboxDom.removeClass("checkbox_false_full");
- temp.checkboxDom.removeClass("checkbox_false_full_focus");
- temp.checkboxDom.removeClass("checkbox_true_full");
- temp.checkboxDom.removeClass("checkbox_true_full_focus");
- temp.checkboxDom.removeClass("checkbox_false_part");
- temp.checkboxDom.removeClass("checkbox_false_part_focus");
- temp.checkboxDom.removeClass("checkbox_true_part");
- temp.checkboxDom.removeClass("checkbox_true_part_focus");
- },
- appendCheckState: function () {
- this.rowData.checked = this.checked;
- },
- submitCheckData: function () { //向父组件报告选中
- var temp = this;
- this.$emit("checkRow", temp.index, temp.rowData);
- },
- submitUnCheckData: function () { //向父组件报告取消选中
- var temp = this;
- this.$emit("unCheckRow", temp.index, temp.rowData);
- },
- uncheckTr:function(){ //取消选中
- var temp=this;
- if(temp.checked){
- temp.trDomClick();
- temp.trMouseout();
- }
- }
- },
- computed: {},
- watch: {
- rowData: {
- handler() {
- this.init();
- },
- deep: true
- }
- },
- mounted: function () {
- this.init();
- if (!this.rowData.disabled&&this.checked) {
- this.changeChecked();
- this.trDomClick();
- this.trMouseout();
- }
- }
-})
-
-
-var rTable = Vue.extend({
- template: "#rTable",
- components: {
- "r-tr": rRow
- },
- props: {
- tabNo:{
- default:'1'
- },
- tableData: {
- type: Array,
- required: true
- },
- colModel: {
- type: Array,
- required: true
- },
- identification: {
- type: String,
- default: "id"
- }
- },
-
- data: function () {
- return {
- trRefKey:"r-tr-",
- checked: false, //选中状态
- partChecked: false,//部分选中状态
- disabledSize:0,
- trReset: true,
- colLen: null,
- checkboxSelector: '',
- checkboxDom: null,
- checkboxDomParent: null,
- checkedKeyPre: 'rtab',
- checkedDatas: new Map(),
- unCheckedDatas: new Map(),
- }
- },
- created: function () {
- this.getColLen();
- },
- methods: {
- init: function () {
- var temp = this;
- temp.resetTab();
- temp.getDisabledSize();
- temp.checkboxSelector="#r-tab-"+temp.tabNo+"-checkall";
- temp.checkboxDom = $(temp.checkboxSelector);
- temp.checkboxDomParent = $(temp.checkboxSelector).parent();
- temp.bindDomEvent();
-
- },
- bindDomEvent: function () {
- var temp = this;
-
- temp.checkboxDomParent.off('click').on('click', temp.checkboxClick);
- temp.checkboxDom.off('mouseover').on('mouseover', temp.checkboxMouseover);
-
- temp.checkboxDom.off('mouseout').on('mouseout', temp.checkboxMouseout);
- },
- resetTab: function () {
- var temp = this;
- temp.checked = false;
- temp.partChecked = false;
- temp.disabledSize=0;
- temp.checkedDatas = new Map();
- temp.unCheckedDatas = new Map();
- temp.resetTrDom();
- },
- getColLen: function () {
- this.colLen = this.colModel.length + 2;
- },
- getDisabledSize:function(){
- var temp=this;
- for(let rowData of temp.tableData){
- if(rowData.disabled){
- temp.disabledSize++;
- }
- }
- },
- changeChecked: function () {
- this.checked = !this.checked;
- this.partChecked = false;
- },
- checkboxMouseover: function () {
- var temp = this;
- temp.removeCheckboxClass();
- if (temp.checked) {
- temp.checkboxDom.addClass("checkbox_true_part_focus");
- } else if (temp.partChecked) {
- temp.checkboxDom.addClass("checkbox_false_part_focus");
- } else {
- temp.checkboxDom.addClass("checkbox_false_full_focus");
- }
- },
- checkboxMouseout: function () {
- var temp = this;
- temp.removeCheckboxClass();
- if (temp.checked) {
- temp.checkboxDom.addClass("checkbox_true_part");
- } else if (temp.partChecked) {
- temp.checkboxDom.addClass("checkbox_false_part");
- } else {
- temp.checkboxDom.addClass("checkbox_false_full");
- }
- },
- checkboxClick: function () {
- var temp = this;
- temp.removeCheckboxClass();
- temp.changeChecked();
- if (temp.checked) {
- temp.checkboxDom.addClass("checkbox_true_part");
- temp.selectAll();
- } else {
- temp.checkboxDom.addClass("checkbox_false_full");
- temp.unSelectAll();
- }
- temp.checkboxMouseover();
- },
- removeCheckboxClass: function () {
- var temp = this;
- temp.checkboxDom.removeClass("checkbox_false_full");
- temp.checkboxDom.removeClass("checkbox_false_full_focus");
- temp.checkboxDom.removeClass("checkbox_true_full");
- temp.checkboxDom.removeClass("checkbox_true_full_focus");
- temp.checkboxDom.removeClass("checkbox_false_part");
- temp.checkboxDom.removeClass("checkbox_false_part_focus");
- temp.checkboxDom.removeClass("checkbox_true_part");
- temp.checkboxDom.removeClass("checkbox_true_part_focus");
- },
- getCheckMapKey:function(rowData){
- return this.checkedKeyPre + rowData[this.identification];
- },
- checkRow: function (index, rowData) {
- var key = this.getCheckMapKey(rowData);
- if (!this.checkedDatas.has(key)) {
- this.checkedDatas.set(key, rowData);
- }
- if (this.unCheckedDatas.has(key)) {
- this.unCheckedDatas.delete(key);
- }
- this.selectedChange();
- },
- unCheckRow: function (index, rowData) {
- var key = this.getCheckMapKey(rowData);
- if (!this.unCheckedDatas.has(key)) {
- this.unCheckedDatas.set(key, rowData);
- }
- if (this.checkedDatas.has(key)) {
- this.checkedDatas.delete(key);
- }
- this.selectedChange();
- },
- selectAll: function () {
- var temp = this;
- temp.checkedDatas.clear();
- temp.unCheckedDatas.clear();
- for (let rowData of temp.tableData) {
- if(!rowData.disabled){
- var key = temp.checkedKeyPre + rowData[temp.identification];
- rowData.checked = true;
- temp.checkedDatas.set(key, rowData);
- }
-
- }
- temp.resetTrDom();
- temp.selectedChange();
-
- },
- unSelectAll: function () {
- var temp = this;
- temp.checkedDatas.clear();
- temp.unCheckedDatas.clear();
- for (let rowData of temp.tableData) {
- if(!rowData.disabled) {
- var key = temp.checkedKeyPre + rowData[temp.identification];
- rowData.checked = false;
- temp.unCheckedDatas.set(key, rowData);
- }
- }
- temp.resetTrDom();
- temp.selectedChange();
- },
- checkboxStatus: function () {
- var temp = this;
- temp.removeCheckboxClass();
- var enableSize=temp.tableData.length-temp.disabledSize;
- if(temp.tableData.length==0||enableSize==0){
- temp.checked?temp.checkboxDom.addClass("checkbox_true_part"):temp.checkboxDom.addClass("checkbox_false_full");
- }else{
-
- if (temp.checkedDatas.size >= enableSize) {
- temp.checked = true;
- temp.partChecked = false;
- temp.checkboxDom.addClass("checkbox_true_part");
- } else if (temp.checkedDatas.size > 0 && temp.checkedDatas.size < enableSize) {
- temp.checked = false;
- temp.partChecked = true;
- temp.checkboxDom.addClass("checkbox_false_part");
- } else {
- temp.checked = false;
- temp.partChecked = false;
- temp.checkboxDom.addClass("checkbox_false_full");
- }
- }
- },
- selectedChange: function () {
- var checkedDatas = this.checkedDatas.values();
- checkedDatas = this.produceArray(checkedDatas);
-
- var unCheckedDatas = this.unCheckedDatas.values();
- unCheckedDatas = this.produceArray(unCheckedDatas);
- this.checkboxStatus();
- this.$emit("selectedDatasChange", checkedDatas, unCheckedDatas);
- },
- produceArray: function (mapIterator) {
- if (mapIterator != null || mapIterator != undefined) {
- var arr = [];
- for (let val of mapIterator) {
- arr.push(val)
- }
- return arr;
- }
- return null;
- },
- resetTrDom: function () {//强制刷新dom
- var temp = this;
- temp.trReset = false;
- temp.$nextTick(() => {
- temp.trReset = true
- });
- },
- uncheckTabData:function(rowData){//取消选中某个tr
- for (let trComponet of this.$refs["r-tr-ref"]){
- if(rowData[this.identification]==trComponet.rowData[this.identification]){
- trComponet.uncheckTr();
- break;
- }
- }
- },
- uncheckAllTabData:function(){
- $.each(this.$refs["r-tr-ref"],function(i,v){
- v.uncheckTr();
- })
- }
- },
- computed: {},
- watch: {
- tableData: function () {
- this.init();
- this.checkboxDom.attr("class", "r-checkbox checkbox_false_full");
- }
- },
- mounted: function () {
- this.init();
- }
-})
-
-
-var rTree = Vue.extend({
- template: "#nzTree",
- props: {
- treeData: {
- type: Array,
- required: true
- },
- selectedNodeId: "",
- },
-
- data() {
- return {
- setting: {
- view: {
- selectedMulti: true,
- showIcon: false
- },
- edit: {
- enable: false,
- },
- data: {
- simpleData: {
- enable: true,
- idKey: "id",
- pIdKey: "pid",
- rootPId: 0
- }
- },
- check: {
- enable: true,
- checkStyle: "checkbox",
- nocheckInherit: true,
- chkboxType: {"Y": "", "N": ""}
- },
- callback: {
- onClick: this.zTreeOnClick,
- onCheck: this.zTreeOnCheck
- }
- },
- zTree: null,
- checkedNodes: []
-
- };
- },
- methods: {
- // 初始化ztree
- initZtree() {
- this.zTree = $.fn.zTree.init($("#beTree"), this.setting, this.treeData);
- this.zTree.expandAll(true);
- // for (let node of this.treeData){
- // this.zTreeOnCheck(null,null,node);
- // }
- },
- // 树节点点击事件
- zTreeOnClick: function (event, treeId, treeNode) {
- var abPath=this.printNodeGroupName(treeNode);
- treeNode.absolutePath=abPath;
- this.$emit("tree-click", treeNode);
- },
- zTreeOnCheck: function (event, treeId, treeNode) {
- var abPath=this.printNodeGroupName(treeNode);
- treeNode.absolutePath=abPath;
- this.$emit("tree-select", treeNode);
- },
- uncheckNode:function(node){
- if (node.tId == undefined || node.tId == null) { //解决更新操作中 找不到关联节点的问题
- node = this.zTree.getNodeByParam("id", node.id, null);
- }
- node.checked = false;
- this.zTree.updateNode(node, false);
- },
- uncheckAllNode:function(){
- this.initZtree();
- },
- printNodeGroupName: function (treeNode) {
- var fullPath = "";
- var temp=this;
- var func = function (treeNode) {
- var pid = treeNode.pid;
- if (pid != 0) {
- $.each(temp.treeData, function (i, v) {
- if (pid == v.id) {
- fullPath += temp.printNodeGroupName(v) + "/" + treeNode.name;
- }
- })
- } else {
- fullPath += treeNode.name;
- }
-
- }
- func(treeNode);
- return fullPath;
- }
-
- },
- watch: {
- // 监听树节点的变化更新树
- treeData: function (val) {
- this.initZtree();
- }
- },
- mounted() {
- this.initZtree();
- }
-})
-
-
-var selector = Vue.extend({
- template: "#nzNodeSelector",
- props: {
- selectedTabDataChange: {
- type: Function
- },
- selectedTreeDataChange: {
- type: Function
- },
- disableSwitch:{
- type:Function
- },
- notifySelectedTabDatas:{
- type:Array
- },
- notifySelectedTreeDatas:{
- type:Array
- }
- },
- data: function () {
- return {
- tableData: [],
- tabSelectedKeyPre: "tab-checked-",
- treeSelectedKeyPre:"tree-checked-",
- key: "uuid", //数据的唯一标识
- colModel: [
- {name: "<@spring.message 'common.name'/>", field: "name", width: 120},
- {name: "IP", field: "ip", width: 120},
- {name: "<@spring.message 'node.type'/>", field: "type", width: 70,formatter:function(rowData){
- return rowData["type"]=='1'?"<@spring.message 'node.type.server'/>":"<@spring.message 'node.type.net'/>";
- }},
- {name: "<@spring.message 'common.status'/>", field: "state", width: 60,formatter:function(rowData){
- return rowData["state"]=='1'?"<@spring.message 'common.onLine'/>":"<span style='color:#cccccc;'><@spring.message 'common.offLine'/></span>";
- }}
- ],
- treeData: [],
- selectedTableDatas: new Map(),
- selectedTreeDatas: new Map(),
- curSystem:null
- }
- },
- components: {
- "nz-table": rTable,
- "nz-tree": rTree
- },
- created: function () {
- this.getCurSysNodeGroups();
- },
- methods: {
- init:function(){
- this.initTab();
- this.initTree();
- },
- initTab:function(){
- var temp=this;
- temp.selectedTableDatas.clear();
- if(temp.notifySelectedTabDatas!=undefined && temp.notifySelectedTabDatas!=null && temp.notifySelectedTabDatas instanceof Array){
- for(let rowData of temp.notifySelectedTabDatas){
- var key= temp.getSelectedTabKey(rowData);
- temp.selectedTableDatas.set(key,rowData)
- }
- temp.selectedTabDataChange(temp.notifySelectedTabDatas);
- }
- },
- initTree:function(){
- var temp=this;
- temp.selectedTreeDatas.clear();
- if(temp.notifySelectedTreeDatas!=undefined && temp.notifySelectedTreeDatas!=null && temp.notifySelectedTreeDatas instanceof Array){
- for(let node of temp.notifySelectedTreeDatas){
- var key= temp.getSelectedTreeKey(node);
- var absolutePath=temp.$refs.treeChild.printNodeGroupName(node);
- node.absolutePath=absolutePath;
- temp.selectedTreeDatas.set(key,node)
- }
- temp.selectedTreeDataChange(temp.notifySelectedTreeDatas);
- }
- temp.getUnderSysNodeGroups(temp.curSystem.id);
- },
- getCurSysNodeGroups: function () {//获取当前业务系统下的节点组列表
- var temp = this;
- $.getJSON(baseURL + "system/detail", function (r) {
- temp.curSystem=r.data;
- temp.getUnderSysNodeGroups(r.data.id);
- });
- },
- getUnderSysNodeGroups: function (systemId) { //根据业务系统id获取节点组列表
- var temp = this;
- $.ajax({
- url: baseURL + "/nodegroup/list",
- type: "GET",
- async: false,
- success: function (r) {
- if (200 == r.code) {
- for (let i in r.data.list) {
- var v = r.data.list[i];
- if (systemId == v.id) {
- for(let nodeGroup of v.nodegroups){
- var key=temp.getSelectedTreeKey(nodeGroup);
- if(temp.selectedTreeDatas.has(key)){
- nodeGroup.checked=true;
- }
- }
- temp.treeData = v.nodegroups;
- break;
- }
- }
- }
- }
- })
- },
- getNodeInfos: function (nodeGroup) { //根据节点组获取 该节点组下的节点列表
- var temp = this;
- $.getJSON(baseURL + "node/list?groupId=" + nodeGroup.id + "&sidx=state&order=asc", function (r) {
- for(let index in r.data.list){
- var rowData=r.data.list[index];
- var key = temp.getSelectedTabKey(rowData);
- if(temp.selectedTableDatas.has(key)){
-
- rowData.checked=true;
- }
- if(temp.disableSwitch !=undefined && temp.disableSwitch instanceof Function){
- temp.disableSwitch(rowData);
- }
- }
-
- temp.tableData = r.data.list;
- })
- },
- clickNode: function (node) {
- this.getNodeInfos(node)
- },
- getSelectedTabKey:function(rowData){
- return this.tabSelectedKeyPre + rowData[this.key];
- },
- getSelectedTreeKey:function(node){
- return this.treeSelectedKeyPre+node.id
- },
- selectedTableDatasChange: function (selectedDatas, unSelectedDatas) {
- var temp = this;
- for (let rowData of selectedDatas) {
- var key = temp.getSelectedTabKey(rowData);
- if (!temp.selectedTableDatas.has(key)) {
- temp.selectedTableDatas.set(key, rowData);
- }
- }
-
- for (let rowData of unSelectedDatas) {
- var key = temp.getSelectedTabKey(rowData);
- if (temp.selectedTableDatas.has(key)) {
- temp.selectedTableDatas.delete(key);
- }
- }
- var selectedTabDatas = temp.produceArray(temp.selectedTableDatas.values());
- if(temp.selectedTabDataChange!=undefined&&temp.selectedTabDataChange instanceof Function){
- temp.selectedTabDataChange(selectedTabDatas);
- }
-
- },
- selectedTreeDatasChange: function (node) {
- var temp = this;
- var key =temp.getSelectedTreeKey(node);
- if (!temp.selectedTreeDatas.has(key)) {
- if(node.checked){
- temp.selectedTreeDatas.set(key, node)
- }
- }else{
- if(!node.checked){
- temp.selectedTreeDatas.delete(key)
- }
- }
- var selectedTreeDatas = temp.produceArray(temp.selectedTreeDatas.values());
- if(temp.selectedTreeDataChange!=undefined&&temp.selectedTreeDataChange instanceof Function){
- temp.selectedTreeDataChange(selectedTreeDatas);
- }
- },
- uncheckTabData:function(rowData){
- var temp=this;
- temp.selectedTableDatasChange([],[rowData]);
- this.$refs.nzTable.uncheckTabData(rowData);
- },
- uncheckAllTabData:function(){
- this.$refs.nzTable.uncheckAllTabData();
- },
- uncheckTreeData:function(treeNode){
- var temp=this;
- treeNode.checked=false;
- temp.selectedTreeDatasChange(treeNode); //通知父组件
- temp.$refs.treeChild.uncheckNode(treeNode);//通知子组件
- },
- uncheckAllTreeData:function(){
- var temp=this
- this.$refs.treeChild.uncheckAllNode();
- temp.selectedTreeDatas.clear();
- var selectedTreeDatas = temp.produceArray(temp.selectedTreeDatas.values());
- if(temp.selectedTreeDataChange!=undefined&&temp.selectedTreeDataChange instanceof Function){
- temp.selectedTreeDataChange(selectedTreeDatas);
- }
- },
- produceArray: function (mapIterator) {
- if (mapIterator != null || mapIterator != undefined) {
- var arr = [];
- for (let val of mapIterator) {
- arr.push(val)
- }
- return arr;
- }
- return null;
- }
-
- },
- watch: {
- notifySelectedTabDatas:{
- handler: function (val, oldVal) {
- this.initTab();
-
- },
- deep: true,
- },
-
- notifySelectedTreeDatas:{
- handler: function (val, oldVal) {
- this.initTree();
-
- },
- deep: true,
- },
- },
- mounted() {
-
- }
-})
-
-var fileUpload = Vue.extend({
- template: "#fileInput",
- components: {},
- props: {
- name:{
- type:String,
- default:'file'
- },
- accept:{
- type:String,
- default:'.*'
- },
- hasOld:{
- type:Boolean,
- default:false
- },
- oldFile:{
- type:Object //{filePath:String,remark:String}
- }
- },
- data: function () {
- return {
- value:null,
- viewInputId:'location',
- viewInputSelector:'',
- fileInputId:'i-file',
- fileInputSelector:'',
- dirty:false,
- required:true,
- error:false,
- slot:0,
- };
- },
- validations: function() {
-
- },
- created: function () {
- var temp=this;
- temp.slot=Math.ceil(Math.random()*100000000);;
- temp.viewInputId=temp.viewInputId+"-"+temp.slot;
- temp.fileInputId=temp.fileInputId+"-"+temp.slot;
- },
- methods: {
- init:function(){
- var temp=this;
- temp.viewInputSelector='#'+temp.viewInputId;
- temp.fileInputSelector='#'+temp.fileInputId;
- },
- fileInput:function(event){
- var temp=this;
- if(event.target.files.length<1){
- temp.required=false;
- temp.error=true;
- }else{
- temp.error=false;
- temp.required=true;
- }
- $(temp.viewInputSelector).val('')
- var text=$(temp.fileInputSelector).val();
- $(temp.viewInputSelector).val(text);
- temp.value=text;
- },
- viewInputClick:function(){
- var temp=this;
- temp.fileInputClick();
- },
- selectBtnClick:function(){
- var temp=this;
- temp.fileInputClick();
- },
- fileInputClick:function(){
- var temp=this;
- temp.dirty=true;
- $(temp.fileInputSelector).click();
- },
- reset:function(){
- var temp=this;
- temp.dirty=false;
- temp.required=true;
- temp.error=false;
- },
- touch:function(){
- var temp=this;
- temp.dirty=true;
- },
- historyFileClick:function(){
- var temp=this;
- // window.location.href=baseURL+'sys/download?fileName='+encodeURI(temp.oldFile.remark)+"&filePath="+encodeURI(temp.oldFile.filePath)
- var url=baseURL+'sys/download?fileName='+encodeURI(temp.oldFile.remark)+"&filePath="+encodeURI(temp.oldFile.filePath);
- // var elemIF = document.createElement('iframe')
- // elemIF.src = url
- // elemIF.style.display = 'none'
- // document.body.appendChild(elemIF);
- // var form=document.createElement('form');
- // form.style.display='none'
- // form.action=baseURL+'sys/download?fileName=';
- // form.method='GET';
- // var fileNameInput=document.createElement("input");
- // fileNameInput.type='hidden';
- // fileNameInput.name='fileName';
- // fileNameInput.value=temp.oldFile.remark;
- // var filePathInput=document.createElement("input");
- // filePathInput.type='hidden';
- // filePathInput.name='filePath';
- // filePathInput.value=temp.oldFile.filePath;
- // $(form).append($(fileNameInput))
- // $(form).append($(filePathInput))
- // $('body').append($(form));
- // form.submit();
-
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, true);
- xhr.responseType = "blob";
- xhr.onload = function () {
- if (this.status === 200) {
- var URL = window.URL || window.webkitURL; //兼容处理
- var content = this.response;
- var aTag = document.createElement('a');
- var blob = new Blob([content]);
- var headerName = xhr.getResponseHeader("Content-disposition");
- var fileName = decodeURIComponent(headerName).substring(20);
- if(fileName==''){
- alert("<@spring.message 'common.noFile'/>")
- return;
- }
- aTag.download = fileName;
- aTag.href = URL.createObjectURL(blob);
- aTag.click();
- URL.revokeObjectURL(blob);
- }
- };
- xhr.send()
-
- }
- },
- computed: {},
- watch: {
- value:{
- handler:function(){
- if(this.value==null||this.value==''||typeof this.value =='undefined'){
- this.required=false;
- this.error=true;
- }
- },
- immediate: true
- }
- },
-
- mounted: function () {
- this.init();
- },
- beforeDestroy:function(){
- this.$emit('uploadComponetDestory');
- }
-})
-
-
- </script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/common/nodeRel.js b/nezha-admin/src/main/resources/templates/js/modules/common/nodeRel.js
deleted file mode 100644
index ecafe914..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/common/nodeRel.js
+++ /dev/null
@@ -1,627 +0,0 @@
-<script>
-Vue.use(window.vuelidate.default);
-var required = window.validators.required;
-var ipAddress = window.validators.ipAddress;
-
-//分配节点组件
-var nodeRelComponent = Vue.extend({
- template: "#nodeRelTemplate", //位于/modules/common/nodeRel.html
- props: {
- initSelectedNodes: { //已分配节点
- type: Array,
- required: true
- },
- initSelectableNodes: { //可分配节点
- type: Array,
- required: true
- }
- },
- data: function () {
- return {
- height: top.$(".content").height()-250, //动态生成box的高度
- selectedIP: '',
- selectedIPStart: '',
- selectedIPEnd: '',
- selectableIP: '',
- selectableIPStart: '',
- selectableIPEnd: '',
- selectedCount: 0, //已分配列表中勾选的数量
- selectableCount: 0, //可分配列表中勾选的数量
- selectedTotalCount: 0, //已分配总数
- selectableTotalCount: 0, //可分配总数
- selectedNodes: [],
- selectableNodes: [],
- tempSelectedNodes: [],
- tempSelectableNodes: [],
- selectedNodesAdd: [], //新增的已分配节点,uuid数组,例如:[10,11,12]
- selectableNodesAdd: [], //新增的可分配节点(从已分配节点里删除的)
- selectedRange: false, //已分配搜索栏是搜索范围还是指定ip
- selectableRange: false, //可分配搜索栏是搜索范围还是指定ip
- colModel: [
- {name: "IP", field: "ip", width: 120},
- {name: "类型", field: "type", width: 70,formatter:function(rowData){
- return rowData["type"]=='1'?"服务器":"网元";
- }},
- {name: "状态", field: "state", width: 60,formatter:function(rowData){
- return rowData["state"]=='1'?"在线":"<span style='color:#aaa;'>下线</span>";
- }}
- ],
- selectedIPEndSizeValidation: false, // IPEnd 比 IPStart 小 提示标识 selected
- selectableIPEndSizeValidation: false, // IPEnd 比 IPStart 小 提示标识 selectable
- selectedUuids: [], // 选中的uuids selected
- selectableUuids: [] // 选中的uuids selectable
- }
- },
- validations: {
- selectedIPStart: {
- ipAddress, required
- },
- selectedIPEnd: {
- ipAddress, required
- },
- selectableIPStart: {
- ipAddress, required
- },
- selectableIPEnd: {
- ipAddress, required
- }
- },
- methods: {
- check: function(node, flag) { //节点列表的点击事件
- var temp = this;
- var uuid = node.uuid;
- // 判断是否选中
- if (!node.checkedBox1) {
- if (flag == 'selected') {
- // 在选中数组中添加
- this.selectedUuids.push(uuid);
- // 选中
- this.selectedNodes.some(function (item, index) {
- if (item.uuid == uuid) {
- temp.$set(item, 'checkedBox1', true);
- temp.selectedNodes.splice(index, 1, item);
- return true;
- }
- });
- } else {
- // 在选中数组中添加
- this.selectableUuids.push(uuid);
- // 选中
- this.selectableNodes.some(function (item, index) {
- if (item.uuid == uuid) {
- temp.$set(item, 'checkedBox1', true);
- temp.selectableNodes.splice(index, 1, item);
- return true;
- }
- });
- }
- } else {
- if (flag == 'selected') {
- // 在选中数组中删除
- this.selectedUuids.splice(this.selectedUuids.indexOf(uuid),1);
- // 取消选中
- this.selectedNodes.some(function (item, index) {
- if (item.uuid == uuid) {
- temp.$set(item, 'checkedBox1', false);
- temp.selectedNodes.splice(index, 1, item);
- return true;
- }
- });
- } else {
- // 在选中数组中删除
- this.selectableUuids.splice(this.selectableUuids.indexOf(uuid),1);
- // 取消选中
- this.selectableNodes.some(function (item, index) {
- if (item.uuid == uuid) {
- temp.$set(item, 'checkedBox1', false);
- temp.selectableNodes.splice(index, 1, item);
- return true;
- }
- });
- }
- }
- // 计算选中数量和总数量
- this.countControll();
- },
- checkAll: function(event, flag) {
- var temp = this;
- // 全选
- if (!$(event.currentTarget).hasClass("checkbox_true_part")) {
- if (flag == 'selected') {
- // 先置空
- this.selectedUuids = [];
- // 全选 添加uuids
- this.selectedNodes.forEach(function (item) {
- temp.$set(item, 'checkedBox1', true);
- temp.selectedUuids.push(item.uuid);
- })
- } else {
- // 先置空
- this.selectableUuids = [];
- // 全选 添加uuids
- this.selectableNodes.forEach(function (item) {
- temp.$set(item, 'checkedBox1', true);
- temp.selectableUuids.push(item.uuid);
- })
- }
- } else { // 全不选
- if (flag == 'selected') {
- // 置空
- this.selectedUuids = [];
- // 取消全选
- this.selectedNodes.forEach(function (item) {
- temp.$set(item, 'checkedBox1', false);
- })
- } else {
- // 置空
- this.selectableUuids = [];
- // 取消全选
- this.selectableNodes.forEach(function (item) {
- temp.$set(item, 'checkedBox1', false);
- })
- }
- }
- // 计算选中数量和总数量
- this.countControll();
- },
- countControll: function() { // 更新已选数量和总数
- this.selectedCount = this.selectedUuids.length;
- this.selectableCount = this.selectableUuids.length;
- this.selectedTotalCount = this.selectedNodes.length;
- this.selectableTotalCount = this.selectableNodes.length;
- },
- nodeRelChange: function(flag, event) { // 节点分配状态更改
- if (flag == 0) { // 取消分配
- var addToSelectableNodes = [];
- for (var i = 0; i < this.selectedUuids.length; i++) {
- var uuid = this.selectedUuids[i];
- for (var j = this.selectedNodes.length-1; j >= 0; j--) {
- if (this.selectedNodes[j].uuid == uuid) {
- var addToSelectableNode = this.selectedNodes[j];
- // 取消分配后取消选中状态
- addToSelectableNode.checkedBox1 = false;
- if (addToSelectableNode.newNode) {
- for (var k = this.selectedNodesAdd.length-1; k >= 0; k--) {
- if (this.selectedNodesAdd[k] == addToSelectableNode.uuid) {
- this.selectedNodesAdd.splice(k, 1);
- }
- }
- addToSelectableNode.newNode = false;
- } else {
- this.selectableNodesAdd.push(addToSelectableNode.uuid);
- addToSelectableNode.newNode = true;
- }
- addToSelectableNodes.push(addToSelectableNode);
- this.selectedNodes.splice(j, 1);
- for (var k = this.tempSelectedNodes.length-1; k >= 0; k--) {
- if (this.tempSelectedNodes[k].uuid == uuid) {
- this.tempSelectedNodes.splice(k, 1);
- break;
- }
- }
- break;
- }
- }
- }
- // 重置selectuuids
- this.selectedUuids = [];
-
- this.selectableNodes = addToSelectableNodes.concat(this.selectableNodes);
- this.tempSelectableNodes = addToSelectableNodes.concat(this.tempSelectableNodes);
- this.sortRow(0, this.selectableNodes);
- this.sortRow(1, this.tempSelectableNodes);
- } else if (flag == 1) { // 可分配
- var addToSelectedNodes = [];
- for (var i = 0; i < this.selectableUuids.length; i++) {
- var uuid = this.selectableUuids[i];
- for (var j = this.selectableNodes.length-1; j >= 0; j--) {
- if (this.selectableNodes[j].uuid == uuid) {
- var addToSelectedNode = this.selectableNodes[j];
- // 分配过去取消选中
- addToSelectedNode.checkedBox1 = false;
- if (addToSelectedNode.newNode) {
- for (var k = this.selectableNodesAdd.length-1; k >= 0; k--) {
- if (this.selectableNodesAdd[k] == addToSelectedNode.uuid) {
- this.selectableNodesAdd.splice(k, 1);
- }
- }
- addToSelectedNode.newNode = false;
- } else {
- this.selectedNodesAdd.push(addToSelectedNode.uuid);
- addToSelectedNode.newNode = true;
- }
- addToSelectedNodes.push(addToSelectedNode);
- this.selectableNodes.splice(j, 1);
- for (var k = this.tempSelectableNodes.length-1; k >= 0; k--) {
- if (this.tempSelectableNodes[k].uuid == uuid) {
- this.tempSelectableNodes.splice(k, 1);
- break;
- }
- }
- break;
- }
- }
- }
- // 重置selectableUuids
- this.selectableUuids = [];
-
- this.selectedNodes = addToSelectedNodes.concat(this.selectedNodes);
- this.tempSelectedNodes = addToSelectedNodes.concat(this.tempSelectedNodes);
- this.sortRow(2, this.selectedNodes);
- this.sortRow(3, this.tempSelectedNodes);
- }
- // 已选数量和总数量控制
- this.countControll();
- // 将数据传递给父组件
- this.$emit("node-change", [this.selectedNodesAdd, this.selectableNodesAdd, this.tempSelectedNodes.length]);
- },
- inputTouch: function(position, event) { //搜索框点击事件
- if (position == 0) { //范围搜索
- $(event.currentTarget).parent().find("input").css("color", "#555");
- $(event.currentTarget).parent().next().find("input").css("color", "lightgray");
- if ($(event.currentTarget).parent().parent().parent().find("#selected-box").length > 0) {
- this.selectedRange = true;
- } else if ($(event.currentTarget).parent().parent().parent().find("#selectable-box").length > 0) {
- this.selectableRange = true;
- }
- } else if (position == 1) { //精确搜索
- $(event.currentTarget).css("color", "#555");
- $(event.currentTarget).parent().prev().find("input").css("color", "lightgray");
- if ($(event.currentTarget).parent().parent().parent().find("#selected-box").length > 0) {
- this.selectedRange = false;
- } else if ($(event.currentTarget).parent().parent().parent().find("#selectable-box").length > 0) {
- this.selectableRange = false;
- }
- }
- },
- searchIp: function(event) { // ip搜索
- var matchNodes = [];
- if ($(event.currentTarget).parent().parent().parent().find("#selected-box").length > 0) { // 已分配
- // 搜索
- var input = $(event.currentTarget).parent().parent().find("[active=true]");
- if (input.length > 1) { // 范围搜索
- // 校验IP
- if (!this.validateSelectedStartAndEndIP()) {
- this.showSelectedIPStartWarningMsg();
- this.showSelectedIPEndWarningMsg();
- return;
- }
- var ipStart = $(input[0]).val();
- var ipEnd = $(input[1]).val();
- var ipStartLong = ipToNumber(ipStart);
- var ipEndLong = ipToNumber(ipEnd);
- if (ipStartLong > ipEndLong) {
- this.selectedIPEndSizeValidation = true;
- return;
- }
- this.selectedNodes = [];
- for (var i = 0; i < this.tempSelectedNodes.length; i++) {
- if (ipStartLong <= this.tempSelectedNodes[i].ipLong && ipEndLong >= this.tempSelectedNodes[i].ipLong) {
- this.selectedNodes.push(this.tempSelectedNodes[i]);
- }
- }
- } else if (input.length == 1) { // 精确搜索
- if (!this.selectedIP) {
- this.selectedNodes = this.tempSelectedNodes;
- } else {
- this.selectedNodes = [];
- for (var i = 0; i < this.tempSelectedNodes.length; i++) {
- if (this.tempSelectedNodes[i].ip.indexOf(this.selectedIP) > -1) {
- this.selectedNodes.push(this.tempSelectedNodes[i]);
- }
- }
- }
- }
- // 更新 selectedUuid 选中的依旧选中
- var temp = this;
- this.selectedUuids = [];
- this.selectedNodes.forEach(function (item) {
- if (item.checkedBox1) { // 搜索之后当前选中状态
- temp.$set(item, 'checkedBox1', true);
- temp.selectedUuids.push(item.uuid);
- }
- })
- } else if ($(event.currentTarget).parent().parent().parent().find("#selectable-box").length > 0) { // 可分配
- // 搜索
- var input = $(event.currentTarget).parent().parent().find("[active=true]");
- if (input.length > 1) { // 范围搜索
- // 校验IP
- if (!this.validateSelectableStartAndEndIP()) {
- this.showSelectableIPStartWarningMsg();
- this.showSelectableIPEndWarningMsg();
- return;
- }
- var ipStart = $(input[0]).val();
- var ipEnd = $(input[1]).val();
- var ipStartLong = ipToNumber(ipStart);
- var ipEndLong = ipToNumber(ipEnd);
- if (ipStartLong > ipEndLong) {
- this.selectableIPEndSizeValidation = true;
- return;
- }
- this.selectableNodes = [];
- for (var i = 0; i < this.tempSelectableNodes.length; i++) {
- if (ipStartLong <= this.tempSelectableNodes[i].ipLong && ipEndLong >= this.tempSelectableNodes[i].ipLong) {
- this.selectableNodes.push(this.tempSelectableNodes[i]);
- }
- }
- } else if (input.length == 1) { // 精确搜索
- if (!this.selectableIP) {
- this.selectableNodes = this.tempSelectableNodes;
- } else {
- this.selectableNodes = [];
- for (var i = 0; i < this.tempSelectableNodes.length; i++) {
- if (this.tempSelectableNodes[i].ip.indexOf(this.selectableIP) > -1) {
- this.selectableNodes.push(this.tempSelectableNodes[i]);
- }
- }
- }
- }
- // 更新 selectedUuid 选中的依旧选中
- var temp = this;
- this.selectableUuids = [];
- this.selectableNodes.forEach(function (item) {
- if (item.checkedBox1) { // 搜索之后当前选中状态
- temp.$set(item, 'checkedBox1', true);
- temp.selectableUuids.push(item.uuid);
- }
- })
- }
-
- // 已选数量和总数量控制
- this.$nextTick(()=>{
- this.countControll();
- });
- },
- searchReset: function(event) { //搜索条件重置
- if ($(event.currentTarget).parent().parent().parent().find("#selected-box").length > 0) { //已分配
- this.selectedIP = '';
- this.selectedIPStart = '';
- this.selectedIPEnd = '';
-
- this.selectedIPEndSizeValidation = this.selectedRange = false;
-
- this.$v.selectedIPStart.$reset();
- this.$v.selectedIPEnd.$reset();
- this.$v.selectedIP.$reset();
- } else {
- this.selectableIP = '';
- this.selectableIPStart = '';
- this.selectableIPEnd = '';
-
- this.selectableIPEndSizeValidation = this.selectableRange = false;
-
- this.$v.selectableIPStart.$reset();
- this.$v.selectableIPEnd.$reset();
- this.$v.selectableIP.$reset();
- }
- },
- nodeReset: function() { //重置此次操作
- this.tempSelectedNodes = this.selectedNodes = JSON.parse(JSON.stringify(this.initSelectedNodes));
- this.tempSelectableNodes = this.selectableNodes = JSON.parse(JSON.stringify(this.initSelectableNodes));
-
- var temp = this;
- // 以前选中的恢复选中
- this.selectedNodes.forEach(function (item, index) {
- if (temp.selectedUuids.indexOf(item.uuid) != -1) {
- temp.$set(item, 'checkedBox1', true);
- }
- })
- // 以前选中的恢复选中
- this.selectableNodes.forEach(function (item, index) {
- if (temp.selectableUuids.indexOf(item.uuid) != -1) {
- temp.$set(item, 'checkedBox1', true);
- }
- })
-
- this.selectedNodesAdd = [];
- this.selectableNodesAdd = [];
- this.$emit("node-change", [this.selectedNodesAdd, this.selectableNodesAdd, this.tempSelectedNodes.length]);
- this.countControll();
- },
- resetSelectedCount: function() {
- // 重置选中数量
- this.selectedUuids = [];
- this.selectableUuids = [];
- },
- sortRow: function(flag, nodes) { //列表重新排序,将新增的项置顶
- var newNodes = [];
- for (var i = nodes.length-1; i >= 0; i--) {
- if (nodes[i].newNode) {
- newNodes.unshift(nodes[i]);
- nodes.splice(i, 1);
- }
- }
- if (flag == 0) {
- this.selectableNodes = newNodes.concat(nodes);
- } else if (flag == 1) {
- this.tempSelectableNodes = newNodes.concat(nodes);
- } else if (flag == 2) {
- this.selectedNodes = newNodes.concat(nodes);
- } else if (flag == 3) {
- this.tempSelectedNodes = newNodes.concat(nodes);
- }
- },
- validateSelectedStartAndEndIP: function() {
- this.$v.selectedIPStart.$touch();
- this.$v.selectedIPEnd.$touch();
- return !this.$v.selectedIPStart.$error && !this.$v.selectedIPEnd.$error && this.selectedIPEndSizeValidation;
- },
- validateSelectedIP: function() {
- this.$v.selectedIP.$touch();
- return !this.$v.selectedIP.$error;
- },
- validateSelectableStartAndEndIP: function() {
- this.$v.selectableIPStart.$touch();
- this.$v.selectableIPEnd.$touch();
- return !this.$v.selectableIPStart.$error && !this.$v.selectableIPEnd.$error && this.selectableIPEndSizeValidation;
- },
- validateSelectableIP: function() {
- this.$v.selectableIP.$touch();
- return !this.$v.selectableIP.$error;
- },
- showSelectedIPStartWarningMsg: function() {
- if(this.$v.selectedIPStart.$anyError){
- var msg = '';
- if (this.$v.selectedIPStart.$dirty&&!this.$v.selectedIPStart.required) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.required'/></div>"
- }
- if (this.$v.selectedIPStart.$dirty&&!this.$v.selectedIPStart.ipAddress) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.node.ipFormat'/></div>"
- }
- layer.tips(msg, "#selectedIPStart",{
- tips:[1, "white"],
- tipsMore:true
- });
- }
- },
- showSelectedIPEndWarningMsg: function() {
- if (this.$v.selectedIPEnd.$anyError || !this.selectedIPEndSizeValidation) {
- var msg = '';
- if (this.$v.selectedIPEnd.$dirty&&!this.$v.selectedIPEnd.required) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.required'/></div>"
- }
- if (this.$v.selectedIPEnd.$dirty&&!this.$v.selectedIPEnd.ipAddress) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.node.ipFormat'/></div>"
- }
- if (msg == '' && !this.selectedIPEndSizeValidation) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.IpEndLessThanIpStart'/></div>"
- }
- layer.tips(msg, "#selectedIPEnd",{
- tips:[1, "white"],
- tipsMore:true
- });
- }
- },
- showSelectedIPWarningMsg: function() {
- if (this.$v.selectedIP.$anyError) {
- var msg = '';
- if (this.$v.selectedIP.$dirty&&!this.$v.selectedIP.required) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.required'/></div>"
- }
- if (this.$v.selectedIP.$dirty&&!this.$v.selectedIP.ipAddress) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.node.ipFormat'/></div>"
- }
- layer.tips(msg, "#selectedIP",{
- tips:[1, "white"],
- tipsMore:true
- });
- }
- },
- showSelectableIPStartWarningMsg: function() {
- if(this.$v.selectableIPStart.$anyError){
- var msg = '';
- if (this.$v.selectableIPStart.$dirty&&!this.$v.selectableIPStart.required) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.required'/></div>"
- }
- if (this.$v.selectableIPStart.$dirty&&!this.$v.selectableIPStart.ipAddress) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.node.ipFormat'/></div>"
- }
- layer.tips(msg, "#selectableIPStart",{
- tips:[1, "white"],
- tipsMore:true
- });
- }
- },
- showSelectableIPEndWarningMsg: function() {
- if (this.$v.selectableIPEnd.$anyError || !this.selectableIPEndSizeValidation) {
- var msg = '';
- if (this.$v.selectableIPEnd.$dirty&&!this.$v.selectableIPEnd.required) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.required'/></div>"
- }
- if (this.$v.selectableIPEnd.$dirty&&!this.$v.selectableIPEnd.ipAddress) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.node.ipFormat'/></div>"
- }
- if (msg == '' && !this.selectableIPEndSizeValidation) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.IpEndLessThanIpStart'/></div>"
- }
- layer.tips(msg, "#selectableIPEnd",{
- tips:[1, "white"],
- tipsMore:true
- });
- }
- },
- showSelectableIPWarningMsg: function() {
- if (this.$v.selectableIP.$anyError) {
- var msg = '';
- if (this.$v.selectableIP.$dirty&&!this.$v.selectableIP.required) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.required'/></div>"
- }
- if (this.$v.selectableIP.$dirty&&!this.$v.selectableIP.ipAddress) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.node.ipFormat'/></div>"
- }
- layer.tips(msg, "#selectableIP",{
- tips:[1, "white"],
- tipsMore:true
- });
- }
- }
- },
- mounted: function() {
- //box内滚动条
- var ps1 = new PerfectScrollbar('#selected-box');
- var ps2 = new PerfectScrollbar('#selectable-box');
- },
- watch: {
- initSelectedNodes: function(n, o) {
- //init数据拷贝,保证init不改变
- this.tempSelectedNodes = this.selectedNodes = JSON.parse(JSON.stringify(n));
- this.selectedTotalCount = n.length;
- },
- initSelectableNodes: function(n, o) {
- this.tempSelectableNodes = this.selectableNodes = JSON.parse(JSON.stringify(n));
- this.selectableTotalCount = n.length;
- },
- selectedIPEnd: function(n, o) {
- var ipStartLong = ipToNumber(this.selectedIPStart);
- var ipEndLong = ipToNumber(n);
- if (ipEndLong >= ipStartLong) {
- this.selectedIPEndSizeValidation = true;
- }else {
- this.selectedIPEndSizeValidation = false;
- }
- },
- selectableIPEnd: function(n, o) {
- var ipStartLong = ipToNumber(this.selectableIPStart);
- var ipEndLong = ipToNumber(n);
- if (ipEndLong >= ipStartLong) {
- this.selectableIPEndSizeValidation = true;
- }else {
- this.selectableIPEndSizeValidation = false;
- }
- }
- }
-})
-Vue.component('node-rel-component', nodeRelComponent);
-function ipToNumber(ip) {
- var num = 0;
- if(ip == "") {
- return num;
- }
- var aNum = ip.split(".");
- if(aNum.length != 4) {
- return num;
- }
- num += parseInt(aNum[0]) << 24;
- num += parseInt(aNum[1]) << 16;
- num += parseInt(aNum[2]) << 8;
- num += parseInt(aNum[3]) << 0;
- num = num >>> 0;
- return num;
-}
-
-function numberToIp(number) {
- var ip = "";
- if(number <= 0) {
- return ip;
- }
- var ip3 = (number << 0 ) >>> 24;
- var ip2 = (number << 8 ) >>> 24;
- var ip1 = (number << 16) >>> 24;
- var ip0 = (number << 24) >>> 24
-
- ip += ip3 + "." + ip2 + "." + ip1 + "." + ip0;
-
- return ip;
-}
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/dashboard/dashboard.js b/nezha-admin/src/main/resources/templates/js/modules/dashboard/dashboard.js
deleted file mode 100644
index b32a6d90..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/dashboard/dashboard.js
+++ /dev/null
@@ -1,1433 +0,0 @@
-<script>
- var echartsDefaultData=true; //此标记代表 echarts图使用的是假数据
- $(function(){
- //初始化时间范围选择
- var rangesConf = {};
- rangesConf['最近一小时'] = [moment().subtract(1, 'hours'), moment()];
- rangesConf['今日'] = [moment().startOf('day'), moment().endOf('day')];
- rangesConf['昨日'] = [moment().subtract(1, 'days').startOf('day'), moment().subtract(1, 'days').endOf('day')];
- rangesConf['最近一月'] = [moment().startOf('month'), moment().endOf('month')];
- rangesConf['上个月'] = [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')];
- rangesConf['最近一周'] = [moment().subtract(1, 'weeks').startOf('day'), moment().endOf('day')];
- rangesConf['本月'] = [moment().subtract(1, 'months').startOf('day'), moment().endOf('day')];
- $('#filterTime').daterangepicker({
- autoApply:false,
- singleDatePicker:false,
- showDropdowns:false, // 是否显示年月选择条件
- timePicker: true, // 是否显示小时和分钟选择条件
- timePickerIncrement: 10, // 时间的增量,单位为分钟
- timePicker24Hour : true,
- opens : 'left', //日期选择框的弹出位置
- ranges: rangesConf,
- locale : {
- format: 'YYYY-MM-DD HH:mm:ss',
- separator : ' - ',
- customRangeLabel : '自定义' ,
- applyLabel : '确定' ,
- cancelLabel : '取消' ,
- fromLabel : '起始时间' ,
- toLabel : '结束时间' ,
- daysOfWeek : '日,一,二,三,四,五,六'.split(',') , // '日', '一', '二', '三', '四', '五', '六'
- monthNames : '一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月'.split(',') , // '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'
- firstDay : 1
- },
- startDate: rangesConf['今日'][0],
- endDate: rangesConf['今日'][1]
- });
-
- var singleValue=10;
- var now = +new Date(2019, 9, 3);
- var oneDay = 24 * 3600 * 1000;
- var value = Math.random() * 1000;
- var datas=[];
- var series=[];
- function randomData() {
- now = new Date(+now + oneDay);
- value = value + Math.random() * 21 - 10;
- return {
- name: now.toString(),
- value: [
- [now.getFullYear(), now.getMonth() + 1, now.getDate()].join('/'),
- Math.round(value)
- ]
- }
- }
-
- for (var i = 0; i < 50; i++) {
- datas.push(randomData());
- }
- var shamData=
- {
- id:0,
- name: 'series1',
- type: 'line',
- showSymbol: false,
- hoverAnimation: false,
- lineStyle:{
- width:1
- },
- areaStyle:{
- opacity:0
- },
- data: datas
- }
- series.push(shamData);
- /* 初始化点 线 柱图 */
- var previewWidth = (top.$(".content").width()-50) + 'px';
- var previewHeight = (top.$(".content").height()*0.35) + 'px';
- document.getElementById("chart").style.width = previewWidth;
- document.getElementById("chart").style.height = previewHeight;
- myChart = echarts.init(document.getElementById('chart'));
-
- var colors = ['#5793f3', '#d14a61', '#DC143C'];
-
- option = {
- color: colors,
- tooltip: {
- trigger: 'item',
- axisPointer: {
- type: 'cross'
- }
- },
- legend:{
- show:vm.chartStatistical.legend==1?true:false,
- x:vm.chartStatistical.legendXPosition.code?vm.chartStatistical.legendXPosition.code:"center",
- y:vm.chartStatistical.legendYPosition.code?vm.chartStatistical.legendYPosition.code:"top"
- },
- toolbox:{
- feature:{
- dataZoom:{
- title:false
- }
- }
- },
- dataZoom:[{
-      type:"inside" //详细配置可见echarts官网
-    }],
- grid: {
- right: '20%'
- },
- xAxis: [
- {
- name:vm.chartStatistical.xaxisName?vm.chartStatistical.xaxisName:"Time",
- type:'time'
- }
- ],
- yAxis: [
- {
- show:true,
- type: 'value',
- name: vm.chartStatistical.yaxesName?vm.chartStatistical.yaxesName:"Value",
- position: 'left'
- },
- {
- show:false,
- type: 'value',
- name:vm.chartStatistical.yaxisName?vm.chartStatistical.yaxisName:"Value",
- position: 'right'
- }
- ],
- series: series
- };
- // 使用刚指定的配置项和数据显示图表。
- myChart.setOption(option);
-
- /* 初始化单值图 */
- document.getElementById("singleChart").style.width = previewWidth;
- document.getElementById("singleChart").style.height = previewHeight;
- singleChart=echarts.init(document.getElementById('singleChart'));
- var angle = [220, -40]
- singleOption = {
- backgroundColor: '#fff',
- tooltip: {
- show: false,
- formatter: "{a} <br/>{b} : {c}%"
- },
- series: [{
- name: '最外层环仪表盘',
- type: "gauge",
- min: vm.chartSingle.minValue?vm.chartSingle.minValue:0,
- max: vm.chartSingle.maxValue?vm.chartSingle.maxValue:100,
- startAngle: 220,
- endAngle: -40,
- splitNumber: 20,
- axisLine: {
- lineStyle: {
- color: [
- [1, "#c1c3c5"]
- ],
- width: 10,
- opacity:vm.chartSingle.isGauge==1?1:0
- }
- },
- axisTick: {
- show:false,
- lineStyle: {
- color: "#fff",
- width: 2,
- },
- length: 0,
- splitNumber: 1
- },
- axisLabel: {
- show:vm.chartSingle.isScale==1?true:false,
- distance: -40,
- textStyle: {
- color: "#bbb"
- },
- rich: {
- a: {
- color: '#fbe010'
- },
- b: {
- color: '#3fa7dc'
- }
- }
- },
- splitLine: {
- show: vm.chartSingle.isScale==1?true:false,
- length: 10,
- lineStyle: {
- color: '#fff',
- width: 2
- }
- },
- itemStyle: {
- normal: {
- color: "#818488",
- shadowColor: 'rgba(0, 0, 0, 0.5)',
- shadowBlur: 10
- }
- },
- detail: {
- formatter: function(v) {
- return singleFormat(v);
- },
- offsetCenter:vm.chartSingle.isGauge==1?[0, "50%"]:[0, "10%"],
- textStyle: {
- fontSize: vm.chartSingle.valueFontSize?vm.chartSingle.valueFontSize:50,
- color: vm.chartSingle.colorValue?vm.chartSingle.colorValue:"#333"
- },
- rich:{
- a:{
- fontSize:vm.chartSingle.isGauge==1?vm.chartSingle.valueFontSize:vm.chartSingle.prefixFontSize?vm.chartSingle.prefixFontSize:30,
- color:vm.chartSingle.colorPrefix?vm.chartSingle.colorPrefix:'#000',
- textShadowOffsetX:10
- },
- b:{
- fontSize:vm.chartSingle.isGauge==1?vm.chartSingle.valueFontSize:vm.chartSingle.suffixFontSize?vm.chartSingle.suffixFontSize:60,
- color:vm.chartSingle.colorSuffix?vm.chartSingle.colorSuffix:'#000'
- }
- }
- },
- title: {
- show:false
- },
- pointer:{
- show:vm.chartSingle.isGauge==1?true:false,
- length: '85%'
- },
- data: [{
- value: singleValue
- }]
- },{
- name: "内环仪表盘四段颜色",
- type: "gauge",
- min: 0,
- max: 100,
- radius: '69%',
- startAngle: 220,
- endAngle: -40,
- splitNumber: 10,
- axisLine: {
- lineStyle: {
- color: [[0.6, '#fb5310'],[0.85, '#fbe010'],[1, "#00ff00"]],
- width: 30,
- opacity:vm.chartSingle.isThreshold==1?1:0
- }
- },
- axisTick: {
- show: vm.chartSingle.isThreshold==1?true:false
- },
- axisLabel: {
- show: false
- },
- splitLine: {
- show: vm.chartSingle.isThreshold==1?true:false,
- length: 15,
- lineStyle: {
- color: '#fff',
- width: 2
- }
- },
- pointer: {
- length: 0
- },
- detail: {
- show: false
- },
- }]
- }
- singleChart.setOption(singleOption);
- /* 仪表盘对应配置修改 */
- function singleFormat(v){
- return '{a| '+vm.chartSingle.prefix+'} '+v+' {b| '+vm.chartSingle.suffix+'}';
- }
-
- // 是否为线图
- $("#isLine").bootstrapSwitch("onSwitchChange",function(event,state){
- if(!state){
- option.series.forEach(function(value,key,arr){
- value.type='';
- })
- if(vm.chartStatistical.points==0&&vm.chartStatistical.bars==0&&vm.chartStatistical.lines==1){
- $("#isLine").bootstrapSwitch('state', true);
- }
- }else{
- vm.showType='line';
- vm.chartStatistical.points=0;
- vm.chartStatistical.bars=0;
- vm.chartStatistical.lines=1;
- $("#isScatter").bootstrapSwitch('state', false);
- $("#isBar").bootstrapSwitch('state', false);
- option.series.forEach(function(value,key,arr){
- value.type='line';
- })
- myChart.setOption(option);
- }
- })
-
- //是否为柱图
- $("#isBar").bootstrapSwitch("onSwitchChange",function(event,state){
- if(!state){
- option.series.forEach(function(value,key,arr){
- value.type='';
- })
- if(vm.chartStatistical.points==0&&vm.chartStatistical.lines==0&&vm.chartStatistical.bars==1){
- $("#isBar").bootstrapSwitch('state', true);
- }
- }else{
- vm.showType='bar';
- vm.chartStatistical.points=0;
- vm.chartStatistical.bars=1;
- vm.chartStatistical.lines=0;
- $("#isScatter").bootstrapSwitch('state', false);
- $("#isLine").bootstrapSwitch('state', false);
- option.series.forEach(function(value,key,arr){
- value.type='bar';
- })
- myChart.setOption(option);
- }
- })
-
- //是否为点图
- $("#isScatter").bootstrapSwitch("onSwitchChange",function(event,state){
- if(!state){
- option.series.forEach(function(value,key,arr){
- value.type='';
- })
- if(vm.chartStatistical.bars==0&&vm.chartStatistical.lines==0&&vm.chartStatistical.points==1){
- $("#isScatter").bootstrapSwitch('state', true);
- }
- }else{
- vm.showType='scatter';
- vm.chartStatistical.points=1;
- vm.chartStatistical.bars=0;
- vm.chartStatistical.lines=0;
- $("#isLine").bootstrapSwitch('state', false);
- $("#isBar").bootstrapSwitch('state', false);
- option.series.forEach(function(value,key,arr){
- value.type='scatter';
- })
- myChart.setOption(option);
- }
- })
-
- //左Y轴是否开启
- $("#leftYOpen").bootstrapSwitch("onSwitchChange",function(event,state){
- if(!state){
- option.yAxis[0].show=false;
- vm.chartStatistical.yaxes=0;
- /*$('.leftY').each(function(){
- $(this).bootstrapSwitch('state', false);
- })*/
- }else{
- option.yAxis[0].show=true;
- vm.chartStatistical.yaxes=1;
- }
- })
-
- //左Y轴是否开启
- $("#rightYOpen").bootstrapSwitch("onSwitchChange",function(event,state){
- if(!state){
- option.yAxis[1].show=false;
- vm.chartStatistical.yaxis=0;
- /*$('.rightY').each(function(){
- $(this).bootstrapSwitch('state', false);
- })*/
- }else{
- option.yAxis[1].show=true;
- vm.chartStatistical.yaxis=1;
- }
- })
-
- //X轴是否开启
- $("#xOpen").bootstrapSwitch("onSwitchChange",function(event,state){
- if(!state){
- option.xAxis[0].show=false;
- vm.chartStatistical.xaxis=0;
- /*$('.xOption').each(function(){
- $(this).bootstrapSwitch('state', false);
- })*/
- }else{
- option.xAxis[0].show=true;
- vm.chartStatistical.xaxis=1;
- }
- })
-
- //legend是否展示
- $("#legendShow").bootstrapSwitch("onSwitchChange",function(event,state){
- if(!state){
- option.legend.show=false;
- vm.chartStatistical.legend=0;
- }else{
- option.legend.show=true;
- vm.chartStatistical.legend=1;
- }
- })
-
- //分页是否使用
- $("#isPaging").bootstrapSwitch("onSwitchChange",function(event,state){
- $("#isPaging").bootstrapSwitch('state', false);
- /* if(!state){
- $("#tablePageSize").attr("disabled",true);
- vm.chartTable.scroll=0;
- }else{
- $("#tablePageSize").attr("disabled",false);
- vm.chartTable.scroll=1;
- }*/
- })
-
- //是否启用仪表盘
- $("#isGauge").bootstrapSwitch("onSwitchChange",function(event,state){
- if(!state){
- singleOption.series[0].pointer.show=false;
- singleOption.series[0].axisLine.lineStyle.opacity=0;
- singleOption.series[0].detail.offsetCenter=[0,"10%"];
- singleOption.series[0].detail.rich.a.fontSize=vm.chartSingle.prefixFontSize;
- singleOption.series[0].detail.rich.b.fontSize=vm.chartSingle.suffixFontSize;
- $("#singlePrefixFontSize").attr("disabled",false);
- $("#singleSuffixFontSize").attr("disabled",false);
- singleOption.series[0].axisTick.show=false;
- singleOption.series[0].splitLine.show=false;
- $("#isAxisLabelShow").bootstrapSwitch('state', false);
- $("#isThreshold").bootstrapSwitch('state', false);
- singleOption.series[0].axisLabel.show=false;
- singleOption.series[1].axisTick.show=false;
- singleOption.series[1].splitLine.show=false;
- singleOption.series[1].axisLine.lineStyle.opacity=0;
- vm.chartSingle.isGauge=0;
- }else{
- singleOption.series[0].pointer.show=true;
- singleOption.series[0].axisLine.lineStyle.opacity=1;
- singleOption.series[0].detail.offsetCenter=[0,"50%"];
- singleOption.series[0].detail.textStyle.fontSize=20;
- singleOption.series[0].detail.rich.a.fontSize=20;
- singleOption.series[0].detail.rich.b.fontSize=20;
- $("#singlePrefixFontSize").attr("disabled",true);
- $("#singleSuffixFontSize").attr("disabled",true);
- singleOption.series[0].axisTick.show=true;
- singleOption.series[0].splitLine.show=true;
- vm.chartSingle.isGauge=1;
- vm.chartSingle.valueFontSize=20;
- }
- })
-
- //是否显示阈值
- $("#isThreshold").bootstrapSwitch("onSwitchChange",function(event,state){
- //如果未开启仪表盘功能 则不允许开启
- if(vm.chartSingle.isGauge==0){
- $(this).bootstrapSwitch('state', false);
- return;
- }
- if(state){
- singleOption.series[1].axisTick.show=true;
- singleOption.series[1].splitLine.show=true;
- singleOption.series[1].axisLine.lineStyle.opacity=1;
- vm.chartSingle.isThreshold=1;
- }else{
- singleOption.series[1].axisTick.show=false;
- singleOption.series[1].splitLine.show=false;
- singleOption.series[1].axisLine.lineStyle.opacity=0;
- vm.chartSingle.isThreshold=0;
- }
- })
-
- //是否显示详细刻度
- $("#isAxisLabelShow").bootstrapSwitch("onSwitchChange",function(event,state){
- //如果未开启仪表盘功能 则不允许开启
- if(vm.chartSingle.isGauge==0){
- $(this).bootstrapSwitch('state', false);
- return;
- }
- if(state){
- singleOption.series[0].axisLabel.show=true;
- vm.chartSingle.isScale=1;
- }else{
- singleOption.series[0].axisLabel.show=false;
- vm.chartSingle.isScale=0;
- }
- })
- });
-
- //注册select组件
- Vue.component('multiselect', window.VueMultiselect.default);
- //引用vuelidate组件
- Vue.use(window.vuelidate.default);
- //引用校验规则 所有校验规则见 https://vuelidate.netlify.com/#sub-v-values
- var required = window.validators.required;
-
- var vm = new Vue({
- el:'#dashboardView',
- data:{
- dashboards:[],
- dashboardSetting:false,
- databaseType:[],
- chartType:[],
- tableDatas:[],
- dashboard:{
- id:null,
- databaseType:'',
- chartType:'',
- title:'',
- describe:''
- },
- userSqls:[{
- sql:'', // 用户自定义sql查询语句
- type:'', // 图表类型
- vTime:'', // 时间变量字段
- describe:'series 1' //查询数据描述
- }],
- chartStatistical:{
- lineWidth:1,
- fill:1,
- legendXPosition:{},
- legendYPosition:{},
- lines:1,
- points:0,
- bars:0,
- yaxis:0,
- legend:1,
- yaxes:1,
- xaxis:1,
- yaxisName:'',
- yaxesName:'',
- xaxisName:''
- },
- showType:"line",
- chartTable:{
- timeFormat:'',
- scroll:0,
- pageSize:10,
- fontSize:5,
- vName:'Value',
- decimal:0,
- tName:'Time'
- },
- chartSingle:{
- colorValue:'#333333',
- valueFontSize:50,
- decimal:0,
- prefix:'',
- prefixFontSize:30,
- colorPrefix:'#333333',
- suffix:'',
- suffixFontSize:60,
- colorSuffix:'#333333',
- isGauge:0,
- minValue:0,
- maxValue:100,
- isThreshold:0,
- isScale:0,
- fontSizeDis:1,
- thresholdValues:[
- {color:'#ff0000',value:0.6},
- {color:'#ffff00',value:0.8},
- {color:'#00ff00',value:1}
- ]
- },
- lineWidths:[1,2,3,4,5,6,7,8,9],
- fills:[1,2,3,4,5,6,7,8,9],
- legendXPositions:[],
- legendYPositions:[],
- timeFormats:[],
- chart:false,
- set:true,
- query:true,
- sqlFlag:false
- },
- methods:{
- getDatabaseType: function(event) {
- $.getJSON(baseURL + "sys/dict/all?type=databaseType&_"+$.now(), function(r){
- var databaseType = [];
- for (var i = 0; i < r.data.length; i++) {
- databaseType.push(r.data[i]);
- }
- vm.databaseType = databaseType;
- if(vm.dashboard.databaseType==''||vm.dashboard.databaseType==undefined){
- vm.dashboard.databaseType=databaseType[0];
- }
- });
- },
- getChartType: function(event) {
- $.getJSON(baseURL + "sys/dict/all?type=chartType&_"+$.now(), function(r){
- var chartType = [];
- for (var i = 0; i < r.data.length; i++) {
- chartType.push(r.data[i]);
- }
- vm.chartType = chartType;
- if(vm.dashboard.chartType==''||vm.dashboard.chartType==undefined){
- vm.dashboard.chartType=chartType[0];
- }
- });
- },
- getTimeFormat: function(event) {
- $.getJSON(baseURL + "sys/dict/all?type=timeFormat&_"+$.now(), function(r){
- var timeFormat = [];
- for (var i = 0; i < r.data.length; i++) {
- timeFormat.push(r.data[i]);
- }
- vm.timeFormats = timeFormat;
- vm.chartTable.timeFormat=timeFormat[0];
- });
- },
- getLegendXPosition: function(event) {
- $.getJSON(baseURL + "sys/dict/all?type=legendXPosition&_"+$.now(), function(r){
- var legendXPosition = [];
- for (var i = 0; i < r.data.length; i++) {
- legendXPosition.push(r.data[i]);
- if ("center" == r.data[i].code) {
- vm.chartStatistical.legendXPosition = r.data[i];
- }
- }
- vm.legendXPositions = legendXPosition;
-
- });
- },
- getLegendYPosition: function(event) {
- $.getJSON(baseURL + "sys/dict/all?type=legendYPosition&_"+$.now(), function(r){
- var legendYPosition = [];
- for (var i = 0; i < r.data.length; i++) {
- legendYPosition.push(r.data[i]);
- if ("top" == r.data[i].code) {
- vm.chartStatistical.legendYPosition = r.data[i];
- }
- }
- vm.legendYPositions = legendYPosition;
- });
- },
- /*点线柱图相关*/
- //设置左Y轴名称
- setLeftYName:function(){
- option.yAxis[0].name=vm.chartStatistical.yaxesName;
- myChart.setOption(option);
- },
- //设置右Y轴名称
- setRightYName:function(){
- option.yAxis[1].name=vm.chartStatistical.yaxisName;
- myChart.setOption(option);
- },
- //设置X轴名称
- setXName:function(){
- option.xAxis[0].name=vm.chartStatistical.xaxisName;
- myChart.setOption(option);
- },
- /*单值图相关*/
- //设置仪表盘最大值
- setSingleMaxValue:function (){
- singleOption.series[0].max=vm.chartSingle.maxValue;
- singleChart.setOption(singleOption);
- },
- //设置仪表盘最小值
- setSingleMinValue:function (){
- singleOption.series[0].min=vm.chartSingle.minValue;
- singleChart.setOption(singleOption);
- },
- //设置数值字体大小
- setSingleFontSize:function(){
- singleOption.series[0].detail.textStyle.fontSize=vm.chartSingle.valueFontSize;
- if(vm.chartSingle.isGauge==1){
- singleOption.series[0].detail.rich.a.fontSize=vm.chartSingle.valueFontSize;
- singleOption.series[0].detail.rich.b.fontSize=vm.chartSingle.valueFontSize;
- }
- singleChart.setOption(singleOption);
- },
- //设置前缀文字大小
- setSinglePrefixFontSize:function(){
- singleOption.series[0].detail.rich.a.fontSize=vm.chartSingle.prefixFontSize;
- singleChart.setOption(singleOption);
- },
- //设置后缀文字大小
- setSingleSuffixFontSize:function(){
- singleOption.series[0].detail.rich.b.fontSize=vm.chartSingle.suffixFontSize;
- singleChart.setOption(singleOption);
- },
- //设置值颜色
- setSingleColor:function(ele){
- vm.chartSingle.colorValue=$(this.$refs.singleColor).val();
- singleOption.series[0].detail.textStyle.color=vm.chartSingle.colorValue;
- singleChart.setOption(singleOption);
- },
- //设置前缀值颜色
- setSingleColorPrefix:function(ele){
- vm.chartSingle.colorPrefix=$(this.$refs.colorPrefix).val();
- singleOption.series[0].detail.rich.a.color=vm.chartSingle.colorPrefix;
- singleChart.setOption(singleOption);
- },
- //设置后缀值颜色
- setSingleColorSuffix:function(ele){
- vm.chartSingle.colorSuffix=$(this.$refs.colorSuffix).val();
- singleOption.series[0].detail.rich.b.color=vm.chartSingle.colorSuffix;
- singleChart.setOption(singleOption);
- },
- //设置单值图小数点保留位数
- setSingleDecimal:function(){
- singleOption.series[0].data=[{"value":Number(singleValue).toFixed(vm.chartSingle.decimal)}];
- singleChart.setOption(singleOption);
- },
- //设置阈值颜色
- setThresholdColor:function(index){
- vm.chartSingle.thresholdValues[index].color=event.target.value;
- this.resetThresholdColor();
- },
- resetThresholdColor:function(){
- var newA=[];
- for(var i=0;i<vm.chartSingle.thresholdValues.length;i++){
- var newB=[];
- newB.push(vm.chartSingle.thresholdValues[i].value);
- newB.push(vm.chartSingle.thresholdValues[i].color);
- newA.push(newB);
- }
- singleOption.series[1].axisLine.lineStyle.color=newA;
- singleChart.setOption(singleOption);
- },
- //删除阈值
- removeThreshold:function(index){
- var tvs=[];
- tvs=vm.chartSingle.thresholdValues;
- tvs.splice(index,1)
- vm.chartSingle.thresholdValues=[];
- this.$nextTick(()=>{
- vm.chartSingle.thresholdValues = tvs;
- this.resetThresholdColor();
- })
- },
- //新增阈值
- addThreshold:function(){
- vm.chartSingle.thresholdValues.push({color:'#00ff00',value:1});
- this.resetThresholdColor();
- },
- //修改用户sql 设置legend
- changeLegend:function(index){
- vm.userSqls[index].describe=event.target.value;
- },
- //删除用户sql
- removeQuery:function(index){
- vm.userSqls.splice(index,1)
- },
- //用户填写完sql获取后台数据信息
- queryData:function(index){
- var sql=event.target.value;
- //判断输入框是否有sql 没有的话不进行后台数据查询 且将echarts中的数据清空
- if(sql!=''&&sql!=undefined){
- $.ajax({
- type:"GET",
- url: baseURL + "dashboard/queryData",
- data:{'sql':sql,'timeFormat':vm.chartTable.timeFormat.code,'chartType':vm.dashboard.chartType.code},
- success: function(r){
- if(r.msg=='success'){
- if(vm.dashboard.chartType.code==1){
- //判断是否替换假数据
- if(echartsDefaultData){
- //数据为动态的时候将echarts数据状态修改
- echartsDefaultData=false;
- var data=[];
- for(var i=0;i<r.result.length;i++){
- var d={value:[r.result[i].time,r.result[i].value]}
- data.push(d);
- }
- option.series[index].data=data;
- myChart.setOption(option);
- }else{
- var seriesData=option.series.find( element => element.id == index);
- //可能为重复的数据操作 需要进行判断
- if(seriesData==''||seriesData==undefined){
- var data=[];
- for(var i=0;i<r.result.length;i++){
- var d={value:[r.result[i].time,r.result[i].value]}
- data.push(d);
- }
- var data={
- id:index,
- name:'',
- type:vm.showType,
- yAxisIndex: 0,
- showSymbol: false,
- lineStyle:{
- width:1
- },
- areaStyle:{
- opacity:0
- },
- data:data
- }
- option.series.push(data);
- }else{
- var data=[];
- for(var i=0;i<r.result.length;i++){
- var d={value:[r.result[i].time,r.result[i].value]}
- data.push(d);
- }
- seriesData.data=data;
- }
- myChart.setOption(option);
- }
- }else if(vm.dashboard.chartType.code==2){
- var decimal = vm.chartSingle.decimal;
- singleValue=r.result[0].value;
- singleOption.series[0].data=[{"value":(singleValue).toFixed(decimal)}];
- singleChart.setOption(singleOption);
- }else if(vm.dashboard.chartType.code==3){
- vm.tableDatas=r.result;
- }
- vm.sqlFlag=true;
- }else{
- vm.sqlFlag=false;
- layer.msg(r.msg)
- }
-
- }
- });
- }
- },
- //新增用户sql填写
- addNewQuery:function(){
- vm.userSqls.push({
- dbId:'',
- sql:'',
- chartId:'',
- type:'',
- vTime:'',
- describe:'series'+ (vm.userSqls.length+1)
- })
- },
- changeSetShow:function(val){
- vm.query=true;
- vm.set=true;
- vm.chart=true;
- if(val==1){
- vm.query=false;
- }else if(val==2){
- vm.chart=false;
- }else{
- vm.set=false;
- }
- },
- dateF:function(){
- var sql=vm.userSqls[0].sql;
- //判断输入框是否有sql 没有的话不进行后台数据查询 且将echarts中的数据清空
- if(sql!=''&&sql!=undefined){
- $.ajax({
- type:"GET",
- url: baseURL + "dashboard/queryData",
- data:{'sql':sql,'timeFormat':vm.chartTable.timeFormat.code,'chartType':vm.dashboard.chartType.code},
- success: function(r){
- if(vm.dashboard.chartType.code==3){
- vm.tableDatas=r.result;
- }
- }
- });
- }
- },
- savePanelInfo:function(){
- if(!vm.sqlFlag){
- layer.msg(" sql error ")
- return
- }
- var formdata={};
- formdata.name=vm.dashboard.title;
- formdata.chartType=vm.dashboard.chartType.code;
- var data={};
- if(vm.dashboard.chartType.code==1){
- data=JSON.parse(JSON.stringify(vm.chartStatistical));
- data.legendXPosition=vm.chartStatistical.legendXPosition.code;
- data.legendYPosition=vm.chartStatistical.legendYPosition.code;
- }else if(vm.dashboard.chartType.code==2){
- data=JSON.parse(JSON.stringify(vm.chartSingle));
- }else if(vm.dashboard.chartType.code==3){
- data=JSON.parse(JSON.stringify(vm.chartTable));
- data.timeFormat=vm.chartTable.timeFormat.code;
- }
- data.userSqls=vm.userSqls;
- data.describe=vm.dashboard.describe;
- delete data.series;
- formdata.data=JSON.stringify(data);
- if(vm.dashboard.id!=null&&vm.dashboard.id!=undefined&&vm.dashboard.id!=''){
- formdata.id=vm.dashboard.id;
- }
- $.ajax({
- type:vm.dashboard.id == null ? "POST" : "PUT",
- contentType:'application/json',
- url: vm.dashboard.id == null?baseURL + "dashboard/save":baseURL + "dashboard/update",
- data:JSON.stringify(formdata),
- success: function(r){
- if(r.msg=='success'){
- location.href=baseURL+'modules/dashboard/index.html'
- }else{
- layer.msg(r.msg)
- }
- }
- })
- },
- modifyDashboard:function(id){
- $.ajax({
- type:"GET",
- url: baseURL + "dashboard/querySingleDashboard",
- data:{"id":id},
- success: function(r){
- vm.sqlFlag=true;
- vm.dashboard.id=r.data.id;
- vm.dashboard.title=r.data.name;
- for(let v of vm.chartType) {
- if(v.code==r.data.chartType){
- vm.dashboard.chartType=v;
- }
- };
- var obj=JSON.parse(r.data.data);
- vm.userSqls=obj.userSqls;
- delete obj.userSqls;
- vm.dashboard.describe=obj.describe;
- if(vm.dashboard.chartType.code==1){
- vm.chartStatistical=obj;
- for(let v of vm.legendXPositions) {
- if(v.code==obj.legendXPosition){
- vm.chartStatistical.legendXPosition=v;
- }
- };
- for(let v of vm.legendYPositions) {
- if(v.code==obj.legendYPosition){
- vm.chartStatistical.legendYPosition=v;
- }
- };
- }else if(vm.dashboard.chartType.code==2){
- vm.chartSingle=obj;
- data=JSON.parse(JSON.stringify(vm.chartSingle));
- }else if(vm.dashboard.chartType.code==3){
- vm.chartTable=obj;
- for(let v of vm.timeFormats) {
- if(v.code==obj.timeFormat){
- vm.chartTable.timeFormat=v;
- }
- };
- }
- var a=JSON.parse(obj.series);
- var nSeries=[];
- if(vm.dashboard.chartType.code==1){
- for(var j=0;j<a.length;j++){
- var userQueryResult=a[j];
- var data=[];
- for(var m=0;m<userQueryResult.length;m++){
- var d={value:[userQueryResult[m].time,userQueryResult[m].value]}
- data.push(d);
- }
- var data={
- name:vm.userSqls[j].describe,
- type:vm.chartStatistical.lines==1?'line':vm.chartStatistical.bars==1?'bar':vm.chartStatistical.points==1?'scatter':'line',
- yAxisIndex: 0,
- showSymbol: false,
- lineStyle:{
- width:vm.chartStatistical.linewidth
- },
- areaStyle:{
- opacity:vm.chartStatistical.fill/10
- },
- data:data
- }
- nSeries.push(data);
- option.series=nSeries;
- myChart.setOption(option);
- }
- }else if(vm.dashboard.chartType.code==3){
- vm.tableDatas=JSON.parse(obj.series);
- }else if(vm.dashboard.chartType.code==2){
- var decimal = vm.chartSingle.decimal;
- singleValue=a[0].value;
- singleOption.series[0].data=[{"value":(singleValue).toFixed(decimal)}];
- }
- vm.dashboardSetting=true;
- }
- })
- },
- removeDashboard:function(id){
- if(id!=null &&id!=undefined){
- $.ajax({
- type:"DELETE",
- url: baseURL + "dashboard/delete",
- data:{"id":id},
- success: function(r){
- location.href=baseURL+'modules/dashboard/index.html'
- }
- })
- }
- },
- returnMenu:function(){
- location.href=baseURL+'modules/dashboard/index.html'
- },
- queryDashboards:function(){
- $.ajax({
- type:"GET",
- contentType:'application/json',
- url: baseURL + "dashboard/list",
- success: function(r){
- vm.handleDashboards(r);
- }
- })
- },
- handleDashboards:function(r){
- vm.dashboards=r.data;
- vm.$nextTick(function () {
- var statisticals=new Array();
- for(var i=0;i<r.data.length;i++){
-// vm.dashboards[i].idName='chart'+vm.dashboards[i].id;
- var datas=new Array();
- var obj=JSON.parse(r.data[i].data);
- // 折线图等 生成echarts
- if(r.data[i].chartType==1){
- var a=JSON.parse(obj.series);
- var nSeries=[];
- for(var j=0;j<a.length;j++){
- var userQueryResult=a[j];
- var data=[];
- for(var m=0;m<userQueryResult.length;m++){
- var d={value:[userQueryResult[m].time,userQueryResult[m].value]}
- data.push(d);
- }
- var data={
- name:obj.userSqls[j].describe,
- type:obj.lines==1?'line':obj.bars==1?'bar':obj.points==1?'scatter':'line',
- yAxisIndex: 0,
- showSymbol: false,
- lineStyle:{
- width:obj.linewidth
- },
- areaStyle:{
- opacity:obj.fill/10
- },
- data:data
- }
- nSeries.push(data);
- }
-
- // 基于准备好的dom,初始化echarts实例
- var chartId=r.data[i].name;
- var mychartHandle = echarts.init(document.getElementById(chartId));
-
- var colors = ['#5793f3', '#d14a61', '#DC143C'];
-
- tOption = {
- color: colors,
- tooltip: {
- trigger: 'item',
- axisPointer: {
- type: 'cross'
- }
- },
- legend:{
- show:obj.legend==1?true:false,
- x:obj.legendXPosition,
- y:obj.legendYPosition
- },
- toolbox:{
- feature:{
- dataZoom:{
- title:false
- }
- }
- },
- dataZoom:[{
-      type:"inside" //详细配置可见echarts官网
-    }],
- grid: {
- right: '20%'
- },
- xAxis: [
- {
- name:obj.xaxisName,
- type:'time'
- }
- ],
- yAxis: [
- {
- show:obj.yaxes==1?true:false,
- type: 'value',
- name: obj.yaxesName,
- position: 'left',
- axisLine: {
- lineStyle: {
- // color: colors[1]
- }
- },
- axisLabel: {
- formatter: ''
- }
- },
- {
- show:obj.yaxis==1?true:false,
- type: 'value',
- name: obj.yaxisName,
- position: 'right',
- axisLine: {
- lineStyle: {
- // color: colors[1]
- }
- }
- }
- ],
- series: nSeries
- };
- // 使用刚指定的配置项和数据显示图表。
- mychartHandle.setOption(tOption);
- statisticals.push(mychartHandle);
- }else if(r.data[i].chartType==3){
- //这里是初始化表格
- }else if(r.data[i].chartType==2){
- var cA=[];
- for(var m=0;i<obj.thresholdValues.length;m++){
- if(obj.thresholdValues[m]==undefined || obj.thresholdValues[m]==''){
- break;
- }
- var cB=[];
- var tValue=obj.thresholdValues[m].value;
- var tColor=obj.thresholdValues[m].color;
- cB.push(tValue);
- cB.push(tColor);
- cA.push(cB);
- }
-
- var currentSingle=JSON.parse(JSON.parse(JSON.stringify(r.data[i].data)));
- var chartId=r.data[i].name;
- var singleChartHandle = echarts.init(document.getElementById(chartId));
- var angle = [220, -40]
- tSingleOption = {
- backgroundColor: '#fff',
- tooltip: {
- show: false,
- formatter: "{a} <br/>{b} : {c}%"
- },
- series: [{
- name: '最外层环仪表盘',
- type: "gauge",
- min: obj.minValue,
- max: obj.maxValue,
- startAngle: angle[0],
- endAngle: angle[1],
- splitNumber: 20,
- axisLine: {
- lineStyle: {
- color: [
- [1, "#c1c3c5"]
- ],
- width: 10,
- opacity:obj.isGauge==1?1:0
- }
- },
- axisTick: {
- show:false,
- lineStyle: {
- color: "#fff",
- width: 2,
- },
- length: 0,
- splitNumber: 1
- },
- axisLabel: {
- show:obj.isScale==1?true:false,
- distance: -40,
- textStyle: {
- color: "#bbb"
- },
- rich: {
- a: {
- color: '#fbe010'
- },
- b: {
- color: '#3fa7dc'
- }
- }
- },
- splitLine: {
- show: obj.isScale==1?true:false,
- length: 10,
- lineStyle: {
- color: '#fff',
- width: 2
- }
- },
- itemStyle: {
- normal: {
- color: "#818488",
- shadowColor: 'rgba(0, 0, 0, 0.5)',
- shadowBlur: 10
- }
- },
- detail: {
- formatter: function(v) {
- console.log("~~~~~~~~~~~~~")
- console.log(currentSingle)
- return '{a| '+currentSingle.prefix+'} '+v+' {b| '+currentSingle.suffix+'}';
- },
- offsetCenter:obj.isGauge==1?[0, "50%"]:[0, "10%"],
- textStyle: {
- fontSize: obj.valueFontSize,
- color: obj.colorValue
- },
- rich:{
- a:{
- fontSize:obj.isGauge==1?obj.valueFontSize:obj.prefixFontSize,
- color:obj.colorPrefix,
- textShadowOffsetX:10
- },
- b:{
- fontSize:obj.isGauge==1?obj.valueFontSize:obj.suffixFontSize,
- color:obj.colorSuffix
- }
- }
- },
- title: {
- show: false
- },
- pointer: {
- show:obj.isGauge==1?true:false,
- length: '85%'
- },
- data: [{value: (JSON.parse(obj.series)[0].value).toFixed(obj.decimal)}]
- },{
- name: "内环仪表盘四段颜色",
- type: "gauge",
- min: 0,
- max: 100,
- radius: '69%',
- startAngle: angle[0],
- endAngle: angle[1],
- splitNumber: 10,
- axisLine: {
- lineStyle: {
- color: obj.isThreshold==1?cA:[],
- width: 30,
- opacity:obj.isThreshold==1?1:0
- }
- },
- axisTick: {
- show: obj.isThreshold==1?true:false
- },
- axisLabel: {
- show: false
- },
- splitLine: {
- show: obj.isThreshold==1?true:false,
- length: 15,
- lineStyle: {
- color: '#fff',
- width: 2
- }
- },
- pointer: {
- length: 0
- },
- detail: {
- show: false
- },
- }]
- }
- singleChartHandle.setOption(tSingleOption);
- statisticals.push(singleChartHandle);
- }
- }
-
- gridster = $(".gridster > ul").gridster({
- widget_margins: [20, 20], // 模块的间距 [上下,左右]
- widget_base_dimensions: [150, 150], //模块的宽高 [宽,高]
- min_cols:6, //设置最小列数
- max_cols:10, //设置最大列数
- draggable: {
- handle: 'header' //模块内定义拖动的元素<header>,这里也支持jquery选择器,如"span.drag_handle"
- },
- serialize_params: function($w, wgd) {
- return { id: $w[0].id, x: wgd.row, y: wgd.col, width: wgd.size_x*150, height: wgd.size_y*150 }
- },
- helper: 'clone',
- resize: {
- enabled: true,
- max_size: [10, 20],
- min_size: [1, 1],
- start: function (e, ui, $widget) {
- },
- resize: function (e, ui, $widget) {
- },
- stop: function (e, ui, $widget) {
- statisticals.forEach(function(value,key,arr){
- $(value).resize()
- })
-
- }
- },
- }).data('gridster');
- statisticals.forEach(function(value,key,arr){
- $(value).resize()
- })
- })
- },
- modifyPosition:function(){
- var allChartInfos = gridster.serialize();
- $.ajax({
- type: "PUT",//方法类型
- dataType: "json",//预期服务器返回的数据类型
- url: baseURL + "dashboard/modifyShape",//url
- contentType: 'application/json; charset=UTF-8',
- data: JSON.stringify(allChartInfos),//JSON.stringify(allChartInfos)
- success: function (result) {
- layer.msg("<@spring.message 'common.success'/>")
- },
- error : function(result) {
- layer.msg(result.msg)
- }
- })
-
- },
- dbOpsShow: function(event) {
- $(event.currentTarget).find(".db-ops").css("display", "inline-block");
- },
- dbOpsHide: function(event) {
- $(event.currentTarget).find(".db-ops").css("display", "none");
- }
- },
- created: function(){
- // 初始化进入执行方法
- this.getDatabaseType();
- this.getLegendYPosition();
- this.getLegendXPosition();
- this.getTimeFormat();
- this.getChartType();
- this.queryDashboards();
- },
- watch:{
- 'chartStatistical':{
- handler(newVal,oldVal){
- option.legend.x=vm.chartStatistical.legendXPosition.code;
- option.legend.y=vm.chartStatistical.legendYPosition.code;
- option.series.forEach(function(value,key,arr){
- if(value.type=='line'){
- value.areaStyle.opacity=(vm.chartStatistical.fill-1)/10;
- }
- })
- option.series.forEach(function(value,key,arr){
- if(value.type=='line'){
- value.lineStyle.width=vm.chartStatistical.lineWidth;
- }
- })
- myChart.setOption(option);
- },
- deep:true
- },
- 'chartSingle':{
- handler(newVal,oldVal){
- this.$nextTick(function(){
- singleChart.setOption(singleOption);
- $('.singleColor').each(function() {
- $(this).minicolors({
- control: $(this).attr('data-control') || 'hue',
- defaultValue: $(this).attr('data-defaultValue') || '',
- inline: $(this).attr('data-inline') === 'true',
- letterCase: $(this).attr('data-letterCase') || 'lowercase',
- opacity: $(this).attr('data-opacity'),
- position: $(this).attr('data-position') || 'bottom left',
- change: function(hex, opacity) {
- console.log(hex)
- console.log(opacity)
- if (!hex)
- return;
- if (opacity)
- hex += ', ' + opacity;
- try {
- console.log(hex);
- } catch (e) {
- }
- },
- theme: 'bootstrap'
- });
- });
- });
- },
- deep:true
- },
- 'dashboardSetting':{
- handler(newVal,oldVal){
- if(newVal){
- if(vm.chartStatistical.lines==1){
- $("#isScatter").bootstrapSwitch('state', false);
- $("#isLine").bootstrapSwitch('state', true);
- $("#isBar").bootstrapSwitch('state', false);
- }else if(vm.chartStatistical.points==1){
- $("#isScatter").bootstrapSwitch('state', true);
- $("#isLine").bootstrapSwitch('state', false);
- $("#isBar").bootstrapSwitch('state', false);
- }else if(vm.chartStatistical.bars==1){
- $("#isScatter").bootstrapSwitch('state', false);
- $("#isLine").bootstrapSwitch('state', false);
- $("#isBar").bootstrapSwitch('state', true);
- }
- if(vm.chartStatistical.yaxes==1){
- $("#leftYOpen").bootstrapSwitch('state', true);
- }else{
- $("#leftYOpen").bootstrapSwitch('state', false);
- }
- if(vm.chartStatistical.legend==1){
- $("#legendShow").bootstrapSwitch('state', true);
- }else{
- $("#legendShow").bootstrapSwitch('state', false);
- }
- if(vm.chartStatistical.yaxis==1){
- $("#rightYOpen").bootstrapSwitch('state', true);
- }else{
- $("#rightYOpen").bootstrapSwitch('state', false);
- }
- if(vm.chartStatistical.xaxis==1){
- $("#xOpen").bootstrapSwitch('state', true);
- }else{
- $("#xOpen").bootstrapSwitch('state', false);
- }
-
- if(vm.chartSingle.isGauge==1){
- $("#isGauge").bootstrapSwitch('state', true);
- }else{
- $("#isGauge").bootstrapSwitch('state', true);
- }
-
- if(vm.chartSingle.isThreshold==1){
- $("#isThreshold").bootstrapSwitch('state', true);
- }else{
- $("#isThreshold").bootstrapSwitch('state', true);
- }
-
- if(vm.chartSingle.isScale==1){
- $("#isAxisLabelShow").bootstrapSwitch('state', true);
- }else{
- $("#isAxisLabelShow").bootstrapSwitch('state', true);
- }
- }
- },
- deep:true
- }
- }
- })
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/detect/addType.js b/nezha-admin/src/main/resources/templates/js/modules/detect/addType.js
deleted file mode 100644
index eee1973f..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/detect/addType.js
+++ /dev/null
@@ -1,1219 +0,0 @@
-<script>
-$(function(){
- var ps1 = new PerfectScrollbar('.meta-win_list');
- // var ps2 = new PerfectScrollbar('.add-param-box_rows');
- var ps3 = new PerfectScrollbar('.add-box_body_160');
-})
-Vue.use(window.vuelidate.default);
-Vue.component('multiselect', window.VueMultiselect.default);
-//引用校验规则 所有校验规则见 https://vuelidate.netlify.com/#sub-v-values
-var required = window.validators.required;
-var helpers = window.validators.helpers;
-var integer = window.validators.integer;
-
-Vue.directive('id', function (el, binding, vnode) {
- el.id = binding.arg + "-" + binding.value;
- }
-)
-
-
-/*自定义校验规则*/
-//监测类别名称重复性验证
-var nameRepeat = function (name, deteType) {
- if (helpers.req(name) && helpers.req(deteType)) {
- var params = "?name=" + name;
- if (deteType.id) {
- params += "&id=" + deteType.id;
- }
- var flag = true;
- $.ajax({
- type: "get",
- url: baseURL + "/deteType/nameCheck" + params,
- async: false, //关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-
-}
-//统一页面内 名称是否重复 params:数组 index当前检验的元素的下标(排除自己)
-var inPageNameRepeat=function(params,index){
- return helpers.withParams({type:inPageNameRepeat},function(value){
- if(helpers.req(value)){
- for (let i in params){
- if(i!=index){
- var param=params[i];
- if(helpers.req(param.name)){
- if(param.name==value){
- return false;
- }
- }
-
- }
- }
- }
- return true;
- })
-}
-
-var meta=Vue.extend({
- template:"#detectMata",
- components: {},
- props: {
- deteMeta:{
- type:Object,
- required:true
- },
- deteMetas:{
- type:Array,
- required:true
- },
- index:{
- type:Number,
- required:true
- },
- deteMethod:{
- type:Object,
- required:true
- },
- fieldTypes:{
- type:Array,
- required:true
- },
- dataTypes:{
- type:Array,
- required:true
- },
- dicTypes:{
- type:Array,
- required:true
- },
- delMeta:{
- type:Function,
- required:true
- }
- },
- data: function () {
- return {
- metaDomIdKey:"r-meta-id",
- metaDetailDomIdKey:"r-meta-detail-id",
- metaDomSelector:"",
- metaDetailDomSelector:"",
- metaDom:null,
- metaDetailDom:null,
- nameRepeat:false
- }
- },
- validations:function(){
- var temp=this;
- if("2"==this.deteMethod.code){
- return {
- deteMeta:{
- name: {
- required,
- inPageNameRepeat:inPageNameRepeat(temp.deteMetas,temp.index)
- },
- fieldType: {
- required
- },
- dataType: {
- required
- },
- dataLenth: {
- required,
- integer
- },
- oid: {
- required
- },
- unit: {
-
- },
- dicType: {},
- remark: {}
- }
- }
- }else{
- return {
- deteMeta:{
- name: {
- required,
- inPageNameRepeat:inPageNameRepeat(temp.deteMetas,temp.index)
- },
- fieldType: {
- required
- },
- dataType: {
- required
- },
- dataLenth: {
- required,
- integer
- },
- oid: {},
- unit: {
-
- },
- dicType: {},
- remark: {}
- }
- }
- }
-
-
- },
- created:function(){
-
- },
- methods: {
- init:function(){
- var temp=this;
- temp.metaDomSelector="#"+temp.metaDomIdKey+"-"+temp.index;
- temp.metaDetailDomSelector="#"+temp.metaDetailDomIdKey+"-"+temp.index;
- temp.metaDom=$(temp.metaDomSelector);
- temp.metaDetailDom=$(temp.metaDetailDomSelector);
- temp.metaDom.off("click").on("click",temp.metaDomClick)
- temp.metaDetailDom.appendTo($("#meta-details"));
- if(temp.deteMeta.bestNew!=undefined&&temp.deteMeta.bestNew!=null&&temp.deteMeta.bestNew){
- temp.metaDomClick();
- }
- if(temp.deteMeta.delFlag=='1'||temp.deteMethod.code=='3'){
- temp.addShadow();
- }
- },
- afterHide:function(e){
-
- },
- addMeta:function(){
-
- },
- metaDomClick:function(){
- var temp=this;
- $(".meta-win_item").removeClass("meta-win_item_active");
- temp.metaDom.addClass("meta-win_item_active");
- $(".r-dete-meta-detail").hide();
- temp.$emit('swap-meta',temp.index);
- temp.metaDetailDom.show();
- temp.$emit("up-meta",temp.deteMeta)
- },
- delSelf:function(index){
- var temp=this;
- if(temp.deteMeta.new){
- temp.delMeta(index);
- temp.metaDetailDom.remove();
- }else{
- temp.deteMeta.delFlag='1';
- temp.addShadow();
- }
-
- },
- recSelf:function(){
- this.deteMeta.delFlag='0';
- this.removeShadow();
- },
- validate:function(errContainer){
- var temp=this;
- temp.$v.deteMeta.$touch();
- temp.deteMeta.passFlag=!temp.$v.deteMeta.$error;
- if(errContainer!=undefined&&errContainer instanceof Array){
- errContainer.push(temp.$v.deteMeta.$error);
- }
- },
- addShadow:function(){
- $(this.metaDetailDomSelector+">.shadow").show();
- },
- removeShadow:function(){
- $(this.metaDetailDomSelector+">.shadow").hide();
- },
- mouseAt: function(id, event) {
- layer.tips($("#r-dictype-option-detail-"+id+'-'+this.index).html(), $(event.currentTarget).prev(), {
- tips: [4, "#41B883"],
- success: function(layi, i) {
- $(layi).css("z-index", "99999999")
- }
- });
- /*layer.tips($("#r-dictype-option-detail-"+id+'-'+this.index).html(),"#r-dictype-option-"+id+'-'+iii,{
- tips: [4, "#41B883"],
- closeBtn: 0,
- shade: 0
- });*/
- },
- mouseout: function(){
- layer.closeAll("tips");
- },
-
- },
- computed: {},
- watch: {
- '$v.deteMeta': {
- handler() {
- var temp=this;
- var v=temp.$v.deteMeta;
- if(v.name.$anyError){
- temp.deteMeta.passFlag=false;
- return ;
- }
- if(v.fieldType.$anyError){
- temp.deteMeta.passFlag=false;
- return ;
- }
- if(v.dataType.$anyError){
- temp.deteMeta.passFlag=false;
- return ;
- }
- if(v.dataLenth.$anyError){
- temp.deteMeta.passFlag=false;
- return ;
- }
- if(v.oid.$anyError){
- temp.deteMeta.passFlag=false;
- return ;
- }
- if(v.unit.$anyError){
- temp.deteMeta.passFlag=false;
- return ;
- }
- if(v.dicType.$anyError){
- temp.deteMeta.passFlag=false;
- return ;
- }
- if(v.remark.$anyError){
- temp.deteMeta.passFlag=false;
- return ;
- }
-
- temp.deteMeta.passFlag=true;
- },
- deep: true
- },
- 'deteMeta.delFlag':function(){
- if('1'==this.deteMeta.delFlag){
- this.delSelf(this.index)
- }
- },
- // 'deteMeta.name':function(){
- // this.$emit('name-check',this.deteMeta.name);
- // }
- },
- mounted: function () {
- this.init();
- }
-})
-
-var addMeta=Vue.extend({
- template:"#addDetectMata",
- components: {
- "detect-meta":meta
- },
- props: {
- deteMetas:{
- type:Array,
- required:true
- },
- deteMethod:{
- type:Object,
- required
- },
- fieldTypes:{
- type:Array,
- required:true
- },
- dataTypes:{
- type:Array,
- required:true
- },
- dicTypes:{
- type:Array,
- required:true
- }
- },
- data: function () {
- return {
- counter:1,
- reset:true,
- beforeIndex:null
- }
- },
- validations:function(){
-
-
- },
- created:function(){
-
- },
- methods: {
- addMeta:function(){
- if(this.deteMethod.code=='3'){
- return ;
- }
- var name='TEMP-'+this.counter;
- var meta={
- id: null,
- name: name,
- fieldType: {
- code:"3",
- value:"TEMP"
- },
- dataType: {
- code:'3',
- value:"STRING"
- },
- dataLenth: 100,
- oid: '',
- unit: '',
- dicType: '',
- remark: '',
- delFlag: '0',
- new:true,
- bestNew:true,
- passFlag:true
- };
-
- for (let meta of this.deteMetas){
- meta.bestNew=false;
- }
-
- this.deteMetas.push(meta);
- this.counter++;
- },
- delMeta:function(index){
- this.deteMetas.splice(index,1);
- $("#meta-details").html("");
- this.resetDom();
- },
- getOpMeta:function(deteMeta){
- var temp=this;
- temp.opDeteMeta=deteMeta;
- },
- resetDom: function () {//强制刷新dom
- var temp = this;
- temp.reset = false;
- temp.$nextTick(() => {
- temp.reset = true
- });
- },
- swapMeta:function(index){
- var temp=this;
- /*校验上一个*/
- if(typeof(temp.beforeIndex)=='number'){
- var componet=temp.$refs['r-detect-meta'][temp.beforeIndex];
- if(componet!=undefined){
- componet.validate();
- }
-
- }
-
- if(typeof(index)=='number'){
- temp.beforeIndex=index;
- }
- /*检验出当前点击的全部*/
- // var componets=temp.$refs['r-detect-meta'];
- // for (let i in componets){
- // if(i==index){
- // continue;
- // }
- // var componet=componets[i];
- // componet.validate();
- // }
-
- },
-
- },
- computed: {},
- watch: {
- // rowData: {
- // handler() {
- // this.init();
- // },
- // deep: true
- // }
- },
- mounted: function () {
- }
-})
-
-var addParam=Vue.extend({
- template:"#addDetectParam",
- components: {
-
- },
- props: {
- deteMethod:{
- type:Object,
- required:true
- },
- deteParam:{
- type:Object,
- required:true
- },
- index:{
- type:Number,
- required:true
- },
- deteParams:{
- type:Array,
- required:true
- }
- },
- data: function () {
- return {
- editSwitch:false,
- listPreKey:'r-detect-param-list',
- editPreKey:'r-detect-param-edit',
- listSelector:'',
- editSelector:'',
- listDom:null,
- editDom:null
- }
- },
- validations:function(){
- var temp=this;
- return {
- deteParam:{
- name:{
- required,
- inPageNameRepeat:inPageNameRepeat(temp.deteParams,temp.index)
- },
- defVal:{
- required
- }
- }
- }
-
-
- },
- created:function(){
-
- },
- methods: {
- init:function(){
- var temp=this;
- temp.listSelector="#"+temp.listPreKey+"-"+temp.index;
- temp.editSelector="#"+temp.editPreKey+"-"+temp.index;
- temp.listDom=$(temp.listSelector);
- temp.editDom=$(temp.editSelector);
- if(typeof temp.deteParam.new!='undefined'&&temp.deteParam.new!=null&&!temp.deteParam.isEdited){
- temp.editSwitch=true;
- temp.listDom.parent().attr("draggable",'false');
- }
- //解决火狐弹出新选项卡的问题
- $("#r-dete-param-container").bind('drop',function(event){
- event.preventDefault();
- event.stopPropagation();
- });
- temp.listDom.parent().bind("dragstart",temp.dragStartFunc);
- temp.listDom.parent().bind("dragend",temp.dragEndFunc);
- temp.listDom.parent().bind("dragenter",temp.dragEnterFunc);
- temp.listDom.parent().bind("dragover",temp.dragOverFunc);
- temp.listDom.parent().bind("dragleave",temp.dragLeaveFunc);
- temp.listDom.parent().bind("drop",temp.dropFunc);
-
-
- },
- dragStartFunc:function(event){//拖拽开始时将被拖拽元素透明度设置为50%
- this.editSwitch=false;
- var event = event.originalEvent;
- event.target.style.opacity = .5;
- var index = $(event.target).attr('index');
- //firefox 必须添加
- event.dataTransfer.setData("index",index);
- },
- dragEndFunc:function(event){//拖拽之后恢复被拖拽元素的透明度
- var event = event.originalEvent;
- event.target.style.opacity = 1;
- },
- dragEnterFunc:function(event){//将元素拖入当前元素
- var event = event.originalEvent;
- event.target.style.backgroundColor='#eeeeee';
- },
- dragOverFunc:function(event){//google chrome,opera需要添加
- event.originalEvent.preventDefault();
- },
- dragLeaveFunc:function(event){//将元素拖离当前元素
- var event = event.originalEvent;
- event.target.style.backgroundColor='';
- },
- dropFunc:function(event){//将元素释放到当前元素中
-
-
- var event = event.originalEvent;
- var index = event.dataTransfer.getData("index");
- //重置背景色
- event.target.style.backgroundColor='';
- this.submitSelf();
- if(!this.$v.deteParam.$error){
- this.$emit("ask-for-swap",index,this.index);
- }
-
- event.preventDefault();
- event.stopPropagation();
- },
- editSelf:function(){
- var temp=this;
- if(temp.deteMethod.code=='3'){
- return ;
- }
- if(temp.deteParam.delFlag=='0'){
- temp.editSwitch=true;
- temp.listDom.parent().attr("draggable",'false');
- }else{
- return false;
- }
-
- },
- delSelf:function(e){
- var temp=this;
- if(temp.deteMethod.code=='3'){
- return ;
- }
- var p=temp.deteParam;
- if(p.new!=undefined&&p.new!=null&&p.new){
- temp.$emit("del-param",this.index);
- }else{
- $("#add-box_op_edit_"+temp.index).bind('mouseover',function(event){
- event.target.style.cursor='not-allowed';
- });
- p.delFlag='1';
- }
-
- },
- recSelf:function(e){
- var temp=this;
- temp.listDom.removeClass('text-disabled');
- $("#add-box_op_edit_"+temp.index).bind('mouseover',function(event){
- event.target.style.cursor='pointer';
- });
- temp.deteParam.delFlag='0';
- },
- submitSelf:function(){
- var temp=this;
-
- if(temp.validate()){
- temp.showNameWarningMsg();
- temp.showDefValWarningMsg();
- return ;
- }
-
- temp.editSwitch=false;
- temp.deteParam.isEdited=true;
- temp.listDom.parent().attr("draggable",'true');
-
- },
- validate:function(errContainer){
- var temp=this;
- temp.$v.deteParam.$touch();
- if(errContainer!=undefined&&errContainer instanceof Array){
- errContainer.push(temp.$v.deteParam.$error);
- }
-
- return temp.$v.deteParam.$error;
- },
- showNameWarningMsg:function(){
- var temp =this;
- if(temp.$v.deteParam.name.$anyError){
- $("#r-param-name-input-"+temp.index).blur();
- var msg='';
- if(temp.$v.deteParam.name.$dirty&&!temp.$v.deteParam.name.required){
- msg="<div class=\"form-control_error-msg\"><@spring.message 'validate.common.required'/></div>"
- }
- if(temp.$v.deteParam.name.$dirty&&!temp.$v.deteParam.name.inPageNameRepeat){
- msg="<div class=\"form-control_error-msg\"><@spring.message 'validate.common.name.repeat'/></div>"
- }
- if(temp.editSwitch){
- layer.tips(msg, "#r-param-name-input-"+temp.index,{
- tips:[1, "white"],
- tipsMore:true
- });
- }
-
-
- }
-
- },
- showDefValWarningMsg:function(){
- var temp=this;
- if(temp.$v.deteParam.defVal.$anyError){
- $("#r-param-defval-input-"+this.index).blur();
- var msg='';
- if(temp.$v.deteParam.defVal.$dirty&&!temp.$v.deteParam.defVal.required){
- msg="<div class=\"form-control_error-msg\"><@spring.message 'validate.common.required'/></div>"
- }
- if(temp.editSwitch){
- layer.tips(msg, "#r-param-defval-input-"+temp.index,{
- tips:[1, "white"],
- tipsMore:true
- });
- }
-
- }
- }
-
- },
- computed: {},
- watch: {
- "$v.deteParam.name": {
- handler() {
- this.showNameWarningMsg();
- },
- deep: true
- },
- "$v.deteParam.defVal": {
- handler() {
- this.showDefValWarningMsg();
- },
- deep: true
- }
- },
- mounted: function () {
- this.init();
- }
-})
-var addType=Vue.extend({
- template:"#addTypeTemplate",
- components: {
- "nz-add-meta":addMeta,
- "nz-add-param":addParam,
- "nz-fileupload":fileUpload
- },
- props: {
- typeId:{
-
- },
- parentLayerId:{
-
- },
- reloadFunc:{
- type:Function,
- required:true
- }
- },
- data: function () {
- return {
- title:"<@spring.message 'deteType'/>",
- deteType:{
- id: null,
- name: '',
- viewLevel: 2,
- method: 1,
- deteInterval: 60,
- content: '',
- i18nCode: '',
- remark: '',
- deteTypeMetas: [],
- deteTypeParams: [],
- },
- deteMethods:[],
- defaultMethod:{},
- innerMethod:null,
- fieldTypes:[],
- dataTypes:[],
- dicTypes:[],
- metaReset:true,
- paramReset:true,
- uploadReset:true,
- metaDirty:false,
- metaRequired:true,
- paramDirty:false,
- paramRequired:true,
- typeNotLayer: true,//判断是否是在layer中打开,
- isUpdate:false, //是否是更新操作,更新不容许修改监测方式
- file:null,
- acceptFile:".sh",
- hasOldFile:false,
- oldFile:{
- filePath:'',
- remark:'No File'
- },
- }
- },
- validations:{
-
- deteType: {
- name: {
- required,
- nameRepeat
- },
- method: {},
- deteInterval: {
- integer
- },
- content: {},
- i18nCode: {
-
- },
- remark: {}
- }
-
- },
- created:function(){
- this.init();
- },
- methods: {
- init:function(){
- var temp=this;
- temp.getDeteMethods();
- temp.getFieldTypes();
- temp.getDataTypes();
- temp.getDicTypes();
- temp.initDeteType();
- if (temp.$parent.typeNotLayer == false) {
- temp.typeNotLayer = false;
- }
- },
- initDeteType:function(){
- var temp=this;
- temp.resetType();
- if(temp.typeId==null){
- temp.isUpdate=false;
- temp.deteType={
- id: null,
- name: '',
- viewLevel: 2,
- method: 1,
- deteInterval: 60,
- content: '',
- i18nCode: '',
- remark: '',
- deteTypeMetas: [],
- deteTypeParams: [],
- }
- }else{
- temp.isUpdate=true;
- temp.getTypeInfo();
- }
-
- temp.resetMetaDom();
- temp.resetParamDom();
- temp.resetFileUploadDom();
- },
- getTypeInfo: function () {
- var temp=this;
- $.get(baseURL + "deteType/detail?id=" + temp.typeId, function (r) {
- temp.deteType = r.data;
- temp.formatDeteTypeToObject();
- });
- },
- getDeteMethods:function(){
- var temp=this;
- temp.deteMethods=[];
- $.getJSON(baseURL + "sys/dict/all?type=dtmethond&_" + $.now(), function (r) {
- for (let dic of r.data) {
-
- var m={
- code:dic.code,
- value:dic.value,
- }
- if('3'==dic.code){
- temp.innerMethod=m;
- continue;
- }
- if("1"==dic.code){
- temp.defaultMethod=m;
- }
- temp.deteMethods.push(m);
- }
- });
- },
- openMetaWindow: function(i) {
- var temp=this;
- temp.metaDirty=true;
- var parentLayer=null;
- if(temp.parentLayerId!=undefined&&temp.parentLayerId!=null) {
- $("#metaWindow").appendTo($('body'))
- parentLayer= $("#layui-layer" + temp.parentLayerId).get(0);
- }
- var metaComponets=null;
- $(parentLayer).animate({right: "600px"}, "normal");
- var index = layer.open({
- area: ['600px', '100%'],
- shade: 0.01,
- title: "<@spring.message 'deteType.meta'/>",
- type: 1,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $("#metaWindow"),
- zIndex: layer.zIndex,
- success: function(layero,index){
- metaComponets=temp.$refs.addMetaWindow.$refs['r-detect-meta'];
- if(!temp.parentLayerId){
- $(parentLayer).animate({right: "600px"});
- }
-
- if(temp.deteType.deteTypeMetas.length<1){
- temp.$refs.addMetaWindow.addMeta();
- }
- },
- cancel:function(){
- metaComponets=temp.$refs.addMetaWindow.$refs['r-detect-meta'];
- if(typeof metaComponets!='undefined'&&metaComponets!=null&&metaComponets.length>0){
- for(let componet of metaComponets){
- componet.validate();
- }
- }
-
- if(typeof temp.parentLayerId!='undefined'&&temp.parentLayerId!=null){
- $(parentLayer).animate({right: 0}, "normal");
- }
- },
- end: function() {
- if(temp.parentLayerId!=undefined&&temp.parentLayerId!=null) {
- $("html").css("overflow-y", "hidden");
- }
- }
- });
- if(typeof(i)=="number"){
- metaComponets[i].metaDomClick();
- }
-
-
- },
- getFieldTypes:function(){
- var temp=this;
- $.getJSON(baseURL + "sys/dict/all?type=fieldType&_" + $.now(), function (r) {
- for (var i = 0; i < r.data.length; i++) {
- var m = {"code": r.data[i].code, "value": r.data[i].value,"remark":r.data[i].remark}
- temp.fieldTypes.push(m);
- }
- });
- },
- getDataTypes: function () {
- var temp=this;
- $.getJSON(baseURL + "sys/dict/all?type=dataType&_" + $.now(), function (r) {
- for (var i = 0; i < r.data.length; i++) {
- var m = {"code": r.data[i].code, "value": r.data[i].value,"remark":r.data[i].remark}
- temp.dataTypes.push(m);
- }
- });
- },
- getDicTypes: function () {
- var temp=this;
- $.getJSON(baseURL + "deteType/dicList?limit=999&_" + $.now(), function (r) {
- for (var i = 0; i < r.data.list.length; i++) {
- temp.dicTypes.push(r.data.list[i])
- }
- });
- },
- spliteName:function(name){
- if(name.length>20){
- return name.substr(0,19)+"..."
- }else{
- return name;
- }
- },
- formatDeteTypeToSimple: function () {
- var temp=this;
- temp.deteType.method=temp.defaultMethod.code;
- $.each(temp.deteType.deteTypeMetas, function (i, v) {
- temp.deteType.deteTypeMetas[i].fieldType = v.fieldType.code;
- temp.deteType.deteTypeMetas[i].dataType = v.dataType.code;
- if(typeof v.dicType!='undefined' && v.dicType!=null){
- temp.deteType.deteTypeMetas[i].dicType=v.dicType.type;
- }
- });
- },
- formatDeteTypeToObject: function () {
- var temp=this;
- if(temp.deteType.method=='3'){
- temp.defaultMethod=temp.innerMethod;
- }else{
- for (let method of temp.deteMethods){
- if(temp.deteType.method==method.code){
- temp.defaultMethod=method;
- break;
- }
- }
- }
-
- $.each(temp.deteType.deteTypeMetas, function (index, value) {
- for (var i = 0; i < temp.fieldTypes.length; i++) {
- if (temp.fieldTypes[i].code == value.fieldType) {
- temp.deteType.deteTypeMetas[index].fieldType = temp.fieldTypes[i];
- break;
- }
- }
-
- for (var i = 0; i < temp.dataTypes.length; i++) {
- if (temp.dataTypes[i].code == value.dataType) {
- temp.deteType.deteTypeMetas[index].dataType = temp.dataTypes[i];
- break;
- }
- }
-
- for (var i = 0; i < temp.dicTypes.length; i++){
- if(temp.dicTypes[i].type == value.dicType){
- temp.deteType.deteTypeMetas[index].dicType=temp.dicTypes[i];
- break;
- }
- }
- });
- if(temp.deteType.method=='1'){
- temp.hasOldFile=true;
- if(typeof temp.deteType.content != 'undefined'&&temp.deteType.content!=null&&temp.deteType.content!=''){
- try {
- var file=JSON.parse(temp.deteType.content);
- temp.oldFile.filePath=file.filePath;
- temp.oldFile.remark=file.fileName;
- }catch (e) {
- temp.oldFile.filePath='';
- temp.oldFile.remark='No File';
- }
-
- }else{
- temp.oldFile.filePath='';
- temp.oldFile.remark='No File';
- }
- }else{
- temp.hasOldFile=false;
- temp.oldFile.filePath='';
- temp.oldFile.remark='No File';
- }
- },
- delMeta:function(index){
- if(this.deteType.method=='3'){
- return ;
- }
- var temp=this;
- temp.deteType.method=temp.defaultMethod.code;
- var meta=temp.deteType.deteTypeMetas[index];
- if(meta.new!=undefined&&meta.name!=null&&meta.new){
- temp.deteType.deteTypeMetas.splice(index,1);
- }else{
- meta.delFlag='1';
- }
- },
- swapParam:function(srcIndex,destIndex){
- var temp=this;
- var srcParam=temp.deteType.deteTypeParams[srcIndex];
- var destParam=temp.deteType.deteTypeParams[destIndex];
-
- temp.deteType.deteTypeParams.splice(srcIndex,1,destParam)
- temp.deteType.deteTypeParams.splice(destIndex,1,srcParam)
-
- },
- addParam:function(){
- if(this.deteType.method=='3'){
- return ;
- }
- var temp=this;
- temp.paramDirty=true;
-
- var paramLen=temp.deteType.deteTypeParams.length;
- if(paramLen>0){
- for (var i=0;i<paramLen;i++){
- temp.$refs['r-detect-param'][i].submitSelf();
- if(temp.$refs['r-detect-param'][i].$v.deteParam.$error){
- return;
- }
- }
- }
-
- var param={
- id:null,
- name:'',
- defVal:'',
- delFlag:'0',
- new:true,
- isEdited:false
- }
- temp.deteType.deteTypeParams.push(param);
- },
- delParam:function(index){
- var temp=this;
- if(this.deteType.method=='3'){
- return ;
- }
- temp.deteType.deteTypeParams.splice(index,1);
- temp.resetParamDom();
- },
- resetMetaDom: function () {//强制刷新dom
- var temp = this;
- temp.metaReset = false;
- temp.$nextTick(() => {
- temp.metaReset = true
- });
- },
- resetParamDom:function(){
- var temp = this;
- temp.paramReset = false;
- temp.$nextTick(() => {
- temp.paramReset = true
- });
- },
- resetFileUploadDom:function(){
- var temp = this;
- temp.uploadReset = false;
- temp.$nextTick(() => {
- temp.uploadReset = true
- });
- },
- saveOrUpdate:function(){
- var temp=this;
- if(temp.validate()){
- return ;
- }
-
- var cloneStr=JSON.stringify(temp.deteType);
- var url = temp.deteType.id == null ? "deteType/save" : "deteType/update";
- var method = temp.deteType.id == null ? "POST" : "PUT";
-
- //处理json数据
- temp.formatDeteTypeToSimple();
- let formData=new FormData;
- formData.append('deteTypeInfo',JSON.stringify(temp.deteType))
- formData.append('file',temp.file);
- $.ajax({
- type: method,
- url: baseURL + url,
- // contentType: "application/json",
- contentType:false,
- processData:false,
- data:formData,
- success: function (r) {
- if (r.code === 200) {
- temp.reload();
- } else {
- var cloneObj=eval("(" + cloneStr + ")");
- temp.deteType=cloneObj;
- alert(r.msg);
- }
- }
- });
- },
- reload:function(){
- this.reloadFunc();
- },
- validate:function(){
- var temp=this;
- temp.touchType();
- var typeError=temp.$v.deteType.$error;
-
- var metaErrorArr=[]
- var metaComponets=temp.$refs.addMetaWindow.$refs['r-detect-meta'];
- if(metaComponets!=null&&metaComponets!=undefined&&metaComponets.length>0){
- for(let componet of metaComponets){
- componet.validate(metaErrorArr);
- }
- }
- var paramErrorArr=[];
- var paramComponets=temp.$refs['r-detect-param'];
- if(paramComponets!=null&&paramComponets!=undefined&&paramComponets.length>0){
- for(let componet of paramComponets){
- componet.validate(paramErrorArr);
- }
- }
- var metaError=false;
- if(metaErrorArr.length<=0){
- temp.metaRequired=false;
- metaError=true;
- }else{
- temp.metaRequired=true;
- for (let err of metaErrorArr){
- if(err){
- metaError=true;
- break;
- }
- }
- }
-
- var paramError=false;
- if(paramErrorArr.length<=0){
- temp.paramRequired=false;
- paramError=true;
- }else{
- temp.paramRequired=true;
- for (let err of paramErrorArr){
- if(err){
- paramError=true;
- break;
- }
- }
- }
- var uploadError=false;
- if(temp.deteType.method=='1'&&!temp.isUpdate) {
- var uploadComponet = temp.$refs.scriptUpload;
- if (typeof uploadComponet != "undefined") {
- uploadError = uploadComponet.error;
- }
- }
-
- return typeError||metaError||paramError||uploadError;
- },
- touchType:function(){
- var temp=this;
- temp.$v.deteType.$touch();
- temp.metaDirty=true;
- temp.paramDirty=true;
- if(temp.deteType.method=='1'&&!temp.isUpdate){
- var uploadComponet=temp.$refs.scriptUpload;
- if(typeof uploadComponet != "undefined"){
- uploadComponet.touch();
- }
- }
-
- },
- resetType:function(){
- var temp=this;
- temp.$v.deteType.$reset();
- temp.metaDirty=false;
- temp.paramDirty=false;
- },
- destoryUploadComponet:function(){
- this.file=null;
- this.acceptFile=".sh";
- this.hasOldFile=false;
- this.oldFile={
- filePath:'',
- remark:'No File'
- }
- }
- },
- computed: {
-
- },
- watch: {
- typeId:function(){
- this.initDeteType();
- },
- 'deteType.method':{
- handler:function(){
- var temp=this;
- if(temp.deteType.method=='3'){
- $('.input-control').each(function(i,v){
- v.disabled='disabled';
- })
-
- }
- },
- immediate: true
- },
- 'deteType.deteTypeMetas':function(){
- if(this.deteType.deteTypeMetas.length<1){
- this.metaRequired=false;
- }else{
- this.metaRequired=true;
- }
- },
- 'deteType.deteTypeParams':function(){
- if(this.deteType.deteTypeParams.length<1){
- this.paramRequired=false;
- }else{
- this.paramRequired=true;
- }
- }
- },
- mounted: function () {
-
- }
-})
-
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/detect/deteSet.js b/nezha-admin/src/main/resources/templates/js/modules/detect/deteSet.js
deleted file mode 100644
index d0c85bab..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/detect/deteSet.js
+++ /dev/null
@@ -1,548 +0,0 @@
-<script>
-$(function () {
- $("#jqGrid").jqGrid({
- url: baseURL + '/deteSet/list',
- datatype: "json",
- colModel: [
- {label: 'ID', name: 'id', width: 30, key: true, hidden: true},
- {label: '<@spring.message "common.name"/>', name: 'name', sortable: true, width: 60},
- {label: '<@spring.message "deteType"/>', name: 'type.name', sortable: false, width: 100},
- {
- label: '<@spring.message "common.status"/>',
- name: 'state',
- sortable: false,
- width: 60,
- formatter: function (value, options, rowData) {
- return "2"==value?"<span style='color: red;'><@spring.message 'common.stopped'/></span>":"<span style='color: green;'><@spring.message 'deteSet.detecting'/></span>"
- }
- },
- {label: '<@spring.message "param"/>', name: 'params', sortable: false, width: 100},
- {
- label: '<@spring.message "deteWarn"/>',
- sortable: false,
- width: 100,
- formatter:function(value, options, rowData){
- var tdId="td-warn-"+rowData.id;
- return '<div class="td-warn-win" setId='+rowData.id+' id='+tdId+'></div>'
- }
- },
-
- {label: '<@spring.message "common.opTime"/>', name: 'opTime', sortable: true, width: 100},
- {label: '<@spring.message "common.remark"/>', name: 'remark', sortable: false, width: 100},
- ],
- viewrecords: true,
- height: top.$(".content").height()-130,
- rowNum: 15,
- rowList : [15,30,50],
- rownumbers: true,
- rownumWidth: 25,
- autowidth: true,
- multiselect: true,
- pager: "#jqGridPager",
- jsonReader: {
- root: "data.list",
- page: "data.currPage",
- total: "data.totalPage",
- records: "data.totalCount"
- },
- prmNames: {
- page: "page",
- rows: "limit",
- order: "order"
- },
- gridComplete: function () {
- //隐藏grid底部滚动条
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
- console.log('set2')
- console.log($("#warnSpace").get(0))
- if(typeof $("#warnSpace").get(0)!='undefined'){
- new warnComponets().$mount('#warnSpace');//这种方式挂载会将挂载的element替换掉,并不是在内部挂载!!!
- $('body').append("<div id='warnSpace'></div>")
- }
- console.log('set3')
- console.log($("#warnSpace").get(0))
- },
- onSelectAll: function(rowids, status) {
- if (status) {
- toolsBtnHandle();
- }
- },
- onSelectRow: function(rowid,status) {
- toolsBtnHandle();
- }
- });
- var ps1 = new PerfectScrollbar('.psNg');
- var ps2 = new PerfectScrollbar('.psN');
-});
-
-Vue.component("nz-node-selector",selector);
-Vue.component("nz-detect-addtype",addType);
-
-
-var nameRepeat = function (name, deteSet) {
- if (helpers.req(name) && helpers.req(deteSet)) {
- var params = "?name=" + name;
- if (deteSet.id) {
- params += "&id=" + deteSet.id;
- }
- var flag = true;
- $.ajax({
- type: "get",
- url: baseURL + "/deteSet/nameCheck" + params,
- async: false, //关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-
-}
-
-var vm = new Vue({
- el: "#deteSet",
- data: {
- single:true,
- multi:true,
- showList: true,
- setStateArr: [],
- nodeTypesArr: [],
- params: {
- name: '',
- type: null
- },
- deteSet: {
- id: null,
- name: '',
- typeId: '',
- params: '',
- viewLevel: '',
- viewerId: [],
- remark: '',
- i18nCode: '',
- nodeGroupIds: [],
- nodeIds: [],
- nodeGroups: [],
- nodes:[]
- },
- title: '监测设置',
- deteTypes: [],
- showNodeSelect: false,
- curSystem: null,
- queryParams: null,
- nodeGroupsChecked: [], //选中的节点组
- nodeInfosChecked: [], //选中的节点
- viewLevels: [],
- viewers: [],
- typeParams:[],
- paramVals:[],
- nodeOrGroupEmpty:false,
- nodeOrGroupEmptyMsg:"",
- deteTypeIsNull:false,
- userGroupsEmpty:false,
- selectorReset:true,
- openAddTypeWindow:false,
- typeId:null,
- layerId:null,
- layerReset:true,
- isUpdate:false,
- typeNotLayer: false
- },
- created: function () {
- this.getSetState();
- this.getDeteTypes();
- this.getNodeType();
- this.getViewLevels();
- this.getUserGroups();
- },
- validations: {
- deteSet: {
- name: {
- required,
- nameRepeat
- },
- typeId: {
- required
- },
- params: {},
- viewLevel: {
- required
- },
- viewerId: [],
- remark: {},
- i18nCode: {},
- nodeGroupIds: {},
- nodeIds: {}
- }
- },
- methods: {
- reset:function(){
- vm.nodeInfoData = [];
- vm.nodeGroupsChecked = [];
- vm.nodeInfosChecked = [];
- vm.typeParams=[];
- vm.paramVals=[];
- vm.$v.deteSet.$reset();
-
- vm.deteSet = {
- id: null,
- name: '',
- typeId: '',
- params: '',
- viewLevel: '2',
- viewerId: [],
- remark: '',
- i18nCode: '',
- nodeGroupIds: [],
- nodeIds: []
- }
- },
- getSetState: function () {
- this.setStateArr = getSysDicArr("setState")
- },
- getNodeType: function () {
- this.nodeTypesArr = getSysDicArr("nodeType")
- },
- query: function () {
- vm.showList = true;
- var page = $("#jqGrid").jqGrid('getGridParam', 'page');
- $("#jqGrid").jqGrid('setGridParam', {
- postData: {'name': vm.params.name,"typeId":vm.params.type==null?null:vm.params.type.id},
- page: 1
- }).trigger("reloadGrid");
- },
- reload: function () {
- vm.single=vm.multi=true;
- vm.query();
- },
- add: function () {
- vm.showList = false;
- this.reset();
- vm.resetSelector();
- vm.isUpdate=false;
- },
- update: function () {
- var id = getSelectedRow();
- if (id == null||id==undefined||id=='') {
- return;
- }
- this.reset();
- vm.showList = false;
- vm.getInfo(id);
- vm.isUpdate=true;
-
- },
- getInfo: function (id) {
- $.ajax({
- url:baseURL + "deteSet/detail?id=" + id,
- type:"GET",
- async:false,
- success:function (r) {
- vm.deteSet = r.data;
- vm.formatDeteSetToObject();
- }
- });
- },
- saveOrUpdate: function () {
-
- if (vm.validate()) { //在下方定义的validate方法
- return;
- }
- layer.closeAll();
- var cloneStr = JSON.stringify(vm.deteSet);
-
- var url = vm.deteSet.id == null ? "deteSet/save" : "deteSet/update";
- var method = vm.deteSet.id == null ? "POST" : "PUT";
-
- //处理json数据
- vm.formatDeteSetToSimple();
- console.log("submit data-->" + JSON.stringify(vm.deteSet))
- $.ajax({
- type: method,
- url: baseURL + url,
- contentType: "application/json",
- data: JSON.stringify(vm.deteSet),
- success: function (r) {
- if (r.code === 200) {
- alert('<@spring.message "common.success"/>', function (index) {
- vm.nodeInfoData = [];
- vm.nodeGroupsChecked = [];
- vm.nodeInfosChecked = [];
- vm.reload();
- });
- } else {
- var cloneObj = eval("(" + cloneStr + ")");
- vm.deteSet = cloneObj;
- alert(r.msg);
- }
- }
- });
-
-
- },
- del: function (event) {
- var ids = getSelectedRows();
- if (ids == null) {
- return;
- }
- var form = new FormData();
- form.set("state",'1');
- form.set("ids",ids);
- confirm("<@spring.message 'common.confirmDelete'/>", function () {
- var xhr=new XMLHttpRequest();
- xhr.open("PUT",baseURL + "deteSet/changeState");
- xhr.send(form);
- xhr.onload=function(){
- if(xhr.status==200){
- var response=JSON.parse(xhr.response);
- if(response.code==200){
- alert('<@spring.message "common.success"/>', function (index) {
- vm.query();
- });
- }else{
- alert(response.msg);
- }
- }
- }
-
-
- })
- },
- validate: function () {//提交时的校验
- vm.$v.deteSet.$touch();
- var nodeGroupsEmpty=vm.nodeGroupsChecked==null||vm.nodeGroupsChecked.length<1;
- var nodesEmpty=vm.nodeInfosChecked==null||vm.nodeInfosChecked.length<1;
- vm.nodeOrGroupEmpty=(nodeGroupsEmpty&&nodesEmpty);
- if(vm.nodeOrGroupEmpty){
- vm.nodeOrGroupEmptyMsg="<@spring.message 'validate.nodeOrNodegroupRequired'/>";
- }
- if(vm.deteSet.typeId!=null&&vm.nodeOrGroupEmpty){
- vm.openNodePannel();
- }
-
- if(vm.deteSet.viewLevel=='1'){
- var userGroupCheckFlag=true;
- for(var i=0;i<vm.viewers.length;i++){
- var viewer=vm.viewers[i];
- if(viewer.checked){
- userGroupCheckFlag=false;
- break;
- }
- }
- vm.userGroupsEmpty=userGroupCheckFlag;
- }
-
-
- return vm.$v.deteSet.$error||vm.nodeOrGroupEmpty||vm.userGroupsEmpty;
- },
- getDeteTypes: function () {
- $.getJSON(baseURL + "deteType/list?limit=999&_" + $.now(), function (r) {
- vm.deteTypes = r.data.list;
- });
- },
- openNodePannel: function () {
- if (this.deteSet.typeId == null || this.deteSet.typeId == "") {
- vm.deteTypeIsNull=true;
- return;
- }
-
- vm.deteTypeIsNull=false;
- vm.showNodeSelect = true;
- var index = layer.open({
- area: ['610px', '100%'],
- shade: 0,
- title: "<@spring.message 'common.selectNodeOrNodeGroup'/>",
- type: 1,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $("#layerView"),
- success:function(){
- if(vm.nodeOrGroupEmpty&&vm.nodeOrGroupEmptyMsg!=''){
- //显示提示信息
- }
- }
- });
- var ps3 = new PerfectScrollbar('.nodeTree');
- },
- openAddTypePannel: function () {
- var index = layer.open({
- area: ['540px', '100%'],
- shade: 0,
- title: "监测类别",
- type: 1,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $("#add-type-layer-view"),
- end: function() {
- $("html").css("overflow-y", "auto");
- }
- });
- this.layerId = index;
- addType.typeNotLayer = false;
- $("#layui-layer" + index).get(0).style.left = "unset";
- $("#layui-layer" + index).get(0).style.right = "0";
- var ps3 = new PerfectScrollbar('.nodeTree');
- },
- getTabDatas:function(tabData){
- vm.nodeInfosChecked=tabData;
- },
- getTreeDatas:function(treeData){
- vm.nodeGroupsChecked=treeData;
- },
- formatTab:function(rowData){
- console.log(rowData)
- if (rowData.state == '2') { //下线节点
- rowData.disabled=true;
- rowData.trRemark="下线节点";
- } else {
- if (vm.deteSet.typeId.method == "2") { //snmp 监测 节点类型 网元
- if (rowData.type == '1') { //服务器
- rowData.disabled=true;
- rowData.trRemark="网元类型监测不能作用于服务器节点";
- }
- } else {//snmp 监测 节点类型 服务器
- if (rowData.type == '2') {//网元
- rowData.disabled=true;
- rowData.trRemark="服务器类型监测不能作用于网元节点";
- }
- }
- }
- },
- unCheckGroup:function(nodeGroup){
- this.$refs.nzSelector.uncheckTreeData(nodeGroup);
- this.openNodePannel();
- },
- uncheckAllGroup:function(){
- this.$refs.nzSelector.uncheckAllTreeData();
- },
- unCheckNodeInfo:function(rowData){
- this.$refs.nzSelector.uncheckTabData(rowData);
- this.openNodePannel();
- },
- uncheckAllNodeInfo:function(){
- this.$refs.nzSelector.uncheckAllTabData();
- },
- formatDeteSetToSimple: function () {
- if(vm.deteSet.nodeGroupIds==null||vm.deteSet.nodeGroupIds==undefined){
- vm.deteSet.nodeGroupIds=[];
- }
- if(vm.deteSet.nodeIds==null||vm.deteSet.nodeIds==undefined){
- vm.deteSet.nodeIds=[];
- }
- vm.deteSet.typeId = vm.deteSet.typeId.id;
- $.each(vm.nodeGroupsChecked, function (i, v) {
- vm.deteSet.nodeGroupIds.push(v.id);
- })
- $.each(vm.nodeInfosChecked, function (i, v) {
- vm.deteSet.nodeIds.push(v.uuid);
- })
-
-
- if(vm.paramVals!=null && vm.paramVals.length>0){
- var params="";
- for (var i=0;i<vm.typeParams.length;i++){
- params+=(vm.paramVals[i]+",");
- }
- }
- vm.deteSet.params=params.substr(0,params.length-1);
- vm.deteSet.viewerId=[];
- $.each(vm.viewers,function(i,v){
- if(v.checked){
- vm.deteSet.viewerId.push(v.code);
- }
- })
- },
- formatDeteSetToObject: function(){
- for(var i=0;i<vm.deteTypes.length;i++){
- var deteType=vm.deteTypes[i];
- if(vm.deteSet.typeId==deteType.id){
- vm.deteSet.typeId=deteType;
- break;
- }
- }
-
- vm.getDeteTypeDetail(vm.deteSet.typeId,null);
- vm.paramVals =vm.deteSet.params.split(',');
-
- if(vm.deteSet.viewLevel=='1'){
- $.each(vm.viewers,function(index,item){
- for(var i=0;i<vm.deteSet.viewer.length;i++){
- var viewer=vm.deteSet.viewer[i];
- if(viewer.id==item.code){
- item.checked=true;
- break;
- }
- }
- })
- }
-
- },
- getViewLevels: function () {
- this.viewLevels = getSysDicMap("viewLevel");
- },
- getUserGroups: function () {
- $.getJSON(baseURL + "sys/user/info/" , function (r) {
- if (r.user.usergroups != null) {
- for (var i = 0; i < r.user.usergroups.length; i++) {
- var m = {"code": r.user.usergroups[i].id, "value": r.user.usergroups[i].name,"checked":false}
- vm.viewers.push(m);
- }
- }
- })
- },
- getDeteTypeDetail:function(selectedOption,id){
- $.getJSON(baseURL+"deteType/detail?id="+selectedOption.id,function(r){
- vm.typeParams=r.data.deteTypeParams;
- for(let i in vm.typeParams){
- vm.paramVals.push('');
- }
- })
- },
- resetSelector: function () {//强制刷新dom
- var temp = this;
- temp.selectorReset = false;
- temp.$nextTick(() => {
- temp.selectorReset = true
- });
- },
- resetAddTypeLayer: function () {//强制刷新dom
- var temp = this;
- temp.layerReset = false;
- temp.$nextTick(() => {
- temp.layerReset = true
- });
- },
- openAddDetectType:function(index){
- this.openAddTypeWindow=true;
- this.openAddTypePannel();
- },
- closeAddType:function(){
- layer.closeAll();
- this.resetAddTypeLayer();
- this.getDeteTypes();
- }
- },
- watch:{
- viewers:{
- handler(){
- },
- deep:true
- }
- },
- mounted() {
-
- }
-
-})
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/detect/deteType.js b/nezha-admin/src/main/resources/templates/js/modules/detect/deteType.js
deleted file mode 100644
index 77fc9a67..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/detect/deteType.js
+++ /dev/null
@@ -1,149 +0,0 @@
-<script>
-$(function () {
- $("#jqGrid").jqGrid({
- url: baseURL + '/deteType/list',
- datatype: "json",
- colModel: [
- {label: 'ID', name: 'id', width: 30, key: true,hidden:true},
- {label: '<@spring.message "common.name"/>', name: 'name', sortable: true, width: 60},
- {
- label: '<@spring.message "deteType.method"/>',
- name: 'method',
- sortable: false,
- width: 60,
- formatter: function (value, options, rowData) {
- return vm.deteMethodsArr[value - 1];
- }
- },
- {label: '<@spring.message "deteType.deteInterval"/>', name: 'deteInterval', sortable: false, width: 100},
- {label: '<@spring.message "deteType.version"/>', name: 'version', sortable: false, width: 100},
- {label: '<@spring.message "common.opTime"/>', name: 'opTime', sortable: true, width: 100},
- {label: '<@spring.message "common.remark"/>', name: 'remark', sortable: false, width: 80}
- ],
- viewrecords: true,
- height: top.$(".content").height()-130,
- rowNum: 15,
- rowList: [15, 30, 50],
- rownumbers: true,
- rownumWidth: 25,
- autowidth: true,
- multiselect: true,
- pager: "#jqGridPager",
- jsonReader: {
- root: "data.list",
- page: "data.currPage",
- total: "data.totalPage",
- records: "data.totalCount"
- },
- prmNames: {
- page: "page",
- rows: "limit",
- order: "order"
- },
- gridComplete: function () {
- //隐藏grid底部滚动条
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
- },
- onSelectAll: function(rowids, status) {
- if (status) {
- toolsBtnHandle();
- }
- },
- onSelectRow: function(rowid,status) {
- toolsBtnHandle();
- }
- });
-});
-
-Vue.component("nz-detect-addtype",addType)
-var vm = new Vue({
- el: '#deteType',
- data: {
- params: {
- name: ''
- },
- single:true,
- multi:true,
- showList: true,
- title: 'title',
- deteMethodsArr:[],
- typeId:null
- },
-
- created: function () {
- this.getDeteMethod();
- },
- methods: {
- query: function () {
- vm.showList = true;
- var page = $("#jqGrid").jqGrid('getGridParam', 'page');
- $("#jqGrid").jqGrid('setGridParam', {
- postData: {'name': vm.params.name},
- page: page
- }).trigger("reloadGrid");
- },
- reload: function () {
- vm.single=vm.multi=true;
- vm.query();
- },
- add: function () {
- vm.showList=false;
- vm.typeId=null;
- this.$refs['nz-add-type'].initDeteType();
- },
- update: function () {
-
- var id = getSelectedRow();
- if (id == null) {
- return;
- }
- vm.typeId=id;
- this.$refs['nz-add-type'].initDeteType();
- vm.showList=false;
- },
- del: function (event) {
- var ids = getSelectedRows();
- if (ids == null) {
- return;
- }
- confirm("<@spring.message 'common.confirmDelete'/>", function () {
- $.ajax({
- type: "DELETE",
- url: baseURL + "/deteType/delete",
- contentType: "application/json",
- data: JSON.stringify(ids),
- success: function (r) {
- if (r.code == 200) {
- alert('<@spring.message "common.success"/>', function () {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
-
- })
- },
- getDeteMethod: function () {
- $.getJSON(baseURL + "sys/dict/all?type=dtmethond&_" + $.now(), function (r) {
- var deteMethodsArr = [];
- for (var i = 0; i < r.data.length; i++) {
- var m = {"code": r.data[i].code, "value": r.data[i].value}
- deteMethodsArr.push(r.data[i].value);
- if ("1" == r.data[i].code) { //默认为脚本
- vm.deteMethod = m;
-
- }
- }
- vm.deteMethodsArr = deteMethodsArr;
- });
- },
-
- },
- watch: {
-
-
- }
-});
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/detect/deteType2.js b/nezha-admin/src/main/resources/templates/js/modules/detect/deteType2.js
deleted file mode 100644
index 3324280b..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/detect/deteType2.js
+++ /dev/null
@@ -1,696 +0,0 @@
-<script>
-$(function () {
- $("#jqGrid").jqGrid({
- url: baseURL + '/deteType/list',
- datatype: "json",
- colModel: [
- {label: 'ID', name: 'id', width: 30, key: true,hidden:true},
- {label: '<@spring.message "common.name"/>', name: 'name', sortable: true, width: 60},
- {
- label: '<@spring.message "deteType.method"/>',
- name: 'method',
- sortable: false,
- width: 60,
- formatter: function (value, options, rowData) {
- return vm.deteMethodsArr[value - 1];
- }
- },
- {label: '<@spring.message "deteType.deteInterval"/>', name: 'deteInterval', sortable: false, width: 100},
- {label: '<@spring.message "deteType.version"/>', name: 'version', sortable: false, width: 100},
- {label: '<@spring.message "common.opTime"/>', name: 'opTime', sortable: true, width: 100},
- {label: '<@spring.message "common.remark"/>', name: 'remark', sortable: false, width: 80}
- ],
- viewrecords: true,
- height: 385,
- rowNum: 10,
- rowList: [10, 30, 50],
- rownumbers: true,
- rownumWidth: 25,
- autowidth: true,
- multiselect: true,
- pager: "#jqGridPager",
- jsonReader: {
- root: "data.list",
- page: "data.currPage",
- total: "data.totalPage",
- records: "data.totalCount"
- },
- prmNames: {
- page: "page",
- rows: "limit",
- order: "order"
- },
- gridComplete: function () {
- //隐藏grid底部滚动条
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
- }
- });
- var ps = new PerfectScrollbar('.meta-win_list');
-});
-
-var steps = ['<@spring.message "deteType"/>', '<@spring.message "deteTypeMeta"/>', '<@spring.message "deteTypeParam"/>'];
-
-/*自定义校验规则*/
-var nameRepeat = function (name, deteType) {
- if (helpers.req(name) && helpers.req(deteType)) {
- var params = "?name=" + name;
- if (deteType.id) {
- params += "&id=" + deteType.id;
- }
- var flag = true;
- $.ajax({
- type: "get",
- url: baseURL + "/deteType/nameCheck" + params,
- async: false, //关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-
-}
-
-var vm = new Vue({
- el: '#deteType',
- data: {
- yes: true,
- no: false,
- deteType: {
- id: null,
- name: '',
- viewLevel: 2,
- method: 1,
- deteInterval: 60,
- content: '',
- i18nCode: '',
- remark: '',
- deteTypeMetas: [
- {
- id: null,
- name: '',
- fieldType: null,
- dataType: null,
- dataLenth: null,
- oid: '',
- unit: '',
- dicType: '',
- remark: '',
- delFlag: '0'
- }
- ],
- deteTypeParams: [
- {
- id: null,
- name: '',
- defVal: '',
- remark: '',
- delFlag: '0'
- }
- ]
- },
- params: {
- name: ''
- },
- showList: true,
- title: 'title',
- curStep: 0,
- metaCount: 1,
- paramCount: 1,
- deteMethods: [],//监测方式对象数组,getDeteMethod()中初始化,用于表单
- deteMethod: {}, //接收监测方式对象,在watch中对method 参数赋值
- deteMethodsArr: [], //监测方式数组,getDeteMethod()中初始化,用于列表展示
- fieldTypes: [],//字段类型数组
- fieldType: [],
- dataTypes: [],//数据类型数组
- dataType: [], //数据类型对象
- dicTypes: [],//mapping type数组
- dicTypess: [],
- validation: {
- meta: [false],
- param: [false]
- }
- },
- validations: function () {
- if (this.deteType.method == 2) {//snmp 监测
- return { //定义校验规则
- deteType: {
- name: {
- required,
- nameRepeat
- },
- method: {},
- /* deteInterval: {
- integer
- },*/
- content: {},
- i18nCode: {required},
- remark: {},
- deteTypeMetas: {
- $each: {
- name: {
- required
- },
- fieldType: {
- required
- },
- dataType: {
- required
- },
- dataLenth: {
- required,
- integer
- },
- oid: {
- required
- },
- unit: {
- required
- },
- dicType: {},
- index: {}
- }
- },
- deteTypeParams: {
- $each: {
- name: {
- required
- },
- defVal: {
- required
- },
- remark: '',
- delFlag: '0'
- }
- }
- }
- }
- } else {
- return { //定义校验规则
- deteType: {
-
- name: {
- required,
- nameRepeat
- },
- method: {},
- deteInterval: {
- integer
- },
- content: {},
- i18nCode: {required},
- remark: {},
- deteTypeMetas: {
- $each: {
- name: {
- required
- },
- fieldType: {
- required
- },
- dataType: {
- required
- },
- dataLenth: {
- required,
- integer
- },
- oid: {},
- unit: {required},
- dicType: {}
- }
- },
- deteTypeParams: {
- $each: {
- name: {
- required
- },
- defVal: {
- required
- },
- remark: ''
- }
- }
- }
- }
- }
- },
-
- created: function () {
- // this.nameCheckFunc = _.debounce(this.nameCheck, 500);
- this.getDeteMethod();
- this.getFieldTypes();
- this.getDataTypes();
- this.getDicTypes();
- this.init();
-
- },
- methods: {
- init: function () {
- var step = this.curStep;
- this.title = steps[step];
- $("#preStep")[0].disabled = true;
- },
- query: function () {
- vm.showList = true;
- var page = $("#jqGrid").jqGrid('getGridParam', 'page');
- $("#jqGrid").jqGrid('setGridParam', {
- postData: {'name': vm.params.name},
- page: 1
- }).trigger("reloadGrid");
- },
- reload: function () {
- vm.query();
- },
- add: function () {
- // vm.$v.deteType.name.$reset();
- // vm.$v.deteType.method.$reset();
- // vm.$v.deteType.deteInterval.$reset();
- // vm.$v.deteType.content.$reset();
- // vm.$v.deteType.i18nCode.$reset();
- // vm.$v.deteType.remark.$reset();
- // /*遍历touch 对数组调用touch会栈溢出*/
- // for (var i = 0; i < vm.$v.deteType.deteTypeMetas.length; i++) {
- //
- // vm.$v.deteType.deteTypeMetas.$each[i].$reset();
- // }
- //
- // for (var i = 0; i < vm.$v.deteType.deteTypeParams.length; i++) {
- // vm.$v.deteType.deteTypeParams.$each[i].$reset();
- // }
- vm.$v.deteType.$reset();
- vm.showList = false;
- vm.curStep = 0;
- var deteType = {
- id: null,
- name: '',
- viewLevel: 2,
- method: 1,
- deteInterval: 60,
- content: '',
- i18nCode: '',
- remark: '',
- deteTypeMetas: [
- {
- id: null,
- name: '',
- fieldType: null,
- dataType: null,
- dataLenth: null,
- oid: '',
- unit: '',
- dicType: '',
- remark: '',
- delFlag: '0'
- }
- ],
- deteTypeParams: [
- {
- id: null,
- name: '',
- defVal: '',
- remark: '',
- delFlag: '0'
- }
- ]
- }
-
- vm.deteType = deteType;
- },
- update: function () {
- // vm.$v.deteType.name.$reset();
- // vm.$v.deteType.method.$reset();
- // vm.$v.deteType.deteInterval.$reset();
- // vm.$v.deteType.content.$reset();
- // vm.$v.deteType.i18nCode.$reset();
- // vm.$v.deteType.remark.$reset();
- // /*遍历touch 对数组调用touch会栈溢出*/
- // for (var i = 0; i < vm.$v.deteType.deteTypeMetas.length; i++) {
- //
- // vm.$v.deteType.deteTypeMetas.$each[i].$reset();
- // }
- //
- // for (var i = 0; i < vm.$v.deteType.deteTypeParams.length; i++) {
- // vm.$v.deteType.deteTypeParams.$each[i].$reset();
- // }
- vm.$v.deteType.$reset();
- var id = getSelectedRow();
- if (id == null) {
- return;
- }
- vm.showList = false;
- vm.curStep = 0;
- vm.getInfo(id);
-
-
- },
- getInfo: function (id) {
- $.get(baseURL + "deteType/detail?id=" + id, function (r) {
- vm.deteType = r.data;
- vm.metaCount = r.data.deteTypeMetas.length;
- vm.paramCount = r.data.deteTypeParams.length;
- vm.formatDeteTypeToObject();
- });
- },
- saveOrUpdate: function () {
-
- if (vm.validate()) { //在下方定义的validate方法
- return;
- }
- var cloneStr=JSON.stringify(vm.deteType);
- var url = vm.deteType.id == null ? "deteType/save" : "deteType/update";
- var method = vm.deteType.id == null ? "POST" : "PUT";
-
- //处理json数据
- vm.formatDeteTypeToSimple();
-
-
- $.ajax({
- type: method,
- url: baseURL + url,
- contentType: "application/json",
- data: JSON.stringify(vm.deteType),
- success: function (r) {
- if (r.code === 200) {
- alert('<@spring.message "common.success"/>', function (index) {
- vm.reload();
- });
- } else {
- var cloneObj=eval("(" + cloneStr + ")");
- vm.deteType=cloneObj;
- alert(r.msg);
- }
- }
- });
-
-
- },
- del: function (event) {
- var ids = getSelectedRows();
- if (ids == null) {
- return;
- }
- confirm("<@spring.message 'common.confirmDelete'/>", function () {
- $.ajax({
- type: "DELETE",
- url: baseURL + "/deteType/delete",
- contentType: "application/json",
- data: JSON.stringify(ids),
- success: function (r) {
- if (r.code == 200) {
- alert('<@spring.message "common.success"/>', function (index) {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
-
- })
- },
- validate: function () {//提交时的校验
- var metaFlag = false;
- var paramFlag = false;
- for (var i = 0; i < vm.validation.meta.length; i++) {
- if (vm.validation.meta[i]) {
- metaFlag = true;
- break;
- }
- }
-
- for (var i = 0; i < vm.validation.param.length; i++) {
- if (vm.validation.param[i]) {
- paramFlag = true;
- break;
- }
- }
- // vm.$v.deteType.name.$touch();
- // vm.$v.deteType.method.$touch();
- // vm.$v.deteType.deteInterval.$touch();
- // vm.$v.deteType.content.$touch();
- // vm.$v.deteType.i18nCode.$touch();
- // vm.$v.deteType.remark.$touch();
- // /*遍历touch 对数组调用touch会栈溢出*/
- // for (var i = 0; i < vm.$v.deteType.deteTypeMetas.length; i++) {
- //
- // vm.$v.deteType.deteTypeMetas.$each[i].$touch();
- // }
- //
- // for (var i = 0; i < vm.$v.deteType.deteTypeParams.length; i++) {
- // vm.$v.deteType.deteTypeParams.$each[i].$touch();
- // }
- vm.$v.deteType.$touch();
- return vm.$v.deteType.$error || metaFlag || paramFlag;
- },
- getDeteMethod: function () {
- $.getJSON(baseURL + "sys/dict/all?type=dtmethond&_" + $.now(), function (r) {
- var deteMethods = [];
- var deteMethodsArr = [];
- for (var i = 0; i < r.data.length; i++) {
- if (r.data[i].code == 3) { //跳过“内置”类型
- continue;
- }
- var m = {"code": r.data[i].code, "value": r.data[i].value}
- deteMethods.push(m);
- deteMethodsArr.push(r.data[i].value);
- if ("1" == r.data[i].code) { //默认为脚本
- vm.deteMethod = m;
- }
- }
- vm.deteMethods = deteMethods;
- vm.deteMethodsArr = deteMethodsArr;
- });
- },
- getFieldTypes: function () {
- $.getJSON(baseURL + "sys/dict/all?type=fieldType&_" + $.now(), function (r) {
- for (var i = 0; i < r.data.length; i++) {
- var m = {"code": r.data[i].code, "value": r.data[i].value}
- vm.fieldTypes.push(m);
- }
- });
- },
- getDataTypes: function () {
- $.getJSON(baseURL + "sys/dict/all?type=dataType&_" + $.now(), function (r) {
- for (var i = 0; i < r.data.length; i++) {
- var m = {"code": r.data[i].code, "value": r.data[i].value}
- vm.dataTypes.push(m);
- }
- });
- },
- getDicTypes: function () {
- $.getJSON(baseURL + "deteType/dicList?limit=999&_" + $.now(), function (r) {
- for (var i = 0; i < r.data.list.length; i++) {
- vm.dicTypes.push(r.data.list[i].type);
- vm.dicTypess.push(r.data.list[i]);
- }
- });
- },
- preStep: function () {
- this.curStep -= 1;
- if (this.curStep <= 0) {
- $("#preStep")[0].disabled = true;
- $("#nextStep")[0].disabled=false;
-
- }else if((0<this.curStep && this.curStep<steps.length-1)){
- $("#nextStep")[0].disabled = false;
- $("#preStep")[0].disabled=false;
- }else {
- $("#preStep")[0].disabled = false;
- }
- },
- nextStep: function () {
- this.curStep += 1;
- if (this.curStep >= steps.length - 1) {
- $("#nextStep")[0].disabled = true;
- $("#preStep")[0].disabled=false;
- } else if(0<this.curStep && this.curStep<steps.length-1) {
- $("#nextStep")[0].disabled = false;
- $("#preStep")[0].disabled=false;
- }else{
- $("#nextStep")[0].disabled = false;
- }
- },
- addMetaView: function () {
- var mata = {
- id: null,
- name: '',
- fieldType: null,
- dataType: null,
- dataLenth: null,
- oid: '',
- unit: '',
- dicType: '',
- remark: '',
- delFlag: '0'
- }
- Vue.set(this.deteType.deteTypeMetas, this.metaCount, mata);
- this.metaCount += 1;
- },
- delMetaView: function (index) {
- if (this.deteType.deteTypeMetas[index].id == null) {
- Vue.delete(this.deteType.deteTypeMetas, index);
- this.metaCount -= 1;
- } else {
- this.deteType.deteTypeMetas[index].delFlag = '1';
- }
-
- },
- addParamView: function () {
- var param = {
- id: null,
- name: '',
- defVal: '',
- remark: '',
- delFlag: '0'
- }
-
-
- Vue.set(this.deteType.deteTypeParams, this.paramCount, param);
- this.paramCount += 1;
- },
- delParamView: function (index) {
- if (this.deteType.deteTypeParams[index].id == null) {
- Vue.delete(this.deteType.deteTypeParams, index);
- this.paramCount -= 1;
- } else {
- this.deteType.deteTypeParams[index].delFlag = '1';
- }
- },
- formatDeteTypeToSimple: function () {
- $.each(vm.deteType.deteTypeMetas, function (i, v) {
- vm.deteType.deteTypeMetas[i].fieldType = v.fieldType.code;
- vm.deteType.deteTypeMetas[i].dataType = v.dataType.code;
- });
- },
- formatDeteTypeToObject: function () {
- $.each(vm.deteType.deteTypeMetas, function (index, value) {
- for (var i = 0; i < vm.fieldTypes.length; i++) {
- if (vm.fieldTypes[i].code == value.fieldType) {
- vm.deteType.deteTypeMetas[index].fieldType = vm.fieldTypes[i];
- }
- }
-
- for (var i = 0; i < vm.dataTypes.length; i++) {
- if (vm.dataTypes[i].code == value.dataType) {
- vm.deteType.deteTypeMetas[index].dataType = vm.dataTypes[i];
- }
- }
- });
- },
- metaNameRepeat: function (index) {
- var name = vm.deteType.deteTypeMetas[index].name;
- if (name == null || name == "") {
- return;
- }
- var flag = false;
- for (var i = 0; i < vm.deteType.deteTypeMetas.length; i++) {
- if (index == i) {
- continue;
- }
- var tempName = vm.deteType.deteTypeMetas[i].name;
-
- if (name == tempName) {
- flag = true;
- vm.validation.meta[index] = flag;
- return;
- }
- flag = false;
- }
- vm.validation.meta[index] = flag;
- },
- paramNameRepeat: function (index) {
- var name = vm.deteType.deteTypeParams[index].name;
- if (name == null || name == "") {
- return;
- }
- var flag = false;
- for (var i = 0; i < vm.deteType.deteTypeParams.length; i++) {
- if (index == i) {
- continue;
- }
- var tempName = vm.deteType.deteTypeParams[i].name;
-
- if (name == tempName) {
- flag = true;
- vm.validation.param[index] = flag;
- return;
- }
- flag = false;
- }
- vm.validation.param[index] = flag;
- },
- openMetaWindow: function(metaId) {
- var index = layer.open({
- area: ['600px', '100%'],
- shade: 0.02,
- title: "元数据",
- type: 1,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $("#metaWindow"),
- success:function(){
-
- }
- });
- },
- delMeta: function(event) {
- //这里可以改用vue来控制
- $(event.currentTarget).css("display", "none")
- $(event.currentTarget).next().css("display", "inline-block");
- $(".meta-detail").css("color", "lightgray");
- $(".test").css("text-decoration", "line-through");
- $(".meta-detail .btn-primary").prop("disabled", true);
- },
- recMeta: function(event) {
- $(event.currentTarget).css("display", "none")
- $(event.currentTarget).prev().css("display", "inline-block");
- $(".meta-detail").css("color", "#333333");
- $(".test").css("text-decoration", "none");
- $(".meta-detail .btn-primary").prop("disabled", false);
- },
- addMeta: function() {
- $(".meta-win_item").removeClass("meta-win_item_active");
- var hhh = '<div class="meta-win_item meta-win_item_active">' +
- '<div style="font-size:14px;line-height:30px;">随输入名称联动改变</div>' +
- '<span style="color: red;position:absolute;top:2px;left:2px;" class="myicon-new"></span>' +
- '<div style="text-align:right;"><span class="add-box_tag1"></span><span class="add-box_tag2"></span></div>' +
- '</div>'
- $(event.currentTarget).parent().before(hhh);
- },
- tttat: function(id) {
- layer.open({
- type: 4,
- content: [$("#items" + id).html(), "#position"+id],
- tips: [4, "#41B883"],
- closeBtn: 0,
- shade: 0
- })
- },
- tttbt: function(){
- layer.closeAll("tips");
- }
- },
- watch: {
- deteMethod: function () {
- this.deteType.method = this.deteMethod.code;
- },
- curStep: function () {
- this.title = steps[this.curStep]
- if(this.curStep==0){
- $("#preStep")[0].disabled=true;
- $("#nextStep")[0].disabled=false;
- }
- }
-
- }
-});
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/detect/deteWarn.js b/nezha-admin/src/main/resources/templates/js/modules/detect/deteWarn.js
deleted file mode 100644
index ea1f1cb5..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/detect/deteWarn.js
+++ /dev/null
@@ -1,798 +0,0 @@
-<script>
-var nameRepeat = function (name, deteWarn) {
- if (helpers.req(name) && helpers.req(deteWarn)) {
- var params = "?name=" + name;
- if (deteWarn.id) {
- params += "&id=" + deteWarn.id;
- }
- var flag = true;
- $.ajax({
- type: "get",
- url: baseURL + "/deteWarn/nameCheck" + params,
- async: false, //关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-
-}
-var warnComponet = Vue.extend({
- template:"#warnWindow",
- components:{
- 'nz-table':rTable,
- "nz-fileupload":fileUpload
- },
- props:{
- cap:{
- type:String,
- required:true
- },
- setId:{
- type:Number,
- required:true
- },
- closeAllTab:{
- type:Function
- }
- // parentColLen:{
- // type:Number,
- // required:true
- // }
- },
- data: function(){
- var temp=this;
- return {
- single:true,
- multi:true,
- setWarns:[],
- setDetail:{},
- state:2,//1,告警个数 2,告警列表 3,编辑告警
- counter:0,
- colModel:[
- {name: "<@spring.message 'common.name'/>", field: "name", width: 120},
- {name: "<@spring.message 'deteWarn.warnLevel'/>", field: "warnLevel", width: 120,formatter:function(rowData){
- for (let index in temp.warnLevels){
- var warnLevel=temp.warnLevels[index];
- if(rowData.warnLevel==warnLevel.code){
- return warnLevel.value;
- }
- }
- return 'undefinded';
- }},
- {name: "<@spring.message 'detect.triggerType'/>", field: "triggerType", width: 120,formatter:function(rowData){
- for (let index in temp.triggerTypes){
- var triggerType=temp.triggerTypes[index];
- if(rowData.triggerType==triggerType.code){
- return triggerType.value;
- }
- }
- return 'undefinded';
- }},
- {name: "<@spring.message 'detect.warnMode'/>", field: "warnMode", width: 120,formatter:function(rowData){
- for (let index in temp.warnModes){
- var warnMode=temp.warnModes[index];
- if(rowData.warnMode==warnMode.code){
- return warnMode.value;
- }
- }
- return 'undefinded';
- }},
- {name: "<@spring.message 'deteWarn.callbackType'/>", field: "callbackType", width: 120,formatter:function(rowData){
- for (let index in temp.callbackTypes){
- var callbackType=temp.callbackTypes[index];
- if(rowData.callbackType==callbackType.code){
- return callbackType.value;
- }
- }
- return 'undefinded';
- }},
-
- {name: "<@spring.message 'common.opTime'/>", field: "opTime", width: 240},
- {name: "<@spring.message 'common.remark'/>", field: "remark", width: 240}
- ],
- headSpan:'warn-span-',
- headSpanSelector:'',
- bodyTab:'warn-tab-',
- bodyTabSelector:'',
- footDiv:'warn-div-',
- footDivSelector:'',
- overcoat:'',
- selectedWarns:[],
- deteWarn:{
- id:null,
- name:'',
- deteTypeId:null,
- deteSetIds:[],
- metaId:'',
- triggerType:'',
- warnMode:'',
- statType:'',
- symbol:'',
- threshold:'',
- tips:'',
- warnLevel:'',
- callbackType:'0',
- callbackContent:'',
- tempCallbackContent:'',//解决更新操作时,回调方式从脚本改为http的回显问题
- viewLevel:'',
- remark:''
- },
- deteMetas:[],
- triggerTypes:[],
- defaultTrigger:{},
- warnModes:[],
- defaultWarnMode:{},
- statTypes:[],
- defaultStatType:{},
- symbols:[],
- defaultSymbol:{},
- warnLevels:[],
- defaultWarnLevel:{},
- callbackTypes:[],
- defaultCallbackType:{},
- viewLevels:[],
- defaultViewLevel:{},
- uploadReset:true,
- file:null,
- acceptFile:".sh",
- hasOldFile:false,
- oldFile:{
- filePath:'',
- remark:'No File'
- }
- }
-
- },
- created: function () {
- this.initData();
- },
- validations:function() {
- var temp=this;
- var validate={
- name:{
- required,
- nameRepeat
- },
- tips:{
- required,
- },
- metaId:{
- required
- },
- threshold:{},
- callbackType:{},
- callbackContent:{},
- remark:{}
- }
- if(typeof temp.defaultTrigger!='undefined' && temp.defaultTrigger.code=='1'){
- validate.threshold={required}
- }
- if(typeof temp.deteWarn!='undefined' && typeof temp.deteWarn.callbackType!='undefined'&&temp.deteWarn.callbackType=='2'){
- validate.tempCallbackContent={required};
- }
- return {
- deteWarn:validate
- }
- },
- methods: {
- initData:function(){
- var temp=this;
- temp.loadWarns();
- temp.loadSetDetail();
- temp.loadTriggerTypes();
- temp.loadWarnModes();
- temp.loadStateTypes();
- temp.loadSymbols();
- temp.loadWarnLevels();
- temp.loadCallbackTypes();
- temp.loadViewLevels();
- },
- initDom:function(){
- var temp=this;
- temp.headSpanSelector='#'+temp.headSpan+temp.setId;
- temp.bodyTabSelector='#'+temp.bodyTab+temp.setId;
-
- $("#"+temp.cap).append($(temp.headSpanSelector));
- $(temp.headSpanSelector).bind('click',temp.clickSelf)
- $(temp.headSpanSelector).bind('mouseover',temp.mouseOverSelf)
- $(temp.headSpanSelector).bind('mouseout',temp.mouseOutSelf)
-
- var parentTr=$("#"+temp.cap).parents('tr');
- var colSpan=parentTr.children('td').length;
- temp.overcoat='constom-td-'+temp.setId;
- var emptyTr='<tr><td colspan="'+colSpan+'" id="'+temp.overcoat+'"></td></tr>';
- parentTr.after($(emptyTr))
-
- $("#"+temp.overcoat).append($(temp.bodyTabSelector));
- temp.tabUp();
-
- temp.footDivSelector='#'+temp.footDiv+temp.setId;
-
- },
- reset:function(){
- var temp=this;
- temp.deteWarn={
- name:'',
- deteTypeId:this.setDetail.type.id,
- deteSetIds:[this.setId],
- metaId:'',
- triggerType:'',
- warnMode:'',
- statType:'',
- symbol:'',
- threshold:'',
- tips:'',
- warnLevel:'',
- callbackType:'0',
- callbackContent:'',
- tempCallbackContent:'',
- viewLevel:'',
- remark:''
- }
- temp.$v.deteWarn.$reset();
- temp.setDefaultValue();
- },
- loadWarns:function(){
- var temp=this;
- $.ajax({
- url: baseURL + "/deteWarn/list?setId="+temp.setId,
- type:'get',
- sync:false,
- timeout:10000,
- beforeSend:function(XMLHttpRequest){
- },
- success:function(data,textStatus){
- temp.setWarns=data.data.list;
- },
- error:function(XMLHttpRequest,textStatus,errorThrown){
- }
- })
- },
- loadSetDetail:function(){
- var temp=this;
- $.ajax({
- url: baseURL + "/deteSet/detail?id="+temp.setId,
- type:'get',
- sync:false,
- timeout:10000,
- success:function(data,textStatus){
- temp.setDetail=data.data;
- temp.loadDeteMetas();
- }
- })
- },
- mouseOverSelf:function(){
- var temp=this;
- $("#"+temp.cap).get(0).style.cursor='pointer'
- },
- mouseOutSelf:function(){
- var temp=this;
- $("#"+temp.cap).get(0).style.cursor='default'
- },
- clickSelf:function(event) {
- event.stopPropagation()
- var temp = this;
- if(temp.counter%2==1){
- temp.tabDown();
- }else{
- temp.tabUp();
- }
- },
- tabDown:function(){
- var temp=this;
- if(temp.state==1){
- temp.touchBrothor();
- temp.state=2;
- $("#"+temp.overcoat).parent().show();
- temp.counter++;
- }
-
- },
- tabUp:function(){
- var temp=this;
- if(temp.state==2){
- temp.state=1;
- $("#"+temp.overcoat).parent().hide();
- temp.counter++;
- }
-
- },
- touchBrothor:function(){
- this.closeAllTab();
- },
- loadDeteMetas: function () {
- var temp=this;
- $.ajax({
- url: baseURL + "deteType/detail?id=" + temp.setDetail.type.id,
- type:'get',
- sync:false,
- success:function(r){
- temp.deteMetas = r.data.deteTypeMetas;
- }
- })
- },
- loadTriggerTypes:function(){
- var temp=this;
- temp.triggerTypes=[];
- $.getJSON(baseURL + "sys/dict/all?type=triggerType&_" + $.now(), function (r) {
- for (let dic of r.data) {
- var m={
- code:dic.code,
- value:dic.value,
- }
- // if("1"==dic.code){
- // temp.defaultTrigger=m;
- // }
- temp.triggerTypes.push(m);
- }
- })
- },
- loadWarnModes:function(){
- var temp=this;
- temp.warnModes=[];
- $.getJSON(baseURL + "sys/dict/all?type=warnMode&_" + $.now(), function (r) {
- for (let dic of r.data) {
- var m={
- code:dic.code,
- value:dic.value,
- }
- // if("1"==dic.code){
- // temp.defaultWarnMode=m;
- // }
- temp.warnModes.push(m);
- }
- })
- },
- loadStateTypes:function(){
- var temp=this;
- temp.statTypes=[];
- $.getJSON(baseURL + "sys/dict/all?type=statType&_" + $.now(), function (r) {
- for (let dic of r.data) {
- var m={
- code:dic.code,
- value:dic.value,
- }
- // if("1"==dic.code){
- // temp.defaultStatType=m;
- // }
- temp.statTypes.push(m);
- }
- });
- },
- loadSymbols:function(){
- var temp=this;
- temp.symbols=[];
- $.getJSON(baseURL + "sys/dict/all?type=symbol&_" + $.now(), function (r) {
- for (let dic of r.data) {
- var m={
- code:dic.code,
- value:dic.value,
- }
- // if("1"==dic.code){
- // temp.defaultSymbol=m;
- // }
- temp.symbols.push(m);
- }
- });
- },
- loadWarnLevels:function(){
- var temp=this;
- temp.warnLevels=[];
- $.getJSON(baseURL + "sys/dict/all?type=warnLevel&_" + $.now(), function (r) {
- for (let dic of r.data) {
- var m={
- code:dic.code,
- value:dic.value,
- }
- // if("3"==dic.code){
- // temp.defaultWarnLevel=m;
- // }
- temp.warnLevels.push(m);
- }
- });
- },
- loadCallbackTypes:function(){
- var temp=this;
- temp.callbackTypes=[];
- $.getJSON(baseURL + "sys/dict/all?type=callbackType&_" + $.now(), function (r) {
- for (let dic of r.data) {
- var m={
- code:dic.code,
- value:dic.value,
- }
- // if("0"==dic.code){
- // temp.defaultCallbackType=m;
- // }
- temp.callbackTypes.push(m);
- }
- });
- },
- loadViewLevels:function(){
- var temp=this;
- temp.viewLevels=[];
- $.getJSON(baseURL + "sys/dict/all?type=viewLevel&_" + $.now(), function (r) {
- for (let dic of r.data) {
- var m={
- code:dic.code,
- value:dic.value,
- }
- // if("1"==dic.code){
- // temp.defaultViewLevel=m;
- // }
- temp.viewLevels.push(m);
- }
- });
- },
- setDefaultValue:function(){
- var temp=this;
- for (let m of temp.triggerTypes){
- if('1'==m.code){
- temp.defaultTrigger=m;
- }
- }
- for (let m of temp.warnModes){
- if('1'==m.code){
- temp.defaultWarnMode=m;
- }
- }
- for (let m of temp.statTypes){
- if('1'==m.code){
- temp.defaultStatType=m;
- }
- }
- for (let m of temp.symbols){
- if('1'==m.code){
- temp.defaultSymbol=m;
- }
- }
- for (let m of temp.warnLevels){
- if('3'==m.code){
- temp.defaultWarnLevel=m;
- }
- }
- for (let m of temp.callbackTypes){
- if('0'==m.code){
- temp.defaultCallbackType=m;
- }
- }
- for (let m of temp.viewLevels){
- if('1'==m.code){
- temp.defaultViewLevel=m;
- }
- }
-
- },
- add:function(){
- var temp=this;
- temp.reset();
- temp.openEditLayer();
- temp.resetFileUploadDom();
- },
- update:function(){
- var temp=this;
- temp.reset();
-
- temp.getWarnDetail();
-
- temp.openEditLayer();
- temp.resetFileUploadDom();
- },
- getWarnDetail:function(){
- var temp=this;
- var warn=temp.selectedWarns[0];
- $.ajax({
- type: 'get',
- url: baseURL + 'deteWarn/detail?id='+warn.id,
- contentType: "application/json",
- success: function (r) {
- if (r.code === 200) {
- temp.deteWarn=r.data;
- temp.formatDeteSetToObject()
- }
- }
- });
- },
- del:function(){
- var temp=this;
- var ids=[];
- for (let m of temp.selectedWarns){
- ids.push(m.id);
- }
- if(ids.length<1){
- return ;
- }
- confirm("<@spring.message 'common.confirmDelete'/>", function (index) {
- $.ajax({
- type: "DELETE",
- url: baseURL + "/deteWarn/delete",
- contentType: "application/json",
- data: JSON.stringify(ids),
- success: function (r) {
- if (r.code == 200) {
- alert('<@spring.message "common.success"/>', function (index) {
- temp.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
-
- })
- },
- saveOrUpdate:function(){
- var temp=this;
- if(temp.validate()){
- return ;
- }
- var cloneStr = JSON.stringify(temp.deteWarn);
-
- var url = temp.deteWarn.id == null ? "deteWarn/save" : "deteWarn/update";
- var method = temp.deteWarn.id == null ? "POST" : "PUT";
-
- //处理json数据
- temp.formatDeteSetToSimple();
-
- let formData=new FormData();
- formData.append('deteWarnInfo',JSON.stringify(temp.deteWarn));
- formData.append('file',temp.file);
-
- $.ajax({
- type: method,
- url: baseURL + url,
- contentType: false,
- processData:false,
- data: formData,
- success: function (r) {
- if (r.code === 200) {
- alert('<@spring.message "common.success"/>', function (index) {
- temp.reset();
- temp.reload();
- });
- } else {
- var cloneObj = eval("(" + cloneStr + ")");
- temp.deteWarn = cloneObj;
- alert(r.msg);
- }
- }
- });
-
- },
- reload:function(){
- layer.closeAll('page');
- this.loadWarns();
- },
- validate:function(){
- var temp=this;
- temp.$v.deteWarn.$touch();
- var warnScripError=false;
- var uploadComponet=temp.$refs.warnScriptUpload;
- if(typeof uploadComponet != 'undefined'){
- uploadComponet.touch();
- warnScripError=uploadComponet.error;
- }
- console.log(temp.$v.deteWarn.$error+"|"+warnScripError)
- return temp.$v.deteWarn.$error||warnScripError;
- },
- formatDeteSetToSimple:function(){
- var temp=this;
- temp.deteWarn.metaId=temp.deteWarn.metaId.id;
- temp.deteWarn.warnMode=temp.defaultWarnMode.code;
- if(temp.defaultWarnMode.code=='2'){
- console.log('statType-->'+temp.defaultStatType.code)
- temp.deteWarn.statType=temp.defaultStatType.code;
- }
-
- temp.deteWarn.triggerType=temp.defaultTrigger.code;
- if(temp.defaultTrigger.code=='1'){//阈值触发
- temp.deteWarn.symbol=temp.defaultSymbol.code;
- }
-
- temp.deteWarn.warnLevel=temp.defaultWarnLevel.code;
-
- temp.deteWarn.callbackContent=temp.deteWarn.tempCallbackContent;
- },
- formatDeteSetToObject:function(){
- var temp=this;
- for (let m of temp.deteMetas){
- console.log(temp.deteWarn)
- if(temp.deteWarn.metaId==m.id){
- temp.deteWarn.metaId=m;
- }
- }
- for (let m of temp.triggerTypes){
- if(temp.deteWarn.triggerType==m.code){
- temp.defaultTrigger=m;
- }
- }
- for (let m of temp.warnModes){
- if(temp.deteWarn.warnMode==m.code){
- temp.defaultWarnMode=m;
- }
- }
- for (let m of temp.statTypes){
- if(temp.deteWarn.statType==m.code){
- temp.defaultStatType=m;
- }
- }
- for (let m of temp.symbols){
- if(temp.deteWarn.symbol==m.code){
- temp.defaultSymbol=m;
- }
- }
- for (let m of temp.warnLevels){
- if(temp.deteWarn.warnLevel==m.code){
- temp.defaultWarnLevel=m;
- }
- }
- for (let m of temp.callbackTypes){
- if(temp.deteWarn.callbackType==m.code){
- temp.defaultCallbackType=m;
- }
- }
- for (let m of temp.viewLevels){
- if(temp.deteWarn.viewLevel==m.code){
- temp.defaultViewLevel=m;
- }
- }
-
- if(temp.deteWarn.callbackType=='1'){
- temp.hasOldFile=true;
- if(typeof temp.deteWarn.callbackContent != 'undefined'&&temp.deteWarn.callbackContent!=null&&temp.deteWarn.callbackContent!=''){
- try {
- var file=JSON.parse(temp.deteWarn.callbackContent);
- temp.oldFile.filePath=file.filePath;
- temp.oldFile.remark=file.fileName;
- }catch (e) {
- temp.oldFile.filePath='';
- temp.oldFile.remark='No File';
- }
-
- }else{
- temp.oldFile.filePath='';
- temp.oldFile.remark='No File';
- }
- }else{
- temp.hasOldFile=false;
- temp.oldFile.filePath='';
- temp.oldFile.remark='No File';
- }
- if(temp.deteWarn.callbackType=='2'){
- temp.deteWarn.tempCallbackContent=temp.deteWarn.callbackContent;
- }
-
- },
- getSelectDatas:function(selected,unselected){
- var temp=this;
- temp.selectedWarns=selected;
- },
-
- openEditLayer:function(){
- var temp=this;
- var title=temp.setDetail.type.name+" > "+temp.setDetail.name+" > <@spring.message 'deteWarn'/>";
- var index = layer.open({
- area: ['550px', '100%'],
- shade: 0.01,
- title: title,
- type: 1,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $(temp.footDivSelector),
- zIndex: layer.zIndex,
- success: function(layero,index){
-
- },
- cancel:function(){
-
- },
- end: function() {
- $("html").css("overflow-y", "hidden");
- }
- });
- },
- resetFileUploadDom:function(){
- var temp = this;
- temp.uploadReset = false;
- temp.$nextTick(() => {
- temp.uploadReset = true
- });
- },
- destoryUploadComponet:function(){
- this.file=null;
- // this.acceptFile=".sh";
- // this.hasOldFile=false;
- // this.oldFile={
- // filePath:'',
- // remark:'No File'
- // }
- }
- },
- watch:{
- selectedWarns:function(){
- var temp=this;
- if(temp.selectedWarns.length>0){
- temp.multi=false;
- temp.single=false;
- if(temp.selectedWarns.length>1){
- temp.single=true;
- }
- }else{
- temp.multi=true;
- temp.single=true;
- }
- }
- // viewers:{
- // handler(){
- // },
- // deep:true
- // }
- },
- mounted() {
- this.initDom();
- }
-
-})
-
-var warnComponets=Vue.extend({
- template:'#warnWindows',
- props:{
-
- },
- components:{
- 'nz-warn':warnComponet,
- },
- data:function(){
- return {
- containerInfos:new Map(),
- multi:true
- }
- },
- created: function () {
- var temp=this;
- temp.init();
- },
- validations: {
-
- },
- methods: {
- init:function(){
- var temp=this;
- $(".td-warn-win").each(function(index,e){
- var setId=parseInt($(e).attr('setId'));
- var id=$(e).attr('id');
- temp.containerInfos.set(id,setId);
- });
- },
- closeTabs:function(){
- var temp=this;
- var componets=temp.$refs.nzwarn;
- for (let componet of componets){
- componet.tabUp();
- }
- }
- },
- watch:{
- // viewers:{
- // handler(){
- // },
- // deep:true
- // }
- },
- mounted() {
-
- }
- })
-
-
-
- </script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/detect/main.js b/nezha-admin/src/main/resources/templates/js/modules/detect/main.js
deleted file mode 100644
index 13e6d345..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/detect/main.js
+++ /dev/null
@@ -1,83 +0,0 @@
-<script>
-//注册select组件
-Vue.component('multiselect', window.VueMultiselect.default);
-//引用vuelidate组件
-Vue.use(window.vuelidate.default);
-//引用校验规则 所有校验规则见 https://vuelidate.netlify.com/#sub-v-values
-var required = window.validators.required;
-var helpers = window.validators.helpers;
-var integer = window.validators.integer;
-
-Vue.component("label-input",{
- template:"#labelInput",
- props:{
- defVal: {
- type: String
- },
- label:{
- type:String
- },
- value:{
- type:String
- }
- }
-
-});
-
-function getSysDicArr(dtype){
- var container=[];
- $.ajax({
- url:baseURL+"sys/dict/all?type="+dtype+"&_" + $.now(),
- async:false,
- type:"GET",
- success:function(r){
- for (var i = 0; i < r.data.length; i++) {
- var m = {"code": r.data[i].code, "value": r.data[i].value}
- container.push(m.value);
- }
- },
- error : function(result) {
- console.error("error-->"+JSON.stringify(result));
- }
- })
- return container;
-}
-
-function getSysDicMap(dtype){
- var container=[];
- $.ajax({
- url:baseURL+"sys/dict/all?type="+dtype+"&_" + $.now(),
- async:false,
- type:"GET",
- success:function(r){
- for (var i = 0; i < r.data.length; i++) {
- var m = {"code": r.data[i].code, "value": r.data[i].value}
- container.push(m);
- }
- },
- error : function(result) {
- console.error("error-->"+JSON.stringify(result));
- }
- })
- return container;
-}
-
-function printNodeGroupName (nodeGroup){
- var fullPath="";
- var func=function(nodeGroup){
- var pid=nodeGroup.pid;
- if(pid != 0){
- $.each(vm.nodeGroups,function(i,v){
- if(pid == v.id){
- fullPath += printNodeGroupName(v)+"/"+nodeGroup.name;
- }
- })
- }else{
- fullPath+=nodeGroup.name;
- }
-
- }
- func(nodeGroup);
- return fullPath;
-}
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/detect/metaMapping.js b/nezha-admin/src/main/resources/templates/js/modules/detect/metaMapping.js
deleted file mode 100644
index 6b617c01..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/detect/metaMapping.js
+++ /dev/null
@@ -1,597 +0,0 @@
-<script >
-$(function () {
- $("#jqGrid").jqGrid({
- url: baseURL + 'deteType/dicList',
- datatype: "json",
- colModel: [
- {label: 'ID', name: 'id', width: 30, key: true, hidden: true,},
- {
- label: '<@spring.message "metaMapping.type"/>',
- name: 'type',
- sortable: true,
- width: 60,
- // cellattr: function(rowId, tv, rawObject, cm, rdata) {
- // //合并单元格
- // return 'id=\'type' + rowId + "\'";
- // //if (Number(rowId) < 5) { return ' colspan=2' }
- // }
- },
- {
- label: '<@spring.message "metaMapping.key"/>',
- name: 'val',
- sortable: false,
- width: 100,
- formatter: function (value, options, rowData) {
- return spliteTable(rowData.mappings, "val")
-
- }
- },
- {
- label: '<@spring.message "metaMapping.val"/>',
- name: 'mapping',
- sortable: false,
- width: 100,
- formatter: function (value, options, rowData) {
- return spliteTable(rowData.mappings, "mapping")
- }
- },
- ],
- viewrecords: true,
- height: top.$(".content").height() - 130,
- rowNum: 15,
- rowList: [15, 30, 50],
- rownumbers: true,
- rownumWidth: 25,
- autowidth: true,
- multiselect: true,
- pager: "#jqGridPager",
- jsonReader: {
- root: "data.list",
- page: "data.currPage",
- total: "data.totalPage",
- records: "data.totalCount"
- },
- prmNames: {
- page: "page",
- rows: "limit",
- order: "order"
- },
- gridComplete: function () {
- //隐藏grid底部滚动条
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
- // var gridName = "jqGrid";
- // Merger(gridName, 'type');
- },
- onSelectAll: function (rowids, status) {
- if (status) {
- toolsBtnHandle();
- }
- },
- onSelectRow: function (rowid, status) {
- toolsBtnHandle();
- }
- });
-});
-
-
-var typeRepeat = function (type, metaMappings) {
- if (helpers.req(type) && helpers.req(metaMappings)) {
- var params = "?type=" + type;
- var flag = true;
- $.ajax({
- type: "get",
- url: baseURL + "/deteType/dicNameCheck" + params,
- async: false, //关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-
-}
-var vm = new Vue({
- el: "#metaMapping",
- data: {
- single: true,
- multi: true,
- showList: true,
- params: {
- type: '',
- },
- title: '<@spring.message "deteTypeMeta"/>',
- metaMappings: {
- type: '',
- mappings: []
- },
- hackReset: true,
- newMapping: false,//true 添加操作 false 更新操作
- mappingDirty: false,
- mappingRequired: true
- },
- created: function () {
-
- },
- validations: function () {
- let temp = this;
- if (temp.newMapping) {
- return {
- metaMappings: {
- type: {
- required,
- typeRepeat
- }
- }
- }
- } else {
- return {
- metaMappings: {
- type: {
- required
- }
- }
- }
- }
-
- },
- methods: {
- reset: function () {
- var temp = this;
- temp.$v.metaMappings.$reset();
- temp.metaMappings = {
- type: '',
- mappings: []
- }
- temp.newMapping = false;
- temp.mappingDirty = false;
- temp.mappingRequired = true;
- },
- query: function () {
- vm.showList = true;
- var page = $("#jqGrid").jqGrid('getGridParam', 'page');
- $("#jqGrid").jqGrid('setGridParam', {
- postData: {'type': vm.params.type},
- page: 1
- }).trigger("reloadGrid");
- },
- reload: function () {
- vm.query();
- },
- add: function () {
- vm.showList = false;
- hackReset();
- vm.reset();
- vm.newMapping = true;
- vm.addMapping();
- $("#saveOrUpdate").unbind('click').bind('click',this.save)
- },
- toUpdate: function () {
- var type = getSelectedType();
- if (type == null) {
- return;
- }
- vm.reset();
- vm.getInfo(type);
- vm.showList = false;
- vm.newMapping = false;
- hackReset();
- $("#saveOrUpdate").unbind('click').bind('click',this.update)
- },
- getInfo: function (type) {
- $.ajax({
- url: baseURL + "/deteType/dicList?type=" + type,
- type: "GET",
- async: false,
- success: function (r) {
- vm.metaMappings = r.data.list[0];
- }
- });
- },
- save: function () {
- if (vm.validate()) { //在下方定义的validate方法
- return;
- }
- var url = "deteType/saveDic";
- var method = "POST";
- vm.saveOrUpdate(url, method);
- },
- update: function () {
- if (vm.validate()) { //在下方定义的validate方法
- return;
- }
- var url = "deteType/updateDic";
- var method = "PUT";
- vm.saveOrUpdate(url, method);
- },
- saveOrUpdate: function (url, method) {
-
- $.ajax({
- type: method,
- url: baseURL + url,
- contentType: "application/json",
- data: JSON.stringify(vm.metaMappings),
- success: function (r) {
- if (r.code === 200) {
- alert('<@spring.message "common.success"/>', function (index) {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- },
- del: function (event) {
- var types = getSelectedTypes();
- if (types == null) {
- return;
- }
- confirm("<@spring.message 'common.confirmDelete'/>", function () {
- $.ajax({
- url: baseURL + "/deteType/deleteDic",
- type: "DELETE",
- datatype: "JSON",
- data: JSON.stringify(types),
- contentType: "application/json",
- async: false,
- success: function (r) {
- if (r.code === 200) {
- alert('<@spring.message "common.success"/>', function (index) {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- })
-
- },
- validate: function () {//提交时的校验
- vm.touchMappings();
- var elementError = false;
- var componets = vm.$refs.metaMapping;
- if (typeof componets != 'undefined' && componets.length > 0) {
-
- for (var i = 0; i < componets.length; i++) {
- var componet = componets[i];
- if (componet.validate()) {
- elementError = true;
- break;
- }
- }
-
- } else {
- vm.mappingRequired = false;
- elementError = true;
- }
- return vm.$v.metaMappings.$error || elementError;
- },
- formatmetaMappingToSimple: function () {
-
- },
- formatmetaMappingToObject: function () {
-
- },
- touchMappings: function () {
- let temp = this;
- temp.$v.metaMappings.$touch();
- temp.mappingDirty = true;
- },
- addMapping: function () {
- var temp = this;
- temp.mappingDirty = true;
-
- var mappingLen = temp.metaMappings.mappings.length;
- if (mappingLen > 0) {
- for (var i = 0; i < mappingLen; i++) {
- temp.$refs['metaMapping'][i].submitSelf();
- if (temp.$refs['metaMapping'][i].$v.metaMapping.$error) {
- return;
- }
- }
- }
- var mapping = {
- id: null,
- type: '',
- val: '',
- mapping: '',
- delFlag: '0',
- new: true,
- isEdited: false
- }
- this.metaMappings.mappings.push(mapping);
-
- },
- delMapping: function (index) {
- var mapping = this.metaMappings.mappings[index];
- this.metaMappings.mappings.splice(index, 1);
- }
- },
- watch: {
- 'metaMappings.mappings': function () {
- var temp = this;
- var mappings = temp.metaMappings.mappings;
- if (mappings.length < 1) {
- temp.mappingRequired = false;
- } else {
- temp.mappingRequired = true;
- }
- }
- },
- mounted() {
-
- }
-})
-
-
-function spliteTable(array, field) {
- var showDiv = "<table class='costomTable' width='100%'>";
- if (array.length == 1) {
- showDiv += "<tr><td>" + array[0][field] + "</td></tr>"
-
- } else {
- $.each(array, function (i, v) {
- if (i == 0) {
- showDiv += "<tr><td style='border-bottom: 1px solid #ddd;padding:0px 2px 8px 8px;'>" + v[field] + "</td></tr>"
- } else if (i == array.length - 1) {
- showDiv += "<tr><td style='padding:8px 2px 0px 8px'>" + v[field] + "</td></tr>"
- } else {
- showDiv += "<tr><td style='border-bottom: 1px solid #ddd;padding:8px 2px 8px 8px;'>" + v[field] + "</td></tr>"
- }
- })
- }
- showDiv += "</table>"
- return showDiv;
-
-}
-
-
-function hackReset() {
- vm.hackReset = false //解决删除后子组件不刷新问题,利用v-if会销毁dom重新渲染的机制,强制刷新子组件
- vm.$nextTick(() => {
- vm.hackReset = true
- });
-}
-
-function getSelectedType() {
- var grid = $("#jqGrid");
- var rowKey = grid.getGridParam("selrow");
- if (!rowKey) {
- alert("<@spring.message 'common.selectOne'/>");
- return;
- }
-
- var selectedIDs = grid.getGridParam("selarrrow");
- if (selectedIDs.length > 1) {
- alert("<@spring.message 'common.onlySelectOne'/>");
- return;
- }
- var rowData = grid.jqGrid('getRowData', selectedIDs[0]);
- return rowData.type;
-}
-
-function getSelectedTypes() {
- var grid = $("#jqGrid");
- var rowKey = grid.getGridParam("selrow");
- if (!rowKey) {
- alert("<@spring.message 'common.selectOne'/>");
- return;
- }
-
- var selectedIDs = grid.getGridParam("selarrrow");
- var types = [];
- for (let i in selectedIDs) {
- var rowData = grid.jqGrid('getRowData', selectedIDs[i]);
- types.push(rowData.type);
- }
-
- return types;
-}
-
-var inPageValRepeat = function (mappings, index) {
- return helpers.withParams({type: inPageValRepeat}, function (value) {
- if (helpers.req(value)) {
- for (let i in mappings) {
- if (i != index) {
- var mapping = mappings[i];
- if (helpers.req(mapping.val)) {
- if (mapping.val == value) {
- return false;
- }
- }
-
- }
- }
- }
- return true;
- })
-}
-var inPageMappingRepeat = function (mappings, index) {
- return helpers.withParams({type: inPageMappingRepeat}, function (value) {
- if (helpers.req(value)) {
- for (let i in mappings) {
- if (i != index) {
- var mapping = mappings[i];
- if (helpers.req(mapping.mapping)) {
- if (mapping.mapping == value) {
- return false;
- }
- }
-
- }
- }
- }
- return true;
- })
-}
-Vue.component("meta-mapping", {
- template: "#metaTemplate",
- props: {
- metaMapping: {
- type: Object,
- required: true
- },
- metaMappings: {
- type: Array,
- required: true
- },
- index: {
- type: Number,
- required: true
- }
- },
- data: function () {
- return {
- editSwitch: false,
- listPreKey: 'r-mapping-view',
- lsitDom: null,
- editPreKey: 'r-mapping-edit',
- editDom: null,
- }
- },
- create: function () {
-
- },
- validations: function () {
- let temp = this;
- return {
- metaMapping: {
- val: {
- required,
- inPageValRepeat: inPageValRepeat(temp.metaMappings, temp.index)
- },
- mapping: {
- required,
- inPageMappingRepeat: inPageMappingRepeat(temp.metaMappings, temp.index)
- }
- }
- }
-
- },
- methods: {
- init: function () {
- var temp = this;
- temp.listSelector = "#" + temp.listPreKey + "-" + temp.index;
- temp.editSelector = "#" + temp.editPreKey + "-" + temp.index;
- temp.listDom = $(temp.listSelector);
- temp.editDom = $(temp.editSelector);
- if (typeof temp.metaMapping.new != 'undefined' && temp.metaMapping.new != null && !temp.metaMapping.isEdited) {
- temp.editSwitch = true;
- }
- },
- editSelf: function () {
- var temp = this;
-
- if (temp.metaMapping.delFlag == '0') {
- temp.editSwitch = true;
- } else {
- return false;
- }
-
- },
- delSelf: function (e) {
- var temp = this;
- var p = temp.metaMapping;
- if (typeof p.new != 'undefined' && p.new != null && p.new) {
- temp.$emit("del-mapping", this.index);
- } else {
- $("#add-box_op_edit_" + temp.index).bind('mouseover', function (event) {
- event.target.style.cursor = 'not-allowed';
- });
- p.delFlag = '1';
- }
-
- },
- recSelf: function (e) {
- var temp = this;
- temp.listDom.removeClass('text-disabled');
- $("#add-box_op_edit_" + temp.index).bind('mouseover', function (event) {
- event.target.style.cursor = 'pointer';
- });
- temp.metaMapping.delFlag = '0';
- },
- submitSelf: function () {
- var temp = this;
-
- if (temp.validate()) {
- temp.showValWarningMsg();
- temp.showMappingWarningMsg();
- return;
- }
-
- temp.editSwitch = false;
- temp.metaMapping.isEdited = true;
-
- },
- validate: function () {
- this.$v.metaMapping.$touch();
- return this.$v.metaMapping.$error;
- },
- showValWarningMsg: function () {
- var temp = this;
- if (temp.$v.metaMapping.val.$anyError) {
- $("#r-mapping-val-input-" + temp.index).blur();
- var msg = '';
- if (temp.$v.metaMapping.val.$dirty && !temp.$v.metaMapping.val.required) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.required'/></div>"
- }
- if (temp.$v.metaMapping.val.$dirty && !temp.$v.metaMapping.val.inPageValRepeat) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.duplicate'/></div>"
- }
- if (temp.editSwitch) {
- layer.tips(msg, "#r-mapping-val-input-" + temp.index, {
- tips: [1, "white"],
- tipsMore: true
- });
- }
-
-
- }
-
- },
- showMappingWarningMsg: function () {
- var temp = this;
- if (temp.$v.metaMapping.mapping.$anyError) {
- $("#r-mapping-val-input-" + this.index).blur();
- var msg = '';
- if (temp.$v.metaMapping.mapping.$dirty && !temp.$v.metaMapping.mapping.required) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.required'/></div>"
- }
- if (temp.$v.metaMapping.mapping.$dirty && !temp.$v.metaMapping.mapping.inPageMappingRepeat) {
- msg = "<div class=\"form-control_error-msg\"><@spring.message 'validate.common.duplicate'/></div>"
- }
- if (temp.editSwitch) {
- layer.tips(msg, "#r-mapping-mapping-input-" + temp.index, {
- tips: [1, "white"],
- tipsMore: true
- });
- }
-
- }
- }
- },
- mounted() {
- this.init();
- },
- watch: {
- "$v.metaMapping.val": {
- handler() {
- this.showValWarningMsg();
- },
- deep: true
- },
- "$v.metaMapping.mapping": {
- handler() {
- this.showMappingWarningMsg();
- },
- deep: true
- }
- }
-})
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/mission/filepush.js b/nezha-admin/src/main/resources/templates/js/modules/mission/filepush.js
deleted file mode 100644
index 4648c5cf..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/mission/filepush.js
+++ /dev/null
@@ -1,188 +0,0 @@
-<script>
-var filePushChild = Vue.extend({
- template: `
- <div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.path'/></div>
- <div class="col-sm-9">
- <input type="file" class="" name="file" @change="getFile($event)"></input>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" ><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
-
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.pushDestination'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.destPath"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"></div>
- </div>
- </div>
-
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.owner'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.username"/>
- </div>
- </div>
-
-
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.groups'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.groupName"/>
- </div>
- </div>
-
-
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.filePermissions'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.permisson"/>
- </div>
- </div>
-
-
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.overwrite'/></div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="param.isCover"/> <@spring.message 'mission.yes'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="param.isCover"/> <@spring.message 'mission.no'/>
- </label>
- </div>
- </div>
- <div class="form-group" v-show="items.length>1">
- <a class="btn btn-primary" @click="deleteparam" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- </div>
- `,
- props: {
- index: {
- type: Number,
- required: true
- },
- items: {
- type: Array,
- default: Array
- }
- },
- data : function () {
- return {
- param: {
- destPath: '',
- fileName: '',
- groupName:'',
- isCover:0,
- permisson:'',
- username:''
- }
- }
- },
- watch: {
- param: {
- handler (newV, oldV) {
- //这里加判断 如果输入框中没有填写内容贼不允许添加新的组件
- this.$emit('uploadData', {index: this.index, data: newV})
- },
- deep: true
- },
- items: {
- handler (newV, oldV) {
- if (newV.length !== 0) {
- this.param = {...newV[this.index]}
- }
- },
- deep: true
- }
- },
- methods: {
- deleteparam: function () {
- this.$emit('deleteIndex', this.index)
- },
- getFile:function(event){
- this.$emit('uploadFile',event,this.index)
- }
- },
- mounted:function(){
- this.param = {...this.items[this.index]}
- }
-})
-
-// 构建一个父组件
-var filePush = Vue.extend({
- template: `
- <div class="" >
- <filePushChild v-for="(item,index) in items"
- :key="index"
- :index="index"
- :items="items"
- @deleteIndex="del"
- @uploadData="getData"
- @uploadFile="getPushFile">
- </filePushChild>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- </div>
- `,
- data : function () {
- return {
- items: [{destPath: '',
- fileName: '',
- groupName:'',
- isCover:0,
- permisson:'',
- username:''
- }]
- }
- },
- // 局部注册子组件
- components: {
- filePushChild: filePushChild
- },
- methods: {
- // add param
- add: function () {
- this.items.push({destPath:'',
- fileName: '',
- groupName:'',
- isCover:0,
- permisson:'',
- username:''})
- },
- // delete param
- del: function (index) {
- // 仅剩一个组件的时候不允许删除
- if (this.items.length !== 1) {
- this.items.splice(index, 1)
- console.log('deleted:', JSON.stringify(this.items))
- }
- },
- // get the data from child
- getData: function (val) {
- let index = val.index
- this.items[index] = val.data
- //this.param=this.items;
- this.$emit('param',this.items)
- },
- getPushFile:function(val,index){
- this.$emit('files',val,index)
- //this.files[index]=event.target.files[0]
- },
- dataReset:function(){
- this.items=[{destPath: '',
- fileName: '',
- groupName:'',
- isCover:0,
- permisson:'',
- username:''
- }]
- }
- }
-})
-
-// 注册到全局
-Vue.component('filepush', filePush)
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/mission/mission.js b/nezha-admin/src/main/resources/templates/js/modules/mission/mission.js
deleted file mode 100644
index 4e434316..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/mission/mission.js
+++ /dev/null
@@ -1,500 +0,0 @@
-<script>
-$(function () {
- $("#jqGrid").jqGrid({
- url: baseURL + 'mission/list',
- datatype: "json",
- colModel: [
- { label: 'ID', name: 'id', width: 30, key: true,hidden:true },
- { label: '任务名称', name: 'name', sortable: false, width: 60 },
- { label: '任务类型', name: 'type', sortable: false, width: 60,formatter:function(value,options,rowData){return vm.missionTypeList[value-1].value} },
- { label: '周期任务', name: 'isLoop', width: 100,formatter: "select", editoptions:{value:"0:否;1:是"} },
- { label: '任务状态', name: 'state', width: 100,formatter: "select", editoptions:{value:"0:非周期;1:运行;2:暂停;3:终止"} },
- /*{ label: '查看人', name: 'viewer', width: 100 },*/
- { label: '备注', name: 'remark', width: 80 },
- { label: '创建时间', name: 'opTime', width: 100}
- ],
- viewrecords: true,
- height: top.$('.content').height()-130,
- rowNum: 15,
- rowList : [15,30,50],
- rownumbers: true,
- rownumWidth: 25,
- autowidth:true,
- multiselect: true,
- pager: "#jqGridPager",
- jsonReader : {
- root: "page.list",
- page: "page.currPage",
- total: "page.totalPage",
- records: "page.totalCount"
- },
- prmNames : {
- page:"page",
- rows:"limit",
- order: "order"
- },
- gridComplete:function(){
- //隐藏grid底部滚动条
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
- }
- });
-});
-
-Vue.component("nz-node-selector",selector);
-
-//注册select组件
-Vue.component('multiselect', window.VueMultiselect.default);
-//引用vuelidate组件
-Vue.use(window.vuelidate.default);
-//引用校验规则 所有校验规则见 https://vuelidate.netlify.com/#sub-v-values
-var required = window.validators.required;
-
-var vm = new Vue({
- el:'#missionVIew',
- data:{
- q:{
- name: null,
- type: null
- },
- showList: true,
- missionParam :true,
- title: null,
- mission:{
- id:"",
- name:"",
- ids:[],
- state:"",
- type:1,
- viewLevel:3,
- commandType:0,
- commandEnname:null,
- isLoop:0,
- loopInterval:null,
- param:{},
- userGroup:null,
- nodeGroupIds:[],
- nodeIds:[],
- remark:''
- },
- radio: '1',
- missionTypeList:[],
- commandType:[],
- viewLevel:[],
- userGroups:[],
- commandEnnameTypeList1:[],
- commandEnnameTypeList2:[],
- commandEnnameTypeList3:[],
- files:[],
- paramForExecuteInstruct:{
- pidFiles:[]
- },
- paramForExecuteInstructs:{},
- missionLoopEntity:{
- endTime:null,
- startTime:null
- },
- backup:{
- backUp:"",
- backUpTo:"",
- isAbs:0,
- exceptTmpStr:""
- },
- isUpgradeBackup:0,
- paramForUpgrade:{
- backups:[],
- cover:"",
- deleteTmpStr:'',
- groupName:"",
- isAbs:0,
- isCreateCover:0,
- permisson:"",
- username:""
- },
- paramForUpgrades:[],
-
-
- nodeGroupsChecked: [], //选中的节点组
- nodeInfosChecked: [], //选中的节点
- showNodeSelect: false,
- selectorReset:true
- },
-
-
- validations: { //定义校验规则
- mission:{
- name:{
- required
- }
- }
- },
- methods: {
- query: function () {
- vm.reload();
- },
- getMissionList: function(event) {
- $.getJSON(baseURL + "sys/dict/all?type=missiontype&_"+$.now(), function(r){
- var missionTypeList = [];
- for (var i = 0; i < r.data.length; i++) {
- missionTypeList.push(r.data[i]);
- }
- vm.missionTypeList = missionTypeList;
- });
- },
- getcommandType: function(event) {
- $.getJSON(baseURL + "sys/dict/all?type=commandType&_"+$.now(), function(r){
- var commandType = [];
- for (var i = 0; i < r.data.length; i++) {
- commandType.push(r.data[i]);
- }
- vm.commandType = commandType;
- });
- },
- getCommandEnnameTypeList1: function(event) {
- $.getJSON(baseURL + "sys/dict/all?type=commandEnnameType1&_"+$.now(), function(r){
- var commandEnnameTypeList1 = [];
- for (var i = 0; i < r.data.length; i++) {
- commandEnnameTypeList1.push(r.data[i]);
- }
- vm.commandEnnameTypeList1 = commandEnnameTypeList1;
- });
- },
- getCommandEnnameTypeList2: function(event) {
- $.getJSON(baseURL + "sys/dict/all?type=commandEnnameType2&_"+$.now(), function(r){
- var commandEnnameTypeList2 = [];
- for (var i = 0; i < r.data.length; i++) {
- commandEnnameTypeList2.push(r.data[i]);
- }
- vm.commandEnnameTypeList2 = commandEnnameTypeList2;
- });
- },
- getCommandEnnameTypeList3: function(event) {
- $.getJSON(baseURL + "sys/dict/all?type=commandEnnameType3&_"+$.now(), function(r){
- var commandEnnameTypeList3 = [];
- for (var i = 0; i < r.data.length; i++) {
- commandEnnameTypeList3.push(r.data[i]);
- }
- vm.commandEnnameTypeList3 = commandEnnameTypeList3;
- });
- },
- getViewLevel:function(){
- $.getJSON(baseURL + "sys/dict/all?type=viewLevel&_"+$.now(), function(r){
- var viewLevel = [];
- for (var i = 0; i < r.data.length; i++) {
- viewLevel.push(r.data[i]);
- }
- vm.viewLevel = viewLevel;
- });
- },
- getUserGroups:function(){
- $.getJSON(baseURL + "sys/user/info?"+$.now(), function(r){
- var userGroups = [];
- for (var i = 0; i < r.user.usergroups.length; i++) {
- userGroups.push(r.user.usergroups[i]);
- }
- vm.userGroups = userGroups;
- });
- },
- add: function(){
- vm.$v.mission.$reset(); //进入新增页面时,将校验的触发状态清空($dirty=true -> false)
- vm.showList = false;
- vm.missionParam = false;
- vm.title = "新增";
- vm.missionLoopEntity={startTime:'',endTime:''}
- this.dataReset();
- },
- dataReset:function(){
- vm.mission = {
- name:null,
- remark:'',
- id:null,
- viewLevel:3,
- type:1,
- commandType:1,
- commandEnname:null,
- isLoop:0,
- loopInterval:null,
- param:{},
- viewerId:null,
- nodeGroupIds:[],
- nodeIds:[]
- };
- //清空界面数据
- vm.$refs.filePush.dataReset();
- vm.$refs.upgradeKillProcess.dataReset();
- vm.$refs.singleExec.dataReset();
- vm.$refs.upgradeExecStart.dataReset();
- vm.$refs.upgradeBackup.dataReset();
- vm.$refs.upgradeRecover.dataReset();
- vm.$refs.upgradeUpdate.dataReset();
- vm.$refs.upgradeServer.dataReset();
- vm.nodeInfoData = [];
- vm.nodeGroupsChecked = [];
- vm.nodeInfosChecked = [];
- vm.isUpgradeBackup=0;
- vm.paramForUpgrade={
- backups:[],
- cover:"",
- deleteTmpStr:'',
- groupName:"",
- isAbs:0,
- isCreateCover:0,
- permisson:"",
- username:""
- };
- vm.backup={
- backUp:"",
- backUpTo:"",
- isAbs:0,
- exceptTmpStr:""
- };
- vm.paramForUpgrades=[];
-
- },
- update: function () {
- vm.$v.mission.$reset(); //进入新增页面时,将校验触发状态清空($dirty=true -> false)
- var id = getSelectedRow();
- if(id == null){
- return ;
- }
- vm.showList = false;
- vm.missionParam = true;
- vm.title = "修改";
- vm.getInfo(id);
- },
- getInfo: function(id){
- $.get(baseURL + "mission/detail?id="+id, function(r){
- vm.mission = r.data;
- });
- },
- getFile(event) {
- this.file = event.target.files[0];
- },
- saveOrUpdate: function (event) {
- console.log(this.mission)
- console.log("任务参数")
- if (!vm.validate()) { //在下方定义的validate方法
- return;
- }
- //处理节点组 节点相关数据
- vm.formatMissionData();
- event.preventDefault();
- let formData = new FormData();
- //处理批量文件上传
- if(this.mission.type==1){
- this.files.forEach(function(o){
- formData.append("files",o);
- });
- }else{
- //针对任务为指令的处理各种类型任务的参数
- this.mission.param.commandEnname=this.mission.commandEnname.code;
- formData.append("commandEnname",this.mission.commandEnname.code);
- formData.append("commandType",this.mission.commandType);
- //处理任务为指令的周期参数
- if(this.mission.isLoop && this.mission.type==2){
- formData.append("isLoop",this.mission.isLoop);
- formData.append("loopInterval",this.mission.isLoop);
- this.mission.param.missionLoopEntity=this.missionLoopEntity;
- }
- }
-
- //判断用户选择是否为用户组选项
- if(this.mission.viewLevel==1){
- formData.append("viewerId",this.mission.viewerId.id);
- }
- if(this.mission.commandEnname!=null&&this.mission.commandEnname!=undefined){
- //组装NC升级部署param参数
- if(this.mission.commandEnname.code=='upgrade_agent'){
- if(this.isUpgradeBackup==1){
- this.paramForUpgrade.backups.push(this.backup);
- }
- this.mission.param.paramForUpgrade=this.paramForUpgrade;
- formData.append("files",this.file);
- }
- //组装DC升级部署或第三方升级部署的文件上传
- if((this.mission.commandEnname.code=='upgrade_server')||(this.mission.commandEnname.code=='upgrade_other')){
- this.files.forEach(function(o){
- formData.append("files",o);
- });
- }
- }
- formData.append("name",this.mission.name);
- formData.append("param",JSON.stringify(this.mission.param));
- formData.append("nodeGroupIds",this.mission.nodeGroupIds);
- formData.append("nodeIds",this.mission.nodeIds);
- formData.append("type",this.mission.type);
- formData.append("viewLevel",this.mission.viewLevel);
- formData.append("remark",this.mission.remark);
- var url = vm.mission.id == null ? "mission/save" : "mission/update";
- $.ajax({
- type: vm.mission.id == null ? "POST" : "PUT",
- url: baseURL + url,
- contentType:false,
- processData:false,
- data:formData,
- success: function(r){
- if(r.code === 200){
- alert('操作成功', function(index){
- vm.reload();
- });
- }else{
- alert(r.msg);
- }
- }
- });
- },
- changeStartTime:function(){
- this.missionLoopEntity.startTime = $("#beginDate").val();
- },
- changeEndTime:function(){
- this.missionLoopEntity.endTime = $("#endDate").val();
- },
- reload: function (event) {
- vm.showList = true;
- vm.missionParam = true;
- var page = $("#jqGrid").jqGrid('getGridParam','page');
- $("#jqGrid").jqGrid('setGridParam',{
- postData:
- {'name': vm.q.name,
- 'type': vm.q.type==null ? null :vm.q.type.code
- },
- page:page
- }).trigger("reloadGrid");
- },
- validate: function () {
- vm.$v.mission.$touch(); //提交时,不论是否已触发校验,都触发一下($dirty=false -> true)
- return !vm.$v.mission.$error;
- },
- converseStatus:function(status){
- vm.mission.ids=[];
- var id = getSelectedRow();
- if(id == null){
- return ;
- }
- vm.mission.ids.push(id);
- vm.mission.state=status;
- confirm('确定操作?', function(){
- $.ajax({
- type: "PUT",
- url: baseURL + "mission/loopStateChange",
- contentType: "application/json",
- data: JSON.stringify(vm.mission),
- success: function(r){
- vm.mission.ids=[];
- if(r.code === 200){
- alert('操作成功', function(index){
- vm.reload();
- });
- }else{
- alert(r.msg);
- }
- }
- });
- });
- },
- updateCommandEnname:function(){
- vm.mission.commandEnname=null;
- },
- setMissionParam:function(data){
- console.log("操作组件传出的param")
- console.log(data)
- this.mission.param=data;
- console.log(this.param)
- },
- setFiles:function(event,index){
- console.log("操作组件传出的files")
- this.files[index]=event.target.files[0]
- console.log(this.files)
- },
- getTabDatas:function(tabData){
- vm.nodeInfosChecked=tabData;
- },
- getTreeDatas:function(treeData){
- vm.nodeGroupsChecked=treeData;
- },
- formatMissionData: function () {
- console.log("处理任务节点相关")
- if(vm.mission.nodeGroupIds==null||vm.mission.nodeGroupIds==undefined){
- vm.mission.nodeGroupIds=[];
- }
- if(vm.mission.nodeIds==null||vm.mission.nodeIds==undefined){
- vm.mission.nodeIds=[];
- }
- $.each(vm.nodeGroupsChecked, function (i, v) {
- vm.mission.nodeGroupIds.push(v.id);
- })
- $.each(vm.nodeInfosChecked, function (i, v) {
- vm.mission.nodeIds.push(v.uuid);
- })
- },
- openNodePannel: function () {
-
- vm.showNodeSelect = true;
- var index = layer.open({
- area: ['50%', '100%'],
- shade: 0,
- title: "<@spring.message 'common.selectNodeOrNodeGroup'/>",
- type: 1,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $("#layerView"),
- success:function(){
-
- }
- });
- },
- unCheckNodeInfo:function(rowData){
- this.$refs.nzSelector.uncheckTabData(rowData);
- },
- uncheckAllNodeInfo:function(){
- this.$refs.nzSelector.uncheckAllTabData();
- },
- unCheckGroup:function(nodeGroup){
- this.$refs.nzSelector.uncheckTreeData(nodeGroup);
- },
- uncheckAllGroup:function(){
- this.$refs.nzSelector.uncheckAllTreeData();
- }
- },
- created: function(){
- // 初始化进入执行方法
- this.getMissionList();
- this.getViewLevel();
- this.getcommandType();
- this.getCommandEnnameTypeList1();
- this.getCommandEnnameTypeList2();
- this.getCommandEnnameTypeList3();
- this.getUserGroups();
- },
- watch:{
- 'mission.type':{
- handler(newVal,oldVal){
- vm.$refs.filePush.dataReset();
- vm.$refs.upgradeKillProcess.dataReset();
- vm.$refs.singleExec.dataReset();
- vm.$refs.upgradeExecStart.dataReset();
- vm.$refs.upgradeBackup.dataReset();
- vm.$refs.upgradeRecover.dataReset();
- vm.$refs.upgradeUpdate.dataReset();
- vm.$refs.upgradeServer.dataReset();
- },
- deep:true
- },
- 'mission.commandEnname':{
- handler(newVal,oldVal){
- vm.$refs.filePush.dataReset();
- vm.$refs.upgradeKillProcess.dataReset();
- vm.$refs.singleExec.dataReset();
- vm.$refs.upgradeExecStart.dataReset();
- vm.$refs.upgradeBackup.dataReset();
- vm.$refs.upgradeRecover.dataReset();
- vm.$refs.upgradeUpdate.dataReset();
- vm.$refs.upgradeServer.dataReset();
- },
- deep:true
- }
- }
-});
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/mission/singleExec.js b/nezha-admin/src/main/resources/templates/js/modules/mission/singleExec.js
deleted file mode 100644
index ba7e07f7..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/mission/singleExec.js
+++ /dev/null
@@ -1,184 +0,0 @@
-<script>
-/* 单次执行命令组件 */
-var singleExecChild = Vue.extend({
- template: `
- <div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.executeCommand'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.execCmd"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.owner'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.username"/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.maximumWaitingTime'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.maxWaitTime"/>&nbsp&nbsp秒
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.postbackID'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="param.returnFlag"/> <@spring.message 'mission.yes'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="param.returnFlag"/> <@spring.message 'mission.no'/>
- </label>
- </div>
- </div>
- <div class="form-group" v-show="param.returnFlag==1">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.postFile'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.returnPath"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group" v-show="items.length>1">
- <a class="btn btn-primary" @click="deleteparam" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- </div>
- `,
- props: {
- index: {
- type: Number,
- required: true
- },
- items: {
- type: Array,
- default: Array
- }
- },
- data () {
- return {
- param: {
- execCmd: '',
- username:'',
- maxWaitTime:null,
- returnFlag:0,
- returnPath:''
- }
- }
- },
- watch: {
- param: {
- handler (newV, oldV) {
- this.$emit('uploadData', {index: this.index, data: newV})
- },
- deep: true
- },
- items: {
- handler (newV, oldV) {
- if (newV.length !== 0) {
- this.param = {...newV[this.index]}
- }
- },
- deep: true
- }
- },
- methods: {
- deleteparam: function () {
- this.$emit('deleteIndex', this.index)
- }
- },
- mounted:function(){
- this.param = {...this.items[this.index]}
- }
- })
- // 构建一个父组件
-var singleExec = Vue.extend({
- template: `
- <div class="">
- <singleExecChild v-for="(item,index) in items"
- :key="index"
- :index="index"
- :items="items"
- @deleteIndex="del"
- @uploadData="getData">
- </singleExecChild>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- </div>
- `,
- data () {
- return {
- items: [{
- execCmd: '',
- username:'',
- maxWaitTime:null,
- returnFlag:0,
- returnPath:''
- }],
- dataRec: []
- }
- },
- // 局部注册子组件
- components: {
- singleExecChild: singleExecChild
- },
- methods: {
- // add param
- add: function () {
- this.items.push({
- execCmd: '',
- username:'',
- maxWaitTime:null,
- returnFlag:0,
- returnPath:''
- })
- },
- // delete param
- del: function (index) {
- // not allow to delete the first
- if (this.items.length !== 1) {
- this.items.splice(index, 1)
- console.log('deleted:', JSON.stringify(this.items))
- }
- },
- // get the data from child
- getData: function (val) {
- let index = val.index
- this.items[index] = val.data
- /*if(vm.mission.param.paramForExecuteInstructs==null||vm.mission.param.paramForExecuteInstructs==undefined){
- vm.mission.param.paramForExecuteInstructs={}
- }
- vm.mission.param.paramForExecuteInstructs=this.items;*/
- var param={
- paramForExecuteInstructs:{}
- }
- param.paramForExecuteInstructs=this.items;
- this.$emit('param',this.param)
- console.log('I got the data:', JSON.stringify(this.items))
- },
- dataReset:function(){
- this.items=[{
- execCmd: '',
- username:'',
- maxWaitTime:null,
- returnFlag:0,
- returnPath:''
- }]
- }
- }
-})
-
-// 注册到全局
-Vue.component('single-exec', singleExec)
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeBackup.js b/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeBackup.js
deleted file mode 100644
index a723d644..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeBackup.js
+++ /dev/null
@@ -1,172 +0,0 @@
-<script>
-/* 备份组件 */
-var upgradeBackupChild = Vue.extend({
- template: `
- <div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.filesThatNeedToBeBackedUp'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.backup"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.pathToBackup'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.backupTo"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.compressionID'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="param.isAbs"/> <@spring.message 'mission.absolutePath'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="param.isAbs"/> <@spring.message 'mission.relativePath'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.excludeFile'/>
- </div>
- <div class="col-sm-9">
- <textarea class="form-control" v-model="param.exceptTmpStr"></textarea>
- </div>
- </div>
- <div class="form-group" v-show="items.length>1">
- <a class="btn btn-primary" @click="deleteparam" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- </div>
- `,
- props: {
- index: {
- type: Number,
- required: true
- },
- items: {
- type: Array,
- default: Array
- }
- },
- data () {
- return {
- param: {
- backup: '',
- backupTo:'',
- isAbs:0,
- exceptTmpStr:''
- }
- }
- },
- watch: {
- param: {
- handler (newV, oldV) {
- this.$emit('uploadData', {index: this.index, data: newV})
- },
- deep: true
- },
- items: {
- handler (newV, oldV) {
- if (newV.length !== 0) {
- this.param = {...newV[this.index]}
- }
- },
- deep: true
- }
- },
- methods: {
- deleteparam: function () {
- this.$emit('deleteIndex', this.index)
- }
- },
- mounted:function(){
- this.param = {...this.items[this.index]}
- }
- })
- // 构建一个父组件
-var upgradeBackup = Vue.extend({
- template: `
- <div class="">
- <upgradeBackupChild v-for="(item,index) in items"
- :key="index"
- :index="index"
- :items="items"
- @deleteIndex="del"
- @uploadData="getData">
- </upgradeBackupChild>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- </div>
- `,
- data () {
- return {
- items: [{
- backup: '',
- backupTo:'',
- isAbs:0,
- exceptTmpStr:''
- }],
- dataRec: []
- }
- },
- // 局部注册子组件
- components: {
- upgradeBackupChild: upgradeBackupChild
- },
- methods: {
- // add param
- add: function () {
- this.items.push({
- backup: '',
- backupTo:'',
- isAbs:0,
- exceptTmpStr:''
- })
- },
- // delete param
- del: function (index) {
- // not allow to delete the first
- if (this.items.length !== 1) {
- this.items.splice(index, 1)
- console.log('deleted:', JSON.stringify(this.items))
- }
- },
- // get the data from child
- getData: function (val) {
- let index = val.index
- this.items[index] = val.data
- /*if(vm.mission.param.paramForExecuteInstructs==null||vm.mission.param.paramForExecuteInstructs==undefined){
- vm.mission.param.paramForExecuteInstructs={}
- }
- vm.mission.param.paramForExecuteInstructs=this.items;*/
- var param={
- paramForExecuteInstructs:{}
- }
- param.paramForExecuteInstructs=this.items
- this.$emit('param',this.param)
- console.log('I got the data:', JSON.stringify(this.items))
- },
- dataReset:function(){
- this.items=[{
- backup: '',
- backupTo:'',
- isAbs:0,
- exceptTmpStr:''
- }]
- }
- }
-})
-
-// 注册到全局
-Vue.component('upgrade-backup', upgradeBackup)
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeExecOrStart.js b/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeExecOrStart.js
deleted file mode 100644
index 027e0e07..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeExecOrStart.js
+++ /dev/null
@@ -1,239 +0,0 @@
-<script>
-/* 可执行命令/启动任务组件 */
-var upgradeExecOrStartChild = Vue.extend({
- template: `
- <div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.startupFileOrCommand'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.execCmd"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.executionResultFile'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.execResult"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.maximumWaitingTime'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.maxWaitTime"/>&nbsp&nbsp秒
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.owner'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.username"/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.forceEnforcement'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="param.forceExec" /> <@spring.message 'mission.yes'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="param.forceExec" /> <@spring.message 'mission.no'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.residentMemory'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="param.residentFlag" /> <@spring.message 'mission.yes'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="param.residentFlag" /> <@spring.message 'mission.no'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.postbackID'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="param.returnFlag"/> <@spring.message 'mission.yes'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="param.returnFlag"/> <@spring.message 'mission.no'/>
- </label>
- </div>
- </div>
- <div class="form-group" v-show="param.returnFlag==1">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.postFile'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.returnPath" />
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.startupParameters'/>
- </div>
- <div class="col-sm-9">
- <textarea class="form-control" v-model="param.execParamsTmpStr"></textarea>
- </div>
- </div>
- <div class="form-group" v-show="items.length>1">
- <a class="btn btn-primary" @click="deleteparam" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- </div>
- `,
- props: {
- index: {
- type: Number,
- required: true
- },
- items: {
- type: Array,
- default: Array
- }
- },
- data () {
- return {
- param: {
- execResult:"",
- forceExec:0,
- maxWaitTime:null,
- residentFlag:0,
- returnFlag:0,
- returnPath:'',
- username:"",
- execParamsTmpStr:''
- }
- }
- },
- watch: {
- param: {
- handler (newV, oldV) {
- this.$emit('uploadData', {index: this.index, data: newV})
- },
- deep: true
- },
- items: {
- handler (newV, oldV) {
- if (newV.length !== 0) {
- this.param = {...newV[this.index]}
- }
- },
- deep: true
- }
- },
- methods: {
- deleteparam: function () {
- this.$emit('deleteIndex', this.index)
- }
- },
- mounted:function(){
- this.param = {...this.items[this.index]}
- }
- })
- // 构建一个父组件
-var upgradeExecOrStart = Vue.extend({
- template: `
- <div class="" >
- <upgradeExecOrStartChild v-for="(item,index) in items"
- :key="index"
- :index="index"
- :items="items"
- @deleteIndex="del"
- @uploadData="getData">
- </upgradeExecOrStartChild>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- </div>
- `,
- data () {
- return {
- items: [{
- execResult:"",
- forceExec:0,
- maxWaitTime:null,
- residentFlag:0,
- returnFlag:0,
- returnPath:'',
- username:"",
- execParamsTmpStr:''
- }],
- dataRec: []
- }
- },
- // 局部注册子组件
- components: {
- upgradeExecOrStartChild: upgradeExecOrStartChild
- },
- methods: {
- // add param
- add: function () {
- this.items.push({
- execResult:"",
- forceExec:0,
- maxWaitTime:null,
- residentFlag:0,
- returnFlag:0,
- returnPath:'',
- username:"",
- execParamsTmpStr:''})
- },
- // delete param
- del: function (index) {
- // not allow to delete the first
- if (this.items.length !== 1) {
- this.items.splice(index, 1)
- console.log('deleted:', JSON.stringify(this.items))
- }
- },
- // get the data from child
- getData: function (val) {
- let index = val.index
- this.items[index] = val.data
- /* if(vm.mission.param.paramForExecuteInstructs==null||vm.mission.param.paramForExecuteInstructs==undefined){
- vm.mission.param.paramForExecuteInstructs={}
- }
- vm.mission.param.paramForExecuteInstructs=this.items;*/
- var param={
- paramForExecuteInstructs:{}
- }
- param.paramForExecuteInstructs=this.items;
- this.$emit('param',this.param)
- console.log('I got the data:', JSON.stringify(this.items))
- },
- dataReset:function(){
- this.items=[{
- execResult:"",
- forceExec:0,
- maxWaitTime:null,
- residentFlag:0,
- returnFlag:0,
- returnPath:'',
- username:"",
- execParamsTmpStr:''
- }]
- }
- }
-})
-
-// 注册到全局
-Vue.component('upgrade-exec-start', upgradeExecOrStart)
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeKillProcess.js b/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeKillProcess.js
deleted file mode 100644
index 1365406d..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeKillProcess.js
+++ /dev/null
@@ -1,123 +0,0 @@
-<script>
-/* 停用进程组件 */
-var upgradeKillProcessChild = Vue.extend({
- template: `
- <div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.pidFile'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="pidFile"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group" v-show="items.length>1">
- <a class="btn btn-primary" @click="deleteparam" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- </div>
- `,
- props: {
- index: {
- type: Number,
- required: true
- },
- items: {
- type: Array,
- default: Array
- }
- },
- data () {
- return {
- pidFile:""
- }
- },
- watch: {
- pidFile: {
- handler (newV, oldV) {
- this.$emit('uploadData', {index: this.index, data: newV})
- },
- deep: true
- },
- items: {
- handler (newV, oldV) {
- if (newV.length !== 0) {
- this.pidFile = newV[this.index]
- }
- },
- deep: true
- }
- },
- methods: {
- deleteparam: function () {
- this.$emit('deleteIndex', this.index)
- }
- },
- mounted:function(){
- this.pidFile = this.items[this.index]
- }
- })
- // 构建一个父组件
-var upgradeKillProcess = Vue.extend({
- template: `
- <div>
- <upgradeKillProcessChild v-for="(item,index) in items"
- :key="index"
- :index="index"
- :items="items"
- @deleteIndex="del"
- @uploadData="getData">
- </upgradeKillProcessChild>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- </div>
- `,
- data () {
- return {
- items: [''],
- dataRec: []
- }
- },
- // 局部注册子组件
- components: {
- upgradeKillProcessChild: upgradeKillProcessChild
- },
- methods: {
- // add param
- add: function () {
- this.items.push('')
- },
- // delete param
- del: function (index) {
- // not allow to delete the first
- if (this.items.length !== 1) {
- this.items.splice(index, 1)
- console.log('deleted:', JSON.stringify(this.items))
- }
- },
- // get the data from child
- getData: function (val) {
- let index = val.index;
- this.items[index] = val.data;
- /*if(vm.mission.param.paramForExecuteInstruct==null||vm.mission.param.paramForExecuteInstruct==undefined){
- vm.mission.param.paramForExecuteInstruct={
- pidFiles:[]
- }
- }
- vm.mission.param.paramForExecuteInstruct.pidFiles=this.items;
- console.log('I got the data:', JSON.stringify(this.items))*/
- var param={
- paramForExecuteInstruct:{
- pidFiles:[]
- }
- }
- param.paramForExecuteInstruct.pidFiles=this.items
- this.$emit('param',this.param)
- },
- dataReset:function(){
- this.items=['']
- }
- }
-})
-
-// 注册到全局
-Vue.component('upgrade-kill-process', upgradeKillProcess)
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeRecover.js b/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeRecover.js
deleted file mode 100644
index ecb7309b..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeRecover.js
+++ /dev/null
@@ -1,169 +0,0 @@
-<script>
-/* 恢复组件 */
-var upgradeRecoverChild = Vue.extend({
- template: `
- <div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.sourceFileOrDirectory'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.source"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.overwriteDirectory'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.cover"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.uncompressionID'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="param.isAbs"/> <@spring.message 'mission.absolutePath'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="param.isAbs"/> <@spring.message 'mission.relativePath'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.deleteFiles'/>
- </div>
- <div class="col-sm-9">
- <textarea class="form-control" v-model="param.deleteTmpStr"></textarea>
- </div>
- </div>
- <div class="form-group" v-show="items.length>1">
- <a class="btn btn-primary" @click="deleteparam" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- </div>
- `,
- props: {
- index: {
- type: Number,
- required: true
- },
- items: {
- type: Array,
- default: Array
- }
- },
- data () {
- return {
- param: {
- source: '',
- cover:'',
- isAbs:0,
- deleteTmpStr:''
- }
- }
- },
- watch: {
- param: {
- handler (newV, oldV) {
- this.$emit('uploadData', {index: this.index, data: newV})
- },
- deep: true
- },
- items: {
- handler (newV, oldV) {
- if (newV.length !== 0) {
- this.param = {...newV[this.index]}
- }
- },
- deep: true
- }
- },
- methods: {
- deleteparam: function () {
- this.$emit('deleteIndex', this.index)
- }
- }
- })
- // 构建一个父组件
-var upgradeRecover = Vue.extend({
- template: `
- <div class="">
- <upgradeRecoverChild v-for="(item,index) in items"
- :key="index"
- :index="index"
- :items="items"
- @deleteIndex="del"
- @uploadData="getData">
- </upgradeRecoverChild>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- </div>
- `,
- data () {
- return {
- items: [{
- source: '',
- cover:'',
- isAbs:0,
- deleteTmpStr:''
- }],
- dataRec: []
- }
- },
- // 局部注册子组件
- components: {
- upgradeRecoverChild: upgradeRecoverChild
- },
- methods: {
- // add param
- add: function () {
- this.items.push({
- source: '',
- cover:'',
- isAbs:0,
- deleteTmpStr:''
- })
- },
- // delete param
- del: function (index) {
- // not allow to delete the first
- if (this.items.length !== 1) {
- this.items.splice(index, 1)
- console.log('deleted:', JSON.stringify(this.items))
- }
- },
- // get the data from child
- getData: function (val) {
- let index = val.index
- this.items[index] = val.data
- /* if(vm.mission.param.paramForExecuteInstructs==null||vm.mission.param.paramForExecuteInstructs==undefined){
- vm.mission.param.paramForExecuteInstructs={}
- }
- vm.mission.param.paramForExecuteInstructs=this.items;*/
- var param={
- paramForExecuteInstructs:{}
- }
- param.paramForExecuteInstructs=this.items;
- this.$emit('param',this.param)
- console.log('I got the data:', JSON.stringify(this.items))
- },
- dataReset:function(){
- this.items=[{
- source: '',
- cover:'',
- isAbs:0,
- deleteTmpStr:''
- }]
- }
- }
-})
-
-// 注册到全局
-Vue.component('upgrade-recover', upgradeRecover)
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeServer.js b/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeServer.js
deleted file mode 100644
index c00a7543..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeServer.js
+++ /dev/null
@@ -1,390 +0,0 @@
-<script>
-/* DC升级或第三方项目升级部署 */
-var upgradeServerChild = Vue.extend({
- template: `
- <div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.path'/></div>
- <div class="col-sm-9">
- <input type="file" class="" name="" @change="getFile($event)"></input>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.overwriteDirectory'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model='param.cover'/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.startupFileOrCommand'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model='param.startupFile'/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.pidFile'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model='param.pidFile'/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.owner'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model='param.userName'/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.groups'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model='param.groupName'/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.filePermissions'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model='param.permisson'/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.waitingTime'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model='param.maxWaitTime'/>&nbsp&nbsp<@spring.message 'mission.second'/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.createLogo'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model='param.isCreateCover'/> <@spring.message 'mission.create'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model='param.isCreateCover'/> <@spring.message 'mission.doNotCreate'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.uncompressionID'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model='param.isAbs'/> <@spring.message 'mission.absolutePath'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model='param.isAbs'/> <@spring.message 'mission.relativePath'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.forceEnforcement'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model='param.forceExec'/> <@spring.message 'mission.yes'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model='param.forceExec'/> <@spring.message 'mission.no'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.deleteFiles'/>
- </div>
- <div class="col-sm-9">
- <textarea class="form-control" v-model='param.deleteTmpStr'></textarea>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.startupParameters'/>
- </div>
- <div class="col-sm-9">
- <textarea class="form-control" v-model='param.execParamsTmpStr'></textarea>
- </div>
- </div>
-
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.backUp'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="param.isBackup" @change="addData"/> <@spring.message 'mission.yes'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="param.isBackup"/> <@spring.message 'mission.no'/>
- </label>
- </div>
- </div>
- <div v-show='param.isBackup==1'>
- <div v-for="backup,index in param.backups">
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.filesThatNeedToBeBackedUp'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="backup.backUp"/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.pathToBackup'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="backup.backUpTo"/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.compressionID'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="backup.isAbs"/> <@spring.message 'mission.yes'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="backup.isAbs"/> <@spring.message 'mission.no'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.excludeFile'/>
- </div>
- <div class="col-sm-9">
- <textarea class="form-control" v-model="backup.exceptTmpStr"></textarea>
- </div>
- </div>
-
- <div class="form-group">
- <a class="btn btn-primary" @click="deleteBackup(index)" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- </div>
-
- <div class="form-group">
- <a class="btn btn-primary" @click="addBackup" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- </div>
-
- </div>
-
- <div class="form-group" v-show="items.length>1">
- <a class="btn btn-primary" @click="deleteparam" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- </div>
- `,
- props: {
- index: {
- type: Number,
- required: true
- },
- items: {
- type: Array,
- default: Array
- }
- },
- data () {
- return {
- param: {
- isBackup:0,
- cover:'',
- isAbs:0,
- isCreateCover:0,
- userName:'',
- deleteTmpStr:'',
- groupName:'',
- permisson:'',
- maxWaitTime:'',
- startupFile:'',
- forceExec:0,
- pidFile:'',
- execParamsTmpStr:'',
- backups:[]
- }
- }
- },
- watch: {
- param: {
- handler (newV, oldV) {
- this.$emit('uploadData', {index: this.index, data: newV})
- },
- deep: true
- },
- items: {
- handler (newV, oldV) {
- if (newV.length !== 0) {
- this.param = {...newV[this.index]}
- }
- },
- deep: true
- }
- },
- methods: {
- deleteparam: function () {
- this.$emit('deleteIndex', this.index)
- },
- addBackup: function(){
- this.param.backups.push({
- backUp:'',
- backUpTo:'',
- isAbs:0,
- exceptTmpStr:''
- })
- },
- deleteBackup:function(index){
- this.param.backups.splice(index, 1)
- console.log(this.param.backups)
- if(this.param.backups.length==0){
- this.param.isBackup=0;
- }
- },
- getFile:function(event){
- this.$emit('uploadFile',event,this.index)
- },
- addData:function(){
- this.param.backups.push({
- backUp:"",
- backUpTo:"",
- isAbs:0,
- exceptTmpStr:""
- })
- }
- },
- mounted:function(){
- this.param = {...this.items[this.index]}
- }
- })
- // 构建一个父组件
-var upgradeServer = Vue.extend({
- template: `
- <div class="" >
- <upgradeServerChild v-for="(item,index) in items"
- :key="index"
- :index="index"
- :items="items"
- @deleteIndex="del"
- @uploadData="getData"
- @uploadFile="getPushFile">
- </upgradeServerChild>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- </div>
- `,
- data () {
- return {
- items: [{
- isBackup:0,
- cover:'',
- isAbs:0,
- isCreateCover:0,
- userName:'',
- deleteTmpStr:'',
- groupName:'',
- permisson:'',
- maxWaitTime:'',
- startupFile:'',
- forceExec:0,
- pidFile:'',
- execParamsTmpStr:'',
- backups:[]
- }]
- }
- },
- // 局部注册子组件
- components: {
- upgradeServerChild: upgradeServerChild
- },
- methods: {
- // add param
- add: function () {
- this.items.push({
- isBackup:0,
- cover:'',
- isAbs:0,
- isCreateCover:0,
- userName:'',
- deleteTmpStr:'',
- groupName:'',
- permisson:'',
- maxWaitTime:'',
- startupFile:'',
- forceExec:0,
- pidFile:'',
- execParamsTmpStr:'',
- backups:[]
- })
- },
- // delete param
- del: function (index) {
- // not allow to delete the first
- if (this.items.length !== 1) {
- this.items.splice(index, 1)
- console.log('deleted:', JSON.stringify(this.items))
- }
- },
- // get the data from child
- getData: function (val) {
- let index = val.index
- this.items[index] = val.data
- /*if(vm.mission.param.paramForUpgrades==null||vm.mission.param.paramForUpgrades==undefined){
- vm.mission.param.paramForUpgrades={}
- }
- vm.mission.param.paramForUpgrades=this.items;*/
- var param={
- paramForUpgrades:{}
- }
- param.paramForUpgrades=this.items;
- this.$emit('param',this.param)
- console.log('I got the data:', JSON.stringify(this.items))
- },
- dataReset:function(){
- this.items=[{
- isBackup:0,
- cover:'',
- isAbs:0,
- isCreateCover:0,
- userName:'',
- deleteTmpStr:'',
- groupName:'',
- permisson:'',
- maxWaitTime:'',
- startupFile:'',
- forceExec:0,
- pidFile:'',
- execParamsTmpStr:'',
- backups:[]
- }]
- },
- getPushFile:function(val,index){
- this.$emit('files',val,index)
- }
- }
-})
-
-// 注册到全局
-Vue.component('upgrade-server', upgradeServer)
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeUpdate.js b/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeUpdate.js
deleted file mode 100644
index 3a2ddecf..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/mission/upgradeUpdate.js
+++ /dev/null
@@ -1,189 +0,0 @@
-<script>
-/* 覆盖更新组件 */
-var upgradeUpateChild = Vue.extend({
- template: `
- <div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.sourceFileOrDirectory'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.source"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.overwriteDirectory'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="param.cover"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.uncompressionID'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="param.isAbs"/> <@spring.message 'mission.absolutePath'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="param.isAbs"/> <@spring.message 'mission.relativePath'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.createLogo'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="param.isCreateCover"/> <@spring.message 'mission.create'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="param.isCreateCover"/> <@spring.message 'mission.doNotCreate'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.deleteFiles'/>
- </div>
- <div class="col-sm-9">
- <textarea class="form-control" v-model="param.deleteTmpStr"></textarea>
- </div>
- </div>
- <div class="form-group" v-show="items.length>1">
- <a class="btn btn-primary" @click="deleteparam" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- </div>
- `,
- props: {
- index: {
- type: Number,
- required: true
- },
- items: {
- type: Array,
- default: Array
- }
- },
- data () {
- return {
- param: {
- source: '',
- cover:'',
- isAbs:0,
- isCreateCover:0,
- deleteTmpStr:''
- }
- }
- },
- watch: {
- param: {
- handler (newV, oldV) {
- this.$emit('uploadData', {index: this.index, data: newV})
- },
- deep: true
- },
- items: {
- handler (newV, oldV) {
- if (newV.length !== 0) {
- this.param = {...newV[this.index]}
- }
- },
- deep: true
- }
- },
- methods: {
- deleteparam: function () {
- this.$emit('deleteIndex', this.index)
- }
- },
- mounted:function(){
- this.param = {...this.items[this.index]}
- }
- })
- // 构建一个父组件
-var upgradeUpate = Vue.extend({
- template: `
- <div class="" >
- <upgradeUpateChild v-for="(item,index) in items"
- :key="index"
- :index="index"
- :items="items"
- @deleteIndex="del"
- @uploadData="getData">
- </upgradeUpateChild>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- </div>
- `,
- data () {
- return {
- items: [{
- source: '',
- cover:'',
- isAbs:0,
- isCreateCover:0,
- deleteTmpStr:''
- }],
- dataRec: []
- }
- },
- // 局部注册子组件
- components: {
- upgradeUpateChild: upgradeUpateChild
- },
- methods: {
- // add param
- add: function () {
- this.items.push({
- source: '',
- cover:'',
- isAbs:0,
- isCreateCover:0,
- deleteTmpStr:''
- })
- },
- // delete param
- del: function (index) {
- // not allow to delete the first
- if (this.items.length !== 1) {
- this.items.splice(index, 1)
- console.log('deleted:', JSON.stringify(this.items))
- }
- },
- // get the data from child
- getData: function (val) {
- let index = val.index
- this.items[index] = val.data
- /* if(vm.mission.param.paramForExecuteInstructs==null||vm.mission.param.paramForExecuteInstructs==undefined){
- vm.mission.param.paramForExecuteInstructs={}
- }
- vm.mission.param.paramForExecuteInstructs=this.items;*/
- var param={
- paramForExecuteInstructs:{}
- }
- param.paramForExecuteInstructs=this.items;
- this.$emit('param',this.param)
- console.log('I got the data:', JSON.stringify(this.items))
- },
- dataReset:function(){
- this.items=[{
- source: '',
- cover:'',
- isAbs:0,
- isCreateCover:0,
- deleteTmpStr:''
- }]
- }
- }
-})
-
-// 注册到全局
-Vue.component('upgrade-update', upgradeUpate)
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/node/nodeCabinet.js b/nezha-admin/src/main/resources/templates/js/modules/node/nodeCabinet.js
deleted file mode 100644
index b2c03041..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/node/nodeCabinet.js
+++ /dev/null
@@ -1,363 +0,0 @@
-<script >
-$(function () {
- $("#jqGrid").jqGrid({
- url: baseURL + '/cab/list',
- datatype: "json",
- colModel: [
- {label: "ID", name: 'id', width: 60, key: true, hidden: true},
- {label: "<@spring.message 'common.name'/>", name: 'name', width: 60, sortable: false},
- {label: "<@spring.message 'node.room.name'/>", name: 'roomName', width: 60, sortable: false},
- {label: "<@spring.message 'node.cabinet.roomRow'/>", name: 'roomRow', width: 60, sortable: false},
- {label: "<@spring.message 'node.cabinet.roomCol'/>", name: 'roomCol', width: 60, sortable: false},
- {label: "<@spring.message 'node.cabinet.uSize'/>", name: 'ubit', width: 60, sortable: false},
- {label: "<@spring.message 'common.remark'/>", name: 'remarks', width: 60, sortable: false}
- ],
- viewrecords: true,
- height: top.$(".content").height()-130,
- rowNum: 15,
- rowList : [15,30,50],
- rownumbers: true,
- rownumWidth: 25,
- autowidth: true,
- multiselect: true,
- pager: "#jqGridPager",
- jsonReader: {
- root: "data.list",
- page: "data.currPage",
- total: "data.totalPage",
- records: "data.totalCount"
- },
- prmNames: {
- page: "page",
- rows: "limit",
- order: "order"
- },
- gridComplete: function () {
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"}); // 隐藏grid底部滚动条
- },
- onSelectAll: function(rowids, status) {
- if (status) {
- toolsBtnHandle();
- }
- },
- onSelectRow: function(rowid,status) {
- toolsBtnHandle();
- }
- });
-});
-
-// 注册select组件
-Vue.component('multiselect', window.VueMultiselect.default);
-
-// 引用校验规则 所有校验规则见 https://vuelidate.netlify.com/#sub-v-values
-Vue.use(window.vuelidate.default);
-var required = window.validators.required;
-var minValue = window.validators.minValue;
-var integer = window.validators.integer;
-var helpers = window.validators.helpers;
-
-// 自定义规则,;第一个参数是当前字段值,第二个参数是当前校验的整个对象(此处是vm.data.nodeCabinet)
-var nameCheck = function (value, nodeCabinet) {
- var flag = true;
- if (nodeCabinet.roomId == null) {
- return flag;
- } else {
- if (helpers.req(value)) {
- var params = "?name=" + value + "&roomId=" + nodeCabinet.roomId.roomId;
- if (nodeCabinet.id != null) {
- params += "&id=" + nodeCabinet.id;
- }
- $.ajax({
- type: "GET",
- url: baseURL + "cab/cabNameCheck" + params,
- async: false, // 关闭异步
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return flag;
- }
- }
-}
-var cabUbitCheck = function (value, nodeCabinet) {
- if (nodeCabinet.id == null) {
- return true;
- }
- if (helpers.req(value)) {
- var flag = true;
- // 进行校验
- var params = "?id=" + nodeCabinet.id + "&ubit=" + value;
- $.ajax({
- type: "GET",
- url: baseURL + "cab/cabUbitCheck" + params,
- async: false, // 关闭异步
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- vm.occUbit = r.data;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-
-}
-
-var data = {
- showList: true,
- title: null,
- q: {
- cabName: null
- },
- nodeCabinet: {
- id: null,
- name: null,
- roomId: null,
- roomRow: null,
- roomCol: null,
- ubit: null,
- remarks: null
- },
- rooms: [],
- roomRows: [],
- roomCols: [],
- occUbit: null,
- // single multi 控制工具栏单选 多选可点击状态
- single:true,
- multi:true
-};
-
-var vm = new Vue({
- el: '#app',
- data: this.data,
- validations: {
- nodeCabinet: {
- name: {
- required, nameCheck
- },
- roomId: {
- required
- },
- roomRow: {
- required
- },
- roomCol: {
- required
- },
- ubit: {
- required, integer, minValue: minValue(1), cabUbitCheck
- }
- }
- },
- methods: {
- query: function () {
- this.reload();
- },
- reload: function () {
- vm.single = vm.multi = true;
- vm.showList = true;
- var page = $("#jqGrid").jqGrid('getGridParam', 'page');
- $("#jqGrid").jqGrid('setGridParam', {
- postData: {
- "name": vm.q.cabName
- },
- page: 1
- }).trigger("reloadGrid");
- },
- reset: function () {
- vm.q.cabName = null;
- vm.query();
- },
- getInfo: function (id) {
- $.ajax({
- type: "GET",
- url: baseURL + "cab/detail?id=" + id,
- async: false, // 关闭异步
- dataType: "json",
- success: function (r) {
- vm.nodeCabinet = r.data;
- }
- });
-
- // 得到目前的机房 行号 列号 的数组集合
- var cab = JSON.parse(JSON.stringify(vm.nodeCabinet));
- this.getRooms();
- vm.rooms.some(item => {
- if (item.roomName == cab.roomName) {
- vm.$set(vm.nodeCabinet, "roomId", item);
- }
- });
- this.getRoomRows();
- vm.roomRows.some(item => {
- if (item.roomRow == cab.roomRow) {
- vm.$set(vm.nodeCabinet, "roomRow", item);
- return true;
- }
- });
- this.getRoomCols();
- vm.roomCols.some(item => {
- if (item == cab.roomCol) {
- vm.$set(vm.nodeCabinet, "roomCol", item);
- return true;
- }
- });
- },
- add: function () {
- vm.$v.nodeCabinet.$reset(); // 进入新增页面时,将校验的触发状态清空($dirty=true -> false)
- vm.showList = false;
- vm.title = "<@spring.message 'common.add'/>";
- vm.nodeCabinet = {
- id: null,
- name: null,
- roomId: null,
- roomRow: null,
- roomCol: null,
- ubit: null,
- remarks: null
- }
- vm.roomRows = vm.roomCols = [];
- this.getRooms();
- },
- update: function () {
- vm.$v.nodeCabinet.$reset(); //进入新增页面时,将校验触发状态清空($dirty=true -> false)
- var id = getSelectedRow();
- if (id == null) {
- return;
- }
- vm.showList = false;
- vm.title = "<@spring.message 'common.edit'/>";
- this.getInfo(id);
- },
- del: function () {
- var ids = getSelectedRows();
- if (ids == null) {
- return;
- }
- confirm("<@spring.message 'common.confirmDelete'/>", function () {
- var form = new FormData();
- form.append("ids", ids);
- $.ajax({
- type: "DELETE",
- url: baseURL + "cab/delete",
- processData: false,
- contentType: false,
- mimeType: "multipart/form-data",
- data: form,
- success: function (r) {
- if (r.code == 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- });
- },
- getRooms: function () { // 获取机房列表
- vm.rooms = []; // 获取之前先置空
- var params = "";
- if (data.nodeCabinet.id) {
- params = "?id=" + data.nodeCabinet.id;
- }
-
- $.ajax({
- type: "GET",
- url: baseURL + "cab/optionalRoom" + params,
- async: false, // 关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- vm.rooms = r.data.list;
- }
- });
- },
- getRoomRows: function () { // 根据选择的机房获取对应的可用行信息
- vm.nodeCabinet.roomRow = vm.nodeCabinet.roomCol = null;
- if (vm.nodeCabinet.roomId == null) {
- return;
- }
- vm.rooms.some(item => {
- if (item.roomId == vm.nodeCabinet.roomId.roomId) {
- vm.roomRows = item.roomRows;
- return true;
- }
- });
- },
- getRoomCols: function () { // 根据选择的机房行数获取对应的列信息
- vm.nodeCabinet.roomCol = null;
- if (vm.nodeCabinet.roomRow == null) {
- return;
- }
- vm.roomRows.some(item => {
- if (item.roomRow == vm.nodeCabinet.roomRow.roomRow) {
- vm.roomCols = item.roomCols;
- return true;
- }
- });
- },
- saveOrUpdate: function () {
- if (!vm.validate()) { // 在下方定义的validate方法
- return;
- }
- var url;
- if (vm.nodeCabinet.id == null) {
- url = "cab/save";
- } else {
- url = "cab/update";
- }
-
- vm.$set(vm.nodeCabinet, "roomId", vm.nodeCabinet.roomId.roomId);
- vm.$set(vm.nodeCabinet, "roomRow", vm.nodeCabinet.roomRow.roomRow);
- $.ajax({
- type: vm.nodeCabinet.id == null ? "POST" : "PUT",
- url: baseURL + url,
- contentType: "application/json",
- data: JSON.stringify(vm.nodeCabinet),
- success: function (r) {
- if (r.code === 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- },
- checkRoom: function () {
- if (vm.nodeCabinet.roomId == null) {
- alert("<@spring.message 'common.pleaseSelect'/><@spring.message 'node.room.name'/>!")
- } else if (vm.roomRows.length < 1) {
- vm.roomCols = [];
- alert("<@spring.message 'node.room.notPosition'/>");
- }
- },
- checkRoomRow: function () {
- if (vm.nodeCabinet.roomId == null) {
- alert("<@spring.message 'common.pleaseSelect'/><@spring.message 'node.room.name'/>!")
- } else if (vm.nodeCabinet.roomRow == null && vm.roomRows.length < 1) {
- alert("<@spring.message 'node.room.notPosition'/>");
- } else if (vm.nodeCabinet.roomRow == null && vm.roomRows.length > 0) {
- alert("<@spring.message 'common.pleaseSelect'/><@spring.message 'node.cabinet.roomRow'/>");
- }
- },
- validate: function () {
- vm.$v.nodeCabinet.$touch(); // 提交时,不论是否已触发校验,都触发一下($dirty=false -> true)
- return !vm.$v.nodeCabinet.$error;
- }
- },
- created: function () {
-
- },
- watch: {}
-});
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/node/nodeGroup.js b/nezha-admin/src/main/resources/templates/js/modules/node/nodeGroup.js
deleted file mode 100644
index b5591303..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/node/nodeGroup.js
+++ /dev/null
@@ -1,479 +0,0 @@
-<script>
-var isGroup = true;
-// 定义为 nodegroup 的私有组件
-let groupTree = Vue.component('groupTree', {
- template: "#treeTemplate",
- props: {
- znodes: {
- type: Array
- },
- selectedNodeId: "",
- node: null
- },
- data() {
- return {
- selectedNode: {},
- setting: {
- view: {
- addHoverDom: this.addHoverDom,
- removeHoverDom: this.removeHoverDom,
- showIcon: false,
- nameIsHTML: true, // 名称支持Html标签转换
- selectedMulti: false // 禁止选中多个节点
- },
- edit: {
- enable: true,
- removeTitle: "<@spring.message 'common.delete'/>",
- renameTitle: "<@spring.message 'common.edit'/>"
- },
- data: {
- simpleData: {
- enable: true,
- idKey: "id",
- pIdKey: "pid",
- rootPId: 0
- },
- key:{
- title:"nodeTitle" // 因为name 拼接了带有html的字段 所以默认的title 会展示html标签
- }
- },
- check: {
- enable: false,
- nocheckInherit: true
- },
- callback: {
- beforeRemove: this.beforeRemove, // 点击删除时触发,用来提示用户是否确定删除(可以根据返回值 true|false 确定是否可以删除)
- beforeEditName: this.beforeEditName, // 点击编辑时触发,用来判断该节点是否能编辑
- onClick: this.clickNode // 点击节点触发的事件
- }
- }
- };
- },
- methods: {
- // 初始化ztree
- init() {
- // 获取当前的集合
- this.znodes.forEach(item => {
- this.$set(item,"nodeTitle",item.name);
- if(item.allowAss == 1){ // 证明是叶子节点
- var count = "";
- $.ajax({
- type: "GET",
- url: baseURL + "nodegroup/getNodeCount?id="+item.id,
- async: false,
- dataType: "json",
- success: function (r) {
- count = r.data;
- }
- });
- this.$set(item,"name",item.name + " <font color='gray'>("+ count +")</font>");
- }
- });
- // 生成树结构
- var tree = $.fn.zTree.init($("#treeDemo" + this.node.id), this.setting, this.znodes);
- tree.expandAll(true);
- },
- // 删除
- beforeRemove: function (treeId, treeNode) {
- var parent = this.$parent;
- confirm("<@spring.message 'common.confirmDelete'/>", function () {
- parent.delete(treeNode);
- });
- return false;
- },
- // 修改
- beforeEditName: function (treeId, treeNode) {
- this.$parent.update(treeNode);
- return false;
- },
- // 点击节点组
- clickNode: function (e, treeId, treeNode) {
- this.$parent.getNodeInfos(treeNode);
- return false;
- },
- // 鼠标划过展示功能按钮
- addHoverDom: function (treeId, treeNode) {
- var parent = this.$parent;
- var sObj = $("#" + treeNode.tId + "_span");
- if (treeNode.editNameFlag || $("#addBtn_" + treeNode.tId).length > 0 || treeNode.allowSub == 0) { // 可以让不可添加的按钮隐藏
- return;
- }
- // 添加子节点组
- var addStr = "<span class='button add' id='addBtn_" + treeNode.tId + "' title='<@spring.message 'common.add'/><@spring.message 'nodegroup.child.group'/>' onfocus='this.blur();'></span>";
- sObj.append(addStr);
- var btn = $("#addBtn_" + treeNode.tId);
- if (btn) btn.bind("click", function () {
- //vm.$refs.gtree[node.id].open(treeNode);
- parent.add(treeNode, false);
- return false; // 结束方法
- });
- },
- open: function (treeNode) {
- this.$parent.add(treeNode, false);
- },
- // 点击业务系统旁边的添加按钮 添加根节点组
- addRootGroup: function () {
- // 将数据传至父组件 也就是外面的vm 实例中进行添加操作
- this.$emit('addrootgroup', this.node, true);
- },
- // 鼠标移除删除添加按钮
- removeHoverDom: function (treeId, treeNode) {
- $("#addBtn_" + treeNode.tId).unbind().remove();
- },
- // 一下是 展示/样式相关方法
- showTree: function (item) {
- $("#box" + item.id).toggle(200);
- if ($("#icon" + item.id).hasClass("mytreeicon-open")) {
- $("#icon" + item.id).removeClass("mytreeicon-open").addClass("mytreeicon-close");
- } else {
- $("#icon" + item.id).removeClass("mytreeicon-close").addClass("mytreeicon-open");
- }
- },
- showBtn: function (item) {
- $("#icon2" + item.id).css("display", "inline-block");
- },
- hideBtn: function (item) {
- $("#icon2" + item.id).hide();
- },
- showBtn2: function (item) {
- $("#icon2" + item.id).removeClass("mytreeicon-add_unact").addClass("mytreeicon-add_act");
- },
- hideBtn2: function (item) {
- $("#icon2" + item.id).removeClass("mytreeicon-add_act").addClass("mytreeicon-add_unact");
- },
- },
- watch: {
- // 监听树节点的变化更新树
- /* znodes: function (val) {
- this.init();
- },*/
- },
- mounted() {
- this.init();
- }
-});
-
-var data = {
- systems: [],
- nodegroups: [],
- showForm: false,
- nodeGroup: {
- name: null,
- id: null,
- systemId: null,
- pid: null,
- remark: null,
- parentGroup: {
- id: null,
- name: null
- }
- },
- system: {
- id: null,
- name: null
- },
- count: 1,
- selectedNodeGroup: null, // 当前选中的节点组
- allNodes: [], // 所有节点
- selectedNodes: [], // 已选节点
- selectableNodes: [], // 可选节点
- addUuids: [], // 节点组新维护的UUIDS
- removeUuids: [] // 节点组需要解除的UUIDS
-}
-
-// 引用校验规则 所有校验规则见 https://vuelidate.netlify.com/#sub-v-values
-Vue.use(window.vuelidate.default);
-var required = window.validators.required;
-var helpers = window.validators.helpers;
-
-// 名称校验
-var nameCheck = function (value, nodeGroup) {
- if (helpers.req(value)) {
- var flag = true;
- var params = "?name=" + value + "&pid=" + vue.nodeGroup.parentGroup.id;
- if (nodeGroup.id) {
- params += "&id=" + nodeGroup.id;
- }
- if (nodeGroup.parentGroup.id == 0) { // 添加的是根节点 则参数需要传业务ID
- params += "&systemId=" + vue.system.id;
- }
- $.ajax({
- type: "GET",
- url: baseURL + "nodegroup/groupNameCheck" + params,
- async: false,
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-
-var vue = new Vue({
- el: "#nodeGroupApp",
- data: this.data,
- validations: {
- nodeGroup: {
- name: {
- required, nameCheck
- }
- }
- },
- components: {
- groupTree // 私有组件 节点组页面左侧树结构
- },
- methods: {
- getNodeInfos: function (node) {
- vue.selectedNodeGroup = node;
- vm.nodeGroup = node;
- vm.query();
- },
- add: function (node, isRoot) {
- vue.$v.nodeGroup.$reset();
- vue.showForm = true;
- if (isRoot) { // 添加根节点组
- // 获取当前权限
- vue.system = node;
- vue.nodeGroup = {
- name: null,
- id: null,
- systemId: null,
- pid: null,
- remark: null,
- parentGroup: null
- };
- vue.nodeGroup.parentGroup = {name: "<@spring.message 'nodegroup.root.group'/>", id: 0}; // 根节点组
- } else {
- // 获取节点组的业务系统 作为子节点组的业务系统
- vue.getParentSystem(node.systemId);
- vue.nodeGroup = {
- name: null,
- id: null,
- systemId: null,
- pid: null,
- remark: null,
- parentGroup: null
- };
- vue.nodeGroup.parentGroup = node;
- vue.$set(vue.nodeGroup.parentGroup, "name", node.nodeTitle);
- }
- vue.count = 1;
- this.open("<@spring.message 'common.add'/>");
- },
- update: function (node) {
- vue.$v.nodeGroup.$reset();
- $.ajax({
- type: "GET",
- url: baseURL + "nodegroup/detail?id=" + node.id,
- async: false, // 关闭异步
- dataType: "json",
- success: function (r) {
- vue.nodeGroup = r.data;
- }
- });
- vue.getParentSystem(node.systemId);
- vue.nodeGroup.parentGroup = node.getParentNode() == null ? {name: "<@spring.message 'nodegroup.root.group'/>", id: 0} : node.getParentNode();
- this.open("<@spring.message 'common.edit'/>");
- },
- saveOrUpdate: function () {
- if (!this.validate()) { // 在下方定义的validate方法
- return;
- }
- vue.count++;
- var url;
- if (vue.nodeGroup.id == null) {
- url = "nodegroup/save";
- } else {
- url = "nodegroup/update";
- }
- vue.$set(vue.nodeGroup, "pid", vue.nodeGroup.parentGroup.id);
- vue.$set(vue.nodeGroup, "systemId", vue.system == null ? null : vue.system.id);
- if (vue.nodeGroup.id) {
- vue.nodeGroup.pid = vue.nodeGroup.pids = vue.nodeGroup.systemId = null;
- }
- $.ajax({
- type: vue.nodeGroup.id == null ? "POST" : "PUT",
- url: baseURL + url,
- contentType: "application/json",
- data: JSON.stringify(vue.nodeGroup),
- success: function (r) {
- if (r.code === 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- vue.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- },
- delete: function (node) {
- var form = new FormData();
- form.append("id", node.id);
- $.ajax({
- type: "DELETE",
- url: baseURL + "nodegroup/delete",
- processData: false,
- contentType: false,
- mimeType: "multipart/form-data",
- data: form,
- success: function (r) {
- if (r.code == 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- vue.reload();
- location.reload();
- });
- } else {
- alert(r.msg);
- location.reload();
- }
- }
- });
- },
- getParentSystem: function (systemId) { // 获取父节点的业务系统
- $.ajax({
- type: "GET",
- url: baseURL + "/system/detail?id=" + systemId,
- async: false,
- dataType: "json",
- success: function (r) {
- vue.system = r.data;
- }
- });
- },
- open: function (title) {
- layer.open({
- area: ['540px', '100%'],
- shade: 0,
- title: title,
- type: 1,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $("#nodeGroupForm") // 本页面的元素
- });
- },
- validate: function () {
- vue.$v.nodeGroup.$touch();
- return !vue.$v.nodeGroup.$error;
- },
- reload: function () {
- if (vue.count == 1) {
- layer.closeAll();
- } else {
- location.reload();
- }
- },
- nodeChange: function(data) {
- vue.addUuids = data[0];
- vue.removeUuids = data[1];
- },
- openNodeRel: function() {
-
- // 置空
- vue.selectedNodes = vue.selectableNodes = [];
-
- // 已分配
- $.ajax({
- url: baseURL + "/node/list?groupId=" + vue.selectedNodeGroup.id +"&limit=9999&page=1",
- type: "GET",
- async: false,
- success: function (r) {
- vue.selectedNodes = r.data.list;
- }
- });
-
- // 可分配
- $.ajax({
- url: baseURL + "/nodegroup/assList?groupId=" + vue.selectedNodeGroup.id + "&systemId=" + vue.selectedNodeGroup.systemId + "&limit=9999&page=1",
- type: "GET",
- async: false,
- success: function (r) {
- vue.selectableNodes = r.data.list;
- }
- });
-
- // 重置子组件选中数量
- this.$refs.nodeRel.resetSelectedCount();
-
- layer.open({
- area: ['740px', '100%'],
- shade: 0.01,
- title: "<@spring.message 'nodegroup.assignNode'/>",
- type: 1,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $(".nodeRel"),
- end: function() {
- if (vue.addUuids.length > 0 || vue.removeUuids.length > 0) {
- confirm("<@spring.message 'common.confirmUpdateNodeRel'/>",function() {
- vue.assignNode();
- vue.count++;
- })
- }
- }
- });
- },
- assignNode: function() {
- var form = new FormData();
- form.append("id", vue.selectedNodeGroup.id);
- form.append("addUuids", vue.addUuids);
- form.append("removeUuids", vue.removeUuids);
- $.ajax({
- type: "POST",
- url: baseURL + "nodegroup/assignNode",
- processData: false,
- contentType: false,
- mimeType: "multipart/form-data",
- data: form,
- success: function (r) {
- if (r.code === 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- // vm.query();
- vue.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- }
- },
- created: function () {
- // 获取菜单数据
- $.ajax({
- type: "GET",
- url: baseURL + "nodegroup/list",
- async: false,
- dataType: "json",
- success: function (r) {
- data.systems = r.data.list;
- }
- });
- },
- mounted() {
- // 如果是global 下隐藏树
- if (data.systems.length > 1) {
- data.systems.forEach(item => {
- // 开始隐藏
- $("#box" + item.id).hide();
- });
- } else {
- // 其他业务系统展开树结构
- $("#box" + data.systems[0].id).show();
- // 如果只是一条数据的话 默认展开 图标状态转换
- $("#icon" + data.systems[0].id).removeClass("mytreeicon-open").addClass("mytreeicon-close");
- }
- }
-})
- </script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/node/nodeInfo.js b/nezha-admin/src/main/resources/templates/js/modules/node/nodeInfo.js
deleted file mode 100644
index 5302aa18..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/node/nodeInfo.js
+++ /dev/null
@@ -1,1627 +0,0 @@
-<script >
-$(function () {
-
- $("#jqGrid").jqGrid({
- url: baseURL + '/node/list',
- datatype: "json",
- colModel: [
- {label: "ID", name: 'uuid', width: 60, key: true, hidden: true},
- {label: '<@spring.message "common.name"/>', name: 'name', width: 60, sortable: false},
- {label: '<@spring.message "node.hostName"/>', name: 'hostName', width: 60, sortable: false},
- {label: '<@spring.message "node.ipAddress"/>', name: 'ip', width: 105, sortable: false, resizable: false},
- {label: '<@spring.message "node.type"/>', name: 'type', width: 60, sortable: false, formatter: typeFormat},
- {label: '<@spring.message "node.tag"/>', name: 'tagName', width: 60, sortable: false},
- /*{label: '<@spring.message "node.cabinet.name"/>', name: 'cabinetInfo.name', width: 60, sortable: false},
- {label: '<@spring.message "node.cabinetStart"/>', name: 'cabinetStart', width: 60, sortable: false},*/
- {label: '<@spring.message "node.uSize"/>', name: 'uSize', width: 60, sortable: false},
- {label: '<@spring.message "node.snmpPort"/>', name: 'snmpPort', width: 60, sortable: false},
- {label: '<@spring.message "node.snmpCommunity"/>', name: 'snmpCommunity', width: 60, sortable: false},
- {
- label: '<@spring.message "common.onLineState"/>',
- name: 'state', width: 60, sortable: false, formatter: stateFormat
- },
- {label: '<@spring.message "common.remark"/>', name: 'remark', width: 60, sortable: false},
- {label: "test", name: 'state', width: 60, sortable: false, hidden: true}//此列用作获取状态值
- ],
- viewrecords: true,
- height: typeof(isGroup) != "undefined" && isGroup ? top.$(".content").height()-167 : top.$(".content").height()-130,
- rowNum: 15,
- rowList : [15,30,50],
- /*height: 385,
- rowNum: 10,
- rowList: [10, 30, 50],*/
- rownumbers: true,
- rownumWidth: 25,
- autowidth: true,
- multiselect: true,
- pager: "#jqGridPager",
- jsonReader: {
- root: "data.list",
- page: "data.currPage",
- total: "data.totalPage",
- records: "data.totalCount"
- },
- prmNames: {
- page: "page",
- rows: "limit",
- order: "order"
- },
- gridComplete: function () {
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"}); // 隐藏grid底部滚动条
- },
- onSelectAll: function(rowids, status) {
- if (status) {
- toolsBtnHandle();
- }
- },
- onSelectRow: function(rowid,status) {
- toolsBtnHandle();
- }
-
- });
-
- // type值显示转化
- function typeFormat(cellvalue, options, rowObject) {
- return cellvalue == 1 ? "<@spring.message 'node.type.server'/>" : "<@spring.message 'node.type.net'/>";
- }
-
- // state值显示转化
- function stateFormat(cellvalue, options, rowObject) {
- return cellvalue == 1 ? "<font color='green'><@spring.message 'common.onLine'/></font>" : "<font color='red'><@spring.message 'common.offLine'/></font>";
- }
-
-});
-
-var groupTree1 = Vue.component('groupTree1', {
- template: "#treeTemplate",
- props: {
- znodes: { // 只包含用于生成树形结构的节点组列表
- type: Array
- },
- selectedNodeId: "",
- node: null, // 代表节点信息 包含业务系统和包含的节点组
- currentsystem: "" // 当前的业务系统
- },
- data() {
- return {
- selectedNode: {},
- setting: {
- view: {
- addHoverDom: this.addHoverDom,
- removeHoverDom: this.removeHoverDom,
- showIcon: false,
- nameIsHTML: true // 名称支持Html标签转换
- },
- edit: {
- enable: true,
- removeTitle: "<@spring.message 'common.delete'/>",
- renameTitle: "<@spring.message 'common.edit'/>"
- },
- data: {
- simpleData: {
- enable: true,
- idKey: "id",
- pIdKey: "pid",
- rootPId: 0
- },
- key: {
- title: "nodeTitle" // 因为name 拼接了带有html的字段 所以默认的title 会展示html标签
- }
- },
- check: {
- enable: true,
- checkStyle: "checkbox",
- nocheckInherit: true,
- chkboxType: {"Y": "", "N": ""}
- },
- callback: {
- beforeRemove: this.beforeRemove, // 删除callback
- beforeCheck: this.beforeCheck, // 修改callback
- beforeEditName: this.beforeEditName, // 点击编辑时触发,用来判断该节点是否能编辑
- onCheck: this.zTreeOnCheck // 选中时触发
- }
- },
- zTree: null // 当前ztreeobject
- };
- },
- methods: {
- // 初始化ztree
- init() {
- // 获取当前的集合
- this.znodes.forEach(item => {
- this.$set(item,"nodeTitle",item.name);
- if (item.allowAss == 1){ // 证明是叶子节点
- var count = "";
- $.ajax({
- type: "GET",
- url: baseURL + "nodegroup/getNodeCount?id="+item.id,
- async: false,
- dataType: "json",
- success: function (r) {
- count = r.data;
- }
- });
- this.$set(item,"name",item.name + " <font color='gray'>("+ count +")</font>");
- }
- });
- // 生成树结构
- this.zTree = $.fn.zTree.init($("#treeDemo" + this.node.id), this.setting, this.znodes);
- this.zTree.expandAll(true);
- },
- // 删除
- beforeRemove: function (treeId, treeNode) {
- var parent = this.$parent;
- confirm("<@spring.message 'common.confirmDelete'/>", function () {
- parent.deleteNodeGroup(treeNode);
- });
- return false;
- },
- // 鼠标移除删除添加按钮
- removeHoverDom: function (treeId, treeNode) {
- $("#addBtn_" + treeNode.tId).unbind().remove();
- },
- addRootGroup: function () {
- // 将数据传至父组件 也就是外面的vm 实例中进行添加操作
- this.$emit('addrootgroup', this.node, true);
- },
- // 鼠标划过展示功能按钮
- addHoverDom: function (treeId, treeNode) {
- var parent = this.$parent;
- var sObj = $("#" + treeNode.tId + "_span");
- if (treeNode.editNameFlag || $("#addBtn_" + treeNode.tId).length > 0 || treeNode.allowSub == 0) { // 可以让不可添加的按钮隐藏
- return;
- }
- // 添加子节点组
- var addStr = "<span class='button add' id='addBtn_" + treeNode.tId + "' title='<@spring.message 'common.add'/><@spring.message 'nodegroup.child.group'/>' onfocus='this.blur();'></span>";
- sObj.append(addStr);
- var btn = $("#addBtn_" + treeNode.tId);
- if (btn) btn.bind("click", function () {
- parent.addNodeGroup(treeNode, false);
- return false; // 结束方法
- });
- },
- // 鼠标移除删除添加按钮
- removeHoverDom: function (treeId, treeNode) {
- $("#addBtn_" + treeNode.tId).unbind().remove();
- },
- beforeEditName: function (treeId, treeNode) { // 修改
- this.$parent.updateNodeGroup(treeNode);
- return false;
- },
- beforeCheck: function(treeId, treeNode){ // 选择前判断是否可选
- if(treeNode.allowAss == "1"){ // 允许选择
- return true;
- }
- layer.msg("此节点组不支持分配节点");
- return false;
- },
- zTreeOnCheck: function(event, treeId, treeNode){
- if (treeNode.checked) {
- // 节点页面展示业务系统名
- treeNode.systemName = this.node.name;
- // 节点页面展示节点组层级路径
- treeNode.absoluteGroupPath = this.getNodePath(treeNode);
- this.$emit("tree-select", treeNode);
- } else {
- this.$emit("tree-unselect", treeNode);
- }
- },
- forUpdateNode:function(nodeIds){ // 修改时调用此方法
- var temp = this;
- nodeIds.forEach(item=>{
- var nodeObj = this.zTree.getNodesByParam("id", item.groupId, null);
- if (nodeObj.length >0){
- // 1. 将节点组名称层级关系传递父组件
- var currNode = nodeObj[0];
- currNode.systemName = this.node.name;
- currNode.absoluteGroupPath = temp.getNodePath(currNode);
- temp.$emit("tree-select", currNode);
- // 2. 节点状态选中
- currNode.checked = true;
- this.zTree.updateNode(currNode, true);
- }
- });
- },
- getNodePath: function(treeNode){ // 递归拼接节点组层级关系
- if (treeNode==null) return "";
- var nodeName = treeNode.nodeTitle;
- var pNode = treeNode.getParentNode();
- if (pNode!=null){
- nodeName = this.getNodePath(pNode) +"/"+ nodeName;
- }
- return nodeName;
- },
- uncheckTreeData: function(node){
- if (node.systemId != this.node.id){
- return;
- } else {
- this.showCurrTree(this.node);
- }
- var nodes = this.zTree.getNodesByParam("id",node.id,null);
- for (var i = 0; i < nodes.length; i++) {
- this.zTree.checkNode(nodes[i],false,true);
- }
- },
- myFilter: function(node){
- // return (node.showCurrTree != undefined);
- },
- // 一下是 展示/样式相关方法
- showTree: function (item) {
- $("#box" + item.id).toggle(200);
- if ($("#icon" + item.id).hasClass("mytreeicon-open")) {
- $("#icon" + item.id).removeClass("mytreeicon-open").addClass("mytreeicon-close");
- } else {
- $("#icon" + item.id).removeClass("mytreeicon-close").addClass("mytreeicon-open");
- }
- },
- showCurrTree: function(item){
- $("#box" + item.id).show(200);
- },
- showBtn: function (item) {
- $("#icon2" + item.id).css("display", "inline-block");
- },
- hideBtn: function (item) {
- $("#icon2" + item.id).hide();
- },
- showBtn2: function (item) {
- $("#icon2" + item.id).removeClass("mytreeicon-add_unact").addClass("mytreeicon-add_act");
- },
- hideBtn2: function (item) {
- $("#icon2" + item.id).removeClass("mytreeicon-add_act").addClass("mytreeicon-add_unact");
- },
- },
- watch: {
- "znodes": function(newValue,oldValue) {
- // 当长度发生变化时 更新该树 也就是添加和删除操作的时候
- if (newValue.length != oldValue.length) {
- console.log(this.node.name + " tree should update")
- // 之前选中的节点集合
- var checkedNodes = this.zTree.getCheckedNodes();
-
- // 重新渲染该树
- this.init();
-
- // 转换为当前treeObj内部的treenode
- var nodes = [];
- for (var i = 0; i < checkedNodes.length; i++) {
- nodes = nodes.concat(this.zTree.getNodesByParam("id",checkedNodes[i].id,null));
- }
- // 回显状态
- for (var i = 0; i < nodes.length; i++) {
- this.zTree.checkNode(nodes[i],true);
- }
- }
- }
- },
- mounted() {
- // 初始化ztree
- this.init();
- // 如果是global 下隐藏树
- if (this.currentsystem.id > 1) { // 当前不是global
- $("#box" + this.node.id).show();
- // 如果只是一条数据的话 默认展开 图标状态转换
- $("#icon" + this.node.id).removeClass("mytreeicon-open").addClass("mytreeicon-close");
- } else {
- $("#box" + this.node.id).hide();
- }
- },
- updated: function(){
- // console.log("data 数据更新")
- }
-});
-
-// 注册select组件
-Vue.component('multiselect', window.VueMultiselect.default);
-
-// 引用校验规则 所有校验规则见 https://vuelidate.netlify.com/#sub-v-values
-Vue.use(window.vuelidate.default);
-var required = window.validators.required;
-var ipAddress = window.validators.ipAddress;
-var numeric = window.validators.numeric;
-var minValue = window.validators.minValue;
-var integer = window.validators.integer;
-// 引入自定义校验规则助手 helpers
-var helpers = window.validators.helpers;
-
-// 自定义规则,;第一个参数是当前字段值,第二个参数是当前校验的整个对象(此处是vue.data.nodeInfo)
-var nameCheck = function (value, nodeInfo) {
- if (helpers.req(value)) {
- var flag = true;
- var params = "?name=" + value;
- if (nodeInfo.uuid) {
- params += "&uuid=" + nodeInfo.uuid;
- }
- $.ajax({
- type: "GET",
- url: baseURL + "node/nodeNameCheck" + params,
- async: false,
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-// ip 唯一校验 特殊IP : IP存在与其他业务系统 则回显该节点数据 点击保存维护与当前系统的关系
-var ipCheck = function (value, nodeInfo) {
-
- if (helpers.req(value)) {
- var flag = true;
- var params = "?ip=" + value;
- if (nodeInfo.uuid) {
- params += "&uuid=" + nodeInfo.uuid;
- }
-
- // IP 标识
- if (vm.ipFlag) {
- vm.oldNodeInfos.splice(0, 1, JSON.parse(JSON.stringify(vm.nodeInfo))); // 记录当前用户输入的内容
- } else {
- vm.oldNodeInfos.splice(1, 1, JSON.parse(JSON.stringify(vm.nodeInfo))); // 记录特殊IP对象数据
- }
-
- $.ajax({
- type: "GET",
- url: baseURL + "node/ipCheck" + params,
- async: false,
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- if (r.data) { // 存在data 则证明此IP存在于其他业务系统
- vm.ipFlag = false;
- var data = r.data;
- // 页面挂载对象赋值
- vm.$set(vm.nodeInfo, 'name', data.name);
- vm.$set(vm.nodeInfo, 'hostName', data.hostName);
- vm.$set(vm.nodeInfo, 'uSize', data.uSize);
- vm.$set(vm.nodeInfo, 'userName', data.userName);
- vm.$set(vm.nodeInfo, 'snmpPort', data.snmpPort);
- vm.$set(vm.nodeInfo, 'snmpCommunity', data.snmpCommunity);
- vm.$set(vm.nodeInfo, 'password', data.password);
- vm.$set(vm.nodeInfo, 'remark', data.remark);
-
- // 回显state
- vm.nodeStates.some(item => {
- if (item.code == data.state) {
- vm.$set(vm.nodeInfo, 'state', item);
- return true;
- }
- });
- // 回显type
- vm.nodeTypes.some(item => {
- if (item.code == data.type) {
- vm.$set(vm.nodeInfo, 'type', item);
- return true;
- }
- });
- // 深克隆tag 接下来的方法会影响tag的值
- var tag = JSON.parse(JSON.stringify(data.tag));
- vm.getTags(); // 动态获取Tags
- // 回显tag
- vm.nodeTags.some((item, index) => {
- if (item.code == tag) {
- vm.$set(vm.nodeInfo, 'tag', item);
- return true;
- }
- });
- // 查询可用位置
- vm.getRooms(data.uuid);
- // 回显机房
- vm.rooms.some(item => {
- if (item.roomName == data.roomName) {
- vm.$set(vm.nodeInfo, 'nodeRoom', item);
- vm.cabinets = item.cabinets;
- return true;
- }
- });
-
- if (data.cabinetId == 0 || data.cabinetId == null) { // 未指定机柜情况
- vm.nodeInfo.cabinetId = vm.nodeInfo.cabinetStart = null; // 赋空值 select placeholder属性 model为null显示
- }
- // 回显机柜
- vm.cabinets.some(item => {
- if (data.cabinetInfo != null && item.id == data.cabinetInfo.id) {
- vm.$set(vm.nodeInfo, "cabinetId", item);
- vm.starts = item.starts;
- return true;
- }
- });
- // 回显起始位置
- vm.$set(vm.nodeInfo, 'cabinetStart', data.cabinetStart);
-
- // 将表单锁定 除却 IP
- $('form').find('input').not("#ipAddress").prop('readonly', true);
- vm.disabledFlag = true;
- vm.$v.nodeInfo.$reset(); // 递归清空校验状态
- } else {
- vm.ipFlag = true;
- // 拿到用户输入的表单数据
- var back = vm.oldNodeInfos[0];
-
- // 给挂载对象回显 为null 则不回显
- vm.$set(vm.nodeInfo, 'name', back.name);
- vm.$set(vm.nodeInfo, 'hostName', back.hostName);
- vm.$set(vm.nodeInfo, 'uSize', back.uSize);
- vm.$set(vm.nodeInfo, 'snmpPort', back.snmpPort);
- vm.$set(vm.nodeInfo, 'snmpCommunity', back.snmpCommunity);
- vm.$set(vm.nodeInfo, 'userName', back.userName);
- vm.$set(vm.nodeInfo, 'password', back.password);
- vm.$set(vm.nodeInfo, 'remark', back.remark);
-
- // 从新根据条件查询 下拉框数据 并回显数据
- if (back.state != null) {
- vm.nodeStates.some(item => {
- if (item.code == back.state.code) {
- vm.$set(vm.nodeInfo, 'state', item);
- return true;
- }
- });
- } else {
- vm.$set(vm.nodeInfo, 'state', null);
- }
- if (back.type != null) {
- vm.nodeTypes.some((item, index) => {
- if (item.code == back.type.code) {
- vm.$set(vm.nodeInfo, 'type', item);
- return true;
- }
- });
- } else {
- vm.$set(vm.nodeInfo, 'type', null);
- }
- vm.getTags();
- if (back.tag != null) {
- vm.nodeTags.some(item => {
- if (item.code == back.tag.code) {
- vm.$set(vm.nodeInfo, 'tag', item);
- return true;
- }
- });
- } else {
- vm.$set(vm.nodeInfo, 'tag', null);
- }
- // 查询可用位置
- if (back.nodeRoom != null) {
- // 回显机房
- vm.rooms.some(item => {
- if (item.roomName == back.nodeRoom.roomName) {
- vm.$set(vm.nodeInfo, 'nodeRoom', item);
- vm.cabinets = item.cabinets;
- return true;
- }
- });
- } else {
- vm.$set(vm.nodeInfo, 'nodeRoom', null);
- }
- if (back.cabinetId == 0 || back.cabinetId == null) { // 未指定机柜情况
- vm.nodeInfo.cabinetId = vm.nodeInfo.cabinetStart = null; // 赋空值 select placeholder属性 model为null显示
- } else {
- // 回显机柜
- vm.cabinets.some(item => {
- if (item.id == back.cabinetId.id) {
- vm.$set(vm.nodeInfo, "cabinetId", item);
- vm.starts = item.starts;
- return true;
- }
- });
- }
- vm.$set(vm.nodeInfo, 'cabinetStart', back.cabinetStart);
-
- // 将表单恢复可写模式
- $('form').find('input').prop('readonly', false);
- vm.disabledFlag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-// 机柜必选状态
-var cabRequired = function (value, nodeInfo) {
- if (nodeInfo.nodeRoom != null && value == null) {
- return false;
- }
- return true;
-}
-// 起始位置必选状态
-var startRequired = function (value, nodeInfo) {
- if (nodeInfo.nodeRoom != null && value == null) {
- return false;
- }
- return true;
-}
-// 节点U位必选状态
-var sizeRequired = function (value, nodeInfo) {
- if (nodeInfo.nodeRoom != null || nodeInfo.cabinetId != null) {
- if (value == null || value == '') {
- return false;
- }
- }
- return true;
-}
-// 节点组名称校验
-var groupNameCheck = function (value, nodeGroup) {
- if (helpers.req(value)) {
- var flag = true;
- var params = "?name=" + value + "&pid=" + vm.nodeGroupDto.parentGroup.id;
- if (nodeGroup.id) {
- params += "&id=" + nodeGroup.id;
- }
- if (nodeGroup.parentGroup.id == 0) { // 添加的是根节点 则参数需要传业务ID
- params += "&systemId=" + vm.system.id;
- }
- $.ajax({
- type: "GET",
- url: baseURL + "nodegroup/groupNameCheck" + params,
- async: false,
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-// 节点标签value值唯一校验
-var nodeTagValueCheck = function(value,nodeTag) {
- if (helpers.req(value)){
- var flag = true;
- var params = "?name=" + nodeTag.name + "&type=" + nodeTag.type + "&value=" + nodeTag.value;
- $.ajax({
- type: "GET",
- url: baseURL + "sys/dict/dictValueCheck" + params,
- async: false,
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-
-var data = {
- showList: true, // 节点列表的显示与隐藏
- showGroupTree: true, // nodeGroups tree 展示与隐藏
- showGroupForm: true, // nodeGroup form 展示与隐藏
- showNodeTagsForm: true,// node tags form 展示与隐藏
- title: "<@spring.message 'common.add'/>",
- cabStartTitle: "<@spring.message 'common.pleaseSelect'/>",
- uSizeValidateFlag: false, // 节点高度提示信息标识
- nodeTypeValidateFlag: false,// 节点类型提示信息标识
- nodeList: [],
- q: {
- name: null, type: null, state: null, ip: null, tag: null
- },
- nodeTypes: [], // 创建实例时从字典中获取
- nodeStates: [],// 创建实例时从字典中获取
- nodeTags: [{name: null, value: null}], // 添加页面tags
- queryTags: [], // 查询tags 用于与添加页面tags 区分
- rooms: [],
- cabinets: [],
- starts: [],
- nodeInfo: {
- id: null,
- uuid: null,
- name: null,
- hostName: null,
- ip: null,
- type: {},
- tag: null,
- userName: null,
- password: null,
- state: null,
- cabinetId: null,
- cabinetStart: null,
- uSize: 1,
- snmpPort: null,
- snmpCommunity: null,
- remark: null,
- nodeRoom: null,
- systems: []
- },
- nodeInfoDto: null,
- nodeGroup: null, // 节点组页面搜索使用
- nodeGroupDto: { // 节点添加选择节点组 表单绑定对象
- name: null,
- id: null,
- systemId: null,
- pid: null,
- remark: null,
- parentGroup: {
- id: null,
- name: null
- }
- },
- nodeTag: {
- value: null,
- name: null,
- type: null,
- code: null,
- relationNodeType: null // 关联的节点类型
- }, // 设备标签对象
- isAdvancedSearch: false, // 高级搜索状态控制
- disabledFlag: false, // 表单锁定状态控制
- oldNodeInfos: [], // 增加/修改 回显旧对象数组
- ipFlag: true, // IP 标识 存在其他业务系统则为 true,
- showIp: true,
- selectFlag1: false,
- selectItems1: ["IP", "<@spring.message 'common.name'/>"],
- selectedItem1: "IP",
- // single multi 控制工具栏单选 多选可点击状态
- single: true,
- multi: true,
- systemsContainGroups: null, // 业务系统和节点组集合
- system: { // 当前业务系统 节点组添加修改时使用
- id: null,
- name: null
- },
- currentZIndex: null, // 当前弹出层zIndex值 弹出节点组页面后再弹出节点组操作时用于关闭节点组表单
- checkedGroups: [], // 当前节点选中的节点组 数据为ztree 节点数据 包含ztree node 属性
- currentSystem: null, // 当前业务系统ID
- groupTreeLayerId: null, // 节点组树的layerId
- systemList: null, // 业务系统集合
- selectedSystems: [] // 选中的业务系统
-};
-
-Vue.config.devtools = true;
-var vm = new Vue({
- el: '#nodeInfoApp',
- data: this.data,
- validations: {
- nodeInfo: {
- name: {
- required, nameCheck
- },
- ip: {
- required, ipAddress, ipCheck
- },
- type: {
- required
- },
- snmpPort: {
- numeric
- },
- state: {
- required
- },
- uSize: {
- integer, minValue: minValue(1), sizeRequired
- },
- cabinetId: {
- cabRequired
- },
- cabinetStart: {
- startRequired
- }
- },
- nodeGroupDto: {
- name: {
- required, groupNameCheck
- }
- },
- nodeTag: {
- value: {
- required, nodeTagValueCheck
- }
- }
- },
- methods: {
- // node
- query: function () {
- this.reload();
- },
- reset: function () {
- vm.q.name = vm.q.type = vm.q.state = vm.q.ip = vm.q.tag = null;
- vm.query();
- },
- getInfo: function (uuid) {
- $.ajax({
- type: "GET",
- url: baseURL + "node/detail?uuid=" + uuid,
- async: false,
- dataType: "json",
- success: function (r) {
- vm.nodeInfo = r.data;
- }
- });
- // 解决下拉框回显问题
- vm.nodeStates.some((item, index) => {
- if (item.code == vm.nodeInfo.state) {
- vm.$set(vm.nodeInfo, 'state', item);
- return true;
- }
- });
- vm.nodeTypes.some((item, index) => {
- if (item.code == vm.nodeInfo.type) {
- vm.$set(vm.nodeInfo, 'type', item);
- return true;
- }
- });
- var tag = JSON.parse(JSON.stringify(vm.nodeInfo.tag));
- this.getTags();
- vm.nodeTags.some((item, index) => {
- if (item.code == tag) {
- vm.$set(vm.nodeInfo, 'tag', item);
- return true;
- }
- });
- // 查询可用位置
- vm.getRooms();
-
- // 回显机房
- vm.rooms.some(item => {
- if (item.roomName == vm.nodeInfo.roomName) {
- vm.$set(vm.nodeInfo, 'nodeRoom', item);
- vm.cabinets = item.cabinets;
- return true;
- }
- });
-
- if (vm.nodeInfo.cabinetId == 0) { // 未指定机柜情况
- vm.nodeInfo.cabinetId = vm.nodeInfo.cabinetStart = null; // 赋空值 select placeholder属性 model为null显示
- }
-
- // 回显机柜
- vm.cabinets.some(item => {
- if (vm.nodeInfo.cabinetInfo != null && item.id == vm.nodeInfo.cabinetInfo.id) {
- vm.$set(vm.nodeInfo, "cabinetId", item);
- vm.starts = item.starts;
- return true;
- }
- });
-
- // 先置空
- vm.selectedSystems = [];
- // 查询所属业务系统
- $.ajax({
- type: "GET",
- url: baseURL + "node/querySystemsByUuid?uuid=" + uuid,
- async: false,
- dataType: "json",
- success: function (r) {
- vm.selectedSystems = r.data;
- }
- });
- },
- add: function () {
- vm.$v.nodeInfo.$reset(); // 进入新增页面时,将校验的触发状态清空($dirty=true -> false)
- // 表单状态可写模式
- $('form').find('input').prop('readonly', false);
- vm.disabledFlag = false;
- vm.showList = false;
- vm.title = "<@spring.message 'common.add'/>";
- vm.nodeInfo = {
- id: null,
- uuid: null,
- name: null,
- hostName: null,
- ip: null,
- type: null,
- tag: null,
- userName: null,
- password: null,
- state: null,
- cabinetId: null,
- cabinetStart: null,
- uSize: 1,
- snmpPort: null,
- snmpCommunity: null,
- remark: null,
- nodeRoom: null
- };
- vm.nodeInfoDto = null;
- vm.cabinets = [];
- // 重新获取可用机柜信息
- this.getRooms();
- // 初始化 节点组信息
- vm.systemsContainGroups = [];
- vm.selectedSystems = [];
- vm.checkedGroups = [];
- // 默认在线状态为上线
- vm.nodeStates.some(item=>{
- if(item.code == 1){
- vm.nodeInfo.state = item;
- return true;
- }
- });
- // 是global 的情况下可以选择业务系统
- if (vm.currentSystem.id == "1") {
- // 获取业务系统列表
- vm.getSystemList();
- }
- },
- update: function () {
- vm.$v.nodeInfo.$reset(); // 进入修改页面时,将校验触发状态清空($dirty=true -> false)
- // 表单状态可写模式
- $('form').find('input').prop('readonly', false);
- vm.disabledFlag = false;
- var uuid = getSelectedRow();
- if (uuid == null) {
- return;
- }
- vm.showList = false;
- // 初始化 节点组信息
- vm.systemsContainGroups = [];
- vm.checkedGroups = [];
- vm.title = "<@spring.message 'common.edit'/>";
- // 是global 的情况下可以选择业务系统
- if (vm.currentSystem.id == "1") {
- // 获取业务系统列表
- vm.getSystemList();
- }
- // 查询详情
- this.getInfo(uuid);
- // 查询当前系统
- vm.getCurrentSystem();
- // 查询是否关联节点组
- this.getNodeGroupsById(uuid);
- },
- del: function (event) {
- var ids = getSelectedRows();
- if (ids == null) {
- return;
- }
- confirm("<@spring.message 'common.confirmDelete'/>", function () {
- // update / del 表单方式提交
- var form = new FormData();
- form.append("uuids", ids);
- form.append("state", "3");
- $.ajax({
- type: "PUT",
- url: baseURL + "node/changeState",
- processData: false,
- contentType: false,
- mimeType: "multipart/form-data",
- data: form,
- success: function (r) {
- if (r.code == 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- });
- },
- changeState: function (state) {
- var ids = getSelectedRows();
- if (ids == null) {
- return;
- }
- var statelist = []; // 定义选中状态集合
- for (let i in ids) {
- var rowData = $("#jqGrid").jqGrid('getRowData', ids[i]);
- statelist.push(rowData);
- }
- // 判断是否已经上/下线
- var flag = statelist.find(item => {
- return item.state == state;
- });
- if (flag == undefined) { // 未找到相同状态的
- var form = new FormData();
- form.append("uuids", ids);
- form.append("state", state);
- $.ajax({
- type: "PUT",
- url: baseURL + "node/changeState",
- processData: false,
- contentType: false,
- mimeType: "multipart/form-data",
- data: form,
- success: function (r) {
- if (r.code == 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- } else {
- alert(flag.name + " <@spring.message 'node.already'/> " + (state == 1 ? "<@spring.message 'common.onLine'/>" : "<@spring.message 'common.offLine'/>"));
- }
- },
- saveOrUpdate: function () {
- if (!vm.disabledFlag) { // 表单没有锁定
- if (!vm.validateNodeInfo()) { // 校验表单内属性
- return;
- }
- }
- var url;
- if (vm.nodeInfo.uuid == null) {
- url = "node/save";
- } else {
- url = "node/update";
- }
- vm.nodeInfoDto = JSON.parse(JSON.stringify(vm.nodeInfo));
- vm.$set(vm.nodeInfoDto, 'type', vm.nodeInfo.type.code);
- vm.$set(vm.nodeInfoDto, 'tag', vm.nodeInfo.tag == null ? null : vm.nodeInfo.tag.code);
- vm.$set(vm.nodeInfoDto, 'state', vm.nodeInfo.state.code);
- vm.$set(vm.nodeInfoDto, 'cabinetId', vm.nodeInfo.cabinetId == null ? null : vm.nodeInfo.cabinetId.id);
- if (vm.checkedGroups.length > 0) {
- /*var groupIds = vm.checkedGroups.map(function(item) {
- return item.id;
- });*/
- vm.$set(vm.nodeInfoDto , 'groups', vm.checkedGroups);
- }
- if (vm.selectedSystems.length > 0) {
- vm.$set(vm.nodeInfoDto, 'systems', vm.selectedSystems);
- }
- $.ajax({
- type: vm.nodeInfo.uuid == null ? "POST" : "PUT",
- url: baseURL + url,
- contentType: "application/json",
- data: JSON.stringify(vm.nodeInfoDto),
- success: function (r) {
- if (r.code === 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- },
- reload: function () {
- vm.single = vm.multi = true;
- vm.showList = true;
- var page = $("#jqGrid").jqGrid('getGridParam', 'page');
- $("#jqGrid").jqGrid('setGridParam', {
- postData: {
- "name": vm.q.name,
- "ip": vm.q.ip,
- "type": vm.q.type == null ? null : vm.q.type.code,
- "tag": vm.q.tag == null ? null : vm.q.tag.code,
- "state": vm.q.state == null ? null : vm.q.state.code,
- "groupId": vm.nodeGroup == null ? null : vm.nodeGroup.id
- },
- page: 1
- }).trigger("reloadGrid");
- // 销毁组件
- vm.systemsContainGroups = [];
- layer.closeAll();
- },
- getTags: function () {
- // 清空缓存
- vm.nodeInfo.tag = null;
- if (vm.nodeInfo.type != null) {
- // 重置状态
- vm.nodeTypeValidateFlag = false;
- // 字典中tag type属性命名为 nodeTag + server (1) / net (2)
- var param = "?type=" + "nodeTag" + vm.nodeInfo.type.code;
- $.ajax({
- type: "GET",
- url: baseURL + "sys/dict/list" + param,
- async: false,
- dataType: "json",
- success: function (r) {
- vm.nodeTags = r.page.list;
- }
- });
- }
- if (vm.nodeInfo.type != null && vm.nodeInfo.type.code == 2) {
- vm.$set(vm.nodeInfo, 'snmpPort', vm.nodeInfo.snmpPort == null ? 161 : vm.nodeInfo.snmpPort);
- vm.$set(vm.nodeInfo, 'snmpCommunity', vm.nodeInfo.snmpCommunity == null ? "public" : vm.nodeInfo.snmpCommunity);
- } else {
- vm.nodeInfo.snmpPort = vm.nodeInfo.snmpCommunity = null;
- }
- },
- getRooms: function (uuid) {
- var params = "?uSize=" + data.nodeInfo.uSize;
- if (data.nodeInfo.uuid != null) {
- params += "&uuid=" + data.nodeInfo.uuid;
- }
- if (uuid != null) {
- params += "&uuid=" + uuid;
- }
- $.ajax({
- type: "GET",
- url: baseURL + "node/selectCab" + params,
- async: false,
- dataType: "json",
- success: function (r) {
- vm.rooms = r.data.list;
- }
- });
- },
- getCabinets: function (event) { // 获取机房下机柜列表
- if (vm.nodeInfo.nodeRoom != null && event != null && vm.nodeInfo.nodeRoom.roomId == event.roomId) { // 没有切换机房的情况
- return;
- }
- vm.nodeInfo.cabinetId = vm.nodeInfo.cabinetStart = null;
- vm.cabinets = vm.starts = [];
- if (vm.rooms != null && vm.nodeInfo.nodeRoom != null) {
- vm.rooms.some(item => {
- if (vm.nodeInfo.nodeRoom.roomName == item.roomName) {
- vm.cabinets = item.cabinets;
- return true;
- }
- });
- }
- },
- getStarts: function (event) { // 获取机柜下可用的起始位置
- if (vm.nodeInfo.cabinetId != null && event != null && vm.nodeInfo.cabinetId.id == event.id) { // 没有切换机柜的情况
- return;
- }
- if (vm.nodeInfo.uSize == null || vm.nodeInfo.uSize == "") {
- return;
- }
- vm.nodeInfo.cabinetStart = null;
- vm.starts = [];
- vm.cabinets.some(item => {
- if (vm.nodeInfo.cabinetId != null && vm.nodeInfo.cabinetId.name == item.name) {
- vm.starts = item.starts;
- return true;
- }
- });
- if (vm.nodeInfo.cabinetId == null) {
- vm.cabStartTitle = "<@spring.message 'common.pleaseSelect'/>";
- return;
- }
- if (vm.starts.length < 1) { // 没有起始位置可选
- vm.cabStartTitle = "<@spring.message 'node.notEnough.position'/>";
- }else{
- vm.cabStartTitle = "<@spring.message 'common.pleaseSelect'/>";
- }
- },
- getNodeGroupsById: function(uuid){ // 根据节点ID获取所属节点组集合
- var groups;
- $.ajax({
- type: "GET",
- url: baseURL + "node/getGroupsById?uuid=" + uuid,
- async: false,
- dataType: "json",
- success: function (r) {
- groups = r.data;
- }
- });
- // 该节点包含节点组
- if (groups != undefined && groups != null && groups.length > 0) {
- // 生成组件
- vm.getSystemsContainGroups();
- // 在DOM更新之后指定nextTick中的函数
- this.$nextTick(()=>{
- for (let i = 0; i < vm.$refs.gtree.length; i++) {
- var refObj = vm.$refs.gtree[i];
- // 修改回显 1. 回显节点组 2. 将选中的节点组名称传递出来
- refObj.forUpdateNode(groups);
- }
- })
- }
- },
- getCurrentSystem: function(){
- // 获取当前业务系统ID
- $.ajax({
- type: "GET",
- url: baseURL + "system/detail",
- async: false,
- dataType: "json",
- success: function (r) {
- data.currentSystem = r.data;
- }
- });
- },
- getSystemList: function() { // 获取业务系统集合 (节点选择业务系统使用)
- $.ajax({
- type: "GET",
- url: baseURL + "system/list?limit=999",
- async: false,
- dataType: "json",
- success: function (r) {
- vm.systemList = r.data.list;
- }
- });
- },
- checkUsize: function(){
- if (vm.nodeInfo.uSize == "") {
- // 节点高度提示标识
- vm.uSizeValidateFlag = true;
- //vm.rooms = vm.cabinets = vm.starts = [];
- //vm.nodeInfo.nodeRoom = vm.nodeInfo.cabinetId = vm.nodeInfo.uSize = null;
- }
- },
- checkNodeType: function(){
- if (vm.nodeInfo.type == null) {
- vm.nodeTypeValidateFlag = true;
- }
- },
- validateNodeInfo: function () {
- vm.$v.nodeInfo.$touch();
- return !vm.$v.nodeInfo.$error;
- },
- validateGroup: function () { // 节点组表单校验
- vm.$v.nodeGroupDto.$touch();
- return !vm.$v.nodeGroupDto.$error;
- },
- validateNodeTag: function(){
- vm.$v.nodeTag.$touch();
- return !vm.$v.nodeTag.$error;
- },
- advancedSearch: function () { //高级搜索
- this.isAdvancedSearch = !this.isAdvancedSearch;
- if (!this.isAdvancedSearch) {
- vm.q.state = vm.q.tag = null;
- }
- },
- adSearchDropdown1: function() {
- this.selectFlag1 = !this.selectFlag1;
- },
- changeAdSearch1: function(item) {
- this.selectedItem1 = item;
- },
- // group
- showNodeGroups: function () {
- if (vm.systemsContainGroups != null && vm.systemsContainGroups.length > 0) {
- if (vm.checkedGroups != null && vm.checkedGroups.length > 0) {
- vm.checkedGroups.forEach(item=>{
- $("#box" + item.systemId).show();
- })
- }
- vm.showGroupTree = false;
- this.openGroupTree("<@spring.message 'common.selectNodeGroup'/>");
- return;
- }
-
- // 获取菜单数据
- vm.getSystemsContainGroups();
- vm.showGroupTree = false;
- this.openGroupTree("<@spring.message 'common.selectNodeGroup'/>");
- },
- getSystemsContainGroups: function(){ // 获取菜单数据 包含业务系统和节点组信息
- $.ajax({
- type: "GET",
- url: baseURL + "nodegroup/list",
- async: false,
- dataType: "json",
- success: function (r) {
- vm.systemsContainGroups = r.data.list;
- }
- });
- },
- getParentSystem: function (systemId) { // 获取父节点的业务系统
- $.ajax({
- type: "GET",
- url: baseURL + "/system/detail?id=" + systemId,
- async: false,
- dataType: "json",
- success: function (r) {
- vm.system = r.data;
- }
- });
- },
- existSystemName: function(sysName) {
- return vm.systemNames.indexOf(sysName);
- },
- addNodeGroup: function (nodeGroup, isRoot) {
- vm.$v.nodeGroupDto.$reset();
- if (isRoot) { // 添加根节点组
- vm.showGroupForm = true;
- // 获取当前权限
- vm.system = nodeGroup;
- vm.nodeGroupDto = {
- name: null,
- id: null,
- systemId: null,
- pid: null,
- remark: null,
- parentGroup: null
- };
- vm.nodeGroupDto.parentGroup = {name: "<@spring.message 'nodegroup.root.group'/>", id: 0}; // 根节点组
- } else {
- // 获取节点组的业务系统 作为子节点组的业务系统
- vm.getParentSystem(nodeGroup.systemId);
- vm.showGroupForm = true;
- vm.nodeGroupDto = {
- name: null,
- id: null,
- systemId: null,
- pid: null,
- remark: null,
- parentGroup: null
- };
- vm.nodeGroupDto.parentGroup = nodeGroup;
- vm.$set(vm.nodeGroupDto.parentGroup,"name",nodeGroup.nodeTitle);
- }
- this.openGroupForm("<@spring.message 'common.add'/>");
- },
- deleteNodeGroup: function(nodeGroup){
- // 1. 删除节点组
- var form = new FormData();
- form.append("id", nodeGroup.id);
- $.ajax({
- type: "DELETE",
- url: baseURL + "nodegroup/delete",
- processData: false,
- contentType: false,
- mimeType: "multipart/form-data",
- data: form,
- success: function (r) {
- if (r.code == 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- // 从新挂载节点组tree
- vm.getSystemsContainGroups();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- // 2. checkedgroups 中 含有删除的节点组 一并移除
- if(vm.checkedGroups.length > 0){
- vm.checkedGroups.forEach(function (item,index) {
- if(item.id == nodeGroup.id){
- vm.checkedGroups.splice(index,1);
- }
- })
- }
- },
- updateNodeGroup: function(nodeGroup){
- vm.$v.nodeGroupDto.$reset();
- $.ajax({
- type: "GET",
- url: baseURL + "nodegroup/detail?id=" + nodeGroup.id,
- async: false, // 关闭异步
- dataType: "json",
- success: function (r) {
- vm.nodeGroupDto = r.data;
- }
- });
- vm.getParentSystem(nodeGroup.systemId);
- vm.nodeGroupDto.parentGroup = nodeGroup.getParentNode() == null ? {name: "<@spring.message 'nodegroup.root.group'/>", id: 0} : nodeGroup.getParentNode();
- this.openGroupForm("<@spring.message 'common.edit'/>");
- },
- saveOrUpdateGroup: function(){
- if (!this.validateGroup()) {
- return;
- }
- var url;
- if (vm.nodeGroupDto.id == null) {
- url = "nodegroup/save";
- } else {
- url = "nodegroup/update";
- }
- vm.$set(vm.nodeGroupDto, "pid", vm.nodeGroupDto.parentGroup.id);
- vm.$set(vm.nodeGroupDto, "systemId", vm.system == null ? null : vm.system.id);
- if (vm.nodeGroupDto.id) {
- vm.nodeGroupDto.pid = vm.nodeGroupDto.pids = vm.nodeGroupDto.systemId = null;
- }
- $.ajax({
- type: vm.nodeGroupDto.id == null ? "POST" : "PUT",
- url: baseURL + url,
- contentType: "application/json",
- data: JSON.stringify(vm.nodeGroupDto),
- success: function (r) {
- if (r.code === 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- // 关闭当前弹出层
- vm.closeGroupForm();
- // 从新挂载节点组tree
- vm.getSystemsContainGroups();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- },
- selectedTreeDatas: function(nodeGroup){
- // 接收子组件传出选中的节点组
- vm.checkedGroups = vm.checkedGroups.concat(nodeGroup);
- },
- unSelectedTreeDatas: function(nodeGroup){
- // 子组件撤销传出的 absoluteGroupPath 和 systemName
- vm.checkedGroups.some(function(item,index){
- if (item.id == nodeGroup.id) {
- vm.checkedGroups.splice(index,1);
- return true;
- }
- });
- },
- unCheckGroup: function(nodeGroup){ // 从选中节点组中移除某个节点组
- // 在数组中移除元素
- vm.checkedGroups.splice(vm.checkedGroups.indexOf(nodeGroup),1)
- // 调用组件 取消选中
- for (let i = 0; i < vm.$refs.gtree.length; i++) {
- var refObj = vm.$refs.gtree[i];
- refObj.uncheckTreeData(nodeGroup);
- }
- // 判断当前节点组的弹层是否存在
- if (vm.showGroupTree) {
- vm.showGroupTree = false;
- this.openGroupTree("<@spring.message 'common.selectNodeGroup'/>");
- }
- },
- openGroupTree: function (title) {
- var index = layer.open({
- area: ['500px', '100%'],
- shade: 0,
- title: title,
- type: 1,
- fixed: false,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $("#groupTree"), // 本页面的元素
- end:function () {
- vm.showGroupTree = true;
- // 判断当前是否存在节点组表单弹框 存在则一并关闭
- if (vm.currentZIndex != null) {
- layer.close(vm.currentZIndex);
- }
- vm.groupTreeLayerId = null;
- }
- });
- if (vm.groupTreeLayerId != null) {
- return;
- }
- vm.groupTreeLayerId = index;
- $("#layui-layer" + index).get(0).style.left = "unset";
- $("#layui-layer" + index).get(0).style.right = "0";
- },
- openGroupForm: function(title){
- var groupTreeLayerId = null;
- if (vm.groupTreeLayerId != undefined && vm.groupTreeLayerId != null) {
- groupTreeLayerId= $("#layui-layer" + vm.groupTreeLayerId).get(0);
- }
- $(groupTreeLayerId).animate({right: "500px"});
- var index = layer.open({
- area: ['500px', '100%'],
- shade: 0.001,
- title: title,
- type: 1,
- fixed: false,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $("#groupForm"), // 本页面的元素
- success: function(){ // 弹出后回调
- if (vm.groupTreeLayerId != undefined && vm.groupTreeLayerId != null) {
- $(groupTreeLayerId).animate({right: "500px"});
- }
- },
- cancel: function(){ // 返回回调
- if(vm.groupTreeLayerId != undefined && vm.groupTreeLayerId != null) {
- $(groupTreeLayerId).animate({right: ""});
- }
- },
- end: function(){ // 销毁回调
- $("html").css("overflow-y", "hidden");
- }
- });
- // 记录当前弹出层的Zindex 用于关闭指定的弹出层
- vm.currentZIndex = index;
- return index;
- },
- closeGroupForm: function(){
- if (vm.groupTreeLayerId != undefined && vm.groupTreeLayerId != null) {
- var groupTreeLayerId = "";
- groupTreeLayerId= $("#layui-layer" + vm.groupTreeLayerId).get(0);
- $(groupTreeLayerId).animate({right: ""});
- layer.close(vm.currentZIndex);
- $("html").css("overflow-y", "hidden");
- }
- },
- // tag
- openNodeTagForm: function() {
- if (vm.nodeInfo.type == null) {
- return;
- }
- // 清空状态
- vm.$v.nodeTag.$reset();
- vm.showNodeTagsForm = false;
- vm.nodeTag = {
- value: null,
- name: null,
- type: null,
- code: null,
- relationNodeType: null // 关联的节点类型
- }
- // 回显当前设备类型
- vm.nodeTag.relationNodeType = vm.nodeInfo.type.value;
- // 获取当前tag列表 code 最大值
- var maxCode = Math.max.apply(Math,vm.nodeTags.map(item => { return item.code}));
- vm.$set(vm.nodeTag, 'name', 'nodeTag');
- vm.$set(vm.nodeTag, 'type', 'nodeTag' + vm.nodeInfo.type.code);
- vm.$set(vm.nodeTag, 'code', maxCode + 1);
- var index = layer.open({
- area: ['500px', '100%'],
- shade: 0.001,
- title: "<@spring.message 'node.tag'/>",
- type: 1,
- fixed: false,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $("#nodeTagsForm"), // 本页面的元素
- end: function () {
- vm.showNodeTagsForm = true;
- }
- });
- },
- closeNodeTagForm: function(){
- vm.showNodeTagsForm = true;
- layer.closeAll();
- },
- saveNodeTag: function(){
- if (!this.validateNodeTag()) {
- return;
- }
- vm.$set(vm.nodeTag, 'remark', vm.nodeTag.value);
- $.ajax({
- type: "POST",
- url: baseURL + "sys/dict/save",
- contentType: "application/json",
- data: JSON.stringify(vm.nodeTag),
- success: function (r) {
- if (r.code === 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- vm.nodeTags.push(vm.nodeTag);
- layer.closeAll();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- },
- },
- created: function () {
- // 从字典中获取节点类型的集合
- $.getJSON(baseURL + "sys/dict/all?type=nodeType", function (r) {
- vm.nodeTypes = r.data;
- });
- $.getJSON(baseURL + "sys/dict/all?type=onLineState", function (r) {
- vm.nodeStates = r.data;
- });
- $.getJSON(baseURL + "sys/dict/all?name=nodeTag", function (r) {
- vm.queryTags = r.data;
- });
- // 获取当前业务系统ID
- this.getCurrentSystem();
- },
- watch: {
- "nodeInfo.uSize": function (newValue, oldValue) {
- // 1. 表单锁定 或 值错误情况下 直接返回
- if (newValue == undefined) {
- return;
- }
-
- if (vm.disabledFlag) { // IP 在其他业务系统存在时 直接返回 不需要处理 表单为禁用状态
- return;
- }
-
- // 2. 没有填写USize 不处理,返回
- if (newValue == '' || newValue == null) {
- vm.nodeInfo.cabinetId == null ? null : vm.nodeInfo.cabinetId.starts = [];
- vm.starts = [];
- vm.nodeInfo.cabinetStart = null;
- vm.$v.nodeInfo.uSize.$reset();
- vm.$v.nodeInfo.cabinetId.$reset()
- vm.$v.nodeInfo.cabinetStart.$reset();
- if (vm.nodeInfo.nodeRoom == null) { // 既没有指定uSize 当前也没有指定room
- vm.rooms = [];
- }
- return;
- }
- vm.uSizeValidateFlag = false;
- // 3. 开始处理数据变化 先清空起始位置
- vm.starts = [];
- // 4.重新发起请求
- var params = "?uSize=" + newValue;
- if (this.nodeInfo.uuid) {
- params += "&uuid=" + this.nodeInfo.uuid;
- }
- // 获取数据
- $.ajax({
- type: "GET",
- url: baseURL + "node/selectCab" + params,
- async: false,
- dataType: "json",
- success: function (r) {
- vm.rooms = r.data.list;
- }
- });
-
- // 5.处理变化数据
- var cab;
- vm.rooms.some(room => {
- cab = room.cabinets.find(cabinet => {
- if (vm.nodeInfo.cabinetId != null && cabinet.id == vm.nodeInfo.cabinetId.id) { // 如果机柜存在
- return cabinet;
- }
- });
- if (cab != undefined) { // 旧机柜仍然存在
- return true; // 结束循环
- }
- })
-
- // 更新cabs starts
- vm.starts = cab == undefined ? [] : cab.starts;
- vm.rooms.some(item => {
- if (vm.nodeInfo.nodeRoom != null && item.roomId == vm.nodeInfo.nodeRoom.roomId) {
- vm.cabinets = item.cabinets;
- return true;
- }
- });
-
-
- // 6. 深克隆对象 用作修改时的cabinetStart 回显问题
- var cloneNodeInfo = JSON.parse(JSON.stringify(vm.nodeInfo));
- vm.nodeInfo.cabinetStart = null;
- var flag = false;
- vm.starts.some(item => {
- if (item == cloneNodeInfo.cabinetStart) {
- flag = true;
- return flag;
- }
- })
- if (vm.starts.length > 0 && flag) {// vm.nodeInfo.uuid != null 可加可不加 加上为只在修改上回显
- vm.nodeInfo.cabinetStart = cloneNodeInfo.cabinetStart;
- }
-
- // 7.关于起始位置提示
- if (data.starts.length < 1 && data.nodeInfo.nodeRoom != null) {
- data.cabStartTitle = "<@spring.message 'node.notEnough.position'/>";
- } else {
- data.cabStartTitle = "<@spring.message 'common.pleaseSelect'/>";
- }
- },
- "selectedItem1": function(newValue, oldValue) {
- if (newValue == 'IP') {
- this.showIp = true;
- this.q.name = "";
- } else {
- this.showIp = false;
- this.q.ip = "";
- }
- },
- "selectFlag1": function(newValue, oldValue) {
- if (newValue) {
- $(".ad-search-label").css("border-bottom", "0");
- } else {
- $(".ad-search-label").css("border-bottom", "1px solid #ccc");
- }
- },
- "nodeInfo.type": function(newValue, oldValue){
- if (newValue == null) {
- vm.nodeTags = [];
- }
- }
- },
- computed: {
- systemNames: function() {
- return vm.selectedSystems.map(function (item) {
- return item.name;
- });
- },
- },
- mounted() {}
-});
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/node/nodeRoom.js b/nezha-admin/src/main/resources/templates/js/modules/node/nodeRoom.js
deleted file mode 100644
index 53be320e..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/node/nodeRoom.js
+++ /dev/null
@@ -1,310 +0,0 @@
-<script>
-$(function () {
- $("#jqGrid").jqGrid({
- url: baseURL + '/room/list',
- datatype: "json",
- colModel: [
- {label: "ID", name: 'id', width: 60, key: true, hidden: true},
- {label: "<@spring.message 'node.room.name'/>", name: 'name', width: 60, sortable: false},
- {label: "<@spring.message 'node.room.addr'/>", name: 'addrName', width: 60, sortable: false},
- {label: "<@spring.message 'node.room.roomRows'/>", name: 'roomRows', width: 60, sortable: false},
- {label: "<@spring.message 'node.room.roomCols'/>", name: 'roomCols', width: 60, sortable: false},
- {label: "<@spring.message 'common.remark'/>", name: 'remarks', width: 60, sortable: false}
- ],
- viewrecords: true,
- height: top.$(".content").height()-130,
- rowNum: 15,
- rowList : [15,30,50],
- rownumbers: true,
- rownumWidth: 25,
- autowidth: true,
- multiselect: true,
- pager: "#jqGridPager",
- jsonReader: {
- root: "page.list",
- page: "page.currPage",
- total: "page.totalPage",
- records: "page.totalCount"
- },
- prmNames: {
- page: "page",
- rows: "limit",
- order: "order"
- },
- gridComplete: function () {
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"}); // 隐藏grid底部滚动条
- },
- onSelectAll: function(rowids, status) {
- if (status) {
- toolsBtnHandle();
- }
- },
- onSelectRow: function(rowid,status) {
- toolsBtnHandle();
- }
-
- });
-
-});
-
-
-// 注册select组件
-Vue.component('multiselect', window.VueMultiselect.default);
-
-// 引用校验规则 所有校验规则见 https://vuelidate.netlify.com/#sub-v-values
-Vue.use(window.vuelidate.default);
-var required = window.validators.required;
-var numeric = window.validators.numeric;
-var minValue = window.validators.minValue;
-var integer = window.validators.integer;
-var helpers = window.validators.helpers;
-
-// 自定义规则,;第一个参数是当前字段值,第二个参数是当前校验的整个对象(此处是vm.data.nodeRoom)
-var nameCheck = function (value, nodeRoom) {
- if (helpers.req(value)) {
- var flag = true;
- var params = "?name=" + value;
- if (nodeRoom.id) {
- params += "&id=" + nodeRoom.id;
- }
- $.ajax({
- type: "GET",
- url: baseURL + "room/roomNameCheck" + params,
- async: false, // 关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-var roomRowsCheck = function (value, nodeRoom) {
- if (nodeRoom.id == null) {// 添加不需校验
- return true;
- }
- if (helpers.req(value)) {
- var flag = true;
- var params = "?id=" + nodeRoom.id + "&roomRows=" + value + "&roomCols=" + vm.roomDetail.roomCols;
- $.ajax({
- type: "GET",
- url: baseURL + "room/roomSizeCheck" + params,
- async: false, // 关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- vm.occRow = r.data;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-var roomColsCheck = function (value, nodeRoom) {
- if (nodeRoom.id == null) {// 添加不需校验
- return true;
- }
- if (helpers.req(value)) {
- var flag = true;
- var params = "?id=" + nodeRoom.id + "&roomRows=" + vm.roomDetail.roomRows + "&roomCols=" + value;
- $.ajax({
- type: "GET",
- url: baseURL + "room/roomSizeCheck" + params,
- async: false, // 关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- vm.occCol = r.data;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-
-var data = {
- showList: true,
- title: null,
- q: {
- name: null, addr: null
- },
- nodeRoom: {
- id: null,
- name: null,
- roomRows: null,
- roomCols: null,
- addr: null,
- remarks: null
- },
- addrList: [],
- roomDetail: null, // 校验行列可用时接口需要行列必须,解决列为空校验行问题
- occRow: null,
- occCol: null,
- // single multi 控制工具栏单选 多选可点击状态
- single:true,
- multi:true
-};
-
-var vm = new Vue({
- el: '#app',
- data: this.data,
- validations: {
- nodeRoom: {
- name: {
- required, nameCheck
- },
- roomRows: {
- required, integer, minValue: minValue(1), roomRowsCheck
- },
- roomCols: {
- required, integer, minValue: minValue(1), roomColsCheck
- },
- addr: {
- required
- }
- }
- },
- methods: {
- query: function () {
- this.reload();
- },
- reload: function () {
- vm.single = vm.multi = true;
- vm.showList = true;
- var page = $("#jqGrid").jqGrid('getGridParam', 'page');
- $("#jqGrid").jqGrid('setGridParam', {
- postData: {
- "name": vm.q.name,
- "addr": vm.q.addr == null ? null : vm.q.addr.code
- },
- page: 1
- }).trigger("reloadGrid");
- },
- reset:function(){
- vm.q.name = vm.q.addr = null;
- vm.query();
- },
- getInfo: function (id) {
- $.ajax({
- type: "GET",
- url: baseURL + "room/detail?id=" + id,
- async: false, // 关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- vm.nodeRoom = r.data;
- }
- });
-
- // 克隆一份机房详情对象
- vm.roomDetail = JSON.parse(JSON.stringify(vm.nodeRoom));
-
- // 处理下拉框回显问题
- vm.addrList.some(item => {
- if (item.code == vm.nodeRoom.addr) {
- vm.$set(vm.nodeRoom, "addr", item);
- return true;
- }
- })
- },
- add: function () {
- vm.$v.nodeRoom.$reset(); // 进入新增页面时,将校验的触发状态清空($dirty=true -> false)
- vm.showList = false;
- vm.title = "<@spring.message 'common.add'/>";
- vm.nodeRoom = {
- id: null,
- name: null,
- roomRows: null,
- roomCols: null,
- addr: null,
- remarks: null
- }
- },
- update: function () {
- vm.$v.nodeRoom.$reset(); // 进入新增页面时,将校验触发状态清空($dirty=true -> false)
- var id = getSelectedRow();
- if (id == null) {
- return;
- }
- vm.showList = false;
- vm.title = "<@spring.message 'common.edit'/>";
- this.getInfo(id);
- },
- saveOrUpdate: function () {
- if (!vm.validate()) { // 在下方定义的validate方法
- return;
- }
- var url;
- if (vm.nodeRoom.id == null) {
- url = "room/save";
- } else {
- url = "room/update";
- }
- vm.$set(vm.nodeRoom, "addr", vm.nodeRoom.addr.code);
- $.ajax({
- type: vm.nodeRoom.id == null ? "POST" : "PUT",
- url: baseURL + url,
- contentType: "application/json",
- data: JSON.stringify(vm.nodeRoom),
- success: function (r) {
- if (r.code === 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- },
- del: function () {
- var ids = getSelectedRows();
- if (ids == null) {
- return;
- }
- confirm("<@spring.message 'common.confirmDelete'/>", function () {
- var form = new FormData();
- form.append("ids", ids);
- $.ajax({
- type: "DELETE",
- url: baseURL + "room/delete",
- processData: false,
- contentType: false,
- mimeType: "multipart/form-data",
- data: form,
- success: function (r) {
- if (r.code == 200) {
- alert("<@spring.message 'common.success'/>", function (index) {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- });
- },
- getRoomAddrs: function () { // 获取机房所属地区列表
- $.getJSON(baseURL + "sys/dict/all?name=addr", function (r) {
- vm.addrList = r.data;
- });
- },
- validate: function () {
- vm.$v.nodeRoom.$touch(); // 提交时,不论是否已触发校验,都触发一下($dirty=false -> true)
- return !vm.$v.nodeRoom.$error;
- }
- },
- created: function () {
- this.getRoomAddrs();
- }
-});
-</script>
diff --git a/nezha-admin/src/main/resources/templates/js/modules/node/roomTest.js b/nezha-admin/src/main/resources/templates/js/modules/node/roomTest.js
deleted file mode 100644
index 4f5073c1..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/node/roomTest.js
+++ /dev/null
@@ -1,570 +0,0 @@
-<script >
-// 注册select组件
-Vue.component('multiselect', window.VueMultiselect.default);
-
-// 引用校验规则 所有校验规则见 https://vuelidate.netlify.com/#sub-v-values
-Vue.use(window.vuelidate.default);
-var required = window.validators.required;
-var numeric = window.validators.numeric;
-var minValue = window.validators.minValue;
-var integer = window.validators.integer;
-var helpers = window.validators.helpers;
-
-// 自定义规则,;第一个参数是当前字段值,第二个参数是当前校验的整个对象(此处是vm.data.nodeRoom)
-var roomNameCheck = function (value, nodeRoom) {
- if (helpers.req(value)) {
- var flag = true;
- var params = "?name=" + value;
- if (nodeRoom.id) {
- params += "&id=" + nodeRoom.id;
- }
- $.ajax({
- type: "GET",
- url: baseURL + "room/roomNameCheck" + params,
- async: false, // 关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-var roomRowsCheck = function (value, nodeRoom) {
- if (nodeRoom.id == null) {// 添加不需校验
- return true;
- }
- if (helpers.req(value)) {
- var flag = true;
- var params = "?id=" + nodeRoom.id + "&roomRows=" + value + "&roomCols=" + vm.roomDetail.roomCols;
- $.ajax({
- type: "GET",
- url: baseURL + "room/roomSizeCheck" + params,
- async: false, // 关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- vm.occRow = r.data;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-var roomColsCheck = function (value, nodeRoom) {
- if (nodeRoom.id == null) {// 添加不需校验
- return true;
- }
- if (helpers.req(value)) {
- var flag = true;
- var params = "?id=" + nodeRoom.id + "&roomRows=" + vm.roomDetail.roomRows + "&roomCols=" + value;
- $.ajax({
- type: "GET",
- url: baseURL + "room/roomSizeCheck" + params,
- async: false, // 关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- vm.occCol = r.data;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-var cabNameCheck = function (value, nodeCabinet) {
- var flag = true;
- if (nodeCabinet.roomId == null) {
- return flag;
- } else {
- if (helpers.req(value)) {
- var params = "?name=" + value + "&roomId=" + nodeCabinet.roomId;
- if (nodeCabinet.id != null) {
- params += "&id=" + nodeCabinet.id;
- }
- $.ajax({
- type: "GET",
- url: baseURL + "cab/cabNameCheck" + params,
- async: false, // 关闭异步
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return flag;
- }
- }
-}
-var cabUbitCheck = function (value, nodeCabinet) {
- if (nodeCabinet.id == null) {
- return true;
- }
- if (helpers.req(value)) {
- var flag = true;
- // 进行校验
- var params = "?id=" + nodeCabinet.id + "&ubit=" + value;
- $.ajax({
- type: "GET",
- url: baseURL + "cab/cabUbitCheck" + params,
- async: false, // 关闭异步
- dataType: "json",
- success: function (r) {
- if (r.code != 200) {
- flag = false;
- vm.occUbit = r.data;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-
-
-var data = {
- roomList: [], // 机房列表
- addrList: [], // 地区列表
- roomDetail: null, // 校验行列可用时接口需要行列必须,解决列为空校验行问题
- q: { // 查询条件
- name: null,
- addr: null
- },
- showRoomFrom: true, // 机房表单控制
- showCabFrom: true, // 机柜表单控制
- nodeRoom: {
- id: null,
- name: null,
- roomRows: null,
- roomCols: null,
- addr: null,
- remarks: null
- },
- nodeCabinet: {
- id: null,
- name: null,
- roomName: null,
- roomId: null,
- roomRow: null,
- roomCol: null,
- ubit: null,
- remarks: null
- },
- room: null, // 当前机房
- cabs: [], // 当前机房包含机柜集合
- rowList: [], // 行列表数据
- readFlag: null, // 控制表单readonly选项值
- occUbit: null, // 机柜校验 前台提示行列信息
- noRoomTip: false // 机房暂无数据flag
-};
-
-
-var vm = new Vue({
- el: '#roomTestApp',
- data: this.data,
- validations: {
- nodeRoom: {
- name: {
- required, roomNameCheck
- },
- roomRows: {
- required, integer, minValue: minValue(1), roomRowsCheck
- },
- roomCols: {
- required, integer, minValue: minValue(1), roomColsCheck
- },
- addr: {
- required
- }
- },
- nodeCabinet: {
- name: {
- required, cabNameCheck
- },
- roomRow: {
- required
- },
- roomCol: {
- required
- },
- ubit: {
- required, integer, minValue: minValue(1), cabUbitCheck
- }
- }
- },
- methods: {
- getRooms: function () {
- $.ajax({
- type: "GET",
- url: baseURL + "room/list?limit=999",
- async: false,
- dataType: "json",
- success: function (r) {
- if (!r.page.list) {
- data.noRoomTip = true;
- } else {
- data.roomList = r.page.list;
- data.noRoomTip = false;
- }
- }
- });
- },
- getRoomAddrs: function () { // 获取机房所属地区列表d
- $.getJSON(baseURL + "sys/dict/all?name=addr", function (r) {
- data.addrList = r.data;
- });
- },
- getRoomInfo: function (roomId) {
- $.ajax({
- type: "GET",
- url: baseURL + "room/detail?id=" + roomId,
- async: false, // 关闭异步
- dataType: "json",
- success: function (r) {
- vm.nodeRoom = r.data;
- }
- });
- // 验证时使用 解决空验证问题
- vm.roomDetail = JSON.parse(JSON.stringify(vm.nodeRoom));
- // 处理下拉框回显问题
- vm.addrList.some(item => {
- if (item.code == vm.nodeRoom.addr) {
- vm.$set(vm.nodeRoom, "addr", item);
- return true;
- }
- })
- },
- getCabInfo: function (cabId) {
- $.ajax({
- type: "GET",
- url: baseURL + "cab/detail?id=" + cabId,
- async: false, // 关闭异步
- dataType: "json",
- success: function (r) {
- vm.nodeCabinet = r.data;
- }
- });
- },
- query: function (addr, event) {
- if (event && $(event.currentTarget).hasClass("btn-area_active")) {
- addr = null;
- vm.q.addr = null;
- }
- layer.closeAll('page');
- var page = ""; // 临时查询条件 并不存在该条件查询
- if (addr != null) {
- vm.q.addr = addr;
- }
- if (vm.q.addr != null) {
- page += "&addr=" + vm.q.addr;
- }
-
- if (vm.q.name != null) {
- page += "&name=" + vm.q.name;
- }
- $.ajax({
- type: "GET",
- url: baseURL + "room/list?limit=999" + page,
- async: false,
- dataType: "json",
- success: function (r) {
- if (r.page.list.length == 0) {
- vm.roomList = [];
- vm.noRoomTip = true;
- } else {
- vm.roomList = r.page.list;
- // 查询之后刷新行列表区域
- vm.showRowList(vm.roomList[0]);
- vm.noRoomTip = false;
- }
- }
- });
- },
- reset: function () {
- vm.q.name = vm.q.addr = null;
- this.getRooms();
- // 刷新行列表
- vm.showRowList(vm.roomList[0]);
- },
- addRoom: function () {
- layer.closeAll('page');
- vm.$v.nodeRoom.$reset(); // 进入新增页面时,将校验的触发状态清空($dirty=true -> false)
- vm.nodeRoom = {
- id: null,
- name: null,
- roomRows: null,
- roomCols: null,
- addr: null,
- remarks: null
- }
- this.open("<@spring.message 'common.add'/><@spring.message 'common.nodeRoom'/>", "roomForm");
- },
- addCab: function (room) { // 当前机房
- layer.closeAll('page');
- vm.$v.nodeCabinet.$reset(); // 进入添加页面 刷新校验状态
- vm.$set(vm, "readFlag", false);
- vm.nodeCabinet = {
- id: null,
- name: null,
- roomName: null,
- roomId: null,
- roomRow: null,
- roomCol: null,
- ubit: null,
- remarks: null
- }
- vm.$set(vm.nodeCabinet, "roomId", room.id);
- vm.$set(vm.nodeCabinet, "roomName", room.name);
- vm.$set(vm.nodeCabinet, "roomRow", room.row);
- vm.$set(vm.nodeCabinet, "roomCol", room.col);
- this.open("<@spring.message 'common.add'/><@spring.message 'common.cabinet'/>", "cabForm");
- },
- updateRoom: function (room) {
- vm.$v.nodeRoom.$reset(); //进入新增页面时,将校验触发状态清空($dirty=true -> false)
- this.getRoomInfo(room.id);
- this.open("<@spring.message 'common.edit'/><@spring.message 'common.nodeRoom'/>", "roomForm");
- },
- updateCab: function (cabinet) {
- vm.$v.nodeCabinet.$reset(); //进入新增页面时,将校验触发状态清空($dirty=true -> false)
- vm.$set(vm, "readFlag", true);
- this.getCabInfo(cabinet.id);
- this.open("<@spring.message 'common.edit'/><@spring.message 'common.cabinet'/>", "cabForm");
- },
- delRoom: function (room) {
- confirm("<@spring.message 'common.confirmDelete'/>", function () {
- var form = new FormData();
- form.append("ids", room.id);
- $.ajax({
- type: "DELETE",
- url: baseURL + "room/delete",
- processData: false,
- contentType: false,
- mimeType: "multipart/form-data",
- data: form,
- success: function (r) {
- if (r.code == 200) {
- alert("<@spring.message 'common.success'/>", function () {
- vm.reload();
- vm.showRowList(vm.roomList[0])
- });
- } else {
- alert(r.msg);
- }
- }
- });
- });
- },
- delCab: function (cabinet) {
- confirm("<@spring.message 'common.confirmDelete'/>", function () {
- var form = new FormData();
- form.append("ids", cabinet.id);
- $.ajax({
- type: "DELETE",
- url: baseURL + "cab/delete",
- async: false, // 关闭异步,否则会在执行完ajax前就跳到下一段代码
- processData: false,
- contentType: false,
- mimeType: "multipart/form-data",
- data: form,
- success: function (r) {
- if (r.code == 200) {
- alert("<@spring.message 'common.success'/>", function () {
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- // 刷新
- vm.showRowList(data.room);
- });
- },
- saveOrUpdateRoom: function () {
- if (!vm.validateRoom()) { // 校验机房参数
- return;
- }
- var url;
- if (vm.nodeRoom.id == null) {
- url = "room/save";
- } else {
- url = "room/update";
- }
- vm.$set(vm.nodeRoom, "addr", vm.nodeRoom.addr.code);
- $.ajax({
- type: vm.nodeRoom.id == null ? "POST" : "PUT",
- url: baseURL + url,
- contentType: "application/json",
- data: JSON.stringify(vm.nodeRoom),
- success: function (r) {
- if (r.code === 200) {
- alert("<@spring.message 'common.success'/>", function () {
- // 刷新当前行列表区域
- vm.showRowList(data.nodeRoom);
- vm.reload();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- },
- saveOrUpdateCab: function () {
- if (!vm.validateCab()) {
- return;
- }
- var url;
- if (vm.nodeCabinet.id == null) {
- url = "cab/save";
- } else {
- url = "cab/update";
- }
- $.ajax({
- type: vm.nodeCabinet.id == null ? "POST" : "PUT",
- url: baseURL + url,
- contentType: "application/json",
- async: false, // 关闭异步,否则会在执行完ajax前就跳到下一段代码
- data: JSON.stringify(vm.nodeCabinet),
- success: function (r) {
- if (r.code === 200) {
- alert("<@spring.message 'common.success'/>", function () {
- // 刷新当前行列表区域
- vm.showRowList(data.room);
- layer.closeAll();
- });
- } else {
- alert(r.msg);
- }
- }
- });
- },
- reload: function () {
- var tempRoom = JSON.parse(JSON.stringify(vm.room));
- vm.query(null);
- layer.closeAll();
- vm.showRowList(tempRoom);
- },
- validateRoom: function () {
- vm.$v.nodeRoom.$touch(); // 提交时,不论是否已触发校验,都触发一下($dirty=false -> true)
- return !vm.$v.nodeRoom.$error;
- },
- validateCab: function () {
- vm.$v.nodeCabinet.$touch(); // 提交时,不论是否已触发校验,都触发一下($dirty=false -> true)
- return !vm.$v.nodeCabinet.$error;
- },
- // 展示右侧行列区
- showRowList: function (room) {
- if (typeof(room) == 'undefined') {
- return;
- }
- data.room = room; // 赋值行列 页面循环
- $.ajax({
- type: "GET",
- url: baseURL + "cab/list?roomId=" + room.id,
- async: false, // 关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function (r) {
- if (r.code === 200) {
- data.cabs = r.data.list;
- } else {
- alert(r.msg);
- }
- }
- });
- // 每次重新初始化
- data.rowList = [];
- for (let i = 0; i < data.room.roomRows; i++) {
- data.rowList[i] = [];
- for (let j = 0; j < data.room.roomCols; j++) {
- var flag = false;
- data.cabs.forEach(item => {
- if (item.roomRow - 1 == i && item.roomCol - 1 == j) {
- // var obj = JSON.parse(JSON.stringify(item));
- // vm.$set(data.rowList[i], j, item);
- data.rowList[i].splice(j, 0, item);
- flag = true;
- }
- });
- if (!flag) {
- // 点击添加机柜的时候 表单需要默认回显当前所属机房名称 行列值 在下方addcab方法中
- //vm.$set(data.rowList[i], j, {name: data.room.name, row: i + 1, col: j + 1});
- data.rowList[i].splice(j, 0, {id: data.room.id, name: data.room.name, row: i + 1, col: j + 1});
- }
- }
- }
- // data.rowList = Object.assign(data.rowList, data.rowList)
- /*console.log(data.rowList)*/
- },
- open: function (title, content) {
- layer.open({
- area: ['550px', '100%'],
- shade: 0,
- title: title,
- type: 1,
- fixed: false,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $("#" + content) // 本页面的元素
- });
- },
- checkCab: function (cabinet) {
- if (cabinet.hasOwnProperty("row")) {
- return true;
- }
- return false;
- },
- getCabName: function (cabinet) {
- return cabinet.name;
- },
- showRoomOption: function (roomId) {
- $("#option" + roomId).removeClass("myoption-close").addClass("myoption-open");
- },
- closeRoomOption: function (roomId) {
- if (data.room.id != roomId) {
- $("#option" + roomId).removeClass("myoption-open").addClass("myoption-close");
- }
- },
- showCabOption: function (cab) {
- if (this.checkCab(cab)) {return;}
- if ($("#cab" + cab.id).hasClass("myoption-close")) {
- $("#cab" + cab.id).removeClass("myoption-close").addClass("myoption-open");
- } else {
- $("#cab" + cab.id).removeClass("myoption-open").addClass("myoption-close");
- }
- }
-/* showCabOption: function (cabId) {
- console.info(cabId);
- if ($("#cab" + cabId).hasClass("myoption-close")) {
- $("#cab" + cabId).removeClass("myoption-close").addClass("myoption-open");
- } else {
- $("#cab" + cabId).removeClass("myoption-open").addClass("myoption-close");
- }
- }
-*/ },
- created: function () {
- // 1. 初始化实例查询机房列表
- this.getRooms();
- this.getRoomAddrs();
- // 2.默认展开第一个机房的行列图
- this.showRowList(data.roomList[0])
- },
- computed: {}
-});
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/sys/system.js b/nezha-admin/src/main/resources/templates/js/modules/sys/system.js
deleted file mode 100644
index 752543dc..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/sys/system.js
+++ /dev/null
@@ -1,300 +0,0 @@
-<script>
-$(function () {
- $("#jqGrid").jqGrid({
- url: baseURL + 'system/list',
- datatype: "json",
- colModel: [
- { label: 'ID', name: 'id', width: 30, key: true, hidden: true },
- { label: '<@spring.message "common.name"/>', name: 'name', sortable: false },
- { label: '<@spring.message "common.createTime"/>', name: 'createDate', sortable: false },
- { label: '<@spring.message "common.remark"/>', name: 'remarks', width: 80 },
- { label: 'builtIn', name: 'buildIn', hidden: true }
- ],
- viewrecords: true,
- height: top.$(".content").height()-130,
- rowNum: 15,
- rowList : [15,30,50],
- rownumbers: true,
- rownumWidth: 25,
- autowidth:true,
- multiselect: true,
- pager: "#jqGridPager",
- jsonReader : {
- root: "data.list",
- page: "data.currPage",
- total: "data.totalPage",
- records: "data.totalCount"
- },
- prmNames : {
- page:"page",
- rows:"limit",
- order: "order"
- },
- gridComplete:function(){
- //隐藏grid底部滚动条
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
-
- /*buildin=1的记录禁用复选框*/
- //1.先将对应记录的checkbox设为disabled
- var dataRows = $("#jqGrid").find(".jqgrow");
- $.each(dataRows, function(index) {
- var buildIn = $(this).find("td").get(6);//buildIn字段所在列
- if ($(buildIn).text() == "1") {
- $(this).find("input[type=checkbox]").attr("disabled", "disabled");
- }
- });
- },
- //2.单选时,不勾选复选框
- beforeSelectRow: function(rowid, e) {
- var cbsdis = $("tr#" + rowid + ".jqgrow > td > input[type=checkbox]:disabled");
- if (cbsdis.length === 0) {
- return true;
- } else {
- return false;
- }
- },
- //3.全选时,不勾选对应复选框
- onSelectAll: function(rowids, status) {
- if (status) {
- var cbs = $("tr.jqgrow > td > input[type=checkbox]:disabled");
- cbs.removeAttr("checked");
- cbs.parent().parent().removeClass("success");
- toolsBtnHandle();
- }
- },
- onSelectRow: function(rowid,status) {
- toolsBtnHandle();
- }
- });
-});
-
-
-//引用vuelidate组件
-Vue.use(window.vuelidate.default);
-//引用校验规则 所有校验规则见 https://vuelidate.netlify.com/#sub-builtin-validators
-var required = window.validators.required;
-var helpers = window.validators.helpers;//引入自定义校验规则助手 helpers
-//自定义规则,校验业务系统名称不能重复;
-var checkName = function(value, system) {
- if (helpers.req(system.name) && helpers.req(value)) {
- var params = "?name=" + system.name;
- if (system.id) {
- params = params + "&id=" + system.id;
- }
- var flag = true;
- $.ajax({
- type: "get",
- url: baseURL + "system/nameCheck" + params,
- async: false, //关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function(r){
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-
-var vm = new Vue({
- el:'#rrapp',
- data:{
- //single和multi分别控制工具栏的单选、多选按钮的可点击状态
- single: true,
- multi: true,
-
- showList: true,
- title: null,
- system: {
- name: "",
- remarks: "",
- id: null,
- usergroupIds: [],
- usergroups: [],
- addUuids: [],
- removeUuids: [],
- nodeNum: 0
- },
- usergroups: [],
- allNodes: [], //所有节点
- selectedNodes: [], //已选节点
- selectableNodes: [], //可选节点
- //控制全选框样式
- selectedCheckAll: false, //是否全选
- selectedCheckNone: true, //是否全不选
- selectableCheckAll: false,
- selectableCheckNone: true
- },
- validations: { //定义校验规则
- system: {
- name: {
- required,
- checkName
- }
- }
- },
- methods: {
- add: function(){
- vm.$v.system.$reset(); //进入新增页面时,将校验的触发状态清空($dirty=true -> false)
- vm.showList = false;
- vm.title = "<@spring.message 'common.add'/>";
- vm.system = {name:null,remarks:null,id:null,usergroupIds:[],usergroups: [],addUuids: [],removeUuids: [],nodeNum: 0};
- vm.selectableNodes = vm.allNodes;
- },
- update: function () {
- vm.$v.system.$reset(); //进入新增页面时,将校验触发状态清空($dirty=true -> false)
- var id = getSelectedRow();
- if(id == null){
- return ;
- }
- vm.showList = false;
- vm.title = "<@spring.message 'common.edit'/>";
- vm.getInfo(id);
- },
- getInfo: function(id) {
- $.get(baseURL + "system/detail?id=" + id, function(r){
- vm.system = r.data;
- vm.system.usergroupIds = [];
- for (var i = 0; i < vm.system.usergroups.length; i++) {
- vm.system.usergroupIds[i] = vm.system.usergroups[i].id;
- }
- });
- var vm_tmp = this;
- $.ajax({
- url: baseURL + "/system/nodes?limit=9999&id=" + id,
- type: "GET",
- async: false,
- success: function (r) {
- vm_tmp.selectedNodes = r.data.list;
- vm_tmp.selectableNodes = r.data.list.concat(vm_tmp.allNodes).filter(function (v) {
- var tempFlag1 = true;
- var tempFlag2 = true;
- var comparisonUuid = v.uuid;
- for (var ii = 0 ; ii < r.data.list.length; ii++) {
- if (r.data.list[ii].uuid == comparisonUuid) {
- tempFlag1 = false;
- }
- }
- for (var ii = 0 ; ii < vm_tmp.allNodes.length; ii++) {
- if (vm_tmp.allNodes[ii].uuid == comparisonUuid) {
- tempFlag2 = false;
- }
- }
- return tempFlag1 || tempFlag2;
- });
- }
- });
- },
- getAllUsergroups: function(id) {
- $.get(baseURL + "sys/usergroup/list?limit=999", function(r){
- vm.usergroups = r.data.list;
- });
- },
- del: function (event) {
- var ids = getSelectedRows();
- if(ids == null){
- return ;
- }
- confirm("<@spring.message 'common.confirmDelete'/>", function(){
- $.ajax({
- type: "DELETE",
- url: baseURL + "system/delete",
- contentType: "application/json",
- data: JSON.stringify(ids),
- success: function(r){
- if(r.code == 200){
- alert("<@spring.message 'common.success'/>", function(index){
- vm.reload();
- });
- }else{
- alert(r.msg);
- }
- }
- });
- });
- },
- saveOrUpdate: function (event) {
- if (!vm.validate()) { //在下方定义的validate方法
- return;
- }
- var url = vm.system.id == null ? "system/save" : "system/update";
- $.ajax({
- type: vm.system.id == null ? "POST" : "PUT",
- url: baseURL + url,
- contentType: "application/json",
- data: JSON.stringify(vm.system),
- success: function(r){
- if(r.code === 200){
- alert("<@spring.message 'common.success'/>", function(index){
- vm.reload();
- });
- }else{
- alert(r.msg);
- }
- }
- });
- },
- nodeRel: function (event) {
- layer.open({
- area: ['740px', '100%'],
- shade: 0.01,
- title: "分配节点",
- type: 1,
- maxmin: false,
- scrollbar: false,
- offset: 'r',
- closeBtn: 1,
- move: false,
- content: $(".nodeRel")
- });
- },
- nodeChange: function(data) {
- this.system.addUuids = data[0];
- this.system.removeUuids = data[1];
- this.system.nodeNum = data[2];
- console.info(this.system.nodeNum)
- },
- reload: function (event) {
- vm.single = vm.multi = true;
- vm.showList = true;
- var page = $("#jqGrid").jqGrid('getGridParam','page');
- $("#jqGrid").jqGrid('setGridParam',{
- page:page
- }).trigger("reloadGrid");
- },
- selectableNodesReload: function (event) {
- var page = parent.$("#selectable").jqGrid('getGridParam','page');
- parent.$("#selectable").jqGrid('setGridParam',{
- postData:{'id':1},
- page:1
- }).trigger("reloadGrid");
- },
- validate: function () {//提交时的校验
- vm.$v.system.$touch(); //提交时,不论是否已触发校验,都触发一下($dirty=false -> true)
- return !vm.$v.system.$error;
- },
- getAllNodes: function() {
- var vm_temp = this;
- $.ajax({
- url: baseURL + "/node/list?limit=9999&page=1",
- type: "GET",
- async: false,
- success: function (r) {
- vm_temp.allNodes = r.data.list;
- }
- });
- }
- },
- created: function() {
- this.getAllUsergroups();
- this.getAllNodes();
- },
- mounted: function() {
-
- }
-});
-
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/js/modules/sys/usergroup.js b/nezha-admin/src/main/resources/templates/js/modules/sys/usergroup.js
deleted file mode 100644
index 70588d2f..00000000
--- a/nezha-admin/src/main/resources/templates/js/modules/sys/usergroup.js
+++ /dev/null
@@ -1,194 +0,0 @@
-<script>
-$(function () {
- $("#jqGrid").jqGrid({
- url: baseURL + 'sys/usergroup/list',
- datatype: "json",
- colModel: [
- { label: 'ID', name: 'id', width: 30, key: true, hidden: true },
- { label: '<@spring.message "common.name"/>', name: 'name', sortable: false },
- { label: '<@spring.message "common.createTime"/>', name: 'createDate', sortable: false },
- { label: '<@spring.message "common.remark"/>', name: 'remark', width: 80 }
- ],
- viewrecords: true,
- height: top.$(".content").height()-130,
- rowNum: 15,
- rowList : [15,30,50],
- rownumbers: true,
- rownumWidth: 25,
- autowidth:true,
- multiselect: true,
- pager: "#jqGridPager",
- jsonReader : {
- root: "data.list",
- page: "data.currPage",
- total: "data.totalPage",
- records: "data.totalCount"
- },
- prmNames : {
- page:"page",
- rows:"limit",
- order: "order"
- },
- gridComplete:function(){
- //隐藏grid底部滚动条
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
- },
- });
-});
-//引用vuelidate组件
-Vue.use(window.vuelidate.default);
-//引用校验规则 所有校验规则见 https://vuelidate.netlify.com/#sub-builtin-validators
-var required = window.validators.required;
-var helpers = window.validators.helpers;//引入自定义校验规则助手 helpers
-//自定义规则,校验业务系统名称不能重复;
-var checkName = function(value, usergroup) {
- if (helpers.req(usergroup.name) && helpers.req(value)) {
- var params = "?name=" + usergroup.name;
- if (usergroup.id) {
- params = params + "&id=" + usergroup.id;
- }
- var flag = true;
- $.ajax({
- type: "get",
- url: baseURL + "sys/usergroup/nameCheck" + params,
- async: false, //关闭异步,否则会在执行完ajax前就跳到下一段代码
- dataType: "json",
- success: function(r){
- if (r.code != 200) {
- flag = false;
- }
- }
- });
- return flag;
- } else {
- return true;
- }
-}
-
-var vm = new Vue({
- el:'#rrapp',
- data:{
- showList: true,
- title: null,
- usergroup: {
- name: "",
- remark: "",
- id: null,
- systemIds: [],
- userIds: [],
- systems: [],
- users: []
- },
- users: [],
- systems: []
- },
- validations: { //定义校验规则
- usergroup: {
- name: {
- required,
- checkName
- }
- }
- },
- methods: {
- add: function(){
- vm.$v.usergroup.$reset(); //进入新增页面时,将校验的触发状态清空($dirty=true -> false)
- vm.showList = false;
- vm.title = "<@spring.message 'common.add'/>";
- vm.usergroup = {userIds: [],name:null,systems:[],users:[],remark:null,id:null,systemIds: []};
- },
- update: function () {
- vm.$v.usergroup.$reset(); //进入新增页面时,将校验触发状态清空($dirty=true -> false)
- var id = getSelectedRow();
- if(id == null){
- return ;
- }
- vm.showList = false;
- vm.title = "<@spring.message 'common.edit'/>";
- vm.getInfo(id);
- },
- getInfo: function(id){
- $.get(baseURL + "sys/usergroup/detail?id="+id, function(r){
- vm.usergroup = r.data;
- vm.usergroup.systemIds = [];
- for (var i = 0; i < vm.usergroup.systems.length; i++) {
- vm.usergroup.systemIds[i] = vm.usergroup.systems[i].id;
- }
- vm.usergroup.userIds = [];
- for (var i = 0; i < vm.usergroup.users.length; i++) {
- vm.usergroup.userIds[i] = vm.usergroup.users[i].userId;
- }
- });
- },
- getAllSystems: function(id) {
- $.get(baseURL + "system/list?limit=999", function(r){
- vm.systems = r.data.list;
- });
- },
- getAllUsers: function(id) {
- $.get(baseURL + "sys/user/list?limit=999", function(r){
- vm.users = r.page.list;
- });
- },
- del: function (event) {
- var ids = getSelectedRows();
- if(ids == null){
- return ;
- }
- confirm("<@spring.message 'common.confirmDelete'/>", function(){
- $.ajax({
- type: "DELETE",
- url: baseURL + "sys/usergroup/delete",
- contentType: "application/json",
- data: JSON.stringify(ids),
- success: function(r){
- if(r.code == 200){
- alert("<@spring.message 'common.success'/>", function(index){
- vm.reload();
- });
- }else{
- alert(r.msg);
- }
- }
- });
- });
- },
- saveOrUpdate: function (event) {
- if (!vm.validate()) { //在下方定义的validate方法
- return;
- }
- var url = vm.usergroup.id == null ? "sys/usergroup/save" : "sys/usergroup/update";
- $.ajax({
- type: vm.usergroup.id == null ? "POST" : "PUT",
- url: baseURL + url,
- contentType: "application/json",
- data: JSON.stringify(vm.usergroup),
- success: function(r){
- if(r.code === 200){
- alert("<@spring.message 'common.success'/>", function(index){
- vm.reload();
- });
- }else{
- alert(r.msg);
- }
- }
- });
- },
- reload: function (event) {
- vm.showList = true;
- var page = $("#jqGrid").jqGrid('getGridParam','page');
- $("#jqGrid").jqGrid('setGridParam',{
- page:1
- }).trigger("reloadGrid");
- },
- validate: function () {//提交时的校验
- vm.$v.usergroup.$touch(); //提交时,不论是否已触发校验,都触发一下($dirty=false -> true)
- return !vm.$v.usergroup.$error;
- }
- },
- created: function() {
- this.getAllSystems();
- this.getAllUsers();
- }
-});
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/common/nodeRel.html b/nezha-admin/src/main/resources/templates/modules/common/nodeRel.html
deleted file mode 100644
index 8d1dbb9f..00000000
--- a/nezha-admin/src/main/resources/templates/modules/common/nodeRel.html
+++ /dev/null
@@ -1,125 +0,0 @@
-<script type="text/x-template" id="nodeRelTemplate">
- <div>
- <!--已分配-->
- <div class="box">
- <div class="title"><@spring.message 'common.alreadyAssign'/></div>
- <div class="tools">
- <div class="form-group">
- <input :active="selectedRange + ''" @click="inputTouch(0, $event)" v-model="$v.selectedIPStart.$model"
- type="text" class="form-control input-medium" placeholder="IPStart" id="selectedIPStart"
- :class="{'form-control--error': $v.selectedIPStart.$dirty && (!$v.selectedIPStart.required || !$v.selectedIPStart.ipAddress)}">
- <span class="conn-symbol">-</span>
- <input :active="selectedRange + ''" @click="inputTouch(0, $event)" v-model="$v.selectedIPEnd.$model"
- type="text" class="form-control input-medium" placeholder="IPEnd" id="selectedIPEnd"
- :class="{'form-control--error': $v.selectedIPEnd.$dirty && (!$v.selectedIPEnd.required || !$v.selectedIPEnd.ipAddress || !selectedIPEndSizeValidation)}">
- </div>
- <div class="form-group">
- <input :active="!selectedRange + ''" @click="inputTouch(1, $event)" v-model="selectedIP" type="text"
- class="form-control input-medium" placeholder="IP" id="selectedIP">
- </div>
- <div class="btn-groups">
- <a @click="searchIp" class="btn btn-default" title="<@spring.message 'common.search'/>"><i
- class="fa fa-search"></i></a>
- <a @click="searchReset" class="btn btn-default" title="<@spring.message 'common.reset'/>"><i
- class="fa fa-refresh"></i></a>
- </div>
- </div>
- <div style="clear:both"></div>
- <div id="selected-box" class="node-box" :style="'height:' + height + 'px'">
- <table class="r-table">
- <thead>
- <tr>
- <th max-width="47px"></th>
- <th width="30px">
- <span class="r-checkbox checkbox_false_full" :class="[selectedUuids.length == 0 ? 'checkbox_false_full' : (selectedUuids.length < selectedNodes.length ? 'checkbox_false_part' : (selectedUuids.length == selectedNodes.length ? 'checkbox_true_part' : ''))]" id="selected-checkall"
- @click="checkAll($event, 'selected')"/></th>
- <th width="120px" class="r-tab-th">IP</th>
- <th class="r-tab-th"><@spring.message 'node.type'/></th>
- <th class="r-tab-th"><@spring.message 'common.status'/></th>
- </tr>
- </thead>
- <tbody>
- <template v-for="(selected,index) in selectedNodes">
- <tr :class="[{'new-node': selected.newNode},selected.checkedBox1 == true ? 'success' : '']" class="selected" @click="check(selected,'selected')"
- :uuid="selected.uuid" :id="'selected-' + selected.uuid" :iplong="selected.ipLong">
- <td>{{index+1}}</td>
- <td><span class="r-checkbox" :class="selected.checkedBox1 == true ? 'checkbox_true_full' : 'checkbox_false_full'"></span></td>
- <td v-for="(item) in colModel"
- v-html="typeof item.formatter == 'undefined' || item.formatter == null ? selected[item.field] : item.formatter(selected)"></td>
- </tr>
- </template>
- </tbody>
- </table>
- </div>
-
- <!--已选/ 计数-->
- <div class="box_counter"><@spring.message 'common.selected'/>&nbsp;&nbsp;<span>{{selectedCount}}</span>&nbsp;/&nbsp;{{selectedTotalCount}}
- </div>
- </div>
-
-
-
-
-
- <!--可分配-->
- <div class="box">
- <div class="title"><@spring.message 'common.readyAssign'/></div>
- <div class="tools">
- <div class="form-group">
- <input :active="selectableRange + ''" @click="inputTouch(0, $event)" v-model="$v.selectableIPStart.$model"
- type="text" class="form-control input-medium" placeholder="IPStart" id="selectableIPStart"
- :class="{'form-control--error': $v.selectableIPStart.$dirty && (!$v.selectableIPStart.required || !$v.selectableIPStart.ipAddress)}">
- <span class="conn-symbol">-</span>
- <input :active="selectableRange + ''" @click="inputTouch(0, $event)" v-model="$v.selectableIPEnd.$model"
- type="text" class="form-control input-medium" placeholder="IPEnd" id="selectableIPEnd"
- :class="{'form-control--error': $v.selectableIPEnd.$dirty && (!$v.selectableIPEnd.required || !$v.selectableIPEnd.ipAddress || !selectableIPEndSizeValidation)}">
- </div>
- <div class="form-group">
- <input :active="!selectableRange + ''" @click="inputTouch(1, $event)" v-model="selectableIP"
- type="text" class="form-control input-medium" placeholder="IP" id="selectableIP">
- </div>
- <div class="btn-groups">
- <a @click="searchIp" class="btn btn-default" title="<@spring.message 'common.search'/>"><i
- class="fa fa-search"></i></a>
- <a @click="searchReset" class="btn btn-default" title="<@spring.message 'common.reset'/>"><i
- class="fa fa-refresh"></i></a>
- </div>
- </div>
- <div style="clear:both"></div>
- <div id="selectable-box" class="node-box" :style="'height:' + height + 'px'">
- <table class="r-table">
- <thead>
- <tr>
- <th max-width="47px"></th>
- <th width="30px"><span class="r-checkbox checkbox_false_full" :class="[selectableUuids.length == 0 ? 'checkbox_false_full' : (selectableUuids.length < selectableNodes.length ? 'checkbox_false_part' : (selectableUuids.length == selectableNodes.length ? 'checkbox_true_part' : ''))]" id="selectable-checkall"
- @click="checkAll($event, 'selectable')"/></th>
- <th class="r-tab-th">IP</th>
- <th class="r-tab-th"><@spring.message 'node.type'/></th>
- <th class="r-tab-th"><@spring.message 'common.status'/></th>
- </tr>
- </thead>
- <tbody>
- <template v-for="(selectable,index) in selectableNodes">
- <tr :class="[{'new-node': selectable.newNode},selectable.checkedBox1 == true ? 'success' : '']" class="selectable" @click="check(selectable,'selectable')"
- :uuid="selectable.uuid" :id="'selectable-' + selectable.uuid" :iplong="selectable.ipLong">
- <td>{{index+1}}</td>
- <td><span class="r-checkbox" :class="selectable.checkedBox1 == true ? 'checkbox_true_full' : 'checkbox_false_full'"></span></td>
- <td v-for="(item) in colModel"
- v-html="typeof item.formatter == 'undefined' || item.formatter == null ? selectable[item.field] : item.formatter(selectable)"></td>
- </tr>
- </template>
- </tbody>
- </table>
- </div>
-
- <!--已选/ 计数-->
- <div class="box_counter"><@spring.message 'common.selected'/>&nbsp;&nbsp;<span>{{selectableCount}}</span>&nbsp;/&nbsp;{{selectableTotalCount}}
- </div>
- </div>
-
-
- <span class="box_toright myicon-right1" @click="nodeRelChange(0)"></span>
- <span class="box_toleft myicon-left1" @click="nodeRelChange(1)"></span>
- <span class="box_reset myicon-reset" @click="nodeReset"></span>
- </div>
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/common/template.html b/nezha-admin/src/main/resources/templates/modules/common/template.html
deleted file mode 100644
index fbeaf2b3..00000000
--- a/nezha-admin/src/main/resources/templates/modules/common/template.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<script type="text/x-template" id="rTable">
- <div>
- <table class="r-table" :id="'r-tab-'+tabNo+'-id'">
- <thead>
- <tr>
- <th width="30px"></th>
- <th width="30px"><span class="r-checkbox checkbox_false_full" :id="'r-tab-'+tabNo+'-checkall'"/></th>
- <th v-for="cm,index in colModel" class="r-tab-th" v-width="cm.width">{{cm.name}}</th>
- </tr>
- </thead>
- <tbody>
- <template v-if="trReset & tableData.length>0" v-for="rdata,index in tableData" >
- <r-tr
- ref="r-tr-ref"
- :rowData="rdata"
- :colModel="colModel"
- :index="index"
- :identification="identification"
- :refKey="trRefKey"
- @checkRow="checkRow"
- @unCheckRow="unCheckRow"
- :tab-no="tabNo"
- ></r-tr>
- </template>
- <template v-if="tableData.length==0" >
- <tr>
- <td :colspan="colLen" class="text-center"><@spring.message 'common.noData'/></td>
- </tr>
- </template>
- </tbody>
- </table>
- </div>
-</script>
-
-<script type="text/x-template" id="rRow">
- <tr :id="'tab-'+tabNo+'-'+trId+'-'+index" class="" >
- <td>{{index+1}} </td>
- <td><span :id="'tab-'+tabNo+'-'+trId+'-'+index+'-checkbox'" class="r-checkbox checkbox_false_full" :title="rowData.trRemark"/></td>
- <td v-for="cm,i in colModel" :id="'tab-'+tabNo+'-tr-'+index+'-'+tdId+'-'+i" v-html="cm.formatter==undefined||cm.formatter==null?rowData[cm.field]:cm.formatter(rowData)"></td>
- </tr>
-</script>
-
-<script type="text/x-template" id="nzNodeSelector">
- <div class="main">
- <div class="left nodeTree">
- <nz-tree
- :tree-data="treeData"
- @tree-click="clickNode"
- @tree-select="selectedTreeDatasChange"
- ref="treeChild"
- ></nz-tree>
- </div>
- <div class="right">
- <nz-table
- ref="nzTable"
- :table-data="tableData"
- :col-model="colModel"
- :identification="key"
- @selectedDatasChange="selectedTableDatasChange"
- ></nz-table>
- </div>
- </div>
-</script>
-
-<script id="nzTree" type="text/x-template">
- <ul id="beTree" class="ztree"></ul>
-</script>
-
-<script type="text/x-template" id="fileInput">
- <div >
- <div class="col-sm-2 control-label"><@spring.message 'common.scriptFile'/></div>
- <div class="col-sm-9">
- <div class="input-group" style="width: 98.2%">
- <input :id='viewInputId' class="form-control input-control" @click="viewInputClick" />
- <div class="input-group-btn" style="right: 31px;">
- <button type="button" class="btn btn-default" @click="selectBtnClick" style="border-radius: 0"><i class="fa fa-file-text"></i></button>
- <button type="button" class="btn btn-default" @click="historyFileClick" :disabled="!hasOld||oldFile.filePath==''" :title="oldFile.remark" style="border-radius: 0px 4px 4px 0px;"><i class="fa fa-download"></i></button>
- </div>
- <input type="file" class="input-control" :name="name" :id='fileInputId' @input="$emit('input', $event.target.files[0])" :accept="accept" @change="fileInput($event)" style="display: none">
- </div>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="dirty&&!required"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/dashboard/index.html b/nezha-admin/src/main/resources/templates/modules/dashboard/index.html
deleted file mode 100644
index 36993e22..00000000
--- a/nezha-admin/src/main/resources/templates/modules/dashboard/index.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
-<title><@spring.message 'dashboard.dashboard'/></title>
-<link rel="stylesheet" href="${request.contextPath}/statics/css/dashboard.css">
-<#include "/header.html">
-</head>
-<style>
-</style>
-<body>
-<div id='dashboardView' v-cloak>
- <!-- 仪表盘操作以及展示页面 -->
- <div v-show="!dashboardSetting">
- <div class="tools">
- <!-- <a class="btn btn-default btn-search" title="<@spring.message 'common.refresh'/>"><i class="fa fa-refresh"></i></a> -->
- <a class="btn btn-primary" id="add" title="<@spring.message 'common.add'/>" @click="dashboardSetting=true"><i class="fa fa-plus"></i></a>
- <a class="btn btn-primary" title="<@spring.message 'common.edit'/>" @click="modifyPosition()" ><i class="fa fa-floppy-o"></i></i></a>
- <!-- <div class="input-group col-sm-2" style="float:right !important">
- <span class="input-group-addon" @click="$('#filterTime').click();"><i class="fa fa-calendar"></i></span>
- <input type="text" class="form-control" id='filterTime' readonly placeholder="<@spring.message 'dashboard.chooseTime'/>" style="width:300px;margin-bottom:0px">
- </div> -->
- </div>
- <!-- 图表展示区 -->
- <input style="display:none" id="dashboardId"/>
- <div class="demo" id="showPanel">
- <div class='gridster'>
- <ul id='dashboardChartsShow' class="db-content">
- <template v-for='dashboard,index in dashboards'>
- <li :data-row='dashboard.x' :data-col='dashboard.y' :data-sizex='dashboard.width/150' :data-sizey='dashboard.height/150' :id="dashboard.id">
- <header class="db-header" @mouseenter="dbOpsShow" @mouseleave="dbOpsHide">
- <!-- <a class='btn btn-default dropdown-toggle' data-toggle='dropdown' style='display:block;border:none;width:33.3%;margin:0 auto'>
- <div style='text-align: center;'>
- <span>{{dashboard.name}}</span> <span class='caret'></span>
- </div>
- </a>
- <ul class='dropdown-menu' style='width:150px;left:50%;margin-left:-75px;background:#ffffff;position:absolute;' role='menu'>
- <li><a href='#' @click='modifyDashboard(dashboard.id)'><@spring.message 'common.edit'/></a></li>
- <li class='divider'></li>
- <li><a href='#' @click='removeDashboard(dashboard.id)'><@spring.message 'common.delete'/></a></li>
- </ul> -->
- <a><div></div></a>
- <div class="db-title">
- <span class="db-name">{{dashboard.name}}</span>
- <span class="db-ops">
- <i class="fa fa-pencil" @click='modifyDashboard(dashboard.id)'></i>&nbsp;
- <i class="fa fa-trash-o" @click='removeDashboard(dashboard.id)'></i>
- </span>
- </div>
- </div>
- </header>
- <div :id="dashboard.name" :style="{height:'calc(100% - 32px)',overflowY:'auto'}" class='right-bottom'>
- <template v-if="dashboard.chartType === 3">
- <table id='tablePanel' :style="{fontSize: (JSON.parse(dashboard.data)).fontSize + 'px' }" class='table table-striped table-bordered table-condensed'>
- <thead>
- <tr><th class='' id='tableColumnTime'>{{(JSON.parse(dashboard.data)).tName}}</th>
- <th class='' id='tableColumnValue'>{{(JSON.parse(dashboard.data)).vName}}</th></tr>
- </thead>
- <tbody>
- <template v-for="data,index in JSON.parse((JSON.parse(dashboard.data)).series)">
- <tr>
- <td style='width:50%'>{{data.formatTime}}</td>
- <!-- <td>{{(data.value).toFixed((JSON.parse(dashboard.data)).decimal)}}</td> -->
- <td>{{data.value}}</td>
- </tr>
- </template>
- </tbody>
- </table>
- </template>
- </div>
- </li>
- </template>
- </ul>
- </div>
- </div>
- </div>
-
- <!-- 仪表盘配置界面 -->
- <#include "/modules/dashboard/setting.html"/>
-</div>
-
-</body>
-
-<#include "/js/modules/dashboard/dashboard.js"/>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/dashboard/setting.html b/nezha-admin/src/main/resources/templates/modules/dashboard/setting.html
deleted file mode 100644
index 3ed7534f..00000000
--- a/nezha-admin/src/main/resources/templates/modules/dashboard/setting.html
+++ /dev/null
@@ -1,414 +0,0 @@
-<html>
-<head>
- <meta name="decorator" content="default"/>
-</head>
-<body>
- <div v-show='dashboardSetting'>
- <div class="tools">
- <!-- 返回操作 -->
- <a title="<@spring.message 'common.back'/>" ref='returnMenu' class="btn btn-default" @click="returnMenu()">
- <i class="fa fa-arrow-left"></i>
- </a>
- <!-- 保存操作 -->
- <a title="<@spring.message 'common.save'/>" class="btn btn-primary" @click="savePanelInfo()">
- <i class="fa fa-floppy-o"></i>
- </a>
- <!-- <a title="" class="btn btn-default">
- <i class="fa fa-desktop"></i>
- </a> -->
- </div>
-
- <!-- 图表头 标题名称以及描述信息 -->
- <div style="height: 20px;">
- <span id="panelDescribe" v-show="dashboard.describe"><i class="fa fa-exclamation-circle" :title='dashboard.describe'></i></span>
- <span id="panelTitle">{{dashboard.title}}</span>
- </div>
- <div class="preview">
- <!-- 图表展示位置 -->
- <div class="top" id="chart" v-show="dashboard.chartType.code==1"></div>
- <div class="top" id="tableChart" style='overflow-y: auto;' v-show="dashboard.chartType.code==3">
- <table id='tablePanel' :style="{fontSize: chartTable.fontSize + 'px' }" class='table table-striped table-bordered table-condensed'>
- <thead>
- <tr>
- <th class='' id='tableColumnTime'>{{chartTable.vName}}</th><th class='' id='tableColumnValue'>{{chartTable.tName}}</th>
- </tr>
- </thead>
- <tbody>
- <template v-for='tableData in tableDatas'>
- <tr><td style='width:50%'>{{tableData.formatTime}}</td><td>{{(tableData.value).toFixed(chartTable.decimal)}}</td></tr>
- </template>
- </tbody>
- </table>
- </div>
- <div class="top" id="singleChart" v-show="dashboard.chartType.code==2"></div>
- </div>
- <hr/>
-
- <!-- 配置设置 -->
- <form id="panelConfigForm">
- <input style="display:none" name="dashboardId" id="dashboardId" value=""/>
- <input style="display:none" name="chartId" id="chartId" value=""/>
- <input style="display:none" id="chartType" value=""/>
- <input style="display:none" name="dbInfo.type" value="" id="dbInfoId"/>
- <div class="bottom">
- <div class="left">
- <div class="btn btn-one btn-picture" :style='{backgroundImage:(query?"url(${request.contextPath}/statics/images/query.png)":"url(${request.contextPath}/statics/images/query-active.png)"),backgroundSize: "cover",backgroundRepeat: "noRepeat"}' @click='changeSetShow(1)'></div>
- <div class="btn btn-two btn-picture" :style='{backgroundImage:(chart?"url(${request.contextPath}/statics/images/chart.png)":"url(${request.contextPath}/statics/images/chart-active.png)"),backgroundSize: "cover",backgroundRepeat: "noRepeat"}' @click='changeSetShow(2)'></div>
- <div class="btn btn-three btn-picture" :style='{backgroundImage:(set?"url(${request.contextPath}/statics/images/set.png)":"url(${request.contextPath}/statics/images/set-active.png)"),backgroundSize: "cover",backgroundRepeat: "noRepeat"}' @click='changeSetShow(3)'></div>
- </div>
-
- <!-- 数据库类型选项 -->
- <div class="right ri-flex chart1" id='databaseChoose' v-show="!query">
- <div class="right_top">
- <!-- 数据库: <multiselect class="input-medium required formatSelect" :allow-empty='false' placeholder="DatabaseType" open-direction="bottom" v-model="dashboard.databaseType" :options="databaseType" label="value" :show-labels="false"></multiselect> -->
- <span title="" id="addNewQuery" class="btn btn-default" @click="addNewQuery()" style="position: relative;top: 0px;right: 20px;float:right" v-show='dashboard.chartType.code==1'>
- <i class='glyphicon glyphicon-plus'></i>
- </span>
- </div>
-
- <div class="right-bottom" v-for="userSql,index in userSqls">
- <div class="box-parent">
- <div class="box-child">
- <div class="box">
- <div style="height:40px;background-color: #B0C4DE;text-align: center;">
- <label style="position: relative;top: 10px;float:left;left:5px"><@spring.message 'common.name'/>:</label>
- <input class="input-mini required" @blur="changeLegend(index)" :value="userSql.describe" style="position: relative;top: 8px;float:left;left:8px"/>
- <span title="" class="btn btn-default" @click="removeQuery(index)" style="position: relative;top: 4px;right: 20px;float:right" :key="userSql.describe" v-show='userSqls.length>1'>
- <i class='fa fa-trash-o'></i>
- </span>
- </div>
- <textarea id="0" ref='userSql' v-model="userSql.sql" cols="" style='width:100%;height:200px' class='userSql' @blur="queryData(index)" name="">{{userSql.sql}}</textarea>
- </div>
- </div>
- </div>
- </div>
-
- </div>
-
-
- <!-- 图表类型配置选项 -->
-
- <div class="right ri-flex chart1" id='chartTypeChoose' v-show="!chart">
- <div class="right_top">
- <@spring.message 'dashboard.chartType'/> <multiselect class="input-medium required formatSelect" :allow-empty='false' placeholder="ChartType" v-model="dashboard.chartType" open-direction="bottom" :options="chartType" title="" label="value" :show-labels="false"></multiselect>
- </div>
-
- <!-- 点、线、柱图设置区域 -->
- <div class="right-bottom statisticalChart" v-show="dashboard.chartType.code==1">
- <div class="box-parent">
- <div class="box-child">
- <div class="box">
- <ul>
- <li class="title"><@spring.message 'dashboard.chartType'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.line'/></div>
- <span class='chooseOption'><input id="isLine" data-on-color='success' data-off-color='danger' class='switch' type="checkbox" name="" v-model="chartStatistical.lines" :checked="chartStatistical.lines==1?'checked':''"></span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.scatter'/></div>
- <span class='chooseOption'><input id="isScatter" data-on-color='success' data-off-color='danger' class='switch' type="checkbox" name="" v-model="chartStatistical.points" :checked="chartStatistical.points==1?'checked':''"></span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.bar'/></div>
- <span class='chooseOption'><input id="isBar" data-on-color='success' data-off-color='danger' class='switch' type="checkbox" name="" v-model="chartStatistical.bars" :checked="chartStatistical.bars==1?'checked':''"></span>
- </li>
- </ul>
- <ul>
- <li class="title"><@spring.message 'dashboard.style'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.fillColor'/></div>
- <span class='chooseOption'>
- <multiselect class="input-small required formatSelect" :allow-empty='false' open-direction="bottom" v-model="chartStatistical.fill" :options="fills" :show-labels="false"></multiselect>
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.lineWidth'/></div>
- <span class='chooseOption'>
- <multiselect class="input-small required formatSelect" :allow-empty='false' open-direction="bottom" v-model="chartStatistical.lineWidth" :options="lineWidths" :show-labels="false"></multiselect>
- </span>
- </li>
- </ul>
- </div>
- <div class="box">
- <ul>
- <li class="title"><@spring.message 'dashboard.yXaxis'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.show'/></div>
- <span class='chooseOption'><input data-on-color='success' data-off-color='danger' type="checkbox" name="" class='switch' id="leftYOpen" v-model="chartStatistical.yaxes"></span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'common.name'/></div>
- <span class='chooseOption'><input class="input-mini required" placeholder="" v-model='chartStatistical.yaxesName' @blur='setLeftYName()'/></span>
- </li>
- </ul>
- <ul>
- <li class="title"><@spring.message 'dashboard.yXaxes'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.show'/></div>
- <span class='chooseOption'><input data-on-color='success' data-off-color='danger' type="checkbox" name="" class='switch' id="rightYOpen" v-model='chartStatistical.yaxis'></span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'common.name'/></div>
- <span class='chooseOption'><input class="input-mini required" @blur='setRightYName()' v-model='chartStatistical.yaxisName'/></span>
- </li>
- </ul>
- <ul>
- <li class="title"><@spring.message 'dashboard.xXaxis'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.show'/></div>
- <span class='chooseOption'><input data-on-color='success' data-off-color='danger' type="checkbox" name="" class='switch' id="xOpen" name="" v-model='chartStatistical.xaxis'></span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'common.name'/></div>
- <span class='chooseOption'><input class="input-mini required" placeholder="" @blur='setXName()' v-model='chartStatistical.xaxisName'/></span>
- </li>
- </ul>
- </div>
- <div class="box">
- <div></div>
- <ul>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.legend'/></div>
- <span class='chooseOption'><input id="legendShow" data-on-color='success' data-off-color='danger' type="checkbox" name="" class='switch' v-model="chartStatistical.legend" :checked="chartStatistical.legend==1?'checked':''"></span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.xPosition'/></div>
- <span class='chooseOption'>
- <multiselect class="input-small required formatSelect" :allow-empty='false' v-model="chartStatistical.legendXPosition" :options="legendXPositions" label="value" :show-labels="false"></multiselect>
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.yPosition'/></div>
- <span class='chooseOption'>
- <multiselect class="input-small required formatSelect" :allow-empty='false' v-model="chartStatistical.legendYPosition" :options="legendYPositions" label="value" :show-labels="false"></multiselect>
- </span>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
-
- <!-- 表格图设置区域 -->
- <div class="right-bottom tableChart" v-show="dashboard.chartType.code==3">
- <div class="box-parent">
- <div class="box-child">
- <div class="box">
- <ul>
- <li class="title"><@spring.message 'dashboard.tableSet'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.paging'/></div>
- <span class='chooseOption'><input id="isPaging" data-on-color='success' data-off-color='danger' class='switch' type="checkbox" name="" value="" ></span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.pageSize'/></div>
- <span class='chooseOption'><input class="input-mini required" placeholder="10" id="tablePageSize" name="" onblur="setPageSize(this)" value="" disabled/></span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.fontSize'/></div>
- <span class='chooseOption'><input id="tableFontSize" class="input-mini required" placeholder="5" v-model='chartTable.fontSize' /></span>
- </li>
- </ul>
- <ul>
- <li class="title"><@spring.message 'dashboard.style'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.value'/></div>
- <span class='chooseOption'>
- <input class="input-mini required" placeholder="" name="" value="Value" disabled/>
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'common.name'/></div>
- <span class='chooseOption'>
- <input class="input-mini required" placeholder="Value" v-model='chartTable.vName'/>
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.decimal'/></div>
- <span class='chooseOption'>
- <input class="input-mini required" placeholder="2" id="decimal" v-model='chartTable.decimal' onkeyup="this.value=this.value.replace(/\D/g,'')"/>
- </span>
- </li>
- </ul>
- <ul>
- <li class="title"><@spring.message 'dashboard.style'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.time'/></div>
- <span class='chooseOption'>
- <input class="input-normal required" placeholder="Time" disabled/>
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'common.name'/></div>
- <span class='chooseOption'>
- <input class="input-normal required" placeholder="Time" v-model='chartTable.tName' />
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.timeFormat'/></div>
- <span class='chooseOption'>
- <multiselect class="input-large required formatSelect" v-model="chartTable.timeFormat" open-direction="bottom" :options="timeFormats" label="value" :show-labels="false" @input='dateF()'></multiselect>
- </span>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
-
- <!-- 单值图配置区域 -->
- <div class="right-bottom singleChart" v-show="dashboard.chartType.code==2">
- <div class="box-parent">
- <div class="box-child">
- <div class="box">
- <ul>
- <li class="title"><@spring.message 'dashboard.value'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.fontSize'/></div>
- <span class='chooseOption'><input id="singleFontSize" class="input-mini required" placeholder="" v-model='chartSingle.valueFontSize' @blur="setSingleFontSize()"/></span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.decimal'/></div>
- <span class='chooseOption'><input id="singleDecimal" class="input-mini required" placeholder="" v-model='chartSingle.decimal' @blur='setSingleDecimal()'/></span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.fontColor'/></div>
- <span class='chooseOption'><input class="input-mini required singleColor" ref='singleColor' placeholder="" v-model='chartSingle.colorValue' @blur='setSingleColor(this)'/></span>
- </li>
- </ul>
- <ul>
- <li class="title"><@spring.message 'dashboard.prefix'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'common.name'/></div>
- <span class='chooseOption'>
- <input class="input-mini required" placeholder="" v-model='chartSingle.prefix' />
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.fontSize'/></div>
- <span class='chooseOption'>
- <input class="input-mini required" id="singlePrefixFontSize" v-model='chartSingle.prefixFontSize' @blur="setSinglePrefixFontSize()"/>
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.fontColor'/></div>
- <span class='chooseOption'>
- <input class="input-mini required singleColor" v-model='chartSingle.colorPrefix' @blur="setSingleColorPrefix(this)" ref="colorPrefix"/>
- </span>
- </li>
- </ul>
- <ul>
- <li class="title"><@spring.message 'dashboard.suffix'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'common.name'/></div>
- <span class='chooseOption'>
- <input class="input-mini required" v-model='chartSingle.suffix'/>
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.fontSize'/></div>
- <span class='chooseOption'>
- <input class="input-mini required" id="singleSuffixFontSize" v-model='chartSingle.suffixFontSize' @blur="setSingleSuffixFontSize()"/>
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.fontColor'/></div>
- <span class='chooseOption'>
- <input id="colorPrefix" class="input-mini required singleColor" v-model='chartSingle.colorSuffix' @blur="setSingleColorSuffix(this)" ref="colorSuffix"/>
- </span>
- </li>
- </ul>
- </div>
-
- <div class="box">
- <ul>
- <li class="title"><@spring.message 'dashboard.dashboard'/></li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.show'/></div>
- <span class='chooseOption'>
- <input id="isGauge" data-on-color='success' data-off-color='danger' class='switch' type="checkbox" v-model='chartSingle.isGauge' :checked="chartSingle.isGauge==1?'checked':''">
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.minValue'/></div>
- <span class='chooseOption'>
- <input class="input-mini required" v-model='chartSingle.minValue' @blur='setSingleMinValue()'/>
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.maxValue'/></div>
- <span class='chooseOption'>
- <input class="input-mini required" v-model='chartSingle.maxValue' @blur='setSingleMaxValue()'/>
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.threshold'/></div>
- <span class='chooseOption'>
- <input id="isThreshold" data-on-color='success' data-off-color='danger' class='switch' type="checkbox" v-model='chartSingle.isThreshold' :checked="chartSingle.isThreshold==1?'checked':''" >
- </span>
- </li>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.scale'/></div>
- <span class='chooseOption'>
- <input id="isAxisLabelShow" data-on-color='success' data-off-color='danger' class='switch' type="checkbox" v-model='chartSingle.isScale' :checked="chartSingle.isScale==1?'checked':''">
- </span>
- </li>
- </ul>
-
- <ul id="thresholdConfig" v-show="chartSingle.isThreshold==1">
- <li class="title">
- <@spring.message 'dashboard.threshold'/>
- </li>
- <li class="list thresholdConfig" v-for="thresholdValue,index in chartSingle.thresholdValues">
- <div class="li-left"><@spring.message 'dashboard.scope'/></div>
- <span class=''>
- <input class="input-mini required" placeholder="" name="" v-model='chartSingle.thresholdValues[index].value' @blur='resetThresholdColor()'/>
- </span>
- <div class="li-left"><@spring.message 'dashboard.color'/></div>
- <span class="meta-box__delbtn chooseOption"><a href="javascript:void(0)" title='' style='text-decoration:none;' @click="removeThreshold(index)"><font color="red" class="" style="font-size:30px;" v-show="chartSingle.thresholdValues.length>1">×</font></a></span>
- <span class='chooseOption'>
- <input class="input-mini required singleColor" placeholder="" name="" v-model='chartSingle.thresholdValues[index].color' @blur='setThresholdColor(index)'/>
- </span>
- </li>
- <li class="list" style="text-align:center">
- <span title="" id="" class="btn btn-default" style="text-align:center" @click='addThreshold()'>
- <i class='glyphicon glyphicon-plus'></i>
- </span>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <!-- chart框设置选项 -->
- <div class="right ri-flex chart1" id='setting' v-show="!set">
- <div class="right_top">
- </div>
- <div class="right-bottom">
- <div class="box-parent">
- <div class="box-child">
- <div class="box">
- <ul>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.title'/></div>
- <span class='chooseOption'><input name="title" class="input-medium" type="text" placeholder="" maxlength="50" v-model='dashboard.title'></span>
- </li>
- </ul>
- <ul>
- <li class="list">
- <div class="li-left"><@spring.message 'dashboard.describe'/></div>
- <span class='chooseOption'><textarea style="height:30px" name="describe" v-model='dashboard.describe'></textarea></span>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </form>
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/detect/addTypeTemplate.html b/nezha-admin/src/main/resources/templates/modules/detect/addTypeTemplate.html
deleted file mode 100644
index d781f9c0..00000000
--- a/nezha-admin/src/main/resources/templates/modules/detect/addTypeTemplate.html
+++ /dev/null
@@ -1,392 +0,0 @@
-<script type="text/x-template" id="addTypeTemplate">
- <div :class="{'panel panel-default':typeNotLayer}" style="overflow-x: hidden">
- <div v-show="typeNotLayer" class="panel-heading">{{title}}</div>
- <form class="form-horizontal">
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/></div>
- <div class="col-sm-9"><!--名称-->
- <input type="text" class="form-control input-control"
- :class="{'form-control--error': $v.deteType.name.$dirty && !$v.deteType.name.required|| !$v.deteType.name.nameRepeat}"
- v-model.trim="$v.deteType.name.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteType.name.$dirty && !$v.deteType.name.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg" v-if="$v.deteType.name.$dirty && !$v.deteType.name.nameRepeat">
- 名称重复
- </div>
- </div>
- </div>
- <div class="form-group"> <!--监测方式-->
- <div class="col-sm-2 control-label"><@spring.message 'deteType.method'/></div>
- <div class="col-sm-9" style="z-index:1000;">
- <multiselect v-model="defaultMethod" :options="deteMethods" placeholder="..." track-by="code"
- label="value" :searchable="false" :allow-empty="false" :disabled="isUpdate"
- :show-labels="false"></multiselect>
- </div>
-
- </div>
- <div class="form-group"><!--监测间隔-->
- <div class="col-sm-2 control-label"><@spring.message 'deteType.deteInterval'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control input-control input-small input-with-unit "
- :class="{'form-control--error input-control': $v.deteType.deteInterval.$dirty && !$v.deteType.deteInterval.integer}"
- v-model.trim="$v.deteType.deteInterval.$model"/>
- <span class="input-unit">s</span>
- <!-- <span class="required-symbol">*</span>-->
- <div class="form-control_error-msg"
- v-if="$v.deteType.deteInterval.$dirty && !$v.deteType.deteInterval.integer">整数类型
- </div>
- </div>
- </div>
-
- <div class="form-group"><!--内容-->
- <div v-if="defaultMethod.code=='2'">
- <div class="col-sm-2 control-label">OID</div>
- <div class="col-sm-9" >
- <input v-model.trim="$v.deteType.content.$model" class="form-control input-control"></input>
- </div>
- </div>
-
- <template v-if="defaultMethod.code=='1'">
- <nz-fileupload
- v-if="uploadReset"
- :hasOld="hasOldFile"
- :oldFile="oldFile"
- :accept="acceptFile"
- v-model="file"
- ref="scriptUpload"
- @uploadComponetDestory="destoryUploadComponet"
- ></nz-fileupload>
- </template>
- </div>
-
- <div class="form-group"><!--元数据-->
- <div class="col-sm-2 control-label"><@spring.message 'deteType.meta'/></div>
- <div class="col-sm-9">
- <div class="add-box">
- <div class="add-box_head">
- <span class="add-box_cell add-box_cell_25">Field-Type
- <!-- <span class="metatype-question"><i class="fa fa-question-circle"></i></span> -->
- </span>
- <span class="add-box_cell add-box_cell_25">Data-Type
- <!-- <span class="metatype-question"><i class="fa fa-question-circle"></i></span> -->
- </span>
- <span class="add-box_cell">Name</span>
- </div>
- <div class="add-box_body add-box_body_160">
- <div class="add-box_row"
- v-for="(meta,index) in deteType.deteTypeMetas"
- :class="{'danger2':meta.passFlag!=undefined&&!meta.passFlag}"
- v-if="meta.delFlag=='0'" >
- <div class="add-box_cell add-box_cell_25">
- <span class="add-box_tag1">{{meta.fieldType.value}}</span>
- </div>
- <div class="add-box_cell add-box_cell_25">
- <span class="add-box_tag2">{{meta.dataType.value}}</span>
- </div>
- <span class="add-box_cell" :title="meta.name" v-html="meta.name.length>20?spliteName(meta.name):meta.name"></span>
- <span class="add-box_ops" >
- <i @click="openMetaWindow(index)" class="fa fa-pencil"></i>
- <i @click="delMeta(index)" :class="{'btn-cursor-not-allowed':deteType.method=='3'}" class="fa fa-trash-o"></i>
- </span>
- </div>
- </div>
- <div class="add-box_foot">
- <i @click="openMetaWindow()" class="fa fa-plus"></i>
- </div>
-
- </div>
- <div class="form-control_error-msg" v-if="metaDirty&&!metaRequired">
- <@spring.message 'validate.common.required'/>
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'param'/></div>
- <div class="col-sm-9">
- <div class="add-box">
- <div class="add-box_head">
- <span class="add-box_cell add-box_cell_45">Name</span>
- <span class="add-box_cell">Default</span>
- </div>
- <div class="add-box_body" id="r-dete-param-container">
- <template v-for="(param,index) in deteType.deteTypeParams">
- <nz-add-param
- v-if="paramReset"
- :dete-param="param"
- ref="r-detect-param"
- :index="index"
- :dete-method="defaultMethod"
- :dete-params="deteType.deteTypeParams"
- @ask-for-swap="swapParam"
- @del-param="delParam"
- ></nz-add-param>
- </template>
- </div>
- <div class="add-box_foot">
- <i @click="addParam" class="fa fa-plus" :class="{'btn-cursor-not-allowed':deteType.method=='3'}"></i>
- </div>
- </div>
- <div class="form-control_error-msg" v-if="paramDirty&&!paramRequired"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <!--<div class="form-group">
- <div class="col-sm-2 control-label">I18n Code</div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control&#45;&#45;error': $v.deteType.i18nCode.$dirty && !$v.deteType.i18nCode.required }"
- v-model.trim="$v.deteType.i18nCode.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.deteType.i18nCode.$dirty && !$v.deteType.i18nCode.required"><@spring.message
- 'validate.common.required'/>
- </div>
-
- </div>
- </div>-->
-
- <div class="form-group"><!--备注-->
- <div class="col-sm-2 control-label"><@spring.message 'common.remark'/> </div>
- <div class="col-sm-9">
- <textarea v-model.trim="$v.deteType.remark.$model" class="form-control input-control"></textarea>
- </div>
- </div>
-
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary input-control" style="width: 55px" @click="saveOrUpdate">
- <i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning" style="width: 55px" @click="reload"><i
- class="fa fa-reply"></i></button>
- </div>
- </div>
- </form>
-
- <div id="metaWindow" style="height:100%;display:none;">
- <nz-add-meta
- v-if="metaReset"
- ref="addMetaWindow"
- :dete-metas="deteType.deteTypeMetas"
- :dete-method="defaultMethod"
- :field-types="fieldTypes"
- :data-types="dataTypes"
- :dic-types="dicTypes"
- ></nz-add-meta>
-
- </div>
-<!-- <div class="shadow" style="display: block;" v-show="deteType.method=='3'"></div>-->
- </div>
-
-</script>
-
-<script type="text/x-template" id="addDetectMata">
- <div style="height:100%">
- <!-- meta列表 -->
- <div class="meta-win_list" >
- <template v-for="(meta,index) in deteMetas" v-if="reset">
- <detect-meta
- ref="r-detect-meta"
- :dete-meta="meta"
- :dete-metas="deteMetas"
- :index="index"
- :dete-method="deteMethod"
- :field-types="fieldTypes"
- :data-types="dataTypes"
- :dic-types="dicTypes"
- :del-meta="delMeta"
- @up-meta="getOpMeta"
- @swap-meta="swapMeta"
- ></detect-meta>
- </template>
- <!-- 新增按钮 -->
- <div class="meta-win_list-foot">
- <i @click="addMeta" class="fa fa-plus" :class="{'btn-cursor-not-allowed':deteMethod.code=='3'}"></i>
- </div>
- </div>
- <!-- meta详情 -->
- <div class="meta-details" id="meta-details" >
-
- </div>
- </div>
-</script>
-
-<script type="text/x-template" id="detectMata">
- <div>
- <div class="meta-win_item" v-id:[metaDomIdKey]="index">
- <span v-show="deteMeta.delFlag=='1'" style="display: inline-block;cursor:pointer;" @click="recSelf"><i class="fa fa-undo"></i>&nbsp;&nbsp;</span>
- <div class="meta-win_item_name" style="display: inline-block"
- :class="{'meta-win_item_name_unpass':deteMeta.passFlag!=null&&deteMeta.passFlag!=undefined&&!deteMeta.passFlag,'meta-win_item_name_del':deteMeta.delFlag=='1'}">{{deteMeta.name}}</div>
- <div style="text-align:right;">
- <span style="color: red;position:absolute;top:2px;left:2px;" class="myicon-new" v-show="deteMeta.new"></span>
- <span class="add-box_tag1">{{deteMeta.fieldType.value}}</span>
- <span class="add-box_tag2">{{deteMeta.dataType.value}}</span>
- </div>
- </div>
- <div v-id:[metaDetailDomIdKey]="index" class="r-dete-meta-detail" >
- <div>
- <form class="form-horizontal form-horizontal_400" >
- <div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'common.name'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control nameEvent" v-model="$v.deteMeta.name.$model"/>
- <span class="required-symbol_400">*</span>
- <div class="form-control_error-msg" v-if="$v.deteMeta.name.$dirty&&!$v.deteMeta.name.required"><@spring.message 'validate.common.required'/></div>
- <div class="form-control_error-msg" v-if="$v.deteMeta.name.$dirty&&!$v.deteMeta.name.inPageNameRepeat"><@spring.message 'validate.deteType.name.repeat'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'deteType.fieldType'/></div>
- <div class="col-sm-9">
- <multiselect
- :options="fieldTypes"
- placeholder="..."
- track-by="code"
- label="value"
- :searchable="false"
- :allow-empty="false"
- v-model="$v.deteMeta.fieldType.$model"
- :show-labels="false">
- <template slot="option" slot-scope="props">
- <div>
- <span style="font-weight: bold;">{{props.option.value}}</span>
- <span style="font-size: 2px">{{props.option.remark}}</span>
- </div>
- </template>
-
- </multiselect>
-<!-- <span class="required-symbol_400">*</span>-->
-<!-- <div class="form-control_error-msg" v-if="$v.deteMeta.fieldType.$dirty&&!$v.deteMeta.fieldType.required"><@spring.message 'validate.common.required'/></div>-->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'deteType.dataType'/></div>
- <div class="col-sm-9">
- <multiselect
- :options="dataTypes"
- placeholder="..."
- track-by="code"
- label="value"
- v-model="$v.deteMeta.dataType.$model"
- :searchable="false"
- :allow-empty="false"
- :show-labels="false">
- <template slot="option" slot-scope="props">
- <div>
- <span style="font-weight: bold;">{{props.option.value}}</span>
- <span style="font-size: 2px">{{props.option.remark}}</span>
- </div>
- </template>
- </multiselect>
-<!-- <span class="required-symbol_400">*</span>-->
-<!-- <div class="form-control_error-msg" v-if="$v.deteMeta.dataType.$dirty&&!$v.deteMeta.dataType.required"><@spring.message 'validate.common.required'/></div>-->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'deteType.dataLenth'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="$v.deteMeta.dataLenth.$model"/>
-<!-- <span class="required-symbol_400">*</span>-->
-<!-- <div class="form-control_error-msg" v-if="$v.deteMeta.dataLenth.$dirty&&!$v.deteMeta.dataLenth.required"><@spring.message 'validate.common.required'/></div>-->
- </div>
- </div>
- <div class="form-group" v-show="deteMethod.code=='2'">
- <div class="col-sm-3 control-label">OID:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="$v.deteMeta.oid.$model"/>
- <span class="required-symbol_400">*</span>
- <div class="form-control_error-msg" v-if="deteMethod.code=='2'&&$v.deteMeta.oid.$dirty&&!$v.deteMeta.oid.required"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'deteType.unit'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="$v.deteMeta.unit.$model"/>
-<!-- <span class="required-symbol_400">*</span>-->
-<!-- <div class="form-control_error-msg" v-if="$v.deteMeta.unit.$dirty&&!$v.deteMeta.unit.required"><@spring.message 'validate.common.required'/></div>-->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'deteType.dicType'/></div>
- <div class="col-sm-9">
- <multiselect
- :options="dicTypes"
- placeholder="..."
- :searchable="false"
- value="dataType"
- v-model="$v.deteMeta.dicType.$model"
- :show-labels="false">
- <template slot="option" slot-scope="props">
- <div style="position:absolute;top:20%;left:0;width:1px;height:1px;"></div>
- <div style="line-height: 30px" :id="'r-dictype-option-'+props.option.type+'-'+index" @mouseenter="mouseAt(props.option.type, $event)" @mouseleave="mouseout">{{props.option.type}}</div>
- <div :id="'r-dictype-option-detail-'+props.option.type+'-'+index" style="display: none;">
- <div style="color: white;" v-for="mapping in props.option.mappings">
- <span style="display:inline-block; min-width:35px;">{{mapping.val}}</span>
- <span style="display:inline-block; width:15px;">:</span>
- <span style="display:inline-block; min-width:35px;">{{mapping.mapping}}</span>
- </div>
- </div>
-<!-- </div>-->
- </template>
- <template slot="singleLabel" slot-scope="props">
- <div>{{props.option.type}}</div>
- </template>
-
- </multiselect>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message "common.remark"/></div>
- <div class="col-sm-9">
- <textarea class="form-control" v-model="$v.deteMeta.remark.$model"></textarea>
- </div>
- </div>
- <div class="form-group form-group_opbox_meta-model" >
- <div>
- <!-- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary" style="width: 45px; padding: 3px 0;" @click="saveOrUpdate"><i class="fa fa-check"></i></button>-->
- <div style="display:inline-block;width:130px;"></div>
- <button title="<@spring.message 'common.delete'/>" @click="delSelf(index)" type="button" class="btn btn-danger" style="width: 45px; padding: 3px 0;"><i class="fa fa-trash-o"></i></button>
- <!-- <button title="恢复" @click="recMeta($event)" type="button" class="btn btn-success" style="width: 45px; padding: 3px 0;display: none;"><i class="fa fa-undo"></i></button>-->
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class="shadow"></div>
- </div>
- </div>
-</script>
-
-<script type="text/x-template" id="addDetectParam" >
- <div draggable="true" :index="index">
- <div class="add-box_row" v-show="!editSwitch" v-id:[listPreKey]="index" :class="{'text-disabled':deteParam.delFlag=='1'}">
- <div class="add-box_cell add-box_cell_45">{{deteParam.name}}</div>
- <span class="add-box_name">{{deteParam.defVal}}</span>
- <span class="add-box_ops" >
- <i @click="editSelf" class="fa fa-pencil" :id="'add-box_op_edit_'+index" :class="{'btn-cursor-not-allowed':deteMethod.code=='3'}"></i>
- <i @click="deteParam.delFlag=='0'?delSelf():recSelf()" :class="{'fa fa-trash-o':deteParam.delFlag=='0','fa fa-undo':deteParam.delFlag=='1','btn-cursor-not-allowed':deteMethod.code=='3'}"></i>
- </span>
-<!-- <span :class="{'add-box_del':deteParam.delFlag=='0','add-box_rec':deteParam.delFlag=='1'}" ></span>-->
- </div>
- <div class="add-box_row" v-show="editSwitch" v-id:[editPreKey]="index">
- <div :id="'r-layer-warn-defval-'+index" >
-
- </div>
- <form class="form-inline">
- <div class="add-box_cell add-box_cell_45">
- <input type="text" :id="'r-param-name-input-'+index" :class="{'form-control--error':$v.deteParam.name.$dirty&&(!$v.deteParam.name.required||!$v.deteParam.name.inPageNameRepeat)}" class="form-control add-box_input" placeholder="<@spring.message 'common.input'/><@spring.message 'common.name'/>" v-model="$v.deteParam.name.$model">
- </div>
- <div class="add-box_cell add-box_cell_45">
- <input type="text" :id="'r-param-defval-input-'+index" :class="{'form-control--error':$v.deteParam.defVal.$dirty&&!$v.deteParam.defVal.required}" class="form-control add-box_input" placeholder="<@spring.message 'common.input'/><@spring.message 'common.defVal'/>" v-model="$v.deteParam.defVal.$model">
- </div>
- <span class="add-box_ops">
- <i @click="submitSelf" class="fa fa-check" ></i>
- <i @click="delSelf" class="fa fa-trash-o " ></i>
- </span>
- </form>
- </div>
- </div>
-
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/detect/deteSet.html b/nezha-admin/src/main/resources/templates/modules/detect/deteSet.html
deleted file mode 100644
index b200c08c..00000000
--- a/nezha-admin/src/main/resources/templates/modules/detect/deteSet.html
+++ /dev/null
@@ -1,219 +0,0 @@
-<!DOCTYPE HTML>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
- <title><@spring.message 'deteSet'/></title>
- <link rel="stylesheet" href="${request.contextPath}/statics/css/nzNodeSelector.css">
- <link rel="stylesheet" href="${request.contextPath}/statics/css/addDetectType.css?">
- <link rel="stylesheet" href="${request.contextPath}/statics/css/detect.css">
- <style type="text/css">
- table:focus{ outline:none; }
- </style>
-</head>
-<#include "/header.html">
-<body>
-<div id="deteSet" v-cloak>
- <div v-show="openAddTypeWindow" id="add-type-layer-view">
- <nz-detect-addtype
- v-if="layerReset"
- :type-id="typeId"
- :parent-layer-id="layerId"
- :reload-func="closeAddType"
- ></nz-detect-addtype>
- </div>
- <div v-show="showList">
- <div class="tools">
- <div class="form-group">
- <input type="text" class="form-control input-medium" v-model.trim="params.name" @keyup.enter="query"
- placeholder="<@spring.message 'common.name'/>">
- </div>
- <div class="form-group">
- <multiselect v-model="params.type" :options="deteTypes" placeholder="..." track-by="id" label="name"
- :searchable="false" :allow-empty="false" :show-labels="false" class="input-medium"></multiselect>
- </div>
- <a class="btn btn-default btn-search" @click="query" title="<@spring.message 'common.search'/>"><i class="fa fa-search"></i></a>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- <a :disabled="single" class="btn btn-primary" @click="update" title="<@spring.message 'common.edit'/>"><i class="fa fa-pencil-square-o"></i></a>
- <a :disabled="multi" class="btn btn-primary" @click="del" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
- </div>
-
- <div id="deteSetEditView" v-show="!showList" class="panel panel-default">
- <div class="panel-heading">{{title}}</div>
- <form class="form-horizontal">
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.deteSet.name.$dirty && (!$v.deteSet.name.required || !$v.deteSet.name.nameRepeat)}"
- v-model.trim="$v.deteSet.name.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteSet.name.$dirty && !$v.deteSet.name.required"><@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg" v-if="$v.deteSet.name.$dirty && !$v.deteSet.name.nameRepeat"><@spring.message 'validate.common.name.repeat'/>
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteType'/></div>
- <div class="col-sm-9">
- <multiselect v-model="$v.deteSet.typeId.$model"
- :value="deteSet.typeId"
- :class="{'form-control--error': $v.deteSet.typeId.$dirty && !$v.deteSet.typeId.required}"
- :options="deteTypes"
- placeholder="..."
- track-by="id"
- label="name"
- :searchable="false"
- :allow-empty="false"
- :show-labels="false"
- @select="getDeteTypeDetail"
- >
- <div slot="afterList">
- <div class="select-add"><i class="fa fa-plus" @click="openAddDetectType"></i></div>
- </div>
- </multiselect>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteSet.typeId.$dirty && !$v.deteSet.typeId.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg" v-if="deteTypeIsNull&&(deteSet.typeId==null||deteSet.typeId=='')">
- <@spring.message 'validate.deteSet.pickTypeFirst'/>
- </div>
- </div>
- </div>
-
- <div class="form-group" v-show="typeParams !=null && typeParams.length>0">
- <div class="col-sm-2 control-label"><@spring.message 'validate.deteSet.param'/>:</div>
- <div class="col-sm-9">
- <div class="add-box">
- <div class="add-box_head">
- <span class="add-box_cell add-box_cell_30">名称</span>
- <span class="add-box_cell add-box_cell_60">值</span>
- </div>
- <div class="add-box_body">
- <label-input v-for="param,index in typeParams" :def-val="param.defVal" :label="param.name" v-model="paramVals[index]"></label-input>
- </div>
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.selectNodeOrNodeGroup'/></div>
- <div class="col-sm-9">
- <!-- <a class="btn btn-default" href="#" @click="openNodePannel">节点/节点组</a>-->
- <div class="add-box add-box_first" :class="{'form-control--error': nodeOrGroupEmpty}">
- <div class="add-box_head">
- <span class="add-box_cell"><@spring.message 'common.nodeGroup'/></span>
- </div>
- <div class="add-box_body add-box_body_160 psNg">
- <div class="add-box_row" v-for="ng,index in nodeGroupsChecked">
- <span class="add-box_cell">{{ng.absolutePath}}</span>
- <span class="add-box_ops">
- <i @click="unCheckGroup(ng)" class="fa fa-trash-o"></i>
- </span>
- </div>
- </div>
- <div class="add-box_foot">
- <i @click="openNodePannel" class="fa fa-plus"></i>
- </div>
- </div>
- <div class="add-box" :class="{'form-control--error': nodeOrGroupEmpty}">
- <div class="add-box_head">
- <span class="add-box_cell"><@spring.message 'common.node'/></span>
- </div>
- <div>
- <div class="add-box_body add-box_body_160 psN">
- <div class="add-box_row" v-for="ni,index in nodeInfosChecked">
- <span class="add-box_cell">{{ni.ip}}</span>
- <span class="add-box_ops">
- <i @click="unCheckNodeInfo(ni)" class="fa fa-trash-o"></i>
- </span>
- </div>
- </div>
- </div>
- <div class="add-box_foot">
- <i @click="openNodePannel" class="fa fa-plus"></i>
- </div>
- </div>
- </div>
- </div>
- <div id="layerView" v-show="showNodeSelect">
- <nz-node-selector ref="nzSelector"
- v-if="selectorReset"
- :notify-selected-tab-datas="deteSet.nodes"
- :notify-selected-tree-datas="deteSet.nodeGroups"
- :selected-tab-data-change="getTabDatas"
- :selected-tree-data-change="getTreeDatas"
- :disable-switch="formatTab"
- ></nz-node-selector>
- </div>
-
-
- <!-- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.i18nCode'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model.trim="$v.deteSet.i18nCode.$model"/>
- </div>
- </div> -->
-
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.viewPermission'/></div>
- <div class="col-sm-9">
- <div style="margin-bottom: 10px;">
- <template v-for="vl in viewLevels">
- <label class="radio-inline">
- <input type="radio" :value="vl.code" v-model="$v.deteSet.viewLevel.$model" :disabled="isUpdate"/> {{vl.value}}
- </label>
- </template>
- </div>
- <div class="add-box" v-show="deteSet.viewLevel==1">
- <div class="add-box_body" :class="{'form-control--error': deteSet.viewLevel==1&&userGroupsEmpty}">
- <div class="add-box_row" v-for="viewer in viewers" v-if="viewers ==null || viewers.length > 0">
- <span class="add-box_cell"><input type="checkbox" :value="viewer.code" v-model="viewer.checked"> {{viewer.value}}</span>
- </div>
- <span class="help-block" v-else>
- <@spring.message 'validate.common.noUsergroupInSysView'/>
- </span>
- </div>
- <div class="form-control_error-msg" v-if="deteSet.viewLevel==1&&userGroupsEmpty">
- <@spring.message 'validate.common.required'/>
- </div>
- </div>
- </div>
- </div>
-
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.remark'/></div>
- <div class="col-sm-9">
- <textarea v-model.trim="$v.deteSet.remark.$model" class="form-control"></textarea>
- </div>
- </div>
-
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary" style="width: 55px" @click="saveOrUpdate">
- <i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning" style="width: 55px" @click="reload"><i
- class="fa fa-reply"></i></button>
- </div>
- </div>
- </form>
- </div>
-
-</div>
-<div id="warnSpace"></div>
-</body>
-<#include "/modules/detect/addTypeTemplate.html"/>
-<#include "/modules/detect/warnTemplate.html"/>
-<#include "/modules/common/template.html"/>
-<#include "main.html"/>
-<#include "/js/modules/common/componets.js"/>
-<#include "/js/modules/detect/addType.js"/>
-<#include "/js/modules/detect/deteWarn.js"/>
-<!--<script src="${request.contextPath}/statics/js/modules/detect/deteWarn.js"></script>-->
-<#include "/js/modules/detect/main.js"/>
-<#include "/js/modules/detect/deteSet.js"/>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/detect/deteType.html b/nezha-admin/src/main/resources/templates/modules/detect/deteType.html
deleted file mode 100644
index 76f6622e..00000000
--- a/nezha-admin/src/main/resources/templates/modules/detect/deteType.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
- <title><@spring.message 'deteType'/></title>
- <link rel="stylesheet" href="${request.contextPath}/statics/css/addDetectType.css">
-</head>
-<#include "/header.html">
-
-<body>
-<div id="deteType" v-cloak>
- <div v-show="showList">
- <div class="tools">
- <div class="form-group">
- <input type="text" class="form-control input-medium" v-model.trim="params.name" @keyup.enter="query" placeholder="<@spring.message 'common.name'/>">
- </div>
- <a class="btn btn-default btn-search" @click="query" title="<@spring.message 'common.search'/>"><i class="fa fa-search"></i></a>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- <a :disabled="single" class="btn btn-primary" @click="update" title="<@spring.message 'common.edit'/>"><i class="fa fa-pencil-square-o"></i></a>
- <a :disabled="multi" class="btn btn-primary" @click="del" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
- </div>
- <div v-show="!showList" >
- <nz-detect-addtype
- :type-id="typeId"
- ref="nz-add-type"
- :reload-func="reload"
- ></nz-detect-addtype>
- </div>
-</div>
-<#include "/modules/common/template.html"/>
-<#include "/modules/detect/addTypeTemplate.html"/>
-<#include "/js/modules/common/componets.js"/>
-<#include "/js/modules/detect/addType.js"/>
-<#include "/js/modules/detect/deteType.js"/>
-
-
-</body>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/detect/deteType2.html b/nezha-admin/src/main/resources/templates/modules/detect/deteType2.html
deleted file mode 100644
index 154c0a8d..00000000
--- a/nezha-admin/src/main/resources/templates/modules/detect/deteType2.html
+++ /dev/null
@@ -1,550 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
- <title><@spring.message 'deteType'/></title>
- <#include "/header.html">
-<style>
-/*滚动条颜色*/
-.ps__thumb-y {
- background-color: #ddd;
-}
-
-.add-box_head {
- border-bottom: 1px solid #cccccc;
- padding: 7px 10px 4px 10px;
-}
-.add-box_head_meta, .add-box_row1_meta {
- display: inline-block;
- width: 25%;
-}
-.add-box_head_param, .add-box_row1_param {
- display: inline-block;
- width: 45%;
-}
-.add-box_rows {
- padding: 3px 0;
-}
-.add-box_row {
- line-height: 23px;
- position: relative;
- padding: 3px 10px;
-}
-.add-box_tag1, .add-box_tag2 {
- font-size: 12px;
- display: inline-block;
- color: white;
- line-height: 18px;
- padding: 0 5px;
- border-radius: 4px;
-}
-.add-box_tag1 {
- background-color: #3c8dbc;
-}
-.add-box_tag2 {
- background-color: #55c8c3;
-}
-.add-box_op {
- position: absolute;
- right: 10px;
- color: #777777;
- cursor: pointer;
-}
-.add-box_foot {
- height: 23px;
- line-height: 23px;
- text-align: center;
-}
-.add-box_foot>span, .meta-win_list-foot>span {
- cursor: pointer;
-}
-
-.meta-win_list-foot {
- height: 72px;
- line-height: 72px;
- text-align: center;
- font-size: 16px;
- border-bottom: 1px solid #ffffff;
-}
-.meta-win_item {
- padding: 15px 7px 7px 15px;
- border-bottom: 1px solid #ffffff;
- position: relative;
- word-wrap:break-word;
-}
-.meta-win_item_active {
- background-color: white;
-}
-.form-group_opbox_meta-model {
- padding-left: 180px;
-}
-</style>
-</head>
-<body>
-<div id="deteType" v-cloak>
- <div v-show="showList">
- <div class="tools">
- <div class="form-group">
- <input type="text" class="form-control input-medium" v-model.trim="params.name" @keyup.enter="query" placeholder="<@spring.message 'common.name'/>">
- </div>
- <a class="btn btn-default btn-search" @click="query" title="<@spring.message 'common.search'/>"><i class="fa fa-search"></i></a>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- <a class="btn btn-primary" @click="update" title="<@spring.message 'common.edit'/>"><i class="fa fa-pencil"></i></a>
- <a class="btn btn-primary" @click="del" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
- </div>
- <div v-show="!showList" class="panel panel-default">
- <div class="panel-heading">{{title}}</div>
- <form class="form-horizontal" >
- <!--deteTypeView start-->
- <div id="deteTypeView" v-show="curStep == 0">
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control" :class="{'form-control--error': $v.deteType.name.$dirty && !$v.deteType.name.required|| !$v.deteType.name.nameRepeat}" v-model.trim="$v.deteType.name.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteType.name.$dirty && !$v.deteType.name.required"><@spring.message 'validate.common.required'/></div>
- <div class="form-control_error-msg" v-if="$v.deteType.name.$dirty && !$v.deteType.name.nameRepeat"><@spring.message 'validate.common.name.repeat'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteType.method'/>:</div>
- <div class="col-sm-9">
- <multiselect v-model="deteMethod" :options="deteMethods" placeholder="..." track-by="code" label="value" :searchable="false" value="deteMethod" :allow-empty="false" :show-labels="false"></multiselect>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteType.content'/>:</div>
- <div class="col-sm-9">
- <input v-model.trim="$v.deteType.content.$model" class="form-control" ></input>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteType.deteInterval'/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control input-small input-with-unit" v-model.trim="deteType.deteInterval" placeholder="60"/>
- <span class="input-unit">s</span>
- <!-- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteType.deteInterval.$dirty && !$v.deteType.deteInterval.integer"><@spring.message 'validate.common.integer'/></div> -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">元数据:</div>
- <div class="col-sm-9">
- <div style="font-size:13px;border:1px solid #cccccc;width:90%;border-radius:4px;">
- <div class="add-box_head">
- <span class="add-box_head_meta">
- <span>Field-Type</span>
- <!-- <span class="metatype-question"><i class="fa fa-question-circle"></i></span> -->
- </span>
- <span class="add-box_head_meta">
- <span>Data-Type</span>
- <!-- <span class="metatype-question"><i class="fa fa-question-circle"></i></span> -->
- </span>
- <span>Name</span>
- </div>
- <div class="add-box_rows">
- <div class="add-box_row">
- <div class="add-box_row1_meta">
- <span class="add-box_tag1">Tag</span>
- </div>
- <div class="add-box_row1_meta">
- <span class="add-box_tag2">string</span>
- </div>
- <span class="add-box_name" title="(超长截取,鼠标悬停提示)">(超长截取,鼠标悬...</span>
- <span class="add-box_op" @click="openMetaWindow(1)"><i class="fa fa-pencil-square-o"></i></span>
- </div>
- <div class="add-box_row">
- <div class="add-box_row1_meta">
- <span class="add-box_tag1">Normal</span>
- </div>
- <div class="add-box_row1_meta">
- <span class="add-box_tag2">counter</span>
- </div>
- <span class="add-box_name">test_field_name</span>
- <span class="add-box_op"><i class="fa fa-pencil-square-o"></i></span>
- </div>
- <div class="add-box_row">
- <div class="add-box_row1_meta">
- <span class="add-box_tag1">Temp</span>
- </div>
- <div class="add-box_row1_meta">
- <span class="add-box_tag2">gauge</span>
- </div>
- <span class="add-box_name">meta3</span>
- <span class="add-box_op"><i class="fa fa-pencil-square-o"></i></span>
- </div>
- </div>
- <div class="add-box_foot">
- <span @click="openMetaWindow()"><i class="fa fa-plus"></i></span>
- </div>
-<!-- <div class="add-box_head">
- <span class="add-box_head_meta">
- <span>Type</span>
- <span class="metatype-question"><i class="fa fa-question-circle"></i></span>
- </span>
- <span>Name</span>
- </div>
- <div class="add-box_rows">
- <div class="add-box_row">
- <div class="add-box_row1_meta">
- <span class="add-box_tag1">Tag</span>
- <span class="add-box_tag2">string</span>
- </div>
- <span class="add-box_name" title="(超长截取,鼠标悬停提示)">(超长截取,鼠标悬...</span>
- <span class="add-box_op" @click="openMetaWindow(1)"><i class="fa fa-pencil-square-o"></i></span>
- </div>
- <div class="add-box_row">
- <div class="add-box_row1_meta">
- <span class="add-box_tag1">Normal</span>
- <span class="add-box_tag2">counter</span>
- </div>
- <span class="add-box_name">test_field_name</span>
- <span class="add-box_op"><i class="fa fa-pencil-square-o"></i></span>
- </div>
- <div class="add-box_row">
- <div class="add-box_row1_meta">
- <span class="add-box_tag1">Temp</span>
- <span class="add-box_tag2">gauge</span>
- </div>
- <span class="add-box_name">meta3</span>
- <span class="add-box_op"><i class="fa fa-pencil-square-o"></i></span>
- </div>
- </div>
- <div class="add-box_foot">
- <span @click="openMetaWindow()"><i class="fa fa-plus"></i></span>
- </div> -->
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">参数:</div>
- <div class="col-sm-9">
- <div style="font-size:13px;border:1px solid #cccccc;width:90%;border-radius:4px;">
- <div class="add-box_head">
- <span class="add-box_head_param">Name</span>
- <span>Default</span>
- </div>
- <div class="add-box_rows">
- <div class="add-box_row">
- <div class="add-box_row1_param">
- <span>param1param1</span>
- </div>
- <span class="add-box_name">username</span>
- <span class="add-box_op"><i class="fa fa-pencil-square-o"></i></span>
- </div>
- <div class="add-box_row">
- <div class="add-box_row1_param">
- <span>param2</span>
- </div>
- <span class="add-box_name">test_filed_name</span>
- <span class="add-box_op"><i class="fa fa-pencil-square-o"></i></span>
- </div>
- <div class="add-box_row">
- <div class="add-box_row1_param">
- <span>xiaoerapjlweirj</span>
- </div>
- <span class="add-box_name">meta3</span>
- <span class="add-box_op"><i class="fa fa-pencil-square-o"></i></span>
- </div>
- </div>
- <div class="add-box_foot">
- <span><i class="fa fa-plus"></i></span>
- </div>
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.i18nCode'/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control" :class="{'form-control--error': $v.deteType.i18nCode.$dirty && !$v.deteType.i18nCode.required }" v-model.trim="$v.deteType.i18nCode.$model"/>
- <div class="form-control_error-msg" v-if="$v.deteType.i18nCode.$dirty && !$v.deteType.i18nCode.required"><@spring.message 'validate.common.required'/></div>
-
- </div>
- </div>
-
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message "common.remark"/>:</div>
- <div class="col-sm-9">
- <textarea v-model.trim="$v.deteType.remark.$model" class="form-control" ></textarea>
- </div>
- </div>
- </div> <!-- deteTypeView end -->
- <div id="metaWindow" style="height:100%;display:none;">
- <!-- meta列表 -->
- <div class="meta-win_list" style="float:left;display:inline-block;position:relative;width:180px;height:100%;background-color:#eeeeee;">
- <div class="meta-win_item">
- <div style="font-size:14px;line-height:30px;">meta1</div>
- <div style="text-align:right;">
- <span class="add-box_tag1">Tag</span>
- <span class="add-box_tag2">string</span>
- </div>
- </div>
- <div class="meta-win_item">
- <div style="font-size:14px;line-height:30px;">test_field_name</div>
- <div style="text-align:right;">
- <span class="add-box_tag1">Normal</span>
- <span class="add-box_tag2">counter</span>
- </div>
- </div>
- <div class="meta-win_item meta-win_item_active" style="position: relative;">
- <div class="test" style="font-size:14px;line-height:30px;">meta3</div>
- <div style="text-align:right;">
- <span class="add-box_tag1">Temp</span>
- <span class="add-box_tag2">gauge</span>
- </div>
- </div>
- <div class="meta-win_item">
- <div style="font-size:14px;line-height:30px;">test_field_nametest_field_nametest_field_name</div>
- <div style="text-align:right;">
- <span class="add-box_tag1">Normal</span>
- <span class="add-box_tag2">counter</span>
- </div>
- </div>
- <div class="meta-win_item">
- <div style="font-size:14px;line-height:30px;">test_field_name</div>
- <div style="text-align:right;">
- <span class="add-box_tag1">Normal</span>
- <span class="add-box_tag2">counter</span>
- </div>
- </div>
- <div class="meta-win_item">
- <div style="font-size:14px;line-height:30px;">test_field_name</div>
- <div style="text-align:right;">
- <span class="add-box_tag1">Normal</span>
- <span class="add-box_tag2">counter</span>
- </div>
- </div>
- <div class="meta-win_item">
- <div style="font-size:14px;line-height:30px;">test_field_name</div>
- <span style="color: red;position:absolute;top:2px;left:2px;" class="myicon-new"></span>
- <div style="text-align:right;">
- <span class="add-box_tag1">Normal</span>
- <span class="add-box_tag2">counter</span>
- </div>
- </div>
-
- <!-- 新增按钮 -->
- <div class="meta-win_list-foot">
- <span @click="addMeta"><i class="fa fa-plus"></i></span>
- </div>
- </div>
- <!-- meta详情 -->
- <div class="meta-detail" style="display:inline-block;padding-top: 18px;width: 400px;">
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'common.name'/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control nameEvent" />
- <span class="required-symbol_meta-model">*</span>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'deteType.fieldType'/>:</div>
- <div class="col-sm-9">
- <multiselect :options="fieldTypes" placeholder="..." track-by="code" label="value" :searchable="false" :allow-empty="false" :show-labels="false"></multiselect>
- <span class="required-symbol_meta-model">*</span>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'deteType.dataType'/>:</div>
- <div class="col-sm-9">
- <multiselect :options="dataTypes" placeholder="..." track-by="code" label="value" :searchable="false" :allow-empty="false" :show-labels="false"></multiselect>
- <span class="required-symbol_meta-model">*</span>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'deteType.dataLenth'/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control"/>
- <span class="required-symbol_meta-model">*</span>
- </div>
- </div>
- <div class="form-group" v-show="deteType.method==2">
- <div class="col-sm-3 control-label">OID:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control" />
- <span class="required-symbol_meta-model">*</span>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'deteType.unit'/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control"/>
- <span class="required-symbol_meta-model">*</span>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message 'deteType.dicType'/>:</div>
- <div class="col-sm-9">
- <multiselect :options="dicTypess" placeholder="..." :searchable="false" value="dataType" :show-labels="false">
- <template slot="option" slot-scope="props">
- <div :id="'position'+props.option.type" style="position:absolute;top:20%;left:0;width:1px;height:1px;"></div>
- <div style="line-height: 30px"id="title" @mouseenter="tttat(props.option.type)" @mouseleave="tttbt()">{{props.option.type}}</div>
- <div :id="'items'+props.option.type" style="display:none;">
- <div style="color: white;" v-for="tttt in props.option.mappings">
- {{tttt.val}}:{{tttt.mapping}}
- </div>
- </div>
- </template>
- </multiselect>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-3 control-label"><@spring.message "common.remark"/>:</div>
- <div class="col-sm-9">
- <textarea class="form-control" ></textarea>
- </div>
- </div>
- <div class="form-group form-group_opbox_meta-model">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary" style="width: 45px; padding: 3px 0;" @click="saveOrUpdate"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="删除" @click="delMeta($event)" type="button" class="btn btn-danger" style="width: 45px; padding: 3px 0;"><i class="fa fa-trash-o"></i></button>
- <button title="恢复" @click="recMeta($event)" type="button" class="btn btn-success" style="width: 45px; padding: 3px 0;display: none;"><i class="fa fa-undo"></i></button>
- </div>
- </div>
- </div>
- </div>
- <!-- deteTypeMetaView start -->
- <div id="deteTypeMetaView" v-show="curStep == 1" v-model="deteType.deteTypeMetas">
- <div v-for="item ,index in deteType.deteTypeMetas">
- <div class="panel panel-default" style="position:relative;padding:20px 0px 0px 0px;" v-show="item.delFlag=='0'">
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/>:</div>
- <div class="col-sm-9"><!--v-model.trim="$v.deteType.deteTypeMetas.$each[index].name.$model"-->
- <input type="text" class="form-control nameEvent" @blur="metaNameRepeat(index)" :class="{'form-control--error': ($v.deteType.deteTypeMetas.$each[index].name.$dirty && !$v.deteType.deteTypeMetas.$each[index].name.required)|| validation.meta[index] }" v-model.trim="$v.deteType.deteTypeMetas.$each[index].name.$model" value="{{item.name}}"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteType.deteTypeMetas.$each[index].name.$dirty && !$v.deteType.deteTypeMetas.$each[index].name.required"><@spring.message 'validate.common.required'/></div>
- <div class="form-control_error-msg" v-if="$v.deteType.deteTypeMetas.$each[index].name.$dirty && validation.meta[index]"><@spring.message 'validate.deteType.name.repeat'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteType.fieldType'/>:</div>
- <div class="col-sm-9">
- <multiselect v-model="$v.deteType.deteTypeMetas.$each[index].fieldType.$model" :class="{'form-control--error': $v.deteType.deteTypeMetas.$each[index].fieldType.$dirty && !$v.deteType.deteTypeMetas.$each[index].fieldType.required}":options="fieldTypes" placeholder="..." track-by="code" label="value" :searchable="false" :allow-empty="false" :show-labels="false"></multiselect>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteType.deteTypeMetas.$each[index].fieldType.$dirty && !$v.deteType.deteTypeMetas.$each[index].fieldType.required"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteType.dataType'/>:</div>
- <div class="col-sm-9">
- <multiselect v-model="$v.deteType.deteTypeMetas.$each[index].dataType.$model" :class="{'form-control--error': $v.deteType.deteTypeMetas.$each[index].dataType.$dirty && !$v.deteType.deteTypeMetas.$each[index].dataType.required}" :options="dataTypes" placeholder="..." track-by="code" label="value" :searchable="false" :allow-empty="false" :show-labels="false"></multiselect>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteType.deteTypeMetas.$each[index].dataType.$dirty && !$v.deteType.deteTypeMetas.$each[index].dataType.required"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteType.dataLenth'/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control" :class="{'form-control--error': $v.deteType.deteTypeMetas.$each[index].dataLenth.$dirty && !$v.deteType.deteTypeMetas.$each[index].dataLenth.required||!$v.deteType.deteTypeMetas.$each[index].dataLenth.integer}" v-model.trim="$v.deteType.deteTypeMetas.$each[index].dataLenth.$model" value="{{$v.deteType.deteTypeMetas.$each[index].dataLenth.$model}}"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteType.deteTypeMetas.$each[index].dataLenth.$dirty && !$v.deteType.deteTypeMetas.$each[index].dataLenth.required"><@spring.message 'validate.common.required'/></div>
- <div class="form-control_error-msg" v-if="$v.deteType.deteTypeMetas.$each[index].dataLenth.$dirty && !$v.deteType.deteTypeMetas.$each[index].dataLenth.integer"><@spring.message 'validate.common.integer'/></div>
- </div>
- </div>
- <div class="form-group" v-show="deteType.method==2">
- <div class="col-sm-2 control-label">OID:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control" :class="{'form-control--error':$v.deteType.deteTypeMetas.$each[index].oid.$dirty &&!$v.deteType.deteTypeMetas.$each[index].oid.required}" v-model.trim="$v.deteType.deteTypeMetas.$each[index].oid.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteType.deteTypeMetas.$each[index].oid.$dirty && !$v.deteType.deteTypeMetas.$each[index].oid.required"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteType.unit'/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control" :class="{'form-control--error':$v.deteType.deteTypeMetas.$each[index].unit.$dirty && !$v.deteType.deteTypeMetas.$each[index].unit.required}" v-model.trim="$v.deteType.deteTypeMetas.$each[index].unit.$model" />
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteType.deteTypeMetas.$each[index].unit.$dirty && !$v.deteType.deteTypeMetas.$each[index].unit.required"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteType.dicType'/>:</div>
- <div class="col-sm-9">
- <multiselect v-model="deteType.deteTypeMetas[index].dicType" :options="dicTypes" placeholder="..." :searchable="false" value="dataType" :show-labels="false"></multiselect>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message "common.remark"/>:</div>
- <div class="col-sm-9">
- <textarea v-model.trim="deteType.deteTypeMetas[index].remark" class="form-control" ></textarea>
- </div>
- </div>
- <!--删除按钮-->
- <div style="position:absolute;top: 0;right: -50px;">
- <a class="btn btn-small" title="<@spring.message 'common.delete'/>" @click="delMetaView(index)"><i class="glyphicon glyphicon-trash"></i></a>
- </div>
- </div>
- </div>
- <div class="form-group">
- <a id="metaPlus" class="btn btn-small" title="<@spring.message 'deteType.addMeta'/>" @click="addMetaView"><i class="glyphicon glyphicon-plus"></i></a>
- </div>
- </div>
- <!--deteTypeMetaView end-->
-
- <!--deteTypeParam start-->
- <div id="deteTypeParamView" v-show="curStep == 2" v-model="deteType.deteTypeMetas">
- <div v-for="item ,index in deteType.deteTypeParams">
- <div class="panel panel-default" style="position:relative;padding:20px 0px 0px 0px;" v-show="item.delFlag == '0'">
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control nameEvent" @blur="paramNameRepeat(index)" :class="{'form-control--error': ($v.deteType.deteTypeParams.$each[index].name.$dirty && !$v.deteType.deteTypeParams.$each[index].name.required)|| validation.param[index]}" v-model.trim="$v.deteType.deteTypeParams.$each[index].name.$model" value="{{item.name}}"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteType.deteTypeParams.$each[index].name.$dirty && !$v.deteType.deteTypeParams.$each[index].name.required"><@spring.message 'validate.common.required'/></div>
- <div class="form-control_error-msg" v-if="$v.deteType.deteTypeParams.$each[index].name.$dirty && validation.param[index]"><@spring.message 'validate.deteType.name.repeat'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.defVal'/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control" :class="{'form-control--error': ($v.deteType.deteTypeParams.$each[index].defVal.$dirty && !$v.deteType.deteTypeParams.$each[index].defVal.required)}" v-model.trim="$v.deteType.deteTypeParams.$each[index].defVal.$model" value="{{item.defVal}}"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteType.deteTypeParams.$each[index].defVal.$dirty && !$v.deteType.deteTypeParams.$each[index].defVal.required"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message "common.remark"/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model.trim="$v.deteType.deteTypeParams.$each[index].remark.$model" value="{{item.remark}}"/>
- </div>
- </div>
- <!--删除按钮-->
- <div style="position:absolute;top: 0;right: -50px;">
- <a class="btn btn-small" title="<@spring.message 'common.delete'/>" @click="delParamView(index)"><i class="glyphicon glyphicon-trash"></i></a>
- </div>
- </div>
- </div>
- <div class="form-group">
- <a id="paramPlus" class="btn btn-small" title="<@spring.message 'deteType.addParam'/>" @click="addParamView"><i class="glyphicon glyphicon-plus"></i></a>
- </div>
- </div>
- <!--deteTypeParam end-->
- <div class="form-group">
- <div class="col-sm-2 control-label"></div>
- &nbsp;&nbsp;
- </div>
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary" style="width: 55px" @click="saveOrUpdate"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button type="button" title="<@spring.message 'common.preStep'/>" class="btn btn-default" @click="preStep" id="preStep" ><i class="glyphicon glyphicon-chevron-left"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button type="button" title="<@spring.message 'common.nextStep'/>" class="btn btn-default" @click="nextStep" id="nextStep"><i class="glyphicon glyphicon-chevron-right"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning" style="width: 55px" @click="reload"><i class="fa fa-reply"></i></button>
- </div>
- </div>
-
- </form>
- </div>
-</div>
-<#include "/js/modules/detect/main.js"/>
-<#include "/js/modules/detect/deteType2.js"/>
-
-
-</body>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/detect/deteWarn.html b/nezha-admin/src/main/resources/templates/modules/detect/deteWarn.html
deleted file mode 100644
index 8a89ded7..00000000
--- a/nezha-admin/src/main/resources/templates/modules/detect/deteWarn.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <title>监测告警</title>
-</head>
-<#include "/header.html">
-<script src="${request.contextPath}/statics/js/modules/detect/deteWarn.js?_${.now?long}"></script>
-<body>
-
-</body>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/detect/main.html b/nezha-admin/src/main/resources/templates/modules/detect/main.html
deleted file mode 100644
index 91c36677..00000000
--- a/nezha-admin/src/main/resources/templates/modules/detect/main.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<script id="labelInput" type="text/x-template">
-<div class="add-box_row">
- <div class="add-box_cell add-box_cell_30" :title="label">{{label}}</div>
- <div class="add-box_cell add-box_cell_60">
- <input type="text" class="form-control add-box_input" :placeholder="defVal" :value="value" @input="$emit('input', $event.target.value)"/>
- </div>
-</div>
-</script>
diff --git a/nezha-admin/src/main/resources/templates/modules/detect/metaMapping.html b/nezha-admin/src/main/resources/templates/modules/detect/metaMapping.html
deleted file mode 100644
index 1292f836..00000000
--- a/nezha-admin/src/main/resources/templates/modules/detect/metaMapping.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
- <style type="text/css">
- .text-disabled{
- color:#cccccc;
- }
- </style>
-</head>
-<#include "/header.html">
-
-<body>
-<div id="metaMapping" v-cloak>
- <div v-show="showList">
- <div class="tools">
- <div class="form-group">
- <input type="text" class="form-control" v-model.trim="params.type" @keyup.enter="query"
- placeholder='<@spring.message "metaMapping.type"/>'>
- </div>
- <a class="btn btn-default btn-search" @click="query" title="<@spring.message 'common.search'/>"><i
- class="fa fa-search"></i></a>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i
- class="fa fa-plus"></i></a>
- <a :disabled="single" class="btn btn-primary" @click="toUpdate" title="<@spring.message 'common.edit'/>"><i
- class="fa fa-pencil-square-o"></i></a>
- <a :disabled="multi" class="btn btn-primary" @click="del" title="<@spring.message 'common.delete'/>"><i
- class="fa fa-trash-o"></i></a>
- </div>
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
- </div>
- <div v-show="!showList" class="panel panel-default">
- <div class="panel-heading">{{title}}</div>
- <form class="form-horizontal">
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message "metaMapping.type"/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.metaMappings.type.$dirty && !$v.metaMappings.type.required}"
- :disabled="!newMapping"
- v-model.trim="$v.metaMappings.type.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.metaMappings.type.$dirty && !$v.metaMappings.type.required"><@spring.message
- 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg" v-if="newMapping&&$v.metaMappings.type.$dirty && !$v.metaMappings.type.typeRepeat"><@spring.message 'validate.metaMapping.typeRepeat'/>
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'param'/></div>
- <div class="col-sm-9" >
-<!-- <div style="width:90%; padding:8px 0px 4px 0px;">-->
-<!-- <div style="position:relative;" v-for="mapping,index in metaMappings.mappings">-->
-<!-- <meta-mapping :meta-mapping="mapping" v-if="hackReset & mapping.delFlag=='0'" ref="metaMapping"></meta-mapping>-->
-<!-- <div style="position:absolute;top: 0;right: -35px;" v-if="hackReset & mapping.delFlag=='0'">-->
-<!-- <a class="btn btn-small" title="<@spring.message 'common.delete'/>" @click="delMapping(index)"><i class="glyphicon glyphicon-trash"></i></a>-->
-<!-- </div>-->
-<!-- </div>-->
-<!-- <div class="">-->
-<!-- <div style="display: inline-block"><a id="" class="btn btn-small" title="<@spring.message 'common.add'/>" @click="addMapping"><i class="glyphicon glyphicon-plus"></i></a></div>-->
-<!-- <div style="display: inline-block" class="form-control_error-msg" v-if="!$v.metaMappings.mappings.arrayEmpty">-->
-<!-- <@spring.message 'validate.common.required'/>-->
-<!-- </div>-->
-<!-- </div>-->
-
-<!-- </div>-->
-
- <div class="add-box">
- <div class="add-box_head">
- <span class="add-box_cell add-box_cell_45"><@spring.message 'metaMapping.key'/></span>
- <span class="add-box_cell"><@spring.message 'metaMapping.val'/></span>
- </div>
- <div class="add-box_body" id="r-dete-param-container">
- <template v-for="(mapping,index) in metaMappings.mappings" v-if="hackReset">
- <meta-mapping
- :meta-mapping="mapping"
- :index="index"
- ref="metaMapping"
- :meta-mappings="metaMappings.mappings"
- @del-mapping="delMapping"
- ></meta-mapping>
- </template>
- </div>
- <div class="add-box_foot">
- <i @click="addMapping" class="fa fa-plus" ></i>
- </div>
- </div>
- <div class="form-control_error-msg" v-if="mappingDirty&&!mappingRequired"><@spring.message 'validate.common.required'/></div>
-
- </div>
- </div>
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary" style="width: 55px" id="saveOrUpdate">
- <i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning" style="width: 55px" @click="reload"><i
- class="fa fa-reply"></i></button>
- </div>
- </div>
- </form>
- </div>
-</div>
-<#include "/js/modules/detect/main.js"/>
-<#include "/js/modules/detect/metaMapping.js"/>
-<template id="metaTemplate">
- <div :index="index">
- <div class="add-box_row" v-show="!editSwitch" :id="listPreKey+'-'+index" :class="{'text-disabled':metaMapping.delFlag=='1'}">
- <div class="add-box_cell add-box_cell_45">{{metaMapping.val}}</div>
- <span class="add-box_name">{{metaMapping.mapping}}</span>
- <span class="add-box_ops" >
- <i @click="editSelf" class="fa fa-pencil" :id="'add-box_op_edit_'+index" ></i>
- <i @click="metaMapping.delFlag=='0'?delSelf():recSelf()" :class="{'fa fa-trash-o':metaMapping.delFlag=='0','fa fa-undo':metaMapping.delFlag=='1'}"></i>
- </span>
- <!-- <span :class="{'add-box_del':deteParam.delFlag=='0','add-box_rec':deteParam.delFlag=='1'}" ></span>-->
- </div>
- <div class="add-box_row" v-show="editSwitch" :id="editPreKey+'-'+index">
- <form class="form-inline">
- <div class="add-box_cell add-box_cell_45">
- <input type="text" :id="'r-mapping-val-input-'+index" :class="{'form-control--error':$v.metaMapping.val.$dirty&&(!$v.metaMapping.val.required||!$v.metaMapping.val.inPageValRepeat)}" class="form-control add-box_input" placeholder="<@spring.message 'common.input'/><@spring.message 'metaMapping.key'/>" v-model="$v.metaMapping.val.$model">
- </div>
- <div class="add-box_cell add-box_cell_45">
- <input type="text" :id="'r-mapping-mapping-input-'+index" :class="{'form-control--error':$v.metaMapping.mapping.$dirty&&(!$v.metaMapping.mapping.required||!$v.metaMapping.mapping.inPageMappingRepeat)}" class="form-control add-box_input" placeholder="<@spring.message 'common.input'/><@spring.message 'metaMapping.val'/>" v-model="$v.metaMapping.mapping.$model">
- </div>
- <span class="add-box_ops">
- <i @click="submitSelf" class="fa fa-check" ></i>
- <i @click="delSelf" class="fa fa-trash-o " ></i>
- </span>
- </form>
- </div>
- </div>
-</template>
-
-</body>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/detect/warnTemplate.html b/nezha-admin/src/main/resources/templates/modules/detect/warnTemplate.html
deleted file mode 100644
index c00e9d9e..00000000
--- a/nezha-admin/src/main/resources/templates/modules/detect/warnTemplate.html
+++ /dev/null
@@ -1,214 +0,0 @@
-<script type="text/x-template" id="warnWindows">
- <div>
- <nz-warn
- v-for="(value,key) in containerInfos"
- :key="key"
- :cap="value[0]"
- :set-id="value[1]"
- :close-all-tab="closeTabs"
- ref="nzwarn"
- ></nz-warn>
- </div>
-</script>
-
-<script type="text/x-template" id="warnWindow">
- <div >
- <span v-show="state==1||state==2" :id="headSpan+setId"><i :class="{'fa fa-angle-double-right':state==1,'fa fa-angle-double-down':state==2}"></i>&nbsp;{{setWarns.length}}个告警</span>
- <div :id="bodyTab+setId" v-show="state==2">
- <div class="tools">
- <a class="btn btn-default" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- <a :disabled="single" class="btn btn-default" @click="update" title="<@spring.message 'common.edit'/>"><i class="fa fa-pencil-square-o"></i></a>
- <a :disabled="multi" class="btn btn-default" @click="del" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- <nz-table
- :table-data="setWarns"
- :col-model="colModel"
- :tab-no="setId"
- @selectedDatasChange="getSelectDatas"
- ></nz-table>
- </div>
- <div :id="footDiv+setId" v-show="state==3" class="">
- <form class="form-horizontal">
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.deteWarn.name.$dirty && (!$v.deteWarn.name.required || !$v.deteWarn.name.nameRepeat)}"
- v-model.trim="$v.deteWarn.name.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteWarn.name.$dirty && !$v.deteWarn.name.required"><@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg" v-if="$v.deteWarn.name.$dirty && !$v.deteWarn.name.nameRepeat"><@spring.message 'validate.common.name.repeat'/>
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteWarn.warnField'/></div>
- <div class="col-sm-9">
- <multiselect v-model="$v.deteWarn.metaId.$model"
- :options="deteMetas"
- :class="{'form-control--error': $v.deteWarn.metaId.$dirty && !$v.deteWarn.metaId.required}"
- placeholder="..."
- track-by="id"
- label="name"
- :searchable="false"
- :allow-empty="false"
- :show-labels="false"
- >
- </multiselect>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteWarn.metaId.$dirty && !$v.deteWarn.metaId.required"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'detect.warnMode'/></div>
- <div class="col-sm-9">
- <multiselect v-model="defaultWarnMode"
- :options="warnModes"
- placeholder="..."
- track-by="code"
- label="value"
- :searchable="false"
- :allow-empty="false"
- :show-labels="false"
- >
- </multiselect>
- </div>
- </div>
- <div class="form-group" v-show="defaultWarnMode.code=='2'">
- <div class="col-sm-2 control-label"><@spring.message 'deteWarn.statType'/></div>
- <div class="col-sm-9">
- <multiselect v-model="defaultStatType"
- :options="statTypes"
- placeholder="..."
- track-by="code"
- label="value"
- :searchable="false"
- :allow-empty="false"
- :show-labels="false"
- >
- </multiselect>
- </div>
- </div>
-
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'detect.triggerType'/></div>
- <div class="col-sm-9">
- <multiselect v-model="defaultTrigger"
- :options="triggerTypes"
- placeholder="..."
- track-by="code"
- label="value"
- :searchable="false"
- :allow-empty="false"
- :show-labels="false"
- >
- </multiselect>
- </div>
- </div>
- <div class="form-group" v-show="defaultTrigger.code=='1'">
- <div class="col-sm-2 control-label"><@spring.message 'dashboard.threshold'/>:</div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error':defaultTrigger.code=='1'&& $v.deteWarn.threshold.$dirty && !$v.deteWarn.threshold.required}"
- v-model.trim="$v.deteWarn.threshold.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="defaultTrigger.code=='1'&&$v.deteWarn.threshold.$dirty && !$v.deteWarn.threshold.required"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group" v-show="defaultTrigger.code=='1'">
- <div class="col-sm-2 control-label"><@spring.message 'deteWarn.symbol'/></div>
- <div class="col-sm-9">
- <multiselect v-model="defaultSymbol"
- :options="symbols"
- placeholder="..."
- track-by="code"
- label="value"
- :searchable="false"
- :allow-empty="false"
- :show-labels="false"
- >
- </multiselect>
- </div>
- </div>
-
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteWarn.warnLevel'/></div>
- <div class="col-sm-9">
- <multiselect v-model="defaultWarnLevel"
- :options="warnLevels"
- placeholder="..."
- track-by="code"
- label="value"
- :searchable="false"
- :allow-empty="false"
- :show-labels="false"
- >
- </multiselect>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteWarn.tips'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.deteWarn.tips.$dirty && !$v.deteWarn.tips.required}"
- v-model.trim="$v.deteWarn.tips.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.deteWarn.tips.$dirty && !$v.deteWarn.tips.required"><@spring.message 'validate.common.required'/>
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'deteWarn.callbackType'/></div>
- <div class="col-sm-9">
- <div style="margin-bottom: 10px;">
- <template v-for="cbt in callbackTypes">
- <label class="radio-inline">
- <input type="radio" :value="cbt.code" v-model="$v.deteWarn.callbackType.$model" /> {{cbt.value}}
- </label>
- </template>
- </div>
- </div>
- </div>
- <div class="form-group" v-show="deteWarn.callbackType!='0'">
- <template v-if="deteWarn.callbackType == '1'">
- <nz-fileupload
- v-if="uploadReset"
- :hasOld="hasOldFile"
- :oldFile="oldFile"
- :accept="acceptFile"
- v-model="file"
- ref="warnScriptUpload"
- @uploadComponetDestory="destoryUploadComponet"
- ></nz-fileupload>
- </template>
-
- <div v-if="deteWarn.callbackType == '2'">
- <div class="col-sm-2 control-label"><@spring.message 'deteWarn.callbackContent'/></div>
- <div class="col-sm-9">
- <input v-model.trim="$v.deteWarn.tempCallbackContent.$model" class="form-control"></input>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="deteWarn.callbackType!='0' && $v.deteWarn.tempCallbackContent.$dirty && !$v.deteWarn.tempCallbackContent.required"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.remark'/></div>
- <div class="col-sm-9">
- <textarea v-model.trim="$v.deteWarn.remark.$model" class="form-control"></textarea>
- </div>
- </div>
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary" style="width: 55px" @click="saveOrUpdate">
- <i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning" style="width: 55px" @click="reload"><i
- class="fa fa-reply"></i></button>
- </div>
- </div>
- </form>
- </div>
-
- </div>
-</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/mission/mission.html b/nezha-admin/src/main/resources/templates/modules/mission/mission.html
deleted file mode 100644
index eed3dacc..00000000
--- a/nezha-admin/src/main/resources/templates/modules/mission/mission.html
+++ /dev/null
@@ -1,450 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
-<title>任务管理</title>
-<#include "/header.html">
-<link rel="stylesheet" href="${request.contextPath}/statics/css/nzNodeSelector.css">
-<link rel="stylesheet" href="${request.contextPath}/statics/css/mission.css">
-</head>
-<body>
-<div id="missionVIew" v-cloak>
- <div v-show="showList">
- <div class="tools">
- <div class="form-group">
- <input type="text" class="form-control input-medium" v-model="q.name" @keyup.enter="query" placeholder='<@spring.message 'mission.name'/> '>
- </div>
- <!-- <div class="form-group col-sm-2">
- <@spring.message 'mission.yes'/><@spring.message 'mission.no'/>为周期任务:<multiselect ></multiselect>
- </div>
- <div class="form-group col-sm-2">
- 任务状态:<multiselect ></multiselect>
- </div> -->
- <div class="form-group col-sm-2">
- <multiselect v-model="q.type" :options="missionTypeList" label="value" placeholder="<@spring.message 'mission.type'/>" :show-labels="false"></multiselect>
- </div>
- <a class="btn btn-default btn-search" @click="query" title="<@spring.message 'common.search'/>"><i class="fa fa-search"></i></a>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- <!-- <a class="btn btn-primary" @click=""><i class="fa fa-plus"></i>&nbsp;新增逆向任务</a> -->
- <a class="btn btn-primary" @click="update" title="<@spring.message 'common.edit'/>"><i class="fa fa-pencil-square-o"></i></a>
- <a class="btn btn-success" @click="converseStatus(1)" title="<@spring.message 'mission.start'/>"><i class="fa fa-play"></i></a>
- <a class="btn btn-danger" @click="converseStatus(2)" title="<@spring.message 'mission.stop'/>"><i class="fa fa-ban"></i></a>
- </div>
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
- </div>
-
- <div v-show="!showList" class="panel panel-default">
- <div class="panel-heading">{{title}}</div>
- <form class="form-horizontal" id="missionTest">
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.name'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" :class="{'form-control--error': $v.mission.name.$dirty && !$v.mission.name.required}" v-model.trim="$v.mission.name.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.mission.name.$dirty && !$v.mission.name.required"><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div v-show="!missionParam" class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.type'/></div>
- <div class="col-sm-9">
- <template v-for="mt in missionTypeList">
- <label class="radio-inline">
- <input type="radio" :value="mt.code" v-model="mission.type" @click='updateCommandEnname'/> {{mt.value}}
- </label>
- </template>
- </div>
- </div>
-
- <!-- 当任务类型选为命令执行时 出现单选钮选择命令类型 -->
- <div v-show="mission.type==2 &&!missionParam" class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.commandType'/></div>
- <div class="col-sm-9">
- <template v-for="ct in commandType">
- <label class="radio-inline">
- <input type="radio" :value="ct.code" v-model="mission.commandType" @click='updateCommandEnname'/> {{ct.value}}
- </label>
- </template>
- </div>
- </div>
-
- <!-- 根据任务类型以及命令类型两个条件 筛选下拉框内容 -->
- <div v-show="mission.type==2 && mission.commandType==1 &&!missionParam" class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.commandName'/>:</div>
- <div class="col-sm-9">
- <multiselect v-model="mission.commandEnname" :options="commandEnnameTypeList1" label="value" placeholder="<@spring.message 'common.pleaseSelect'/>" :show-labels="false"></multiselect>
- </div>
- </div>
-
- <div v-show="mission.type==2 && mission.commandType==2 && !missionParam" class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.commandName'/>:</div>
- <div class="col-sm-9">
- <multiselect v-model="mission.commandEnname" :options="commandEnnameTypeList2" label="value" placeholder="<@spring.message 'common.pleaseSelect'/>" :show-labels="false"></multiselect>
- </div>
- </div>
-
- <!-- 升级部署类型选择 -->
- <div v-show="mission.type==3 && !missionParam" class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.commandName'/>:</div>
- <div class="col-sm-9">
- <multiselect v-model="mission.commandEnname" :options="commandEnnameTypeList3" label="value" placeholder="<@spring.message 'common.pleaseSelect'/>" :show-labels="false"></multiselect>
- </div>
- </div>
-
- <!-- 节点组 节点的选择 -->
- <!-- <div v-show="!missionParam" class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.nodeGroup'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"></input><a class="btn btn-primary" @click=""><i class="fa fa-search"></i></a>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div v-show="!missionParam" class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.node'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"></input><a class="btn btn-primary" @click=""><i class="fa fa-search"></i></a>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div> -->
-
- <div id="layerView" v-show="showNodeSelect">
- <nz-node-selector ref="nzSelector"
- v-if="selectorReset"
- :notify-selected-tab-datas="mission.nodeIds"
- :notify-selected-tree-datas="mission.nodeGroupIds"
- :selected-tab-data-change="getTabDatas"
- :selected-tree-data-change="getTreeDatas"
- ></nz-node-selector>
- </div>
-
-
- <div class="form-group" v-show="!missionParam">
- <div class="col-sm-2 control-label"><@spring.message 'common.pleaseSelect'/><@spring.message 'common.node'/>/<@spring.message 'common.nodeGroup'/>:</div>
- <div class="col-sm-9" >
- <div class="panel panel-default" style="width: 90%;" >
- <div class="panel-heading">
- <@spring.message 'common.nodeGroup'/>
- </div>
- <div class="panel-body scrollbar" style="position: relative;height: 185px;">
- <ul class="list-group">
- <li class="list-group-item" v-for="ng,index in nodeGroupsChecked">
- <div style="height: 12px;">
- <div class="left" style="width: 89%;">{{ng.absolutePath}}</div>
- <div class="right" style="width: 10%;" @click="unCheckGroup(ng)" ><i @click="openNodePannel" class="glyphicon glyphicon-remove"></i></div>
- </div>
- </li>
- </ul>
- </div>
- <div class="plus border" style="bottom:268px" @click="openNodePannel"><i class="glyphicon glyphicon-plus"></i></div>
-
- </div>
- <div class="panel panel-default" style="width: 90%;">
- <div class="panel-heading">
- <@spring.message 'common.node'/>
- </div>
- <div>
- <div class="panel-body scrollbar" style="position: relative;height: 185px;">
- <ul class="list-group">
- <li class="list-group-item" v-for="ni,index in nodeInfosChecked">
- <div style="height: 12px;">
- <div class="left" style="width: 89%;">{{ni.ip}}</div>
- <div class="right" style="width: 10%;" @click="unCheckNodeInfo(ni)"><i @click="openNodePannel" class="glyphicon glyphicon-remove"></i></div>
- </div>
- </li>
- </ul>
- </div>
- <div class="plus border" style="bottom:20px" @click="openNodePannel"><i class="glyphicon glyphicon-plus"></i></div>
- </div>
- </div>
-
- </div>
- </div>
-
-
- <div v-show="!missionParam" class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.viewPermission'/></div>
- <div class="col-sm-9">
- <template v-for="vl in viewLevel">
- <label class="radio-inline">
- <input type="radio" name="missionViewLevel" :value="vl.code" v-model="mission.viewLevel"/> {{vl.value}}
- </label>
- </template>
- </div>
- </div>
- <!-- 当查看权限为用户组内时 选择具体用户组 -->
- <div v-show="mission.viewLevel==1" class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'usergroup.usergroup'/>:</div>
- <div class="col-sm-9">
- <multiselect v-model="mission.viewerId" :options="userGroups" label="name" placeholder="<@spring.message 'common.pleaseSelect'/>" :show-labels="false"></multiselect>
- </div>
- </div>
-
- <!-- 文件上传测试 -->
- <!-- <div v-show="!missionParam" class="form-group">
- <div class="col-sm-2 control-label">路径</div>
- <div class="col-sm-9">
- <input type="file" class="" :v-model="files" name="files" @change="getFile($event)"></input>
- </div>
- </div> -->
-
- <div v-show='!missionParam'>
- <div id="filepush">
- <filepush ref="filePush" v-show="mission.type==1"
- @param="setMissionParam"
- @files="setFiles"
- ></filepush>
- </div>
-
- <div id='upgradeKillProcess'>
- <upgrade-kill-process ref="upgradeKillProcess" v-show="mission.type==2 && mission.commandEnname!=null && mission.commandEnname.code=='upgrade_kill_process' "
- @param="setMissionParam"
- ></upgrade-kill-process>
- </div>
-
- <div id="upgradeBackup">
- <upgrade-backup ref="upgradeBackup" v-show="mission.type==2 && mission.commandEnname!=null && mission.commandEnname.code=='upgrade_backup'"
- @param="setMissionParam"
- ></upgrade-backup>
- </div>
-
- <div id="upgradeUpdate">
- <upgrade-update ref="upgradeUpdate" v-show="mission.type==2 && mission.commandEnname!=null && mission.commandEnname.code=='upgrade_update'"
- @param="setMissionParam"
- ></upgrade-update>
- </div>
-
- <div id="upgradeExecStart">
- <upgrade-exec-start ref="upgradeExecStart" v-show="mission.type==2 && mission.commandEnname!=null && (mission.commandEnname.code=='upgrade_exec'||mission.commandEnname.code=='upgrade_start')"
- @param="setMissionParam"
- ></upgrade-exec-start>
- </div>
-
- <div id="upgradeRecover">
- <upgrade-recover ref="upgradeRecover" v-show="mission.type==2 && mission.commandEnname!=null && mission.commandEnname.code=='upgrade_recover'"
- @param="setMissionParam"
- ></upgrade-recover>
- </div>
-
- <div id="singleExec" >
- <single-exec ref="singleExec" v-show="mission.type==2&&mission.commandEnname!=null && mission.commandEnname.code=='single_exec'"
- @param="setMissionParam"
- ></single-exec>
- </div>
- </div>
-
- <!-- 任务类型为命令执行 显示周期任务选项 -->
- <div v-show="mission.type==2 && !missionParam" class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.loopMission'/></div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="mission.isLoop"/> <@spring.message 'mission.yes'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="mission.isLoop"/> <@spring.message 'mission.no'/>
- </label>
- </div>
- </div>
-
- <div class="form-group" v-show="mission.type==2 && mission.isLoop==1">
- <div class="col-sm-2 control-label"><@spring.message 'mission.loop'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" :class="" v-model="mission.loopInterval"/>&nbsp<@spring.message 'mission.minute'/>
- </div>
- </div>
-
- <div class="form-group" v-show="mission.type==2 && mission.isLoop==1">
- <div class="col-sm-2 control-label"><@spring.message 'mission.startTime'/></div>
- <div class="col-sm-9">
- <input name="beginDate" id="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium" v-model="missionLoopEntity.startTime"
- @click="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{\'new Date()\'}'});" @focus="changeStartTime()"/>
- </div>
- </div>
-
- <div class="form-group" v-show="mission.type==2 && mission.isLoop==1">
- <div class="col-sm-2 control-label"><@spring.message 'mission.endTime'/></div>
- <div class="col-sm-9">
- <input name="endDate" id="endDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium" v-model="missionLoopEntity.endTime"
- @click="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{\'new Date()\'}'});" @focus="changeEndTime()"/>
- </div>
- </div>
-
- <!-- 周期任务参数设置结束 -->
-
- <div id="ugprade" v-show="mission.type==3 && !missionParam">
- <!-- NC升级 -->
- <div v-show="mission.commandEnname!=null &&mission.commandEnname.code=='upgrade_agent'">
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.path'/></div>
- <div class="col-sm-9">
- <input type="file" class="" name="" @change="getFile($event)"></input>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.pushDestination'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="paramForUpgrade.cover"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if=""><@spring.message 'validate.common.required'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.owner'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="paramForUpgrade.username" />
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.groups'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="paramForUpgrade.groupName"/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.filePermissions'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="paramForUpgrade.permisson"/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.overwrite'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="paramForUpgrade.isCreateCover"/> <@spring.message 'mission.create'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="paramForUpgrade.isCreateCover"/> <@spring.message 'mission.doNotCreate'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.uncompressionID'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="paramForUpgrade.isAbs"/> <@spring.message 'mission.absolutePath'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="paramForUpgrade.isAbs"/> <@spring.message 'mission.relativePath'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.deleteFiles'/>
- </div>
- <div class="col-sm-9">
- <textarea class="form-control" v-model="paramForUpgrade.deleteTmpStr"></textarea>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.backUp'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="isUpgradeBackup"/> <@spring.message 'mission.yes'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="isUpgradeBackup"/> <@spring.message 'mission.no'/>
- </label>
- </div>
- </div>
-
- <div v-show="isUpgradeBackup==1">
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.filesThatNeedToBeBackedUp'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="backup.backUp"/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.pathToBackup'/>
- </div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="backup.backUpTo"/>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.compressionID'/>
- </div>
- <div class="col-sm-9">
- <label class="radio-inline">
- <input type="radio" value="1" v-model="backup.isAbs"/> <@spring.message 'mission.yes'/>
- </label>
- <label class="radio-inline">
- <input type="radio" value="0" v-model="backup.isAbs"/> <@spring.message 'mission.no'/>
- </label>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label">
- <@spring.message 'mission.excludeFile'/>
- </div>
- <div class="col-sm-9">
- <textarea class="form-control" v-model="backup.exceptTmpStr"></textarea>
- </div>
- </div>
- </div>
- </div>
-
- <!-- DC升级或者第三方部署 -->
- <div id="upgradeServer">
- <upgrade-server ref="upgradeServer" v-show="mission.commandEnname!=null && (mission.commandEnname.code=='upgrade_server'|| mission.commandEnname.code=='upgrade_other')"
- @param="setMissionParam"
- @files="setFiles"
- ></upgrade-server>
- </div>
-
- </div>
-
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'mission.description'/></div>
- <div class="col-sm-9">
- <textarea placeholder="" row=3 v-model.trim="mission.remark"></textarea>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"></div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary" style="width: 55px" @click="saveOrUpdate"><i class="fa fa-check"></i></button>
- &nbsp;&nbsp;
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning" style="width: 55px" @click="reload"><i class="fa fa-reply"></i></button>
- </div>
- </form>
- </div>
-</div>
-
-</body>
-
-<#include "/modules/common/template.html"/>
-<#include "/js/modules/common/componets.js"/>
-<#include "/js/modules/mission/filepush.js"/>
-<#include "/js/modules/mission/upgradeKillProcess.js"/>
-<#include "/js/modules/mission/upgradeBackup.js"/>
-<#include "/js/modules/mission/upgradeUpdate.js"/>
-<#include "/js/modules/mission/upgradeExecOrStart.js"/>
-<#include "/js/modules/mission/upgradeRecover.js"/>
-<#include "/js/modules/mission/singleExec.js"/>
-<#include "/js/modules/mission/upgradeServer.js"/>
-<#include "/js/modules/mission/mission.js"/>
-
-
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/node/nodeCabinet.html b/nezha-admin/src/main/resources/templates/modules/node/nodeCabinet.html
deleted file mode 100644
index 7d2f8e12..00000000
--- a/nezha-admin/src/main/resources/templates/modules/node/nodeCabinet.html
+++ /dev/null
@@ -1,152 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
- <title>机柜管理</title>
- <#include "/header.html">
-</head>
-<body>
-<div id="app" v-cloak>
-
- <!-- 列表 查询 -->
- <div v-show="showList">
- <div class="tools">
-
- <!-- 搜索条件 -->
- <div class="form-group">
- <input type="text" class="form-control input-medium" v-model="q.cabName" @keyup.enter="query" placeholder="<@spring.message 'node.cabinet.name'/>">
- </div>
-
- <!-- 功能按钮 -->
- <a class="btn btn-default" @click="query" title="<@spring.message 'common.search'/>"><i class="fa fa-search"></i></a>
- <a class="btn btn-default" @click="reset" title="<@spring.message 'common.reset'/>"><i class="fa fa-refresh"></i></a>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- <a :disabled="single" class="btn btn-primary" @click="update" title="<@spring.message 'common.edit'/>"><i class="fa fa-pencil-square-o"></i></a>
- <a :disabled="multi" class="btn btn-primary" @click="del" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
-
- <!-- 列表数据 / 分页 -->
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
-
- </div>
-
- <div v-show="!showList" class="panel panel-default">
- <!-- 标题 -->
- <div class="panel-heading">{{title}}</div>
- <form class="form-horizontal">
-
- <!-- 名称 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/></div>
- <div class="col-sm-9">
- <input type="text" v-model.trim="nodeCabinet.name" @blur="$v.nodeCabinet.name.$touch" class="form-control"
- :class="{'form-control--error': $v.nodeCabinet.name.$dirty && (!$v.nodeCabinet.name.required || !$v.nodeCabinet.name.nameCheck)}"
- placeholder="<@spring.message 'common.name'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.nodeCabinet.name.$dirty && !$v.nodeCabinet.name.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg" v-if="$v.nodeCabinet.name.$dirty && !$v.nodeCabinet.name.nameCheck">
- <@spring.message 'validate.common.name.repeat'/>
- </div>
- </div>
- </div>
-
- <!-- 机房名称 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.room.name'/></div>
- <div class="col-sm-9">
- <multiselect v-model="nodeCabinet.roomId" :options="rooms" label="roomName" :show-labels="false"
- :class="{'form-control--error': $v.nodeCabinet.roomId.$dirty && !$v.nodeCabinet.roomId.required}"
- @close="getRoomRows(),$v.nodeCabinet.roomId.$touch(),$v.nodeCabinet.name.$touch()" placeholder="<@spring.message 'common.pleaseSelect'/>"></multiselect>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeCabinet.roomId.$dirty && !$v.nodeCabinet.roomId.required">
- <@spring.message 'validate.common.required'/>
- </div>
- </div>
- </div>
-
- <!-- 机房行号 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.cabinet.roomRow'/></div>
- <div class="col-sm-9">
- <multiselect v-model="nodeCabinet.roomRow" :options="roomRows" label="roomRow" :show-labels="false"
- :class="{'form-control--error': $v.nodeCabinet.roomRow.$dirty && !$v.nodeCabinet.roomRow.required}"
- @close="getRoomCols(),$v.nodeCabinet.roomRow.$touch()" @open="checkRoom()" placeholder="<@spring.message 'common.pleaseSelect'/>"></multiselect>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeCabinet.roomRow.$dirty && !$v.nodeCabinet.roomRow.required">
- <@spring.message 'validate.common.required'/>
- </div>
- </div>
- </div>
-
- <!-- 机房列号 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.cabinet.roomCol'/></div>
- <div class="col-sm-9">
- <multiselect v-model="nodeCabinet.roomCol" :options="roomCols" :show-labels="false"
- :class="{'form-control--error': $v.nodeCabinet.roomCol.$dirty && !$v.nodeCabinet.roomCol.required}"
- @close="$v.nodeCabinet.roomCol.$touch()" @open="checkRoomRow()" placeholder="<@spring.message 'common.pleaseSelect'/>"></multiselect>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeCabinet.roomCol.$dirty && !$v.nodeCabinet.roomCol.required">
- <@spring.message 'validate.common.required'/>
- </div>
- </div>
- </div>
-
- <!-- U位 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.cabinet.uSize'/></div>
- <div class="col-sm-9">
- <input type="text" v-model="nodeCabinet.ubit" class="form-control"
- :class="{'form-control--error': $v.nodeCabinet.ubit.$dirty && !$v.nodeCabinet.ubit.minValue || !$v.nodeCabinet.ubit.integer}"
- @blur="$v.nodeCabinet.ubit.$touch" placeholder="<@spring.message 'node.cabinet.uSize'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeCabinet.ubit.$dirty && !$v.nodeCabinet.ubit.minValue || !$v.nodeCabinet.ubit.integer">
- <@spring.message 'validate.common.positiveInteger'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeCabinet.ubit.$dirty && !$v.nodeCabinet.ubit.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeCabinet.ubit.$dirty && $v.nodeCabinet.ubit.required && $v.nodeCabinet.ubit.minValue && !$v.nodeCabinet.ubit.cabUbitCheck">
- <@spring.message 'validate.node.uAlreadyUsed'/> {{occUbit}}U
- </div>
- </div>
- </div>
-
- <!-- 备注 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"> <@spring.message 'common.remark'/></div>
- <div class="col-sm-9">
- <input type="text" v-model="nodeCabinet.remarks" class="form-control" placeholder="<@spring.message 'common.remark'/>"/>
- </div>
- </div>
-
-
- <!-- 保存 / 返回 -->
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary" style="width: 55px" @click="saveOrUpdate"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning" style="width: 55px" @click="reload"><i class="fa fa-reply"></i></button>
- </div>
- </div>
-
- </form>
- </div>
-
-
-</div>
-
-
-<!--<script src="${request.contextPath}/statics/js/modules/node/nodeCabinet.js"></script>-->
-<#include "/js/modules/node/nodeCabinet.js">
-</body>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/node/nodeGroup.html b/nezha-admin/src/main/resources/templates/modules/node/nodeGroup.html
deleted file mode 100644
index 414283cd..00000000
--- a/nezha-admin/src/main/resources/templates/modules/node/nodeGroup.html
+++ /dev/null
@@ -1,255 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
- <title>节点组管理</title>
- <#include "/header.html">
- <style>
- .nodeList{
- display: inline-block;
- float:left;
- width: calc(100% - 360px); /*根据页面宽度变化而变化*/
- }
- .mytree {
- position: relative;
- display: inline-block;
- float:left;
- min-width: 360px;
- padding-left: 15px;
- }
- .ztree {
- padding: 1px 0 0 6px !important;
- }
- </style>
-
- <link rel="stylesheet" href="${request.contextPath}/statics/css/nzNodeSelector.css">
- <link rel="stylesheet" href="${request.contextPath}/statics/css/nodeRel.css">
-
-</head>
-<body style="position: relative;">
-
-<!--节点组-->
-<div id="nodeGroupApp" v-cloak>
-
- <!-- 分配节点 -->
- <a v-show="selectedNodeGroup != null && selectedNodeGroup.allowAss == 1" class="btn btn-primary"
- @click="openNodeRel" style="position:absolute;right: 5px;top: 0;z-index: 99999">
- <i class="fa"></i>&nbsp;<@spring.message 'nodegroup.assignNode'/>&nbsp;</a>
-
- <div class="mytree" id="groupTree">
- <div class="mytree-title"><span class="mytreeicon mytreeicon-close"></span>
- <@spring.message 'system.system'/>
- <div style="clear:both"></div>
- </div>
- <group-tree
- v-for="item in systems"
- :key="item.id"
- :zNodes="item.nodegroups"
- :node="item"
- @addrootgroup="add"
- ref="gtree"> <!-- ref 为获取 组件 或 dom 时使用 -->
-
- </group-tree>
- </div>
-
- <!-- 添加 / 修改 表单 -->
- <div v-show="showForm" id="nodeGroupForm" style="overflow-x: hidden">
- <form class="form-horizontal">
-
- <!-- 上级节点组 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'nodegroup.parent.group'/></div>
- <div class="col-sm-9">
- <input disabled type="text" class="form-control"
- v-model.trim="nodeGroup.parentGroup.name"
- placeholder="<@spring.message 'nodegroup.parent.group'/>"/>
- <span class="required-symbol">*</span>
- </div>
- </div>
-
- <!-- 业务系统 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'system.system'/></div>
- <div class="col-sm-9">
- <input disabled type="text" class="form-control" v-model.trim="system.name"
- placeholder="<@spring.message 'system.system'/>"/>
- </div>
- </div>
-
- <!-- 节点组名称 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'nodegroup.name'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.nodeGroup.name.$dirty && (!$v.nodeGroup.name.required || !$v.nodeGroup.name.nameCheck)}"
- v-model.trim="$v.nodeGroup.name.$model"
- placeholder="<@spring.message 'nodegroup.name'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeGroup.name.$dirty && !$v.nodeGroup.name.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeGroup.name.$dirty && !$v.nodeGroup.name.nameCheck">
- <@spring.message 'validate.common.name.repeat'/>
- </div>
- </div>
- </div>
-
- <!-- 备注 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"> <@spring.message 'common.remark'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model.trim="nodeGroup.remark"
- placeholder="<@spring.message 'common.remark'/>"/>
- </div>
- </div>
- </form>
-
- <!-- 保存 / 返回 -->
- <div class="form-group_opbox" style="margin-bottom: 20px">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary"
- style="width: 55px" @click="saveOrUpdate"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning"
- style="width: 55px" @click="reload"><i class="fa fa-reply"></i></button>
- </div>
- </div>
- </div>
-
-
- <!-- 分配节点 -->
- <div class="nodeRel" style="display: none;">
- <node-rel-component
- v-on:node-change="nodeChange"
- :init-selected-nodes="selectedNodes"
- :init-selectable-nodes="selectableNodes"
- ref="nodeRel"
- ></node-rel-component>
- </div>
-
-</div>
-
-<!-- 节点列表 -->
-<div id="nodeInfoApp" class="nodeList" v-cloak>
-
- <div class="form-group">
- <a class="" href="#" style="font-size: 16px;"><@spring.message 'node.list'/></a>
- <!-- 当前节点组 -->
- <a v-if="nodeGroup != null" class="" href="#" style="font-size: 16px;"> {{nodeGroup.nodeTitle}}</a>
- <!-- 分配节点 -->
- <!--<a v-if="nodeGroup != null && nodeGroup.allowAss == 1" class="btn btn-primary" @click="" style="float: right">
- <i class="fa"></i>&nbsp;<@spring.message 'nodegroup.assignNode'/></a>-->
- </div>
-
- <!-- 列表 查询 -->
- <div v-show="showList">
- <div class="tools">
- <!-- 搜索条件 -->
- <div class="form-group">
- <div class="ad-search-label" @click="adSearchDropdown1">
- <span>{{selectedItem1}}</span>
- <div class="ad-search-dropdown-items" v-show="selectFlag1">
- <div @click="changeAdSearch1(i)" class="ad-search-dropdown-item" v-for="i in selectItems1">
- {{i}}
- </div>
- </div>
- </div>
- <input type="text" class="form-control input-medium ad-search-input" v-model="q.ip" @keyup.enter="query"
- placeholder="<@spring.message 'node.ipAddress'/>" v-show="showIp">
- <input type="text" class="form-control input-medium ad-search-input" v-model="q.name" @keyup.enter="query"
- placeholder="<@spring.message 'common.name'/>" v-show="!showIp">
- </div>
-
- <div class="form-group">
- <multiselect :options="nodeTypes" label="value" :show-labels="false"
- v-model="q.type" class="input-medium"
- placeholder="<@spring.message 'node.type'/>"></multiselect>
- </div>
-
- <div class="form-group" v-show="isAdvancedSearch">
- <multiselect v-model="q.tag" :options="queryTags" label="value" :show-labels="false" class="input-medium"
- placeholder="<@spring.message 'node.tag'/>"></multiselect>
- </div>
-
- <div class="form-group" v-show="isAdvancedSearch">
- <multiselect v-model="q.state" placeholder="<@spring.message 'common.onLineState'/>"
- :show-labels="false" :options="nodeStates" class="input-medium"
- label="value"></multiselect>
- </div>
-
- <!-- 功能按钮 -->
- <a class="btn btn-default" @click="advancedSearch" title="<@spring.message 'common.advanced.search'/>">
- <i class="fa" :class="{'fa-angle-double-right': !isAdvancedSearch, 'fa-angle-double-left': isAdvancedSearch}"></i>
- </a>
- <!-- <a class="btn btn-default" @click="reset" title="<@spring.message 'common.reset'/>">
- <i class="fa fa-refresh"></i></a> -->
- <a class="btn btn-default btn-search" @click="query" title="<@spring.message 'common.search'/>">
- <i class="fa fa-search"></i></a>
- </div>
-
- <!-- 列表数据 / 分页 -->
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
-
- </div>
-</div>
-
-
-
-
-<!-- 节点组树结构模板 -->
-<template id="treeTemplate">
- <div class="mytree-item">
-
- <!-- 业务系统名称 + 添加按钮 -->
- <div>
- <span :id="'icon' + node.id" class="mytreeicon mytreeicon-open" @click="showTree(node)"></span>
- <span class="mytree-subtitle" @mouseenter="showBtn(node)" @mouseleave="hideBtn(node)">
- <a :title="node.name" @click="showTree(node)">{{node.name}}</a>
- <!-- 添加按钮 -->
- <span :id="'icon2' + node.id" class="mytreeicon mytreeicon-add_unact" @mouseenter="showBtn2(node)"
- @mouseleave="hideBtn2(node)" @click="addRootGroup"
- title="<@spring.message 'common.add'/><@spring.message 'nodegroup.root.group'/>"></span>
- </span>
- </div>
-
- <!-- 树 div -->
- <div style="clear:both"></div>
- <div class="mytree-box" :id="'box' + node.id">
- <ul :id="'treeDemo'+node.id" class="ztree"></ul>
- </div>
- <div style="clear:both"></div>
-
- </div>
-</template>
-
-<!--<script src="${request.contextPath}/statics/js/modules/node/nodeInfo.js"></script>-->
-<!--<script src="${request.contextPath}/statics/js/modules/node/nodeGroup.js"></script>-->
-
-<#include "/modules/common/nodeRel.html">
-<#include "/js/modules/common/nodeRel.js">
-
-<#include "/js/modules/node/nodeGroup.js">
-<#include "/js/modules/node/nodeInfo.js">
-<script>
- var groupPrefect = new PerfectScrollbar('.mytree');
- window.onload = function () {
- var h = document.documentElement.clientHeight;// 可见区域高度
- var groupTree = document.getElementById("groupTree");
- groupTree.style.height = h + 'px';
- }
-
- // 浏览器大小发生改变 待用
- var resizeTimer = null;
- $(window).bind('resize', function (){
- if (resizeTimer) clearTimeout(resizeTimer);
- resizeTimer = setTimeout(function(){
- console.log("窗口发生改变了哟!");
- // console.log(document.documentElement.clientWidth)
- } , 100);
- });
-</script>
-</body>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/node/nodeInfo.html b/nezha-admin/src/main/resources/templates/modules/node/nodeInfo.html
deleted file mode 100644
index 43c980d8..00000000
--- a/nezha-admin/src/main/resources/templates/modules/node/nodeInfo.html
+++ /dev/null
@@ -1,546 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
- <title>节点管理</title>
- <#include "/header.html">
- <link rel="stylesheet" href="${request.contextPath}/statics/css/detect.css">
-</head>
-<body>
-<!-- 节点APP -->
-<div id="nodeInfoApp" v-cloak>
-
- <!-- 列表 查询 -->
- <div v-show="showList">
- <div class="tools">
- <!-- 搜索条件 -->
- <div class="form-group">
- <div class="ad-search-label" @click="adSearchDropdown1">
- <span>{{selectedItem1}}</span>
- <div class="ad-search-dropdown-items" v-show="selectFlag1">
- <div @click="changeAdSearch1(i)" class="ad-search-dropdown-item" v-for="i in selectItems1">
- {{i}}
- </div>
- </div>
- </div>
- <input type="text" class="form-control input-medium ad-search-input" v-model="q.ip" @keyup.enter="query"
- placeholder="<@spring.message 'node.ipAddress'/>" v-show="showIp">
- <input type="text" class="form-control input-medium ad-search-input" v-model="q.name" @keyup.enter="query"
- placeholder="<@spring.message 'common.name'/>" v-show="!showIp">
- </div>
-
- <div class="form-group">
- <multiselect :options="nodeTypes" label="value" :show-labels="false"
- v-model="q.type" class="input-medium"
- placeholder="<@spring.message 'node.type'/>"></multiselect>
- </div>
-
- <div class="form-group" v-show="isAdvancedSearch">
- <multiselect v-model="q.tag" :options="queryTags" label="value" :show-labels="false" class="input-medium"
- placeholder="<@spring.message 'node.tag'/>"></multiselect>
- </div>
-
- <div class="form-group" v-show="isAdvancedSearch">
- <multiselect v-model="q.state" placeholder="<@spring.message 'common.onLineState'/>"
- :show-labels="false" :options="nodeStates" class="input-medium"
- label="value"></multiselect>
- </div>
-
- <!-- 功能按钮 -->
- <a class="btn btn-default" @click="advancedSearch" title="<@spring.message 'common.advanced.search'/>">
- <i class="fa" :class="{'fa-angle-double-right': !isAdvancedSearch, 'fa-angle-double-left': isAdvancedSearch}"></i>
- </a>
- <!-- <a class="btn btn-default" @click="reset" title="<@spring.message 'common.reset'/>">
- <i class="fa fa-refresh"></i></a> -->
- <a class="btn btn-default btn-search" @click="query" title="<@spring.message 'common.search'/>">
- <i class="fa fa-search"></i></a>
-
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>">
- <i class="fa fa-plus"></i></a>
- <a :disabled="single" class="btn btn-primary" @click="update" title="<@spring.message 'common.edit'/>">
- <i class="fa fa-pencil"></i></a>
- <a :disabled="multi" class="btn btn-primary" @click="del" title="<@spring.message 'common.delete'/>">
- <i class="fa fa-trash-o"></i></a>
- <a :disabled="multi" class="btn btn-primary" @click="changeState(1)" title="<@spring.message 'common.onLine'/>">
- <i class="fa fa-arrow-up"></i></a>
- <a :disabled="multi" class="btn btn-primary" @click="changeState(2)" title="<@spring.message 'common.offLine'/>">
- <i class="fa fa-arrow-down"></i></a>
- </div>
-
- <!-- 列表数据 / 分页 -->
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
-
- </div>
-
- <!-- 添加 / 修改 表单 -->
- <div v-show="!showList" class="panel panel-default">
- <!-- 标题 -->
- <div class="panel-heading">{{title}}</div>
- <form class="form-horizontal">
-
- <!-- 名称 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.nodeInfo.name.$dirty && (!$v.nodeInfo.name.required || !$v.nodeInfo.name.nameCheck)}"
- v-model.trim="$v.nodeInfo.name.$model"
- placeholder="<@spring.message 'common.name'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.nodeInfo.name.$dirty && !$v.nodeInfo.name.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg" v-if="$v.nodeInfo.name.$dirty && !$v.nodeInfo.name.nameCheck">
- <@spring.message 'validate.common.name.repeat'/>
- </div>
- </div>
- </div>
-
- <!-- 主机名称 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.hostName'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model.trim="nodeInfo.hostName"
- placeholder="<@spring.message 'node.hostName'/>"/>
- </div>
- </div>
-
- <!--<pre>{{$v.nodeInfo.ip}}</pre>-->
- <!-- IP 地址 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.ipAddress'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" id="ipAddress"
- :class="{'form-control--error': $v.nodeInfo.ip.$dirty && !$v.nodeInfo.ip.required || !$v.nodeInfo.ip.ipAddress || !$v.nodeInfo.ip.ipCheck}"
- v-model.trim="$v.nodeInfo.ip.$model"
- placeholder="<@spring.message 'node.ipAddress'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.nodeInfo.ip.$dirty && !$v.nodeInfo.ip.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg" v-if="$v.nodeInfo.ip.$dirty && !$v.nodeInfo.ip.ipAddress">
- <@spring.message 'validate.node.ipFormat'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeInfo.ip.$dirty && $v.nodeInfo.ip.required && $v.nodeInfo.ip.ipAddress && !$v.nodeInfo.ip.ipCheck">
- <@spring.message 'validate.node.ipRepeat'/>
- </div>
- </div>
- </div>
-
- <!-- 设备类型 server / net -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.type'/></div>
- <div class="col-sm-9">
- <multiselect :options="nodeTypes" label="value" :show-labels="false" :disabled="disabledFlag"
- :class="{'form-control--error': $v.nodeInfo.type.$dirty && !$v.nodeInfo.type.required}"
- v-model="$v.nodeInfo.type.$model" @close="getTags()"
- placeholder="<@spring.message 'common.pleaseSelect'/>"></multiselect>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.nodeInfo.type.$dirty && !$v.nodeInfo.type.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg" v-if="nodeTypeValidateFlag">
- <@spring.message 'validate.node.pickTypeFirst'/>
- </div>
- </div>
- </div>
-
- <!-- 设备标签 -->
- <div class="form-group"><!-- @open="checkNodeType()" -->
- <div class="col-sm-2 control-label"><@spring.message 'node.tag'/></div>
- <div class="col-sm-9">
- <multiselect :options="nodeTags" label="value" :show-labels="false" :disabled="disabledFlag"
- v-model="nodeInfo.tag"
- @open="checkNodeType"
- placeholder="<@spring.message 'common.pleaseSelect'/>">
-
- <div slot="afterList" v-show="nodeInfo.type != null">
- <div class="select-add"><i class="fa fa-plus" @click="openNodeTagForm"></i></div>
- </div>
- </multiselect>
- </div>
- </div>
-
- <!-- 在线状态 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.onLineState'/></div>
- <div class="col-sm-9">
- <multiselect :options="nodeStates" label="value" :disabled="disabledFlag" :show-labels="false"
- :class="{'form-control--error': $v.nodeInfo.state.$dirty && !$v.nodeInfo.state.required}"
- v-model="$v.nodeInfo.state.$model"
- placeholder="<@spring.message 'common.pleaseSelect'/>"></multiselect>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.nodeInfo.state.$dirty && !$v.nodeInfo.state.required">
- <@spring.message 'validate.common.required'/>
- </div>
- </div>
- </div>
-
- <!-- 位置信息 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.position.information'/></div>
- <div class="col-sm-9">
-
- <div class="add-box">
- <div class="add-box_body">
- <div class="add-box_row">
- <span class="add-box_cell add-box_cell_30"><@spring.message 'node.uSize'/>(U)</span>
- <span class="add-box_cell add-box_cell_60">
- <input type="text" class="form-control add-box_input"
- :class="{'form-control--error': $v.nodeInfo.uSize.$dirty && !$v.nodeInfo.uSize.minValue || !$v.nodeInfo.uSize.integer}"
- v-model.trim="$v.nodeInfo.uSize.$model"
- placeholder="<@spring.message 'node.uSize'/>(U)"/>
- <span class="add-box_required-symbol"
- v-if="nodeInfo.nodeRoom != null">*</span>
- <div class="form-control_error-msg" v-if="uSizeValidateFlag">
- <@spring.message 'validate.node.pickUsizeFirst'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeInfo.uSize.$dirty && !$v.nodeInfo.uSize.minValue || !$v.nodeInfo.uSize.integer">
- <@spring.message 'validate.common.positiveInteger'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeInfo.uSize.$dirty && !$v.nodeInfo.uSize.sizeRequired">
- <@spring.message 'validate.common.required'/>
- </div>
- </span>
- </div>
- <div class="add-box_row">
- <span class="add-box_cell add-box_cell_30"><@spring.message 'common.nodeRoom'/></span>
- <span class="add-box_cell add-box_cell_60">
- <multiselect :options="rooms" label="roomName" :disabled="disabledFlag"
- :show-labels="false"
- class="add-box_input"
- @close="getCabinets($event)" @open="checkUsize"
- v-model="nodeInfo.nodeRoom"
- placeholder="<@spring.message 'common.pleaseSelect'/>"></multiselect>
- </span>
- </div>
- <div class="add-box_row">
- <span class="add-box_cell add-box_cell_30"><@spring.message 'common.cabinet'/></span>
- <span class="add-box_cell add-box_cell_60">
- <multiselect :options="cabinets" label="name" :disabled="disabledFlag"
- :show-labels="false"
- class="add-box_input"
- @close="getStarts($event)" @open="checkUsize"
- v-model="nodeInfo.cabinetId"
- placeholder="<@spring.message 'common.pleaseSelect'/>"></multiselect>
- <span class="add-box_required-symbol"
- v-if="nodeInfo.nodeRoom != null">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeInfo.cabinetId.$dirty && !$v.nodeInfo.cabinetId.cabRequired">
- <@spring.message 'validate.common.required'/>
- </div>
- </span>
- </div>
- <div class="add-box_row">
- <span class="add-box_cell add-box_cell_30"><@spring.message 'node.cabinetStart'/></span>
- <span class="add-box_cell add-box_cell_60">
- <multiselect :options="starts" :show-labels="false" :disabled="disabledFlag"
- v-model="nodeInfo.cabinetStart"
- class="add-box_input"
- @blur="$v.nodeInfo.uSize.$touch()" @open="checkUsize"
- :placeholder="cabStartTitle"></multiselect>
- <span class="add-box_required-symbol"
- v-if="nodeInfo.nodeRoom != null">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeInfo.cabinetId.$dirty && !$v.nodeInfo.cabinetStart.startRequired">
- <@spring.message 'validate.common.required'/>
- </div>
- </span>
- </div>
- </div>
- </div>
-
- </div>
- </div>
-
-
- <!-- snmp端口 -->
- <div class="form-group" v-show="nodeInfo.type != null && nodeInfo.type.code == 2">
- <div class="col-sm-2 control-label"><@spring.message 'node.snmpPort'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.nodeInfo.snmpPort.$dirty && !$v.nodeInfo.snmpPort.numeric}"
- v-model.trim="$v.nodeInfo.snmpPort.$model"
- placeholder="<@spring.message 'node.snmpPort'/>"/>
- <div class="form-control_error-msg"
- v-if="$v.nodeInfo.snmpPort.$dirty && !$v.nodeInfo.snmpPort.numeric">
- <@spring.message 'validate.common.numeric'/>
- </div>
- </div>
- </div>
-
- <!-- snmp团体 -->
- <div class="form-group" v-show="nodeInfo.type != null && nodeInfo.type.code == 2">
- <div class="col-sm-2 control-label"><@spring.message 'node.snmpCommunity'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model.trim="nodeInfo.snmpCommunity"
- placeholder="<@spring.message 'node.snmpCommunity'/>"/>
- </div>
- </div>
-
- <!-- 用户名 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'user.username'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model.trim="nodeInfo.userName"
- placeholder="<@spring.message 'user.username'/>"/>
- </div>
- </div>
-
- <!-- 密码 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'user.password'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model.trim="nodeInfo.password"
- placeholder="<@spring.message 'user.password'/>"/>
- </div>
- </div>
-
- <!-- 备注 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.remark'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model.trim="nodeInfo.remark"
- placeholder="<@spring.message 'common.remark'/>"/>
- </div>
- </div>
-
- <!-- 选择业务系统 -->
- <div class="form-group" v-if="currentSystem.id == 1">
- <div class="col-sm-2 control-label"><@spring.message 'system.system'/></div>
- <div class="col-sm-9" id="system">
- <multiselect v-if="systemList != null" :options="systemList" label="name" track-by="id"
- :show-labels="false" :disabled="disabledFlag" :multiple="true" :taggable="true"
- v-model="selectedSystems"
- placeholder="<@spring.message 'common.pleaseSelect'/>">
- </multiselect>
- </div>
- </div>
-
- <!-- 选择节点组 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.nodeGroup'/></div>
- <div class="col-sm-9">
- <div class="add-box">
- <div class="add-box_head">
- <span class="add-box_cell add-box_cell_30"><@spring.message 'system.system'/></span>
- <span class="add-box_cell add-box_cell_60"><@spring.message 'common.nodeGroup'/></span>
- </div>
- <div class="add-box_body add-box_body_160 psNg">
- <div class="add-box_row" v-for="item in checkedGroups">
- <span class="add-box_cell add-box_cell_30"><span :class="existSystemName(item.systemName) =='-1' ? 'add-box_tag1' : 'add-box_tag3'">{{item.systemName}}</span></span>
- <span class="add-box_cell add-box_cell_60">{{item.absoluteGroupPath}}</span>
- <span class="add-box_ops">
- <i @click="unCheckGroup(item)" class="fa fa-trash-o"></i>
- </span>
- </div>
- </div>
- <div class="add-box_foot">
- <i @click="showNodeGroups" class="fa fa-plus"></i>
- </div>
- </div>
- </div>
- </div>
-
- <pre v-show="disabledFlag" style="text-align: center;color: red">此节点已和其他业务系统建立联系,点击保存和当前系统再次建立联系</pre>
-
- <!-- 保存 / 返回 -->
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary"
- style="width: 55px" @click="saveOrUpdate"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning"
- style="width: 55px" @click="reload"><i class="fa fa-reply"></i></button>
- </div>
- </div>
- </form>
-
- </div>
-
- <!-- 节点组tree -->
- <div v-show="!showGroupTree" id="groupTree" style="margin: 10px 0px 0px 30px">
-
- <div class="mytree-title"><span class="mytreeicon mytreeicon-close"></span>
- <@spring.message 'system.system'/>
- <div style="clear:both"></div>
- </div>
-
- <group-tree1
- v-for="item in systemsContainGroups"
- :key="item.id"
- :zNodes="item.nodegroups"
- :node="item"
- :currentSystem="currentSystem"
- @addrootgroup="addNodeGroup"
- ref="gtree"
- @tree-select="selectedTreeDatas"
- @tree-unselect="unSelectedTreeDatas"> <!-- ref 为获取 组件 或 dom 时使用 -->
-
- </group-tree1>
- </div>
-
-
- <!-- 节点组 添加 / 修改 表单 -->
- <div v-show="!showGroupForm" id="groupForm" style="overflow-x: hidden">
- <div class="">
- <form class="form-horizontal">
-
- <!-- 上级节点组 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'nodegroup.parent.group'/></div>
- <div class="col-sm-9">
- <input disabled type="text" class="form-control"
- v-model.trim="nodeGroupDto.parentGroup.name"
- placeholder="<@spring.message 'nodegroup.parent.group'/>"/>
- <span class="required-symbol">*</span>
- </div>
- </div>
-
- <!-- 业务系统 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'system.system'/></div>
- <div class="col-sm-9">
- <input disabled type="text" class="form-control" v-model.trim="system.name"
- placeholder="<@spring.message 'system.system'/>"/>
- </div>
- </div>
-
- <!-- 节点组名称 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'nodegroup.name'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.nodeGroupDto.name.$dirty && (!$v.nodeGroupDto.name.required || !$v.nodeGroupDto.name.groupNameCheck)}"
- v-model.trim="$v.nodeGroupDto.name.$model"
- placeholder="<@spring.message 'nodegroup.name'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeGroupDto.name.$dirty && !$v.nodeGroupDto.name.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeGroupDto.name.$dirty && !$v.nodeGroupDto.name.groupNameCheck">
- <@spring.message 'validate.common.name.repeat'/>
- </div>
- </div>
- </div>
-
- <!-- 备注 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"> <@spring.message 'common.remark'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model.trim="nodeGroupDto.remark"
- placeholder="<@spring.message 'common.remark'/>"/>
- </div>
- </div>
- </form>
-
- <!-- 保存 / 返回 -->
- <div class="form-group_opbox" style="margin-bottom: 20px">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary"
- style="width: 55px" @click="saveOrUpdateGroup"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning"
- style="width: 55px" @click="closeGroupForm"><i class="fa fa-reply"></i></button>
- </div>
- </div>
- </div>
- </div>
-
-
- <!-- node tags 添加 / 修改 表单 -->
- <div v-show="!showNodeTagsForm" id="nodeTagsForm" style="overflow-x: hidden">
- <form class="form-horizontal">
-
- <!-- 当前设备类型 -->
- <div class="form-group" v-show="!showNodeTagsForm">
- <div class="col-sm-2 control-label"><@spring.message 'node.type'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model.trim="nodeTag.relationNodeType" disabled/>
- </div>
- </div>
-
- <!-- 标签名称 -->
- <div class="form-group" v-show="!showNodeTagsForm">
- <div class="col-sm-2 control-label"><@spring.message 'node.tagName'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.nodeTag.value.$dirty && !$v.nodeTag.value.required || !$v.nodeTag.value.nodeTagValueCheck}"
- v-model.trim="$v.nodeTag.value.$model"
- placeholder="<@spring.message 'node.tagName'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.nodeTag.value.$dirty && !$v.nodeTag.value.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg" v-if="$v.nodeTag.value.$dirty && !$v.nodeTag.value.nodeTagValueCheck">
- <@spring.message 'validate.common.name.repeat'/>
- </div>
- </div>
- </div>
-
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary"
- style="width: 55px" @click="saveNodeTag"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning"
- style="width: 55px" @click="closeNodeTagForm"><i class="fa fa-reply"></i></button>
- </div>
- </div>
- </form>
- </div>
-
-</div>
-
-<!-- 节点组树结构模板 -->
-<template id="treeTemplate">
- <div class="mytree-item">
-
- <!-- 业务系统名称 + 添加按钮 -->
- <div>
- <span :id="'icon' + node.id" class="mytreeicon mytreeicon-open" @click="showTree(node)"></span>
- <span class="mytree-subtitle" @mouseenter="showBtn(node)" @mouseleave="hideBtn(node)">
- <a :title="node.name" @click="showTree(node)">{{node.name}}</a>
- <!-- 添加按钮 -->
- <span :id="'icon2' + node.id" class="mytreeicon mytreeicon-add_unact" @mouseenter="showBtn2(node)"
- @mouseleave="hideBtn2(node)" @click="addRootGroup"
- title="<@spring.message 'common.add'/><@spring.message 'nodegroup.root.group'/>"></span>
- </span>
- </div>
-
- <!-- 树 div -->
- <div style="clear:both"></div>
- <div class="mytree-box" :id="'box' + node.id">
- <ul :id="'treeDemo'+node.id" class="ztree"></ul>
- </div>
- <div style="clear:both"></div>
-
- </div>
-</template>
-<!--<script src="${request.contextPath}/statics/js/modules/node/nodeInfo.js"></script>-->
-<#include "/js/modules/node/nodeInfo.js">
-
-<script>
- // 选择节点组DIV滚动条
- var perfect = new PerfectScrollbar('.psNg');
-</script>
-<style>
- .ztree {
- padding: 1px 0 0 6px !important;
- }
- /* 下拉框插件高度自动增长 */
- .multiselect{
- height: auto;
- }
- .multiselect__tags{
- height: auto !important;
- }
-</style>
-</body>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/node/nodeRoom.html b/nezha-admin/src/main/resources/templates/modules/node/nodeRoom.html
deleted file mode 100644
index ebe3c008..00000000
--- a/nezha-admin/src/main/resources/templates/modules/node/nodeRoom.html
+++ /dev/null
@@ -1,162 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
- <title>机房管理</title>
- <#include "/header.html">
-</head>
-<body>
-<div id="app" v-cloak>
-
- <!-- 列表 查询 -->
- <div v-show="showList">
- <div class="tools">
-
- <!-- 搜索条件 -->
- <div class="form-group">
- <input type="text" class="form-control input-medium" v-model="q.name" @keyup.enter="query"
- placeholder="<@spring.message 'node.room.name'/>">
- </div>
-
- <div class="form-group">
- <multiselect :options="addrList" label="value" :show-labels="false"
- v-model="q.addr" class="input-medium"
- placeholder="<@spring.message 'node.room.addr'/>"></multiselect>
- </div>
-
- <!-- 功能按钮 -->
- <a class="btn btn-default" @click="query" title="<@spring.message 'common.search'/>">
- <i class="fa fa-search"></i></a>
- <a class="btn btn-default" @click="reset" title="<@spring.message 'common.reset'/>">
- <i class="fa fa-refresh"></i></a>
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>">
- <i class="fa fa-plus"></i></a>
- <a :disabled="single" class="btn btn-primary" @click="update" title="<@spring.message 'common.edit'/>">
- <i class="fa fa-pencil-square-o"></i></a>
- <a :disabled="multi" class="btn btn-primary" @click="del" title="<@spring.message 'common.delete'/>">
- <i class="fa fa-trash-o"></i></a>
- </div>
-
- <!-- 列表数据 / 分页 -->
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
-
- </div>
-
- <div v-show="!showList" class="panel panel-default">
- <!-- 标题 -->
- <div class="panel-heading">{{title}}</div>
- <form class="form-horizontal">
-
-
- <!-- 名称 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.nodeRoom.name.$dirty && (!$v.nodeRoom.name.required || !$v.nodeRoom.name.nameCheck)}"
- v-model.trim="nodeRoom.name" @blur="$v.nodeRoom.name.$touch"
- placeholder="<@spring.message 'common.name'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.nodeRoom.name.$dirty && !$v.nodeRoom.name.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg" v-if="$v.nodeRoom.name.$dirty && !$v.nodeRoom.name.nameCheck">
- <@spring.message 'validate.common.name.repeat'/>
- </div>
- </div>
- </div>
-
- <!-- 所属地区 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.room.addr'/></div>
- <div class="col-sm-9">
- <multiselect :options="addrList" :show-labels="false" label="value"
- :class="{'form-control--error': $v.nodeRoom.addr.$dirty && !$v.nodeRoom.addr.required}"
- v-model="$v.nodeRoom.addr.$model"
- placeholder="<@spring.message 'common.pleaseSelect'/>"></multiselect>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.nodeRoom.addr.$dirty && !$v.nodeRoom.addr.required">
- <@spring.message 'validate.common.required'/>
- </div>
- </div>
- </div>
-
- <!-- 机房行数 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.room.roomRows'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.nodeRoom.roomRows.$dirty && !$v.nodeRoom.roomRows.minValue || !$v.nodeRoom.roomRows.integer}"
- v-model="$v.nodeRoom.roomRows.$model"
- placeholder="<@spring.message 'node.room.roomRows'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomRows.$dirty && !$v.nodeRoom.roomRows.minValue || !$v.nodeRoom.roomRows.integer">
- <@spring.message 'validate.common.positiveInteger'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomRows.$dirty && !$v.nodeRoom.roomRows.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomRows.$dirty && $v.nodeRoom.roomRows.minValue && $v.nodeRoom.roomRows.integer && !$v.nodeRoom.roomRows.roomRowsCheck">
- <@spring.message 'validate.cabinet.occupied'/>{{occRow}}<@spring.message 'node.room.row'/>
- </div>
- </div>
- </div>
-
- <!-- 机房列数 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.room.roomCols'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.nodeRoom.roomCols.$dirty && !$v.nodeRoom.roomCols.minValue || !$v.nodeRoom.roomCols.integer}"
- v-model="$v.nodeRoom.roomCols.$model"
- placeholder="<@spring.message 'node.room.roomCols'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomCols.$dirty && !$v.nodeRoom.roomCols.minValue || !$v.nodeRoom.roomCols.integer">
- <@spring.message 'validate.common.positiveInteger'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomCols.$dirty && !$v.nodeRoom.roomCols.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomCols.$dirty && $v.nodeRoom.roomCols.minValue && $v.nodeRoom.roomCols.integer && !$v.nodeRoom.roomCols.roomColsCheck">
- <@spring.message 'validate.cabinet.occupied'/>{{occCol}}<@spring.message 'node.room.column'/>
- </div>
- </div>
- </div>
-
- <!-- 备注 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"> <@spring.message 'common.remark'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="nodeRoom.remarks"
- placeholder="<@spring.message 'common.remark'/>"/>
- </div>
- </div>
-
- <!-- 保存 / 返回 -->
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary"
- style="width: 55px" @click="saveOrUpdate"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning"
- style="width: 55px" @click="reload"><i class="fa fa-reply"></i></button>
- </div>
- </div>
- </form>
- </div>
-
-
-</div>
-
-
-<!--<script src="${request.contextPath}/statics/js/modules/node/nodeRoom.js"></script>-->
-<#include "/js/modules/node/nodeRoom.js">
-</body>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/node/roomTest.html b/nezha-admin/src/main/resources/templates/modules/node/roomTest.html
deleted file mode 100644
index 576e3731..00000000
--- a/nezha-admin/src/main/resources/templates/modules/node/roomTest.html
+++ /dev/null
@@ -1,299 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
- <title>roomTest</title>
- <#include "/header.html">
- <link rel="stylesheet" href="${request.contextPath}/statics/css/nodeRoom.css">
-</head>
-<body>
-<div id="roomTestApp" v-cloak>
-
- <!-- 搜索条件 -->
- <div class="tools">
- <div class="form-group areas">
- <button v-for="(item,index) in addrList" :id="'but'+item.code" class="btn-area" :class="[index==0 ? 'btn-area_left' : '', index==addrList.length-1 ? 'btn-area_right' : '', item.code==q.addr ? 'btn-area_active' : '']"
- @click="query(item.code, $event)" :value="item.value" :title="item.value">{{item.value}}
- </button>
- </div>
- <div class="form-group">
- <input type="text" class="form-control input-medium" v-model="q.name" @keyup.enter="query(null)"
- placeholder="<@spring.message 'node.room.name'/>">
- </div>
-
- <!-- 功能按钮 -->
- <a class="btn btn-default btn-search" title="<@spring.message 'common.search'/>" @click="query(null)"><i class="fa fa-search"></i></a>
- <a class="btn btn-primary" @click="addRoom" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- </div>
- <div style="clear: both;"></div>
- <!-- 左侧机房名称列表 -->
- <div class="room" id="roomList">
- <!-- <a class="btn btn-primary" @click="addRoom" title="添加"><i class="fa fa-plus"></i></a> -->
- <div class="room__content">
- <table class="table table-hover">
- <tr :class="[room.id==item.id ? 'tr-higHlight' : 'tr-normal']" v-for="item in roomList" :id="'tr'+item.id" @click="showRowList(item)">
- <td @mouseenter="showRoomOption(item.id)" @mouseleave="closeRoomOption(item.id)">
- <div style="float: left">
- <span class="tr-item" @click="showRowList(item)"><a href="#" style="text-decoration:none">{{item.name}}</a></span>
- </div>
- <div :class="[room.id==item.id ? 'myoption-open' : 'myoption-close']" :id="'option'+item.id">
- <span class="tr-op" @click="updateRoom(item)" title="<@spring.message 'common.edit'/>"><i class="fa fa-pencil"></i></span>
- <span class="tr-op" @click="delRoom(item)" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></span>
- </div>
- </td>
- </tr>
- <tr v-show="noRoomTip">
- <td><@spring.message 'common.noData'/></td>
- </tr>
- </table>
- </div>
- </div>
-
- <!-- 行列表区域 -->
- <div class="ranks" v-show="!noRoomTip">
- <!--<div style="background-color: greenyellow;position: absolute;top: 0px;left: 0px;">
- </div>-->
- <div class="ranks-rows">
- <div class="ranks-row" v-for="item,index in rowList">
- {{index+1}}
- </div>
- </div>
- <div class="ranks-body">
- <table>
- <tr>
- <template v-if="rowList[0] !== undefined && rowList[0].length > 0">
- <td v-for="n in rowList[0].length"><div class="ranks-col">{{n}}</div></td>
- </template>
- </tr>
- <tr v-for="item,index in rowList">
- <td v-for="cab in item" :key="item.id">
- <div class="cab" :class="[checkCab(cab) ? 'cab_nocabdata' : '']" @mouseenter="showCabOption(cab)" @mouseleave="showCabOption(cab)">
-
- <!-- 该位置暂无机柜 展示图标 -->
- <template v-if="checkCab(cab)">
- <span class="cab-add" @click="addCab(cab)" title="<@spring.message 'common.add'/>">
- <i class="fa fa-plus" aria-hidden="true"></i>
- </span>
- </template>
-
- <!-- 存在机柜 展示机柜名称 -->
- <template v-else>
- <span class="cab-name" :title="getCabName(cab)">{{getCabName(cab)}}</span>
- </template>
- <!-- 机柜 修改/删除 按钮 -->
- <div v-if="!checkCab(cab)" class="myoption-close cab-option" :id="'cab'+cab.id">
- <span class="cab-button" @click="updateCab(cab)" title="<@spring.message 'common.edit'/>">
- <i class="fa fa-pencil"></i>
- </span>
- <span class="cab-button" @click="delCab(cab)" title="<@spring.message 'common.delete'/>">
- <i class="fa fa-trash-o"></i>
- </span>
- </div>
- </div>
-
- </td>
- </tr>
- </table>
- </div>
- </div>
-
- <!-- 机房表单 -->
- <div v-show="!showRoomFrom" id="roomForm" class="">
-
- <form class="form-horizontal">
- <!-- 名称 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.nodeRoom.name.$dirty && (!$v.nodeRoom.name.required || !$v.nodeRoom.name.roomNameCheck)}"
- v-model.trim="nodeRoom.name" @blur="$v.nodeRoom.name.$touch"
- placeholder="<@spring.message 'common.name'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.nodeRoom.name.$dirty && !$v.nodeRoom.name.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.name.$dirty && !$v.nodeRoom.name.roomNameCheck">
- <@spring.message 'validate.common.name.repeat'/>
- </div>
- </div>
- </div>
-
- <!-- 所属地区 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.room.addr'/></div>
- <div class="col-sm-9">
- <multiselect :options="addrList" :show-labels="false" label="value"
- :class="{'form-control--error': $v.nodeRoom.addr.$dirty && !$v.nodeRoom.addr.required}"
- v-model="$v.nodeRoom.addr.$model"
- placeholder="<@spring.message 'common.pleaseSelect'/>"></multiselect>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.nodeRoom.addr.$dirty && !$v.nodeRoom.addr.required">
- <@spring.message 'validate.common.required'/>
- </div>
- </div>
- </div>
-
- <!-- 机房行数 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.room.roomRows'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.nodeRoom.roomRows.$dirty && !$v.nodeRoom.roomRows.minValue || !$v.nodeRoom.roomRows.integer}"
- v-model="$v.nodeRoom.roomRows.$model"
- placeholder="<@spring.message 'node.room.roomRows'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomRows.$dirty && !$v.nodeRoom.roomRows.minValue || !$v.nodeRoom.roomRows.integer">
- <@spring.message 'validate.common.positiveInteger'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomRows.$dirty && !$v.nodeRoom.roomRows.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomRows.$dirty && $v.nodeRoom.roomRows.minValue && $v.nodeRoom.roomRows.integer && !$v.nodeRoom.roomRows.roomRowsCheck">
- <@spring.message 'validate.cabinet.occupied'/>{{occRow}}<@spring.message 'node.room.row'/>
- </div>
- </div>
- </div>
-
- <!-- 机房列数 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.room.roomCols'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control"
- :class="{'form-control--error': $v.nodeRoom.roomCols.$dirty && !$v.nodeRoom.roomCols.minValue || !$v.nodeRoom.roomCols.integer}"
- v-model="$v.nodeRoom.roomCols.$model"
- placeholder="<@spring.message 'node.room.roomCols'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomCols.$dirty && !$v.nodeRoom.roomCols.minValue || !$v.nodeRoom.roomCols.integer">
- <@spring.message 'validate.common.positiveInteger'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomCols.$dirty && !$v.nodeRoom.roomCols.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeRoom.roomCols.$dirty && $v.nodeRoom.roomCols.minValue && $v.nodeRoom.roomCols.integer && !$v.nodeRoom.roomCols.roomColsCheck">
- <@spring.message 'validate.cabinet.occupied'/>{{occCol}}<@spring.message 'node.room.column'/>
- </div>
- </div>
- </div>
-
- <!-- 备注 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"> <@spring.message 'common.remark'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="nodeRoom.remarks"
- placeholder="<@spring.message 'common.remark'/>"/>
- </div>
- </div>
-
- <!-- 保存 / 返回 -->
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary"
- style="width: 55px" @click="saveOrUpdateRoom"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning"
- style="width: 55px" @click="reload"><i class="fa fa-reply"></i></button>
- </div>
- </div>
- </form>
- </div>
-
- <!-- 机柜表单 -->
- <div style="display:none;"id="cabForm" class="">
-
- <form class="form-horizontal">
- <!-- 名称 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/></div>
- <div class="col-sm-9">
- <input type="text" v-model.trim="nodeCabinet.name" @blur="$v.nodeCabinet.name.$touch"
- class="form-control"
- :class="{'form-control--error': $v.nodeCabinet.name.$dirty && (!$v.nodeCabinet.name.required || !$v.nodeCabinet.name.cabNameCheck)}"
- placeholder="<@spring.message 'common.name'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeCabinet.name.$dirty && !$v.nodeCabinet.name.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeCabinet.name.$dirty && !$v.nodeCabinet.name.cabNameCheck">
- <@spring.message 'validate.common.name.repeat'/>
- </div>
- </div>
- </div>
-
- <!--机房名称-->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.room.name'/></div>
- <div class="col-sm-9">
- <input type="text" v-model.trim="nodeCabinet.roomName" class="form-control"
- placeholder="<@spring.message 'node.room.name'/>" readonly="false"/>
- <span class="required-symbol">*</span>
- </div>
- </div>
-
- <!-- U位 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'node.cabinet.uSize'/></div>
- <div class="col-sm-9">
- <input type="text" v-model="nodeCabinet.ubit" class="form-control"
- :class="{'form-control--error': $v.nodeCabinet.ubit.$dirty && (!$v.nodeCabinet.ubit.minValue || !$v.nodeCabinet.ubit.integer || !$v.nodeCabinet.ubit.required)}"
- @blur="$v.nodeCabinet.ubit.$touch" placeholder="<@spring.message 'node.cabinet.uSize'/>"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg"
- v-if="$v.nodeCabinet.ubit.$dirty && !$v.nodeCabinet.ubit.minValue || !$v.nodeCabinet.ubit.integer">
- <@spring.message 'validate.common.positiveInteger'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeCabinet.ubit.$dirty && !$v.nodeCabinet.ubit.required">
- <@spring.message 'validate.common.required'/>
- </div>
- <div class="form-control_error-msg"
- v-if="$v.nodeCabinet.ubit.$dirty && $v.nodeCabinet.ubit.required && $v.nodeCabinet.ubit.minValue && !$v.nodeCabinet.ubit.cabUbitCheck">
- <@spring.message 'validate.node.uAlreadyUsed'/> {{occUbit}}U
- </div>
- </div>
- </div>
-
- <!-- 备注 -->
- <div class="form-group">
- <div class="col-sm-2 control-label"> <@spring.message 'common.remark'/></div>
- <div class="col-sm-9">
- <input type="text" v-model="nodeCabinet.remarks" class="form-control"
- placeholder="<@spring.message 'common.remark'/>"/>
- </div>
- </div>
- </form>
-
- <!-- 保存 / 返回 -->
- <div class="form-group form-group_opbox" style="margin-top: 50px">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary"
- style="width: 55px" @click="saveOrUpdateCab"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning"
- style="width: 55px" @click="reload"><i class="fa fa-reply"></i></button>
- </div>
- </div>
- </div>
-
-</div>
-</body>
-<!--<script src="${request.contextPath}/statics/js/modules/node/roomTest.js"></script>-->
-<#include "/js/modules/node/roomTest.js">
-<script>
-$(function(){
- var perfect = new PerfectScrollbar('.room__content');
- $(".room").css("height",top.$(".content").height()-60);
- $(".ranks").css("height",top.$(".content").height()-60);
-
-})
-</script>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/sys/system.html b/nezha-admin/src/main/resources/templates/modules/sys/system.html
deleted file mode 100644
index 26565271..00000000
--- a/nezha-admin/src/main/resources/templates/modules/sys/system.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
-<title>业务系统管理</title>
-<#include "/header.html">
-<link rel="stylesheet" href="${request.contextPath}/statics/css/nzNodeSelector.css">
-<link rel="stylesheet" href="${request.contextPath}/statics/css/nodeRel.css">
-</head>
-<body>
-<div id="rrapp" v-cloak>
- <div v-show="showList">
- <div class="tools">
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- <a :disabled="single" class="btn btn-primary" @click="update" title="<@spring.message 'common.edit'/>"><i class="fa fa-pencil"></i></a>
- <a :disabled="multi" class="btn btn-primary" @click="del" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- <!-- <a class="btn btn-primary" @click="nodeRel"><i class="fa fa-trash-o"></i>&nbsp;test</a> -->
- </div>
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
- </div>
-
- <div v-show="!showList" class="panel panel-default">
- <div class="panel-heading">{{title}}</div>
- <form class="form-horizontal">
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" :class="{'form-control--error': $v.system.name.$dirty && $v.system.name.$error}" v-model.trim="$v.system.name.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.system.name.$dirty && !$v.system.name.required"><@spring.message 'validate.common.required'/></div>
- <div class="form-control_error-msg" v-if="$v.system.name.$dirty && !$v.system.name.checkName"><@spring.message 'validate.common.duplicate'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'usergroup.usergroup'/></div>
- <div class="col-sm-9">
- <template v-for="ug in usergroups">
- <span class="form-cbx">
- <input v-model="system.usergroupIds" type="checkbox" :value="ug.id"/>
- <span :title="ug.name">{{ug.name}}</span>
- </span>
- </template>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'usergroup.nodeNum'/></div>
- <div class="col-sm-9">
- <div class="form-text">&nbsp;{{system.nodeNum}}&nbsp;&nbsp;&nbsp;<span class="iconbtn-default" @click="nodeRel"><i class="fa fa-edit"></i></span></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.remark'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="system.remarks"/>
- </div>
- </div>
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary" style="width: 55px" @click="saveOrUpdate"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning" style="width: 55px" @click="reload"><i class="fa fa-reply"></i></button>
- </div>
- </div>
- </form>
- </div>
-
- <!-- 分配节点 -->
- <div class="nodeRel" style="display: none;">
- <node-rel-component
- v-on:node-change="nodeChange"
- :init-selected-nodes="selectedNodes"
- :init-selectable-nodes="selectableNodes"
- ></node-rel-component>
- </div>
-</div>
-<#include "/modules/common/nodeRel.html">
-<#include "/js/modules/common/nodeRel.js">
-<#include "/js/modules/sys/system.js">
-</body>
-</html> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/modules/sys/usergroup.html b/nezha-admin/src/main/resources/templates/modules/sys/usergroup.html
deleted file mode 100644
index f550e81c..00000000
--- a/nezha-admin/src/main/resources/templates/modules/sys/usergroup.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<#import "/spring.ftl" as spring>
-<html>
-<head>
-<title>用户组管理</title>
-<#include "/header.html">
-</head>
-<body>
-<div id="rrapp" v-cloak>
- <div v-show="showList">
- <div class="tools">
- <a class="btn btn-primary" @click="add" title="<@spring.message 'common.add'/>"><i class="fa fa-plus"></i></a>
- <a class="btn btn-primary" @click="update" title="<@spring.message 'common.edit'/>"><i class="fa fa-pencil-square-o"></i></a>
- <a class="btn btn-primary" @click="del" title="<@spring.message 'common.delete'/>"><i class="fa fa-trash-o"></i></a>
- </div>
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
- </div>
-
- <div v-show="!showList" class="panel panel-default">
- <div class="panel-heading">{{title}}</div>
- <form class="form-horizontal">
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.name'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" :class="{'form-control--error': $v.usergroup.name.$dirty && $v.usergroup.name.$error}" v-model.trim="$v.usergroup.name.$model"/>
- <span class="required-symbol">*</span>
- <div class="form-control_error-msg" v-if="$v.usergroup.name.$dirty && !$v.usergroup.name.required"><@spring.message 'validate.common.required'/></div>
- <div class="form-control_error-msg" v-if="$v.usergroup.name.$dirty && !$v.usergroup.name.checkName"><@spring.message 'validate.common.duplicate'/></div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'system.system'/></div>
- <div class="col-sm-9">
- <template v-for="st in systems">
- <span class="form-cbx">
- <input v-model="usergroup.systemIds" type="checkbox" :value="st.id"/>
- <span :title="st.name">{{st.name}}</span>
- </span>
- </template>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'user.user'/></div>
- <div class="col-sm-9">
- <template v-for="us in users">
- <span class="form-cbx">
- <input v-model="usergroup.userIds" type="checkbox" :value="us.userId"/>
- <span :title="us.username">{{us.username}}</span>
- </span>
- </template>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'common.remark'/></div>
- <div class="col-sm-9">
- <input type="text" class="form-control" v-model="usergroup.remark"/>
- </div>
- </div>
- <div class="form-group form-group_opbox">
- <div>
- <button title="<@spring.message 'common.submit'/>" type="button" class="btn btn-primary" style="width: 55px" @click="saveOrUpdate"><i class="fa fa-check"></i></button>
- <div style="display:inline-block;width:10px;"></div>
- <button title="<@spring.message 'common.back'/>" type="button" class="btn btn-warning" style="width: 55px" @click="reload"><i class="fa fa-reply"></i></button>
- </div>
- </div>
- </form>
- </div>
-</div>
-<#include "/js/modules/sys/usergroup.js">
-</body>
-</html> \ No newline at end of file
diff --git a/nezha-common/.project b/nezha-common/.project
deleted file mode 100644
index 39bb6846..00000000
--- a/nezha-common/.project
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>nezha-common</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- </natures>
-</projectDescription>
diff --git a/nezha-common/.settings/org.eclipse.core.resources.prefs b/nezha-common/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index e9441bb1..00000000
--- a/nezha-common/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-encoding//src/main/java=UTF-8
-encoding/<project>=UTF-8
diff --git a/nezha-common/.settings/org.eclipse.jdt.core.prefs b/nezha-common/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 9c81ef9c..00000000
--- a/nezha-common/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
diff --git a/nezha-common/.settings/org.eclipse.m2e.core.prefs b/nezha-common/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f1..00000000
--- a/nezha-common/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/nezha-common/src/main/java/com/nis/common/utils/RCode.java b/nezha-common/src/main/java/com/nis/common/utils/RCode.java
deleted file mode 100644
index 70bc069d..00000000
--- a/nezha-common/src/main/java/com/nis/common/utils/RCode.java
+++ /dev/null
@@ -1,262 +0,0 @@
-package com.nis.common.utils;
-
-public enum RCode {
-
- SUCCESS(200, "success"), //成功
-
-
- SYS_ERROR(100000, "system_error"), //10xxxx,系统类(业务系统、用户组、权限等)通用错误以及其他系统内部错误
-
- SYS_DB_DUPLICATERECORD(100001, "DUPLICATE_RECORD"), //数据库中已存在该记录
- SYS_DB_AUTH(100002, "auth_error"), //没有权限
-
- SYS_LOGIN_CAPTCHA(101001, "captcha_error"), //登录验证码错误
- SYS_LOGIN_NOSYSTEM(101002, "no_system_error"), //无可用业务系统
- SYS_LOGIN_UNKNOWNACCOUNT(101003, "unknown_account_error"), //未知校验错误
- SYS_LOGIN_USERPWD(101004, "user_or_pwd_error"), //账号或密码错误
- SYS_LOGIN_LOCK(101005, "account_locked_error"), //账号被锁定
- SYS_LOGIN_ACCOUNTAUTH(101006, "account_auth_error"), //账号验证失败
- SYS_LOGIN_SELECTSYS(101007, "select_system_error"), //业务系统选择错误
-
- SYS_SYS_NULLNAME(102001, "systemname_null_error"), //业务系统名称不能为空
- SYS_SYS_DUPLICATENAME(102002, "systemname_duplicate_error"), //业务系统名称重复
- SYS_SYS_DELGLOBAL(102003, "delete global error"), //不能删除global业务系统
- SYS_SYS_BUILTIN(102004, "not allow to update"), //不能操作内置系统
- SYS_SYS_NOTEXISTS(102005, "sys sys notexists"), //业务系统不存在
-
- SYS_MENU_SYSMENUDEL(103001, "sysmenu del error"), //系统菜单,不能删除
- SYS_MENU_DELSUB(103002, "del sub first error"), //请先删除子菜单或按钮
- SYS_USER_OLDPWD(103003, "user oldpwd error"), //原密码不正确
- SYS_USER_DELADMIN(103004, "del admin error"), //系统管理员不能删除
- SYS_USER_CANNOTDEL(103005, "cannot del user error"), //当前用户不能删除
- SYS_USER_DUPLICATENAME(103006, "user name duplicate error"), //业务系统选择错误
-
- SYS_USERGROUP_DUPLICATENAME(104001, "usergroup name duplicate error"), //用户组名称重复
- SYS_USERGROUP_MATCH_ERROR(104002,"sys_usergroup_match_error"), //用户与用户组不匹配
- SYS_USERGROUPLIST_ISNULL(104003,"SYS_USERGROUPLIST_ISNULL"),//选择的用户组列表为空
-
- SYS_I18N_DUPLICATE(105001, "duplicate error (code + lang)"), //国际化配置重复(code+lang)
- SYS_I18N_NOSUCHLANG(105002, "no such lang"), //不合法的lang
-
-
- SYS_DICT_NAME_ISNULL(106001,"sys_dict_name_isnull"), // 字典名称不能为空
- SYS_DICT_TYPE_ISNULL(106002,"sys_dict_type_isnull"), // 字典类型不能为空
- SYS_DICT_VALUE_ISNULL(106003,"sys_dict_value_isnull"), // 字典值不能为空
- SYS_DICT_VALUE_DUPLICATE(106004,"sys_dict_value_duplicate"),// 字典值重复
-
- SYS_DOWNLOAD_NO_FILE(107001,"sys_download_no_file"), //下载文件不存在
-
- NODE_ERROR(200000, "node_error"), //20xxxx,设备类(节点、节点组、机房、机柜)通用错误
-
- NODE_IPADDRESS_FORMAT(201001, "ipaddress_format_error"), // ip 地址不合法 格式错误
- NODE_IPADDRESS_DUPLICATE(201002, "ipaddress_duplicate_error"), // IP 地址不能重复
- NODE_NAME_DUPLICATE(201003, "name_duplicate_error"), // 节点名称不能重复
- NODE_USTART_OCCUPIED(201004, "ustart_occupied_error"), // 节点 U 位已被占用 或 不存在
- NODE_IPADDRESS_ISNULL(201005, "node_ipaddress_isNull"), // ip 地址不能为空
- NODE_TYPE_ISNULL(201006, "node_type_isNull"), // 节点类型不能为空
- NODE_NAME_ISNULL(201007, "node_name_isNull"), // 节点名称不能为空
- NODE_TAG_ISNULL(201008, "node_tag_isNull"), // 节点标签不能为空
- NODE_UUID_ISNULL(201009, "node_uuid_isNull"), // 节点UUID不能为空
- NODE_STATE_ISNULL(201010, "node_state_isNull"), // 节点状态不能为空
- NODE_USIZE_ISNULL(201011, "node_usize_isNull"), // 节点U位规格不能为空
- NODE_TYPE_NOTFOUND(201012, "node_type_notfound"), // 节点类型未找到
- NODE_SYSTEM_REL_EXISTS(201013, "node_system_rel_exists"), // 节点和业务系统已经关联
- NODE_NOT_EXISTS(201014, "node_not_exists"), // 节点不存在
- NODE_TAG_NOTFOUND(201015, "node_tag_notfound"), // 节点标签未找到
- NODE_USIZE_NOTTRUE(201016, "node_usize_value_nottrue"), // 节点U位不正确
- NODE_USTART_ISNULL(201017, "node_ustart_isnull"), // 节点起始位置不能为空
- NODE_SERVER_CANNOT_HAVE_SNMPPORT(201018, "server_cannot_have_snmpport"), // 节点类型为server时没有snmpport值
- NODE_SERVER_CANNOT_HAVE_SNMPCOMMUNITY(201019, "server_cannot_have_snmpcommunity"), // 节点类型为server时没有snmpcommunity值
-
- NODEGROUP_NAME_DUPLICATE(202001, "groupname_duplicate_error"), // 节点组名称不能重复
- NODEGROUP_NAME_ISNULL(202002, "group_name_isNull"), // 节点组名称不能为空
- NODEGROUP_PID_ISNULL(202003, "group_parentId_isNull"), // 节点组上级ID不能为空
- NODEGROUP_GROUPID_ISNULL(202004, "group_id_isNull"), // 节点组ID不能为空
- NODEGROUP_SYSTEMID_ISNULL(202005, "group_systemId_isNull"), // 系统ID不能为空
- NODEGROUP_ADD_REFUSE(202006, "nodegroup_add_refuse"), // 节点组不可以添加子节点组
- NODEGROUP_ASSIG_REFUSE(202007, "nodegroup_assig_refuse"), // 节点组不可以分配节点
- NODEGROUP_NOT_EXISTS(202008, "nodegroup_not_exists"), // 节点组不存在
- NODEGROUP_PARENT_NOT_EXISTS(202009, "nodegroup_parent_not_exists"), // 节点组上级不存在
- NODEGROUP_SYSTEMID_NOT_MODIFIED(202010, "nodegroup_systemid_not_modified"), // 节点组SYSTEMiD 不许修改
- NODEGROUP_PARENTID_NOT_MODIFIED(202011, "nodegroup_parentid_not_modified"), // 节点组pid不许修改
- NODEGROUP_PARENTIDS_NOT_MODIFIED(202012, "nodegroup_parentids_not_modified"), // 节点组pidS不许修改
- NODEGROUP_PARENT_SYSTEM_NOT_EQUALS(202013, "nodegroup_parent_system_not_equals"), // 父级级节点组系统ID不同
- NODEGROUP_NOT_EXISTS_THIS_SYSTEM(202014, "nodegroup_not_exists_this_system"), // 节点组不在这个业务系统中
- NODEGROUP_ID_ISNULL(202015, "nodegroup_id_isnull"), // 节点组id不能为Null
-
- NODEROOM_NAME_DUPLICATE(203001, "roomname_duplicate_error"), // 机房名称重复
- NODEROOM_ROW_OCCUPIED(203002,"row_occupied_error"), // 机房行号已被占用
- NODEROOM_COL_OCCUPIED(203003,"col_occupied_error"), // 机房列号已被占用
- NODEROOM_EXISTS_CABINET(203004,"cabinet_exists_error"), // 机房下存在机柜 错误
- NODEROOM_POSITION_OCCUPIED(203005,"position_occupied_error"), // 机房该行列被占用 机柜无法使用此位置
- NODEROOM_NAME_ISNULL(203006,"room_name_isNull"), // 机房名称不能为空
- NODEROOM_ROWS_ISNULL(203007,"room_rows_isNull"), // 机房行号不能为空
- NODEROOM_COLS_ISNULL(203008,"room_cols_isNull"), // 机房列号不能为空
- NODEROOM_ADDR_ISNULL(203009,"room_addr_isNull"), // 机房位置不能为空
- NODEROOM_ID_ISNULL(203010,"room_id_isNull"), // 机房 id 不能为空
- NODEROOM_ROWS_MINNUM(203011,"room_rows_minnum"), // 机房行数最小值为1
- NODEROOM_COLS_MINNUM(203012,"room_cols_minnum"), // 机房列数最小值为1
- NODEROOM_NOT_EXISTS(203013,"noderoom_not_exists"), // 机房不存在
- NODEROOM_ADDR_NOTFOUND(203014,"noderoom_addr_notfound"), // 机房地区不存在
-
- NODECABINET_NAME_DUPLICATE(204001, "cabinetname_duplicate_error"), // 机柜名称重复
- NODECABINET_ROW_INCORRECT(204002,"rownumber_incorrect_error"), // 行值不能小于1行
- NODECABINET_COL_NCORRECT(204003,"colnumber_incorrect_error"), // 列值不能小于1列
- NODECABINET_ROW_MAXNUM(204004,"rownumber_maxnum_error"), // 行超过机房最大值
- NODECABINET_COL_MAXNUM(204005,"colnumber_maxnum_error"), // 列超过机房最大值
- NODECABINET_NODES_EXISTS(204006,"related_nodes_error"), // 机柜存在关联节点
- NODECABINET_UBIT_OCCUPIED(204007,"ubit_occupied_error"), // U位中存在节点 U位修改值小了
- NODECABINET_ID_ISNULL(204008,"cabinet_id_isNull"), // 机柜ID不能为空
- NODECABINET_NAME_ISNULL(204009,"cabinet_name_isNull"), //机柜名称不能为空
- NODECABINET_UBIT_ISNULL(204010,"cabinet_ubit_isNull"), //机柜U位数不能为空
- NODECABINET_ROW_ISNULL(204011,"cabinet_row_isNull"), //机柜行号不能为空
- NODECABINET_COL_ISNULL(204012,"cabinet_col_isNull"), //机柜列号不能为空
- NODECABINET_NOT_EXISTS(204013,"nodecabinet_not_exists"), //机柜不存在
- NODECABINET_NOT_HAVE_POSITION(204014,"nodecabinet_not_have_position"), // 机柜没有位置存在
- NODECABINET_UBIT_MINNUM(204015,"nodecabinet_ubit_minnum"), // 机柜UBIT最小值为1
-
- DETE_ERROR(300000, "dete_error"), //30xxxx,监测类(类别、设置、告警)通用错误
- VIEWLEVEL_INVALID(300001,"viewlevel_invalid"),
- BUILDIN_CONFIG(300002,"buildin_config"),//内置配置,不允许修改
- DETE_UPLOAD_FILE_ISNULL(300003,"dete_upload_file_isnull"),//上传的文件为空
- /**
- * 301xxx 监测类别相关异常
- * 302xxx 监测设置相关异常
- * 303xxx 监测告警相关异常
- * */
- TYPE_NAME_ISNULL(301001,"type_name_isNull"),//监测类别名称为空
- TYPE_NAME_EXISTS(301002,"type_name_exists"),//监测类别名称已存在
- META_FIELDNAME_EXISTS(301003,"meta_fieldname_exists"),//监测类别元数据字段名称重复
- META_NAME_ISNULL(301004,"meta_name_isnull"),//监测类别元数据名称为空
- PARAM_NAME_ISNULL(301005,"param_name_isnull"),//监测类别参数名称为空
- META_NAME_EXISTS(301006,"meta_name_exists"), //监测类别元数据名称重复
- PARAM_NAME_EXISTS(301007,"param_name_exists"), //监测类别参数名称重复
- META_NAME_INVAILD(301008,"meta_name_invaild"), //监测类别元数据名称不合法
- META_NAME_HAVEKEYWORD(301009,"meta_name_haveKeyword"), //监测类别元数据名称是数据库关键字
- PARAM_INDEX_ISNULL(301010,"param_index_isNull"),//监测类别参数下标为空
- TYPE_TABLE_EXISTS(301011,"type_table_exists"),//监测类别对应表已存在
- DICT_TYPE_ISNULL(301012,"dict_type_isnull"),//监测类别字典类别名称为空
- DICT_MAPPINGS_ISNULL(301013,"dict_mappings_isnull"),//监测类别字典数据为空
- DICT_TYPE_USED(301014,"DICT_TYPE_USED"),//监测类别字典已经被使用,不允许删除
- METAMAPPING_TYPE_EXISTS(301015,"metamapping_type_exists"),//监测类别元数据字典表类型存在
- METAMAPPING_TYPE_INVALID(301016,"metamapping_type_invalid"),//修改的监测类别元数据无效
- META_FIELDTYPE_INVALID(301017,"meta_fieldtype_invalid"),//修改的监测类别元数据无效
- META_DATATYPE_INVALID(301018,"meta_datatype_invalid"),//修改的监测类别元数据无效
- TYPE_METHOD_INVALID(301019,"type_method_invalid"), //监测方式无效
-
- SET_NAME_ISNULL(302001,"set_name_isnull"),//监测设置名称为空
- SET_NAME_EXISTS(302002,"set_name_exists"),//监测设置名称已经存在
- SET_TYPE_ISNULL(302003,"set_type_isnull"),//监测设置所属类别为空
- SET_NODEGROUP_ISNOT_CURRENTSYSTEM(302004,"set_nodegroup_is_not_current_system"),
- SET_NODE_ISNOT_CURRENTSYSTEM(302005,"set_node_isnot_currentsystem"),
- SET_TYPE_NOTEXISTS(302006,"SET_TYPE_NOTEXISTS"),//监测设置所选监测类别不存在
- VALIDE_NODE_NOTEXISTS(302007,"vilide_node_notexists"),//监测设置所选节点组符合条件的节点为空
- SET_NODE_INVALIDE(302008,"SET_NODE_INVALIDE"),//监测设置所选节点/节点不符合条件
- SET_NO_DETECT_NODE_DISTRIBUTE(302009,"SET_NO_GROUP_OR_NODE_DISTRIBUTE"),//未指定监测节点
-
- WARN_NAME_ISNULL(303001,"warn_name_isnull"),//告警设置名称为空
- WARN_TYPE_ISNULL(303002,"warn_type_isnull"),//告警设置配置类别为空
- WARN_NAME_EXISTS(303003,"warn_name_exists"),//告警配置名称已经存在
- WARN_TRIGGERTYPE_INVALID(303004,"warn_triggertype_invalid"), //告警触发方式不合法
- WARN_WARNMODE_INVALID(303005,"warn_warnmode_invalid"),//告警模式不合法
- WARN_STATTYPE_INVALID(303006,"warn_stattype_invalid"),//告警统计方式不合法
- WARN_SYMBOL_INVALID(303007,"warn_symbol_invalid"),//告警比较符不合法
- WARN_WARNLEVEL_INVALID(303008,"warn_warnlevel_invalid"),//告警级别不合法
- WARN_CALLBACKTYPE_INVALID(303009,"warn_callbacktype_invalid"),//告警回调方式不合法
- WARN_CALLBACKCONTENT_ISNULL(303010,"warn_callbackcontent_isnull"),//告警回调方式为 1|2 时,不能为空
- WARN_TYPE_NOTEXISTS(303011,"warn_type_notexists"), //告警配置监测类别不存在
- WARN_SET_NOTEXISTS(303012,"warn_set_notexists"), //告警配置监测类别不存在
-
- MISSION_ERROR(400000, "mission_error"), //40xxxx,任务类通用错误
- MISSION_TYPE_ISNULL(400001,"mission_type_isnull"), // 任务类型为空
- MISSION_NAME_ISNULL(400002,"mission_name_isnull"), //任务名称不能为空
- MISSION_PARAM_ISNULL(400003,"mission_param_isnull"), //任务参数不能为空
- MISSION_PARAM_ERROR(400004,"mission_param_error"), //参数格式错误或部分缺失
- MISSION_ID_ISNULL(400005,"mission_id_isnull"), //任务id为空
- MISSION_STATE_ISNULL(400006,"mission_state_isnull"), //任务状态为空
- MISSION_STATE_ERROR(400007,"mission_state_error"), //任务状态错误
- MISSION_UNLOOP_MISSION_ERROR(40008,"mission_unloop_mission_error"), //非周期任务
- MISSION_GROUPNODE_OR_NODE_ISNULL(400009,"mission_groupnode_or_node_isnull"), //任务节点组或节点信息为空
- MISSION_LOOP_START_OR_STOP_ERROR(400010,"mission_loop_start_or_stop_error"), //启动周期任务错误 已终止任务不能启动或暂停
- MISSION_LOOP_STATE_ERROR(400011,"mission_loop_state_error"), //状态码错误
- MISSION_NODEINFO_ERROR(400012,"mission_nodeinfo_error"), //节点或节点组有效性错误
- MISSION_NODE_NET_ERROR(400013,"mission_node_net_error"), //网元不可下发任务
- MISSION_VIEWERID_ISNULL(400014,"mission_viewerid_isnull"), //类型为组内查看用户组信息不能为空
- MISSION_TYPE_ERROR(400015,"mission_type_error"), //任务类型错误
- MISSION_FILEPUSH_FILE_ISNULL(400101,"mission_filepush_file_isnull"), //文件推送文件为空
- MISSION_FILEPUSH_DESTPATH_ISNULL(400102,"mission_filepush_destpath_isnull"), // 文件推送路径为空
- MISSION_FILEPUSH_PASSWORD_HANDLE_ERROR(400103,"mission_filepush_password_handle_error"), //文件推送密码处理错误
- MISSION_FILEPUSH_FILE_UPLOAD_ERROR(400104,"mission_filepush_file_upload_error"), //文件推送上传文件错误
- MISSION_FILEPUSH_MD5_ERROR(400105,"mission_filepush_md5_error"), // 文件推送md5处理错误
- MISSION_FILEPUSH_OUTSIZE_ERROR(400106,"mission_filepush_outsize_error"), // 上传文件超过限制
- MISSION_EXECUTE_INSTRUCT_COMMANDENNAME_ISNULL(400201,"mission_execute_instruct_killprocess_commandenname_isnull"), // 指令具体任务类型不能为空
- MISSION_EXECUTE_INSTRUCT_KILLPROCESS_PIDFILE_ISNULL(400202,"mission_execute_instruct_killprocess_pidfile_isnull"), // 停止进程不能为空
- MISSION_EXECUTE_INSTRUCT_KILLPROCESS_LOOPTIME_ERROR(400203,"mission_execute_instruct_killprocess_looptime_error"), // 周期结束时间小于当前时间
- MISSION_EXECUTE_INSTRUCT_BACKUP_FILE_ISNULL(400301,"mission_execute_instruct_backup_file_isnull"), //备份文件不能为空
- MISSION_EXECUTE_INSTRUCT_BACKUP_PATH_ISNULL(400302,"mission_execute_instruct_backup_path_isnull"), //备份路径不能为空
- MISSION_EXECUTE_INSTRUCT_BACKUP_LOOPTIME_ERROR(400303,"mission_execute_instruct_backup_looptime_error"), // 周期结束时间小于当前时间
- MISSION_EXECUTE_INSTRUCT_UPDATE_SOURCE_ISNULL(400401,"mission_execute_instruct_update_source_isnull"), //源路径不能为空
- MISSION_EXECUTE_INSTRUCT_UPDATE_COVER_ISNULL(400402,"mission_execute_instruct_update_cover_isnull"), //覆盖路径不能为空
- MISSION_EXECUTE_INSTRUCT_UPDATE_LOOPTIME_ERROR(400403,"mission_execute_instruct_update_looptime_error"), // 周期结束时间小于当前时间
- MISSION_EXECUTE_INSTRUCT_START_EXECCMD_ISNULL(400501,"mission_execute_instruct_start_execcmd_isnull"), // 执行命令不能为空
- MISSION_EXECUTE_INSTRUCT_START_EXECRESULT_ISNULL(400502,"mission_execute_instruct_start_execresult_isnull"), // 执行结果不能为空
- MISSION_EXECUTE_INSTRUCT_START_RETURNPATH_ISNULL(400503,"mission_execute_instruct_start_returnpath_isnull"), // 回执文件不能为空
- MISSION_EXECUTE_INSTRUCT_START_LOOPTIME_ERROR(400504,"mission_execute_instruct_start_looptime_error"), // 周期结束时间小于当前时间
- MISSION_EXECUTE_INSTRUCT_RECOVER_SOURCE_ISNULL(400601,"mission_execute_instruct_recover_source_isnull"), //源路径不能为空
- MISSION_EXECUTE_INSTRUCT_RECOVER_COVER_ISNULL(400602,"mission_execute_instruct_recover_cover_isnull"), //覆盖路径不能为空
- MISSION_EXECUTE_INSTRUCT_RECOVER_LOOPTIME_ERROR(400603,"mission_execute_instruct_recover_looptime_error"), // 周期结束时间小于当前时间
- MISSION_EXECUTE_INSTRUCT_SINGLEEXEC_EXECCMD_ISNULL(400701,"mission_execute_instruct_start_execcmd_isnull"), // 执行命令不能为空
- MISSION_EXECUTE_INSTRUCT_SINGLEEXEC_RETURNPATH_ISNULL(400702,"mission_execute_instruct_start_returnpath_isnull"), // 回执文件不能为空
- MISSION_EXECUTE_INSTRUCT_SINGLEEXEC_LOOPTIME_ERROR(400703,"mission_execute_instruct_start_looptime_error"), // 周期结束时间小于当前时间
- MISSION_UPGRADE_UPLOADFILE_ISNULL(400801,"mission_upgrade_uploadfile_isnull"), // 升级部署任务上传文件为空
- MISSION_UPGRADE_UPLOADFILE_OUTSIZE(400802,"mission_upgrade_uploadfile_outsize"), //升级部署任务上传文件过大
- MISSION_UPGRADE_PASSWORD_HANDLE_ERROR(400803,"mission_upgrade_password_handle_error"), // 升级部署任务密码处理错误
- MISSION_UPGRADE_FILE_UPLOAD_ERROR(400804,"mission_upgrade_file_upload_error"), // 升级部署任务文件上传错误
- MISSION_UPGRADE_MD5_ERROR(400805,"mission_upgrade_md5_error"), // 升级部署任务md5加密错误
- MISSION_UPGRADE_COVER_ISNULL(400806,"mission_upgrade_cover_isnull"), // 升级部署任务覆盖路径为空
- MISSION_UPGRADE_BACKUP_PATH_ISNULL(400807,"mission_upgrade_backup_path_isnull"), // 备份路径为空
- MISSION_UPGRADE_BACKUPTO_ISNULL(400808,"mission_upgrade_backupto_isnull"), // 升级部署任务备份源路径为空
- MISSION_UPGRADE_STARTUPFILE_ISNULL(400809,"mission_upgrade_startupfile_isnull"),// 升级部署任务启动文件或命令为空
- MISSION_UPGRADE_PIDFILE_ISNULL(400810,"mission_upgrade_pidfile_isnull"),// 升级部署任务PID文件为空
- MISSION_UPGRADE_BACKUP_NULL(400811,"mission_upgrade_backup_null"), //任务没有备份不可以创建逆向任务
- MISSION_UPGRADE_NOT_FINISH(400812,"mission_upgrade_not_finish"), //任务没有完成不可以创建逆向任务
- MISSION_UPGRADE_NOT_REVERSED_ERROR(400813,"mission_upgrade_not_reversed_error"), //逆向任务不可以再逆向
- MISSION_UPGRADE_TYPE_ERROR(400814,"mission_upgrade_type_error"), //非升级部署任务 不能创建逆向
-
-
- DASHBOARD_ERROR(500000, "dashboard_error"), //50xxxx,仪表盘通用错误
- DASHBOARD_ID_NULL(500001,"dashboard_id_null"), //仪表盘id为空
- DASHBOARD_X_NULL(500002,"dashboard_x_postion_null"), //仪表盘x轴位置为空
- DASHBOARD_Y_NULL(500003,"dashboard_Y_postion_null"), //仪表盘y轴位置为空
- DASHBOARD_HEIGHT_NULL(500004,"dashboard_height_null"), //仪表盘高度为空
- DASHBOARD_WIDTH_NULL(500005,"dashboard_width_null"), //仪表盘宽度为空
- DASHBOARD_TYPE_NULL(500006,"dashboard_type_null"), //仪表盘类型为空
- DASHBOARD_USERSQL_NULL(500007,"dashboard_user_sql_null"), //仪表盘查询语句为空
- DASHBOARD_USERSQL_ERROR(500008,"dashboard_user_sql_error"), //仪表盘查询语句错误
- DASHBOARD_NAME_NULL(500009,"dashboard_name_null"), //名称为空
-
- GRAPH_ERROR(600000, "graph_error"), //60xxxx,图形类通用错误
-
-
- NOT_NULL_ERROR(990, "not null error"), //not null错误
- NOT_NUMBER_ERROR(991, "not number error"), //not number错误
- NO_PERMISSION_ERROR(998, "no permission error"), //无权限错误
- ERROR(999, "error"); //通用错误/未知错误
-
-
- private RCode(Integer code, String msg) {
- this.code = code;
- this.msg = msg;
- }
-
- private Integer code;
- private String msg;
-
- public Integer getCode() {
- return code;
- }
-
- public String getMsg() {
- return msg;
- }
-} \ No newline at end of file
diff --git a/nezha-admin/.classpath b/nz-admin/.classpath
index 228da75f..c1a8b492 100644
--- a/nezha-admin/.classpath
+++ b/nz-admin/.classpath
@@ -1,32 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="test" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ <attribute name="test" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_74">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/nezha-admin/.settings/org.eclipse.core.resources.prefs b/nz-admin/.settings/org.eclipse.core.resources.prefs
index 839d647e..839d647e 100644
--- a/nezha-admin/.settings/org.eclipse.core.resources.prefs
+++ b/nz-admin/.settings/org.eclipse.core.resources.prefs
diff --git a/nezha-admin/.settings/org.eclipse.jdt.core.prefs b/nz-admin/.settings/org.eclipse.jdt.core.prefs
index cc9b2904..cc9b2904 100644
--- a/nezha-admin/.settings/org.eclipse.jdt.core.prefs
+++ b/nz-admin/.settings/org.eclipse.jdt.core.prefs
diff --git a/nezha-admin/.settings/org.eclipse.wst.common.project.facet.core.xml b/nz-admin/.settings/org.eclipse.wst.common.project.facet.core.xml
index f4ef8aa0..f4ef8aa0 100644
--- a/nezha-admin/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/nz-admin/.settings/org.eclipse.wst.common.project.facet.core.xml
diff --git a/nezha-admin/Dockerfile b/nz-admin/Dockerfile
index 9db81f64..9db81f64 100644
--- a/nezha-admin/Dockerfile
+++ b/nz-admin/Dockerfile
diff --git a/nezha-admin/db/mysql.sql b/nz-admin/db/mysql.sql
index 1b3e8ab5..1b3e8ab5 100644
--- a/nezha-admin/db/mysql.sql
+++ b/nz-admin/db/mysql.sql
diff --git a/nezha-admin/db/oracle.sql b/nz-admin/db/oracle.sql
index 06667770..06667770 100644
--- a/nezha-admin/db/oracle.sql
+++ b/nz-admin/db/oracle.sql
diff --git a/nezha-admin/db/postgresql.sql b/nz-admin/db/postgresql.sql
index 91d43bfe..91d43bfe 100644
--- a/nezha-admin/db/postgresql.sql
+++ b/nz-admin/db/postgresql.sql
diff --git a/nezha-admin/db/sqlserver.sql b/nz-admin/db/sqlserver.sql
index 4f2eb7ac..4f2eb7ac 100644
--- a/nezha-admin/db/sqlserver.sql
+++ b/nz-admin/db/sqlserver.sql
diff --git a/nezha-admin/pom.xml b/nz-admin/pom.xml
index 705b1528..362c0702 100644
--- a/nezha-admin/pom.xml
+++ b/nz-admin/pom.xml
@@ -1,13 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.nis</groupId>
- <artifactId>nezha-web</artifactId>
+ <artifactId>nz-web</artifactId>
<version>4.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>nezha-admin</artifactId>
+ <artifactId>nz-admin</artifactId>
<packaging>jar</packaging>
- <description>nezha-admin</description>
+ <description>nz-admin</description>
<properties>
<quartz.version>2.3.0</quartz.version>
@@ -23,7 +23,7 @@
<dependencies>
<dependency>
<groupId>com.nis</groupId>
- <artifactId>nezha-common</artifactId>
+ <artifactId>nz-common</artifactId>
<version>4.0.0</version>
</dependency>
<!-- 集群环境,需要打开注释 -->
@@ -162,7 +162,7 @@
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.14</version>
<configuration>
- <imageName>nezha/admin</imageName>
+ <imageName>nz/admin</imageName>
<dockerDirectory>${project.basedir}</dockerDirectory>
<resources>
<resource>
diff --git a/nezha-admin/src/main/java/com/nis/AdminApplication.java b/nz-admin/src/main/java/com/nis/AdminApplication.java
index da7ec4df..da7ec4df 100644
--- a/nezha-admin/src/main/java/com/nis/AdminApplication.java
+++ b/nz-admin/src/main/java/com/nis/AdminApplication.java
diff --git a/nezha-admin/src/main/java/com/nis/common/annotation/DataFilter.java b/nz-admin/src/main/java/com/nis/common/annotation/DataFilter.java
index a4cc2461..a4cc2461 100644
--- a/nezha-admin/src/main/java/com/nis/common/annotation/DataFilter.java
+++ b/nz-admin/src/main/java/com/nis/common/annotation/DataFilter.java
diff --git a/nezha-admin/src/main/java/com/nis/common/annotation/SysLog.java b/nz-admin/src/main/java/com/nis/common/annotation/SysLog.java
index 44fb651f..44fb651f 100644
--- a/nezha-admin/src/main/java/com/nis/common/annotation/SysLog.java
+++ b/nz-admin/src/main/java/com/nis/common/annotation/SysLog.java
diff --git a/nezha-admin/src/main/java/com/nis/common/aspect/DataFilterAspect.java b/nz-admin/src/main/java/com/nis/common/aspect/DataFilterAspect.java
index 4f082466..4f082466 100644
--- a/nezha-admin/src/main/java/com/nis/common/aspect/DataFilterAspect.java
+++ b/nz-admin/src/main/java/com/nis/common/aspect/DataFilterAspect.java
diff --git a/nezha-admin/src/main/java/com/nis/common/aspect/SysLogAspect.java b/nz-admin/src/main/java/com/nis/common/aspect/SysLogAspect.java
index 25eea0df..25eea0df 100644
--- a/nezha-admin/src/main/java/com/nis/common/aspect/SysLogAspect.java
+++ b/nz-admin/src/main/java/com/nis/common/aspect/SysLogAspect.java
diff --git a/nezha-admin/src/main/java/com/nis/common/config/FilterConfig.java b/nz-admin/src/main/java/com/nis/common/config/FilterConfig.java
index 213d3eaa..213d3eaa 100644
--- a/nezha-admin/src/main/java/com/nis/common/config/FilterConfig.java
+++ b/nz-admin/src/main/java/com/nis/common/config/FilterConfig.java
diff --git a/nezha-admin/src/main/java/com/nis/common/config/FreemarkerConfig.java b/nz-admin/src/main/java/com/nis/common/config/FreemarkerConfig.java
index 4a887e71..4a887e71 100644
--- a/nezha-admin/src/main/java/com/nis/common/config/FreemarkerConfig.java
+++ b/nz-admin/src/main/java/com/nis/common/config/FreemarkerConfig.java
diff --git a/nezha-admin/src/main/java/com/nis/common/config/I18nConfig.java b/nz-admin/src/main/java/com/nis/common/config/I18nConfig.java
index 213a6086..213a6086 100644
--- a/nezha-admin/src/main/java/com/nis/common/config/I18nConfig.java
+++ b/nz-admin/src/main/java/com/nis/common/config/I18nConfig.java
diff --git a/nezha-admin/src/main/java/com/nis/common/config/KaptchaConfig.java b/nz-admin/src/main/java/com/nis/common/config/KaptchaConfig.java
index 6392c6ea..6392c6ea 100644
--- a/nezha-admin/src/main/java/com/nis/common/config/KaptchaConfig.java
+++ b/nz-admin/src/main/java/com/nis/common/config/KaptchaConfig.java
diff --git a/nezha-admin/src/main/java/com/nis/common/config/LocaleConfig.java b/nz-admin/src/main/java/com/nis/common/config/LocaleConfig.java
index f3048e7e..f3048e7e 100644
--- a/nezha-admin/src/main/java/com/nis/common/config/LocaleConfig.java
+++ b/nz-admin/src/main/java/com/nis/common/config/LocaleConfig.java
diff --git a/nezha-admin/src/main/java/com/nis/common/config/MybatisPlusConfig.java b/nz-admin/src/main/java/com/nis/common/config/MybatisPlusConfig.java
index fa8f0a63..fa8f0a63 100644
--- a/nezha-admin/src/main/java/com/nis/common/config/MybatisPlusConfig.java
+++ b/nz-admin/src/main/java/com/nis/common/config/MybatisPlusConfig.java
diff --git a/nezha-admin/src/main/java/com/nis/common/config/ShiroConfig.java b/nz-admin/src/main/java/com/nis/common/config/ShiroConfig.java
index 0e571675..0e571675 100644
--- a/nezha-admin/src/main/java/com/nis/common/config/ShiroConfig.java
+++ b/nz-admin/src/main/java/com/nis/common/config/ShiroConfig.java
diff --git a/nezha-admin/src/main/java/com/nis/common/config/SwaggerConfig.java b/nz-admin/src/main/java/com/nis/common/config/SwaggerConfig.java
index 3a27ced8..3a27ced8 100644
--- a/nezha-admin/src/main/java/com/nis/common/config/SwaggerConfig.java
+++ b/nz-admin/src/main/java/com/nis/common/config/SwaggerConfig.java
diff --git a/nezha-admin/src/main/java/com/nis/common/config/WebConfig.java b/nz-admin/src/main/java/com/nis/common/config/WebConfig.java
index 3d709940..3d709940 100644
--- a/nezha-admin/src/main/java/com/nis/common/config/WebConfig.java
+++ b/nz-admin/src/main/java/com/nis/common/config/WebConfig.java
diff --git a/nezha-admin/src/main/java/com/nis/common/exception/NZExceptionHandler.java b/nz-admin/src/main/java/com/nis/common/exception/NZExceptionHandler.java
index 9bbadfef..9bbadfef 100644
--- a/nezha-admin/src/main/java/com/nis/common/exception/NZExceptionHandler.java
+++ b/nz-admin/src/main/java/com/nis/common/exception/NZExceptionHandler.java
diff --git a/nezha-admin/src/main/java/com/nis/common/utils/ConfigConstant.java b/nz-admin/src/main/java/com/nis/common/utils/ConfigConstant.java
index 4197ae57..4197ae57 100644
--- a/nezha-admin/src/main/java/com/nis/common/utils/ConfigConstant.java
+++ b/nz-admin/src/main/java/com/nis/common/utils/ConfigConstant.java
diff --git a/nezha-admin/src/main/java/com/nis/common/utils/Constant.java b/nz-admin/src/main/java/com/nis/common/utils/Constant.java
index f866aec8..f866aec8 100644
--- a/nezha-admin/src/main/java/com/nis/common/utils/Constant.java
+++ b/nz-admin/src/main/java/com/nis/common/utils/Constant.java
diff --git a/nezha-admin/src/main/java/com/nis/common/utils/Query.java b/nz-admin/src/main/java/com/nis/common/utils/Query.java
index ad53e75e..ad53e75e 100644
--- a/nezha-admin/src/main/java/com/nis/common/utils/Query.java
+++ b/nz-admin/src/main/java/com/nis/common/utils/Query.java
diff --git a/nezha-admin/src/main/java/com/nis/common/utils/RedisKeys.java b/nz-admin/src/main/java/com/nis/common/utils/RedisKeys.java
index dedc8aa5..dedc8aa5 100644
--- a/nezha-admin/src/main/java/com/nis/common/utils/RedisKeys.java
+++ b/nz-admin/src/main/java/com/nis/common/utils/RedisKeys.java
diff --git a/nezha-admin/src/main/java/com/nis/common/validator/group/AliyunGroup.java b/nz-admin/src/main/java/com/nis/common/validator/group/AliyunGroup.java
index 4dc31219..4dc31219 100644
--- a/nezha-admin/src/main/java/com/nis/common/validator/group/AliyunGroup.java
+++ b/nz-admin/src/main/java/com/nis/common/validator/group/AliyunGroup.java
diff --git a/nezha-admin/src/main/java/com/nis/common/validator/group/QcloudGroup.java b/nz-admin/src/main/java/com/nis/common/validator/group/QcloudGroup.java
index aaa7abee..aaa7abee 100644
--- a/nezha-admin/src/main/java/com/nis/common/validator/group/QcloudGroup.java
+++ b/nz-admin/src/main/java/com/nis/common/validator/group/QcloudGroup.java
diff --git a/nezha-admin/src/main/java/com/nis/common/validator/group/QiniuGroup.java b/nz-admin/src/main/java/com/nis/common/validator/group/QiniuGroup.java
index ad3c73f7..ad3c73f7 100644
--- a/nezha-admin/src/main/java/com/nis/common/validator/group/QiniuGroup.java
+++ b/nz-admin/src/main/java/com/nis/common/validator/group/QiniuGroup.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/config/ScheduleConfig.java b/nz-admin/src/main/java/com/nis/modules/job/config/ScheduleConfig.java
index 419e6806..419e6806 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/config/ScheduleConfig.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/config/ScheduleConfig.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobController.java b/nz-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobController.java
index 577dea29..577dea29 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobController.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobController.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobLogController.java b/nz-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobLogController.java
index 6268c895..6268c895 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobLogController.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/controller/ScheduleJobLogController.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobDao.java b/nz-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobDao.java
index 416add27..416add27 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobDao.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobDao.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobLogDao.java b/nz-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobLogDao.java
index 097d584d..097d584d 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobLogDao.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/dao/ScheduleJobLogDao.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobEntity.java b/nz-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobEntity.java
index 801f7e96..801f7e96 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobEntity.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobLogEntity.java b/nz-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobLogEntity.java
index b0829292..b0829292 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobLogEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/entity/ScheduleJobLogEntity.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/service/ScheduleJobLogService.java b/nz-admin/src/main/java/com/nis/modules/job/service/ScheduleJobLogService.java
index 718a08ec..718a08ec 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/service/ScheduleJobLogService.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/service/ScheduleJobLogService.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/service/ScheduleJobService.java b/nz-admin/src/main/java/com/nis/modules/job/service/ScheduleJobService.java
index 0638ecc8..0638ecc8 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/service/ScheduleJobService.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/service/ScheduleJobService.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobLogServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobLogServiceImpl.java
index aa9ed464..aa9ed464 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobLogServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobLogServiceImpl.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobServiceImpl.java
index 1b5d0b45..1b5d0b45 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/service/impl/ScheduleJobServiceImpl.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/task/ITask.java b/nz-admin/src/main/java/com/nis/modules/job/task/ITask.java
index 55115196..55115196 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/task/ITask.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/task/ITask.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/task/TestTask.java b/nz-admin/src/main/java/com/nis/modules/job/task/TestTask.java
index 44235d7b..44235d7b 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/task/TestTask.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/task/TestTask.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/utils/ScheduleJob.java b/nz-admin/src/main/java/com/nis/modules/job/utils/ScheduleJob.java
index bdde5760..bdde5760 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/utils/ScheduleJob.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/utils/ScheduleJob.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/job/utils/ScheduleUtils.java b/nz-admin/src/main/java/com/nis/modules/job/utils/ScheduleUtils.java
index 1cd5dfca..1cd5dfca 100644
--- a/nezha-admin/src/main/java/com/nis/modules/job/utils/ScheduleUtils.java
+++ b/nz-admin/src/main/java/com/nis/modules/job/utils/ScheduleUtils.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/AbstractController.java b/nz-admin/src/main/java/com/nis/modules/sys/controller/AbstractController.java
index 10d8a8b2..10d8a8b2 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/AbstractController.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/controller/AbstractController.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysConfigController.java b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysConfigController.java
index 3cc0d4c4..3cc0d4c4 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysConfigController.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysConfigController.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysDictController.java b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysDictController.java
index 43d3e538..43d3e538 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysDictController.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysDictController.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysI18nController.java b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysI18nController.java
index da44a258..da44a258 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysI18nController.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysI18nController.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysLogController.java b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysLogController.java
index 4ad68ea3..4ad68ea3 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysLogController.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysLogController.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysLoginController.java b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysLoginController.java
index aa9f89a9..cd444588 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysLoginController.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysLoginController.java
@@ -11,13 +11,7 @@ package com.nis.modules.sys.controller;
import com.google.code.kaptcha.Constants;
import com.google.code.kaptcha.Producer;
-import com.nis.modules.sys.entity.SystemInfoEntity;
-import com.nis.modules.sys.entity.UserGroupEntity;
-import com.nis.modules.sys.service.SystemInfoService;
-import com.nis.modules.sys.service.UserGroupService;
import com.nis.modules.sys.shiro.ShiroUtils;
-import com.nis.common.smartvalidate.utils.CommonUtil;
-import com.nis.common.utils.Constant;
import com.nis.common.utils.R;
import com.nis.common.utils.RCode;
@@ -27,7 +21,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.imageio.ImageIO;
@@ -47,10 +40,6 @@ import java.util.Map;
public class SysLoginController extends AbstractController {
@Autowired
private Producer producer;
- @Autowired
- private SystemInfoService systemInfoService;
- @Autowired
- private UserGroupService usergroupService;
@RequestMapping("captcha.jpg")
public void captcha(HttpServletResponse response)throws IOException {
@@ -82,18 +71,7 @@ public class SysLoginController extends AbstractController {
Subject subject = ShiroUtils.getSubject();
UsernamePasswordToken token = new UsernamePasswordToken(username, password);
subject.login(token); //登录
-
- Long userId = getUserId();
- //检查是否有可用的业务系统
- List<SystemInfoEntity> systemInfosByUserId = systemInfoService.querySystemInfosByUserId(userId);
- if (systemInfosByUserId == null || systemInfosByUserId.size() == 0) {
- subject.logout();
- return R.error(RCode.SYS_LOGIN_NOSYSTEM);
- }
- //查出该用户所属的所有用户组
- List<UserGroupEntity> queryByUser = usergroupService.queryByUser(userId);
- getUser().setUsergroups(queryByUser);
- return R.ok(systemInfosByUserId);
+ return R.ok();
}catch (UnknownAccountException e) {
return R.error(RCode.SYS_LOGIN_UNKNOWNACCOUNT);
}catch (IncorrectCredentialsException e) {
@@ -105,46 +83,6 @@ public class SysLoginController extends AbstractController {
}
}
- /**
- * 登录后选择业务系统
- * @param params
- * @param request
- * @return
- */
- @ResponseBody
- @RequestMapping("/setSystem")
- public R setSystem(@RequestParam Map<String, Object> params){
- String s = (String) params.get("systemId");
- Long systemId = null;
- try {
- systemId = Long.valueOf(s);
- if (systemId == null || systemId < 1) {
- return R.error(RCode.SYS_LOGIN_SELECTSYS);
- } else {
- Long userId = getUserId();
- List<SystemInfoEntity> systemInfosByUserId = systemInfoService.querySystemInfosByUserId(userId);
-
- //判断当前用户是否拥有请求来的systemId权限
- boolean flag = false;
- for (SystemInfoEntity systemInfoEntity : systemInfosByUserId) {
- if (systemInfoEntity.getId().longValue() == systemId.longValue()) {
- flag = true;
- //设置为当前system
- getUser().setCurrSystem(systemInfoEntity);
- break;
- }
- }
- if (flag) {
- String lang = CommonUtil.isNull(getUser().getLang()) ? "" : getUser().getLang();
- return R.ok(lang);
- } else {
- return R.error(RCode.SYS_LOGIN_SELECTSYS);
- }
- }
- } catch (NumberFormatException e) {
- return R.error(RCode.SYS_LOGIN_SELECTSYS);
- }
- }
/**
* 退出
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysMenuController.java b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysMenuController.java
index 62130455..62130455 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysMenuController.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysMenuController.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysPageController.java b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysPageController.java
index c0385113..c0385113 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysPageController.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysPageController.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysRoleController.java b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysRoleController.java
index 67d18ad6..67d18ad6 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysRoleController.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysRoleController.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysUserController.java b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysUserController.java
index 6b2aa433..e1dbe37c 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/controller/SysUserController.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/controller/SysUserController.java
@@ -5,9 +5,6 @@ import com.nis.common.utils.PageUtils;
import com.nis.common.utils.R;
import com.nis.common.utils.RCode;
import com.nis.common.validator.Assert;
-import com.nis.common.validator.ValidatorUtils;
-import com.nis.common.validator.group.AddGroup;
-import com.nis.common.validator.group.UpdateGroup;
import org.apache.commons.lang.ArrayUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -20,7 +17,6 @@ import com.nis.common.smartvalidate.ValidateUtils;
import com.nis.modules.sys.entity.SysUserEntity;
import com.nis.modules.sys.service.SysUserRoleService;
import com.nis.modules.sys.service.SysUserService;
-import com.nis.modules.sys.service.UserUsergroupService;
import com.nis.modules.sys.shiro.ShiroUtils;
import io.swagger.annotations.ApiOperation;
@@ -41,8 +37,6 @@ public class SysUserController extends AbstractController {
private SysUserService sysUserService;
@Autowired
private SysUserRoleService sysUserRoleService;
- @Autowired
- private UserUsergroupService userUsergroupService;
/**
* 所有用户列表
@@ -95,10 +89,7 @@ public class SysUserController extends AbstractController {
//获取用户所属的角色列表
List<Long> roleIdList = sysUserRoleService.queryRoleIdList(userId);
- //获取用户所属的用户组列表
- List<Long> usergroupIds = userUsergroupService.queryByUserId(userId);
user.setRoleIdList(roleIdList);
- user.setUsergroupIds(usergroupIds);
return R.ok().put("user", user);
}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysConfigDao.java b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysConfigDao.java
index d3f06626..d3f06626 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysConfigDao.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysConfigDao.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysDictDao.java b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysDictDao.java
index 871d17b6..871d17b6 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysDictDao.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysDictDao.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysI18nDao.java b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysI18nDao.java
index 52081cd5..52081cd5 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysI18nDao.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysI18nDao.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysLogDao.java b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysLogDao.java
index 669f9034..669f9034 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysLogDao.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysLogDao.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysMenuDao.java b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysMenuDao.java
index dc793147..dc793147 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysMenuDao.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysMenuDao.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysRoleDao.java b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysRoleDao.java
index e53ce4c1..e53ce4c1 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysRoleDao.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysRoleDao.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysRoleMenuDao.java b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysRoleMenuDao.java
index c9280cde..c9280cde 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysRoleMenuDao.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysRoleMenuDao.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysUserDao.java b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysUserDao.java
index ef5e26dc..ef5e26dc 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysUserDao.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysUserDao.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysUserRoleDao.java b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysUserRoleDao.java
index 4014bf8a..4014bf8a 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/dao/SysUserRoleDao.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/dao/SysUserRoleDao.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysConfigEntity.java b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysConfigEntity.java
index f61e692d..f61e692d 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysConfigEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysConfigEntity.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysDictEntity.java b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysDictEntity.java
index 25090fd1..25090fd1 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysDictEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysDictEntity.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysI18nEntity.java b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysI18nEntity.java
index 18db9442..18db9442 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysI18nEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysI18nEntity.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysLogEntity.java b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysLogEntity.java
index cb1cbc6d..cb1cbc6d 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysLogEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysLogEntity.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysMenuEntity.java b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysMenuEntity.java
index 220e4484..220e4484 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysMenuEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysMenuEntity.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysRoleEntity.java b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysRoleEntity.java
index abfab3bd..abfab3bd 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysRoleEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysRoleEntity.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysRoleMenuEntity.java b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysRoleMenuEntity.java
index 7a3f0034..7a3f0034 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysRoleMenuEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysRoleMenuEntity.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysUserEntity.java b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysUserEntity.java
index a14d4ead..2121dc82 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysUserEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysUserEntity.java
@@ -1,11 +1,3 @@
-/**
-
- *
-
- *
-
- */
-
package com.nis.modules.sys.entity;
import com.baomidou.mybatisplus.annotation.TableField;
@@ -18,7 +10,6 @@ import lombok.Data;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@@ -86,18 +77,10 @@ public class SysUserEntity implements Serializable {
@TableField(exist=false)
private List<Long> usergroupIds;
- /**
- * 当前系统id
- */
- @TableField(exist=false)
- private SystemInfoEntity currSystem;
/**
* 创建时间
*/
private Date createTime;
-
- @TableField(exist=false)
- private List<UserGroupEntity> usergroups;
}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysUserRoleEntity.java b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysUserRoleEntity.java
index b072f371..b072f371 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SysUserRoleEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/entity/SysUserRoleEntity.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SystemUsergroupEntity.java b/nz-admin/src/main/java/com/nis/modules/sys/entity/SystemUsergroupEntity.java
index 868ea252..868ea252 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/entity/SystemUsergroupEntity.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/entity/SystemUsergroupEntity.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/redis/SysConfigRedis.java b/nz-admin/src/main/java/com/nis/modules/sys/redis/SysConfigRedis.java
index 354f0d62..354f0d62 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/redis/SysConfigRedis.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/redis/SysConfigRedis.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysConfigService.java b/nz-admin/src/main/java/com/nis/modules/sys/service/SysConfigService.java
index 06125115..06125115 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysConfigService.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/SysConfigService.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysDictService.java b/nz-admin/src/main/java/com/nis/modules/sys/service/SysDictService.java
index 7efd75d2..7efd75d2 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysDictService.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/SysDictService.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysI18nService.java b/nz-admin/src/main/java/com/nis/modules/sys/service/SysI18nService.java
index 1f7327b2..1f7327b2 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysI18nService.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/SysI18nService.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysLogService.java b/nz-admin/src/main/java/com/nis/modules/sys/service/SysLogService.java
index 99a08c93..99a08c93 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysLogService.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/SysLogService.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysMenuService.java b/nz-admin/src/main/java/com/nis/modules/sys/service/SysMenuService.java
index 3839a50c..3839a50c 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysMenuService.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/SysMenuService.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysRoleMenuService.java b/nz-admin/src/main/java/com/nis/modules/sys/service/SysRoleMenuService.java
index 4829057f..4829057f 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysRoleMenuService.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/SysRoleMenuService.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysRoleService.java b/nz-admin/src/main/java/com/nis/modules/sys/service/SysRoleService.java
index 2b540ce1..2b540ce1 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysRoleService.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/SysRoleService.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysUserRoleService.java b/nz-admin/src/main/java/com/nis/modules/sys/service/SysUserRoleService.java
index 35a2f662..35a2f662 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysUserRoleService.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/SysUserRoleService.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysUserService.java b/nz-admin/src/main/java/com/nis/modules/sys/service/SysUserService.java
index 990ac5df..990ac5df 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/SysUserService.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/SysUserService.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysConfigServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysConfigServiceImpl.java
index 0da5a5c8..0da5a5c8 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysConfigServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysConfigServiceImpl.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysDictServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysDictServiceImpl.java
index 58836f70..58836f70 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysDictServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysDictServiceImpl.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysI18nServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysI18nServiceImpl.java
index 8cf1ac84..8cf1ac84 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysI18nServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysI18nServiceImpl.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysLogServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysLogServiceImpl.java
index 87741702..87741702 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysLogServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysLogServiceImpl.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysMenuServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysMenuServiceImpl.java
index f11ae50d..f11ae50d 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysMenuServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysMenuServiceImpl.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleMenuServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleMenuServiceImpl.java
index 457a90d8..457a90d8 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleMenuServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleMenuServiceImpl.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleServiceImpl.java
index 4c42050b..4c42050b 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysRoleServiceImpl.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserRoleServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserRoleServiceImpl.java
index 84c6a3cd..84c6a3cd 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserRoleServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserRoleServiceImpl.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserServiceImpl.java b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserServiceImpl.java
index e788aefc..fd88a277 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserServiceImpl.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/service/impl/SysUserServiceImpl.java
@@ -12,15 +12,12 @@ package com.nis.modules.sys.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.nis.common.annotation.DataFilter;
import com.nis.common.utils.Constant;
import com.nis.common.utils.Query;
import com.nis.modules.sys.dao.SysUserDao;
import com.nis.modules.sys.entity.SysUserEntity;
-import com.nis.modules.sys.entity.SystemInfoEntity;
import com.nis.modules.sys.service.SysUserRoleService;
import com.nis.modules.sys.service.SysUserService;
-import com.nis.modules.sys.service.UserUsergroupService;
import com.nis.modules.sys.shiro.ShiroUtils;
import com.nis.common.utils.PageUtils;
@@ -45,8 +42,6 @@ import java.util.Map;
public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> implements SysUserService {
@Autowired
private SysUserRoleService sysUserRoleService;
- @Autowired
- private UserUsergroupService userUsergroupService;
@Override
public List<Long> queryAllMenuId(Long userId) {
@@ -85,8 +80,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
//保存用户与角色关系
sysUserRoleService.saveOrUpdate(user.getUserId(), user.getRoleIdList());
- //保存用户与用户组关系
- userUsergroupService.saveOrUpdate(user.getUserId(), user.getUsergroupIds());
}
@Override
@@ -102,8 +95,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
//保存用户与角色关系
sysUserRoleService.saveOrUpdate(user.getUserId(), user.getRoleIdList());
- //保存用户与用户组关系
- userUsergroupService.saveOrUpdate(user.getUserId(), user.getUsergroupIds());
}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/shiro/ShiroTag.java b/nz-admin/src/main/java/com/nis/modules/sys/shiro/ShiroTag.java
index 6bfe3d43..6bfe3d43 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/shiro/ShiroTag.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/shiro/ShiroTag.java
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/shiro/ShiroUtils.java b/nz-admin/src/main/java/com/nis/modules/sys/shiro/ShiroUtils.java
index 0e39b6ea..f3f6bbaa 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/shiro/ShiroUtils.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/shiro/ShiroUtils.java
@@ -9,7 +9,6 @@
package com.nis.modules.sys.shiro;
import com.nis.common.exception.NZException;
-import com.nis.common.utils.Constant;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.crypto.hash.SimpleHash;
@@ -17,7 +16,6 @@ import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import com.nis.modules.sys.entity.SysUserEntity;
-import com.nis.modules.sys.entity.SystemInfoEntity;
/**
* Shiro工具类
@@ -50,19 +48,6 @@ public class ShiroUtils {
return getUserEntity().getUserId();
}
- public static SystemInfoEntity getCurrSystem() {
- return getUserEntity().getCurrSystem();
- }
-
- public static Long getCurrSystemId() {
- Long currSystemId = getCurrSystem().getId();
- return currSystemId;
- }
-
- public static boolean isGlobal() {
- return getCurrSystemId().longValue() == Constant.GLOBAL_ID;
- }
-
public static void setSessionAttribute(Object key, Object value) {
getSession().setAttribute(key, value);
}
diff --git a/nezha-admin/src/main/java/com/nis/modules/sys/shiro/UserRealm.java b/nz-admin/src/main/java/com/nis/modules/sys/shiro/UserRealm.java
index d849ebfc..d849ebfc 100644
--- a/nezha-admin/src/main/java/com/nis/modules/sys/shiro/UserRealm.java
+++ b/nz-admin/src/main/java/com/nis/modules/sys/shiro/UserRealm.java
diff --git a/nezha-admin/src/main/resources/application-dev.yml b/nz-admin/src/main/resources/application-dev.yml
index be671cf3..be671cf3 100644
--- a/nezha-admin/src/main/resources/application-dev.yml
+++ b/nz-admin/src/main/resources/application-dev.yml
diff --git a/nezha-admin/src/main/resources/application-prod.yml b/nz-admin/src/main/resources/application-prod.yml
index f121219c..f121219c 100644
--- a/nezha-admin/src/main/resources/application-prod.yml
+++ b/nz-admin/src/main/resources/application-prod.yml
diff --git a/nezha-admin/src/main/resources/application-test.yml b/nz-admin/src/main/resources/application-test.yml
index f121219c..f121219c 100644
--- a/nezha-admin/src/main/resources/application-test.yml
+++ b/nz-admin/src/main/resources/application-test.yml
diff --git a/nezha-admin/src/main/resources/application.properties b/nz-admin/src/main/resources/application.properties
index 6b6d23b0..6b6d23b0 100644
--- a/nezha-admin/src/main/resources/application.properties
+++ b/nz-admin/src/main/resources/application.properties
diff --git a/nezha-admin/src/main/resources/application.yml b/nz-admin/src/main/resources/application.yml
index 3940790f..d66150c6 100644
--- a/nezha-admin/src/main/resources/application.yml
+++ b/nz-admin/src/main/resources/application.yml
@@ -6,7 +6,7 @@ server:
min-spare-threads: 30
port: 8080
servlet:
- context-path: /nezha-admin
+ context-path: /nz-admin
spring:
profiles:
diff --git a/nezha-admin/src/main/resources/banner.txt b/nz-admin/src/main/resources/banner.txt
index 73ba9b3c..73ba9b3c 100644
--- a/nezha-admin/src/main/resources/banner.txt
+++ b/nz-admin/src/main/resources/banner.txt
diff --git a/nezha-admin/src/main/resources/logback-spring.xml b/nz-admin/src/main/resources/logback-spring.xml
index e2241985..e2241985 100644
--- a/nezha-admin/src/main/resources/logback-spring.xml
+++ b/nz-admin/src/main/resources/logback-spring.xml
diff --git a/nezha-admin/src/main/resources/mapper/job/ScheduleJobDao.xml b/nz-admin/src/main/resources/mapper/job/ScheduleJobDao.xml
index ab9c39fd..ab9c39fd 100644
--- a/nezha-admin/src/main/resources/mapper/job/ScheduleJobDao.xml
+++ b/nz-admin/src/main/resources/mapper/job/ScheduleJobDao.xml
diff --git a/nezha-admin/src/main/resources/mapper/job/ScheduleJobLogDao.xml b/nz-admin/src/main/resources/mapper/job/ScheduleJobLogDao.xml
index b071c28b..b071c28b 100644
--- a/nezha-admin/src/main/resources/mapper/job/ScheduleJobLogDao.xml
+++ b/nz-admin/src/main/resources/mapper/job/ScheduleJobLogDao.xml
diff --git a/nezha-admin/src/main/resources/mapper/sys/SysConfigDao.xml b/nz-admin/src/main/resources/mapper/sys/SysConfigDao.xml
index ad6945d6..ad6945d6 100644
--- a/nezha-admin/src/main/resources/mapper/sys/SysConfigDao.xml
+++ b/nz-admin/src/main/resources/mapper/sys/SysConfigDao.xml
diff --git a/nezha-admin/src/main/resources/mapper/sys/SysDictDao.xml b/nz-admin/src/main/resources/mapper/sys/SysDictDao.xml
index b6e11d99..b6e11d99 100644
--- a/nezha-admin/src/main/resources/mapper/sys/SysDictDao.xml
+++ b/nz-admin/src/main/resources/mapper/sys/SysDictDao.xml
diff --git a/nezha-admin/src/main/resources/mapper/sys/SysI18nDao.xml b/nz-admin/src/main/resources/mapper/sys/SysI18nDao.xml
index 5b7ae27a..5b7ae27a 100644
--- a/nezha-admin/src/main/resources/mapper/sys/SysI18nDao.xml
+++ b/nz-admin/src/main/resources/mapper/sys/SysI18nDao.xml
diff --git a/nezha-admin/src/main/resources/mapper/sys/SysLogDao.xml b/nz-admin/src/main/resources/mapper/sys/SysLogDao.xml
index 563e1780..563e1780 100644
--- a/nezha-admin/src/main/resources/mapper/sys/SysLogDao.xml
+++ b/nz-admin/src/main/resources/mapper/sys/SysLogDao.xml
diff --git a/nezha-admin/src/main/resources/mapper/sys/SysMenuDao.xml b/nz-admin/src/main/resources/mapper/sys/SysMenuDao.xml
index 3236170d..3236170d 100644
--- a/nezha-admin/src/main/resources/mapper/sys/SysMenuDao.xml
+++ b/nz-admin/src/main/resources/mapper/sys/SysMenuDao.xml
diff --git a/nezha-admin/src/main/resources/mapper/sys/SysRoleDao.xml b/nz-admin/src/main/resources/mapper/sys/SysRoleDao.xml
index 978f77ce..978f77ce 100644
--- a/nezha-admin/src/main/resources/mapper/sys/SysRoleDao.xml
+++ b/nz-admin/src/main/resources/mapper/sys/SysRoleDao.xml
diff --git a/nezha-admin/src/main/resources/mapper/sys/SysRoleMenuDao.xml b/nz-admin/src/main/resources/mapper/sys/SysRoleMenuDao.xml
index 07b06006..07b06006 100644
--- a/nezha-admin/src/main/resources/mapper/sys/SysRoleMenuDao.xml
+++ b/nz-admin/src/main/resources/mapper/sys/SysRoleMenuDao.xml
diff --git a/nezha-admin/src/main/resources/mapper/sys/SysUserDao.xml b/nz-admin/src/main/resources/mapper/sys/SysUserDao.xml
index 4f9cb68d..4f9cb68d 100644
--- a/nezha-admin/src/main/resources/mapper/sys/SysUserDao.xml
+++ b/nz-admin/src/main/resources/mapper/sys/SysUserDao.xml
diff --git a/nezha-admin/src/main/resources/mapper/sys/SysUserRoleDao.xml b/nz-admin/src/main/resources/mapper/sys/SysUserRoleDao.xml
index b18fe02f..b18fe02f 100644
--- a/nezha-admin/src/main/resources/mapper/sys/SysUserRoleDao.xml
+++ b/nz-admin/src/main/resources/mapper/sys/SysUserRoleDao.xml
diff --git a/nezha-admin/src/main/resources/public/favicon.ico b/nz-admin/src/main/resources/public/favicon.ico
index 2bd581ce..2bd581ce 100644
--- a/nezha-admin/src/main/resources/public/favicon.ico
+++ b/nz-admin/src/main/resources/public/favicon.ico
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/css/print.css b/nz-admin/src/main/resources/public/swagger/css/print.css
index f2e84464..f2e84464 100644
--- a/nezha-admin/src/main/resources/public/swagger/css/print.css
+++ b/nz-admin/src/main/resources/public/swagger/css/print.css
diff --git a/nezha-admin/src/main/resources/public/swagger/css/reset.css b/nz-admin/src/main/resources/public/swagger/css/reset.css
index 40dc8301..40dc8301 100644
--- a/nezha-admin/src/main/resources/public/swagger/css/reset.css
+++ b/nz-admin/src/main/resources/public/swagger/css/reset.css
diff --git a/nezha-admin/src/main/resources/public/swagger/css/screen.css b/nz-admin/src/main/resources/public/swagger/css/screen.css
index 1f069f6a..1f069f6a 100644
--- a/nezha-admin/src/main/resources/public/swagger/css/screen.css
+++ b/nz-admin/src/main/resources/public/swagger/css/screen.css
diff --git a/nezha-admin/src/main/resources/public/swagger/css/style.css b/nz-admin/src/main/resources/public/swagger/css/style.css
index 52907e46..52907e46 100644
--- a/nezha-admin/src/main/resources/public/swagger/css/style.css
+++ b/nz-admin/src/main/resources/public/swagger/css/style.css
diff --git a/nezha-admin/src/main/resources/public/swagger/css/typography.css b/nz-admin/src/main/resources/public/swagger/css/typography.css
index e69de29b..e69de29b 100644
--- a/nezha-admin/src/main/resources/public/swagger/css/typography.css
+++ b/nz-admin/src/main/resources/public/swagger/css/typography.css
diff --git a/nezha-admin/src/main/resources/public/swagger/fonts/DroidSans-Bold.ttf b/nz-admin/src/main/resources/public/swagger/fonts/DroidSans-Bold.ttf
index 036c4d13..036c4d13 100644
--- a/nezha-admin/src/main/resources/public/swagger/fonts/DroidSans-Bold.ttf
+++ b/nz-admin/src/main/resources/public/swagger/fonts/DroidSans-Bold.ttf
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/fonts/DroidSans.ttf b/nz-admin/src/main/resources/public/swagger/fonts/DroidSans.ttf
index e517a0c5..e517a0c5 100644
--- a/nezha-admin/src/main/resources/public/swagger/fonts/DroidSans.ttf
+++ b/nz-admin/src/main/resources/public/swagger/fonts/DroidSans.ttf
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/images/collapse.gif b/nz-admin/src/main/resources/public/swagger/images/collapse.gif
index 8843e8ce..8843e8ce 100644
--- a/nezha-admin/src/main/resources/public/swagger/images/collapse.gif
+++ b/nz-admin/src/main/resources/public/swagger/images/collapse.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/images/expand.gif b/nz-admin/src/main/resources/public/swagger/images/expand.gif
index 477bf137..477bf137 100644
--- a/nezha-admin/src/main/resources/public/swagger/images/expand.gif
+++ b/nz-admin/src/main/resources/public/swagger/images/expand.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/images/explorer_icons.png b/nz-admin/src/main/resources/public/swagger/images/explorer_icons.png
index be43b273..be43b273 100644
--- a/nezha-admin/src/main/resources/public/swagger/images/explorer_icons.png
+++ b/nz-admin/src/main/resources/public/swagger/images/explorer_icons.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/images/favicon-16x16.png b/nz-admin/src/main/resources/public/swagger/images/favicon-16x16.png
index 0f7e13b0..0f7e13b0 100644
--- a/nezha-admin/src/main/resources/public/swagger/images/favicon-16x16.png
+++ b/nz-admin/src/main/resources/public/swagger/images/favicon-16x16.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/images/favicon-32x32.png b/nz-admin/src/main/resources/public/swagger/images/favicon-32x32.png
index b0a3352f..b0a3352f 100644
--- a/nezha-admin/src/main/resources/public/swagger/images/favicon-32x32.png
+++ b/nz-admin/src/main/resources/public/swagger/images/favicon-32x32.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/images/favicon.ico b/nz-admin/src/main/resources/public/swagger/images/favicon.ico
index 8b60bcf0..8b60bcf0 100644
--- a/nezha-admin/src/main/resources/public/swagger/images/favicon.ico
+++ b/nz-admin/src/main/resources/public/swagger/images/favicon.ico
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/images/logo_small.png b/nz-admin/src/main/resources/public/swagger/images/logo_small.png
index ce3908e3..ce3908e3 100644
--- a/nezha-admin/src/main/resources/public/swagger/images/logo_small.png
+++ b/nz-admin/src/main/resources/public/swagger/images/logo_small.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/images/pet_store_api.png b/nz-admin/src/main/resources/public/swagger/images/pet_store_api.png
index 1192ad8c..1192ad8c 100644
--- a/nezha-admin/src/main/resources/public/swagger/images/pet_store_api.png
+++ b/nz-admin/src/main/resources/public/swagger/images/pet_store_api.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/images/throbber.gif b/nz-admin/src/main/resources/public/swagger/images/throbber.gif
index 06393889..06393889 100644
--- a/nezha-admin/src/main/resources/public/swagger/images/throbber.gif
+++ b/nz-admin/src/main/resources/public/swagger/images/throbber.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/images/wordnik_api.png b/nz-admin/src/main/resources/public/swagger/images/wordnik_api.png
index dc0ddab1..dc0ddab1 100644
--- a/nezha-admin/src/main/resources/public/swagger/images/wordnik_api.png
+++ b/nz-admin/src/main/resources/public/swagger/images/wordnik_api.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/public/swagger/index.html b/nz-admin/src/main/resources/public/swagger/index.html
index 200e5cf7..200e5cf7 100644
--- a/nezha-admin/src/main/resources/public/swagger/index.html
+++ b/nz-admin/src/main/resources/public/swagger/index.html
diff --git a/nezha-admin/src/main/resources/public/swagger/index.yaml b/nz-admin/src/main/resources/public/swagger/index.yaml
index f29438fd..f29438fd 100644
--- a/nezha-admin/src/main/resources/public/swagger/index.yaml
+++ b/nz-admin/src/main/resources/public/swagger/index.yaml
diff --git a/nezha-admin/src/main/resources/public/swagger/lang/en.js b/nz-admin/src/main/resources/public/swagger/lang/en.js
index 91831366..91831366 100644
--- a/nezha-admin/src/main/resources/public/swagger/lang/en.js
+++ b/nz-admin/src/main/resources/public/swagger/lang/en.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lang/translator.js b/nz-admin/src/main/resources/public/swagger/lang/translator.js
index ffb879f9..ffb879f9 100644
--- a/nezha-admin/src/main/resources/public/swagger/lang/translator.js
+++ b/nz-admin/src/main/resources/public/swagger/lang/translator.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lang/zh-cn.js b/nz-admin/src/main/resources/public/swagger/lang/zh-cn.js
index c7f55b43..c7f55b43 100644
--- a/nezha-admin/src/main/resources/public/swagger/lang/zh-cn.js
+++ b/nz-admin/src/main/resources/public/swagger/lang/zh-cn.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/backbone-min.js b/nz-admin/src/main/resources/public/swagger/lib/backbone-min.js
index 8eff02e9..8eff02e9 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/backbone-min.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/backbone-min.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/es5-shim.js b/nz-admin/src/main/resources/public/swagger/lib/es5-shim.js
index 4c0fcab0..4c0fcab0 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/es5-shim.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/es5-shim.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/handlebars-4.0.5.js b/nz-admin/src/main/resources/public/swagger/lib/handlebars-4.0.5.js
index 57025bc9..57025bc9 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/handlebars-4.0.5.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/handlebars-4.0.5.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack.js b/nz-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack.js
index 7b00c68d..7b00c68d 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack_extended.js b/nz-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack_extended.js
index 162a224d..162a224d 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack_extended.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/highlight.9.1.0.pack_extended.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/jquery-1.8.0.min.js b/nz-admin/src/main/resources/public/swagger/lib/jquery-1.8.0.min.js
index e2e2b7f7..e2e2b7f7 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/jquery-1.8.0.min.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/jquery-1.8.0.min.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/jquery.ba-bbq.min.js b/nz-admin/src/main/resources/public/swagger/lib/jquery.ba-bbq.min.js
index 78d1ff58..78d1ff58 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/jquery.ba-bbq.min.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/jquery.ba-bbq.min.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/jquery.slideto.min.js b/nz-admin/src/main/resources/public/swagger/lib/jquery.slideto.min.js
index b15997b9..b15997b9 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/jquery.slideto.min.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/jquery.slideto.min.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/jquery.wiggle.min.js b/nz-admin/src/main/resources/public/swagger/lib/jquery.wiggle.min.js
index 6b4e261c..6b4e261c 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/jquery.wiggle.min.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/jquery.wiggle.min.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/js-yaml.min.js b/nz-admin/src/main/resources/public/swagger/lib/js-yaml.min.js
index 2514a410..2514a410 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/js-yaml.min.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/js-yaml.min.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/jsoneditor.min.js b/nz-admin/src/main/resources/public/swagger/lib/jsoneditor.min.js
index 21db1ab3..21db1ab3 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/jsoneditor.min.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/jsoneditor.min.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/lodash.min.js b/nz-admin/src/main/resources/public/swagger/lib/lodash.min.js
index 3625da8d..3625da8d 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/lodash.min.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/lodash.min.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/marked.js b/nz-admin/src/main/resources/public/swagger/lib/marked.js
index c334bffe..c334bffe 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/marked.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/marked.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/object-assign-pollyfill.js b/nz-admin/src/main/resources/public/swagger/lib/object-assign-pollyfill.js
index b34d63c8..b34d63c8 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/object-assign-pollyfill.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/object-assign-pollyfill.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/sanitize-html.min.js b/nz-admin/src/main/resources/public/swagger/lib/sanitize-html.min.js
index ade25089..ade25089 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/sanitize-html.min.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/sanitize-html.min.js
diff --git a/nezha-admin/src/main/resources/public/swagger/lib/swagger-oauth.js b/nz-admin/src/main/resources/public/swagger/lib/swagger-oauth.js
index 7160291d..7160291d 100644
--- a/nezha-admin/src/main/resources/public/swagger/lib/swagger-oauth.js
+++ b/nz-admin/src/main/resources/public/swagger/lib/swagger-oauth.js
diff --git a/nezha-admin/src/main/resources/public/swagger/o2c.html b/nz-admin/src/main/resources/public/swagger/o2c.html
index 0cde1d39..0cde1d39 100644
--- a/nezha-admin/src/main/resources/public/swagger/o2c.html
+++ b/nz-admin/src/main/resources/public/swagger/o2c.html
diff --git a/nezha-admin/src/main/resources/public/swagger/swagger-ui.js b/nz-admin/src/main/resources/public/swagger/swagger-ui.js
index 5219d033..5219d033 100644
--- a/nezha-admin/src/main/resources/public/swagger/swagger-ui.js
+++ b/nz-admin/src/main/resources/public/swagger/swagger-ui.js
diff --git a/nezha-admin/src/main/resources/public/swagger/swagger-ui.min.js b/nz-admin/src/main/resources/public/swagger/swagger-ui.min.js
index 678d9d8c..678d9d8c 100644
--- a/nezha-admin/src/main/resources/public/swagger/swagger-ui.min.js
+++ b/nz-admin/src/main/resources/public/swagger/swagger-ui.min.js
diff --git a/nezha-admin/src/main/resources/statics/css/AdminLTE.min.css b/nz-admin/src/main/resources/statics/css/AdminLTE.min.css
index 193bd5d2..193bd5d2 100644
--- a/nezha-admin/src/main/resources/statics/css/AdminLTE.min.css
+++ b/nz-admin/src/main/resources/statics/css/AdminLTE.min.css
diff --git a/nezha-admin/src/main/resources/statics/css/addDetectType.css b/nz-admin/src/main/resources/statics/css/addDetectType.css
index e5967c25..e5967c25 100644
--- a/nezha-admin/src/main/resources/statics/css/addDetectType.css
+++ b/nz-admin/src/main/resources/statics/css/addDetectType.css
diff --git a/nezha-admin/src/main/resources/statics/css/all-skins.min.css b/nz-admin/src/main/resources/statics/css/all-skins.min.css
index e1d2398f..e1d2398f 100644
--- a/nezha-admin/src/main/resources/statics/css/all-skins.min.css
+++ b/nz-admin/src/main/resources/statics/css/all-skins.min.css
diff --git a/nezha-admin/src/main/resources/statics/css/bootstrap-table.min.css b/nz-admin/src/main/resources/statics/css/bootstrap-table.min.css
index e3fffda5..e3fffda5 100644
--- a/nezha-admin/src/main/resources/statics/css/bootstrap-table.min.css
+++ b/nz-admin/src/main/resources/statics/css/bootstrap-table.min.css
diff --git a/nezha-admin/src/main/resources/statics/css/bootstrap.min.css b/nz-admin/src/main/resources/statics/css/bootstrap.min.css
index ed3905e0..ed3905e0 100644
--- a/nezha-admin/src/main/resources/statics/css/bootstrap.min.css
+++ b/nz-admin/src/main/resources/statics/css/bootstrap.min.css
diff --git a/nezha-admin/src/main/resources/statics/css/dashboard.css b/nz-admin/src/main/resources/statics/css/dashboard.css
index f3dbcaa8..f3dbcaa8 100644
--- a/nezha-admin/src/main/resources/statics/css/dashboard.css
+++ b/nz-admin/src/main/resources/statics/css/dashboard.css
diff --git a/nezha-admin/src/main/resources/statics/css/detect.css b/nz-admin/src/main/resources/statics/css/detect.css
index c7edda01..c7edda01 100644
--- a/nezha-admin/src/main/resources/statics/css/detect.css
+++ b/nz-admin/src/main/resources/statics/css/detect.css
diff --git a/nezha-admin/src/main/resources/statics/css/font-awesome.min.css b/nz-admin/src/main/resources/statics/css/font-awesome.min.css
index 1a0c0262..1a0c0262 100644
--- a/nezha-admin/src/main/resources/statics/css/font-awesome.min.css
+++ b/nz-admin/src/main/resources/statics/css/font-awesome.min.css
diff --git a/nezha-admin/src/main/resources/statics/css/index.css b/nz-admin/src/main/resources/statics/css/index.css
index edc593a9..edc593a9 100644
--- a/nezha-admin/src/main/resources/statics/css/index.css
+++ b/nz-admin/src/main/resources/statics/css/index.css
diff --git a/nezha-admin/src/main/resources/statics/css/index1.css b/nz-admin/src/main/resources/statics/css/index1.css
index 918820b9..918820b9 100644
--- a/nezha-admin/src/main/resources/statics/css/index1.css
+++ b/nz-admin/src/main/resources/statics/css/index1.css
diff --git a/nezha-admin/src/main/resources/statics/css/main.css b/nz-admin/src/main/resources/statics/css/main.css
index b8861872..b8861872 100644
--- a/nezha-admin/src/main/resources/statics/css/main.css
+++ b/nz-admin/src/main/resources/statics/css/main.css
diff --git a/nezha-admin/src/main/resources/statics/css/mission.css b/nz-admin/src/main/resources/statics/css/mission.css
index b67d0381..b67d0381 100644
--- a/nezha-admin/src/main/resources/statics/css/mission.css
+++ b/nz-admin/src/main/resources/statics/css/mission.css
diff --git a/nezha-admin/src/main/resources/statics/css/myfont.css b/nz-admin/src/main/resources/statics/css/myfont.css
index 16fb703a..16fb703a 100644
--- a/nezha-admin/src/main/resources/statics/css/myfont.css
+++ b/nz-admin/src/main/resources/statics/css/myfont.css
diff --git a/nezha-admin/src/main/resources/statics/css/nodeRel.css b/nz-admin/src/main/resources/statics/css/nodeRel.css
index accfd522..accfd522 100644
--- a/nezha-admin/src/main/resources/statics/css/nodeRel.css
+++ b/nz-admin/src/main/resources/statics/css/nodeRel.css
diff --git a/nezha-admin/src/main/resources/statics/css/nodeRoom.css b/nz-admin/src/main/resources/statics/css/nodeRoom.css
index 15377a12..15377a12 100644
--- a/nezha-admin/src/main/resources/statics/css/nodeRoom.css
+++ b/nz-admin/src/main/resources/statics/css/nodeRoom.css
diff --git a/nezha-admin/src/main/resources/statics/css/nzNodeSelector.css b/nz-admin/src/main/resources/statics/css/nzNodeSelector.css
index 08722862..08722862 100644
--- a/nezha-admin/src/main/resources/statics/css/nzNodeSelector.css
+++ b/nz-admin/src/main/resources/statics/css/nzNodeSelector.css
diff --git a/nezha-admin/src/main/resources/statics/fonts/FontAwesome.otf b/nz-admin/src/main/resources/statics/fonts/FontAwesome.otf
index 401ec0f3..401ec0f3 100644
--- a/nezha-admin/src/main/resources/statics/fonts/FontAwesome.otf
+++ b/nz-admin/src/main/resources/statics/fonts/FontAwesome.otf
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.eot b/nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.eot
index e9f60ca9..e9f60ca9 100644
--- a/nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.eot
+++ b/nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.eot
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.svg b/nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.svg
index 36df4118..36df4118 100644
--- a/nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.svg
+++ b/nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.svg
diff --git a/nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.ttf b/nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.ttf
index 35acda2f..35acda2f 100644
--- a/nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.ttf
+++ b/nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.ttf
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff b/nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff
index 400014a4..400014a4 100644
--- a/nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff
+++ b/nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff2 b/nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff2
index 4d13fc60..4d13fc60 100644
--- a/nezha-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff2
+++ b/nz-admin/src/main/resources/statics/fonts/fontawesome-webfont.woff2
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.eot b/nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.eot
index b93a4953..b93a4953 100644
--- a/nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.eot
+++ b/nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.eot
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.svg b/nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.svg
index 94fb5490..94fb5490 100644
--- a/nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.svg
+++ b/nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.svg
diff --git a/nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.ttf b/nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.ttf
index 1413fc60..1413fc60 100644
--- a/nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.ttf
+++ b/nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.ttf
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff b/nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff
index 9e612858..9e612858 100644
--- a/nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff
+++ b/nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff2 b/nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff2
index 64539b54..64539b54 100644
--- a/nezha-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff2
+++ b/nz-admin/src/main/resources/statics/fonts/glyphicons-halflings-regular.woff2
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/fonts/myfont/fonts.svg b/nz-admin/src/main/resources/statics/fonts/myfont/fonts.svg
index 544af3a8..544af3a8 100644
--- a/nezha-admin/src/main/resources/statics/fonts/myfont/fonts.svg
+++ b/nz-admin/src/main/resources/statics/fonts/myfont/fonts.svg
diff --git a/nezha-admin/src/main/resources/statics/fonts/myfont/fonts.ttf b/nz-admin/src/main/resources/statics/fonts/myfont/fonts.ttf
index 5af99170..5af99170 100644
--- a/nezha-admin/src/main/resources/statics/fonts/myfont/fonts.ttf
+++ b/nz-admin/src/main/resources/statics/fonts/myfont/fonts.ttf
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/fonts/myfont/fonts.woff b/nz-admin/src/main/resources/statics/fonts/myfont/fonts.woff
index b194957c..b194957c 100644
--- a/nezha-admin/src/main/resources/statics/fonts/myfont/fonts.woff
+++ b/nz-admin/src/main/resources/statics/fonts/myfont/fonts.woff
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/images/chart-active.png b/nz-admin/src/main/resources/statics/images/chart-active.png
index ac0bdd0e..ac0bdd0e 100644
--- a/nezha-admin/src/main/resources/statics/images/chart-active.png
+++ b/nz-admin/src/main/resources/statics/images/chart-active.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/images/chart.png b/nz-admin/src/main/resources/statics/images/chart.png
index 1bfbc390..1bfbc390 100644
--- a/nezha-admin/src/main/resources/statics/images/chart.png
+++ b/nz-admin/src/main/resources/statics/images/chart.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/images/query-active.png b/nz-admin/src/main/resources/statics/images/query-active.png
index cbeb1fa5..cbeb1fa5 100644
--- a/nezha-admin/src/main/resources/statics/images/query-active.png
+++ b/nz-admin/src/main/resources/statics/images/query-active.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/images/query.png b/nz-admin/src/main/resources/statics/images/query.png
index 705e9b05..705e9b05 100644
--- a/nezha-admin/src/main/resources/statics/images/query.png
+++ b/nz-admin/src/main/resources/statics/images/query.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/images/set-active.png b/nz-admin/src/main/resources/statics/images/set-active.png
index 6e90fb80..6e90fb80 100644
--- a/nezha-admin/src/main/resources/statics/images/set-active.png
+++ b/nz-admin/src/main/resources/statics/images/set-active.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/images/set.png b/nz-admin/src/main/resources/statics/images/set.png
index 89d4d193..89d4d193 100644
--- a/nezha-admin/src/main/resources/statics/images/set.png
+++ b/nz-admin/src/main/resources/statics/images/set.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/js/common.js b/nz-admin/src/main/resources/statics/js/common.js
index 6ec5125e..6ec5125e 100644
--- a/nezha-admin/src/main/resources/statics/js/common.js
+++ b/nz-admin/src/main/resources/statics/js/common.js
diff --git a/nezha-admin/src/main/resources/statics/js/index1.js b/nz-admin/src/main/resources/statics/js/index1.js
index cd3fcb6b..cd3fcb6b 100644
--- a/nezha-admin/src/main/resources/statics/js/index1.js
+++ b/nz-admin/src/main/resources/statics/js/index1.js
diff --git a/nezha-admin/src/main/resources/statics/js/modules/job/schedule.js b/nz-admin/src/main/resources/statics/js/modules/job/schedule.js
index 09615ad6..09615ad6 100644
--- a/nezha-admin/src/main/resources/statics/js/modules/job/schedule.js
+++ b/nz-admin/src/main/resources/statics/js/modules/job/schedule.js
diff --git a/nezha-admin/src/main/resources/statics/js/modules/job/schedule_log.js b/nz-admin/src/main/resources/statics/js/modules/job/schedule_log.js
index 86b06dd7..86b06dd7 100644
--- a/nezha-admin/src/main/resources/statics/js/modules/job/schedule_log.js
+++ b/nz-admin/src/main/resources/statics/js/modules/job/schedule_log.js
diff --git a/nezha-admin/src/main/resources/statics/js/modules/sys/config.js b/nz-admin/src/main/resources/statics/js/modules/sys/config.js
index 459e141a..459e141a 100644
--- a/nezha-admin/src/main/resources/statics/js/modules/sys/config.js
+++ b/nz-admin/src/main/resources/statics/js/modules/sys/config.js
diff --git a/nezha-admin/src/main/resources/statics/js/modules/sys/dict.js b/nz-admin/src/main/resources/statics/js/modules/sys/dict.js
index 662de35f..662de35f 100644
--- a/nezha-admin/src/main/resources/statics/js/modules/sys/dict.js
+++ b/nz-admin/src/main/resources/statics/js/modules/sys/dict.js
diff --git a/nezha-admin/src/main/resources/statics/js/modules/sys/log.js b/nz-admin/src/main/resources/statics/js/modules/sys/log.js
index 0d10bb2d..0d10bb2d 100644
--- a/nezha-admin/src/main/resources/statics/js/modules/sys/log.js
+++ b/nz-admin/src/main/resources/statics/js/modules/sys/log.js
diff --git a/nezha-admin/src/main/resources/statics/js/modules/sys/menu.js b/nz-admin/src/main/resources/statics/js/modules/sys/menu.js
index 8e731ac3..8e731ac3 100644
--- a/nezha-admin/src/main/resources/statics/js/modules/sys/menu.js
+++ b/nz-admin/src/main/resources/statics/js/modules/sys/menu.js
diff --git a/nezha-admin/src/main/resources/statics/js/modules/sys/role.js b/nz-admin/src/main/resources/statics/js/modules/sys/role.js
index 8f1832c4..8f1832c4 100644
--- a/nezha-admin/src/main/resources/statics/js/modules/sys/role.js
+++ b/nz-admin/src/main/resources/statics/js/modules/sys/role.js
diff --git a/nezha-admin/src/main/resources/statics/js/modules/sys/system.js b/nz-admin/src/main/resources/statics/js/modules/sys/system.js
index 2e307233..2e307233 100644
--- a/nezha-admin/src/main/resources/statics/js/modules/sys/system.js
+++ b/nz-admin/src/main/resources/statics/js/modules/sys/system.js
diff --git a/nezha-admin/src/main/resources/statics/js/modules/sys/user.js b/nz-admin/src/main/resources/statics/js/modules/sys/user.js
index 4cbba366..4cbba366 100644
--- a/nezha-admin/src/main/resources/statics/js/modules/sys/user.js
+++ b/nz-admin/src/main/resources/statics/js/modules/sys/user.js
diff --git a/nezha-admin/src/main/resources/statics/js/modules/sys/usergroup.js b/nz-admin/src/main/resources/statics/js/modules/sys/usergroup.js
index 5ca7abdd..5ca7abdd 100644
--- a/nezha-admin/src/main/resources/statics/js/modules/sys/usergroup.js
+++ b/nz-admin/src/main/resources/statics/js/modules/sys/usergroup.js
diff --git a/nezha-admin/src/main/resources/statics/js/navtab.js b/nz-admin/src/main/resources/statics/js/navtab.js
index 4258b347..4258b347 100644
--- a/nezha-admin/src/main/resources/statics/js/navtab.js
+++ b/nz-admin/src/main/resources/statics/js/navtab.js
diff --git a/nezha-admin/src/main/resources/statics/libs/ajaxupload.js b/nz-admin/src/main/resources/statics/libs/ajaxupload.js
index 7e51768b..7e51768b 100644
--- a/nezha-admin/src/main/resources/statics/libs/ajaxupload.js
+++ b/nz-admin/src/main/resources/statics/libs/ajaxupload.js
diff --git a/nezha-admin/src/main/resources/statics/libs/app.js b/nz-admin/src/main/resources/statics/libs/app.js
index 2a1cdedb..2a1cdedb 100644
--- a/nezha-admin/src/main/resources/statics/libs/app.js
+++ b/nz-admin/src/main/resources/statics/libs/app.js
diff --git a/nezha-admin/src/main/resources/statics/libs/app.min.js b/nz-admin/src/main/resources/statics/libs/app.min.js
index 4851def3..4851def3 100644
--- a/nezha-admin/src/main/resources/statics/libs/app.min.js
+++ b/nz-admin/src/main/resources/statics/libs/app.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/axios.min.js b/nz-admin/src/main/resources/statics/libs/axios.min.js
index 933a8c2c..933a8c2c 100644
--- a/nezha-admin/src/main/resources/statics/libs/axios.min.js
+++ b/nz-admin/src/main/resources/statics/libs/axios.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/bootstrap-table.min.js b/nz-admin/src/main/resources/statics/libs/bootstrap-table.min.js
index d15db75b..d15db75b 100644
--- a/nezha-admin/src/main/resources/statics/libs/bootstrap-table.min.js
+++ b/nz-admin/src/main/resources/statics/libs/bootstrap-table.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/bootstrap.min.js b/nz-admin/src/main/resources/statics/libs/bootstrap.min.js
index 9bcd2fcc..9bcd2fcc 100644
--- a/nezha-admin/src/main/resources/statics/libs/bootstrap.min.js
+++ b/nz-admin/src/main/resources/statics/libs/bootstrap.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/fastclick.min.js b/nz-admin/src/main/resources/statics/libs/fastclick.min.js
index 131e29e4..131e29e4 100644
--- a/nezha-admin/src/main/resources/statics/libs/fastclick.min.js
+++ b/nz-admin/src/main/resources/statics/libs/fastclick.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/jquery.min.js b/nz-admin/src/main/resources/statics/libs/jquery.min.js
index 4024b662..4024b662 100644
--- a/nezha-admin/src/main/resources/statics/libs/jquery.min.js
+++ b/nz-admin/src/main/resources/statics/libs/jquery.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/jquery.slimscroll.min.js b/nz-admin/src/main/resources/statics/libs/jquery.slimscroll.min.js
index 298aa1cd..298aa1cd 100644
--- a/nezha-admin/src/main/resources/statics/libs/jquery.slimscroll.min.js
+++ b/nz-admin/src/main/resources/statics/libs/jquery.slimscroll.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/lodash.min.js b/nz-admin/src/main/resources/statics/libs/lodash.min.js
index 018b6a76..018b6a76 100644
--- a/nezha-admin/src/main/resources/statics/libs/lodash.min.js
+++ b/nz-admin/src/main/resources/statics/libs/lodash.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/router.js b/nz-admin/src/main/resources/statics/libs/router.js
index 57ff6efa..57ff6efa 100644
--- a/nezha-admin/src/main/resources/statics/libs/router.js
+++ b/nz-admin/src/main/resources/statics/libs/router.js
diff --git a/nezha-admin/src/main/resources/statics/libs/validator.js b/nz-admin/src/main/resources/statics/libs/validator.js
index c5967c35..c5967c35 100644
--- a/nezha-admin/src/main/resources/statics/libs/validator.js
+++ b/nz-admin/src/main/resources/statics/libs/validator.js
diff --git a/nezha-admin/src/main/resources/statics/libs/validators.min.js b/nz-admin/src/main/resources/statics/libs/validators.min.js
index 6126dbb6..6126dbb6 100644
--- a/nezha-admin/src/main/resources/statics/libs/validators.min.js
+++ b/nz-admin/src/main/resources/statics/libs/validators.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/vue-easytable.css b/nz-admin/src/main/resources/statics/libs/vue-easytable.css
index 16ec535f..16ec535f 100644
--- a/nezha-admin/src/main/resources/statics/libs/vue-easytable.css
+++ b/nz-admin/src/main/resources/statics/libs/vue-easytable.css
diff --git a/nezha-admin/src/main/resources/statics/libs/vue-easytable.js b/nz-admin/src/main/resources/statics/libs/vue-easytable.js
index a106a3c0..a106a3c0 100644
--- a/nezha-admin/src/main/resources/statics/libs/vue-easytable.js
+++ b/nz-admin/src/main/resources/statics/libs/vue-easytable.js
diff --git a/nezha-admin/src/main/resources/statics/libs/vue-multiselect.min.css b/nz-admin/src/main/resources/statics/libs/vue-multiselect.min.css
index f9c50c56..f9c50c56 100644
--- a/nezha-admin/src/main/resources/statics/libs/vue-multiselect.min.css
+++ b/nz-admin/src/main/resources/statics/libs/vue-multiselect.min.css
diff --git a/nezha-admin/src/main/resources/statics/libs/vue-multiselect.min.js b/nz-admin/src/main/resources/statics/libs/vue-multiselect.min.js
index 90e4a609..90e4a609 100644
--- a/nezha-admin/src/main/resources/statics/libs/vue-multiselect.min.js
+++ b/nz-admin/src/main/resources/statics/libs/vue-multiselect.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/vue-validator.min.js b/nz-admin/src/main/resources/statics/libs/vue-validator.min.js
index 8252b4f4..8252b4f4 100644
--- a/nezha-admin/src/main/resources/statics/libs/vue-validator.min.js
+++ b/nz-admin/src/main/resources/statics/libs/vue-validator.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/vue.js b/nz-admin/src/main/resources/statics/libs/vue.js
index 4ef7ff1b..4ef7ff1b 100644
--- a/nezha-admin/src/main/resources/statics/libs/vue.js
+++ b/nz-admin/src/main/resources/statics/libs/vue.js
diff --git a/nezha-admin/src/main/resources/statics/libs/vue.min.js b/nz-admin/src/main/resources/statics/libs/vue.min.js
index d079a741..d079a741 100644
--- a/nezha-admin/src/main/resources/statics/libs/vue.min.js
+++ b/nz-admin/src/main/resources/statics/libs/vue.min.js
diff --git a/nezha-admin/src/main/resources/statics/libs/vue.upper.js b/nz-admin/src/main/resources/statics/libs/vue.upper.js
index 4ef7ff1b..4ef7ff1b 100644
--- a/nezha-admin/src/main/resources/statics/libs/vue.upper.js
+++ b/nz-admin/src/main/resources/statics/libs/vue.upper.js
diff --git a/nezha-admin/src/main/resources/statics/libs/vuelidate.min.js b/nz-admin/src/main/resources/statics/libs/vuelidate.min.js
index a620db24..a620db24 100644
--- a/nezha-admin/src/main/resources/statics/libs/vuelidate.min.js
+++ b/nz-admin/src/main/resources/statics/libs/vuelidate.min.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/WdatePicker.js b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/WdatePicker.js
index aceaeb91..aceaeb91 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/WdatePicker.js
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/WdatePicker.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/calendar.js b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/calendar.js
index 34654583..34654583 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/calendar.js
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/calendar.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-cn.js b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-cn.js
index 89af0551..89af0551 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-cn.js
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-cn.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-tw.js b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-tw.js
index 6e2e6ed3..6e2e6ed3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-tw.js
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/lang/zh-tw.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/readme.txt b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/readme.txt
index b3f76116..b3f76116 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/readme.txt
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/readme.txt
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/default/datepicker.css b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/default/datepicker.css
index 03beece7..03beece7 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/default/datepicker.css
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/default/datepicker.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/twoer/datepicker.css b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/twoer/datepicker.css
index 05e73184..05e73184 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/twoer/datepicker.css
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/twoer/datepicker.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/whyGreen/datepicker.css b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/whyGreen/datepicker.css
index 208e733c..208e733c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/whyGreen/datepicker.css
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/develop/skin/whyGreen/datepicker.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/css/base.css b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/css/base.css
index 6267c3ae..6267c3ae 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/css/base.css
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/css/base.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo.htm
index 0b60b650..0b60b650 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/index.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/index.htm
index 78f8b863..78f8b863 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/index.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/index.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.1.asp.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.1.asp.htm
index 4ca0c693..4ca0c693 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.1.asp.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.1.asp.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.2.asp.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.2.asp.htm
index f4df0c4f..f4df0c4f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.2.asp.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.2.asp.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.3.asp.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.3.asp.htm
index b5e71e7a..b5e71e7a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.3.asp.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.3.asp.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.4.asp.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.4.asp.htm
index dfbfbb0d..dfbfbb0d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.4.asp.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.4.asp.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp-.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp-.htm
index 1397e1df..1397e1df 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp-.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp-.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp.htm
index 1397e1df..1397e1df 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.5.asp.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.6.asp.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.6.asp.htm
index adf9a8b1..adf9a8b1 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.6.asp.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/2.6.asp.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/3.asp.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/3.asp.htm
index 1abde53c..1abde53c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/3.asp.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/3.asp.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp-.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp-.htm
index de570c0c..de570c0c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp-.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp-.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp.htm
index de570c0c..de570c0c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/999.asp.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo.css b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo.css
index 3e94f73c..3e94f73c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo.css
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe.htm
index bc25181b..bc25181b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe2.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe2.htm
index 55187788..55187788 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe2.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/demo_iframe2.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/left.htm b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/left.htm
index 5d0737c3..5d0737c3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/left.htm
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/left.htm
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/main.asp b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/main.asp
index 60d79ca0..60d79ca0 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/main.asp
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/main.asp
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic1.jpg b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic1.jpg
index 53b61136..53b61136 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic1.jpg
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic1.jpg
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic2.jpg b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic2.jpg
index dac6df55..dac6df55 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic2.jpg
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic2.jpg
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic3.jpg b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic3.jpg
index 0ed03492..0ed03492 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic3.jpg
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/demo/resource/pic3.jpg
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-body.gif b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-body.gif
index 634e86eb..634e86eb 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-body.gif
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-body.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-bottom.gif b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-bottom.gif
index 5f9eb3dd..5f9eb3dd 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-bottom.gif
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-bottom.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-top.gif b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-top.gif
index cf3fb242..cf3fb242 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-top.gif
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/block/block-top.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/body.jpg b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/body.jpg
index a47fda83..a47fda83 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/body.jpg
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/body.jpg
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/footer.jpg b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/footer.jpg
index b4b04658..b4b04658 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/footer.jpg
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/docs/images/footer.jpg
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/lang/en.js b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/lang/en.js
index 31598854..31598854 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/lang/en.js
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/lang/en.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-cn.js b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-cn.js
index 70e5e4f3..70e5e4f3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-cn.js
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-cn.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-tw.js b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-tw.js
index b92e0eec..b92e0eec 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-tw.js
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/lang/zh-tw.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/WdatePicker.css b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/WdatePicker.css
index f9121da7..f9121da7 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/WdatePicker.css
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/WdatePicker.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/datePicker.gif b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/datePicker.gif
index 94843165..94843165 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/datePicker.gif
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/datePicker.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/datepicker.css b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/datepicker.css
index 29d5432f..29d5432f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/datepicker.css
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/datepicker.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/img.gif b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/img.gif
index 053205d8..053205d8 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/img.gif
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/default/img.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/datepicker.css b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/datepicker.css
index dbb7d434..dbb7d434 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/datepicker.css
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/datepicker.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.gif b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.gif
index da838ce8..da838ce8 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.gif
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.png b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.png
index 99960d8d..99960d8d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.png
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/twoer/img.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/bg.jpg b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/bg.jpg
index 75516a63..75516a63 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/bg.jpg
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/bg.jpg
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/datepicker.css b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/datepicker.css
index f8426f5d..f8426f5d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/datepicker.css
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/datepicker.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/img.gif b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/img.gif
index 4003f20f..4003f20f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/img.gif
+++ b/nz-admin/src/main/resources/statics/plugins/My97DatePicker/skin/whyGreen/img.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.css b/nz-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.css
index 49ecfc48..49ecfc48 100644
--- a/nezha-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.css
+++ b/nz-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.js b/nz-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.js
index d12bf970..d12bf970 100644
--- a/nezha-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.js
+++ b/nz-admin/src/main/resources/statics/plugins/daterangepicker/daterangepicker.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/daterangepicker/moment.min.js b/nz-admin/src/main/resources/statics/plugins/daterangepicker/moment.min.js
index 580a6a2d..580a6a2d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/daterangepicker/moment.min.js
+++ b/nz-admin/src/main/resources/statics/plugins/daterangepicker/moment.min.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/echarts/echarts.min.js b/nz-admin/src/main/resources/statics/plugins/echarts/echarts.min.js
index 2eb94985..2eb94985 100644
--- a/nezha-admin/src/main/resources/statics/plugins/echarts/echarts.min.js
+++ b/nz-admin/src/main/resources/statics/plugins/echarts/echarts.min.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ar.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ar.js
index 8eeccd78..8eeccd78 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ar.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ar.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-bg.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-bg.js
index f2a79c6a..f2a79c6a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-bg.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-bg.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ca.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ca.js
index 70b7269a..70b7269a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ca.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ca.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-cs.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-cs.js
index 136e64f3..136e64f3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-cs.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-cs.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-de.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-de.js
index e6939167..e6939167 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-de.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-de.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-dk.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-dk.js
index 7d8b174c..7d8b174c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-dk.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-dk.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-el.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-el.js
index cc526b1e..cc526b1e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-el.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-el.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-en.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-en.js
index 869d6fa6..869d6fa6 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-en.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-en.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-es.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-es.js
index 5d1a774e..5d1a774e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-es.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-es.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fa.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fa.js
index 7a5e7013..7a5e7013 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fa.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fa.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fi.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fi.js
index 3d9c54ae..3d9c54ae 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fi.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fi.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fr.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fr.js
index d188f44e..d188f44e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fr.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-fr.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-gl.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-gl.js
index a4354746..a4354746 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-gl.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-gl.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-he.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-he.js
index 368c8dda..368c8dda 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-he.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-he.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hr.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hr.js
index 909df4a0..909df4a0 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hr.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hr.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hu.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hu.js
index 2f7910c7..2f7910c7 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hu.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-hu.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-id.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-id.js
index 122056ab..122056ab 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-id.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-id.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-is.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-is.js
index 9a25f8ac..9a25f8ac 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-is.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-is.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-it.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-it.js
index 0d0a32d3..0d0a32d3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-it.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-it.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ja.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ja.js
index df5de8a5..df5de8a5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ja.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ja.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-kr.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-kr.js
index f8970b37..f8970b37 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-kr.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-kr.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-lt.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-lt.js
index b7a344ff..b7a344ff 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-lt.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-lt.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-me.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-me.js
index d9a79977..d9a79977 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-me.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-me.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-nl.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-nl.js
index c693f0e6..c693f0e6 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-nl.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-nl.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-no.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-no.js
index 6cf674cd..6cf674cd 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-no.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-no.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pl.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pl.js
index 953ac7de..953ac7de 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pl.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pl.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt-br.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt-br.js
index ce18d817..ce18d817 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt-br.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt-br.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt.js
index 146be531..146be531 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-pt.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ro.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ro.js
index cb82ef47..cb82ef47 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ro.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ro.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ru.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ru.js
index 35395f92..35395f92 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ru.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ru.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sk.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sk.js
index 0d176304..0d176304 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sk.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sk.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sq.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sq.js
index 10822511..10822511 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sq.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sq.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr-latin.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr-latin.js
index 263e3ef5..263e3ef5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr-latin.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr-latin.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr.js
index a2a21730..a2a21730 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sr.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sv.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sv.js
index 9a30db73..9a30db73 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sv.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-sv.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-th.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-th.js
index b73b81ac..b73b81ac 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-th.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-th.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tr.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tr.js
index 40e8b511..40e8b511 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tr.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tr.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tw.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tw.js
index 28dfc4ab..28dfc4ab 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tw.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-tw.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ua.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ua.js
index 1ac2054b..1ac2054b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ua.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-ua.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-uk.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-uk.js
index 71f1e9b3..71f1e9b3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-uk.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-uk.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-vi.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-vi.js
index ec7d5ab2..ec7d5ab2 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-vi.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-vi.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-zh.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-zh.js
index 890102e5..890102e5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-zh.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/i18n/grid.locale-zh.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/jquery.jqGrid.min.js b/nz-admin/src/main/resources/statics/plugins/jqgrid/jquery.jqGrid.min.js
index f477b165..f477b165 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/jquery.jqGrid.min.js
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/jquery.jqGrid.min.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap-ui.css b/nz-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap-ui.css
index 412da654..412da654 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap-ui.css
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap-ui.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap.css b/nz-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap.css
index 1bbea83d..1bbea83d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap.css
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid-bootstrap.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid.css b/nz-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid.css
index 40eac3d4..40eac3d4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid.css
+++ b/nz-admin/src/main/resources/statics/plugins/jqgrid/ui.jqgrid.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.css b/nz-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.css
index e85fe8c9..e85fe8c9 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.css
+++ b/nz-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.js b/nz-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.js
index 193e9155..193e9155 100644
--- a/nezha-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.js
+++ b/nz-admin/src/main/resources/statics/plugins/jquery-gridster/jquery-gridster.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layer/layer.js b/nz-admin/src/main/resources/statics/plugins/layer/layer.js
index 383a36c3..383a36c3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layer/layer.js
+++ b/nz-admin/src/main/resources/statics/plugins/layer/layer.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layer/mobile/layer.js b/nz-admin/src/main/resources/statics/plugins/layer/mobile/layer.js
index f9cf6931..f9cf6931 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layer/mobile/layer.js
+++ b/nz-admin/src/main/resources/statics/plugins/layer/mobile/layer.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layer/mobile/need/layer.css b/nz-admin/src/main/resources/statics/plugins/layer/mobile/need/layer.css
index b9dbf201..b9dbf201 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layer/mobile/need/layer.css
+++ b/nz-admin/src/main/resources/statics/plugins/layer/mobile/need/layer.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/icon-ext.png b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/icon-ext.png
index bbbb669b..bbbb669b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/icon-ext.png
+++ b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/icon-ext.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/icon.png b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/icon.png
index 3e17da8b..3e17da8b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/icon.png
+++ b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/icon.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/layer.css b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/layer.css
index b88c0c7c..b88c0c7c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/layer.css
+++ b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/layer.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/loading-0.gif b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/loading-0.gif
index 6f3c9539..6f3c9539 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/loading-0.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/loading-0.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/loading-1.gif b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/loading-1.gif
index db3a483e..db3a483e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/loading-1.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/loading-1.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/loading-2.gif b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/loading-2.gif
index 5bb90fd6..5bb90fd6 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layer/skin/default/loading-2.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layer/skin/default/loading-2.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layer/skin/moon/default.png b/nz-admin/src/main/resources/statics/plugins/layer/skin/moon/default.png
index 77dfaf30..77dfaf30 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layer/skin/moon/default.png
+++ b/nz-admin/src/main/resources/statics/plugins/layer/skin/moon/default.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layer/skin/moon/style.css b/nz-admin/src/main/resources/statics/plugins/layer/skin/moon/style.css
index 027dd1e0..027dd1e0 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layer/skin/moon/style.css
+++ b/nz-admin/src/main/resources/statics/plugins/layer/skin/moon/style.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/layui.css b/nz-admin/src/main/resources/statics/plugins/layui/css/layui.css
index 756e8ae0..756e8ae0 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/layui.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/layui.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/code.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/code.css
index dc68ed32..dc68ed32 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/code.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/code.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/_all.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/_all.css
index e9d0ceb9..e9d0ceb9 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/_all.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/_all.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.css
index 71cbca97..71cbca97 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.png
index f4277aa4..f4277aa4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/aero.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
index a9a74945..a9a74945 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.css
index 56a78302..56a78302 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.png
index 4b6ef982..4b6ef982 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/blue.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
index d52da057..d52da057 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.css
index 0f39690b..0f39690b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.png
index 15af826e..15af826e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/flat.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
index e70e438c..e70e438c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.css
index b80e04d5..b80e04d5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.png
index 6b303fbe..6b303fbe 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/green.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
index 92b4411d..92b4411d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.css
index 96e62e83..96e62e83 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.png
index c6e2873e..c6e2873e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/grey.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
index 0b47b1c6..0b47b1c6 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.css
index f9c873ff..f9c873ff 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.png
index ec2532eb..ec2532eb 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/orange.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
index 9350b506..9350b506 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.css
index 179f980d..179f980d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.png
index 3e65d9dd..3e65d9dd 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/pink.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
index 281ba06b..281ba06b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.css
index dfedafc2..dfedafc2 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.png
index 3699fd58..3699fd58 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/purple.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
index 7f4be74a..7f4be74a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.css
index 83ec91e9..83ec91e9 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.png
index 0d5ac381..0d5ac381 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/red.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
index 38590d98..38590d98 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.css
index 7bb60393..7bb60393 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.png
index 909dadc5..909dadc5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/yellow.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
index 9fd5d733..9fd5d733 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/flat/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.css
index a34a7548..a34a7548 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.png
index 50d62b5d..50d62b5d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/futurico.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/[email protected]
index f7eb45aa..f7eb45aa 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/futurico/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/icheck.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/icheck.css
index 6439b742..6439b742 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/icheck.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/icheck.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/_all.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/_all.css
index 8a20ed2c..8a20ed2c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/_all.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/_all.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/aero.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/aero.css
index 82272230..82272230 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/aero.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/aero.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/blue.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/blue.css
index b3f98196..b3f98196 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/blue.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/blue.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/green.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/green.css
index 82b42631..82b42631 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/green.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/green.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/grey.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/grey.css
index 96a5d261..96a5d261 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/grey.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/grey.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.css
index a24398ae..a24398ae 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.png
index d21d7a7b..d21d7a7b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/line.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/[email protected]
index 62900a2d..62900a2d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/orange.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/orange.css
index 5f051b40..5f051b40 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/orange.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/orange.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/pink.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/pink.css
index b98bbc3d..b98bbc3d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/pink.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/pink.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/purple.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/purple.css
index 61f4a2f9..61f4a2f9 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/purple.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/purple.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/red.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/red.css
index d86c946b..d86c946b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/red.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/red.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/yellow.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/yellow.css
index b34148a6..b34148a6 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/yellow.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/line/yellow.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/_all.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/_all.css
index 8cf8aca9..8cf8aca9 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/_all.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/_all.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.css
index 0a7a9453..0a7a9453 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.png
index dccf7740..dccf7740 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/aero.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
index 5537ee36..5537ee36 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.css
index c2900975..c2900975 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.png
index af04cee5..af04cee5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/blue.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
index f19210a9..f19210a9 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.css
index aa685f36..aa685f36 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.png
index 9171ebc7..9171ebc7 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/green.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
index 7f18f96a..7f18f96a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.css
index f2426977..f2426977 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.png
index 22dcdbcf..22dcdbcf 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/grey.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
index 85e82ddd..85e82ddd 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.css
index c2c6620f..c2c6620f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.png
index 943be16f..943be16f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/minimal.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
index d62291da..d62291da 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.css
index ba1b9c34..ba1b9c34 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.png
index f2a31497..f2a31497 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/orange.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
index 68c83591..68c83591 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.css
index 77c57418..77c57418 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.png
index 660553c0..660553c0 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/pink.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
index 7d7b3851..7d7b3851 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.css
index d509f043..d509f043 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.png
index 48dec794..48dec794 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/purple.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
index 3bb70417..3bb70417 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.css
index 2280e5b0..2280e5b0 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.png
index 4443f809..4443f809 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/red.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
index 2eb55a65..2eb55a65 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.css
index 730bb4c4..730bb4c4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.png
index 0999b7ec..0999b7ec 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/yellow.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
index c16f2b7d..c16f2b7d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/minimal/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.css
index 2a4d519c..2a4d519c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.png
index 60c14e6a..60c14e6a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/polaris.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/[email protected]
index c75b8269..c75b8269 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/polaris/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/_all.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/_all.css
index 90c3a69e..90c3a69e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/_all.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/_all.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.css
index e31b3abb..e31b3abb 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.png
index 1a332e6c..1a332e6c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/aero.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
index 07c5a022..07c5a022 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.css
index f8db2ab6..f8db2ab6 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.png
index a3e040fc..a3e040fc 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/blue.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
index 8fdea12f..8fdea12f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.css
index 23f149bd..23f149bd 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.png
index 465824e7..465824e7 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/green.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
index 784e8747..784e8747 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.css
index 909db1ab..909db1ab 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.png
index f6937585..f6937585 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/grey.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
index 5d6341c0..5d6341c0 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.css
index c6e5892d..c6e5892d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.png
index 84608500..84608500 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/orange.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
index b1f23197..b1f23197 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.css
index bdab9c79..bdab9c79 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.png
index 9c8b4e2b..9c8b4e2b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/pink.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
index b1f3a6ed..b1f3a6ed 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.css
index 4c291b41..4c291b41 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.png
index 6bfc16a3..6bfc16a3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/purple.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
index 6d3c8b1a..6d3c8b1a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.css
index 7341bc62..7341bc62 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.png
index 749675a9..749675a9 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/red.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
index c05700a5..c05700a5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.css
index fb628f91..fb628f91 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.png
index 2a3c8811..2a3c8811 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/square.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
index 9b56c448..9b56c448 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.css
index 23b11231..23b11231 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.png
index b6c03309..b6c03309 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/yellow.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected] b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
index 6b8e328e..6b8e328e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/icheck/square/[email protected]
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/icon.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/icon.png
index 5a50673e..5a50673e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/icon.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/icon.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/laydate.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/laydate.css
index ee1c73a4..ee1c73a4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/laydate.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/laydate/laydate.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon-ext.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon-ext.png
index bbbb669b..bbbb669b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon-ext.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon-ext.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon.png b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon.png
index 3e17da8b..3e17da8b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon.png
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/icon.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/layer.css b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/layer.css
index 8d7a01c9..8d7a01c9 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/layer.css
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/layer.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-0.gif b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-0.gif
index 6f3c9539..6f3c9539 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-0.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-0.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-1.gif b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-1.gif
index db3a483e..db3a483e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-1.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-1.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-2.gif b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-2.gif
index 5bb90fd6..5bb90fd6 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-2.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/css/modules/layer/default/loading-2.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.eot b/nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.eot
index 6bb5c27b..6bb5c27b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.eot
+++ b/nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.eot
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.svg b/nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.svg
index bac1b54f..bac1b54f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.svg
+++ b/nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.svg
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.ttf b/nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.ttf
index e06a767d..e06a767d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.ttf
+++ b/nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.ttf
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.woff b/nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.woff
index 39970131..39970131 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/font/iconfont.woff
+++ b/nz-admin/src/main/resources/statics/plugins/layui/font/iconfont.woff
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/0.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/0.gif
index a63f0d52..a63f0d52 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/0.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/0.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/1.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/1.gif
index b2b78b21..b2b78b21 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/1.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/1.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/10.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/10.gif
index 556c7e32..556c7e32 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/10.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/10.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/11.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/11.gif
index 2bfc58be..2bfc58be 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/11.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/11.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/12.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/12.gif
index 1c321c7e..1c321c7e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/12.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/12.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/13.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/13.gif
index 300bbc2a..300bbc2a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/13.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/13.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/14.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/14.gif
index 43b6d0a4..43b6d0a4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/14.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/14.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/15.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/15.gif
index c9f25fa1..c9f25fa1 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/15.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/15.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/16.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/16.gif
index 34f28e4c..34f28e4c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/16.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/16.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/17.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/17.gif
index 39cd0353..39cd0353 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/17.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/17.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/18.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/18.gif
index 7bce2997..7bce2997 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/18.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/18.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/19.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/19.gif
index adac542f..adac542f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/19.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/19.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/2.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/2.gif
index 7edbb58a..7edbb58a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/2.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/2.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/20.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/20.gif
index 50631a6e..50631a6e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/20.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/20.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/21.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/21.gif
index b9842128..b9842128 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/21.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/21.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/22.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/22.gif
index 1f0bd8b0..1f0bd8b0 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/22.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/22.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/23.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/23.gif
index e05e0f97..e05e0f97 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/23.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/23.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/24.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/24.gif
index f35928a2..f35928a2 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/24.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/24.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/25.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/25.gif
index 0b4a8832..0b4a8832 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/25.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/25.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/26.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/26.gif
index 45c4fb55..45c4fb55 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/26.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/26.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/27.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/27.gif
index 7a4c0131..7a4c0131 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/27.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/27.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/28.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/28.gif
index fc5a0cfa..fc5a0cfa 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/28.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/28.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/29.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/29.gif
index 5dd7442b..5dd7442b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/29.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/29.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/3.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/3.gif
index 86df67b7..86df67b7 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/3.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/3.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/30.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/30.gif
index b751f98a..b751f98a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/30.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/30.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/31.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/31.gif
index c9476d79..c9476d79 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/31.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/31.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/32.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/32.gif
index 9931b063..9931b063 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/32.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/32.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/33.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/33.gif
index 59111a38..59111a38 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/33.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/33.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/34.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/34.gif
index a334548e..a334548e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/34.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/34.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/35.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/35.gif
index a9322643..a9322643 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/35.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/35.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/36.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/36.gif
index 6de432ae..6de432ae 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/36.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/36.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/37.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/37.gif
index d05f2da4..d05f2da4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/37.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/37.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/38.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/38.gif
index 8b1c88a3..8b1c88a3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/38.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/38.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/39.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/39.gif
index 38b84a51..38b84a51 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/39.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/39.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/4.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/4.gif
index d52200c5..d52200c5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/4.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/4.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/40.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/40.gif
index ae429912..ae429912 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/40.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/40.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/41.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/41.gif
index b9c715c5..b9c715c5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/41.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/41.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/42.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/42.gif
index 0eb1434b..0eb1434b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/42.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/42.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/43.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/43.gif
index ac0b7008..ac0b7008 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/43.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/43.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/44.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/44.gif
index ad444976..ad444976 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/44.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/44.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/45.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/45.gif
index 6837fcaf..6837fcaf 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/45.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/45.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/46.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/46.gif
index d62916d4..d62916d4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/46.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/46.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/47.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/47.gif
index 58a08361..58a08361 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/47.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/47.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/48.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/48.gif
index 7ffd1613..7ffd1613 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/48.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/48.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/49.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/49.gif
index 959b9929..959b9929 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/49.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/49.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/5.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/5.gif
index 4e8b09f1..4e8b09f1 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/5.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/5.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/50.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/50.gif
index 6e22e7ff..6e22e7ff 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/50.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/50.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/51.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/51.gif
index ad3f4d3a..ad3f4d3a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/51.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/51.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/52.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/52.gif
index 39f8a228..39f8a228 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/52.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/52.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/53.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/53.gif
index a181ee77..a181ee77 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/53.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/53.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/54.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/54.gif
index e289d929..e289d929 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/54.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/54.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/55.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/55.gif
index 4351083a..4351083a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/55.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/55.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/56.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/56.gif
index e0eff222..e0eff222 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/56.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/56.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/57.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/57.gif
index 0bf130f0..0bf130f0 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/57.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/57.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/58.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/58.gif
index 0f065087..0f065087 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/58.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/58.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/59.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/59.gif
index 7081e4f0..7081e4f0 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/59.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/59.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/6.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/6.gif
index f7715bf5..f7715bf5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/6.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/6.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/60.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/60.gif
index 6e15f89d..6e15f89d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/60.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/60.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/61.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/61.gif
index f092d7e3..f092d7e3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/61.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/61.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/62.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/62.gif
index 7fe49840..7fe49840 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/62.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/62.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/63.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/63.gif
index cf8e23e5..cf8e23e5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/63.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/63.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/64.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/64.gif
index a7797198..a7797198 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/64.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/64.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/65.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/65.gif
index 7bb98f2d..7bb98f2d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/65.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/65.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/66.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/66.gif
index bb6d0775..bb6d0775 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/66.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/66.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/67.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/67.gif
index 6e33f7c4..6e33f7c4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/67.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/67.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/68.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/68.gif
index 1a6c400d..1a6c400d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/68.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/68.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/69.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/69.gif
index a02f0b22..a02f0b22 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/69.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/69.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/7.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/7.gif
index e6d4db80..e6d4db80 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/7.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/7.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/70.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/70.gif
index 416c5c14..416c5c14 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/70.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/70.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/71.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/71.gif
index c17d60cb..c17d60cb 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/71.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/71.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/8.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/8.gif
index 66f967b4..66f967b4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/8.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/8.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/9.gif b/nz-admin/src/main/resources/statics/plugins/layui/images/face/9.gif
index 60447400..60447400 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/images/face/9.gif
+++ b/nz-admin/src/main/resources/statics/plugins/layui/images/face/9.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.all.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.all.js
index 50ff57c5..50ff57c5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.all.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.all.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.mod.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.mod.js
index 82d38077..82d38077 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.mod.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/dest/layui.mod.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/lib/jquery.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/lib/jquery.js
index 916f01c6..916f01c6 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/lib/jquery.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/lib/jquery.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/code.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/code.js
index 01c66858..01c66858 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/code.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/code.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/element.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/element.js
index 7bc9fa0d..7bc9fa0d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/element.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/element.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/flow.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/flow.js
index 6f7c0ea1..6f7c0ea1 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/flow.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/flow.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/form.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/form.js
index 7a3087b1..7a3087b1 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/form.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/form.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/laydate.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/laydate.js
index f9099ba6..f9099ba6 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/laydate.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/laydate.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/layedit.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/layedit.js
index f4f6a482..f4f6a482 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/layedit.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/layedit.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/layer.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/layer.js
index 57f0b1d6..57f0b1d6 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/layer.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/layer.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/laypage.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/laypage.js
index d77821a8..d77821a8 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/laypage.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/laypage.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/laytpl.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/laytpl.js
index c0713ad2..c0713ad2 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/laytpl.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/laytpl.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/tree.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/tree.js
index 16b87f49..16b87f49 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/tree.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/tree.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/upload.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/upload.js
index 4866470d..4866470d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/upload.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/upload.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/util.js b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/util.js
index 52ea60ad..52ea60ad 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/lay/modules/util.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/lay/modules/util.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/layui.js b/nz-admin/src/main/resources/statics/plugins/layui/layui.js
index 8abe294c..8abe294c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/layui.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/layui.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/modules/icheck.js b/nz-admin/src/main/resources/statics/plugins/layui/modules/icheck.js
index b3f8e772..b3f8e772 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/modules/icheck.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/modules/icheck.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/layui/modules/pjax.js b/nz-admin/src/main/resources/statics/plugins/layui/modules/pjax.js
index 9f01d99f..9f01d99f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/layui/modules/pjax.js
+++ b/nz-admin/src/main/resources/statics/plugins/layui/modules/pjax.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.css b/nz-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.css
index df63da55..df63da55 100644
--- a/nezha-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.css
+++ b/nz-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.js b/nz-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.js
index bb07f091..bb07f091 100644
--- a/nezha-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.js
+++ b/nz-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.png b/nz-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.png
index f9172bbb..f9172bbb 100644
--- a/nezha-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.png
+++ b/nz-admin/src/main/resources/statics/plugins/minicolors/jquery.minicolors.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/pagination/pagination.css b/nz-admin/src/main/resources/statics/plugins/pagination/pagination.css
index 4e67d9dc..4e67d9dc 100644
--- a/nezha-admin/src/main/resources/statics/plugins/pagination/pagination.css
+++ b/nz-admin/src/main/resources/statics/plugins/pagination/pagination.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/pagination/pagination.js b/nz-admin/src/main/resources/statics/plugins/pagination/pagination.js
index 69993a36..69993a36 100644
--- a/nezha-admin/src/main/resources/statics/plugins/pagination/pagination.js
+++ b/nz-admin/src/main/resources/statics/plugins/pagination/pagination.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.css b/nz-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.css
index b4863922..b4863922 100644
--- a/nezha-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.css
+++ b/nz-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.js b/nz-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.js
index 41e5c92d..41e5c92d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.js
+++ b/nz-admin/src/main/resources/statics/plugins/perfect-scrollbar/perfect-scrollbar.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.css b/nz-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.css
index db24e2a4..db24e2a4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.css
+++ b/nz-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.js b/nz-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.js
index 1381dc11..1381dc11 100644
--- a/nezha-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.js
+++ b/nz-admin/src/main/resources/statics/plugins/switch/bootstrap-switch.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/treegrid/img/collapse.png b/nz-admin/src/main/resources/statics/plugins/treegrid/img/collapse.png
index 76577a57..76577a57 100644
--- a/nezha-admin/src/main/resources/statics/plugins/treegrid/img/collapse.png
+++ b/nz-admin/src/main/resources/statics/plugins/treegrid/img/collapse.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/treegrid/img/expand.png b/nz-admin/src/main/resources/statics/plugins/treegrid/img/expand.png
index cfb42a45..cfb42a45 100644
--- a/nezha-admin/src/main/resources/statics/plugins/treegrid/img/expand.png
+++ b/nz-admin/src/main/resources/statics/plugins/treegrid/img/expand.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/treegrid/img/file.png b/nz-admin/src/main/resources/statics/plugins/treegrid/img/file.png
index 813f712f..813f712f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/treegrid/img/file.png
+++ b/nz-admin/src/main/resources/statics/plugins/treegrid/img/file.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/treegrid/img/folder.png b/nz-admin/src/main/resources/statics/plugins/treegrid/img/folder.png
index 784e8fa4..784e8fa4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/treegrid/img/folder.png
+++ b/nz-admin/src/main/resources/statics/plugins/treegrid/img/folder.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js b/nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js
index ac4a8352..ac4a8352 100644
--- a/nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js
+++ b/nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.css b/nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.css
index 2487166b..2487166b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.css
+++ b/nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.extension.js b/nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.extension.js
index 6d248e5d..6d248e5d 100644
--- a/nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.extension.js
+++ b/nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.extension.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.min.js b/nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.min.js
index 7b7566f3..7b7566f3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.min.js
+++ b/nz-admin/src/main/resources/statics/plugins/treegrid/jquery.treegrid.min.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/treegrid/tree.table.js b/nz-admin/src/main/resources/statics/plugins/treegrid/tree.table.js
index a8db09f9..a8db09f9 100644
--- a/nezha-admin/src/main/resources/statics/plugins/treegrid/tree.table.js
+++ b/nz-admin/src/main/resources/statics/plugins/treegrid/tree.table.js
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.css b/nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.css
index c1fcf3a2..c1fcf3a2 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.css
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.less b/nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.less
index b282d81b..b282d81b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.less
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/awesome.less
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/fa.less b/nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/fa.less
index 3f95a066..3f95a066 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/fa.less
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/fa.less
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/img/loading.gif b/nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/img/loading.gif
index e8c28929..e8c28929 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/img/loading.gif
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/awesomeStyle/img/loading.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/line_conn.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/line_conn.png
index b211da2f..b211da2f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/line_conn.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/line_conn.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/loading.gif b/nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/loading.gif
index e8c28929..e8c28929 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/loading.gif
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/loading.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.gif b/nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.gif
index 664b969a..664b969a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.gif
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.png
index e9e58a3a..e9e58a3a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/img/metro.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/metroStyle.css b/nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/metroStyle.css
index af81f423..af81f423 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/metroStyle.css
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/metroStyle/metroStyle.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_close.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_close.png
index 68ccb3c3..68ccb3c3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_close.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_close.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_open.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_open.png
index d6ff36d3..d6ff36d3 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_open.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/1_open.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/2.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/2.png
index 9eff506b..9eff506b 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/2.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/2.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/3.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/3.png
index d7ba6d0c..d7ba6d0c 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/3.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/3.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/4.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/4.png
index 753e2bfd..753e2bfd 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/4.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/4.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/5.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/5.png
index 0c5eccd5..0c5eccd5 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/5.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/5.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/6.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/6.png
index 070b8352..070b8352 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/6.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/6.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/7.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/7.png
index 532b037f..532b037f 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/7.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/7.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/8.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/8.png
index a8f3a86e..a8f3a86e 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/8.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/8.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/9.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/9.png
index 4db73cd4..4db73cd4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/9.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/diy/9.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/line_conn.gif b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/line_conn.gif
index d561d36a..d561d36a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/line_conn.gif
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/line_conn.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/loading.gif b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/loading.gif
index e8c28929..e8c28929 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/loading.gif
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/loading.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.gif b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.gif
index 50c94fd4..50c94fd4 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.gif
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.gif
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.png b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.png
index ffda01ef..ffda01ef 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.png
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/img/zTreeStandard.png
Binary files differ
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/zTreeStyle.css b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/zTreeStyle.css
index 4a1705b1..4a1705b1 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/zTreeStyle.css
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/css/zTreeStyle/zTreeStyle.css
diff --git a/nezha-admin/src/main/resources/statics/plugins/ztree/jquery.ztree.all.min.js b/nz-admin/src/main/resources/statics/plugins/ztree/jquery.ztree.all.min.js
index 8be21e7a..8be21e7a 100644
--- a/nezha-admin/src/main/resources/statics/plugins/ztree/jquery.ztree.all.min.js
+++ b/nz-admin/src/main/resources/statics/plugins/ztree/jquery.ztree.all.min.js
diff --git a/nezha-admin/src/main/resources/templates/404.html b/nz-admin/src/main/resources/templates/404.html
index ec465d5f..ec465d5f 100644
--- a/nezha-admin/src/main/resources/templates/404.html
+++ b/nz-admin/src/main/resources/templates/404.html
diff --git a/nezha-admin/src/main/resources/templates/header.html b/nz-admin/src/main/resources/templates/header.html
index 21269235..21269235 100644
--- a/nezha-admin/src/main/resources/templates/header.html
+++ b/nz-admin/src/main/resources/templates/header.html
diff --git a/nezha-admin/src/main/resources/templates/index.html b/nz-admin/src/main/resources/templates/index.html
index f50a4051..cc57e8fe 100644
--- a/nezha-admin/src/main/resources/templates/index.html
+++ b/nz-admin/src/main/resources/templates/index.html
@@ -51,13 +51,6 @@
<div class="banner-dropdown-item" @click="changeLang(lang.value)" v-show="changeLangShow" v-for="lang in langList">{{lang.name}}</div>
</div>
</li>
- <li>
- <a class="navbar-nav_system" href="javascript:;" @click="toChangeSystem"><i class="fa fa-exchange"></i> &nbsp;{{currSystem.name}}</a>
- <!-- 选择业务系统 -->
- <div class="banner-dropdown-items">
- <div class="banner-dropdown-item" @click="changeSystem(system.id)" v-show="changeSystemShow" v-for="system in systems" :title="system.name">{{system.name}}</div>
- </div>
- </li>
<li><a href="javascript:;" @click="logout"><i class="fa fa-sign-out"></i> &nbsp;<@spring.message "sys.logout"/></a></li>
</ul>
</div>
diff --git a/nezha-admin/src/main/resources/templates/index1.html b/nz-admin/src/main/resources/templates/index1.html
index 0cbeef51..0cbeef51 100644
--- a/nezha-admin/src/main/resources/templates/index1.html
+++ b/nz-admin/src/main/resources/templates/index1.html
diff --git a/nezha-admin/src/main/resources/templates/js/index.js b/nz-admin/src/main/resources/templates/js/index.js
index ab7dd6a0..3c433745 100644
--- a/nezha-admin/src/main/resources/templates/js/index.js
+++ b/nz-admin/src/main/resources/templates/js/index.js
@@ -42,15 +42,11 @@ var vm = new Vue({
data:{
user:{},
menuList:{},
- currSystem: {}, //当前业务系统
- systems:{}, //用户可切换的业务系统列表
main:"main.html",
password:'',
newPassword:'',
navTitle:"控制台",
- changeSystemShow: false, //是否显示业务系统列表
changeLangShow: false, //是否显示语言列表
- systemBoxWidth: null, //业务系统列表dom的宽度
langList: [],
currLang: {}
},
@@ -65,16 +61,6 @@ var vm = new Vue({
vm.user = r.user;
});
},
- getCurrSystem: function() {
- $.getJSON("system/detail", function(r){
- vm.currSystem = r.data;
- });
- },
- getSystems: function() {
- $.getJSON("system/listByUser?_"+$.now(), function(r){
- vm.systems = r.data;
- });
- },
updatePassword: function(){
layer.open({
type: 1,
@@ -105,28 +91,14 @@ var vm = new Vue({
}
});
},
- toChangeSystem: function(event) {
- vm.changeSystemShow = !(vm.changeSystemShow);
- vm.changeLangShow = false;
- },
toChangeLang: function() {
vm.changeLangShow = !(vm.changeLangShow);
- vm.changeSystemShow = false;
},
getLangList: function(event) { //查字典获取语言种类
$.getJSON("sys/i18n/getLangList2", function(r){
vm.langList = r.data;
});
},
- changeSystem: function(systemId) {
- $.getJSON("system/changeSystem?id=" + systemId, function(r){
- if (r.code == '200') {
- location.reload();
- } else {
- alert(r.msg);
- }
- });
- },
changeLang: function(lang) {
location.href = "?_lang=" + lang;
},
@@ -155,8 +127,6 @@ var vm = new Vue({
created: function(){
this.getMenuList();
this.getUser();
- this.getSystems();
- this.getCurrSystem();
this.getLangList();
this.getCurrLang();
},
diff --git a/nezha-admin/src/main/resources/templates/js/modules/sys/i18n.js b/nz-admin/src/main/resources/templates/js/modules/sys/i18n.js
index b8c2bb5a..b8c2bb5a 100644
--- a/nezha-admin/src/main/resources/templates/js/modules/sys/i18n.js
+++ b/nz-admin/src/main/resources/templates/js/modules/sys/i18n.js
diff --git a/nezha-admin/src/main/resources/templates/js/modules/sys/icon.js b/nz-admin/src/main/resources/templates/js/modules/sys/icon.js
index 3b79db06..3b79db06 100644
--- a/nezha-admin/src/main/resources/templates/js/modules/sys/icon.js
+++ b/nz-admin/src/main/resources/templates/js/modules/sys/icon.js
diff --git a/nezha-admin/src/main/resources/templates/js/modules/sys/menu.js b/nz-admin/src/main/resources/templates/js/modules/sys/menu.js
index 8dcf8719..8dcf8719 100644
--- a/nezha-admin/src/main/resources/templates/js/modules/sys/menu.js
+++ b/nz-admin/src/main/resources/templates/js/modules/sys/menu.js
diff --git a/nezha-admin/src/main/resources/templates/js/modules/sys/user.js b/nz-admin/src/main/resources/templates/js/modules/sys/user.js
index 540c7621..7ff82f70 100644
--- a/nezha-admin/src/main/resources/templates/js/modules/sys/user.js
+++ b/nz-admin/src/main/resources/templates/js/modules/sys/user.js
@@ -99,13 +99,11 @@ var vm = new Vue({
deptId:null,
deptName:null,
roleIdList:[],
- usergroupIds: [],
username: '',
userId: null,
password: '',
email: ''
- },
- usergroups: []
+ }
},
validations: function() { //定义校验规则
var valid = {
@@ -220,11 +218,6 @@ var vm = new Vue({
vm.roleList = r.list;
});
},
- getAllUsergroups: function(id) {
- $.get(baseURL + "sys/usergroup/list?limit=999", function(r){
- vm.usergroups = r.data.list;
- });
- },
reload: function () {
vm.showList = true;
var page = $("#jqGrid").jqGrid('getGridParam','page');
@@ -237,9 +230,6 @@ var vm = new Vue({
vm.$v.user.$touch(); //提交时,不论是否已触发校验,都触发一下($dirty=false -> true)
return !vm.$v.user.$error;
}
- },
- created: function() {
- this.getAllUsergroups();
}
});
</script> \ No newline at end of file
diff --git a/nezha-admin/src/main/resources/templates/login.html b/nz-admin/src/main/resources/templates/login.html
index 717d2608..a2f450bd 100644
--- a/nezha-admin/src/main/resources/templates/login.html
+++ b/nz-admin/src/main/resources/templates/login.html
@@ -74,24 +74,6 @@
</div>
<!-- /.login-box-body -->
- <div class="login-box-body" v-show="!showLogin">
- <p class="login-box-msg">System</p>
- <div class="form-group has-feedback">
- <multiselect v-model="selectedSystem" :options="systems" label="name" placeholder="..." :show-labels="false"></multiselect>
- </div>
- <div class="row">
- <div class="col-xs-2">
- </div>
- <div class="col-xs-4">
- <button type="button" class="btn btn-primary btn-block btn-flat" @click="selectSys"><i class="fa fa-check"></i></button>
- </div>
- <div class="col-xs-4">
- <button type="button" class="btn btn-warning btn-block btn-flat" @click="cancelSelect"><i class="fa fa-reply"></i></button>
- </div>
- <div class="col-xs-2">
- </div>
- </div>
- </div>
</div>
<!-- /.login-box -->
@@ -123,9 +105,7 @@ var vm = new Vue({
error: false,
errorMsg: '',
src: 'captcha.jpg',
- showLogin: true,
- systems: [],
- selectedSystem: null
+ showLogin: true
},
validations: {
username: {
@@ -175,11 +155,8 @@ var vm = new Vue({
data: data,
dataType: "json",
success: function(result){
- if(result.code == 200){//登录成功,选择业务系统
- vm.systems = result.data;
- vm.errorMsg = "";
- vm.error = false;
- vm.showLogin = false;
+ if(result.code == 200){//登录成功
+ location.href = 'index.html';
}else{
vm.error = true;
vm.errorMsg = result.msg;
@@ -188,34 +165,6 @@ var vm = new Vue({
}
}
});
- },
- selectSys: function() {
- if (!vm.selectedSystem||!vm.selectedSystem.id) {
- layer.alert("请选择业务系统");
- } else {
- $.ajax({
- type: "GET",
- url: "setSystem?systemId=" + vm.selectedSystem.id,
- dataType: "json",
- success: function(result){
- if (result.code == 200) {
- var param = "";
- if (result.msg) {
- var param = "?_lang=" + result.msg;
- }
- location.href = 'index.html' + param;
- } else {
- layer.alert(result.msg);
- }
- }
- });
- }
- },
- cancelSelect: function() {
- $.get("logout");
- //vm.refreshCode();
- //vm.captcha = "";
- vm.showLogin = true;
}
}
});
diff --git a/nezha-admin/src/main/resources/templates/main.html b/nz-admin/src/main/resources/templates/main.html
index 53d40516..53d40516 100644
--- a/nezha-admin/src/main/resources/templates/main.html
+++ b/nz-admin/src/main/resources/templates/main.html
diff --git a/nezha-admin/src/main/resources/templates/modules/job/schedule.html b/nz-admin/src/main/resources/templates/modules/job/schedule.html
index 8d88de11..8d88de11 100644
--- a/nezha-admin/src/main/resources/templates/modules/job/schedule.html
+++ b/nz-admin/src/main/resources/templates/modules/job/schedule.html
diff --git a/nezha-admin/src/main/resources/templates/modules/job/schedule_log.html b/nz-admin/src/main/resources/templates/modules/job/schedule_log.html
index b1f12523..b1f12523 100644
--- a/nezha-admin/src/main/resources/templates/modules/job/schedule_log.html
+++ b/nz-admin/src/main/resources/templates/modules/job/schedule_log.html
diff --git a/nezha-admin/src/main/resources/templates/modules/sys/config.html b/nz-admin/src/main/resources/templates/modules/sys/config.html
index d5c0fcbb..d5c0fcbb 100644
--- a/nezha-admin/src/main/resources/templates/modules/sys/config.html
+++ b/nz-admin/src/main/resources/templates/modules/sys/config.html
diff --git a/nezha-admin/src/main/resources/templates/modules/sys/dict.html b/nz-admin/src/main/resources/templates/modules/sys/dict.html
index e5501657..e5501657 100644
--- a/nezha-admin/src/main/resources/templates/modules/sys/dict.html
+++ b/nz-admin/src/main/resources/templates/modules/sys/dict.html
diff --git a/nezha-admin/src/main/resources/templates/modules/sys/i18n.html b/nz-admin/src/main/resources/templates/modules/sys/i18n.html
index 2341e7a3..2341e7a3 100644
--- a/nezha-admin/src/main/resources/templates/modules/sys/i18n.html
+++ b/nz-admin/src/main/resources/templates/modules/sys/i18n.html
diff --git a/nezha-admin/src/main/resources/templates/modules/sys/icons.html b/nz-admin/src/main/resources/templates/modules/sys/icons.html
index 5047f75f..5047f75f 100644
--- a/nezha-admin/src/main/resources/templates/modules/sys/icons.html
+++ b/nz-admin/src/main/resources/templates/modules/sys/icons.html
diff --git a/nezha-admin/src/main/resources/templates/modules/sys/log.html b/nz-admin/src/main/resources/templates/modules/sys/log.html
index 9d27d824..9d27d824 100644
--- a/nezha-admin/src/main/resources/templates/modules/sys/log.html
+++ b/nz-admin/src/main/resources/templates/modules/sys/log.html
diff --git a/nezha-admin/src/main/resources/templates/modules/sys/menu.html b/nz-admin/src/main/resources/templates/modules/sys/menu.html
index dbe8c416..dbe8c416 100644
--- a/nezha-admin/src/main/resources/templates/modules/sys/menu.html
+++ b/nz-admin/src/main/resources/templates/modules/sys/menu.html
diff --git a/nezha-admin/src/main/resources/templates/modules/sys/role.html b/nz-admin/src/main/resources/templates/modules/sys/role.html
index 4a16944a..4a16944a 100644
--- a/nezha-admin/src/main/resources/templates/modules/sys/role.html
+++ b/nz-admin/src/main/resources/templates/modules/sys/role.html
diff --git a/nezha-admin/src/main/resources/templates/modules/sys/user.html b/nz-admin/src/main/resources/templates/modules/sys/user.html
index 1f9146f0..4909ac6d 100644
--- a/nezha-admin/src/main/resources/templates/modules/sys/user.html
+++ b/nz-admin/src/main/resources/templates/modules/sys/user.html
@@ -74,17 +74,6 @@
</div>
</div>
<div class="form-group">
- <div class="col-sm-2 control-label"><@spring.message 'usergroup.usergroup'/></div>
- <div class="col-sm-9">
- <template v-for="ug in usergroups">
- <span class="form-cbx">
- <input v-model="user.usergroupIds" type="checkbox" :value="ug.id"/>
- <span :title="ug.name">{{ug.name}}</span>
- </span>
- </template>
- </div>
- </div>
- <div class="form-group">
<div class="col-sm-2 control-label"><@spring.message 'common.status'/></div>
<label class="radio-inline">
<input type="radio" name="status" value="0" v-model="user.status"/><@spring.message 'common.disabled'/>
diff --git a/nezha-admin/src/main/resources/templates/spring.ftl b/nz-admin/src/main/resources/templates/spring.ftl
index ec93e722..ec93e722 100644
--- a/nezha-admin/src/main/resources/templates/spring.ftl
+++ b/nz-admin/src/main/resources/templates/spring.ftl
diff --git a/nezha-admin/src/test/java/com/nis/RedisTest.java b/nz-admin/src/test/java/com/nis/RedisTest.java
index 410331f1..410331f1 100644
--- a/nezha-admin/src/test/java/com/nis/RedisTest.java
+++ b/nz-admin/src/test/java/com/nis/RedisTest.java
diff --git a/nezha-common/.classpath b/nz-common/.classpath
index 5e8a55fe..5e8a55fe 100644
--- a/nezha-common/.classpath
+++ b/nz-common/.classpath
diff --git a/nezha-common/pom.xml b/nz-common/pom.xml
index 37334294..f46b1b33 100644
--- a/nezha-common/pom.xml
+++ b/nz-common/pom.xml
@@ -1,13 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.nis</groupId>
- <artifactId>nezha-web</artifactId>
+ <artifactId>nz-web</artifactId>
<version>4.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>nezha-common</artifactId>
+ <artifactId>nz-common</artifactId>
<packaging>jar</packaging>
- <description>nezha-common</description>
+ <description>nz-common</description>
<build>
<finalName>${project.artifactId}</finalName>
diff --git a/nezha-common/src/main/java/com/nis/common/aspect/RedisAspect.java b/nz-common/src/main/java/com/nis/common/aspect/RedisAspect.java
index 17863d4e..17863d4e 100644
--- a/nezha-common/src/main/java/com/nis/common/aspect/RedisAspect.java
+++ b/nz-common/src/main/java/com/nis/common/aspect/RedisAspect.java
diff --git a/nezha-common/src/main/java/com/nis/common/config/RedisConfig.java b/nz-common/src/main/java/com/nis/common/config/RedisConfig.java
index 0e035017..0e035017 100644
--- a/nezha-common/src/main/java/com/nis/common/config/RedisConfig.java
+++ b/nz-common/src/main/java/com/nis/common/config/RedisConfig.java
diff --git a/nezha-common/src/main/java/com/nis/common/exception/NZException.java b/nz-common/src/main/java/com/nis/common/exception/NZException.java
index 3450ddae..3450ddae 100644
--- a/nezha-common/src/main/java/com/nis/common/exception/NZException.java
+++ b/nz-common/src/main/java/com/nis/common/exception/NZException.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/Test.java b/nz-common/src/main/java/com/nis/common/smartvalidate/Test.java
index 2681c5da..2681c5da 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/Test.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/Test.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateCache.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ValidateCache.java
index 30cecaca..30cecaca 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateCache.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ValidateCache.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateHandler.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ValidateHandler.java
index 9dca8ddd..9dca8ddd 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateHandler.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ValidateHandler.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateProcess.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ValidateProcess.java
index 09df31cf..09df31cf 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateProcess.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ValidateProcess.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateUtils.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ValidateUtils.java
index 4f282b4f..4f282b4f 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ValidateUtils.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ValidateUtils.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Chinese.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Chinese.java
index 0841f3a6..0841f3a6 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Chinese.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Chinese.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Date.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Date.java
index ec44a488..ec44a488 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Date.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Date.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Email.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Email.java
index c2614ed7..c2614ed7 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Email.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Email.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/English.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/English.java
index c92ea9d6..c92ea9d6 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/English.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/English.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/IP.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/IP.java
index b21048e9..b21048e9 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/IP.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/IP.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/IdCard.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/IdCard.java
index 9f09b58d..9f09b58d 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/IdCard.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/IdCard.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Max.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Max.java
index 5cab5cac..5cab5cac 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Max.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Max.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/MaxLength.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/MaxLength.java
index c46e992a..c46e992a 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/MaxLength.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/MaxLength.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Min.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Min.java
index 9ac74c31..9ac74c31 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Min.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Min.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/MinLength.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/MinLength.java
index ec589608..ec589608 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/MinLength.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/MinLength.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/NotNull.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/NotNull.java
index 41aa0205..41aa0205 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/NotNull.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/NotNull.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Phone.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Phone.java
index f9b46860..f9b46860 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Phone.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Phone.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Regex.java b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Regex.java
index dc2c49c0..dc2c49c0 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/ann/Regex.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/ann/Regex.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/utils/CharUtil.java b/nz-common/src/main/java/com/nis/common/smartvalidate/utils/CharUtil.java
index 8d244064..8d244064 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/utils/CharUtil.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/utils/CharUtil.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/utils/CommonUtil.java b/nz-common/src/main/java/com/nis/common/smartvalidate/utils/CommonUtil.java
index 749db545..749db545 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/utils/CommonUtil.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/utils/CommonUtil.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/utils/ReflectUtils.java b/nz-common/src/main/java/com/nis/common/smartvalidate/utils/ReflectUtils.java
index 19148108..19148108 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/utils/ReflectUtils.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/utils/ReflectUtils.java
diff --git a/nezha-common/src/main/java/com/nis/common/smartvalidate/utils/RegexUtil.java b/nz-common/src/main/java/com/nis/common/smartvalidate/utils/RegexUtil.java
index 7dd39733..7dd39733 100644
--- a/nezha-common/src/main/java/com/nis/common/smartvalidate/utils/RegexUtil.java
+++ b/nz-common/src/main/java/com/nis/common/smartvalidate/utils/RegexUtil.java
diff --git a/nezha-common/src/main/java/com/nis/common/utils/DateUtils.java b/nz-common/src/main/java/com/nis/common/utils/DateUtils.java
index 8d1f064b..8d1f064b 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/DateUtils.java
+++ b/nz-common/src/main/java/com/nis/common/utils/DateUtils.java
diff --git a/nezha-common/src/main/java/com/nis/common/utils/HttpContextUtils.java b/nz-common/src/main/java/com/nis/common/utils/HttpContextUtils.java
index 8a19b2e8..8a19b2e8 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/HttpContextUtils.java
+++ b/nz-common/src/main/java/com/nis/common/utils/HttpContextUtils.java
diff --git a/nezha-common/src/main/java/com/nis/common/utils/IPUtils.java b/nz-common/src/main/java/com/nis/common/utils/IPUtils.java
index 582e26b6..582e26b6 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/IPUtils.java
+++ b/nz-common/src/main/java/com/nis/common/utils/IPUtils.java
diff --git a/nezha-common/src/main/java/com/nis/common/utils/PageUtils.java b/nz-common/src/main/java/com/nis/common/utils/PageUtils.java
index 6cd86cac..6cd86cac 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/PageUtils.java
+++ b/nz-common/src/main/java/com/nis/common/utils/PageUtils.java
diff --git a/nezha-common/src/main/java/com/nis/common/utils/R.java b/nz-common/src/main/java/com/nis/common/utils/R.java
index 189a07e9..380716db 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/R.java
+++ b/nz-common/src/main/java/com/nis/common/utils/R.java
@@ -11,21 +11,6 @@ import java.util.HashMap;
public class R extends HashMap<String, Object> {
private static final long serialVersionUID = 1L;
- //调用示例
- public static void main(String[] args) {
- //返回{"code":200, msg:"success"}
- R r0 = R.ok();
- System.out.println(r0);
-
- //返回{"code":999, msg:"error"}
- R r2 = R.error();
- System.out.println(r2);
-
- //返回{"code":101000, msg:"system_name_duplicate"}
- R r3 = R.error(RCode.SYS_SYS_DUPLICATENAME);
- System.out.println(r3);
- }
-
public R() {
put("code", RCode.SUCCESS.getCode());
put("msg", RCode.SUCCESS.getMsg());
diff --git a/nz-common/src/main/java/com/nis/common/utils/RCode.java b/nz-common/src/main/java/com/nis/common/utils/RCode.java
new file mode 100644
index 00000000..2f48a96d
--- /dev/null
+++ b/nz-common/src/main/java/com/nis/common/utils/RCode.java
@@ -0,0 +1,57 @@
+package com.nis.common.utils;
+
+public enum RCode {
+
+ SUCCESS(200, "success"), //成功
+
+
+ SYS_ERROR(100000, "system_error"), //10xxxx,系统类(业务系统、用户组、权限等)通用错误以及其他系统内部错误
+
+ SYS_DB_DUPLICATERECORD(100001, "DUPLICATE_RECORD"), //数据库中已存在该记录
+ SYS_DB_AUTH(100002, "auth_error"), //没有权限
+
+ SYS_LOGIN_CAPTCHA(101001, "captcha_error"), //登录验证码错误
+ SYS_LOGIN_UNKNOWNACCOUNT(101003, "unknown_account_error"), //未知校验错误
+ SYS_LOGIN_USERPWD(101004, "user_or_pwd_error"), //账号或密码错误
+ SYS_LOGIN_LOCK(101005, "account_locked_error"), //账号被锁定
+ SYS_LOGIN_ACCOUNTAUTH(101006, "account_auth_error"), //账号验证失败
+
+ SYS_MENU_SYSMENUDEL(103001, "sysmenu del error"), //系统菜单,不能删除
+ SYS_MENU_DELSUB(103002, "del sub first error"), //请先删除子菜单或按钮
+ SYS_USER_OLDPWD(103003, "user oldpwd error"), //原密码不正确
+ SYS_USER_DELADMIN(103004, "del admin error"), //系统管理员不能删除
+ SYS_USER_CANNOTDEL(103005, "cannot del user error"), //当前用户不能删除
+ SYS_USER_DUPLICATENAME(103006, "user name duplicate error"), //业务系统选择错误
+
+ SYS_I18N_DUPLICATE(105001, "duplicate error (code + lang)"), //国际化配置重复(code+lang)
+ SYS_I18N_NOSUCHLANG(105002, "no such lang"), //不合法的lang
+
+
+ SYS_DICT_NAME_ISNULL(106001,"sys_dict_name_isnull"), // 字典名称不能为空
+ SYS_DICT_TYPE_ISNULL(106002,"sys_dict_type_isnull"), // 字典类型不能为空
+ SYS_DICT_VALUE_ISNULL(106003,"sys_dict_value_isnull"), // 字典值不能为空
+ SYS_DICT_VALUE_DUPLICATE(106004,"sys_dict_value_duplicate"),// 字典值重复
+
+
+
+ NOT_NULL_ERROR(990, "not null error"), //not null错误
+ NOT_NUMBER_ERROR(991, "not number error"), //not number错误
+ ERROR(999, "error"); //通用错误/未知错误
+
+
+ private RCode(Integer code, String msg) {
+ this.code = code;
+ this.msg = msg;
+ }
+
+ private Integer code;
+ private String msg;
+
+ public Integer getCode() {
+ return code;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+} \ No newline at end of file
diff --git a/nezha-common/src/main/java/com/nis/common/utils/RedisUtils.java b/nz-common/src/main/java/com/nis/common/utils/RedisUtils.java
index 46df5cbd..46df5cbd 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/RedisUtils.java
+++ b/nz-common/src/main/java/com/nis/common/utils/RedisUtils.java
diff --git a/nezha-common/src/main/java/com/nis/common/utils/SQLUtils.java b/nz-common/src/main/java/com/nis/common/utils/SQLUtils.java
index f0f10c5d..f0f10c5d 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/SQLUtils.java
+++ b/nz-common/src/main/java/com/nis/common/utils/SQLUtils.java
diff --git a/nezha-common/src/main/java/com/nis/common/utils/SpringContextUtils.java b/nz-common/src/main/java/com/nis/common/utils/SpringContextUtils.java
index f719f5e5..f719f5e5 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/SpringContextUtils.java
+++ b/nz-common/src/main/java/com/nis/common/utils/SpringContextUtils.java
diff --git a/nezha-common/src/main/java/com/nis/common/utils/SqlHelper/KeywordsType.java b/nz-common/src/main/java/com/nis/common/utils/SqlHelper/KeywordsType.java
index 63c8bdb8..63c8bdb8 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/SqlHelper/KeywordsType.java
+++ b/nz-common/src/main/java/com/nis/common/utils/SqlHelper/KeywordsType.java
diff --git a/nezha-common/src/main/java/com/nis/common/utils/SqlHelper/MysqlHelper.java b/nz-common/src/main/java/com/nis/common/utils/SqlHelper/MysqlHelper.java
index 26e5da85..26e5da85 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/SqlHelper/MysqlHelper.java
+++ b/nz-common/src/main/java/com/nis/common/utils/SqlHelper/MysqlHelper.java
diff --git a/nezha-common/src/main/java/com/nis/common/utils/SqlHelper/OracleHelper.java b/nz-common/src/main/java/com/nis/common/utils/SqlHelper/OracleHelper.java
index c3616588..c3616588 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/SqlHelper/OracleHelper.java
+++ b/nz-common/src/main/java/com/nis/common/utils/SqlHelper/OracleHelper.java
diff --git a/nezha-common/src/main/java/com/nis/common/utils/SqlHelper/PostgresqlHelper.java b/nz-common/src/main/java/com/nis/common/utils/SqlHelper/PostgresqlHelper.java
index ac8c8470..ac8c8470 100644
--- a/nezha-common/src/main/java/com/nis/common/utils/SqlHelper/PostgresqlHelper.java
+++ b/nz-common/src/main/java/com/nis/common/utils/SqlHelper/PostgresqlHelper.java
diff --git a/nezha-common/src/main/java/com/nis/common/validator/Assert.java b/nz-common/src/main/java/com/nis/common/validator/Assert.java
index decc3568..decc3568 100644
--- a/nezha-common/src/main/java/com/nis/common/validator/Assert.java
+++ b/nz-common/src/main/java/com/nis/common/validator/Assert.java
diff --git a/nezha-common/src/main/java/com/nis/common/validator/ValidatorUtils.java b/nz-common/src/main/java/com/nis/common/validator/ValidatorUtils.java
index 23d7ef5b..23d7ef5b 100644
--- a/nezha-common/src/main/java/com/nis/common/validator/ValidatorUtils.java
+++ b/nz-common/src/main/java/com/nis/common/validator/ValidatorUtils.java
diff --git a/nezha-common/src/main/java/com/nis/common/validator/group/AddGroup.java b/nz-common/src/main/java/com/nis/common/validator/group/AddGroup.java
index dfd9f109..dfd9f109 100644
--- a/nezha-common/src/main/java/com/nis/common/validator/group/AddGroup.java
+++ b/nz-common/src/main/java/com/nis/common/validator/group/AddGroup.java
diff --git a/nezha-common/src/main/java/com/nis/common/validator/group/Group.java b/nz-common/src/main/java/com/nis/common/validator/group/Group.java
index 70a616db..70a616db 100644
--- a/nezha-common/src/main/java/com/nis/common/validator/group/Group.java
+++ b/nz-common/src/main/java/com/nis/common/validator/group/Group.java
diff --git a/nezha-common/src/main/java/com/nis/common/validator/group/UpdateGroup.java b/nz-common/src/main/java/com/nis/common/validator/group/UpdateGroup.java
index db7585c7..db7585c7 100644
--- a/nezha-common/src/main/java/com/nis/common/validator/group/UpdateGroup.java
+++ b/nz-common/src/main/java/com/nis/common/validator/group/UpdateGroup.java
diff --git a/nezha-common/src/main/java/com/nis/common/xss/HTMLFilter.java b/nz-common/src/main/java/com/nis/common/xss/HTMLFilter.java
index c665abf2..c665abf2 100644
--- a/nezha-common/src/main/java/com/nis/common/xss/HTMLFilter.java
+++ b/nz-common/src/main/java/com/nis/common/xss/HTMLFilter.java
diff --git a/nezha-common/src/main/java/com/nis/common/xss/SQLFilter.java b/nz-common/src/main/java/com/nis/common/xss/SQLFilter.java
index 7fbb05c5..7fbb05c5 100644
--- a/nezha-common/src/main/java/com/nis/common/xss/SQLFilter.java
+++ b/nz-common/src/main/java/com/nis/common/xss/SQLFilter.java
diff --git a/nezha-common/src/main/java/com/nis/common/xss/XssFilter.java b/nz-common/src/main/java/com/nis/common/xss/XssFilter.java
index 4f8f1cfa..4f8f1cfa 100644
--- a/nezha-common/src/main/java/com/nis/common/xss/XssFilter.java
+++ b/nz-common/src/main/java/com/nis/common/xss/XssFilter.java
diff --git a/nezha-common/src/main/java/com/nis/common/xss/XssHttpServletRequestWrapper.java b/nz-common/src/main/java/com/nis/common/xss/XssHttpServletRequestWrapper.java
index 2ef01388..2ef01388 100644
--- a/nezha-common/src/main/java/com/nis/common/xss/XssHttpServletRequestWrapper.java
+++ b/nz-common/src/main/java/com/nis/common/xss/XssHttpServletRequestWrapper.java
diff --git a/pom.xml b/pom.xml
index 813b0b90..724dd8a2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,11 +2,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.nis</groupId>
- <artifactId>nezha-web</artifactId>
+ <artifactId>nz-web</artifactId>
<version>4.0.0</version>
<packaging>pom</packaging>
- <name>nezha-web</name>
+ <name>nz-web</name>
<parent>
<groupId>org.springframework.boot</groupId>
@@ -15,8 +15,8 @@
</parent>
<modules>
- <module>nezha-common</module>
- <module>nezha-admin</module>
+ <module>nz-common</module>
+ <module>nz-admin</module>
</modules>
<properties>