命令调整

This commit is contained in:
jiangzeyin 2019-04-18 17:08:57 +08:00
parent 0bdcf72a01
commit 9e00b0dba5
10 changed files with 75 additions and 76 deletions

View File

@ -1,6 +1,6 @@
@REM The MIT License (MIT)
@REM
@REM Copyright (c) 2019 码之科技工作室
@REM Copyright (c) 2019 码之科技工作室
@REM
@REM Permission is hereby granted, free of charge, to any person obtaining a copy of
@REM this software and associated documentation files (the "Software"), to deal in
@ -34,19 +34,19 @@ set JVM=-server
set ARGS= --jpom.applicationTag=%Tag% --jpom.log=%basePath%log --server.port=2123
color 0a
TITLE Jpom管理系统BAT控制台
echo. ***** Jpom管理系统BAT控制台 *****
TITLE Jpom管理系统BAT控制台
echo. ***** Jpom管理系统BAT控制台 *****
::*************************************************************************************************************
echo.
echo. [1] 启动 start
echo. [2] 关闭 stop
echo. [3] 查看运行状态 status
echo. [4] 重启 restart
echo. [5] 帮助 use
echo. [0] 退 出 0
echo. [1] 启动 start
echo. [2] 关闭 stop
echo. [3] 查看运行状态 status
echo. [4] 重启 restart
echo. [5] 帮助 use
echo. [0] 退 出 0
echo.
echo.请输入选择的序号:
echo.请输入选择的序号:
set /p ID=
IF "%id%"=="1" goto start
IF "%id%"=="2" goto stop
@ -55,18 +55,18 @@ set /p ID=
IF "%id%"=="5" goto use
IF "%id%"=="0" EXIT
PAUSE
echo 即将关闭窗口
echo 即将关闭窗口
timeout 3
EXIT 1
@REM 启动
@REM 启动
:start
if "%JAVA_HOME%"=="" (
echo 请配置【JAVA_HOME】环境变量
echo 请配置【JAVA_HOME】环境变量
PAUSE
EXIT 2
)
rem 备份日志
rem 备份日志
if exist %Log% (
if not exist %LogBack% (
echo %LogBack%
@ -77,41 +77,41 @@ EXIT 1
)
set TEMPCLASSPATH=
for /f "delims=" %%I in ('dir /B %Lib%') do (set TEMPCLASSPATH=!TEMPCLASSPATH!%Lib%%%I;)
REM echo 启动成功,关闭窗口不影响运行
echo 启动中.....关闭窗口不影响运行
REM echo 启动成功,关闭窗口不影响运行
echo 启动中.....关闭窗口不影响运行
javaw %JVM% -classpath %TEMPCLASSPATH%"%JAVA_HOME%"\lib\tools.jar -Dapplication=%Tag% -Dbasedir=%basePath% %MainClass% %ARGS% >> %Log%
timeout 3
goto:eof
@REM 关闭Jpom
@REM 关闭Jpom
:stop
set TEMPCLASSPATH=
for /f "delims=" %%I in ('dir /B %Lib%') do (set TEMPCLASSPATH=!TEMPCLASSPATH!%Lib%%%I;)
java -classpath %TEMPCLASSPATH%"%JAVA_HOME%"\lib\tools.jar %CloseMainClass% %ARGS% --jpom.applicationTag=%Tag% --event=stop
goto:eof
@REM 查看Jpom运行状态
@REM 查看Jpom运行状态
:status
set TEMPCLASSPATH=
for /f "delims=" %%I in ('dir /B %Lib%') do (set TEMPCLASSPATH=!TEMPCLASSPATH!%Lib%%%I;)
java -classpath %TEMPCLASSPATH%"%JAVA_HOME%"\lib\tools.jar %CloseMainClass% %ARGS% --jpom.applicationTag=%Tag% --event=status
goto:eof
@REM 重启Jpom
@REM 重启Jpom
:restart
echo 停止中....
echo 停止中....
call:stop
timeout 3
echo 启动中....
echo 启动中....
call:start
goto:eof
@REM 重新加载Nginx
@REM 重新加载Nginx
:reloadNginx
nginx -s reload
goto:eof
@REM 提示用法
@REM 提示用法
:use
echo please use (start|stop|restart|status)
goto:eof

View File

@ -18,6 +18,8 @@ import javax.annotation.Resource;
import java.util.List;
/**
* 首页
*
* @author jiangzeyin
* @date 2019/4/17
*/

View File

@ -65,7 +65,7 @@ public class ProjectInfoModel extends BaseModel {
public String getModifyUser() {
if (StrUtil.isEmpty(modifyUser)) {
// return UserModel.SYSTEM_OCCUPY_NAME;
return StrUtil.DASHED;
}
return modifyUser;
}
@ -74,15 +74,6 @@ public class ProjectInfoModel extends BaseModel {
this.modifyUser = modifyUser;
}
// public void logModifyUser(UserModel userModel) {
// // 隐藏系统管理员登录名
// if (userModel.isSystemUser()) {
// this.setModifyUser(UserModel.SYSTEM_OCCUPY_NAME);
// } else {
// this.setModifyUser(userModel.getId());
// }
// }
/**
* 项目是否正在运行
*

View File

@ -36,7 +36,6 @@ public class AgentWebSocketHandle {
@OnOpen
public void onOpen(@PathParam("projectId") String projectId, @PathParam("optUser") String urlOptUser, Session session) {
System.out.println(projectId);
try {
// 判断项目
if (!WebSocketConfig.SYSTEM_ID.equals(projectId)) {
@ -90,7 +89,6 @@ public class AgentWebSocketHandle {
String projectId = json.getString("projectId");
projectInfoService = SpringUtil.getBean(ProjectInfoService.class);
ProjectInfoModel projectInfoModel = projectInfoService.getItem(projectId);
System.out.println(op + " " + projectId);
if (projectInfoModel == null) {
SocketSessionUtil.send(session, "没有对应项目");
return;
@ -177,7 +175,6 @@ public class AgentWebSocketHandle {
destroy(session);
// top
TopManager.removeMonitor(session);
System.out.println("close");
}
private void destroy(Session session) {

View File

@ -1,6 +1,6 @@
@REM The MIT License (MIT)
@REM
@REM Copyright (c) 2019 码之科技工作室
@REM Copyright (c) 2019 码之科技工作室
@REM
@REM Permission is hereby granted, free of charge, to any person obtaining a copy of
@REM this software and associated documentation files (the "Software"), to deal in
@ -34,19 +34,19 @@ set JVM=-server
set ARGS= --jpom.applicationTag=%Tag% --jpom.log=%basePath%log --server.port=2122
color 0a
TITLE Jpom管理系统BAT控制台
echo. ***** Jpom管理系统BAT控制台 *****
TITLE Jpom管理系统BAT控制台
echo. ***** Jpom管理系统BAT控制台 *****
::*************************************************************************************************************
echo.
echo. [1] 启动 start
echo. [2] 关闭 stop
echo. [3] 查看运行状态 status
echo. [4] 重启 restart
echo. [5] 帮助 use
echo. [0] 退 出 0
echo. [1] 启动 start
echo. [2] 关闭 stop
echo. [3] 查看运行状态 status
echo. [4] 重启 restart
echo. [5] 帮助 use
echo. [0] 退 出 0
echo.
echo.请输入选择的序号:
echo.请输入选择的序号:
set /p ID=
IF "%id%"=="1" goto start
IF "%id%"=="2" goto stop
@ -55,18 +55,18 @@ set /p ID=
IF "%id%"=="5" goto use
IF "%id%"=="0" EXIT
PAUSE
echo 即将关闭窗口
echo 即将关闭窗口
timeout 3
EXIT 1
@REM 启动
@REM 启动
:start
if "%JAVA_HOME%"=="" (
echo 请配置【JAVA_HOME】环境变量
echo 请配置【JAVA_HOME】环境变量
PAUSE
EXIT 2
)
rem 备份日志
rem 备份日志
if exist %Log% (
if not exist %LogBack% (
echo %LogBack%
@ -77,41 +77,41 @@ EXIT 1
)
set TEMPCLASSPATH=
for /f "delims=" %%I in ('dir /B %Lib%') do (set TEMPCLASSPATH=!TEMPCLASSPATH!%Lib%%%I;)
REM echo 启动成功,关闭窗口不影响运行
echo 启动中.....关闭窗口不影响运行
REM echo 启动成功,关闭窗口不影响运行
echo 启动中.....关闭窗口不影响运行
javaw %JVM% -classpath %TEMPCLASSPATH%"%JAVA_HOME%"\lib\tools.jar -Dapplication=%Tag% -Dbasedir=%basePath% %MainClass% %ARGS% >> %Log%
timeout 3
goto:eof
@REM 关闭Jpom
@REM 关闭Jpom
:stop
set TEMPCLASSPATH=
for /f "delims=" %%I in ('dir /B %Lib%') do (set TEMPCLASSPATH=!TEMPCLASSPATH!%Lib%%%I;)
java -classpath %TEMPCLASSPATH%"%JAVA_HOME%"\lib\tools.jar %CloseMainClass% %ARGS% --jpom.applicationTag=%Tag% --event=stop
goto:eof
@REM 查看Jpom运行状态
@REM 查看Jpom运行状态
:status
set TEMPCLASSPATH=
for /f "delims=" %%I in ('dir /B %Lib%') do (set TEMPCLASSPATH=!TEMPCLASSPATH!%Lib%%%I;)
java -classpath %TEMPCLASSPATH%"%JAVA_HOME%"\lib\tools.jar %CloseMainClass% %ARGS% --jpom.applicationTag=%Tag% --event=status
goto:eof
@REM 重启Jpom
@REM 重启Jpom
:restart
echo 停止中....
echo 停止中....
call:stop
timeout 3
echo 启动中....
echo 启动中....
call:start
goto:eof
@REM 重新加载Nginx
@REM 重新加载Nginx
:reloadNginx
nginx -s reload
goto:eof
@REM 提示用法
@REM 提示用法
:use
echo please use (start|stop|restart|status)
goto:eof

View File

@ -19,6 +19,7 @@
<div class="layui-input-block">
<input type="text" id="id" name="id" value="$!item.id" placeholder="创建后不能修改" class="layui-input"
required
#if($item)readonly#end
lay-verify="required">
<input type="hidden" name="type" value="$!type">
</div>
@ -44,12 +45,26 @@
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">节点地址</label>
<label class="layui-form-label">节点状态</label>
<div class="layui-input-block">
<input type="text" id="url" name="url" value="$!item.url" placeholder="请填写节点名称" class="layui-input"
required
lay-verify="required">
<input type="checkbox" value="true"
#if($item.openStatus)
checked
#end
name="openStatus"
lay-skin="switch"
lay-text="启用|停用">
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">节点地址</label>
<div class="layui-input-block">
<input type="text" id="url" name="url" value="$!item.url"
placeholder="请填写节点地址,ip:port(127.0.0.1:2123)或者域名" class="layui-input"
required
lay-verify="required">
</div>
</div>
<div class="layui-form-item">
@ -69,18 +84,7 @@
lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">节点状态</label>
<div class="layui-input-block">
<input type="checkbox" value="true"
#if($item.openStatus)
checked
#end
name="openStatus"
lay-skin="switch"
lay-text="启用|停用">
</div>
</div>
<div class="layui-form-item" style="padding-left: 20%">
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="submitNode" id="project_submit">提交
</button>

View File

@ -110,7 +110,7 @@
type: 2,
title: '管理节点配置信息',
shade: 0.8,
area: ['60%', '70%'],
area: ['60%', '80%'],
content: 'edit.html?id=' + id
});
}

View File

@ -265,6 +265,11 @@
$('#export').on('click', function () {
var url = "./log/export.html?id=$!projectInfo.id";
url = appendNodeId(url);
layer.msg('加载中..', {
icon: 16,
shade: 0.2,
time: 3000
});
location.href = url;
});