@perses-dev/logs-table-plugin 0.1.1 → 0.2.0-rc.1
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/__mf/js/{LogsTable.c4412590.js → LogsTable.ffa8ed65.js} +5 -5
- package/__mf/js/async/1117.50399f3d.js +2 -0
- package/__mf/js/async/1129.02ed4362.js +7 -0
- package/__mf/js/async/1240.1a0b69fc.js +1 -0
- package/__mf/js/async/304.d0edd380.js +37 -0
- package/__mf/js/async/3982.ab5d25af.js +1 -0
- package/__mf/js/async/6034.7b195c2d.js +22 -0
- package/__mf/js/async/648.9ad2a610.js +1 -0
- package/__mf/js/async/7445.28262ec0.js +110 -0
- package/__mf/js/async/8542.1802a06b.js +1 -0
- package/__mf/js/async/8608.4e8b55b4.js +1 -0
- package/__mf/js/async/8859.f8f648fc.js +1 -0
- package/__mf/js/async/9293.7e278959.js +2 -0
- package/__mf/js/async/__federation_expose_LogsTable.33da59f6.js +1 -0
- package/__mf/js/async/lib-router.04411383.js +2 -0
- package/__mf/js/async/{lib-router.318cb64e.js.LICENSE.txt → lib-router.04411383.js.LICENSE.txt} +3 -3
- package/__mf/js/{main.a9012790.js → main.532e9cfc.js} +5 -5
- package/lib/LogsTable.d.ts.map +1 -1
- package/lib/LogsTable.js +6 -1
- package/lib/LogsTable.js.map +1 -1
- package/lib/LogsTableComponent.d.ts.map +1 -1
- package/lib/LogsTableComponent.js +13 -9
- package/lib/LogsTableComponent.js.map +1 -1
- package/lib/LogsTableItemSelectionActionsEditor.d.ts +4 -0
- package/lib/LogsTableItemSelectionActionsEditor.d.ts.map +1 -0
- package/lib/LogsTableItemSelectionActionsEditor.js +36 -0
- package/lib/LogsTableItemSelectionActionsEditor.js.map +1 -0
- package/lib/LogsTablePanel.js +1 -1
- package/lib/LogsTablePanel.js.map +1 -1
- package/lib/LogsTableSettingsEditor.js +2 -2
- package/lib/LogsTableSettingsEditor.js.map +1 -1
- package/lib/bootstrap.js +1 -1
- package/lib/bootstrap.js.map +1 -1
- package/lib/cjs/LogsTable.js +6 -1
- package/lib/cjs/LogsTableComponent.js +12 -8
- package/lib/cjs/LogsTableItemSelectionActionsEditor.js +44 -0
- package/lib/cjs/LogsTablePanel.js +1 -1
- package/lib/cjs/LogsTableSettingsEditor.js +1 -1
- package/lib/cjs/bootstrap.js +1 -1
- package/lib/cjs/components/EmptyLogsState.js +1 -1
- package/lib/cjs/components/LogRow/LogDetailsTable.js +1 -1
- package/lib/cjs/components/LogRow/LogRow.js +260 -13
- package/lib/cjs/components/LogRow/LogTimestamp.js +1 -1
- package/lib/cjs/components/LogRow/LogsStyles.js +9 -7
- package/lib/cjs/components/LogRow/index.js +1 -1
- package/lib/cjs/components/LogsList.js +1 -1
- package/lib/cjs/components/VirtualizedLogsList.js +502 -19
- package/lib/cjs/components/hooks/useExpandedRows.js +1 -1
- package/lib/cjs/components/hooks/useSeverity.js +47 -0
- package/lib/cjs/components/utils.js +78 -0
- package/lib/cjs/env.d.js +1 -1
- package/lib/cjs/getPluginModule.js +12 -0
- package/lib/cjs/index-federation.js +1 -1
- package/lib/cjs/index.js +12 -0
- package/lib/cjs/model.js +1 -1
- package/lib/cjs/setup-tests.js +1 -1
- package/lib/cjs/test/mock-query-results.js +60 -3
- package/lib/cjs/utils/copyHelpers.js +70 -0
- package/lib/components/EmptyLogsState.js +1 -1
- package/lib/components/EmptyLogsState.js.map +1 -1
- package/lib/components/LogRow/LogDetailsTable.js +1 -1
- package/lib/components/LogRow/LogDetailsTable.js.map +1 -1
- package/lib/components/LogRow/LogRow.d.ts +4 -1
- package/lib/components/LogRow/LogRow.d.ts.map +1 -1
- package/lib/components/LogRow/LogRow.js +262 -15
- package/lib/components/LogRow/LogRow.js.map +1 -1
- package/lib/components/LogRow/LogTimestamp.js +1 -1
- package/lib/components/LogRow/LogTimestamp.js.map +1 -1
- package/lib/components/LogRow/LogsStyles.d.ts +3 -0
- package/lib/components/LogRow/LogsStyles.d.ts.map +1 -1
- package/lib/components/LogRow/LogsStyles.js +9 -7
- package/lib/components/LogRow/LogsStyles.js.map +1 -1
- package/lib/components/LogRow/index.js +1 -1
- package/lib/components/LogRow/index.js.map +1 -1
- package/lib/components/LogsList.js +1 -1
- package/lib/components/LogsList.js.map +1 -1
- package/lib/components/VirtualizedLogsList.d.ts.map +1 -1
- package/lib/components/VirtualizedLogsList.js +463 -21
- package/lib/components/VirtualizedLogsList.js.map +1 -1
- package/lib/components/hooks/useExpandedRows.js +1 -1
- package/lib/components/hooks/useExpandedRows.js.map +1 -1
- package/lib/components/hooks/useSeverity.d.ts +3 -0
- package/lib/components/hooks/useSeverity.d.ts.map +1 -0
- package/lib/components/hooks/useSeverity.js +39 -0
- package/lib/components/hooks/useSeverity.js.map +1 -0
- package/lib/components/utils.d.ts +5 -0
- package/lib/components/utils.d.ts.map +1 -0
- package/lib/components/utils.js +62 -0
- package/lib/components/utils.js.map +1 -0
- package/lib/env.d.js +1 -1
- package/lib/env.d.js.map +1 -1
- package/lib/getPluginModule.d.ts.map +1 -1
- package/lib/getPluginModule.js +12 -0
- package/lib/getPluginModule.js.map +1 -1
- package/lib/index-federation.js +1 -1
- package/lib/index-federation.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +12 -0
- package/lib/index.js.map +1 -1
- package/lib/model.d.ts +4 -1
- package/lib/model.d.ts.map +1 -1
- package/lib/model.js +1 -1
- package/lib/model.js.map +1 -1
- package/lib/setup-tests.js +1 -1
- package/lib/setup-tests.js.map +1 -1
- package/lib/test/mock-query-results.d.ts +1 -0
- package/lib/test/mock-query-results.d.ts.map +1 -1
- package/lib/test/mock-query-results.js +57 -3
- package/lib/test/mock-query-results.js.map +1 -1
- package/lib/utils/copyHelpers.d.ts +28 -0
- package/lib/utils/copyHelpers.d.ts.map +1 -0
- package/lib/utils/copyHelpers.js +56 -0
- package/lib/utils/copyHelpers.js.map +1 -0
- package/mf-manifest.json +27 -27
- package/mf-stats.json +32 -29
- package/package.json +5 -5
- package/__mf/js/async/1939.46722505.js +0 -1
- package/__mf/js/async/580.9e16464c.js +0 -110
- package/__mf/js/async/5997.f6b3408c.js +0 -2
- package/__mf/js/async/6600.aebd51ab.js +0 -22
- package/__mf/js/async/7417.39d13c6a.js +0 -1
- package/__mf/js/async/8252.957087a6.js +0 -1
- package/__mf/js/async/8294.dac3426d.js +0 -37
- package/__mf/js/async/8535.20f8a453.js +0 -1
- package/__mf/js/async/9355.e4855f05.js +0 -2
- package/__mf/js/async/9558.692edca6.js +0 -1
- package/__mf/js/async/9732.b7b47c32.js +0 -7
- package/__mf/js/async/9890.b97f395d.js +0 -1
- package/__mf/js/async/__federation_expose_LogsTable.bed2792d.js +0 -1
- package/__mf/js/async/lib-router.318cb64e.js +0 -2
- /package/__mf/js/async/{9355.e4855f05.js.LICENSE.txt → 1117.50399f3d.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{9732.b7b47c32.js.LICENSE.txt → 1129.02ed4362.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6600.aebd51ab.js.LICENSE.txt → 6034.7b195c2d.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{580.9e16464c.js.LICENSE.txt → 7445.28262ec0.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Copyright 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: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
_export(exports, {
|
|
24
|
+
get getSeverity () {
|
|
25
|
+
return getSeverity;
|
|
26
|
+
},
|
|
27
|
+
get severityAbbreviations () {
|
|
28
|
+
return severityAbbreviations;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const severityAbbreviations = {
|
|
32
|
+
critical: [
|
|
33
|
+
'critical',
|
|
34
|
+
'emerg',
|
|
35
|
+
'fatal',
|
|
36
|
+
'alert',
|
|
37
|
+
'crit'
|
|
38
|
+
],
|
|
39
|
+
error: [
|
|
40
|
+
'error',
|
|
41
|
+
'err',
|
|
42
|
+
'eror'
|
|
43
|
+
],
|
|
44
|
+
debug: [
|
|
45
|
+
'debug',
|
|
46
|
+
'dbug'
|
|
47
|
+
],
|
|
48
|
+
info: [
|
|
49
|
+
'info',
|
|
50
|
+
'inf',
|
|
51
|
+
'information',
|
|
52
|
+
'notice'
|
|
53
|
+
],
|
|
54
|
+
trace: [
|
|
55
|
+
'trace'
|
|
56
|
+
],
|
|
57
|
+
warning: [
|
|
58
|
+
'warn',
|
|
59
|
+
'warning'
|
|
60
|
+
],
|
|
61
|
+
unknown: [
|
|
62
|
+
'unknown'
|
|
63
|
+
],
|
|
64
|
+
other: [
|
|
65
|
+
''
|
|
66
|
+
]
|
|
67
|
+
};
|
|
68
|
+
const getSeverity = (log)=>{
|
|
69
|
+
const level = log.labels?.level?.toLowerCase();
|
|
70
|
+
if (level) {
|
|
71
|
+
for (const [severity, abbreviations] of Object.entries(severityAbbreviations)){
|
|
72
|
+
if (abbreviations.some((abbr)=>abbr && level.includes(abbr))) {
|
|
73
|
+
return severity;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return 'unknown';
|
|
78
|
+
};
|
package/lib/cjs/env.d.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
// Copyright 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.
|
|
1
13
|
"use strict";
|
|
2
14
|
Object.defineProperty(exports, "__esModule", {
|
|
3
15
|
value: true
|
|
@@ -40,7 +40,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
40
40
|
}
|
|
41
41
|
return newObj;
|
|
42
42
|
}
|
|
43
|
-
// Copyright
|
|
43
|
+
// Copyright The Perses Authors
|
|
44
44
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
45
45
|
// you may not use this file except in compliance with the License.
|
|
46
46
|
// You may obtain a copy of the License at
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
// Copyright 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.
|
|
1
13
|
"use strict";
|
|
2
14
|
Object.defineProperty(exports, "__esModule", {
|
|
3
15
|
value: true
|
package/lib/cjs/model.js
CHANGED
package/lib/cjs/setup-tests.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -26,6 +26,9 @@ _export(exports, {
|
|
|
26
26
|
},
|
|
27
27
|
get MOCK_LOGS_QUERY_RESULT () {
|
|
28
28
|
return MOCK_LOGS_QUERY_RESULT;
|
|
29
|
+
},
|
|
30
|
+
get MOCK_LOGS_QUERY_RESULTS () {
|
|
31
|
+
return MOCK_LOGS_QUERY_RESULTS;
|
|
29
32
|
}
|
|
30
33
|
});
|
|
31
34
|
const MOCK_LOGS_QUERY_RESULT = {
|
|
@@ -37,7 +40,7 @@ const MOCK_LOGS_QUERY_RESULT = {
|
|
|
37
40
|
},
|
|
38
41
|
entries: [
|
|
39
42
|
{
|
|
40
|
-
timestamp:
|
|
43
|
+
timestamp: 1666625491,
|
|
41
44
|
line: 'foo',
|
|
42
45
|
labels: {
|
|
43
46
|
device: '/dev/vda1',
|
|
@@ -49,7 +52,7 @@ const MOCK_LOGS_QUERY_RESULT = {
|
|
|
49
52
|
}
|
|
50
53
|
},
|
|
51
54
|
{
|
|
52
|
-
timestamp:
|
|
55
|
+
timestamp: 1666625490,
|
|
53
56
|
line: 'bar',
|
|
54
57
|
labels: {
|
|
55
58
|
device: '/dev/vda15',
|
|
@@ -63,6 +66,60 @@ const MOCK_LOGS_QUERY_RESULT = {
|
|
|
63
66
|
]
|
|
64
67
|
}
|
|
65
68
|
};
|
|
69
|
+
const MOCK_LOGS_QUERY_RESULTS = [
|
|
70
|
+
{
|
|
71
|
+
logs: {
|
|
72
|
+
entries: [
|
|
73
|
+
{
|
|
74
|
+
timestamp: 1769009811.4465687,
|
|
75
|
+
line: '{"host":"120.180.160.121", "user-identifier":"-", "datetime":"21/Jan/2026:15:32:31 +0000", "method": "DELETE", "request": "/killer/pixy", "protocol":"HTTP/2.0", "status":200, "bytes":9821, "referer": "http://www.internationalend-to-end.com/e-business/web services"}',
|
|
76
|
+
labels: {
|
|
77
|
+
app: 'log-generator',
|
|
78
|
+
bytes: '9821',
|
|
79
|
+
datetime: '21/Jan/2026:15:32:31 +0000',
|
|
80
|
+
detected_level: 'unknown',
|
|
81
|
+
filename: '/var/log/fake/fake.log',
|
|
82
|
+
host: '120.180.160.121',
|
|
83
|
+
method: 'DELETE',
|
|
84
|
+
protocol: 'HTTP/2.0',
|
|
85
|
+
referer: 'http://www.internationalend-to-end.com/e-business/web services',
|
|
86
|
+
request: '/killer/pixy',
|
|
87
|
+
service_name: 'log-generator',
|
|
88
|
+
status: '200',
|
|
89
|
+
user_identifier: '-'
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
totalCount: 1
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
logs: {
|
|
98
|
+
entries: [
|
|
99
|
+
{
|
|
100
|
+
timestamp: 1769009890.5294495,
|
|
101
|
+
line: '{"host":"18.178.231.77", "user-identifier":"cormier2584", "datetime":"21/Jan/2026:15:33:49 +0000", "method": "POST", "request": "/facilitate/mesh/methodologies/deploy", "protocol":"HTTP/1.1", "status":503, "bytes":9892, "referer": "http://www.direct.com/holistic"}',
|
|
102
|
+
labels: {
|
|
103
|
+
app: 'log-generator',
|
|
104
|
+
bytes: '9892',
|
|
105
|
+
datetime: '21/Jan/2026:15:33:49 +0000',
|
|
106
|
+
detected_level: 'unknown',
|
|
107
|
+
filename: '/var/log/fake/fake.log',
|
|
108
|
+
host: '18.178.231.77',
|
|
109
|
+
method: 'POST',
|
|
110
|
+
protocol: 'HTTP/1.1',
|
|
111
|
+
referer: 'http://www.direct.com/holistic',
|
|
112
|
+
request: '/facilitate/mesh/methodologies/deploy',
|
|
113
|
+
service_name: 'log-generator',
|
|
114
|
+
status: '503',
|
|
115
|
+
user_identifier: 'cormier2584'
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
totalCount: 1
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
];
|
|
66
123
|
const MOCK_LOGS_QUERY_DEFINITION = {
|
|
67
124
|
kind: 'LogsQuery',
|
|
68
125
|
spec: {
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Copyright 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: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
_export(exports, {
|
|
24
|
+
get formatLabels () {
|
|
25
|
+
return formatLabels;
|
|
26
|
+
},
|
|
27
|
+
get formatLogAsJson () {
|
|
28
|
+
return formatLogAsJson;
|
|
29
|
+
},
|
|
30
|
+
get formatLogEntries () {
|
|
31
|
+
return formatLogEntries;
|
|
32
|
+
},
|
|
33
|
+
get formatLogEntry () {
|
|
34
|
+
return formatLogEntry;
|
|
35
|
+
},
|
|
36
|
+
get formatLogMessage () {
|
|
37
|
+
return formatLogMessage;
|
|
38
|
+
},
|
|
39
|
+
get formatTimestamp () {
|
|
40
|
+
return formatTimestamp;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
function formatTimestamp(timestamp) {
|
|
44
|
+
const date = typeof timestamp === 'number' ? new Date(timestamp * 1000) : parseTimestamp(timestamp);
|
|
45
|
+
return date.toISOString();
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Parses a timestamp string to a Date object
|
|
49
|
+
*/ function parseTimestamp(timestamp) {
|
|
50
|
+
return /^\d+$/.test(timestamp) ? new Date(parseInt(timestamp) * 1000) : new Date(Date.parse(timestamp));
|
|
51
|
+
}
|
|
52
|
+
function formatLabels(labels) {
|
|
53
|
+
const entries = Object.entries(labels);
|
|
54
|
+
if (entries.length === 0) return '';
|
|
55
|
+
return entries.map(([key, value])=>`${key}="${value}"`).join(' ');
|
|
56
|
+
}
|
|
57
|
+
function formatLogEntry(log) {
|
|
58
|
+
const timestamp = formatTimestamp(log.timestamp);
|
|
59
|
+
const labels = formatLabels(log.labels || {});
|
|
60
|
+
return labels ? `${timestamp} ${labels} ${log.line}` : `${timestamp} ${log.line}`;
|
|
61
|
+
}
|
|
62
|
+
function formatLogMessage(log) {
|
|
63
|
+
return log.line;
|
|
64
|
+
}
|
|
65
|
+
function formatLogAsJson(log) {
|
|
66
|
+
return JSON.stringify(log, null, 2);
|
|
67
|
+
}
|
|
68
|
+
function formatLogEntries(logs) {
|
|
69
|
+
return logs.map(formatLogEntry).join('\n');
|
|
70
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright The Perses Authors
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
5
5
|
// You may obtain a copy of the License at
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/EmptyLogsState.tsx"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../src/components/EmptyLogsState.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { Box, Typography, useTheme } from '@mui/material';\n\ninterface EmptyLogsStateProps {\n message?: string;\n}\n\nexport const EmptyLogsState: React.FC<EmptyLogsStateProps> = ({ message = 'No logs to display' }) => {\n const theme = useTheme();\n\n return (\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '200px',\n }}\n >\n <Typography\n variant=\"body2\"\n sx={{\n color: theme.palette.text.secondary,\n fontSize: '14px',\n }}\n >\n {message}\n </Typography>\n </Box>\n );\n};\n"],"names":["React","Box","Typography","useTheme","EmptyLogsState","message","theme","sx","display","alignItems","justifyContent","height","variant","color","palette","text","secondary","fontSize"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,WAAW,QAAQ;AAC1B,SAASC,GAAG,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,gBAAgB;AAM1D,OAAO,MAAMC,iBAAgD,CAAC,EAAEC,UAAU,oBAAoB,EAAE;IAC9F,MAAMC,QAAQH;IAEd,qBACE,KAACF;QACCM,IAAI;YACFC,SAAS;YACTC,YAAY;YACZC,gBAAgB;YAChBC,QAAQ;QACV;kBAEA,cAAA,KAACT;YACCU,SAAQ;YACRL,IAAI;gBACFM,OAAOP,MAAMQ,OAAO,CAACC,IAAI,CAACC,SAAS;gBACnCC,UAAU;YACZ;sBAECZ;;;AAIT,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright The Perses Authors
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
5
5
|
// You may obtain a copy of the License at
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/LogRow/LogDetailsTable.tsx"],"sourcesContent":["// Copyright
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/LogRow/LogDetailsTable.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { Table, TableBody, TableRow, TableCell, useTheme, alpha } from '@mui/material';\nimport { Labels } from '@perses-dev/core';\n\ninterface LogDetailsTableProps {\n log: Labels;\n}\n\nexport const LogDetailsTable: React.FC<LogDetailsTableProps> = ({ log }) => {\n const theme = useTheme();\n\n return (\n <Table\n size=\"small\"\n sx={{\n border: `1px solid ${theme.palette.divider}`,\n '& .MuiTableCell-root': {\n border: 'none',\n padding: '6px 8px',\n fontSize: '12px',\n },\n }}\n >\n <TableBody>\n {Object.entries(log).map(([key, value]) => (\n <TableRow\n key={key}\n sx={{\n '&:hover': {\n backgroundColor: alpha(theme.palette.action.hover, 0.04),\n },\n }}\n >\n <TableCell\n sx={{\n color: theme.palette.text.secondary,\n fontWeight: 500,\n width: '33%',\n }}\n >\n {key}\n </TableCell>\n <TableCell\n sx={{\n color: theme.palette.text.primary,\n wordBreak: 'break-word',\n width: '67%',\n }}\n >\n {value !== undefined && value !== null && value !== '' ? value : '--'}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n );\n};\n"],"names":["React","Table","TableBody","TableRow","TableCell","useTheme","alpha","LogDetailsTable","log","theme","size","sx","border","palette","divider","padding","fontSize","Object","entries","map","key","value","backgroundColor","action","hover","color","text","secondary","fontWeight","width","primary","wordBreak","undefined"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,WAAW,QAAQ;AAC1B,SAASC,KAAK,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,gBAAgB;AAOvF,OAAO,MAAMC,kBAAkD,CAAC,EAAEC,GAAG,EAAE;IACrE,MAAMC,QAAQJ;IAEd,qBACE,KAACJ;QACCS,MAAK;QACLC,IAAI;YACFC,QAAQ,CAAC,UAAU,EAAEH,MAAMI,OAAO,CAACC,OAAO,EAAE;YAC5C,wBAAwB;gBACtBF,QAAQ;gBACRG,SAAS;gBACTC,UAAU;YACZ;QACF;kBAEA,cAAA,KAACd;sBACEe,OAAOC,OAAO,CAACV,KAAKW,GAAG,CAAC,CAAC,CAACC,KAAKC,MAAM,iBACpC,MAAClB;oBAECQ,IAAI;wBACF,WAAW;4BACTW,iBAAiBhB,MAAMG,MAAMI,OAAO,CAACU,MAAM,CAACC,KAAK,EAAE;wBACrD;oBACF;;sCAEA,KAACpB;4BACCO,IAAI;gCACFc,OAAOhB,MAAMI,OAAO,CAACa,IAAI,CAACC,SAAS;gCACnCC,YAAY;gCACZC,OAAO;4BACT;sCAECT;;sCAEH,KAAChB;4BACCO,IAAI;gCACFc,OAAOhB,MAAMI,OAAO,CAACa,IAAI,CAACI,OAAO;gCACjCC,WAAW;gCACXF,OAAO;4BACT;sCAECR,UAAUW,aAAaX,UAAU,QAAQA,UAAU,KAAKA,QAAQ;;;mBAvB9DD;;;AA8BjB,EAAE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { LogEntry } from '@perses-dev/core';
|
|
3
3
|
interface LogRowProps {
|
|
4
4
|
log?: LogEntry;
|
|
@@ -8,6 +8,9 @@ interface LogRowProps {
|
|
|
8
8
|
isExpandable?: boolean;
|
|
9
9
|
showTime?: boolean;
|
|
10
10
|
allowWrap?: boolean;
|
|
11
|
+
isSelected?: boolean;
|
|
12
|
+
onSelect?: (index: number, event: React.MouseEvent) => void;
|
|
13
|
+
itemActionButtons?: ReactNode[];
|
|
11
14
|
}
|
|
12
15
|
export declare const LogRow: React.NamedExoticComponent<LogRowProps>;
|
|
13
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogRow.d.ts","sourceRoot":"","sources":["../../../../src/components/LogRow/LogRow.tsx"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"LogRow.d.ts","sourceRoot":"","sources":["../../../../src/components/LogRow/LogRow.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,EAAkD,SAAS,EAAE,MAAM,OAAO,CAAC;AAkBzF,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAS5C,UAAU,WAAW;IACnB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5D,iBAAiB,CAAC,EAAE,SAAS,EAAE,CAAC;CACjC;AAqTD,eAAO,MAAM,MAAM,yCAAsB,CAAC"}
|