@yuneta/gobj-ui 7.23.172 → 7.23.173
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/dist/gobj-ui.cjs.js +5 -0
- package/dist/gobj-ui.es.js +5 -0
- package/package.json +1 -1
- package/src/yui_dev.js +10 -0
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -77090,9 +77090,14 @@ function toggle_automata() {
|
|
|
77090
77090
|
}
|
|
77091
77091
|
}
|
|
77092
77092
|
function traffic_state() {
|
|
77093
|
+
if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_IEVENT_CLI")) return 0;
|
|
77093
77094
|
return (0, _yuneta_gobj_js.gobj_get_gclass_trace_level2)("C_IEVENT_CLI").includes("ievents") ? 1 : 0;
|
|
77094
77095
|
}
|
|
77095
77096
|
function toggle_traffic() {
|
|
77097
|
+
if (!(0, _yuneta_gobj_js.gclass_find_by_name)("C_IEVENT_CLI")) {
|
|
77098
|
+
(0, _yuneta_gobj_js.log_error)("yui_dev: no C_IEVENT_CLI in this app, there is no traffic to trace");
|
|
77099
|
+
return;
|
|
77100
|
+
}
|
|
77096
77101
|
yuno_trace_command("set-gclass-trace", {
|
|
77097
77102
|
gclass_name: "C_IEVENT_CLI",
|
|
77098
77103
|
level: "ievents",
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -77085,9 +77085,14 @@ function toggle_automata() {
|
|
|
77085
77085
|
}
|
|
77086
77086
|
}
|
|
77087
77087
|
function traffic_state() {
|
|
77088
|
+
if (!gclass_find_by_name("C_IEVENT_CLI")) return 0;
|
|
77088
77089
|
return gobj_get_gclass_trace_level2("C_IEVENT_CLI").includes("ievents") ? 1 : 0;
|
|
77089
77090
|
}
|
|
77090
77091
|
function toggle_traffic() {
|
|
77092
|
+
if (!gclass_find_by_name("C_IEVENT_CLI")) {
|
|
77093
|
+
log_error("yui_dev: no C_IEVENT_CLI in this app, there is no traffic to trace");
|
|
77094
|
+
return;
|
|
77095
|
+
}
|
|
77091
77096
|
yuno_trace_command("set-gclass-trace", {
|
|
77092
77097
|
gclass_name: "C_IEVENT_CLI",
|
|
77093
77098
|
level: "ievents",
|
package/package.json
CHANGED
package/src/yui_dev.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
gobj_global_trace_level,
|
|
18
18
|
gobj_global_trace_no_level,
|
|
19
19
|
gobj_get_gclass_trace_level2,
|
|
20
|
+
gclass_find_by_name,
|
|
20
21
|
trace_level_t,
|
|
21
22
|
log_error,
|
|
22
23
|
gobj_create_service,
|
|
@@ -1150,11 +1151,20 @@ function toggle_automata()
|
|
|
1150
1151
|
* gclass=C_IEVENT_CLI level=ievents` on a node. */
|
|
1151
1152
|
function traffic_state()
|
|
1152
1153
|
{
|
|
1154
|
+
/* An app with no websocket registers no C_IEVENT_CLI: nothing to trace,
|
|
1155
|
+
* and nothing wrong with that, so ask before reading its levels. */
|
|
1156
|
+
if(!gclass_find_by_name("C_IEVENT_CLI")) {
|
|
1157
|
+
return 0;
|
|
1158
|
+
}
|
|
1153
1159
|
return gobj_get_gclass_trace_level2("C_IEVENT_CLI").includes("ievents") ? 1 : 0;
|
|
1154
1160
|
}
|
|
1155
1161
|
|
|
1156
1162
|
function toggle_traffic()
|
|
1157
1163
|
{
|
|
1164
|
+
if(!gclass_find_by_name("C_IEVENT_CLI")) {
|
|
1165
|
+
log_error("yui_dev: no C_IEVENT_CLI in this app, there is no traffic to trace");
|
|
1166
|
+
return;
|
|
1167
|
+
}
|
|
1158
1168
|
yuno_trace_command("set-gclass-trace",
|
|
1159
1169
|
{gclass_name: "C_IEVENT_CLI", level: "ievents", set: traffic_state() ? 0 : 1});
|
|
1160
1170
|
}
|