@spotify/backstage-plugin-soundcheck 0.14.0 → 0.14.2
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 +34 -8
- package/alpha/package.json +1 -1
- package/dist/alpha/apis.esm.js +1 -1
- package/dist/alpha/entity-content.esm.js +1 -1
- package/dist/alpha/pages.esm.js +1 -1
- package/dist/alpha/plugin.esm.js +1 -1
- package/dist/alpha/sidebar-item.esm.js +1 -1
- package/dist/alpha.d.ts +150 -1
- package/dist/api.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignOwnerField.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignListPage/CampaignListPage.esm.js +1 -1
- package/dist/components/CertificationSidebar/Check.esm.js +1 -1
- package/dist/components/CertificationSidebar/CheckResultSummaryList.esm.js +1 -1
- package/dist/components/CheckDetails/CheckDetails.esm.js +1 -1
- package/dist/components/CheckDetails/CollapseRow.esm.js +2 -0
- package/dist/components/CheckDetails/FixMeDialog.esm.js +2 -0
- package/dist/components/CheckDetails/OngoingTaskComponent.esm.js +2 -0
- package/dist/components/CheckDetails/ResultStateBox.esm.js +1 -1
- package/dist/components/CheckDetails/ReviewStateComponent.esm.js +2 -0
- package/dist/components/CheckDryRun/CheckDryRunDetails.esm.js +1 -1
- package/dist/components/CheckForm/CheckForm.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/TeamDetailsInput/TeamDetailsInput.esm.js +1 -1
- package/dist/components/CheckPage/CheckEntitiesTable/CheckEntitiesTable.esm.js +1 -1
- package/dist/components/CheckPage/CheckInsightsPage.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusHistoryChart.esm.js +1 -1
- package/dist/components/CheckPage/FilterBar/FilterBar.esm.js +1 -1
- package/dist/components/CheckTemplatesPage/CheckTemplatesPage.esm.js +1 -1
- package/dist/components/CheckTemplatesPage/TemplateCategory.esm.js +1 -1
- package/dist/components/ChecksPage/CheckListPage/CheckListPage.esm.js +1 -1
- package/dist/components/ChecksPage/CheckListPage/CheckSummaryCard.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Configurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/GithubConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Gitlab/GitlabConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Gitlab/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/NewRelic/NewRelicConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/NewRelic/utils.esm.js +2 -0
- package/dist/components/CollectorsPage/CollectorListPage/CollectorLogo.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorListPage/CollectorSummaryCard.esm.js +1 -1
- package/dist/components/EntityContent/EntityContent.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorer.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorerContext.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorerDialog.esm.js +1 -1
- package/dist/components/FormControlledAutocomplete/ControlledAutocomplete.esm.js +1 -1
- package/dist/components/FormFieldLabel/FormFieldLabel.esm.js +1 -1
- package/dist/components/GroupSelector/GroupSelector.esm.js +1 -1
- package/dist/components/OverviewPage/CampaignBanner/CampaignArea.esm.js +2 -0
- package/dist/components/OverviewPage/OverviewPage.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPageContent.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPageHeader.esm.js +2 -0
- package/dist/components/OverviewPage/index.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/CheckCellTooltip.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/CheckLabelCell.esm.js +2 -0
- package/dist/components/OverviewTable/Cell/EntityRefCell.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/HighestLevelBadge.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/TrackLevelHeaderCell.esm.js +1 -1
- package/dist/components/OverviewTable/Cell/cellRenderer.esm.js +1 -1
- package/dist/components/OverviewTable/OverviewTable.esm.js +1 -1
- package/dist/components/OverviewTable/ResultsTable.esm.js +1 -1
- package/dist/components/OverviewTable/ResultsTableRow.esm.js +1 -1
- package/dist/components/Router.esm.js +1 -1
- package/dist/components/RoutingPage/RoutingPage.esm.js +1 -1
- package/dist/components/SoundcheckHeader/SoundcheckHeader.esm.js +1 -1
- package/dist/components/SoundcheckHeader/SoundcheckHeaderContext.esm.js +1 -1
- package/dist/components/SoundcheckHeader/headerUtil.esm.js +1 -1
- package/dist/components/SoundcheckHeader/useHeader.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackOwnerSelect/TrackOwnerSelect.esm.js +1 -1
- package/dist/components/TrackPage/FilterBar/FilterBar.esm.js +1 -1
- package/dist/components/TrackPage/TrackPage.esm.js +1 -1
- package/dist/components/TracksPage/TrackListPage/TrackListPage.esm.js +1 -1
- package/dist/contexts/UserProvider.esm.js +1 -1
- package/dist/graphql/generated/index.esm.js +39 -30
- package/dist/hooks/aggregations/useAggregatedTrackPassRateTrend.esm.js +1 -1
- package/dist/hooks/catalog/useGetEntityRefs.esm.js +1 -1
- package/dist/hooks/certifications/useProgramOverviewForOwner.esm.js +1 -1
- package/dist/hooks/checks/useCreateCheck.esm.js +1 -1
- package/dist/hooks/checks/useDeleteCheck.esm.js +1 -1
- package/dist/hooks/checks/useExecutableChecks.esm.js +2 -0
- package/dist/hooks/checks/useGetChecks.esm.js +1 -1
- package/dist/hooks/checks/useUpdateCheck.esm.js +1 -1
- package/dist/hooks/graphqlKeys.esm.js +1 -1
- package/dist/hooks/groups/useGroupOptions.esm.js +2 -0
- package/dist/images/new-relic-rgb.svg +1 -0
- package/dist/images/new-relic-white.svg +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/utils/filters.esm.js +1 -1
- package/package.json +24 -20
- package/dist/components/GroupSelector/useOptions.esm.js +0 -2
- package/dist/components/OverviewPage/OverviewTabs.esm.js +0 -2
- package/dist/components/OverviewPage/OverviewTabsSkeleton.esm.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @spotify/backstage-plugin-soundcheck
|
|
2
2
|
|
|
3
|
+
## 0.14.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added No Code UI configuration option for GitLab Fact Collector.
|
|
8
|
+
- Add all groups to track and check insights filter selection.
|
|
9
|
+
- View is now the primary action for checks rather than edit.
|
|
10
|
+
- Custom default title for the header bar can now be set via the title property of the RoutingPage.
|
|
11
|
+
- Added No Code UI configuration option for New Relic Fact Collector.
|
|
12
|
+
- Soundcheck will now only enable the execute check buttons for checks that it can actually execute.
|
|
13
|
+
- Update to Backstage v1.32.0
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @spotify/backstage-plugin-soundcheck-common@0.14.2
|
|
16
|
+
- @spotify/backstage-plugin-core@0.8.2
|
|
17
|
+
|
|
18
|
+
## 0.14.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Update to Backstage v1.31.1
|
|
23
|
+
- Minor fixes and improvements
|
|
24
|
+
- Replaces tabs on the Soundcheck overview page with selection based navigation including a basic entity name search function.
|
|
25
|
+
- Adjust Soundcheck header styling to show up better on certain backgrounds.
|
|
26
|
+
- Check Insights page's History chart now includes date labels on the X-axis.
|
|
27
|
+
- Making Fact Explorer Dialog aware of selected check filters and limiting the max number of entities it loads by default.
|
|
28
|
+
- Fixed standalone Soundcheck overview page by removing campaign headers for non SoundcheckRoutingPage usages.
|
|
29
|
+
- Campaign page will filter by status active by default.
|
|
30
|
+
- Resolved an issue with searching for campaigns, checks, and tracks by name.
|
|
31
|
+
- Fix issue with sorting entities on the check insights page.
|
|
32
|
+
- Add pivot function to overview table to flip x and y axis.
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
- @spotify/backstage-plugin-core@0.8.1
|
|
35
|
+
- @spotify/backstage-plugin-soundcheck-common@0.14.1
|
|
36
|
+
|
|
3
37
|
## 0.14.0
|
|
4
38
|
|
|
5
39
|
### Minor Changes
|
|
@@ -342,10 +376,6 @@
|
|
|
342
376
|
- Fixed an issue with the loading state of the library pages in Soundcheck.
|
|
343
377
|
- Add loading indicator to overview page.
|
|
344
378
|
- Editable Collectors are now linkable via the following url structure `/collectors/:collectorId`.
|
|
345
|
-
- Updated dependencies
|
|
346
|
-
- Updated dependencies
|
|
347
|
-
- Updated dependencies
|
|
348
|
-
- Updated dependencies
|
|
349
379
|
- Updated dependencies
|
|
350
380
|
- @spotify/backstage-plugin-soundcheck-common@0.11.0
|
|
351
381
|
- @spotify/backstage-plugin-core@0.5.9
|
|
@@ -366,10 +396,6 @@
|
|
|
366
396
|
- Bug fix for switching to the card view on the Tech Health Checks tab.
|
|
367
397
|
- Checks created through the UI now properly support boolean values.
|
|
368
398
|
- Resolved an issue that could prevent filters from being applied to Github fact collections configured through the UI.
|
|
369
|
-
- Updated dependencies
|
|
370
|
-
- Updated dependencies
|
|
371
|
-
- Updated dependencies
|
|
372
|
-
- Updated dependencies
|
|
373
399
|
- Updated dependencies
|
|
374
400
|
- @spotify/backstage-plugin-soundcheck-common@0.10.0
|
|
375
401
|
|
package/alpha/package.json
CHANGED
package/dist/alpha/apis.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ApiBlueprint as p,createApiFactory as c,discoveryApiRef as i,fetchApiRef as o}from"@backstage/frontend-plugin-api";import{soundcheckApiRef as r,SoundcheckApi as t}from"../api.esm.js";const f=p.make({params:{factory:c({api:r,deps:{discoveryApi:i,fetchApi:o},factory:e=>new t(e)})}});export{f as soundcheckApi};
|
|
2
2
|
//# sourceMappingURL=apis.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{convertLegacyRouteRef as n,compatWrapper as t}from"@backstage/core-compat-api";import{
|
|
1
|
+
import{convertLegacyRouteRef as n,compatWrapper as t}from"@backstage/core-compat-api";import{EntityContentBlueprint as a,EntityCardBlueprint as r}from"@backstage/plugin-catalog-react/alpha";import o from"react";import{entityRootRouteRef as c,groupRootRouteRef as u}from"../routes.esm.js";const i=a.make({name:"entity",params:{defaultPath:"soundcheck",defaultTitle:"Soundcheck",routeRef:n(c),loader:()=>import("../components/EntitySoundcheckContent.esm.js").then(e=>t(o.createElement(e.EntitySoundcheckContent,null)))}}),m=r.make({name:"card",params:{loader:()=>import("../components/EntitySoundcheckCard/index.esm.js").then(e=>t(o.createElement(e.EntitySoundcheckCard,null)))}}),d=a.make({name:"group",attachTo:{id:"page:catalog/group-details",input:"contents"},params:{defaultPath:"soundcheck",defaultTitle:"Soundcheck",routeRef:n(u),loader:()=>import("../components/OverviewPage/index.esm.js").then(e=>t(o.createElement(e.FixedGroupOverviewPage,null)))}});export{m as entitySoundcheckCard,i as entitySoundcheckContent,d as groupSoundcheckContent};
|
|
2
2
|
//# sourceMappingURL=entity-content.esm.js.map
|
package/dist/alpha/pages.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{convertLegacyRouteRef as o,compatWrapper as t}from"@backstage/core-compat-api";import{
|
|
1
|
+
import{convertLegacyRouteRef as o,compatWrapper as t}from"@backstage/core-compat-api";import{PageBlueprint as r}from"@backstage/frontend-plugin-api";import a from"react";import{rootRouteRef as m}from"../routes.esm.js";const n=r.make({name:"SoundcheckRoutingPage",params:{routeRef:o(m),defaultPath:"/soundcheck",loader:()=>import("../components/RoutingPage/index.esm.js").then(e=>t(a.createElement(e.RoutingPage,null)))}}),u=r.make({name:"overview",params:{routeRef:o(m),defaultPath:"/soundcheck",loader:()=>import("../components/OverviewPage/index.esm.js").then(e=>t(a.createElement(e.OverviewPage,null)))}});export{u as soundcheckOverviewPage,n as soundcheckRoutingPage};
|
|
2
2
|
//# sourceMappingURL=pages.esm.js.map
|
package/dist/alpha/plugin.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createFrontendPlugin as e}from"@backstage/frontend-plugin-api";import{soundcheckApi as o}from"./apis.esm.js";import{entitySoundcheckContent as n,entitySoundcheckCard as t,groupSoundcheckContent as r}from"./entity-content.esm.js";import{soundcheckRoutingPage as c,soundcheckOverviewPage as i}from"./pages.esm.js";import{soundcheckSidebarItem as d}from"./sidebar-item.esm.js";var u=e({id:"soundcheck",extensions:[c,i,o,n,t,r,d]});export{u as default};
|
|
2
2
|
//# sourceMappingURL=plugin.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{convertLegacyRouteRef as o}from"@backstage/core-compat-api";import{
|
|
1
|
+
import{convertLegacyRouteRef as o}from"@backstage/core-compat-api";import{NavItemBlueprint as e}from"@backstage/frontend-plugin-api";import t from"@material-ui/icons/DoneAll";import{rootRouteRef as r}from"../routes.esm.js";const m=e.make({params:{title:"Soundcheck",icon:t,routeRef:o(r)}});export{m as soundcheckSidebarItem};
|
|
2
2
|
//# sourceMappingURL=sidebar-item.esm.js.map
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,10 +1,159 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as _backstage_catalog_model from '@backstage/catalog-model';
|
|
3
|
+
import * as react from 'react';
|
|
1
4
|
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
5
|
+
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
2
6
|
|
|
3
7
|
/**
|
|
4
8
|
* @public
|
|
5
9
|
**
|
|
6
10
|
* The Soundcheck plugin for use within Backstage´s new frontend system
|
|
7
11
|
*/
|
|
8
|
-
declare const _default: _backstage_frontend_plugin_api.
|
|
12
|
+
declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
13
|
+
"api:soundcheck": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
14
|
+
kind: "api";
|
|
15
|
+
name: undefined;
|
|
16
|
+
config: {};
|
|
17
|
+
configInput: {};
|
|
18
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_core_plugin_api.AnyApiFactory, "core.api.factory", {}>;
|
|
19
|
+
inputs: {};
|
|
20
|
+
params: {
|
|
21
|
+
factory: _backstage_core_plugin_api.AnyApiFactory;
|
|
22
|
+
};
|
|
23
|
+
}>;
|
|
24
|
+
"entity-content:soundcheck/entity": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
25
|
+
kind: "entity-content";
|
|
26
|
+
name: "entity";
|
|
27
|
+
config: {
|
|
28
|
+
path: string | undefined;
|
|
29
|
+
title: string | undefined;
|
|
30
|
+
filter: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
configInput: {
|
|
33
|
+
filter?: string | undefined;
|
|
34
|
+
title?: string | undefined;
|
|
35
|
+
path?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
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", {
|
|
38
|
+
optional: true;
|
|
39
|
+
}> | _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", {
|
|
40
|
+
optional: true;
|
|
41
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
42
|
+
optional: true;
|
|
43
|
+
}>;
|
|
44
|
+
inputs: {};
|
|
45
|
+
params: {
|
|
46
|
+
loader: () => Promise<JSX.Element>;
|
|
47
|
+
defaultPath: string;
|
|
48
|
+
defaultTitle: string;
|
|
49
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
|
|
50
|
+
filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
|
|
51
|
+
};
|
|
52
|
+
}>;
|
|
53
|
+
"nav-item:soundcheck": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
54
|
+
kind: "nav-item";
|
|
55
|
+
name: undefined;
|
|
56
|
+
config: {};
|
|
57
|
+
configInput: {};
|
|
58
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
|
|
59
|
+
title: string;
|
|
60
|
+
icon: _backstage_core_plugin_api.IconComponent;
|
|
61
|
+
routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
62
|
+
}, "core.nav-item.target", {}>;
|
|
63
|
+
inputs: {};
|
|
64
|
+
params: {
|
|
65
|
+
title: string;
|
|
66
|
+
icon: _backstage_core_plugin_api.IconComponent;
|
|
67
|
+
routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
68
|
+
};
|
|
69
|
+
}>;
|
|
70
|
+
"entity-card:soundcheck/card": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
71
|
+
kind: "entity-card";
|
|
72
|
+
name: "card";
|
|
73
|
+
config: {
|
|
74
|
+
filter: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
configInput: {
|
|
77
|
+
filter?: string | undefined;
|
|
78
|
+
};
|
|
79
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
80
|
+
optional: true;
|
|
81
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
82
|
+
optional: true;
|
|
83
|
+
}>;
|
|
84
|
+
inputs: {};
|
|
85
|
+
params: {
|
|
86
|
+
loader: () => Promise<JSX.Element>;
|
|
87
|
+
filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
|
|
88
|
+
};
|
|
89
|
+
}>;
|
|
90
|
+
"entity-content:soundcheck/group": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
91
|
+
kind: "entity-content";
|
|
92
|
+
name: "group";
|
|
93
|
+
config: {
|
|
94
|
+
path: string | undefined;
|
|
95
|
+
title: string | undefined;
|
|
96
|
+
filter: string | undefined;
|
|
97
|
+
};
|
|
98
|
+
configInput: {
|
|
99
|
+
filter?: string | undefined;
|
|
100
|
+
title?: string | undefined;
|
|
101
|
+
path?: string | undefined;
|
|
102
|
+
};
|
|
103
|
+
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", {
|
|
104
|
+
optional: true;
|
|
105
|
+
}> | _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", {
|
|
106
|
+
optional: true;
|
|
107
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
108
|
+
optional: true;
|
|
109
|
+
}>;
|
|
110
|
+
inputs: {};
|
|
111
|
+
params: {
|
|
112
|
+
loader: () => Promise<JSX.Element>;
|
|
113
|
+
defaultPath: string;
|
|
114
|
+
defaultTitle: string;
|
|
115
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
|
|
116
|
+
filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
|
|
117
|
+
};
|
|
118
|
+
}>;
|
|
119
|
+
"page:soundcheck/SoundcheckRoutingPage": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
120
|
+
kind: "page";
|
|
121
|
+
name: "SoundcheckRoutingPage";
|
|
122
|
+
config: {
|
|
123
|
+
path: string | undefined;
|
|
124
|
+
};
|
|
125
|
+
configInput: {
|
|
126
|
+
path?: string | undefined;
|
|
127
|
+
};
|
|
128
|
+
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", {
|
|
129
|
+
optional: true;
|
|
130
|
+
}>;
|
|
131
|
+
inputs: {};
|
|
132
|
+
params: {
|
|
133
|
+
defaultPath: string;
|
|
134
|
+
loader: () => Promise<JSX.Element>;
|
|
135
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
|
|
136
|
+
};
|
|
137
|
+
}>;
|
|
138
|
+
"page:soundcheck/overview": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
139
|
+
kind: "page";
|
|
140
|
+
name: "overview";
|
|
141
|
+
config: {
|
|
142
|
+
path: string | undefined;
|
|
143
|
+
};
|
|
144
|
+
configInput: {
|
|
145
|
+
path?: string | undefined;
|
|
146
|
+
};
|
|
147
|
+
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", {
|
|
148
|
+
optional: true;
|
|
149
|
+
}>;
|
|
150
|
+
inputs: {};
|
|
151
|
+
params: {
|
|
152
|
+
defaultPath: string;
|
|
153
|
+
loader: () => Promise<JSX.Element>;
|
|
154
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
|
|
155
|
+
};
|
|
156
|
+
}>;
|
|
157
|
+
}>;
|
|
9
158
|
|
|
10
159
|
export { _default as default };
|
package/dist/api.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createApiRef as
|
|
1
|
+
import{createApiRef as c}from"@backstage/core-plugin-api";import{GraphQLClient as h}from"graphql-request";import{getSdk as u}from"./graphql/generated/index.esm.js";const o=c({id:"plugin.soundcheck"}),g=r=>"response"in r&&"errors"in r.response,y=r=>"response"in r&&"message"in r.response;class l{#a;#s;#t;constructor(t){this.#a=t.fetchApi,this.#s=t.discoveryApi;const e=new h("/graphql",{fetch:async(a,s)=>{const n=`${await this.#s.getBaseUrl("soundcheck")}${a}`;return this.#a.fetch(n,s)}});this.#t=u(e)}#r=t=>g(t)?t.response?.errors?.[0].message??`${t}`:y(t)?t.response.message:`${t}`;#e=async t=>{try{return await t()}catch(e){throw new Error(`Error from Soundcheck backend: ${this.#r(e)}`)}};async getAllCertifications(t){return this.#e(async()=>{const{certifications:e}=await this.#t.getAllCertifications({entityRef:t});return e})}async getCertificationDetails(t){return this.#e(async()=>{const{certifications:e}=await this.#t.getCertificationDetails({entityRef:t});return e})}async getCertificationDetailsForTrack(t,e){return this.#e(async()=>{const{programCertification:a}=await this.#t.getCertificationDetailsForTrack({entityRef:t,programId:e});return a})}async getCheckResultDetails(t,e,a){return this.#e(async()=>{const{checkResult:s}=await this.#t.getCheckResultDetails({entityRef:t,programId:e,checkId:a});return s})}async getFacetsForOwner(t){return this.#e(async()=>{const{facetsForOwner:e}=await this.#t.getFacetsForOwner({ownerEntityRef:t});return e})}async getProgramOverviewForOwner(t,e,a,s,n){return this.#e(async()=>{const{programOverviewForOwner:i}=await this.#t.getProgramOverviewForOwner({ownerEntityRef:t,facet:e,first:a,after:s,entitySearch:n});return i})}async getTracks(t){return this.#e(async()=>{const{programs:e}=await this.#t.getTracks({filter:t});return e})}async createProgram(t){return this.#e(async()=>{const{program:e}=await this.#t.createProgram({input:t});return e})}async updateProgram(t){return this.#e(async()=>{const{program:e}=await this.#t.updateProgram({input:t});return e})}async deleteProgram(t){return this.#e(async()=>{const{programDeleted:e}=await this.#t.deleteProgram({programId:t});return e})}async getPlaylists(t){return this.#e(async()=>{const{playlists:e}=await this.#t.getPlaylists({entityRef:t});return e})}async getOperators(){return this.#e(async()=>{const{operators:t}=await this.#t.getOperators();return t})}async getChecks(t){return this.#e(async()=>{const{checkers:e}=await this.#t.getCheckers({filter:t});return e})}async getExecutableChecks(){return this.#e(async()=>{const{executableChecks:t}=await this.#t.getExecutableChecks();return t})}async createCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.createCheck({input:t});return e})}async updateCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.updateCheck({input:t});return e})}async deleteCheck(t){return this.#e(async()=>await this.#t.deleteChecker({checkerId:t}))}async executeCheck(t){return this.#e(async()=>{const{result:e}=await this.#t.executeCheck({input:t});return e})}async getCollectors(t){return this.#e(async()=>{const{collectors:e}=await this.#t.getCollectors({ids:t});return e})}async getFactSchema(t,e){if(!(!t||!e))return this.#e(async()=>{const{factSchema:a}=await this.#t.getFactSchemas({collectorId:t,factName:e});return a})}async updateCollectorConfig(t){return this.#e(async()=>{const{collector:e}=await this.#t.updateCollectorConfig({input:t});return e})}async getOverallCheckPassRates(t){return this.#e(async()=>await this.#t.getOverallCheckPassRates({filter:t}))}async getIndividualCheckPassRates(t){return this.#e(async()=>await this.#t.getIndividualCheckPassRates({filter:t}))}async getOverallTrackPassRate(t){return this.#e(async()=>await this.#t.getOverallTrackPassRate({filter:t}))}async getIndividualTrackPassRate(t){return this.#e(async()=>await this.#t.getIndividualTrackPassRate({filter:t}))}async getOverallEntityPassRates(t){return this.#e(async()=>await this.#t.getOverallEntityPassRates({filter:t}))}async getIndividualEntityPassRates(t){return this.#e(async()=>await this.#t.getIndividualEntityPassRates({input:t}))}async getOverallGroupPassRates(t){return this.#e(async()=>await this.#t.getOverallGroupPassRates({input:t}))}async getIndividualGroupPassRates(t){return this.#e(async()=>await this.#t.getIndividualGroupPassRates({input:t}))}async getEntityRefsForTechHealthFilter(t){return this.#e(async()=>await this.#t.getEntityRefsForTechHealthFilter({ownerEntityRef:t}))}async getTrackEntities(t){return this.#e(async()=>await this.#t.getTrackEntities({input:t}))}async getCampaigns(t){return this.#e(async()=>{const{campaigns:e}=await this.#t.getCampaigns({filter:t});return e})}async createCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.createCampaign({input:t});return e})}async updateCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.updateCampaign({input:t});return e})}async deleteCampaign(t){return this.#e(async()=>{const{campaignDeleted:e}=await this.#t.deleteCampaign({campaignId:t});return e})}async archiveCampaign(t){return this.#e(async()=>{const{campaignArchived:e}=await this.#t.archiveCampaign({campaignId:t});return e})}async getCampaignProgress(t,e,a){return this.#e(async()=>{const{campaignProgress:s}=await this.#t.getCampaignProgress({id:t,first:e,after:a});return s})}async getCampaignOwners(){return this.#e(async()=>{const{campaignOwners:t}=await this.#t.getCampaignOwners();return t})}async getCheckOwners(){return this.#e(async()=>{const{checkOwners:t}=await this.#t.getCheckOwners();return t})}async getTrackOwners(){return this.#e(async()=>{const{trackOwners:t}=await this.#t.getTrackOwners();return t})}async getCertificationStatus(t){return this.#e(async()=>this.#t.getCertificationStatus({input:t}))}async getCertificationStatusHistory(t){return this.#e(async()=>this.#t.getCertificationStatusHistory({input:t}))}async getCheckStatus(t){return this.#e(async()=>(await this.#t.getCheckStatus({input:t})).checkStatus)}async getCheckStatusHistory(t){return this.#e(async()=>(await this.#t.getCheckStatusHistory({input:t})).checkStatusHistory)}async getCheckEntities(t){return this.#e(async()=>await this.#t.getCheckEntities({input:t}))}async getPathResolvers(){return this.#e(async()=>{const{pathResolvers:t}=await this.#t.getPathResolvers();return t})}async getCheckTemplates(){return this.#e(async()=>{const{checkerTemplates:t}=await this.#t.getCheckTemplates();return t})}async getFact(t){return this.#e(async()=>{const{fact:e}=await this.#t.getFact(t);return e})}}export{l as SoundcheckApi,o as soundcheckApiRef};
|
|
2
2
|
//# sourceMappingURL=api.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as u,Typography as l}from"@material-ui/core";import{uniqBy as g}from"lodash";import e from"react";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import{useLoggedInUser as E}from"../../../../contexts/UserProvider.esm.js";import{
|
|
1
|
+
import{makeStyles as u,Typography as l}from"@material-ui/core";import{uniqBy as g}from"lodash";import e from"react";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import{useLoggedInUser as E}from"../../../../contexts/UserProvider.esm.js";import{useGroupOptions as v}from"../../../../hooks/groups/useGroupOptions.esm.js";import{FormControlledAutocomplete as y}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import{useLabelOptions as b}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"@material-ui/lab";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{CAMPAIGN_FIELDS as h}from"../../utils/campaignFormUtils.esm.js";const w=u(t=>({helperText:{marginLeft:0},selectField:{display:"flex",flexDirection:"column",gap:t.spacing(1),marginBottom:t.spacing(2)},fieldContainer:{width:"250px"}})),x=({control:t,errors:m,isLoading:p,disabled:s})=>{const o=w(),{owner:i}=h.details,{options:c}=v(),{user:d,userEntityRef:a}=E();let r=g(c?.map(n=>({value:n.ref,label:n.name})),"value");const f=b(r);return a&&(r=[{value:a,label:d?.metadata.name},...r]),e.createElement("div",{className:o.selectField},e.createElement("header",null,e.createElement(l,{variant:"subtitle2"},i.name),e.createElement(l,{variant:"caption"},i.description)),e.createElement("div",{className:o.fieldContainer},e.createElement(y,{name:"detailsStep.ownerEntityRef",control:t,placeholder:"Owner",freeSolo:!1,disabled:s||p,helperText:m?.ownerEntityRef?.message??void 0,...f})))};export{x as CampaignOwnerField};
|
|
2
2
|
//# sourceMappingURL=CampaignOwnerField.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useRouteRef as Y,useApi as $,featureFlagsApiRef as
|
|
1
|
+
import{useRouteRef as Y,useApi as $,featureFlagsApiRef as z}from"@backstage/core-plugin-api";import{usePermission as J}from"@backstage/plugin-permission-react";import{makeStyles as K,Grid as i,Button as Q}from"@material-ui/core";import{soundcheckCampaignCreatePermission as U}from"@spotify/backstage-plugin-soundcheck-common";import e,{useState as n,useEffect as y}from"react";import{useNavigate as V}from"react-router-dom";import X from"react-use/lib/useDebounce";import{useGetCampaignOwners as Z}from"../../../hooks/campaigns/useGetCampaignOwners.esm.js";import{useGetCampaigns as _}from"../../../hooks/campaigns/useGetCampaigns.esm.js";import{campaignCreateRouteRef as ee}from"../../../routes.esm.js";import{FilterDefault as p}from"../../../utils/filters.esm.js";import{EmptyCampaignState as ae}from"../CampaignEmptyState.esm.js";import{EmptyState as te}from"../../EmptyState/EmptyState.esm.js";import{Pagination as re}from"../../Pagination/Pagination.esm.js";import{SearchFilters as ne}from"../../SearchFilters/SearchFilters.esm.js";import{CampaignsOverviewSkeleton as ie}from"./CampaignsOverviewSkeleton.esm.js";import{CampaignSummaryCard as se}from"./CampaignSummaryCard.esm.js";import oe from"./useArchiveConfirmationModal.esm.js";var S=(a=>(a.title="No campaigns found",a.description="No campaigns matched your search. Consider changing search term and filters.",a))(S||{});const me=K(a=>({headerButtons:{display:"flex",gap:a.spacing(1),flexWrap:"nowrap",justifyContent:"end",alignItems:"end"},header:{padding:a.spacing(0,0,1)},container:{padding:a.spacing(3),gap:a.spacing(3)},createButton:{lineHeight:"1.25rem",paddingTop:a.spacing(1.5),paddingBottom:a.spacing(1.5)}})),le=({campaignsPerPage:a,currentCursor:x})=>{const s=me(),[d,u]=n(x),[m,b]=n(""),[f,w]=n(""),[h,B]=n(p.Alpha),[C,k]=n(p.Owner),[P,A]=n(p.Status),{data:F,isLoading:I}=Z();X(()=>{w(m)},500,[m]);const{loading:R,allowed:O}=J({permission:U}),{data:r,isLoading:l}=_({ids:void 0,first:a,after:d,orderAlphabetical:h,searchByOwner:C,searchByName:f,searchByStatus:P}),L=V(),G=Y(ee),T=()=>L(G()),[c,D]=n(r),g=c?.edges.map(t=>t.node),[E,v]=n([]);y(()=>{u(void 0),v([])},[f]);const N=$(z),W=!N.getRegisteredFlags().find(t=>t.name==="soundcheck-enable-campaigns")||N.isActive("soundcheck-enable-campaigns"),j=!O||!W,H=t=>{B(t.target.value)},q=t=>{k(t.target.value)},M=t=>{A(t.target.value)};if(y(()=>{r&&D(()=>({totalCount:r.totalCount,edges:r.edges,pageInfo:{startCursor:r.pageInfo.startCursor,endCursor:r.pageInfo.endCursor,hasNextPage:r?.pageInfo.hasNextPage??!1,hasPreviousPage:r?.pageInfo.hasPreviousPage??!1}}))},[r]),!l&&!g)return e.createElement(ae,null);let o;return l?o=e.createElement(ie,null):g?.length?o=g.map(t=>e.createElement(i,{key:t.id,xs:12,sm:12,md:6,lg:4,xl:3,item:!0,role:"listitem","aria-label":"result"},e.createElement(oe,null,e.createElement(se,{campaign:t})))):o=e.createElement(i,{xs:12,item:!0,role:"listitem","aria-label":"result"},e.createElement(te,{title:"No campaigns found",description:"No campaigns matched your search. Consider changing search term and filters."})),e.createElement(i,{container:!0,direction:"row",className:s.container},e.createElement(i,{container:!0,className:s.header},e.createElement(ne,{searchPlaceholder:"Search Available Campaigns",isLoading:l||I,searchTerm:m,setSearchTerm:b,filterAlpha:h,handleAlphabeticalFilterChange:H,filterOwner:C,handleOwnerFilterChange:q,filterStatus:P,handleStatusFilterChange:M,owners:F}),e.createElement(i,{item:!0,xs:2,className:s.headerButtons},!R&&e.createElement(Q,{disabled:j,variant:"contained",color:"primary",onClick:T,className:s.createButton},"Create Campaign"))),e.createElement(i,{container:!0,spacing:4,role:"list","aria-label":"campaigns"},o),(c?.pageInfo.hasNextPage||E?.length>0)&&e.createElement(i,{item:!0,xs:12},e.createElement(re,{response:c,listingsPerPage:a,cursor:d,setCursor:u,prevCursors:E,setPrevCursors:v,labelPerPageDropdown:"Campaigns Per Page:",urlRoute:"campaigns?campaignsPerPage="})))};export{le as CampaignListPage,S as CampaignNoResults};
|
|
2
2
|
//# sourceMappingURL=CampaignListPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{stringifyEntityRef as p}from"@backstage/catalog-model";import{useEntity as b}from"@backstage/plugin-catalog-react";import{makeStyles as v,Typography as
|
|
1
|
+
import{stringifyEntityRef as p}from"@backstage/catalog-model";import{useEntity as b}from"@backstage/plugin-catalog-react";import{makeStyles as v,Typography as x,Tooltip as z,IconButton as I,CircularProgress as T}from"@material-ui/core";import N from"@material-ui/icons/Refresh";import S from"classnames";import e,{useState as F,useMemo as L}from"react";import{Link as w}from"react-router-dom";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useGetChecks as A}from"../../hooks/checks/useGetChecks.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useExecuteCheck as B}from"../../hooks/checks/useExecuteCheck.esm.js";import"../CheckDryRun/CheckDryRun.esm.js";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import{CheckDryRunDialogButton as D}from"../CheckDryRun/CheckDryRunDialogButton.esm.js";import"../CheckDryRun/CheckDryRunDetails.esm.js";import"../CheckDryRun/CheckDryRunContext.esm.js";import{mapCheckToCheckInput as G}from"../CheckDryRun/checkDryRunUtils.esm.js";import{CheckIcon as $}from"../CheckIcon/CheckIcon.esm.js";import{RelativeTime as H}from"../RelativeTime/RelativeTime.esm.js";const d=v(t=>({root:{display:"grid",width:"100%",gridTemplateColumns:"auto 1fr auto auto auto",gridColumnGap:t.spacing(.5),padding:t.spacing(1),alignItems:"center","&.selected":{backgroundColor:t.palette.action.hover},"&:hover, &:active, &:focus":{backgroundColor:t.palette.action.hover}}})),M=({className:t,href:a,name:r,children:m})=>a?e.createElement(w,{"aria-label":`select check ${r}`,to:a,className:t},m):e.createElement("div",{className:t},m),P=({result:t,name:a,id:r,timestamp:m,isExecutable:h=!1,selected:f=!1,href:g})=>{const k=d(),E=S(k.root,{selected:f}),{entity:i}=b(),{mutateAsync:y,isLoading:l}=B(),[o,C]=F(),{data:n}=A({ids:r?[r]:[]},!!o),s=L(()=>{const c=n?.edges?.[0]?.node;return c?G(c):null},[n?.edges]),R=async()=>{if(!i||!r)return;const c=await y({checkerId:r,entityRef:p(i),shouldRefreshFacts:!0}).catch(j=>{});c&&C(c)},u=!i||!r||!h;return e.createElement(M,{href:g,className:E,name:a},e.createElement($,{result:t}),e.createElement(x,{variant:"body2"},a),m&&!l?e.createElement(H,{timestamp:m}):null,!l&&e.createElement(e.Fragment,null,e.createElement(z,{title:"Execute Check",disableHoverListener:u},e.createElement("span",null,e.createElement(I,{size:"small",color:"inherit",onClick:R,disabled:u,"aria-label":"Execute Check"},e.createElement(N,{fontSize:"small"})))),!!o&&!!s&&e.createElement(D,{entityRef:p(i),check:s,checkResult:{checkResult:o.result,notes:o.details?.notes?.data??""},facts:o.facts,ruleResults:o.ruleResults,size:"small"})),l&&e.createElement(T,{color:"inherit",size:"1em"}))};export{P as Check,d as useStyles};
|
|
2
2
|
//# sourceMappingURL=Check.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useRouteRef as
|
|
1
|
+
import{useRouteRef as i}from"@backstage/core-plugin-api";import{makeStyles as k,Typography as h}from"@material-ui/core";import c from"react";import{useExecutableChecks as f}from"../../hooks/checks/useExecutableChecks.esm.js";import{certificationRouteRef as y,certificationPlaylistTrackCheckRouteRef as u}from"../../routes.esm.js";import{Check as I}from"./Check.esm.js";const l=k(e=>({noChecks:{padding:e.spacing(1)},checks:{padding:0,margin:0,flex:1,listStyle:"none"},checkItem:{borderBottom:`1px solid ${e.palette.divider}`,"&:last-of-type":{borderBottom:"0"},color:e.palette.text.primary,"& a":{color:e.palette.text.primary,textDecoration:"none"}}})),x=({checks:e,playlistId:o,trackId:r,checkId:s})=>{const a=l(),m=i(y),d=i(u),{data:n,isLoading:p}=f();return e.length?c.createElement("ul",{className:a.checks},e.map(t=>c.createElement("li",{key:t.id,className:a.checkItem},c.createElement(I,{...t,isExecutable:!p&&n?.includes(t.id),selected:t.id===s,href:o?d({playlistId:o,trackId:r,checkId:t.id}):m({trackId:r,checkId:t.id})})))):c.createElement(h,{variant:"body2",className:a.noChecks},"No applicable checks at this level.")};export{x as CheckResultSummaryList,l as useStyles};
|
|
2
2
|
//# sourceMappingURL=CheckResultSummaryList.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{MarkdownContent as
|
|
1
|
+
import{MarkdownContent as E}from"@backstage/core-components";import{useEntity as y}from"@backstage/plugin-catalog-react";import{makeStyles as k,Box as v,Typography as m}from"@material-ui/core";import t from"react";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useCheckDetails as S}from"../../hooks/checks/useCheckDetails.esm.js";import{useGetChecks as x}from"../../hooks/checks/useGetChecks.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{AlertPanel as C}from"../AlertPanel/AlertPanel.esm.js";import{RelativeTime as B}from"../RelativeTime/RelativeTime.esm.js";import{ResultStateBox as N}from"./ResultStateBox.esm.js";import{CheckDetailsSkeleton as z}from"./skeletons/CheckDetailsSkeleton.esm.js";const s=k(e=>({root:{padding:`${e.spacing(3)}px ${e.spacing(5)}px`},title:{fontWeight:"normal",fontSize:e.typography.h5.fontSize},description:{padding:`${e.spacing(3)}px 0`},subtitle:{fontWeight:"normal",fontSize:e.typography.h6.fontSize},topBar:{display:"flex",justifyContent:"space-between",marginBottom:e.spacing(2)}})),D=({programId:e,checkId:r})=>{const i=s(),{entity:p}=y(),{data:a,isLoading:l,isError:c}=S(p,e,r),{data:d}=x({ids:[r??""],first:1}),f=d?.edges?.[0]?.node;if(c)return t.createElement(v,{padding:2},t.createElement(C,{severity:"error",title:"Error loading check details"}));if(l||!e||!r)return t.createElement(z,null);if(!a)return null;const{name:o,description:u,result:g,timestamp:n,notes:h}=a;return t.createElement("div",{className:i.root,"data-testid":"check-details-view"},t.createElement("div",{className:i.topBar},t.createElement(m,{variant:"h2",className:i.title},o),n?t.createElement(B,{timestamp:n,description:"Last updated"}):null),t.createElement(N,{name:o,state:g,notes:h,templateRef:f?.templateRef??void 0}),t.createElement("div",{className:i.description,"data-testid":"soundcheck-check-details-description"},t.createElement(m,{variant:"h3",className:i.subtitle},"Description"),t.createElement(E,{content:u})))};export{D as CheckDetails,s as useStyles};
|
|
2
2
|
//# sourceMappingURL=CheckDetails.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{TableRow as t,TableCell as n,IconButton as i,Collapse as c}from"@material-ui/core";import p from"@material-ui/icons/KeyboardArrowDown";import u from"@material-ui/icons/KeyboardArrowUp";import e,{useState as s}from"react";const d=({title:a,children:o,defaultOpen:m=!0})=>{const[l,r]=s(m);return e.createElement(e.Fragment,null,e.createElement(t,null,e.createElement(n,{colSpan:2,padding:"normal",align:"left",size:"small"},e.createElement(i,{"aria-label":"expand row",size:"small",onClick:()=>r(!l)},l?e.createElement(u,null):e.createElement(p,null)),e.createElement("strong",null,a))),e.createElement(t,null,e.createElement(n,{style:{paddingBottom:0,paddingTop:0},colSpan:2,padding:"normal",align:"left",size:"small"},e.createElement(c,{in:l,timeout:"auto",unmountOnExit:!0},o))))};export{d as CollapseRow};
|
|
2
|
+
//# sourceMappingURL=CollapseRow.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Progress as L}from"@backstage/core-components";import{useApi as u,errorApiRef as R}from"@backstage/core-plugin-api";import{useEntity as T}from"@backstage/plugin-catalog-react";import{scaffolderApiRef as b,useTemplateSecrets as I,useCustomFieldExtensions as B}from"@backstage/plugin-scaffolder-react";import{useTemplateParameterSchema as D,useFilteredSchemaProperties as F,Stepper as O}from"@backstage/plugin-scaffolder-react/alpha";import{makeStyles as P,Dialog as U,DialogTitle as A,Typography as N,IconButton as W,DialogContent as j}from"@material-ui/core";import G from"@material-ui/icons/Close";import J from"git-url-parse";import t,{useState as K,useEffect as M}from"react";import{useOutlet as Q}from"react-router-dom";import{OngoingTaskComponent as q}from"./OngoingTaskComponent.esm.js";import{ReviewStateComponent as z}from"./ReviewStateComponent.esm.js";class d{type;name;owner;lifecycle;title;description;sourceLocation;managedByLocation;slackChannel;entity;constructor(e){this.lifecycle=e.spec?.lifecycle||"unknown",this.name=e.metadata.name,this.owner=e.spec?.owner||"unknown",this.type=e.spec?.type||"unknown",this.title=e.metadata.title,this.description=e.metadata.description||"",this.sourceLocation=e.metadata.annotations?.["backstage.io/source-location"]?.replace("url:",""),this.managedByLocation=e.metadata.annotations?.["backstage.io/managed-by-location"],this.slackChannel=e.metadata.annotations?.["spotify.net/slack-channel"],this.entity=e}}const H=o=>{const e={};if(e.componentId=o.name,o.sourceLocation){const{name:n,owner:a,protocol:r,source:i}=J(o.sourceLocation);e.repoUrl=`${r}://${i}/${a}/${n}`,e.repo={host:i,org:a,repo:n,url:e.repoUrl,gitUrl:`git@${i}:${a}/${n}.git`,paramUrl:`${r}://${i}?owner=${a}&repo=${n}`}}e.facts=JSON.parse(o.entity.metadata.annotations?.["sysmodel.spotify.net/raw-component-facts"]||"{}");const s=o;return delete s.entity,{...e,...s}},V=P({titleContent:{display:"flex",justifyContent:"space-between",alignItems:"center"}}),X=o=>{const{title:e,open:s,setOpen:n,onClose:a,templateRef:r}=o,i=V(),c=u(R),y=u(b),{loading:g,manifest:h,error:l}=D(r),{secrets:w}=I(),E=Q(),k=B(E),m=F(h),{entity:C}=T(),[p,f]=K(void 0),$=async x=>{const{taskId:v}=await y.scaffold({templateRef:r,values:x,secrets:w});f(v)},S=()=>{n(!1),f(void 0)};return M(()=>{l&&c.post(new Error(`Failed to load template, ${l}`))},[l,c]),t.createElement(U,{open:s,onClose:a,fullWidth:!0,maxWidth:"md"},t.createElement(A,null,t.createElement("div",{className:i.titleContent},t.createElement(N,{variant:"h5"},e),t.createElement(W,{onClick:S},t.createElement(G,null)))),t.createElement(j,null,g&&t.createElement(L,null),p?t.createElement(q,{taskId:p}):m&&t.createElement(O,{manifest:m,onCreate:$,extensions:k,components:{createButtonText:"Execute",ReviewStateComponent:z},initialState:{backstage:H(new d(C))},...o})))};export{X as FixMeDialog,d as SimplifiedEntity};
|
|
2
|
+
//# sourceMappingURL=FixMeDialog.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Content as l,ErrorPanel as i}from"@backstage/core-components";import{useTaskEventStream as c}from"@backstage/plugin-scaffolder-react";import{TaskSteps as u,DefaultTemplateOutputs as f}from"@backstage/plugin-scaffolder-react/alpha";import{makeStyles as E,Box as n}from"@material-ui/core";import r,{useMemo as m}from"react";const d=E({contentWrapper:{display:"flex",flexDirection:"column"}}),k=s=>{const e=c(s.taskId),o=m(()=>e.task?.spec.steps.map(t=>({...t,...e?.steps?.[t.id]}))??[],[e]),p=m(()=>{for(let t=o.length-1;t>=0;t--)if(o[t].status!=="open")return t;return 0},[o]),a=d();return r.createElement(l,{className:a.contentWrapper},e.error?r.createElement(n,{paddingBottom:2},r.createElement(i,{error:e.error,title:e.error.message})):null,r.createElement(n,{paddingBottom:2},r.createElement(u,{steps:o,activeStep:p,isComplete:e.completed,isError:!!e.error})),r.createElement(f,{output:e.output}))};export{k as OngoingTaskComponent};
|
|
2
|
+
//# sourceMappingURL=OngoingTaskComponent.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{MarkdownContent as
|
|
1
|
+
import{MarkdownContent as u}from"@backstage/core-components";import{useApi as k,configApiRef as C}from"@backstage/core-plugin-api";import{makeStyles as h,useTheme as x,Paper as E,Typography as R,Box as N,Button as b}from"@material-ui/core";import y from"@material-ui/icons/CheckCircleOutlined";import w from"@material-ui/icons/ErrorOutline";import i from"@material-ui/icons/InfoOutlined";import A from"@material-ui/icons/RemoveCircleOutline";import F from"@material-ui/icons/WarningOutlined";import r,{useState as S}from"react";import{ResultState as e}from"../../graphql/generated/index.esm.js";import{FixMeDialog as v}from"./FixMeDialog.esm.js";const B=h(a=>({markdownContent:{"& :last-child":{marginBottom:0},"& pre":{background:`${a.palette.background.paper} !important`}},root:{padding:a.spacing(2),display:"flex",gap:a.spacing(1.5)},iconContainer:{marginTop:1},passed:{},failed:{},warning:{},notReported:{},notApplicable:{},error:{},icon:{}}),{name:"CheckResultStateBox"}),P={[e.Passed]:y,[e.Failed]:w,[e.Warning]:F,[e.NotReported]:i,[e.NotApplicable]:i,[e.Error]:A},W={[e.Passed]:"Check passed",[e.Failed]:"Check did not pass",[e.Warning]:"Check produced warning(s)",[e.NotReported]:"Check not reported",[e.NotApplicable]:"Check not applicable",[e.Error]:"Check encountered an error."},$={[e.Passed]:"passed",[e.Failed]:"failed",[e.Warning]:"warning",[e.NotReported]:"notReported",[e.NotApplicable]:"notApplicable",[e.Error]:"error"},O=(a,t)=>({[e.Passed]:t.palette.success.main,[e.Failed]:t.palette.error.main,[e.Warning]:t.palette.warning.main,[e.NotReported]:t.palette.text.primary,[e.NotApplicable]:t.palette.text.primary,[e.Error]:t.palette.error.main})[a],T=({name:a,state:t,notes:l,templateRef:p})=>{const n=B(),m=x(),c=P[t]??i,[s,o]=S(!1),d=k(C).getOptionalStringArray("soundcheck.flags")?.includes("enable-fix-me"),g=()=>{o(!0)},f=()=>{o(!1)};return r.createElement(E,{variant:"outlined",className:`${n.root} ${n[$[t]]}`},r.createElement("div",{className:n.iconContainer},r.createElement(c,{className:n.icon,htmlColor:O(t,m)})),r.createElement("div",{style:{width:"100%"}},r.createElement(R,{variant:"subtitle1"},W[t]),l?r.createElement(u,{className:n.markdownContent,content:l}):null,d&&t===e.Failed&&p&&r.createElement(N,{display:"flex",flexDirection:"column",alignItems:"flex-end",mt:2,width:"100%"},r.createElement(b,{color:"primary",variant:"contained",onClick:g},"Fix"),r.createElement(v,{title:`Fix ${a}`,open:s,setOpen:o,onClose:f,templateRef:p}))))};export{T as ResultStateBox};
|
|
2
2
|
//# sourceMappingURL=ResultStateBox.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useTheme as u,Typography as r,TableContainer as E,Table as o,TableBody as m,TableRow as d,TableCell as i}from"@material-ui/core";import{styled as f}from"@mui/styles";import e from"react";import{CollapseRow as c}from"./CollapseRow.esm.js";const s=f("pre")({fontSize:".9em",lineHeight:"1.6",maxHeight:"250px",width:"100%",overflow:"scroll"}),b=n=>{const p=u(),t={...n.formState};delete t.backstage;const g={...n.formState.backstage};return e.createElement(e.Fragment,null,e.createElement(r,{variant:"h6",style:{marginBottom:31}},"The codemod will run with the following input:"),e.createElement(E,null,e.createElement(o,{"aria-label":"collapsible table"},e.createElement(m,null,e.createElement(c,{title:"Context",defaultOpen:!1},e.createElement(s,null,JSON.stringify(g,null,2))),Object.keys(t).length>0&&e.createElement(c,{title:"Input"},e.createElement("div",{style:{width:"auto",paddingTop:p.spacing(1),alignContent:"center"}},e.createElement(o,{style:{width:"100%"}},e.createElement(m,null,Object.entries(t).map(([a,l])=>e.createElement(d,{key:a},e.createElement(i,{padding:"normal",align:"left",size:"small"},e.createElement("strong",null,a)),e.createElement(i,{padding:"normal",align:"left",size:"small"},typeof l=="object"?e.createElement(s,null,JSON.stringify(l,null,2)):e.createElement(r,null,l?.toString()))))))))))))};export{b as ReviewStateComponent};
|
|
2
|
+
//# sourceMappingURL=ReviewStateComponent.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EntityRefLink as b}from"@backstage/plugin-catalog-react";import{makeStyles as S,Box as c,Typography as a,Divider as f,Grid as l}from"@material-ui/core";import{parseFactRef as N,getRuleHash as k}from"@spotify/backstage-plugin-soundcheck-common";import e from"react";import{ResultState as R}from"../../graphql/generated/index.esm.js";import{ResultStateBox as B}from"../CheckDetails/ResultStateBox.esm.js";import{ExpressionTypeReadableMap as F,ExpressionType as T}from"../CheckForm/types/ExpressionType.esm.js";import"../Frequency/types.esm.js";import"../Frequency/util.esm.js";import"../Frequency/FrequencyComponent.esm.js";import"../CheckForm/types/Path.esm.js";import{mapRuleToExpression as P}from"../CheckForm/utils/checkFormUtils.esm.js";import{CheckIcon as w}from"../CheckIcon/CheckIcon.esm.js";import{ExpandableSection as z}from"../ExpandableSection/ExpandableSection.esm.js";import{FormattedPreview as x}from"../FormattedPreview/FormattedPreview.esm.js";const v=S(t=>({dryRunRoot:{padding:t.spacing(2)},dryRunSection:{marginBottom:t.spacing(2)},rulesSection:{padding:t.spacing(2),margin:0,width:"100%"},resultBox:{fontSize:t.typography.body1.fontSize},factBox:{padding:0,border:`1px solid ${t.palette.divider}`,overflow:"auto",fontSize:t.typography.body2.fontSize,maxHeight:500},nested:{margin:t.spacing(3)},expressionType:{padding:t.spacing(1,2)},expressionWrapper:{border:`1px solid ${t.palette.divider}`,marginBottom:t.spacing(2)},resultDisplay:{display:"flex",alignItems:"center"},resultIcon:{marginRight:t.spacing(.25)},ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}},fontSize:t.typography.body1.fontSize},valueBox:{maxHeight:500,overflow:"auto"}})),D=({passed:t})=>{const n=v();return e.createElement(a,{variant:"body1",className:n.resultDisplay},e.createElement(w,{className:n.resultIcon,result:t?R.Passed:R.Failed})," ",t?"Passed":"Failed")},g=({check:t,expression:n,facts:i,ruleResults:m})=>{const o=v();return e.createElement(e.Fragment,null,e.createElement(c,{className:o.expressionWrapper},e.createElement(a,{className:o.expressionType,variant:"subtitle1"},F[n.expressionType??T.AllOf]),n.conditions?.map((r,s)=>{const p=r.operatorPrefix?`${r.operatorPrefix}:${r.operator}`:r.operator,d=N(r.factRef),y=i?.find(E=>E.factRef===r.factRef),h=k({factRef:d,value:r.value,operator:p,path:r.path}),u=m?.find(E=>E.name===h);return e.createElement("div",{key:`expression-${s}`},e.createElement(f,{variant:"middle"}),e.createElement(l,{container:!0,className:o.rulesSection,spacing:2},e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Integration"),e.createElement(a,{variant:"body1"},d.source)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Fact"),e.createElement(a,{variant:"body1"},d.name)),t?.pathResolver&&e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Path Resolver"),e.createElement(a,{variant:"body1"},t.pathResolver)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Path"),e.createElement(a,{variant:"body1"},r.path)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Operator"),e.createElement(a,{variant:"body1"},p)),u?.result!==void 0&&e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Result"),e.createElement(D,{passed:u.result})),e.createElement(l,{item:!0,xs:12},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Expected"),e.createElement(a,{component:"div",variant:"body2",className:o.valueBox},e.createElement(x,{data:r?.value}))),e.createElement(l,{item:!0,xs:12},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Resolved Value"),e.createElement(a,{component:"div",variant:"body2",className:o.valueBox},e.createElement(x,{data:u?.factResult}))),!!y&&e.createElement(l,{item:!0,xs:12},e.createElement(z,{elevation:0,title:"Related Fact"},e.createElement("div",{className:o.factBox},e.createElement(x,{data:y.data}))))))}),!!n?.expressions&&e.createElement(e.Fragment,null,e.createElement(f,{variant:"middle"}),e.createElement(c,{className:o.nested},n?.expressions?.map((r,s)=>e.createElement(g,{check:t,facts:i,ruleResults:m,expression:r,key:`nested-expression-${s}`}))))))},I=({entityRef:t,check:n,checkResult:i,notes:m,facts:o,ruleResults:r})=>{const s=v(),p=P(n?.rule);return e.createElement(c,{className:s.dryRunRoot},e.createElement(c,{className:s.dryRunSection},t&&e.createElement(e.Fragment,null,e.createElement(a,{variant:"h5"},"Entity"),e.createElement(a,{variant:"body1"},e.createElement(b,{className:s.ownerLink,entityRef:t})))),e.createElement(c,{className:s.dryRunSection},e.createElement(a,{variant:"h5"},"Check Result"),e.createElement("div",{className:s.resultBox},i?e.createElement(B,{state:i,notes:m}):"No Results")),e.createElement(a,{variant:"h5"},"Rules"),e.createElement(g,{check:n,facts:o,ruleResults:r,expression:p}))};export{I as CheckDryRunDetails};
|
|
1
|
+
import{EntityRefLink as b}from"@backstage/plugin-catalog-react";import{makeStyles as S,Box as c,Typography as a,Divider as f,Grid as l}from"@material-ui/core";import{parseFactRef as N,getRuleHash as k}from"@spotify/backstage-plugin-soundcheck-common";import e from"react";import{ResultState as R}from"../../graphql/generated/index.esm.js";import{ResultStateBox as B}from"../CheckDetails/ResultStateBox.esm.js";import{ExpressionTypeReadableMap as F,ExpressionType as T}from"../CheckForm/types/ExpressionType.esm.js";import"../Frequency/types.esm.js";import"../Frequency/util.esm.js";import"../Frequency/FrequencyComponent.esm.js";import"../CheckForm/types/Path.esm.js";import{mapRuleToExpression as P}from"../CheckForm/utils/checkFormUtils.esm.js";import{CheckIcon as w}from"../CheckIcon/CheckIcon.esm.js";import{ExpandableSection as z}from"../ExpandableSection/ExpandableSection.esm.js";import{FormattedPreview as x}from"../FormattedPreview/FormattedPreview.esm.js";const v=S(t=>({dryRunRoot:{padding:t.spacing(2)},dryRunSection:{marginBottom:t.spacing(2)},rulesSection:{padding:t.spacing(2),margin:0,width:"100%"},resultBox:{fontSize:t.typography.body1.fontSize},factBox:{padding:0,border:`1px solid ${t.palette.divider}`,overflow:"auto",fontSize:t.typography.body2.fontSize,maxHeight:500},nested:{margin:t.spacing(3)},expressionType:{padding:t.spacing(1,2)},expressionWrapper:{border:`1px solid ${t.palette.divider}`,marginBottom:t.spacing(2)},resultDisplay:{display:"flex",alignItems:"center"},resultIcon:{marginRight:t.spacing(.25)},ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}},fontSize:t.typography.body1.fontSize},valueBox:{maxHeight:500,overflow:"auto"}})),D=({passed:t})=>{const n=v();return e.createElement(a,{variant:"body1",className:n.resultDisplay},e.createElement(w,{className:n.resultIcon,result:t?R.Passed:R.Failed})," ",t?"Passed":"Failed")},g=({check:t,expression:n,facts:i,ruleResults:m})=>{const o=v();return e.createElement(e.Fragment,null,e.createElement(c,{className:o.expressionWrapper},e.createElement(a,{className:o.expressionType,variant:"subtitle1"},F[n.expressionType??T.AllOf]),n.conditions?.map((r,s)=>{const p=r.operatorPrefix?`${r.operatorPrefix}:${r.operator}`:r.operator,d=N(r.factRef),y=i?.find(E=>E.factRef===r.factRef),h=k({factRef:d,value:r.value,operator:p,path:r.path}),u=m?.find(E=>E.name===h);return e.createElement("div",{key:`expression-${s}`},e.createElement(f,{variant:"middle"}),e.createElement(l,{container:!0,className:o.rulesSection,spacing:2},e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Integration"),e.createElement(a,{variant:"body1"},d.source)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Fact"),e.createElement(a,{variant:"body1"},d.name)),t?.pathResolver&&e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Path Resolver"),e.createElement(a,{variant:"body1"},t.pathResolver)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Path"),e.createElement(a,{variant:"body1"},r.path)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Operator"),e.createElement(a,{variant:"body1"},p)),u?.result!==void 0&&e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Result"),e.createElement(D,{passed:u.result})),e.createElement(l,{item:!0,xs:12},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Expected"),e.createElement(a,{component:"div",variant:"body2",className:o.valueBox},e.createElement(x,{data:r?.value}))),e.createElement(l,{item:!0,xs:12},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Resolved Value"),e.createElement(a,{component:"div",variant:"body2",className:o.valueBox},e.createElement(x,{data:u?.factResult}))),!!y&&e.createElement(l,{item:!0,xs:12},e.createElement(z,{elevation:0,title:"Related Fact"},e.createElement("div",{className:o.factBox},e.createElement(x,{data:y.data}))))))}),!!n?.expressions&&e.createElement(e.Fragment,null,e.createElement(f,{variant:"middle"}),e.createElement(c,{className:o.nested},n?.expressions?.map((r,s)=>e.createElement(g,{check:t,facts:i,ruleResults:m,expression:r,key:`nested-expression-${s}`}))))))},I=({entityRef:t,check:n,checkResult:i,notes:m,facts:o,ruleResults:r})=>{const s=v(),p=P(n?.rule);return e.createElement(c,{className:s.dryRunRoot},e.createElement(c,{className:s.dryRunSection},t&&e.createElement(e.Fragment,null,e.createElement(a,{variant:"h5"},"Entity"),e.createElement(a,{variant:"body1"},e.createElement(b,{className:s.ownerLink,entityRef:t})))),e.createElement(c,{className:s.dryRunSection},e.createElement(a,{variant:"h5"},"Check Result"),e.createElement("div",{className:s.resultBox},i?e.createElement(B,{name:n?.name??"",state:i,notes:m}):"No Results")),e.createElement(a,{variant:"h5"},"Rules"),e.createElement(g,{check:n,facts:o,ruleResults:r,expression:p}))};export{I as CheckDryRunDetails};
|
|
2
2
|
//# sourceMappingURL=CheckDryRunDetails.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Content as s}from"@backstage/core-components";import t from"react";import{FormProvider as d}from"react-hook-form";import"../../contexts/TrackFormContext.esm.js";import{useCheckFormContext as f}from"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import{formStyles as h}from"../../utils/formStyles.esm.js";import"@material-ui/core";import"@material-ui/icons/Search";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import"../FactExplorer/FactExplorer.esm.js";import{FactExplorerProvider as S}from"../FactExplorer/FactExplorerContext.esm.js";import{FormFilterSection as u}from"../FormFilterSection/FormFilterSection.esm.js";import{FormStepper as C}from"../FormStepper/FormStepper.esm.js";import"./FormFields/CheckNameInput/CheckNameInput.esm.js";import"./FormFields/PassFailMessageInput/PassFailMessageInput.esm.js";import"../FormMarkdownInput/FormMarkdownInput.esm.js";import{CHECK_FIELDS as E}from"./utils/checkFormUtils.esm.js";import"./FormFields/TeamDetailsInput/TeamDetailsInput.esm.js";import"./FormFields/RuleInput/AddMenuButton.esm.js";import"./FormFields/RuleInput/RuleInputBox.esm.js";import"./FormFields/RuleInput/Expressions/ExpressionBox.esm.js";import"./FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js";import"@material-ui/icons/Close";import"@material-ui/icons/Delete";import"@material-ui/icons/List";import"@spotify/backstage-plugin-soundcheck-common";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"./FormFields/RuleInput/Conditions/styles.esm.js";import"@backstage/catalog-model";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import"./FormFields/RuleInput/Conditions/ValueListInput.esm.js";import"./FormFields/RuleInput/Conditions/ConditionList.esm.js";import{ScheduleSection as b}from"./FormFields/CheckScheduleSection/ScheduleSection.esm.js";import"./FormFields/CheckPathResolverInput.esm.js";import{CheckDetailsStep as k}from"./Steps/CheckDetailsStep.esm.js";import{CheckRulesStep as F}from"./Steps/CheckRulesStep.esm.js";import{CheckReviewStep as g}from"./Steps/CheckReviewStep.esm.js";import"./types/ExpressionType.esm.js";import{CheckStepNameMapping as v}from"./types/CheckFormTypes.esm.js";import"../Frequency/types.esm.js";import"../Frequency/util.esm.js";import"../Frequency/FrequencyComponent.esm.js";import"./types/Path.esm.js";import{useCheckForm as y}from"./useCheckForm.esm.js";const O=({onSave:p,onClose:r})=>{const{isLoading:n,isReadOnly:o,selectedItem:l}=f(),{formMethods:e,onSubmit:m}=y(p),a=h(),i=[{label:"Enter check details",content:()=>t.createElement(k,null)},{label:"Add rules",content:()=>t.createElement(F,null)},{label:"Choose the affected entities (Optional)",content:()=>t.createElement(u,{name:"filtersStep.filter",control:e.control,disabled:o,description:E.filter.description})},{label:"Set the check schedule (Optional)",content:()=>t.createElement(b,{control:e.control,disabled:o})},{label:"Review and test (Optional)",content:()=>t.createElement(g,null)}],c=l?[...Array(i.length).keys()]:[0];return t.createElement(
|
|
1
|
+
import{Content as s}from"@backstage/core-components";import t from"react";import{FormProvider as d}from"react-hook-form";import"../../contexts/TrackFormContext.esm.js";import{useCheckFormContext as f}from"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import{formStyles as h}from"../../utils/formStyles.esm.js";import"@material-ui/core";import"@material-ui/icons/Search";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import"../FactExplorer/FactExplorer.esm.js";import{FactExplorerProvider as S}from"../FactExplorer/FactExplorerContext.esm.js";import{FormFilterSection as u}from"../FormFilterSection/FormFilterSection.esm.js";import{FormStepper as C}from"../FormStepper/FormStepper.esm.js";import"./FormFields/CheckNameInput/CheckNameInput.esm.js";import"./FormFields/PassFailMessageInput/PassFailMessageInput.esm.js";import"../FormMarkdownInput/FormMarkdownInput.esm.js";import{CHECK_FIELDS as E}from"./utils/checkFormUtils.esm.js";import"./FormFields/TeamDetailsInput/TeamDetailsInput.esm.js";import"./FormFields/RuleInput/AddMenuButton.esm.js";import"./FormFields/RuleInput/RuleInputBox.esm.js";import"./FormFields/RuleInput/Expressions/ExpressionBox.esm.js";import"./FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js";import"@material-ui/icons/Close";import"@material-ui/icons/Delete";import"@material-ui/icons/List";import"@spotify/backstage-plugin-soundcheck-common";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"./FormFields/RuleInput/Conditions/styles.esm.js";import"@backstage/catalog-model";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import"./FormFields/RuleInput/Conditions/ValueListInput.esm.js";import"./FormFields/RuleInput/Conditions/ConditionList.esm.js";import{ScheduleSection as b}from"./FormFields/CheckScheduleSection/ScheduleSection.esm.js";import"./FormFields/CheckPathResolverInput.esm.js";import{CheckDetailsStep as k}from"./Steps/CheckDetailsStep.esm.js";import{CheckRulesStep as F}from"./Steps/CheckRulesStep.esm.js";import{CheckReviewStep as g}from"./Steps/CheckReviewStep.esm.js";import"./types/ExpressionType.esm.js";import{CheckStepNameMapping as v}from"./types/CheckFormTypes.esm.js";import"../Frequency/types.esm.js";import"../Frequency/util.esm.js";import"../Frequency/FrequencyComponent.esm.js";import"./types/Path.esm.js";import{useCheckForm as y}from"./useCheckForm.esm.js";const O=({onSave:p,onClose:r})=>{const{isLoading:n,isReadOnly:o,selectedItem:l}=f(),{formMethods:e,onSubmit:m}=y(p),a=h(),i=[{label:"Enter check details",content:()=>t.createElement(k,null)},{label:"Add rules",content:()=>t.createElement(F,null)},{label:"Choose the affected entities (Optional)",content:()=>t.createElement(u,{name:"filtersStep.filter",control:e.control,disabled:o,description:E.filter.description})},{label:"Set the check schedule (Optional)",content:()=>t.createElement(b,{control:e.control,disabled:o})},{label:"Review and test (Optional)",content:()=>t.createElement(g,null)}],c=l?[...Array(i.length).keys()]:[0];return t.createElement(s,{className:a.formWrapper},t.createElement(d,{...e},t.createElement(S,null,t.createElement("form",{onSubmit:e.handleSubmit(m)},t.createElement(C,{onClose:()=>r?r():void 0,handleSubmit:e.handleSubmit,trigger:e.trigger,onSubmit:m,initialVisited:c,stepNameMap:v,steps:i,isLoading:n,isReadOnly:o,saveButtonText:"Save Check"})))))};export{O as CheckForm};
|
|
2
2
|
//# sourceMappingURL=CheckForm.esm.js.map
|
package/dist/components/CheckForm/FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as b,ButtonGroup as g,Button as
|
|
1
|
+
import{makeStyles as b,ButtonGroup as g,Button as k}from"@material-ui/core";import n,{useState as E}from"react";import{useFormContext as f,Controller as y}from"react-hook-form";import{ExpressionType as a,ExpressionTypeReadableMap as C}from"../../../types/ExpressionType.esm.js";import"../../../../Frequency/types.esm.js";import"../../../../Frequency/util.esm.js";import"../../../../Frequency/FrequencyComponent.esm.js";import"../../../types/Path.esm.js";const x=b(e=>({button:{backgroundColor:e.palette.background.paper,padding:e.spacing(.5,1.5)},selectedButton:{backgroundColor:e.palette.action.selected}})),B=({name:e,disabled:l})=>{const o=x(),{control:p,getValues:s}=f(),m=`${e}`,c=s(m),[i,u]=E(c||a.AllOf),d=r=>{u(r)};return n.createElement(y,{control:p,name:e,render:({field:{onChange:r}})=>n.createElement(g,{color:"primary"},Object.values(a).map(t=>n.createElement(k,{key:t,className:i===t?`${o.selectedButton} ${o.button}`:`${o.button}`,onClick:()=>{d(t),r(t)},disabled:l},C[t])))})};export{B as ExpressionTypeToggle};
|
|
2
2
|
//# sourceMappingURL=ExpressionTypeToggle.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{parseEntityRef as v}from"@backstage/catalog-model";import{Typography as y}from"@material-ui/core";import{makeStyles as b}from"@material-ui/core/styles";import{uniqBy as g}from"lodash";import o from"react";import{useFormContext as h}from"react-hook-form";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import{useLoggedInUser as w}from"../../../../contexts/UserProvider.esm.js";import{
|
|
1
|
+
import{parseEntityRef as v}from"@backstage/catalog-model";import{Typography as y}from"@material-ui/core";import{makeStyles as b}from"@material-ui/core/styles";import{uniqBy as g}from"lodash";import o from"react";import{useFormContext as h}from"react-hook-form";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import{useLoggedInUser as w}from"../../../../contexts/UserProvider.esm.js";import{useGroupOptions as x}from"../../../../hooks/groups/useGroupOptions.esm.js";import{FormControlledAutocomplete as L}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import{useLabelOptions as S}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"@material-ui/lab";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{CHECK_FIELDS as C}from"../../utils/checkFormUtils.esm.js";const R=b(a=>({container:{display:"flex",flexDirection:"column",gap:a.spacing(1)}})),T=({control:a,disabled:l,error:n})=>{const i=R(),{options:p,isLoading:s}=x();let e=g(p.map(m=>({value:m.ref,label:m.name})),"value");const{user:c,userEntityRef:r}=w();r&&(e=[{value:r,label:c?.metadata?.name??r},...e]);const{watch:u}=h(),t=u("detailsStep.ownerEntityRef");t&&r!==t&&!e.some(m=>m.value===t)&&(e=[{value:t,label:v(t).name},...e]);const f=S(e),{owner:{name:d,selectLabel:E}}=C.details;return o.createElement("div",{className:i.container},o.createElement("div",null,o.createElement(y,{variant:"subtitle2"},d)),o.createElement("div",null,o.createElement(L,{freeSolo:!1,name:"detailsStep.ownerEntityRef",control:a,placeholder:E,width:250,helperText:n?.message??void 0,disabled:l||s,...f})))};export{T as TeamDetailsInput};
|
|
2
2
|
//# sourceMappingURL=TeamDetailsInput.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{stringifyEntityRef as
|
|
1
|
+
import{stringifyEntityRef as v}from"@backstage/catalog-model";import{Table as R}from"@backstage/core-components";import{makeStyles as x}from"@material-ui/core";import L from"lodash";import d,{useState as z,useEffect as B,useCallback as p}from"react";import{CheckEntityField as n,Direction as f}from"../../../graphql/generated/index.esm.js";import{useEntitiesByRefs as T}from"../../../hooks/catalog/useEntitiesByRefs.esm.js";import{useCheckEntities as D}from"../../../hooks/entities/useCheckEntities.esm.js";import{toResultState as m}from"../utils.esm.js";import{columnFactories as r}from"./columns.esm.js";import{toCheckEntityRow as N}from"./utils.esm.js";const O=["kind","metadata.name","metadata.namespace","relations","spec.lifecycle","spec.type"],P=[r.createStateColumn(),r.createNameColumn(),r.createSystemColumn(),r.createOwnerColumn(),r.createSpecTypeColumn(),r.createSpecLifecycleColumn()],F=[n.State,n.Name,n.System,n.Owner,n.Type,n.Lifecycle],$=x({tableContainer:{display:"flex",flexDirection:"column",width:"100%",overflowX:"auto","& table":{boxSizing:"border-box","& th:first-child, & td:first-child":{paddingLeft:"6px"},"& th:last-child, & td:last-child":{paddingRight:"6px !important"}}}}),A=({checkId:g,trackId:u,filter:s,states:c})=>{const h=$(),[e,l]=z({orderBy:void 0,filter:s,states:c?.map(m).filter(t=>t!==void 0),pageInfo:{page:0,pageSize:10,direction:"forward",cursor:null}});B(()=>{l(t=>({...t,pageInfo:{...t.pageInfo,page:0,cursor:null},filter:s,states:c?.map(m).filter(i=>i!==void 0)}))},[s,c]);const{data:a,isLoading:y}=D({checkId:g,trackId:u,orderBy:e.orderBy,filter:e.filter,states:e.states?.length?e.states:void 0,[e.pageInfo.direction==="forward"?"first":"last"]:e.pageInfo.pageSize,[e.pageInfo.direction==="forward"?"after":"before"]:e.pageInfo.cursor}),C=p((t,i)=>{let o;t===-1?o=void 0:o={field:F[t],direction:i==="asc"?f.Asc:f.Desc},l({...e,orderBy:o,pageInfo:{...e.pageInfo,page:0,cursor:null}})},[e]),k=p((t,i)=>{const o=t>e.pageInfo.page?"forward":"backward",b=o==="forward"?a?.checkEntities.pageInfo.endCursor??null:a?.checkEntities.pageInfo.startCursor??null;l({...e,pageInfo:{page:t,pageSize:i,direction:o,cursor:b}})},[a,e]),I=a?.checkEntities.edges.map(t=>t.node.entityRef)??[],{data:w,isLoading:E}=T({entityRefs:I,fields:O}),S=L.compact(a?.checkEntities.edges.map(t=>{const i=w?.items.find(o=>!!o&&v(o)===t.node.entityRef);return i?N({checkDetails:t.node,entity:i}):void 0}))??[];return d.createElement("div",{className:h.tableContainer},d.createElement(R,{title:"Entities",style:{width:"100%",border:"none",margin:0},columns:P,data:S,options:{paging:!0,showFirstLastPageButtons:!1,paginationPosition:"bottom",emptyRowsWhenPaging:!0,pageSizeOptions:[10,25,50],pageSize:10,search:!1,showTitle:!0,padding:"dense"},onOrderChange:C,onPageChange:k,page:e.pageInfo.page,totalCount:a?.checkEntities.totalCount??0,isLoading:y||E,components:{Toolbar:()=>null}}))};export{A as CheckEntitiesTable};
|
|
2
2
|
//# sourceMappingURL=CheckEntitiesTable.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{MarkdownContent as
|
|
1
|
+
import{MarkdownContent as j,Content as x}from"@backstage/core-components";import{useRouteRef as q}from"@backstage/core-plugin-api";import{EntityRefLink as J}from"@backstage/plugin-catalog-react";import{usePermission as L}from"@backstage/plugin-permission-react";import{makeStyles as K,useTheme as X,Button as Y,Paper as Z,Grid as y,Card as E,CardHeader as k,CardContent as C}from"@material-ui/core";import{soundcheckCheckReadPermission as _,soundcheckCheckUpdatePermission as $,toEntityFilterQuery as w,combineEntityFilterQueries as ee}from"@spotify/backstage-plugin-soundcheck-common";import e,{useMemo as S}from"react";import{useParams as te,useNavigate as re}from"react-router-dom";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useGetChecks as ie}from"../../hooks/checks/useGetChecks.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetAllTracks as ne}from"../../hooks/tracks/useGetAllTracks.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCheckStatus as oe}from"../../hooks/aggregations/useCheckStatus.esm.js";import{useSearchParam as l}from"../../hooks/useSearchParam.esm.js";import{checkEditRouteRef as ae}from"../../routes.esm.js";import{LoadingIndicator as se}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as P}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as ce}from"../SoundcheckHeader/useHeader.esm.js";import{CheckEntitiesTable as le}from"./CheckEntitiesTable/CheckEntitiesTable.esm.js";import{CheckStatusBar as me}from"./CheckStatusBar.esm.js";import{CheckStatusHistoryChart as de}from"./CheckStatusHistoryChart.esm.js";import{CheckStatusTable as pe}from"./CheckStatusTable.esm.js";import{FilterBar as fe}from"./FilterBar/FilterBar.esm.js";const ue=t=>{const{lifecycles:n,owners:r,types:o,systems:m}=t,a=n?.length?{"spec.lifecycle":n}:void 0,d=r?.length?{"relations.ownedBy":r}:void 0,s=o?.length?{"spec.type":o}:void 0,p=m?.length?{"relations.partOf":m}:void 0;if(a||d||s||p)return{...a,...d,...s,...p}};function he(t,n){for(const r of t.levels)for(const o of r.checks)if(o.id===n)return o;return null}const ge=K(t=>({root:{height:"100%",background:t.palette.background.default},header:{backgroundColor:t.palette.background.paper,borderRadius:0,marginBottom:t.spacing(2)},content:{display:"flex",flexDirection:"column",gap:t.spacing(2),paddingTop:t.spacing(0)},editButton:{marginLeft:"auto"},filterBar:{paddingTop:t.spacing(1),paddingBottom:t.spacing(1)},headerDescription:{fontSize:t.typography.body2.fontSize,margin:t.spacing(.5,0,0),"& p":{margin:0},"& a":{color:"inherit",textDecoration:"underline"}},ownerLink:{"& span":{color:"inherit","&:hover":{textDecoration:"underline"}}}})),ye=()=>{const t=ge(),{trackId:n,checkId:r}=te(),[o,m]=l("states"),[a,d]=l("owners"),[s,p]=l("lifecycles"),[v,T]=l("types"),[I,D]=l("systems"),f=ue({lifecycles:s,owners:a,types:v,systems:I}),{data:F,isLoading:H}=ne({ids:[n??""],first:1},{enabled:!!n}),c=F?.edges?.[0]?.node,{data:G,isLoading:u}=ie({ids:[r??""],first:1}),i=G?.edges?.[0]?.node,{loading:M,allowed:z}=L({permission:_,resourceRef:r}),{loading:b,allowed:R}=L({permission:$,resourceRef:r}),B=re(),N=q(ae),O=X();let h;if(r)if(c){const V=w(c.filter),W=w(he(c,r)?.filter);h=ee(V,W,!0)}else i&&(h=w(i.filter));const{data:g}=oe({checkId:r,trackId:n,filter:f,states:o?.length?o:void 0},!!r),Q=S(()=>i?.ownerEntityRef?e.createElement(J,{color:"inherit",entityRef:i.ownerEntityRef,className:t.ownerLink}):null,[i?.ownerEntityRef,t.ownerLink]),A=S(()=>!b&&R&&i?.isEditable?e.createElement(Y,{className:t.editButton,variant:"contained",color:"primary",onClick:()=>{B(N({checkId:i.id}))}},"Edit Check"):null,[R,i?.id,i?.isEditable,t.editButton,N,b,B]),U=S(()=>i?.description?e.createElement(j,{className:t.headerDescription,content:i.description}):null,[t.headerDescription,i?.description]);return ce({title:i?.name??r??"Soundcheck",description:U,customSubtitle:Q,sectionRight:A}),e.createElement("div",null,e.createElement(P,{entityName:"track",entityId:n,showNotFound:!!n&&!H&&!c}),e.createElement(P,{entityName:"check",entityId:r,showNotFound:!u&&!i,showCannotView:i&&!M&&!z}),u&&e.createElement(se,null),!u&&!!i&&e.createElement("div",{className:t.root},e.createElement(Z,{elevation:3,className:t.header},e.createElement(x,{className:t.filterBar},e.createElement(fe,{filter:h,states:o,setStates:m,owners:a,setOwners:d,lifecycles:s,setLifecycles:p,types:v,setTypes:T,systems:I,setSystems:D}))),e.createElement(x,{className:t.content},e.createElement(y,{container:!0,spacing:2},e.createElement(y,{item:!0,xs:4},e.createElement(E,{style:{height:"100%"}},e.createElement(k,{title:"Current Status"}),e.createElement(C,null,e.createElement("div",{style:{width:"100%",height:30,display:"flex",alignItems:"flex-start"}},e.createElement(me,{checkStatus:g})),e.createElement("div",{style:{paddingTop:O.spacing(1)}},e.createElement(pe,{checkStatus:g}))))),e.createElement(y,{item:!0,xs:8},e.createElement(E,{style:{height:"100%"}},e.createElement(k,{title:"Historical Status"}),e.createElement(C,{style:{height:"90%",paddingBottom:0}},e.createElement(de,{checkId:r,trackId:n,checkStatus:g,filter:f,states:o}))))),e.createElement(E,null,e.createElement(k,{title:"Entities"}),e.createElement(C,null,e.createElement(le,{checkId:r,trackId:c?.id,filter:f,states:o}))))))};export{ye as CheckInsightsPage};
|
|
2
2
|
//# sourceMappingURL=CheckInsightsPage.esm.js.map
|