@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.
- package/dist/cjs/constants/dashboard-defaults.js +3 -3
- package/dist/cjs/model/calculations.js +6 -6
- package/dist/cjs/model/definitions.js +1 -3
- package/dist/cjs/model/folder.js +16 -0
- package/dist/cjs/model/index.js +1 -0
- package/dist/cjs/model/legend.js +11 -11
- package/dist/cjs/model/otlp/index.js +4 -4
- package/dist/cjs/model/otlp/trace/v1/trace.js +4 -4
- package/dist/cjs/model/resource.js +3 -3
- package/dist/cjs/model/roles.js +4 -4
- package/dist/cjs/model/time.js +21 -309
- package/dist/cjs/model/units/bits.js +14 -6
- package/dist/cjs/model/units/bytes.js +16 -6
- package/dist/cjs/model/units/currency.js +14 -6
- package/dist/cjs/model/units/date.js +4 -4
- package/dist/cjs/model/units/decimal.js +13 -6
- package/dist/cjs/model/units/formatterCache.js +120 -0
- package/dist/cjs/model/units/percent.js +13 -6
- package/dist/cjs/model/units/temperature.js +13 -5
- package/dist/cjs/model/units/throughput.js +15 -6
- package/dist/cjs/model/units/time.js +15 -7
- package/dist/cjs/model/units/units.js +18 -18
- package/dist/cjs/model/units/utils.js +4 -4
- package/dist/cjs/model/variables.js +3 -3
- package/dist/cjs/schema/datasource.js +13 -29
- package/dist/cjs/schema/display.js +2 -6
- package/dist/cjs/schema/duration.js +2 -4
- package/dist/cjs/schema/metadata.js +4 -4
- package/dist/cjs/schema/panel.js +20 -72
- package/dist/cjs/schema/plugin.js +2 -6
- package/dist/cjs/schema/role.js +6 -6
- package/dist/cjs/schema/rolebinding.js +6 -6
- package/dist/cjs/schema/secret.js +5 -5
- package/dist/cjs/schema/user.js +5 -5
- package/dist/cjs/schema/variable.js +24 -137
- package/dist/cjs/utils/fetch.js +5 -5
- package/dist/cjs/utils/panel-refs.js +4 -4
- package/dist/cjs/utils/regexp.js +3 -3
- package/dist/cjs/utils/text.js +7 -7
- package/dist/cjs/utils/time-series-data.js +4 -4
- package/dist/cjs/utils/transform-data.js +6 -6
- package/dist/model/dashboard.d.ts +2 -21
- package/dist/model/dashboard.d.ts.map +1 -1
- package/dist/model/dashboard.js.map +1 -1
- package/dist/model/datasource.d.ts +3 -22
- package/dist/model/datasource.d.ts.map +1 -1
- package/dist/model/datasource.js +1 -3
- package/dist/model/datasource.js.map +1 -1
- package/dist/model/definitions.d.ts +1 -12
- package/dist/model/definitions.d.ts.map +1 -1
- package/dist/model/definitions.js +1 -6
- package/dist/model/definitions.js.map +1 -1
- package/dist/model/display.d.ts +1 -4
- package/dist/model/display.d.ts.map +1 -1
- package/dist/model/display.js.map +1 -1
- package/dist/model/folder.d.ts +19 -0
- package/dist/model/folder.d.ts.map +1 -0
- package/dist/model/folder.js +15 -0
- package/dist/model/folder.js.map +1 -0
- package/dist/model/index.d.ts +1 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/index.js +1 -0
- package/dist/model/index.js.map +1 -1
- package/dist/model/project.d.ts +1 -1
- package/dist/model/project.d.ts.map +1 -1
- package/dist/model/project.js.map +1 -1
- package/dist/model/query.d.ts +1 -0
- package/dist/model/query.d.ts.map +1 -1
- package/dist/model/query.js.map +1 -1
- package/dist/model/resource.d.ts +1 -1
- package/dist/model/resource.d.ts.map +1 -1
- package/dist/model/resource.js.map +1 -1
- package/dist/model/time.d.ts +3 -54
- package/dist/model/time.d.ts.map +1 -1
- package/dist/model/time.js +2 -299
- package/dist/model/time.js.map +1 -1
- package/dist/model/units/bits.d.ts.map +1 -1
- package/dist/model/units/bits.js +10 -2
- package/dist/model/units/bits.js.map +1 -1
- package/dist/model/units/bytes.d.ts.map +1 -1
- package/dist/model/units/bytes.js +12 -2
- package/dist/model/units/bytes.js.map +1 -1
- package/dist/model/units/currency.d.ts.map +1 -1
- package/dist/model/units/currency.js +10 -2
- package/dist/model/units/currency.js.map +1 -1
- package/dist/model/units/decimal.d.ts.map +1 -1
- package/dist/model/units/decimal.js +9 -2
- package/dist/model/units/decimal.js.map +1 -1
- package/dist/model/units/formatterCache.d.ts +11 -0
- package/dist/model/units/formatterCache.d.ts.map +1 -0
- package/dist/model/units/formatterCache.js +104 -0
- package/dist/model/units/formatterCache.js.map +1 -0
- package/dist/model/units/percent.d.ts.map +1 -1
- package/dist/model/units/percent.js +9 -2
- package/dist/model/units/percent.js.map +1 -1
- package/dist/model/units/temperature.d.ts.map +1 -1
- package/dist/model/units/temperature.js +9 -1
- package/dist/model/units/temperature.js.map +1 -1
- package/dist/model/units/throughput.d.ts.map +1 -1
- package/dist/model/units/throughput.js +11 -2
- package/dist/model/units/throughput.js.map +1 -1
- package/dist/model/units/time.d.ts.map +1 -1
- package/dist/model/units/time.js +10 -2
- package/dist/model/units/time.js.map +1 -1
- package/dist/schema/datasource.d.ts +10 -9
- package/dist/schema/datasource.d.ts.map +1 -1
- package/dist/schema/datasource.js +2 -14
- package/dist/schema/datasource.js.map +1 -1
- package/dist/schema/display.d.ts +1 -11
- package/dist/schema/display.d.ts.map +1 -1
- package/dist/schema/display.js +1 -5
- package/dist/schema/display.js.map +1 -1
- package/dist/schema/duration.d.ts +1 -2
- package/dist/schema/duration.d.ts.map +1 -1
- package/dist/schema/duration.js +1 -3
- package/dist/schema/duration.js.map +1 -1
- package/dist/schema/panel.d.ts +1 -12
- package/dist/schema/panel.d.ts.map +1 -1
- package/dist/schema/panel.js +1 -53
- package/dist/schema/panel.js.map +1 -1
- package/dist/schema/plugin.d.ts +2 -13
- package/dist/schema/plugin.d.ts.map +1 -1
- package/dist/schema/plugin.js +1 -5
- package/dist/schema/plugin.js.map +1 -1
- package/dist/schema/role.d.ts +4 -4
- package/dist/schema/rolebinding.d.ts +4 -4
- package/dist/schema/secret.d.ts +70 -70
- package/dist/schema/variable.d.ts +1 -91
- package/dist/schema/variable.d.ts.map +1 -1
- package/dist/schema/variable.js +1 -105
- package/dist/schema/variable.js.map +1 -1
- package/dist/utils/fetch.js.map +1 -1
- package/dist/utils/text.js +4 -4
- package/dist/utils/text.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DatasourceSpec, DatasourceSelector } from '@perses-dev/spec';
|
|
2
2
|
import { Metadata, ProjectMetadata } from './resource';
|
|
3
|
-
|
|
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,
|
|
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"}
|
package/dist/model/datasource.js
CHANGED
|
@@ -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 {
|
|
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
|
|
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\
|
|
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"}
|
package/dist/model/display.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/model/display.ts"],"names":[],"mappings":"AAaA,
|
|
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
|
|
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"}
|
package/dist/model/index.d.ts
CHANGED
|
@@ -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"}
|
package/dist/model/index.js
CHANGED
package/dist/model/index.js.map
CHANGED
|
@@ -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"}
|
package/dist/model/project.d.ts
CHANGED
|
@@ -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;
|
|
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
|
|
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"}
|
package/dist/model/query.d.ts
CHANGED
|
@@ -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"}
|
package/dist/model/query.js.map
CHANGED
|
@@ -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;
|
|
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"}
|
package/dist/model/resource.d.ts
CHANGED
|
@@ -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
|
|
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;
|
|
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
|
|
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"}
|
package/dist/model/time.d.ts
CHANGED
|
@@ -1,55 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type DateTimeFormat
|
|
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
|
package/dist/model/time.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/model/time.ts"],"names":[],"mappings":"
|
|
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"}
|