sbd-npm 1.4.55 → 1.4.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/status.js +18 -15
- package/util.js +1 -1
package/package.json
CHANGED
package/status.js
CHANGED
@@ -157,27 +157,30 @@ $(function () {
|
|
157
157
|
if (item["is_block"] === 1) {
|
158
158
|
html.push("<td>", Util.seconds_to_format(item["time"]), "</td>");
|
159
159
|
} else {
|
160
|
-
|
161
|
-
html.push("<td><a href='#' class='block_ip' data-val='", ((match_ip_data && match_ip_data[0]) ? match_ip_data[0] : item["ip"]), "'>", Util.seconds_to_format(item["time"]), "</a></td>");
|
160
|
+
html.push("<td><a href='#' class='block_ip'>", Util.seconds_to_format(item["time"]), "</a></td>");
|
162
161
|
}
|
163
162
|
html.push("</tr>");
|
164
163
|
});
|
165
164
|
Util.render_table_html("ip_daily_data", html);
|
166
165
|
$("#ip_daily_data .block_ip").each(function() {
|
167
166
|
$(this).click(function() {
|
168
|
-
let ip = $(this).
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
167
|
+
let ip = $(this).parent().parent().children('td').eq(0).text();
|
168
|
+
let match_ip_data = Util.regexp_match_ip(ip);
|
169
|
+
if (match_ip_data && match_ip_data[0]) {
|
170
|
+
ip = match_ip_data[0];
|
171
|
+
if (confirm("是否确定要屏蔽IP “ " + ip + " ” ?")) {
|
172
|
+
Util.show_loading();
|
173
|
+
Util.post(location.pathname, {"active_div": "block_ip", "ip": ip}, function (j) {
|
174
|
+
Util.hide_tips();
|
175
|
+
if (j["code"] === 1) {
|
176
|
+
Util.show_tips("IP “ " + ip + " ” 已加到屏蔽队列中", 4567, "alert-success");
|
177
|
+
} else if (j["code"] === 2) {
|
178
|
+
Util.show_tips("IP “ " + ip + " ” 已在屏蔽队列中", 4567, "alert-success");
|
179
|
+
} else {
|
180
|
+
Util.show_tips("屏蔽IP “ " + ip + " ” 失败", 4567, "alert-danger");
|
181
|
+
}
|
182
|
+
});
|
183
|
+
}
|
181
184
|
}
|
182
185
|
});
|
183
186
|
});
|
package/util.js
CHANGED
@@ -77,7 +77,7 @@ const Util = {
|
|
77
77
|
return false;
|
78
78
|
});
|
79
79
|
|
80
|
-
|
80
|
+
$("#random_walk").click(function() {
|
81
81
|
let nodeObject = document.querySelectorAll(".side-menu li a");
|
82
82
|
let url_array = Array.from(nodeObject).map(a => a.getAttribute("href")).filter(Boolean);
|
83
83
|
if (url_array.length > 0) {
|