实现公用的IP名单

This commit is contained in:
刘祥超
2021-06-23 13:12:33 +08:00
parent c99547d9e3
commit 8e4ee54f03
88 changed files with 2060 additions and 69 deletions

View File

@@ -11,6 +11,8 @@
<menu-item @click.prevent="createIP('white')">添加IP</menu-item>
<span class="item">|</span>
<span class="item">ID: {{listId}} &nbsp; <tip-icon content="ID可以用于使用API操作此IP名单"></tip-icon></span>
<span class="item">|</span>
<div class="item"><ip-list-bind-box :v-http-firewall-policy-id="firewallPolicyId" :v-type="'white'"></ip-list-bind-box></div>
</second-menu>
<p class="ui message warning" v-if="!wafIsOn">当前WAF未启用设置将在<a :href="'/servers/server/settings/waf?serverId=' + serverId">[启用]</a>后生效。</p>

View File

@@ -29,7 +29,9 @@ Tea.context(function () {
teaweb.popup("/servers/server/settings/waf/ipadmin/createIPPopup?listId=" + this.listId + '&type=' + type, {
height: "26em",
callback: function () {
window.location.reload()
teaweb.success("保存成功", function () {
teaweb.reload()
})
}
})
}

View File

@@ -56,10 +56,13 @@ Tea.context(function () {
* 添加IP名单菜单
*/
this.createIP = function (type) {
let that = this
teaweb.popup("/servers/components/waf/ipadmin/createIPPopup?firewallPolicyId=" + this.firewallPolicyId + '&type=' + type, {
height: "30em",
callback: function () {
window.location = "/servers/components/waf/ipadmin/lists?firewallPolicyId=" + this.firewallPolicyId + "&type=" + type
teaweb.success("保存成功", function () {
window.location = "/servers/components/waf/ipadmin/lists?firewallPolicyId=" + that.firewallPolicyId + "&type=" + type
})
}
})
}

View File

@@ -11,6 +11,8 @@
<menu-item @click.prevent="createIP('black')">添加IP</menu-item>
<span class="item">|</span>
<span class="item">ID: {{listId}} &nbsp; <tip-icon content="ID可以用于使用API操作此IP名单"></tip-icon></span>
<span class="item">|</span>
<div class="item"><ip-list-bind-box :v-http-firewall-policy-id="firewallPolicyId" :v-type="'black'"></ip-list-bind-box></div>
</second-menu>
<p class="ui message warning" v-if="!wafIsOn">当前WAF未启用设置将在<a :href="'/servers/server/settings/waf?serverId=' + serverId">[启用]</a>后生效。</p>

View File

@@ -29,7 +29,9 @@ Tea.context(function () {
teaweb.popup("/servers/server/settings/waf/ipadmin/createIPPopup?listId=" + this.listId + '&type=' + type, {
height: "26em",
callback: function () {
window.location.reload()
teaweb.success("保存成功", function () {
teaweb.reload()
})
}
})
}

View File

@@ -42,10 +42,13 @@ Tea.context(function () {
* 添加IP名单菜单
*/
this.createIP = function (type) {
let that = this
teaweb.popup("/servers/components/waf/ipadmin/createIPPopup?firewallPolicyId=" + this.firewallPolicyId + '&type=' + type, {
height: "30em",
callback: function () {
window.location = "/servers/components/waf/ipadmin/lists?firewallPolicyId=" + this.firewallPolicyId + "&type=" + type
teaweb.success("保存成功", function () {
window.location = "/servers/components/waf/ipadmin/lists?firewallPolicyId=" + that.firewallPolicyId + "&type=" + type
})
}
})
}

View File

@@ -1,4 +1,7 @@
.chart-box {
height: 20em;
}
h4 span.small {
font-size: 0.8em;
}
/*# sourceMappingURL=clients.css.map */

View File

@@ -1 +1 @@
{"version":3,"sources":["clients.less"],"names":[],"mappings":"AAAA;EACC,YAAA","file":"clients.css"}
{"version":3,"sources":["clients.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"clients.css"}

View File

@@ -12,10 +12,10 @@
要想查看统计数据,需要先开启统计功能,<a :href="'/servers/server/settings/stat?serverId=' + serverId">[点击这里]</a>修改配置。
</p>
{$else}
<h4>操作系统排行</h4>
<h4>操作系统排行<span class="small grey">(按月)</span></h4>
<div class="chart-box" id="system-chart"></div>
<h4>浏览器排行</h4>
<h4>浏览器排行<span class="small grey">(按月)</span></h4>
<div class="chart-box" id="browser-chart"></div>
{$end}
</div>

View File

@@ -1,3 +1,7 @@
.chart-box {
height: 20em;
}
h4 span.small {
font-size: 0.8em;
}

View File

@@ -1,4 +1,7 @@
.chart-box {
height: 21em;
}
h4 span.small {
font-size: 0.8em;
}
/*# sourceMappingURL=dailyRequests.css.map */

View File

@@ -1 +1 @@
{"version":3,"sources":["dailyRequests.less"],"names":[],"mappings":"AAAA;EACC,YAAA","file":"dailyRequests.css"}
{"version":3,"sources":["dailyRequests.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"dailyRequests.css"}

View File

@@ -1,3 +1,7 @@
.chart-box {
height: 21em;
}
h4 span.small {
font-size: 0.8em;
}

View File

@@ -1,4 +1,7 @@
.chart-box {
height: 21em;
}
h4 span.small {
font-size: 0.8em;
}
/*# sourceMappingURL=hourlyRequests.css.map */

View File

@@ -1 +1 @@
{"version":3,"sources":["hourlyRequests.less"],"names":[],"mappings":"AAAA;EACC,YAAA","file":"hourlyRequests.css"}
{"version":3,"sources":["hourlyRequests.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"hourlyRequests.css"}

View File

@@ -1,3 +1,7 @@
.chart-box {
height: 21em;
}
h4 span.small {
font-size: 0.8em;
}

View File

@@ -1,4 +1,7 @@
.chart-box {
height: 21em;
}
h4 span.small {
font-size: 0.8em;
}
/*# sourceMappingURL=index.css.map */

View File

@@ -1 +1 @@
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,YAAA","file":"index.css"}
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"index.css"}

View File

@@ -1,3 +1,7 @@
.chart-box {
height: 21em;
}
h4 span.small {
font-size: 0.8em;
}

View File

@@ -1,4 +1,7 @@
.chart-box {
height: 20em;
}
h4 span.small {
font-size: 0.8em;
}
/*# sourceMappingURL=providers.css.map */

View File

@@ -1 +1 @@
{"version":3,"sources":["providers.less"],"names":[],"mappings":"AAAA;EACC,YAAA","file":"providers.css"}
{"version":3,"sources":["providers.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"providers.css"}

View File

@@ -12,7 +12,7 @@
要想查看统计数据,需要先开启统计功能,<a :href="'/servers/server/settings/stat?serverId=' + serverId">[点击这里]</a>修改配置。
</p>
{$else}
<h4>运营商排行</h4>
<h4>运营商排行<span class="small grey">(按月)</span></h4>
<div class="chart-box" id="provider-chart"></div>
{$end}
</div>

View File

@@ -1,3 +1,7 @@
.chart-box {
height: 20em;
}
h4 span.small {
font-size: 0.8em;
}

View File

@@ -1,4 +1,7 @@
.chart-box {
height: 20em;
}
/*# sourceMappingURL=index.css.map */
h4 span.small {
font-size: 0.8em;
}
/*# sourceMappingURL=regions.css.map */

View File

@@ -1 +1 @@
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,YAAA","file":"index.css"}
{"version":3,"sources":["regions.less"],"names":[],"mappings":"AAAA;EACC,YAAA;;AAGD,EAAG,KAAI;EACN,gBAAA","file":"regions.css"}

View File

@@ -12,17 +12,17 @@
要想查看统计数据,需要先开启统计功能,<a :href="'/servers/server/settings/stat?serverId=' + serverId">[点击这里]</a>修改配置。
</p>
{$else}
<h4>地区排行</h4>
<h4>地区排行<span class="small grey">(按月)</span></h4>
<div class="chart-box" id="country-chart">
</div>
<h4>省市排行</h4>
<h4>省市排行<span class="small grey">(按月)</span></h4>
<div class="chart-box" id="province-chart">
</div>
<h4>城市排行</h4>
<h4>城市排行<span class="small grey">(按月)</span></h4>
<div class="chart-box" id="city-chart">
</div>

View File

@@ -1,3 +1,7 @@
.chart-box {
height: 20em;
}
h4 span.small {
font-size: 0.8em;
}