@spotify/backstage-plugin-soundcheck 0.15.1 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -0
- package/dist/alpha.d.ts +62 -47
- package/dist/api.esm.js +1 -1
- package/dist/components/Badges/CampaignBadge.esm.js +1 -1
- package/dist/components/Badges/NoLevelBadge.esm.js +1 -1
- package/dist/components/Badges/PlaylistBadge.esm.js +1 -1
- package/dist/components/CampaignForm/CampaignForm.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignOwnerField.esm.js +1 -1
- package/dist/components/CampaignForm/hooks/useCampaignForm.esm.js +1 -1
- package/dist/components/CampaignForm/hooks/utils.esm.js +1 -1
- package/dist/components/CampaignForm/utils/campaignFormUtils.esm.js +2 -1
- package/dist/components/CampaignForm/utils/validation.esm.js +1 -1
- package/dist/components/CertificationAccordion/CertificationAccordion.esm.js +1 -1
- package/dist/components/CertificationSidebar/CertificationSidebar.esm.js +1 -1
- package/dist/components/CertificationSidebar/Check.esm.js +1 -1
- package/dist/components/CertificationSidebar/CheckResultInputPopup.esm.js +2 -0
- package/dist/components/CertificationSidebar/CheckResultSummaryList.esm.js +1 -1
- package/dist/components/CertificationSidebar/ExemptionJustificationDialog.esm.js +2 -0
- package/dist/components/CertificationsPage/CertificationTab.esm.js +1 -1
- package/dist/components/CertificationsPage/CertificationTabs.esm.js +1 -1
- package/dist/components/CertificationsPage/CertificationsPage.esm.js +1 -1
- package/dist/components/CertificationsPage/Playlist/PlaylistProgress.esm.js +1 -1
- package/dist/components/CheckCard/CheckCard.esm.js +1 -1
- package/dist/components/CheckDetails/CheckDetails.esm.js +1 -1
- package/dist/components/CheckDetails/CheckResultDetails.esm.js +2 -0
- package/dist/components/CheckDetails/CollapseRow.esm.js +1 -1
- package/dist/components/CheckDetails/FactTable.esm.js +2 -0
- package/dist/components/CheckDetails/JustificationDetails.esm.js +2 -0
- package/dist/components/CheckDetails/ResolvedValueTable.esm.js +2 -0
- package/dist/components/CheckDetails/ResultStateBox.esm.js +1 -1
- package/dist/components/CheckDetails/SelectedValueContext.esm.js +2 -0
- package/dist/components/CheckDetails/findUniqueFacts.esm.js +2 -0
- package/dist/components/CheckDryRun/CheckDryRun.esm.js +1 -1
- package/dist/components/CheckDryRun/CheckDryRunContext.esm.js +1 -1
- package/dist/components/CheckDryRun/CheckDryRunDetails.esm.js +1 -1
- package/dist/components/CheckDryRun/CheckDryRunDialog.esm.js +1 -1
- package/dist/components/CheckForm/CheckForm.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/CheckPathResolverInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/CheckScheduleSection/ScheduleSection.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/CheckTypeInput/CheckTypeInput.esm.js +2 -0
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/FactValueDisplay.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/RuleConditionInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/ValueListInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/TeamDetailsInput/TeamDetailsInput.esm.js +1 -1
- package/dist/components/CheckForm/Steps/CheckDetailsStep.esm.js +1 -1
- package/dist/components/CheckForm/Steps/CheckReviewStep.esm.js +1 -1
- package/dist/components/CheckForm/Steps/CheckRulesStep.esm.js +1 -1
- package/dist/components/CheckForm/useCheckForm.esm.js +1 -1
- package/dist/components/CheckForm/utils/checkFormUtils.esm.js +2 -1
- package/dist/components/CheckForm/utils/validation.esm.js +1 -1
- package/dist/components/CheckIcon/CheckIcon.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusHistoryChart.esm.js +1 -1
- package/dist/components/CheckPage/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/AzureDevOps/AzureDevOpsConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/AzureDevOps/NumberOfDaysComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/AzureDevOps/NumberOfWorkItemsComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/AzureDevOps/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/AzureDevOps/validation.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/BigQuery/QueryFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Catalog/CatalogConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Catalog/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Common/CollectorOption.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/FactCollectionConfig.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Configurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/CodeScanningAlertsFactDetails.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/DependabotAlertsFactDetails.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/GithubConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/SecretScanningAlertsFactDetails.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/SecurityAdvisoriesFactDetails.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/types.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/validation.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/HTTP/HttpConfigurator.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/HTTP/HttpRequestComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/HTTP/HttpResponseComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/HTTP/HttpRetriesComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/HTTP/HttpStatusesInput.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/HTTP/RequestFactDetailsComponent.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/HTTP/utils.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/HTTP/validation.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/SCM/JsonFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/RegexFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/utils.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorListPage/CollectorLogo.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorListPage/CollectorSummaryCard.esm.js +1 -1
- package/dist/components/EntityChip/EntityChip.esm.js +2 -0
- package/dist/components/EntitySoundcheckCard/Card.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorer.esm.js +1 -1
- package/dist/components/Filter/EntityAutocompletePicker.esm.js +1 -1
- package/dist/components/Filter/FilterComponent.esm.js +1 -1
- package/dist/components/Filter/FilterKeyValueInput.esm.js +2 -0
- package/dist/components/Filter/FilterPreviewTable/FilterPreviewTable.esm.js +1 -1
- package/dist/components/Filter/KeyValueInputDialog.esm.js +2 -0
- package/dist/components/Filter/types.esm.js +1 -1
- package/dist/components/Filter/utils.esm.js +1 -1
- package/dist/components/FormControlledAutocomplete/FormControlledMultipleAutocomplete.esm.js +2 -0
- package/dist/components/FormControlledSelect/FormControlledSelect.esm.js +1 -1
- package/dist/components/FormFilterSection/FormFilterSection.esm.js +1 -1
- package/dist/components/Frequency/FrequencyComponent.esm.js +1 -1
- package/dist/components/GroupSelector/GroupSelector.esm.js +1 -1
- package/dist/components/OrgHealth/OrgHealthPage.esm.js +2 -0
- package/dist/components/OverviewPage/OverviewPageHeader.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/RuleResult/BranchResultComponent.esm.js +2 -0
- package/dist/components/RuleResult/ConditionResultComponent.esm.js +2 -0
- package/dist/components/RuleResult/RuleResultComponent.esm.js +2 -0
- package/dist/components/SearchBar/SearchBar.esm.js +1 -1
- package/dist/components/SoundcheckHeader/Breadcrumbs.esm.js +1 -1
- package/dist/components/SoundcheckHeader/SoundcheckHeader.esm.js +1 -1
- package/dist/components/SummaryCard/SummaryCardActionsMenu.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FacetFilter.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FilterProvider.esm.js +1 -1
- package/dist/components/TechHealthTabs/PassRateTabHeader.esm.js +1 -1
- package/dist/components/TrackEditPage/TrackEditView.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackBadgeTypeSelect/TrackBadgeTypeSelect.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackOwnerSelect/TrackOwnerSelect.esm.js +1 -1
- package/dist/components/TrackForm/TrackForm.esm.js +1 -1
- package/dist/components/TrackForm/utils/trackFormUtils.esm.js +2 -1
- package/dist/components/TrackForm/utils/useTrackForm.esm.js +1 -1
- package/dist/components/TrackForm/utils/validation.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/utils.esm.js +1 -1
- package/dist/components/TracksPage/TracksPage.esm.js +1 -1
- package/dist/graphql/generated/index.esm.js +166 -126
- package/dist/hooks/certifications/useCertificationDetailsForTrack.esm.js +1 -1
- package/dist/hooks/certifications/useTrackOverviewForOwner.esm.js +2 -0
- package/dist/hooks/checks/useDeleteCheck.esm.js +1 -1
- package/dist/hooks/checks/useSetManualResult.esm.js +2 -0
- package/dist/hooks/exemptions/useDeleteExemption.esm.js +2 -0
- package/dist/hooks/exemptions/useGetExemption.esm.js +2 -0
- package/dist/hooks/exemptions/useSetEntityExempt.esm.js +2 -0
- package/dist/hooks/facets/useFacetFilters.esm.js +1 -1
- package/dist/hooks/graphqlKeys.esm.js +1 -1
- package/dist/hooks/tracks/useCreateTrack.esm.js +1 -1
- package/dist/hooks/tracks/useDeleteTrack.esm.js +1 -1
- package/dist/hooks/tracks/useGetAllTracks.esm.js +1 -1
- package/dist/hooks/tracks/useGetChecksMap.esm.js +1 -1
- package/dist/hooks/tracks/useUpdateTrack.esm.js +1 -1
- package/dist/images/azure-devops-rgb.svg +13 -0
- package/dist/images/azure-devops-white.svg +13 -0
- package/dist/images/http-rgb.svg +11 -0
- package/dist/images/http-white.svg +11 -0
- package/dist/index.d.ts +0 -1
- package/dist/text.esm.js +1 -1
- package/dist/utils/export.esm.js +3 -3
- package/dist/utils/validation.esm.js +1 -1
- package/package.json +30 -24
- package/dist/components/CheckDryRun/checkDryRunUtils.esm.js +0 -2
- package/dist/hooks/certifications/useProgramOverviewForOwner.esm.js +0 -2
- /package/dist/components/CollectorPage/Configurators/{BigQuery → Common}/css/prism-dark-sql.css.esm.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,84 @@
|
|
|
1
1
|
# @spotify/backstage-plugin-soundcheck
|
|
2
2
|
|
|
3
|
+
## 0.16.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update to Backstage `v1.37.0`
|
|
8
|
+
- Updated dependency `@hookform/resolvers` to `^4.0.0`.
|
|
9
|
+
- Pass/fail messages now have a maximum height and will show scroll bars when needed.
|
|
10
|
+
- Checks which are not applicable or exempt are no longer shown on an entity's Soundcheck tab. Their visibility can be toggled and this option is persisted.
|
|
11
|
+
- Adds a configuration setting for MCE.
|
|
12
|
+
- Added support for the new GitHub fact types:
|
|
13
|
+
|
|
14
|
+
- Code Scanning Alerts
|
|
15
|
+
- Dependabot Alerts
|
|
16
|
+
- Secret Scanning Alerts
|
|
17
|
+
- Security Advisories
|
|
18
|
+
|
|
19
|
+
- Fix Exporting Checks and Tracks to YAML
|
|
20
|
+
- Soundcheck - Adds support for exempting an entity from a check.
|
|
21
|
+
- Soundcheck - Exporting a check now also exports the check's type when necessary.
|
|
22
|
+
- Ownership filters now only show groups matching the `soundcheck.entityFilters.groupFilter` filter if provided.
|
|
23
|
+
- Soundcheck - Adds the ability to specify a result for manual type checks.
|
|
24
|
+
- Misc UI and UX improvements on certification page.
|
|
25
|
+
- Soundcheck - Adds the ability to create manual-style checks via NCUI.
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
- Updated dependencies
|
|
31
|
+
- @spotify/backstage-plugin-core@0.8.7
|
|
32
|
+
- @spotify/backstage-plugin-soundcheck-common@0.16.1
|
|
33
|
+
|
|
34
|
+
## 0.16.0
|
|
35
|
+
|
|
36
|
+
### Minor Changes
|
|
37
|
+
|
|
38
|
+
- **Migration Required.** Add exclusion filters to check, track, campagins and integration forms.
|
|
39
|
+
- Remove unused campaginProgress graphql endpoint.
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- Update to Backstage `v1.36.0`
|
|
44
|
+
- In line with the open source Backstage framework, support for React 16 has been dropped.
|
|
45
|
+
- Adds support to the Soundcheck Track and Check insights pages for the new 'exempt' check status.
|
|
46
|
+
- Add a free form filter select to filter section on forms.
|
|
47
|
+
- Updates Soundcheck's /results endpoint to authenticate based on passed credentials, and accept results for manual checks.
|
|
48
|
+
Updates Soundcheck's /facts endpoint to authenticate based on passed credentials, and deny users without the new update facts permission.
|
|
49
|
+
Adds support for exempted check results to the backend and to display these results on the frontend.
|
|
50
|
+
- Checks now record resolved values and rule evaluation information which can be displayed on the UI.
|
|
51
|
+
- Add MUI Override name SoundcheckHeader to allow theme customization. Classes to modify: title, breadcrumbs, and headerContent.
|
|
52
|
+
- Added No-Code UI configuration option for Azure DevOps.
|
|
53
|
+
- Adds a gql endpoint for submitting manual check results.
|
|
54
|
+
- Added Generic HTTP Fact Collector.
|
|
55
|
+
- Add front-end validatiojn for exclude filters and improve filter display.
|
|
56
|
+
- Enables filtering by system, type, lifecycle, and owner on the Check Insights page.
|
|
57
|
+
- Add annotations filter to soundcheck forms.
|
|
58
|
+
- Adds a GQL endpoint for submitting entity exemptions from checks.
|
|
59
|
+
- Add label filter selection to forms.
|
|
60
|
+
- Soundcheck - Fixes a bug in a react form.
|
|
61
|
+
- Check dry runs now use cached facts if they are available.
|
|
62
|
+
- Renames programs to tracks internally.
|
|
63
|
+
- Creates a new CheckExecutionService, removing the execution functionality from FactCheckerService.
|
|
64
|
+
- Added support for check result exemption details.
|
|
65
|
+
- Adds a new check result type of 'excluded'.
|
|
66
|
+
Prevents exclusions from executing.
|
|
67
|
+
Adds a new check type of 'manual'.
|
|
68
|
+
Prevents manual checks from being executed.
|
|
69
|
+
Updates check return types to include 'notes' and 'exemptions', and makes room for additional types in the future.
|
|
70
|
+
Updates GQL schemas to handle the new types.
|
|
71
|
+
Adds a store and service for manual check entries.
|
|
72
|
+
Adds database migrations to setup the new tables for manual check entries.
|
|
73
|
+
Adds a store to handle DB operations for exemptions.
|
|
74
|
+
Adds a service to handle interrogation of the DB via the store.
|
|
75
|
+
Modifies the FactCheckerService to not execute checks for which there are exemptions.
|
|
76
|
+
Updates the possible set of result states to include the 'exempt' state.
|
|
77
|
+
- Updated Software Catalog Fact Collector to be configurable (schedule, filters and caching).
|
|
78
|
+
- Updated dependencies
|
|
79
|
+
- @spotify/backstage-plugin-core@0.8.6
|
|
80
|
+
- @spotify/backstage-plugin-soundcheck-common@0.16.0
|
|
81
|
+
|
|
3
82
|
## 0.15.1
|
|
4
83
|
|
|
5
84
|
### Patch Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _backstage_core_plugin_api__ from '@backstage/core-plugin-api/*';
|
|
2
2
|
import * as _backstage_catalog_model_index from '@backstage/catalog-model/index';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
+
import * as _backstage_plugin_catalog_react_alpha from '@backstage/plugin-catalog-react/alpha';
|
|
4
5
|
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
5
|
-
import * as _backstage_core_plugin_api_index from '@backstage/core-plugin-api/index';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @public
|
|
@@ -15,27 +15,35 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
15
15
|
name: undefined;
|
|
16
16
|
config: {};
|
|
17
17
|
configInput: {};
|
|
18
|
-
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<
|
|
18
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
|
|
19
19
|
inputs: {};
|
|
20
20
|
params: {
|
|
21
|
-
factory:
|
|
21
|
+
factory: _backstage_frontend_plugin_api.AnyApiFactory;
|
|
22
22
|
};
|
|
23
23
|
}>;
|
|
24
|
-
"
|
|
25
|
-
kind: "
|
|
26
|
-
name:
|
|
27
|
-
config: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
"entity-card:soundcheck/card": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
25
|
+
kind: "entity-card";
|
|
26
|
+
name: "card";
|
|
27
|
+
config: {
|
|
28
|
+
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
29
|
+
type: "content" | "summary" | "info" | undefined;
|
|
30
|
+
};
|
|
31
|
+
configInput: {
|
|
32
|
+
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
33
|
+
type?: "content" | "summary" | "info" | undefined;
|
|
34
|
+
};
|
|
35
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model_index.Entity) => boolean, "catalog.entity-filter-function", {
|
|
36
|
+
optional: true;
|
|
37
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
38
|
+
optional: true;
|
|
39
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_plugin_catalog_react_alpha.EntityCardType, "catalog.entity-card-type", {
|
|
40
|
+
optional: true;
|
|
41
|
+
}>;
|
|
34
42
|
inputs: {};
|
|
35
43
|
params: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
loader: () => Promise<JSX.Element>;
|
|
45
|
+
filter?: string | _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model_index.Entity) => boolean);
|
|
46
|
+
type?: _backstage_plugin_catalog_react_alpha.EntityCardType;
|
|
39
47
|
};
|
|
40
48
|
}>;
|
|
41
49
|
"entity-content:soundcheck/entity": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
@@ -44,12 +52,14 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
44
52
|
config: {
|
|
45
53
|
path: string | undefined;
|
|
46
54
|
title: string | undefined;
|
|
47
|
-
filter:
|
|
55
|
+
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
56
|
+
group: string | false | undefined;
|
|
48
57
|
};
|
|
49
58
|
configInput: {
|
|
50
|
-
filter?:
|
|
59
|
+
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
51
60
|
title?: string | undefined;
|
|
52
61
|
path?: string | undefined;
|
|
62
|
+
group?: string | false | undefined;
|
|
53
63
|
};
|
|
54
64
|
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", {
|
|
55
65
|
optional: true;
|
|
@@ -57,34 +67,17 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
57
67
|
optional: true;
|
|
58
68
|
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
59
69
|
optional: true;
|
|
70
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-group", {
|
|
71
|
+
optional: true;
|
|
60
72
|
}>;
|
|
61
73
|
inputs: {};
|
|
62
74
|
params: {
|
|
63
75
|
loader: () => Promise<JSX.Element>;
|
|
64
76
|
defaultPath: string;
|
|
65
77
|
defaultTitle: string;
|
|
66
|
-
|
|
67
|
-
|
|
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_index.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_index.Entity) => boolean) | undefined;
|
|
78
|
+
defaultGroup?: ("development" | "documentation" | "deployment" | "observability") | (string & {});
|
|
79
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
80
|
+
filter?: string | _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model_index.Entity) => boolean);
|
|
88
81
|
};
|
|
89
82
|
}>;
|
|
90
83
|
"entity-content:soundcheck/group": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
@@ -93,12 +86,14 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
93
86
|
config: {
|
|
94
87
|
path: string | undefined;
|
|
95
88
|
title: string | undefined;
|
|
96
|
-
filter:
|
|
89
|
+
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
90
|
+
group: string | false | undefined;
|
|
97
91
|
};
|
|
98
92
|
configInput: {
|
|
99
|
-
filter?:
|
|
93
|
+
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
100
94
|
title?: string | undefined;
|
|
101
95
|
path?: string | undefined;
|
|
96
|
+
group?: string | false | undefined;
|
|
102
97
|
};
|
|
103
98
|
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
99
|
optional: true;
|
|
@@ -106,14 +101,34 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
106
101
|
optional: true;
|
|
107
102
|
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
108
103
|
optional: true;
|
|
104
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-group", {
|
|
105
|
+
optional: true;
|
|
109
106
|
}>;
|
|
110
107
|
inputs: {};
|
|
111
108
|
params: {
|
|
112
109
|
loader: () => Promise<JSX.Element>;
|
|
113
110
|
defaultPath: string;
|
|
114
111
|
defaultTitle: string;
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
defaultGroup?: ("development" | "documentation" | "deployment" | "observability") | (string & {});
|
|
113
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
114
|
+
filter?: string | _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model_index.Entity) => boolean);
|
|
115
|
+
};
|
|
116
|
+
}>;
|
|
117
|
+
"nav-item:soundcheck": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
118
|
+
kind: "nav-item";
|
|
119
|
+
name: undefined;
|
|
120
|
+
config: {};
|
|
121
|
+
configInput: {};
|
|
122
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
|
|
123
|
+
title: string;
|
|
124
|
+
icon: _backstage_core_plugin_api__.IconComponent;
|
|
125
|
+
routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
126
|
+
}, "core.nav-item.target", {}>;
|
|
127
|
+
inputs: {};
|
|
128
|
+
params: {
|
|
129
|
+
title: string;
|
|
130
|
+
icon: _backstage_core_plugin_api__.IconComponent;
|
|
131
|
+
routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
117
132
|
};
|
|
118
133
|
}>;
|
|
119
134
|
"page:soundcheck/SoundcheckRoutingPage": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
@@ -132,7 +147,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
132
147
|
params: {
|
|
133
148
|
defaultPath: string;
|
|
134
149
|
loader: () => Promise<JSX.Element>;
|
|
135
|
-
routeRef?: _backstage_frontend_plugin_api.RouteRef
|
|
150
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
136
151
|
};
|
|
137
152
|
}>;
|
|
138
153
|
"page:soundcheck/overview": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
@@ -151,7 +166,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
151
166
|
params: {
|
|
152
167
|
defaultPath: string;
|
|
153
168
|
loader: () => Promise<JSX.Element>;
|
|
154
|
-
routeRef?: _backstage_frontend_plugin_api.RouteRef
|
|
169
|
+
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
155
170
|
};
|
|
156
171
|
}>;
|
|
157
172
|
}>;
|
package/dist/api.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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
|
|
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 y=c({id:"plugin.soundcheck"}),o=n=>"response"in n&&"errors"in n.response,g=n=>"response"in n&&"message"in n.response;class l{#s;#a;#t;constructor(t){this.#s=t.fetchApi,this.#a=t.discoveryApi;const e=new h("/graphql",{fetch:async(s,a)=>{const i=`${await this.#a.getBaseUrl("soundcheck")}${s}`;return this.#s.fetch(i,a)}});this.#t=u(e)}#n=t=>o(t)?t.response?.errors?.[0].message??`${t}`:g(t)?t.response.message:`${t}`;#e=async t=>{try{return await t()}catch(e){throw new Error(`Error from Soundcheck backend: ${this.#n(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,s){return this.#e(async()=>{const{trackCertification:a}=await this.#t.getCertificationDetailsForTrack({entityRef:t,trackId:e,includeFilteredChecks:s});return a})}async getCheckResultDetails(t,e,s){return this.#e(async()=>{const{checkResult:a}=await this.#t.getCheckResultDetails({entityRef:t,trackId:e,checkId:s});return a})}async getFacetsForOwner(t){return this.#e(async()=>{const{facetsForOwner:e}=await this.#t.getFacetsForOwner({ownerEntityRef:t});return e})}async getTrackOverviewForOwner(t,e,s,a,i){return this.#e(async()=>{const{trackOverviewForOwner:r}=await this.#t.getTrackOverviewForOwner({ownerEntityRef:t,facet:e,first:s,after:a,entitySearch:i});return r})}async getTracks(t){return this.#e(async()=>{const{tracks:e}=await this.#t.getTracks({filter:t});return e})}async createTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.createTrack({input:t});return e})}async updateTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.updateTrack({input:t});return e})}async deleteTrack(t){return this.#e(async()=>{const{trackDeleted:e}=await this.#t.deleteTrack({trackId: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 getCheck(t){return this.#e(async()=>await this.#t.getCheck({id: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 setEntityExempt(t){return this.#e(async()=>{const{setEntityExempt:e}=await this.#t.setEntityExempt({input:t});return e})}async setManualCheckResult(t){return this.#e(async()=>await this.#t.setManualCheckResult({input:t}))}async deleteExemption(t,e){return this.#e(async()=>await this.#t.deleteExemption({checkId:t,entityRef:e}))}async getExemption(t,e){return this.#e(async()=>await this.#t.getExemption({checkId:t,entityRef: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:s}=await this.#t.getFactSchemas({collectorId:t,factName:e});return s})}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 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 getCheckStatuses(t){return this.#e(async()=>(await this.#t.getCheckStatuses({input:t})).checkStatuses)}async getCheckStatusHistory(t){return this.#e(async()=>(await this.#t.getCheckStatusHistory({input:t})).checkStatusHistory)}async getCheckStatusHistories(t){return this.#e(async()=>(await this.#t.getCheckStatusHistories({input:t})).checkStatusHistories)}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,y as soundcheckApiRef};
|
|
2
2
|
//# sourceMappingURL=api.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as t}from"@material-ui/core";import m from"classnames";import a from"react";import{BaseBadge as s}from"./BaseBadge.esm.js";const l=t({root:{borderColor:"currentColor",borderStyle:"solid"}}),
|
|
1
|
+
import{makeStyles as t}from"@material-ui/core";import m from"classnames";import a from"react";import{BaseBadge as s}from"./BaseBadge.esm.js";const l=t({root:{borderColor:"currentColor",borderStyle:"solid"}}),c=({className:o,size:r="small"})=>{const e=l();return a.createElement(s,{className:m(o,e.root),size:r,label:"C"})};export{c as CampaignBadge};
|
|
2
2
|
//# sourceMappingURL=CampaignBadge.esm.js.map
|
|
@@ -2,5 +2,5 @@ import{MarkdownContent as a}from"@backstage/core-components";import{makeStyles a
|
|
|
2
2
|
**No Level / Not Certified**
|
|
3
3
|
|
|
4
4
|
Pass all checks within a level to earn a certification badge.
|
|
5
|
-
`,
|
|
5
|
+
`,c=s(e=>({root:{borderColor:e.palette.text.disabled,borderStyle:"dashed",color:e.palette.text.disabled}})),d=({className:e,showTooltip:o,size:l="small"})=>{const r=c();return t.createElement(m,{className:i(e,r.root),size:l,label:"NL",tooltip:o?t.createElement(a,{content:n}):null})};export{d as NoLevelBadge};
|
|
6
6
|
//# sourceMappingURL=NoLevelBadge.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as t}from"@material-ui/core";import s from"classnames";import l from"react";import{BaseBadge as m}from"./BaseBadge.esm.js";const a=t({root:{borderColor:"currentColor",borderStyle:"solid"}}),
|
|
1
|
+
import{makeStyles as t}from"@material-ui/core";import s from"classnames";import l from"react";import{BaseBadge as m}from"./BaseBadge.esm.js";const a=t({root:{borderColor:"currentColor",borderStyle:"solid"}}),c=({className:o,size:r="small"})=>{const e=a();return l.createElement(m,{className:s(o,e.root),size:r,label:"\u25BA"})};export{c as PlaylistBadge};
|
|
2
2
|
//# sourceMappingURL=PlaylistBadge.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Content as
|
|
1
|
+
import{Content as E}from"@backstage/core-components";import e from"react";import{FormProvider as k}from"react-hook-form";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import{useCampaignFormContext as y}from"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import L from"../../hooks/useFeatureFlag.esm.js";import{formStyles as x}from"../../utils/formStyles.esm.js";import{FormFilterSection as M}from"../FormFilterSection/FormFilterSection.esm.js";import{FormStepper as N}from"../FormStepper/FormStepper.esm.js";import{useCampaignForm as V}from"./hooks/useCampaignForm.esm.js";import{CampaignDetailsStep as v}from"./Steps/CampaignDetailsStep/CampaignDetailsStep.esm.js";import{CampaignTrackStep as A}from"./Steps/CampaignTrackStep.esm.js";import{CampaignMilestonesStep as D}from"./Steps/CampaignMilestonesStep.esm.js";import{StepNameMapping as O}from"./types/CampaignFormTypes.esm.js";import{CAMPAIGN_FIELDS as I}from"./utils/campaignFormUtils.esm.js";var c=(t=>(t.Details="Enter campaign details",t.Checks="Add checks",t.Entities="Choose the affected entities (Optional)",t.Milestones="Set campaign milestones",t))(c||{});const K=({onSave:t,onCancel:d,selectedCampaign:a})=>{const f=x(),{isLoading:r,isReadOnly:g}=y(),{formMethods:n,onSubmit:m,checkChips:S,checksLoading:u}=V(t,a),{getValues:C,control:i,formState:{errors:o},handleSubmit:l,trigger:h}=n,s=C(),F=s.detailsStep.startDate;L("debugMode")&&console.log(s);const p=[{label:"Enter campaign details",content:()=>e.createElement(v,{control:i,isLoading:r,disabled:!1,errors:o.detailsStep,startDate:F})},{label:"Add checks",content:()=>e.createElement(A,{control:i,isLoading:r||u,disabled:!1,errors:o.tracksStep,checkChips:S})},{label:"Choose the affected entities (Optional)",content:()=>e.createElement(M,{name:"filtersStep.filter",keyValueFilterName:"filtersStep.keyValueFilter",description:I.filter.description,excludeFilterName:"filtersStep.excludeFilter",excludeKeyValueFilterName:"filtersStep.excludeKeyValueFilter"})},{label:"Set campaign milestones",content:()=>e.createElement(D,{control:i,isLoading:r,disabled:!1,errors:o.milestonesStep})}],b=a?[...Array(p.length).keys()]:[0];return e.createElement(e.Fragment,null,e.createElement(E,{className:f.formWrapper},e.createElement(k,{...n},e.createElement("form",{onSubmit:l(m)},e.createElement(N,{onClose:d,handleSubmit:l,trigger:h,onSubmit:m,initialVisited:b,stepNameMap:O,steps:p,isLoading:r,isReadOnly:g,saveButtonText:"Save Campaign"})))))};export{K as CampaignForm,c as CampaignStepLabel};
|
|
2
2
|
//# sourceMappingURL=CampaignForm.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as u,Typography as
|
|
1
|
+
import{makeStyles as u,Typography as n}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"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"react-hook-form";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelOptions as b}from"../../../FormControlledAutocomplete/useLabelOptions.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:l,isLoading:p,disabled:s})=>{const o=w(),{owner:i}=h.details,{options:c}=v(),{user:d,userEntityRef:a}=E();let r=g(c?.map(m=>({value:m.ref,label:m.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(n,{variant:"subtitle2"},i.name),e.createElement(n,{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:l?.ownerEntityRef?.message??void 0,...f})))};export{x as CampaignOwnerField};
|
|
2
2
|
//# sourceMappingURL=CampaignOwnerField.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{zodResolver as
|
|
1
|
+
import{zodResolver as c}from"@hookform/resolvers/zod";import{useMemo as u}from"react";import{useForm as f}from"react-hook-form";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import"../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as h}from"../../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{useGetChecksMap as g}from"../../../hooks/tracks/useGetChecksMap.esm.js";import{DEFAULT_FORM_VALUES as C}from"../utils/campaignFormUtils.esm.js";import{campaignFormSchema as d}from"../utils/validation.esm.js";import{mapCampaignToFormValues as l,mapCampaignFormDataToCampaignInput as F}from"./utils.esm.js";const M=(r,o)=>{const a=u(()=>o?l(o):C,[o]),e=f({defaultValues:a,mode:"onChange",resolver:c(d)}),{showModal:t}=h(),{checksMap:i,checkChips:p,checksLoading:s}=g();return{formMethods:e,onSubmit:async m=>{if(!await t({title:"Save Campaign",message:`Are you sure you want to save campaign: ${m.detailsStep.name}?`,error:!1}))return;const n=F(m,o,i);r(n)},checkChips:p,checksLoading:s}};export{M as useCampaignForm};
|
|
2
2
|
//# sourceMappingURL=useCampaignForm.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{v4 as
|
|
1
|
+
import{v4 as C}from"uuid";import{mapInputFilterToFormFilters as d,mapCatalogFilterToFormKeyValueFilters as u}from"../../Filter/utils.esm.js";import"../../Filter/FilterComponent.esm.js";import{mapTrackFormToInput as S}from"../../TrackForm/utils/useTrackForm.esm.js";const h=({name:l,ownerEntityRef:a,description:p,targetCompletionDate:o,supportChannel:i,milestones:s,startDate:r,track:t})=>({detailsStep:{name:l,description:p,ownerEntityRef:a,supportChannel:i,startDate:r,targetCompletionDate:o},tracksStep:{checks:t?.levels?.[0].checks.map(e=>({id:e.id,name:e.name??e.id,description:e.description}))},filtersStep:{filter:d(t.filter),keyValueFilter:u(t.filter),excludeFilter:d(t.exclude),excludeKeyValueFilter:u(t.exclude)},milestonesStep:{milestones:s.map(e=>({id:Number(e.id),name:e.name,description:e.description,passRate:e.targetPercent.toString()}))}}),D=(l,a,p)=>{const{tracksStep:{checks:o},detailsStep:{name:i,description:s,ownerEntityRef:r,supportChannel:t,startDate:e,targetCompletionDate:m},filtersStep:n,milestonesStep:{milestones:F}}=l,c=S({detailsStep:{name:`${i}`,description:`The checks for the ${i} campaign.`,ownerEntityRef:r},levelsStep:{levels:[{name:"Level 1",checks:o,description:""}]},filtersStep:{filter:n.filter,keyValueFilter:n.keyValueFilter,excludeFilter:n.excludeFilter,excludeKeyValueFilter:n.excludeKeyValueFilter}},p??{},a?.track);return{id:a?.id??C(),track:{...c,type:"campaign"},name:i,description:s,ownerEntityRef:r,supportChannel:t,startDate:e,targetCompletionDate:m,milestones:F.map(({id:f,name:k,description:g,passRate:y})=>({id:f,trackId:c.id,name:k,description:g,targetPercent:parseInt(y,10),targetCompletionDate:m}))}};export{D as mapCampaignFormDataToCampaignInput,h as mapCampaignToFormValues};
|
|
2
2
|
//# sourceMappingURL=utils.esm.js.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{emptyFilters as e,emptyKeyValueFilters as t}from"../../Filter/types.esm.js";import{CAMPAIGN_NAME_MAX_LENGTH as a,MILESTONE_NAME_MAX_LENGTH as i}from"./validation.esm.js";const n={detailsStep:{name:"",description:"",ownerEntityRef:"",supportChannel:"",startDate:null,targetCompletionDate:null},tracksStep:{checks:[]},filtersStep:{filter:e(),keyValueFilter:t(),excludeFilter:e(),excludeKeyValueFilter:t()},milestonesStep:{milestones:[{name:"",description:"",passRate:"0"}]}},l={details:{name:{name:"Campaign name",helperText:`Max ${a} characters`,placeholder:"Example: Check for latest version of javascript and Readme files"},description:{name:"Campaign description",placeholder:"Example: Check for the latest versions of JavaScript and README files to meet this quarter's quality standards."},owner:{name:"Campaign owner",description:"Add a team as the owner of this Campaign."},support:{name:"Support channel (Optional)",description:"Set up a Slack channel for notifications.",placeholder:"Channel name"},startingDate:{name:"Starting date",placeholder:"Starting date"},endingDate:{name:"Ending date",placeholder:"Ending date"}},milestones:{name:{name:"Milestone name",helperText:`Max ${i} characters`,placeholder:"Example: 80% pass rate"},description:{name:"Milestone description",description:"Provide a detailed description of this milestone, outlining its objectives.",placeholder:"Example: The track in my campaign expects a pass rate of 80% or above"},passrate:{name:"Milestone pass rate",description:"Enter the pass rate that your tracks have to meet.",placeholder:"Example: 80%"}},filter:{description:`Use the filters below to narrow the scope of the Campaign. Only Entities that match the selected include and exclude filters will be monitored. Exclude filters must be used with with an include filter.
|
|
2
|
+
For example, selecting an include filter of 'Kind' as 'Component' and an exclude filter of 'Type' as 'Service' will select all entities with kind Component where type is NOT Service.`}};export{l as CAMPAIGN_FIELDS,n as DEFAULT_FORM_VALUES};
|
|
2
3
|
//# sourceMappingURL=campaignFormUtils.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{TrackCheckSchema as o,CampaignDetailsSchema as S}from"@spotify/backstage-plugin-soundcheck-common";import{z as t}from"zod";import{CHECK_IS_REQUIRED_MSG as p,FIELD_IS_REQUIRED_MSG as a,
|
|
1
|
+
import{TrackCheckSchema as o,CampaignDetailsSchema as S}from"@spotify/backstage-plugin-soundcheck-common";import{z as t}from"zod";import{CHECK_IS_REQUIRED_MSG as p,FIELD_IS_REQUIRED_MSG as a,formFiltersSchema as E}from"../../../utils/validation.esm.js";const r=0,i=100,_=100,s=100,c="Ending date must come after the Starting Date",l=t.strictObject({checks:t.array(o.extend({key:t.string().optional()})).min(1,p)}),g=t.strictObject({id:t.number().optional(),name:t.string().min(1,a).max(s,`Input must be less than ${s} characters`),description:t.string().min(1,a),passRate:t.coerce.number().min(r,`Minimum pass rate is ${r}%`).max(i,`Maximum pass rate is ${i}%`)}),D=t.strictObject({milestones:t.array(g).min(1,a)}),m=t.coerce.string().nullable().refine(e=>e!==null,{message:a}),M=t.strictObject({startDate:m,targetCompletionDate:m}),A=({startDate:e,targetCompletionDate:n})=>e&&n?new Date(e)<new Date(n):!0,T=S.merge(M),h=e=>e.refine(A,{message:c,path:["targetCompletionDate"]}),I=t.strictObject({detailsStep:h(T),tracksStep:l,filtersStep:E,milestonesStep:D});export{_ as CAMPAIGN_NAME_MAX_LENGTH,c as END_AFTER_START_DATE_MSG,i as MILESTONE_MAX_PASS_RATE,r as MILESTONE_MIN_PASS_RATE,s as MILESTONE_NAME_MAX_LENGTH,m as campaignDateTimeSchema,I as campaignFormSchema};
|
|
2
2
|
//# sourceMappingURL=validation.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useEntity as
|
|
1
|
+
import{useEntity as f}from"@backstage/plugin-catalog-react";import{styled as o,Accordion as g,AccordionSummary as E,AccordionDetails as b,makeStyles as k,Box as y}from"@material-ui/core";import R from"@material-ui/icons/ExpandMore";import e,{useRef as h}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{useCertificationDetailsForTrack as x}from"../../hooks/certifications/useCertificationDetailsForTrack.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{AlertPanel as v}from"../AlertPanel/AlertPanel.esm.js";import"../CertificationSidebar/CertificationSidebar.esm.js";import{CertificationSummary as I}from"../CertificationSidebar/CertificationSummary.esm.js";import{CertificationSidebarSkeleton as T}from"../CertificationSidebar/skeletons/CertificationSidebarSkeleton.esm.js";import"@material-ui/lab";import{CertificationLevel as C}from"../CertificationSidebar/CertificationLevel.esm.js";const L=o(g)(({theme:t})=>({margin:"0",border:`1px solid ${t.palette.divider}`,borderRadius:0,"&.Mui-expanded":{borderRadius:0},"&:first-child":{borderTopLeftRadius:0,borderTopRightRadius:0},"&:last-child":{borderBottomLeftRadius:0,borderBottomRightRadius:0},"&:not(:first-child)":{borderTop:`1px solid ${t.palette.divider}`},"&:not(:last-child)":{marginBottom:t.spacing(1)}})),S=o(({...t})=>e.createElement(E,{classes:{content:"content",expanded:"expanded"},...t}))(({theme:t})=>({borderRadius:0,paddingTop:0,paddingLeft:0,paddingRight:t.spacing(1),"& > .content":{margin:"0 !important",padding:"0 !important"},"& > .content.expanded":{margin:"0 !important",padding:"0 !important"}})),A=o(b)(()=>({margin:"0 !important",borderRadius:0,padding:0})),n=k(()=>({sidebar:{width:"100%"}})),B=({playlistId:t,trackId:i,checkId:d})=>{const m=n(),{entity:c}=f(),l=h(null),{data:r,isLoading:p,isError:s}=x(c,i);if(s)return e.createElement("div",null,e.createElement(y,{padding:2},e.createElement(v,{severity:"error",title:"Error loading certification"})));if(p||!i)return e.createElement(T,null);if(!r)return null;const u=r.track.type==="campaign";return e.createElement(L,{ref:l,defaultExpanded:!0,elevation:0},e.createElement(S,{expandIcon:e.createElement(R,null),"aria-controls":"certification-content",id:"certification-summary"},e.createElement(I,{name:r.track.name,badge:r.track.badge,description:r.track.description,documentationUrl:r.track.documentationURL,trackType:r.track.type})),e.createElement(A,null,e.createElement("div",{className:m.sidebar},r?.levels.map(a=>e.createElement(C,{key:a.ordinal,level:a,checkId:d,trackId:i,playlistId:t,isCampaign:u})))))};export{B as CertificationAccordion,n as useStyles};
|
|
2
2
|
//# sourceMappingURL=CertificationAccordion.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useEntity as
|
|
1
|
+
import{useEntity as k}from"@backstage/plugin-catalog-react";import{makeStyles as y,Box as E}from"@material-ui/core";import e from"react";import{ResultState as o}from"../../graphql/generated/index.esm.js";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useCertificationDetailsForTrack as g}from"../../hooks/certifications/useCertificationDetailsForTrack.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{AlertPanel as S}from"../AlertPanel/AlertPanel.esm.js";import{CertificationLevel as b}from"./CertificationLevel.esm.js";import{CertificationSummary as h}from"./CertificationSummary.esm.js";import{CertificationSidebarSkeleton as v}from"./skeletons/CertificationSidebarSkeleton.esm.js";import"@material-ui/lab";const x=y(()=>({checks:{padding:0,margin:0,flex:1,listStyle:"none"}})),C=({playlistId:m,trackId:a,checkId:l,showNotApplicable:c,showExempt:n})=>{const{entity:p}=k(),{data:t,isLoading:s,isError:d}=g(p,a,!0);if(d)return e.createElement("div",null,e.createElement(E,{padding:2},e.createElement(S,{severity:"error",title:"Error loading certification"})));if(s||!a)return e.createElement(v,null);if(!t)return null;const f=t.track.type==="campaign",u=t.levels.map(r=>({...r,checks:r.checks?.filter(i=>c&&i.result===o.NotApplicable||n&&i.result===o.Exempt||i.result!==o.NotApplicable&&i.result!==o.Exempt)}));return e.createElement("div",null,e.createElement(h,{name:t.track.name,badge:t.track.badge,description:t.track.description,documentationUrl:t.track.documentationURL,trackType:t.track.type}),u.map(r=>e.createElement(b,{key:r.ordinal,level:r,checkId:l,trackId:a,playlistId:m,isCampaign:f})))};export{C as CertificationSidebar,x as useStyles};
|
|
2
2
|
//# sourceMappingURL=CertificationSidebar.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{stringifyEntityRef as
|
|
1
|
+
import{stringifyEntityRef as p}from"@backstage/catalog-model";import{useEntity as b}from"@backstage/plugin-catalog-react";import{makeStyles as C,Box as $,Typography as v,Tooltip as N,IconButton as I,CircularProgress as R}from"@material-ui/core";import S from"@material-ui/icons/Refresh";import T from"classnames";import e from"react";import{Link as z}from"react-router-dom";import{ResultState as h}from"../../graphql/generated/index.esm.js";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetExemption as A}from"../../hooks/exemptions/useGetExemption.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useExecuteCheck as w}from"../../hooks/checks/useExecuteCheck.esm.js";import{CheckIcon as B}from"../CheckIcon/CheckIcon.esm.js";import{RelativeTime as F}from"../RelativeTime/RelativeTime.esm.js";const u=C(t=>({root:{display:"flex",width:"100%",gridTemplateColumns:"auto 1fr auto 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}},checkIcon:{height:20}})),G=({className:t,href:r,name:c,children:a})=>r?e.createElement(z,{"aria-label":`select check ${c}`,to:r,className:t},a):e.createElement("div",{className:t},a),L=({result:t,name:r,id:c,timestamp:a,isExecutable:m=!1,selected:d=!1,href:f})=>{const n=u(),k=T(n.root,{selected:d}),{entity:i}=b(),{mutateAsync:y,isLoading:l}=w(),{data:s}=A(p(i),c),E=async()=>{if(!(!i||!c))try{await y({checkerId:c,entityRef:p(i),shouldRefreshFacts:!0})}catch{}},g=!i||!c||!m||l||!!s?.exemption||t===h.NotApplicable,x=()=>{const o="Cannot execute check";return i?c?m?l?`${o} - check is already executing.`:s?.exemption?`${o} - entity has been exempted from this check.`:t===h.NotApplicable?`${o} - check is not applicable to entity.`:"Execute Check":`${o} - check is not executable by Soundcheck`:`${o} - no check id.`:`${o} - no entity.`};return e.createElement(G,{href:f,className:k,name:r},e.createElement(B,{className:n.checkIcon,result:t}),e.createElement($,{flex:1},e.createElement(v,{variant:"body2"},r)),a&&!l?e.createElement(F,{timestamp:a}):null,!l&&e.createElement(e.Fragment,null,e.createElement(N,{title:x()},e.createElement("span",null,e.createElement(I,{size:"small",color:"inherit",onClick:E,disabled:g,"aria-label":"Execute Check"},e.createElement(S,{fontSize:"small"}))))),l&&e.createElement(R,{color:"inherit",size:"1em"}))};export{L as Check,u as useStyles};
|
|
2
2
|
//# sourceMappingURL=Check.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{makeStyles as g,DialogContent as f,Box as h,Typography as S,Select as C,MenuItem as E,TextField as b,DialogActions as k,Button as r}from"@material-ui/core";import e from"react";import{ResultState as c}from"../../graphql/generated/index.esm.js";import{FormFieldLabel as s}from"../FormFieldLabel/FormFieldLabel.esm.js";import{SoundcheckDialog as v}from"../SoundcheckDialog/SoundcheckDialog.esm.js";const m=g(a=>({buttonArea:{paddingLeft:a.spacing(1),paddingBottom:0,justifyContent:"flex-start"},content:{minWidth:600,width:"61.8%",marginTop:a.spacing(0),paddingLeft:a.spacing(1),paddingTop:a.spacing(0)}})),y=({isOpen:a,setIsOpen:n,setCallback:u})=>{const l=m(),[i,p]=e.useState(c.Passed),[o,d]=e.useState("");return e.createElement(v,{title:"Set Check Status",open:a,handleClose:()=>n(!1),fullScreen:!1},e.createElement(f,{className:l.content},e.createElement(h,{marginBottom:2},e.createElement(s,{title:"State"}),e.createElement(S,{variant:"caption"},"Set the state of the check for this entity."),e.createElement(C,{labelId:"result-state-label",value:i,onChange:t=>p(t.target.value),label:"Select State",variant:"outlined",fullWidth:!0,margin:"dense"},Object.values(c).map(t=>e.createElement(E,{key:t,value:t},t)))),e.createElement(s,{title:"Justification"}),e.createElement(b,{margin:"dense",fullWidth:!0,value:o,variant:"outlined",inputProps:{"aria-label":"Check Status Justification"},onChange:t=>d(t.target.value)})),e.createElement(k,{className:l.buttonArea},e.createElement(r,{onClick:()=>{n(!1),u(i,o)},color:"primary",variant:"contained"},"Submit"),e.createElement(r,{onClick:()=>n(!1),color:"primary"},"Cancel")))};export{y as CheckResultInputPopup,m as useStyles};
|
|
2
|
+
//# sourceMappingURL=CheckResultInputPopup.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useRouteRef as
|
|
1
|
+
import{useRouteRef as l}from"@backstage/core-plugin-api";import{makeStyles as k,Typography as h}from"@material-ui/core";import c from"react";import{useExecutableChecks as y}from"../../hooks/checks/useExecutableChecks.esm.js";import{certificationRouteRef as f,certificationPlaylistTrackCheckRouteRef as u}from"../../routes.esm.js";import{Check as g}from"./Check.esm.js";const r=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"}}})),I=({checks:e,playlistId:o,trackId:i,checkId:s})=>{const a=r(),m=l(f),d=l(u),{data:n,isLoading:p}=y();return e.length?c.createElement("ul",{className:a.checks},e.map(t=>c.createElement("li",{key:t.id,className:a.checkItem},c.createElement(g,{...t,isExecutable:!p&&n?.includes(t.id),selected:t.id===s,href:o?d({playlistId:o,trackId:i,checkId:t.id}):m({trackId:i,checkId:t.id})})))):c.createElement(h,{variant:"body2",className:a.noChecks},"No applicable checks at this level. Toggle your visibility settings to see not applicable checks.")};export{I as CheckResultSummaryList,r as useStyles};
|
|
2
2
|
//# sourceMappingURL=CheckResultSummaryList.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{makeStyles as k,DialogContent as S,Box as b,Typography as w,TextField as R,FormHelperText as C,DialogActions as A,Button as u}from"@material-ui/core";import t,{useState as f,useEffect as F,useCallback as x}from"react";import{ResultState as T}from"../../graphql/generated/index.esm.js";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"@spotify/backstage-plugin-soundcheck-common";import{useSoundcheckAlert as D}from"../../hooks/useSoundcheckAlert.esm.js";import{useGetExemption as L}from"../../hooks/exemptions/useGetExemption.esm.js";import{useSetEntityExempt as I}from"../../hooks/exemptions/useSetEntityExempt.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{useDeleteExemption as J}from"../../hooks/exemptions/useDeleteExemption.esm.js";import{FormFieldLabel as j}from"../FormFieldLabel/FormFieldLabel.esm.js";import{SoundcheckDialog as B}from"../SoundcheckDialog/SoundcheckDialog.esm.js";const y=k(e=>({buttonArea:{paddingLeft:e.spacing(1),paddingBottom:0,justifyContent:"flex-start"},content:{minWidth:480,width:"61.8%",marginTop:e.spacing(0),paddingLeft:e.spacing(1),paddingTop:e.spacing(0)}})),N=({entityRef:e,checkId:n,isOpen:g,setIsOpen:a})=>{const[P,r]=f(),{showAlert:m}=D(),l=y(),[o,s]=f(""),{mutateAsync:p}=I(),{mutateAsync:c}=J(),{data:i,isLoading:d}=L(e,n);F(()=>{i?.exemption&&s(i.exemption.justification)},[i?.exemption]);const E=x(async()=>{!e||!n||await p({checkId:n,entityRef:e,justification:o})&&r({id:n,entityRef:e,result:T.Exempt,details:{notes:{type:"notes",data:o,version:1}},facts:[],ruleResults:[]})},[e,n,o,p,r]),h=x(async()=>{if(!(!e||!n))try{await c({checkId:n,entityRef:e})}catch{m({severity:"error",title:"Failure",message:"Failed to delete exemption."})}},[e,n,c,m]);return t.createElement(t.Fragment,null,d&&t.createElement("div",null,"Loading..."),!d&&t.createElement(B,{open:g,handleClose:()=>a(!1),title:i?.exemption?"Remove Exemption?":"Justify Exemption",fullScreen:!1},t.createElement(S,{className:l.content},t.createElement(b,null,t.createElement(j,{title:i?.exemption?"Existing Justification":"Exemption Justification"}),!i?.exemption&&t.createElement(w,{variant:"caption"},"Please explain why this exemption is necessary. Supports limited markdown."),t.createElement(R,{disabled:!!i?.exemption,variant:"outlined",margin:"dense",fullWidth:!0,value:o,inputProps:{"aria-label":"Exemption Reason"},multiline:!0,onChange:v=>s(v.target.value)}),t.createElement(C,null,"Note: The act of adding or removing an exemption is tied to your user id and is monitored and recorded. Exemptions should only be added or removed with proper cause."))),t.createElement(A,{className:l.buttonArea},t.createElement(u,{variant:"contained",onClick:async()=>{a(!1),i?.exemption?await h():await E()},color:"primary",disabled:!i?.exemption&&(!o||o?.length===0)},i?.exemption?"Remove":"Submit"),t.createElement(u,{onClick:()=>a(!1),color:"primary"},"Cancel"))))};export{N as ExemptionJustificationDialog,y as useStyles};
|
|
2
|
+
//# sourceMappingURL=ExemptionJustificationDialog.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useEntity as c}from"@backstage/plugin-catalog-react";import{makeStyles as l,Tab as d}from"@material-ui/core";import t from"react";import{Link as
|
|
1
|
+
import{useEntity as c}from"@backstage/plugin-catalog-react";import{makeStyles as l,Tab as d}from"@material-ui/core";import t from"react";import{Link as f}from"react-router-dom";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useCertificationDetailsForTrack as g}from"../../hooks/certifications/useCertificationDetailsForTrack.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{CertificationBadge as b}from"../Badges/CertificationBadge.esm.js";const a=l(e=>({root:{maxWidth:"80ch",textTransform:"uppercase",paddingTop:e.spacing(2),paddingBottom:e.spacing(2)},wrapper:{display:"inline-block",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},badge:{marginRight:e.spacing(1)}})),u=({id:e,name:i,badge:o,href:p,selected:m=!1})=>{const r=a(),{entity:n}=c(),{data:s}=g(n,e);return t.createElement(d,{className:r.root,classes:{wrapper:r.wrapper},value:e,label:t.createElement(t.Fragment,null,t.createElement(b,{badge:o,trackType:s?.track.type,className:r.badge}),i),component:f,to:p,selected:m})};export{u as CertificationTab,a as useStyles};
|
|
2
2
|
//# sourceMappingURL=CertificationTab.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useRouteRef as
|
|
1
|
+
import{useRouteRef as u}from"@backstage/core-plugin-api";import{useEntity as T}from"@backstage/plugin-catalog-react";import{makeStyles as v,Tabs as N,IconButton as A,Menu as B,MenuItem as h,Switch as g}from"@material-ui/core";import P from"@material-ui/icons/ArrowDropDown";import L from"@material-ui/icons/Settings.js";import t,{useState as M,useEffect as O}from"react";import k from"react-use/lib/useLocalStorage";import{useAllCertifications as K}from"../../hooks/certifications/useAllCertifications.esm.js";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/catalog-model";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{usePlaylists as Q}from"../../hooks/playlists/usePlaylists.esm.js";import{certificationPlaylistRouteRef as j,certificationTrackRouteRef as q}from"../../routes.esm.js";import{CertificationTab as D}from"./CertificationTab.esm.js";import{PlaylistCertificationTab as F}from"./PlaylistCertificationTab.esm.js";import{CertificationTabsSkeleton as G}from"./skeletons/CertificationTabsSkeleton.esm.js";function H(a=[],o=[],n,l){if(n){const i=a.findIndex(r=>r.id===n);return i<0?!1:i}const c=o.findIndex(i=>i.track.id===l);return c<0?!1:c+a.length}const J=v(a=>({tabsContainer:{display:"flex",alignItems:"center"},tabs:{flex:1},settingsButton:{display:"flex",alignItems:"center",marginRight:a.spacing(1)}})),U=({playlistId:a,trackId:o,onSettingsChange:n})=>{const l=J(),[c,i]=M(null),[r,E]=k("soundcheck.certifications.showNotApplicable",!1),[s,b]=k("soundcheck.certifications.showExempt",!0);O(()=>{n?.({showNotApplicable:!!r,showExempt:!!s})},[r,s,n]);const C=e=>{i(e.currentTarget)},y=()=>{i(null)},{entity:d}=T(),{isLoading:I,data:m}=K(d),{isLoading:x,data:f}=Q(d),S=u(j),w=u(q);if(x||I||!o)return t.createElement(G,null);const z=H(f,m,a,o);return t.createElement("div",{className:l.tabsContainer},t.createElement(N,{className:l.tabs,value:z,indicatorColor:"primary","aria-label":"Certifications",variant:"scrollable"},f?.length&&f.map(({id:e,name:p})=>t.createElement(F,{key:e,id:e,name:p,selected:e===o,href:S({playlistId:e})})),m&&m.filter(({track:{type:e}})=>e!=="playlist").map(({track:{id:e,name:p,badge:R}})=>t.createElement(D,{key:e,id:e,name:p,badge:R,selected:e===o,href:w({trackId:e})}))),t.createElement(A,{className:l.settingsButton,onClick:C,size:"small"},t.createElement(L,{fontSize:"small"}),t.createElement(P,{fontSize:"small"})),t.createElement(B,{anchorEl:c,open:!!c,onClose:y,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(h,{onClick:()=>{E(!r)},dense:!0},t.createElement(g,{size:"small",checked:r}),"Show Not Applicable Checks"),t.createElement(h,{onClick:()=>{b(!s)},dense:!0},t.createElement(g,{size:"small",checked:s}),"Show Exempt Checks")))};export{U as CertificationTabs};
|
|
2
2
|
//# sourceMappingURL=CertificationTabs.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{stringifyEntityRef as
|
|
1
|
+
import{stringifyEntityRef as b}from"@backstage/catalog-model";import{useEntity as g}from"@backstage/plugin-catalog-react";import{makeStyles as k,Paper as I,Divider as C}from"@material-ui/core";import e,{useState as N,useCallback as P}from"react";import{useParams as x}from"react-router-dom";import{useAllCertifications as A}from"../../hooks/certifications/useAllCertifications.esm.js";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{usePlaylists as R}from"../../hooks/playlists/usePlaylists.esm.js";import{AlertPanel as n}from"../AlertPanel/AlertPanel.esm.js";import{CertificationSidebar as S}from"../CertificationSidebar/CertificationSidebar.esm.js";import"../CertificationSidebar/CertificationSummary.esm.js";import"@material-ui/lab";import"../CertificationSidebar/Check.esm.js";import"../CertificationSidebar/LevelSummary.esm.js";import{isDarkTheme as D}from"../Charts/chartUtils.esm.js";import{CheckDetails as $}from"../CheckDetails/CheckDetails.esm.js";import"../CheckDryRun/CheckDryRun.esm.js";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import"../CheckDryRun/CheckDryRunDetails.esm.js";import{CheckDryRunProvider as T}from"../CheckDryRun/CheckDryRunContext.esm.js";import"../CheckForm/utils/checkFormUtils.esm.js";import{NoCertifications as F}from"../EmptyState/EmptyState.esm.js";import{LevelUpParty as L}from"../LevelUpParty/LevelUpParty.esm.js";import{RefetchingIndicator as U}from"../RefetchingIndicator/RefetchingIndicator.esm.js";import{CertificationTabs as j}from"./CertificationTabs.esm.js";import{PlaylistComponent as q}from"./Playlist/PlaylistComponent.esm.js";const c=k(t=>({paper:{overflow:"hidden",position:"relative",border:D(t)?`1px solid ${t.palette.divider}`:void 0},view:{display:"grid",gridTemplateColumns:"1fr 2fr"},sidebar:{borderRight:`1px solid ${t.palette.divider}`}})),z=()=>{const{playlistId:t,trackId:r,checkId:l}=x(),m=c(),{entity:i}=g(),{isError:d,isFetched:f,data:h}=A(i),{isError:E,data:u}=R(i),[p,s]=N({showNotApplicable:!1,showExempt:!1}),y=P(({showNotApplicable:a,showExempt:w})=>{s({showNotApplicable:a,showExempt:w})},[s]);if(d||E)return e.createElement(n,{severity:"error",title:"Error loading certifications"});const o=t&&u?.find(a=>a.id===t);if(t&&!o)return e.createElement(n,{severity:"error",title:"Playlist ${playlistId} not found."});if(f&&!h?.length)return e.createElement(F,null);const v=i?b(i):void 0;return e.createElement(T,null,e.createElement(I,{className:m.paper},e.createElement(U,null),e.createElement(j,{playlistId:t,trackId:r,onSettingsChange:y}),e.createElement(C,null),o&&e.createElement(q,{playlist:o,entityRef:v}),!o&&r&&e.createElement("div",{"data-testid":"soundcheck-certification-view",className:m.view},e.createElement("div",{className:m.sidebar},e.createElement(S,{trackId:r,checkId:l,showNotApplicable:p.showNotApplicable,showExempt:p.showExempt})),e.createElement($,{programId:r,checkId:l}),e.createElement(L,{programId:r}))))};export{z as CertificationsPage,c as useStyles};
|
|
2
2
|
//# sourceMappingURL=CertificationsPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{LinearGauge as
|
|
1
|
+
import{LinearGauge as p}from"@backstage/core-components";import{makeStyles as f,useTheme as u,Typography as g}from"@material-ui/core";import i from"lodash";import t,{useMemo as k}from"react";import{ResultState as c}from"../../../graphql/generated/index.esm.js";import{LevelBadge as y}from"../../Badges/LevelBadge.esm.js";import{NoLevelBadge as x}from"../../Badges/NoLevelBadge.esm.js";import"../../Badges/CampaignBadge.esm.js";import{usePlaylistCertificationContext as h}from"./PlaylistContext.esm.js";const v=(s,a)=>{if(a)return a.filter(e=>s.trackIds.includes(e.track.id)).map(e=>{const o=i.sumBy(e.levels,l=>i.filter(l.checks,{result:c.Passed}).length),m=i.sumBy(e.levels,l=>i.reject(l.checks,{result:c.NotApplicable||c.Exempt}).length),r=m===0?0:o/m;return{id:e.track.id,name:e.track.name,checkPassRate:r}})},n=f(()=>({root:{margin:0,width:"250px"},trackItem:{display:"flex",flexDirection:"column",alignItems:"flex-start"},badgeAndName:{display:"flex",flexDirection:"row",alignItems:"center"},trackName:{marginLeft:"8px"}})),N=({playlist:s})=>{const a=n(),{data:e}=h(),o=u(),m=k(()=>v(s,e),[e,s]);return t.createElement("div",{className:a.root},m&&m.map(r=>{const l=e?.find(d=>d.track.id===r.id)?.track?.badge;return t.createElement("div",{className:a.trackItem,key:r.id},t.createElement("div",{className:a.badgeAndName},l?t.createElement(y,{badge:l}):t.createElement(x,null),t.createElement(g,{variant:"caption",color:"textSecondary",className:a.trackName},r.name)),t.createElement("div",{style:{width:"100%",marginBottom:"8px"}},t.createElement(p,{value:r.checkPassRate,getColor:()=>o.palette.status.ok})))}))};export{N as PlaylistProgress,n as useStyles};
|
|
2
2
|
//# sourceMappingURL=PlaylistProgress.esm.js.map
|