@yuneta/gobj-ui 7.29.3 → 7.29.5
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
CHANGED
|
@@ -3400,10 +3400,10 @@ import {open_gobj_tree_view, close_gobj_tree_view}
|
|
|
3400
3400
|
from "@yuneta/gobj-ui/src/yui_gobj_tree_view.js";
|
|
3401
3401
|
|
|
3402
3402
|
priv.view = open_gobj_tree_view(gobj, {
|
|
3403
|
-
name: "
|
|
3403
|
+
name: "gate_probe-7701", /* names the window, the tree and its saved arrangement */
|
|
3404
3404
|
source: "remote",
|
|
3405
|
-
yuno_name: "
|
|
3406
|
-
title_prefix: "
|
|
3405
|
+
yuno_name: "gate_probe^7701", /* before the gclass in the gclass window's title */
|
|
3406
|
+
title_prefix: "gate_probe^7701",
|
|
3407
3407
|
title: "gobj tree", /* an i18n KEY */
|
|
3408
3408
|
$header: priv.$status,
|
|
3409
3409
|
on_close: () => gobj_send_event(gobj, "EV_VIEW_CLOSED", {}, gobj),
|
|
@@ -4451,7 +4451,7 @@ export default { plugins: [ yunetaHtmlPlugin({ defaultTitle: "My App" }) ] };
|
|
|
4451
4451
|
"metadata": {"description": "What the app does"},
|
|
4452
4452
|
"csp_connect_src": [
|
|
4453
4453
|
"_comment: the backend this SPA talks to",
|
|
4454
|
-
"wss://my.host:
|
|
4454
|
+
"wss://my.host:7301",
|
|
4455
4455
|
"https://auth.my.host"
|
|
4456
4456
|
]
|
|
4457
4457
|
}
|
package/package.json
CHANGED
package/src/c_yui_node.js
CHANGED
|
@@ -605,7 +605,7 @@ function walk_path(node, path)
|
|
|
605
605
|
* its zone navs are appended into shell zones, outside this
|
|
606
606
|
* node's own $container. Neither pass reaches them, so without
|
|
607
607
|
* this every strip renders its raw i18n key: `treedb`,
|
|
608
|
-
* `
|
|
608
|
+
* `main database`, `data` in lower-case English next to a
|
|
609
609
|
* translated menu — which reads as a MISSING key and sent more
|
|
610
610
|
* than one person looking for the wrong bug.
|
|
611
611
|
*
|
|
@@ -222,9 +222,9 @@ test("normalize_spec accepts its own output (every level re-normalizes)", () =>
|
|
|
222
222
|
***************************************************************/
|
|
223
223
|
test("aliases carry the former ids of a node", () => {
|
|
224
224
|
let errors = [];
|
|
225
|
-
let spec = normalize_spec({id: "north", aliases: ["
|
|
225
|
+
let spec = normalize_spec({id: "north", aliases: ["building1", "b1"]}, errors, "/");
|
|
226
226
|
expect(errors).toEqual([]);
|
|
227
|
-
expect(spec.aliases).toEqual(["
|
|
227
|
+
expect(spec.aliases).toEqual(["building1", "b1"]);
|
|
228
228
|
expect(normalize_spec({id: "x"}, errors, "/").aliases).toEqual([]);
|
|
229
229
|
});
|
|
230
230
|
|
|
@@ -234,7 +234,7 @@ test("an alias is one url segment, like an id", () => {
|
|
|
234
234
|
expect(errors[0]).toMatch(/is not a valid id/);
|
|
235
235
|
|
|
236
236
|
errors = [];
|
|
237
|
-
expect(normalize_spec({id: "x", aliases: "
|
|
237
|
+
expect(normalize_spec({id: "x", aliases: "building1"}, errors, "/")).toBe(null);
|
|
238
238
|
expect(errors[0]).toMatch(/'aliases' must be an array/);
|
|
239
239
|
});
|
|
240
240
|
|
|
@@ -45,9 +45,9 @@ describe("vite-plugin-yuneta-html", () => {
|
|
|
45
45
|
test("a declared csp_connect_src goes into connect-src, comments left out", () => {
|
|
46
46
|
const html = transform({
|
|
47
47
|
title: "App",
|
|
48
|
-
csp_connect_src: ["wss://host:
|
|
48
|
+
csp_connect_src: ["wss://host:7301", "_comment: why", "https://tiles.example"]
|
|
49
49
|
});
|
|
50
|
-
expect(connect_src(html)).toEqual(["'self'", "wss://host:
|
|
50
|
+
expect(connect_src(html)).toEqual(["'self'", "wss://host:7301", "https://tiles.example"]);
|
|
51
51
|
expect(html).toContain("<title>App</title>");
|
|
52
52
|
});
|
|
53
53
|
|
|
@@ -73,10 +73,10 @@ describe("vite-plugin-yuneta-html", () => {
|
|
|
73
73
|
title: "App",
|
|
74
74
|
csp_connect_src: [
|
|
75
75
|
"wss://a:1; base-uri *", "wss://b, wss://c", "wss://d wss://e",
|
|
76
|
-
"wss://ok:
|
|
76
|
+
"wss://ok:7301"
|
|
77
77
|
]
|
|
78
78
|
});
|
|
79
|
-
expect(connect_src(html)).toEqual(["'self'", "wss://ok:
|
|
79
|
+
expect(connect_src(html)).toEqual(["'self'", "wss://ok:7301"]);
|
|
80
80
|
expect(html).not.toContain("base-uri");
|
|
81
81
|
expect(err).toHaveBeenCalledTimes(3);
|
|
82
82
|
err.mockRestore();
|
package/src/yui_dev_copy.test.js
CHANGED
|
@@ -38,12 +38,12 @@ describe("entry_shown_lines", () => {
|
|
|
38
38
|
it("copies a closed branch as its one-line summary", () => {
|
|
39
39
|
const $e = painted({
|
|
40
40
|
result: 0,
|
|
41
|
-
comment: "db_history^
|
|
41
|
+
comment: "db_history^7301: 500 nodes",
|
|
42
42
|
data: {places: [1, 2, 3], families: [4], devices: [5, 6]},
|
|
43
43
|
});
|
|
44
44
|
expect(entry_shown_lines($e)).toEqual([
|
|
45
45
|
" • result: 0",
|
|
46
|
-
" • comment: db_history^
|
|
46
|
+
" • comment: db_history^7301: 500 nodes",
|
|
47
47
|
" ▸ data {places:[…],families:[…],devices:[…]}",
|
|
48
48
|
]);
|
|
49
49
|
});
|
|
@@ -66,7 +66,7 @@ describe("render_name (the line view)", () => {
|
|
|
66
66
|
const $e = render_name({
|
|
67
67
|
kind: "traffic", dir: "in", event: "EV_YUNO_STATS", command: "",
|
|
68
68
|
title: "gui_agent_yuno <== wss://cc:1996", ts: "09:19:03.421", size: 1024,
|
|
69
|
-
kw: {result: 0, data: {yuno_id: "
|
|
69
|
+
kw: {result: 0, data: {yuno_id: "7701", kind: "cpu"}},
|
|
70
70
|
});
|
|
71
71
|
expect($e.classList.contains("TRAFFIC_NAME")).toBe(true);
|
|
72
72
|
expect($e.querySelector(".TRAFFIC_EVENT").textContent).toBe("EV_YUNO_STATS");
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* is only its frame.
|
|
13
13
|
*
|
|
14
14
|
* let handle = open_gobj_tree_view(gobj, {
|
|
15
|
-
* name: "
|
|
15
|
+
* name: "gate_probe-7701",
|
|
16
16
|
* source: "remote",
|
|
17
|
-
* yuno_name: "
|
|
18
|
-
* title_prefix: "
|
|
17
|
+
* yuno_name: "gate_probe^7701",
|
|
18
|
+
* title_prefix: "gate_probe^7701",
|
|
19
19
|
* title: "gobj tree", // an i18n KEY
|
|
20
20
|
* $header: $status, // optional
|
|
21
21
|
* on_close: () => gobj_send_event(gobj, "EV_VIEW_CLOSED", {}, gobj),
|
|
@@ -36,8 +36,8 @@ describe("yui_tab_split_subpath", () => {
|
|
|
36
36
|
test("a composite id survives the url it travelled in", () => {
|
|
37
37
|
/* 0x1F joins the two halves of these ids and reaches the url
|
|
38
38
|
* percent-encoded. */
|
|
39
|
-
expect(yui_tab_split_subpath("node-a%
|
|
40
|
-
.toEqual({id: "node-a" + US + "
|
|
39
|
+
expect(yui_tab_split_subpath("node-a%1F7302/treedb_authzs/__graphs__"))
|
|
40
|
+
.toEqual({id: "node-a" + US + "7302",
|
|
41
41
|
tail: "treedb_authzs/__graphs__"});
|
|
42
42
|
});
|
|
43
43
|
|