@backstage-community/plugin-cost-insights 0.18.0 → 0.19.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @backstage-community/plugin-cost-insights
2
2
 
3
+ ## 0.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ceeadd1: **ALPHA BREAKING** The New Frontend System `CostInsightsProjectGrowthInstructionsPage` and `CostInsightsLabelDataflowInstructionsPage` have been removed and the new frontend system support refactored to work in the same way as the current implementation.
8
+
3
9
  ## 0.18.0
4
10
 
5
11
  ### Minor Changes
@@ -1,43 +1,117 @@
1
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';
2
+ import { ApiBlueprint, createApiFactory, PageBlueprint, NavItemBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
3
+ import { convertLegacyRouteRef, compatWrapper, convertLegacyRouteRefs } from '@backstage/core-compat-api';
4
4
  import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
5
5
  import MoneyIcon from '@material-ui/icons/MonetizationOn';
6
- import { rootRouteRef, projectGrowthAlertRef, unlabeledDataflowAlertRef } from '../routes.esm.js';
6
+ import { rootRouteRef } from '../routes.esm.js';
7
+ import { costInsightsApiRef } from '../api/CostInsightsApi.esm.js';
8
+ import 'pluralize';
9
+ import '@material-ui/core/Typography';
10
+ import '@material-ui/core/Box';
11
+ import '@material-ui/core/styles';
12
+ import 'react';
13
+ import '@material-ui/core/Avatar';
14
+ import '@material-ui/core/Tooltip';
15
+ import '@material-ui/core/IconButton';
16
+ import '@material-ui/core/Badge';
17
+ import '@material-ui/core/Paper';
18
+ import '@material-ui/core/Divider';
19
+ import '@material-ui/icons/AccessTime';
20
+ import '@material-ui/icons/Check';
21
+ import '@material-ui/icons/Delete';
22
+ import 'classnames';
23
+ import '@material-ui/core/Card';
24
+ import '@material-ui/core/CardHeader';
25
+ import '../hooks/useConfig.esm.js';
26
+ import '../hooks/useCurrency.esm.js';
27
+ import '../hooks/useFilters.esm.js';
28
+ import '../hooks/useGroups.esm.js';
29
+ import '../hooks/useLoading.esm.js';
30
+ import '../hooks/useScroll.esm.js';
31
+ import '../hooks/useLastCompleteBillingDate.esm.js';
32
+ import '../utils/styles.esm.js';
33
+ import '../types/Alert.esm.js';
34
+ import '@material-ui/core/Grid';
35
+ import '@material-ui/core/Snackbar';
36
+ import '@material-ui/lab/Alert';
37
+ import '@material-ui/core/utils';
38
+ import '@material-ui/core/Button';
39
+ import '@material-ui/core/Dialog';
40
+ import '@material-ui/core/DialogActions';
41
+ import '@material-ui/core/DialogContent';
42
+ import '@material-ui/icons/Close';
43
+ import '../utils/alerts.esm.js';
44
+ import '@material-ui/core/Collapse';
45
+ import '@material-ui/icons/ExpandMore';
46
+ import '@material-ui/icons/Whatshot';
47
+ import '@material-ui/icons/Settings';
48
+ import '@material-ui/icons/AccountTree';
49
+ import '@material-ui/icons/Storage';
50
+ import '@material-ui/icons/Search';
51
+ import '@material-ui/icons/CloudQueue';
52
+ import '@material-ui/icons/School';
53
+ import '@material-ui/icons/ViewHeadline';
54
+ import '../utils/duration.esm.js';
55
+ import '../components/AlertInstructionsLayout/AlertInstructionsLayout.esm.js';
56
+ import 'recharts';
57
+ import '@material-ui/core/Slide';
58
+ import '@material-ui/icons/ChevronLeft';
59
+ import '@material-ui/icons/ChevronRight';
60
+ import '../components/BarChart/BarChartStepperButton.esm.js';
61
+ import '@material-ui/core/ButtonBase';
62
+ import '@material-ui/icons/Lens';
63
+ import 'luxon';
64
+ import '@material-ui/icons/HelpOutlineOutlined';
65
+ import 'react-router-dom';
66
+ import 'react-use/esm/useCopyToClipboard';
67
+ import '@material-ui/icons/AssignmentOutlined';
68
+ import '@material-ui/icons/AssignmentTurnedInOutlined';
69
+ import '@material-ui/icons/SentimentVeryDissatisfied';
70
+ import '../utils/currency.esm.js';
71
+ import '@material-ui/icons/ArrowDropUp';
72
+ import '@material-ui/icons/ArrowDropDown';
73
+ import 'react-use/esm/useAsync';
74
+ import '@backstage/core-plugin-api';
75
+ import '../components/CostInsightsLayout/CostInsightsLayout.esm.js';
76
+ import '../components/CostInsightsNavigation/CostInsightsNavigation.esm.js';
77
+ import '@material-ui/core/Container';
78
+ import '@material-ui/core/InputLabel';
79
+ import '@material-ui/core/Select';
80
+ import '@material-ui/core/FormControl';
81
+ import '@material-ui/core/MenuItem';
82
+ import '@material-ui/core/CardContent';
83
+ import '@material-ui/core/Tab';
84
+ import '@material-ui/core/Tabs';
85
+ import '@material-ui/core/styles/colorManipulator';
86
+ import '@material-ui/icons/Fullscreen';
87
+ import '@material-ui/core/CircularProgress';
88
+ import '@backstage/core-components';
89
+ import '@material-ui/core/Menu';
90
+ import '../components/ProjectGrowthInstructionsPage/ProjectGrowthInstructionsPage.esm.js';
91
+ import '../example/forms/KubernetesMigrationDismissForm.esm.js';
92
+ import { ExampleCostInsightsClient } from '../example/client.esm.js';
7
93
 
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({
94
+ const CostInsightsApi = ApiBlueprint.make({
18
95
  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
- )
96
+ factory: createApiFactory({
97
+ api: costInsightsApiRef,
98
+ deps: {},
99
+ factory: ({}) => new ExampleCostInsightsClient()
100
+ })
24
101
  }
25
102
  });
26
- const CostInsightsLabelDataflowInstructionsPage = PageBlueprint.make({
103
+ const CostInsightsPage = PageBlueprint.make({
27
104
  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
- )
105
+ defaultPath: "/cost-insights",
106
+ routeRef: convertLegacyRouteRef(rootRouteRef),
107
+ loader: () => import('./router.esm.js').then((m) => compatWrapper(/* @__PURE__ */ jsx(m.CostInsightsRouter, {})))
33
108
  }
34
109
  });
35
- const EntityCostInsightsContent = EntityContentBlueprint.make({
110
+ EntityContentBlueprint.make({
36
111
  name: "EntityCostInsightsContent",
37
112
  params: {
38
113
  defaultPath: "/cost-insights",
39
114
  defaultTitle: "Cost Insights",
40
- routeRef: convertLegacyRouteRef(rootRouteRef),
41
115
  loader: () => import('../components/EntityCosts/index.esm.js').then(
42
116
  (m) => compatWrapper(/* @__PURE__ */ jsx(m.EntityCosts, {}))
43
117
  )
@@ -50,6 +124,13 @@ const CostInsightsNavItem = NavItemBlueprint.make({
50
124
  icon: MoneyIcon
51
125
  }
52
126
  });
127
+ var plugin = createFrontendPlugin({
128
+ pluginId: "cost-insights",
129
+ extensions: [CostInsightsApi, CostInsightsPage, CostInsightsNavItem],
130
+ routes: convertLegacyRouteRefs({
131
+ root: rootRouteRef
132
+ })
133
+ });
53
134
 
54
- export { CostInsightsLabelDataflowInstructionsPage, CostInsightsNavItem, CostInsightsPage, CostInsightsProjectGrowthInstructionsPage, EntityCostInsightsContent };
135
+ export { CostInsightsApi, CostInsightsNavItem, CostInsightsPage, plugin as default };
55
136
  //# sourceMappingURL=plugin.esm.js.map
@@ -1 +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;;;;"}
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 createFrontendPlugin,\n ApiBlueprint,\n createApiFactory,\n} from '@backstage/frontend-plugin-api';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n convertLegacyRouteRefs,\n} from '@backstage/core-compat-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport MoneyIcon from '@material-ui/icons/MonetizationOn';\nimport { rootRouteRef } from '../routes';\nimport { costInsightsApiRef } from '../api';\nimport { ExampleCostInsightsClient } from '../example';\n\n/** @alpha */\nexport const CostInsightsApi = ApiBlueprint.make({\n params: {\n factory: createApiFactory({\n api: costInsightsApiRef,\n deps: {},\n factory: ({}) => new ExampleCostInsightsClient(),\n }),\n },\n});\n\n/** @alpha */\nexport const CostInsightsPage = PageBlueprint.make({\n params: {\n defaultPath: '/cost-insights',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('./router').then(m => compatWrapper(<m.CostInsightsRouter />)),\n },\n});\n\n/** @alpha */\nexport const EntityCostInsightsContent = EntityContentBlueprint.make({\n name: 'EntityCostInsightsContent',\n params: {\n defaultPath: '/cost-insights',\n defaultTitle: 'Cost Insights',\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\nexport default createFrontendPlugin({\n pluginId: 'cost-insights',\n extensions: [CostInsightsApi, CostInsightsPage, CostInsightsNavItem],\n routes: convertLegacyRouteRefs({\n root: rootRouteRef,\n }),\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCa,MAAA,eAAA,GAAkB,aAAa,IAAK,CAAA;AAAA,EAC/C,MAAQ,EAAA;AAAA,IACN,SAAS,gBAAiB,CAAA;AAAA,MACxB,GAAK,EAAA,kBAAA;AAAA,MACL,MAAM,EAAC;AAAA,MACP,OAAS,EAAA,CAAC,EAAC,KAAM,IAAI,yBAA0B;AAAA,KAChD;AAAA;AAEL,CAAC;AAGY,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,iBAAU,CAAE,CAAA,IAAA,CAAK,CAAK,CAAA,KAAA,aAAA,iBAAe,GAAA,CAAA,CAAA,CAAE,kBAAF,EAAA,EAAqB,CAAE,CAAC;AAAA;AAE1E,CAAC;AAGwC,uBAAuB,IAAK,CAAA;AAAA,EACnE,IAAM,EAAA,2BAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,gBAAA;AAAA,IACb,YAAc,EAAA,eAAA;AAAA,IACd,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;AAED,aAAe,oBAAqB,CAAA;AAAA,EAClC,QAAU,EAAA,eAAA;AAAA,EACV,UAAY,EAAA,CAAC,eAAiB,EAAA,gBAAA,EAAkB,mBAAmB,CAAA;AAAA,EACnE,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,IAAM,EAAA;AAAA,GACP;AACH,CAAC,CAAA;;;;"}
@@ -0,0 +1,120 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { createSubRouteRef } from '@backstage/core-plugin-api';
3
+ import { Routes, Route } from 'react-router-dom';
4
+ import { rootRouteRef } from '../routes.esm.js';
5
+ import 'react';
6
+ import '@material-ui/core/Avatar';
7
+ import '@material-ui/core/Tooltip';
8
+ import '@material-ui/core/IconButton';
9
+ import '@material-ui/core/Badge';
10
+ import '@material-ui/core/Box';
11
+ import '@material-ui/core/Paper';
12
+ import '@material-ui/core/Divider';
13
+ import '@material-ui/icons/AccessTime';
14
+ import '@material-ui/icons/Check';
15
+ import '@material-ui/icons/Delete';
16
+ import 'classnames';
17
+ import '@material-ui/core/Card';
18
+ import '@material-ui/core/CardHeader';
19
+ import '../hooks/useConfig.esm.js';
20
+ import '../hooks/useCurrency.esm.js';
21
+ import '../hooks/useFilters.esm.js';
22
+ import '../hooks/useGroups.esm.js';
23
+ import '../hooks/useLoading.esm.js';
24
+ import '../hooks/useScroll.esm.js';
25
+ import '../hooks/useLastCompleteBillingDate.esm.js';
26
+ import '../utils/styles.esm.js';
27
+ import '../types/Alert.esm.js';
28
+ import 'pluralize';
29
+ import '@material-ui/core/Grid';
30
+ import '@material-ui/core/Snackbar';
31
+ import '@material-ui/lab/Alert';
32
+ import '@material-ui/core/utils';
33
+ import '@material-ui/core/Button';
34
+ import '@material-ui/core/Dialog';
35
+ import '@material-ui/core/DialogActions';
36
+ import '@material-ui/core/DialogContent';
37
+ import '@material-ui/core/Typography';
38
+ import '@material-ui/icons/Close';
39
+ import '../utils/alerts.esm.js';
40
+ import '@material-ui/core/Collapse';
41
+ import '@material-ui/icons/ExpandMore';
42
+ import '@material-ui/icons/MonetizationOn';
43
+ import '@material-ui/icons/Whatshot';
44
+ import '@material-ui/icons/Settings';
45
+ import '@material-ui/icons/AccountTree';
46
+ import '@material-ui/icons/Storage';
47
+ import '@material-ui/icons/Search';
48
+ import '@material-ui/icons/CloudQueue';
49
+ import '@material-ui/icons/School';
50
+ import '@material-ui/icons/ViewHeadline';
51
+ import '../utils/duration.esm.js';
52
+ import '../components/AlertInstructionsLayout/AlertInstructionsLayout.esm.js';
53
+ import 'recharts';
54
+ import '@material-ui/core/styles';
55
+ import '@material-ui/core/Slide';
56
+ import '@material-ui/icons/ChevronLeft';
57
+ import '@material-ui/icons/ChevronRight';
58
+ import '../components/BarChart/BarChartStepperButton.esm.js';
59
+ import '@material-ui/core/ButtonBase';
60
+ import '@material-ui/icons/Lens';
61
+ import 'luxon';
62
+ import '@material-ui/icons/HelpOutlineOutlined';
63
+ import 'react-use/esm/useCopyToClipboard';
64
+ import '@material-ui/icons/AssignmentOutlined';
65
+ import '@material-ui/icons/AssignmentTurnedInOutlined';
66
+ import '@material-ui/icons/SentimentVeryDissatisfied';
67
+ import '../utils/currency.esm.js';
68
+ import '@material-ui/icons/ArrowDropUp';
69
+ import '@material-ui/icons/ArrowDropDown';
70
+ import 'react-use/esm/useAsync';
71
+ import '../components/CostInsightsLayout/CostInsightsLayout.esm.js';
72
+ import '../components/CostInsightsNavigation/CostInsightsNavigation.esm.js';
73
+ import { CostInsightsPageRoot } from '../components/CostInsightsPage/CostInsightsPageRoot.esm.js';
74
+ import '@backstage/core-components';
75
+ import '@material-ui/core/Menu';
76
+ import '@material-ui/core/MenuItem';
77
+ import '@material-ui/core/Tab';
78
+ import '@material-ui/core/Tabs';
79
+ import '@material-ui/core/CardContent';
80
+ import '@material-ui/core/styles/colorManipulator';
81
+ import '@material-ui/icons/Fullscreen';
82
+ import '@material-ui/core/InputLabel';
83
+ import '@material-ui/core/FormControl';
84
+ import '@material-ui/core/Select';
85
+ import { LabelDataflowInstructionsPage } from '../components/LabelDataflowInstructionsPage/LabelDataflowInstructionsPage.esm.js';
86
+ import '../api/CostInsightsApi.esm.js';
87
+ import '@material-ui/core/CircularProgress';
88
+ import { ProjectGrowthInstructionsPage } from '../components/ProjectGrowthInstructionsPage/ProjectGrowthInstructionsPage.esm.js';
89
+ import '@material-ui/core/Container';
90
+
91
+ const projectGrowthAlertSubRouteRef = createSubRouteRef({
92
+ id: "cost-insights/investigating-growth",
93
+ parent: rootRouteRef,
94
+ path: "/investigating-growth"
95
+ });
96
+ const unlabeledDataflowAlertSubRouteRef = createSubRouteRef({
97
+ id: "cost-insights/labeling-jobs",
98
+ parent: rootRouteRef,
99
+ path: "/labeling-jobs"
100
+ });
101
+ const CostInsightsRouter = () => /* @__PURE__ */ jsxs(Routes, { children: [
102
+ /* @__PURE__ */ jsx(Route, { path: "/", element: /* @__PURE__ */ jsx(CostInsightsPageRoot, {}) }),
103
+ /* @__PURE__ */ jsx(
104
+ Route,
105
+ {
106
+ path: projectGrowthAlertSubRouteRef.path,
107
+ element: /* @__PURE__ */ jsx(ProjectGrowthInstructionsPage, {})
108
+ }
109
+ ),
110
+ /* @__PURE__ */ jsx(
111
+ Route,
112
+ {
113
+ path: unlabeledDataflowAlertSubRouteRef.path,
114
+ element: /* @__PURE__ */ jsx(LabelDataflowInstructionsPage, {})
115
+ }
116
+ )
117
+ ] });
118
+
119
+ export { CostInsightsRouter, projectGrowthAlertSubRouteRef, unlabeledDataflowAlertSubRouteRef };
120
+ //# sourceMappingURL=router.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.esm.js","sources":["../../src/alpha/router.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 { createSubRouteRef } from '@backstage/core-plugin-api';\nimport { Route, Routes } from 'react-router-dom';\nimport { rootRouteRef } from '../routes';\nimport {\n CostInsightsPage,\n LabelDataflowInstructionsPage,\n ProjectGrowthInstructionsPage,\n} from '../components';\n\nexport const projectGrowthAlertSubRouteRef = createSubRouteRef({\n id: 'cost-insights/investigating-growth',\n parent: rootRouteRef,\n path: '/investigating-growth',\n});\n\nexport const unlabeledDataflowAlertSubRouteRef = createSubRouteRef({\n id: 'cost-insights/labeling-jobs',\n parent: rootRouteRef,\n path: '/labeling-jobs',\n});\n\nexport const CostInsightsRouter = () => (\n <Routes>\n <Route path=\"/\" element={<CostInsightsPage />} />\n <Route\n path={projectGrowthAlertSubRouteRef.path}\n element={<ProjectGrowthInstructionsPage />}\n />\n <Route\n path={unlabeledDataflowAlertSubRouteRef.path}\n element={<LabelDataflowInstructionsPage />}\n />\n </Routes>\n);\n"],"names":["CostInsightsPage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBO,MAAM,gCAAgC,iBAAkB,CAAA;AAAA,EAC7D,EAAI,EAAA,oCAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEM,MAAM,oCAAoC,iBAAkB,CAAA;AAAA,EACjE,EAAI,EAAA,6BAAA;AAAA,EACJ,MAAQ,EAAA,YAAA;AAAA,EACR,IAAM,EAAA;AACR,CAAC;AAEY,MAAA,kBAAA,GAAqB,sBAChC,IAAA,CAAC,MACC,EAAA,EAAA,QAAA,EAAA;AAAA,kBAAA,GAAA,CAAC,SAAM,IAAK,EAAA,GAAA,EAAI,OAAS,kBAAA,GAAA,CAACA,wBAAiB,CAAI,EAAA,CAAA;AAAA,kBAC/C,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,MAAM,6BAA8B,CAAA,IAAA;AAAA,MACpC,OAAA,sBAAU,6BAA8B,EAAA,EAAA;AAAA;AAAA,GAC1C;AAAA,kBACA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,MAAM,iCAAkC,CAAA,IAAA;AAAA,MACxC,OAAA,sBAAU,6BAA8B,EAAA,EAAA;AAAA;AAAA;AAC1C,CACF,EAAA;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,47 +1,20 @@
1
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
2
  import * as react from 'react';
5
- import * as _backstage_plugin_catalog_react_alpha from '@backstage/plugin-catalog-react/alpha';
6
3
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
4
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
7
5
 
8
6
  declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{
9
7
  root: _backstage_frontend_plugin_api.RouteRef<undefined>;
10
- growthAlerts: _backstage_frontend_plugin_api.RouteRef<undefined>;
11
- unlabeledDataflowAlerts: _backstage_frontend_plugin_api.RouteRef<undefined>;
12
8
  }, {}, {
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
- }>;
9
+ "api:cost-insights": _backstage_frontend_plugin_api.ExtensionDefinition<{
10
+ kind: "api";
11
+ name: undefined;
12
+ config: {};
13
+ configInput: {};
14
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_core_plugin_api.AnyApiFactory, "core.api.factory", {}>;
37
15
  inputs: {};
38
16
  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;
17
+ factory: _backstage_core_plugin_api.AnyApiFactory;
45
18
  };
46
19
  }>;
47
20
  "nav-item:cost-insights": _backstage_frontend_plugin_api.ExtensionDefinition<{
package/dist/alpha.esm.js CHANGED
@@ -1,23 +1,2 @@
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 };
1
+ export { default } from './alpha/plugin.esm.js';
23
2
  //# sourceMappingURL=alpha.esm.js.map
@@ -1 +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;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-cost-insights",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "A Backstage plugin that helps you keep track of your cloud spend",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",