@red-hat-developer-hub/plugin-cost-management-common 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/README.md +17 -0
- package/dist/DefaultApiClient.cjs.js +8 -0
- package/dist/DefaultApiClient.cjs.js.map +1 -0
- package/dist/DefaultApiClient.d.ts +83 -0
- package/dist/DefaultApiClient.esm.js +2 -0
- package/dist/DefaultApiClient.esm.js.map +1 -0
- package/dist/clients/cost-management/CostManagementSlimClient.cjs.js +378 -0
- package/dist/clients/cost-management/CostManagementSlimClient.cjs.js.map +1 -0
- package/dist/clients/cost-management/CostManagementSlimClient.esm.js +372 -0
- package/dist/clients/cost-management/CostManagementSlimClient.esm.js.map +1 -0
- package/dist/clients/optimizations/OptimizationsClient.cjs.js +99 -0
- package/dist/clients/optimizations/OptimizationsClient.cjs.js.map +1 -0
- package/dist/clients/optimizations/OptimizationsClient.esm.js +92 -0
- package/dist/clients/optimizations/OptimizationsClient.esm.js.map +1 -0
- package/dist/clients/orchestrator-slim/OrchestratorSlimClient.cjs.js +107 -0
- package/dist/clients/orchestrator-slim/OrchestratorSlimClient.cjs.js.map +1 -0
- package/dist/clients/orchestrator-slim/OrchestratorSlimClient.esm.js +105 -0
- package/dist/clients/orchestrator-slim/OrchestratorSlimClient.esm.js.map +1 -0
- package/dist/clients.cjs.js +12 -0
- package/dist/clients.cjs.js.map +1 -0
- package/dist/clients.d.ts +432 -0
- package/dist/clients.esm.js +4 -0
- package/dist/clients.esm.js.map +1 -0
- package/dist/generated/apis/DefaultApi.client.cjs.js +91 -0
- package/dist/generated/apis/DefaultApi.client.cjs.js.map +1 -0
- package/dist/generated/apis/DefaultApi.client.esm.js +66 -0
- package/dist/generated/apis/DefaultApi.client.esm.js.map +1 -0
- package/dist/generated/pluginId.cjs.js +6 -0
- package/dist/generated/pluginId.cjs.js.map +1 -0
- package/dist/generated/pluginId.esm.js +4 -0
- package/dist/generated/pluginId.esm.js.map +1 -0
- package/dist/index.cjs.js +14 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.esm.js +5 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/json-utils.cjs.js +22 -0
- package/dist/json-utils.cjs.js.map +1 -0
- package/dist/json-utils.d.ts +46 -0
- package/dist/json-utils.esm.js +20 -0
- package/dist/json-utils.esm.js.map +1 -0
- package/dist/models.cjs.js +3 -0
- package/dist/models.cjs.js.map +1 -0
- package/dist/models.d.ts +25 -0
- package/dist/models.esm.js +2 -0
- package/dist/models.esm.js.map +1 -0
- package/dist/permissions.cjs.js +47 -0
- package/dist/permissions.cjs.js.map +1 -0
- package/dist/permissions.d.ts +24 -0
- package/dist/permissions.esm.js +36 -0
- package/dist/permissions.esm.js.map +1 -0
- package/dist/types/RecommendationList.model.d-J74WXrJI.d.ts +414 -0
- package/dist/util/lib/json.cjs.js +20 -0
- package/dist/util/lib/json.cjs.js.map +1 -0
- package/dist/util/lib/json.esm.js +15 -0
- package/dist/util/lib/json.esm.js.map +1 -0
- package/dist/util/lib/json_node.cjs.js +191 -0
- package/dist/util/lib/json_node.cjs.js.map +1 -0
- package/dist/util/lib/json_node.esm.js +189 -0
- package/dist/util/lib/json_node.esm.js.map +1 -0
- package/package.json +124 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BasicCost, Cluster, CostManagementReport, CostManagementSlimApi, CostManagementSlimClient, CostValue, CurrencyCode, DateData, DistributedCost, DownloadCostManagementRequest, ExportFormat, GetAccessResponse, GetCostManagementAccessResponse, GetCostManagementRequest, GetRecommendationByIdRequest, GetRecommendationListRequest, GetTokenResponse, Node, OptimizationsApi, OptimizationsClient, OrchestratorSlimApi, OrchestratorSlimClient, Project, ProjectValue, Tag, WorkflowAvailabilityResult, WorkflowUnavailableReason } from './clients.js';
|
|
2
|
+
export { DefaultApiClient, RequestOptions, TypedResponse } from './DefaultApiClient.js';
|
|
3
|
+
export { CPULimitOptimisedNotification, CPURequestOptimisedNotification, MemoryLimitOptimisedNotification, MemoryRequestOptimisedNotification } from './models.js';
|
|
4
|
+
export { C as CPULimitOptimisedNotification323005, a as CPURequestOptimisedNotification323004, b as CostRecommendation, c as CostRecommendationConfig, d as CostRecommendationConfigLimits, e as CostRecommendationConfigLimitsCpu, f as CostRecommendationConfigLimitsMemory, g as CostRecommendationConfigRequests, h as CostRecommendationConfigRequestsCpu, i as CostRecommendationConfigRequestsMemory, j as CostRecommendationNotifications, k as CostRecommendationVariation, l as CostRecommendationVariationLimits, m as CostRecommendationVariationLimitsCpu, n as CostRecommendationVariationLimitsMemory, o as CostRecommendationVariationRequests, p as CostRecommendationVariationRequestsCpu, q as CostRecommendationVariationRequestsMemory, r as CpuUsage, L as LongTermRecommendation, s as LongTermRecommendationBoxPlots, t as LongTermRecommendationRecommendationEngines, M as MediumTermRecommendation, u as MediumTermRecommendationBoxPlots, v as MemoryLimitOptimisedNotification324004, w as MemoryRequestOptimisedNotification324003, x as MemoryUsage, P as PerformanceRecommendation, y as PerformanceRecommendationConfig, z as PerformanceRecommendationConfigLimits, A as PerformanceRecommendationConfigLimitsCpu, B as PerformanceRecommendationConfigLimitsMemory, D as PerformanceRecommendationConfigRequests, E as PerformanceRecommendationConfigRequestsCpu, F as PerformanceRecommendationConfigRequestsMemory, G as PerformanceRecommendationVariation, H as PerformanceRecommendationVariationLimits, I as PerformanceRecommendationVariationLimitsCpu, J as PerformanceRecommendationVariationLimitsMemory, K as PerformanceRecommendationVariationRequests, N as PerformanceRecommendationVariationRequestsCpu, O as PlotDetailsValue, Q as PlotsData, R as RecommendationBoxPlots, S as RecommendationBoxPlotsRecommendations, T as RecommendationBoxPlotsRecommendationsRecommendationTerms, U as RecommendationList, V as RecommendationListLinks, W as RecommendationListMeta, X as Recommendations, Y as RecommendationsRecommendations, Z as RecommendationsRecommendationsCurrent, _ as RecommendationsRecommendationsCurrentLimits, $ as RecommendationsRecommendationsCurrentLimitsCpu, a0 as RecommendationsRecommendationsCurrentLimitsMemory, a1 as RecommendationsRecommendationsCurrentRequests, a2 as RecommendationsRecommendationsCurrentRequestsMemory, a3 as RecommendationsRecommendationsRecommendationTerms, a4 as ShortTermRecommendation, a5 as ShortTermRecommendationBoxPlots } from './types/RecommendationList.model.d-J74WXrJI.js';
|
|
5
|
+
import '@backstage/core-plugin-api';
|
|
6
|
+
import '@backstage/types';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { OptimizationsClient } from './clients/optimizations/OptimizationsClient.esm.js';
|
|
2
|
+
export { OrchestratorSlimClient } from './clients/orchestrator-slim/OrchestratorSlimClient.esm.js';
|
|
3
|
+
export { CostManagementSlimClient } from './clients/cost-management/CostManagementSlimClient.esm.js';
|
|
4
|
+
export { DefaultApiClient } from './generated/apis/DefaultApi.client.esm.js';
|
|
5
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var json = require('./util/lib/json.cjs.js');
|
|
4
|
+
var json_node = require('./util/lib/json_node.cjs.js');
|
|
5
|
+
|
|
6
|
+
function deepMapKeys(input, functionOrOptions) {
|
|
7
|
+
if (!json.maybeJsonValue(input)) {
|
|
8
|
+
throw new TypeError("Invalid argument type");
|
|
9
|
+
}
|
|
10
|
+
if (json.maybeJsonObject(input) && Object.keys(input).length === 0 || json.maybeJsonArray(input) && input.length === 0) {
|
|
11
|
+
return input;
|
|
12
|
+
}
|
|
13
|
+
const node = new json_node.JsonNode("$", input);
|
|
14
|
+
const visitor = new json_node.JsonNode.Visitor(
|
|
15
|
+
typeof functionOrOptions === "function" ? { onVisitJsonObjectKey: functionOrOptions } : functionOrOptions
|
|
16
|
+
);
|
|
17
|
+
node.accept(visitor);
|
|
18
|
+
return node.toJsonValue();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
exports.deepMapKeys = deepMapKeys;
|
|
22
|
+
//# sourceMappingURL=json-utils.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-utils.cjs.js","sources":["../src/util/mod.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\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\nimport {\n type JsonValue,\n maybeJsonArray,\n maybeJsonObject,\n maybeJsonValue,\n} from './lib/json';\nimport { JsonNode, type JsonNodeVisitorOptions } from './lib/json_node';\n\n/**\n * Recursively transforms the keys of JSON objects within the input value using the provided function.\n *\n * @public\n * @param input - The input value to process. Must be a valid JSON value.\n * @param functionOrOptions - A function that can be used to change the keys in the provided input or a configuration object.\n * @throws \\{TypeError\\} If the input is not a valid JSON value.\n *\n * @returns The same value when the input is a JSON scalar, an empty array or empty object; otherwise a new reference value.\n */\nexport function deepMapKeys(\n input: unknown,\n functionOrOptions:\n | JsonNodeVisitorOptions\n | JsonNodeVisitorOptions['onVisitJsonObjectKey'],\n): JsonValue {\n if (!maybeJsonValue(input)) {\n throw new TypeError('Invalid argument type');\n }\n\n if (\n (maybeJsonObject(input) && Object.keys(input).length === 0) ||\n (maybeJsonArray(input) && input.length === 0)\n ) {\n return input;\n }\n\n const node = new JsonNode('$', input);\n const visitor = new JsonNode.Visitor(\n typeof functionOrOptions === 'function'\n ? { onVisitJsonObjectKey: functionOrOptions }\n : functionOrOptions,\n );\n node.accept(visitor);\n\n return node.toJsonValue();\n}\n"],"names":["maybeJsonValue","maybeJsonObject","maybeJsonArray","JsonNode"],"mappings":";;;;;AAkCgB,SAAA,WAAA,CACd,OACA,iBAGW,EAAA;AACX,EAAI,IAAA,CAACA,mBAAe,CAAA,KAAK,CAAG,EAAA;AAC1B,IAAM,MAAA,IAAI,UAAU,uBAAuB,CAAA;AAAA;AAG7C,EAAA,IACGC,oBAAgB,CAAA,KAAK,CAAK,IAAA,MAAA,CAAO,KAAK,KAAK,CAAA,CAAE,MAAW,KAAA,CAAA,IACxDC,mBAAe,CAAA,KAAK,CAAK,IAAA,KAAA,CAAM,WAAW,CAC3C,EAAA;AACA,IAAO,OAAA,KAAA;AAAA;AAGT,EAAA,MAAM,IAAO,GAAA,IAAIC,kBAAS,CAAA,GAAA,EAAK,KAAK,CAAA;AACpC,EAAM,MAAA,OAAA,GAAU,IAAIA,kBAAS,CAAA,OAAA;AAAA,IAC3B,OAAO,iBAAsB,KAAA,UAAA,GACzB,EAAE,oBAAA,EAAsB,mBACxB,GAAA;AAAA,GACN;AACA,EAAA,IAAA,CAAK,OAAO,OAAO,CAAA;AAEnB,EAAA,OAAO,KAAK,WAAY,EAAA;AAC1B;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
type JsonScalar = number | string | boolean | null;
|
|
2
|
+
/** A type representing a JSON object */
|
|
3
|
+
type JsonObject = {
|
|
4
|
+
[key in string]?: JsonValue;
|
|
5
|
+
};
|
|
6
|
+
/** A type representing JSON array */
|
|
7
|
+
type JsonArray = Array<JsonValue>;
|
|
8
|
+
/** A type representing all valid JSON serializable values. */
|
|
9
|
+
type JsonValue = JsonObject | JsonArray | JsonScalar;
|
|
10
|
+
|
|
11
|
+
type ObjectKeyMutatorFunction = (key: string | number) => string;
|
|
12
|
+
/**
|
|
13
|
+
* Options for configuring the JSON visitor.
|
|
14
|
+
*/
|
|
15
|
+
interface JsonNodeVisitorOptions {
|
|
16
|
+
/**
|
|
17
|
+
* A list of regular expression matching the JSONPath (RFC 9535) of a key in the data structure.
|
|
18
|
+
* Every time a key is found in the data structure, its JSONPath is tested for a match against the entries in the list.
|
|
19
|
+
* If at least one match is found, then that key won't be processed by the `JsonNodeVisitorOptions#onVisitJsonObjectKey` callback.
|
|
20
|
+
*/
|
|
21
|
+
skipList?: Array<RegExp>;
|
|
22
|
+
/**
|
|
23
|
+
* An optional flag to enable debug mode.
|
|
24
|
+
* When set to true, each time a node is visited, its JSONPath will be logged.
|
|
25
|
+
*/
|
|
26
|
+
debug?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* A function that can be used to process the object keys names.
|
|
29
|
+
* The string returned by this function will be used to replace the name of the object key being visited.
|
|
30
|
+
*/
|
|
31
|
+
onVisitJsonObjectKey?: ObjectKeyMutatorFunction;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Recursively transforms the keys of JSON objects within the input value using the provided function.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
* @param input - The input value to process. Must be a valid JSON value.
|
|
39
|
+
* @param functionOrOptions - A function that can be used to change the keys in the provided input or a configuration object.
|
|
40
|
+
* @throws \{TypeError\} If the input is not a valid JSON value.
|
|
41
|
+
*
|
|
42
|
+
* @returns The same value when the input is a JSON scalar, an empty array or empty object; otherwise a new reference value.
|
|
43
|
+
*/
|
|
44
|
+
declare function deepMapKeys(input: unknown, functionOrOptions: JsonNodeVisitorOptions | JsonNodeVisitorOptions['onVisitJsonObjectKey']): JsonValue;
|
|
45
|
+
|
|
46
|
+
export { deepMapKeys };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { maybeJsonValue, maybeJsonObject, maybeJsonArray } from './util/lib/json.esm.js';
|
|
2
|
+
import { JsonNode } from './util/lib/json_node.esm.js';
|
|
3
|
+
|
|
4
|
+
function deepMapKeys(input, functionOrOptions) {
|
|
5
|
+
if (!maybeJsonValue(input)) {
|
|
6
|
+
throw new TypeError("Invalid argument type");
|
|
7
|
+
}
|
|
8
|
+
if (maybeJsonObject(input) && Object.keys(input).length === 0 || maybeJsonArray(input) && input.length === 0) {
|
|
9
|
+
return input;
|
|
10
|
+
}
|
|
11
|
+
const node = new JsonNode("$", input);
|
|
12
|
+
const visitor = new JsonNode.Visitor(
|
|
13
|
+
typeof functionOrOptions === "function" ? { onVisitJsonObjectKey: functionOrOptions } : functionOrOptions
|
|
14
|
+
);
|
|
15
|
+
node.accept(visitor);
|
|
16
|
+
return node.toJsonValue();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { deepMapKeys };
|
|
20
|
+
//# sourceMappingURL=json-utils.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-utils.esm.js","sources":["../src/util/mod.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\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\nimport {\n type JsonValue,\n maybeJsonArray,\n maybeJsonObject,\n maybeJsonValue,\n} from './lib/json';\nimport { JsonNode, type JsonNodeVisitorOptions } from './lib/json_node';\n\n/**\n * Recursively transforms the keys of JSON objects within the input value using the provided function.\n *\n * @public\n * @param input - The input value to process. Must be a valid JSON value.\n * @param functionOrOptions - A function that can be used to change the keys in the provided input or a configuration object.\n * @throws \\{TypeError\\} If the input is not a valid JSON value.\n *\n * @returns The same value when the input is a JSON scalar, an empty array or empty object; otherwise a new reference value.\n */\nexport function deepMapKeys(\n input: unknown,\n functionOrOptions:\n | JsonNodeVisitorOptions\n | JsonNodeVisitorOptions['onVisitJsonObjectKey'],\n): JsonValue {\n if (!maybeJsonValue(input)) {\n throw new TypeError('Invalid argument type');\n }\n\n if (\n (maybeJsonObject(input) && Object.keys(input).length === 0) ||\n (maybeJsonArray(input) && input.length === 0)\n ) {\n return input;\n }\n\n const node = new JsonNode('$', input);\n const visitor = new JsonNode.Visitor(\n typeof functionOrOptions === 'function'\n ? { onVisitJsonObjectKey: functionOrOptions }\n : functionOrOptions,\n );\n node.accept(visitor);\n\n return node.toJsonValue();\n}\n"],"names":[],"mappings":";;;AAkCgB,SAAA,WAAA,CACd,OACA,iBAGW,EAAA;AACX,EAAI,IAAA,CAAC,cAAe,CAAA,KAAK,CAAG,EAAA;AAC1B,IAAM,MAAA,IAAI,UAAU,uBAAuB,CAAA;AAAA;AAG7C,EAAA,IACG,eAAgB,CAAA,KAAK,CAAK,IAAA,MAAA,CAAO,KAAK,KAAK,CAAA,CAAE,MAAW,KAAA,CAAA,IACxD,cAAe,CAAA,KAAK,CAAK,IAAA,KAAA,CAAM,WAAW,CAC3C,EAAA;AACA,IAAO,OAAA,KAAA;AAAA;AAGT,EAAA,MAAM,IAAO,GAAA,IAAI,QAAS,CAAA,GAAA,EAAK,KAAK,CAAA;AACpC,EAAM,MAAA,OAAA,GAAU,IAAI,QAAS,CAAA,OAAA;AAAA,IAC3B,OAAO,iBAAsB,KAAA,UAAA,GACzB,EAAE,oBAAA,EAAsB,mBACxB,GAAA;AAAA,GACN;AACA,EAAA,IAAA,CAAK,OAAO,OAAO,CAAA;AAEnB,EAAA,OAAO,KAAK,WAAY,EAAA;AAC1B;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/models.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { C as CPULimitOptimisedNotification323005, a as CPURequestOptimisedNotification323004, v as MemoryLimitOptimisedNotification324004, w as MemoryRequestOptimisedNotification324003 } from './types/RecommendationList.model.d-J74WXrJI.js';
|
|
2
|
+
export { b as CostRecommendation, c as CostRecommendationConfig, d as CostRecommendationConfigLimits, e as CostRecommendationConfigLimitsCpu, f as CostRecommendationConfigLimitsMemory, g as CostRecommendationConfigRequests, h as CostRecommendationConfigRequestsCpu, i as CostRecommendationConfigRequestsMemory, j as CostRecommendationNotifications, k as CostRecommendationVariation, l as CostRecommendationVariationLimits, m as CostRecommendationVariationLimitsCpu, n as CostRecommendationVariationLimitsMemory, o as CostRecommendationVariationRequests, p as CostRecommendationVariationRequestsCpu, q as CostRecommendationVariationRequestsMemory, r as CpuUsage, L as LongTermRecommendation, s as LongTermRecommendationBoxPlots, t as LongTermRecommendationRecommendationEngines, M as MediumTermRecommendation, u as MediumTermRecommendationBoxPlots, x as MemoryUsage, P as PerformanceRecommendation, y as PerformanceRecommendationConfig, z as PerformanceRecommendationConfigLimits, A as PerformanceRecommendationConfigLimitsCpu, B as PerformanceRecommendationConfigLimitsMemory, D as PerformanceRecommendationConfigRequests, E as PerformanceRecommendationConfigRequestsCpu, F as PerformanceRecommendationConfigRequestsMemory, G as PerformanceRecommendationVariation, H as PerformanceRecommendationVariationLimits, I as PerformanceRecommendationVariationLimitsCpu, J as PerformanceRecommendationVariationLimitsMemory, K as PerformanceRecommendationVariationRequests, N as PerformanceRecommendationVariationRequestsCpu, O as PlotDetailsValue, Q as PlotsData, R as RecommendationBoxPlots, S as RecommendationBoxPlotsRecommendations, T as RecommendationBoxPlotsRecommendationsRecommendationTerms, U as RecommendationList, V as RecommendationListLinks, W as RecommendationListMeta, X as Recommendations, Y as RecommendationsRecommendations, Z as RecommendationsRecommendationsCurrent, _ as RecommendationsRecommendationsCurrentLimits, $ as RecommendationsRecommendationsCurrentLimitsCpu, a0 as RecommendationsRecommendationsCurrentLimitsMemory, a1 as RecommendationsRecommendationsCurrentRequests, a2 as RecommendationsRecommendationsCurrentRequestsMemory, a3 as RecommendationsRecommendationsRecommendationTerms, a4 as ShortTermRecommendation, a5 as ShortTermRecommendationBoxPlots } from './types/RecommendationList.model.d-J74WXrJI.js';
|
|
3
|
+
|
|
4
|
+
/** @public */
|
|
5
|
+
interface CPULimitOptimisedNotification {
|
|
6
|
+
_323005?: CPULimitOptimisedNotification323005;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** @public */
|
|
10
|
+
interface CPURequestOptimisedNotification {
|
|
11
|
+
_323004?: CPURequestOptimisedNotification323004;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** @public */
|
|
15
|
+
interface MemoryLimitOptimisedNotification {
|
|
16
|
+
_324004?: MemoryLimitOptimisedNotification324004;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** @public */
|
|
20
|
+
interface MemoryRequestOptimisedNotification {
|
|
21
|
+
_324003?: MemoryRequestOptimisedNotification324003;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { CPULimitOptimisedNotification323005, CPURequestOptimisedNotification323004, MemoryLimitOptimisedNotification324004, MemoryRequestOptimisedNotification324003 };
|
|
25
|
+
export type { CPULimitOptimisedNotification, CPURequestOptimisedNotification, MemoryLimitOptimisedNotification, MemoryRequestOptimisedNotification };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var pluginPermissionCommon = require('@backstage/plugin-permission-common');
|
|
4
|
+
|
|
5
|
+
const rosPluginReadPermission = pluginPermissionCommon.createPermission({
|
|
6
|
+
name: "ros.plugin",
|
|
7
|
+
attributes: { action: "read" }
|
|
8
|
+
});
|
|
9
|
+
const rosApplyPermission = pluginPermissionCommon.createPermission({
|
|
10
|
+
name: "ros.apply",
|
|
11
|
+
attributes: { action: "update" }
|
|
12
|
+
});
|
|
13
|
+
const rosClusterSpecificPermission = (clusterName) => pluginPermissionCommon.createPermission({
|
|
14
|
+
name: `ros/${clusterName}`,
|
|
15
|
+
attributes: { action: "read" }
|
|
16
|
+
});
|
|
17
|
+
const rosClusterProjectPermission = (clusterName, projectName) => pluginPermissionCommon.createPermission({
|
|
18
|
+
name: `ros/${clusterName}/${projectName}`,
|
|
19
|
+
attributes: { action: "read" }
|
|
20
|
+
});
|
|
21
|
+
const costPluginReadPermission = pluginPermissionCommon.createPermission({
|
|
22
|
+
name: "cost.plugin",
|
|
23
|
+
attributes: { action: "read" }
|
|
24
|
+
});
|
|
25
|
+
const costClusterSpecificPermission = (clusterName) => pluginPermissionCommon.createPermission({
|
|
26
|
+
name: `cost/${clusterName}`,
|
|
27
|
+
attributes: { action: "read" }
|
|
28
|
+
});
|
|
29
|
+
const costClusterProjectPermission = (clusterName, projectName) => pluginPermissionCommon.createPermission({
|
|
30
|
+
name: `cost/${clusterName}/${projectName}`,
|
|
31
|
+
attributes: { action: "read" }
|
|
32
|
+
});
|
|
33
|
+
const costPluginPermissions = [costPluginReadPermission];
|
|
34
|
+
const rosPluginPermissions = [rosPluginReadPermission];
|
|
35
|
+
const rosApplyPermissions = [rosApplyPermission];
|
|
36
|
+
|
|
37
|
+
exports.costClusterProjectPermission = costClusterProjectPermission;
|
|
38
|
+
exports.costClusterSpecificPermission = costClusterSpecificPermission;
|
|
39
|
+
exports.costPluginPermissions = costPluginPermissions;
|
|
40
|
+
exports.costPluginReadPermission = costPluginReadPermission;
|
|
41
|
+
exports.rosApplyPermission = rosApplyPermission;
|
|
42
|
+
exports.rosApplyPermissions = rosApplyPermissions;
|
|
43
|
+
exports.rosClusterProjectPermission = rosClusterProjectPermission;
|
|
44
|
+
exports.rosClusterSpecificPermission = rosClusterSpecificPermission;
|
|
45
|
+
exports.rosPluginPermissions = rosPluginPermissions;
|
|
46
|
+
exports.rosPluginReadPermission = rosPluginReadPermission;
|
|
47
|
+
//# sourceMappingURL=permissions.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.cjs.js","sources":["../src/permissions.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\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\nimport { createPermission } from '@backstage/plugin-permission-common';\n\n/** @public */\nexport const rosPluginReadPermission = createPermission({\n name: 'ros.plugin',\n attributes: { action: 'read' },\n});\n\n/** @public */\nexport const rosApplyPermission = createPermission({\n name: 'ros.apply',\n attributes: { action: 'update' },\n});\n\n/** @public */\nexport const rosClusterSpecificPermission = (clusterName: string) =>\n createPermission({\n name: `ros/${clusterName}`,\n attributes: { action: 'read' },\n });\n\n/** @public */\nexport const rosClusterProjectPermission = (\n clusterName: string,\n projectName: string,\n) =>\n createPermission({\n name: `ros/${clusterName}/${projectName}`,\n attributes: { action: 'read' },\n });\n\n/** @public */\nexport const costPluginReadPermission = createPermission({\n name: 'cost.plugin',\n attributes: { action: 'read' },\n});\n\n/** @public */\nexport const costClusterSpecificPermission = (clusterName: string) =>\n createPermission({\n name: `cost/${clusterName}`,\n attributes: { action: 'read' },\n });\n\n/** @public */\nexport const costClusterProjectPermission = (\n clusterName: string,\n projectName: string,\n) =>\n createPermission({\n name: `cost/${clusterName}/${projectName}`,\n attributes: { action: 'read' },\n });\n\n/** @public */\nexport const costPluginPermissions = [costPluginReadPermission];\n\n/** @public */\nexport const rosPluginPermissions = [rosPluginReadPermission];\n\n/** @public */\nexport const rosApplyPermissions = [rosApplyPermission];\n"],"names":["createPermission"],"mappings":";;;;AAmBO,MAAM,0BAA0BA,uCAAiB,CAAA;AAAA,EACtD,IAAM,EAAA,YAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGM,MAAM,qBAAqBA,uCAAiB,CAAA;AAAA,EACjD,IAAM,EAAA,WAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAS;AACjC,CAAC;AAGY,MAAA,4BAAA,GAA+B,CAAC,WAAA,KAC3CA,uCAAiB,CAAA;AAAA,EACf,IAAA,EAAM,OAAO,WAAW,CAAA,CAAA;AAAA,EACxB,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGI,MAAM,2BAA8B,GAAA,CACzC,WACA,EAAA,WAAA,KAEAA,uCAAiB,CAAA;AAAA,EACf,IAAM,EAAA,CAAA,IAAA,EAAO,WAAW,CAAA,CAAA,EAAI,WAAW,CAAA,CAAA;AAAA,EACvC,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGI,MAAM,2BAA2BA,uCAAiB,CAAA;AAAA,EACvD,IAAM,EAAA,aAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGY,MAAA,6BAAA,GAAgC,CAAC,WAAA,KAC5CA,uCAAiB,CAAA;AAAA,EACf,IAAA,EAAM,QAAQ,WAAW,CAAA,CAAA;AAAA,EACzB,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGI,MAAM,4BAA+B,GAAA,CAC1C,WACA,EAAA,WAAA,KAEAA,uCAAiB,CAAA;AAAA,EACf,IAAM,EAAA,CAAA,KAAA,EAAQ,WAAW,CAAA,CAAA,EAAI,WAAW,CAAA,CAAA;AAAA,EACxC,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGU,MAAA,qBAAA,GAAwB,CAAC,wBAAwB;AAGjD,MAAA,oBAAA,GAAuB,CAAC,uBAAuB;AAG/C,MAAA,mBAAA,GAAsB,CAAC,kBAAkB;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as _backstage_plugin_permission_common from '@backstage/plugin-permission-common';
|
|
2
|
+
|
|
3
|
+
/** @public */
|
|
4
|
+
declare const rosPluginReadPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
5
|
+
/** @public */
|
|
6
|
+
declare const rosApplyPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
7
|
+
/** @public */
|
|
8
|
+
declare const rosClusterSpecificPermission: (clusterName: string) => _backstage_plugin_permission_common.BasicPermission;
|
|
9
|
+
/** @public */
|
|
10
|
+
declare const rosClusterProjectPermission: (clusterName: string, projectName: string) => _backstage_plugin_permission_common.BasicPermission;
|
|
11
|
+
/** @public */
|
|
12
|
+
declare const costPluginReadPermission: _backstage_plugin_permission_common.BasicPermission;
|
|
13
|
+
/** @public */
|
|
14
|
+
declare const costClusterSpecificPermission: (clusterName: string) => _backstage_plugin_permission_common.BasicPermission;
|
|
15
|
+
/** @public */
|
|
16
|
+
declare const costClusterProjectPermission: (clusterName: string, projectName: string) => _backstage_plugin_permission_common.BasicPermission;
|
|
17
|
+
/** @public */
|
|
18
|
+
declare const costPluginPermissions: _backstage_plugin_permission_common.BasicPermission[];
|
|
19
|
+
/** @public */
|
|
20
|
+
declare const rosPluginPermissions: _backstage_plugin_permission_common.BasicPermission[];
|
|
21
|
+
/** @public */
|
|
22
|
+
declare const rosApplyPermissions: _backstage_plugin_permission_common.BasicPermission[];
|
|
23
|
+
|
|
24
|
+
export { costClusterProjectPermission, costClusterSpecificPermission, costPluginPermissions, costPluginReadPermission, rosApplyPermission, rosApplyPermissions, rosClusterProjectPermission, rosClusterSpecificPermission, rosPluginPermissions, rosPluginReadPermission };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createPermission } from '@backstage/plugin-permission-common';
|
|
2
|
+
|
|
3
|
+
const rosPluginReadPermission = createPermission({
|
|
4
|
+
name: "ros.plugin",
|
|
5
|
+
attributes: { action: "read" }
|
|
6
|
+
});
|
|
7
|
+
const rosApplyPermission = createPermission({
|
|
8
|
+
name: "ros.apply",
|
|
9
|
+
attributes: { action: "update" }
|
|
10
|
+
});
|
|
11
|
+
const rosClusterSpecificPermission = (clusterName) => createPermission({
|
|
12
|
+
name: `ros/${clusterName}`,
|
|
13
|
+
attributes: { action: "read" }
|
|
14
|
+
});
|
|
15
|
+
const rosClusterProjectPermission = (clusterName, projectName) => createPermission({
|
|
16
|
+
name: `ros/${clusterName}/${projectName}`,
|
|
17
|
+
attributes: { action: "read" }
|
|
18
|
+
});
|
|
19
|
+
const costPluginReadPermission = createPermission({
|
|
20
|
+
name: "cost.plugin",
|
|
21
|
+
attributes: { action: "read" }
|
|
22
|
+
});
|
|
23
|
+
const costClusterSpecificPermission = (clusterName) => createPermission({
|
|
24
|
+
name: `cost/${clusterName}`,
|
|
25
|
+
attributes: { action: "read" }
|
|
26
|
+
});
|
|
27
|
+
const costClusterProjectPermission = (clusterName, projectName) => createPermission({
|
|
28
|
+
name: `cost/${clusterName}/${projectName}`,
|
|
29
|
+
attributes: { action: "read" }
|
|
30
|
+
});
|
|
31
|
+
const costPluginPermissions = [costPluginReadPermission];
|
|
32
|
+
const rosPluginPermissions = [rosPluginReadPermission];
|
|
33
|
+
const rosApplyPermissions = [rosApplyPermission];
|
|
34
|
+
|
|
35
|
+
export { costClusterProjectPermission, costClusterSpecificPermission, costPluginPermissions, costPluginReadPermission, rosApplyPermission, rosApplyPermissions, rosClusterProjectPermission, rosClusterSpecificPermission, rosPluginPermissions, rosPluginReadPermission };
|
|
36
|
+
//# sourceMappingURL=permissions.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.esm.js","sources":["../src/permissions.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\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\nimport { createPermission } from '@backstage/plugin-permission-common';\n\n/** @public */\nexport const rosPluginReadPermission = createPermission({\n name: 'ros.plugin',\n attributes: { action: 'read' },\n});\n\n/** @public */\nexport const rosApplyPermission = createPermission({\n name: 'ros.apply',\n attributes: { action: 'update' },\n});\n\n/** @public */\nexport const rosClusterSpecificPermission = (clusterName: string) =>\n createPermission({\n name: `ros/${clusterName}`,\n attributes: { action: 'read' },\n });\n\n/** @public */\nexport const rosClusterProjectPermission = (\n clusterName: string,\n projectName: string,\n) =>\n createPermission({\n name: `ros/${clusterName}/${projectName}`,\n attributes: { action: 'read' },\n });\n\n/** @public */\nexport const costPluginReadPermission = createPermission({\n name: 'cost.plugin',\n attributes: { action: 'read' },\n});\n\n/** @public */\nexport const costClusterSpecificPermission = (clusterName: string) =>\n createPermission({\n name: `cost/${clusterName}`,\n attributes: { action: 'read' },\n });\n\n/** @public */\nexport const costClusterProjectPermission = (\n clusterName: string,\n projectName: string,\n) =>\n createPermission({\n name: `cost/${clusterName}/${projectName}`,\n attributes: { action: 'read' },\n });\n\n/** @public */\nexport const costPluginPermissions = [costPluginReadPermission];\n\n/** @public */\nexport const rosPluginPermissions = [rosPluginReadPermission];\n\n/** @public */\nexport const rosApplyPermissions = [rosApplyPermission];\n"],"names":[],"mappings":";;AAmBO,MAAM,0BAA0B,gBAAiB,CAAA;AAAA,EACtD,IAAM,EAAA,YAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGM,MAAM,qBAAqB,gBAAiB,CAAA;AAAA,EACjD,IAAM,EAAA,WAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,QAAS;AACjC,CAAC;AAGY,MAAA,4BAAA,GAA+B,CAAC,WAAA,KAC3C,gBAAiB,CAAA;AAAA,EACf,IAAA,EAAM,OAAO,WAAW,CAAA,CAAA;AAAA,EACxB,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGI,MAAM,2BAA8B,GAAA,CACzC,WACA,EAAA,WAAA,KAEA,gBAAiB,CAAA;AAAA,EACf,IAAM,EAAA,CAAA,IAAA,EAAO,WAAW,CAAA,CAAA,EAAI,WAAW,CAAA,CAAA;AAAA,EACvC,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGI,MAAM,2BAA2B,gBAAiB,CAAA;AAAA,EACvD,IAAM,EAAA,aAAA;AAAA,EACN,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGY,MAAA,6BAAA,GAAgC,CAAC,WAAA,KAC5C,gBAAiB,CAAA;AAAA,EACf,IAAA,EAAM,QAAQ,WAAW,CAAA,CAAA;AAAA,EACzB,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGI,MAAM,4BAA+B,GAAA,CAC1C,WACA,EAAA,WAAA,KAEA,gBAAiB,CAAA;AAAA,EACf,IAAM,EAAA,CAAA,KAAA,EAAQ,WAAW,CAAA,CAAA,EAAI,WAAW,CAAA,CAAA;AAAA,EACxC,UAAA,EAAY,EAAE,MAAA,EAAQ,MAAO;AAC/B,CAAC;AAGU,MAAA,qBAAA,GAAwB,CAAC,wBAAwB;AAGjD,MAAA,oBAAA,GAAuB,CAAC,uBAAuB;AAG/C,MAAA,mBAAA,GAAsB,CAAC,kBAAkB;;;;"}
|