@localstack/appinspector-ui 1.0.113 → 1.0.115
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/index.cjs +758 -666
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +708 -616
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2417,7 +2417,7 @@ __export(index_exports, {
|
|
|
2417
2417
|
module.exports = __toCommonJS(index_exports);
|
|
2418
2418
|
|
|
2419
2419
|
// src/pages/spans-list-page.tsx
|
|
2420
|
-
var
|
|
2420
|
+
var import_material24 = require("@mui/material");
|
|
2421
2421
|
var import_react69 = require("react");
|
|
2422
2422
|
|
|
2423
2423
|
// src/api/errors.ts
|
|
@@ -2576,11 +2576,11 @@ var EmulatorVersionBanner = ({
|
|
|
2576
2576
|
};
|
|
2577
2577
|
|
|
2578
2578
|
// src/components/spans-list/spans-list.tsx
|
|
2579
|
-
var
|
|
2579
|
+
var import_material8 = require("@mui/material");
|
|
2580
2580
|
|
|
2581
2581
|
// src/components/spans-list/spans-data-grid.tsx
|
|
2582
|
-
var
|
|
2583
|
-
var
|
|
2582
|
+
var import_icons_material3 = require("@mui/icons-material");
|
|
2583
|
+
var import_material7 = require("@mui/material");
|
|
2584
2584
|
|
|
2585
2585
|
// node_modules/@tanstack/react-table/build/lib/index.mjs
|
|
2586
2586
|
var React = __toESM(require("react"), 1);
|
|
@@ -14868,11 +14868,182 @@ var ServiceCell = (0, import_react40.memo)(({
|
|
|
14868
14868
|
});
|
|
14869
14869
|
ServiceCell.displayName = "ServiceCell";
|
|
14870
14870
|
|
|
14871
|
-
// src/components/
|
|
14871
|
+
// src/components/cells/status-cell.tsx
|
|
14872
14872
|
var import_icons_material = require("@mui/icons-material");
|
|
14873
14873
|
var import_material5 = require("@mui/material");
|
|
14874
|
-
|
|
14874
|
+
|
|
14875
|
+
// src/types/error-levels.ts
|
|
14876
|
+
var ErrorLevel = {
|
|
14877
|
+
ERROR: 3,
|
|
14878
|
+
// General error
|
|
14879
|
+
IAM_PERMISSION: 5,
|
|
14880
|
+
// IAM permission issues
|
|
14881
|
+
OK: 2,
|
|
14882
|
+
// OK
|
|
14883
|
+
// Standard OTEL status codes
|
|
14884
|
+
UNSET: 1,
|
|
14885
|
+
// Unset
|
|
14886
|
+
// Extended custom levels
|
|
14887
|
+
WARNING: 4
|
|
14888
|
+
// Warning
|
|
14889
|
+
};
|
|
14890
|
+
|
|
14891
|
+
// src/utils/iam-utils.ts
|
|
14892
|
+
function determinePermissionStatus(payload) {
|
|
14893
|
+
if (payload.explicit_deny_count && payload.explicit_deny_count > 0) {
|
|
14894
|
+
return "explicitly_denied";
|
|
14895
|
+
}
|
|
14896
|
+
if (payload.is_allowed && payload.explicit_allow_count && payload.explicit_allow_count > 0) {
|
|
14897
|
+
return "explicitly_allowed";
|
|
14898
|
+
}
|
|
14899
|
+
if (payload.is_allowed) {
|
|
14900
|
+
return "implicitly_allowed";
|
|
14901
|
+
}
|
|
14902
|
+
return "implicitly_denied";
|
|
14903
|
+
}
|
|
14904
|
+
function formatPermissionStatus(status) {
|
|
14905
|
+
switch (status) {
|
|
14906
|
+
case "explicitly_allowed": {
|
|
14907
|
+
return "Explicitly Allowed";
|
|
14908
|
+
}
|
|
14909
|
+
case "explicitly_denied": {
|
|
14910
|
+
return "Explicitly Denied";
|
|
14911
|
+
}
|
|
14912
|
+
case "implicitly_allowed": {
|
|
14913
|
+
return "Implicitly Allowed";
|
|
14914
|
+
}
|
|
14915
|
+
case "implicitly_denied": {
|
|
14916
|
+
return "Implicitly Denied";
|
|
14917
|
+
}
|
|
14918
|
+
}
|
|
14919
|
+
}
|
|
14920
|
+
function getPermissionStatusColor(status) {
|
|
14921
|
+
switch (status) {
|
|
14922
|
+
case "explicitly_allowed":
|
|
14923
|
+
case "implicitly_allowed": {
|
|
14924
|
+
return "success.main";
|
|
14925
|
+
}
|
|
14926
|
+
case "explicitly_denied": {
|
|
14927
|
+
return "error.main";
|
|
14928
|
+
}
|
|
14929
|
+
case "implicitly_denied": {
|
|
14930
|
+
return "warning.main";
|
|
14931
|
+
}
|
|
14932
|
+
}
|
|
14933
|
+
}
|
|
14934
|
+
function parseIAMEvent(payloadString) {
|
|
14935
|
+
try {
|
|
14936
|
+
const payload = JSON.parse(payloadString);
|
|
14937
|
+
const permission = determinePermissionStatus(payload);
|
|
14938
|
+
const actions = [];
|
|
14939
|
+
const resources = [];
|
|
14940
|
+
if (payload.explicit_allows) {
|
|
14941
|
+
for (const allow of payload.explicit_allows) {
|
|
14942
|
+
if (!actions.includes(allow.action)) actions.push(allow.action);
|
|
14943
|
+
if (!resources.includes(allow.resource)) resources.push(allow.resource);
|
|
14944
|
+
}
|
|
14945
|
+
}
|
|
14946
|
+
if (payload.explicit_denies) {
|
|
14947
|
+
for (const deny of payload.explicit_denies) {
|
|
14948
|
+
if (!actions.includes(deny.action)) actions.push(deny.action);
|
|
14949
|
+
if (!resources.includes(deny.resource)) resources.push(deny.resource);
|
|
14950
|
+
}
|
|
14951
|
+
}
|
|
14952
|
+
if (payload.implicit_denies) {
|
|
14953
|
+
for (const deny of payload.implicit_denies) {
|
|
14954
|
+
if (!actions.includes(deny.action)) actions.push(deny.action);
|
|
14955
|
+
if (!resources.includes(deny.resource)) resources.push(deny.resource);
|
|
14956
|
+
}
|
|
14957
|
+
}
|
|
14958
|
+
return {
|
|
14959
|
+
details: {
|
|
14960
|
+
actions,
|
|
14961
|
+
explicitAllows: payload.explicit_allow_count,
|
|
14962
|
+
explicitDenies: payload.explicit_deny_count,
|
|
14963
|
+
implicitDenies: payload.implicit_deny_count,
|
|
14964
|
+
resources
|
|
14965
|
+
},
|
|
14966
|
+
operation: payload.operation,
|
|
14967
|
+
permission,
|
|
14968
|
+
principal: payload.principal_arn,
|
|
14969
|
+
service: payload.service
|
|
14970
|
+
};
|
|
14971
|
+
} catch (error) {
|
|
14972
|
+
console.error("Error parsing IAM event payload:", error);
|
|
14973
|
+
return void 0;
|
|
14974
|
+
}
|
|
14975
|
+
}
|
|
14976
|
+
|
|
14977
|
+
// src/components/cells/status-cell.tsx
|
|
14875
14978
|
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
14979
|
+
var StatusIcon = ({ errorLevel, spanStatusCode }) => {
|
|
14980
|
+
switch (errorLevel) {
|
|
14981
|
+
case ErrorLevel.ERROR: {
|
|
14982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material.Cancel, { sx: { color: "red" } });
|
|
14983
|
+
}
|
|
14984
|
+
case ErrorLevel.IAM_PERMISSION: {
|
|
14985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material.GppBad, { sx: { color: spanStatusCode === 2 ? "red" : "warning.main" } });
|
|
14986
|
+
}
|
|
14987
|
+
case ErrorLevel.WARNING: {
|
|
14988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material.Error, { sx: { color: "orange" } });
|
|
14989
|
+
}
|
|
14990
|
+
default: {
|
|
14991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_jsx_runtime126.Fragment, {});
|
|
14992
|
+
}
|
|
14993
|
+
}
|
|
14994
|
+
};
|
|
14995
|
+
var calculateHighestErrorLevel = (span) => {
|
|
14996
|
+
const hasIamDenial = span.events.some((event) => {
|
|
14997
|
+
if (!event.event_type?.toLowerCase().includes("iam")) return false;
|
|
14998
|
+
if (typeof event.attributes?.payload !== "string") return false;
|
|
14999
|
+
const parsed = parseIAMEvent(event.attributes.payload);
|
|
15000
|
+
return parsed?.permission === "explicitly_denied" || parsed?.permission === "implicitly_denied";
|
|
15001
|
+
});
|
|
15002
|
+
if (hasIamDenial) return ErrorLevel.IAM_PERMISSION;
|
|
15003
|
+
if (span.status_code === 2) return ErrorLevel.ERROR;
|
|
15004
|
+
const hasErrorInErrors = span.errors?.some((error) => error.level === "error");
|
|
15005
|
+
if (hasErrorInErrors) return ErrorLevel.ERROR;
|
|
15006
|
+
const hasWarning = span.errors?.some((error) => error.level === "warning");
|
|
15007
|
+
if (hasWarning) return ErrorLevel.WARNING;
|
|
15008
|
+
return span.status_code || ErrorLevel.UNSET;
|
|
15009
|
+
};
|
|
15010
|
+
var SPAN_STATUS_LABELS = {
|
|
15011
|
+
0: "Unset",
|
|
15012
|
+
1: "OK",
|
|
15013
|
+
2: "Error"
|
|
15014
|
+
};
|
|
15015
|
+
var buildTooltipContent = (span) => {
|
|
15016
|
+
const messages = [];
|
|
15017
|
+
if (span.status_message) messages.push(span.status_message);
|
|
15018
|
+
for (const error of span.errors ?? []) {
|
|
15019
|
+
if (error.message) messages.push(error.message);
|
|
15020
|
+
}
|
|
15021
|
+
const spanStatusLabel = SPAN_STATUS_LABELS[span.status_code] ?? `Unknown (${span.status_code.toString()})`;
|
|
15022
|
+
const iamDenials = span.events.filter((event) => event.event_type?.toLowerCase().includes("iam") && typeof event.attributes?.payload === "string").map((event) => parseIAMEvent(event.attributes.payload)).filter((parsed) => parsed?.permission === "explicitly_denied" || parsed?.permission === "implicitly_denied").filter(Boolean);
|
|
15023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { children: [
|
|
15024
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Typography, { color: "inherit", display: "block", fontWeight: "bold", variant: "caption", children: [
|
|
15025
|
+
"Status: ",
|
|
15026
|
+
spanStatusLabel
|
|
15027
|
+
] }),
|
|
15028
|
+
messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "inherit", display: "block", variant: "caption", children: message }, index)),
|
|
15029
|
+
iamDenials.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
|
|
15030
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Divider, { sx: { borderColor: "rgba(255,255,255,0.2)", my: 0.5 } }),
|
|
15031
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "inherit", display: "block", fontWeight: "bold", variant: "caption", children: "Permissions" }),
|
|
15032
|
+
iamDenials.map((denial, index) => denial !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { color: "inherit", display: "block", variant: "caption", children: `${formatPermissionStatus(denial.permission)}: ${denial.service}.${denial.operation}` }, index))
|
|
15033
|
+
] })
|
|
15034
|
+
] });
|
|
15035
|
+
};
|
|
15036
|
+
var StatusIconWithTooltip = ({ span }) => {
|
|
15037
|
+
const errorLevel = calculateHighestErrorLevel(span);
|
|
15038
|
+
if (errorLevel !== ErrorLevel.ERROR && errorLevel !== ErrorLevel.IAM_PERMISSION) return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_jsx_runtime126.Fragment, {});
|
|
15039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Tooltip, { title: buildTooltipContent(span), children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { sx: { alignItems: "center", cursor: "default", display: "flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(StatusIcon, { errorLevel, spanStatusCode: span.status_code }) }) });
|
|
15040
|
+
};
|
|
15041
|
+
|
|
15042
|
+
// src/components/spans-list/span-count-badge.tsx
|
|
15043
|
+
var import_icons_material2 = require("@mui/icons-material");
|
|
15044
|
+
var import_material6 = require("@mui/material");
|
|
15045
|
+
var import_react41 = require("react");
|
|
15046
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
14876
15047
|
var resolveBindingLimit = (systemLimit, licenseLimit) => {
|
|
14877
15048
|
const numericLimits = [systemLimit, licenseLimit].filter((l2) => typeof l2 === "number");
|
|
14878
15049
|
if (numericLimits.length > 0) return Math.min(...numericLimits);
|
|
@@ -14885,29 +15056,29 @@ var fmtLimit = (value) => {
|
|
|
14885
15056
|
if (value === "unlimited") return "Unlimited";
|
|
14886
15057
|
return fmt(value);
|
|
14887
15058
|
};
|
|
14888
|
-
var StatRow = ({ label, value }) => /* @__PURE__ */ (0,
|
|
14889
|
-
/* @__PURE__ */ (0,
|
|
14890
|
-
/* @__PURE__ */ (0,
|
|
15059
|
+
var StatRow = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material6.Box, { sx: { alignItems: "baseline", display: "flex", justifyContent: "space-between", minWidth: 220 }, children: [
|
|
15060
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { color: "text.secondary", sx: { mr: 4 }, variant: "caption", children: label }),
|
|
15061
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { fontWeight: 600, variant: "body2", children: fmtLimit(value) })
|
|
14891
15062
|
] });
|
|
14892
15063
|
var SpanCountBadge = ({ licenseLimit, systemLimit, totalCount, visibleCount }) => {
|
|
14893
15064
|
const [anchorElement, setAnchorElement] = (0, import_react41.useState)();
|
|
14894
15065
|
const bindingLimit = resolveBindingLimit(systemLimit, licenseLimit);
|
|
14895
15066
|
if (totalCount === void 0 && bindingLimit === void 0) {
|
|
14896
|
-
return /* @__PURE__ */ (0,
|
|
15067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_jsx_runtime127.Fragment, {});
|
|
14897
15068
|
}
|
|
14898
15069
|
if (visibleCount !== void 0) totalCount = Math.max(totalCount ?? 0, visibleCount);
|
|
14899
15070
|
const isLoading = totalCount === void 0;
|
|
14900
15071
|
const isOpen = anchorElement !== void 0;
|
|
14901
15072
|
const systemLimitReached = typeof systemLimit === "number" && totalCount !== void 0 && totalCount >= systemLimit;
|
|
14902
15073
|
const licenseLimitReached = typeof licenseLimit === "number" && totalCount !== void 0 && totalCount >= licenseLimit;
|
|
14903
|
-
return /* @__PURE__ */ (0,
|
|
14904
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
14905
|
-
/* @__PURE__ */ (0,
|
|
14906
|
-
/* @__PURE__ */ (0,
|
|
14907
|
-
/* @__PURE__ */ (0,
|
|
15074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material6.Box, { sx: { alignItems: "center", display: "flex", gap: 0.25 }, children: [
|
|
15075
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Skeleton, { sx: { minWidth: 120 } }) : /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material6.Box, { sx: { alignItems: "baseline", display: "flex", gap: 0.5 }, children: [
|
|
15076
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { color: "text.secondary", variant: "caption", children: "Showing" }),
|
|
15077
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { variant: "body2", children: visibleCount === void 0 ? "\u2014" : fmt(visibleCount) }),
|
|
15078
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { color: "text.secondary", variant: "caption", children: `of ${totalCount === void 0 ? "-" : fmt(totalCount)} operations` })
|
|
14908
15079
|
] }),
|
|
14909
|
-
/* @__PURE__ */ (0,
|
|
14910
|
-
|
|
15080
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Tooltip, { title: "Operation count details", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15081
|
+
import_material6.IconButton,
|
|
14911
15082
|
{
|
|
14912
15083
|
"aria-describedby": isOpen ? "operation-count-popover" : void 0,
|
|
14913
15084
|
onClick: (event) => {
|
|
@@ -14915,11 +15086,11 @@ var SpanCountBadge = ({ licenseLimit, systemLimit, totalCount, visibleCount }) =
|
|
|
14915
15086
|
},
|
|
14916
15087
|
size: "small",
|
|
14917
15088
|
sx: { color: systemLimitReached || licenseLimitReached ? "warning.main" : "text.disabled" },
|
|
14918
|
-
children: systemLimitReached || licenseLimitReached ? /* @__PURE__ */ (0,
|
|
15089
|
+
children: systemLimitReached || licenseLimitReached ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons_material2.WarningAmberOutlined, { sx: { fontSize: 14 } }) : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons_material2.InfoOutlined, { sx: { fontSize: 14 } })
|
|
14919
15090
|
}
|
|
14920
15091
|
) }),
|
|
14921
|
-
/* @__PURE__ */ (0,
|
|
14922
|
-
|
|
15092
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15093
|
+
import_material6.Popover,
|
|
14923
15094
|
{
|
|
14924
15095
|
anchorEl: anchorElement,
|
|
14925
15096
|
anchorOrigin: { horizontal: "right", vertical: "bottom" },
|
|
@@ -14929,55 +15100,55 @@ var SpanCountBadge = ({ licenseLimit, systemLimit, totalCount, visibleCount }) =
|
|
|
14929
15100
|
},
|
|
14930
15101
|
open: isOpen,
|
|
14931
15102
|
transformOrigin: { horizontal: "right", vertical: "top" },
|
|
14932
|
-
children: /* @__PURE__ */ (0,
|
|
14933
|
-
/* @__PURE__ */ (0,
|
|
14934
|
-
/* @__PURE__ */ (0,
|
|
14935
|
-
/* @__PURE__ */ (0,
|
|
14936
|
-
/* @__PURE__ */ (0,
|
|
15103
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material6.Box, { sx: { minWidth: 240, p: 2 }, children: [
|
|
15104
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { fontWeight: 700, variant: "body2", children: "Storage" }),
|
|
15105
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { color: "text.secondary", sx: { mt: 0.25 }, variant: "caption", children: "How many operations are currently stored." }),
|
|
15106
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material6.Box, { sx: { display: "flex", flexDirection: "column", gap: 0.75, mt: 1.5 }, children: [
|
|
15107
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
14937
15108
|
StatRow,
|
|
14938
15109
|
{
|
|
14939
|
-
label: /* @__PURE__ */ (0,
|
|
15110
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Tooltip, { placement: "left", title: "The number of operations currently loaded in the UI.", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Box, { component: "span", sx: { borderBottom: "1px dashed", borderColor: "text.secondary", cursor: "help" }, children: "Currently visible" }) }),
|
|
14940
15111
|
value: visibleCount
|
|
14941
15112
|
}
|
|
14942
15113
|
),
|
|
14943
|
-
/* @__PURE__ */ (0,
|
|
15114
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
14944
15115
|
StatRow,
|
|
14945
15116
|
{
|
|
14946
|
-
label: /* @__PURE__ */ (0,
|
|
15117
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Tooltip, { placement: "left", title: "The total number of operations stored on the server.", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Box, { component: "span", sx: { borderBottom: "1px dashed", borderColor: "text.secondary", cursor: "help" }, children: "Total stored" }) }),
|
|
14947
15118
|
value: totalCount
|
|
14948
15119
|
}
|
|
14949
15120
|
)
|
|
14950
15121
|
] }),
|
|
14951
|
-
(systemLimit !== void 0 || licenseLimit !== void 0) && /* @__PURE__ */ (0,
|
|
14952
|
-
/* @__PURE__ */ (0,
|
|
14953
|
-
/* @__PURE__ */ (0,
|
|
14954
|
-
/* @__PURE__ */ (0,
|
|
14955
|
-
/* @__PURE__ */ (0,
|
|
14956
|
-
licenseLimit !== void 0 && /* @__PURE__ */ (0,
|
|
15122
|
+
(systemLimit !== void 0 || licenseLimit !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
|
|
15123
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Divider, { sx: { my: 1.5 } }),
|
|
15124
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { color: "text.secondary", fontWeight: 600, variant: "caption", children: "Limits" }),
|
|
15125
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { color: "text.secondary", sx: { display: "block", mb: 1.5, mt: 0.25 }, variant: "caption", children: "Limits restrict the total number of operations that can be stored." }),
|
|
15126
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material6.Box, { sx: { display: "flex", flexDirection: "column", gap: 0.75 }, children: [
|
|
15127
|
+
licenseLimit !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
14957
15128
|
StatRow,
|
|
14958
15129
|
{
|
|
14959
|
-
label: /* @__PURE__ */ (0,
|
|
15130
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Tooltip, { placement: "left", title: "The maximum number of operations allowed by your current license.", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Box, { component: "span", sx: { borderBottom: "1px dashed", borderColor: "text.secondary", cursor: "help" }, children: "License limit" }) }),
|
|
14960
15131
|
value: licenseLimit
|
|
14961
15132
|
}
|
|
14962
15133
|
),
|
|
14963
|
-
systemLimit !== void 0 && /* @__PURE__ */ (0,
|
|
15134
|
+
systemLimit !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
14964
15135
|
StatRow,
|
|
14965
15136
|
{
|
|
14966
|
-
label: /* @__PURE__ */ (0,
|
|
15137
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Tooltip, { placement: "left", title: "The maximum number of operations that can be stored in the system.", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Box, { component: "span", sx: { borderBottom: "1px dashed", borderColor: "text.secondary", cursor: "help" }, children: "System limit" }) }),
|
|
14967
15138
|
value: systemLimit
|
|
14968
15139
|
}
|
|
14969
15140
|
)
|
|
14970
15141
|
] })
|
|
14971
15142
|
] }),
|
|
14972
|
-
(systemLimitReached || licenseLimitReached) && /* @__PURE__ */ (0,
|
|
14973
|
-
licenseLimitReached && /* @__PURE__ */ (0,
|
|
14974
|
-
/* @__PURE__ */ (0,
|
|
14975
|
-
/* @__PURE__ */ (0,
|
|
14976
|
-
/* @__PURE__ */ (0,
|
|
15143
|
+
(systemLimitReached || licenseLimitReached) && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material6.Box, { sx: { display: "flex", flexDirection: "column", gap: 1, mt: 1.5 }, children: [
|
|
15144
|
+
licenseLimitReached && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material6.Box, { sx: { backgroundColor: "warning.main", borderRadius: 1, p: 1.5 }, children: [
|
|
15145
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material6.Box, { sx: { alignItems: "flex-start", display: "flex", gap: 0.75, mb: 0.75 }, children: [
|
|
15146
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons_material2.WarningAmberOutlined, { sx: { color: "warning.contrastText", fontSize: 14, mt: "1px" } }),
|
|
15147
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { color: "warning.contrastText", fontWeight: 600, variant: "caption", children: "License limit reached" })
|
|
14977
15148
|
] }),
|
|
14978
|
-
/* @__PURE__ */ (0,
|
|
14979
|
-
/* @__PURE__ */ (0,
|
|
14980
|
-
|
|
15149
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { color: "warning.contrastText", sx: { display: "block", mb: 1 }, variant: "caption", children: "Newer operations are being dropped. Upgrade your license to increase the retention limit." }),
|
|
15150
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
15151
|
+
import_material6.Button,
|
|
14981
15152
|
{
|
|
14982
15153
|
color: "inherit",
|
|
14983
15154
|
href: "https://localstack.cloud/pricing",
|
|
@@ -14989,9 +15160,9 @@ var SpanCountBadge = ({ licenseLimit, systemLimit, totalCount, visibleCount }) =
|
|
|
14989
15160
|
}
|
|
14990
15161
|
)
|
|
14991
15162
|
] }),
|
|
14992
|
-
systemLimitReached && !licenseLimitReached && /* @__PURE__ */ (0,
|
|
14993
|
-
/* @__PURE__ */ (0,
|
|
14994
|
-
/* @__PURE__ */ (0,
|
|
15163
|
+
systemLimitReached && !licenseLimitReached && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material6.Box, { sx: { alignItems: "flex-start", display: "flex", gap: 0.75 }, children: [
|
|
15164
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons_material2.WarningAmberOutlined, { color: "warning", sx: { fontSize: 14, mt: "1px" } }),
|
|
15165
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Typography, { color: "warning.main", variant: "caption", children: "System limit reached \u2014 newer operations are being dropped." })
|
|
14995
15166
|
] })
|
|
14996
15167
|
] })
|
|
14997
15168
|
] })
|
|
@@ -15001,7 +15172,7 @@ var SpanCountBadge = ({ licenseLimit, systemLimit, totalCount, visibleCount }) =
|
|
|
15001
15172
|
};
|
|
15002
15173
|
|
|
15003
15174
|
// src/components/spans-list/spans-data-grid.tsx
|
|
15004
|
-
var
|
|
15175
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
15005
15176
|
var columnHelper = createColumnHelper();
|
|
15006
15177
|
var newSpanBackgroundColor = {
|
|
15007
15178
|
dark: { from: "rgba(136, 123, 2, 1)", to: "rgba(136, 123, 2, 0)" },
|
|
@@ -15013,16 +15184,16 @@ var LABEL_NO_SPANS = "There are no operations";
|
|
|
15013
15184
|
var LABEL_LOAD_OLDER = "Load older operations";
|
|
15014
15185
|
var LABEL_LOAD_NEWER = "Load newer operations";
|
|
15015
15186
|
var STICK_TO_EDGE_THRESHOLD_PX = 4;
|
|
15016
|
-
var StreamBoundaryRow = ({ colSpan, label }) => /* @__PURE__ */ (0,
|
|
15017
|
-
var LoadSpansRow = ({ colSpan, fetching, label, onFetch }) => /* @__PURE__ */ (0,
|
|
15018
|
-
!fetching && /* @__PURE__ */ (0,
|
|
15019
|
-
fetching && /* @__PURE__ */ (0,
|
|
15187
|
+
var StreamBoundaryRow = ({ colSpan, label }) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.TableCell, { colSpan, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { children: label }) }) });
|
|
15188
|
+
var LoadSpansRow = ({ colSpan, fetching, label, onFetch }) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_material7.TableCell, { colSpan, sx: { textAlign: "center" }, children: [
|
|
15189
|
+
!fetching && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Button, { onClick: onFetch, sx: { my: 1 }, children: label }),
|
|
15190
|
+
fetching && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.CircularProgress, { size: 24, sx: { m: 2 } })
|
|
15020
15191
|
] }) });
|
|
15021
15192
|
var SpansDataGridRow = (0, import_react42.memo)(
|
|
15022
|
-
({ row }) => {
|
|
15023
|
-
const theme = (0,
|
|
15024
|
-
return /* @__PURE__ */ (0,
|
|
15025
|
-
|
|
15193
|
+
({ onSpanClick, row }) => {
|
|
15194
|
+
const theme = (0, import_material7.useTheme)();
|
|
15195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15196
|
+
import_material7.TableRow,
|
|
15026
15197
|
{
|
|
15027
15198
|
animate: {
|
|
15028
15199
|
backgroundColor: theme.palette.mode === "light" ? newSpanBackgroundColor.light.to : newSpanBackgroundColor.dark.to
|
|
@@ -15032,20 +15203,24 @@ var SpansDataGridRow = (0, import_react42.memo)(
|
|
|
15032
15203
|
initial: {
|
|
15033
15204
|
backgroundColor: theme.palette.mode === "light" ? newSpanBackgroundColor.light.from : newSpanBackgroundColor.dark.from
|
|
15034
15205
|
},
|
|
15206
|
+
onClick: () => {
|
|
15207
|
+
onSpanClick(row.original);
|
|
15208
|
+
},
|
|
15035
15209
|
sx: {
|
|
15210
|
+
cursor: "pointer",
|
|
15036
15211
|
transition: "background-color 1200ms ease-in"
|
|
15037
15212
|
},
|
|
15038
15213
|
children: row.getVisibleCells().map((cell) => {
|
|
15039
|
-
return /* @__PURE__ */ (0,
|
|
15040
|
-
|
|
15214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15215
|
+
import_material7.TableCell,
|
|
15041
15216
|
{
|
|
15042
15217
|
sx: {
|
|
15043
15218
|
height: 36,
|
|
15044
15219
|
maxWidth: `${cell.column.getSize().toString()}px`,
|
|
15045
15220
|
minWidth: `${cell.column.getSize().toString()}px`
|
|
15046
15221
|
},
|
|
15047
|
-
children: /* @__PURE__ */ (0,
|
|
15048
|
-
|
|
15222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15223
|
+
import_material7.Box,
|
|
15049
15224
|
{
|
|
15050
15225
|
sx: {
|
|
15051
15226
|
"alignItems": "center",
|
|
@@ -15057,7 +15232,7 @@ var SpansDataGridRow = (0, import_react42.memo)(
|
|
|
15057
15232
|
},
|
|
15058
15233
|
"width": "100%"
|
|
15059
15234
|
},
|
|
15060
|
-
children: /* @__PURE__ */ (0,
|
|
15235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Box, { sx: { px: 1, width: "100%" }, children: flexRender(cell.column.columnDef.cell, cell.getContext()) })
|
|
15061
15236
|
}
|
|
15062
15237
|
)
|
|
15063
15238
|
},
|
|
@@ -15094,9 +15269,9 @@ var SpansDataGrid = ({
|
|
|
15094
15269
|
}) => {
|
|
15095
15270
|
const columns = (0, import_react42.useMemo)(() => [
|
|
15096
15271
|
columnHelper.accessor("startTime", {
|
|
15097
|
-
cell: (props) => /* @__PURE__ */ (0,
|
|
15098
|
-
header: () => /* @__PURE__ */ (0,
|
|
15099
|
-
|
|
15272
|
+
cell: (props) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ResponsiveTimestampCell, { date: props.getValue() }),
|
|
15273
|
+
header: () => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15274
|
+
import_material7.TableSortLabel,
|
|
15100
15275
|
{
|
|
15101
15276
|
active: true,
|
|
15102
15277
|
direction: order2 === "newest_first" ? "asc" : "desc",
|
|
@@ -15112,23 +15287,23 @@ var SpansDataGrid = ({
|
|
|
15112
15287
|
columnHelper.display({
|
|
15113
15288
|
cell: (props) => {
|
|
15114
15289
|
if (!props.row.original.parent_service_name || !props.row.original.parent_resource_name) {
|
|
15115
|
-
return /* @__PURE__ */ (0,
|
|
15290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { fontStyle: "italic" }, variant: "body2", children: "External producer" });
|
|
15116
15291
|
}
|
|
15117
|
-
return /* @__PURE__ */ (0,
|
|
15292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ServiceCell, { resource: props.row.original.parent_resource_name, service: props.row.original.parent_service_name });
|
|
15118
15293
|
},
|
|
15119
15294
|
header: "Producer",
|
|
15120
15295
|
id: "producer",
|
|
15121
15296
|
size: 180
|
|
15122
15297
|
}),
|
|
15123
15298
|
columnHelper.accessor("operation_name", {
|
|
15124
|
-
cell: (props) => /* @__PURE__ */ (0,
|
|
15125
|
-
|
|
15299
|
+
cell: (props) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15300
|
+
import_material7.Box,
|
|
15126
15301
|
{
|
|
15127
15302
|
sx: {
|
|
15128
15303
|
overflow: "hidden",
|
|
15129
15304
|
textOverflow: "ellipsis"
|
|
15130
15305
|
},
|
|
15131
|
-
children: /* @__PURE__ */ (0,
|
|
15306
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { title: props.getValue(), children: props.getValue() })
|
|
15132
15307
|
}
|
|
15133
15308
|
),
|
|
15134
15309
|
header: "Action",
|
|
@@ -15137,7 +15312,7 @@ var SpansDataGrid = ({
|
|
|
15137
15312
|
}),
|
|
15138
15313
|
columnHelper.display({
|
|
15139
15314
|
cell: (props) => {
|
|
15140
|
-
return /* @__PURE__ */ (0,
|
|
15315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ServiceCell, { resource: props.row.original.resource_name, service: props.row.original.service_name });
|
|
15141
15316
|
},
|
|
15142
15317
|
header: "Consumer",
|
|
15143
15318
|
id: "consumer",
|
|
@@ -15145,23 +15320,26 @@ var SpansDataGrid = ({
|
|
|
15145
15320
|
}),
|
|
15146
15321
|
columnHelper.display({
|
|
15147
15322
|
cell: (props) => {
|
|
15148
|
-
return /* @__PURE__ */ (0,
|
|
15149
|
-
|
|
15150
|
-
|
|
15151
|
-
|
|
15152
|
-
|
|
15153
|
-
|
|
15154
|
-
|
|
15155
|
-
|
|
15156
|
-
|
|
15157
|
-
|
|
15158
|
-
|
|
15159
|
-
|
|
15160
|
-
|
|
15323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_material7.Box, { sx: { alignItems: "center", display: "flex", gap: 0.5, justifyContent: "flex-end" }, children: [
|
|
15324
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(StatusIconWithTooltip, { span: props.row.original }),
|
|
15325
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15326
|
+
import_material7.Button,
|
|
15327
|
+
{
|
|
15328
|
+
"data-testid": VIEW_SPAN_DETAILS_TEST_ID,
|
|
15329
|
+
onClick: (event) => {
|
|
15330
|
+
event.stopPropagation();
|
|
15331
|
+
onSpanClick(props.row.original);
|
|
15332
|
+
},
|
|
15333
|
+
size: "small",
|
|
15334
|
+
sx: { px: 1 },
|
|
15335
|
+
variant: "text",
|
|
15336
|
+
children: "View Details"
|
|
15337
|
+
}
|
|
15338
|
+
)
|
|
15339
|
+
] });
|
|
15161
15340
|
},
|
|
15162
15341
|
id: "actions",
|
|
15163
|
-
|
|
15164
|
-
size: 96
|
|
15342
|
+
size: 128
|
|
15165
15343
|
})
|
|
15166
15344
|
], [onSpanClick, onOrderChange, order2]);
|
|
15167
15345
|
const table = useReactTable({
|
|
@@ -15194,46 +15372,46 @@ var SpansDataGrid = ({
|
|
|
15194
15372
|
if (!element || !isAtLiveEdgeRef.current) return;
|
|
15195
15373
|
element.scrollTop = element.scrollHeight;
|
|
15196
15374
|
}, [order2, spans?.length, lastSpanId]);
|
|
15197
|
-
return /* @__PURE__ */ (0,
|
|
15198
|
-
/* @__PURE__ */ (0,
|
|
15199
|
-
/* @__PURE__ */ (0,
|
|
15200
|
-
errorCount !== void 0 && errorCount > 0 && /* @__PURE__ */ (0,
|
|
15201
|
-
/* @__PURE__ */ (0,
|
|
15202
|
-
/* @__PURE__ */ (0,
|
|
15203
|
-
|
|
15375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
|
|
15376
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Grid, { item: true, xs: 12, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_material7.Box, { sx: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
|
|
15377
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(SpanCountBadge, { licenseLimit, systemLimit, totalCount, visibleCount: spans?.length }),
|
|
15378
|
+
errorCount !== void 0 && errorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
|
|
15379
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { color: "text.disabled", sx: { mr: 0.5 }, variant: "body2", children: "\u2014" }),
|
|
15380
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Tooltip, { title: "Number of errors detected across all operations", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
15381
|
+
import_material7.Box,
|
|
15204
15382
|
{
|
|
15205
15383
|
"data-testid": ERROR_COUNT_TEST_ID,
|
|
15206
15384
|
sx: { alignItems: "center", borderBottom: "1px dotted", borderColor: "error.main", cursor: "default", display: "flex", gap: 0.5, mb: "-1px" },
|
|
15207
15385
|
children: [
|
|
15208
|
-
/* @__PURE__ */ (0,
|
|
15209
|
-
/* @__PURE__ */ (0,
|
|
15386
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { color: "error", variant: "body2", children: errorCount.toLocaleString() }),
|
|
15387
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { color: "error", variant: "caption", children: errorCount === 1 ? "error" : "errors" })
|
|
15210
15388
|
]
|
|
15211
15389
|
}
|
|
15212
15390
|
) })
|
|
15213
15391
|
] }),
|
|
15214
|
-
warningCount !== void 0 && warningCount > 0 && /* @__PURE__ */ (0,
|
|
15215
|
-
/* @__PURE__ */ (0,
|
|
15216
|
-
/* @__PURE__ */ (0,
|
|
15217
|
-
|
|
15392
|
+
warningCount !== void 0 && warningCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
|
|
15393
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { color: "text.disabled", sx: { mr: 0.5 }, variant: "body2", children: "\u2014" }),
|
|
15394
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Tooltip, { title: "Number of warnings detected across all operations", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
15395
|
+
import_material7.Box,
|
|
15218
15396
|
{
|
|
15219
15397
|
"data-testid": WARNING_COUNT_TEST_ID,
|
|
15220
15398
|
sx: { alignItems: "center", borderBottom: "1px dotted", borderColor: "warning.main", cursor: "default", display: "flex", gap: 0.5, mb: "-1px" },
|
|
15221
15399
|
children: [
|
|
15222
|
-
/* @__PURE__ */ (0,
|
|
15223
|
-
/* @__PURE__ */ (0,
|
|
15400
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { color: "warning.main", variant: "body2", children: warningCount.toLocaleString() }),
|
|
15401
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { color: "warning.main", variant: "caption", children: warningCount === 1 ? "warning" : "warnings" })
|
|
15224
15402
|
]
|
|
15225
15403
|
}
|
|
15226
15404
|
) })
|
|
15227
15405
|
] }),
|
|
15228
|
-
/* @__PURE__ */ (0,
|
|
15229
|
-
/* @__PURE__ */ (0,
|
|
15230
|
-
|
|
15406
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Box, { sx: { flexGrow: 1 } }),
|
|
15407
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15408
|
+
import_material7.FormControlLabel,
|
|
15231
15409
|
{
|
|
15232
|
-
control: /* @__PURE__ */ (0,
|
|
15233
|
-
|
|
15410
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15411
|
+
import_material7.Button,
|
|
15234
15412
|
{
|
|
15235
15413
|
onClick: onToggleStream,
|
|
15236
|
-
startIcon: streamPaused ? /* @__PURE__ */ (0,
|
|
15414
|
+
startIcon: streamPaused ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_icons_material3.PlayArrowOutlined, {}) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_icons_material3.PauseOutlined, {}),
|
|
15237
15415
|
variant: "text",
|
|
15238
15416
|
children: streamPaused ? "Resume Stream" : "Pause Stream"
|
|
15239
15417
|
}
|
|
@@ -15241,15 +15419,15 @@ var SpansDataGrid = ({
|
|
|
15241
15419
|
label: ""
|
|
15242
15420
|
}
|
|
15243
15421
|
),
|
|
15244
|
-
/* @__PURE__ */ (0,
|
|
15245
|
-
|
|
15422
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15423
|
+
import_material7.FormControlLabel,
|
|
15246
15424
|
{
|
|
15247
|
-
control: /* @__PURE__ */ (0,
|
|
15248
|
-
|
|
15425
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15426
|
+
import_material7.Button,
|
|
15249
15427
|
{
|
|
15250
15428
|
"data-testid": CLEAR_SPANS_TEST_ID,
|
|
15251
15429
|
onClick: onClearSpans,
|
|
15252
|
-
startIcon: /* @__PURE__ */ (0,
|
|
15430
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_icons_material3.DeleteForeverOutlined, {}),
|
|
15253
15431
|
children: "Clear Operations"
|
|
15254
15432
|
}
|
|
15255
15433
|
),
|
|
@@ -15258,8 +15436,8 @@ var SpansDataGrid = ({
|
|
|
15258
15436
|
}
|
|
15259
15437
|
)
|
|
15260
15438
|
] }) }),
|
|
15261
|
-
/* @__PURE__ */ (0,
|
|
15262
|
-
|
|
15439
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Paper, { sx: { flexGrow: 1, overflow: "hidden", position: "relative", width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15440
|
+
import_material7.TableContainer,
|
|
15263
15441
|
{
|
|
15264
15442
|
onScroll: handleScroll,
|
|
15265
15443
|
ref: containerRef,
|
|
@@ -15271,8 +15449,8 @@ var SpansDataGrid = ({
|
|
|
15271
15449
|
right: 0,
|
|
15272
15450
|
top: 0
|
|
15273
15451
|
},
|
|
15274
|
-
children: /* @__PURE__ */ (0,
|
|
15275
|
-
|
|
15452
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
15453
|
+
import_material7.Table,
|
|
15276
15454
|
{
|
|
15277
15455
|
stickyHeader: true,
|
|
15278
15456
|
sx: {
|
|
@@ -15283,9 +15461,9 @@ var SpansDataGrid = ({
|
|
|
15283
15461
|
"th+th": { pl: "8px !important" }
|
|
15284
15462
|
},
|
|
15285
15463
|
children: [
|
|
15286
|
-
/* @__PURE__ */ (0,
|
|
15287
|
-
return /* @__PURE__ */ (0,
|
|
15288
|
-
|
|
15464
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.TableHead, { children: table.getHeaderGroups().map((headerGroup) => {
|
|
15465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15466
|
+
import_material7.TableCell,
|
|
15289
15467
|
{
|
|
15290
15468
|
colSpan: header.colSpan,
|
|
15291
15469
|
sx: {
|
|
@@ -15299,31 +15477,31 @@ var SpansDataGrid = ({
|
|
|
15299
15477
|
header.id
|
|
15300
15478
|
)) }, headerGroup.id);
|
|
15301
15479
|
}) }),
|
|
15302
|
-
/* @__PURE__ */ (0,
|
|
15303
|
-
(spans === void 0 || clearingSpans) && /* @__PURE__ */ (0,
|
|
15304
|
-
!clearingSpans && spans?.length === 0 && /* @__PURE__ */ (0,
|
|
15305
|
-
!clearingSpans && order2 === "newest_first" && /* @__PURE__ */ (0,
|
|
15306
|
-
hasRows && hasMoreForward && /* @__PURE__ */ (0,
|
|
15307
|
-
hasRows && !hasMoreForward && /* @__PURE__ */ (0,
|
|
15308
|
-
hasRows && /* @__PURE__ */ (0,
|
|
15480
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_material7.TableBody, { children: [
|
|
15481
|
+
(spans === void 0 || clearingSpans) && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.TableCell, { colSpan: columnCount, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.CircularProgress, { size: 48, sx: { m: 4 } }) }) }),
|
|
15482
|
+
!clearingSpans && spans?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_NO_SPANS }),
|
|
15483
|
+
!clearingSpans && order2 === "newest_first" && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
|
|
15484
|
+
hasRows && hasMoreForward && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(LoadSpansRow, { colSpan: columnCount, fetching: fetchingForward, label: LABEL_LOAD_NEWER, onFetch: onFetchForward }),
|
|
15485
|
+
hasRows && !hasMoreForward && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_END_OF_STREAM }),
|
|
15486
|
+
hasRows && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AnimatePresence, { initial: false, children: (() => {
|
|
15309
15487
|
const reversed = [];
|
|
15310
15488
|
for (let index = rows.length - 1; index >= 0; index--) {
|
|
15311
15489
|
const row = rows.at(index);
|
|
15312
15490
|
reversed.push(
|
|
15313
|
-
/* @__PURE__ */ (0,
|
|
15491
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(SpansDataGridRow, { onSpanClick, row }, row.original.span_id)
|
|
15314
15492
|
);
|
|
15315
15493
|
}
|
|
15316
15494
|
return reversed;
|
|
15317
15495
|
})() }),
|
|
15318
|
-
hasRows && hasMoreBackward && /* @__PURE__ */ (0,
|
|
15319
|
-
hasRows && !hasMoreBackward && /* @__PURE__ */ (0,
|
|
15496
|
+
hasRows && hasMoreBackward && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(LoadSpansRow, { colSpan: columnCount, fetching: fetchingBackward, label: LABEL_LOAD_OLDER, onFetch: onFetchBackward }),
|
|
15497
|
+
hasRows && !hasMoreBackward && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_BEGINNING_OF_STREAM })
|
|
15320
15498
|
] }),
|
|
15321
|
-
!clearingSpans && order2 === "oldest_first" && /* @__PURE__ */ (0,
|
|
15322
|
-
hasRows && !hasMoreBackward && /* @__PURE__ */ (0,
|
|
15323
|
-
hasRows && hasMoreBackward && /* @__PURE__ */ (0,
|
|
15324
|
-
hasRows && /* @__PURE__ */ (0,
|
|
15325
|
-
hasRows && hasMoreForward && /* @__PURE__ */ (0,
|
|
15326
|
-
hasRows && !hasMoreForward && /* @__PURE__ */ (0,
|
|
15499
|
+
!clearingSpans && order2 === "oldest_first" && /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
|
|
15500
|
+
hasRows && !hasMoreBackward && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_BEGINNING_OF_STREAM }),
|
|
15501
|
+
hasRows && hasMoreBackward && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(LoadSpansRow, { colSpan: columnCount, fetching: fetchingBackward, label: LABEL_LOAD_OLDER, onFetch: onFetchBackward }),
|
|
15502
|
+
hasRows && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AnimatePresence, { initial: false, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(SpansDataGridRow, { onSpanClick, row }, row.original.span_id)) }),
|
|
15503
|
+
hasRows && hasMoreForward && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(LoadSpansRow, { colSpan: columnCount, fetching: fetchingForward, label: LABEL_LOAD_NEWER, onFetch: onFetchForward }),
|
|
15504
|
+
hasRows && !hasMoreForward && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_END_OF_STREAM })
|
|
15327
15505
|
] })
|
|
15328
15506
|
] })
|
|
15329
15507
|
]
|
|
@@ -15335,13 +15513,13 @@ var SpansDataGrid = ({
|
|
|
15335
15513
|
};
|
|
15336
15514
|
|
|
15337
15515
|
// src/components/spans-list/spans-list.tsx
|
|
15338
|
-
var
|
|
15516
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
15339
15517
|
var SpansList = (props) => {
|
|
15340
|
-
return /* @__PURE__ */ (0,
|
|
15341
|
-
props.fetchError && /* @__PURE__ */ (0,
|
|
15342
|
-
|
|
15518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_material8.Box, { "data-testid": SPANS_DATA_GRID_TEST_ID, sx: { display: "flex", flexDirection: "column", flexGrow: 1, gap: 2, width: "100%" }, children: [
|
|
15519
|
+
props.fetchError && /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
15520
|
+
import_material8.Alert,
|
|
15343
15521
|
{
|
|
15344
|
-
action: /* @__PURE__ */ (0,
|
|
15522
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material8.Button, { onClick: props.onFetchForward, children: "Retry" }),
|
|
15345
15523
|
severity: "error",
|
|
15346
15524
|
children: [
|
|
15347
15525
|
"Unexpected error:",
|
|
@@ -15350,7 +15528,7 @@ var SpansList = (props) => {
|
|
|
15350
15528
|
]
|
|
15351
15529
|
}
|
|
15352
15530
|
),
|
|
15353
|
-
/* @__PURE__ */ (0,
|
|
15531
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
15354
15532
|
SpansDataGrid,
|
|
15355
15533
|
{
|
|
15356
15534
|
clearingSpans: props.clearingSpans,
|
|
@@ -15378,10 +15556,10 @@ var SpansList = (props) => {
|
|
|
15378
15556
|
};
|
|
15379
15557
|
|
|
15380
15558
|
// src/components/status-message/status-message.tsx
|
|
15381
|
-
var
|
|
15382
|
-
var
|
|
15559
|
+
var import_icons_material4 = require("@mui/icons-material");
|
|
15560
|
+
var import_material9 = require("@mui/material");
|
|
15383
15561
|
var import_react43 = require("react");
|
|
15384
|
-
var
|
|
15562
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
15385
15563
|
var StatusMessage = ({
|
|
15386
15564
|
error,
|
|
15387
15565
|
localstackVersion,
|
|
@@ -15405,8 +15583,8 @@ var StatusMessage = ({
|
|
|
15405
15583
|
};
|
|
15406
15584
|
if (error instanceof AppInspectorNotFoundError) {
|
|
15407
15585
|
const isBelowMinimum = localstackVersion !== void 0 && checkEmulatorVersion(localstackVersion) === "below-minimum";
|
|
15408
|
-
return /* @__PURE__ */ (0,
|
|
15409
|
-
|
|
15586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15587
|
+
import_material9.Box,
|
|
15410
15588
|
{
|
|
15411
15589
|
sx: {
|
|
15412
15590
|
alignItems: "center",
|
|
@@ -15416,18 +15594,18 @@ var StatusMessage = ({
|
|
|
15416
15594
|
justifyContent: "center",
|
|
15417
15595
|
p: 4
|
|
15418
15596
|
},
|
|
15419
|
-
children: /* @__PURE__ */ (0,
|
|
15420
|
-
|
|
15597
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
15598
|
+
import_material9.Alert,
|
|
15421
15599
|
{
|
|
15422
|
-
icon: /* @__PURE__ */ (0,
|
|
15600
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_icons_material4.ErrorOutline, { fontSize: "large" }),
|
|
15423
15601
|
severity: "error",
|
|
15424
15602
|
sx: { maxWidth: 600, width: "100%" },
|
|
15425
15603
|
children: [
|
|
15426
|
-
/* @__PURE__ */ (0,
|
|
15427
|
-
/* @__PURE__ */ (0,
|
|
15428
|
-
/* @__PURE__ */ (0,
|
|
15429
|
-
/* @__PURE__ */ (0,
|
|
15430
|
-
|
|
15604
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Not Available" }),
|
|
15605
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Typography, { sx: { mb: 2 }, variant: "body2", children: isBelowMinimum ? `App Inspector requires LocalStack ${MINIMUM_EMULATOR_VERSION} or later. You are running version ${localstackVersion}. Please update LocalStack.` : "App Inspector is not available in LocalStack. Ensure LocalStack is up-to-date." }),
|
|
15606
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("strong", { children: "Update LocalStack:" }) }),
|
|
15607
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15608
|
+
import_material9.Box,
|
|
15431
15609
|
{
|
|
15432
15610
|
component: "pre",
|
|
15433
15611
|
sx: {
|
|
@@ -15439,8 +15617,8 @@ var StatusMessage = ({
|
|
|
15439
15617
|
children: "localstack update docker-images"
|
|
15440
15618
|
}
|
|
15441
15619
|
),
|
|
15442
|
-
/* @__PURE__ */ (0,
|
|
15443
|
-
|
|
15620
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Box, { sx: { display: "flex", gap: 1, mt: 2 }, children: onRetry && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15621
|
+
import_material9.Button,
|
|
15444
15622
|
{
|
|
15445
15623
|
"aria-label": "Check App Inspector status again",
|
|
15446
15624
|
disabled: enabling,
|
|
@@ -15456,8 +15634,8 @@ var StatusMessage = ({
|
|
|
15456
15634
|
);
|
|
15457
15635
|
}
|
|
15458
15636
|
if (error instanceof ConnectionError) {
|
|
15459
|
-
return /* @__PURE__ */ (0,
|
|
15460
|
-
|
|
15637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15638
|
+
import_material9.Box,
|
|
15461
15639
|
{
|
|
15462
15640
|
sx: {
|
|
15463
15641
|
alignItems: "center",
|
|
@@ -15467,18 +15645,18 @@ var StatusMessage = ({
|
|
|
15467
15645
|
justifyContent: "center",
|
|
15468
15646
|
p: 4
|
|
15469
15647
|
},
|
|
15470
|
-
children: /* @__PURE__ */ (0,
|
|
15471
|
-
|
|
15648
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
15649
|
+
import_material9.Alert,
|
|
15472
15650
|
{
|
|
15473
|
-
icon: /* @__PURE__ */ (0,
|
|
15651
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_icons_material4.ErrorOutline, { fontSize: "large" }),
|
|
15474
15652
|
severity: "error",
|
|
15475
15653
|
sx: { maxWidth: 600, width: "100%" },
|
|
15476
15654
|
children: [
|
|
15477
|
-
/* @__PURE__ */ (0,
|
|
15478
|
-
/* @__PURE__ */ (0,
|
|
15655
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.AlertTitle, { sx: { fontWeight: "bold" }, children: "Connection Error" }),
|
|
15656
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_material9.Typography, { sx: { mb: 2 }, variant: "body2", children: [
|
|
15479
15657
|
"Failed to connect to LocalStack. Ensure ",
|
|
15480
|
-
/* @__PURE__ */ (0,
|
|
15481
|
-
|
|
15658
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15659
|
+
import_material9.Link,
|
|
15482
15660
|
{
|
|
15483
15661
|
href: "https://docs.localstack.cloud/aws/getting-started/installation/",
|
|
15484
15662
|
rel: "noopener noreferrer",
|
|
@@ -15488,9 +15666,9 @@ var StatusMessage = ({
|
|
|
15488
15666
|
),
|
|
15489
15667
|
" is running and accessible."
|
|
15490
15668
|
] }),
|
|
15491
|
-
/* @__PURE__ */ (0,
|
|
15492
|
-
/* @__PURE__ */ (0,
|
|
15493
|
-
|
|
15669
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("strong", { children: "Start LocalStack:" }) }),
|
|
15670
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15671
|
+
import_material9.Box,
|
|
15494
15672
|
{
|
|
15495
15673
|
component: "pre",
|
|
15496
15674
|
sx: {
|
|
@@ -15502,8 +15680,8 @@ var StatusMessage = ({
|
|
|
15502
15680
|
children: "localstack start"
|
|
15503
15681
|
}
|
|
15504
15682
|
),
|
|
15505
|
-
onRetry && /* @__PURE__ */ (0,
|
|
15506
|
-
|
|
15683
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15684
|
+
import_material9.Button,
|
|
15507
15685
|
{
|
|
15508
15686
|
"aria-label": "Retry connection to LocalStack",
|
|
15509
15687
|
onClick: onRetry,
|
|
@@ -15518,8 +15696,8 @@ var StatusMessage = ({
|
|
|
15518
15696
|
);
|
|
15519
15697
|
}
|
|
15520
15698
|
if (error instanceof AppInspectorDisabledError || status?.status === "DISABLED") {
|
|
15521
|
-
return /* @__PURE__ */ (0,
|
|
15522
|
-
|
|
15699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15700
|
+
import_material9.Box,
|
|
15523
15701
|
{
|
|
15524
15702
|
sx: {
|
|
15525
15703
|
alignItems: "center",
|
|
@@ -15529,31 +15707,31 @@ var StatusMessage = ({
|
|
|
15529
15707
|
justifyContent: "center",
|
|
15530
15708
|
p: 4
|
|
15531
15709
|
},
|
|
15532
|
-
children: /* @__PURE__ */ (0,
|
|
15533
|
-
|
|
15710
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
15711
|
+
import_material9.Alert,
|
|
15534
15712
|
{
|
|
15535
|
-
icon: /* @__PURE__ */ (0,
|
|
15713
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_icons_material4.InfoOutlined, { fontSize: "large" }),
|
|
15536
15714
|
severity: "warning",
|
|
15537
15715
|
sx: { maxWidth: 600, width: "100%" },
|
|
15538
15716
|
children: [
|
|
15539
|
-
/* @__PURE__ */ (0,
|
|
15540
|
-
/* @__PURE__ */ (0,
|
|
15541
|
-
/* @__PURE__ */ (0,
|
|
15542
|
-
onEnable && /* @__PURE__ */ (0,
|
|
15543
|
-
|
|
15717
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Is Not Enabled" }),
|
|
15718
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Typography, { sx: { mb: 2 }, variant: "body2", children: "App Inspector is not currently enabled in LocalStack. You can enable it now, or at startup." }),
|
|
15719
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_material9.Box, { sx: { display: "flex", gap: 1, mb: 2 }, children: [
|
|
15720
|
+
onEnable && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15721
|
+
import_material9.Button,
|
|
15544
15722
|
{
|
|
15545
15723
|
"aria-label": "Enable App Inspector Now",
|
|
15546
15724
|
disabled: enabling,
|
|
15547
15725
|
onClick: () => {
|
|
15548
15726
|
void handleEnable();
|
|
15549
15727
|
},
|
|
15550
|
-
startIcon: enabling ? /* @__PURE__ */ (0,
|
|
15728
|
+
startIcon: enabling ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.CircularProgress, { size: 16 }) : void 0,
|
|
15551
15729
|
variant: "contained",
|
|
15552
15730
|
children: "Enable App Inspector Now"
|
|
15553
15731
|
}
|
|
15554
15732
|
),
|
|
15555
|
-
onRetry && /* @__PURE__ */ (0,
|
|
15556
|
-
|
|
15733
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15734
|
+
import_material9.Button,
|
|
15557
15735
|
{
|
|
15558
15736
|
"aria-label": "Check if App Inspector is enabled",
|
|
15559
15737
|
disabled: enabling,
|
|
@@ -15563,9 +15741,9 @@ var StatusMessage = ({
|
|
|
15563
15741
|
}
|
|
15564
15742
|
)
|
|
15565
15743
|
] }),
|
|
15566
|
-
/* @__PURE__ */ (0,
|
|
15567
|
-
/* @__PURE__ */ (0,
|
|
15568
|
-
|
|
15744
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Typography, { sx: { mb: 1 }, variant: "body2", children: "If you'd prefer to automatically enable App Inspector at start up, use:" }),
|
|
15745
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15746
|
+
import_material9.Box,
|
|
15569
15747
|
{
|
|
15570
15748
|
component: "pre",
|
|
15571
15749
|
sx: {
|
|
@@ -15577,7 +15755,7 @@ var StatusMessage = ({
|
|
|
15577
15755
|
children: "LOCALSTACK_APP_INSPECTOR=1 localstack start"
|
|
15578
15756
|
}
|
|
15579
15757
|
),
|
|
15580
|
-
Boolean(enableError) && /* @__PURE__ */ (0,
|
|
15758
|
+
Boolean(enableError) && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Typography, { color: "error", sx: { mt: 1 }, variant: "body2", children: enableError })
|
|
15581
15759
|
]
|
|
15582
15760
|
}
|
|
15583
15761
|
)
|
|
@@ -15585,8 +15763,8 @@ var StatusMessage = ({
|
|
|
15585
15763
|
);
|
|
15586
15764
|
}
|
|
15587
15765
|
if (error) {
|
|
15588
|
-
return /* @__PURE__ */ (0,
|
|
15589
|
-
|
|
15766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15767
|
+
import_material9.Box,
|
|
15590
15768
|
{
|
|
15591
15769
|
sx: {
|
|
15592
15770
|
alignItems: "center",
|
|
@@ -15596,17 +15774,17 @@ var StatusMessage = ({
|
|
|
15596
15774
|
justifyContent: "center",
|
|
15597
15775
|
p: 4
|
|
15598
15776
|
},
|
|
15599
|
-
children: /* @__PURE__ */ (0,
|
|
15600
|
-
|
|
15777
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
15778
|
+
import_material9.Alert,
|
|
15601
15779
|
{
|
|
15602
|
-
icon: /* @__PURE__ */ (0,
|
|
15780
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_icons_material4.ErrorOutline, { fontSize: "large" }),
|
|
15603
15781
|
severity: "error",
|
|
15604
15782
|
sx: { maxWidth: 600, width: "100%" },
|
|
15605
15783
|
children: [
|
|
15606
|
-
/* @__PURE__ */ (0,
|
|
15607
|
-
/* @__PURE__ */ (0,
|
|
15608
|
-
onRetry && /* @__PURE__ */ (0,
|
|
15609
|
-
|
|
15784
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.AlertTitle, { sx: { fontWeight: "bold" }, children: "Error" }),
|
|
15785
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Typography, { sx: { mb: 2 }, variant: "body2", children: error.message }),
|
|
15786
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
15787
|
+
import_material9.Button,
|
|
15610
15788
|
{
|
|
15611
15789
|
"aria-label": "Retry operation",
|
|
15612
15790
|
onClick: onRetry,
|
|
@@ -15620,7 +15798,7 @@ var StatusMessage = ({
|
|
|
15620
15798
|
}
|
|
15621
15799
|
);
|
|
15622
15800
|
}
|
|
15623
|
-
return /* @__PURE__ */ (0,
|
|
15801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_jsx_runtime130.Fragment, {});
|
|
15624
15802
|
};
|
|
15625
15803
|
|
|
15626
15804
|
// src/hooks/status-provider.tsx
|
|
@@ -15669,7 +15847,7 @@ var useStatus = () => {
|
|
|
15669
15847
|
};
|
|
15670
15848
|
|
|
15671
15849
|
// src/hooks/status-provider.tsx
|
|
15672
|
-
var
|
|
15850
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
15673
15851
|
var AppInspectorStatusContext = (0, import_react45.createContext)(void 0);
|
|
15674
15852
|
var StatusProvider = ({ children }) => {
|
|
15675
15853
|
const { checking, checkStatus, error, status } = useStatus();
|
|
@@ -15680,7 +15858,7 @@ var StatusProvider = ({ children }) => {
|
|
|
15680
15858
|
() => ({ checking, checkStatus, reportDisabled, status, statusError: error }),
|
|
15681
15859
|
[checking, checkStatus, reportDisabled, status, error]
|
|
15682
15860
|
);
|
|
15683
|
-
return /* @__PURE__ */ (0,
|
|
15861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(AppInspectorStatusContext.Provider, { value, children });
|
|
15684
15862
|
};
|
|
15685
15863
|
var useAppInspectorStatus = () => {
|
|
15686
15864
|
const value = (0, import_react45.useContext)(AppInspectorStatusContext);
|
|
@@ -18099,7 +18277,7 @@ var useAppInspectorOpenAnalytics = () => {
|
|
|
18099
18277
|
};
|
|
18100
18278
|
|
|
18101
18279
|
// src/context.tsx
|
|
18102
|
-
var
|
|
18280
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
18103
18281
|
var AppInspectorContext = (0, import_react48.createContext)(void 0);
|
|
18104
18282
|
var useAppInspector = () => {
|
|
18105
18283
|
const context = (0, import_react48.useContext)(AppInspectorContext);
|
|
@@ -18110,7 +18288,7 @@ var useAppInspector = () => {
|
|
|
18110
18288
|
};
|
|
18111
18289
|
var AppInspectorAnalyticsBoundary = ({ children }) => {
|
|
18112
18290
|
useAppInspectorOpenAnalytics();
|
|
18113
|
-
return /* @__PURE__ */ (0,
|
|
18291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_jsx_runtime132.Fragment, { children });
|
|
18114
18292
|
};
|
|
18115
18293
|
var AppInspectorContextProvider = (props) => {
|
|
18116
18294
|
const api = (0, import_react49.useMemo)(
|
|
@@ -18142,7 +18320,7 @@ var AppInspectorContextProvider = (props) => {
|
|
|
18142
18320
|
}),
|
|
18143
18321
|
[deploymentContainer, props.linkComponent, props.localstackEndpoint, resolveLink]
|
|
18144
18322
|
);
|
|
18145
|
-
return /* @__PURE__ */ (0,
|
|
18323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ApiProvider, { api, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(StatusProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(AppInspectorContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(AppInspectorAnalyticsBoundary, { children: props.children }) }) }) });
|
|
18146
18324
|
};
|
|
18147
18325
|
|
|
18148
18326
|
// src/hooks/use-spans-ws.tsx
|
|
@@ -18428,103 +18606,17 @@ var useSpans = () => {
|
|
|
18428
18606
|
};
|
|
18429
18607
|
|
|
18430
18608
|
// src/pages/trace-graph-page.tsx
|
|
18431
|
-
var
|
|
18432
|
-
var
|
|
18609
|
+
var import_icons_material13 = require("@mui/icons-material");
|
|
18610
|
+
var import_material23 = require("@mui/material");
|
|
18433
18611
|
var import_styles = require("@mui/material/styles");
|
|
18434
18612
|
var import_react67 = require("@xyflow/react");
|
|
18435
18613
|
var import_react68 = require("react");
|
|
18436
18614
|
|
|
18437
18615
|
// src/components/event-details/event-details.tsx
|
|
18438
|
-
var
|
|
18439
|
-
var
|
|
18616
|
+
var import_icons_material10 = require("@mui/icons-material");
|
|
18617
|
+
var import_material18 = require("@mui/material");
|
|
18440
18618
|
var import_react59 = require("react");
|
|
18441
18619
|
|
|
18442
|
-
// src/utils/iam-utils.ts
|
|
18443
|
-
function determinePermissionStatus(payload) {
|
|
18444
|
-
if (payload.explicit_deny_count && payload.explicit_deny_count > 0) {
|
|
18445
|
-
return "explicitly_denied";
|
|
18446
|
-
}
|
|
18447
|
-
if (payload.is_allowed && payload.explicit_allow_count && payload.explicit_allow_count > 0) {
|
|
18448
|
-
return "explicitly_allowed";
|
|
18449
|
-
}
|
|
18450
|
-
if (payload.is_allowed) {
|
|
18451
|
-
return "implicitly_allowed";
|
|
18452
|
-
}
|
|
18453
|
-
return "implicitly_denied";
|
|
18454
|
-
}
|
|
18455
|
-
function formatPermissionStatus(status) {
|
|
18456
|
-
switch (status) {
|
|
18457
|
-
case "explicitly_allowed": {
|
|
18458
|
-
return "Explicitly Allowed";
|
|
18459
|
-
}
|
|
18460
|
-
case "explicitly_denied": {
|
|
18461
|
-
return "Explicitly Denied";
|
|
18462
|
-
}
|
|
18463
|
-
case "implicitly_allowed": {
|
|
18464
|
-
return "Implicitly Allowed";
|
|
18465
|
-
}
|
|
18466
|
-
case "implicitly_denied": {
|
|
18467
|
-
return "Implicitly Denied";
|
|
18468
|
-
}
|
|
18469
|
-
}
|
|
18470
|
-
}
|
|
18471
|
-
function getPermissionStatusColor(status) {
|
|
18472
|
-
switch (status) {
|
|
18473
|
-
case "explicitly_allowed":
|
|
18474
|
-
case "implicitly_allowed": {
|
|
18475
|
-
return "success.main";
|
|
18476
|
-
}
|
|
18477
|
-
case "explicitly_denied": {
|
|
18478
|
-
return "error.main";
|
|
18479
|
-
}
|
|
18480
|
-
case "implicitly_denied": {
|
|
18481
|
-
return "warning.main";
|
|
18482
|
-
}
|
|
18483
|
-
}
|
|
18484
|
-
}
|
|
18485
|
-
function parseIAMEvent(payloadString) {
|
|
18486
|
-
try {
|
|
18487
|
-
const payload = JSON.parse(payloadString);
|
|
18488
|
-
const permission = determinePermissionStatus(payload);
|
|
18489
|
-
const actions = [];
|
|
18490
|
-
const resources = [];
|
|
18491
|
-
if (payload.explicit_allows) {
|
|
18492
|
-
for (const allow of payload.explicit_allows) {
|
|
18493
|
-
if (!actions.includes(allow.action)) actions.push(allow.action);
|
|
18494
|
-
if (!resources.includes(allow.resource)) resources.push(allow.resource);
|
|
18495
|
-
}
|
|
18496
|
-
}
|
|
18497
|
-
if (payload.explicit_denies) {
|
|
18498
|
-
for (const deny of payload.explicit_denies) {
|
|
18499
|
-
if (!actions.includes(deny.action)) actions.push(deny.action);
|
|
18500
|
-
if (!resources.includes(deny.resource)) resources.push(deny.resource);
|
|
18501
|
-
}
|
|
18502
|
-
}
|
|
18503
|
-
if (payload.implicit_denies) {
|
|
18504
|
-
for (const deny of payload.implicit_denies) {
|
|
18505
|
-
if (!actions.includes(deny.action)) actions.push(deny.action);
|
|
18506
|
-
if (!resources.includes(deny.resource)) resources.push(deny.resource);
|
|
18507
|
-
}
|
|
18508
|
-
}
|
|
18509
|
-
return {
|
|
18510
|
-
details: {
|
|
18511
|
-
actions,
|
|
18512
|
-
explicitAllows: payload.explicit_allow_count,
|
|
18513
|
-
explicitDenies: payload.explicit_deny_count,
|
|
18514
|
-
implicitDenies: payload.implicit_deny_count,
|
|
18515
|
-
resources
|
|
18516
|
-
},
|
|
18517
|
-
operation: payload.operation,
|
|
18518
|
-
permission,
|
|
18519
|
-
principal: payload.principal_arn,
|
|
18520
|
-
service: payload.service
|
|
18521
|
-
};
|
|
18522
|
-
} catch (error) {
|
|
18523
|
-
console.error("Error parsing IAM event payload:", error);
|
|
18524
|
-
return void 0;
|
|
18525
|
-
}
|
|
18526
|
-
}
|
|
18527
|
-
|
|
18528
18620
|
// src/utils/event-utils.ts
|
|
18529
18621
|
var iamEventParser = (eventName, attributes) => {
|
|
18530
18622
|
if (attributes?.payload && typeof attributes.payload === "string") {
|
|
@@ -18634,70 +18726,70 @@ var getEventGroupsByType = (events) => {
|
|
|
18634
18726
|
};
|
|
18635
18727
|
|
|
18636
18728
|
// src/components/event-details/event-detail.tsx
|
|
18637
|
-
var
|
|
18638
|
-
var
|
|
18729
|
+
var import_icons_material8 = require("@mui/icons-material");
|
|
18730
|
+
var import_material15 = require("@mui/material");
|
|
18639
18731
|
var import_react56 = require("react");
|
|
18640
18732
|
|
|
18641
18733
|
// src/components/status-icon.tsx
|
|
18642
|
-
var
|
|
18643
|
-
var
|
|
18644
|
-
var
|
|
18645
|
-
var
|
|
18734
|
+
var import_icons_material5 = require("@mui/icons-material");
|
|
18735
|
+
var import_material10 = require("@mui/material");
|
|
18736
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
18737
|
+
var StatusIcon2 = ({ errorLevel }) => {
|
|
18646
18738
|
switch (errorLevel) {
|
|
18647
18739
|
case EventLevel.LevelError: {
|
|
18648
|
-
return /* @__PURE__ */ (0,
|
|
18740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.Cancel, { sx: { color: "red" } });
|
|
18649
18741
|
}
|
|
18650
18742
|
case EventLevel.LevelInfo: {
|
|
18651
|
-
return /* @__PURE__ */ (0,
|
|
18743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.Info, { sx: { color: "gray" } });
|
|
18652
18744
|
}
|
|
18653
18745
|
case EventLevel.LevelPermission: {
|
|
18654
|
-
return /* @__PURE__ */ (0,
|
|
18746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.RemoveCircle, { sx: { color: "blue" } });
|
|
18655
18747
|
}
|
|
18656
18748
|
case EventLevel.LevelWarning: {
|
|
18657
|
-
return /* @__PURE__ */ (0,
|
|
18749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.Error, { sx: { color: "orange" } });
|
|
18658
18750
|
}
|
|
18659
18751
|
default: {
|
|
18660
|
-
return /* @__PURE__ */ (0,
|
|
18752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.CheckCircle, { sx: { color: "lightgray" } });
|
|
18661
18753
|
}
|
|
18662
18754
|
}
|
|
18663
18755
|
};
|
|
18664
18756
|
|
|
18665
18757
|
// src/components/event-details/iam-event-detail.tsx
|
|
18666
|
-
var
|
|
18667
|
-
var
|
|
18668
|
-
var
|
|
18669
|
-
var DetailRow = ({ content, label }) => /* @__PURE__ */ (0,
|
|
18670
|
-
/* @__PURE__ */ (0,
|
|
18671
|
-
/* @__PURE__ */ (0,
|
|
18758
|
+
var import_icons_material6 = require("@mui/icons-material");
|
|
18759
|
+
var import_material11 = require("@mui/material");
|
|
18760
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
18761
|
+
var DetailRow = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
|
|
18762
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
|
|
18763
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { sx: { color: "text.primary", wordBreak: "break-word" }, variant: "caption", children: content }) : content })
|
|
18672
18764
|
] });
|
|
18673
18765
|
var PermissionIcon = ({ status }) => {
|
|
18674
18766
|
switch (status) {
|
|
18675
18767
|
case "explicitly_allowed":
|
|
18676
18768
|
case "implicitly_allowed": {
|
|
18677
|
-
return /* @__PURE__ */ (0,
|
|
18769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.CheckCircle, { sx: { color: "success.main", fontSize: "1rem" } });
|
|
18678
18770
|
}
|
|
18679
18771
|
case "explicitly_denied": {
|
|
18680
|
-
return /* @__PURE__ */ (0,
|
|
18772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.Error, { sx: { color: "error.main", fontSize: "1rem" } });
|
|
18681
18773
|
}
|
|
18682
18774
|
case "implicitly_denied": {
|
|
18683
|
-
return /* @__PURE__ */ (0,
|
|
18775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
|
|
18684
18776
|
}
|
|
18685
18777
|
}
|
|
18686
18778
|
};
|
|
18687
18779
|
var IAMEventDetail = ({ event }) => {
|
|
18688
18780
|
const payloadString = event.attributes?.payload;
|
|
18689
18781
|
if (!payloadString) {
|
|
18690
|
-
return /* @__PURE__ */ (0,
|
|
18782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "No IAM policy evaluation data available" });
|
|
18691
18783
|
}
|
|
18692
18784
|
const parsedIAM = parseIAMEvent(payloadString);
|
|
18693
18785
|
if (!parsedIAM) {
|
|
18694
|
-
return /* @__PURE__ */ (0,
|
|
18786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Failed to parse IAM event data" });
|
|
18695
18787
|
}
|
|
18696
|
-
return /* @__PURE__ */ (0,
|
|
18697
|
-
/* @__PURE__ */ (0,
|
|
18698
|
-
|
|
18788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { children: [
|
|
18789
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Box, { sx: { mb: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
18790
|
+
import_material11.Chip,
|
|
18699
18791
|
{
|
|
18700
|
-
icon: /* @__PURE__ */ (0,
|
|
18792
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(PermissionIcon, { status: parsedIAM.permission }),
|
|
18701
18793
|
label: formatPermissionStatus(parsedIAM.permission),
|
|
18702
18794
|
size: "small",
|
|
18703
18795
|
sx: {
|
|
@@ -18707,36 +18799,36 @@ var IAMEventDetail = ({ event }) => {
|
|
|
18707
18799
|
variant: "outlined"
|
|
18708
18800
|
}
|
|
18709
18801
|
) }),
|
|
18710
|
-
/* @__PURE__ */ (0,
|
|
18711
|
-
/* @__PURE__ */ (0,
|
|
18712
|
-
parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0,
|
|
18802
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
|
|
18803
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
|
|
18804
|
+
parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
18713
18805
|
DetailRow,
|
|
18714
18806
|
{
|
|
18715
|
-
content: /* @__PURE__ */ (0,
|
|
18807
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { sx: { color: "text.primary", display: "block" }, variant: "caption", children: action }, action)) }),
|
|
18716
18808
|
label: "Actions"
|
|
18717
18809
|
}
|
|
18718
18810
|
),
|
|
18719
|
-
parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0,
|
|
18811
|
+
parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
18720
18812
|
DetailRow,
|
|
18721
18813
|
{
|
|
18722
|
-
content: /* @__PURE__ */ (0,
|
|
18814
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { sx: { color: "text.primary", display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) }),
|
|
18723
18815
|
label: "Resources"
|
|
18724
18816
|
}
|
|
18725
18817
|
),
|
|
18726
|
-
(parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */ (0,
|
|
18727
|
-
/* @__PURE__ */ (0,
|
|
18728
|
-
/* @__PURE__ */ (0,
|
|
18729
|
-
parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ (0,
|
|
18730
|
-
/* @__PURE__ */ (0,
|
|
18731
|
-
/* @__PURE__ */ (0,
|
|
18818
|
+
(parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { mt: 1.5 }, children: [
|
|
18819
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", sx: { display: "block", fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Policy Evaluation" }),
|
|
18820
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "repeat(3, 1fr)" }, children: [
|
|
18821
|
+
parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
|
|
18822
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "success.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitAllows }),
|
|
18823
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
|
|
18732
18824
|
] }),
|
|
18733
|
-
parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ (0,
|
|
18734
|
-
/* @__PURE__ */ (0,
|
|
18735
|
-
/* @__PURE__ */ (0,
|
|
18825
|
+
parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
|
|
18826
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "error.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitDenies }),
|
|
18827
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
|
|
18736
18828
|
] }),
|
|
18737
|
-
parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ (0,
|
|
18738
|
-
/* @__PURE__ */ (0,
|
|
18739
|
-
/* @__PURE__ */ (0,
|
|
18829
|
+
parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
|
|
18830
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "warning.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.implicitDenies }),
|
|
18831
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
|
|
18740
18832
|
] })
|
|
18741
18833
|
] })
|
|
18742
18834
|
] })
|
|
@@ -18744,17 +18836,17 @@ var IAMEventDetail = ({ event }) => {
|
|
|
18744
18836
|
};
|
|
18745
18837
|
|
|
18746
18838
|
// src/components/event-details/iam-permission-detail.tsx
|
|
18747
|
-
var
|
|
18748
|
-
var
|
|
18839
|
+
var import_icons_material7 = require("@mui/icons-material");
|
|
18840
|
+
var import_material12 = require("@mui/material");
|
|
18749
18841
|
var import_react53 = require("react");
|
|
18750
|
-
var
|
|
18842
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
18751
18843
|
var getChipColors = (status) => ({
|
|
18752
18844
|
backgroundColor: getPermissionStatusColor(status),
|
|
18753
18845
|
color: "white"
|
|
18754
18846
|
});
|
|
18755
|
-
var LabelValue = ({ label, value }) => /* @__PURE__ */ (0,
|
|
18756
|
-
/* @__PURE__ */ (0,
|
|
18757
|
-
/* @__PURE__ */ (0,
|
|
18847
|
+
var LabelValue = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
|
|
18848
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
|
|
18849
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { wordBreak: "break-all" }, variant: "caption", children: value })
|
|
18758
18850
|
] });
|
|
18759
18851
|
var IAMPermissionItem = ({ event }) => {
|
|
18760
18852
|
const [isOpen, setIsOpen] = (0, import_react53.useState)(false);
|
|
@@ -18769,39 +18861,39 @@ var IAMPermissionItem = ({ event }) => {
|
|
|
18769
18861
|
return null;
|
|
18770
18862
|
}
|
|
18771
18863
|
const { chipColors, parsedIAM } = parsedData;
|
|
18772
|
-
return /* @__PURE__ */ (0,
|
|
18773
|
-
/* @__PURE__ */ (0,
|
|
18774
|
-
/* @__PURE__ */ (0,
|
|
18864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { mb: 0.5 }, children: [
|
|
18865
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { alignItems: "center", display: "flex", gap: 1 }, children: [
|
|
18866
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.IconButton, { onClick: () => {
|
|
18775
18867
|
setIsOpen(!isOpen);
|
|
18776
|
-
}, size: "small", sx: { p: 0 }, children: isOpen ? /* @__PURE__ */ (0,
|
|
18777
|
-
/* @__PURE__ */ (0,
|
|
18778
|
-
/* @__PURE__ */ (0,
|
|
18868
|
+
}, size: "small", sx: { p: 0 }, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons_material7.KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons_material7.KeyboardArrowRight, { sx: { fontSize: 16 } }) }),
|
|
18869
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Chip, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }),
|
|
18870
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Typography, { color: "text.secondary", noWrap: true, sx: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, variant: "caption", children: [
|
|
18779
18871
|
parsedIAM.service,
|
|
18780
18872
|
":",
|
|
18781
18873
|
parsedIAM.operation
|
|
18782
18874
|
] })
|
|
18783
18875
|
] }),
|
|
18784
|
-
isOpen && /* @__PURE__ */ (0,
|
|
18785
|
-
/* @__PURE__ */ (0,
|
|
18786
|
-
parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0,
|
|
18787
|
-
/* @__PURE__ */ (0,
|
|
18788
|
-
/* @__PURE__ */ (0,
|
|
18876
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: [
|
|
18877
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(LabelValue, { label: "Principal", value: parsedIAM.principal }),
|
|
18878
|
+
parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
|
|
18879
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: "Actions" }),
|
|
18880
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block" }, variant: "caption", children: action }, action)) })
|
|
18789
18881
|
] }),
|
|
18790
|
-
parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0,
|
|
18791
|
-
/* @__PURE__ */ (0,
|
|
18792
|
-
/* @__PURE__ */ (0,
|
|
18882
|
+
parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr" }, children: [
|
|
18883
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: "Resources" }),
|
|
18884
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Typography, { sx: { display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) })
|
|
18793
18885
|
] })
|
|
18794
18886
|
] })
|
|
18795
18887
|
] });
|
|
18796
18888
|
};
|
|
18797
|
-
var IAMPermissionDetail = ({ events }) => /* @__PURE__ */ (0,
|
|
18889
|
+
var IAMPermissionDetail = ({ events }) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IAMPermissionItem, { event }, `${event.span_id}-${event.event_id}`)) });
|
|
18798
18890
|
|
|
18799
18891
|
// src/components/event-details/payload-viewer.tsx
|
|
18800
|
-
var
|
|
18892
|
+
var import_material14 = require("@mui/material");
|
|
18801
18893
|
|
|
18802
18894
|
// node_modules/@textea/json-viewer/dist/index.mjs
|
|
18803
|
-
var
|
|
18804
|
-
var
|
|
18895
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
18896
|
+
var import_material13 = require("@mui/material");
|
|
18805
18897
|
var import_react54 = require("react");
|
|
18806
18898
|
var import_zustand = require("zustand");
|
|
18807
18899
|
var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
|
|
@@ -19156,7 +19248,7 @@ function useInspect(path, value, nestedIndex) {
|
|
|
19156
19248
|
setInspect
|
|
19157
19249
|
];
|
|
19158
19250
|
}
|
|
19159
|
-
var DataBox = (props) => /* @__PURE__ */ (0,
|
|
19251
|
+
var DataBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19160
19252
|
component: "div",
|
|
19161
19253
|
...props,
|
|
19162
19254
|
sx: {
|
|
@@ -19167,7 +19259,7 @@ var DataBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_m
|
|
|
19167
19259
|
var DataTypeLabel = (param) => {
|
|
19168
19260
|
let { dataType, enable = true } = param;
|
|
19169
19261
|
if (!enable) return null;
|
|
19170
|
-
return /* @__PURE__ */ (0,
|
|
19262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
|
|
19171
19263
|
className: "data-type-label",
|
|
19172
19264
|
sx: {
|
|
19173
19265
|
mx: 0.5,
|
|
@@ -19185,18 +19277,18 @@ function defineEasyType(param) {
|
|
|
19185
19277
|
const storeDisplayDataTypes = useJsonViewerStore((store) => store.displayDataTypes);
|
|
19186
19278
|
const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
|
|
19187
19279
|
const onSelect = useJsonViewerStore((store) => store.onSelect);
|
|
19188
|
-
return /* @__PURE__ */ (0,
|
|
19280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
|
|
19189
19281
|
onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(props.path, props.value),
|
|
19190
19282
|
sx: {
|
|
19191
19283
|
color: color2
|
|
19192
19284
|
},
|
|
19193
19285
|
children: [
|
|
19194
|
-
displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ (0,
|
|
19286
|
+
displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataTypeLabel, {
|
|
19195
19287
|
dataType: type
|
|
19196
19288
|
}),
|
|
19197
|
-
/* @__PURE__ */ (0,
|
|
19289
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
|
|
19198
19290
|
className: "".concat(type, "-value"),
|
|
19199
|
-
children: /* @__PURE__ */ (0,
|
|
19291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Render, {
|
|
19200
19292
|
path: props.path,
|
|
19201
19293
|
inspect: props.inspect,
|
|
19202
19294
|
setInspect: props.setInspect,
|
|
@@ -19236,7 +19328,7 @@ function defineEasyType(param) {
|
|
|
19236
19328
|
}, [
|
|
19237
19329
|
setValue
|
|
19238
19330
|
]);
|
|
19239
|
-
return /* @__PURE__ */ (0,
|
|
19331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.InputBase, {
|
|
19240
19332
|
autoFocus: true,
|
|
19241
19333
|
value,
|
|
19242
19334
|
onChange: handleChange,
|
|
@@ -19276,7 +19368,7 @@ var booleanType = defineEasyType({
|
|
|
19276
19368
|
},
|
|
19277
19369
|
Renderer: (param) => {
|
|
19278
19370
|
let { value } = param;
|
|
19279
|
-
return /* @__PURE__ */ (0,
|
|
19371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
|
|
19280
19372
|
children: value ? "true" : "false"
|
|
19281
19373
|
});
|
|
19282
19374
|
}
|
|
@@ -19295,7 +19387,7 @@ var dateType = defineEasyType({
|
|
|
19295
19387
|
colorKey: "base0D",
|
|
19296
19388
|
Renderer: (param) => {
|
|
19297
19389
|
let { value } = param;
|
|
19298
|
-
return /* @__PURE__ */ (0,
|
|
19390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
|
|
19299
19391
|
children: value.toLocaleTimeString("en-us", displayOptions)
|
|
19300
19392
|
});
|
|
19301
19393
|
}
|
|
@@ -19324,12 +19416,12 @@ var functionName = (func) => {
|
|
|
19324
19416
|
var lb = "{";
|
|
19325
19417
|
var rb = "}";
|
|
19326
19418
|
var PreFunctionType = (props) => {
|
|
19327
|
-
return /* @__PURE__ */ (0,
|
|
19419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.NoSsr, {
|
|
19328
19420
|
children: [
|
|
19329
|
-
/* @__PURE__ */ (0,
|
|
19421
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataTypeLabel, {
|
|
19330
19422
|
dataType: "function"
|
|
19331
19423
|
}),
|
|
19332
|
-
/* @__PURE__ */ (0,
|
|
19424
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, {
|
|
19333
19425
|
component: "span",
|
|
19334
19426
|
className: "data-function-start",
|
|
19335
19427
|
sx: {
|
|
@@ -19345,8 +19437,8 @@ var PreFunctionType = (props) => {
|
|
|
19345
19437
|
});
|
|
19346
19438
|
};
|
|
19347
19439
|
var PostFunctionType = () => {
|
|
19348
|
-
return /* @__PURE__ */ (0,
|
|
19349
|
-
children: /* @__PURE__ */ (0,
|
|
19440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.NoSsr, {
|
|
19441
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19350
19442
|
component: "span",
|
|
19351
19443
|
className: "data-function-end",
|
|
19352
19444
|
children: rb
|
|
@@ -19355,15 +19447,15 @@ var PostFunctionType = () => {
|
|
|
19355
19447
|
};
|
|
19356
19448
|
var FunctionType = (props) => {
|
|
19357
19449
|
const functionColor = useJsonViewerStore((store) => store.colorspace.base05);
|
|
19358
|
-
return /* @__PURE__ */ (0,
|
|
19359
|
-
children: /* @__PURE__ */ (0,
|
|
19450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.NoSsr, {
|
|
19451
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19360
19452
|
className: "data-function",
|
|
19361
19453
|
sx: {
|
|
19362
19454
|
display: props.inspect ? "block" : "inline-block",
|
|
19363
19455
|
pl: props.inspect ? 2 : 0,
|
|
19364
19456
|
color: functionColor
|
|
19365
19457
|
},
|
|
19366
|
-
children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ (0,
|
|
19458
|
+
children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19367
19459
|
component: "span",
|
|
19368
19460
|
className: "data-function-body",
|
|
19369
19461
|
onClick: () => props.setInspect(true),
|
|
@@ -19391,7 +19483,7 @@ var nullType = defineEasyType({
|
|
|
19391
19483
|
displayTypeLabel: false,
|
|
19392
19484
|
Renderer: () => {
|
|
19393
19485
|
const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
|
|
19394
|
-
return /* @__PURE__ */ (0,
|
|
19486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19395
19487
|
sx: {
|
|
19396
19488
|
fontSize: "0.8rem",
|
|
19397
19489
|
backgroundColor,
|
|
@@ -19414,7 +19506,7 @@ var nanType = defineEasyType({
|
|
|
19414
19506
|
deserialize: (value) => parseFloat(value),
|
|
19415
19507
|
Renderer: () => {
|
|
19416
19508
|
const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
|
|
19417
|
-
return /* @__PURE__ */ (0,
|
|
19509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19418
19510
|
sx: {
|
|
19419
19511
|
backgroundColor,
|
|
19420
19512
|
fontSize: "0.8rem",
|
|
@@ -19434,7 +19526,7 @@ var floatType = defineEasyType({
|
|
|
19434
19526
|
deserialize: (value) => parseFloat(value),
|
|
19435
19527
|
Renderer: (param) => {
|
|
19436
19528
|
let { value } = param;
|
|
19437
|
-
return /* @__PURE__ */ (0,
|
|
19529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
|
|
19438
19530
|
children: value
|
|
19439
19531
|
});
|
|
19440
19532
|
}
|
|
@@ -19448,7 +19540,7 @@ var intType = defineEasyType({
|
|
|
19448
19540
|
deserialize: (value) => parseFloat(value),
|
|
19449
19541
|
Renderer: (param) => {
|
|
19450
19542
|
let { value } = param;
|
|
19451
|
-
return /* @__PURE__ */ (0,
|
|
19543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
|
|
19452
19544
|
children: value
|
|
19453
19545
|
});
|
|
19454
19546
|
}
|
|
@@ -19461,16 +19553,16 @@ var bigIntType = defineEasyType({
|
|
|
19461
19553
|
deserialize: (value) => BigInt(value.replace(/\D/g, "")),
|
|
19462
19554
|
Renderer: (param) => {
|
|
19463
19555
|
let { value } = param;
|
|
19464
|
-
return /* @__PURE__ */ (0,
|
|
19556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
|
|
19465
19557
|
children: "".concat(value, "n")
|
|
19466
19558
|
});
|
|
19467
19559
|
}
|
|
19468
19560
|
});
|
|
19469
19561
|
var BaseIcon = (param) => {
|
|
19470
19562
|
let { d: d2, ...props } = param;
|
|
19471
|
-
return /* @__PURE__ */ (0,
|
|
19563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.SvgIcon, {
|
|
19472
19564
|
...props,
|
|
19473
|
-
children: /* @__PURE__ */ (0,
|
|
19565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("path", {
|
|
19474
19566
|
d: d2
|
|
19475
19567
|
})
|
|
19476
19568
|
});
|
|
@@ -19485,55 +19577,55 @@ var Edit = "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.3
|
|
|
19485
19577
|
var ExpandMore = "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z";
|
|
19486
19578
|
var Delete = "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z";
|
|
19487
19579
|
var AddBoxIcon = (props) => {
|
|
19488
|
-
return /* @__PURE__ */ (0,
|
|
19580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
|
|
19489
19581
|
d: AddBox,
|
|
19490
19582
|
...props
|
|
19491
19583
|
});
|
|
19492
19584
|
};
|
|
19493
19585
|
var CheckIcon = (props) => {
|
|
19494
|
-
return /* @__PURE__ */ (0,
|
|
19586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
|
|
19495
19587
|
d: Check,
|
|
19496
19588
|
...props
|
|
19497
19589
|
});
|
|
19498
19590
|
};
|
|
19499
19591
|
var ChevronRightIcon = (props) => {
|
|
19500
|
-
return /* @__PURE__ */ (0,
|
|
19592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
|
|
19501
19593
|
d: ChevronRight,
|
|
19502
19594
|
...props
|
|
19503
19595
|
});
|
|
19504
19596
|
};
|
|
19505
19597
|
var CircularArrowsIcon = (props) => {
|
|
19506
|
-
return /* @__PURE__ */ (0,
|
|
19598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
|
|
19507
19599
|
d: CircularArrows,
|
|
19508
19600
|
...props
|
|
19509
19601
|
});
|
|
19510
19602
|
};
|
|
19511
19603
|
var CloseIcon = (props) => {
|
|
19512
|
-
return /* @__PURE__ */ (0,
|
|
19604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
|
|
19513
19605
|
d: Close,
|
|
19514
19606
|
...props
|
|
19515
19607
|
});
|
|
19516
19608
|
};
|
|
19517
19609
|
var ContentCopyIcon = (props) => {
|
|
19518
|
-
return /* @__PURE__ */ (0,
|
|
19610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
|
|
19519
19611
|
d: ContentCopy,
|
|
19520
19612
|
...props
|
|
19521
19613
|
});
|
|
19522
19614
|
};
|
|
19523
19615
|
var EditIcon = (props) => {
|
|
19524
|
-
return /* @__PURE__ */ (0,
|
|
19616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
|
|
19525
19617
|
d: Edit,
|
|
19526
19618
|
...props
|
|
19527
19619
|
});
|
|
19528
19620
|
};
|
|
19529
19621
|
var ExpandMoreIcon = (props) => {
|
|
19530
|
-
return /* @__PURE__ */ (0,
|
|
19622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
|
|
19531
19623
|
d: ExpandMore,
|
|
19532
19624
|
...props
|
|
19533
19625
|
});
|
|
19534
19626
|
};
|
|
19535
19627
|
var DeleteIcon = (props) => {
|
|
19536
|
-
return /* @__PURE__ */ (0,
|
|
19628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BaseIcon, {
|
|
19537
19629
|
d: Delete,
|
|
19538
19630
|
...props
|
|
19539
19631
|
});
|
|
@@ -19572,7 +19664,7 @@ var PreObjectType = (props) => {
|
|
|
19572
19664
|
props.value
|
|
19573
19665
|
]);
|
|
19574
19666
|
const isTrap = useIsCycleReference(props.path, props.value);
|
|
19575
|
-
return /* @__PURE__ */ (0,
|
|
19667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, {
|
|
19576
19668
|
component: "span",
|
|
19577
19669
|
className: "data-object-start",
|
|
19578
19670
|
sx: {
|
|
@@ -19580,7 +19672,7 @@ var PreObjectType = (props) => {
|
|
|
19580
19672
|
},
|
|
19581
19673
|
children: [
|
|
19582
19674
|
isArrayLike ? arrayLb : objectLb,
|
|
19583
|
-
shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ (0,
|
|
19675
|
+
shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19584
19676
|
component: "span",
|
|
19585
19677
|
sx: {
|
|
19586
19678
|
pl: 0.5,
|
|
@@ -19590,16 +19682,16 @@ var PreObjectType = (props) => {
|
|
|
19590
19682
|
},
|
|
19591
19683
|
children: sizeOfValue
|
|
19592
19684
|
}),
|
|
19593
|
-
isTrap && !props.inspect && /* @__PURE__ */ (0,
|
|
19685
|
+
isTrap && !props.inspect && /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
|
|
19594
19686
|
children: [
|
|
19595
|
-
/* @__PURE__ */ (0,
|
|
19687
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CircularArrowsIcon, {
|
|
19596
19688
|
sx: {
|
|
19597
19689
|
fontSize: 12,
|
|
19598
19690
|
color: textColor,
|
|
19599
19691
|
mx: 0.5
|
|
19600
19692
|
}
|
|
19601
19693
|
}),
|
|
19602
|
-
/* @__PURE__ */ (0,
|
|
19694
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
|
|
19603
19695
|
sx: {
|
|
19604
19696
|
cursor: "pointer",
|
|
19605
19697
|
userSelect: "none"
|
|
@@ -19629,7 +19721,7 @@ var PostObjectType = (props) => {
|
|
|
19629
19721
|
props.path,
|
|
19630
19722
|
props.value
|
|
19631
19723
|
]);
|
|
19632
|
-
return /* @__PURE__ */ (0,
|
|
19724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, {
|
|
19633
19725
|
component: "span",
|
|
19634
19726
|
className: "data-object-end",
|
|
19635
19727
|
sx: {
|
|
@@ -19640,7 +19732,7 @@ var PostObjectType = (props) => {
|
|
|
19640
19732
|
},
|
|
19641
19733
|
children: [
|
|
19642
19734
|
isArrayLike ? arrayRb : objectRb,
|
|
19643
|
-
shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ (0,
|
|
19735
|
+
shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19644
19736
|
component: "span",
|
|
19645
19737
|
sx: {
|
|
19646
19738
|
pl: 0.5,
|
|
@@ -19680,7 +19772,7 @@ var ObjectType = (props) => {
|
|
|
19680
19772
|
...props.path,
|
|
19681
19773
|
key
|
|
19682
19774
|
];
|
|
19683
|
-
elements3.push(/* @__PURE__ */ (0,
|
|
19775
|
+
elements3.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
|
|
19684
19776
|
path,
|
|
19685
19777
|
value: value2,
|
|
19686
19778
|
prevValue: props.prevValue instanceof Map ? props.prevValue.get(k2) : void 0,
|
|
@@ -19696,7 +19788,7 @@ var ObjectType = (props) => {
|
|
|
19696
19788
|
while (true) {
|
|
19697
19789
|
const nextResult = iterator2.next();
|
|
19698
19790
|
var _nextResult_done;
|
|
19699
|
-
elements3.push(/* @__PURE__ */ (0,
|
|
19791
|
+
elements3.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
|
|
19700
19792
|
path: [
|
|
19701
19793
|
...props.path,
|
|
19702
19794
|
"iterator:".concat(count2)
|
|
@@ -19724,7 +19816,7 @@ var ObjectType = (props) => {
|
|
|
19724
19816
|
...props.path,
|
|
19725
19817
|
index
|
|
19726
19818
|
];
|
|
19727
|
-
return /* @__PURE__ */ (0,
|
|
19819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
|
|
19728
19820
|
path,
|
|
19729
19821
|
value: value2,
|
|
19730
19822
|
prevValue: Array.isArray(props.prevValue) ? props.prevValue[index] : void 0,
|
|
@@ -19733,7 +19825,7 @@ var ObjectType = (props) => {
|
|
|
19733
19825
|
});
|
|
19734
19826
|
if (value.length > displayLength) {
|
|
19735
19827
|
const rest = value.length - displayLength;
|
|
19736
|
-
elements4.push(/* @__PURE__ */ (0,
|
|
19828
|
+
elements4.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
|
|
19737
19829
|
sx: {
|
|
19738
19830
|
cursor: "pointer",
|
|
19739
19831
|
lineHeight: 1.5,
|
|
@@ -19756,7 +19848,7 @@ var ObjectType = (props) => {
|
|
|
19756
19848
|
const prevElements = Array.isArray(props.prevValue) ? segmentArray(props.prevValue, groupArraysAfterLength) : void 0;
|
|
19757
19849
|
const elementsLastIndex = elements3.length - 1;
|
|
19758
19850
|
return elements3.map((list, index) => {
|
|
19759
|
-
return /* @__PURE__ */ (0,
|
|
19851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
|
|
19760
19852
|
path: props.path,
|
|
19761
19853
|
value: list,
|
|
19762
19854
|
nestedIndex: index,
|
|
@@ -19783,7 +19875,7 @@ var ObjectType = (props) => {
|
|
|
19783
19875
|
...props.path,
|
|
19784
19876
|
key
|
|
19785
19877
|
];
|
|
19786
|
-
return /* @__PURE__ */ (0,
|
|
19878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
|
|
19787
19879
|
path,
|
|
19788
19880
|
value: value2,
|
|
19789
19881
|
prevValue: (_props_prevValue = props.prevValue) === null || _props_prevValue === void 0 ? void 0 : _props_prevValue[key],
|
|
@@ -19792,7 +19884,7 @@ var ObjectType = (props) => {
|
|
|
19792
19884
|
});
|
|
19793
19885
|
if (entries.length > displayLength) {
|
|
19794
19886
|
const rest = entries.length - displayLength;
|
|
19795
|
-
elements2.push(/* @__PURE__ */ (0,
|
|
19887
|
+
elements2.push(/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
|
|
19796
19888
|
sx: {
|
|
19797
19889
|
cursor: "pointer",
|
|
19798
19890
|
lineHeight: 1.5,
|
|
@@ -19830,7 +19922,7 @@ var ObjectType = (props) => {
|
|
|
19830
19922
|
if (isEmptyValue) {
|
|
19831
19923
|
return null;
|
|
19832
19924
|
}
|
|
19833
|
-
return /* @__PURE__ */ (0,
|
|
19925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19834
19926
|
className: "data-object",
|
|
19835
19927
|
sx: {
|
|
19836
19928
|
display: props.inspect ? "block" : "inline-block",
|
|
@@ -19839,7 +19931,7 @@ var ObjectType = (props) => {
|
|
|
19839
19931
|
color: keyColor,
|
|
19840
19932
|
borderLeft: props.inspect ? "1px solid ".concat(borderColor) : "none"
|
|
19841
19933
|
},
|
|
19842
|
-
children: props.inspect ? elements : !isTrap && /* @__PURE__ */ (0,
|
|
19934
|
+
children: props.inspect ? elements : !isTrap && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19843
19935
|
component: "span",
|
|
19844
19936
|
className: "data-object-body",
|
|
19845
19937
|
onClick: () => props.setInspect(true),
|
|
@@ -19871,7 +19963,7 @@ var stringType = defineEasyType({
|
|
|
19871
19963
|
const collapseStringsAfterLength = useJsonViewerStore((store) => store.collapseStringsAfterLength);
|
|
19872
19964
|
const value = showRest ? props.value : props.value.slice(0, collapseStringsAfterLength);
|
|
19873
19965
|
const hasRest = props.value.length > collapseStringsAfterLength;
|
|
19874
|
-
return /* @__PURE__ */ (0,
|
|
19966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, {
|
|
19875
19967
|
component: "span",
|
|
19876
19968
|
sx: {
|
|
19877
19969
|
overflowWrap: "anywhere",
|
|
@@ -19889,7 +19981,7 @@ var stringType = defineEasyType({
|
|
|
19889
19981
|
children: [
|
|
19890
19982
|
'"',
|
|
19891
19983
|
value,
|
|
19892
|
-
hasRest && !showRest && /* @__PURE__ */ (0,
|
|
19984
|
+
hasRest && !showRest && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19893
19985
|
component: "span",
|
|
19894
19986
|
sx: {
|
|
19895
19987
|
padding: 0.5
|
|
@@ -19908,7 +20000,7 @@ var undefinedType = defineEasyType({
|
|
|
19908
20000
|
displayTypeLabel: false,
|
|
19909
20001
|
Renderer: () => {
|
|
19910
20002
|
const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
|
|
19911
|
-
return /* @__PURE__ */ (0,
|
|
20003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19912
20004
|
sx: {
|
|
19913
20005
|
fontSize: "0.7rem",
|
|
19914
20006
|
backgroundColor,
|
|
@@ -19989,7 +20081,7 @@ function useTypeComponents(value, path) {
|
|
|
19989
20081
|
registry
|
|
19990
20082
|
]);
|
|
19991
20083
|
}
|
|
19992
|
-
var IconBox = (props) => /* @__PURE__ */ (0,
|
|
20084
|
+
var IconBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
19993
20085
|
component: "span",
|
|
19994
20086
|
...props,
|
|
19995
20087
|
sx: {
|
|
@@ -20175,18 +20267,18 @@ var DataKeyPair = (props) => {
|
|
|
20175
20267
|
]);
|
|
20176
20268
|
const actionIcons = (0, import_react54.useMemo)(() => {
|
|
20177
20269
|
if (editing) {
|
|
20178
|
-
return /* @__PURE__ */ (0,
|
|
20270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
|
|
20179
20271
|
children: [
|
|
20180
|
-
/* @__PURE__ */ (0,
|
|
20181
|
-
children: /* @__PURE__ */ (0,
|
|
20272
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
|
|
20273
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CloseIcon, {
|
|
20182
20274
|
sx: {
|
|
20183
20275
|
fontSize: ".8rem"
|
|
20184
20276
|
},
|
|
20185
20277
|
onClick: abortEditing
|
|
20186
20278
|
})
|
|
20187
20279
|
}),
|
|
20188
|
-
/* @__PURE__ */ (0,
|
|
20189
|
-
children: /* @__PURE__ */ (0,
|
|
20280
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
|
|
20281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CheckIcon, {
|
|
20190
20282
|
sx: {
|
|
20191
20283
|
fontSize: ".8rem"
|
|
20192
20284
|
},
|
|
@@ -20196,9 +20288,9 @@ var DataKeyPair = (props) => {
|
|
|
20196
20288
|
]
|
|
20197
20289
|
});
|
|
20198
20290
|
}
|
|
20199
|
-
return /* @__PURE__ */ (0,
|
|
20291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
|
|
20200
20292
|
children: [
|
|
20201
|
-
enableClipboard && /* @__PURE__ */ (0,
|
|
20293
|
+
enableClipboard && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
|
|
20202
20294
|
onClick: (event) => {
|
|
20203
20295
|
event.preventDefault();
|
|
20204
20296
|
try {
|
|
@@ -20207,41 +20299,41 @@ var DataKeyPair = (props) => {
|
|
|
20207
20299
|
console.error(e2);
|
|
20208
20300
|
}
|
|
20209
20301
|
},
|
|
20210
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
20302
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(CheckIcon, {
|
|
20211
20303
|
sx: {
|
|
20212
20304
|
fontSize: ".8rem"
|
|
20213
20305
|
}
|
|
20214
|
-
}) : /* @__PURE__ */ (0,
|
|
20306
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ContentCopyIcon, {
|
|
20215
20307
|
sx: {
|
|
20216
20308
|
fontSize: ".8rem"
|
|
20217
20309
|
}
|
|
20218
20310
|
})
|
|
20219
20311
|
}),
|
|
20220
|
-
Editor && editable && serialize && deserialize && /* @__PURE__ */ (0,
|
|
20312
|
+
Editor && editable && serialize && deserialize && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
|
|
20221
20313
|
onClick: startEditing,
|
|
20222
|
-
children: /* @__PURE__ */ (0,
|
|
20314
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(EditIcon, {
|
|
20223
20315
|
sx: {
|
|
20224
20316
|
fontSize: ".8rem"
|
|
20225
20317
|
}
|
|
20226
20318
|
})
|
|
20227
20319
|
}),
|
|
20228
|
-
enableAdd && /* @__PURE__ */ (0,
|
|
20320
|
+
enableAdd && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
|
|
20229
20321
|
onClick: (event) => {
|
|
20230
20322
|
event.preventDefault();
|
|
20231
20323
|
onAdd === null || onAdd === void 0 ? void 0 : onAdd(path);
|
|
20232
20324
|
},
|
|
20233
|
-
children: /* @__PURE__ */ (0,
|
|
20325
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(AddBoxIcon, {
|
|
20234
20326
|
sx: {
|
|
20235
20327
|
fontSize: ".8rem"
|
|
20236
20328
|
}
|
|
20237
20329
|
})
|
|
20238
20330
|
}),
|
|
20239
|
-
enableDelete && /* @__PURE__ */ (0,
|
|
20331
|
+
enableDelete && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IconBox, {
|
|
20240
20332
|
onClick: (event) => {
|
|
20241
20333
|
event.preventDefault();
|
|
20242
20334
|
onDelete === null || onDelete === void 0 ? void 0 : onDelete(path, value);
|
|
20243
20335
|
},
|
|
20244
|
-
children: /* @__PURE__ */ (0,
|
|
20336
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DeleteIcon, {
|
|
20245
20337
|
sx: {
|
|
20246
20338
|
fontSize: ".9rem"
|
|
20247
20339
|
}
|
|
@@ -20289,7 +20381,7 @@ var DataKeyPair = (props) => {
|
|
|
20289
20381
|
prevValue,
|
|
20290
20382
|
nestedIndex
|
|
20291
20383
|
]);
|
|
20292
|
-
return /* @__PURE__ */ (0,
|
|
20384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material13.Box, {
|
|
20293
20385
|
className: "data-key-pair",
|
|
20294
20386
|
"data-testid": "data-key-pair" + path.join("."),
|
|
20295
20387
|
sx: {
|
|
@@ -20301,7 +20393,7 @@ var DataKeyPair = (props) => {
|
|
|
20301
20393
|
nestedIndex
|
|
20302
20394
|
]),
|
|
20303
20395
|
children: [
|
|
20304
|
-
/* @__PURE__ */ (0,
|
|
20396
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DataBox, {
|
|
20305
20397
|
component: "span",
|
|
20306
20398
|
className: "data-key",
|
|
20307
20399
|
sx: {
|
|
@@ -20322,7 +20414,7 @@ var DataKeyPair = (props) => {
|
|
|
20322
20414
|
setInspect
|
|
20323
20415
|
]),
|
|
20324
20416
|
children: [
|
|
20325
|
-
expandable ? inspect ? /* @__PURE__ */ (0,
|
|
20417
|
+
expandable ? inspect ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ExpandMoreIcon, {
|
|
20326
20418
|
className: "data-key-toggle-expanded",
|
|
20327
20419
|
sx: {
|
|
20328
20420
|
fontSize: ".8rem",
|
|
@@ -20330,7 +20422,7 @@ var DataKeyPair = (props) => {
|
|
|
20330
20422
|
cursor: "pointer"
|
|
20331
20423
|
}
|
|
20332
20424
|
}
|
|
20333
|
-
}) : /* @__PURE__ */ (0,
|
|
20425
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ChevronRightIcon, {
|
|
20334
20426
|
className: "data-key-toggle-collapsed",
|
|
20335
20427
|
sx: {
|
|
20336
20428
|
fontSize: ".8rem",
|
|
@@ -20339,44 +20431,44 @@ var DataKeyPair = (props) => {
|
|
|
20339
20431
|
}
|
|
20340
20432
|
}
|
|
20341
20433
|
}) : null,
|
|
20342
|
-
/* @__PURE__ */ (0,
|
|
20434
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
20343
20435
|
ref: highlightContainer,
|
|
20344
20436
|
className: "data-key-key",
|
|
20345
20437
|
component: "span",
|
|
20346
|
-
children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ (0,
|
|
20438
|
+
children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
|
|
20347
20439
|
children: [
|
|
20348
20440
|
'"',
|
|
20349
20441
|
rootName,
|
|
20350
20442
|
'"'
|
|
20351
20443
|
]
|
|
20352
|
-
}) : /* @__PURE__ */ (0,
|
|
20444
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
|
|
20353
20445
|
children: rootName
|
|
20354
|
-
}) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ (0,
|
|
20446
|
+
}) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(KeyRenderer, {
|
|
20355
20447
|
...downstreamProps
|
|
20356
|
-
}) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ (0,
|
|
20448
|
+
}) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
20357
20449
|
component: "span",
|
|
20358
20450
|
style: {
|
|
20359
20451
|
color: numberKeyColor,
|
|
20360
20452
|
userSelect: isNumberKey ? "none" : "auto"
|
|
20361
20453
|
},
|
|
20362
20454
|
children: key
|
|
20363
|
-
}) : quotesOnKeys ? /* @__PURE__ */ (0,
|
|
20455
|
+
}) : quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, {
|
|
20364
20456
|
children: [
|
|
20365
20457
|
'"',
|
|
20366
20458
|
key,
|
|
20367
20459
|
'"'
|
|
20368
20460
|
]
|
|
20369
|
-
}) : /* @__PURE__ */ (0,
|
|
20461
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, {
|
|
20370
20462
|
children: key
|
|
20371
20463
|
}))
|
|
20372
20464
|
}),
|
|
20373
|
-
isRoot ? rootName !== false && /* @__PURE__ */ (0,
|
|
20465
|
+
isRoot ? rootName !== false && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
|
|
20374
20466
|
className: "data-key-colon",
|
|
20375
20467
|
sx: {
|
|
20376
20468
|
mr: 0.5
|
|
20377
20469
|
},
|
|
20378
20470
|
children: ":"
|
|
20379
|
-
}) : nestedIndex === void 0 && /* @__PURE__ */ (0,
|
|
20471
|
+
}) : nestedIndex === void 0 && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
|
|
20380
20472
|
className: "data-key-colon",
|
|
20381
20473
|
sx: {
|
|
20382
20474
|
mr: 0.5,
|
|
@@ -20387,29 +20479,29 @@ var DataKeyPair = (props) => {
|
|
|
20387
20479
|
},
|
|
20388
20480
|
children: ":"
|
|
20389
20481
|
}),
|
|
20390
|
-
PreComponent && /* @__PURE__ */ (0,
|
|
20482
|
+
PreComponent && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PreComponent, {
|
|
20391
20483
|
...downstreamProps
|
|
20392
20484
|
}),
|
|
20393
20485
|
isHover && expandable && inspect && actionIcons
|
|
20394
20486
|
]
|
|
20395
20487
|
}),
|
|
20396
|
-
editing && editable ? Editor && /* @__PURE__ */ (0,
|
|
20488
|
+
editing && editable ? Editor && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Editor, {
|
|
20397
20489
|
path,
|
|
20398
20490
|
value: tempValue,
|
|
20399
20491
|
setValue: setTempValue,
|
|
20400
20492
|
abortEditing,
|
|
20401
20493
|
commitEditing
|
|
20402
|
-
}) : Component ? /* @__PURE__ */ (0,
|
|
20494
|
+
}) : Component ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Component, {
|
|
20403
20495
|
...downstreamProps
|
|
20404
|
-
}) : /* @__PURE__ */ (0,
|
|
20496
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, {
|
|
20405
20497
|
component: "span",
|
|
20406
20498
|
className: "data-value-fallback",
|
|
20407
20499
|
children: "fallback: ".concat(value)
|
|
20408
20500
|
}),
|
|
20409
|
-
PostComponent && /* @__PURE__ */ (0,
|
|
20501
|
+
PostComponent && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PostComponent, {
|
|
20410
20502
|
...downstreamProps
|
|
20411
20503
|
}),
|
|
20412
|
-
!last && displayComma && /* @__PURE__ */ (0,
|
|
20504
|
+
!last && displayComma && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataBox, {
|
|
20413
20505
|
children: ","
|
|
20414
20506
|
}),
|
|
20415
20507
|
isHover && expandable && !inspect && actionIcons,
|
|
@@ -20529,7 +20621,7 @@ var JsonViewerInner = (props) => {
|
|
|
20529
20621
|
const onMouseLeave = (0, import_react54.useCallback)(() => setHover(null), [
|
|
20530
20622
|
setHover
|
|
20531
20623
|
]);
|
|
20532
|
-
return /* @__PURE__ */ (0,
|
|
20624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Paper, {
|
|
20533
20625
|
elevation: 0,
|
|
20534
20626
|
className: clsx(themeCls, props.className),
|
|
20535
20627
|
style: props.style,
|
|
@@ -20540,7 +20632,7 @@ var JsonViewerInner = (props) => {
|
|
|
20540
20632
|
...props.sx
|
|
20541
20633
|
},
|
|
20542
20634
|
onMouseLeave,
|
|
20543
|
-
children: /* @__PURE__ */ (0,
|
|
20635
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DataKeyPair, {
|
|
20544
20636
|
value,
|
|
20545
20637
|
prevValue,
|
|
20546
20638
|
path: emptyPath,
|
|
@@ -20565,7 +20657,7 @@ var JsonViewer = function JsonViewer2(props) {
|
|
|
20565
20657
|
const theme = (0, import_react54.useMemo)(() => {
|
|
20566
20658
|
const backgroundColor = typeof themeType === "object" ? themeType.base00 : themeType === "dark" ? darkColorspace.base00 : lightColorspace.base00;
|
|
20567
20659
|
const foregroundColor = typeof themeType === "object" ? themeType.base07 : themeType === "dark" ? darkColorspace.base07 : lightColorspace.base07;
|
|
20568
|
-
return (0,
|
|
20660
|
+
return (0, import_material13.createTheme)({
|
|
20569
20661
|
components: {
|
|
20570
20662
|
MuiPaper: {
|
|
20571
20663
|
styleOverrides: {
|
|
@@ -20592,13 +20684,13 @@ var JsonViewer = function JsonViewer2(props) {
|
|
|
20592
20684
|
};
|
|
20593
20685
|
const jsonViewerStore = (0, import_react54.useMemo)(() => createJsonViewerStore(props), []);
|
|
20594
20686
|
const typeRegistryStore = (0, import_react54.useMemo)(() => createTypeRegistryStore(), []);
|
|
20595
|
-
return /* @__PURE__ */ (0,
|
|
20687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.ThemeProvider, {
|
|
20596
20688
|
theme,
|
|
20597
|
-
children: /* @__PURE__ */ (0,
|
|
20689
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(TypeRegistryStoreContext.Provider, {
|
|
20598
20690
|
value: typeRegistryStore,
|
|
20599
|
-
children: /* @__PURE__ */ (0,
|
|
20691
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(JsonViewerStoreContext.Provider, {
|
|
20600
20692
|
value: jsonViewerStore,
|
|
20601
|
-
children: /* @__PURE__ */ (0,
|
|
20693
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(JsonViewerInner, {
|
|
20602
20694
|
...mixedProps
|
|
20603
20695
|
})
|
|
20604
20696
|
})
|
|
@@ -20608,7 +20700,7 @@ var JsonViewer = function JsonViewer2(props) {
|
|
|
20608
20700
|
|
|
20609
20701
|
// src/components/event-details/payload-viewer.tsx
|
|
20610
20702
|
var import_react55 = require("react");
|
|
20611
|
-
var
|
|
20703
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
20612
20704
|
function tryParseJson(value) {
|
|
20613
20705
|
if (typeof value !== "string") {
|
|
20614
20706
|
return value;
|
|
@@ -20620,8 +20712,8 @@ function tryParseJson(value) {
|
|
|
20620
20712
|
}
|
|
20621
20713
|
}
|
|
20622
20714
|
var PayloadViewer = (0, import_react55.memo)(({ sx, testId, value }) => {
|
|
20623
|
-
const theme = (0,
|
|
20624
|
-
return /* @__PURE__ */ (0,
|
|
20715
|
+
const theme = (0, import_material14.useTheme)();
|
|
20716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, { "data-testid": testId, sx: { backgroundColor: "background.default", borderRadius: 1, fontSize: 12, overflow: "auto", p: 1, ...sx }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
20625
20717
|
JsonViewer,
|
|
20626
20718
|
{
|
|
20627
20719
|
displayDataTypes: false,
|
|
@@ -20635,10 +20727,10 @@ var PayloadViewer = (0, import_react55.memo)(({ sx, testId, value }) => {
|
|
|
20635
20727
|
});
|
|
20636
20728
|
|
|
20637
20729
|
// src/components/event-details/event-detail.tsx
|
|
20638
|
-
var
|
|
20639
|
-
var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0,
|
|
20640
|
-
/* @__PURE__ */ (0,
|
|
20641
|
-
/* @__PURE__ */ (0,
|
|
20730
|
+
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
20731
|
+
var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
|
|
20732
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
|
|
20733
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Typography, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
|
|
20642
20734
|
] });
|
|
20643
20735
|
var EventMessage = ({ event }) => {
|
|
20644
20736
|
const [isOpen, setIsOpen] = (0, import_react56.useState)(false);
|
|
@@ -20670,21 +20762,21 @@ var EventMessage = ({ event }) => {
|
|
|
20670
20762
|
() => isOverflowing || hasAdditionalContent,
|
|
20671
20763
|
[isOverflowing, hasAdditionalContent]
|
|
20672
20764
|
);
|
|
20673
|
-
return /* @__PURE__ */ (0,
|
|
20674
|
-
/* @__PURE__ */ (0,
|
|
20675
|
-
Boolean(shouldShowToggle) && /* @__PURE__ */ (0,
|
|
20676
|
-
|
|
20765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Box, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
20766
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Box, { sx: { alignItems: "center", display: "flex" }, children: [
|
|
20767
|
+
Boolean(shouldShowToggle) && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
20768
|
+
import_material15.IconButton,
|
|
20677
20769
|
{
|
|
20678
20770
|
onClick: () => {
|
|
20679
20771
|
setIsOpen(!isOpen);
|
|
20680
20772
|
},
|
|
20681
20773
|
size: "small",
|
|
20682
20774
|
sx: { mr: 1, p: 0 },
|
|
20683
|
-
children: isOpen ? /* @__PURE__ */ (0,
|
|
20775
|
+
children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material8.KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material8.KeyboardArrowRight, { sx: { fontSize: 16 } })
|
|
20684
20776
|
}
|
|
20685
20777
|
),
|
|
20686
|
-
/* @__PURE__ */ (0,
|
|
20687
|
-
|
|
20778
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
20779
|
+
import_material15.Typography,
|
|
20688
20780
|
{
|
|
20689
20781
|
ref: textReference,
|
|
20690
20782
|
sx: {
|
|
@@ -20701,12 +20793,12 @@ var EventMessage = ({ event }) => {
|
|
|
20701
20793
|
}
|
|
20702
20794
|
)
|
|
20703
20795
|
] }),
|
|
20704
|
-
isOpen && /* @__PURE__ */ (0,
|
|
20705
|
-
Boolean(parsedMessage.message) && /* @__PURE__ */ (0,
|
|
20706
|
-
Boolean(parsedMessage.details) && /* @__PURE__ */ (0,
|
|
20796
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Box, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: isIAMPolicyEvent ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(IAMEventDetail, { event }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_jsx_runtime138.Fragment, { children: [
|
|
20797
|
+
Boolean(parsedMessage.message) && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(DetailRow2, { content: parsedMessage.message, label: "Message" }),
|
|
20798
|
+
Boolean(parsedMessage.details) && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
20707
20799
|
DetailRow2,
|
|
20708
20800
|
{
|
|
20709
|
-
content: /* @__PURE__ */ (0,
|
|
20801
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(PayloadViewer, { sx: { px: 0 }, value: tryParseJson(parsedMessage.details) }),
|
|
20710
20802
|
label: "Details"
|
|
20711
20803
|
}
|
|
20712
20804
|
)
|
|
@@ -20738,15 +20830,15 @@ var EventDetail = ({
|
|
|
20738
20830
|
type
|
|
20739
20831
|
}) => {
|
|
20740
20832
|
if (type === "permission") {
|
|
20741
|
-
return /* @__PURE__ */ (0,
|
|
20833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(IAMPermissionDetail, { events });
|
|
20742
20834
|
}
|
|
20743
20835
|
const eventLevel = getEventLevelFromGroup(type);
|
|
20744
|
-
return /* @__PURE__ */ (0,
|
|
20745
|
-
/* @__PURE__ */ (0,
|
|
20746
|
-
/* @__PURE__ */ (0,
|
|
20747
|
-
/* @__PURE__ */ (0,
|
|
20836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Box, { children: [
|
|
20837
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Box, { sx: { alignItems: "center", display: "flex", mb: 0.5 }, children: [
|
|
20838
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(StatusIcon2, { errorLevel: eventLevel }),
|
|
20839
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Typography, { color: "text.secondary", sx: { fontWeight: 600, ml: 0.5 }, variant: "caption", children: displayText })
|
|
20748
20840
|
] }),
|
|
20749
|
-
/* @__PURE__ */ (0,
|
|
20841
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Box, { sx: { maxWidth: "100%", mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(EventMessage, { event }) }, `${event.span_id}-${event.event_id}`)) })
|
|
20750
20842
|
] });
|
|
20751
20843
|
};
|
|
20752
20844
|
|
|
@@ -25128,16 +25220,16 @@ var ProtocolLib = class {
|
|
|
25128
25220
|
if (output !== void 0 && queryErrorHeader != null) {
|
|
25129
25221
|
const [Code, Type] = queryErrorHeader.split(";");
|
|
25130
25222
|
const entries = Object.entries(output);
|
|
25131
|
-
const
|
|
25223
|
+
const Error4 = {
|
|
25132
25224
|
Code,
|
|
25133
25225
|
Type
|
|
25134
25226
|
};
|
|
25135
|
-
Object.assign(output,
|
|
25227
|
+
Object.assign(output, Error4);
|
|
25136
25228
|
for (const [k2, v2] of entries) {
|
|
25137
|
-
|
|
25229
|
+
Error4[k2 === "message" ? "Message" : k2] = v2;
|
|
25138
25230
|
}
|
|
25139
|
-
delete
|
|
25140
|
-
output.Error =
|
|
25231
|
+
delete Error4.__type;
|
|
25232
|
+
output.Error = Error4;
|
|
25141
25233
|
}
|
|
25142
25234
|
}
|
|
25143
25235
|
queryCompatOutput(queryCompatErrorData, errorData) {
|
|
@@ -30437,9 +30529,9 @@ var QueryStatus = {
|
|
|
30437
30529
|
};
|
|
30438
30530
|
|
|
30439
30531
|
// src/components/event-details/lambda-invoke-logs-section.tsx
|
|
30440
|
-
var
|
|
30532
|
+
var import_material16 = require("@mui/material");
|
|
30441
30533
|
var import_react57 = require("react");
|
|
30442
|
-
var
|
|
30534
|
+
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
30443
30535
|
var POLL_INTERVAL_MS = 1e3;
|
|
30444
30536
|
async function pollQueryResults(client, queryId) {
|
|
30445
30537
|
return client.send(new GetQueryResultsCommand({ queryId }));
|
|
@@ -30529,30 +30621,30 @@ function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, en
|
|
|
30529
30621
|
var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, region, requestId, startTimeNano }) => {
|
|
30530
30622
|
const { error, loading, logs } = useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano);
|
|
30531
30623
|
if (loading) {
|
|
30532
|
-
return /* @__PURE__ */ (0,
|
|
30533
|
-
/* @__PURE__ */ (0,
|
|
30534
|
-
/* @__PURE__ */ (0,
|
|
30624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material16.Stack, { alignItems: "center", direction: "row", spacing: 1, children: [
|
|
30625
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.CircularProgress, { size: 14 }),
|
|
30626
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
|
|
30535
30627
|
] });
|
|
30536
30628
|
}
|
|
30537
30629
|
if (error !== void 0) {
|
|
30538
|
-
return /* @__PURE__ */ (0,
|
|
30630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { color: "error", variant: "body2", children: error.message });
|
|
30539
30631
|
}
|
|
30540
30632
|
if (logs.length === 0) {
|
|
30541
|
-
return /* @__PURE__ */ (0,
|
|
30633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { color: "text.secondary", variant: "body2", children: "No logs found for this invocation." });
|
|
30542
30634
|
}
|
|
30543
|
-
return /* @__PURE__ */ (0,
|
|
30635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Box, { sx: { backgroundColor: (theme) => theme.palette.background.default, borderRadius: 1, p: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("pre", { style: { margin: 0, overflow: "auto" }, children: logs.map((log) => /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { variant: "body2", children: `[${log.timestamp}] ${log.message}` }, log.ptr)) }) });
|
|
30544
30636
|
};
|
|
30545
30637
|
|
|
30546
30638
|
// src/components/event-details/toggle-section.tsx
|
|
30547
|
-
var
|
|
30548
|
-
var
|
|
30639
|
+
var import_icons_material9 = require("@mui/icons-material");
|
|
30640
|
+
var import_material17 = require("@mui/material");
|
|
30549
30641
|
var import_react58 = require("react");
|
|
30550
|
-
var
|
|
30642
|
+
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
30551
30643
|
var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
|
|
30552
30644
|
const [isOpen, setIsOpen] = (0, import_react58.useState)(initialOpen);
|
|
30553
|
-
return /* @__PURE__ */ (0,
|
|
30554
|
-
/* @__PURE__ */ (0,
|
|
30555
|
-
|
|
30645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { sx: { mt: 4 }, children: [
|
|
30646
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
30647
|
+
import_material17.Box,
|
|
30556
30648
|
{
|
|
30557
30649
|
onClick: () => {
|
|
30558
30650
|
setIsOpen(!isOpen);
|
|
@@ -30565,8 +30657,8 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
|
|
|
30565
30657
|
mb: 1
|
|
30566
30658
|
},
|
|
30567
30659
|
children: [
|
|
30568
|
-
/* @__PURE__ */ (0,
|
|
30569
|
-
|
|
30660
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
30661
|
+
import_material17.Box,
|
|
30570
30662
|
{
|
|
30571
30663
|
role: "button",
|
|
30572
30664
|
sx: {
|
|
@@ -30575,23 +30667,23 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
|
|
|
30575
30667
|
gap: 1
|
|
30576
30668
|
},
|
|
30577
30669
|
children: [
|
|
30578
|
-
/* @__PURE__ */ (0,
|
|
30579
|
-
isOpen ? /* @__PURE__ */ (0,
|
|
30670
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
|
|
30671
|
+
isOpen ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material9.KeyboardArrowDown, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material9.KeyboardArrowRight, { sx: { color: "text.secondary", height: 20, width: 20 } })
|
|
30580
30672
|
]
|
|
30581
30673
|
}
|
|
30582
30674
|
),
|
|
30583
|
-
action !== false && /* @__PURE__ */ (0,
|
|
30675
|
+
action !== false && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Box, { onClick: (event) => {
|
|
30584
30676
|
event.stopPropagation();
|
|
30585
30677
|
}, children: action })
|
|
30586
30678
|
]
|
|
30587
30679
|
}
|
|
30588
30680
|
),
|
|
30589
|
-
isOpen && /* @__PURE__ */ (0,
|
|
30681
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Box, { children })
|
|
30590
30682
|
] });
|
|
30591
30683
|
};
|
|
30592
30684
|
|
|
30593
30685
|
// src/components/event-details/event-details.tsx
|
|
30594
|
-
var
|
|
30686
|
+
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
30595
30687
|
var checkIsLambdaInvoke = (span) => {
|
|
30596
30688
|
if (span.service_name !== "lambda") {
|
|
30597
30689
|
return false;
|
|
@@ -30612,7 +30704,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
30612
30704
|
);
|
|
30613
30705
|
const [parseNestedJson, setParseNestedJson] = (0, import_react59.useState)(true);
|
|
30614
30706
|
if (!selectedEvent) {
|
|
30615
|
-
return /* @__PURE__ */ (0,
|
|
30707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Box, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { color: "text.secondary", variant: "body2", children: "Select an event to view details" }) });
|
|
30616
30708
|
}
|
|
30617
30709
|
const isLambdaInvoke = checkIsLambdaInvoke(selectedEvent);
|
|
30618
30710
|
const isSqsSendMessage = checkIsSqsSendMessage(selectedEvent);
|
|
@@ -30635,9 +30727,9 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
30635
30727
|
const exceptionPayload = tryParseJson(selectedEvent.attributes?.["localstack.aws.service.exception"]);
|
|
30636
30728
|
const hasPayloads = requestPayload !== void 0 || responsePayload !== void 0 || exceptionPayload !== void 0 || isResponseSuppressed;
|
|
30637
30729
|
const duration = selectedEvent.end_time_unix_nano ? ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString() : void 0;
|
|
30638
|
-
return /* @__PURE__ */ (0,
|
|
30639
|
-
/* @__PURE__ */ (0,
|
|
30640
|
-
|
|
30730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { "data-testid": EVENT_DETAILS_TEST_ID, sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
30731
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
30732
|
+
import_material18.Box,
|
|
30641
30733
|
{
|
|
30642
30734
|
sx: {
|
|
30643
30735
|
alignItems: "center",
|
|
@@ -30649,64 +30741,64 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
30649
30741
|
py: 1
|
|
30650
30742
|
},
|
|
30651
30743
|
children: [
|
|
30652
|
-
/* @__PURE__ */ (0,
|
|
30653
|
-
onClose && /* @__PURE__ */ (0,
|
|
30744
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
|
|
30745
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.IconButton, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material10.Close, {}) })
|
|
30654
30746
|
]
|
|
30655
30747
|
}
|
|
30656
30748
|
),
|
|
30657
|
-
/* @__PURE__ */ (0,
|
|
30658
|
-
/* @__PURE__ */ (0,
|
|
30659
|
-
/* @__PURE__ */ (0,
|
|
30660
|
-
/* @__PURE__ */ (0,
|
|
30661
|
-
/* @__PURE__ */ (0,
|
|
30662
|
-
/* @__PURE__ */ (0,
|
|
30749
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Box, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Stack, { spacing: 2, children: [
|
|
30750
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Stack, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
|
|
30751
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
|
|
30752
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30753
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
|
|
30754
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_SERVICE_NAME_TEST_ID, variant: "body2", children: getServiceDisplayName(selectedEvent.service_name) })
|
|
30663
30755
|
] }),
|
|
30664
|
-
/* @__PURE__ */ (0,
|
|
30665
|
-
/* @__PURE__ */ (0,
|
|
30666
|
-
/* @__PURE__ */ (0,
|
|
30756
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30757
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Action" }),
|
|
30758
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_OPERATION_NAME_TEST_ID, variant: "body2", children: selectedEvent.operation_name })
|
|
30667
30759
|
] })
|
|
30668
30760
|
] }),
|
|
30669
|
-
/* @__PURE__ */ (0,
|
|
30670
|
-
/* @__PURE__ */ (0,
|
|
30671
|
-
/* @__PURE__ */ (0,
|
|
30672
|
-
/* @__PURE__ */ (0,
|
|
30761
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { sx: cfnResourceType ? { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" } : void 0, children: [
|
|
30762
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30763
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
|
|
30764
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_RESOURCE_NAME_TEST_ID, variant: "body2", children: selectedEvent.resource_name })
|
|
30673
30765
|
] }),
|
|
30674
|
-
Boolean(cfnResourceType) && /* @__PURE__ */ (0,
|
|
30675
|
-
/* @__PURE__ */ (0,
|
|
30676
|
-
/* @__PURE__ */ (0,
|
|
30766
|
+
Boolean(cfnResourceType) && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30767
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource Type" }),
|
|
30768
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_CFN_RESOURCE_TYPE_TEST_ID, variant: "body2", children: cfnResourceType })
|
|
30677
30769
|
] })
|
|
30678
30770
|
] }),
|
|
30679
|
-
Boolean(resourceArn) && /* @__PURE__ */ (0,
|
|
30680
|
-
/* @__PURE__ */ (0,
|
|
30681
|
-
/* @__PURE__ */ (0,
|
|
30771
|
+
Boolean(resourceArn) && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30772
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource ARN" }),
|
|
30773
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_RESOURCE_ARN_TEST_ID, variant: "body2", children: resourceArn })
|
|
30682
30774
|
] }),
|
|
30683
|
-
/* @__PURE__ */ (0,
|
|
30684
|
-
/* @__PURE__ */ (0,
|
|
30685
|
-
/* @__PURE__ */ (0,
|
|
30686
|
-
/* @__PURE__ */ (0,
|
|
30775
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "1.3fr 1fr" }, children: [
|
|
30776
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30777
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Account" }),
|
|
30778
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_ACCOUNT_TEST_ID, variant: "body2", children: selectedEvent.account_id })
|
|
30687
30779
|
] }),
|
|
30688
|
-
/* @__PURE__ */ (0,
|
|
30689
|
-
/* @__PURE__ */ (0,
|
|
30690
|
-
/* @__PURE__ */ (0,
|
|
30780
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30781
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
|
|
30782
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_REGION_TEST_ID, variant: "body2", children: selectedEvent.region })
|
|
30691
30783
|
] })
|
|
30692
30784
|
] }),
|
|
30693
|
-
/* @__PURE__ */ (0,
|
|
30694
|
-
/* @__PURE__ */ (0,
|
|
30695
|
-
/* @__PURE__ */ (0,
|
|
30696
|
-
/* @__PURE__ */ (0,
|
|
30785
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: duration === void 0 ? "1fr" : "1.3fr 1fr" }, children: [
|
|
30786
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30787
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
|
|
30788
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_START_TIME_TEST_ID, variant: "body2", children: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
|
|
30697
30789
|
] }),
|
|
30698
|
-
duration !== void 0 && /* @__PURE__ */ (0,
|
|
30699
|
-
/* @__PURE__ */ (0,
|
|
30700
|
-
/* @__PURE__ */ (0,
|
|
30790
|
+
duration !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30791
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
|
|
30792
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Typography, { "data-testid": EVENT_DETAILS_DURATION_TEST_ID, variant: "body2", children: [
|
|
30701
30793
|
duration,
|
|
30702
30794
|
"ms"
|
|
30703
30795
|
] })
|
|
30704
30796
|
] })
|
|
30705
30797
|
] }),
|
|
30706
|
-
/* @__PURE__ */ (0,
|
|
30707
|
-
/* @__PURE__ */ (0,
|
|
30708
|
-
/* @__PURE__ */ (0,
|
|
30709
|
-
|
|
30798
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30799
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
|
|
30800
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Stack, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 1, sx: { mb: eventGroups.errors || eventGroups.warnings ? 1 : 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
30801
|
+
import_material18.Chip,
|
|
30710
30802
|
{
|
|
30711
30803
|
color: selectedEvent.status_code === 2 ? "error" : selectedEvent.status_code === 1 ? "success" : "default",
|
|
30712
30804
|
"data-testid": EVENT_DETAILS_STATUS_TEST_ID,
|
|
@@ -30716,50 +30808,50 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
30716
30808
|
) })
|
|
30717
30809
|
] })
|
|
30718
30810
|
] }) }),
|
|
30719
|
-
/* @__PURE__ */ (0,
|
|
30720
|
-
/* @__PURE__ */ (0,
|
|
30721
|
-
selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0,
|
|
30722
|
-
!selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ (0,
|
|
30723
|
-
eventGroups.permissions && /* @__PURE__ */ (0,
|
|
30724
|
-
eventGroups.errors && /* @__PURE__ */ (0,
|
|
30725
|
-
eventGroups.warnings && /* @__PURE__ */ (0,
|
|
30811
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Divider, {}),
|
|
30812
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(ToggleSection, { headline: "Permissions", children: [
|
|
30813
|
+
selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Alert, { "data-testid": EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID, severity: "warning", sx: { mb: 1 }, children: "IAM errors are suppressed \u2014 upgrade your license to view" }),
|
|
30814
|
+
!selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
|
|
30815
|
+
eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, type: "permission" }),
|
|
30816
|
+
eventGroups.errors && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
|
|
30817
|
+
eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
|
|
30726
30818
|
] }),
|
|
30727
|
-
hasPayloads && /* @__PURE__ */ (0,
|
|
30728
|
-
/* @__PURE__ */ (0,
|
|
30729
|
-
/* @__PURE__ */ (0,
|
|
30819
|
+
hasPayloads && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
|
|
30820
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Divider, {}),
|
|
30821
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
30730
30822
|
ToggleSection,
|
|
30731
30823
|
{
|
|
30732
|
-
action: /* @__PURE__ */ (0,
|
|
30733
|
-
|
|
30824
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
30825
|
+
import_material18.FormControlLabel,
|
|
30734
30826
|
{
|
|
30735
|
-
control: /* @__PURE__ */ (0,
|
|
30827
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Switch, { checked: !parseNestedJson, onChange: (event) => {
|
|
30736
30828
|
setParseNestedJson(!event.target.checked);
|
|
30737
30829
|
}, size: "small" }),
|
|
30738
|
-
label: /* @__PURE__ */ (0,
|
|
30830
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { variant: "caption", children: "View raw data" }),
|
|
30739
30831
|
sx: { mr: 0 }
|
|
30740
30832
|
}
|
|
30741
30833
|
),
|
|
30742
30834
|
headline: "Payloads",
|
|
30743
|
-
children: /* @__PURE__ */ (0,
|
|
30744
|
-
requestPayload !== void 0 && /* @__PURE__ */ (0,
|
|
30745
|
-
/* @__PURE__ */ (0,
|
|
30746
|
-
/* @__PURE__ */ (0,
|
|
30835
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Stack, { spacing: 2, children: [
|
|
30836
|
+
requestPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30837
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request" }),
|
|
30838
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
|
|
30747
30839
|
] }),
|
|
30748
|
-
(responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ (0,
|
|
30749
|
-
/* @__PURE__ */ (0,
|
|
30750
|
-
isResponseSuppressed ? /* @__PURE__ */ (0,
|
|
30840
|
+
(responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30841
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Response" }),
|
|
30842
|
+
isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Box, { sx: { py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Alert, { severity: "warning", sx: { mb: 1 }, children: "Response payload is available \u2014 upgrade your license to view" }) }) : /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
|
|
30751
30843
|
] }),
|
|
30752
|
-
exceptionPayload !== void 0 && /* @__PURE__ */ (0,
|
|
30753
|
-
/* @__PURE__ */ (0,
|
|
30754
|
-
/* @__PURE__ */ (0,
|
|
30844
|
+
exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30845
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Exception" }),
|
|
30846
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
|
|
30755
30847
|
] })
|
|
30756
30848
|
] })
|
|
30757
30849
|
}
|
|
30758
30850
|
)
|
|
30759
30851
|
] }),
|
|
30760
|
-
isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */ (0,
|
|
30761
|
-
/* @__PURE__ */ (0,
|
|
30762
|
-
/* @__PURE__ */ (0,
|
|
30852
|
+
isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
|
|
30853
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Divider, {}),
|
|
30854
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ToggleSection, { headline: "Lambda Logs", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
30763
30855
|
LambdaInvokeLogsSection,
|
|
30764
30856
|
{
|
|
30765
30857
|
endTimeNano: selectedEvent.end_time_unix_nano ?? selectedEvent.start_time_unix_nano,
|
|
@@ -30770,21 +30862,21 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
30770
30862
|
}
|
|
30771
30863
|
) })
|
|
30772
30864
|
] }),
|
|
30773
|
-
/* @__PURE__ */ (0,
|
|
30774
|
-
/* @__PURE__ */ (0,
|
|
30775
|
-
/* @__PURE__ */ (0,
|
|
30776
|
-
/* @__PURE__ */ (0,
|
|
30777
|
-
/* @__PURE__ */ (0,
|
|
30865
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Divider, {}),
|
|
30866
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Stack, { spacing: 1, children: [
|
|
30867
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30868
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
|
|
30869
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id })
|
|
30778
30870
|
] }),
|
|
30779
|
-
/* @__PURE__ */ (0,
|
|
30780
|
-
/* @__PURE__ */ (0,
|
|
30781
|
-
/* @__PURE__ */ (0,
|
|
30871
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30872
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
|
|
30873
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_TRACE_ID_TEST_ID, variant: "body2", children: selectedEvent.trace_id })
|
|
30782
30874
|
] }),
|
|
30783
|
-
requestId !== void 0 && /* @__PURE__ */ (0,
|
|
30784
|
-
/* @__PURE__ */ (0,
|
|
30785
|
-
/* @__PURE__ */ (0,
|
|
30875
|
+
requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material18.Box, { children: [
|
|
30876
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request ID" }),
|
|
30877
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Typography, { "data-testid": EVENT_DETAILS_REQUEST_ID_TEST_ID, variant: "body2", children: requestId })
|
|
30786
30878
|
] }),
|
|
30787
|
-
eventGroups.info && /* @__PURE__ */ (0,
|
|
30879
|
+
eventGroups.info && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(EventDetail, { displayText: "Info", events: eventGroups.info, type: "info" })
|
|
30788
30880
|
] }) })
|
|
30789
30881
|
] }) })
|
|
30790
30882
|
] });
|
|
@@ -30792,32 +30884,32 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
30792
30884
|
|
|
30793
30885
|
// src/components/trace-graph/trace-graph.tsx
|
|
30794
30886
|
var import_base = require("@xyflow/react/dist/base.css");
|
|
30795
|
-
var
|
|
30887
|
+
var import_material22 = require("@mui/material");
|
|
30796
30888
|
var import_react65 = require("@xyflow/react");
|
|
30797
30889
|
var import_react66 = require("react");
|
|
30798
30890
|
|
|
30799
30891
|
// src/components/trace-graph/service-node.tsx
|
|
30800
|
-
var
|
|
30892
|
+
var import_material20 = require("@mui/material");
|
|
30801
30893
|
var import_style = require("@xyflow/react/dist/style.css");
|
|
30802
30894
|
var import_react61 = require("@xyflow/react");
|
|
30803
30895
|
var import_react62 = require("react");
|
|
30804
30896
|
|
|
30805
30897
|
// src/components/trace-graph/problem-indicator.tsx
|
|
30806
|
-
var
|
|
30807
|
-
var
|
|
30898
|
+
var import_icons_material11 = require("@mui/icons-material");
|
|
30899
|
+
var import_material19 = require("@mui/material");
|
|
30808
30900
|
var import_react60 = require("react");
|
|
30809
|
-
var
|
|
30901
|
+
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
30810
30902
|
var ProblemIndicator = ({ error }) => {
|
|
30811
30903
|
const icon = (0, import_react60.useMemo)(() => {
|
|
30812
30904
|
switch (error.level) {
|
|
30813
30905
|
case "error": {
|
|
30814
|
-
return /* @__PURE__ */ (0,
|
|
30906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material11.Error, { sx: { color: "#d32f2f", fontSize: "14px" } });
|
|
30815
30907
|
}
|
|
30816
30908
|
case "warning": {
|
|
30817
|
-
return /* @__PURE__ */ (0,
|
|
30909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material11.Warning, { sx: { color: "#ff9800", fontSize: "14px" } });
|
|
30818
30910
|
}
|
|
30819
30911
|
default: {
|
|
30820
|
-
return /* @__PURE__ */ (0,
|
|
30912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material11.Info, { sx: { color: "#2196f3", fontSize: "14px" } });
|
|
30821
30913
|
}
|
|
30822
30914
|
}
|
|
30823
30915
|
}, [error.level]);
|
|
@@ -30834,8 +30926,8 @@ var ProblemIndicator = ({ error }) => {
|
|
|
30834
30926
|
}
|
|
30835
30927
|
}
|
|
30836
30928
|
}, [error.level]);
|
|
30837
|
-
return /* @__PURE__ */ (0,
|
|
30838
|
-
|
|
30929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Tooltip, { arrow: true, title: error.message ?? "Issue detected", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
30930
|
+
import_material19.Box,
|
|
30839
30931
|
{
|
|
30840
30932
|
sx: {
|
|
30841
30933
|
alignItems: "center",
|
|
@@ -30854,17 +30946,17 @@ var ProblemIndicator = ({ error }) => {
|
|
|
30854
30946
|
};
|
|
30855
30947
|
|
|
30856
30948
|
// src/components/trace-graph/service-node.tsx
|
|
30857
|
-
var
|
|
30949
|
+
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
30858
30950
|
var handleStyle = {
|
|
30859
30951
|
backgroundColor: "white",
|
|
30860
30952
|
borderColor: "lightgray",
|
|
30861
30953
|
opacity: 0
|
|
30862
30954
|
};
|
|
30863
30955
|
var ServiceNode = (0, import_react62.memo)(({ data, selected }) => {
|
|
30864
|
-
const theme = (0,
|
|
30956
|
+
const theme = (0, import_material20.useTheme)();
|
|
30865
30957
|
const hasErrors = (data.event.errors && data.event.errors.length > 0) ?? false;
|
|
30866
|
-
return /* @__PURE__ */ (0,
|
|
30867
|
-
|
|
30958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
|
|
30959
|
+
import_material20.Box,
|
|
30868
30960
|
{
|
|
30869
30961
|
"data-testid": SERVICE_NODE_TEST_ID,
|
|
30870
30962
|
role: "button",
|
|
@@ -30886,19 +30978,19 @@ var ServiceNode = (0, import_react62.memo)(({ data, selected }) => {
|
|
|
30886
30978
|
},
|
|
30887
30979
|
tabIndex: 0,
|
|
30888
30980
|
children: [
|
|
30889
|
-
/* @__PURE__ */ (0,
|
|
30890
|
-
/* @__PURE__ */ (0,
|
|
30891
|
-
/* @__PURE__ */ (0,
|
|
30892
|
-
|
|
30981
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react61.Handle, { position: import_react61.Position.Left, style: handleStyle, type: "target" }),
|
|
30982
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react61.Handle, { position: import_react61.Position.Right, style: handleStyle, type: "source" }),
|
|
30983
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
|
|
30984
|
+
import_material20.Stack,
|
|
30893
30985
|
{
|
|
30894
30986
|
alignItems: "center",
|
|
30895
30987
|
direction: "row",
|
|
30896
30988
|
sx: { gap: "8px", pb: "2px", pt: "6px", px: "8px" },
|
|
30897
30989
|
children: [
|
|
30898
|
-
/* @__PURE__ */ (0,
|
|
30899
|
-
/* @__PURE__ */ (0,
|
|
30900
|
-
/* @__PURE__ */ (0,
|
|
30901
|
-
|
|
30990
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Box, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(AwsServiceIcon, { hideTooltip: true, service: data.event.service_name, size: "medium" }) }),
|
|
30991
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_material20.Stack, { sx: { minWidth: 0 }, children: [
|
|
30992
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
30993
|
+
import_material20.Typography,
|
|
30902
30994
|
{
|
|
30903
30995
|
noWrap: true,
|
|
30904
30996
|
sx: { fontWeight: 700, lineHeight: 1.25 },
|
|
@@ -30906,8 +30998,8 @@ var ServiceNode = (0, import_react62.memo)(({ data, selected }) => {
|
|
|
30906
30998
|
children: getServiceDisplayName(data.event.service_name)
|
|
30907
30999
|
}
|
|
30908
31000
|
),
|
|
30909
|
-
data.event.resource_name != "" && /* @__PURE__ */ (0,
|
|
30910
|
-
|
|
31001
|
+
data.event.resource_name != "" && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
31002
|
+
import_material20.Typography,
|
|
30911
31003
|
{
|
|
30912
31004
|
color: "text.secondary",
|
|
30913
31005
|
noWrap: true,
|
|
@@ -30920,16 +31012,16 @@ var ServiceNode = (0, import_react62.memo)(({ data, selected }) => {
|
|
|
30920
31012
|
]
|
|
30921
31013
|
}
|
|
30922
31014
|
),
|
|
30923
|
-
/* @__PURE__ */ (0,
|
|
30924
|
-
/* @__PURE__ */ (0,
|
|
30925
|
-
|
|
31015
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Divider, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
|
|
31016
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
|
|
31017
|
+
import_material20.Stack,
|
|
30926
31018
|
{
|
|
30927
31019
|
alignItems: "center",
|
|
30928
31020
|
direction: "row",
|
|
30929
31021
|
sx: { minWidth: 0, pb: "5px", pr: "8px", pt: "1px" },
|
|
30930
31022
|
children: [
|
|
30931
|
-
/* @__PURE__ */ (0,
|
|
30932
|
-
|
|
31023
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
31024
|
+
import_material20.Box,
|
|
30933
31025
|
{
|
|
30934
31026
|
sx: {
|
|
30935
31027
|
alignItems: "center",
|
|
@@ -30938,11 +31030,11 @@ var ServiceNode = (0, import_react62.memo)(({ data, selected }) => {
|
|
|
30938
31030
|
justifyContent: "center",
|
|
30939
31031
|
width: "38px"
|
|
30940
31032
|
},
|
|
30941
|
-
children: hasErrors && data.event.errors?.map((error) => /* @__PURE__ */ (0,
|
|
31033
|
+
children: hasErrors && data.event.errors?.map((error) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(ProblemIndicator, { error }, error.span_id))
|
|
30942
31034
|
}
|
|
30943
31035
|
),
|
|
30944
|
-
/* @__PURE__ */ (0,
|
|
30945
|
-
|
|
31036
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
31037
|
+
import_material20.Typography,
|
|
30946
31038
|
{
|
|
30947
31039
|
"data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID,
|
|
30948
31040
|
noWrap: true,
|
|
@@ -31014,12 +31106,12 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
|
|
|
31014
31106
|
};
|
|
31015
31107
|
|
|
31016
31108
|
// src/components/trace-graph/xyflow/controls.tsx
|
|
31017
|
-
var
|
|
31018
|
-
var
|
|
31109
|
+
var import_icons_material12 = require("@mui/icons-material");
|
|
31110
|
+
var import_material21 = require("@mui/material");
|
|
31019
31111
|
var import_react63 = require("@xyflow/react");
|
|
31020
31112
|
var import_react64 = require("react");
|
|
31021
31113
|
var import_shallow = require("zustand/shallow");
|
|
31022
|
-
var
|
|
31114
|
+
var import_jsx_runtime144 = require("react/jsx-runtime");
|
|
31023
31115
|
var selector = (s2) => ({
|
|
31024
31116
|
isInteractive: s2.nodesDraggable || s2.nodesConnectable || s2.elementsSelectable,
|
|
31025
31117
|
maxZoomReached: s2.transform[2] >= s2.maxZoom,
|
|
@@ -31037,8 +31129,8 @@ var Controls = (0, import_react64.memo)(() => {
|
|
|
31037
31129
|
const onFitViewHandler = () => {
|
|
31038
31130
|
void fitView();
|
|
31039
31131
|
};
|
|
31040
|
-
return /* @__PURE__ */ (0,
|
|
31041
|
-
|
|
31132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
|
|
31133
|
+
import_material21.Box,
|
|
31042
31134
|
{
|
|
31043
31135
|
sx: {
|
|
31044
31136
|
bottom: 0,
|
|
@@ -31051,33 +31143,33 @@ var Controls = (0, import_react64.memo)(() => {
|
|
|
31051
31143
|
zIndex: 5
|
|
31052
31144
|
},
|
|
31053
31145
|
children: [
|
|
31054
|
-
/* @__PURE__ */ (0,
|
|
31055
|
-
|
|
31146
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
31147
|
+
import_material21.IconButton,
|
|
31056
31148
|
{
|
|
31057
31149
|
className: "react-flow__controls-zoomin",
|
|
31058
31150
|
disabled: maxZoomReached,
|
|
31059
31151
|
onClick: onZoomInHandler,
|
|
31060
31152
|
size: "small",
|
|
31061
|
-
children: /* @__PURE__ */ (0,
|
|
31153
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_icons_material12.Add, {})
|
|
31062
31154
|
}
|
|
31063
31155
|
),
|
|
31064
|
-
/* @__PURE__ */ (0,
|
|
31065
|
-
|
|
31156
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
31157
|
+
import_material21.IconButton,
|
|
31066
31158
|
{
|
|
31067
31159
|
className: "react-flow__controls-zoomout",
|
|
31068
31160
|
disabled: minZoomReached,
|
|
31069
31161
|
onClick: onZoomOutHandler,
|
|
31070
31162
|
size: "small",
|
|
31071
|
-
children: /* @__PURE__ */ (0,
|
|
31163
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_icons_material12.Remove, {})
|
|
31072
31164
|
}
|
|
31073
31165
|
),
|
|
31074
|
-
/* @__PURE__ */ (0,
|
|
31075
|
-
|
|
31166
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
31167
|
+
import_material21.IconButton,
|
|
31076
31168
|
{
|
|
31077
31169
|
className: "react-flow__controls-fitview",
|
|
31078
31170
|
onClick: onFitViewHandler,
|
|
31079
31171
|
size: "small",
|
|
31080
|
-
children: /* @__PURE__ */ (0,
|
|
31172
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_icons_material12.FitScreen, {})
|
|
31081
31173
|
}
|
|
31082
31174
|
)
|
|
31083
31175
|
]
|
|
@@ -31086,7 +31178,7 @@ var Controls = (0, import_react64.memo)(() => {
|
|
|
31086
31178
|
});
|
|
31087
31179
|
|
|
31088
31180
|
// src/components/trace-graph/trace-graph.tsx
|
|
31089
|
-
var
|
|
31181
|
+
var import_jsx_runtime145 = require("react/jsx-runtime");
|
|
31090
31182
|
var nodeTypes = {
|
|
31091
31183
|
service: ServiceNode
|
|
31092
31184
|
};
|
|
@@ -31148,12 +31240,12 @@ var TraceGraph = ({
|
|
|
31148
31240
|
setNodes(layoutedNodes);
|
|
31149
31241
|
setEdges(layoutedEdges);
|
|
31150
31242
|
}, [spans.data, initialFocusEventId, setNodes, setEdges]);
|
|
31151
|
-
const theme = (0,
|
|
31152
|
-
return /* @__PURE__ */ (0,
|
|
31153
|
-
spans.error && /* @__PURE__ */ (0,
|
|
31154
|
-
|
|
31243
|
+
const theme = (0, import_material22.useTheme)();
|
|
31244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
|
|
31245
|
+
spans.error && /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
31246
|
+
import_material22.Alert,
|
|
31155
31247
|
{
|
|
31156
|
-
action: /* @__PURE__ */ (0,
|
|
31248
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material22.Button, { onClick: () => {
|
|
31157
31249
|
onRefresh();
|
|
31158
31250
|
}, children: "Retry" }),
|
|
31159
31251
|
severity: "error",
|
|
@@ -31164,7 +31256,7 @@ var TraceGraph = ({
|
|
|
31164
31256
|
]
|
|
31165
31257
|
}
|
|
31166
31258
|
),
|
|
31167
|
-
/* @__PURE__ */ (0,
|
|
31259
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
31168
31260
|
import_react65.ReactFlow,
|
|
31169
31261
|
{
|
|
31170
31262
|
"data-testid": TRACE_GRAPH_TEST_ID,
|
|
@@ -31182,8 +31274,8 @@ var TraceGraph = ({
|
|
|
31182
31274
|
onNodesChange,
|
|
31183
31275
|
selectNodesOnDrag: false,
|
|
31184
31276
|
children: [
|
|
31185
|
-
/* @__PURE__ */ (0,
|
|
31186
|
-
/* @__PURE__ */ (0,
|
|
31277
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Controls, {}),
|
|
31278
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
31187
31279
|
import_react65.Background,
|
|
31188
31280
|
{
|
|
31189
31281
|
bgColor: theme.palette.background.default,
|
|
@@ -31197,7 +31289,7 @@ var TraceGraph = ({
|
|
|
31197
31289
|
};
|
|
31198
31290
|
|
|
31199
31291
|
// src/pages/trace-graph-page.tsx
|
|
31200
|
-
var
|
|
31292
|
+
var import_jsx_runtime146 = require("react/jsx-runtime");
|
|
31201
31293
|
var HEADER_HEIGHT = 56;
|
|
31202
31294
|
var DRAWER_WIDTH = "35%";
|
|
31203
31295
|
var Main = (0, import_styles.styled)("main", { shouldForwardProp: (property) => property !== "open" })(({ open, theme }) => ({
|
|
@@ -31215,7 +31307,7 @@ var Main = (0, import_styles.styled)("main", { shouldForwardProp: (property) =>
|
|
|
31215
31307
|
})
|
|
31216
31308
|
}
|
|
31217
31309
|
}));
|
|
31218
|
-
var StyledDrawer = (0, import_styles.styled)(
|
|
31310
|
+
var StyledDrawer = (0, import_styles.styled)(import_material23.Drawer)(() => ({
|
|
31219
31311
|
"& .MuiDrawer-paper": {
|
|
31220
31312
|
bottom: 0,
|
|
31221
31313
|
boxSizing: "border-box",
|
|
@@ -31246,8 +31338,8 @@ var TraceGraphView = ({
|
|
|
31246
31338
|
traceId
|
|
31247
31339
|
}) => {
|
|
31248
31340
|
const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
|
|
31249
|
-
return /* @__PURE__ */ (0,
|
|
31250
|
-
|
|
31341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
|
|
31342
|
+
import_material23.Box,
|
|
31251
31343
|
{
|
|
31252
31344
|
"data-testid": TRACE_GRAPH_PAGE_TEST_ID,
|
|
31253
31345
|
sx: {
|
|
@@ -31259,14 +31351,14 @@ var TraceGraphView = ({
|
|
|
31259
31351
|
overflow: "hidden"
|
|
31260
31352
|
},
|
|
31261
31353
|
children: [
|
|
31262
|
-
/* @__PURE__ */ (0,
|
|
31263
|
-
/* @__PURE__ */ (0,
|
|
31354
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_material23.Box, { sx: { display: "flex", width: "100%" }, children: [
|
|
31355
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_material23.Button, { onClick: () => {
|
|
31264
31356
|
navigateToSpansList();
|
|
31265
|
-
}, startIcon: /* @__PURE__ */ (0,
|
|
31266
|
-
/* @__PURE__ */ (0,
|
|
31357
|
+
}, startIcon: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_icons_material13.ArrowBack, {}), children: "Go back" }),
|
|
31358
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_material23.Box, { sx: { flexGrow: 1 } })
|
|
31267
31359
|
] }),
|
|
31268
|
-
/* @__PURE__ */ (0,
|
|
31269
|
-
|
|
31360
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
31361
|
+
import_material23.Paper,
|
|
31270
31362
|
{
|
|
31271
31363
|
sx: {
|
|
31272
31364
|
display: "flex",
|
|
@@ -31275,7 +31367,7 @@ var TraceGraphView = ({
|
|
|
31275
31367
|
position: "relative",
|
|
31276
31368
|
width: "100%"
|
|
31277
31369
|
},
|
|
31278
|
-
children: shouldShowStatusMessage ? /* @__PURE__ */ (0,
|
|
31370
|
+
children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
31279
31371
|
StatusMessage,
|
|
31280
31372
|
{
|
|
31281
31373
|
error: statusError,
|
|
@@ -31283,15 +31375,15 @@ var TraceGraphView = ({
|
|
|
31283
31375
|
onRetry: handleRetry,
|
|
31284
31376
|
status
|
|
31285
31377
|
}
|
|
31286
|
-
) : /* @__PURE__ */ (0,
|
|
31287
|
-
/* @__PURE__ */ (0,
|
|
31288
|
-
|
|
31378
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, { children: [
|
|
31379
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Main, { open, children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
31380
|
+
import_material23.Box,
|
|
31289
31381
|
{
|
|
31290
31382
|
sx: {
|
|
31291
31383
|
height: "100%",
|
|
31292
31384
|
overflow: "auto"
|
|
31293
31385
|
},
|
|
31294
|
-
children: traceId !== void 0 && /* @__PURE__ */ (0,
|
|
31386
|
+
children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_react67.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
31295
31387
|
TraceGraph,
|
|
31296
31388
|
{
|
|
31297
31389
|
initialFocusEventId: spanId,
|
|
@@ -31308,7 +31400,7 @@ var TraceGraphView = ({
|
|
|
31308
31400
|
) })
|
|
31309
31401
|
}
|
|
31310
31402
|
) }),
|
|
31311
|
-
/* @__PURE__ */ (0,
|
|
31403
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(EventDetails, { onClose: handleClose, selectedEvent }) })
|
|
31312
31404
|
] })
|
|
31313
31405
|
}
|
|
31314
31406
|
)
|
|
@@ -31401,7 +31493,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
|
31401
31493
|
const navigateToSpansList = (0, import_react68.useCallback)(() => {
|
|
31402
31494
|
onClose?.();
|
|
31403
31495
|
}, [onClose]);
|
|
31404
|
-
return /* @__PURE__ */ (0,
|
|
31496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
31405
31497
|
TraceGraphView,
|
|
31406
31498
|
{
|
|
31407
31499
|
fetchError,
|
|
@@ -31426,7 +31518,7 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
|
31426
31518
|
};
|
|
31427
31519
|
|
|
31428
31520
|
// src/pages/spans-list-page.tsx
|
|
31429
|
-
var
|
|
31521
|
+
var import_jsx_runtime147 = require("react/jsx-runtime");
|
|
31430
31522
|
var SpansListPage = () => {
|
|
31431
31523
|
const api = useAppInspectorApi();
|
|
31432
31524
|
const {
|
|
@@ -31473,9 +31565,9 @@ var SpansListPage = () => {
|
|
|
31473
31565
|
void checkStatus();
|
|
31474
31566
|
}, [api, checkStatus, clearFetchError]);
|
|
31475
31567
|
const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
|
|
31476
|
-
return /* @__PURE__ */ (0,
|
|
31477
|
-
/* @__PURE__ */ (0,
|
|
31478
|
-
|
|
31568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, { children: [
|
|
31569
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
|
|
31570
|
+
import_material24.Box,
|
|
31479
31571
|
{
|
|
31480
31572
|
"data-testid": SPANS_LIST_PAGE_TEST_ID,
|
|
31481
31573
|
sx: {
|
|
@@ -31490,7 +31582,7 @@ var SpansListPage = () => {
|
|
|
31490
31582
|
width: "100%"
|
|
31491
31583
|
},
|
|
31492
31584
|
children: [
|
|
31493
|
-
!checking && !shouldShowStatusMessage && /* @__PURE__ */ (0,
|
|
31585
|
+
!checking && !shouldShowStatusMessage && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
31494
31586
|
EmulatorVersionBanner,
|
|
31495
31587
|
{
|
|
31496
31588
|
compatibility: bannerDismissed && versionCompatibility === "warning" ? "ok" : versionCompatibility,
|
|
@@ -31500,7 +31592,7 @@ var SpansListPage = () => {
|
|
|
31500
31592
|
} : void 0
|
|
31501
31593
|
}
|
|
31502
31594
|
),
|
|
31503
|
-
shouldShowStatusMessage ? /* @__PURE__ */ (0,
|
|
31595
|
+
shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
31504
31596
|
StatusMessage,
|
|
31505
31597
|
{
|
|
31506
31598
|
error: statusError,
|
|
@@ -31509,7 +31601,7 @@ var SpansListPage = () => {
|
|
|
31509
31601
|
onRetry: handleRetry,
|
|
31510
31602
|
status
|
|
31511
31603
|
}
|
|
31512
|
-
) : /* @__PURE__ */ (0,
|
|
31604
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
31513
31605
|
SpansList,
|
|
31514
31606
|
{
|
|
31515
31607
|
clearingSpans,
|
|
@@ -31537,7 +31629,7 @@ var SpansListPage = () => {
|
|
|
31537
31629
|
]
|
|
31538
31630
|
}
|
|
31539
31631
|
),
|
|
31540
|
-
selectedTraceId !== void 0 && /* @__PURE__ */ (0,
|
|
31632
|
+
selectedTraceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(TraceGraphPage, { onClose: () => {
|
|
31541
31633
|
setSelectedTraceId(void 0);
|
|
31542
31634
|
}, spanId: selectedSpanId, traceId: selectedTraceId })
|
|
31543
31635
|
] });
|