@bpmnkit/operate 0.0.9 → 0.0.11
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/css.js +22 -0
- package/dist/views/search.js +53 -7
- package/package.json +4 -4
package/dist/css.js
CHANGED
|
@@ -1293,6 +1293,28 @@ const OPERATE_CSS = `
|
|
|
1293
1293
|
font-family: var(--bpmnkit-font-mono);
|
|
1294
1294
|
padding: 2px 0 6px;
|
|
1295
1295
|
}
|
|
1296
|
+
.op-ai-var-process {
|
|
1297
|
+
display: flex;
|
|
1298
|
+
align-items: center;
|
|
1299
|
+
gap: 6px;
|
|
1300
|
+
min-width: 0;
|
|
1301
|
+
}
|
|
1302
|
+
.op-ai-var-process > span:first-child {
|
|
1303
|
+
overflow: hidden;
|
|
1304
|
+
text-overflow: ellipsis;
|
|
1305
|
+
white-space: nowrap;
|
|
1306
|
+
}
|
|
1307
|
+
.op-ai-var-subprocess-badge {
|
|
1308
|
+
flex-shrink: 0;
|
|
1309
|
+
font-size: 10px;
|
|
1310
|
+
font-weight: 600;
|
|
1311
|
+
text-transform: uppercase;
|
|
1312
|
+
letter-spacing: 0.04em;
|
|
1313
|
+
padding: 1px 5px;
|
|
1314
|
+
border-radius: 3px;
|
|
1315
|
+
background: var(--bpmnkit-accent-subtle);
|
|
1316
|
+
color: var(--bpmnkit-accent);
|
|
1317
|
+
}
|
|
1296
1318
|
`;
|
|
1297
1319
|
export function injectOperateStyles() {
|
|
1298
1320
|
injectStyle(OPERATE_STYLE_ID, OPERATE_CSS);
|
package/dist/views/search.js
CHANGED
|
@@ -26,7 +26,8 @@ function saveTemplates(key, templates) {
|
|
|
26
26
|
function relTime(iso) {
|
|
27
27
|
if (!iso)
|
|
28
28
|
return "—";
|
|
29
|
-
const
|
|
29
|
+
const d = new Date(iso);
|
|
30
|
+
const diff = Date.now() - d.getTime();
|
|
30
31
|
const m = Math.floor(diff / 60_000);
|
|
31
32
|
if (m < 1)
|
|
32
33
|
return "just now";
|
|
@@ -34,8 +35,13 @@ function relTime(iso) {
|
|
|
34
35
|
return `${m}m ago`;
|
|
35
36
|
const h = Math.floor(m / 60);
|
|
36
37
|
if (h < 24)
|
|
37
|
-
return `${h}h ago`;
|
|
38
|
-
return
|
|
38
|
+
return `${h}h ${m % 60}m ago`;
|
|
39
|
+
return d.toLocaleString(undefined, {
|
|
40
|
+
month: "short",
|
|
41
|
+
day: "numeric",
|
|
42
|
+
hour: "2-digit",
|
|
43
|
+
minute: "2-digit",
|
|
44
|
+
});
|
|
39
45
|
}
|
|
40
46
|
const INST_FIELDS = [
|
|
41
47
|
{ id: "state", label: "State", type: "state-select", serverSide: true },
|
|
@@ -428,13 +434,13 @@ export function createSearchView(cfg, onNavigate) {
|
|
|
428
434
|
},
|
|
429
435
|
{
|
|
430
436
|
label: "Started",
|
|
431
|
-
width: "
|
|
437
|
+
width: "120px",
|
|
432
438
|
render: (row) => relTime(row.startDate),
|
|
433
439
|
sortValue: (row) => row.startDate ?? "",
|
|
434
440
|
},
|
|
435
441
|
{
|
|
436
442
|
label: "Ended",
|
|
437
|
-
width: "
|
|
443
|
+
width: "120px",
|
|
438
444
|
render: (row) => relTime(row.endDate),
|
|
439
445
|
sortValue: (row) => row.endDate ?? "",
|
|
440
446
|
},
|
|
@@ -860,7 +866,7 @@ export function createSearchView(cfg, onNavigate) {
|
|
|
860
866
|
},
|
|
861
867
|
{
|
|
862
868
|
label: "Started",
|
|
863
|
-
width: "
|
|
869
|
+
width: "120px",
|
|
864
870
|
render: (row) => relTime(row.startDate),
|
|
865
871
|
sortValue: (row) => row.startDate ?? "",
|
|
866
872
|
},
|
|
@@ -874,6 +880,38 @@ export function createSearchView(cfg, onNavigate) {
|
|
|
874
880
|
aiResultsSection.appendChild(aiInstTableEl);
|
|
875
881
|
const { el: aiVarTableEl, setRows: setAiVarRows } = createFilterTable({
|
|
876
882
|
columns: [
|
|
883
|
+
{
|
|
884
|
+
label: "Process",
|
|
885
|
+
render: (row) => {
|
|
886
|
+
const wrap = document.createElement("span");
|
|
887
|
+
wrap.className = "op-ai-var-process";
|
|
888
|
+
const name = row.instanceProcessName ?? row.instanceProcessId ?? "—";
|
|
889
|
+
const nameEl = document.createElement("span");
|
|
890
|
+
nameEl.textContent = name;
|
|
891
|
+
wrap.appendChild(nameEl);
|
|
892
|
+
if (row.instanceIsSubprocess) {
|
|
893
|
+
const sub = document.createElement("span");
|
|
894
|
+
sub.className = "op-ai-var-subprocess-badge";
|
|
895
|
+
sub.textContent = "sub";
|
|
896
|
+
wrap.appendChild(sub);
|
|
897
|
+
}
|
|
898
|
+
return wrap;
|
|
899
|
+
},
|
|
900
|
+
sortValue: (row) => row.instanceProcessName ?? row.instanceProcessId ?? "",
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
label: "State",
|
|
904
|
+
width: "110px",
|
|
905
|
+
render: (row) => {
|
|
906
|
+
if (!row.instanceState)
|
|
907
|
+
return "—";
|
|
908
|
+
const wrap = document.createElement("div");
|
|
909
|
+
wrap.className = "bpmnkit-badge-wrap";
|
|
910
|
+
wrap.appendChild(badge(row.instanceState));
|
|
911
|
+
return wrap;
|
|
912
|
+
},
|
|
913
|
+
sortValue: (row) => row.instanceState ?? "",
|
|
914
|
+
},
|
|
877
915
|
{
|
|
878
916
|
label: "Name",
|
|
879
917
|
width: "160px",
|
|
@@ -910,8 +948,16 @@ export function createSearchView(cfg, onNavigate) {
|
|
|
910
948
|
},
|
|
911
949
|
sortValue: (row) => row.processInstanceKey,
|
|
912
950
|
},
|
|
951
|
+
{
|
|
952
|
+
label: "Started",
|
|
953
|
+
width: "120px",
|
|
954
|
+
render: (row) => relTime(row.instanceStartDate),
|
|
955
|
+
sortValue: (row) => row.instanceStartDate ?? "",
|
|
956
|
+
},
|
|
913
957
|
],
|
|
914
|
-
searchFn: (row) => [row.name, row.value, row.processInstanceKey
|
|
958
|
+
searchFn: (row) => [row.name, row.value, row.processInstanceKey, row.instanceProcessName, row.instanceProcessId]
|
|
959
|
+
.filter(Boolean)
|
|
960
|
+
.join(" "),
|
|
915
961
|
emptyText: "No variables found",
|
|
916
962
|
});
|
|
917
963
|
aiResultsSection.appendChild(aiVarTableEl);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmnkit/operate",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Monitoring and operations frontend for Camunda 8 clusters — real-time SSE, zero dependencies",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@bpmnkit/api": "0.0.12",
|
|
22
|
-
"@bpmnkit/canvas": "0.0.
|
|
23
|
-
"@bpmnkit/core": "0.0.
|
|
24
|
-
"@bpmnkit/plugins": "0.0.
|
|
22
|
+
"@bpmnkit/canvas": "0.0.13",
|
|
23
|
+
"@bpmnkit/core": "0.0.13",
|
|
24
|
+
"@bpmnkit/plugins": "0.0.14",
|
|
25
25
|
"@bpmnkit/ui": "0.0.8"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|