Initial YakPanel commit

This commit is contained in:
Niranjan
2026-04-07 02:04:22 +05:30
commit 2826d3e7f3
5359 changed files with 1390724 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{data['lan']['TITLE']}}</title>
</head>
<body>
<h1>{{data['lan']['H1']}}</h1>
<p>{{data['lan']['P1']}}</p>
<hr>
<address>{{data['lan']['NAME']}}<a href="https://www.yakpanel.com/forum" target="_blank">{{data['lan']['HELP']}}</a></address>
</body>
</html>

View File

@@ -0,0 +1,757 @@
{% extends "layout.html" %} {% block content %}
<link href="{{g.cdn_url}}/layer/skin/default/layer.css" rel="stylesheet" />
<div class="main-content">
<div class="container-fluid" style="padding-bottom: 54px">
<div class="pos-box bgw mtb15 radius4">
<div class="tab-list" id="configTab">
<div class="tabs-item" data-type="allConfig">{{data['lan']['GLOBAL']}}</div>
<div class="tabs-item" data-type="panelConfig">{{data['lan']['H2']}}</div>
<div class="tabs-item" data-type="securityConfig">{{data['lan']['SECURITY']}}</div>
<div class="tabs-item" data-type="pushConfig">{{data['lan']['NOTIFY']}}</div>
<div class="tabs-item" data-type="alertConfig">{{data['lan']['ALARM']}}</div>
</div>
</div>
<div class="setbox bgw mtb15 tab-view-box configure-box">
<!-- 面板设置 -->
<div class="panel-config hide" data-type="panelConfig">
<div class="configure-title">{{data['lan']['H2']}}</div>
<div class="configure-block">
<!-- 关闭面板 -->
<div class="line" title="{{data['lan']['I1']}}">
<div class="line-title">{{data['lan']['I1']}}</div>
<div class="line-form">
<div class="line-row">
<div class="ssh-item" style="margin-left: 0; padding: 0">
<input class="btswitch btswitch-ios" id="closePanel" type="checkbox" name="close_panel" />
<label class="btswitch-btn" for="closePanel" style="margin-bottom: 0"></label>
</div>
</div>
<div class="line-row-tips">{{data['lan']['CLOSE_PANEL']}}</div>
</div>
</div>
<!-- 监听IPv6 -->
<div class="line" title="IPv6">
<div class="line-title">IPv6</div>
<div class="line-form">
<div class="line-row">
<div class="ssh-item" style="margin-left: 0; padding: 0">
<input class="btswitch btswitch-ios" id="monitorIPv6" type="checkbox" name="ipv6" />
<label class="btswitch-btn" for="monitorIPv6" style="margin-bottom: 0"></label>
</div>
</div>
<div class="line-row-tips">{{data['lan']['ALLOW_IPV6']}}</div>
</div>
</div>
<!-- 离线模式 -->
<div class="line" title="Offline mode">
<div class="line-title">{{data['lan']['OFFLINE_MODE']}}</div>
<div class="line-form">
<div class="line-row">
<div class="ssh-item" style="margin-left: 0; padding: 0">
<input class="btswitch btswitch-ios" id="offlineMode" type="checkbox" name="is_local" />
<label class="btswitch-btn" for="offlineMode" style="margin-bottom: 0"></label>
</div>
</div>
</div>
<div class="line-row-tips">{{data['lan']['OFFLINE']}}</div>
</div>
<!-- 开发者模式 -->
<div class="line" title="Developer mode">
<div class="line-title">{{data['lan']['DEV_MODE']}}</div>
<div class="line-form">
<div class="line-row">
<div class="ssh-item" style="margin-left: 0; padding: 0">
<input class="btswitch btswitch-ios" id="developerMode" type="checkbox" name="debug" />
<label class="btswitch-btn" for="developerMode" style="margin-bottom: 0"></label>
</div>
</div>
<div class="line-row-tips">{{data['lan']['DEV_MODE_DESC']}}</div>
</div>
</div>
<!-- API -->
<div class="line" title="API">
<div class="line-title">API</div>
<div class="line-form">
<div class="line-row">
<div class="ssh-item" style="margin-left: 0; margin-top: -3px; padding: 0">
<input class="btswitch btswitch-ios" id="apiInterface" type="checkbox" name="api" />
<label class="btswitch-btn" for="apiInterface" style="margin-bottom: 0"></label>
</div>
<button type="button" class="btn btn-default btn-xs apiInterfaceBtn" style="margin-left: 10px">{{data['lan']['CONFIG']}}</button>
</div>
<div class="line-row-tips">
{{data['lan']['API_DESC']}},<a href="https://www.yakpanel.com/forum/d/482-api-interface-tutorial" class="btlink" target="_blank">{{data['lan']['HELP']}}</a>
</div>
</div>
</div>
<!-- Language -->
<div class="line" title="Language">
<div class="line-title">
<span>Language</span>
<svg
t="1723620279379"
class="icon"
viewBox="0 0 1088 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="4252"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="18"
height="18"
>
<path d="M729.6 294.4c19.2 57.6 44.8 102.4 89.6 147.2 38.4-38.4 64-89.6 83.2-147.2H729.6z m-422.4 320h166.4l-83.2-224z" fill="#666" p-id="4253"></path>
<path
d="M947.2 0h-768c-70.4 0-128 57.6-128 128v768c0 70.4 57.6 128 128 128h768c70.4 0 128-57.6 128-128V128c0-70.4-51.2-128-128-128zM633.6 825.6c-12.8 12.8-25.6 12.8-38.4 12.8-6.4 0-19.2 0-25.6-6.4s-12.8 0-12.8-6.4-6.4-12.8-12.8-25.6-6.4-19.2-12.8-32l-25.6-70.4h-224L256 768c-12.8 25.6-19.2 44.8-25.6 57.6-6.4 12.8-19.2 12.8-38.4 12.8-12.8 0-25.6-6.4-38.4-12.8-12.8-12.8-19.2-19.2-19.2-32 0-6.4 0-12.8 6.4-25.6s6.4-19.2 12.8-32l140.8-358.4c6.4-12.8 6.4-25.6 12.8-38.4s12.8-25.6 19.2-32 12.8-19.2 25.6-25.6c12.8-6.4 25.6-6.4 38.4-6.4 12.8 0 25.6 0 38.4 6.4 12.8 6.4 19.2 12.8 25.6 25.6 6.4 6.4 12.8 19.2 19.2 32 6.4 12.8 12.8 25.6 19.2 44.8l140.8 352c12.8 25.6 19.2 44.8 19.2 57.6-6.4 6.4-12.8 19.2-19.2 32z m352-249.6c-70.4-25.6-121.6-57.6-166.4-96-44.8 44.8-102.4 76.8-172.8 96l-19.2-32c70.4-19.2 128-44.8 172.8-89.6-44.8-44.8-83.2-102.4-96-166.4h-64v-25.6h172.8c-12.8-19.2-25.6-44.8-38.4-64l19.2-6.4c12.8 19.2 32 44.8 44.8 70.4h160v32h-64c-19.2 64-51.2 121.6-89.6 160 44.8 38.4 96 70.4 166.4 89.6l-25.6 32z"
fill="#666"
p-id="4254"
></path>
</svg>
</div>
<div class="line-form">
<div class="line-row">
<select class="bt-input-text" name="language" style="width: 150px"></select>
<!-- <button type="button" class="btn btn-default btn-sm uploadLanguage" style="margin-left: 8px">Upload my translation file</button> -->
<!-- <button type="button" class="btn btn-success btn-sm downloadLanguage" style="margin-left: 8px">I want to translate</button> -->
</div>
</div>
</div>
<!-- 面板别名 -->
<div class="line" title="{{data['lan']['CT1']}}">
<div class="line-title">{{data['lan']['CT1']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="webname" />
</div>
<button type="button" class="btn btn-success btn-sm ml5 savePanelConfig" disabled>{{data['lan']['CY12']}}</button>
<div class="line-row-tips">{{data['lan']['CY1']}}</div>
</div>
<!-- 超时时间 -->
<div class="line" title="Timeout">
<div class="line-title">Timeout</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="session_timeout" />
</div>
<button type="button" class="btn btn-success btn-sm ml5 savePanelConfig" disabled>{{data['lan']['CY12']}}</button>
<div class="line-row-tips">{{data['lan']['CY13']}} <span class="color-red seconds">0</span> {{data['lan']['CY14']}}</div>
</div>
<!-- 默认建站目录 -->
<div class="line" title="{{data['lan']['CT5']}}">
<div class="line-title">{{data['lan']['CT5']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="sites_path" />
<div class="selected-file sitesPath"><span class="glyphicon glyphicon-folder-open cursor"></span></div>
</div>
<button type="button" class="btn btn-success btn-sm ml5 savePanelConfig" disabled>{{data['lan']['CY12']}}</button>
<div class="line-row-tips">{{data['lan']['CY5']}}</div>
</div>
<!-- 默认备份目录 -->
<div class="line" title="{{data['lan']['CT6']}}">
<div class="line-title">{{data['lan']['CT6']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="backup_path" />
<div class="selected-file backupPath"><span class="glyphicon glyphicon-folder-open cursor"></span></div>
</div>
<button type="button" class="btn btn-success btn-sm ml5 savePanelConfig" disabled>{{data['lan']['CY12']}}</button>
<div class="line-row-tips">{{data['lan']['CY6']}}</div>
</div>
<!-- 服务器IP -->
<div class="line" title="{{data['lan']['CT7']}}">
<div class="line-title">{{data['lan']['CT7']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="address" />
</div>
<button type="button" class="btn btn-success btn-sm ml5 savePanelConfig" disabled>{{data['lan']['CY12']}}</button>
<div class="line-row-tips">{{data['lan']['CY7']}}</div>
</div>
<!-- 服务器时间 -->
<div class="line" title="{{data['lan']['CT8']}}">
<div class="line-title">{{data['lan']['CT8']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="systemdate" disabled />
</div>
</div>
<!-- 面板账号 -->
<div class="line" title="{{data['lan']['CT9']}}">
<div class="line-title">{{data['lan']['CT9']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="username" disabled />
</div>
<button type="button" class="btn btn-success btn-sm ml5 editPanelAccount">{{data['lan']['CONFIG']}}</button>
<div class="line-row-tips">&nbsp;</div>
</div>
<!-- 面板密码 -->
<div class="line" title="{{data['lan']['CT10']}}">
<div class="line-title">{{data['lan']['CT10']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="password" disabled />
</div>
<button type="button" class="btn btn-success btn-sm ml5 editPanelPassword">{{data['lan']['CONFIG']}}</button>
<div class="line-row-tips">&nbsp;</div>
</div>
<!-- 绑定 YakPanel 账号 -->
<div class="line" title="Bind account">
<div class="line-title">{{data['lan']['BIND_ACCOUNT']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="bind_user_info" disabled />
</div>
<button type="button" class="btn btn-success btn-sm ml5 bindBtUser">{{data['lan']['CONFIG']}}</button>
<button type="button" class="btn btn-default btn-sm ml5 unbindBtUser">{{data['lan']['UNBIND']}}</button>
<div class="line-row-tips">&nbsp;</div>
</div>
<!-- 面板菜单栏隐藏 -->
<div class="line" title="Menu bar hidden">
<div class="line-title">{{data['lan']['HIDE_MENU_BAR']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="menu_hide_list" disabled />
</div>
<button type="button" class="btn btn-success btn-sm ml5 menuBarManage">{{data['lan']['CONFIG']}}</button>
<div class="line-row-tips">{{data['lan']['HIDE_MENU_BAR_DESC']}}</div>
</div>
</div>
</div>
<!-- 安全设置 -->
<div class="panel-config hide" data-type="securityConfig">
<div class="configure-title">{{data['lan']['SECURITY']}}</div>
<div class="configure-block">
<div class="public_key" style="display: block" data="{{data['public_key']}}"></div>
<!-- 面板SSL -->
<div class="line" title="{{data['lan']['I3']}}">
<div class="line-title">{{data['lan']['I3']}}</div>
<div class="line-form">
<div class="line-row">
<div class="ssh-item" style="margin-left: 0; padding: 0">
<input class="btswitch btswitch-ios" id="panelSsl" type="checkbox" name="ssl" />
<label class="btswitch-btn" for="panelSsl" style="margin-bottom: 0"></label>
</div>
<button ype="button" class="btn btn-default btn-xs panelSslConfig" style="vertical-align: middle; margin-left: 10px">{{data['lan']['CONFIG']}}</button>
</div>
<div class="line-row-tips">{{data['lan']['SET_SSL']}},<a href="https://www.yakpanel.com/docs" class="btlink" target="_blank">{{data['lan']['HELP']}}</a></div>
</div>
</div>
<!-- BasicAuth认证 -->
<div class="line" title="BasicAuth">
<div class="line-title">BasicAuth</div>
<div class="line-form">
<div class="line">
<div class="ssh-item" style="margin-left: 0; padding: 0">
<input class="btswitch btswitch-ios" id="basicAuth" type="checkbox" name="basic_auth" />
<label class="btswitch-btn" for="basicAuth" style="margin-bottom: 0"></label>
</div>
</div>
</div>
<div class="line-row-tips">{{data['lan']['BASEAUTH_DESC']}},<a href="https://www.yakpanel.com/docs" class="btlink" target="_blank">{{data['lan']['HELP']}}</a></div>
</div>
<!-- 动态口令认证 -->
<div class="line" title="Google authentication">
<div class="line-title">Google authentication</div>
<div class="line-form">
<div class="line-row">
<div class="ssh-item" style="margin-left: 0; padding: 0">
<input class="btswitch btswitch-ios" id="checkTwoStep" type="checkbox" name="check_two_step" />
<label class="btswitch-btn" for="checkTwoStep" style="margin-bottom: 0"></label>
</div>
<button ype="button" class="btn btn-default btn-xs checkTwoStepConfig" style="vertical-align: middle; margin-left: 10px">{{data['lan']['CONFIG']}}</button>
</div>
<div class="line-row-tips">
{{data['lan']['GOOGLE_AUTH_DESC']}},<a href="https://www.yakpanel.com/forum/d/357-how-to-use-google-authenticator-in-the-yakpanel" class="btlink" target="_blank"
>{{data['lan']['HELP']}}</a
>
</div>
</div>
</div>
<!-- 访问设备验证 -->
<!-- <div class="line" title="访问设备验证">
<div class="line-title">访问设备验证</div>
<div class="line-form">
<div class="line-row">
<div class="ssh-item" style="margin-left: 0;padding: 0;">
<input class="btswitch btswitch-ios" id="sslVerify" type="checkbox" name="ssl_verify"/>
<label class="btswitch-btn" for="sslVerify" style="margin-bottom: 0;"></label>
</div>
<button ype="button" class="btn btn-default btn-xs sslVerifyConfig" style="vertical-align: middle;
margin-left: 10px;">访问设备验证配置</button>
</div>
<div class="line-row-tips">基于SSL证书双向验证开启后电脑需要安装此证书否则将无法访问属于极高安全级别的访问限制方式类似银行账号U盘密钥登录。<a href="https://www.yakpanel.com/docs" class="btlink" target="_blank">了解详情</a></div>
</div>
</div> -->
<!-- 密码复杂度验证 -->
<div class="line" title="{{data['lan']['STRONG_PASSWORD']}}">
<div class="line-title">{{data['lan']['STRONG_PASSWORD']}}</div>
<div class="line-form">
<div class="line-row">
<div class="ssh-item" style="margin-left: 0; padding: 0">
<input class="btswitch btswitch-ios" id="passwordSafe" type="checkbox" name="paw_complexity" />
<label class="btswitch-btn" for="passwordSafe" style="margin-bottom: 0"></label>
</div>
</div>
<div class="line-row-tips">{{data['lan']['STRONG_PASS_DESC']}}<span class="color-red">{{data['lan']['STRONG_PASS_DESC1']}}</span></div>
</div>
</div>
<!-- 绑定域名 -->
<div class="line" title="{{data['lan']['CT3']}}">
<div class="line-title">{{data['lan']['CT3']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="domain" />
</div>
<button type="button" class="btn btn-success btn-sm ml5 savePanelConfig" disabled>Save</button>
<div class="line-row-tips">{{data['lan']['CY3']}},<span class="color-red">{{data['lan']['CY31']}}</span></div>
</div>
<!-- 授权IP -->
<div class="line" title="{{data['lan']['CT4']}}">
<div class="line-title">{{data['lan']['CT4']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" placeholder="1.1.1.1,2.2.2.1-2.2.2.2" name="limitip" />
</div>
<button type="button" class="btn btn-success btn-sm ml5 savePanelConfig" disabled>Save</button>
<div class="line-row-tips">{{data['lan']['CY4']}}<span class="color-red">{{data['lan']['CY41']}}</span></div>
</div>
<!-- 面板端口 -->
<div class="line" title="{{data['lan']['CT2']}}">
<div class="line-title">{{data['lan']['CT2']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="port" disabled />
</div>
<button type="button" class="btn btn-success btn-sm ml5 setPanelPort">Set</button>
<div class="line-row-tips">{{data['lan']['CY2']}}, <span class="color-red">{{data['lan']['S_PORT_TIPS']}}</span></div>
</div>
<!-- 安全入口 -->
<div class="line" title="Security Entrance">
<div class="line-title">Security Entrance</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="admin_path" disabled />
</div>
<button type="button" class="btn btn-success btn-sm ml5 setSafetyEntrance">Set</button>
<div class="line-row-tips">Panel Admin entrance. After setting, you can ONLY log in to the panel through the specified Security Entrance, e.g. /www_bt_cn</div>
</div>
<!-- 未认证的响应状态 -->
<div class="line" title="{{data['lan']['NOT_LOGGED_IN_RESPONSE']}}">
<div class="line-title">{{data['lan']['NOT_LOGGED_IN_RESPONSE']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="status_code" disabled />
</div>
<button type="button" class="btn btn-success btn-sm ml5 setStatusCodeView">Set</button>
<div class="line-row-tips">{{data['lan']['NOT_LOGGED_IN_RESPONSE_DESC']}}</div>
</div>
<!-- 密码过期时间 -->
<div class="line" title="{{data['lan']['PASSWORD_EXPIRE']}}">
<div class="line-title">{{data['lan']['PASSWORD_EXPIRE']}}</div>
<div class="line-input">
<input type="text" class="bt-input-text" name="paw_expire_time" disabled />
<button type="button" class="btn btn-success btn-sm ml5 setPawExpiration">Set</button>
</div>
<div class="line-row-tips">{{data['lan']['PASSWORD_EXPIRE_DESC']}}</div>
</div>
<!-- 临时访问授权 -->
<div class="line" title="{{data['lan']['TEMP_ACCESS']}}">
<div class="line-title">{{data['lan']['TEMP_ACCESS']}}</div>
<div class="line-input">
<button type="button" class="btn btn-success btn-sm setTempAuthView">{{data['lan']['CONFIG']}}</button>
</div>
<div class="line-row-tips">{{data['lan']['TEMP_ACCESS_DESC']}}</div>
</div>
</div>
</div>
<!-- 通知设置 -->
<div class="panel-config hide" data-type="pushConfig">
<div class="configure-title">{{data['lan']['NOTIFY']}}</div>
<div class="configure-block">
<!-- 登录告警 -->
<div class="line" title="{{data['lan']['LOGIN_ALARM']}}">
<div class="line-title">{{data['lan']['LOGIN_ALARM']}}</div>
<div class="line-input">
<div class="line-row"><a href="javascript:;" class="bt_warning setAlarmMail">{{data['lan']['EMAIL_NOT_SET']}}</a>&nbsp;&nbsp;&nbsp;&nbsp;</div>
<button type="button" class="btn btn-success btn-xs setAlarmMailBtn">{{data['lan']['CONFIG']}}</button>
</div>
<div class="line-row-tips">{{data['lan']['LOGIN_ALARM_DESC']}}</div>
</div>
</div>
</div>
<div class="panel-config alert-view-box hide" data-type="alertConfig">
<div class="tab-nav-border">
<span class="on">{{ data['lan']['ALARM_LIST'] }}</span>
<span>{{ data['lan']['ALARM_SETTING'] }}</span>
<span>{{ data['lan']['ALARM_LOG'] }}</span>
</div>
<div class="tab-con" style="padding: 10px 0">
<div class="tab-block on">
<div id="addAlertTask" style="padding: 15px 45px"></div>
<div id="alertList"></div>
</div>
<div class="tab-block" id="alertConfig"></div>
<div class="tab-block" id="alertLog"></div>
</div>
</div>
</div>
</div>
<style>
.configure-box {
padding: 20px;
}
.configure-block > .line {
padding: 6px 0;
}
.configure-block > .line:hover {
background: #a5a5a514;
transition: background 0.2s;
cursor: pointer;
}
.configure-title {
line-height: 30px;
font-size: 14px;
border-bottom: 1px solid #e7e7e7;
padding: 5px 5px 8px 10px;
font-weight: bold;
color: #666;
}
.configure-box .configure-block {
padding: 25px 0;
}
.configure-box .line .line-title {
font-size: 12px;
color: #333;
display: inline-block;
width: 160px;
text-align: right;
padding-right: 15px;
height: 30px;
line-height: 30px;
vertical-align: top;
}
.configure-box .line .line-title .icon {
position: relative;
top: 5px;
}
.configure-box .line input[type='text'] {
width: 260px;
}
.configure-box .line .line-tips {
margin-top: 5px;
color: #999;
margin-left: 135px;
}
.configure-box .line > button {
height: 30px;
vertical-align: top;
}
.configure-box .line .line-input input,
.configure-box .line .line-form input {
height: 30px;
line-height: 30px;
}
.configure-box .line .line-input {
display: inline-block;
position: relative;
}
.configure-box .line .line-form {
display: inline-block;
vertical-align: top;
}
.configure-box .line .line-form .ssh-item {
display: inline-block;
margin: 0;
padding: 0;
float: none;
vertical-align: middle;
}
.line-row,
.line-row-tips {
height: 30px;
line-height: 30px;
display: inline-block;
}
.line-row-tips {
margin-left: 10px !important;
color: #999;
}
.bt_warning {
color: #fc6d26;
}
.line-split {
border-bottom: 1px #ececec dashed;
margin: 10px 0;
}
.selected-file {
height: 30px;
line-height: 30px;
width: 40px;
text-align: center;
background: #fafafa;
position: absolute;
right: 0;
top: 0;
border: 1px solid #cccccc;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
cursor: pointer;
}
.btn-success[disabled] {
opacity: 0.65;
}
.info-title-tips {
width: 100%;
margin: 0 auto;
margin-bottom: 25px;
padding-left: 25px;
}
.download_Qcode {
overflow: hidden;
padding: 10px 0;
}
.download_Qcode .item_down {
width: 100%;
text-align: center;
border-right: 1px solid #ececee;
text-align: center;
box-sizing: border-box;
}
.download_Qcode .item_down:last-child {
border-right: none;
}
.download_Qcode .qcode_title {
margin-bottom: 5px;
}
.download_Qcode .item_down img {
width: 120px;
}
.create_temp_view {
padding: 15px 20px;
}
.create_temp_view .line .tname {
text-align: left;
float: inherit;
}
.create_temp_view .info-r {
margin: 0;
}
.info-block {
display: inline-block;
height: 100%;
}
.verify_title {
color: #555;
text-align: center;
font-size: 20px;
height: 40px;
line-height: 40px;
margin-bottom: 20px;
}
.verify_item {
padding: 0 35px;
}
.verify_item .verify_vice_title {
font-size: 15.5px;
color: #666;
margin-bottom: 10px;
}
.verify_box {
background: #f8f8f8;
padding: 15px 25px;
margin-bottom: 20px;
border-radius: 4px;
}
.verify_box .verify_box_line {
height: 25px;
line-height: 25px;
font-size: 14px;
color: #444;
font-weight: 500;
}
.verify_box .verify_box_line span {
color: #666;
}
.verify_tips {
margin: 0 15px;
margin-top: 25px;
padding: 20px 25px;
font-size: 14px;
color: #666;
border-top: 1px solid #ececec;
}
.bt-w-menu {
width: 110px;
}
.bt-w-con {
margin-left: 110px;
}
/*消息推送模块*/
.layui-layer.layui-layer-page.panel_push_form .bt-form .form-checkbox-label {
height: 18px;
line-height: 18px;
}
.layui-layer.layui-layer-page.panel_push_form .bt-form .inlineBlock.group span.unit {
line-height: 28px;
}
/*消息推送模块 end*/
#panel_menu_tab .bterror {
text-decoration: underline;
}
.line-row-tips i,
.line-title i {
display: inline-flex;
line-height: 1.4;
background-color: yellow;
font-style: normal;
}
.show-default {
position: relative;
top: -3px;
display: inline-block;
width: 4px;
height: 4px;
margin-left: 6px;
background-color: #cbcbcb;
border-radius: 50%;
}
/* 配置模块图标 */
.config-alert-icon {
width: 36px;
height: 36px;
display: inline-block;
background: url(../../static/img/config_alert.png);
background-size: 100%;
border-radius: 7px;
margin-right: 8px;
}
.alert-icon-mail {
background-position: 0 36px;
}
.alert-icon-feishu {
background-position: 0 144px;
}
.alert-icon-weixin {
background-position: 0 72px;
}
.alert-icon-tg {
background-position: 0 180px;
}
.alert-icon-wx_account {
background-position: 0 108px;
}
.alert-config-content {
display: inline-block;
vertical-align: top;
}
.alert-config-content span {
font-weight: bold;
font-size: 14px;
}
.alert-config-content p {
font-size: 12px;
}
/* 添加告警任务 */
.panel_alert_task_view .bt_select_updown .bt_select_list {
max-height: 140px;
}
#addAlertTask .line .tname {
height: 35px;
line-height: 35px;
font-size: 13px;
}
#addAlertTask .bt_select_updown {
height: 35px;
line-height: 35px;
}
#addAlertTask .info-r .bt-input-text {
height: 35px;
line-height: 35px;
}
#addAlertTask .bt_select_updown .bt_select_value {
height: 33px;
line-height: 33px;
}
#addAlertTask .bt_select_updown .bt_select_list .item {
height: 30px;
line-height: 30px;
}
#addAlertTask .bt_select_updown .bt_select_content {
font-size: 13px;
}
#addAlertTask .btn {
font-size: 13px;
padding: 7px 30px;
}
#addAlertTask .line .info-r {
margin-bottom: 15px;
}
.alert-view-box .bt_select_updown .bt_select_list {
top: 35px;
}
/* 添加告警任务 end*/
</style>
{% endblock %} {% block scripts %}
<script src="{{g.cdn_url}}/js/jquery-2.2.4.min.js"></script>
<script src="{{g.cdn_url}}/language/{{session['lan']}}/lan.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script src="{{g.cdn_url}}/js/jsencrypt.min.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script src="{{g.cdn_url}}/js/tools.js?version_20200217={{g['version']}}"></script>
<script src="{{g.cdn_url}}/js/public.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script src="{{g.cdn_url}}/js/public_backup.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script src="{{g.cdn_url}}/js/bt_upload.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script src="{{g.cdn_url}}/amd/require.min.js" data-main="{{g.cdn_url}}/amd/main"></script>
<script>
var sessionInfo = {
title: "{{session['title']}}",
username: "{{session['username']}}",
statusCode: "{{data['status_code']}}",
};
$.fn.serializeObject = function () {
var o = {};
var a = this.serializeArray();
$.each(a, function () {
if (o[this.name]) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
};
</script>
{% endblock %}
</div>

View File

@@ -0,0 +1,488 @@
{% extends "layout.html" %}
{% block content %}
<style>
.main-content > .container-fluid {
padding-bottom: 50px;
}
.control-item-block .row {
padding: 0 15px;
}
/* 监控右键进程 */
.echarts-tooltip {
width: 400px;
/* padding: 10px; */
display: flex;
flex-direction: column;
color: #444;
border-radius: 4px;
transition: all 500ms;
}
.echarts-tooltip .formatter-header {
padding: 0 15px;
background-color: #f9f9f9;
height: 40px;
line-height: 40px;
font-size: 14px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
display: flex;
align-items: center;
}
.echarts-tooltip .formatter-header img {
margin-right: 5px;
height: 20px;
width: 20px;
}
.echarts-tooltip .formatter-body {
padding: 20px;
}
.select-data {
display: flex;
align-items: center;
font-size: 14px;
margin-bottom: 8px;
padding: 0 2px;
}
.select-data .flex {
display: flex;
align-items: center;
margin-right: 15px;
}
.select-data .flex:last-child {
margin-right: 0;
}
.select-data .status {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #ff8c00;
margin-right: 5px;
}
.process-top5.hide {
display: none;
}
.process-header {
padding-left: 8px;
margin-left: 2px;
margin-bottom: 15px;
border-bottom: 1px solid #f5f5f5;
}
.process-top5 table {
width: 100%;
border-collapse: collapse;
}
.process-top5 table thead th,
.process-top5 table tbody td {
padding: 5px 10px;
border: 0;
font-size: 12px;
}
.process-top5 table thead tr,
.process-top5 table tbody tr {
border: none;
}
.process-top5 table thead tr {
background: #f2f7fed6;
color: #555;
}
.process-top5 table thead th {
height: 24px;
line-height: 24px;
text-align: left;
font-weight: 600;
}
.process-top5 table tbody tr {
height: 22px;
line-height: 22px;
text-align: left;
}
.process-top5 table tbody tr {
border-bottom: 0.5px solid #ececec;
}
.process-top5 table tbody tr:last-child {
border-bottom: none;
}
/* end */
.control-item {
display: inline-block;
padding: 0 25px;
font-size: 15px;
height: 50px;
line-height: 50px;
cursor: pointer;
}
.control-item.active {
color: #20a53a;
font-weight: 500;
border-bottom: #20a53a 2px solid;
}
.bt-crontab-select-button {
display: inline-block;
position: relative;
border: 1px solid #ccc;
border-radius: 2px;
font-size: 12px;
vertical-align: middle;
}
.bt-crontab-select-button .select-picker-search:hover {
background: #ebf1f5;
cursor: pointer;
}
.bt-crontab-select-button .select-picker-search {
height: 25px;
line-height: 25px;
border: none;
outline: none;
}
.bt-crontab-select-button .select-picker-search span {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
display: block;
}
.bt-crontab-select-button .picker-text-list {
margin-right: 25px;
padding-left: 10px;
}
.bt-crontab-select-button input {
padding: 5px 10px;
height: 35px;
line-height: 35px;
border: none;
border-bottom: 1px solid #ccc;
}
.bt-crontab-select-button input:focus {
outline: none;
}
.bt-crontab-select-button .only-one {
position: relative;
}
.bt-crontab-select-button .down-select-full {
display: inline-block;
width: 0;
height: 0;
border-width: 5px;
border-style: solid;
border-color: #777 transparent transparent transparent;
position: absolute;
top: 10px;
right: 10px;
}
.bt-crontab-select-button .select-list-item {
transition: all 500ms;
background: #fff;
position: absolute;
top: 28px;
display: none;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
border-radius: 4px;
z-index: 9999;
}
.bt-crontab-select-button .select-list-item.active {
display: block;
z-index: 2;
}
.bt-crontab-select-button .select-list-item ul {
overflow: auto;
border-radius: 4px;
}
.bt-crontab-select-button .select-list-item li:hover {
background: #20a53a;
color: #fff;
}
.bt-crontab-select-button .only-one .select-list-item li.active {
background-color: #20a53a;
color: #fff;
}
.bt-crontab-select-button .select-list-item li .select-name-full {
white-space: nowrap;
padding: 0 23px 0 10px;
height: 30px;
line-height: 30px;
cursor: pointer;
display: inline-block;
}
.bt-crontab-select-button .select-check-full {
display: inline-block;
height: 16px;
width: 16px;
border-radius: 1px;
margin-right: 5px;
cursor: pointer;
border: 1px solid #c2c2c2;
position: relative;
line-height: 20px;
transition: all 200ms;
vertical-align: sub;
}
.bt-crontab-select-button .select-list-item li.active .select-check-full {
border: none;
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: 400;
line-height: 1;
-webkit-font-smoothing: antialiased;
background: #5fb878;
color: #fff;
}
.bt-crontab-select-button .select-list-item li.active .select-check-full:after {
content: '\e013';
font-size: 12px;
transform: scale(0.85);
position: absolute;
left: 2px;
top: 2px;
}
</style>
<div class="main-content">
<div class="container-fluid">
<div class="pos-box bgw mtb15">
<div class="tab-list" id="tabs-cut">
<div class="tabs-item active" data-name="control">{{data['lan']['H2']}}</div>
</div>
</div>
<div class="control-content">
<div class="control-item-block">
<div class="safe container-fluid radius4 bgw mb15 pd15" style="overflow: hidden">
<div class="mr50 pull-left">
<div class="ss-text pull-left">
<em>{{data['lan']['C1']}}</em>
<div class="ssh-item" id="openJK"></div>
</div>
</div>
<div class="mr50 pull-left">
<div class="ss-text pull-left">
<em>{{data['lan']['C2']}}</em>
<input class="bt-input-text" id="saveDay" value="" type="number" />
</div>
<div class="ss-text pull-left" style="margin-left: 10px">
<button class="btn btn-default btn-sm" type="button" onclick="controlObj.conTrolView.SetControl(true);">{{data['lan']['C3']}}</button>
</div>
</div>
<div class="mr50 pull-left" style="padding-left: 50px; border-left: #ccc 1px solid; margin-right: 0">
<button class="btn btn-default btn-sm" type="button" onclick="controlObj.conTrolView.CloseControl()">{{data['lan']['C4']}}</button>
</div>
</div>
<div class="control">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 pull-left pd0 view0">
<div class="mb15">
<div class="bgw pb15 radius4">
<div class="title c6 plr15 mb15">
<h3 class="c-tit f16">{{data['lan']['LOAD_BALANCE']}}</h3>
<div class="searcTime pull-right">
<span class="tit">{{data['lan']['S1']}}</span><span class="gt" onclick="controlObj.conTrolView.Wday(1,'getload')">{{data['lan']['D1']}}</span
><span class="gt on" onclick="controlObj.conTrolView.Wday(0,'getload')">{{data['lan']['D2']}}</span>
<span class="gt" onclick="controlObj.conTrolView.Wday(7,'getload')">{{data['lan']['D3']}}</span
><span class="gt" onclick="controlObj.conTrolView.Wday(30,'getload')">{{data['lan']['D4']}}</span>
<div class="ss">
<span class="st">{{data['lan']['S2']}}</span>
<div class="time">
<span class="bt">{{data['lan']['G1']}}<input class="btime" type="text" value="2017/1/10 00:00:00" /></span>
<span class="et">{{data['lan']['G2']}}<input class="etime" type="text" value="2017/1/13 00:00:00" /></span>
<div class="sbtn time_range_submit" data-type="getload">{{data['lan']['G3']}}</div>
</div>
</div>
</div>
</div>
<div id="getloadview" style="width: 100%; height: 330px"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-6 pull-left pd0 view1">
<div class="pr8">
<div class="bgw pb15 radius4">
<div class="title c6 plr15">
<h3 class="c-tit f16">{{data['lan']['T1']}}</h3>
<div class="searcTime pull-right">
<span class="tit">{{data['lan']['S1']}}</span><span class="gt" onclick="controlObj.conTrolView.Wday(1,'cpu')">{{data['lan']['D1']}}</span
><span class="gt on" onclick="controlObj.conTrolView.Wday(0,'cpu')">{{data['lan']['D2']}}</span>
<span class="gt" onclick="controlObj.conTrolView.Wday(7,'cpu')">{{data['lan']['D3']}}</span
><span class="gt" onclick="controlObj.conTrolView.Wday(30,'cpu')">{{data['lan']['D4']}}</span>
<div class="ss">
<span class="st">{{data['lan']['S2']}}</span>
<div class="time">
<span class="bt">{{data['lan']['G1']}}<input class="btime" type="text" value="2017/1/10 00:00:00" /></span>
<span class="et">{{data['lan']['G2']}}<input class="etime" type="text" value="2017/1/13 00:00:00" /></span>
<div class="sbtn time_range_submit" data-type="cpu">{{data['lan']['G3']}}</div>
</div>
</div>
</div>
</div>
<div id="cpuview" style="width: 100%; height: 330px"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-6 pull-left pd0 view2">
<div class="pl7">
<div class="bgw pb15 radius4">
<div class="title c6 plr15">
<h3 class="c-tit f16">{{data['lan']['T2']}}</h3>
<div class="searcTime pull-right">
<span class="tit">{{data['lan']['S1']}}</span><span class="gt" onclick="controlObj.conTrolView.Wday(1,'mem')">{{data['lan']['D1']}}</span
><span class="gt on" onclick="controlObj.conTrolView.Wday(0,'mem')">{{data['lan']['D2']}}</span>
<span class="gt" onclick="controlObj.conTrolView.Wday(7,'mem')">{{data['lan']['D3']}}</span
><span class="gt" onclick="controlObj.conTrolView.Wday(30,'mem')">{{data['lan']['D4']}}</span>
<div class="ss">
<span class="st">{{data['lan']['S2']}}</span>
<div class="time">
<span class="bt">{{data['lan']['G1']}}<input class="btime" type="text" value="2017/1/10 00:00:00" /></span>
<span class="et">{{data['lan']['G2']}}<input class="etime" type="text" value="2017/1/13 00:00:00" /></span>
<div class="sbtn time_range_submit" data-type="mem">{{data['lan']['G3']}}</div>
</div>
</div>
</div>
</div>
<div id="memview" style="width: 100%; height: 330px"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-6 pull-left pd0 view1">
<div class="pr8">
<div class="bgw pb15 radius4">
<div class="title c6 plr15 mb15">
<h3 class="c-tit f16">{{data['lan']['T3']}}</h3>
<div class="searcTime pull-right">
<span class="tit">{{data['lan']['S1']}}</span><span class="gt" onclick="controlObj.conTrolView.Wday(1,'disk')">{{data['lan']['D1']}}</span
><span class="gt on" onclick="controlObj.conTrolView.Wday(0,'disk')">{{data['lan']['D2']}}</span>
<span class="gt" onclick="controlObj.conTrolView.Wday(7,'disk')">{{data['lan']['D3']}}</span
><span class="gt" onclick="controlObj.conTrolView.Wday(30,'disk')">{{data['lan']['D4']}}</span>
<div class="ss">
<span class="st">{{data['lan']['S2']}}</span>
<div class="time">
<span class="bt">{{data['lan']['G1']}}<input class="btime" type="text" value="2017/1/10 00:00:00" /></span>
<span class="et">{{data['lan']['G2']}}<input class="etime" type="text" value="2017/1/13 00:00:00" /></span>
<div class="sbtn time_range_submit" data-type="disk">{{data['lan']['G3']}}</div>
</div>
</div>
</div>
</div>
<div style="position: relative">
<div id="diskview" style="width: 100%; height: 330px"></div>
<div style="position: absolute; top: 15px; left: 6%" class="hide">
{{data['lan']['UNIT']}}
<div class="bt-crontab-select-button">
<div class="bt-select-full only-one disk-unit">
<div class="select-picker-search">
<span class="picker-text-list">KB/s</span>
<span class="down-select-full"></span>
</div>
<div class="select-list-item">
<ul style="width: auto; max-height: auto">
<li data-attr="KB/s"><span class="select-name-full">KB/s</span></li>
<li data-attr="MB/s"><span class="select-name-full">MB/s</span></li>
<li data-attr="GB/s"><span class="select-name-full">GB/s</span></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-6 pull-left pd0 view2">
<div class="pl7">
<div class="bgw pb15 radius4">
<div class="title c6 plr15 mb15">
<h3 class="c-tit f16">
<span class="mr5" style="vertical-align: middle">{{data['lan']['T4']}}:</span>
<select class="bt-input-text hide" style="vertical-align: middle; font-size: 13px" name="network-io">
<option value="all">{{ data['lan']['ALL'] }}</option>
</select>
</h3>
<div class="searcTime pull-right">
<span class="tit">{{data['lan']['S1']}}</span>
<span class="gt" onclick="controlObj.conTrolView.Wday(1,'network')">{{data['lan']['D1']}}</span>
<span class="gt on" onclick="controlObj.conTrolView.Wday(0,'network')">{{data['lan']['D2']}}</span>
<span class="gt" onclick="controlObj.conTrolView.Wday(7,'network')">{{data['lan']['D3']}}</span>
<span class="gt" onclick="controlObj.conTrolView.Wday(30,'network')">{{data['lan']['D4']}}</span>
<div class="ss">
<span class="st">{{data['lan']['S2']}}</span>
<div class="time">
<span class="bt">{{data['lan']['G1']}}<input class="btime" type="text" value="2017/1/10 00:00:00" /></span>
<span class="et">{{data['lan']['G2']}}<input class="etime" type="text" value="2017/1/13 00:00:00" /></span>
<div class="sbtn time_range_submit" data-type="network">{{data['lan']['G3']}}</div>
</div>
</div>
</div>
</div>
<div style="position: relative">
<div id="network" style="width: 100%; height: 330px"></div>
<div style="position: absolute; top: 15px; left: 6%" class="hide">
{{data['lan']['UNIT']}}
<div class="bt-crontab-select-button">
<div class="bt-select-full only-one network-unit">
<div class="select-picker-search">
<span class="picker-text-list">KB/s</span>
<span class="down-select-full"></span>
</div>
<div class="select-list-item">
<ul style="width: auto; max-height: auto">
<li data-attr="KB/s"><span class="select-name-full">KB/s</span></li>
<li data-attr="MB/s"><span class="select-name-full">MB/s</span></li>
<li data-attr="GB/s"><span class="select-name-full">GB/s</span></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="/static/js/echarts.min.js"></script>
<script src="/static/js/control.js?date={{g['version']}}"></script>
<script type="text/javascript">
var tabsCut = $('#tabs-cut'),controlType = bt.get_cookie('controlType') || 'control';
tabsCut.on('click', '.tabs-item', function() {
var name = $(this).data('name'),index = $(this).index();
bt.set_cookie('controlType', name);
$(this).addClass('active').siblings().removeClass('active');
$('.control-content .control-item-block').eq(index).show().siblings().hide()
switch (name) {
case 'control':
controlObj.conTrolView.init();
break;
}
});
controlObj.conTrolView.init();
</script>
{% endblock %}

View File

@@ -0,0 +1,171 @@
{% extends "layout.html" %}
{% block content %}
<div class="main-content">
<div class="container-fluid" style="padding-bottom:54px">
<div class="pos-box bgw mtb15">
<div class="tab-list">
<div class="tabs-item active">{{data['lan']['H2']}}</div>
</div>
</div>
<div class="setbox bgw mtb15 radius4">
<div class="title c6 plr15">
<h3 class="f16">{{data['lan']['H3']}}</h3>
</div>
<div class="setting-con ptb20" id="crontabForm" style="min-height:350px"></div>
</div>
<div class="setbox bgw mtb15 radius4">
<div class="title c6 plr15">
<h3 class="f16">{{data['lan']['H4']}}</h3>
</div>
<div id="crontabTabel" class="pd15 setting-con"></div>
</div>
</div>
</div>
<style>
/* tools.js */
.bt-form .line label.cursor-pointer i.form-checkbox{
display: inline-block;
width: 16px;
height: 16px;
border: 1px solid #ccc;
background-color: #fff;
vertical-align: top;
position: relative;
border-radius: 2px;
vertical-align:middle;
}
.bt-form .line label.cursor-pointer i.form-checkbox.active{
background-color: #20a53a;
border-color: #20a53a;
}
.bt-form .line label.cursor-pointer i.form-checkbox.active::after {
content: '';
position: absolute;
display: block;
left: 50%;
top: 50%;
margin-left: -2.5px;
margin-top: -6px;
width: 5px;
height: 10px;
border: solid #fff;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
/* tools.js end */
.layer-create-content .layui-layer-content {
overflow: inherit;
}
.crontab_form {
padding: 15px 45px;
}
.crontab_form .inlineBlock {
vertical-align: middle;
}
.crontab_form .tname {
font-size: 13px;
}
.crontab_form .line .tname {
height: 35px;
line-height: 35px;
}
.crontab_form .line .info-r {
margin-bottom: 15px;
}
.crontab_form .bt_select_updown {
height: 35px;
line-height: 35px;
}
.crontab_form .bt-input-text {
height: 35px;
line-height: 35px;
padding-left: 10px;
font-size: 13px;
}
.crontab_form .bt_select_updown .bt_select_list {
max-height: 240px;
}
.crontab_form .inlineBlock.group span {
height: 35px;
line-height: 33px
}
.crontab_form .bt_select_updown .bt_select_value {
height: 33px;
line-height: 33px;
}
.crontab_form .bt_select_updown .bt_select_content {
font-size: 13px;
}
.crontab_form .bt_select_updown .bt_select_list {
top: 35px;
}
.crontab_form .bt_select_updown .bt_select_list .item {
height: 30px;
line-height: 30px;
}
.crontab_form .inlineBlock {
margin-right: 10px;
}
.crontab_form .btn {
font-size: 13px;
padding: 7px 30px;
}
#crontabTabel .divtable thead{
position: relative;
z-index: 999;
}
#crontabTabel .divtable{
border: 1px solid #ddd;
}
#crontabTabel table{
border: none;
}
.layer-alarm-channel .bt-w-main{ height:430px}
/* 消息通道 */
.channel_config_view a.layui-layer-btn2{
background-color: #fff;
border: 1px solid #ccc !important;
color: #555;
font-weight:initial;
float: left;
}
.channel_config_view a.layui-layer-btn2:hover{
color: #fff;
background-color: #10952a;
border-color: #398439;
}
.email_alarm thead{
position: relative;
z-index: 11;
}
/* 消息通道 end*/
</style>
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="{{g.cdn_url}}/js/crontab.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script type="text/javascript">
crontab.init()
setCookie('serverType',"{{session['webserver']}}");
</script>
{% endblock %}

View File

@@ -0,0 +1,260 @@
{% extends "layout.html" %} {% block content %}
<style>
.tab-view-box {
padding: 15px;
}
.db_table_view > .tab-con {
padding: 0;
overflow: inherit;
}
.info-title-tips .glyphicon-alert {
margin-right: 10px;
color: #f39c12;
}
.db_tools_info {
display: flex;
justify-content: space-between;
}
.db_tools_info .info {
display: flex;
align-items: center;
height: 35px;
padding: 0 15px;
border-radius: 4px;
background: #ececec;
color: #555;
font-weight: 600;
font-size: 13px;
}
.db_tools_info .info .name {
max-width: 240px;
margin-right: 12px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
#bt_database_table .tootls_top .pull-left button:nth-child(5):after,
#bt_sqldatabase_table .tootls_top .pull-left button:nth-child(3):after,
#bt_mongodb_table .tootls_top .pull-left button:nth-child(5):after,
#bt_redis_view .tool_list .emptyRedisDB:after {
content: ' ';
position: relative;
left: -72px;
border-left: 1px solid #ececec;
}
#bt_redis_view .tool_list .emptyRedisDB:after {
left: -80px;
}
.tool_list {
position: relative;
justify-content: space-between;
margin-bottom: 10px;
}
.tool_list .emptyRedisDB {
margin-left: 30px;
}
.tool_list_right {
align-items: center;
}
.tool_list_right .tips {
margin-right: 12px;
color: #f0ad4e;
}
.tool_list_right .bt-input-text {
margin-right: 0;
}
/* 清空数据库样式 */
.rule_content_list {
overflow: auto;
width: 230px;
max-height: 200px;
border: 1px solid #ececec;
padding: 5px;
border-radius: 2px;
}
.rule_content_list li {
line-height: 30px;
}
.rule_content_list > li:last-child {
border-bottom: none;
}
.rule_content_list .rule_checkbox_group {
height: 30px;
line-height: 30px;
position: relative;
font-size: 0px;
cursor: pointer;
padding-left: 10px;
}
.bt_checkbox_groups.active {
border: none;
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: 400;
line-height: 1;
-webkit-font-smoothing: antialiased;
background: #20a53a;
color: #fff;
}
.rule_content_list .bt_checkbox_groups {
position: relative;
top: 7px;
}
.rule_checkbox_find_list {
background: #fff;
cursor: pointer;
}
.rule_checkbox_find_list li {
position: relative;
}
.rule_content_list .rule_checkbox_group:hover {
background-color: #efefef;
cursor: pointer;
}
.rule_checkbox_find_list .rule_checkbox_group {
background: transparent;
padding-left: 45px;
margin-left: 10px;
}
.rule_content_list .rule_checkbox_group .glyphicon {
width: 25px;
display: inline-block;
height: 30px;
line-height: 28px;
text-align: center;
color: #bbb;
}
.rule_checkbox_list span, .rule_content_list .rule_checkbox_title {
font-size: 12px;
color: #666;
vertical-align: middle;
display: inline-block;
}
.rule_content_list .rule_checkbox_title {
margin-left: 10px;
}
.rule_content_list .rule_checkbox_title i {
font-style: normal;
color: #bbb;
}
.bt_checkbox_groups {
display: inline-block;
height: 16px;
width: 16px;
border-radius: 1px;
cursor: pointer;
border: 1px solid #c2c2c2;
position: relative;
text-align: center;
line-height: 20px;
margin: 0;
vertical-align: top;
}
.bt_checkbox_groups.active:after {
content: "\e013";
font-size: 12px;
transform: scale(.85);
position: absolute;
left: 2px;
top: 2px;
}
.choose_redis_library.layui-layer-page .layui-layer-content{
overflow: inherit;
}
</style>
<div class="main-content pb55">
<div class="container-fluid">
<div class="database-pos pos-box bgw mtb15">
<div class="tab-list">
<div class="tabs-item" data-type="mysql">{{ data['lan']['H3'] }}</div>
<div class="tabs-item" data-type="sqlserver">{{ data['lan']['H4'] }}</div>
<div class="tabs-item" data-type="mongodb">{{ data['lan']['H5'] }}</div>
<div class="tabs-item" data-type="redis">{{ data['lan']['H6'] }}</div>
<div class="tabs-item" data-type="pgsql">{{ data['lan']['H7'] }}</div>
</div>
</div>
<div class="db_table_view safe bgw mtb15 pd15 tab-view-box">
<div class="tab-con">
<div class="tab-con-block hide">
<div class="info-title-tips">
<p>
<span class="glyphicon glyphicon-alert"></span>
<span>After adding the database, be sure to</span>
<a class="btlink" href="/crontab">[Cron]</a>
<span>page adds scheduled backup tasks to ensure your data security.</span>
</p>
</div>
<div id="bt_database_table"></div>
</div>
<div class="tab-con-block hide">
<div id="bt_sqldatabase_table"></div>
</div>
<div class="tab-con-block hide">
<div id="bt_mongodb_table"></div>
</div>
<div class="tab-con-block hide">
<div id="bt_redis_view">
<div class="tool_list flex">
<div>
<button type="button" class="btn btn-success btn-sm mr5 addRedisDB">
<span>Add Key</span>
</button>
<button type="button" class="btn btn-default btn-sm mr5 RedisCloudDB">
<span>Remote DB</span>
</button>
<button type="button" class="btn btn-default btn-sm mr5 backupRedis">
<span>Backup list</span>
</button>
<button type="button" class="btn btn-default btn-sm emptyRedisDB">
<span>Clear DB</span>
</button>
</div>
<div class="tool_list_right flex">
<span class="mr5 tips">
<span class="glyphicon glyphicon-info-sign"></span>
<span>All current action items are associated with</span>
</span>
</div>
</div>
<div class="redis_content_view"></div>
</div>
</div>
<div class="tab-con-block hide">
<div id="bt_pgsql_table"></div>
</div>
</div>
<div class="mask_layer hide">
<div class="prompt_description"></div>
</div>
</div>
<form id="toPHPMyAdmin" public-data="{{session['phpmyadminDir']}}/index.php" action="{{session['phpmyadminDir']}}/index.php" method="post" style="display: none" target="_blank">
<input type="text" name="pma_username" id="pma_username" value="" />
<input type="password" name="pma_password" id="pma_password" value="" />
<input type="text" name="server" value="1" />
<input type="text" name="target" value="index.php" />
<input type="text" name="db" id="db" value="" />
</form>
</div>
</div>
{% endblock %} {% block scripts %} {{ super() }}
<script type="text/javascript" src="/static/js/bt_upload.js?version={{g['version']}}"></script>
<script src="/static/js/database.js?date={{g['version']}}"></script>
<script type="text/javascript">
bt.set_cookie('backup_path', "{{session['config']['backup_path']}}");
</script>
{% endblock %}

View File

@@ -0,0 +1,427 @@
{% extends "layout.html" %}
{% block content %}
<div class="main-content pb55">
<div class="container-fluid">
<div class="pos-box bgw mtb15">
<div class="tab-list" id="cutMode">
<div class="tabs-item" data-type="overview" style="display: none;">Overview</div>
<div class="tabs-item" data-type="container">Container</div>
<div class="tabs-item" data-type="compose">Compose</div>
<div class="tabs-item" data-type="model">Compose template</div>
<div class="tabs-item" data-type="image">Image</div>
<div class="tabs-item" data-type="host" style="display: none;">Host</div>
<div class="tabs-item" data-type="network">Network</div>
<div class="tabs-item" data-type="volume">Volume</div>
<div class="tabs-item" data-type="registry">Repository</div>
<div class="tabs-item" data-type="setup">Settings</div>
</div>
</div>
<div class="info-title-tips">
<p><span class="glyphicon glyphicon-alert" style="color: #f39c12; margin-right: 10px;"></span>[Reminder] This function is exclusive to the professional version, it is currently in the testing phase can be used by all users</p>
</div>
<div class="dk-container-view bgw mtb15 pd15 tab-view-box">
<div class="tab-con" style="padding: 0;overflow: inherit;">
<div class="tab-con-block">
</div>
<div class="tab-con-block">
<div id="dk_container_table"></div>
</div>
<div class="tab-con-block">
<div id="dk_compose_table"></div>
</div>
<div class="tab-con-block">
<div id="dk_model_table"></div>
</div>
<div class="tab-con-block">
<div id="dk_image_table"></div>
</div>
<div class="tab-con-block">
<div id="dk_host_table"></div>
</div>
<div class="tab-con-block">
<div id="dk_network_table"></div>
</div>
<div class="tab-con-block">
<div id="dk_volume_table"></div>
</div>
<div class="tab-con-block">
<div id="dk_registry_table"></div>
</div>
<div class="tab-con-block">
<div class="dk_setup_form" id="dk_setup_form"></div>
</div>
</div>
<div class="mask_layer" style="display: none;"><div class="prompt_description"></div></div>
</div>
</div>
<style>
.mask_layer .prompt_description {
width: 500px;
}
.tab-view-box{
position: relative;
}
.add_container .bt-form th,
.add_container .bt-form td{
padding: 4px!important;
}
.add_container .line-tname,
.add_container span.minus{
padding:0 20px
}
.add_container span.plus{
margin-left: 5px;
font-size: 18px;
cursor: pointer;
}
.add_container span.plus:hover{
background-color: #20a53a;
color:#fff
}
.add_container .divtable {
width: 482px;
}
.add_container .divtable table td {
height: 30px;
}
#container_box .bt-form .tname,
.add_project_form .bt-form .tname,
.add_container .tabpanel:nth-of-type(2) .tname {
width: 150px;
}
.dk_setup_form .bt-form .tname,
.add_registry_form .bt-form .tname {
width: 170px;
}
.dk_setup_form .bt-form .line .info-r {
margin-left: 170px;
}
.cu-pointer{
cursor: pointer;
}
.dk-container-view .size_ellipsis{
vertical-align: bottom;
}
.add_container .unit{
display: inline-block;
border: 1px solid #ccc;
border-left: 0;
border-radius: 2px;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
background-color: #f6f6f6;
vertical-align: bottom;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
ul.dk_volumes{
transition: all 500ms;
background: #fff;
position: absolute;
top: 30px;
left: 0;
display: none;
box-shadow: 0 1px 5px rgb(0 0 0 / 50%);
border-radius: 1px;
width: 155px;
z-index: 999;
max-height: 200px;
overflow: auto;
}
ul.dk_volumes li {
height: 28px;
line-height: 28px;
padding: 0 10px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
ul.dk_volumes li.active{
color: #fff;
background-color: #20a53a;
}
ul.dk_volumes li:hover {
background-color: #f2f2f2;
}
.dk_status_select{
border: 1px solid #ccc;
padding: 0px 2px;
position: relative;
background-color: #fff;
}
.dk_status_select:after{
content: "";
width: 6px;
height: 6px;
border-left: 1px solid #666;
border-bottom: 1px solid #666;
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
position: absolute;
right: 7px;
top: 5px;
}
.dk_status_select a {
/* color: #333!important; */
display: block;
}
.dk_status_select .glyphicon{
display: none;
}
ul.dk_status_select_list{
position: fixed;
background: #fff;
border: 1px solid #c9c9c9;
z-index: 10;
display: block;
width: 63px;
margin-top: 5px;
}
ul.dk_status_select_list li{
height: 24px;
line-height: 24px;
padding:0 4px;
cursor: pointer;
}
ul.dk_status_select_list li:hover{
background-color: #20a53a;
color: #fff;
}
/* json树 */
ul.jsontree_tree{
margin-left:0
}
.jsontree_value_string{
word-break: break-all;
}
/* json树 end*/
/* 容器监控样式 */
.cont-chart-dialog{
font-size: 0;
}
.cont_chart_block {
display: inline-block;
width: 49.5%;
}
.cont_chart_line,
.cont_chart_block {
border-radius: 4px;
border: 1px solid #EBEEF5;
font-size: 12px;
margin-bottom: 10px;
}
.cont_chart_block:nth-child(2n-1){
margin-left: 10px;
}
.cont_chart_child_title{
border-bottom: 1px solid #EBEEF5;
padding: 10px;
}
.cont_chart_basis {
display: inline-block;
padding: 15px;
font-size: 13px;
}
.cont_chart_basis span {
color: #919191;
}
.bt-ico-ask a{
color: #fb7d00;
}
.bt-ico-ask:hover a,
.bt-ico-ask a:hover{
color:#fff
}
/* 容器监控样式 end */
/* 添加Yaml模板 */
.model_sc_top{
position: relative;
}
.model_sc_child {
display: inline-block;
position: absolute;
right: 110px;
top: 6px;
}
.model_sc_child::after {
content: 'Include subdir';
margin-left: 5px;
}
/* 添加Yaml模板 end */
</style>
<script type="text/template" id="aceTmplate">
<div id="ace_conter">
<div class="ace_header" style="top: 0">
<span class="saveFile"><i class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></i><span>Save</span></span>
<span class="saveFileAll"><i class="glyphicon glyphicon-duplicate" aria-hidden="true"></i><span>Save All</span></span>
<span class="refreshs"><i class="glyphicon glyphicon-refresh" aria-hidden="true"></i><span>Refresh</span></span>
<span class="searchs"><i class="glyphicon glyphicon-search" aria-hidden="true"></i><span>Search</span></span>
<span class="replaces"><i class="glyphicon glyphicon-retweet" aria-hidden="true"></i><span>Replace</span></span>
<span class="jumpLine"><i class="glyphicon glyphicon-pushpin" aria-hidden="true"></i><span>JumpLine</span></span>
<span class="fontSize"><i class="glyphicon glyphicon-text-width" aria-hidden="true"></i><span>Font</span></span>
<span class="themes"><i class="glyphicon glyphicon-magnet" aria-hidden="true"></i><span>Theme</span></span>
<span class="setUp"><i class="glyphicon glyphicon-cog" aria-hidden="true"></i><span>Set</span></span>
<span class="helps"><i class="glyphicon glyphicon-question-sign" aria-hidden="true"></i><span>Help</span></span>
<div class="pull-down" title="Hide toolbar" style="top: 0"><i class="glyphicon glyphicon-menu-down" aria-hidden="true"></i></div>
</div>
<div class="ace_overall" style="top: 35px;">
<!-- 编辑器目录 -->
<div class="ace_catalogue" style="left:0px">
<div class="ace_catalogue_title">Directory<div class="dir-menu-right"><span class="glyphicon glyphicon-minus" aria-hidden="true"></span></div></div>
<div class="ace_dir_tools">
<div class="upper_level" title="Return to parent directory">
<i class="glyphicon glyphicon-share-alt" aria-hidden="true"></i>
<span>Back</span>
</div>
<div class="search_file" title="Search File">
<i class="glyphicon glyphicon-search" aria-hidden="true"></i>
<span>Search</span>
</div>
<div class="new_folder" title="File/Folder">
<i class="glyphicon glyphicon-plus" aria-hidden="true"></i>
<span>New</span>
<ul class="folder_down_up">
<li data-type="2"><i class="folder-icon"></i>Folder</li>
<li data-type="3"><i class="text-icon"></i>File</li>
</ul>
</div>
<div class="refresh_dir" title="Refresh list">
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
<span>Refresh</span>
</div>
<span class="ace_editor_main_storey"></span>
</div>
<div class="ace_catalogue_list">
<ul class="cd-accordion-menu"></ul>
<ul class="ace_catalogue_menu">
<li data-type="0"><i class="glyphicon glyphicon-refresh" aria-hidden="true"></i><span>Refresh</span></li>
<li data-type="1"><i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i><span>Subdirectory</span></li>
<li data-type="2"><i class="folder-icon"></i><span>New Folder</span></li>
<li data-type="3"><i class="text-icon"></i><span>New File</span></li>
<li data-type="4"><i class="rename-icon img-icon"></i><span>Rename</span></li>
<li data-type="5"><i class="down-icon img-icon"></i><span>Download</span></li>
<li data-type="6"><i class="del-icon img-icon"></i><span>Delete</span></li>
</ul>
</div>
<div class="ace_catalogue_drag_icon">
<div class="drag_icon_conter"></div>
<span class="fold_icon_conter" title="Hide file directory"></span>
</div>
</div>
<!-- 编辑内容 -->
<div class="ace_editor_main">
<ul class="ace_conter_menu"></ul>
<div class="ace_conter_tips"><div class="tips"></div></div>
<div class="ace_editor_main_storey"></div>
<div class="ace_conter_editor"></div>
<div class="ace_conter_toolbar">
<div class="pull-left size_ellipsis">
<span data-type="path" class="size_ellipsis"></span>
</div>
<div class="pull-right">
<span data-type="cursor"></span>
<span data-type="history"></span>
<span data-type="tab"></span>
<span data-type="encoding"></span>
<span data-type="lang"></span>
</div>
</div>
</div>
<div class="ace_toolbar_menu" style="display: none;">
<div class="menu-item menu-tabs" style="display: none;">
<div class="menu-title">Set tabs</div>
<ul class="tabsType">
<li data-value="nbsp">Indent using spaces</li>
<li data-value="tabs">Indent using "Tab"</li>
</ul>
<div class="menu-title" style="margin-top:15px">Set the tab length</div>
<ul class="tabsSize">
<li data-value="1">1</li>
<li data-value="2">2</li>
<li data-value="3">3</li>
<li data-value="4">4</li>
<li data-value="5">5</li>
<li data-value="6">6</li>
</ul>
</div>
<div class="menu-item menu-encoding" style="display: none;">
<div class="menu-title">Set file save encoding format</div>
<ul></ul>
</div>
<div class="menu-item menu-files" style="display: none;">
<div class="menu-conter">
<input type="text" class="menu-input" placeholder="Input language mode">
<i class="fa fa-close" aria-hidden="true"></i>
</div>
<div class="menu-title">Set file language association</div>
<ul></ul>
</div>
<div class="menu-item menu-fontSize" style="display: none;">
<div class="menu-title">Set editor font size</div>
<div class="menu-conter">
<div class="set_font_size">
<input type="number" min="12" max="45"/>
<span class="tips error">Font setting range 12-45</span>
<button class="btn-save">Save</button>
</div>
</div>
</div>
<div class="menu-item menu-jumpLine" style="display: none;">
<div class="menu-title">Jump to specified line</div>
<div class="menu-conter">
<div class="set_jump_line">
<input type="number" min="0"/>
<button class="btn-save">Jump</button>
</div>
</div>
</div>
<div class="menu-item menu-themes" style="display: none;">
<div class="menu-title">Set editor theme</div>
<ul></ul>
</div>
<div class="menu-item menu-history" style="display: none;">
<div class="menu-title">History version</div>
<ul></ul>
</div>
<div class="menu-item menu-setUp" style="display: none;">
<div class="menu-title">Editor setting [ Some settings need to be restart editor ]</div>
<ul class="editor_menu">
<li data-type="wrap">Auto wrap</li>
<li data-type="enableLiveAutocompletion">Code autocomplete</li>
<li data-type="enableSnippets">Enable snippets</li>
<li data-type="showInvisibles">Show hidden characters</li>
<li data-type="showLineNumbers">Show line numbers</li>
</ul>
</div>
</div>
</div>
</div>
</script>
{% endblock %}
{% block scripts %}
{{ super() }}
<script type="text/javascript" src="{{g.cdn_url}}/js/docker.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script type="text/javascript" src="{{g.cdn_url}}/jsonTree/jsonTree.js"></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/jquery.dragsort-0.5.2.min.js" defer></script>
<script type="text/javascript" src="{{g.cdn_url}}/ace/ace.js" defer></script>
<script type="text/javascript" src="{{g.cdn_url}}/ace/ext-language_tools.js" defer></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/xterm.js" defer></script>
<link rel="stylesheet" href="{{g.cdn_url}}/jsonTree/jsonTree.css" />
{% endblock %}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
<!doctype html>
<html lang="zh">
<head>
<meta charset="utf-8">
<title>{0}</title>
</head>
<body>
<h1>{1}</h1>
<p>{2}</p>
</body>
</html>

View File

@@ -0,0 +1,132 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{0}</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
height: 100%;
width: 100%;
}
body {
display: flex;
align-items: center;
justify-content: center;
}
.container {
text-align: center;
padding: 80px 50px 100px 50px;
/* background-color: #f5f5f5; */
border-radius: 10px;
}
.content {
margin: 20px 0;
display: flex;
justify-content: center;
align-items: center;
}
.content input {
height: 40px;
line-height: 40px;
width: 420px;
padding: 0 8px;
outline: none;
border: #DCDFE6 1px solid;
color: #666;
font-size: 14px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.content input:focus {
border: #20a43a 1px solid;
}
.content button {
background-color: #20a43a;
border: none;
height: 40px;
line-height: 40px;
width: 100px;
color: #fff;
cursor: pointer;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.content button:hover {
background-color: #18842d;
}
.desc,
.footer {
font-size: 12px;
color: #666;
}
.desc{
margin-bottom:10px;
text-align: left;
margin-left: 12px;
}
.btlink {
color: #20a53a;
}
.jump-input{
border-color: #DCDFE6;
color:#999;
}
.help li{
color: #999;
margin-top: 5px;
}
code{
background-color: #DCDFE699;
font-weight: 600;
padding: 4px 6px;
border-radius: 2px;
color: #666;
}
</style>
</head>
<body>
<div class="container">
<div class="logo">
<svg style="width:80px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 93 100" style="enable-background:new 0 0 93 100" xml:space="preserve"><style>.st0{fill:#20a43a}.st1{fill:#18842d}</style><path class="st0" d="M46.6 99.9c-.2-.4-.2-.9-.3-1.4V33.3c0-.7 0-1.4-.1-2.1 0-.1 0-.2.2-.2s.4 0 .6.1c2.1.6 4.1 1.2 6.2 1.7.5.1.7.4.6.9v4.8c0 .6.2.9.8 1 1.3.3 2.6.7 3.9.9h.1c.5-.2.8.1 1.2.3h.1c.9 0 .1-.4.3-.6-.1-1.4 0-2.7 0-4.1 0-.3 0-.7.3-.9h.2c2.1.6 4.1 1.2 6.2 1.8.4.1.4.4.4.7v4.7c0 .5.1.8.6.9 1.2.3 2.5.6 3.7 1h.1c.6-.2 1.1.3 1.7.2.1 0 .2-.1.2-.2.2-.7 0-1.4.1-2.1.1-.9 0-1.8 0-2.6v-.2c0-.3.1-.2.3-.2 2 .6 4.1 1.2 6.1 1.8.5.2.4.5.4.9 0 5.1.1 10.2.1 15.3 0 6.3 0 12.6.1 18.9 0 .7-.2 1.5-.5 2.1-1.7 3.3-4 6-6.8 8.5-5 4.5-10.8 7.6-17 10.2-2.9 1.2-5.8 2-8.7 3.1-.2.1-.3.1-.3.1h-.1c-.2.1-.4.2-.6.2"/><path class="st1" d="M46.2 31.1c.2 0 .4.2.4.4v68.6l-.2-.1s-4-1.3-6-2c-6.9-2.5-13.4-5.6-19-10.3-3.2-2.6-5.9-5.5-7.9-9.1-.6-1-.9-2.2-.9-3.3.1-11.2.1-22.4.1-33.6 0-.7.2-.9.8-1.1 2-.5 3.9-1.1 5.9-1.7.3.3.2.7.2 1v3.3c0 .8.1.9.9.7.3-.1.6-.1.9 0 1.3-.3 2.6-.7 4-1 .5-.1.5-.4.5-.8v-4.8c0-.3 0-.6.4-.7l6.3-1.8c.3.3.2.7.2 1.1 0 1.4-.1 2.8.1 4.3.5.4.9-.1 1.4-.1.2-.1.4 0 .7 0 1.2-.3 2.4-.7 3.6-1 .6-.1.8-.4.8-1-.1-1.6 0-3.2 0-4.9 0-.3 0-.6.4-.7 2.1-.3 4.3-.9 6.4-1.4z"/><path class="st0" d="M46.6 15.6c1 .1 1.7.5 1.8 1.6.1.9.2 2.1.8 2.7.6.6 1.8.6 2.7.9 11.3 3.2 22.6 6.4 33.9 9.5.6.2 1 .2 1.5-.3l.1-.1c1.6-1.6 3.4-2.1 5.6-1.2.1.2-.2.3-.3.5-1.8 2.4-3.6 4.7-5.4 7.1-.3.5-.6.6-1.2.4-12.9-3.8-25.9-7.5-38.8-11.2-.4-.1-.8-.2-1.3-.1.3-1 .2-2.1.2-3.1v-5.4c.1-.6.1-1 .4-1.3z"/><path class="st1" d="M46.6 15.6v8.7c0 .5 0 .8-.5 1-3.6 1-7.1 2.1-10.6 3.1-9.5 2.7-19 5.5-28.4 8.2-.3.1-.7.3-1-.1-2-2.6-4-5.2-6.1-7.9l3.1-.4c.2 0 .3 0 .5.1s.3.2.4.3c1.6 1.7 3.4 1.7 5.6 1.1 11.2-3.3 22.5-6.4 33.7-9.5.5-.2.9-.4 1-1 .1-.7.4-1.4.5-2.1.1-1.1.8-1.5 1.8-1.5z"/><path class="st0" d="M46.6.2c1.6-.1 1.6-.1 1.9 1.4.4 1.9.7 3.9 1.1 5.8 0 .4.3.7.7.8 10.5 3.2 21 6.3 31.5 9.5.3.1.7.1.9-.2l.1-.1c1.7-1.5 3.6-2.3 5.9-1.2 0 .2-.3.3-.4.4-2 2-4.1 3.9-6 5.9-.5.5-.9.6-1.6.4-11.1-3.1-22.3-6.2-33.4-9.3-.3-.1-.6-.1-.8-.2-.1-.3-.2-.6-.1-.8V1.5c-.1-.4-.2-.9.2-1.3z"/><path class="st1" d="M46.6.2v12.3c0 .3 0 .7-.2 1-5.5 1.5-10.9 3.1-16.4 4.6-5.8 1.6-11.6 3.2-17.4 4.9-.8.2-1.2.1-1.8-.5-2-2.2-4.1-4.4-6-6.5.6-.1 1.6-.2 2.6-.4.4-.1.7.2.9.4 1.7 1.7 3.4 1.6 5.6.9 9.5-3 19.2-5.8 28.7-8.7.6-.2.9-.5 1-1.1.3-2 .8-3.9 1.1-5.9.1-.9.4-1.3 1.4-1.1.2.1.3.1.5.1z"/><path class="st0" d="M21.5 44.1c-.5.2-1.1.4-1.7.5-.5.1-.4-.4-.4-.6v-4.9h.1c2 .3 2 .3 2 2.3-.1.8 0 1.7 0 2.7z"/><path d="M73.7 39v.3c.1 1.8.1 3.5 0 5.3-.7-.1-1.4-.4-2.1-.5v-3.8c0-.6.2-.9.8-1 .5-.1.9-.4 1.3-.3zm-14 1.7-1.2-.3v-4.2c0-.6.2-.9.8-.9.4 0 .8-.3 1.3-.2-.3.7-.1 1.5-.2 2.2v3.1c.1.4.1.5-.7.3z" style="fill:#18852d"/><path d="M34.3 40.5c.2 0 .5-.1.7-.1-.5 0-.3-.4-.3-.6v-3.7c0-.3.1-.6-.3-.6-.6-.1-1.1-.4-1.7-.3v5c0 .1 0 .8.2.9h.3c.1 0 .2 0 .3-.1" style="fill:#20a53a"/><path d="M73.7 44.6v-5.3c.3.2.2.6.2.9.1 1.4-.1 2.9.1 4.3 0 .1-.1.1-.1.2 0 0-.1-.1-.2-.1z" style="fill:#24a53e"/></svg>
</div>
<div class="title" style="font-size: 22px;margin-top: 20px;color: black;">The domain name access has been opened, and I cannot access it through IP, please re -enter</div>
<div class="content"><input class="jump-input" type="text" /><button class="btlink" type="">Click to jump</button></div>
<div class="desc" style="margin-bottom:10px;text-align: left;margin-left: 12px;">
<ul class="help">
<li>Please replace the "Your Domain Name" in the input box to the correct binding domain name, and then click the "Click to Jump" button</li>
<li>If you forget the correct binding domain name, log in to SSH and execute the command <code >bt default</code>, View the correct panel login information</li>
<li>If your domain name has been abandoned, please log in to SSH and execute <code >bt 12</code>, Cancel the domain name binding</li>
</ul>
</div>
</div>
<script type="text/javascript">
var input = document.querySelector('input')
var button = document.querySelector('button')
var skipHref = function(){
window.location.href = input.value
}
input.onkeydown = function(e){
if(e.keyCode === 13) skipHref()
}
button.onclick = skipHref
input.value = location.protocol + '//Your domain name:' + location.port + '/' + location.pathname.split('/')[1]
input.focus()
</script>
</body>
</html>

View File

@@ -0,0 +1,292 @@
{% extends "layout.html" %} {% block content %}
<style>
.pos-box {
height: auto;
}
.control-item {
display: inline-block;
height: 45px;
min-width: 100px;
padding: 0 20px;
line-height: 45px;
font-size: 13px;
cursor: pointer;
position: relative;
text-align: center;
}
.control-item.active {
color: #20a53a;
background: #20a53a10;
}
.daily-thumbnail {
width: 1200px;
margin: 80px auto;
}
.thumbnail-box {
position: relative;
display: flex;
justify-content: center;
}
.thumbnail-introduce {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 40px;
}
.thumbnail-introduce span {
font-size: 20px;
font-weight: bold;
}
.thumbnail-introduce ul {
display: flex;
font-size: 16px;
line-height: 30px;
margin: 20px 0;
list-style-type: square;
}
.thumbnail-introduce ul li + li {
margin-left: 40px;
}
.pluginTipsGg {
position: relative;
width: 950px;
height: 678px;
background-color: #f1f1f1;
background-size: 100%;
background-repeat: no-repeat;
background-position: top;
border: 1px solid #f2f2f2;
border-radius: 4px;
image-rendering: -webkit-optimize-contrast;
}
/*.pluginTipsGg:hover::before{*/
/* display: inline-block;*/
/*}*/
.pluginTipsGg::before {
content: '点击预览';
display: none;
background: #000;
opacity: 0.2;
color: #fff;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
line-height: 621px;
font-size: 18px;
vertical-align: bottom;
text-align: center;
border-radius: 4px;
transition: all 1s;
}
.tab-list .tabs-item.active:after {
content: '';
width: 20px;
height: 2px;
position: absolute;
left: 50%;
bottom: 0px;
background: red;
margin-left: -10px;
background: #20a53a;
}
.thumbnail-box .thumbnail-tab {
margin-right: 20px;
width: 120px;
border-left: 1px solid #def2e2;
}
.thumbnail-tab li {
padding: 0 20px;
line-height: 36px;
cursor: pointer;
font-size: 14px;
}
.thumbnail-tab li.on {
border-left: 2px solid #20a53a;
color: #20a53a;
font-size: 16px;
font-weight: bold;
}
.thumbnail-item {
display: none;
}
.thumbnail-item.show {
display: block;
}
</style>
<div class="main-content pb55" style="min-height: 525px">
<div class="container-fluid">
{% if 'error_msg' in data %}
<div class="pos-box bgw mtb15">
<div class="control-nav">
<div class="control-item active" name="control">YakPanel WAF</div>
</div>
</div>
<div class="mtb15 pd15 bgw daily-view">
<div class="info-title-tips">
<p><span class="glyphicon glyphicon-alert" style="color: #f39c12; margin-right: 10px"></span>Tip: This page can be turned off in the panel settings</p>
</div>
<div class="daily-thumbnail">
<div class="thumbnail-introduce">
<span>Nginx WAF function introduction</span>
<ul>
<li>Only supports Nginx</li>
<li>Defend against CC attacks</li>
<li>Keyword blocking</li>
<li>Block malicious scans</li>
<li>Stop hackers</li>
</ul>
<div class="daily-product-buy">
<a title="Buy professional" href="javascript:;" class="btn btn-success va0 ml15 payPlugin">Buy now</a>
</div>
</div>
<div class="thumbnail-box">
<ul class="thumbnail-tab">
<li class="on">Overview</li>
<li>Report</li>
<li>Global</li>
<li>WebSite</li>
<li>Blockade</li>
</ul>
<div class="thumbnail-item show">
<div class="pluginTipsGg" style="background-image: url(/static/img/nginx_firewall/1.png)"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url(/static/img/nginx_firewall/2.png)"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url(/static/img/nginx_firewall/3.png)"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url(/static/img/nginx_firewall/4.png)"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url(/static/img/nginx_firewall/5.png)"></div>
</div>
</div>
</div>
</div>
{% else %}
<div class="pos-box bgw mtb15">
<div class="control-nav">
<div class="control-item active" name="control">YakPanel WAF</div>
</div>
</div>
<div class="mtb15 pd15 bgw daily-view">
<div class="info-title-tips">
<p><span class="glyphicon glyphicon-alert" style="color: #f39c12; margin-right: 10px"></span>Tip: This page can be turned off in the panel settings</p>
</div>
<div class="daily-thumbnail">
<div class="thumbnail-introduce">
<span>Nginx WAF function introduction</span>
<ul>
<li>Only supports Nginx</li>
<li>Defend against CC attacks</li>
<li>Keyword blocking</li>
<li>Block malicious scans</li>
<li>Stop hackers</li>
</ul>
<div class="daily-product-buy">
<a title="Buy professional" href="javascript:;" class="btn btn-success va0 ml15 payPlugin">Buy now</a>
</div>
</div>
<div class="thumbnail-box">
<ul class="thumbnail-tab">
<li class="on">Overview</li>
<li>Report</li>
<li>Global</li>
<li>WebSite</li>
<li>Blockade</li>
</ul>
<div class="thumbnail-item show">
<div class="pluginTipsGg" style="background-image: url(/static/img/nginx_firewall/1.png)"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url(/static/img/nginx_firewall/2.png)"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url(/static/img/nginx_firewall/3.png)"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url(/static/img/nginx_firewall/4.png)"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url(/static/img/nginx_firewall/5.png)"></div>
</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
{% endblock %} {% block scripts %} {{ super() }}
<script type="text/javascript" src="/static/js/soft.js?version_20200109={{g['version']}}"></script>
<script type="text/javascript">
bt.send(
'get_soft_find',
'plugin/get_soft_find',
{
sName: 'btwaf',
},
function (res) {
if (res.endtime >= 0) {
$('.payPlugin').after('<a href="javascript:;" class="btn btn-success va0 ml15 installWaf">Install now</a>');
$('.payPlugin').remove();
}
}
);
$('.daily-product-buy').on('click', '.installWaf', function () {
bt.soft.install('btwaf');
// change_install_success();
});
$('.payPlugin').on('click', function () {
bt.soft.get_soft_find('btwaf', function (rdata) {
window.parent.usePay({ source: 25, plugin: { name: rdata.title, pid: rdata.pid, type: rdata.type, plugin: true, ps: rdata.ps } });
// bt.soft.product_pay_view();
// setTimeout(function(){
// $('.lib_ltd').click();
// },500);
});
});
$('.thumbnail-tab li').click(function () {
var index = $(this).index();
$(this).addClass('on').siblings('.on').removeClass('on');
$('.thumbnail-item').eq(index).addClass('show').siblings('.show').removeClass('show');
});
function change_install_success() {
var timer = setInterval(function () {
bt.send(
'get_soft_find',
'plugin/get_soft_find',
{
sName: 'btwaf',
},
function (res) {
if (res.setup) {
clearInterval(timer);
setTimeout(function () {
location.reload();
}, 2000);
}
}
);
}, 1000);
}
// $('.thumbnail-box').on('click',function(){
// layer.open({
// title:false,
// btn:false,
// shadeClose:true,
// closeBtn: 2,
// area:['950px','725px'],
// content:'<div class="pd10"><img src="/static/img/btwaf-nginx.png" style="width:100%"/></div>'
// })
// })
</script>
{% endblock %}

View File

@@ -0,0 +1,437 @@
{% extends "layout.html" %}
{% block content %}
<link rel="stylesheet" href="{{g.cdn_url}}/ace/styles/icons.css">
<link rel="stylesheet" type="text/css" href="{{g.cdn_url}}/css/files_style.css">
<style id="file_list_info">.file_checkbox{width:40px !important;}.file_name{width:300px !important;}.file_ps{width:200px !important;}.file_size{width:100px !important;}.file_mtime{width:180px !important;}.file_user{width:80px !important;}.file_accept{width:80px !important;}.file_operation{width:220px !important;}.file_table_view.list_view .file_list_content .file_tr{width:auto;}.file_table_view.list_view .file_list_content{width:auto;}</style>
<div class="main-content">
<a style="display: none;" id="recycle_bin" data="{{data['recycle_bin']}}"></a>
<div class="bt_file_updated">
<div class="updated_icon">
<div class="btn download">
<div class="cloud">
<div class="file"></div>
</div>
</div>
</div>
<div class="updated_title">Release the mouse to upload files or folders</div>
</div>
<!-- aceEditors -->
<div class="file_bodys">
<div class="file_path_views">
<div class="file_path_upper" title="Back">
<span class="glyphicon glyphicon-arrow-left"></span>
<!-- <span>Back</span> -->
</div>
<div class="file_path_input">
<div class="file_path_shadow"></div>
<div class="file_dir_view"></div>
<input type="text" data-path="/www/wwwroot" data-backspace class="path_input" id="fileInputPath"/>
</div>
<div class="file_path_refresh" title="Refresh"><i class="icon-file icon-file-refresh"></i></div>
<div class="search_path_views">
<input type="text" placeholder="Search file content" class="file_search_input">
<span class="iconfont icon-shezhi1 is_search_children"></span>
<button type="submit" class="path_btn"><i class="iconfont icon-search"></i></button>
<div class="file_search_config">
<div id="search_all" class="file_search_checked"></div>
<label for="search_all">Include subdir</label>
</div>
</div>
</div>
<div class="file_nav_view clearfix">
<div class="nav_group">
<div class="nav_btn upload_file">
<span class="nav_btn_title">Upload</span>
</div>
</div>
<div class="nav_group">
<div class="nav_btn upload_download">
<span class="nav_btn_title">Remote download</span>
</div>
</div>
<div class="nav_group">
<div class="nav_btn create_file_or_dir">
<span class="nav_btn_title">New</span><i class="iconfont icon-xiala"></i>
<ul class="nav_down_list" data-menu="newFileType">
<li data-type="newBlankDir"><i class="file_menu_icon create_file_icon"></i><span>New directory</span></li>
<li data-type="newBlankFile"><i class="file_new_icon"></i><span>New blank file</span></li>
<li data-type="newBlankFile"><i class="file_new_icon soft_link_file_icon"></i><span>Softlink</span></li>
</ul>
</div>
</div>
<div class="nav_group">
<div class="nav_btn replace_content">
<span class="nav_btn_title">Search Files Content</span>
</div>
</div>
<div class="nav_group">
<div class="nav_btn favorites_file_path">
<span class="nav_btn_title" data-menu="favorites">Favorites</span><i class="iconfont icon-xiala"></i>
<ul class="nav_down_list"></ul>
</div>
</div>
<div class="nav_group">
<div class="nav_btn share_file_list">
<span class="nav_btn_title">Share List</span>
</div>
</div>
<div class="nav_group ">
<div class="nav_btn terminal_view">
<i class="iconfont icon-terminal"></i>
<span class="nav_btn_title">Terminal</span>
</div>
</div>
<!-- 挂载磁盘列表 -->
<div class="nav_group mount_disk_list"></div>
<div class="float_r menu-header-foot">
<div class="nav_group multi hide">
<div class="batch_multi_title">
<span>Please choose</span>
<i class="iconfont icon-xiala"></i>
<div class="batch_group_list">
<div class="nav_btn_group" data-type="copy"><i class="file_menu_icon copy_file_icon"></i><span
class="nav_btn_title">Copy</span></div>
<div class="nav_btn_group" data-type="shear"><i class="file_menu_icon shear_file_icon"></i><span
class="nav_btn_title">Cut</span></div>
<div class="nav_btn_group" data-type="compress"><i class="file_menu_icon compress_file_icon"></i><span
class="nav_btn_title">Compress</span></div>
<div class="nav_btn_group" data-type="authority"><i class="file_menu_icon power_file_icon"></i><span
class="nav_btn_title">Permission</span></div>
<div class="nav_btn_group" data-type="del"><i class="file_menu_icon del_file_icon"></i><span
class="nav_btn_title">Del</span></div>
<div class="nav_btn_group hide" style="padding-left:10px;border-left: 1px solid #cfcfcf;margin-left: -1px;">
<span class="nav_btn_title">More</span><i class="iconfont icon-xiala"></i>
<ul class="nav_down_list">
<li data-type="copy"><i class="file_menu_icon copy_file_icon"></i><span>Copy</span></li>
<li data-type="shear"><i class="file_menu_icon shear_file_icon"></i><span>Cut</span></li>
<li data-type="compress"><i class="file_menu_icon compress_file_icon"></i><span>Compress</span></li>
<li data-type="authority"><i class="file_menu_icon power_file_icon"></i><span>Permission</span></li>
<li data-type="del"><i class="file_menu_icon del_file_icon"></i><span>Del</span></li>
</ul>
</div>
</div>
</div>
</div>
<div class="nav_group file_all_paste hide">
<div class="nav_btn_group">
<i class="file_menu_icon paste_file_icon"></i><span class="nav_btn_title">Paste</span>
</div>
</div>
<div class="nav_group manage_backup">
<div class="nav_btn"><span class="glyphicon glyphicon-trash"></span><span class="nav_btn_title">Backup PMSN</span></div>
</div>
<div class="nav_group recycle_bin">
<div class="nav_btn"><span class="glyphicon glyphicon-trash"></span><span class="nav_btn_title">Recycle bin</span></div>
</div>
<div class="nav_group btn-group btn-group-sm">
<div class="btn btn-default cut_view_model" data-type="icon"><i class="glyphicon glyphicon-th"></i></div>
<div class="btn btn-default cut_view_model" data-type="list"><i class="glyphicon glyphicon-th-list"></i></div>
</div>
</div>
</div>
<div class="file_table_view">
<div class="file_list_header">
<div class="file_main_title">
<div class="file_checkbox file_th">
<div class="file_check" data-type="all" data-checkbox="0"></div>
</div>
<div class="file_name file_th" data-tid="name">
<span>File name</span>
<div class="icon_sort"></div>
</div>
<!-- <div class="file_width_resize"></div>
<div class="file_type file_th" data-tid="type">
<span>类型</span>
<div class="icon_sort"></div>
</div> -->
<div class="file_width_resize"></div>
<div class="file_accept file_th" data-tid="accept">
<span>PMSN/Owner</span>
<div class="icon_sort"></div>
</div>
<div class="file_width_resize"></div>
<div class="file_size file_th" data-tid="size">
<span>Size</span>
<div class="icon_sort"></div>
</div>
<div class="file_width_resize"></div>
<div class="file_mtime file_th" data-tid="mtime">
<span>Modification time</span>
<div class="icon_sort"></div>
</div>
<div class="file_width_resize"></div>
<div class="file_ps file_th" data-tid="ps">
<span>Ps</span>
<div class="icon_sort"></div>
</div>
<div class="file_width_resize"></div>
<div class="file_operation file_th align-right" data-tid="operation">
<span>Opt</span>
</div>
</div>
</div>
<div class="file_list_shadow file_shadow_top" style="opacity: 0;"></div>
<div class="file_list_content"></div>
<div class="file_list_shadow file_shadow_bottom" style="opacity: 0;"></div>
<div class="onselectstart"></div>
</div>
<div class="file_right_menu file_menu_list">
<ul class="set_group">
<!-- <li data-id="open_file"><i class="file_menu_icon open_file_icon"></i><span>打开文件夹</span></li> -->
<li data-id="edit_file"><i class="file_menu_icon edit_file_icon"></i><span>Open</span></li>
<li data-id="download_file"><i class="file_menu_icon download_file_icon"></i><span>Download</span></li>
<li class="separate"></li>
<li data-id="copy_file"><i class="file_menu_icon copy_file_icon"></i><span>Copy</span></li>
<li data-id="paste_file"><i class="file_menu_icon paste_file_icon"></i><span>Paste</span></li>
<!-- 判断类型是文件夹时,提示是否复制文件至该文件夹 -->
<li data-id="shear_file"><i class="file_menu_icon shear_file_icon"></i><span>Cut</span></li>
<li class="separate"></li>
<li data-id="rename_file"><i class="file_menu_icon rename_file_icon"></i><span>Rename</span></li>
<li data-id="power_file"><i class="file_menu_icon power_file_icon"></i><span>Permission</span></li>
<li data-id="decompression_file"><i
class="file_menu_icon decompression_file_icon"></i><span>Decompress</span></li>
<li data-id="compress_file">
<i class="file_menu_icon compress_file_icon"></i><span>Compress</span>
<div class="file_menu_down">
<span class="glyphicon glyphicon-triangle-right" aria-hidden="true"></span>
<ul class="set_group">
<li><i class="file_menu_icon compress_file_icon"></i><span>tar.gz (Default)</span></li>
<li><i class="file_menu_icon compress_file_icon"></i><span>zip (General format)</span></li>
<li><i class="file_menu_icon compress_file_icon"></i><span>rar (WinRAR is compatible with Chinese)</span>
</li>
</ul>
</div>
</li>
<li data-id="del_file"><i class="file_menu_icon del_file_icon"></i><span>Del</span></li>
<li class="separate"></li>
<li data-id="add_favorites"><i class="file_menu_icon add_favorites_icon"></i><span>Favorites</span>
</li>
</ul>
</div>
<div class="selection_right_menu file_menu_list">
<ul class="set_group">
<li data-id="copy_file"><i class="file_menu_icon copy_file_icon"></i><span>Copy</span></li>
<li data-id="paste_file"><i class="file_menu_icon shear_file_icon"></i><span>Cut</span></li>
<li data-id="download_file"><i class="file_menu_icon download_file_icon"></i><span>Download</span></li>
<li class="separate"></li>
<li data-id="del_file"><i class="file_menu_icon del_file_icon"></i><span>Del</span></li>
<li class="separate"></li>
<li data-id="paste_file"><i class="file_menu_icon copy_file_icon"></i><span>Copy to</span></li>
<li data-id="paste_file"><i class="file_menu_icon shear_file_icon"></i><span>Move to</span></li>
<li class="separate"></li>
<li data-id="compress_file">
<i class="file_menu_icon compress_file_icon"></i><span>Compress</span>
<div class="file_menu_down"><span class="glyphicon glyphicon-triangle-right"
aria-hidden="true"></span></div>
</li>
</ul>
</div>
<div class="content_right_menu file_menu_list">
<ul class="set_group">
<li data-id="refresh_file"><i class="file_menu_icon refresh_file_icon"></i><span>Refresh</span></li>
<li class="separate"></li>
<li data-id="upload_file"><i class="file_menu_icon upload_file_icon"></i><span>Upload</span></li>
<li data-id="newly_file"><i class="file_menu_icon newly_file_icon"></i><span>New file/directory</span></li>
<li class="separate"></li>
<li data-id="paste_file"><i class="file_menu_icon paste_file_icon"></i><span>Paste</span></li>
</ul>
</div>
<div class="filePage pagination page"></div>
</div>
</div>
<script type="text/template" id="upload_file_template">
<div class="upload_or_download_view">
<div class="upload_or_download_content active" data-type="upload">
<div class="upload_btn_groud">
<div class="btn-group">
<button type="button" class="btn btn-primary btn-sm upload_file_btn">Upload file</button>
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu">
<li><a href="#" data-type="file">Upload file</a></li>
<li><a href="#" data-type="dir">Upload directory</a></li>
</ul>
</div>
<div class="file_upload_info" style="display:none;">
<span>Total press&nbsp;<i class="uploadProgress"></i>, uploading&nbsp;<i class="uploadNumber"></i>,</span>
<span style="display:none">Fail&nbsp;<i class="uploadError"></i></span>
<span>Speed&nbsp;<i class="uploadSpeed">getting</i>,</span>
<span>Expect time&nbsp;<i class="uploadEstimate">getting</i></span><i></i>
</div>
</div>
<div class="upload_file_body active"><span>Please drag the file here</span></div>
<div class="upload_btn_group"><button type="button" class="btn btn-danger btn-sm upload_file_clear">Cancel upload</button><button type="button" class="btn btn-success btn-sm upload_file_submit">Start upload</button></div>
</div>
</div>
</script>
<script type="text/template" id="aceTmplate">
<div id="ace_conter">
<div class="ace_header" style="top: 0">
<span class="saveFile"><i class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></i><span>Save</span></span>
<span class="saveFileAll"><i class="glyphicon glyphicon-duplicate" aria-hidden="true"></i><span>Save All</span></span>
<span class="refreshs"><i class="glyphicon glyphicon-refresh" aria-hidden="true"></i><span>Refresh</span></span>
<span class="searchs"><i class="glyphicon glyphicon-search" aria-hidden="true"></i><span>Search</span></span>
<span class="replaces"><i class="glyphicon glyphicon-retweet" aria-hidden="true"></i><span>Replace</span></span>
<span class="jumpLine"><i class="glyphicon glyphicon-pushpin" aria-hidden="true"></i><span>JumpLine</span></span>
<span class="fontSize"><i class="glyphicon glyphicon-text-width" aria-hidden="true"></i><span>Font</span></span>
<span class="themes"><i class="glyphicon glyphicon-magnet" aria-hidden="true"></i><span>Theme</span></span>
<span class="setUp"><i class="glyphicon glyphicon-cog" aria-hidden="true"></i><span>Set</span></span>
<span class="helps"><i class="glyphicon glyphicon-question-sign" aria-hidden="true"></i><span>Help</span></span>
<div class="pull-down" title="Hide toolbar" style="top: 0"><i class="glyphicon glyphicon-menu-down" aria-hidden="true"></i></div>
</div>
<div class="ace_overall" style="top: 35px;">
<!-- 编辑器目录 -->
<div class="ace_catalogue" style="left:0px">
<div class="ace_catalogue_title">Directory<div class="dir-menu-right"><span class="glyphicon glyphicon-minus" aria-hidden="true"></span></div></div>
<div class="ace_dir_tools">
<div class="upper_level" title="Return to parent directory">
<i class="glyphicon glyphicon-share-alt" aria-hidden="true"></i>
<span>Back</span>
</div>
<div class="search_file" title="Search File">
<i class="glyphicon glyphicon-search" aria-hidden="true"></i>
<span>Search</span>
</div>
<div class="new_folder" title="File/Folder">
<i class="glyphicon glyphicon-plus" aria-hidden="true"></i>
<span>New</span>
<ul class="folder_down_up">
<li data-type="2"><i class="folder-icon"></i>Folder</li>
<li data-type="3"><i class="text-icon"></i>File</li>
</ul>
</div>
<div class="refresh_dir" title="Refresh list">
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
<span>Refresh</span>
</div>
<span class="ace_editor_main_storey"></span>
</div>
<div class="ace_catalogue_list">
<ul class="cd-accordion-menu"></ul>
<ul class="ace_catalogue_menu">
<li data-type="0"><i class="glyphicon glyphicon-refresh" aria-hidden="true"></i><span>Refresh</span></li>
<li data-type="1"><i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i><span>Subdirectory</span></li>
<li data-type="2"><i class="folder-icon"></i><span>New Folder</span></li>
<li data-type="3"><i class="text-icon"></i><span>New File</span></li>
<li data-type="4"><i class="rename-icon img-icon"></i><span>Rename</span></li>
<li data-type="5"><i class="down-icon img-icon"></i><span>Download</span></li>
<li data-type="6"><i class="del-icon img-icon"></i><span>Delete</span></li>
</ul>
</div>
<div class="ace_catalogue_drag_icon">
<div class="drag_icon_conter"></div>
<span class="fold_icon_conter" title="Hide file directory"></span>
</div>
</div>
<!-- 编辑内容 -->
<div class="ace_editor_main">
<ul class="ace_conter_menu"></ul>
<div class="ace_conter_tips"><div class="tips"></div></div>
<div class="ace_editor_main_storey"></div>
<div class="ace_conter_editor"></div>
<div class="ace_conter_toolbar">
<div class="pull-left size_ellipsis">
<span data-type="path" class="size_ellipsis"></span>
</div>
<div class="pull-right">
<span data-type="cursor"></span>
<span data-type="history"></span>
<span data-type="tab"></span>
<span data-type="encoding"></span>
<span data-type="lang"></span>
</div>
</div>
</div>
<div class="ace_toolbar_menu" style="display: none;">
<div class="menu-item menu-tabs" style="display: none;">
<div class="menu-title">Set tabs</div>
<ul class="tabsType">
<li data-value="nbsp">Indent using spaces</li>
<li data-value="tabs">Indent using "Tab"</li>
</ul>
<div class="menu-title" style="margin-top:15px">Set the tab length</div>
<ul class="tabsSize">
<li data-value="1">1</li>
<li data-value="2">2</li>
<li data-value="3">3</li>
<li data-value="4">4</li>
<li data-value="5">5</li>
<li data-value="6">6</li>
</ul>
</div>
<div class="menu-item menu-encoding" style="display: none;">
<div class="menu-title">Set file save encoding format</div>
<ul></ul>
</div>
<div class="menu-item menu-files" style="display: none;">
<div class="menu-conter">
<input type="text" class="menu-input" placeholder="Input language mode">
<i class="fa fa-close" aria-hidden="true"></i>
</div>
<div class="menu-title">Set file language association</div>
<ul></ul>
</div>
<div class="menu-item menu-fontSize" style="display: none;">
<div class="menu-title">Set editor font size</div>
<div class="menu-conter">
<div class="set_font_size">
<input type="number" min="12" max="45"/>
<span class="tips error">Font setting range 12-45</span>
<button class="btn-save">Save</button>
</div>
</div>
</div>
<div class="menu-item menu-jumpLine" style="display: none;">
<div class="menu-title">Jump to specified line</div>
<div class="menu-conter">
<div class="set_jump_line">
<input type="number" min="0"/>
<button class="btn-save">Jump</button>
</div>
</div>
</div>
<div class="menu-item menu-themes" style="display: none;">
<div class="menu-title">Set editor theme</div>
<ul></ul>
</div>
<div class="menu-item menu-history" style="display: none;">
<div class="menu-title">History version</div>
<ul></ul>
</div>
<div class="menu-item menu-setUp" style="display: none;">
<div class="menu-title">Editor setting [ Some settings need to be restart editor ]</div>
<ul class="editor_menu">
<li data-type="wrap">Auto wrap</li>
<li data-type="enableLiveAutocompletion">Code autocomplete</li>
<li data-type="enableSnippets">Enable snippets</li>
<li data-type="showInvisibles">Show hidden characters</li>
<li data-type="showLineNumbers">Show line numbers</li>
</ul>
</div>
</div>
</div>
</div>
</script>
{% endblock %}
{% block scripts %}
{{ super() }}
<script type="text/javascript" src="{{g.cdn_url}}/js/jquery.dragsort-0.5.2.min.js" defer></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/jquery.qrcode.min.js" defer></script>
<script type="text/javascript"
src="{{g.cdn_url}}/js/public.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script type="text/javascript"
src="{{g.cdn_url}}/js/public_backup.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/clipboard.min.js" defer></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/polyfill.js"></script>
<script type="text/javascript" src="{{g.cdn_url}}/ace/ace.js" defer></script>
<script type="text/javascript" src="{{g.cdn_url}}/ace/ext-language_tools.js" defer></script>
<script type="text/javascript"
src="{{g.cdn_url}}/js/files.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script type="text/javascript"
src="{{g.cdn_url}}/js/upload-drog.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
{% endblock %}

View File

@@ -0,0 +1,101 @@
{% extends "layout.html" %}
{% block content %}
<div class="main-content">
<div class="container-fluid" style="padding-bottom:50px">
<div class="file-box bgw mtb15" style="position:relative; padding-top:110px">
<div id="tipTools" class="plr15">
<div class="ptb15">
<div class="clearfix">
<div class="pull-left">
<button id="backBtn" class="backBtn btn btn-default btn-sm glyphicon glyphicon-arrow-left pull-left" title="{{data['lan']['BTN1']}}" onClick="BackDir()"></button>
<button class="backBtn refreshBtn btn btn-default btn-sm glyphicon glyphicon-refresh pull-right" title="{{data['lan']['BTN2']}}" style="margin-left:-1px;"></button>
<span id='DirPathPlace' class="pull-left"><input id="fileInputPath" type="text"></span>
<span id='PathPlaceBtn' class="pull-left"></span>
</div>
<div class="pull-left mlr15" style="line-height:26px"><span id='DirInfo'></span></div>
<div class="search pull-right" style="position: absolute; top: 6px; right: 5px;">
<form target="hid" onsubmit='GetFiles(1)'>
<input type="text" id="SearchValue" class="ser-text pull-left" placeholder="" />
<button type="button" class="ser-sub pull-left" onclick='GetFiles(1)'></button>
</form>
<iframe name='hid' id="hid" style="display:none"></iframe>
</div>
</div>
</div>
<div class="clearfix ptb10">
<button class="btn btn-default btn-sm pull-left" onclick="UploadFiles()">{{data['lan']['BTN3']}}</button>
<button class="btn btn-default btn-sm pull-left" onclick="DownloadFile()" title="{{data['lan']['TI1']}}" style="margin:0 5px">{{data['lan']['BTN4']}}</button>
<span id='BarTools'></span>
<span id='Batch' style="background-color:#fff;position:absolute;right:190px;z-index:10"></span>
<span id='comlist' class="comlist"></span>
<div class="btn-group btn-group-sm pull-right" style="margin-right:5px;">
<button id="set_icon" title="{{data['lan']['TI2']}}" type="button" class="btn btn-default">
<i class="glyphicon glyphicon-th"></i>
</button>
<button id="set_list" title="{{data['lan']['TI3']}}" type="button" class="btn btn-default active">
<i class="glyphicon glyphicon-th-list"></i>
</button>
</div>
</div>
</div>
<div class="divtable pd15" id="fileCon"></div>
<div class="dataTables_paginate paging_bootstrap pagination plr15" style="position: relative; top: -15px;">
<ul id="filePage" class="page"></ul>
</div>
</div>
</div>
</div>
<ul id="rmenu" class="dropdown-menu" style="display:none">
<li onclick="javascript:Batch(1);"><a style="cursor: pointer;">{{data['lan']['L1']}}</a></li>
<li onclick="javascript:Batch(2);"><a style="cursor: pointer;">{{data['lan']['L2']}}</a></li>
<li onclick="javascript:Batch(5);"><a style="cursor: pointer;">{{data['lan']['L3']}}</a></li>
<li onclick="javascript:Batch(3);"><a style="cursor: pointer;">{{data['lan']['L4']}}</a></li>
<li onclick="javascript:Batch(4);"><a style="cursor: pointer;">{{data['lan']['L5']}}</a></li>
</ul>
{% endblock %}
{% block scripts %}
<script src="/static/js/jquery-ui.min.js"></script>
<script src="/static/js/jquery.contextify.min.js"></script>
<script src="/static/js/files.js?date={{g.version}}"></script>
<script src="/static/js/upload.js?date={{g.version}}"></script>
<script type="text/javascript">
// setTimeout(function(){
// GetDisk();
// },500);
// var xPath = getCookie('Path');
// setTimeout(function(){
// GetFiles((xPath!=undefined?xPath:'/www/wwwroot'));
// },800);
//
// PathPlaceBtn((xPath!=undefined?xPath:'/www/wwwroot'));
// setCookie('uploadSize',1024 * 1024 * 1024);
// if(getCookie('rank') == undefined || getCookie('rank') == null){
// setCookie('rank','a');
// }
// $("#set_icon").click(function(){
// setCookie('rank','b');
// $(this).addClass("active");
// $("#set_list").removeClass("active");
// GetFiles(getCookie('Path'));
// });
// $("#set_list").click(function(){
// setCookie('rank','a');
// $(this).addClass("active");
// $("#set_icon").removeClass("active");
// GetFiles(getCookie('Path'));
// })
// $(".refreshBtn").click(function(){
// GetFiles(getCookie('Path'));
// })
//
var files = {
}
</script>
{% endblock %}

View File

@@ -0,0 +1,847 @@
{% extends "layout.html" %}
{% block content %}
<style type="text/css">
.ml30 {
margin-left: 30px;
}
.no-show {
display: none;
}
.tab-con .tab-block {
width: 100%;
height: 100%;
}
.divtable .btswitch + .btswitch-btn {
width: 2.8rem;
height: 1.75rem;
}
/* 安全页面头部 */
.state-content .bt-form-new {
align-items: center;
}
.state-content .bt-form-new .form-label {
padding-right: 15px;
}
.state-content .form-inline-line {
width: 1px;
height: 20px;
margin: 0 18px;
background-color: #ccc;
}
/* end */
/* 安全页面内容 */
.firewall-tab-view .tab-con {
padding: 0;
}
.firewall-tab-view .tab-nav-con {
padding-top: 15px;
}
.firewall-tab-view .tab-nav-border span i {
font-style: initial;
}
/* end */
/* 系统防火墙 */
.safety-header .ping-item {
margin-right: 15px;
}
.safety-header-info {
display: flex;
align-items: center;
}
.port-import-form {
padding: 20px;
}
.detect_input {
display: flex;
justify-content: center;
}
.detect_input .input_file {
width: 170px;
height: 35px;
border: 0.1px dashed #D0D0D0;
padding: 0 0 0 10px;
font-size: 14px;
outline: none;
}
.detect_input .select_file {
height: 35px;
padding: 0 14px;
font-size: 14px;
color: #fff;
background: #10952a;
border: none;
}
/* end */
/* SSH管理 */
.ssh-login-info .sep {
margin: 0 4px;
}
.ssh-config {
padding: 6px 0;
}
.ssh-config-title {
line-height: 30px;
font-size: 14px;
border-bottom: 1px solid #e7e7e7;
padding: 5px 5px 8px 10px;
font-weight: bold;
color: #666;
margin-bottom: 10px;
}
.ssh-config .line .line-input {
display: inline-block;
position: relative;
}
.ssh-config .line:hover {
background: #a5a5a514;
transition: background 0.2s;
cursor: pointer;
}
.ssh-config .line-title {
font-size: 12px;
color: #333;
display: inline-block;
width: 150px;
text-align: right;
padding-right: 15px;
height: 30px;
line-height: 30px;
vertical-align: top;
}
.ssh-config .line-item {
display: inline-block;
vertical-align: top;
height: 30px;
line-height: 30px;
}
.ssh-config .line-row {
vertical-align: top;
}
.line-row,
.line-row-tips {
height: 30px;
line-height: 30px;
display: inline-block;
}
.line-input input {
height: 30px;
line-height: 30px;
}
.line-row-tips {
margin-left: 10px !important;
color: #999;
vertical-align: top;
}
#sshView .tab-nav-con {
padding-top: 10px;
}
.cutLoginLogsType {
margin-top: -4px;
}
.btn-sshkey-group {
display: flex;
align-items: center;
}
.news-channel .bt-form-new .form-label {
padding-right: 10px;
}
/* end */
/* 入侵防御 */
#intrusion .divtable {
margin-top: 0;
}
#antiProcessWhiteList .divtable {
margin-top: 10px;
}
.logs-data-select {
margin-bottom: 15px;
}
.logs-title {
display: inline-block;
width: auto;
height: 35px;
font-size: 12px;
line-height: 35px;
margin-right: 5px;
}
.logs-unselect {
position: relative;
display: inline-block;
height: 30px;
border: 1px solid #e6e6e6;
border-radius: 2px;
font-size: 13px;
line-height: 28px;
}
.logs-unselect.active .logs-input-list {
display: block;
}
.logs-unselect.active .logs-input-list {
animation-name: layui-upbit;
animation-duration: .3s;
animation-fill-mode: both;
}
.logs-inputs {
box-sizing: border-box;
padding: 0 30px 0 10px;
height: 30px;
cursor: pointer;
}
.logs-unselect .logs-inputs:after {
position: absolute;
top: 0.8pc;
right: 6pt;
display: block;
width: 0;
height: 0;
border-color: #c2c2c2 transparent transparent;
border-style: solid;
border-width: 6px 6px 0;
content: '';
transition: transform .5s;
}
.logs-input-list {
position: absolute;
top: 30px;
right: -1px;
left: -1px;
z-index: 899;
display: none;
box-sizing: border-box;
padding: 5px 0;
height: auto;
min-width: 100%;
border: 1px solid #d2d2d2;
border-radius: 2px;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0,0,0,.12);
}
.logs-input-list dd {
padding: 5px 15px;
height: 30x;
}
.logs-input-list dd:hover {
background-color: #f2f2f2;
cursor: pointer;
}
.logs-input-list dd.logs_checked {
background: #20a532!important;
color: #fff;
}
.logs-page.page-style {
padding: 0 5px;
height: 30px;
font-size: 13px;
margin-top: 5px;
}
.page-style .nextPage{
display: inline-block;
margin: 0 3px;
padding: 0 10px;
height: 30px;
border-radius: 2px;
background-color: #f5f5f5;
color: #666;
text-align: center;
line-height: 30px;
cursor: pointer;
}
.page-style .Pcount {
margin-right: 0;
margin-left: 5px;
}
.page a:last-of-type {
border-right: 1px solid #ececec;
}
/* end */
/* 系统加固 */
#system .divtable {
margin: 0;
}
#reinforceBlockIp .divtable {
margin-top: 10px;
}
#reinforceLog .divtable {
margin-bottom: 10px;
}
/* end */
/* 日志审计 */
.logAuditContent {
padding: 0 0 0 15px;
margin-left: 15px;
width: 100%;
flex: 1;
border-left: 1px solid #ececec;
}
.logAuditTabContent {
display: flex;
height: 100%;
}
.logAuditTabContent .logAuditTab .logAuditItem {
height: 35px;
line-height: 35px;
padding: 0 10px;
border-bottom: 1px solid #ececec;
cursor: pointer;
}
.logAuditTabContent .logAuditTab .logAuditItem:hover,
.logAuditTabContent .logAuditTab .logAuditItem.active {
background-color: #f2f2f2;
}
.logAuditTabContent .logAuditTab {
border: 1px solid #ececec;
overflow: auto;
}
/* end */
/* 面板日志 */
.crontab-log {
min-height: 250px;
margin-top: 10px;
margin-bottom: 0;
padding: 15px;
line-height: 16px;
background-color: rgb(51, 51, 51);
white-space: pre-wrap;
overflow: auto;
border: none;
color: #f1f1f1;
}
/* end */
/* 功能介绍 */
.daily-thumbnail {
width: 1200px;
margin: 80px auto;
}
.thumbnail-box {
position: relative;
display: flex;
justify-content: center;
}
.thumbnail-introduce {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 40px;
}
.thumbnail-introduce span {
font-size: 24px;
font-weight: bold;
}
.thumbnail-introduce ul {
display: flex;
font-size: 16px;
line-height: 30px;
margin: 20px 0;
list-style-type: square;
}
.thumbnail-introduce ul li + li {
margin-left: 40px;
}
.pluginTipsGg {
position: relative;
width: 950px;
height: 720px;
background-color: #f1f1f1;
background-size: 100%;
background-repeat: no-repeat;
background-position: top;
border-radius: 4px;
}
/*.pluginTipsGg:hover::before{*/
/* display: inline-block;*/
/*}*/
.pluginTipsGg::before {
content: '点击预览';
display: none;
background: #000;
opacity: 0.2;
color: #fff;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
line-height: 621px;
font-size: 18px;
vertical-align: bottom;
text-align: center;
border-radius: 4px;
transition: all 1s;
}
.tab-list .tabs-item.active:after {
content: '';
width: 20px;
height: 2px;
position: absolute;
left: 50%;
bottom: 0px;
background: red;
margin-left: -10px;
background: #20a53a;
}
.thumbnail-box .thumbnail-tab {
margin-right: 20px;
width: 180px;
border-left: 1px solid #def2e2;
}
.thumbnail-tab li {
padding: 0 20px;
line-height: 36px;
cursor: pointer;
font-size: 14px;
}
.thumbnail-tab li.on {
border-left: 2px solid #20a53a;
color: #20a53a;
font-size: 16px;
font-weight: bold;
}
.thumbnail-item {
display: none;
}
.thumbnail-item.show {
display: block;
}
.bt_warning {
color: #fc6d26;
}
/* end */
</style>
<div class="main-content">
<div class="container-fluid" style="padding-bottom: 50px;">
<div id="cutTab" class="pos-box bgw mtb15">
<div class="tab-list">
<div class="tabs-item active" data-name="safety">{{ data['lan']['H1'] }}</div>
<div class="tabs-item" data-name="ssh">{{ data['lan']['H2'] }}</div>
<div class="tabs-item" data-name="intrusion">{{ data['lan']['H3'] }}</div>
<div class="tabs-item" data-name="system">{{ data['lan']['H4'] }}</div>
<!-- <div class="tabs-item" data-name="logAudit">{{ data['lan']['H5'] }}</div>-->
<!-- <div class="tabs-item" data-name="logs">{{ data['lan']['H6'] }}</div>-->
</div>
</div>
<div class="container-fluid bgw mtb15 pd15 radius4 safe state-content">
<div class="safety-header">
<div class="bt-form-new inline">
<div class="form-item">
<div class="form-label">{{ data['lan']['TURN1'] }}</div>
<div class="form-value">
<div class="bt-form-switch">
<input class="btswitch btswitch-ios" id="isFirewall" type="checkbox" />
<label class="btswitch-btn isFirewall" for="isFirewall"></label>
</div>
</div>
</div>
<div class="form-inline-line"></div>
<div class="form-item ping-item">
<div class="form-label">{{ data['lan']['TURN2'] }}</div>
<div class="form-value">
<div class="bt-form-switch">
<input class="btswitch btswitch-ios" id="ssh_ping" type="checkbox" />
<label class="btswitch-btn" for="ssh_ping"></label>
</div>
</div>
</div>
<div class="form-inline-line"></div>
<div class="safety-header-info">
<span class="mr5">{{ data['lan']['S1'] }}</span>
<a class="btlink" href="javascript:openPath('/www/wwwlogs');">{{ session['logsPath'] }}</a>
<span class="mlr15" id="logSize">0 B</span>
<button class="btn btn-default btn-sm" id="clearWebLogs">{{ data['lan']['BTN1'] }}</button>
</div>
</div>
</div>
<div class="ssh-header no-show">
<div class="bt-form-new inline">
<div class="form-item">
<div class="form-label">{{data['lan']['TURN3']}}</div>
<div class="form-value">
<div class="bt-form-switch">
<input class="btswitch btswitch-ios" id="isSsh" type="checkbox" />
<label class="btswitch-btn isSsh" for="isSsh"></label>
</div>
</div>
</div>
<div class="form-inline-line"></div>
<div class="ssh-login-info" id="sshDetailed">
<span>{{ data['lan']['S4'] }}</span>
<a class="btlink" data-index="1" href="javascript:;">{{ data['lan']['S5'] }}: 0</a>
<span class="sep">/</span>
<a class="bterror" data-index="2" href="javascript:;">{{ data['lan']['S6'] }}: 0</a>
</div>
</div>
</div>
<div class="intrusion-header no-show">
<div class="bt-form-new inline">
<div class="form-item">
<div class="form-label">{{ data['lan']['AI1'] }}</div>
<div class="form-value">
<div class="bt-form-switch">
<input class="btswitch btswitch-ios" id="isIntrusion" type="checkbox" />
<label class="btswitch-btn isIntrusion" for="isIntrusion"></label>
</div>
</div>
</div>
<div class="form-inline-line"></div>
<div class="form-item">
<span class="mr5">{{ data['lan']['AI2'] }}</span>
<span class="totlaDays">0</span>
</div>
<div class="form-inline-line"></div>
<div class="form-item">
<span class="mr5">{{ data['lan']['AI3'] }}</span>
<span class="totlaTimes">0</span>
</div>
</div>
</div>
<div class="system-header no-show">
<div class="bt-form-new inline">
<div class="form-item">
<div class="form-label">{{ data['lan']['SH1'] }}</div>
<div class="form-value">
<div class="bt-form-switch">
<input class="btswitch btswitch-ios" id="isReinforcement" type="checkbox" />
<label class="btswitch-btn isReinforcement" for="isReinforcement"></label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="mtb15 pd15 bgw tab-view-box firewall-tab-view">
<div class="tab-con show w-full" id="safety">
<div class="tab-nav-border">
<span class="on">{{ data['lan']['F1'] }}: <i>0</i></span>
<span>{{ data['lan']['F2'] }}: <i>0</i></span>
<span>{{ data['lan']['F3'] }}: <i>0</i></span>
<span>{{ data['lan']['F4'] }}: <i>0</i></span>
</div>
<div class="tab-nav-con">
<div class="tab-block on" id="portRules"></div>
<div class="tab-block" id="ipRule"></div>
<div class="tab-block" id="portForward"></div>
<div class="tab-block" id="countryRegion"></div>
</div>
</div>
<div class="tab-con hide" id="sshView">
<div class="tab-nav-border">
<span class="on">{{ data['lan']['S2'] }}</span>
<span>{{ data['lan']['S3'] }}</span>
</div>
<div class="tab-nav-con">
<div class="tab-block on">
<div class="ssh-config">
<div class="ptb10">
<div class="line" title="{{ data['lan']['SS1'] }}">
<div class="line-title">{{ data['lan']['SS1'] }}</div>
<div class="line-input">
<input type="text" class="bt-input-text" value="22" name="ssh_port" style="width: 120px" />
<button type="button" class="btn btn-success btn-sm ml5 save_ssh_port">{{ data['lan']['SS2'] }}</button>
</div>
<div class="line-row-tips">{{ data['lan']['SS3'] }}</div>
</div>
<div class="line" title="{{ data['lan']['SS4'] }}">
<div class="line-title">{{ data['lan']['SS4'] }}</div>
<div class="line-item">
<!-- <div class="line-row">
<div class="ssh-item" style="margin-left: 0; margin-top: 5px;padding: 0;">
<input class="btswitch btswitch-ios" id="root_login" type="checkbox" name="root_login">
<label class="btswitch-btn" for="root_login" style="margin-bottom: 0;"></label>
</div>
</div>
<div class="line-row-tips">是否允许root登录ssh</div> -->
<select class="bt-input-text" name="root_login">
<option value="yes">{{ data['lan']['SS5'] }}</option>
</select>
</div>
</div>
<div class="line" title="{{ data['lan']['SS6'] }}">
<div class="line-title">{{ data['lan']['SS6'] }}</div>
<div class="line-item">
<div class="line-row">
<div class="ssh-item" style="margin-left: 0; margin-top: 5px; padding: 0">
<input class="btswitch btswitch-ios" id="ssh_paw" type="checkbox" name="ssh_paw" />
<label class="btswitch-btn" for="ssh_paw" style="margin-bottom: 0"></label>
</div>
</div>
<div class="line-row-tips">{{ data['lan']['SS7'] }}</div>
</div>
</div>
<div class="line" title="{{ data['lan']['SS8'] }}">
<div class="line-title">{{ data['lan']['SS8'] }}</div>
<div class="line-item">
<div class="line-row">
<div class="ssh-item" style="margin-left: 0; margin-top: 5px; padding: 0">
<input class="btswitch btswitch-ios" id="ssh_pubkey" type="checkbox" name="ssh_pubkey" />
<label class="btswitch-btn" for="ssh_pubkey" style="margin-bottom: 0"></label>
</div>
</div>
<button type="button" class="btn btn-success btn-xs ml5 checkKey" style="vertical-align: initial">{{ data['lan']['SS9'] }}</button>
<button type="button" class="btn btn-default btn-xs ml5 downloadKey" style="vertical-align: initial">{{ data['lan']['SS10'] }}</button>
<div class="line-row-tips">{{ data['lan']['SS11'] }}</div>
</div>
</div>
<div class="line" title="{{ data['lan']['SS12'] }}">
<div class="line-title">{{ data['lan']['SS12'] }}</div>
<div class="line-item">
<div class="line-row mr5">
<a href="javascript:;" class="bt_warning setSshLoginAlarm">{{ data['lan']['SS13'] }}</a>
</div>
<button type="button" class="btn btn-success btn-xs ml5 setSshLoginAlarm" style="vertical-align: initial">{{ data['lan']['SS14'] }}</button>
<div class="line-row-tips">{{ data['lan']['SS15'] }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-block">
<div id="loginLogsContent">
<div class="w-full">
<div id="loginAllLogs"></div>
</div>
<div class="w-full no-show">
<div id="loginSuccessLogs"></div>
</div>
<div class="w-full no-show">
<div id="loginErrorLogs"></div>
</div>
</div>
<div class="daily-thumbnail" style="display: none">
<div class="thumbnail-introduce">
<span>{{ data['lan']['S7'] }}</span>
<ul>
<li>{{ data['lan']['S8'] }}</li>
</ul>
<div class="daily-product-buy">
<a href="javascript:;" class="btn btn-success va0 mr10 " onclick="product_recommend.pay_product_sign('pro', 100)">{{ data['lan']['BTN7'] }}</a>
</div>
</div>
<div class="thumbnail-box">
<ul class="thumbnail-tab">
<li class="on">{{ data['lan']['S7'] }}</li>
</ul>
<div class="thumbnail-item show">
<div class="pluginTipsGg" style="background-image: url('/static/images/firewall/ssh/1.png');"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-con hide" id="intrusion">
<div class="tab-nav-border">
<span class="on">{{ data['lan']['AI4'] }}</span>
<span>{{ data['lan']['AI5'] }}</span>
<span>{{ data['lan']['AI6'] }}</span>
<span>{{ data['lan']['AI7'] }}</span>
</div>
<div class="tab-nav-con">
<div class="tab-block on">
<div id="antiOverviewList"></div>
<ul class="help-info-text c7">
<li>{{ data['lan']['AI8'] }}</li>
<li>{{ data['lan']['AI9'] }}</li>
<li>{{ data['lan']['AI10'] }}</li>
</ul>
</div>
<div class="tab-block">
<div id="antiProcessWhiteList"></div>
</div>
<div class="tab-block">
<div id="antiInterceptLog"></div>
</div>
<div class="tab-block">
<div id="antiOperationLog"></div>
</div>
</div>
<div class="installSoft no-show">
<div class="daily-thumbnail">
<div class="thumbnail-introduce">
<span>{{ data['lan']['H3'] }}{{ data['lan']['PF'] }}</span>
<ul>
<li>{{ data['lan']['AI12'] }}</li>
<li>{{ data['lan']['AI13'] }}</li>
<li>{{ data['lan']['AI14'] }}</li>
</ul>
<div class="daily-product-buy">
<a href="javascript:;" class="btn btn-success va0 mr10 installIntrusion">{{ data['lan']['BTN6'] }}</a>
<a href="javascript:;" class="btn btn-success va0 ml15 buyIntrusion" onclick="product_recommend.pay_product_sign('pro',105)">{{ data['lan']['BTN7'] }}</a>
</div>
</div>
<div class="thumbnail-box">
<ul class="thumbnail-tab">
<li class="on">{{ data['lan']['AI15'] }}</li>
<li>{{ data['lan']['AI16'] }}</li>
<li>{{ data['lan']['AI17'] }}</li>
<li>{{ data['lan']['AI18'] }}</li>
</ul>
<div class="thumbnail-item show">
<div class="pluginTipsGg" style="background-image: url(/static/images/firewall/intrusion/1.png)"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url(/static/images/firewall/intrusion/2.png)"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url(/static/images/firewall/intrusion/3.png)"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url(/static/images/firewall/intrusion/4.png)"></div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-con hide" id="system">
<div class="tab-nav-border">
<span class="on">{{ data['lan']['SH2'] }}</span>
<span>{{ data['lan']['SH3'] }}</span>
<span>{{ data['lan']['SH4'] }}</span>
</div>
<div class="tab-nav-con">
<div class="tab-block on">
<div id="reinforceSystem"></div>
<ul class="help-info-text c7">
<li>{{ data['lan']['SH5'] }}</li>
<li>{{ data['lan']['SH6'] }}</li>
<li>{{ data['lan']['SH7'] }}</li>
<li style="color: red">{{ data['lan']['SH8'] }}</li>
</ul>
</div>
<div class="tab-block">
<div>
<input class="bt-input-text" name="system_address" type="text" value="" placeholder="{{ data['lan']['SH9'] }}" style="width: 250px; margin-right: 6px" />
<button class="btn btn-success btn-sm system_add_ip">{{ data['lan']['SH10'] }}</button>
</div>
<div id="reinforceBlockIp"></div>
<ul class="help-info-text c7">
<li>{{ data['lan']['SH11'] }}</li>
<li>{{ data['lan']['SH12'] }}</li>
</ul>
</div>
<div class="tab-block">
<div id="reinforceLog"></div>
<div id="reinforceLogPage" class="page"></div>
</div>
</div>
<div class="installSoft no-show">
<div class="daily-thumbnail">
<div class="thumbnail-introduce">
<span>{{ data['lan']['H4'] }}{{ data['lan']['PF'] }}</span>
<ul>
<li>{{ data['lan']['SH14'] }}</li>
<li>{{ data['lan']['SH15'] }}</li>
</ul>
<div class="daily-product-buy">
<a href="javascript:;" class="btn btn-success va0 mr10 installSystem">{{ data['lan']['BTN6'] }}</a>
<a href="javascript:;" class="btn btn-success va0 ml15 buySystem" onclick="product_recommend.pay_product_sign('pro',102)">{{ data['lan']['BTN7'] }}</a>
</div>
</div>
<div class="thumbnail-box">
<ul class="thumbnail-tab">
<li class="on">{{ data['lan']['SH16'] }}</li>
<li>{{ data['lan']['SH17'] }}</li>
<li>{{ data['lan']['SH18'] }}</li>
</ul>
<div class="thumbnail-item show">
<div class="pluginTipsGg" style="background-image: url('/static/images/firewall/system/1.png')"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url('/static/images/firewall/system/2.png')"></div>
</div>
<div class="thumbnail-item">
<div class="pluginTipsGg" style="background-image: url('/static/images/firewall/system/3.png')"></div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-con hide" id="logAudit">
<div class="logAuditTabContent">
<div class="logAuditTab"></div>
<div class="logAuditContent">
<div id="logAuditTable"></div>
<div id="logAuditPages" class="page" style="display: flex;justify-content: flex-end"></div>
<div id="logAuditPre" style="display: none;"></div>
</div>
</div>
<div class="daily-thumbnail" style="display: none">
<div class="logAuditTabContent">
<div class="logAuditTab"></div>
<div class="logAuditContent">
<div id="logAuditTable"></div>
<div id="logAuditPages" class="page" style="display: flex; justify-content: flex-end"></div>
<div id="logAuditPre" style="display: none"></div>
</div>
</div>
<div class="daily-thumbnail" style="display: none">
<div class="thumbnail-introduce">
<span>{{ data['lan']['H3'] }}</span>
<ul>
<li>{{ data['lan']['L3'] }}</li>
</ul>
<div class="daily-product-buy">
<a href="javascript:;" class="btn btn-success va0 mr10" onclick="product_recommend.pay_product_sign('pro',103)">{{ data['lan']['BTN7'] }}</a>
</div>
</div>
<div class="thumbnail-box">
<ul class="thumbnail-tab">
<li class="on">{{ data['lan']['H3'] }}</li>
</ul>
<div class="thumbnail-item show">
<div class="pluginTipsGg" style="background-image: url('/static/images/firewall/logAudit/1.png')"></div>
</div>
</div>
</div>
<div class="installSoft" style="display: none">
<div class="daily-thumbnail">
<div class="thumbnail-introduce">
<span>{{ data['lan']['H3'] }}{{ data['lan']['PF'] }}</span>
<ul>
<li>{{ data['lan']['L4'] }}</li>
</ul>
<div class="daily-product-buy">
<a href="javascript:;" class="btn btn-success va0 ml15 buyLogAudit" onclick="product_recommend.pay_product_sign('pro',104)">{{ data['lan']['BTN7'] }}</a>
</div>
</div>
<div class="thumbnail-box">
<ul class="thumbnail-tab">
<li class="on">{{ data['lan']['L5'] }}</li>
</ul>
<div class="thumbnail-item show">
<div class="pluginTipsGg" style="background-image: url(/static/img/logAudit/1.png)"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-con hide" id="logsBody">
<div class="tab-nav-border">
<span class="on">{{ data['lan']['L1'] }}</span>
<span>{{ data['lan']['L2'] }}</span>
</div>
<div class="tab-nav-con">
<div class="tab-block on">
<div id="operationLog"></div>
</div>
<div class="tab-block">
<div id="runningLog"></div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{{ super() }}
<script type="text/javascript" src="/static/js/soft.js?version_20200109={{g['version']}}"></script>
<script type="text/javascript" src="{{ static_url }}static/js/firewall.js"></script>
{% endblock %}

View File

@@ -0,0 +1,351 @@
{% extends "layout.html" %}
{% block content %}
<style>
.weblog {
font-size: 14px;
display: inline-block;
line-height: 30px;
}
.weblog em {
font-style: normal;
color: #666;
margin: 0 15px;
font-size:12px;
}
.weblog span {
margin-right: 10px;
}
.weblog a {
color: #20a53a;
}
.firewall-port-box{
margin-bottom:15px;
}
</style>
<div class="main-content">
<div class="container-fluid" style="padding-bottom: 50px;">
<div class="pos-box bgw mtb15">
<div class="position f14 c9 pull-left">
<a class="plr10 c4" href="/">{{data['lan']['H1']}}</a>/<span class="plr10 c4">{{data['lan']['H2']}}</span>
</div>
<div class="search pull-right">
<form target="hid" onsubmit='firewall.get_log_list(1,$("#SearchValue").prop("value"))'>
<input type="text" id="SearchValue" class="ser-text pull-left" placeholder="{{data['lan']['SEARCH']}}" />
<button type="button" class="ser-sub pull-left" onclick='firewall.get_log_list(1,$("#SearchValue").prop("value"))'></button>
</form>
<iframe name='hid' id="hid" style="display:none"></iframe>
</div>
</div>
<div class="safe container-fluid bgw mtb15 pd15">
<div class="mr50 pull-left">
<form>
<div class="ss-text pull-left">
<em>{{data['lan']['BTN1']}}</em>
<div class='ssh-item' id="in_safe">
<input class='btswitch btswitch-ios' id='sshswitch' type='checkbox' checked><label class='btswitch-btn sshswitch' for='sshswitch' ></label>
</div>
</div>
</form>
</div>
<div class="mr50 pull-left">
<div class="ss-text pull-left mr5">
<em>{{data['lan']['BTN2']}}</em>
<input type="text" class="bt-input-text" id="mstscPort" value="" />
</div>
<div class="ss-text pull-left">
<button id="mstscSubmit" onclick='bt.firewall.set_mstsc($("#mstscPort").prop("value"))' class="btn btn-default btn-sm" type="button">{{data['lan']['BTN3']}}</button>
</div>
</div>
<div class="mr50 pull-left" style="border-right: 1px solid #ccc; padding-right: 40px;">
<div class="ss-text pull-left">
<em>{{data['lan']['BTN4']}}</em>
<div class='ssh-item' id="isPing">
<input class='btswitch btswitch-ios' id='noping' type='checkbox' checked><label class='btswitch-btn noping' for='noping' ></label>
</div>
</div>
</div>
<div class="weblog">
<span class="f12 c5">{{data['lan']['S1']}}</span><a href="javascript:openPath('{{session['logsPath']}}');">{{session['logsPath']}}</a><em id="logSize">0KB</em>
<button class="btn btn-default btn-sm" onclick="firewall.clear_logs_files();">{{data['lan']['BTN5']}}</button>
</div>
</div>
<div class="white-black-ip bgw mtb15">
<div class="black-ip">
<div class="def-log">
<div class="title c6 plr15">
<h3 class="f16">{{data['lan']['H3']}}</h3>
</div>
<div class="divtable pd15">
<div class="firewall-port-box">
<select id="firewalldType" class="bt-input-text c5 mr5" name="type" style="width:120px;">
<option value="port">{{data['lan']['F1']}}</option>
<option value="address">{{data['lan']['F2']}}</option>
<option value="ip_port">Specify IP release port</option>
</select>
<select id="type_pool" class="bt-input-text c5 mr5" name="type" style="width:80px;">
<option value="tcp">TCP</option>
<option value="udp">UDP</option>
</select>
<input type="text" class="bt-input-text mr5" style="width: 117px;" id="AcceptPort" placeholder="{{data['lan']['F3']}}">
<input type="text" class="bt-input-text mr5" style="width: 150px;display:none;" id="AcceptAddress" placeholder="被放行的IP地址">
<input type="text" class="bt-input-text mr5" id="Ps" placeholder="{{data['lan']['F4']}}">
<button id="toAccept" onclick="firewall.add_accept_port()" class="btn btn-default btn-sm va0" type="button">{{data['lan']['F5']}}</button>
<span id="f-ps" class="c9" style="margin-left: 10px;">{{data['lan']['F6']}}</span>
</div>
<div class="tablescroll">
<table id="firewallBody" class="table table-hover" style="min-width: 640px;border: 0 none;">
</table>
</div>
<div class="dataTables_paginate paging_bootstrap page firewallBody" style="margin-bottom:0">
</div>
</div>
</div>
</div>
</div>
<div class="white-black-ip bgw mtb15">
<div class="black-ip">
<div class="def-log">
<div class="title c6 plr15">
<h3 class="f16">{{data['lan']['H4']}}</h3>
<a class="btn btn-default btn-sm va0" onclick="bt.firewall.clear_logs(function(){firewall.get_log_list()});">{{data['lan']['BTN5']}}</a>
<span class="btn btn-default btn-sm" style="position: absolute;right: 30px;margin-top: 10px;" onclick="firewall.get_panel_error_logs()">面板运行日志</span>
</div>
<div class="divtable pd15">
<div class="tablescroll">
<table id="logsBody" class="table table-hover" style="min-width: 640px;border: 0 none;">
</table>
</div>
<div class="dataTables_paginate paging_bootstrap page logsBody" style="margin-bottom:0">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script type="text/javascript">
var firewall = {
get_init:function(){
firewall.flush_init();
firewall.get_list();
firewall.get_log_list();
firewall.get_logs_size();
$('.sshswitch').click(function(){
var status = $("#sshswitch").prop("checked")==true?1:0;
bt.firewall.set_mstsc_status(status,function(rdata){
if(rdata===-1){
if(status){
$("#sshswitch").prop("checked","checked")
}else{
$("#sshswitch").removeAttr('checked');
}
}else{
bt.msg(rdata);
firewall.flush_init();
}
})
})
$('.noping').click(function(){
var status = $("#noping").prop("checked")==true?1:0;
bt.firewall.ping(status,function(rdata){
if(rdata===-1){
if(status){
$("#noping").prop("checked","checked")
}else{
$("#noping").removeAttr('checked');
}
}else{
bt.msg(rdata);
firewall.flush_init();
}
})
})
$("#firewalldType").change(function(){
var type = $(this).val();
var w = '120px';
var p = lan.firewall.port;
var t = lan.firewall.accept;
var m = lan.firewall.port_ps;
$("#AcceptAddress").hide();
if (type == 'address') {
w = '150px';
p = lan.firewall.ip;
t = lan.firewall.drop;
m = lan.firewall.ip_ps;
} else if (type === 'ip_port') {
$("#AcceptAddress").show();
m = 'NOTE: Only specified IP addresses are allowed to access a port. For example: Only 192.168.0.1 is allowed to access port 8080.';
}
$("#AcceptPort").css("width",w);
$("#AcceptPort").attr('placeholder',p);
$("#toAccept").html(t);
$("#f-ps").html(m);
});
},
flush_init:function(){
bt.firewall.get_ssh_info(function(rdata){
if(!rdata.status){
$("#mstscSubmit").attr('disabled','disabled')
$("#mstscPort").attr('disabled','disabled')
$('#sshswitch').removeAttr('checked');
}
else{
$("#mstscSubmit").removeAttr('disabled')
$("#mstscPort").removeAttr('disabled')
$('#sshswitch').attr('checked','checked');
}
if(rdata.ping){
$('#noping').removeAttr('checked');
}else{
$('#noping').attr('checked','checked');
}
$("#mstscPort").val(rdata.port);
})
},
get_logs_size:function(){
bt.firewall.get_logs_size(function(rdata){
$("#logSize").text(rdata);
})
},
clear_logs_files:function(){
bt.firewall.clear_logs_files(function(rdata){
$("#logSize").text(rdata);
bt.msg({msg:lan.firewall.empty,icon:1});
})
},
add_accept_port:function(){
var type = $("#firewalldType").val();
var port = $("#AcceptPort").val();
var ps = $("#Ps").val();
bt.firewall.add_accept_port(type,port,ps,function(rdata){
if(rdata.status){
firewall.get_list();
$("#AcceptPort").val('');
$("#Ps").val('');
}
bt.msg(rdata);
})
},
remove_accept_port: function (id,port) {
bt.firewall.del_accept_port(id, port, function (rdata) {
if (rdata.status) {
firewall.get_list();
}
bt.msg(rdata);
})
},
get_list:function(page,search){
if(page==undefined) page=1;
$.post('/firewall_new?action=GetList', { p: page, search: search,collback:'firewall.get_list' }, function (rdata) {
$('.firewallBody').html(rdata.page);
var ports_ps = { "3306": "MySQL service default port", "888": "phpMyAdmin default port", "22": "SSH remote service", "20": "FTP active mode data port", "21": "FTP protocol default port", "39000-40000": "FTP passive mode port range", "30000-40000": "FTP passive mode port range","11211":"Memcached service port","873":"Rsync data synchronization service","8888":"YakPanel Linux panel default port"}
var _tab = bt.render({
table:'#firewallBody',
columns:[
{ field: 'id', title: "{{data['lan']['TH1']}}"},
{ field: 'port', title: "{{data['lan']['TH2']}}",templet:function(item){
var _ps = lan.firewall.accept_port;
if(bt.contains(item.port,'.')){
_ps = lan.firewall.drop_ip;
}
_ps += ':['+item.port+']'
return _ps;
}},
{ field: 'status', title: "{{data['lan']['TH3']}}",templet:function(item){
var status = '';
switch(item.status){
case 0:
status = lan.firewall.status_not;
break;
case 1:
status = lan.firewall.status_net;
break;
default:
status = lan.firewall.status_ok;
break;
}
return status;
},help:'https://www.yakpanel.com/docs'},
{ field: 'addtime', title: "{{data['lan']['TH4']}}"},
{ field: 'ps', title: "{{data['lan']['TH5']}}", templet: function (item) {
if (item.port in ports_ps) return ports_ps[item.port];
return item.ps;
}},
{ field: 'opt',align:'right',width:50, title: "{{data['lan']['TH6']}}",templet:function(item){
return '<a href="javascript:;" class="btlink" onclick="firewall.remove_accept_port('+item.id+',\''+item.port+'\')">Delete</a>';
}}
],
data:rdata.data
})
})
},
get_log_list:function(page,search){
if (page == undefined) page = 1;
if (search == undefined) search = $("#SearchValue").val();
bt.firewall.get_log_list(page,search,function(rdata){
$('.logsBody').html(rdata.page);
var _tab = bt.render({
table:'#logsBody',
columns:[
{ field: 'id', title: "{{data['lan']['LTH1']}}"},
{ field: 'type', title: "{{data['lan']['LTH2']}}"},
{ field: 'log', title: "{{data['lan']['LTH3']}}"},
{ field: 'addtime', title: "{{data['lan']['LTH4']}}"}
],
data:rdata.data
})
})
},
//查看面板运行日志
get_panel_error_logs: function () {
layer.msg(lan.public.the_get, { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post('/config?action=get_panel_error_logs', {}, function (rdata) {
layer.closeAll();
if (!rdata.status) {
layer.msg(rdata.msg, { icon: 2 });
return;
};
layer.open({
type: 1,
title: 'Panel run log',
area: ['700px', '490px'],
shadeClose: false,
closeBtn: 2,
content: '<div class="setchmod bt-form pb70">'
+ '<pre class="crontab-log" style="overflow: auto; border: 0px none; line-height:23px;padding: 15px; margin: 0px; white-space: pre-wrap; height: 405px; background-color: rgb(51,51,51);color:#f1f1f1;border-radius:0px;font-family: \"微软雅黑\"">' + (rdata.msg == '' ? 'Current log is empty' : rdata.msg) + '</pre>'
+ '<div class="bt-form-submit-btn" style="margin-top: 0px;">'
+ '<button type="button" class="btn btn-danger btn-sm btn-title" style="margin-right:15px;" onclick="firewall.clean_panel_error_logs()">' + lan.public.empty + '</button>'
+ '<button type="button" class="btn btn-success btn-sm btn-title" onclick="layer.closeAll()">' + lan.public.close + '</button>'
+ '</div>'
+ '</div>'
});
setTimeout(function () {
$("#crontab-log").text(rdata.msg);
var div = document.getElementsByClassName('crontab-log')[0]
div.scrollTop = div.scrollHeight;
}, 200)
}).error(function () {
layer.closeAll();
layer.msg('Unable to get log!', { icon: 2 });
});
},
//清空面板错误日志
clean_panel_error_logs:function() {
layer.msg(lan.public.the_get, { icon: 16, time: 0, shade: [0.3, '#000'] });
$.post('/config?action=clean_panel_error_logs', {}, function (rdata) {
layer.closeAll();
layer.msg(rdata.msg, { icon: 1 });
});
}
}
firewall.get_init();
</script>
{% endblock %}

View File

@@ -0,0 +1,386 @@
{% extends "layout.html" %}
{% block content %}
<style>
#ftpData .webPath,#ftpData .webNote,#ftpData .ftpStatus{
white-space: nowrap;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
min-width: auto;
}
</style>
<div class="main-content pb55">
<div class="container-fluid">
<div class="pos-box bgw mtb15">
<!-- <div class="position f14 c9 pull-left">
<a class="plr10 c4" href="/">{{data['lan']['H1']}}</a>/<span class="plr10 c4">{{data['lan']['H2']}}</span>
</div>
<div class="search pull-right">
<form target="hid" onsubmit='ftp.get_list(1,$("#SearchValue").prop("value"))'>
<input type="text" id="SearchValue" class="ser-text pull-left" placeholder="{{data['lan']['SEARCH']}}" />
<button type="button" class="ser-sub pull-left" onclick='ftp.get_list(1,$("#SearchValue").prop("value"))'></button>
</form>
<iframe name='hid' id="hid" style="display:none"></iframe>
</div> -->
<div class="tab-list" id="cutMode">
<div class="tabs-item active">{{data['lan']['H2']}}</div>
</div>
</div>
<div class="safe bgw mtb15 pd15">
<div class="info-title-tips">
<p><span class="glyphicon glyphicon-alert" style="color: #f39c12; margin-right: 10px;"></span>{{data['lan']['PS']}} ftp://{{session['address']}}:{{session['port']}}</p>
</div>
<div id="bt_ftp_table"></div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{{ super() }}
<script>
bt.set_cookie('sites_path',"{{session['config']['sites_path']}}");
var isSetup = '{{data["isSetup"]}}';
if (isSetup !== 'True') {
layer.msg('{{data["lan"]["JS1"]}}<a href="javascript:;" onclick="bt.soft.install(\'pureftpd\');" style="color:#20a53a; float: right;">{{data["lan"]["JS2"]}}</a>',{icon:7,time:0,shade: [0.3, '#000']});
$(".layui-layer-shade").css("margin-left", "180px");
} else {
var ftp_table = bt_tools.table({
el: '#bt_ftp_table',
url: '/data?action=getData',
param: { table: 'ftps' },
minWidth: '1000px',
autoHeight: true,
pageName: 'ftp',
default: lan.pythonmamager.no_data,
sortParam: function (data) {
return { 'order': data.name + ' ' + data.sort }
},
methods: {
/**
* @description 设置FTP端口
* @param {function} callback 回调函数
* @return void
*/
add_ftp_user: function (callback) {
var that = this;
bt.ftp.add(function(rdata){
if (callback) callback(rdata);
if (rdata.status) that.$refresh_table_list(true);
})
},
/**
* @description 设置FTP端口
* @param {object} obj 配置对象包含port
* @param {function} callback 回调函数
* @return void
*/
del_ftp_user: function (obj, callback) {
var that = this;
var msg = lan.public.del+"["+ obj.name +"]";
var title = lan.get('confirm_del',[obj.name]);
bt.show_confirm(msg, title, function () {
bt.ftp.del(obj.id,obj.name, function (rdata) {
if (callback) callback(rdata);
bt.msg(rdata);
});
});
},
/**
* @description 设置FTP密码
* @param {object} obj 配置对象包含id、name、password
* @param {function} callback 回调函数
* @return void
*/
set_ftp_password: function (obj, callback) {
var that = this,bs = bt.ftp.set_password(function(rdata){
if(callback) callback(rdata);
});
$('.id'+bs).val(obj.id);
$('.ftp_username'+bs).val(obj.name);
$('.new_password'+bs).val(obj.password);
},
/**
* @description 设置FTP端口
* @param {object} obj 配置对象包含port
* @param {function} callback 回调函数
* @return void
*/
set_ftp_port: function (callback) {
var bs = bt.ftp.set_port(function(rdata){
if(callback) callback(rdata);
if (rdata.status) {
setTimeout(function () {
window.location.reload()
}, 1000)
}
})
$('.port' + bs).val('{{session["port"]}}');
},
/**
* @description 设置ftp状态
* @param {object} obj 配置对象包含id、username、status
* @param {function} callback 回调函数
* @return void
*/
set_ftp_status: function (obj, callback) {
if (!parseInt(obj.status)) {
bt.ftp.set_status(obj.id,obj.name,"1",function(rdata){
if(callback) callback(rdata);
});
} else {
bt.confirm({msg:lan.ftp.stop_confirm.replace('{1}',obj.name),title:lan.ftp.stop_title},function(index){
bt.ftp.set_status(obj.id,obj.name,"0",function(rdata){
if(callback) callback(rdata);
});
});
}
},
/**
* @description 设置路径
* @param {object} row 配置对象包含id、username、status
* @return void
*/
set_path: function (row, callback) {
if (row == null) return;
bt_tools.open({
title: lan.ftp.change_ftp_user_home,
area: '450px',
btn: [lan.public.save, lan.public.cancel],
content: {
'class': 'pd20',
form: [
{
label: lan.ftp.add_user,
group: {
type: 'text',
name: 'ftp_username',
width: '260px',
value: row.name,
disabled: true
}
},
{
label: lan.ftp.add_path,
class: 'path_line',
value: row.path,
group: {
type: 'text',
name: 'path',
width: '230px',
icon: {
type: 'glyphicon-folder-open',
select: 'all',
event: function (ev) {}
}
}
},
{
group: {
type: 'help',
style: {'margin-top': '0'},
list: [
lan.ftp.set_path_tips1,
lan.ftp.set_path_tips2,
lan.ftp.set_path_tips3
]
}
}
]
},
success: function () {
$('.path_line').after('\
<div class="line">\
<span class="tname checkType">' + lan.ftp.migrate + '</span>\
<div class="info-r" style="height:32px;margin-left:125px;padding-top:6px;">\
<input type="checkbox" name="migrate" id="migrate" class="btswitch btswitch-ios">\
<label for="migrate" class="btswitch-btn"></label>\
</div>\
</div>');
$('input[name="path"]').val(row.path)
},
yes: function (form, index) {
if (form.path === '') {
return layer.msg('Please select a path', {icon: 2});
}
var loading = bt.load('Setting up, please wait...');
var migrate = $('#migrate').is(':checked');
var data = Object.assign({id: row.id, migrate: migrate ? 1 : 0}, form);
bt.send('set_user_home', 'ftp/set_user_home', data, function (rdata) {
loading.close();
bt.msg(rdata);
setTimeout(function () {
if (!rdata.status) return;
layer.close(index);
callback && callback();
}, 2000)
});
}
});
},
},
column: [
{ type:'checkbox', width: 20 },
{ fid: 'name', title: lan.ftp.add_user, type: 'text' },
{
fid: 'password',
title: lan.ftp.add_pass,
type: 'password',
copy: true,
eye_open: true
},
{
fid: 'status',
title: lan.ftp.status,
sort: true,
width: 100,
type: 'status',
config: {
icon: true,
list: [
[ '1', lan.ftp.start, 'bt_success', 'glyphicon-play' ],
[ '0', lan.ftp.stop, 'bt_danger', 'glyphicon-pause']
]
},
event: function (row, index, ev, key, that) {
that.set_ftp_status({
id: row.id, status: row.status, name: row.name
}, function (res) {
if (res.status)
that.$modify_row_data({ status: parseInt(row.status) ? '0' : '1' });
});
}
},
{
fid: 'path',
title: lan.ftp.add_path,
type: 'link',
event: function (row, index, ev) {
openPath(row.path);
}
},
bt.public.get_quota_config('ftp'),
{
fid: 'ps',
title: lan.ftp.add_ps,
type: 'input',
blur: function (row, index, ev) {
bt.pub.set_data_ps({
id: row.id, table: 'ftps', ps: ev.target.value
}, function (res) {
bt_tools.msg(res);
});
},
},
{
title: lan.ftp.operate,
type: 'group',
width: 170,
align: 'right',
group:[
{
title: 'Set Path',
event: function (row, index, ev, key, that) {
that.set_path(row, function () {
that.$refresh_table_list(true);
});
}
},
{
title: lan.ftp.edit_pass,
event: function (row, index, ev, key, that) {
that.set_ftp_password({
id: row.id, name: row.name, password: row.password
}, function (rdata) {
if (rdata.status) that.$refresh_table_list(true);
});
}
},
{
title: lan.ftp.del,
event: function (row, index, ev, key, that) {
that.del_ftp_user({
id: row.id, name: row.name
}, function (res) {
if (res.status) that.$refresh_table_list(true);
});
}
}
]
}
],
tootls:[
{
type: 'group',
positon: ['left', 'top'],
list:[
{
title: 'Add FTP',
active: true,
event: function (ev, that) {
that.add_ftp_user();
}
},
{
title: 'Change FTP Port',
event: function (ev, that) {
that.set_ftp_port();
}
}
]
},
{
type: 'search',
positon: ['right', 'top'],
placeholder: 'FTP search',
searchParam: 'search', // 搜索请求字段,默认为 search
value: '', // 当前内容,默认为空
},
{ // 批量操作
type: 'batch',
positon: ['left', 'bottom'],
config: {
title: lan.ftp.del,
url: '/ftp?action=DeleteUser',
load: true,
param: function (row) {
return { id: row.id, username: row.name }
},
callback: function (that) {
var msg = '<div style="color: red;">' + lan.get('del_all_ftp', [that.check_list.length]) + '</div>';
bt.show_confirm(lan.ftp.del_all, msg, function () {
that.start_batch({}, function (list) {
var html = '';
for (var i = 0; i < list.length; i++) {
var item = list[i];
html += '<tr><td>'+ item.name +'</td><td><div style="float:right;"><span style="color:'+ (item.request.status?'#20a53a':'red') +'">'+ item.request.msg +'</span></div></td></tr>';
}
ftp_table.$batch_success_table({
title: 'Batch Delete FTP',
th: 'FTP',
html: html
});
ftp_table.$refresh_table_list(true);
});
})
}
}
},
{ // 分页显示
type: 'page',
positon: ['right','bottom'], // 默认在右下角
pageParam: 'p', // 分页请求字段,默认为 : p
page: 1, // 当前分页 默认1
numberParam: 'limit', //分页数量请求字段默认为 : limit
number: 20, //分页数量默认 : 20条
numberList: [10, 20, 50, 100, 200], // 分页显示数量列表
numberStatus: true, // 是否支持分页数量选择,默认禁用
jump: true, // 是否支持跳转分页,默认禁用
}
]
});
}
</script>
{% endblock %}

View File

@@ -0,0 +1,276 @@
{% extends "layout.html" %}
{% block content %}
<style>
.chart-box{
display: flex;
flex-direction: row;
padding: 20px 0;
}
.rank{
display: flex;
flex-direction: column;
align-items: center;
width: 16.5%;
color: #999;
line-height: 30px;
font-size: 15px;
font-weight: 500;
}
.chart-li{
width: 105px;
height: 105px;
position: relative;
}
.chart-li canvas{
cursor: pointer;
}
.mem_mask{
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
background: rgba(220,220,220,.1);
border-radius: 50%;
cursor: pointer;
}
.mem_mask .men_inside_mask{
position: absolute;
left: 7px;
top: 7px;
bottom: 7px;
right: 7px;
background: rgba(255,255,255,0.8);
border-radius: 50%;
}
.info-status{
height: 30px;
line-height: 30px;
}
.outerCircle{
width: 105px;
height: 105px;
text-align: center;
background-color: #e5e5e5;
border-radius: 50%;
padding: 7px;
}
.outerCircle .innerCircle{
width: 100%;
height: 100%;
line-height: 91px;
text-align: center;
border-radius: 50%;
font-size: 17px;
background-color: #fff;
}
</style>
<div class="main-content">
<div class="container-fluid" style="padding-bottom: 66px;padding-left: 15px;">
<div class="index-pos-box bgw mtb15">
<div class="position f12 c6 pull-left flex" style="background:none;padding-left:15px">
<span class="bind-user c4" style="background-position-y: center;">
<a href="javascript:bt.pub.bind_btname();" class="btlink">{{data['lan']['ACCOUNT']}}</a>
</span>
<span class="flex" style="align-items: center;margin-right:16px;"><i class="icon-demand"></i><a class="btlink" onClick="javascript:bt.openFeedback({title:'YakPanel demand feedback collection',placeholder:'<span>If you encounter any problems or imperfect functions during use, please describe <br> your problems or needs to us in detail, we will try our best to solve or improve for <br> you</span>',recover:'We pay special attention to your requirements feedback, and we conduct regular weekly requirements reviews. I hope I can help you better',key:993,proType:2});" style="margin-left: 5px;">Feedback</a></span>
{% if data['pd'].find("{{data['lan']['ACCOUNT']}}") != -1 %}
<span class="bt-dashi" style="background-position-y: center;">
<a class="btlink" href="https://www.yakpanel.com" target="_blank" style="margin-left:5px">{{data['lan']['INVITATION_REWARD']}}</a>
</span>
{% endif %}
<!--<span class="bind-weixin c4"><a href="javascript:bt.weixin.open_wxapp();" class="btlink">{{data['lan']['WECHAT']}}</a></span>-->
<span class="ico-system" style="background-position-y: center;">{{data['lan']['S1']}}</span><span id="info" style="margin-left:10px;"> {{data['lan']['S2']}}</span>&#12288;&#12288;{{data['lan']['S3']}} <span id="running">{{data['lan']['S4']}}</span>
</div>
<span class="pull-right f12 c6" style="line-height:52px; margin-right:15px">
{{ data['pd'] | safe }}
<span id="btversion" style="margin-right:10px">
<a onclick="index.open_log()" style="cursor: pointer;">{{session['version']}}</a>
</span>
<span id="toUpdate"><a class="btlink" href="javascript:index.check_update();">{{data['lan']['UPDATE']}}</a></span>
<span style="margin:0 10px"><a class="btlink" href="javascript:index.re_panel();">{{data['lan']['FIX']}}</a></span>
<span style="margin-right:10px"><a class="btlink" href="javascript:index.re_server();">{{data['lan']['RESTART']}}</a></span>
</span>
</div>
<div class="col-xs-24 col-sm-24 col-md-24" id="home-recommend"></div>
<div class="danger-tips">
<div class="important-title" id="messageError" style="display: none; margin-top:15px"></div>
</div>
<div class="conter-box server bgw mtb15">
<div class="title c6 f16 plr15">
<h3 class="c6 f16 pull-left">{{data['lan']['STATUS']}}</h3>
</div>
<div class="server-circle">
<!-- <ul class="row" id="systemInfoList">
<li class="col-xs-6 col-sm-3 col-md-3 col-lg-2 mtb20 circle-box text-center loadbox">
<h3 class="c9 f15">{{data['lan']['LOAD_STATUS']}}<a href="https://www.yakpanel.com/forum/d/1265-what-does-the-data-in-load-status-represent" target="_blank" class="bt-ico-ask" style="cursor: pointer;">?</a></h3>
<div class="cicle">
<div class="bar bar-left">
<div class="bar-left-an bar-an"></div>
</div>
<div class="bar bar-right">
<div class="bar-right-an bar-an"></div>
</div>
<div class="occupy"><span>0</span>%</div>
</div>
<h4 class="c9 f15">{{data['lan']['S2']}}</h4>
</li>
<li class="col-xs-6 col-sm-3 col-md-3 col-lg-2 mtb20 circle-box text-center cpubox">
<h3 class="c9 f15">{{data['lan']['P1']}}</h3>
<div class="cicle">
<div class="bar bar-left">
<div class="bar-left-an bar-an"></div>
</div>
<div class="bar bar-right">
<div class="bar-right-an bar-an"></div>
</div>
<div class="occupy"><span>0</span>%</div>
</div>
<h4 class="c9 f15">{{data['lan']['S2']}}</h4>
</li>
<li class="col-xs-6 col-sm-3 col-md-3 col-lg-2 mtb20 circle-box text-center membox">
<h3 class="c9 f15">{{data['lan']['P2']}}</h3>
<div class="cicle mem-release">
<div class="bar bar-left">
<div class="bar-left-an bar-an"></div>
</div>
<div class="bar bar-right">
<div class="bar-right-an bar-an"></div>
</div>
<div class="occupy"><span>0</span>%</div>
<div class="mem-re-min"></div>
<div class="mem-re-con" title="$data['lan']['P3']"></div>
</div>
<h4 class="c9 f15">{{data['lan']['S2']}}</h4>
</li>
</ul> -->
<ul class="row" id="systemInfoList">
<li class="rank col-xs-6 col-sm-3 col-md-3 col-lg-2 mtb20 circle-box text-center">
<div class="titles">
<span>{{data['lan']['LOAD_STATUS']}}</span>
<a href="https://www.yakpanel.com/forum/d/1265-what-does-the-data-in-load-status-represent" target="_blank" class="bt-ico-ask" style="cursor: pointer;">?</a>
</div>
<div id="loadChart" class="chart-li">
<div class="outerCircle"><div class="innerCircle">0%</div></div>
</div>
<div id="load" class="info-status">{{data['lan']['S2']}}</div>
</li>
<li class="rank col-xs-6 col-sm-3 col-md-3 col-lg-2 mtb20 circle-box text-center">
<div class="titles">{{data['lan']['P1']}}</div>
<div id="cpuChart" class="chart-li">
<div class="outerCircle"><div class="innerCircle">0%</div></div>
</div>
<div id="cpu" class="info-status">{{data['lan']['S2']}}</div>
</li>
<li class="rank col-xs-6 col-sm-3 col-md-3 col-lg-2 mtb20 circle-box text-center">
<div class="titles">{{data['lan']['P2']}}</div>
<div id="memChart" class="chart-li">
<div class="outerCircle"><div class="innerCircle">0%</div></div>
</div>
<div id="mem" class="info-status">{{data['lan']['S2']}}</div>
</li>
</ul>
</div>
</div>
<div class="system-info bgw clearfix mtb15">
<div class="title c6 f16 plr15">
{{data['lan']['Overview']}}
</div>
<div class="system-info-con mtb20">
<ul class="clearfix text-center">
<li class="sys-li-box ccol-xs-4 col-sm-4 col-md-4 col-lg-3">
<p class="name f15 c9">{{data['lan']['N1']}}</p>
<div class="val"><a class="btlink" href="/site">{{data['siteCount']}}</a></div>
</li>
<li class="sys-li-box ccol-xs-4 col-sm-4 col-md-4 col-lg-3">
<p class="name f15 c9">{{data['lan']['N3']}}</p>
<div class="val"><a class="btlink" href="/ftp">{{data['ftpCount']}}</a></div>
</li>
<li class="sys-li-box ccol-xs-4 col-sm-4 col-md-4 col-lg-3">
<p class="name f15 c9">{{data['lan']['N2']}}</p>
<div class="val"><a class="btlink" href="/database">{{data['databaseCount']}}</a></div>
</li>
<li class="sys-li-box ccol-xs-4 col-sm-4 col-md-4 col-lg-3">
<p class="name f15 c9">{{data['lan']['N4']}}</p>
<div class="val"><a class="btlink warning_num" href="javascript:;" onclick="index.reader_warning_view()">0</a></div>
</li>
</ul>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-6 pull-left pd0">
<div class="pr8">
<div class="bgw">
<div class="title c6 f16 plr15">{{data['lan']['P4']}}</div>
<div class="setting-con" style="padding:0; height:442px; margin-right: -4px; overflow: hidden;">
<div class="container-fluid soft-man">
<input name="list1SortOrder" type="hidden" value="" />
<div id="indexsoft" class="row"></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-6 pull-left pd0">
<div class="pl7">
<div class="bgw" style="height:283.5px">
<div class="title c6 f16 plr15 tabs-nav">
<span class="active">{{data['lan']['FLOW']}}</span>
<span>Disk IO</span>
<div class="tabs-down">
<select class="bt-input-text" name="network-io" style="font-size: 12px;"></select>
<select class="bt-input-text hide" name="disk-io" style="font-size: 12px;"></select>
</div>
</div>
<div class="tabs-content">
<div class="tabs-active tabs-item">
<div class="bw-info">
<div class="col-sm-6 col-md-3"><p class="c9"><span class="ico-up"></span>{{data['lan']['UPLOAD']}}</p><a id="upSpeed">{{data['lan']['S2']}}</a></div>
<div class="col-sm-6 col-md-3"><p class="c9"><span class="ico-down"></span>{{data['lan']['DOWNLOAD']}}</p><a id="downSpeed">{{data['lan']['S2']}}</a></div>
<div class="col-sm-6 col-md-3"><p class="c9">{{data['lan']['TOTAL_TX']}}</p><a id="upAll">{{data['lan']['S2']}}</a></div>
<div class="col-sm-6 col-md-3"><p class="c9">{{data['lan']['TOTAL_RX']}}</p><a id="downAll">{{data['lan']['S2']}}</a></div>
</div>
<div id="NetImg" style="width:100%;height: 370px;"></div>
</div>
<div class="tabs-item">
<div class="bw-info">
<div class="col-sm-6 col-md-3"><p class="c9"><span class="ico-read"></span>Read</p><a id="readBytes">{{data['lan']['S2']}}</a></div>
<div class="col-sm-6 col-md-3"><p class="c9"><span class="ico-write"></span>Write</p><a id="writeBytes">{{data['lan']['S2']}}</a></div>
<div class="col-sm-6 col-md-3"><p class="c9">TPS</p><a id="diskIops">{{data['lan']['S2']}}</a></div>
<div class="col-sm-6 col-md-3"><p class="c9">IO Wait</p><a id="diskTime">{{data['lan']['S2']}}</a></div>
</div>
<div id="IoStat" style="width:100%;height: 370px;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{{ super() }}
<script type="text/javascript" src="/static/js/jquery.dragsort-0.5.2.min.js"></script>
<script type="text/javascript" src="/static/js/echarts.min.js"></script>
<script type="text/javascript" src="/static/js/index.js?f2={{g['version']}}"></script>
<script type="text/javascript" src="/static/js/soft.js?version_20191219={{g['version']}}"></script>
<script type="text/javascript" src="/static/ace/ace.js?date={{g.version}}"></script>
<script type="text/javascript">
$(".btpro span").click(function(){
layer.confirm(lan.index.change_free, { icon: 3, btn: [lan.index.ubind], closeBtn: 2, title: lan.index.confirm_cancel }, function () {
$.post('/ssl?action=DelToken', {}, function (rdata) {
layer.msg(rdata.msg);
setTimeout(function () {
window.location.reload();
},2000);
});
});
});
bt.set_cookie('serverType', "{{session['webserver']}}");
</script>
{% endblock %}

View File

@@ -0,0 +1,58 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="referer" content="never" />
<meta name="renderer" content="webkit" />
<link rel="shortcut icon" href="{{g['panel_theme']['logo']['favicon']}}" type="image/x-icon" />
<link rel="stylesheet" href="/static/bootstrap-3.3.5/css/bootstrap.min.css?v=1773287522785" />
<link rel="stylesheet" href="/static/codemirror/lib/codemirror.css?v=1773287522785" />
<link rel="stylesheet" href="/static/oldcss/site.css?v=1773287522785" />
<link rel="stylesheet" href="/static/vite/iconfont/iconfont.css?v=1773287522785" />
<!-- naive-ui 的样式会出现在这里 -->
<meta name="naive-ui-style" />
<title>{{session['title']}}</title>
<script>
window.sites_path = "{{session['config']['sites_path']}}"
window.webserver = "{{session['webserver']}}"
window.distribution = "{{session['config']['distribution']}}"
window.panelVersion = "{{session['version']}}"
window.vite_menus = '{{g['menus']}}'
window.isSetup = "{{data['isSetup']}}" === 'True' ? true : false
window.public_key = "{{data['public_key']}}"
window.translations = "{{data['translations']}}"
// window.vite_public_icon_info = '{{g['panel_asset']}}'
window.vite_public_panel_theme = '{{g['panel_theme']}}'
var sessionInfo = {
title: "{{session['title']}}",
username: "{{session['username']}}",
statusCode: "{{data['status_code']}}",
}
</script>
<script type="module" crossorigin src="/static/vite/js/index-BTglIPU2.js?v=1773287522785"></script>
<link rel="modulepreload" crossorigin href="/static/vite/js/prismjs-BZPoR7_J.js?v=1773287522785">
<link rel="modulepreload" crossorigin href="/static/vite/js/vue-core-DJjvd5ZC.js?v=1773287522785">
<link rel="modulepreload" crossorigin href="/static/vite/js/naive-ui--dJnpVcV.js?v=1773287522785">
<link rel="stylesheet" crossorigin href="/static/vite/css/prismjs-D-3FhBe_.css?v=1773287522785">
<link rel="stylesheet" crossorigin href="/static/vite/css/index-DEM1fxGq.css?v=1773287522785">
<script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();window.__vite_is_modern_browser=true</script>
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
</head>
<body>
<a
style="display: none"
id="panel_debug"
data="{{g['debug']}}"
data-pyversion="{{g['pyversion']}}"></a>
<a style="display: none" id="request_token_head" token="{{session['request_token_head']}}"></a>
<a style="display: none" id="recycle_bin" data="{{data['recycle_bin']}}"></a>
<div id="app"></div>
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="/static/vite/js/polyfills-legacy-1bR1DGAD.js?v=1773287522785"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="/static/vite/js/index-legacy-DQdImDha.js?v=1773287522785">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>

View File

@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow">
<title>{{data['lan']['TITLE']}}</title>
<link href="/static/css/install.css" rel="stylesheet">
<script type="text/javascript" src="/static/js/jquery.js"></script>
<script type="text/javascript" src="/static/layer/layer.js"></script>
</head>
<body>
<div class="main">
{% if data['status'] %}
<div class="warp">
<div class="title">{{data['lan']['INIT_PANEL']}}</div>
<form class="form" action="/install?action=install" method="post" onsubmit="return checkSubmit()">
<fieldset>
<legend>{{data['lan']['SET_ADMIN']}}</legend>
<p><span class="tit">{{data['lan']['USER_NAME']}}</span><input type="text" name="bt_username" value="{{data['username']}}" /> {{data['lan']['SET_ADMIN_NAME']}}</p>
<p><span class="tit">{{data['lan']['MAM_PASS']}} </span><input type="password" name="bt_password1" value="" /> {{data['lan']['SET_ADMIN_NAME']}}</p>
<p><span class="tit">{{data['lan']['REPEAT_PASS']}} </span><input type="password" name="bt_password2" value="" /> {{data['lan']['SET_ADMIN_PASS']}}</p>
</fieldset>
<input class="submit-btn" type="submit" value="{{data['lan']['CONFIRM']}}" />
</form>
</div>
{% else %}
<div class="success">
<p>{{data['lan']['INIT_PANEL_SUCCESS']}}</p>
<a href="/login">{{data['lan']['LOGIN_PAGE']}}</a>
</div>
{% endif %}
</div>
<div class="copyright">Copyright © 2014-2099 <a href="https://www.yakpanel.com" target="_blank">{{data['lan']['BT']}}</a>{{data['lan']['PS1']}}(<a href="https://www.yakpanel.com" target="_blank">www.yakpanel.com</a>) All Rights Reserved</div>
<script>
function checkSubmit(){
var username = $("input[name='bt_username']").val();
var password1 = $("input[name='bt_password1']").val();
var password2 = $("input[name='bt_password2']").val();
if(username == '' || password1 == ''){
layer.msg(lan.install.passwd_cant_empty,{icon:5});
return false;
}
if(password1 != password2){
layer.msg(lan.install.passwd_not_same,{icon:5});
return false;
}
layer.msg(lan.install.setting_up,{icon:16,time:0});
return true;
}
var main = $(".main");
$(window).resize(function () {
var wh = $(window).height();
main.height(wh);
}).resize();
</script>
</body>
</html>

View File

@@ -0,0 +1,882 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="referer" content="never" />
<meta name="renderer" content="webkit" />
<title>{{g.title}}</title>
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
<link href="{{g.cdn_url}}/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<link href="{{g.cdn_url}}/codemirror/lib/codemirror.css?20191127={{g['version']}}" rel="stylesheet" />
<link href="{{g.cdn_url}}/css/site.css?version={{g['version']}}&repair={{data['js_random']}}" rel="stylesheet" />
{% for css_f in g['other_css'] %}
<link href="{{css_f}}" rel="stylesheet" />
{% endfor %}
<!--[if lte IE 9]>
<script src="/static/js/requestAnimationFrame.js"></script>
<![endif]-->
<style>
.contextmenu {
position: absolute;
width: 120px;
background: #ffffff;
border-radius: 5px;
overflow: hidden;
z-index: 99999999;
}
.contextmenu li {
border-left: 3px solid transparent;
transition: ease 0.3s;
}
.contextmenu li:hover {
background: #707070;
border-left: 3px solid #333;
}
.contextmenu li a {
display: block;
padding: 5px 10px;
color: #000000;
text-decoration: none;
transition: ease 0.3s;
cursor: default;
}
.contextmenu li:hover a {
color: #fff;
}
.toolbar-right {
width: 35px;
height: 35px;
position: fixed;
right: 0;
bottom: 120px;
display: flex;
background-color: #fff;
box-shadow: 0 0 4px 0 #ccc;
flex-direction: column;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
border-radius: 4px;
}
.toolbar-right .feedback {
display: inline-block;
height: 35px;
width: 35px;
position: relative;
background-repeat: no-repeat;
background-position: center center;
border-radius: 4px;
background-size: 13.5px;
}
.toolbar-right .feedback {
background-image: url('/static/img/feedback.svg');
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
.feedback-iframe .layui-layer-content {
overflow: hidden !important;
}
</style>
<script type="text/javascript">
var recycle_bin_db_open = !!{{g['recycle_bin_db_open']}};
var recycle_bin_open = !!{{g['recycle_bin_open']}};
var ie_version = (function() {
var userAgent = navigator.userAgent;
var isLessIE11 = userAgent.indexOf('compatible') > -1 && userAgent.indexOf('MSIE') > -1;
var isEdge = userAgent.indexOf('Edge') > -1 && !isLessIE11;
var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf('rv:11.0') > -1;
if (isLessIE11) {
var IEReg = new RegExp('MSIE (\\d+\\.\\d+);');
IEReg.test(userAgent);
var IEVersionNum = parseFloat(RegExp['$1']);
if (IEVersionNum === 7) {// IE7
return 7
} else if (IEVersionNum === 8) {// IE8
return 8
} else if (IEVersionNum === 9) {// IE9
return 9
} else if (IEVersionNum === 10) { // IE10
return 10
} else {
return 6
}
} else if (isEdge) { // edge
return 'edge'
} else if (isIE11) {// IE11
return 11
} else {// 不是ie浏览器
return -1
}
}());
if (ie_version != -1 && ie_version < 10 && ie_version != 'edge') {
window.location.href = '/tips';
}
if(ie_version != -1 && ( ie_version >= 10 || ie_version === 'edge')){
var title = document.createElement('div');
title.setAttribute('class', 'content');
title.setAttribute('style', 'height: 50px;position: absolute;top: 0;left: 0;right: 0;line-height: 50px;z-index: 9999999;background: rgba(0,0,0,.5);text-align: center;color: #ff922e;font-size: 19px;font-weight: 600;')
title.innerHTML = '<span>The current version of IE browser is too low, some functions cannot be displayed, please change to other browsers!</span><span class="compatibility_tips" style="position: absolute;right: 15px;top: 10px;font-size: 14px;display: inline-block; height: 30px;line-height: 28px;padding: 0 12px;font-weight: 500;color: #ffffff; border-radius: 4px;cursor: pointer;border: 2px solid #ffffff;font-weight: 500;">Close Tips</span>';
title.querySelector('.compatibility_tips').addEventListener('click',function(res){
var parentNode = this.parentElement;
parentNode.parentElement.removeChild(parentNode);
});
document.querySelector('html').appendChild(title);
}
if (!window.location.origin) {
window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
}
</script>
</head>
<body>
<div class="bt-warp bge6">
<a style="display: none" id="panel_debug" data="{{g['debug']}}" data-pyversion="{{g['pyversion']}}"></a>
<a style="display: none" id="request_token_head" token="{{session['request_token_head']}}"></a>
<div id="container" class="container-fluid">
<div class="sidebar-scroll" id="showMainView">
<!-- <div class="sidebar-auto">
<div id="task" class="task cw" onclick="messagebox()">0</div>
<h3 class="mypcip">
<span class="f14 cw">{{session['address']}}</span>
</h3>
<ul class="menu">
{% for menu in g['menus'] %} {% if menu['href'] == g.uri %}
<li id="{{menu['id']}}" class="current"><a class="{{menu['class']}}" href="{{menu['href']}}">{{menu['title']}}</a></li>
{% else %}
<li id="{{menu['id']}}"><a class="{{menu['class']}}" href="{{menu['href']}}">{{menu['title']}}</a></li>
{% endif %} {% endfor %}
</ul>
<div id="newbtpc"></div>
<div class="btpc-plus" onclick="bindYakPanel(0,'b')">+</div>
</div> -->
</div>
<button style="display: none" id="bt_copys" class="bt_copy" data-clipboard-text=""></button>
<a style="display: none" id="defaultPath">{{session['config']['sites_path']}}</a> {% block content %}{% endblock %}
<div class="toolbar-right">
<a href="javascript:;" class="feedback"></a>
</div>
<div class="footer bgw">
{{session['brand']}}{{session['product']}} &copy;2014-{{session['yaer']}} {{session['brand']}} (yakpanel.com)
<!--<a style="margin-left:20px;color:#20a53a;" href="https://www.yakpanel.com/forum" target="_blank">求助|建议</a>-->
<a style="margin-left: 20px; color: #20a53a" href="http://www.yakpanel.com/forum" target="_blank">{{session['bt_help']}}</a>
<a style="margin-left: 20px; color: #20a53a" href="https://doc.yakpanel.com/web/#/3?page_id=117" target="_blank">Documentation</a>
</div>
</div>
<script type="text/javascript">
var recycle_bin_db_open = "{{g['recycle_bin_db_open']}}" === '1';
var recycle_bin_open = "{{g['recycle_bin_open']}}" === '1';
var update_code = "{{data['js_random']}}";
var panel_version = "{{g['version']}}";
var cdn_url = '{{g.cdn_url}}';
</script>
{% if request.path == '/btwaf/index' %}
<script type="text/javascript" src="{{g.cdn_url}}/js/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="{{g.cdn_url}}/layer/layer.js?version={{g['version']}}"></script>
<script type="text/javascript" src="{{g.cdn_url}}/language/{{session['lan']}}/lan.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/clipboard.min.js" defer></script>
<script type="text/javascript" src="{{g.cdn_url}}/laydate/laydate.js" defer></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/public.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/public_backup.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/tools.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script src="{{g.cdn_url}}/js/jsencrypt.min.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
{% endif %} {% block scripts %}
<script src="{{g.cdn_url}}/js/jquery-1.10.2.min.js"></script>
<script src="{{g.cdn_url}}/layer/layer.js?version={{g['version']}}"></script>
<script src="{{g.cdn_url}}/language/{{session['lan']}}/lan.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script src="{{g.cdn_url}}/js/clipboard.min.js" defer></script>
<script src="{{g.cdn_url}}/laydate/laydate.js" defer></script>
<script src="{{g.cdn_url}}/js/jquery.qrcode.min.js" defer></script>
<!-- 以下文件未来将被剔除 -->
<script src="{{g.cdn_url}}/js/bootstrap.min.js"></script>
<script src="{{g.cdn_url}}/js/public.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script src="{{g.cdn_url}}/js/public_backup.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script src="{{g.cdn_url}}/codemirror/lib/codemirror.js" defer></script>
<!-- End -->
<script type="text/javascript" src="{{g.cdn_url}}/js/tools.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
{% for js_f in g['other_js'] %}
<script type="text/javascript" src="{{js_f}}"></script>
{% endfor %}
<script type="text/javascript">
// 评分
var id = 0;
$('.feedback').hover(
function () {
$('.toolbar-right .service').attr('style', '');
$('.toolbar-right').attr('style', '');
too = false;
num = 0;
$('#wechat-customer').addClass('hide');
id = layer.tips('Click to open the survey', '.feedback', {
tips: [4, 'rgb(54, 58, 80)'],
id: 'feedback_id',
time: 0,
success: function (layero, index) {
var top = layero.css('top');
layero.css('top', parseInt(top) + 'px');
},
});
$('.toolbar-right').css({
'border-bottom-left-radius': '4px',
'border-bottom-right-radius': '4px',
});
$(this).css({
'background-image': 'url(/static/img/feedback_2.svg)',
'background-color': 'rgb(32, 165, 58)',
});
},
function () {
layer.close(id);
$(this).attr('style', '');
$('.toolbar-right').attr('style', '');
}
);
var isNps = window.localStorage.getItem('NPS');
$('.toolbar-right .feedback').on('click', function () {
if ($('.nps_survey').length >= 1) return false; //防止多层
if (window.localStorage.getItem('panelNPS') == null) window.localStorage.setItem('panelNPS', true);
layer.open({
type: 1,
title: false,
offset: 'auto',
btn: false,
area: '580px',
skin: 'nps_survey',
closeBtn: 2,
content:
'<div class="nps_survey_box"">\
<div class="nps_survey_banner">\
<span>\
<i></i>\
<span style="vertical-align: 4px;">YakPanel product experience survey</span>\
</span>\
</div>\
<div style="padding:30px 40px;">\
<div class="nps_survey_score" style="height: 130px;">\
<div class="survey_title">How likely are you to recommend a YakPanel to a friend or colleague?</div>\
<ul class="survey_score_num small">\
<li data-content="0">0</li>\
<li data-content="1">1</li>\
<li data-content="2">2</li>\
<li data-content="3">3</li>\
<li data-content="4">4</li>\
<li data-content="5">5</li>\
<li data-content="6">6</li>\
</ul>\
<ul class="survey_score_num medium">\
<li data-content="7">7</li>\
<li data-content="8">8</li>\
</ul>\
<ul class="survey_score_num large">\
<li data-content="9">9</li>\
<li data-content="10">10</li>\
</ul>\
</div>\
<div class="nps_survey_content hide">\
<div class="nps_survey_line">\
<span class="nps_survey_title"><i>* </i>1.What needs of yours have not yet been met on the aaPpanel?</span>\
<textarea type="text" name="problem_one" placeholder=""></textarea>\
<div class="placeholder c9 problem_tips" style="top: 36px; left: 10px; display: block;font-size: 12px;">When you use the product, what needs have not been met, or what bugs have not <br /> been solved, please describe your problems or needs to us in detail, and we will try <br /> our best to solve and develop corresponding functions for you</div>\
</div>\
<div class="nps_survey_line hide">\
<span class="nps_survey_title">2.What is your main reason for giving this score?</span>\
<span class="nps_surver_tips">For example, the factors that affect your rating: features, actions, etc</span>\
<input type="text" name="problem_two">\
</div>\
<div class="nps_survey_line hide">\
<span class="nps_survey_title">3.Which of your needs are not being met on the YakPanel?</span>\
<span class="nps_surver_tips">Your suggestions are likely to be released in the next version update</span>\
<input type="text" name="problem_three">\
</div>\
<div class="score_title"><span>We pay special attention to your requirements feedback, and we conduct regular weekly requirements reviews. I hope I can help you better</span></div>\
</div>\
<button class="btn btn-success set_survey_info" style="margin-top:30px">Submit</button>\
</div>\
</div>\
<style>\
.nps_survey_banner{position: relative;background: url(/static/img/feedback/QA_banner.png);width:100%;background-size: 100%;height: 92px;margin-top: -1px;}\
.nps_survey_banner>span{position: absolute;left: 32px;top: 16px;font-size: 17px;color: #fff;}\
.nps_survey_banner i{background-image: url(/static/images/svg/logo-white.svg);background-repeat: no-repeat;background-size: 18px;display: inline-block;width: 20px;height: 20px;}\
.survey_title {font-size: 19px;font-weight: bold;text-align: center;color: #000;}\
.score_title{font-size:13px;color:#20a53a;text-align:center;line-height: 35px;}\
.nps_survey_score ul{position: relative;margin-top:25px;display: inline-block;border: 1px solid #ccc;border-radius: 2px;font-size:0;cursor: pointer;}\
.survey_score_num::before {content: "";height: 35px;width: 100%;display: inline-block;position: absolute;bottom: -37px;cursor: auto;}\
.nps_survey_score ul.small::before{background:linear-gradient(to bottom,#ffdfdd,#fff)}\
.nps_survey_score ul.medium::before{background:linear-gradient(to bottom,#fff2db,#fff);}\
.nps_survey_score ul.large::before{background:linear-gradient(to bottom,#ebf9e0,#fff)}\
.survey_score_num.small::after {content: "Impossible";position: absolute;top: 48px;left: 117px;font-size: 12px;cursor: auto;}\
.survey_score_num.medium::after {content: "May";position: absolute;top: 48px;left: 18px;font-size: 12px;cursor: auto;}\
.survey_score_num.large::after {content: "Definitely";position: absolute;top: 48px;left: 18px;font-size: 12px;cursor: auto;}\
.survey_score_num li {position: relative;display: inline-block;width: 42px;height: 42px;line-height: 42px;text-align: center;font-size:15px;font-weight: bold;}\
.survey_score_num .act::before {content: attr(data-content);color: #fff;height: 52px;line-height: 52px;width: 100%;position: absolute;top: -5px;font-size: 19px;background: inherit;border-radius: 4px;font-weight: initial;text-align: left;padding-left: 10px;}\
.survey_score_num .ten::before {content: attr(data-content);color: #fff;height: 52px;line-height: 52px;width: 100%;position: absolute;top: -5px;font-size: 19px;background: inherit;border-radius: 4px;font-weight: initial;text-align: left;padding-left: 2px;}\
.survey_score_num .act::after {content: "Pt";font-size:12px;color: #fff;position: absolute;left:21px;margin-left: 2px;}\
.survey_score_num .ten::after {content: "Pt";font-size:12px;color: #fff;position: absolute;left:25px;}\
.survey_score_num li::before{content:"";position: absolute;right: 0;top:10px;border-right-style: solid;border-right-width: 1px;border-color: rgb(255 255 255 / 30%);height: 25px;}\
.survey_score_num li:last-child::before{border:none}\
.survey_score_num.small{border-color: #f3a8a5;background: #f7cfce;color: #ed6d68;}\
.survey_score_num.medium{border-color: #f4cf8f;background: #fbe6c0;color: #f7be56;margin: 0 12px;}\
.survey_score_num.large{border-color: #a7db88;background: #d8f0ca;color: #69be3d;}\
.nps_survey_content{margin-top: 35px;}\
.nps_survey_line{ font-size:15px;position: relative;}\
.nps_survey_line.problem_rule input,.nps_survey_line.problem_rule textarea{border-color:#f56c6c}\
.nps_survey_line.problem_rule::before{content:"Please enter your requirements before submitting~";position:absolute;top:72px;font-size:12px;color:#f56c6c}\
.nps_survey_line.problem_rule1::before{content:"Please enter your requirements before submitting~";position:absolute;top:190px;font-size:12px;color:#f56c6c}\
.nps_survey_line .nps_survey_title{margin:20px 0 7px 0;font-weight: bold;}\
.nps_survey_line .nps_survey_title i{color:red;}\
.nps_survey_line .nps_surver_tips{font-size:12px;color:#999;}\
.nps_survey_line p{color:#999;font-size:12px;margin-bottom:5px;}\
.nps_survey_line input{width:500px;height:45px;border:1px solid #cccccc;font-size:12px;margin-top: 5px;margin-bottom: 20px;padding-left: 5px;}\
.nps_survey_line textarea{width:500px;height:160px;border:1px solid #cccccc;font-size:12px;margin-top: 5px;margin-bottom: 20px;padding: 5px 10px;line-height: 22px;}\
.set_survey_info{margin: 5px auto 0;display: block;padding: 6px 40px;}\
</style>',
success: function (layers, indexs) {
window.localStorage.setItem('NPS', true);
// 动态获取问卷内容
var nps_content = '',
nps_data = [];
bt_tools.send(
{
url: '/config?action=get_nps_new',
data: {
product_type: 1,
},
},
function (ress) {
if (!ress.success) {
layer.msg('Unable to score the survey, please refresh and try again', {
icon: 2,
});
return false;
}
nps_data = ress.res;
for (var i = 0; i < ress.res.length; i++) {
var item = ress.res[i];
nps_content +=
'<div class="nps_survey_line">\
<span class="nps_survey_title">' +
(item.required ? '<i class="icon-required icon-required-' + i + '">* </i>' : '') +
item.question +
' </span>\
<span class="nps_surver_tips">' +
item.hint +
'</span>\
<input type="text" name="problem_' +
item.id +
'">\
</div>';
}
$(layers).find('.nps_survey_content').html(nps_content);
},
'Loading...'
);
var goNum = 0;
var chooseScore = null;
//评分栏目鼠标经过事件
$('.survey_score_num').on('mouseenter', 'li', function () {
if (goNum < 1) {
$(window).resize();
goNum++;
}
var _mouseScore = $(this).text();
if (!$(this).hasClass('act') && !$(this).hasClass('ten')) {
$.each($('.survey_score_num li'), function (i, v) {
if (i != chooseScore) {
$(v).removeAttr('class');
$(v).removeAttr('style');
}
});
$(this).addClass('act');
if (_mouseScore <= 6) {
$(this).css({
'background-color': 'red',
opacity: '0.8',
});
} else if (_mouseScore == 7 || _mouseScore == 8) {
$(this).css({
'background-color': '#ff7f00',
opacity: '0.8',
});
} else if (_mouseScore == 10) {
$(this).css({
'background-color': '#20a53a',
opacity: '0.8',
});
$(this).addClass('ten');
} else {
$(this).css({
'background-color': '#20a53a',
opacity: '0.8',
});
}
}
});
$('.survey_score_num').on('mouseout', 'li', function () {
$.each($('.survey_score_num li'), function (i, v) {
if (i != chooseScore) {
$(v).removeAttr('class');
$(v).removeAttr('style');
}
});
});
$('.survey_score_num').on('click', 'li', function (e) {
chooseScore = $(this).text();
$.each($('.survey_score_num li'), function (i, v) {
if (i != chooseScore) {
$(v).removeAttr('class');
$(v).removeAttr('style');
}
});
$(this).css('opacity', '1');
$('.nps_survey_content').removeClass('hide');
$('.nps_survey').css('top', ($(window).height() - 663) / 2 + 'px');
// 取消按钮样式
$('.set_survey_info').removeAttr('style');
});
// 聚焦问题1取消验证类名
$('[name=problem_one]').focus(function () {
$('.nps_survey_line').removeClass('problem_rule');
});
// 文本域触发隐藏显示
$('.nps_survey_line .problem_tips').click(function () {
$(this).prev().focus();
});
$('.nps_survey_line textarea').on('focus', function () {
$('.nps_survey_line').removeClass('problem_rule1');
$(this).next().hide();
layer.tips($(this).next().html(), $(this), {
tips: [1, '#20a53a'],
time: 0,
area: $(this).width(),
});
});
$('.nps_survey_line textarea').on('blur', function () {
if ($(this).val() === '') $(this).next().show();
layer.closeAll('tips');
});
// 设置调查信息
$('.set_survey_info').click(function () {
var _score = $('.act').text();
// _one = $('input[name=problem_one]').val(),
// _two = $('input[name=problem_two]').val(),
// _three = $('input[name=problem_three]').val()
// _two = _two == '' ? ' ' : _two
// _three = _three == '' ? ' ' : _three
if (_score == '')
layer.msg('Please give me a score before you submit, thank you', {
icon: 0,
});
var answer_arr = {};
// 清除所有校验
$('input').parent('.nps_survey_line').removeClass('problem_rule');
// 排查未填写的必填项
for (var j = 0; j < nps_data.length; j++) {
var data_item = nps_data[j];
var answer = $('[name=problem_' + data_item.id + ']').val();
if (data_item.required && answer == '') {
$('input[name=problem_' + data_item.id + ']')
.parent('.nps_survey_line')
.addClass('problem_rule');
return false;
}
$('input[name=problem_' + data_item.id + ']')
.parent('.nps_survey_line')
.removeClass('problem_rule');
answer_arr[data_item.id] = answer;
}
// 文本域问题 清除所有校验
$('textarea').parent('.nps_survey_line').removeClass('problem_rule1');
// 排查未填写的必填项
answer_arr[4] = $('textarea[name=problem_one]').val();
if (answer_arr[4] == '') {
$('textarea[name=problem_one]').parent('.nps_survey_line').addClass('problem_rule1');
return false;
}
$('textarea[name=problem_one]').parent('.nps_survey_line').removeClass('problem_rule1');
// 文本域问题 end
// nps请求 product_type0-YakPanel
bt_tools.send(
{
url: '/config?action=write_nps_new',
data: {
product_type: 1,
rate: _score,
questions: JSON.stringify(answer_arr),
},
},
function (rdata) {
if (rdata.status) {
layer.close(indexs);
layer.open({
title: false,
btn: false,
shadeClose: true,
shade: 0.1,
closeBtn: 0,
skin: 'qa_thank_dialog',
area: '230px',
content:
'<div class="qa_thank_box" style="background-color:#F1F9F3;text-align: center;padding: 20px 0;"><img src="/static/img/feedback/QA_like.png" style="width: 55px;"><p style="margin-top: 15px;">Thank you for your participation!</p></div>',
success: function (layero, index) {
$(layero).find('.layui-layer-content').css({
padding: '0',
'border-radius': '5px',
});
$(layero).css({
'border-radius': '5px',
'min-width': '230px',
});
setTimeout(function () {
layer.close(index);
}, 3000);
},
});
}
},
'submit a questionnaire'
);
// 旧版nps
// $.post('/config?action=write_nps',{software_name:'panel',product_type:0,rate:_score,questions:JSON.stringify({
// "LMdrUlYWLMjhjYjczNTUyMDIwcoCSWTt": _one,
// "PCpsJvGUmMjRjYjczNTUyMDExLGAMKPd": _two,
// "IYlVujIciMmM4YjczNTUyMDMzfselTpB":_three,
// "RS4shJeBIMmIwYjczNTUyMDJim9MuCVq":'v1-'+window.localStorage.getItem('panelVersion')})},
// function (rdata) {
// if(rdata.status){
// layer.close(indexs)
// layer.open({
// title: false,
// btn: false,
// shadeClose: true,
// shade:0.1,
// closeBtn: 0,
// skin:'qa_thank_dialog',
// area: '230px',
// content: '<div class="qa_thank_box" style="background-color:#F1F9F3;text-align: center;padding: 20px 0;"><img src="/static/img/feedback/QA_like.png" style="width: 55px;"><p style="margin-top: 15px;">感谢您的参与!</p></div>',
// success: function (layero,index) {
// $(layero).find('.layui-layer-content').css({'padding': '0','border-radius': '5px'})
// $(layero).css({'border-radius': '5px','min-width': '230px'})
// setTimeout(function () {
// layer.close(index)
// }, 3000)
// }
// })
// }
// });
});
//
},
cancel: function (index) {
var _width = $(window).width(),
revers = Math.abs(_width) * -1,
_height = $(window).height();
$('.nps_survey_box').append(
'<style>\
.nps_survey {-webkit-animation: slide-out-elliptic-right-bck 0.7s ease-in both;animation: slide-out-elliptic-right-bck 0.7s ease-in both;}\
@-webkit-keyframes slide-out-elliptic-right-bck {\
0% {\
-webkit-transform: translateX(0) rotateY(0) scale(1);\
transform: translateX(0) rotateY(0) scale(1);\
-webkit-transform-origin: ' +
revers +
'px 200%;\
transform-origin: ' +
revers +
'px 200%;\
opacity: 1;\
}\
100% {\
-webkit-transform: translateX(' +
(Number(_width) + 200) +
'px) rotateY(-30deg) scale(0);\
transform: translateX(' +
(Number(_width) + 200) +
'px) rotateY(-30deg) scale(0);\
-webkit-transform-origin: -60% 100%;\
transform-origin: -60% ' +
(_height - (_height - 600)) +
'px;\
opacity: 1;\
}\
}\
</style>'
);
setTimeout(function () {
layer.close(index);
}, 700);
// 关闭nps
bt.send('check_nps', 'config/check_nps', { product_type: 1 });
return false;
},
});
});
if (!isNps) {
$.post('/config?action=check_nps', { product_type: 1 }, function (rdata) {
var npsStatus = rdata.res;
if (npsStatus.is_submit && npsStatus.safe_day >= 3) $('.toolbar-right .feedback').click();
});
}
$('#setBox').click(function () {
if ($(this).prop('checked')) {
$('input[name=id]').prop('checked', true);
} else {
$('input[name=id]').prop('checked', false);
}
});
setCookie('order', 'id desc');
var is_files_html = false;
var task_open = 0;
var task_close = false;
if ($('.current').attr('id') == 'memuAfiles') {
is_files_html = true;
}
function task_stat(my_init) {
if (!my_init) {
my_init = 0;
if (task_open) return;
}
if (task_close) return;
$.post(
'/task?action=get_task_lists',
{
status: -3,
},
function (task_list) {
if (task_list.length == 0) {
if (my_init && is_files_html) GetFiles(getCookie('Path'));
if (task_open) {
layer.close(task_open);
task_open = false;
}
return;
}
console.log(task_list.length);
var msg_body = '';
var is_add = false;
for (var i = 0; i < task_list.length; i++) {
if (task_list[i]['status'] == -1) {
if (!task_open || !$('.message-list').attr('class')) {
show_task();
}
if (task_list[i]['type'] == '1') {
msg_body +=
'<div class="mw-con">\
<ul class="waiting-down-list">\
<li>\
<div class="down-filse-name"><span class="fname" style="width:80%;" title="Downloading: ' +
task_list[i].shell +
'">Downloading: ' +
task_list[i].shell +
'</span><span style="position: absolute;left: 84%;top: 25px;color: #999;">' +
task_list[i].log.pre +
'%</span><span class="btlink" onclick="remove_task(' +
task_list[i].id +
')" style="position: absolute;top: 25px;right: 20px;">Cancel</span></div>\
<div class="down-progress"><div class="done-progress" style="width:' +
task_list[i].log.pre +
'%"></div></div>\
<div class="down-info"><span class="total-size"> ' +
task_list[i].log.used +
'/' +
ToSize(task_list[i].log.total) +
'</span><span class="speed-size">' +
(task_list[i].log.speed == 0 ? 'On connection..' : task_list[i].log.speed) +
'/s</span><span style="margin-left: 20px;">Estimate: ' +
task_list[i].log.time +
'</span></div>\
</li>\
</ul>\
</div>';
} else {
msg_body +=
'\<div class="mw-title">\
<span style="max-width: 88%;display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">' +
task_list[i].name +
': ' +
task_list[i].shell +
'</span><span class="btlink" onclick="remove_task(' +
task_list[i].id +
')" style="position: absolute;top: 10px;right: 15px;">Cancel</span></div>\
<div class="mw-con codebg">\
<code>' +
task_list[i].log +
'</code>\
</div>';
}
} else {
if (!is_add) {
msg_body += '<div class="mw-title">Waiting to execute task</div><div class="mw-con"><ul class="waiting-list">';
is_add = true;
}
msg_body +=
'<li><span class="wt-list-name" style="width: 90%;">' +
task_list[i].name +
': ' +
task_list[i].shell +
'</span><span class="mw-cancel" onclick="remove_task(' +
task_list[i].id +
')">X</span></li>';
}
}
if (task_open) {
if (is_add) {
msg_body += '</ul></div>';
}
$('.message-list').html(msg_body);
}
if (my_init > 3) {
if (is_files_html) GetFiles(getCookie('Path'));
my_init = 1;
}
my_init += 1;
setTimeout(function () {
task_stat(my_init);
}, 1000);
}
);
}
function show_task() {
task_open = layer.open({
type: 1,
title: 'Real time task queue',
area: '500px',
closeBtn: 2,
shadeClose: false,
shade: false,
offset: 'auto',
content: '<div style="margin: 10px;" class="message-list"></div>',
cancel: function () {
task_close = true;
},
});
}
function remove_task(id) {
layer.confirm(
'Do you want to cancel the current task queue?',
{
title: 'Cancel task queue',
icon: 0,
},
function (indexs) {
layer.close(indexs);
var loadT = bt.load('Canceling task...');
$.post(
'/task?action=remove_task',
{
id: id,
},
function (rdata) {
loadT.close();
bt.msg(rdata);
}
);
}
);
}
loadScript(['{{g.cdn_url}}/laydate/laydate.js', '{{g.cdn_url}}/js/jquery.qrcode.min.js', '{{g.cdn_url}}/js/clipboard.min.js'], function (e) {});
task_stat();
// 获取支付状态
function getPaymentStatus() {
bt.send('get_pd', 'ajax/get_pd', {}, function (res) {
var tab = $('.pos-box .tab-list'),
proHTML = '',
_index = res[1] > 0 ? 1 : 2,
is_pay = res[1] >= 0 || res[2] > 0, //是否购买
advanced = res[1] == 0 || res[1] > 0 ? 'pro' : 'ltd';
bt.set_cookie('pro_end', res[1]);
bt.set_cookie('ltd_end', res[2]);
// 已购买
if (is_pay) {
proHTML =
'<div class="product-buy" style="margin-right:0;font-size: 12px;">Expire: <span style="vertical-align: initial">' +
(res[1] === 0
? '永久授权'
: (res[1] === -2 && res[2] === -2 ? 'Expired' : bt.format_data(res[_index], 'yyyy-MM-dd')) +
'&nbsp;&nbsp;<a class="btlink" href="javascript:;" onclick="product_recommend.pay_product_sign(\'' +
advanced +
"',81,'" +
advanced +
'\')">RENEW</a>') +
'</span></div>';
} else {
proHTML =
'<div class="product-buy" style="margin-right:0;"><button type="button" class="btn btn-success btn-xs" style="vertical-align: 1px;" onclick="product_recommend.pay_product_sign(\'pro\',80,\'pro\')">Upgrade now</button></div>';
}
$(window).resize(function () {
if ($(window).innerWidth() < 1080) {
$('.recommend-immediate-icon').next().addClass('hide');
} else {
$('.recommend-immediate-icon').next().removeClass('hide');
}
});
if (tab.children().length * 105 + 306.28 < tab.parent().width()) {
tab.parent().css({ display: 'flex', 'justify-content': 'space-between' });
var _html =
'<div class="authState" style="line-height: 45px;padding-right: 20px;"><span class="' +
(!is_pay ? 'btpro-gray' : 'bt' + advanced) +
'" ' +
(is_pay ? 'onclick="product_recommend.pay_product_sign(\'' + advanced + "',90,'" + advanced + '\')"' : "onclick=\"product_recommend.pay_product_sign('pro',80,'pro')\"") +
' style="vertical-align: bottom;"></span><div style="display: inline-block;font-size: 12px;color:#666" class=" product_version mr10">' +
(!is_pay ? 'FREE&nbsp;&nbsp;' : '') +
' {{session["version"]}}</div> ' +
proHTML +
'</div>';
if (tab.next().hasClass('authState')) tab.next().remove();
tab.after(_html);
}
});
}
if (bt.get_cookie('bt_user_info') == null || bt.get_cookie('bt_user_info') == '') {
bt.pub.get_user_info(function (userInfo) {
if (userInfo.status) {
bt.set_cookie('bt_user_info', JSON.stringify(userInfo));
getPaymentStatus();
}
});
} else {
getPaymentStatus();
}
</script>
{% endblock %}
<script type="text/javascript">
const showMainView = document.getElementById('showMainView');
showMainView.addEventListener('mouseover', function (event) {
window.parent.postMessage('showMainView', '*');
});
window.addEventListener('message', event => {
if (event.data === 'init') {
$('.sidebar-scroll').html('').css('background', 'none');
$('body').css('background', 'none');
$('.bge6').css('background', 'none');
$('.toolbar-right').remove();
}
});
</script>
</div>
</body>
</html>

View File

@@ -0,0 +1,252 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>YakPanel 用户协议</title>
<style>
body {
background: #444;
}
.main {
width: 1000px;
margin: 0 auto;
background: #fff;
border-radius: 4px;
padding: 20px 60px 0 60px;
box-sizing: border-box;
}
.title_group h1 {
font-size: 1.8em;
text-align: center;
margin-bottom: 0;
color: #333;
}
.title_group h3 {
font-size: 1.2em;
text-align: center;
color: #777;
font-weight: 400;
margin-top: 8px;
}
.conter_tips {
font-size: 12px;
color: #444;
padding: 20px 35px;
border: 1px solid #ececec;
border-radius: 7px;
}
.conter_tips .row {
margin: 3px 0;
}
.conter_tips .line {
line-height: 14px;
color: #666;
}
.select_ground {
display: inline-block;
vertical-align: top;
cursor: pointer;
margin-left: 10px;
padding-top: 1px;
}
.conter_select {
margin-top: 25px;
padding-left: 10px;
text-align: center;
}
.select_ground span {
display: inline-block;
height: 30px;
width: 30px;
background-size: 30px;
transition: all 300ms;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RERFQzQ4RkRDNjNGMTFFOTkxMzRGNjVBQjE0MEU5QUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RERFQzQ4RkVDNjNGMTFFOTkxMzRGNjVBQjE0MEU5QUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpEREVDNDhGQkM2M0YxMUU5OTEzNEY2NUFCMTQwRTlBQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpEREVDNDhGQ0M2M0YxMUU5OTEzNEY2NUFCMTQwRTlBQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkoEK4QAAAY9SURBVHja7NxbbFN1HMDx//+cDhi3YRQYYXOdQd8wGISuwxC8EC4x4UmUrctCQoKJRDHRNx94Mj5ogib6ZKLEFWERCYmQYUwgga0MMUYSERV3HwjjkgEDtnb/n//iNdGQ869d18v3k4x2cHq6nN+X/zntGFpEFJBtHocAhAXCAmEBhAXCAmEBhIUCEAqykdY64yeojtev9LR5RIlXa/fykBKpVFppDn0OiUq/DX7BDrLbftJljPdTf1P7sYx3F+BNdR1oI4ewKlsfmzs1Oe15e3eN/XjaNlTOZPOwNZFbdjZf2ekfTo2n9g42n7ySl2FVtUbLvTH1uqf0a3Y9msXoCiqzYbuqvaWSU3f2bD56J2/CCrfU2RXKe88GNY8hFfIqZk+XSl7qjSX2T25YrcoPj0XfthtsZyzFdEmm3uxt6HjDLhSS87DCHy2Zo6aUH7B/upJRFOXy1TYyZfi5oY1nbmYSVmZvNxxZFZIp0w8RVRHTeu2MZMVnds3K6BV8RmHVDI7uss8W5egXfV1ranZH38lJWDXx6DZ7amzgoJdIWkq/Gt4d3eT8OJdrrAcOrJg184YZsL8xm0NeUhdcF0P3DdWcW39udEKusWbclB1EVZLr1vzUtXlOr/wDr1gLWyJVZdrv5yCX7Ko1fHOmV315Q/uNIM2Egu425PkbVaY/dyGyc1zkiCrzvu9/oeMXhpR7VZ9EF/laLbaLxCr76csZrFoVM0fMs5eV+jRQL8HjUM8696TUcVFjzX2xU12MdnINNCXO2Zv0x/6Fe5a/X5YK7bJX5nVO8zR6vQoYVqBT4f3xutmztH/VXsL7waOSL3p/TmxQO5RhrHloh/LCi6IH0+9XuZwOexoTc7J28T7b855yikrkyg0xjUSV12EZo/0GO6zrLqfDB+ORpUG2DBSWMVLt+ObHB1djndeZXn7razx+TbT+0OUxnuhFWQtLK2++01fsqTbGViBvJCj50uk6S+vqrIVld7fArWrDK7+CCUufdXxITfbC0rrCqerR8mFGVhiSZXLJKUTRc7O4YgF/vdr3CQuThrAwIUITuXP+7608uUDXuf9pO1YsEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFEBYIC4QFpIUmcudaa44wKxZAWCAsEBZAWCj4sLSolMtOb/tXfQ5tYUjeGXFaXOwr/VTWwhKlLrk8eXnZ9LmMrDBMU9PmuT1CLmZvxVJy3uWpjdHLGFlh0H4o4pSVVoNZC8to5RSWPXVuZmQFQmSr0/Ymi2GJ6B8cz8PrauKRJ5lafqtpqVtnh7XKcbZngi0uIkF2Zr+I+vP2ZoHD34RftWeWdDd0XmSE+SfcuqxSJctO27sO18PS29OYCAdpJvArAnuddcDt5K0rjfESVS3RxYwxv1TtjjwqY6EOt6juvorbH3TTwN+ENp753BP/Rcdls9Y+welwS/0xUfKxXR67GOsk8r1aMbJFi65XGfz7ANvAvuDX2QFPhXfPyfH6r+29x5lQKV7jS0dvLLHij/vZOxX+vkOznUNcqqud2uayuVNYfbET7TavwxzlElutlNrXuynx7YSFlZYUs8XeDHG4S+YUOJBKpba6Ps45rMFY58C4p9fbu6Mc9qKPakR7avVg88krEx5WWv+m9lNKTDOHvshps7GnIXE2k4dm/M9memIn9o4bs4GVqyhXqltG5Jnexs5DGTfp8nbDfwm3ROqU9trsVhWMpCgMaZNa3d108rt7hDdxK9bfK1fniaQ/vtw+10FmUvD2jHnJpfeKKmcr1j9Vx+tX+kq9a+8uYUYFdeprF21e6Wvs/Cbg9rkN60/p70V5Rq/V2ltrn+AJu4MyxpdHISm5bX85Klq3+UYf7m5q/9ExxMkJ61+hxSMPa/FrfU9qlejK9C4Zb25bMkou2JsupVJdfY2n/tf3bLMWFpCztxsAwgJhgbAAwgJhgbAAwkIO/SbAAM1NBeJkvklUAAAAAElFTkSuQmCC');
}
.select_ground.pitch span {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAL5klEQVR4Xu2dfWxVZx3Hf79z2kJHGbDIrNL23i4TE6MLTKC9twxhiLwsDhMdL72XEY1/aJQ5F7cs0ZglGl/i5hga/cvMjXtLqTO6OBksYHHQHsrW6Ta3oJv03sKKhIHpaHm57T0/czsuMmg5z/Occ3refv33+f5enu/zuc95TQ8C/7EDLjiALuTklOwAMFgMgSsOMFiu2MpJGSxmwBUHGCxXbOWkDBYz4IoDDJYrtnJSBosZcMUB18GqzyaXaGjOBdIaEeAWIKoF5NscrqzmREkJiABOAGIfAB01Te1fxzZ1HXCzB8fBqu2YP3vKyNT1ALASAJYjYLWbE+Dcag4Q0TkE3EsAe0aLozvf2Xz4tFqm8aMcA6uuI1GtFeBBDfA7gDDdySY5l9sO0CAQ/ARGpmzNfXn/BSeqOQJWPNO8HkDbBgg3O9EU5/DGASI4AUDfyKeNP9jtwB5YHaDHC4lHAfF+u41wvH8cIIAf5Vu7vwcIpNqVMljxJ+fNhKrqZwFwiWpxjvOxA0S7h6sG7zm17s0hlS7VwOpcWhEbKLyIAAmVohwTFAdoT67VWK2ycymBFcsksojYGhR7uE91Bwjo8XzKeEA2gzRYsWzimwj4C9lCrA+wA0ituVZjh8wMpMD60LMt02vOmscB8UaZIqwNugN0smLWqdjba96+KDoTKbBi2eRjCCC9LYo2wzpfO/BwLtX9U9EOhcGak2mqq0T9mGhi1oXNARocqtHq313bdVZkZsJgxdqSDyDBYyJJr9EQbS0SdUKl9saxDd3/VsrBQbYcqNueuFVH+BQiLgWA+5SSSZxriYOVTf4FAZbJNEQABwkKm/tTLx+ViWOtuw7MaV80t3K04ilAaJapRASZfLp7k0iMEFg3ZZpunI76GQTQRZKWNAT0XP4tYy08AqZoDOsm0YFHQIvfmvgzIK4Sr0qDuZQxU0QvBFa8LfEFIBR+fkREp8+CecuZdM97Ik2wxhsHGrKLZ2lUzMlc5ZtQXNCf6um16lgIrIZM8xYNtW1WycrjBPSDfMr4vqiedd45IH2lT+aGXPrQTquOhcCKZZI/RITvWiW7DJZGLfmNRreonnXeORDPJlYC4G7RDgjowXzKeNRKLwhW4jeI+BWrZOVxxGJtX2vPSVE967xzoDGbjBFATrQDAvplPmVssdKLgZVNPoMAX7RKdnm8UFXt1AtjwjVZqORA6QXNihE8JxxMsDOX7t5gpWewrBwK+bgsWET0TD5t3GNlC4Nl5VDIxxmskC+wV9NjsLxyPuR1GayQL7BX02OwvHI+5HUZrJAvsFfTY7C8cj7kdRmskC+wV9NjsLxyPuR1GayQL7BX02OwvHI+5HUZrJAvsFfTY7C8cj7kdRmskC+wV9NjsLxyPuR1GayQL7Ds9D76p0/fMPD5XvEX9CYowGDJOh9WfefSivhAYRcQVeaqBlfCujcLdqbKYNlxLyyxZagAVoxNiWg/jExZbec1cAYrLHCozuNqqC7lIaJuHJmyXBUuBkt1QcIQNwFU5anZgYvBCgMgKnOwgMouXAyWyqIEPUYQKjtwMVhBh0S2f0moVOFisGQXJsh6RahU4GKwggyKTO82obp0G6LnvDm8/OS9rw1blWawrBwKw3jHJ6riIzOfg/J9KpU5EQlDVUrPYKmYHKSYElSFGXvg/X/lqPYnCRWDpWZzcKI8gorBCg4i8p16CBWDJb9cwYjwGCoGKxiYyHXpA6gYLLkl87/aJ1AxWP5HRbxDH0HFYIkvm7+VPoOKwfI3LmLd+RAqBkts6fyr8ilUDJZ/kbHuzMdQRRaseFtilUk02p86tNd6Bf2piGWT+xDgTuXuiHqGpmsrRD/nJlsncs8KY9mmZUj6rpJRhMU1+VRPp6xpXurjTy6dCpUXn5/sZ3+yc44UWA2Z5hYNtL2AMHXMKIILQYKrBBVVXtyHiEnZhS7rieiVC+bwEpFXX1RrROpQWJdNLNIJOhHxhg8YFhC4nILqLJjLJuPraZHYsWI7EvPBxBcRoGbcX6HP4QoaVJHYserbk5/Ui3QQAGdcd2v3KVxBhCr0YJWg0or0VwS8Seh8geCCCeZn+9OHuoT0LouCClWowWrc3vJxUzO7haG6BAkRnSOgz3kNV5ChCi1YtR3zZ08tVP8DEG5W2VRKcJmkrTq2qeuASrzdmA8/fdu0qXrNbgRYrJqLgHr1ysLyo+t6B1Vz2IkL7cl7PJN4HBDvVzXHq50r6DtV2e/QglWaYNDgCgtUoT0UXrlLBQWuMEEVCbCCsHOFDarIgOVnuMIIVaTA8iNcY1d/2rQX7D77m6zHNDIXQqE+eR/PCCfOuYoIy46njMMyRl+tLUFVrU3rBMSFqnlKD5T9CFXkdqzyAtqGC2CoCLRcFa6wQxVZsBw5LCrC5QRUQPT6e2Aunoy3FFR308gdCh29FSEJl1NQmah/pj918L+qiz4ZcZEGazJ3rihBFelD4ZW/2lg2+SsE+LrqL5ksdq6oQcVgXUGSW3BFESoG66otymm4ogoVgzXOsc8puEaKw2/YvU9VuvoLwon6eKcQkT95H/cmajb5BADcp3rOBQRnCegtRLzdRo5XR6vozuPrjDPKOTwMZLAmMN/uzmVrTQO8U5XnzWBdhwBP4AoBVHyOJbCtTCpcIYGKwRIAqySZFLhCBBWDJQiW63CFDCoGSwIs1+AKIVQMliRYjsMVUqgYLAWwHIMrxFAxWIpg2YeLjpigJ/3+6osNe/gjTXbMU7tapCMFLNwx0Nr7rp3afo/lG6Q2V0gOrmhAxYdCm1CVw8Xgig5UDJZDYFmfc0ULKgbLQbAmhit6UDFYDoN1LVzRhIrBcgGs/8NFy6Jw9TeRhXxV6BJcDdnFs8J8n8rKNgbLyiEeV3KAwVKyjYOsHGCwrBzicSUHGCwl2zjIygEGy8ohHldygMFSso2DrBxgsKwc4nElBxgsJds4yMoBBsvKIR5XcoDBUrKNg6wcYLCsHOJxJQcYLCXbOMjKAU/BimeS7YCw3qrJ8vj54lCN298yFu2Fddd3YOx/g+k1QxI+tedS3Rut9GglKI3HMsltiLBFRDum0czG3MZDOWE9Cz1zIPb0okbUK46KN0BP5FKG5dfahMCKZxIPA+KPRYubQOv6U8bvRPWs886BeDa5AQB2iHZASA/lW42fWemFwGrIJu7VAJ+ySlYeJ6Ln82ljjaiedd45EM8kSl/dWCraARGl8mmjzUovBFZ9JrlQR5D6dAhB8c58qqfTqgEe986BWKZ5NaK2S7KD+blU99+tYoTAunSeNYAIH7FKeHmc6D+omfP6WntOCsewcNIciHcsrIWRytcAYLZ4UcrnUkZcRC8MVjyT+DUgfk0k6RWHxL4iwNrjaeN1mTjWuutAXVvTbbqp/RERG6UqEW3NpY1vi8QIg9XQ1rRCI/0FkaTXaAgOENBvkUji6kOpEgddzwFdaySTvqr6eTwTi3f0t/YcFDFZGKyxw2E2+RICLBBJzJpwOUBE3fm00SI6KymwGjLNLRpqQsSKNsC6YDhAGt2e32j8TbRbKbBKSePZxG4AXClagHXBd4AAfp9PdX9JZibSYM3JNNVVov6K3NWETEus9ZMDRHR8tFic987mw6dl+pIGq5S8fkfLAt2k0iFxikwx1gbLASIaRg0W5FqNI7KdK4E1dkjMNK8H1NplC7I+OA4QFO/Kp3pkb6COTVAZrLGda3vz3bqmdfDOFRxYRDolonMEcHd/2tgnoh9PYwus93eupmZArXRCP0O1CY7zlQOn0Bxd0bfp8Kt2urINVqn4nPZFcytGK36OCHfZaYZjPXegvaCNPDSw8aVjdjtxBKxyE/XZ5BIdoPSpt3l2G+P4yXOAiLoIzW/1p3p6narqKFjlpkrPojQTVyFqq5BoMSBWOtUw57HvAAGdB4L9hLhbN3FP36auf9rP+sEMroB1dZN12aaPIemNukaNQFhr96LBaRMikI9MoBMApWe1o0f7Uy+7/sx2UsCKwMLxFK9ygMFiJFxxgMFyxVZOymAxA644wGC5YisnZbCYAVccYLBcsZWTMljMgCsOMFiu2MpJ/wccd+YtCJOs4QAAAABJRU5ErkJggg==');
}
.conter_select img {
width: 30px;
margin-right: 10px;
}
.conter_select>span {
display: inline-block;
height: 30px;
line-height: 30px;
color: #666;
font-size: 17px;
}
.conter_btns {
text-align: center;
padding: 30px 0;
}
.conter_btns .btn {
border: none;
font-size: 1.1em;
padding: 0.7em 2.8em;
background-color: #20a53a;
outline: none;
color: #fff;
cursor: pointer;
transition: all 500ms;
border-radius: 2px;
}
.conter_btns .btn:hover {
background: #1b8a30;
}
</style>
</head>
<body>
<div class="main">
<div class="title_group">
<h1 class="title">欢迎您使用 YakPanel</h1>
<h3 class="subhead_title">首次登录阅读并同意《用户协议》即可进入面板首页</h3>
</div>
<div class="conter_tips">
<h5 class="row">YakPanel 开源许可协议(衍生版)</h5>
<div class="line"><strong>说明:</strong>YakPanel 基于 YakPanel 等开源项目衍生发行;上游许可与著作权信息见仓库内 NOTICE 及上游授权文件。以下条款在沿用开源社区通行约定精神的基础上,适用于本 YakPanel 发行版。</div>
<div class="line">
重要须知:在此特别提醒用户认真阅读、充分理解本协议,用户应认真阅读、充分理解本协议中各条款,包括免除或限制的免责条款以及对用户的权利限制条款。用户需审慎阅读并选择接受或不接受本协议,除非用户接受本协议所有条款,否则用户无权安装或使用本软件及相关服务。用户的安装、使用、登录等行为将视为对本协议的接受,并同意接受本协议各项条款的约束。
</div>
<h5 class="row">名词定义:</h5>
<div class="line">用户:获得 YakPanel 面板及使用相关服务的自然人、法人及其他组织</div>
<div class="line">YakPanel本面板软件及其文档衍生发行版上游项目见 NOTICE</div>
<div class="line">用户许可定义:用户在基于明显的用途说明后主动安装、使用、注册、管理软件,以及同意 YakPanel 提供相关服务所订立的协议</div>
<h5 class="row">一、YakPanel 需遵守的约定</h5>
<div class="line">1.1 除付费插件外,确保所有代码用户皆可阅读。</div>
<div class="line">1.2 确保用户在完成所有环境部署后,在不依赖特定商业化云端支持下也可永久运行(依您所选功能与插件而定)。</div>
<div class="line">1.3 除付费插件外,禁止对源代码进行加密和混淆。</div>
<div class="line">1.4 禁止不经用户许可的情况下以任何方式自动安装加密代码。</div>
<div class="line">1.5 禁止不经用户许可的情况下以任何方式收集用户数据。</div>
<div class="line">1.6 禁止不经用户许可的情况下以任何方式远程控制用户面板。</div>
<div class="line">1.7 禁止在用户面板上插入与 YakPanel 无关的广告。</div>
<div class="line">1.8 不得将面向用户明确承诺的免费核心功能擅自改为付费功能(与上游及插件政策一致)。</div>
<h5 class="row">二、用户需遵守的约定</h5>
<div class="line">2.1 以自用为目的,可将 YakPanel 用于盈利或非盈利项目上,且不受任何限制。</div>
<div class="line">2.2 以自用为目的,在保留版权标识的前提下可任意修改程序源码,但不得公开发行。</div>
<div class="line">2.3 禁止以任何方式破坏合法的商业授权与许可机制(包括但不限于收集源码后经营与本软件同类型、同性质服务等)。</div>
<div class="line">2.4 用户禁止利用 YakPanel 发表、传送、传播、储存违反国家法律、危害国家安全、社会稳定、公序良俗的内容,或任何不当的、侮辱诽谤的、淫秽的、暴力的及任何违反国家法律法规政策的内容。
</div>
<div class="line">2.5 用户禁止利用 YakPanel 制作、发布、传播用户窃取相关或其他软件及他人专属信息、财产的软件。</div>
<h5 class="row">三、API使用约定</h5>
<div class="line">3.1 YakPanel 欢迎并感谢您为该软件开发基于 API 的各种应用,且可自行免费或收费发布。</div>
<div class="line">3.2 用户基于 YakPanel API 机制开发的应用,不得包含破坏或篡改 YakPanel 代码的行为。</div>
<h5 class="row">四、无改动发布或集成 YakPanel</h5>
<div class="line">4.1 YakPanel 欢迎并感谢您将本软件发布在您的个人网站、企业官网或者其他的第三方网站。</div>
<div class="line">4.2 YakPanel 欢迎并感谢您将本软件集成在其他系统中一起发布,包括云服务镜像、操作系统发行版等。</div>
<div class="line">4.3 用户在发布或者集成 YakPanel 的时候,不得对源码做任何违背上游许可与法律的改动。</div>
<h5 class="row">五、知识产权声明</h5>
<div class="line">
YakPanel 衍生自 YakPanel 等开源软件;相关知识产权及信息内容(包括但不限于文字、图形、界面设计、版面框架、有关数据)受适用法律法规及上游许可约束;第三方组件的权利归各自权利人所有。
</div>
<h5 class="row">六、免责声明</h5>
<div class="line">6.1
用户出于自愿而使用 YakPanel您必须了解使用本软件的风险YakPanel 不作任何类型的担保不论是明示的、默示的包括但不限于用户在任何情况下因使用或不能使用本软件所产生的直接、间接、偶然、特殊及后续的损害及风险YakPanel 发行方不承担任何责任。
</div>
<div class="line">6.2
用户清楚互联网软件的特殊性YakPanel 与大多数互联网软件一样,受包括但不限于用户原因、网络服务质量、社会环境等因素的影响,可能受到各种安全问题的侵扰,如用户下载安装的其他软件或访问的其他网站中含有“木马”等病毒,威胁到用户的计算机信息和数据的安全,继而影响本软件的正常使用等,用户应加强信息安全及使用资料的保护,以免遭受损失
</div>
<div class="line">6.3
YakPanel 界面中“第三方应用”如来自第三方合法授权如因用户使用第三方软件或技术引发的任何纠纷由第三方负责解决YakPanel 不对第三方软件或技术提供服务,若用户需要获得支持,请与该第三方联系。</div>
<div class="line">6.4 用户因使用 YakPanel 违反国家法律法规的,应自行承担相应责任。</div>
<h5 class="row">七、授权例外</h5>
<div class="line">7.1 如果上述条款无法满足您使用该软件的要求,可与 YakPanel 发行方协商额外约定以获得更灵活的授权许可。</div>
<h5 class="row">八、合同终止</h5>
<div class="line">8.1 如果用户违反了本协议的任一条款,本授权协议将自动终止;用户行为损害 YakPanel 或其他任意第三方权利的YakPanel 发行方保留通过法律手段追究责任的权利。</div>
<h5 class="row">九、其他条款</h5>
<div class="line">9.1 本协议约定的任何条款部分或完全无效的,不影响其他条款的效力。</div>
<div class="line">9.2
协议的解释、效力及纠纷的解决适用中华人民共和国法律;若用户与 YakPanel 发行方发生任何纠纷或争议,首先应当友好协商解决,协商不成的,提交至有管辖权的人民法院诉讼解决。</div>
<div class="line">9.3 本协议最终解释权归 YakPanel 发行方在法律允许的范围内行使</div>
</div>
<div class="conter_select">
<div class="select_ground"><span></span></div>
<span>我已同意“《用户协议》”</span>
</div>
<div class="conter_btns">
<button class="btn btn_submit" onclick="set_licenes()">进入面板</button>
</div>
</div>
<script type="text/javascript">
function auto_mian() {
var docm_height = document.documentElement.clientHeight,
_main = document.getElementsByClassName('main')[0],
main_height = _main.clientHeight,
main_width = _main.clientWidth;
if (main_height < docm_height) {
_main.style.cssText = 'position:absolute;top:50%;left:50%;margin:' + '-' + (main_height / 2) +
'px auto auto -' + (main_width / 2) + 'px ';
}
}
function hasClass(elem, cls) {
cls = cls || '';
if (cls.replace(/\s/g, '').length == 0) return false;
return new RegExp(' ' + cls + ' ').test(' ' + elem.className + ' ');
}
function addClass(elem, cls) {
if (!hasClass(elem, cls)) {
elem.className = elem.className == '' ? cls : elem.className + ' ' + cls;
}
}
function removeClass(elem, cls) {
if (hasClass(elem, cls)) {
var newClass = ' ' + elem.className.replace(/[\t\r\n]/g, '') + ' ';
while (newClass.indexOf(' ' + cls + ' ') >= 0) {
newClass = newClass.replace(' ' + cls + ' ', ' ');
}
elem.className = newClass.replace(/^\s+|\s+$/g, '');
}
}
window.onresize = function () {
auto_mian();
}
var _select_ground = document.getElementsByClassName('select_ground')[0],
_select_btn = document.getElementsByClassName('btn_submit')[0];
_select_ground.addEventListener('click', function () {
if (hasClass(this, 'pitch')) {
removeClass(this, 'pitch');
} else {
addClass(this, 'pitch');
}
});
_select_ground.getElementsByTagName('span')[0].addEventListener('click', function () {
simulateClick(_select_ground);
});
function set_licenes() {
if (document.getElementsByClassName('pitch').length === 0) {
alert("必需同意用户协议才能进入面板")
return
}
window.location.href = '/?license=True'
}
auto_mian();
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,902 @@
{% extends "layout.html" %}
{% block content %}
<style>
/*日志审计*/
#logAudit .tootls_group,
#panelRun .tootls_group.tools_bottom {
display: flex;
flex-wrap: wrap;
height: auto;
line-height: inherit;
}
#logAudit .tootls_group.tools_top {
justify-content: space-between;
}
.tootls_group.tools_top .tools_left {
display: flex;
align-items: center;
}
.tootls_group .tools_item {
display: flex;
align-items: center;
margin-right: 15px;
}
.tools_item .tools_label {
margin-right: 15px;
}
#logAudit .divtable {
border-top: 1px solid #ddd;
}
#logAudit .divtable .table {
border-top: none;
}
#logAudit .table thead {
position: relative;
z-index: 1;
}
#logAudit .checkbox-text {
margin: 0;
}
.checkbox_group {
display: flex;
align-items: center;
height: 30px;
}
.checkbox_group .checkbox_item {
display: flex;
align-items: center;
cursor: default;
}
.checkbox_item+.checkbox_item {
margin-left: 15px;
}
.checkbox_item span {
display: block;
padding-left: 5px;
}
#logAudit .page .page_select_number {
border-left: 1px solid #ececec;
}
#logAudit .tools_bottom,
#panelRun .tools_bottom {
justify-content: flex-end;
}
#logAudit .bt_select_value {
max-width: 200px;
}
#logAudit .bt_select_list {
width: auto;
min-width: 100%;
max-height: 240px;
}
.bt-property-setting .tab-con {
padding: 15px;
}
.event_info .rows {
display: flex;
margin: 5px 0;
}
.event_info .rows .cols {
flex: 1;
display: flex;
height: 25px;
line-height: 25px;
}
.event_info .cols+.cols {
margin-left: 15px;
}
.event_info .cols .name {
width: 90px;
}
.event_info .cols .value {
flex: 1;
width: 0;
overflow: hidden;
text-overflow: ellipsis;
position: relative;
white-space: nowrap;
}
.event_info .desc {
margin-bottom: 10px;
}
.event_info .desc textarea {
width: 100%;
padding: 8px;
box-sizing: border-box;
resize: none;
}
.ml10 {
margin-left: 10px;
}
.tab-view-box {
padding: 15px;
}
.crontab-log {
overflow: auto;
border: 0 none;
line-height: 16px;
padding: 15px;
white-space: pre-wrap;
min-height: 250px;
background-color: rgb(51, 51, 51);
color: #f1f1f1;
margin-top: 10px;
margin-bottom: 0;
}
.tabContent {
display: flex;
height: 100%;
}
.tabContent .Tab {
border: 1px solid #ececec;
overflow: auto;
width: 200px;
}
.Content {
padding: 0 0 0 10px;
margin-left: 15px;
width: 100%;
flex: 1;
}
.tabContent .Tab .Item.active {
background-color: #EEF8F0;
color: #20a53a;
}
.tabContent .Tab .Item.active:hover {
background-color: #EEF8F0;
}
.tabContent .Tab .Item {
line-height: 18px;
padding: 10px;
border-bottom: 1px solid #ececec;
cursor: pointer;
word-wrap: break-word;
}
.tabContent .Tab .Item:hover {
background-color: rgb(245, 247, 250);
}
.daily-thumbnail {
width: 1200px;
margin:40px auto;
}
@media screen and (max-width: 1440px) {
.daily-thumbnail {
width: auto;
}
}
.thumbnail-box {
position: relative;
display: flex;
justify-content: center;
}
.thumbnail-introduce {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 40px;
}
.thumbnail-introduce span {
font-size: 20px;
font-weight: bold;
}
.thumbnail-introduce ul {
display: flex;
font-size: 16px;
line-height: 30px;
margin: 20px 0;
list-style-type: square;
}
.thumbnail-introduce ul li+li {
margin-left: 40px;
}
.pluginTipsGg {
position: relative;
width: 950px;
height: 720px;
background-color: #f1f1f1;
background-size: 100%;
background-repeat: no-repeat;
background-position: top;
border-radius: 4px;
}
/*.pluginTipsGg:hover::before{*/
/* display: inline-block;*/
/*}*/
.pluginTipsGg::before {
content: '点击预览';
display: none;
background: #000;
opacity: 0.2;
color: #fff;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
line-height: 621px;
font-size: 18px;
vertical-align: bottom;
text-align: center;
border-radius: 4px;
transition: all 1s;
}
.tab-list .tabs-item.active:after {
content: '';
width: 20px;
height: 2px;
position: absolute;
left: 50%;
bottom: 0px;
background: red;
margin-left: -10px;
background: #20a53a;
}
.thumbnail-box .thumbnail-tab {
margin-right: 40px;
width: 130px;
border-right: 1px solid #def2e2;
}
.thumbnail-tab li {
padding: 0 20px;
line-height: 46px;
width: 130px;
cursor: pointer;
font-size: 14px;
}
.thumbnail-tab li.on {
border-right: 2px solid #20a53a;
color: #20a53a;
font-size: 14px;
}
.thumbnail-item {
display: none;
}
.thumbnail-item.show {
display: block;
}
.bt_warning {
color: #fc6d26;
}
.line-row,
.line-row-tips {
height: 30px;
line-height: 30px;
display: inline-block;
}
.line-input input {
height: 30px;
line-height: 30px;
}
.line-row-tips {
margin-left: 10px !important;
color: #999;
vertical-align: top;
}
.crontab-log {
overflow: auto;
border: 0 none;
line-height: 16px;
padding: 15px;
white-space: pre-wrap;
min-height: 250px;
background-color: rgb(51, 51, 51);
color: #f1f1f1;
margin-top: 10px;
margin-bottom: 0;
}
.input_file {
float: left;
height: 35px;
border: 0.1px dashed #D0D0D0;
padding: 0 0 0 10px;
font-size: 14px;
outline: none;
margin-bottom: 20px;
}
.select_file {
float: left;
width: 80px;
height: 35px;
font-size: 14px;
color: #fff;
background: #10952a;
position: absolute;
left: 170px;
border: none;
}
.dividing-line {
width: 1px;
background: #ccc;
height: 20px;
vertical-align: middle;
}
#antiOverviewList .divtable,
#reinforceSystem .divtable {
margin: 0;
}
.logs-data-select {
margin-bottom: 15px;
}
.logs-title {
display: inline-block;
width: auto;
height: 35px;
font-size: 12px;
line-height: 35px;
margin-right: 5px;
}
.logs-unselect {
position: relative;
display: inline-block;
height: 30px;
border: 1px solid #e6e6e6;
border-radius: 2px;
font-size: 13px;
line-height: 28px;
}
.logs-unselect.active .logs-input-list {
display: block;
}
.logs-unselect.active .logs-input-list {
animation-name: layui-upbit;
animation-duration: .3s;
animation-fill-mode: both;
}
.logs-inputs {
box-sizing: border-box;
padding: 0 30px 0 10px;
height: 30px;
cursor: pointer;
}
.logs-unselect .logs-inputs:after {
position: absolute;
top: 0.8pc;
right: 6pt;
display: block;
width: 0;
height: 0;
border-color: #c2c2c2 transparent transparent;
border-style: solid;
border-width: 6px 6px 0;
content: '';
transition: transform .5s;
}
.logs-input-list {
position: absolute;
top: 30px;
right: -1px;
left: -1px;
z-index: 899;
display: none;
box-sizing: border-box;
padding: 5px 0;
height: auto;
min-width: 100%;
border: 1px solid #d2d2d2;
border-radius: 2px;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
}
.logs-input-list dd {
padding: 5px 15px;
height: 30x;
}
.logs-input-list dd:hover {
background-color: #f2f2f2;
cursor: pointer;
}
.logs-input-list dd.logs_checked {
background: #20a532 !important;
color: #fff;
}
.logs-page.page-style {
padding: 0 5px;
height: 30px;
font-size: 13px;
margin-top: 5px;
}
.page-style .nextPage {
display: inline-block;
margin: 0 3px;
padding: 0 10px;
height: 30px;
border-radius: 2px;
background-color: #f5f5f5;
color: #666;
text-align: center;
line-height: 30px;
cursor: pointer;
}
.page-style .Pcount {
margin-right: 0;
margin-left: 5px;
}
.page a:last-of-type {
border-right: 1px solid #ececec;
}
.firewall-tab-view .tab-nav-border span i {
font-style: initial;
}
.firewall-tab-view .tab-con {
padding: 0;
}
.firewall-tab-view .tab-con .btswitch+.btswitch-btn {
width: 2.8rem;
height: 1.75rem;
}
#logAudit .tootls_group {
justify-content: space-between;
}
#logAudit .tootls_group::after {
display: none;
}
.logAuditContent {
padding: 0 0 0 15px;
margin-left: 15px;
width: 100%;
flex: 1;
border-left: 1px solid #ececec;
}
.logAuditTabContent {
display: flex;
height: 100%;
}
.logAuditTabContent .logAuditTab .logAuditItem {
height: 35px;
line-height: 35px;
padding: 0 10px;
border-bottom: 1px solid #ececec;
cursor: pointer;
}
.logAuditTabContent .logAuditTab .logAuditItem:hover,
.logAuditTabContent .logAuditTab .logAuditItem.active {
background-color: #f2f2f2;
}
.logAuditTabContent .logAuditTab {
border: 1px solid #ececec;
overflow: auto;
}
.thumbnail-introduce-new {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 50px;
}
.thumbnail-introduce-title-new {
display: flex;
align-items: flex-start;
width: 92%;
justify-content: space-between;
}
.thumbnail-title-left-new {
display: flex;
align-items: center;
}
.thumbnail-title-text-new p {
color: #666;
}
.thumbnail-title-text-new p:first-child {
font-weight: bold;
font-size: 24px;
margin-bottom: 12px;
}
.thumbnail-title-text-new p:last-child {
font-size: 12px;
line-height: 24px;
}
.thumbnail-title-button-new {
display: flex;
align-items: center;
margin-left: 54px;
}
.thumbnail-introduce-hr {
width: 92%;
height: 1px;
margin: 36px 0;
border: 1px dashed #e1e1e185;
}
.thumbnail-introduce-ul-new {
width: 90%;
}
.thumbnail-title-button-new {
display: flex;
align-items: center;
margin-left: 54px;
}
.thumbnail-title-button-new a {
padding: 10px 16px;
}
.fz-select-btn, li {
display: flex;
align-items: center;
cursor: pointer;
}
.bt-search {
position: relative;
}
.bt-search .search-input {
height: 30px;
line-height: 30px;
border-radius: 2px;
border: 1px solid #ccc;
outline: none;
padding-left: 8px;
vertical-align: top;
width: 200px;
}
.bt-search .search-input:focus {
border-color: #20a53a;
}
.bt-search .glyphicon-search {
height: 28px;
line-height: 28px;
padding: 0 10px;
color: #888;
position: absolute;
right: 0;
font-size: 14px;
cursor: pointer;
}
</style>
<div class="main-content">
<div class="container-fluid" style="padding-bottom: 50px;">
<div id="cutTab" class="pos-box bgw mtb15" style="height:45px">
<div class="tab-list">
<div class="tabs-item active" data-name="panelLogs">Panel Logs</div>
<div class="tabs-item" data-name="siteLogs">Website Logs</div>
<div class="tabs-item" data-name="logAudit">Logs Audit</div>
<div class="tabs-item" data-name="loginLogs">SSH Login Logs</div>
<div class="tabs-item" data-name="softwareLogs">Soft Logs</div>
</div>
</div>
<div class="bgw mtb15 pd15 tab-view-box firewall-tab-view">
<div class="tab-con show w-full" id="panelLogs" style="padding: 0">
<div class="tab-nav-border">
<span class="on">Operation logs</span>
<span>Run logs</span>
<span>Cron logs</span>
</div>
<div class="tab-con" style="padding: 15px 0 0;overflow: none;">
<div class="tab-block on">
<div class="divtable">
<div id="operationLog"></div>
<div class="dataTables_paginate paging_bootstrap page operationLog" style="margin-bottom:0">
</div>
</div>
</div>
<div class="tab-block">
<div id="errorLog"></div>
</div>
<div class="tab-block" id="panelCrontab">
<div class="tabContent">
<div>
<div class="bt-search mb10">
<input type="text" class="search-input" placeholder="Please enter Cron task name">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
</div>
<div class="Tab"></div>
</div>
<div class="Content">
<button type="button" title="Refresh"
class="btn btn-default btn-sm mr5 refreshCrontabLogs"><span>Refresh</span></button>
<pre class="crontab-log"></pre>
</div>
</div>
</div>
</div>
</div>
<div class="tab-con hide" id="siteLogs" style="padding: 0">
<div class="tabContent">
<div class="TabGroup">
<div class="bt-search mb10">
<input type="text" class="search-input" placeholder="Please enter site name">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
</div>
<div class="Tab"></div>
</div>
<div class="Content">
<div class="tab-nav-border">
<span class="on">Operation logs</span>
<span>Access logs</span>
<span>Error logs</span>
<span>Log Security Analysis</span>
</div>
<div class="tab-con" style="padding: 15px 0 0;overflow: none;">
<div class="tab-block on" id="siteOnesite"></div>
<div class="tab-block" id="siteRun"></div>
<div class="tab-block" id="siteError"></div>
<div class="tab-block" id="siteWeb"></div>
</div>
</div>
</div>
</div>
<div class="tab-con hide" id="logAudit">
<div class="logAuditTabContent">
<div class="logAuditTab"></div>
<div class="logAuditContent">
<div id="logAuditTable"></div>
<!-- <div id="logAuditPages" class="page" style="display: flex;justify-content: flex-end"></div> -->
<div id="logAuditPre" style="display: none;"></div>
</div>
</div>
<div class="installSoft" style="display: none">
<div class="daily-thumbnail">
<div class="thumbnail-introduce-new">
<div class="thumbnail-introduce-title-new" style="width: 92%">
<div class="thumbnail-title-left-new">
<div class="thumbnail-title-text-new">
<p>Logs Audit - introduction</p>
<p>Collect, analyze and audit information such as various operations, events, and abnormal situations recorded by the system, network, and application programs. Through the audit of these log information, security problems in the system can be found, and timely measures are taken to repair and Take precautions.</p>
</div>
</div>
<div class="thumbnail-title-button-new daily-product-buy" >
<a href="javascript:;" class="btn btn-success va0 ml15 buyLogAudit"
onclick="product_recommend.pay_product_sign('pro',104,'pro')">Buy now</a>
</div>
</div>
<div class="thumbnail-introduce-hr"></div>
<div class="thumbnail-introduce-ul-new">
<ul style="display: flex;">
<li><span class="li-icon"></span>Analyze and parse common logs</li>
<!--<li><span class="li-icon"></span>安全扫描加固</li>-->
<!--<li><span class="li-icon"></span>漏洞扫描</li>-->
</ul>
</div>
</div>
<!--<div class="thumbnail-introduce">-->
<!-- <span>日志审计功能介绍</span>-->
<!-- <ul>-->
<!-- <li>分析和解析常用日志</li>-->
<!-- </ul>-->
<!-- <div class="daily-product-buy">-->
<!-- <a href="javascript:;" class="btn btn-success va0 ml15 buyLogAudit"-->
<!-- onclick="product_recommend.pay_product_sign('ltd',104,'ltd')">立即购买</a>-->
<!-- </div>-->
<!--</div>-->
<div class="thumbnail-box">
<ul class="thumbnail-tab">
<li class="on">Logs list</li>
</ul>
<div class="thumbnail-item show" style="overflow:auto">
<div class="pluginTipsGg" style="background-image: url('/static/img/logAudit/logAudit.png');height: 380px;"></div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-con hide" id="loginLogs" style="padding: 0">
<div class="tab-con" style="padding: 0;overflow: none;">
<div class="tab-block on">
<div id="loginLogsContent">
<div class="w-full">
<div id="loginAllLogs"></div>
</div>
<div class="w-full" style="display: none">
<div id="loginSuccessLogs"></div>
</div>
<div class="w-full" style="display: none">
<div id="loginErrorLogs"></div>
</div>
</div>
<div class="daily-thumbnail" style="display: none;">
<!--<div class="thumbnail-introduce">-->
<!-- <span>SSH登录日志</span>-->
<!-- <ul>-->
<!-- <li>记录和查看当前SSH登录日志</li>-->
<!-- </ul>-->
<!-- <div class="daily-product-buy">-->
<!-- <a href="javascript:;" class="btn btn-success va0 mr10 "-->
<!-- onclick="product_recommend.pay_product_sign('ltd',100,'ltd')">立即购买</a>-->
<!-- </div>-->
<!--</div>-->
<div class="thumbnail-introduce-new">
<div class="thumbnail-introduce-title-new">
<div class="thumbnail-title-left-new">
<div class="thumbnail-title-text-new">
<p>SSH login logs - introduction</p>
<p>Record current YakPanel login logs information.</p>
</div>
</div>
<div class="thumbnail-title-button-new daily-product-buy" >
<a href="javascript:;" class="btn btn-success va0" onclick="product_recommend.pay_product_sign('pro',130,'pro')">Buy now</a>
</div>
</div>
<div class="thumbnail-introduce-hr"></div>
<div class="thumbnail-introduce-ul-new">
<uls>
<li><span class="li-icon"></span>Record and view the current SSH login logs</li>
</ul>
</div>
</div>
<div class="thumbnail-box">
<ul class="thumbnail-tab">
<li class="on">SSH logs</li>
</ul>
<div class="thumbnail-item show">
<div class="pluginTipsGg" style="background-image: url('/static/img/ssh/login-logs.png');height: 308px;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-con hide" id="softwareLogs" style="padding: 0">
<div class="tab-nav-border">
<span class="on">FTP logs</span>
<span>MySql Slow logs</span>
<span>MySql Error logs</span>
</div>
<div class="tab-con" style="padding: 15px 0 0;overflow: none">
<div class="tab-block on" id="softwareFtp">
<div class="tabContent">
<div class="TabGroup">
<div class="bt-search mb10">
<input type="text" class="search-input" placeholder="Enter User name">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
</div>
<div class="Tab"></div>
</div>
<div class="Content" id="ftpLogsTable"></div>
</div>
<div class="daily-thumbnail" style="display: none;margin: 20px auto;">
<!--<div class="thumbnail-introduce">-->
<!-- <span>FTP日志</span>-->
<!-- <ul>-->
<!-- <li>记录FTP登录记录FTP上传、下载、重命名和删除记录</li>-->
<!-- </ul>-->
<!-- <div class="daily-product-buy">-->
<!-- <a href="javascript:;" class="btn btn-success va0 mr10 "-->
<!-- onclick="product_recommend.pay_product_sign('ltd',101,'ltd')">立即购买</a>-->
<!-- </div>-->
<!--</div>-->
<div class="thumbnail-introduce-new">
<div class="thumbnail-introduce-title-new" style="width:100%">
<div class="thumbnail-title-left-new">
<div class="thumbnail-title-text-new">
<p>FTP logs - introduction</p>
<p>Record FTP user client login log and file operation log information</p>
</div>
</div>
<div class="thumbnail-title-button-new daily-product-buy" >
<a href="javascript:;" class="btn btn-success va0" onclick="product_recommend.pay_product_sign('pro',131,'pro')">Buy now</a>
</div>
</div>
<div class="thumbnail-introduce-hr" style="width: 100%;"></div>
<div class="thumbnail-introduce-ul-new" style="width:98%">
<ul>
<li><span class="li-icon"></span>Record and view the current FTP login log and operation log</li>
</ul>
</div>
</div>
<div class="thumbnail-box">
<ul class="thumbnail-tab">
<li class="on">FTP logs</li>
</ul>
<div class="thumbnail-item show" style="width: 100%;max-height:430px;overflow:auto">
<div class="pluginTipsGg" style="width: 100%;background-image: url('/static/img/ftp/ftp-logs.png');height: 308px;"></div>
</div>
</div>
</div>
</div>
<div class="tab-block" id="softwareMysqlSlow">
<div
style="margin-bottom: 5px; position: relative; height:30px;line-height:30px;display: flex;justify-content: space-between;">
<button type="button" title="Refresh"
class="btn btn-success btn-sm mr5 refreshMysqlSlow"><span>Refresh</span></button>
<div class="bt-search mb10">
<input type="text" class="search-input" placeholder="Please enter log">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
</div>
</div>
<pre class="crontab-log"></pre>
</div>
<div class="tab-block" id="softwareMysqlError">
<div
style="margin-bottom: 5px; position: relative; height:30px;line-height:30px;display: flex;justify-content: space-between;">
<button type="button" title="Refresh"
class="btn btn-success btn-sm mr5 refreshMysqlError"><span>Refresh</span></button>
</div>
<pre class="crontab-log"></pre>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{{ super() }}
<script type="text/javascript">
</script>
<script type="text/javascript" src="{{ static_url }}static/js/logs.js"></script>
<script type="text/javascript" src="{{g.cdn_url}}/laydate/laydate.js"></script>
{% endblock %}

View File

@@ -0,0 +1,118 @@
{% extends "layout.html" %} {% block content %}
<style type="text/css">
.modify_password {
background-color: #fff;
margin: 15px;
min-height: 500px;
}
.modify_password .bt-form {
width: 380px;
}
.modify_password .header {
font-size: 19px;
margin-bottom: 15px;
}
.modify_password .bt-input-text {
height: 40px !important;
line-height: 40px !important;
border-radius: 2px;
width: 100% !important;
font-size: 14px;
}
.modify_password_btn {
width: 340px;
height: 40px;
background: #20a53a;
background: linear-gradient(#20a53a, #189d32);
box-shadow: inset 0 1px 2px #30ad42;
color: #fff;
text-shadow: #00851a 0 -1px 0;
border: 1px solid #20a53a;
text-align: center;
font-size: 14px;
color: #fff;
border-radius: 3px;
cursor: pointer;
}
.random_paw {
position: absolute;
top: 10px;
right: 5px;
}
.bt-form {
position: absolute;
top: 120px;
left: 50%;
margin-left: -150px;
padding: 40px 20px;
}
.bt-form .line {
position: relative;
}
.bt-form input {
margin-bottom: 10px;
}
</style>
<div class="main-content pb55" style="min-height: 525px">
<div class="container-fluid modify_password">
<div class="bt-form" style="text-align: center">
<span class="header" style="">The panel password has expired, please change the password immediately!</span>
<div class="line" style="margin-top: 15px">
<input class="bt-input-text" type="text" name="password1" id="p1" value="" placeholder="New password" style="width: 300px" />
<span title="Generate" class="btn btn-success btn-sm random_paw" onclick="randPwd(16)">Generate</span>
</div>
<div class="line">
<input class="bt-input-text" type="text" name="password2" id="p2" value="" placeholder="Re-type your new password" style="width: 300px" />
</div>
<div>
<button type="button" class="btn btn-success btn-sm modify_password_btn" onclick="modify_password()">Change now</button>
<div class="public_key" style="display: block" data="{{data['public_key']}}"></div>
</div>
</div>
</div>
</div>
{% endblock %} {% block scripts %} {{ super() }}
<script type="text/javascript" src="/static/js/jsencrypt.min.js"></script>
<script type="text/javascript">
function modify_password() {
p1 = $('#p1').val();
p2 = $('#p2').val();
if (p1 == '' || p1.length < 8) {
layer.msg(lan.bt.pass_err_len, {
icon: 2,
});
return;
}
var pdata = {
password1: rsa.encrypt_public(p1),
password2: rsa.encrypt_public(p2),
};
$.post('/config?action=setPassword', pdata, function (b) {
if (b.status) {
layer.msg(b.msg, {
icon: 1,
});
setTimeout(function () {
location.href = '/';
}, 3000);
} else {
layer.msg(b.msg, {
icon: 2,
time: 8000,
});
}
});
}
</script>
{%endblock %}

View File

@@ -0,0 +1,5 @@
<html>
<video src="/video/1.mp4" controls="controls">
Your browser does not support the video tag.
</video>
</html>

View File

@@ -0,0 +1,13 @@
<div>
<h3>An error occurred while the panel was running</h3>
<div style="margin-bottom: 15px;margin-top: 15px;color: red;">
<h4 style="font-size: none;">{error_title}</h4>
</div>
<pre style="height:112px;word-wrap: break-word;white-space: pre-wrap;margin: 0 0 10px">{request_info}</pre>
<pre style="height:470px;word-wrap: break-word;white-space: pre-wrap;margin: 0 0 0px">{error_msg}</pre>
<ul class="help-info-text">
<li style="list-style: none;"><b>Sorry, an unexpected error occurred while the panel was running. Please try to resolve this error in the following order:</b></li>
<li style="list-style: none;">1. Click the Fix button in the upper right corner of [Home], and log out of the panel and log in again.</li>
<li style="list-style: none;">2. Still unresolved, please take a screenshot of this window and post on the forum for help, address:<a class="btlink" href="https://www.yakpanel.com/forum/" target="_blank">https://www.yakpanel.com/forum/</a></li>
</ul>
</div>

View File

@@ -0,0 +1,15 @@
<div>
<h3>Something went wrong, an error occurred while running [{plugin_name}]!</h3>
<div style="margin-bottom: 15px;margin-top: 15px;color: red;">
<h4 style="font-size: none;">{error_title}</h4>
</div>
<pre style="height:112px;word-wrap: break-word;white-space: pre-wrap;margin: 0 0 10px">{request_info}</pre>
<pre style="height:430px;word-wrap: break-word;white-space: pre-wrap;margin: 0 0 0px">{error_msg}</pre>
<ul class="help-info-text">
<li style="list-style: none;"><b>Sorry, an unexpected error occurred while accessing the [{plugin_name}] plugin. Please try to resolve this error in the following order:</b></li>
<li style="list-style: none;">1. Click the Fix button in the upper right corner of [Home], and log out of the panel and log in again.</li>
<li style="list-style: none;">2. If the plugin is not the latest version, try to update to the latest version, if it is the latest version, please try to reinstall the plugin, if it is a beta version, please try to switch to the official version</li>
<li style="list-style: none;">3. If this plug-in is a third-party plug-in, try to contact the author for help</li>
<li style="list-style: none;">4. If the above attempt fails to resolve this error, please take a screenshot of this window and post on the Pagoda Forum for help<a class="btlink" href="https://www.yakpanel.com/forum" target="_blank">https://www.yakpanel.com/forum</a></li>
</ul>
</div>

View File

@@ -0,0 +1,96 @@
{% extends "layout.html" %}
{% block content %}
<link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_1508259_3g6fa6pdt7k.css" />
<style>
#webBody .webPath,#webBody .ssl_tips{
white-space: nowrap;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
min-width: auto;
}
/* php分类选择器宽度 */
.site_class_type.bt_select_updown {
width: 150px;
}
</style>
<div class="main-content pb55">
<div class="container-fluid">
<!-- <div class="pos-box bgw mtb15">
<div class="position f14 c9 pull-left">
<a class="plr10 c4" href="/">{{data['lan']['H1']}}</a>/<span class="plr10 c4">{{data['lan']['H2']}}</span>
</div>
<div class="search pull-right" style="display: none;">
<form target="hid" onsubmit='site.get_list(1,$("#SearchValue").val())'>
<input type="text" id="SearchValue" class="ser-text pull-left" placeholder="{{data['lan']['SEARCH']}}" />
<button type="button" class="ser-sub pull-left" onclick='site.get_list(1,$("#SearchValue").val())'></button>
</form>
<iframe name='hid' id="hid" style="display:none"></iframe>
</div>
</div> -->
<div class="pos-box bgw mtb15">
<div class="tab-list" id="cutMode">
<div class="tabs-item active" data-type="php">PHP Project</div>
<div class="tabs-item" data-type="nodejs">Node Project</div>
</div>
</div>
<div id="site_table_view" class="site_table_view bgw mtb15 pd15">
<!-- <div class="info-title-tips">
<p><span class="glyphicon glyphicon-alert" style="color: #f39c12; margin-right: 10px;"></span> {{data['lan']['PS']}}after the site is successfully established, please<a class="btlink" href="/crontab">[Cron]</a>add scheduled backup tasks to the page!</p>
</div>
<div class="tab-nav" id="cutMode">
<span class="on">PHP Project</span>
<span >Node Project</span>
</div> -->
<div class="tab-con" style="padding: 0;overflow: inherit;">
<div class="tab-con-block">
<div id="bt_site_table"></div>
<div class="mask_layer hide">
<div class="prompt_description"></div>
</div>
</div>
<div class="tab-con-block">
<div id="bt_node_table"></div>
<div class="mask_layer hide">
<div class="prompt_description node-model"></div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{{ super() }}
<script type="text/javascript">
bt.set_cookie('sites_path', "{{session['config']['sites_path']}}");
bt.set_cookie('serverType', "{{session['webserver']}}");
var isSetup = "{{data['isSetup']}}" === 'True'?true:false
// {% if not data['isSetup'] %}
// layer.msg(lan.site.install_web_server_first+'<a href="/soft" style="color:#20a53a; float: right;">'+lan.site.to_install+'</a>', { icon: 7, shade: [0.3, '#000'], time: 0 });
// $(".layui-layer-shade").css("margin-left", "180px");
// {% else %}
// //site.get_list();
// site.plugin_firewall();
// {% endif %}
// function reverse(array){
// var reverse_array = [];
// for(var i = array.length - 1; i >= 0 ; i-- ){
// reverse_array.push(array[i]);
// }
// return reverse_array
// }
</script>
<script type="text/javascript" src="/static/laydate/laydate.js?date=20180301"></script>
<script type="text/javascript" src="{{g.cdn_url}}/js/site.js?version={{g['version']}}&repair={{data['js_random']}}"></script>
<script type="text/javascript" src="{{g.cdn_url}}/ace/ace.js?version={{g['version']}}" defer></script>
<!-- 以下文件未来将被剔除 -->
<script type="text/javascript" src="{{g.cdn_url}}/js/bootstrap-select.min.js" defer></script>
<script type="text/javascript">
if(isSetup) site.plugin_firewall()
</script>
{% endblock %}

View File

@@ -0,0 +1,74 @@
{% extends "layout.html" %}
{% block content %}
<div class="main-content">
<div class="container-fluid" style="padding-bottom:54px">
<div class="pos-box bgw mtb15">
<!-- <div class="position f14 c9 pull-left">
<a class="plr10 c4" href="/">{{data['lan']['H1']}}</a>/<span class="plr10 c4">{{data['lan']['H2']}}</span>
</div>
<div class="search pull-right"></div> -->
<div class="tab-list">
<div class="tabs-item active">{{data['lan']['H2']}}</div>
</div>
</div>
<div class="softbox bgw mtb15">
<div class="softlist">
<div class="soft-filter pd15">
<div class="row soft-filter-box">
<div class="col-md-12">
<span class="filter-title f14 c4">{{data['lan']['SEARCH_APP']}}</span>
<div class="soft-search">
<!-- <form target="hid" onsubmit='soft.get_list(1,0,$("#SearchValue").val())'> -->
<input type="text" id="SearchValue" class="ser-text pull-left" placeholder="search" style="width:232px" />
<button type="button" class="ser-sub pull-left" onclick='soft.get_list(1,0,$("#SearchValue").val())'></button>
<!-- </form> -->
<iframe name='hid' id="hid" style="display:none"></iframe>
</div>
</div>
</div>
<div class="row soft-filter-box"><div class="col-md-12"><span class="filter-title f14 c4">{{data['lan']['APP_SORT']}}</span><div class="menu-sub softtype"></div></div></div>
</div>
<div class="divtable pd15 relative">
<button class="btn btn-default btn-sm" onclick="soft.flush_cache()" title="{{data['lan']['UPDATE_FROM_CLOUD']}}" style="position:absolute;top:-49px;right:15px">{{data['lan']['UPDATE_APP_LIST']}}</button>
<div id="updata_pro_info">
<div class="alert alert-success" style="margin-bottom:15px"><strong>{{data['lan']['PS']}}</strong><button class="btn btn-success btn-xs va0 updata_pro" onclick="bt.soft.updata_pro()" title="{{data['lan']['UPDATE_PRO_NOW']}}" style="margin-left:8px">"{{data['lan']['UPDATE_NOW']}}"</button></div>
</div>
<div id="commonly_software" class="commonly_software"><div class="commonly_software_title">Recently visited plugin:</div><div class="commonly_software_list"></div></div>
<table id="softList" class="table table-hover" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-top:10px"></table>
<div id='softPage' class="dataTables_paginate paging_bootstrap page"></div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{{ super() }}
<script type="text/javascript" src="/static/js/jquery.dragsort-0.5.2.min.js"></script>
<script type="text/javascript" src="/static/laydate/laydate.js?date=20180301"></script>
<script type="text/javascript" src="/static/ace/ace.js?date={{g.version}}"></script>
<script type="text/javascript" src="/static/js/soft.js?version_20200109={{g['version']}}"></script>
<script type="text/javascript">
bt.set_cookie('sites_path', "{{session['config']['sites_path']}}");
bt.set_cookie('serverType', "{{session['webserver']}}");
bt.set_cookie('distribution', "{{session['config']['distribution']}}");
$(document).ready(function () {
soft.get_list();
soft.render_soft_recommend()
$('#SearchValue').keyup(function (e) {
if (e.keyCode == 13) {
soft.get_list(1, 0, $("#SearchValue").val());
}
});
setTimeout(function () {
soft_td_width_auto();
}, 500);
});
$(window).resize(function () {
soft_td_width_auto();
});
</script>
{% endblock %}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,251 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Unsubscribe</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.unsubscribe-container {
background-color: #fff;
padding: 40px;
border-radius: 10px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
width: 350px;
}
h2 {
font-size: 24px;
margin-bottom: 20px;
color: #444;
}
.options {
margin: 20px 0;
}
.options label {
display: flex;
align-items: center;
margin: 15px 0;
font-size: 16px;
}
input[type="checkbox"] {
margin-right: 10px;
width: 18px;
height: 18px;
border-radius: 50%;
accent-color:#20a53a;
}
button {
padding: 12px 0px;
background-color: #20a53a;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
width: 100%;
}
button:hover {
background-color: #25b942;
}
/* loading效果 */
.loading {
position: absolute;
display: none;
align-items: center;
background-color: white;
padding: 10px 40px;
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.spinner {
border: 8px solid rgba(0, 0, 0, 0.1);
border-left-color: #3498db;
border-radius: 50%;
width: 20px;
height: 20px;
margin-right: 15px;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.icon {
font-size: 20px;
margin-right: 10px;
}
</style>
</head>
<body>
<div id="loading" class="loading">
<div class="spinner"></div>
<p>Loading...</p>
</div>
<div id="success-message" class="loading">
<div class="icon">✔️</div>
<p id="tips_success"></p>
</div>
<div id="error-message" class="loading">
<div class="icon"></div>
<p id="tips_error"></p>
</div>
<div class="unsubscribe-container" id="container">
<h2>Are you sure to unsubscribe?</h2>
<div class="options" id="reasonOptions">
<label><input type="checkbox" id="selectAll">Select All</label>
</div>
<button onclick="confirmUnsubscribe()">Sure</button>
</div>
<script>
// 维护用原生写法Network reasons不引入jq\layer
function showSuccess(value) {
const successBox = document.getElementById('success-message');
const containerBox = document.getElementById('container');
const tips = document.getElementById('tips_success')
tips.textContent = value
containerBox.style.display = 'none';
successBox.style.display = 'flex';
}
function showError(value) {
const errorBox = document.getElementById('error-message');
const tips = document.getElementById('tips_error')
tips.textContent = value
errorBox.style.display = 'flex';
setTimeout(() => {
errorBox.style.display = 'none';
}, 2000);
}
// 获取页面传参
function getQueryParams() {
const params = {};
const queryString = window.location.search.substring(1);
const regex = /([^&=]+)=([^&]*)/g;
let m;
while (m = regex.exec(queryString)) {
params[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
}
return params;
}
var params; // 参数
window.onload = function() {
params = getQueryParams();
requestType({email:this.params.email});
}
// 渲染页面类型
function renderType(data) {
const reasonOptionsDiv = document.getElementById('reasonOptions');
data.forEach(reason => {
const label = document.createElement('label');
const checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.name = 'reason';
checkbox.value = reason.id;
label.appendChild(checkbox);
label.appendChild(document.createTextNode(reason.mail_type));
reasonOptionsDiv.appendChild(label);
});
// 绑定全选复选框事件
const selectAllCheckbox = document.getElementById('selectAll');
selectAllCheckbox.addEventListener('change', () => {
const checkboxes = document.querySelectorAll('input[name="reason"]');
checkboxes.forEach(checkbox => {
checkbox.checked = selectAllCheckbox.checked; // 同步选中状态
});
});
// 监测其他复选框的选中状态
reasonOptionsDiv.addEventListener('change', () => {
const checkboxes = document.querySelectorAll('input[name="reason"]');
const allChecked = Array.from(checkboxes).every(checkbox => checkbox.checked);
selectAllCheckbox.checked = allChecked; // 更新全选复选框的状态
});
}
// 请求取消订阅类型
function requestType(reqData) {
document.getElementById('loading').style.display = 'flex';
fetch(params.url_type, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams(reqData).toString()
})
.then(response => response.json())
.then(data => {
if (data.status){
this.renderType(data.msg);
}else{
this.showError(data.msg)
}
})
.catch((err) => {
this.showError(err)
})
.finally(() => {
document.getElementById('loading').style.display = 'none';
});
}
// 请求取消订阅
function requestApi(value) {
document.getElementById('loading').style.display = 'flex';
const data = {
jwt: params.jwt,
id: value
};
fetch(params.url_unsubscribe, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams(data).toString()
})
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
})
.then((res) => {
if(res.status){
this.showSuccess(res.msg)
}else{
this.showError(res.msg)
}
})
.catch((err) => {
this.showError(err)
})
.finally(() => {
document.getElementById('loading').style.display = 'none';
});
}
// 确认取消事件
function confirmUnsubscribe() {
const selectedReasons = Array.from(document.querySelectorAll('input[name="reason"]:checked'))
.map(checkbox => checkbox.value)
.join(',');
if (!selectedReasons) {
this.showError('Please select at least one')
return;
}
requestApi(selectedReasons);
}
</script>
</body>
</html>

View File

@@ -0,0 +1,118 @@
{% extends "layout.html" %}
{% block content %}
<div class="main-content pb55">
<div class="container-fluid">
<div class="safe bgw mtb15 pd15" style="height: 100%;">
<link rel="stylesheet" href="/static/css/xterm.css" />
<div class="quick_links">
<div class="quick_links_title"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span>SSH://</div>
<input type="text" class="quick_links_input" placeholder="root@192.168.1.1:21, support temporary SSH connection.">
<span class="glyphicon glyphicon-triangle-bottom" aria-hidden="true"></span>
</div>
<div class="term_box" id="term_box_view">
<div class="term_item_tab">
<div class="list"></div>
<span class="addServer" title="Add server SSH information">
<span class="glyphicon glyphicon-plus" aria-hidden="true" ></span>
</span>
<span class="tab_tootls">
<span class="glyphicon glyphicon-resize-full" aria-hidden="true" title="Full Screen"></span><span>Full Screen</span>
<!-- <span class="glyphicon glyphicon-triangle-top" aria-hidden="true"></span>
<span class="glyphicon glyphicon-triangle-bottom" aria-hidden="true"></span> -->
</span>
</div>
<div class="term_content_tab">
<div class="term-tool-button tool-hide"><span class="glyphicon glyphicon-menu-right"></span></div>
</div>
</div>
<div class="term_tootls">
<div class="tootls_tab"><span class="active">Server list</span><a href="javascript:;" data-type="host" title="Add server SSH information"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a></div>
<ul class="tootls_host_list"></ul>
<div class="tootls_tab"><span class="active">Commands<i>(Click to copy)</i></span><a href="javascript:;" data-type="shell" title="Add common commands"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a></div>
<ul class="tootls_commonly_list"></ul>
</div>
</div>
</div>
</div>
<script type="text/html" id="host_form_view">
<div class="bt-form bt-form-2x pd20" id="host_form">
<input type="text" name="sort" class="hidden" value="<% this.form.sort %>" />
<div class="line input_group">
<span class="tname">Server IP</span>
<div class="info-r">
<input type="text" name="host" class="bt-input-text mr5" style="width:240px" value="<% this.form.host %>" placeholder="Enter server IP" val="" autocomplete="off" />
<input type="text" name="port" class="bt-input-text mr5" style="width:60px" placeholder="Port" value="<% this.form.port %>" autocomplete="off"/>
</div>
</div>
<div class="line">
<span class="tname">SSH account</span>
<div class="info-r">
<input type="text" name="username" class="bt-input-text mr5" style="width:305px" placeholder="Enter SSH account" value="<% this.form.username %>" autocomplete="off"/>
</div>
</div>
<div class="line">
<span class="tname">Verification</span>
<div class="info-r ">
<div class="btn-group">
<button type="button" tabindex="-1" class="btn btn-sm auth_type_checkbox <% !(this.form.password != '' || this.form.pkey == '' && this.form.password == '')?'btn-default':'btn-success' %>" data-ctype="0">Password</button>
<button type="button" tabindex="-1" class="btn btn-sm auth_type_checkbox <% this.form.pkey == ''?'btn-default':'btn-success' %>" data-ctype="1">Private key</button>
</div>
</div>
</div>
<div class="line c_password_view <% (this.form.password != '' || this.form.pkey == '' && this.form.password == '')?'show':'hidden'%>">
<span class="tname">Password</span>
<div class="info-r">
<input type="text" name="password" class="bt-input-text mr5" placeholder="Please enter SSH password"
style="width:305px;" value="<% this.form.password %>" autocomplete="off"/>
</div>
</div>
<div class="line c_pkey_view <% this.form.pkey != ''?'show':'hidden'%>">
<span class="tname">Private key</span>
<div class="info-r">
<textarea rows="4" name="pkey" class="bt-input-text mr5" placeholder="Please enter SSH Private key"
style="width:305px;height: 80px;line-height: 18px;padding-top:10px;"><% this.form.pkey %></textarea>
</div>
</div>
<div class="line key_pwd_line <% this.form.pkey != '' ? 'show' : 'hidden' %>">
<span class="tname">Key password</span>
<div class="info-r">
<input type="text" name="pkey_passwd" class="bt-input-text mr5" placeholder="Please enter Key password, can be blank" style="width:305px;"
value="<% this.form.pkey_passwd %>" autocomplete="off"/>
</div>
</div>
<div class="line">
<span class="tname">Remarks</span>
<div class="info-r">
<input type="text" name="ps" class="bt-input-text mr5" placeholder="Please enter remarks, can be blank"
style="width:305px;" value="<% this.form.ps %>" autocomplete="off"/>
</div>
</div>
</div>
</script>
<script type="text/html" id="shell_form_view">
<div class="bt-form bt-form-2x pd20" id="host_form">
<div class="line">
<span class="tname">Name</span>
<div class="info-r">
<input type="text" name="title" class="bt-input-text mr5" style="width:305px" placeholder="Please enter command description, required" value="<% this.form.title %>" autocomplete="off"/>
</div>
</div>
<div class="line">
<span class="tname">Content</span>
<div class="info-r">
<textarea rows="4" name="shell" class="bt-input-text mr5"
placeholder="Please enter command content, required"
style="width:305px;height: 150px;line-height: 18px;padding-top:10px;"><% this.form.shell %></textarea>
</div>
</div>
</div>
</script>
{% endblock %}
{% block scripts %}
{{ super() }}
<script type="text/javascript" src="/static/js/jquery.dragsort-0.5.2.min.js"></script>
<script type="text/javascript" src="/static/js/clipboard.min.js"></script>
<script type="text/javascript" src="/static/js/xterm.js"></script>
<script type="text/javascript" src="/static/js/term.js"></script>
{% endblock %}