@backstage-community/plugin-cost-insights 0.16.0 → 0.17.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/CHANGELOG.md +6 -0
- package/dist/alpha/plugin.esm.js +55 -0
- package/dist/alpha/plugin.esm.js.map +1 -0
- package/dist/alpha.d.ts +85 -0
- package/dist/alpha.esm.js +23 -0
- package/dist/alpha.esm.js.map +1 -0
- package/dist/plugin.esm.js +3 -11
- package/dist/plugin.esm.js.map +1 -1
- package/dist/routes.esm.js +14 -0
- package/dist/routes.esm.js.map +1 -0
- package/package.json +34 -14
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { PageBlueprint, NavItemBlueprint } from '@backstage/frontend-plugin-api';
|
|
3
|
+
import { convertLegacyRouteRef, compatWrapper } from '@backstage/core-compat-api';
|
|
4
|
+
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
|
5
|
+
import MoneyIcon from '@material-ui/icons/MonetizationOn';
|
|
6
|
+
import { rootRouteRef, projectGrowthAlertRef, unlabeledDataflowAlertRef } from '../routes.esm.js';
|
|
7
|
+
|
|
8
|
+
const CostInsightsPage = PageBlueprint.make({
|
|
9
|
+
params: {
|
|
10
|
+
defaultPath: "/cost-insights",
|
|
11
|
+
routeRef: convertLegacyRouteRef(rootRouteRef),
|
|
12
|
+
loader: () => import('../components/CostInsightsPage/index.esm.js').then(
|
|
13
|
+
(m) => compatWrapper(/* @__PURE__ */ jsx(m.CostInsightsPage, {}))
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const CostInsightsProjectGrowthInstructionsPage = PageBlueprint.make({
|
|
18
|
+
params: {
|
|
19
|
+
defaultPath: "/cost-insights/investigating-growth",
|
|
20
|
+
routeRef: convertLegacyRouteRef(projectGrowthAlertRef),
|
|
21
|
+
loader: () => import('../components/ProjectGrowthInstructionsPage/index.esm.js').then(
|
|
22
|
+
(m) => compatWrapper(/* @__PURE__ */ jsx(m.ProjectGrowthInstructionsPage, {}))
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const CostInsightsLabelDataflowInstructionsPage = PageBlueprint.make({
|
|
27
|
+
params: {
|
|
28
|
+
defaultPath: "/cost-insights/labeling-jobs",
|
|
29
|
+
routeRef: convertLegacyRouteRef(unlabeledDataflowAlertRef),
|
|
30
|
+
loader: () => import('../components/LabelDataflowInstructionsPage/index.esm.js').then(
|
|
31
|
+
(m) => compatWrapper(/* @__PURE__ */ jsx(m.LabelDataflowInstructionsPage, {}))
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const EntityCostInsightsContent = EntityContentBlueprint.make({
|
|
36
|
+
name: "EntityCostInsightsContent",
|
|
37
|
+
params: {
|
|
38
|
+
defaultPath: "/cost-insights",
|
|
39
|
+
defaultTitle: "Cost Insights",
|
|
40
|
+
routeRef: convertLegacyRouteRef(rootRouteRef),
|
|
41
|
+
loader: () => import('../components/EntityCosts/index.esm.js').then(
|
|
42
|
+
(m) => compatWrapper(/* @__PURE__ */ jsx(m.EntityCosts, {}))
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const CostInsightsNavItem = NavItemBlueprint.make({
|
|
47
|
+
params: {
|
|
48
|
+
title: "Cost Insights",
|
|
49
|
+
routeRef: convertLegacyRouteRef(rootRouteRef),
|
|
50
|
+
icon: MoneyIcon
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export { CostInsightsLabelDataflowInstructionsPage, CostInsightsNavItem, CostInsightsPage, CostInsightsProjectGrowthInstructionsPage, EntityCostInsightsContent };
|
|
55
|
+
//# sourceMappingURL=plugin.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\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 PageBlueprint,\n NavItemBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport MoneyIcon from '@material-ui/icons/MonetizationOn';\nimport {\n projectGrowthAlertRef,\n rootRouteRef,\n unlabeledDataflowAlertRef,\n} from '../routes';\n\n/** @alpha */\nexport const CostInsightsPage = PageBlueprint.make({\n params: {\n defaultPath: '/cost-insights',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('../components/CostInsightsPage').then(m =>\n compatWrapper(<m.CostInsightsPage />),\n ),\n },\n});\n\n/** @alpha */\nexport const CostInsightsProjectGrowthInstructionsPage = PageBlueprint.make({\n params: {\n defaultPath: '/cost-insights/investigating-growth',\n routeRef: convertLegacyRouteRef(projectGrowthAlertRef),\n loader: () =>\n import('../components/ProjectGrowthInstructionsPage').then(m =>\n compatWrapper(<m.ProjectGrowthInstructionsPage />),\n ),\n },\n});\n\n/** @alpha */\nexport const CostInsightsLabelDataflowInstructionsPage = PageBlueprint.make({\n params: {\n defaultPath: '/cost-insights/labeling-jobs',\n routeRef: convertLegacyRouteRef(unlabeledDataflowAlertRef),\n loader: () =>\n import('../components/LabelDataflowInstructionsPage').then(m =>\n compatWrapper(<m.LabelDataflowInstructionsPage />),\n ),\n },\n});\n\n/** @alpha */\nexport const EntityCostInsightsContent = EntityContentBlueprint.make({\n name: 'EntityCostInsightsContent',\n params: {\n defaultPath: '/cost-insights',\n defaultTitle: 'Cost Insights',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('../components/EntityCosts').then(m =>\n compatWrapper(<m.EntityCosts />),\n ),\n },\n});\n\n/**\n * @alpha\n */\nexport const CostInsightsNavItem = NavItemBlueprint.make({\n params: {\n title: 'Cost Insights',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n icon: MoneyIcon,\n },\n});\n"],"names":[],"mappings":";;;;;;;AAiCa,MAAA,gBAAA,GAAmB,cAAc,IAAK,CAAA;AAAA,EACjD,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,gBAAA;AAAA,IACb,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,MAAQ,EAAA,MACN,OAAO,6CAAgC,CAAE,CAAA,IAAA;AAAA,MAAK,OAC5C,aAAc,iBAAA,GAAA,CAAC,CAAE,CAAA,gBAAA,EAAF,EAAmB,CAAE;AAAA;AACtC;AAEN,CAAC;AAGY,MAAA,yCAAA,GAA4C,cAAc,IAAK,CAAA;AAAA,EAC1E,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,qCAAA;AAAA,IACb,QAAA,EAAU,sBAAsB,qBAAqB,CAAA;AAAA,IACrD,MAAQ,EAAA,MACN,OAAO,0DAA6C,CAAE,CAAA,IAAA;AAAA,MAAK,OACzD,aAAc,iBAAA,GAAA,CAAC,CAAE,CAAA,6BAAA,EAAF,EAAgC,CAAE;AAAA;AACnD;AAEN,CAAC;AAGY,MAAA,yCAAA,GAA4C,cAAc,IAAK,CAAA;AAAA,EAC1E,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,8BAAA;AAAA,IACb,QAAA,EAAU,sBAAsB,yBAAyB,CAAA;AAAA,IACzD,MAAQ,EAAA,MACN,OAAO,0DAA6C,CAAE,CAAA,IAAA;AAAA,MAAK,OACzD,aAAc,iBAAA,GAAA,CAAC,CAAE,CAAA,6BAAA,EAAF,EAAgC,CAAE;AAAA;AACnD;AAEN,CAAC;AAGY,MAAA,yBAAA,GAA4B,uBAAuB,IAAK,CAAA;AAAA,EACnE,IAAM,EAAA,2BAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,gBAAA;AAAA,IACb,YAAc,EAAA,eAAA;AAAA,IACd,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,MAAQ,EAAA,MACN,OAAO,wCAA2B,CAAE,CAAA,IAAA;AAAA,MAAK,OACvC,aAAc,iBAAA,GAAA,CAAC,CAAE,CAAA,WAAA,EAAF,EAAc,CAAE;AAAA;AACjC;AAEN,CAAC;AAKY,MAAA,mBAAA,GAAsB,iBAAiB,IAAK,CAAA;AAAA,EACvD,MAAQ,EAAA;AAAA,IACN,KAAO,EAAA,eAAA;AAAA,IACP,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,IAAM,EAAA;AAAA;AAEV,CAAC;;;;"}
|
package/dist/alpha.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
3
|
+
import * as _backstage_catalog_model from '@backstage/catalog-model';
|
|
4
|
+
import * as react from 'react';
|
|
5
|
+
import * as _backstage_plugin_catalog_react_alpha from '@backstage/plugin-catalog-react/alpha';
|
|
6
|
+
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
7
|
+
|
|
8
|
+
declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{
|
|
9
|
+
root: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
10
|
+
growthAlerts: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
11
|
+
unlabeledDataflowAlerts: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
12
|
+
}, {}, {
|
|
13
|
+
"entity-content:cost-insights/EntityCostInsightsContent": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
14
|
+
kind: "entity-content";
|
|
15
|
+
name: "EntityCostInsightsContent";
|
|
16
|
+
config: {
|
|
17
|
+
path: string | undefined;
|
|
18
|
+
title: string | undefined;
|
|
19
|
+
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
20
|
+
group: string | false | undefined;
|
|
21
|
+
};
|
|
22
|
+
configInput: {
|
|
23
|
+
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
24
|
+
title?: string | undefined;
|
|
25
|
+
path?: string | undefined;
|
|
26
|
+
group?: string | false | undefined;
|
|
27
|
+
};
|
|
28
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
|
|
29
|
+
optional: true;
|
|
30
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
31
|
+
optional: true;
|
|
32
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
33
|
+
optional: true;
|
|
34
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-group", {
|
|
35
|
+
optional: true;
|
|
36
|
+
}>;
|
|
37
|
+
inputs: {};
|
|
38
|
+
params: {
|
|
39
|
+
loader: () => Promise<JSX.Element>;
|
|
40
|
+
defaultPath: string;
|
|
41
|
+
defaultTitle: string;
|
|
42
|
+
defaultGroup?: (string & {}) | "overview" | "documentation" | "development" | "deployment" | "operation" | "observability" | undefined;
|
|
43
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
|
|
44
|
+
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
"nav-item:cost-insights": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
48
|
+
kind: "nav-item";
|
|
49
|
+
name: undefined;
|
|
50
|
+
config: {};
|
|
51
|
+
configInput: {};
|
|
52
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
|
|
53
|
+
title: string;
|
|
54
|
+
icon: _backstage_core_plugin_api.IconComponent;
|
|
55
|
+
routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
56
|
+
}, "core.nav-item.target", {}>;
|
|
57
|
+
inputs: {};
|
|
58
|
+
params: {
|
|
59
|
+
title: string;
|
|
60
|
+
icon: _backstage_core_plugin_api.IconComponent;
|
|
61
|
+
routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
62
|
+
};
|
|
63
|
+
}>;
|
|
64
|
+
"page:cost-insights": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
65
|
+
kind: "page";
|
|
66
|
+
name: undefined;
|
|
67
|
+
config: {
|
|
68
|
+
path: string | undefined;
|
|
69
|
+
};
|
|
70
|
+
configInput: {
|
|
71
|
+
path?: string | undefined;
|
|
72
|
+
};
|
|
73
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
|
|
74
|
+
optional: true;
|
|
75
|
+
}>;
|
|
76
|
+
inputs: {};
|
|
77
|
+
params: {
|
|
78
|
+
defaultPath: string;
|
|
79
|
+
loader: () => Promise<JSX.Element>;
|
|
80
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
|
|
81
|
+
};
|
|
82
|
+
}>;
|
|
83
|
+
}>;
|
|
84
|
+
|
|
85
|
+
export { _default as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { convertLegacyRouteRefs } from '@backstage/core-compat-api';
|
|
2
|
+
import { rootRouteRef, projectGrowthAlertRef, unlabeledDataflowAlertRef } from './routes.esm.js';
|
|
3
|
+
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
|
4
|
+
import { CostInsightsPage, CostInsightsProjectGrowthInstructionsPage, CostInsightsLabelDataflowInstructionsPage, EntityCostInsightsContent, CostInsightsNavItem } from './alpha/plugin.esm.js';
|
|
5
|
+
|
|
6
|
+
var alpha = createFrontendPlugin({
|
|
7
|
+
pluginId: "cost-insights",
|
|
8
|
+
extensions: [
|
|
9
|
+
CostInsightsPage,
|
|
10
|
+
CostInsightsProjectGrowthInstructionsPage,
|
|
11
|
+
CostInsightsLabelDataflowInstructionsPage,
|
|
12
|
+
EntityCostInsightsContent,
|
|
13
|
+
CostInsightsNavItem
|
|
14
|
+
],
|
|
15
|
+
routes: convertLegacyRouteRefs({
|
|
16
|
+
root: rootRouteRef,
|
|
17
|
+
growthAlerts: projectGrowthAlertRef,
|
|
18
|
+
unlabeledDataflowAlerts: unlabeledDataflowAlertRef
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export { alpha as default };
|
|
23
|
+
//# sourceMappingURL=alpha.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\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 { convertLegacyRouteRefs } from '@backstage/core-compat-api';\n\nimport {\n projectGrowthAlertRef,\n rootRouteRef,\n unlabeledDataflowAlertRef,\n} from './routes';\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport {\n CostInsightsLabelDataflowInstructionsPage,\n CostInsightsNavItem,\n CostInsightsPage,\n CostInsightsProjectGrowthInstructionsPage,\n EntityCostInsightsContent,\n} from './alpha/plugin';\n\nexport default createFrontendPlugin({\n pluginId: 'cost-insights',\n extensions: [\n CostInsightsPage,\n CostInsightsProjectGrowthInstructionsPage,\n CostInsightsLabelDataflowInstructionsPage,\n EntityCostInsightsContent,\n CostInsightsNavItem,\n ],\n routes: convertLegacyRouteRefs({\n root: rootRouteRef,\n growthAlerts: projectGrowthAlertRef,\n unlabeledDataflowAlerts: unlabeledDataflowAlertRef,\n }),\n});\n"],"names":[],"mappings":";;;;;AAgCA,YAAe,oBAAqB,CAAA;AAAA,EAClC,QAAU,EAAA,eAAA;AAAA,EACV,UAAY,EAAA;AAAA,IACV,gBAAA;AAAA,IACA,yCAAA;AAAA,IACA,yCAAA;AAAA,IACA,yBAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,IAAM,EAAA,YAAA;AAAA,IACN,YAAc,EAAA,qBAAA;AAAA,IACd,uBAAyB,EAAA;AAAA,GAC1B;AACH,CAAC,CAAA;;;;"}
|
package/dist/plugin.esm.js
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createPlugin, createRoutableExtension } from '@backstage/core-plugin-api';
|
|
2
|
+
import { rootRouteRef, projectGrowthAlertRef, unlabeledDataflowAlertRef } from './routes.esm.js';
|
|
2
3
|
|
|
3
|
-
const rootRouteRef = createRouteRef({
|
|
4
|
-
id: "cost-insights"
|
|
5
|
-
});
|
|
6
|
-
const projectGrowthAlertRef = createRouteRef({
|
|
7
|
-
id: "cost-insights:investigating-growth"
|
|
8
|
-
});
|
|
9
|
-
const unlabeledDataflowAlertRef = createRouteRef({
|
|
10
|
-
id: "cost-insights:labeling-jobs"
|
|
11
|
-
});
|
|
12
4
|
const costInsightsPlugin = createPlugin({
|
|
13
5
|
id: "cost-insights",
|
|
14
6
|
featureFlags: [{ name: "cost-insights-currencies" }],
|
|
@@ -51,5 +43,5 @@ const CostInsightsLabelDataflowInstructionsPage = costInsightsPlugin.provide(
|
|
|
51
43
|
})
|
|
52
44
|
);
|
|
53
45
|
|
|
54
|
-
export { CostInsightsLabelDataflowInstructionsPage, CostInsightsPage, CostInsightsProjectGrowthInstructionsPage, EntityCostInsightsContent, costInsightsPlugin
|
|
46
|
+
export { CostInsightsLabelDataflowInstructionsPage, CostInsightsPage, CostInsightsProjectGrowthInstructionsPage, EntityCostInsightsContent, costInsightsPlugin };
|
|
55
47
|
//# sourceMappingURL=plugin.esm.js.map
|
package/dist/plugin.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\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 createPlugin,\n
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\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 createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\nimport {\n projectGrowthAlertRef,\n rootRouteRef,\n unlabeledDataflowAlertRef,\n} from './routes';\n\n/** @public */\nexport const costInsightsPlugin = createPlugin({\n id: 'cost-insights',\n featureFlags: [{ name: 'cost-insights-currencies' }],\n routes: {\n root: rootRouteRef,\n growthAlerts: projectGrowthAlertRef,\n unlabeledDataflowAlerts: unlabeledDataflowAlertRef,\n },\n});\n\n/** @public */\nexport const CostInsightsPage = costInsightsPlugin.provide(\n createRoutableExtension({\n name: 'CostInsightsPage',\n component: () =>\n import('./components/CostInsightsPage').then(m => m.CostInsightsPage),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * An extension for displaying costs on an entity page.\n *\n * @public\n */\nexport const EntityCostInsightsContent = costInsightsPlugin.provide(\n createRoutableExtension({\n name: 'EntityCostInsightsContent',\n component: () =>\n import('./components/EntityCosts').then(m => m.EntityCosts),\n mountPoint: rootRouteRef,\n }),\n);\n\n/** @public */\nexport const CostInsightsProjectGrowthInstructionsPage =\n costInsightsPlugin.provide(\n createRoutableExtension({\n name: 'CostInsightsProjectGrowthInstructionsPage',\n component: () =>\n import('./components/ProjectGrowthInstructionsPage').then(\n m => m.ProjectGrowthInstructionsPage,\n ),\n mountPoint: projectGrowthAlertRef,\n }),\n );\n\n/** @public */\nexport const CostInsightsLabelDataflowInstructionsPage =\n costInsightsPlugin.provide(\n createRoutableExtension({\n name: 'CostInsightsLabelDataflowInstructionsPage',\n component: () =>\n import('./components/LabelDataflowInstructionsPage').then(\n m => m.LabelDataflowInstructionsPage,\n ),\n mountPoint: unlabeledDataflowAlertRef,\n }),\n );\n"],"names":[],"mappings":";;;AA2BO,MAAM,qBAAqB,YAAa,CAAA;AAAA,EAC7C,EAAI,EAAA,eAAA;AAAA,EACJ,YAAc,EAAA,CAAC,EAAE,IAAA,EAAM,4BAA4B,CAAA;AAAA,EACnD,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,YAAA;AAAA,IACN,YAAc,EAAA,qBAAA;AAAA,IACd,uBAAyB,EAAA;AAAA;AAE7B,CAAC;AAGM,MAAM,mBAAmB,kBAAmB,CAAA,OAAA;AAAA,EACjD,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,kBAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,4CAA+B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,gBAAgB,CAAA;AAAA,IACtE,UAAY,EAAA;AAAA,GACb;AACH;AAOO,MAAM,4BAA4B,kBAAmB,CAAA,OAAA;AAAA,EAC1D,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,2BAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,uCAA0B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,WAAW,CAAA;AAAA,IAC5D,UAAY,EAAA;AAAA,GACb;AACH;AAGO,MAAM,4CACX,kBAAmB,CAAA,OAAA;AAAA,EACjB,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,2CAAA;AAAA,IACN,SAAW,EAAA,MACT,OAAO,yDAA4C,CAAE,CAAA,IAAA;AAAA,MACnD,OAAK,CAAE,CAAA;AAAA,KACT;AAAA,IACF,UAAY,EAAA;AAAA,GACb;AACH;AAGK,MAAM,4CACX,kBAAmB,CAAA,OAAA;AAAA,EACjB,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,2CAAA;AAAA,IACN,SAAW,EAAA,MACT,OAAO,yDAA4C,CAAE,CAAA,IAAA;AAAA,MACnD,OAAK,CAAE,CAAA;AAAA,KACT;AAAA,IACF,UAAY,EAAA;AAAA,GACb;AACH;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createRouteRef } from '@backstage/core-plugin-api';
|
|
2
|
+
|
|
3
|
+
const rootRouteRef = createRouteRef({
|
|
4
|
+
id: "cost-insights"
|
|
5
|
+
});
|
|
6
|
+
const projectGrowthAlertRef = createRouteRef({
|
|
7
|
+
id: "cost-insights:investigating-growth"
|
|
8
|
+
});
|
|
9
|
+
const unlabeledDataflowAlertRef = createRouteRef({
|
|
10
|
+
id: "cost-insights:labeling-jobs"
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export { projectGrowthAlertRef, rootRouteRef, unlabeledDataflowAlertRef };
|
|
14
|
+
//# sourceMappingURL=routes.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\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 */\nimport { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'cost-insights',\n});\n\nexport const projectGrowthAlertRef = createRouteRef({\n id: 'cost-insights:investigating-growth',\n});\n\nexport const unlabeledDataflowAlertRef = createRouteRef({\n id: 'cost-insights:labeling-jobs',\n});\n"],"names":[],"mappings":";;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA;AACN,CAAC;AAEM,MAAM,wBAAwB,cAAe,CAAA;AAAA,EAClD,EAAI,EAAA;AACN,CAAC;AAEM,MAAM,4BAA4B,cAAe,CAAA;AAAA,EACtD,EAAI,EAAA;AACN,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-cost-insights",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "A Backstage plugin that helps you keep track of your cloud spend",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -8,12 +8,37 @@
|
|
|
8
8
|
"pluginPackages": [
|
|
9
9
|
"@backstage-community/plugin-cost-insights",
|
|
10
10
|
"@backstage-community/plugin-cost-insights-common"
|
|
11
|
-
]
|
|
11
|
+
],
|
|
12
|
+
"features": {
|
|
13
|
+
"./alpha": "@backstage/FrontendPlugin"
|
|
14
|
+
}
|
|
12
15
|
},
|
|
13
16
|
"publishConfig": {
|
|
14
|
-
"access": "public"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"import": "./dist/index.esm.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"default": "./dist/index.esm.js"
|
|
24
|
+
},
|
|
25
|
+
"./alpha": {
|
|
26
|
+
"backstage": "@backstage/FrontendPlugin",
|
|
27
|
+
"import": "./dist/alpha.esm.js",
|
|
28
|
+
"types": "./dist/alpha.d.ts",
|
|
29
|
+
"default": "./dist/alpha.esm.js"
|
|
30
|
+
},
|
|
31
|
+
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
"typesVersions": {
|
|
34
|
+
"*": {
|
|
35
|
+
"alpha": [
|
|
36
|
+
"dist/alpha.d.ts"
|
|
37
|
+
],
|
|
38
|
+
"package.json": [
|
|
39
|
+
"package.json"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
17
42
|
},
|
|
18
43
|
"keywords": [
|
|
19
44
|
"backstage"
|
|
@@ -26,8 +51,8 @@
|
|
|
26
51
|
},
|
|
27
52
|
"license": "Apache-2.0",
|
|
28
53
|
"sideEffects": false,
|
|
29
|
-
"main": "dist/index.esm.js",
|
|
30
|
-
"types": "dist/index.d.ts",
|
|
54
|
+
"main": "./dist/index.esm.js",
|
|
55
|
+
"types": "./dist/index.d.ts",
|
|
31
56
|
"files": [
|
|
32
57
|
"dist",
|
|
33
58
|
"config.d.ts"
|
|
@@ -45,8 +70,10 @@
|
|
|
45
70
|
"@backstage-community/plugin-cost-insights-common": "^0.5.0",
|
|
46
71
|
"@backstage/catalog-model": "^1.7.4",
|
|
47
72
|
"@backstage/config": "^1.3.2",
|
|
73
|
+
"@backstage/core-compat-api": "^0.4.3",
|
|
48
74
|
"@backstage/core-components": "^0.17.3",
|
|
49
75
|
"@backstage/core-plugin-api": "^1.10.8",
|
|
76
|
+
"@backstage/frontend-plugin-api": "^0.10.3",
|
|
50
77
|
"@backstage/plugin-catalog-react": "^1.19.0",
|
|
51
78
|
"@backstage/theme": "^0.6.6",
|
|
52
79
|
"@material-ui/core": "^4.12.2",
|
|
@@ -90,12 +117,5 @@
|
|
|
90
117
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
91
118
|
},
|
|
92
119
|
"configSchema": "config.d.ts",
|
|
93
|
-
"typesVersions": {
|
|
94
|
-
"*": {
|
|
95
|
-
"package.json": [
|
|
96
|
-
"package.json"
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
120
|
"module": "./dist/index.esm.js"
|
|
101
121
|
}
|