sbd-npm 1.4.67 → 1.4.68
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 +22 -6
- package/util.js +1 -1
package/package.json
CHANGED
package/status.js
CHANGED
@@ -156,17 +156,18 @@ $(function () {
|
|
156
156
|
let match_ip_data = Util.regexp_match_ip(ip);
|
157
157
|
if (match_ip_data && match_ip_data[0]) {
|
158
158
|
ip = match_ip_data[0];
|
159
|
-
let
|
160
|
-
|
159
|
+
let ip_address = $(this).parent().parent().children('td').eq(1).text().split("-");
|
160
|
+
ip_address = ip + "[" + ip_address[0].trim() + "]";
|
161
|
+
if (confirm("是否确定要屏蔽IP “ " + ip_address + " ” ?")) {
|
161
162
|
Util.show_loading();
|
162
163
|
Util.post(location.pathname, {"active_div": "block_ip", "ip": ip}, function (j) {
|
163
164
|
Util.hide_tips();
|
164
165
|
if (j["code"] === 1) {
|
165
|
-
Util.show_tips("IP “ " +
|
166
|
+
Util.show_tips("IP “ " + ip_address + " ” 已加到屏蔽队列中", 4567, "alert-success");
|
166
167
|
} else if (j["code"] === 2) {
|
167
|
-
Util.show_tips("IP “ " +
|
168
|
+
Util.show_tips("IP “ " + ip_address + " ” 已在屏蔽队列中", 4567, "alert-success");
|
168
169
|
} else {
|
169
|
-
Util.show_tips("屏蔽IP “ " +
|
170
|
+
Util.show_tips("屏蔽IP “ " + ip_address + " ” 失败", 4567, "alert-danger");
|
170
171
|
}
|
171
172
|
});
|
172
173
|
}
|
@@ -844,8 +845,9 @@ $(function () {
|
|
844
845
|
}
|
845
846
|
});
|
846
847
|
} else {
|
847
|
-
let cmdline = $(this).parent().parent().children('td').eq(2).text();
|
848
848
|
let action = "";
|
849
|
+
let this_obj = $(this);
|
850
|
+
let cmdline = this_obj.parent().parent().children('td').eq(2).text();
|
849
851
|
if (cmdline.includes("zotonic") || cmdline.includes("xmrig")) {
|
850
852
|
action = "xmr";
|
851
853
|
} else {
|
@@ -860,6 +862,20 @@ $(function () {
|
|
860
862
|
Util.post(location.pathname, {active_div: "machine_instruction_add", "machine_id": $("#machines").val(), "content": screen_content, action_type: 2}, function (j) {
|
861
863
|
Util.hide_tips();
|
862
864
|
if (j["code"] === 1) {
|
865
|
+
$('#machine_process_div_body a').each(function() {
|
866
|
+
let span_obj = $(this).find('span.label.label-info');
|
867
|
+
if (span_obj.length) {
|
868
|
+
var span_text = span_obj.text();
|
869
|
+
span_obj.remove();
|
870
|
+
$(this).append(span_text);
|
871
|
+
} else {
|
872
|
+
let is_fetch_screen = $(this).attr("data-screen");
|
873
|
+
if (is_fetch_screen && is_fetch_screen == "1") {
|
874
|
+
$(this).text('会话').removeAttr('data-screen');
|
875
|
+
}
|
876
|
+
}
|
877
|
+
});
|
878
|
+
this_obj.html("<span class='label label-info'>会话</span>");
|
863
879
|
Util.show_tips("进程 [" + pid + "(" + action + ")] 已加到会话队列中", 4567, "alert-success");
|
864
880
|
} else if (j["code"] === 2) {
|
865
881
|
Util.show_tips("Machine 不存在!", 4567, "alert-danger");
|
package/util.js
CHANGED
@@ -1661,7 +1661,7 @@ const Util = {
|
|
1661
1661
|
j["data"].forEach(function (item) {
|
1662
1662
|
index++;
|
1663
1663
|
html.push("<tr>");
|
1664
|
-
html.push("<td>", Util.pack_html_link("https://api.mymemory.translated.net/get?q=" + item["word"]
|
1664
|
+
html.push("<td>", Util.pack_html_link("https://api.mymemory.translated.net/get?langpair=en|zh-CN&q=" + item["word"], index), "</td>");
|
1665
1665
|
html.push("<td>", Util.pack_html_link("https://cn.bing.com/dict/search?q=" + item["word"], item["word"]), "</td>");
|
1666
1666
|
if (is_mobile) {
|
1667
1667
|
html.push("<td class='text-left'>", item["chinese"], "</td>");
|