@perses-dev/logs-table-plugin 0.1.0
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/LICENSE +201 -0
- package/README.md +41 -0
- package/__mf/css/async/2341.d3010b86.css +1 -0
- package/__mf/css/async/5263.d3010b86.css +1 -0
- package/__mf/css/async/6759.d3010b86.css +1 -0
- package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
- package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
- package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
- package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
- package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
- package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
- package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
- package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
- package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
- package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
- package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
- package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
- package/__mf/js/LogsTable.a40d0de0.js +5 -0
- package/__mf/js/async/1143.f9fce74a.js +1 -0
- package/__mf/js/async/1553.9685a45a.js +1 -0
- package/__mf/js/async/1640.45bfe57d.js +1 -0
- package/__mf/js/async/1964.ad38a6aa.js +2 -0
- package/__mf/js/async/1964.ad38a6aa.js.LICENSE.txt +9 -0
- package/__mf/js/async/2292.0c8c55a4.js +2 -0
- package/__mf/js/async/2292.0c8c55a4.js.LICENSE.txt +24 -0
- package/__mf/js/async/2641.888f4d12.js +1 -0
- package/__mf/js/async/2651.c6ed9c77.js +1 -0
- package/__mf/js/async/2836.59bc5080.js +22 -0
- package/__mf/js/async/2836.59bc5080.js.LICENSE.txt +9 -0
- package/__mf/js/async/2849.eafadb0f.js +2 -0
- package/__mf/js/async/2849.eafadb0f.js.LICENSE.txt +37 -0
- package/__mf/js/async/3224.dc93eeb9.js +1 -0
- package/__mf/js/async/3474.cee21897.js +1 -0
- package/__mf/js/async/3863.98efb1d2.js +2 -0
- package/__mf/js/async/3863.98efb1d2.js.LICENSE.txt +9 -0
- package/__mf/js/async/3960.a5f4b6df.js +2 -0
- package/__mf/js/async/3960.a5f4b6df.js.LICENSE.txt +8 -0
- package/__mf/js/async/4062.75b22d96.js +1 -0
- package/__mf/js/async/4075.3f3a9fce.js +1 -0
- package/__mf/js/async/4168.4ce3a017.js +2 -0
- package/__mf/js/async/4238.3f9124d4.js +1 -0
- package/__mf/js/async/5214.4ce95313.js +1 -0
- package/__mf/js/async/5409.360142aa.js +1 -0
- package/__mf/js/async/5981.ef618ada.js +2 -0
- package/__mf/js/async/5981.ef618ada.js.LICENSE.txt +8 -0
- package/__mf/js/async/6292.7a6b1e5f.js +1 -0
- package/__mf/js/async/6569.74fed404.js +1 -0
- package/__mf/js/async/6770.344b116a.js +1 -0
- package/__mf/js/async/694.f6a520bb.js +1 -0
- package/__mf/js/async/6981.aaaaabbb.js +110 -0
- package/__mf/js/async/6981.aaaaabbb.js.LICENSE.txt +27 -0
- package/__mf/js/async/711.d4a39c83.js +1 -0
- package/__mf/js/async/738.1432e533.js +1 -0
- package/__mf/js/async/7482.e107e534.js +2 -0
- package/__mf/js/async/7482.e107e534.js.LICENSE.txt +9 -0
- package/__mf/js/async/7623.43e701ce.js +1 -0
- package/__mf/js/async/7740.213e06a7.js +1 -0
- package/__mf/js/async/8488.c1d50599.js +1 -0
- package/__mf/js/async/9173.947266e0.js +2 -0
- package/__mf/js/async/9173.947266e0.js.LICENSE.txt +19 -0
- package/__mf/js/async/9370.e9cdeb7d.js +7 -0
- package/__mf/js/async/9370.e9cdeb7d.js.LICENSE.txt +21 -0
- package/__mf/js/async/9815.6b212862.js +37 -0
- package/__mf/js/async/__federation_expose_LogsTable.86c05a98.js +1 -0
- package/__mf/js/async/lib-router.c75d9d73.js +2 -0
- package/__mf/js/async/lib-router.c75d9d73.js.LICENSE.txt +32 -0
- package/__mf/js/main.3283cbfb.js +5 -0
- package/lib/LogsTable.d.ts +4 -0
- package/lib/LogsTable.d.ts.map +1 -0
- package/lib/LogsTable.js +33 -0
- package/lib/LogsTable.js.map +1 -0
- package/lib/LogsTableComponent.d.ts +4 -0
- package/lib/LogsTableComponent.d.ts.map +1 -0
- package/lib/LogsTableComponent.js +35 -0
- package/lib/LogsTableComponent.js.map +1 -0
- package/lib/LogsTablePanel.d.ts +4 -0
- package/lib/LogsTablePanel.d.ts.map +1 -0
- package/lib/LogsTablePanel.js +34 -0
- package/lib/LogsTablePanel.js.map +1 -0
- package/lib/LogsTableSettingsEditor.d.ts +7 -0
- package/lib/LogsTableSettingsEditor.d.ts.map +1 -0
- package/lib/LogsTableSettingsEditor.js +49 -0
- package/lib/LogsTableSettingsEditor.js.map +1 -0
- package/lib/bootstrap.d.ts +2 -0
- package/lib/bootstrap.d.ts.map +1 -0
- package/lib/bootstrap.js +19 -0
- package/lib/bootstrap.js.map +1 -0
- package/lib/cjs/LogsTable.js +41 -0
- package/lib/cjs/LogsTableComponent.js +43 -0
- package/lib/cjs/LogsTablePanel.js +42 -0
- package/lib/cjs/LogsTableSettingsEditor.js +57 -0
- package/lib/cjs/bootstrap.js +26 -0
- package/lib/cjs/components/EmptyLogsState.js +49 -0
- package/lib/cjs/components/LogRow/LogDetailsTable.js +71 -0
- package/lib/cjs/components/LogRow/LogRow.js +163 -0
- package/lib/cjs/components/LogRow/LogTimestamp.js +44 -0
- package/lib/cjs/components/LogRow/LogsStyles.js +85 -0
- package/lib/cjs/components/LogRow/index.js +37 -0
- package/lib/cjs/components/LogsList.js +44 -0
- package/lib/cjs/components/VirtualizedLogsList.js +64 -0
- package/lib/cjs/components/hooks/useExpandedRows.js +45 -0
- package/lib/cjs/env.d.js +14 -0
- package/lib/cjs/getPluginModule.js +27 -0
- package/lib/cjs/index-federation.js +55 -0
- package/lib/cjs/index.js +26 -0
- package/lib/cjs/model.js +16 -0
- package/lib/cjs/setup-tests.js +19 -0
- package/lib/cjs/test/mock-query-results.js +76 -0
- package/lib/components/EmptyLogsState.d.ts +7 -0
- package/lib/components/EmptyLogsState.d.ts.map +1 -0
- package/lib/components/EmptyLogsState.js +36 -0
- package/lib/components/EmptyLogsState.js.map +1 -0
- package/lib/components/LogRow/LogDetailsTable.d.ts +8 -0
- package/lib/components/LogRow/LogDetailsTable.d.ts.map +1 -0
- package/lib/components/LogRow/LogDetailsTable.js +58 -0
- package/lib/components/LogRow/LogDetailsTable.js.map +1 -0
- package/lib/components/LogRow/LogRow.d.ts +14 -0
- package/lib/components/LogRow/LogRow.d.ts.map +1 -0
- package/lib/components/LogRow/LogRow.js +109 -0
- package/lib/components/LogRow/LogRow.js.map +1 -0
- package/lib/components/LogRow/LogTimestamp.d.ts +7 -0
- package/lib/components/LogRow/LogTimestamp.d.ts.map +1 -0
- package/lib/components/LogRow/LogTimestamp.js +31 -0
- package/lib/components/LogRow/LogTimestamp.js.map +1 -0
- package/lib/components/LogRow/LogsStyles.d.ts +21 -0
- package/lib/components/LogRow/LogsStyles.d.ts.map +1 -0
- package/lib/components/LogRow/LogsStyles.js +63 -0
- package/lib/components/LogRow/LogsStyles.js.map +1 -0
- package/lib/components/LogRow/index.d.ts +3 -0
- package/lib/components/LogRow/index.d.ts.map +1 -0
- package/lib/components/LogRow/index.js +16 -0
- package/lib/components/LogRow/index.js.map +1 -0
- package/lib/components/LogsList.d.ts +10 -0
- package/lib/components/LogsList.d.ts.map +1 -0
- package/lib/components/LogsList.js +31 -0
- package/lib/components/LogsList.js.map +1 -0
- package/lib/components/VirtualizedLogsList.d.ts +12 -0
- package/lib/components/VirtualizedLogsList.d.ts.map +1 -0
- package/lib/components/VirtualizedLogsList.js +51 -0
- package/lib/components/VirtualizedLogsList.js.map +1 -0
- package/lib/components/hooks/useExpandedRows.d.ts +6 -0
- package/lib/components/hooks/useExpandedRows.d.ts.map +1 -0
- package/lib/components/hooks/useExpandedRows.js +37 -0
- package/lib/components/hooks/useExpandedRows.js.map +1 -0
- package/lib/env.d.js +15 -0
- package/lib/env.d.js.map +1 -0
- package/lib/getPluginModule.d.ts +6 -0
- package/lib/getPluginModule.d.ts.map +1 -0
- package/lib/getPluginModule.js +16 -0
- package/lib/getPluginModule.js.map +1 -0
- package/lib/index-federation.d.ts +1 -0
- package/lib/index-federation.d.ts.map +1 -0
- package/lib/index-federation.js +15 -0
- package/lib/index-federation.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -0
- package/lib/model.d.ts +15 -0
- package/lib/model.d.ts.map +1 -0
- package/lib/model.js +15 -0
- package/lib/model.js.map +1 -0
- package/lib/setup-tests.d.ts +2 -0
- package/lib/setup-tests.d.ts.map +1 -0
- package/lib/setup-tests.js +17 -0
- package/lib/setup-tests.js.map +1 -0
- package/lib/test/mock-query-results.d.ts +14 -0
- package/lib/test/mock-query-results.d.ts.map +1 -0
- package/lib/test/mock-query-results.js +60 -0
- package/lib/test/mock-query-results.js.map +1 -0
- package/mf-manifest.json +336 -0
- package/mf-stats.json +390 -0
- package/package.json +61 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "LogsTablePanel", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return LogsTablePanel;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _material = require("@mui/material");
|
|
25
|
+
const _components = require("@perses-dev/components");
|
|
26
|
+
const _LogsTableComponent = require("./LogsTableComponent");
|
|
27
|
+
function LogsTablePanel(props) {
|
|
28
|
+
const { contentDimensions, queryResults, spec } = props;
|
|
29
|
+
const chartsTheme = (0, _components.useChartsTheme)();
|
|
30
|
+
const contentPadding = chartsTheme.container.padding.default;
|
|
31
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
32
|
+
sx: {
|
|
33
|
+
height: contentDimensions?.height || 0,
|
|
34
|
+
padding: `${contentPadding}px`,
|
|
35
|
+
overflowY: 'scroll'
|
|
36
|
+
},
|
|
37
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogsTableComponent.LogsTableComponent, {
|
|
38
|
+
queryResults: queryResults,
|
|
39
|
+
spec: spec
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "LogsTableSettingsEditor", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return LogsTableSettingsEditor;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _components = require("@perses-dev/components");
|
|
25
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
26
|
+
function LogsTableSettingsEditor(props) {
|
|
27
|
+
const { onChange, value } = props;
|
|
28
|
+
const handleLegendChange = (newLegend)=>{
|
|
29
|
+
onChange({
|
|
30
|
+
...value,
|
|
31
|
+
legend: newLegend
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const handleThresholdsChange = (thresholds)=>{
|
|
35
|
+
onChange({
|
|
36
|
+
...value,
|
|
37
|
+
thresholds
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_components.OptionsEditorGrid, {
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorColumn, {
|
|
43
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.LegendOptionsEditor, {
|
|
44
|
+
value: value.legend,
|
|
45
|
+
onChange: handleLegendChange
|
|
46
|
+
})
|
|
47
|
+
}),
|
|
48
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorColumn, {
|
|
49
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.ThresholdsEditor, {
|
|
50
|
+
hideDefault: true,
|
|
51
|
+
thresholds: value.thresholds,
|
|
52
|
+
onChange: handleThresholdsChange
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
18
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
19
|
+
const _client = /*#__PURE__*/ _interop_require_default(require("react-dom/client"));
|
|
20
|
+
function _interop_require_default(obj) {
|
|
21
|
+
return obj && obj.__esModule ? obj : {
|
|
22
|
+
default: obj
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const root = _client.default.createRoot(document.getElementById('root'));
|
|
26
|
+
root.render(/*#__PURE__*/ (0, _jsxruntime.jsx)(_react.default.StrictMode, {}));
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "EmptyLogsState", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return EmptyLogsState;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
25
|
+
const _material = require("@mui/material");
|
|
26
|
+
function _interop_require_default(obj) {
|
|
27
|
+
return obj && obj.__esModule ? obj : {
|
|
28
|
+
default: obj
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const EmptyLogsState = ({ message = 'No logs to display' })=>{
|
|
32
|
+
const theme = (0, _material.useTheme)();
|
|
33
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
34
|
+
sx: {
|
|
35
|
+
display: 'flex',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
justifyContent: 'center',
|
|
38
|
+
height: '200px'
|
|
39
|
+
},
|
|
40
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
41
|
+
variant: "body2",
|
|
42
|
+
sx: {
|
|
43
|
+
color: theme.palette.text.secondary,
|
|
44
|
+
fontSize: '14px'
|
|
45
|
+
},
|
|
46
|
+
children: message
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "LogDetailsTable", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return LogDetailsTable;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
25
|
+
const _material = require("@mui/material");
|
|
26
|
+
function _interop_require_default(obj) {
|
|
27
|
+
return obj && obj.__esModule ? obj : {
|
|
28
|
+
default: obj
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const LogDetailsTable = ({ log })=>{
|
|
32
|
+
const theme = (0, _material.useTheme)();
|
|
33
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Table, {
|
|
34
|
+
size: "small",
|
|
35
|
+
sx: {
|
|
36
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
37
|
+
'& .MuiTableCell-root': {
|
|
38
|
+
border: 'none',
|
|
39
|
+
padding: '6px 8px',
|
|
40
|
+
fontSize: '12px'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableBody, {
|
|
44
|
+
children: Object.entries(log).map(([key, value])=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TableRow, {
|
|
45
|
+
sx: {
|
|
46
|
+
'&:hover': {
|
|
47
|
+
backgroundColor: (0, _material.alpha)(theme.palette.action.hover, 0.04)
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
children: [
|
|
51
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
52
|
+
sx: {
|
|
53
|
+
color: theme.palette.text.secondary,
|
|
54
|
+
fontWeight: 500,
|
|
55
|
+
width: '33%'
|
|
56
|
+
},
|
|
57
|
+
children: key
|
|
58
|
+
}),
|
|
59
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
60
|
+
sx: {
|
|
61
|
+
color: theme.palette.text.primary,
|
|
62
|
+
wordBreak: 'break-word',
|
|
63
|
+
width: '67%'
|
|
64
|
+
},
|
|
65
|
+
children: value !== undefined && value !== null && value !== '' ? value : '--'
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}, key))
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// You may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "LogRow", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return LogRow;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
25
|
+
const _material = require("@mui/material");
|
|
26
|
+
const _ChevronRight = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronRight"));
|
|
27
|
+
const _LogTimestamp = require("./LogTimestamp");
|
|
28
|
+
const _LogsStyles = require("./LogsStyles");
|
|
29
|
+
const _LogDetailsTable = require("./LogDetailsTable");
|
|
30
|
+
function _interop_require_default(obj) {
|
|
31
|
+
return obj && obj.__esModule ? obj : {
|
|
32
|
+
default: obj
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
36
|
+
if (typeof WeakMap !== "function") return null;
|
|
37
|
+
var cacheBabelInterop = new WeakMap();
|
|
38
|
+
var cacheNodeInterop = new WeakMap();
|
|
39
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
40
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
41
|
+
})(nodeInterop);
|
|
42
|
+
}
|
|
43
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
44
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
45
|
+
return obj;
|
|
46
|
+
}
|
|
47
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
48
|
+
return {
|
|
49
|
+
default: obj
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
53
|
+
if (cache && cache.has(obj)) {
|
|
54
|
+
return cache.get(obj);
|
|
55
|
+
}
|
|
56
|
+
var newObj = {
|
|
57
|
+
__proto__: null
|
|
58
|
+
};
|
|
59
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
60
|
+
for(var key in obj){
|
|
61
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
62
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
63
|
+
if (desc && (desc.get || desc.set)) {
|
|
64
|
+
Object.defineProperty(newObj, key, desc);
|
|
65
|
+
} else {
|
|
66
|
+
newObj[key] = obj[key];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
newObj.default = obj;
|
|
71
|
+
if (cache) {
|
|
72
|
+
cache.set(obj, newObj);
|
|
73
|
+
}
|
|
74
|
+
return newObj;
|
|
75
|
+
}
|
|
76
|
+
const DefaultLogRow = ({ log, isExpanded, index, onToggle, isExpandable = true, showTime = false, allowWrap = false })=>{
|
|
77
|
+
const theme = (0, _material.useTheme)();
|
|
78
|
+
const severityColor = theme.palette.text.secondary;
|
|
79
|
+
const handleToggle = (0, _react.useCallback)(()=>{
|
|
80
|
+
if (isExpandable) {
|
|
81
|
+
onToggle(index);
|
|
82
|
+
}
|
|
83
|
+
}, [
|
|
84
|
+
isExpandable,
|
|
85
|
+
onToggle,
|
|
86
|
+
index
|
|
87
|
+
]);
|
|
88
|
+
if (!log) return null;
|
|
89
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_LogsStyles.LogRowContainer, {
|
|
90
|
+
severityColor: severityColor,
|
|
91
|
+
children: [
|
|
92
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_LogsStyles.LogRowContent, {
|
|
93
|
+
onClick: handleToggle,
|
|
94
|
+
isExpandable: isExpandable,
|
|
95
|
+
children: [
|
|
96
|
+
isExpandable && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
97
|
+
sx: {
|
|
98
|
+
display: 'flex',
|
|
99
|
+
alignItems: 'center',
|
|
100
|
+
width: '16px',
|
|
101
|
+
justifyContent: 'center'
|
|
102
|
+
},
|
|
103
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogsStyles.ExpandButton, {
|
|
104
|
+
size: "small",
|
|
105
|
+
isExpanded: isExpanded,
|
|
106
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronRight.default, {
|
|
107
|
+
sx: {
|
|
108
|
+
fontSize: '12px'
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
})
|
|
112
|
+
}),
|
|
113
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_LogTimestamp.LogTimestamp, {
|
|
114
|
+
timestamp: log.timestamp
|
|
115
|
+
}),
|
|
116
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
117
|
+
sx: {
|
|
118
|
+
display: 'flex',
|
|
119
|
+
gap: '10px',
|
|
120
|
+
marginLeft: '36px'
|
|
121
|
+
},
|
|
122
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogsStyles.LogText, {
|
|
123
|
+
variant: "body2",
|
|
124
|
+
allowWrap: allowWrap,
|
|
125
|
+
children: log.line
|
|
126
|
+
})
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
}),
|
|
130
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Collapse, {
|
|
131
|
+
in: isExpanded,
|
|
132
|
+
timeout: 200,
|
|
133
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
134
|
+
sx: {
|
|
135
|
+
padding: '8px'
|
|
136
|
+
},
|
|
137
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
138
|
+
sx: {
|
|
139
|
+
display: 'grid',
|
|
140
|
+
gridTemplateColumns: !showTime ? '1fr' : '8px minmax(160px, max-content) 1fr',
|
|
141
|
+
gap: '12px'
|
|
142
|
+
},
|
|
143
|
+
children: [
|
|
144
|
+
showTime && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
145
|
+
children: [
|
|
146
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {}),
|
|
147
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {})
|
|
148
|
+
]
|
|
149
|
+
}),
|
|
150
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
151
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogDetailsTable.LogDetailsTable, {
|
|
152
|
+
log: log.labels
|
|
153
|
+
})
|
|
154
|
+
})
|
|
155
|
+
]
|
|
156
|
+
})
|
|
157
|
+
})
|
|
158
|
+
})
|
|
159
|
+
]
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
const LogRow = /*#__PURE__*/ (0, _react.memo)(DefaultLogRow);
|
|
163
|
+
LogRow.displayName = 'LogRow';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "LogTimestamp", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return LogTimestamp;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
25
|
+
function _interop_require_default(obj) {
|
|
26
|
+
return obj && obj.__esModule ? obj : {
|
|
27
|
+
default: obj
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const dateFromStr = (timestamp)=>{
|
|
31
|
+
return /^\d+$/.test(timestamp) ? new Date(parseInt(timestamp) * 1000) : new Date(Date.parse(timestamp));
|
|
32
|
+
};
|
|
33
|
+
const LogTimestamp = ({ timestamp })=>{
|
|
34
|
+
const date = typeof timestamp === 'number' ? new Date(timestamp * 1000) : dateFromStr(timestamp);
|
|
35
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("time", {
|
|
36
|
+
style: {
|
|
37
|
+
fontSize: '12px',
|
|
38
|
+
whiteSpace: 'nowrap',
|
|
39
|
+
minWidth: 'max-content'
|
|
40
|
+
},
|
|
41
|
+
dateTime: date.toISOString(),
|
|
42
|
+
children: date.toISOString()
|
|
43
|
+
});
|
|
44
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
function _export(target, all) {
|
|
18
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: all[name]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
_export(exports, {
|
|
24
|
+
ExpandButton: function() {
|
|
25
|
+
return ExpandButton;
|
|
26
|
+
},
|
|
27
|
+
LogRowContainer: function() {
|
|
28
|
+
return LogRowContainer;
|
|
29
|
+
},
|
|
30
|
+
LogRowContent: function() {
|
|
31
|
+
return LogRowContent;
|
|
32
|
+
},
|
|
33
|
+
LogText: function() {
|
|
34
|
+
return LogText;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const _material = require("@mui/material");
|
|
38
|
+
const LogRowContainer = (0, _material.styled)(_material.Box, {
|
|
39
|
+
shouldForwardProp: (prop)=>prop !== 'severityColor'
|
|
40
|
+
})(({ severityColor })=>({
|
|
41
|
+
borderLeft: `4px solid ${severityColor}`,
|
|
42
|
+
transition: 'all 0.2s ease',
|
|
43
|
+
marginBottom: '4px',
|
|
44
|
+
fontFamily: '"DejaVu Sans Mono", monospace'
|
|
45
|
+
}));
|
|
46
|
+
const LogRowContent = (0, _material.styled)(_material.Box, {
|
|
47
|
+
shouldForwardProp: (prop)=>prop !== 'isExpandable'
|
|
48
|
+
})(({ theme, isExpandable })=>({
|
|
49
|
+
display: 'grid',
|
|
50
|
+
gridTemplateColumns: isExpandable ? '16px minmax(160px, max-content) 1fr' : 'minmax(160px, max-content) 1fr',
|
|
51
|
+
alignItems: 'flex-start',
|
|
52
|
+
padding: '4px 8px',
|
|
53
|
+
cursor: isExpandable ? 'pointer' : 'default',
|
|
54
|
+
gap: '12px',
|
|
55
|
+
'&:hover': {
|
|
56
|
+
backgroundColor: theme.palette.action.hover
|
|
57
|
+
}
|
|
58
|
+
}));
|
|
59
|
+
const ExpandButton = (0, _material.styled)(_material.IconButton, {
|
|
60
|
+
shouldForwardProp: (prop)=>prop !== 'isExpanded'
|
|
61
|
+
})(({ theme, isExpanded })=>({
|
|
62
|
+
padding: 0,
|
|
63
|
+
width: '16px',
|
|
64
|
+
height: '16px',
|
|
65
|
+
color: theme.palette.text.secondary,
|
|
66
|
+
transform: isExpanded ? 'rotate(90deg)' : 'rotate(0deg)',
|
|
67
|
+
transition: 'transform 0.2s ease'
|
|
68
|
+
}));
|
|
69
|
+
const LogText = (0, _material.styled)(_material.Typography, {
|
|
70
|
+
shouldForwardProp: (prop)=>prop !== 'allowWrap'
|
|
71
|
+
})(({ allowWrap })=>({
|
|
72
|
+
fontSize: '12px',
|
|
73
|
+
flex: 1,
|
|
74
|
+
lineHeight: 1.4,
|
|
75
|
+
textAlign: 'left',
|
|
76
|
+
...allowWrap ? {
|
|
77
|
+
wordBreak: 'break-word',
|
|
78
|
+
whiteSpace: 'pre-wrap',
|
|
79
|
+
overflow: 'visible',
|
|
80
|
+
textOverflow: 'unset'
|
|
81
|
+
} : {
|
|
82
|
+
wordBreak: 'normal',
|
|
83
|
+
whiteSpace: 'nowrap'
|
|
84
|
+
}
|
|
85
|
+
}));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "LogRow", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return _LogRow.LogRow;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _LogRow = require("./LogRow");
|
|
24
|
+
_export_star(require("./LogsStyles"), exports);
|
|
25
|
+
function _export_star(from, to) {
|
|
26
|
+
Object.keys(from).forEach(function(k) {
|
|
27
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
28
|
+
Object.defineProperty(to, k, {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function() {
|
|
31
|
+
return from[k];
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return from;
|
|
37
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright 2025 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "LogsList", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return LogsList;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
25
|
+
const _EmptyLogsState = require("./EmptyLogsState");
|
|
26
|
+
const _useExpandedRows = require("./hooks/useExpandedRows");
|
|
27
|
+
const _VirtualizedLogsList = require("./VirtualizedLogsList");
|
|
28
|
+
function _interop_require_default(obj) {
|
|
29
|
+
return obj && obj.__esModule ? obj : {
|
|
30
|
+
default: obj
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const LogsList = ({ logs, spec })=>{
|
|
34
|
+
const { expandedRows, toggleExpand } = (0, _useExpandedRows.useExpandedRows)();
|
|
35
|
+
if (!logs.length) {
|
|
36
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_EmptyLogsState.EmptyLogsState, {});
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_VirtualizedLogsList.VirtualizedLogsList, {
|
|
39
|
+
logs: logs,
|
|
40
|
+
spec: spec,
|
|
41
|
+
expandedRows: expandedRows,
|
|
42
|
+
onToggleExpand: toggleExpand
|
|
43
|
+
});
|
|
44
|
+
};
|