@perses-dev/core 0.53.0 → 0.54.0-beta.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 (135) hide show
  1. package/dist/cjs/constants/dashboard-defaults.js +3 -3
  2. package/dist/cjs/model/calculations.js +6 -6
  3. package/dist/cjs/model/definitions.js +1 -3
  4. package/dist/cjs/model/folder.js +16 -0
  5. package/dist/cjs/model/index.js +1 -0
  6. package/dist/cjs/model/legend.js +11 -11
  7. package/dist/cjs/model/otlp/index.js +4 -4
  8. package/dist/cjs/model/otlp/trace/v1/trace.js +4 -4
  9. package/dist/cjs/model/resource.js +3 -3
  10. package/dist/cjs/model/roles.js +4 -4
  11. package/dist/cjs/model/time.js +21 -309
  12. package/dist/cjs/model/units/bits.js +14 -6
  13. package/dist/cjs/model/units/bytes.js +16 -6
  14. package/dist/cjs/model/units/currency.js +14 -6
  15. package/dist/cjs/model/units/date.js +4 -4
  16. package/dist/cjs/model/units/decimal.js +13 -6
  17. package/dist/cjs/model/units/formatterCache.js +120 -0
  18. package/dist/cjs/model/units/percent.js +13 -6
  19. package/dist/cjs/model/units/temperature.js +13 -5
  20. package/dist/cjs/model/units/throughput.js +15 -6
  21. package/dist/cjs/model/units/time.js +15 -7
  22. package/dist/cjs/model/units/units.js +18 -18
  23. package/dist/cjs/model/units/utils.js +4 -4
  24. package/dist/cjs/model/variables.js +3 -3
  25. package/dist/cjs/schema/datasource.js +13 -29
  26. package/dist/cjs/schema/display.js +2 -6
  27. package/dist/cjs/schema/duration.js +2 -4
  28. package/dist/cjs/schema/metadata.js +4 -4
  29. package/dist/cjs/schema/panel.js +20 -72
  30. package/dist/cjs/schema/plugin.js +2 -6
  31. package/dist/cjs/schema/role.js +6 -6
  32. package/dist/cjs/schema/rolebinding.js +6 -6
  33. package/dist/cjs/schema/secret.js +5 -5
  34. package/dist/cjs/schema/user.js +5 -5
  35. package/dist/cjs/schema/variable.js +24 -137
  36. package/dist/cjs/utils/fetch.js +5 -5
  37. package/dist/cjs/utils/panel-refs.js +4 -4
  38. package/dist/cjs/utils/regexp.js +3 -3
  39. package/dist/cjs/utils/text.js +7 -7
  40. package/dist/cjs/utils/time-series-data.js +4 -4
  41. package/dist/cjs/utils/transform-data.js +6 -6
  42. package/dist/model/dashboard.d.ts +2 -21
  43. package/dist/model/dashboard.d.ts.map +1 -1
  44. package/dist/model/dashboard.js.map +1 -1
  45. package/dist/model/datasource.d.ts +3 -22
  46. package/dist/model/datasource.d.ts.map +1 -1
  47. package/dist/model/datasource.js +1 -3
  48. package/dist/model/datasource.js.map +1 -1
  49. package/dist/model/definitions.d.ts +1 -12
  50. package/dist/model/definitions.d.ts.map +1 -1
  51. package/dist/model/definitions.js +1 -6
  52. package/dist/model/definitions.js.map +1 -1
  53. package/dist/model/display.d.ts +1 -4
  54. package/dist/model/display.d.ts.map +1 -1
  55. package/dist/model/display.js.map +1 -1
  56. package/dist/model/folder.d.ts +19 -0
  57. package/dist/model/folder.d.ts.map +1 -0
  58. package/dist/model/folder.js +15 -0
  59. package/dist/model/folder.js.map +1 -0
  60. package/dist/model/index.d.ts +1 -0
  61. package/dist/model/index.d.ts.map +1 -1
  62. package/dist/model/index.js +1 -0
  63. package/dist/model/index.js.map +1 -1
  64. package/dist/model/project.d.ts +1 -1
  65. package/dist/model/project.d.ts.map +1 -1
  66. package/dist/model/project.js.map +1 -1
  67. package/dist/model/query.d.ts +1 -0
  68. package/dist/model/query.d.ts.map +1 -1
  69. package/dist/model/query.js.map +1 -1
  70. package/dist/model/resource.d.ts +1 -1
  71. package/dist/model/resource.d.ts.map +1 -1
  72. package/dist/model/resource.js.map +1 -1
  73. package/dist/model/time.d.ts +3 -54
  74. package/dist/model/time.d.ts.map +1 -1
  75. package/dist/model/time.js +2 -299
  76. package/dist/model/time.js.map +1 -1
  77. package/dist/model/units/bits.d.ts.map +1 -1
  78. package/dist/model/units/bits.js +10 -2
  79. package/dist/model/units/bits.js.map +1 -1
  80. package/dist/model/units/bytes.d.ts.map +1 -1
  81. package/dist/model/units/bytes.js +12 -2
  82. package/dist/model/units/bytes.js.map +1 -1
  83. package/dist/model/units/currency.d.ts.map +1 -1
  84. package/dist/model/units/currency.js +10 -2
  85. package/dist/model/units/currency.js.map +1 -1
  86. package/dist/model/units/decimal.d.ts.map +1 -1
  87. package/dist/model/units/decimal.js +9 -2
  88. package/dist/model/units/decimal.js.map +1 -1
  89. package/dist/model/units/formatterCache.d.ts +11 -0
  90. package/dist/model/units/formatterCache.d.ts.map +1 -0
  91. package/dist/model/units/formatterCache.js +104 -0
  92. package/dist/model/units/formatterCache.js.map +1 -0
  93. package/dist/model/units/percent.d.ts.map +1 -1
  94. package/dist/model/units/percent.js +9 -2
  95. package/dist/model/units/percent.js.map +1 -1
  96. package/dist/model/units/temperature.d.ts.map +1 -1
  97. package/dist/model/units/temperature.js +9 -1
  98. package/dist/model/units/temperature.js.map +1 -1
  99. package/dist/model/units/throughput.d.ts.map +1 -1
  100. package/dist/model/units/throughput.js +11 -2
  101. package/dist/model/units/throughput.js.map +1 -1
  102. package/dist/model/units/time.d.ts.map +1 -1
  103. package/dist/model/units/time.js +10 -2
  104. package/dist/model/units/time.js.map +1 -1
  105. package/dist/schema/datasource.d.ts +10 -9
  106. package/dist/schema/datasource.d.ts.map +1 -1
  107. package/dist/schema/datasource.js +2 -14
  108. package/dist/schema/datasource.js.map +1 -1
  109. package/dist/schema/display.d.ts +1 -11
  110. package/dist/schema/display.d.ts.map +1 -1
  111. package/dist/schema/display.js +1 -5
  112. package/dist/schema/display.js.map +1 -1
  113. package/dist/schema/duration.d.ts +1 -2
  114. package/dist/schema/duration.d.ts.map +1 -1
  115. package/dist/schema/duration.js +1 -3
  116. package/dist/schema/duration.js.map +1 -1
  117. package/dist/schema/panel.d.ts +1 -12
  118. package/dist/schema/panel.d.ts.map +1 -1
  119. package/dist/schema/panel.js +1 -53
  120. package/dist/schema/panel.js.map +1 -1
  121. package/dist/schema/plugin.d.ts +2 -13
  122. package/dist/schema/plugin.d.ts.map +1 -1
  123. package/dist/schema/plugin.js +1 -5
  124. package/dist/schema/plugin.js.map +1 -1
  125. package/dist/schema/role.d.ts +4 -4
  126. package/dist/schema/rolebinding.d.ts +4 -4
  127. package/dist/schema/secret.d.ts +70 -70
  128. package/dist/schema/variable.d.ts +1 -91
  129. package/dist/schema/variable.d.ts.map +1 -1
  130. package/dist/schema/variable.js +1 -105
  131. package/dist/schema/variable.js.map +1 -1
  132. package/dist/utils/fetch.js.map +1 -1
  133. package/dist/utils/text.js +4 -4
  134. package/dist/utils/text.js.map +1 -1
  135. package/package.json +3 -2
@@ -1,11 +1,6 @@
1
- import { Definition, UnknownSpec } from './definitions';
1
+ import { DatasourceSpec, DatasourceSelector } from '@perses-dev/spec';
2
2
  import { Metadata, ProjectMetadata } from './resource';
3
- import { Display } from './display';
4
- export interface DatasourceSpec<PluginSpec = UnknownSpec> {
5
- display?: Display;
6
- default: boolean;
7
- plugin: Definition<PluginSpec>;
8
- }
3
+ export type { DatasourceSelector, DatasourceSpec };
9
4
  /**
10
5
  * A Datasource that's available across all projects.
11
6
  */
@@ -22,21 +17,6 @@ export interface DatasourceResource {
22
17
  metadata: ProjectMetadata;
23
18
  spec: DatasourceSpec;
24
19
  }
25
- export type Datasource = DatasourceResource | GlobalDatasourceResource;
26
- /**
27
- * A selector for pointing at a specific Datasource.
28
- */
29
- export interface DatasourceSelector {
30
- /**
31
- * Kind of the datasource.
32
- */
33
- kind: string;
34
- /**
35
- * Name of the datasource.
36
- * If omitted, it's assumed that you target the default datasource for the specified kind (and group, if set)
37
- */
38
- name?: string;
39
- }
40
20
  /**
41
21
  * An intermediary type to regroup the name and the spec of a datasource.
42
22
  */
@@ -44,4 +24,5 @@ export interface DatasourceDefinition {
44
24
  name: string;
45
25
  spec: DatasourceSpec;
46
26
  }
27
+ export type Datasource = DatasourceResource | GlobalDatasourceResource;
47
28
  //# sourceMappingURL=datasource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../src/model/datasource.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,cAAc,CAAC,UAAU,GAAG,WAAW;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,MAAM,UAAU,GAAG,kBAAkB,GAAG,wBAAwB,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;CACtB"}
1
+ {"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../src/model/datasource.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,MAAM,UAAU,GAAG,kBAAkB,GAAG,wBAAwB,CAAC"}
@@ -10,8 +10,6 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- /**
14
- * An intermediary type to regroup the name and the spec of a datasource.
15
- */ export { };
13
+ export { };
16
14
 
17
15
  //# sourceMappingURL=datasource.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/datasource.ts"],"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 { Definition, UnknownSpec } from './definitions';\nimport { Metadata, ProjectMetadata } from './resource';\nimport { Display } from './display';\n\nexport interface DatasourceSpec<PluginSpec = UnknownSpec> {\n display?: Display;\n default: boolean;\n plugin: Definition<PluginSpec>;\n}\n\n/**\n * A Datasource that's available across all projects.\n */\nexport interface GlobalDatasourceResource {\n kind: 'GlobalDatasource';\n metadata: Metadata;\n spec: DatasourceSpec;\n}\n\n/**\n * A Datasource resource, that belongs to a project.\n */\nexport interface DatasourceResource {\n kind: 'Datasource';\n metadata: ProjectMetadata;\n spec: DatasourceSpec;\n}\n\nexport type Datasource = DatasourceResource | GlobalDatasourceResource;\n\n/**\n * A selector for pointing at a specific Datasource.\n */\nexport interface DatasourceSelector {\n /**\n * Kind of the datasource.\n */\n kind: string;\n\n /**\n * Name of the datasource.\n * If omitted, it's assumed that you target the default datasource for the specified kind (and group, if set)\n */\n name?: string;\n}\n\n/**\n * An intermediary type to regroup the name and the spec of a datasource.\n */\nexport interface DatasourceDefinition {\n name: string;\n spec: DatasourceSpec;\n}\n"],"names":[],"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;AAgDjC;;CAEC,GACD,WAGC"}
1
+ {"version":3,"sources":["../../src/model/datasource.ts"],"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 { DatasourceSpec, DatasourceSelector } from '@perses-dev/spec';\nimport { Metadata, ProjectMetadata } from './resource';\nexport type { DatasourceSelector, DatasourceSpec };\n\n/**\n * A Datasource that's available across all projects.\n */\nexport interface GlobalDatasourceResource {\n kind: 'GlobalDatasource';\n metadata: Metadata;\n spec: DatasourceSpec;\n}\n\n/**\n * A Datasource resource, that belongs to a project.\n */\nexport interface DatasourceResource {\n kind: 'Datasource';\n metadata: ProjectMetadata;\n spec: DatasourceSpec;\n}\n\n/**\n * An intermediary type to regroup the name and the spec of a datasource.\n */\nexport interface DatasourceDefinition {\n name: string;\n spec: DatasourceSpec;\n}\n\nexport type Datasource = DatasourceResource | GlobalDatasourceResource;\n"],"names":[],"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;AAgCjC,WAAuE"}
@@ -1,13 +1,2 @@
1
- /**
2
- * Base type for definitions in JSON config resources.
3
- */
4
- export interface Definition<Spec> {
5
- kind: string;
6
- spec: Spec;
7
- }
8
- /**
9
- * Type to represent specs at runtime in framework code where we don't know the spec's real type, probably because it's
10
- * part of a plugin.
11
- */
12
- export type UnknownSpec = Record<string, unknown>;
1
+ export type { Definition, UnknownSpec } from '@perses-dev/spec';
13
2
  //# sourceMappingURL=definitions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/model/definitions.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,MAAM,WAAW,UAAU,CAAC,IAAI;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
1
+ {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/model/definitions.ts"],"names":[],"mappings":"AAaA,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -10,11 +10,6 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- /**
14
- * Base type for definitions in JSON config resources.
15
- */ /**
16
- * Type to represent specs at runtime in framework code where we don't know the spec's real type, probably because it's
17
- * part of a plugin.
18
- */ export { };
13
+ export { };
19
14
 
20
15
  //# sourceMappingURL=definitions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/definitions.ts"],"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\n/**\n * Base type for definitions in JSON config resources.\n */\nexport interface Definition<Spec> {\n kind: string;\n spec: Spec;\n}\n\n/**\n * Type to represent specs at runtime in framework code where we don't know the spec's real type, probably because it's\n * part of a plugin.\n */\nexport type UnknownSpec = Record<string, unknown>;\n"],"names":[],"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;;CAEC,GAMD;;;CAGC,GACD,WAAkD"}
1
+ {"version":3,"sources":["../../src/model/definitions.ts"],"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\nexport type { Definition, UnknownSpec } from '@perses-dev/spec';\n"],"names":[],"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,WAAgE"}
@@ -1,5 +1,2 @@
1
- export interface Display {
2
- name?: string;
3
- description?: string;
4
- }
1
+ export type { Display } from '@perses-dev/spec';
5
2
  //# sourceMappingURL=display.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/model/display.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
1
+ {"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/model/display.ts"],"names":[],"mappings":"AAaA,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/display.ts"],"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\nexport interface Display {\n name?: string;\n description?: string;\n}\n"],"names":[],"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,WAGC"}
1
+ {"version":3,"sources":["../../src/model/display.ts"],"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\nexport type { Display } from '@perses-dev/spec';\n"],"names":[],"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,WAAgD"}
@@ -0,0 +1,19 @@
1
+ import { ProjectMetadata } from './resource';
2
+ export interface FolderDisplay {
3
+ name?: string;
4
+ }
5
+ export interface FolderSpec {
6
+ display?: FolderDisplay;
7
+ items?: FolderItem[];
8
+ }
9
+ export interface FolderItem {
10
+ kind: 'Folder' | 'Dashboard';
11
+ name: string;
12
+ items?: FolderItem[];
13
+ }
14
+ export interface FolderResource {
15
+ kind: 'Folder';
16
+ metadata: ProjectMetadata;
17
+ spec: FolderSpec;
18
+ }
19
+ //# sourceMappingURL=folder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"folder.d.ts","sourceRoot":"","sources":["../../src/model/folder.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,EAAE,UAAU,CAAC;CAClB"}
@@ -0,0 +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.
13
+ export { };
14
+
15
+ //# sourceMappingURL=folder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/model/folder.ts"],"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 { ProjectMetadata } from './resource';\n\nexport interface FolderDisplay {\n name?: string;\n}\n\nexport interface FolderSpec {\n display?: FolderDisplay;\n items?: FolderItem[];\n}\n\nexport interface FolderItem {\n kind: 'Folder' | 'Dashboard';\n name: string;\n items?: FolderItem[];\n}\n\nexport interface FolderResource {\n kind: 'Folder';\n metadata: ProjectMetadata;\n spec: FolderSpec;\n}\n"],"names":[],"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;AAmBjC,WAIC"}
@@ -6,6 +6,7 @@ export * from './definitions';
6
6
  export * from './display';
7
7
  export * from './ephemeraldashboard';
8
8
  export * from './external-variable';
9
+ export * from './folder';
9
10
  export * from './http';
10
11
  export * from './http-proxy';
11
12
  export * from './kind';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
@@ -18,6 +18,7 @@ export * from './definitions';
18
18
  export * from './display';
19
19
  export * from './ephemeraldashboard';
20
20
  export * from './external-variable';
21
+ export * from './folder';
21
22
  export * from './http';
22
23
  export * from './http-proxy';
23
24
  export * from './kind';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/index.ts"],"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\nexport * from './calculations';\nexport * from './dashboard';\nexport * from './datasource';\nexport * from './datasource-api';\nexport * from './definitions';\nexport * from './display';\nexport * from './ephemeraldashboard';\nexport * from './external-variable';\nexport * from './http';\nexport * from './http-proxy';\nexport * from './kind';\nexport * from './layout';\nexport * from './legend';\nexport * from './notice';\nexport * from './otlp';\nexport * from './panel-group';\nexport * from './panels';\nexport * from './project';\nexport * from './query';\nexport * from './resource';\nexport * from './roles';\nexport * from './rolebindings';\nexport * from './secrets';\nexport * from './thresholds';\nexport * from './time';\nexport * from './time-series-data';\nexport * from './time-series-queries';\nexport * from './trace-data';\nexport * from './profile-data';\nexport * from './log-data';\nexport * from './transforms';\nexport * from './units';\nexport * from './user';\nexport * from './variables';\nexport * from './value-mapping';\n"],"names":[],"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,cAAc,iBAAiB;AAC/B,cAAc,cAAc;AAC5B,cAAc,eAAe;AAC7B,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,cAAc,uBAAuB;AACrC,cAAc,sBAAsB;AACpC,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,aAAa;AAC3B,cAAc,UAAU;AACxB,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,SAAS;AACvB,cAAc,qBAAqB;AACnC,cAAc,wBAAwB;AACtC,cAAc,eAAe;AAC7B,cAAc,iBAAiB;AAC/B,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,cAAc;AAC5B,cAAc,kBAAkB"}
1
+ {"version":3,"sources":["../../src/model/index.ts"],"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\nexport * from './calculations';\nexport * from './dashboard';\nexport * from './datasource';\nexport * from './datasource-api';\nexport * from './definitions';\nexport * from './display';\nexport * from './ephemeraldashboard';\nexport * from './external-variable';\nexport * from './folder';\nexport * from './http';\nexport * from './http-proxy';\nexport * from './kind';\nexport * from './layout';\nexport * from './legend';\nexport * from './notice';\nexport * from './otlp';\nexport * from './panel-group';\nexport * from './panels';\nexport * from './project';\nexport * from './query';\nexport * from './resource';\nexport * from './roles';\nexport * from './rolebindings';\nexport * from './secrets';\nexport * from './thresholds';\nexport * from './time';\nexport * from './time-series-data';\nexport * from './time-series-queries';\nexport * from './trace-data';\nexport * from './profile-data';\nexport * from './log-data';\nexport * from './transforms';\nexport * from './units';\nexport * from './user';\nexport * from './variables';\nexport * from './value-mapping';\n"],"names":[],"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,cAAc,iBAAiB;AAC/B,cAAc,cAAc;AAC5B,cAAc,eAAe;AAC7B,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,cAAc,uBAAuB;AACrC,cAAc,sBAAsB;AACpC,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,aAAa;AAC3B,cAAc,UAAU;AACxB,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,SAAS;AACvB,cAAc,qBAAqB;AACnC,cAAc,wBAAwB;AACtC,cAAc,eAAe;AAC7B,cAAc,iBAAiB;AAC/B,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,cAAc;AAC5B,cAAc,kBAAkB"}
@@ -3,7 +3,7 @@ import { Display } from './display';
3
3
  export interface ProjectResource {
4
4
  kind: 'Project';
5
5
  metadata: Metadata;
6
- spec: ProjectSpec;
6
+ spec?: ProjectSpec;
7
7
  }
8
8
  export interface ProjectSpec {
9
9
  display?: Display;
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/model/project.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/model/project.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/project.ts"],"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 { Metadata } from './resource';\nimport { Display } from './display';\n\nexport interface ProjectResource {\n kind: 'Project';\n metadata: Metadata;\n spec: ProjectSpec;\n}\n\nexport interface ProjectSpec {\n display?: Display;\n}\n"],"names":[],"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;AAWjC,WAEC"}
1
+ {"version":3,"sources":["../../src/model/project.ts"],"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 { Metadata } from './resource';\nimport { Display } from './display';\n\nexport interface ProjectResource {\n kind: 'Project';\n metadata: Metadata;\n spec?: ProjectSpec;\n}\n\nexport interface ProjectSpec {\n display?: Display;\n}\n"],"names":[],"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;AAWjC,WAEC"}
@@ -4,6 +4,7 @@ import { TraceData } from './trace-data';
4
4
  import { ProfileData } from './profile-data';
5
5
  import { LogData } from './log-data';
6
6
  interface QuerySpec<PluginSpec> {
7
+ name?: string;
7
8
  plugin: Definition<PluginSpec>;
8
9
  }
9
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/model/query.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,UAAU,SAAS,CAAC,UAAU;IAC5B,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;CAChC;AACD;;GAEG;AAGH,MAAM,WAAW,eAAe,CAAC,IAAI,GAAG,GAAG,EAAE,UAAU,GAAG,WAAW;IACnE,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,eAAe,EAAE,cAAc,CAAC;IAChC,UAAU,EAAE,SAAS,CAAC;IACtB,YAAY,EAAE,WAAW,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;CAGnB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,eAAe,CAE5E;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,SAAS,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/model/query.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,UAAU,SAAS,CAAC,UAAU;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;CAChC;AACD;;GAEG;AAGH,MAAM,WAAW,eAAe,CAAC,IAAI,GAAG,GAAG,EAAE,UAAU,GAAG,WAAW;IACnE,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,eAAe,EAAE,cAAc,CAAC;IAChC,UAAU,EAAE,SAAS,CAAC;IACtB,YAAY,EAAE,WAAW,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;CAGnB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,eAAe,CAE5E;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,SAAS,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,SAAS,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/query.ts"],"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 { Definition, UnknownSpec } from './definitions';\nimport { TimeSeriesData } from './time-series-data';\nimport { TraceData } from './trace-data';\nimport { ProfileData } from './profile-data';\nimport { LogData } from './log-data';\n\ninterface QuerySpec<PluginSpec> {\n plugin: Definition<PluginSpec>;\n}\n/**\n * A generic query definition interface that can be extended to support more than just TimeSeriesQuery\n */\n// Kind needs to be `any` because otherwise typescript will complain 'unknown' is not assignable to type '\"TimeSeriesQuery\"' in a few places\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface QueryDefinition<Kind = any, PluginSpec = UnknownSpec> {\n kind: Kind;\n spec: QuerySpec<PluginSpec>;\n}\n\n/**\n * Mapping the query plugin to the data type it returns\n */\nexport interface QueryType {\n TimeSeriesQuery: TimeSeriesData;\n TraceQuery: TraceData;\n ProfileQuery: ProfileData;\n LogQuery: LogData;\n // in the future we can add other query plugin and data types\n // for example: we can add something like `LogsQuery: LogsData;`\n}\n\n/**\n * Check if the given type is a valid {@link QueryPluginType} with compile time safety\n * @param type\n */\nexport function isValidQueryPluginType(type: string): type is QueryPluginType {\n return ['TimeSeriesQuery', 'TraceQuery', 'ProfileQuery'].includes(type as QueryPluginType);\n}\n\n/**\n * Extract the keys of QueryType\n * ex: 'TimeSeriesQuery'\n */\nexport type QueryPluginType = keyof QueryType;\n\n/**\n * Values of QueryType\n * ex: 'TimeSeriesData'\n */\nexport type QueryDataType = QueryType[keyof QueryType];\n"],"names":["isValidQueryPluginType","type","includes"],"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;AAiCjC;;;CAGC,GACD,OAAO,SAASA,uBAAuBC,IAAY;IACjD,OAAO;QAAC;QAAmB;QAAc;KAAe,CAACC,QAAQ,CAACD;AACpE"}
1
+ {"version":3,"sources":["../../src/model/query.ts"],"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 { Definition, UnknownSpec } from './definitions';\nimport { TimeSeriesData } from './time-series-data';\nimport { TraceData } from './trace-data';\nimport { ProfileData } from './profile-data';\nimport { LogData } from './log-data';\n\ninterface QuerySpec<PluginSpec> {\n name?: string;\n plugin: Definition<PluginSpec>;\n}\n/**\n * A generic query definition interface that can be extended to support more than just TimeSeriesQuery\n */\n// Kind needs to be `any` because otherwise typescript will complain 'unknown' is not assignable to type '\"TimeSeriesQuery\"' in a few places\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface QueryDefinition<Kind = any, PluginSpec = UnknownSpec> {\n kind: Kind;\n spec: QuerySpec<PluginSpec>;\n}\n\n/**\n * Mapping the query plugin to the data type it returns\n */\nexport interface QueryType {\n TimeSeriesQuery: TimeSeriesData;\n TraceQuery: TraceData;\n ProfileQuery: ProfileData;\n LogQuery: LogData;\n // in the future we can add other query plugin and data types\n // for example: we can add something like `LogsQuery: LogsData;`\n}\n\n/**\n * Check if the given type is a valid {@link QueryPluginType} with compile time safety\n * @param type\n */\nexport function isValidQueryPluginType(type: string): type is QueryPluginType {\n return ['TimeSeriesQuery', 'TraceQuery', 'ProfileQuery'].includes(type as QueryPluginType);\n}\n\n/**\n * Extract the keys of QueryType\n * ex: 'TimeSeriesQuery'\n */\nexport type QueryPluginType = keyof QueryType;\n\n/**\n * Values of QueryType\n * ex: 'TimeSeriesData'\n */\nexport type QueryDataType = QueryType[keyof QueryType];\n"],"names":["isValidQueryPluginType","type","includes"],"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;AAkCjC;;;CAGC,GACD,OAAO,SAASA,uBAAuBC,IAAY;IACjD,OAAO;QAAC;QAAmB;QAAc;KAAe,CAACC,QAAQ,CAACD;AACpE"}
@@ -13,7 +13,7 @@ export interface ProjectMetadata extends Metadata {
13
13
  export interface Resource {
14
14
  kind: Kind;
15
15
  metadata: Metadata | ProjectMetadata;
16
- spec: any;
16
+ spec?: any;
17
17
  }
18
18
  export declare function getMetadataProject(metadata: ProjectMetadata | Metadata): string | undefined;
19
19
  //# sourceMappingURL=resource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/model/resource.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,eAAe,GAAG,QAAQ,IAAI,eAAe,CAEnG;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,QAAQ,GAAG,eAAe,CAAC;IAErC,IAAI,EAAE,GAAG,CAAC;CACX;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAE3F"}
1
+ {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/model/resource.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,eAAe,GAAG,QAAQ,IAAI,eAAe,CAEnG;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,QAAQ,GAAG,eAAe,CAAC;IAErC,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAE3F"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/resource.ts"],"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 { Kind } from './kind';\n\nexport function isProjectMetadata(metadata: Metadata | ProjectMetadata): metadata is ProjectMetadata {\n return 'project' in metadata;\n}\n\nexport interface Metadata {\n name: string;\n createdAt?: string;\n updatedAt?: string;\n version?: number;\n tags?: string[];\n}\n\nexport interface ProjectMetadata extends Metadata {\n project: string;\n}\n\nexport interface Resource {\n kind: Kind;\n metadata: Metadata | ProjectMetadata;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n spec: any;\n}\n\nexport function getMetadataProject(metadata: ProjectMetadata | Metadata): string | undefined {\n return 'project' in metadata ? metadata.project : undefined;\n}\n"],"names":["isProjectMetadata","metadata","getMetadataProject","project","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;AAIjC,OAAO,SAASA,kBAAkBC,QAAoC;IACpE,OAAO,aAAaA;AACtB;AAqBA,OAAO,SAASC,mBAAmBD,QAAoC;IACrE,OAAO,aAAaA,WAAWA,SAASE,OAAO,GAAGC;AACpD"}
1
+ {"version":3,"sources":["../../src/model/resource.ts"],"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 { Kind } from './kind';\n\nexport function isProjectMetadata(metadata: Metadata | ProjectMetadata): metadata is ProjectMetadata {\n return 'project' in metadata;\n}\n\nexport interface Metadata {\n name: string;\n createdAt?: string;\n updatedAt?: string;\n version?: number;\n tags?: string[];\n}\n\nexport interface ProjectMetadata extends Metadata {\n project: string;\n}\n\nexport interface Resource {\n kind: Kind;\n metadata: Metadata | ProjectMetadata;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n spec?: any;\n}\n\nexport function getMetadataProject(metadata: ProjectMetadata | Metadata): string | undefined {\n return 'project' in metadata ? metadata.project : undefined;\n}\n"],"names":["isProjectMetadata","metadata","getMetadataProject","project","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;AAIjC,OAAO,SAASA,kBAAkBC,QAAoC;IACpE,OAAO,aAAaA;AACtB;AAqBA,OAAO,SAASC,mBAAmBD,QAAoC;IACrE,OAAO,aAAaA,WAAWA,SAASE,OAAO,GAAGC;AACpD"}
@@ -1,55 +1,4 @@
1
- import { Duration } from 'date-fns';
2
- export type UnixTimeMs = number;
3
- export type DateTimeFormat = number | string;
4
- export interface AbsoluteTimeRange {
5
- start: Date;
6
- end: Date;
7
- }
8
- export interface RelativeTimeRange {
9
- end?: Date;
10
- pastDuration: DurationString;
11
- }
12
- export type TimeRangeValue = AbsoluteTimeRange | RelativeTimeRange;
13
- /**
14
- * Determine whether a given time range is relative
15
- */
16
- export declare function isRelativeTimeRange(timeRange: TimeRangeValue): timeRange is RelativeTimeRange;
17
- /**
18
- * Determine whether a given time range is absolute
19
- */
20
- export declare function isAbsoluteTimeRange(timeRange: TimeRangeValue): timeRange is AbsoluteTimeRange;
21
- /**
22
- * Returns an absolute time range from a RelativeTimeRange.
23
- */
24
- export declare function toAbsoluteTimeRange(timeRange: RelativeTimeRange): AbsoluteTimeRange;
25
- type MillisecondsDurationString = `${number}ms`;
26
- type SecondsDurationString = `${number}s`;
27
- type MinutesDurationString = `${number}m`;
28
- type HoursDurationString = `${number}h`;
29
- type DaysDurationString = `${number}d`;
30
- type WeeksDurationString = `${number}w`;
31
- type YearsDurationString = `${number}y`;
32
- export type DurationString = Exclude<`${YearsDurationString | ''}${WeeksDurationString | ''}${DaysDurationString | ''}${HoursDurationString | ''}${MinutesDurationString | ''}${SecondsDurationString | ''}${MillisecondsDurationString | ''}`, ''>;
33
- export declare const DURATION_REGEX: RegExp;
34
- /**
35
- * Parses a DurationString into a Duration object with numeric values that can
36
- * be used to do Date math. Throws if not a valid duration string.
37
- */
38
- export declare function parseDurationString(durationString: string): Duration;
39
- /**
40
- * Returns true if the given string is a valid DurationString.
41
- */
42
- export declare function isDurationString(maybeDuration: string): maybeDuration is DurationString;
43
- export declare function intervalToPrometheusDuration(timeRange: AbsoluteTimeRange): Duration;
44
- export declare function msToPrometheusDuration(durationInMs: number): Duration;
45
- export declare function formatDuration(duration: Duration): DurationString;
46
- /**
47
- * Round interval to clearer increments
48
- */
49
- export declare function roundStepInterval(stepMs: number): number;
50
- /**
51
- * Gets a suggested step/interval size for a time range based on the width of a visual component.
52
- */
53
- export declare function getSuggestedStepMs(timeRange: AbsoluteTimeRange, width: number): number;
54
- export {};
1
+ export { intervalToDuration as intervalToPrometheusDuration, //It has been renamed in spec
2
+ formatDuration, parseDurationString, isRelativeTimeRange, isAbsoluteTimeRange, toAbsoluteTimeRange, roundStepInterval, getSuggestedStepMs, DURATION_REGEX, } from '@perses-dev/spec';
3
+ export type { UnixTimeMs, DateTimeFormat, AbsoluteTimeRange, RelativeTimeRange, TimeRangeValue, DurationString, } from '@perses-dev/spec';
55
4
  //# sourceMappingURL=time.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/model/time.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAO,MAAM,UAAU,CAAC;AASzC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,IAAI,CAAC;IACZ,GAAG,EAAE,IAAI,CAAC;CACX;AAED,MAAM,WAAW,iBAAiB;IAEhC,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,cAAc,CAAC;CAC9B;AAED,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAEnE;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS,IAAI,iBAAiB,CAE7F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS,IAAI,iBAAiB,CAE7F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,GAAG,iBAAiB,CAOnF;AAED,KAAK,0BAA0B,GAAG,GAAG,MAAM,IAAI,CAAC;AAChD,KAAK,qBAAqB,GAAG,GAAG,MAAM,GAAG,CAAC;AAC1C,KAAK,qBAAqB,GAAG,GAAG,MAAM,GAAG,CAAC;AAC1C,KAAK,mBAAmB,GAAG,GAAG,MAAM,GAAG,CAAC;AACxC,KAAK,kBAAkB,GAAG,GAAG,MAAM,GAAG,CAAC;AACvC,KAAK,mBAAmB,GAAG,GAAG,MAAM,GAAG,CAAC;AACxC,KAAK,mBAAmB,GAAG,GAAG,MAAM,GAAG,CAAC;AAExC,MAAM,MAAM,cAAc,GAAG,OAAO,CAClC,GAAG,mBAAmB,GAAG,EAAE,GAAG,mBAAmB,GAAG,EAAE,GAAG,kBAAkB,GAAG,EAAE,GAAG,mBAAmB,GAAG,EAAE,GACvG,qBAAqB,GACrB,EAAE,GAAG,qBAAqB,GAAG,EAAE,GAAG,0BAA0B,GAAG,EAAE,EAAE,EACvE,EAAE,CACH,CAAC;AAEF,eAAO,MAAM,cAAc,QAAqF,CAAC;AAEjH;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,MAAM,GAAG,QAAQ,CAepE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,IAAI,cAAc,CAGvF;AAED,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,iBAAiB,GAAG,QAAQ,CAGnF;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAqBrE;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,CA4BjE;AAiED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAOxD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAItF"}
1
+ {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/model/time.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,kBAAkB,IAAI,4BAA4B,EAAE,6BAA6B;AACjF,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EACV,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,cAAc,GACf,MAAM,kBAAkB,CAAC"}