@yuneta/gobj-ui 7.27.27 → 7.27.28
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/README.md +10 -6
- package/dist/gobj-ui.cjs.js +15 -6
- package/dist/gobj-ui.es.js +15 -6
- package/package.json +1 -1
- package/src/c_yui_gclass.js +2 -2
- package/src/c_yui_gobj_tree_js.js +13 -5
- package/src/gclass_traces.wiring.test.js +6 -0
- package/src/gobj_tree_remote.wiring.test.js +14 -0
package/README.md
CHANGED
|
@@ -3419,18 +3419,22 @@ child and publishes `EV_SET_GCLASS_TRACE {gclass, levels, set}` to it, which
|
|
|
3419
3419
|
goes out as `EV_SET_TRACE_LEVEL {scope: "gclass"}`.
|
|
3420
3420
|
|
|
3421
3421
|
Note what the C runtime does with them: a gclass or yuno level is saved by the
|
|
3422
|
-
yuno (`trace_levels`) and **survives a restart
|
|
3423
|
-
|
|
3424
|
-
the
|
|
3425
|
-
|
|
3422
|
+
yuno (`trace_levels`) and **survives a restart**. A gobj level survives too
|
|
3423
|
+
when the gobj is a named **service** (SDK 7.27.3+: it is saved under its service
|
|
3424
|
+
name, the only name `set_user_gobj_traces()` can find at start up); any other
|
|
3425
|
+
gobj's level **ends with the yuno**. The card says which of the two its gobj
|
|
3426
|
+
is, and the gclass viewer that the gclass' levels survive. The traces go to the
|
|
3427
|
+
yuno's log, not to the Developer window.
|
|
3426
3428
|
|
|
3427
3429
|
Consumer i18n keys (every app that mounts the tree): `traces of this gobj`,
|
|
3428
3430
|
`kernel levels`, `this gobj`, `the whole yuno`, `all of the gclass`,
|
|
3429
3431
|
`on for the whole yuno`, `on for all of the gclass`, `traces of the yuno`,
|
|
3430
3432
|
`remove the traces of this gobj`, `remove the traces of the gclass`,
|
|
3431
3433
|
`remove the traces of the yuno`, `the yuno's traces survive a restart`,
|
|
3432
|
-
`
|
|
3433
|
-
`
|
|
3434
|
+
`the traces of a service survive a restart`,
|
|
3435
|
+
`the traces of a gobj that is not a service end with the yuno`,
|
|
3436
|
+
`the traces of a gclass survive a restart` (plus `yuno`, `level`, `loading`
|
|
3437
|
+
and `gclass`, which every app has).
|
|
3434
3438
|
|
|
3435
3439
|
### The gclass viewer — `yui_gclass_view.js`
|
|
3436
3440
|
|
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -23584,9 +23584,9 @@ function build_trace_toggles(gobj, model, traces) {
|
|
|
23584
23584
|
"div",
|
|
23585
23585
|
{
|
|
23586
23586
|
class: "GCLASS_TRACES_NOTE",
|
|
23587
|
-
i18n: "
|
|
23587
|
+
i18n: "the traces of a gclass survive a restart"
|
|
23588
23588
|
},
|
|
23589
|
-
(0, i18next.t)("
|
|
23589
|
+
(0, i18next.t)("the traces of a gclass survive a restart")
|
|
23590
23590
|
],
|
|
23591
23591
|
[
|
|
23592
23592
|
"div",
|
|
@@ -51538,7 +51538,8 @@ function yui_graph_minimap_repaint(plugin) {
|
|
|
51538
51538
|
* carries them like every other one.
|
|
51539
51539
|
*
|
|
51540
51540
|
* A gclass or yuno level is saved by the yuno and survives a
|
|
51541
|
-
* restart; a gobj level
|
|
51541
|
+
* restart; so does a gobj level of a named service (SDK
|
|
51542
|
+
* 7.27.3+). Any other gobj's level lasts until the yuno ends.
|
|
51542
51543
|
*
|
|
51543
51544
|
* The output events are published ONLY in "remote", so a host
|
|
51544
51545
|
* of a local tree (the Frontend view) declares none of them.
|
|
@@ -53227,14 +53228,22 @@ function build_traces_block(gobj, d) {
|
|
|
53227
53228
|
trs
|
|
53228
53229
|
]]
|
|
53229
53230
|
]);
|
|
53230
|
-
kids.push([
|
|
53231
|
+
kids.push(d.service ? [
|
|
53232
|
+
"div",
|
|
53233
|
+
{
|
|
53234
|
+
class: "GOBJ_TREE_TRACES_NOTE",
|
|
53235
|
+
i18n: "the traces of a service survive a restart",
|
|
53236
|
+
style: TRACES_NOTE_STYLE
|
|
53237
|
+
},
|
|
53238
|
+
(0, i18next.t)("the traces of a service survive a restart")
|
|
53239
|
+
] : [
|
|
53231
53240
|
"div",
|
|
53232
53241
|
{
|
|
53233
53242
|
class: "GOBJ_TREE_TRACES_NOTE",
|
|
53234
|
-
i18n: "
|
|
53243
|
+
i18n: "the traces of a gobj that is not a service end with the yuno",
|
|
53235
53244
|
style: TRACES_NOTE_STYLE
|
|
53236
53245
|
},
|
|
53237
|
-
(0, i18next.t)("
|
|
53246
|
+
(0, i18next.t)("the traces of a gobj that is not a service end with the yuno")
|
|
53238
53247
|
]);
|
|
53239
53248
|
kids.push(traces_remove_button(gobj, "gobj", {
|
|
53240
53249
|
title: (0, i18next.t)("remove the traces of this gobj"),
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -23579,9 +23579,9 @@ function build_trace_toggles(gobj, model, traces) {
|
|
|
23579
23579
|
"div",
|
|
23580
23580
|
{
|
|
23581
23581
|
class: "GCLASS_TRACES_NOTE",
|
|
23582
|
-
i18n: "
|
|
23582
|
+
i18n: "the traces of a gclass survive a restart"
|
|
23583
23583
|
},
|
|
23584
|
-
t("
|
|
23584
|
+
t("the traces of a gclass survive a restart")
|
|
23585
23585
|
],
|
|
23586
23586
|
[
|
|
23587
23587
|
"div",
|
|
@@ -51533,7 +51533,8 @@ function yui_graph_minimap_repaint(plugin) {
|
|
|
51533
51533
|
* carries them like every other one.
|
|
51534
51534
|
*
|
|
51535
51535
|
* A gclass or yuno level is saved by the yuno and survives a
|
|
51536
|
-
* restart; a gobj level
|
|
51536
|
+
* restart; so does a gobj level of a named service (SDK
|
|
51537
|
+
* 7.27.3+). Any other gobj's level lasts until the yuno ends.
|
|
51537
51538
|
*
|
|
51538
51539
|
* The output events are published ONLY in "remote", so a host
|
|
51539
51540
|
* of a local tree (the Frontend view) declares none of them.
|
|
@@ -53222,14 +53223,22 @@ function build_traces_block(gobj, d) {
|
|
|
53222
53223
|
trs
|
|
53223
53224
|
]]
|
|
53224
53225
|
]);
|
|
53225
|
-
kids.push([
|
|
53226
|
+
kids.push(d.service ? [
|
|
53227
|
+
"div",
|
|
53228
|
+
{
|
|
53229
|
+
class: "GOBJ_TREE_TRACES_NOTE",
|
|
53230
|
+
i18n: "the traces of a service survive a restart",
|
|
53231
|
+
style: TRACES_NOTE_STYLE
|
|
53232
|
+
},
|
|
53233
|
+
t("the traces of a service survive a restart")
|
|
53234
|
+
] : [
|
|
53226
53235
|
"div",
|
|
53227
53236
|
{
|
|
53228
53237
|
class: "GOBJ_TREE_TRACES_NOTE",
|
|
53229
|
-
i18n: "
|
|
53238
|
+
i18n: "the traces of a gobj that is not a service end with the yuno",
|
|
53230
53239
|
style: TRACES_NOTE_STYLE
|
|
53231
53240
|
},
|
|
53232
|
-
t("
|
|
53241
|
+
t("the traces of a gobj that is not a service end with the yuno")
|
|
53233
53242
|
]);
|
|
53234
53243
|
kids.push(traces_remove_button(gobj, "gobj", {
|
|
53235
53244
|
title: t("remove the traces of this gobj"),
|
package/package.json
CHANGED
package/src/c_yui_gclass.js
CHANGED
|
@@ -1036,8 +1036,8 @@ function build_trace_toggles(gobj, model, traces)
|
|
|
1036
1036
|
['tbody', {}, trs]
|
|
1037
1037
|
]]),
|
|
1038
1038
|
['div', {class: 'GCLASS_TRACES_NOTE',
|
|
1039
|
-
i18n: '
|
|
1040
|
-
t('
|
|
1039
|
+
i18n: 'the traces of a gclass survive a restart'},
|
|
1040
|
+
t('the traces of a gclass survive a restart')],
|
|
1041
1041
|
['div', {class: 'GCLASS_TRACES_TOOLS'}, [$clear]]
|
|
1042
1042
|
]]};
|
|
1043
1043
|
}
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
* carries them like every other one.
|
|
50
50
|
*
|
|
51
51
|
* A gclass or yuno level is saved by the yuno and survives a
|
|
52
|
-
* restart; a gobj level
|
|
52
|
+
* restart; so does a gobj level of a named service (SDK
|
|
53
|
+
* 7.27.3+). Any other gobj's level lasts until the yuno ends.
|
|
53
54
|
*
|
|
54
55
|
* The output events are published ONLY in "remote", so a host
|
|
55
56
|
* of a local tree (the Frontend view) declares none of them.
|
|
@@ -2343,10 +2344,17 @@ function build_traces_block(gobj, d)
|
|
|
2343
2344
|
['tbody', {}, trs]
|
|
2344
2345
|
]]);
|
|
2345
2346
|
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2347
|
+
/* What the yuno keeps of them (SDK 7.27.3+): the traces of a named
|
|
2348
|
+
* service are saved and re-applied at start up, any other gobj's are
|
|
2349
|
+
* not -- they could never be found again. */
|
|
2350
|
+
kids.push(d.service?
|
|
2351
|
+
['div', {class: 'GOBJ_TREE_TRACES_NOTE',
|
|
2352
|
+
i18n: 'the traces of a service survive a restart', style: TRACES_NOTE_STYLE},
|
|
2353
|
+
t('the traces of a service survive a restart')]:
|
|
2354
|
+
['div', {class: 'GOBJ_TREE_TRACES_NOTE',
|
|
2355
|
+
i18n: 'the traces of a gobj that is not a service end with the yuno',
|
|
2356
|
+
style: TRACES_NOTE_STYLE},
|
|
2357
|
+
t('the traces of a gobj that is not a service end with the yuno')]);
|
|
2350
2358
|
|
|
2351
2359
|
kids.push(traces_remove_button(gobj, "gobj", {
|
|
2352
2360
|
title: t('remove the traces of this gobj'),
|
|
@@ -169,6 +169,12 @@ describe("C_YUI_GCLASS: the gclass' trace levels, set from the viewer", () => {
|
|
|
169
169
|
expect(problems()).toEqual([]);
|
|
170
170
|
});
|
|
171
171
|
|
|
172
|
+
test("the zone says the gclass' traces survive a restart", () => {
|
|
173
|
+
const view = open({traces: {info: INFO, pending: false}});
|
|
174
|
+
expect(gobj_read_attr(view, "$container").querySelector(".GCLASS_TRACES_NOTE").getAttribute("data-i18n"))
|
|
175
|
+
.toBe("the traces of a gclass survive a restart");
|
|
176
|
+
});
|
|
177
|
+
|
|
172
178
|
test("remove the traces of the gclass turns off its own, not the yuno's", () => {
|
|
173
179
|
const view = open({traces: {info: INFO, pending: false}});
|
|
174
180
|
gobj_read_attr(view, "$container").querySelector(".GCLASS_TRACES_CLEAR").click();
|
|
@@ -253,6 +253,20 @@ describe("C_YUI_GOBJ_TREE_JS, source remote", () => {
|
|
|
253
253
|
expect(problems()).toEqual([]);
|
|
254
254
|
});
|
|
255
255
|
|
|
256
|
+
test("a card says whether its gobj's traces survive a restart: a service's do", async () => {
|
|
257
|
+
const view = await mount("remote", host);
|
|
258
|
+
await open_tcp_card(view);
|
|
259
|
+
gobj_send_event(view, "EV_TRACE_INFO", TCP_INFO, host);
|
|
260
|
+
const note = () => view.priv.$popover.querySelector(".GOBJ_TREE_TRACES_NOTE").getAttribute("data-i18n");
|
|
261
|
+
expect(note()).toBe("the traces of a gobj that is not a service end with the yuno");
|
|
262
|
+
|
|
263
|
+
const tree = JSON.parse(JSON.stringify(TREE));
|
|
264
|
+
tree["C_YUNO^gate"].children["C_TCP^tcp1"].service = true;
|
|
265
|
+
gobj_send_event(view, "EV_LOAD_TREE", {tree: tree}, host);
|
|
266
|
+
expect(note()).toBe("the traces of a service survive a restart");
|
|
267
|
+
expect(problems()).toEqual([]);
|
|
268
|
+
});
|
|
269
|
+
|
|
256
270
|
test("a level the whole yuno traces is locked in a card, said as the yuno's", async () => {
|
|
257
271
|
const view = await mount("remote", host);
|
|
258
272
|
await open_tcp_card(view);
|