@industry-theme/principal-view-panels 0.10.14 → 0.10.16
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.
|
@@ -6,6 +6,7 @@ import type { PanelComponentProps } from '@principal-ade/panel-framework-core';
|
|
|
6
6
|
* This panel shows:
|
|
7
7
|
* - Traces tab: List of traces with metadata, search/filter, click to select
|
|
8
8
|
* - Configuration tab: Edit library.yaml resources (service.name, etc.) for OTEL setup
|
|
9
|
+
* - Schematics tab: View workflows/scenarios from version registry
|
|
9
10
|
*
|
|
10
11
|
* Events emitted:
|
|
11
12
|
* - 'trace:selected' when a trace is clicked
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TraceListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TraceListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAY/E
|
|
1
|
+
{"version":3,"file":"TraceListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TraceListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAY/E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA2zBxD,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -100191,6 +100191,9 @@ const TraceListPanel = ({
|
|
|
100191
100191
|
const [activeTab, setActiveTab] = useState("traces");
|
|
100192
100192
|
const telemetrySlice = context.getSlice("telemetry");
|
|
100193
100193
|
const traces = (telemetrySlice == null ? void 0 : telemetrySlice.data) || [];
|
|
100194
|
+
const schematicsSlice = context.getSlice("schematics");
|
|
100195
|
+
const schematics = (schematicsSlice == null ? void 0 : schematicsSlice.data) || [];
|
|
100196
|
+
const schematicsLoading = (schematicsSlice == null ? void 0 : schematicsSlice.loading) || false;
|
|
100194
100197
|
const [resources, setResources] = useState({});
|
|
100195
100198
|
const [configLoading, setConfigLoading] = useState(false);
|
|
100196
100199
|
const [configError, setConfigError] = useState(null);
|
|
@@ -100447,6 +100450,24 @@ const TraceListPanel = ({
|
|
|
100447
100450
|
},
|
|
100448
100451
|
children: "Configuration"
|
|
100449
100452
|
}
|
|
100453
|
+
),
|
|
100454
|
+
/* @__PURE__ */ jsx(
|
|
100455
|
+
"button",
|
|
100456
|
+
{
|
|
100457
|
+
onClick: () => setActiveTab("schematics"),
|
|
100458
|
+
style: {
|
|
100459
|
+
padding: "12px 24px",
|
|
100460
|
+
fontSize: "13px",
|
|
100461
|
+
fontWeight: 500,
|
|
100462
|
+
backgroundColor: activeTab === "schematics" ? theme2.colors.background : "transparent",
|
|
100463
|
+
color: activeTab === "schematics" ? theme2.colors.text : theme2.colors.textSecondary,
|
|
100464
|
+
border: "none",
|
|
100465
|
+
borderBottom: activeTab === "schematics" ? `2px solid #3b82f6` : "2px solid transparent",
|
|
100466
|
+
cursor: "pointer",
|
|
100467
|
+
outline: "none"
|
|
100468
|
+
},
|
|
100469
|
+
children: "Schematics"
|
|
100470
|
+
}
|
|
100450
100471
|
)
|
|
100451
100472
|
]
|
|
100452
100473
|
}
|
|
@@ -100461,7 +100482,7 @@ const TraceListPanel = ({
|
|
|
100461
100482
|
selectedTraceId,
|
|
100462
100483
|
emptyMessage: traces.length === 0 ? "No traces received yet. Waiting for telemetry data..." : void 0
|
|
100463
100484
|
}
|
|
100464
|
-
) }) : /* @__PURE__ */ jsx("div", { style: { flex: 1, padding: "16px", overflow: "auto" }, children: configLoading ? /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%" }, children: /* @__PURE__ */ jsx("div", { style: { fontSize: "14px", color: theme2.colors.textSecondary }, children: "Loading resources..." }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
100485
|
+
) }) : activeTab === "configuration" ? /* @__PURE__ */ jsx("div", { style: { flex: 1, padding: "16px", overflow: "auto" }, children: configLoading ? /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%" }, children: /* @__PURE__ */ jsx("div", { style: { fontSize: "14px", color: theme2.colors.textSecondary }, children: "Loading resources..." }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
100465
100486
|
/* @__PURE__ */ jsxs("div", { style: { marginBottom: "16px" }, children: [
|
|
100466
100487
|
/* @__PURE__ */ jsx("h2", { style: { margin: "0 0 8px 0", fontSize: "18px", fontWeight: 600 }, children: "Library Resources" }),
|
|
100467
100488
|
/* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: "13px", color: theme2.colors.textSecondary }, children: "Configure OpenTelemetry and other resources in library.yaml" })
|
|
@@ -100787,7 +100808,74 @@ const TraceListPanel = ({
|
|
|
100787
100808
|
}
|
|
100788
100809
|
)
|
|
100789
100810
|
] })
|
|
100790
|
-
] }) })
|
|
100811
|
+
] }) }) : activeTab === "schematics" ? /* @__PURE__ */ jsx("div", { style: { flex: 1, padding: "16px", overflow: "auto" }, children: schematicsLoading ? /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%" }, children: /* @__PURE__ */ jsx("div", { style: { fontSize: "14px", color: theme2.colors.textSecondary }, children: "Loading schematics..." }) }) : schematics.length === 0 ? /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", height: "100%", gap: "12px" }, children: [
|
|
100812
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: "14px", color: theme2.colors.textSecondary }, children: "No schematics found" }),
|
|
100813
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: "12px", color: theme2.colors.textMuted, textAlign: "center", maxWidth: "400px" }, children: "Schematics are fetched from traces with version information (repositoryUrl + commitSha). Make sure traces have version attributes and schematics are registered in the version registry." })
|
|
100814
|
+
] }) : /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: schematics.map((schematic, index2) => {
|
|
100815
|
+
var _a;
|
|
100816
|
+
return /* @__PURE__ */ jsxs(
|
|
100817
|
+
"div",
|
|
100818
|
+
{
|
|
100819
|
+
style: {
|
|
100820
|
+
padding: "16px",
|
|
100821
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
100822
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
100823
|
+
borderRadius: "4px"
|
|
100824
|
+
},
|
|
100825
|
+
children: [
|
|
100826
|
+
/* @__PURE__ */ jsxs("div", { style: { marginBottom: "12px" }, children: [
|
|
100827
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: "15px", fontWeight: 600, marginBottom: "4px" }, children: (_a = schematic.repositoryUrl) == null ? void 0 : _a.replace("https://github.com/", "") }),
|
|
100828
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: "12px", color: theme2.colors.textMuted, fontFamily: theme2.fonts.monospace }, children: schematic.commitSha })
|
|
100829
|
+
] }),
|
|
100830
|
+
(() => {
|
|
100831
|
+
var _a2;
|
|
100832
|
+
const allWorkflows = ((_a2 = schematic.storyboards) == null ? void 0 : _a2.flatMap(
|
|
100833
|
+
(storyboard) => storyboard.workflows || []
|
|
100834
|
+
)) || [];
|
|
100835
|
+
return allWorkflows.length > 0 ? /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: allWorkflows.map((workflow, wIndex) => {
|
|
100836
|
+
var _a3;
|
|
100837
|
+
const scenarios = workflow.scenarios || ((_a3 = workflow.content) == null ? void 0 : _a3.scenarios) || [];
|
|
100838
|
+
return /* @__PURE__ */ jsxs(
|
|
100839
|
+
"div",
|
|
100840
|
+
{
|
|
100841
|
+
style: {
|
|
100842
|
+
padding: "12px",
|
|
100843
|
+
backgroundColor: theme2.colors.background,
|
|
100844
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
100845
|
+
borderRadius: "3px"
|
|
100846
|
+
},
|
|
100847
|
+
children: [
|
|
100848
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: "14px", fontWeight: 500, marginBottom: "8px" }, children: workflow.name || "Unnamed Workflow" }),
|
|
100849
|
+
scenarios.length > 0 && /* @__PURE__ */ jsxs("div", { style: { fontSize: "12px", color: theme2.colors.textSecondary }, children: [
|
|
100850
|
+
/* @__PURE__ */ jsxs("div", { style: { fontWeight: 500, marginBottom: "4px" }, children: [
|
|
100851
|
+
"Scenarios (",
|
|
100852
|
+
scenarios.length,
|
|
100853
|
+
"):"
|
|
100854
|
+
] }),
|
|
100855
|
+
/* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: "20px" }, children: scenarios.map((scenario, sIndex) => {
|
|
100856
|
+
var _a4, _b;
|
|
100857
|
+
return /* @__PURE__ */ jsxs("li", { style: { marginBottom: "4px" }, children: [
|
|
100858
|
+
/* @__PURE__ */ jsx("span", { style: { fontWeight: 500 }, children: scenario.id }),
|
|
100859
|
+
((_a4 = scenario.condition) == null ? void 0 : _a4.requires) && scenario.condition.requires.length > 0 && /* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.textMuted }, children: [
|
|
100860
|
+
" ",
|
|
100861
|
+
"- requires: ",
|
|
100862
|
+
scenario.condition.requires.join(", ")
|
|
100863
|
+
] }),
|
|
100864
|
+
((_b = scenario.condition) == null ? void 0 : _b.default) && /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textMuted }, children: " - default fallback" })
|
|
100865
|
+
] }, sIndex);
|
|
100866
|
+
}) })
|
|
100867
|
+
] })
|
|
100868
|
+
]
|
|
100869
|
+
},
|
|
100870
|
+
wIndex
|
|
100871
|
+
);
|
|
100872
|
+
}) }) : /* @__PURE__ */ jsx("div", { style: { fontSize: "12px", color: theme2.colors.textMuted }, children: "No workflows found" });
|
|
100873
|
+
})()
|
|
100874
|
+
]
|
|
100875
|
+
},
|
|
100876
|
+
index2
|
|
100877
|
+
);
|
|
100878
|
+
}) }) }) : null
|
|
100791
100879
|
]
|
|
100792
100880
|
}
|
|
100793
100881
|
);
|