@perses-dev/loki-plugin 0.2.0 → 0.4.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.
Files changed (172) hide show
  1. package/__mf/css/async/1580.d3010b86.css +1 -0
  2. package/__mf/css/async/2341.d3010b86.css +1 -0
  3. package/__mf/css/async/6759.d3010b86.css +1 -0
  4. package/__mf/js/{Loki.b0aaf34e.js → Loki.c48c56a7.js} +4 -4
  5. package/__mf/js/async/1360.2348e2a7.js +10 -0
  6. package/__mf/js/async/1398.ca579c40.js +2 -0
  7. package/__mf/js/async/1580.c7d3c3f1.js +2 -0
  8. package/__mf/js/async/2226.a056d1a3.js +1 -0
  9. package/__mf/js/async/2652.7b7038d2.js +28 -0
  10. package/__mf/js/async/282.6c4c5a94.js +1 -0
  11. package/__mf/js/async/{4075.ea5435c6.js → 4075.19dee570.js} +1 -1
  12. package/__mf/js/async/{4238.ac5f0a30.js → 4238.155e3b8a.js} +1 -1
  13. package/__mf/js/async/4310.6d2d2ce3.js +7 -0
  14. package/__mf/js/async/4421.28cc8e2d.js +1 -0
  15. package/__mf/js/async/4557.fd670526.js +2 -0
  16. package/__mf/js/async/4676.d4c41b7a.js +22 -0
  17. package/__mf/js/async/6134.f7ee513c.js +38 -0
  18. package/__mf/js/async/6329.9c3a3698.js +2 -0
  19. package/__mf/js/async/7797.822237c9.js +1 -0
  20. package/__mf/js/async/9554.728cf7b9.js +2 -0
  21. package/__mf/js/async/{__federation_expose_LokiDatasource.875ecaed.js → __federation_expose_LokiDatasource.3ce6abca.js} +2 -2
  22. package/__mf/js/async/__federation_expose_LokiLogQuery.c446c7ff.js +1 -0
  23. package/__mf/js/async/__federation_expose_LokiTimeSeriesQuery.eda99bf8.js +1 -0
  24. package/__mf/js/{main.7a86e12b.js → main.ccf461ea.js} +4 -4
  25. package/lib/cjs/index.js +0 -1
  26. package/lib/cjs/queries/loki-log-query/LokiLogQueryEditor.js +5 -16
  27. package/lib/cjs/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.js +5 -16
  28. package/lib/index.d.ts +0 -1
  29. package/lib/index.d.ts.map +1 -1
  30. package/lib/index.js +0 -1
  31. package/lib/index.js.map +1 -1
  32. package/lib/model/loki-data-types.d.ts +3 -13
  33. package/lib/model/loki-data-types.d.ts.map +1 -1
  34. package/lib/model/loki-data-types.js.map +1 -1
  35. package/lib/queries/loki-log-query/LokiLogQueryEditor.d.ts.map +1 -1
  36. package/lib/queries/loki-log-query/LokiLogQueryEditor.js +4 -15
  37. package/lib/queries/loki-log-query/LokiLogQueryEditor.js.map +1 -1
  38. package/lib/queries/loki-log-query/get-loki-log-data.js.map +1 -1
  39. package/lib/queries/loki-log-query/log-query-plugin-interface.d.ts +2 -4
  40. package/lib/queries/loki-log-query/log-query-plugin-interface.d.ts.map +1 -1
  41. package/lib/queries/loki-log-query/log-query-plugin-interface.js.map +1 -1
  42. package/lib/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.d.ts.map +1 -1
  43. package/lib/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.js +4 -15
  44. package/lib/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.js.map +1 -1
  45. package/mf-manifest.json +60 -121
  46. package/mf-stats.json +60 -123
  47. package/package.json +6 -15
  48. package/__mf/css/async/1320.7ad02b85.css +0 -1
  49. package/__mf/css/async/2341.7ad02b85.css +0 -1
  50. package/__mf/css/async/9479.7ad02b85.css +0 -1
  51. package/__mf/js/async/1320.ca6d65b6.js +0 -2
  52. package/__mf/js/async/2417.993ba27f.js +0 -2
  53. package/__mf/js/async/2448.6a132c1c.js +0 -10
  54. package/__mf/js/async/2470.ba894af3.js +0 -7
  55. package/__mf/js/async/282.3d82e785.js +0 -1
  56. package/__mf/js/async/3849.c4035be2.js +0 -1
  57. package/__mf/js/async/4168.645bbaa1.js +0 -2
  58. package/__mf/js/async/4368.40ff20c1.js +0 -2
  59. package/__mf/js/async/4421.8aeb683a.js +0 -1
  60. package/__mf/js/async/4687.1af57d71.js +0 -2
  61. package/__mf/js/async/4693.ba67a5aa.js +0 -1
  62. package/__mf/js/async/5035.15709e1b.js +0 -73
  63. package/__mf/js/async/5713.3b303108.js +0 -1
  64. package/__mf/js/async/5876.5618763d.js +0 -2
  65. package/__mf/js/async/592.269748ce.js +0 -1
  66. package/__mf/js/async/6569.f33ecbef.js +0 -1
  67. package/__mf/js/async/6664.078084ff.js +0 -28
  68. package/__mf/js/async/9479.f74b4605.js +0 -1
  69. package/__mf/js/async/9654.575f5449.js +0 -37
  70. package/__mf/js/async/__federation_expose_LogsTable.0bf7a331.js +0 -2
  71. package/__mf/js/async/__federation_expose_LokiDatasource.875ecaed.js.LICENSE.txt +0 -9
  72. package/__mf/js/async/__federation_expose_LokiLogQuery.ab63332a.js +0 -1
  73. package/__mf/js/async/__federation_expose_LokiTimeSeriesQuery.9789679e.js +0 -1
  74. package/lib/cjs/panels/index.js +0 -30
  75. package/lib/cjs/panels/logstable/LogsTable.js +0 -41
  76. package/lib/cjs/panels/logstable/LogsTableComponent.js +0 -43
  77. package/lib/cjs/panels/logstable/LogsTableSettingsEditor.js +0 -70
  78. package/lib/cjs/panels/logstable/components/EmptyLogsState.js +0 -49
  79. package/lib/cjs/panels/logstable/components/LogRow/LogRow.js +0 -158
  80. package/lib/cjs/panels/logstable/components/LogRow/LogTimestamp.js +0 -44
  81. package/lib/cjs/panels/logstable/components/LogRow/LogsLabelsTable.js +0 -74
  82. package/lib/cjs/panels/logstable/components/LogRow/LogsStyles.js +0 -77
  83. package/lib/cjs/panels/logstable/components/LogRow/index.js +0 -37
  84. package/lib/cjs/panels/logstable/components/LogsList.js +0 -44
  85. package/lib/cjs/panels/logstable/components/VirtualizedLogsList.js +0 -63
  86. package/lib/cjs/panels/logstable/components/index.js +0 -23
  87. package/lib/cjs/panels/logstable/components/utils.js +0 -39
  88. package/lib/cjs/panels/logstable/hooks/useExpandedRows.js +0 -45
  89. package/lib/cjs/panels/logstable/hooks/useSeverity.js +0 -43
  90. package/lib/cjs/panels/logstable/index.js +0 -33
  91. package/lib/cjs/panels/logstable/logs-types.js +0 -16
  92. package/lib/panels/index.d.ts +0 -2
  93. package/lib/panels/index.d.ts.map +0 -1
  94. package/lib/panels/index.js +0 -15
  95. package/lib/panels/index.js.map +0 -1
  96. package/lib/panels/logstable/LogsTable.d.ts +0 -4
  97. package/lib/panels/logstable/LogsTable.d.ts.map +0 -1
  98. package/lib/panels/logstable/LogsTable.js +0 -33
  99. package/lib/panels/logstable/LogsTable.js.map +0 -1
  100. package/lib/panels/logstable/LogsTableComponent.d.ts +0 -4
  101. package/lib/panels/logstable/LogsTableComponent.d.ts.map +0 -1
  102. package/lib/panels/logstable/LogsTableComponent.js +0 -35
  103. package/lib/panels/logstable/LogsTableComponent.js.map +0 -1
  104. package/lib/panels/logstable/LogsTableSettingsEditor.d.ts +0 -7
  105. package/lib/panels/logstable/LogsTableSettingsEditor.d.ts.map +0 -1
  106. package/lib/panels/logstable/LogsTableSettingsEditor.js +0 -62
  107. package/lib/panels/logstable/LogsTableSettingsEditor.js.map +0 -1
  108. package/lib/panels/logstable/components/EmptyLogsState.d.ts +0 -7
  109. package/lib/panels/logstable/components/EmptyLogsState.d.ts.map +0 -1
  110. package/lib/panels/logstable/components/EmptyLogsState.js +0 -36
  111. package/lib/panels/logstable/components/EmptyLogsState.js.map +0 -1
  112. package/lib/panels/logstable/components/LogRow/LogRow.d.ts +0 -14
  113. package/lib/panels/logstable/components/LogRow/LogRow.d.ts.map +0 -1
  114. package/lib/panels/logstable/components/LogRow/LogRow.js +0 -104
  115. package/lib/panels/logstable/components/LogRow/LogRow.js.map +0 -1
  116. package/lib/panels/logstable/components/LogRow/LogTimestamp.d.ts +0 -7
  117. package/lib/panels/logstable/components/LogRow/LogTimestamp.d.ts.map +0 -1
  118. package/lib/panels/logstable/components/LogRow/LogTimestamp.js +0 -31
  119. package/lib/panels/logstable/components/LogRow/LogTimestamp.js.map +0 -1
  120. package/lib/panels/logstable/components/LogRow/LogsLabelsTable.d.ts +0 -7
  121. package/lib/panels/logstable/components/LogRow/LogsLabelsTable.d.ts.map +0 -1
  122. package/lib/panels/logstable/components/LogRow/LogsLabelsTable.js +0 -61
  123. package/lib/panels/logstable/components/LogRow/LogsLabelsTable.js.map +0 -1
  124. package/lib/panels/logstable/components/LogRow/LogsStyles.d.ts +0 -22
  125. package/lib/panels/logstable/components/LogRow/LogsStyles.d.ts.map +0 -1
  126. package/lib/panels/logstable/components/LogRow/LogsStyles.js +0 -55
  127. package/lib/panels/logstable/components/LogRow/LogsStyles.js.map +0 -1
  128. package/lib/panels/logstable/components/LogRow/index.d.ts +0 -3
  129. package/lib/panels/logstable/components/LogRow/index.d.ts.map +0 -1
  130. package/lib/panels/logstable/components/LogRow/index.js +0 -16
  131. package/lib/panels/logstable/components/LogRow/index.js.map +0 -1
  132. package/lib/panels/logstable/components/LogsList.d.ts +0 -10
  133. package/lib/panels/logstable/components/LogsList.d.ts.map +0 -1
  134. package/lib/panels/logstable/components/LogsList.js +0 -31
  135. package/lib/panels/logstable/components/LogsList.js.map +0 -1
  136. package/lib/panels/logstable/components/VirtualizedLogsList.d.ts +0 -12
  137. package/lib/panels/logstable/components/VirtualizedLogsList.d.ts.map +0 -1
  138. package/lib/panels/logstable/components/VirtualizedLogsList.js +0 -50
  139. package/lib/panels/logstable/components/VirtualizedLogsList.js.map +0 -1
  140. package/lib/panels/logstable/components/index.d.ts +0 -2
  141. package/lib/panels/logstable/components/index.d.ts.map +0 -1
  142. package/lib/panels/logstable/components/index.js +0 -15
  143. package/lib/panels/logstable/components/index.js.map +0 -1
  144. package/lib/panels/logstable/components/utils.d.ts +0 -3
  145. package/lib/panels/logstable/components/utils.d.ts.map +0 -1
  146. package/lib/panels/logstable/components/utils.js +0 -31
  147. package/lib/panels/logstable/components/utils.js.map +0 -1
  148. package/lib/panels/logstable/hooks/useExpandedRows.d.ts +0 -6
  149. package/lib/panels/logstable/hooks/useExpandedRows.d.ts.map +0 -1
  150. package/lib/panels/logstable/hooks/useExpandedRows.js +0 -37
  151. package/lib/panels/logstable/hooks/useExpandedRows.js.map +0 -1
  152. package/lib/panels/logstable/hooks/useSeverity.d.ts +0 -3
  153. package/lib/panels/logstable/hooks/useSeverity.d.ts.map +0 -1
  154. package/lib/panels/logstable/hooks/useSeverity.js +0 -35
  155. package/lib/panels/logstable/hooks/useSeverity.js.map +0 -1
  156. package/lib/panels/logstable/index.d.ts +0 -5
  157. package/lib/panels/logstable/index.d.ts.map +0 -1
  158. package/lib/panels/logstable/index.js +0 -18
  159. package/lib/panels/logstable/index.js.map +0 -1
  160. package/lib/panels/logstable/logs-types.d.ts +0 -11
  161. package/lib/panels/logstable/logs-types.d.ts.map +0 -1
  162. package/lib/panels/logstable/logs-types.js +0 -15
  163. package/lib/panels/logstable/logs-types.js.map +0 -1
  164. /package/__mf/js/async/{2448.6a132c1c.js.LICENSE.txt → 1360.2348e2a7.js.LICENSE.txt} +0 -0
  165. /package/__mf/js/async/{1320.ca6d65b6.js.LICENSE.txt → 1398.ca579c40.js.LICENSE.txt} +0 -0
  166. /package/__mf/js/async/{2417.993ba27f.js.LICENSE.txt → 1580.c7d3c3f1.js.LICENSE.txt} +0 -0
  167. /package/__mf/js/async/{2470.ba894af3.js.LICENSE.txt → 4310.6d2d2ce3.js.LICENSE.txt} +0 -0
  168. /package/__mf/js/async/{4368.40ff20c1.js.LICENSE.txt → 4557.fd670526.js.LICENSE.txt} +0 -0
  169. /package/__mf/js/async/{5035.15709e1b.js.LICENSE.txt → 4676.d4c41b7a.js.LICENSE.txt} +0 -0
  170. /package/__mf/js/async/{4687.1af57d71.js.LICENSE.txt → 6329.9c3a3698.js.LICENSE.txt} +0 -0
  171. /package/__mf/js/async/{5876.5618763d.js.LICENSE.txt → 9554.728cf7b9.js.LICENSE.txt} +0 -0
  172. /package/__mf/js/async/{__federation_expose_LogsTable.0bf7a331.js.LICENSE.txt → __federation_expose_LokiDatasource.3ce6abca.js.LICENSE.txt} +0 -0
@@ -1,49 +0,0 @@
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
- };
@@ -1,158 +0,0 @@
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 _useSeverity = require("../../hooks/useSeverity");
28
- const _LogTimestamp = require("./LogTimestamp");
29
- const _LogsStyles = require("./LogsStyles");
30
- const _LogsLabelsTable = require("./LogsLabelsTable");
31
- function _interop_require_default(obj) {
32
- return obj && obj.__esModule ? obj : {
33
- default: obj
34
- };
35
- }
36
- function _getRequireWildcardCache(nodeInterop) {
37
- if (typeof WeakMap !== "function") return null;
38
- var cacheBabelInterop = new WeakMap();
39
- var cacheNodeInterop = new WeakMap();
40
- return (_getRequireWildcardCache = function(nodeInterop) {
41
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
42
- })(nodeInterop);
43
- }
44
- function _interop_require_wildcard(obj, nodeInterop) {
45
- if (!nodeInterop && obj && obj.__esModule) {
46
- return obj;
47
- }
48
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
49
- return {
50
- default: obj
51
- };
52
- }
53
- var cache = _getRequireWildcardCache(nodeInterop);
54
- if (cache && cache.has(obj)) {
55
- return cache.get(obj);
56
- }
57
- var newObj = {
58
- __proto__: null
59
- };
60
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
61
- for(var key in obj){
62
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
63
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
64
- if (desc && (desc.get || desc.set)) {
65
- Object.defineProperty(newObj, key, desc);
66
- } else {
67
- newObj[key] = obj[key];
68
- }
69
- }
70
- }
71
- newObj.default = obj;
72
- if (cache) {
73
- cache.set(obj, newObj);
74
- }
75
- return newObj;
76
- }
77
- const LogRow = /*#__PURE__*/ (0, _react.memo)(({ log, isExpanded, index, onToggle, isExpandable = false, time = false, wrap = false })=>{
78
- const severityColor = (0, _useSeverity.useSeverityColor)(log);
79
- const handleToggle = (0, _react.useCallback)(()=>{
80
- if (isExpandable) {
81
- onToggle(index);
82
- }
83
- }, [
84
- isExpandable,
85
- onToggle,
86
- index
87
- ]);
88
- if (!log) {
89
- return null;
90
- }
91
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_LogsStyles.LogRowContainer, {
92
- severityColor: severityColor,
93
- children: [
94
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_LogsStyles.LogRowContent, {
95
- onClick: handleToggle,
96
- isExpandable: isExpandable,
97
- time: time,
98
- children: [
99
- isExpandable && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
100
- sx: {
101
- display: 'flex',
102
- alignItems: 'center',
103
- width: '16px',
104
- justifyContent: 'center'
105
- },
106
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogsStyles.ExpandButton, {
107
- size: "small",
108
- isExpanded: isExpanded,
109
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronRight.default, {
110
- sx: {
111
- fontSize: '12px'
112
- }
113
- })
114
- })
115
- }),
116
- time && /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogTimestamp.LogTimestamp, {
117
- timestamp: log.timestamp
118
- }),
119
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogsStyles.LogText, {
120
- variant: "body2",
121
- wrap: wrap,
122
- children: log.line
123
- })
124
- ]
125
- }),
126
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Collapse, {
127
- in: isExpanded,
128
- timeout: 200,
129
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
130
- sx: {
131
- padding: '8px'
132
- },
133
- children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
134
- sx: {
135
- display: 'grid',
136
- gridTemplateColumns: !time ? '1fr' : '8px minmax(160px, max-content) 1fr',
137
- gap: '12px'
138
- },
139
- children: [
140
- time && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
141
- children: [
142
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {}),
143
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {})
144
- ]
145
- }),
146
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
147
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogsLabelsTable.LogLabelsTable, {
148
- labels: log.labels
149
- })
150
- })
151
- ]
152
- })
153
- })
154
- })
155
- ]
156
- });
157
- });
158
- LogRow.displayName = 'LogRow';
@@ -1,44 +0,0 @@
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
- const _material = require("@mui/material");
26
- const _datefns = require("date-fns");
27
- function _interop_require_default(obj) {
28
- return obj && obj.__esModule ? obj : {
29
- default: obj
30
- };
31
- }
32
- const LogTimestamp = ({ timestamp })=>{
33
- const theme = (0, _material.useTheme)();
34
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
35
- variant: "caption",
36
- sx: {
37
- color: theme.palette.text.secondary,
38
- fontSize: '12px',
39
- whiteSpace: 'nowrap',
40
- minWidth: '160px'
41
- },
42
- children: (0, _datefns.format)((0, _datefns.fromUnixTime)(timestamp), 'yyyy-MM-dd HH:mm:ss')
43
- });
44
- };
@@ -1,74 +0,0 @@
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, "LogLabelsTable", {
18
- enumerable: true,
19
- get: function() {
20
- return LogLabelsTable;
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 LogLabelsTable = ({ labels })=>{
32
- const theme = (0, _material.useTheme)();
33
- if (Object.keys(labels).length === 0) {
34
- return null;
35
- }
36
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Table, {
37
- size: "small",
38
- sx: {
39
- border: `1px solid ${theme.palette.divider}`,
40
- '& .MuiTableCell-root': {
41
- border: 'none',
42
- padding: '6px 8px',
43
- fontSize: '12px'
44
- }
45
- },
46
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableBody, {
47
- children: Object.entries(labels).map(([key, value])=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TableRow, {
48
- sx: {
49
- '&:hover': {
50
- backgroundColor: (0, _material.alpha)(theme.palette.action.hover, 0.04)
51
- }
52
- },
53
- children: [
54
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
55
- sx: {
56
- color: theme.palette.text.secondary,
57
- fontWeight: 500,
58
- width: '33%'
59
- },
60
- children: key
61
- }),
62
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
63
- sx: {
64
- color: theme.palette.text.primary,
65
- wordBreak: 'break-all',
66
- width: '67%'
67
- },
68
- children: value
69
- })
70
- ]
71
- }, key))
72
- })
73
- });
74
- };
@@ -1,77 +0,0 @@
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)(({ severityColor })=>({
39
- borderLeft: `4px solid ${severityColor}`,
40
- transition: 'all 0.2s ease',
41
- marginBottom: '4px',
42
- fontFamily: '"DejaVu Sans Mono", monospace'
43
- }));
44
- const LogRowContent = (0, _material.styled)(_material.Box)(({ theme, isExpandable })=>({
45
- display: 'grid',
46
- gridTemplateColumns: isExpandable ? '16px minmax(160px, max-content) 1fr' : 'minmax(160px, max-content) 1fr',
47
- alignItems: 'flex-start',
48
- padding: '4px 8px',
49
- cursor: isExpandable ? 'pointer' : 'default',
50
- gap: '12px',
51
- '&:hover': {
52
- backgroundColor: theme.palette.action.hover
53
- }
54
- }));
55
- const ExpandButton = (0, _material.styled)(_material.IconButton)(({ theme, isExpanded })=>({
56
- padding: 0,
57
- width: '16px',
58
- height: '16px',
59
- color: theme.palette.text.secondary,
60
- transform: isExpanded ? 'rotate(90deg)' : 'rotate(0deg)',
61
- transition: 'transform 0.2s ease'
62
- }));
63
- const LogText = (0, _material.styled)(_material.Typography)(({ wrap })=>({
64
- fontSize: '12px',
65
- flex: 1,
66
- lineHeight: 1.4,
67
- textAlign: 'left',
68
- ...wrap ? {
69
- wordBreak: 'break-word',
70
- whiteSpace: 'pre-wrap',
71
- overflow: 'visible',
72
- textOverflow: 'unset'
73
- } : {
74
- wordBreak: 'normal',
75
- whiteSpace: 'nowrap'
76
- }
77
- }));
@@ -1,37 +0,0 @@
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
- }
@@ -1,44 +0,0 @@
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 _useExpandedRows = require("../hooks/useExpandedRows");
26
- const _EmptyLogsState = require("./EmptyLogsState");
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
- };
@@ -1,63 +0,0 @@
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, "VirtualizedLogsList", {
18
- enumerable: true,
19
- get: function() {
20
- return VirtualizedLogsList;
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
- const _reactvirtuoso = require("react-virtuoso");
27
- const _LogRow = require("./LogRow/LogRow");
28
- function _interop_require_default(obj) {
29
- return obj && obj.__esModule ? obj : {
30
- default: obj
31
- };
32
- }
33
- const VirtualizedLogsList = ({ logs, spec, expandedRows, onToggleExpand })=>{
34
- const theme = (0, _material.useTheme)();
35
- const renderLogRow = (index)=>{
36
- const log = logs[index];
37
- if (!log) return null;
38
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogRow.LogRow, {
39
- isExpandable: spec.enableDetails,
40
- log: log,
41
- index: index,
42
- isExpanded: expandedRows.has(index),
43
- onToggle: onToggleExpand,
44
- wrap: spec.wrap,
45
- time: spec.time
46
- });
47
- };
48
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
49
- sx: {
50
- height: '100%',
51
- backgroundColor: theme.palette.background.default,
52
- overflow: 'hidden',
53
- boxShadow: theme.shadows[1]
54
- },
55
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactvirtuoso.Virtuoso, {
56
- style: {
57
- height: '100%'
58
- },
59
- totalCount: logs.length,
60
- itemContent: renderLogRow
61
- })
62
- });
63
- };
@@ -1,23 +0,0 @@
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.LogsList;
21
- }
22
- });
23
- const _LogsList = require("./LogsList");
@@ -1,39 +0,0 @@
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, "getSeverity", {
18
- enumerable: true,
19
- get: function() {
20
- return getSeverity;
21
- }
22
- });
23
- const getSeverity = (log)=>{
24
- const message = log.line.toLowerCase();
25
- const level = log.labels.level?.toLowerCase();
26
- if (level) {
27
- if (level.includes('error') || level.includes('err')) return 'error';
28
- if (level.includes('warn')) return 'warn';
29
- if (level.includes('info')) return 'info';
30
- if (level.includes('debug')) return 'debug';
31
- }
32
- if (message.includes('error') || message.includes('exception') || message.includes('fail')) {
33
- return 'error';
34
- }
35
- if (message.includes('warn')) return 'warn';
36
- if (message.includes('info')) return 'info';
37
- if (message.includes('debug')) return 'debug';
38
- return 'unknown';
39
- };
@@ -1,45 +0,0 @@
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, "useExpandedRows", {
18
- enumerable: true,
19
- get: function() {
20
- return useExpandedRows;
21
- }
22
- });
23
- const _react = require("react");
24
- const useExpandedRows = ()=>{
25
- const [expandedRows, setExpandedRows] = (0, _react.useState)(new Set());
26
- const toggleExpand = (0, _react.useCallback)((index)=>{
27
- setExpandedRows((prev)=>{
28
- const newSet = new Set(prev);
29
- if (newSet.has(index)) {
30
- newSet.delete(index);
31
- } else {
32
- newSet.add(index);
33
- }
34
- return newSet;
35
- });
36
- }, []);
37
- const clearExpanded = (0, _react.useCallback)(()=>{
38
- setExpandedRows(new Set());
39
- }, []);
40
- return {
41
- expandedRows,
42
- toggleExpand,
43
- clearExpanded
44
- };
45
- };