@spotify/backstage-plugin-soundcheck 0.19.6 → 0.19.7
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 +14 -0
- package/dist/alpha.d.ts +21 -21
- package/dist/components/CampaignPage/CampaignPageBUI.esm.js +1 -1
- package/dist/components/CampaignPage/CampaignStatusHistoryChart.esm.js +1 -1
- package/dist/components/CampaignPage/CampaignTechInsightsExplorerPage.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignListPageBUI.esm.js +1 -1
- package/dist/components/Cards/CheckStatusCard/CheckStatusCard.esm.js +1 -1
- package/dist/components/Cards/DescriptionCard/DescriptionCard.esm.js +1 -1
- package/dist/components/Cards/HistoricalCheckStatusCard/HistoricalCheckStatusCard.esm.js +1 -1
- package/dist/components/Cards/HistoricalTrackStatusCard/HistoricalTrackStatusCard.esm.js +1 -1
- package/dist/components/Cards/TrackStatusCard/TrackStatusCard.esm.js +1 -1
- package/dist/components/CheckPage/CheckPageBUI.esm.js +1 -1
- package/dist/components/CheckPage/CheckStatusHistoryChartBUI.esm.js +1 -1
- package/dist/components/ChecksPage/CheckListPage/CheckListPageDeprecated.esm.js +1 -1
- package/dist/components/ChecksPage/ChecksListPageBUI.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/utils.esm.js +1 -1
- package/dist/components/CollectorPage/DependantCheckCard.esm.js +1 -1
- package/dist/components/CollectorsPage/IntegrationLogoBUI.esm.js +1 -1
- package/dist/components/CollectorsPage/IntegrationsListPageBUI.esm.js +1 -1
- package/dist/components/DescriptionCell/DescriptionCell.esm.js +1 -1
- package/dist/components/GroupSelectorBUI/GroupSelectorBUI.esm.js +1 -1
- package/dist/components/ImportExportPanel/ImportExportPanelBUI.esm.js +1 -1
- package/dist/components/LoadingTableSkeleton/LoadingTableSkeleton.esm.js +1 -1
- package/dist/components/Menus/SimpleMenu.esm.js +1 -1
- package/dist/components/OverviewPage/OverviewPageContent.esm.js +1 -1
- package/dist/components/RoutingPage/RoutingPageBUI.esm.js +1 -1
- package/dist/components/SoundcheckHeader/SoundcheckHeaderBUI.esm.js +1 -1
- package/dist/components/TableRowWithOwner/TableRowWithOwner.esm.js +1 -1
- package/dist/components/TechInsights/TechInsightsPageBUI.esm.js +1 -1
- package/dist/components/TechInsights/TechInsightsPageDeprecated.esm.js +1 -1
- package/dist/components/TechInsights/TechInsightsTableBUI.esm.js +1 -1
- package/dist/components/TechInsightsExplorerTable/TechInsightsExplorerTable.esm.js +1 -1
- package/dist/components/TrackPage/TrackPageBUI.esm.js +1 -1
- package/dist/components/TrackPage/TrackTechInsightsExplorerPage.esm.js +1 -1
- package/dist/components/TracksPage/TrackListPage/TrackListPageDeprecated.esm.js +1 -1
- package/dist/components/TracksPage/TracksListPageBUI.esm.js +1 -1
- package/dist/hooks/useLoadTimeReporting.esm.js +1 -1
- package/dist/hooks/useSearchNameOwner.esm.js +2 -0
- package/dist/images/integrations-bui/azure-rgb.svg +1 -0
- package/dist/images/integrations-bui/azure-wht.svg +1 -0
- package/dist/images/integrations-bui/bigquery-rgb.svg +1 -0
- package/dist/images/integrations-bui/bigquery-wht.svg +1 -0
- package/dist/images/integrations-bui/catalog-rgb.svg +1 -0
- package/dist/images/integrations-bui/catalog-wht.svg +1 -0
- package/dist/images/integrations-bui/data-registry-rgb.svg +1 -0
- package/dist/images/integrations-bui/data-registry-wht.svg +1 -0
- package/dist/images/integrations-bui/datadog-rgb.svg +1 -0
- package/dist/images/integrations-bui/datadog-wht.svg +1 -0
- package/dist/images/integrations-bui/default-logo-rgb.svg +1 -0
- package/dist/images/integrations-bui/default-logo-wht.svg +1 -0
- package/dist/images/integrations-bui/github-rgb.svg +1 -0
- package/dist/images/integrations-bui/github-wht.svg +1 -0
- package/dist/images/integrations-bui/gitlab-rgb.svg +1 -0
- package/dist/images/integrations-bui/gitlab-wht.svg +1 -0
- package/dist/images/integrations-bui/http-rgb.svg +1 -0
- package/dist/images/integrations-bui/http-wht.svg +1 -0
- package/dist/images/integrations-bui/jira-rgb.svg +1 -0
- package/dist/images/integrations-bui/jira-wht.svg +1 -0
- package/dist/images/integrations-bui/kubernetes-rgb.svg +1 -0
- package/dist/images/integrations-bui/kubernetes-wht.svg +1 -0
- package/dist/images/integrations-bui/newrelic-rgb.svg +1 -0
- package/dist/images/integrations-bui/newrelic-wht.svg +1 -0
- package/dist/images/integrations-bui/pagerduty-rgb.svg +1 -0
- package/dist/images/integrations-bui/pagerduty-wht.svg +1 -0
- package/dist/images/integrations-bui/scm-rgb.svg +1 -0
- package/dist/images/integrations-bui/scm-wht.svg +1 -0
- package/dist/images/integrations-bui/sonarqube-rgb.svg +1 -0
- package/dist/images/integrations-bui/sonarqube-wht.svg +1 -0
- package/dist/images/integrations-bui/soundcheck-rgb.svg +1 -0
- package/dist/images/integrations-bui/soundcheck-wht.svg +1 -0
- package/dist/images/integrations-bui/techinsights-rgb.svg +1 -0
- package/dist/images/integrations-bui/techinsights-wht.svg +1 -0
- package/dist/utils/lcpReporting.esm.js +1 -1
- package/dist/utils/tracks.esm.js +1 -1
- package/package.json +22 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @spotify/backstage-plugin-soundcheck
|
|
2
2
|
|
|
3
|
+
## 0.19.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependency `backstage` to `1.45.0`.
|
|
8
|
+
- Updated integrations' logos.
|
|
9
|
+
- Fixed an issue when SCM YAML facts were not displayed in the Integration No-Code UI.
|
|
10
|
+
- Fixed an issue where the number of applicable tracks and campaigns displayed on the Tech Insights status tile did not match the actual number shown in the table below in some cases.
|
|
11
|
+
- Fix routing issue preventing Tech Health page tabs from loading in the new backstage-ui design.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @spotify/backstage-plugin-core@0.8.12
|
|
15
|
+
- @spotify/backstage-plugin-soundcheck-common@0.19.3
|
|
16
|
+
|
|
3
17
|
## 0.19.6
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
|
10
10
|
* The Soundcheck plugin for use within Backstage´s new frontend system
|
|
11
11
|
*/
|
|
12
12
|
declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{}, {}, {
|
|
13
|
-
"api:soundcheck": _backstage_frontend_plugin_api.
|
|
13
|
+
"api:soundcheck": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
14
14
|
kind: "api";
|
|
15
15
|
name: undefined;
|
|
16
16
|
config: {};
|
|
@@ -19,7 +19,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
19
19
|
inputs: {};
|
|
20
20
|
params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_core_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_core_plugin_api.AnyApiFactory>;
|
|
21
21
|
}>;
|
|
22
|
-
"entity-card:soundcheck/card": _backstage_frontend_plugin_api.
|
|
22
|
+
"entity-card:soundcheck/card": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
23
23
|
kind: "entity-card";
|
|
24
24
|
name: "card";
|
|
25
25
|
config: {
|
|
@@ -44,7 +44,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
44
44
|
type?: _backstage_plugin_catalog_react_alpha.EntityCardType;
|
|
45
45
|
};
|
|
46
46
|
}>;
|
|
47
|
-
"entity-content:soundcheck/entity": _backstage_frontend_plugin_api.
|
|
47
|
+
"entity-content:soundcheck/entity": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
48
48
|
kind: "entity-content";
|
|
49
49
|
name: "entity";
|
|
50
50
|
config: {
|
|
@@ -81,7 +81,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
81
81
|
filter?: string | _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
|
|
82
82
|
};
|
|
83
83
|
}>;
|
|
84
|
-
"entity-content:soundcheck/group": _backstage_frontend_plugin_api.
|
|
84
|
+
"entity-content:soundcheck/group": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
85
85
|
kind: "entity-content";
|
|
86
86
|
name: "group";
|
|
87
87
|
config: {
|
|
@@ -118,7 +118,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
118
118
|
filter?: string | _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
|
|
119
119
|
};
|
|
120
120
|
}>;
|
|
121
|
-
"integration:soundcheck/azure": _backstage_frontend_plugin_api.
|
|
121
|
+
"integration:soundcheck/azure": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
122
122
|
kind: "integration";
|
|
123
123
|
name: "azure";
|
|
124
124
|
config: {};
|
|
@@ -134,7 +134,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
134
134
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
135
135
|
};
|
|
136
136
|
}>;
|
|
137
|
-
"integration:soundcheck/bigquery": _backstage_frontend_plugin_api.
|
|
137
|
+
"integration:soundcheck/bigquery": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
138
138
|
kind: "integration";
|
|
139
139
|
name: "bigquery";
|
|
140
140
|
config: {};
|
|
@@ -150,7 +150,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
150
150
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
151
151
|
};
|
|
152
152
|
}>;
|
|
153
|
-
"integration:soundcheck/catalog": _backstage_frontend_plugin_api.
|
|
153
|
+
"integration:soundcheck/catalog": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
154
154
|
kind: "integration";
|
|
155
155
|
name: "catalog";
|
|
156
156
|
config: {};
|
|
@@ -166,7 +166,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
166
166
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
167
167
|
};
|
|
168
168
|
}>;
|
|
169
|
-
"integration:soundcheck/datadog": _backstage_frontend_plugin_api.
|
|
169
|
+
"integration:soundcheck/datadog": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
170
170
|
kind: "integration";
|
|
171
171
|
name: "datadog";
|
|
172
172
|
config: {};
|
|
@@ -182,7 +182,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
182
182
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
183
183
|
};
|
|
184
184
|
}>;
|
|
185
|
-
"integration:soundcheck/data-registry": _backstage_frontend_plugin_api.
|
|
185
|
+
"integration:soundcheck/data-registry": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
186
186
|
kind: "integration";
|
|
187
187
|
name: "data-registry";
|
|
188
188
|
config: {};
|
|
@@ -198,7 +198,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
198
198
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
199
199
|
};
|
|
200
200
|
}>;
|
|
201
|
-
"integration:soundcheck/github": _backstage_frontend_plugin_api.
|
|
201
|
+
"integration:soundcheck/github": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
202
202
|
kind: "integration";
|
|
203
203
|
name: "github";
|
|
204
204
|
config: {};
|
|
@@ -214,7 +214,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
214
214
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
215
215
|
};
|
|
216
216
|
}>;
|
|
217
|
-
"integration:soundcheck/gitlab": _backstage_frontend_plugin_api.
|
|
217
|
+
"integration:soundcheck/gitlab": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
218
218
|
kind: "integration";
|
|
219
219
|
name: "gitlab";
|
|
220
220
|
config: {};
|
|
@@ -230,7 +230,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
230
230
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
231
231
|
};
|
|
232
232
|
}>;
|
|
233
|
-
"integration:soundcheck/http": _backstage_frontend_plugin_api.
|
|
233
|
+
"integration:soundcheck/http": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
234
234
|
kind: "integration";
|
|
235
235
|
name: "http";
|
|
236
236
|
config: {};
|
|
@@ -246,7 +246,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
246
246
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
247
247
|
};
|
|
248
248
|
}>;
|
|
249
|
-
"integration:soundcheck/jira": _backstage_frontend_plugin_api.
|
|
249
|
+
"integration:soundcheck/jira": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
250
250
|
kind: "integration";
|
|
251
251
|
name: "jira";
|
|
252
252
|
config: {};
|
|
@@ -262,7 +262,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
262
262
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
263
263
|
};
|
|
264
264
|
}>;
|
|
265
|
-
"integration:soundcheck/kubernetes": _backstage_frontend_plugin_api.
|
|
265
|
+
"integration:soundcheck/kubernetes": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
266
266
|
kind: "integration";
|
|
267
267
|
name: "kubernetes";
|
|
268
268
|
config: {};
|
|
@@ -278,7 +278,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
278
278
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
279
279
|
};
|
|
280
280
|
}>;
|
|
281
|
-
"integration:soundcheck/newrelic": _backstage_frontend_plugin_api.
|
|
281
|
+
"integration:soundcheck/newrelic": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
282
282
|
kind: "integration";
|
|
283
283
|
name: "newrelic";
|
|
284
284
|
config: {};
|
|
@@ -294,7 +294,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
294
294
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
295
295
|
};
|
|
296
296
|
}>;
|
|
297
|
-
"integration:soundcheck/pagerduty": _backstage_frontend_plugin_api.
|
|
297
|
+
"integration:soundcheck/pagerduty": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
298
298
|
kind: "integration";
|
|
299
299
|
name: "pagerduty";
|
|
300
300
|
config: {};
|
|
@@ -310,7 +310,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
310
310
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
311
311
|
};
|
|
312
312
|
}>;
|
|
313
|
-
"integration:soundcheck/scm": _backstage_frontend_plugin_api.
|
|
313
|
+
"integration:soundcheck/scm": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
314
314
|
kind: "integration";
|
|
315
315
|
name: "scm";
|
|
316
316
|
config: {};
|
|
@@ -326,7 +326,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
326
326
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
327
327
|
};
|
|
328
328
|
}>;
|
|
329
|
-
"integration:soundcheck/sonarqube": _backstage_frontend_plugin_api.
|
|
329
|
+
"integration:soundcheck/sonarqube": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
330
330
|
kind: "integration";
|
|
331
331
|
name: "sonarqube";
|
|
332
332
|
config: {};
|
|
@@ -342,7 +342,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
342
342
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
343
343
|
};
|
|
344
344
|
}>;
|
|
345
|
-
"nav-item:soundcheck": _backstage_frontend_plugin_api.
|
|
345
|
+
"nav-item:soundcheck": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
346
346
|
kind: "nav-item";
|
|
347
347
|
name: undefined;
|
|
348
348
|
config: {};
|
|
@@ -359,7 +359,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
359
359
|
routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
360
360
|
};
|
|
361
361
|
}>;
|
|
362
|
-
"page:soundcheck/SoundcheckRoutingPage": _backstage_frontend_plugin_api.
|
|
362
|
+
"page:soundcheck/SoundcheckRoutingPage": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
363
363
|
config: {
|
|
364
364
|
title: string | undefined;
|
|
365
365
|
} & {
|
|
@@ -390,7 +390,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
390
390
|
routeRef?: _backstage_frontend_plugin_api.RouteRef;
|
|
391
391
|
};
|
|
392
392
|
}>;
|
|
393
|
-
"page:soundcheck/overview": _backstage_frontend_plugin_api.
|
|
393
|
+
"page:soundcheck/overview": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
394
394
|
kind: "page";
|
|
395
395
|
name: "overview";
|
|
396
396
|
config: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as G}from"react/jsx-runtime";import{parseEntityRef as Ee}from"@backstage/catalog-model";import{useRouteRef as F}from"@backstage/core-plugin-api";import{usePermission as we}from"@backstage/plugin-permission-react";import{Container as v,HeaderPage as Re,Box as c,Flex as $,Text as g,Grid as N}from"@backstage/ui";import{makeStyles as Le}from"@material-ui/core";import{toEntityFilterQuery as Fe,soundcheckCampaignReadPermission as Ne}from"@spotify/backstage-plugin-soundcheck-common";import{isEmpty as Pe}from"lodash";import{DateTime as C}from"luxon";import{useState as I,useMemo as T,useEffect as q}from"react";import{useParams as xe,useSearchParams as Ae}from"react-router-dom";import De from"react-use/lib/useDebounce";import Oe from"react-use/lib/useLocalStorage";import{useCheckStatuses as He}from"../../hooks/aggregations/useCheckStatuses.esm.js";import{useFilters as Me}from"../../hooks/filters/useFilters.esm.js";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetCampaigns as Ue}from"../../hooks/campaigns/useGetCampaigns.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCertificationStatus as Be}from"../../hooks/aggregations/useCertificationStatus.esm.js";import{useCertificationStatusHistory as je}from"../../hooks/aggregations/useCertificationStatusHistory.esm.js";import{useLCPReporting as Ke}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as Ve}from"../../hooks/useLoadTimeReporting.esm.js";import{campaignsPageRouteRef as _e,campaignOverviewRouteRef as Ge,campaignExplorerRouteRef as $e}from"../../routes.esm.js";import{DescriptionCard as qe}from"../Cards/DescriptionCard/DescriptionCard.esm.js";import{HistoricalTrackStatusCard as Qe}from"../Cards/HistoricalTrackStatusCard/HistoricalTrackStatusCard.esm.js";import{TrackStatusCard as We}from"../Cards/TrackStatusCard/TrackStatusCard.esm.js";import{ChecksTable as ze}from"../ChecksTable/ChecksTable.esm.js";import{ChipSelector as Je}from"../ChipSelector/ChipSelector.esm.js";import{EmptyStateBUI as Q}from"../EmptyState/EmptyStateBUI.esm.js";import"../FilterSidebar/FilterSidebar.esm.js";import"../FilterSidebar/StateFilter.esm.js";import{useTrackFilterSidebar as Xe}from"../FilterSidebar/useTrackFilterSidebar.esm.js";import{toFilter as Ye,CERTIFICATION_STATUS_MAP as Ze}from"../FilterSidebar/util.esm.js";import{LoadingTableSkeleton as ei}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{SimpleMenu as ii}from"../Menus/SimpleMenu.esm.js";import{useCampaignActions as ti}from"../Menus/useCampaignActions.esm.js";import{PageCustomActions as ri}from"../PageCustomActions/PageCustomActions.esm.js";import{SendCampaignNotificationDialogBUI as ai}from"../SendCampaignNotificationDialog/SendCampaignNotificationDialogBUI.esm.js";import{TopFailingChecksTableBUI as oi}from"../TopFailingChecksTable/TopFailingChecksTableBUI.esm.js";import{TrackEntitiesTableBUI as si}from"../TrackPage/TrackEntitiesTable/TrackEntitiesTableBUI.esm.js";const ni=Le(()=>({container:{marginBottom:"var(--bui-space-12)"},tableContent:{margin:"var(--bui-space-3) 0 0"},tabPanel:{padding:"var(--bui-space-6) 0 0"},tabs:{margin:"0 0 var(--bui-space-12)"},cards:{margin:"0 0 var(--bui-space-12)",display:"flex",gridGap:"var(--bui-space-4)"}})),u={CHECKS:"Checks",TOP_FAILING_CHECKS:"Top Failing Checks",ENTITIES:"Entities"},ci=()=>{const{owners:m,lifecycles:l,types:d,systems:p,certificationStatuses:P}=Xe(),{campaignId:o}=xe(),W=F(_e),[s,k]=Ae(),[n,z]=I(s.get("search")||""),[x,J]=I(""),[A,X]=I(new Set([u.CHECKS])),y=A.values().next().value??u.CHECKS;De(()=>{J(n);const r=new URLSearchParams(s.toString());n?r.set("search",n):r.delete("search"),k(r,{replace:!0})},300,[n]);const D=T(()=>({routeName:"soundcheck-campaign-insights",additionalAttributes:{campaignId:o||"",filtersApplied:m.length+l.length+d.length+p.length,ownersFilter:m?.join(",")||"",lifecyclesFilter:l?.join(",")||"",typesFilter:d?.join(",")||"",systemsFilter:p?.join(",")||"",campaignsSearch:x||""}}),[o,m,l,d,p,x]),{reportContentLoaded:O}=Ve(D),{reporter:Y}=Ke(D),h=ni(),E=T(()=>Ye({lifecycles:l,owners:m,types:d,systems:p}),[l,m,d,p]),{data:Z,isLoading:f,isError:ee}=Ue({ids:[o],first:1}),i=Z?.edges?.[0]?.node,{actions:H,showNotificationDialog:M,setShowNotificationDialog:ie}=ti(i??void 0),t=i?.track,te=T(()=>t?.levels.flatMap(r=>r.checks),[t?.levels]),re=Array.from(new Set(t?.levels.flatMap(r=>r.checks).map(r=>r.id)??[])),{data:U,isLoading:ae}=He({trackId:t?.id,checkIds:re,filter:E},!!t),oe=T(()=>Fe(t?.filter),[t]),{filters:se,selected:ne,setSelected:ce,onRemoveTag:me,selectedTags:le}=Me({entityFilterQuery:oe,hasCertificationStatusFilters:!0}),{data:B,isLoading:w,isError:de}=Be({trackId:t?.id??"",filter:E},!!i),pe=C.fromISO(i?.startDate),he=Math.max(Math.ceil(C.now().diff(pe,"days").days),1),{data:fe,isLoading:ge,isError:ue}=je({trackId:t?.id??"",filter:E,numberOfDays:he},!!i),R=ee||de||ue,{loading:Se,allowed:Ce}=we({permission:Ne,resourceRef:o}),j=Y?.getLCPValue();q(()=>{!f&&!w&&O({lcp:j})},[f,w,O,j]);const[b,K]=I(!1),[S,L]=Oe("campaign-overview-search-params","");q(()=>{!b&&s?.toString()?(S!==s.toString()&&L(s.toString()),K(!0)):!b&&S?(k(new URLSearchParams(S)),K(!0)):b&&S!==s.toString()&&L(s.toString())},[s,k,L,S,b]);const ye=F(Ge),be=F($e);if(f)return e(v,{className:h.container,children:e(ei,{})});if(!f&&!i)return e(v,{className:h.container,children:e(Q,{title:"Campaign not found",body:`There is no campaign with the requested id: ${o}.`})});if(!Se&&!Ce)return e(v,{className:h.container,children:e(Q,{title:"Cannot view campaign",body:`No permission to view campaign with the requested id: ${o}.`})});const V=i?.ownerEntityRef,ve=V?Ee(V).name:void 0,Ie=C.fromISO(i?.startDate),_=C.fromISO(i?.targetCompletionDate),Te=C.now(),ke=Math.max(Math.ceil(_.diff(Te,"days").days),0);return a(G,{children:[e(Re,{title:i?.name,customActions:e(ii,{disabled:!H.length,placement:"left top",menuActions:H,label:"Campaign Actions"}),breadcrumbs:[{label:"Campaigns",href:W()}],tabs:[{id:"overview",label:"Campaign Overview",href:o?ye({campaignId:o}):""},{id:"explorer",label:"Tech Insights Explorer",href:o?be({campaignId:o}):""}]}),a(v,{className:h.container,children:[a(c,{className:h.cards,children:[e(qe,{description:i?.description??void 0,owner:ve,isError:R,isLoading:f}),e(We,{track:t??void 0,status:B,isError:R,isLoading:w,isCampaign:!0,children:a(G,{children:[a($,{align:"baseline",mt:"3",children:[e(g,{as:"h1",variant:"title-medium",weight:"bold",children:ke}),e(g,{variant:"body-small",children:"Days remaining"})]}),a(N.Root,{children:[a(N.Item,{children:[e(c,{children:e(g,{color:"secondary",variant:"body-small",children:"Start date"})}),e(c,{children:e(g,{variant:"body-small",children:Ie.toLocaleString({month:"short",day:"numeric",year:"numeric"})})})]}),a(N.Item,{children:[e(c,{children:e(g,{color:"secondary",variant:"body-small",children:"End date"})}),e(c,{children:e(g,{variant:"body-small",children:_.toLocaleString({month:"short",day:"numeric",year:"numeric"})})})]})]})]})}),e(Qe,{track:i?.track,history:fe,isCampaign:!0,isError:R,isLoading:ge})]}),t&&a(c,{children:[a($,{justify:"between",children:[e(c,{minWidth:"16rem",children:e(Je,{options:["Checks","Top Failing Checks","Entities"],selected:A,ariaLabel:"Sections",onSelectionChange:X})}),e(ri,{searchValue:n,setSearchValue:r=>z(r),filters:se,selected:ne,setSelected:ce,onRemoveTag:me,selectedTags:le,showSearch:y!==u.ENTITIES})]}),a(c,{className:h.tableContent,children:[y===u.CHECKS&&e(ze,{trackId:t.id,checks:te,checkStatuses:U,isLoading:f||ae,searchValue:n}),y===u.TOP_FAILING_CHECKS&&e(oi,{track:t,checkStatuses:U,certificationStatus:B?.certificationStatus,searchValue:n}),y===u.ENTITIES&&e(si,{isCampaign:!0,track:t,lifecycles:l,owners:m,types:d,systems:p,certificationStatus:Pe(P)?void 0:Ze[P[0]],searchValue:n})]})]}),i&&M&&e(ai,{campaign:i,isOpen:M,handleClose:()=>ie(!1)})]})]})};export{ci as CampaignPageBUI};
|
|
2
2
|
//# sourceMappingURL=CampaignPageBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{Box as a}from"@backstage/ui";import{makeStyles as m}from"@material-ui/core/styles";import{useMemo as n}from"react";import{ResponsiveContainer as p}from"recharts";import{AreaChart as c}from"../AreaChart/AreaChart.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as d}from"../EmptyState/EmptyStateBUI.esm.js";import"@backstage/core-plugin-api";import"@backstage/plugin-permission-react";import"@remixicon/react";import"@spotify/backstage-plugin-soundcheck-common";import"react-router-dom";import"../../routes.esm.js";const f=m(()=>({container:{height:
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Box as a}from"@backstage/ui";import{makeStyles as m}from"@material-ui/core/styles";import{useMemo as n}from"react";import{ResponsiveContainer as p}from"recharts";import{AreaChart as c}from"../AreaChart/AreaChart.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as d}from"../EmptyState/EmptyStateBUI.esm.js";import"@backstage/core-plugin-api";import"@backstage/plugin-permission-react";import"@remixicon/react";import"@spotify/backstage-plugin-soundcheck-common";import"react-router-dom";import"../../routes.esm.js";const f=m(()=>({container:{height:180,overflow:"hidden"}}));function l({history:r}){const s=f(),i=r?.certificationStatusHistory.numberOfEntities??0,e=n(()=>i>0?r?.certificationStatusHistory.history.map(t=>({date:t.date,Passed:Math.round(t.statusByLevel[0].passed/i*100)})):[],[i,r]);if(!e?.length){const t=i>0?"No Historical Data":"No Applicable Entities";return o(a,{children:o(d,{title:t,body:`${t} for this campaign.`})})}return o(a,{className:s.container,children:o(p,{debounce:1,children:o(c,{data:e,categories:["Passed"],categoryColors:{Passed:"var(--bui-fg-success)"},index:"date",minValue:0,maxValue:100,showLegend:!1})})})}export{l as CampaignStatusHistoryChart};
|
|
2
2
|
//# sourceMappingURL=CampaignStatusHistoryChart.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as c,Fragment as
|
|
1
|
+
import{jsx as e,jsxs as c,Fragment as J}from"react/jsx-runtime";import{useRouteRef as S,useApi as K}from"@backstage/core-plugin-api";import{entityPresentationApiRef as Q}from"@backstage/plugin-catalog-react";import{usePermission as W}from"@backstage/plugin-permission-react";import{Container as l,HeaderPage as X,Box as w,Flex as Y,SearchField as Z}from"@backstage/ui";import{makeStyles as _}from"@material-ui/core";import{soundcheckCampaignReadPermission as ee}from"@spotify/backstage-plugin-soundcheck-common";import{useState as F,useMemo as I,useEffect as ie}from"react";import{useParams as re,useSearchParams as te}from"react-router-dom";import ae from"react-use/lib/useDebounce";import{useGroupHierarchy as oe}from"../../hooks/heirarchy/useGroupHierarchy.esm.js";import{useHierarchicalTrackStatus as ne}from"../../hooks/heirarchy/useHierarchicalTrackStatus.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetCampaigns as me}from"../../hooks/campaigns/useGetCampaigns.esm.js";import{useGetAllTracks as se}from"../../hooks/tracks/useGetAllTracks.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-use/lib/useLocalStorage";import{useLCPReporting as pe}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as ce}from"../../hooks/useLoadTimeReporting.esm.js";import{campaignsPageRouteRef as le,campaignOverviewRouteRef as de,campaignExplorerRouteRef as ge}from"../../routes.esm.js";import{EmptyStateBUI as E}from"../EmptyState/EmptyStateBUI.esm.js";import"../FilterSidebar/FilterSidebar.esm.js";import"../FilterSidebar/StateFilter.esm.js";import{useTrackFilterSidebar as fe}from"../FilterSidebar/useTrackFilterSidebar.esm.js";import"../FilterSidebar/util.esm.js";import{hierarchyToNivo as he}from"../HierarchicalTechInsightsPage/visualizations/hierarchyToNivo.esm.js";import{LoadingTableSkeleton as ue}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{SimpleMenu as be}from"../Menus/SimpleMenu.esm.js";import{useCampaignActions as ve}from"../Menus/useCampaignActions.esm.js";import{SendCampaignNotificationDialogBUI as Ce}from"../SendCampaignNotificationDialog/SendCampaignNotificationDialogBUI.esm.js";import{TechInsightsExplorerTable as Se}from"../TechInsightsExplorerTable/TechInsightsExplorerTable.esm.js";import{TechInsightsGroupSelector as we}from"../TechInsightsGroupSelector/TechInsightsGroupSelector.esm.js";import{TopAndBottomPerformingTeams as Ie}from"../TopAndBottomPerformingTeams/TopAndBottomPerformingTeams.esm.js";const Re=_(()=>({container:{marginBottom:"var(--bui-space-12)"},teams:{margin:"0 0 var(--bui-space-12)"},tableContent:{margin:"var(--bui-space-3) 0 0"},filters:{width:"25rem",marginLeft:"auto"}})),Te=()=>{const t=Re(),{owners:d,lifecycles:g,types:f,systems:h}=fe(),{campaignId:i}=re(),[u,j]=te(),[n,B]=F(u.get("search")||""),a=u.get("group"),[R,G]=F(""),D=S(le);ae(()=>{G(n);const r=new URLSearchParams(u.toString());n?r.set("search",n):r.delete("search"),j(r,{replace:!0})},300,[n]);const T=I(()=>({routeName:"soundcheck-campaign-insights",additionalAttributes:{campaignId:i||"",filtersApplied:d.length+g.length+f.length+h.length,ownersFilter:d?.join(",")||"",lifecyclesFilter:g?.join(",")||"",typesFilter:f?.join(",")||"",systemsFilter:h?.join(",")||"",campaignsSearch:R||""}}),[i,d,g,f,h,R]),{reportContentLoaded:y}=ce(T),{reporter:H}=pe(T),{data:O,isLoading:s}=me({ids:[i],first:1}),o=O?.edges?.[0]?.node,{actions:N,showNotificationDialog:k,setShowNotificationDialog:U}=ve(o??void 0),m=o?.track,L=K(Q),{data:P}=se({}),b=I(()=>P?.edges.find(r=>r.node.id===m?.id)?.node,[P?.edges,m?.id]),{data:x,isLoading:v}=oe(a||void 0,{enabled:!!a&&!!m?.id&&!!b,ownedEntitiesFilter:b?.filter??void 0}),{loading:q,allowed:M}=W({permission:ee,resourceRef:i}),{data:C,isLoading:p}=ne({trackId:m?.id??"",groupRef:a??"",skip:!m?.id}),$=I(()=>{if(!a)return;const r=x?.[a];return r?he(r,C||null,()=>"var(--bui-fg-primary)",L,void 0):void 0},[x,L,a,C]),A=H?.getLCPValue();ie(()=>{!s&&!v&&!p&&y({lcp:A})},[s,v,p,y,A]);const V=S(de),z=S(ge);return s?e(l,{className:t.container,children:e(ue,{})}):!s&&!o?e(l,{className:t.container,children:e(E,{title:"Campaign not found",body:`There is no campaign with the requested id: ${i}.`})}):!q&&!M?e(l,{className:t.container,children:e(E,{title:"Cannot view campaign",body:`No permission to view campaign with the requested id: ${i}.`})}):c(J,{children:[e(X,{title:o?.name,customActions:e(be,{disabled:!N.length,placement:"left top",menuActions:N,label:"Campaign Actions"}),breadcrumbs:[{label:"Campaigns",href:D()}],tabs:[{id:"overview",label:"Campaign Overview",href:i?V({campaignId:i}):""},{id:"explorer",label:"Tech Insights Explorer",href:i?z({campaignId:i}):""}]}),c(l,{className:t.container,children:[e(w,{className:t.teams,children:e(Ie,{trackStatus:C??void 0,isLoading:p,campaignId:i})}),c(w,{children:[c(Y,{align:"center",gap:"3",className:t.filters,children:[e(we,{}),e(Z,{value:n,onChange:B,"aria-label":"Search",placeholder:"Search"})]}),e(w,{className:t.tableContent,children:e(Se,{tableData:$,isLoading:v||p,selectedGroup:a??void 0,trackId:b?.id,campaignId:i})})]}),o&&k&&e(Ce,{campaign:o,isOpen:k,handleClose:()=>U(!1)})]})]})};export{Te as CampaignTechInsightsExplorerPage};
|
|
2
2
|
//# sourceMappingURL=CampaignTechInsightsExplorerPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r,jsxs as d,Fragment as k}from"react/jsx-runtime";import{useApi as Q,useRouteRef as N}from"@backstage/core-plugin-api";import{entityPresentationApiRef as Y}from"@backstage/plugin-catalog-react";import{usePermission as _}from"@backstage/plugin-permission-react";import{HeaderPage as q,Container as J,Table as X,TableHeader as Z,Column as s,TableBody as ee,TablePagination as te}from"@backstage/ui";import{makeStyles as re}from"@material-ui/core";import{RiCalendarLine as ie}from"@remixicon/react";import{soundcheckCampaignCreatePermission as oe}from"@spotify/backstage-plugin-soundcheck-common";import{sortBy as ae,isEmpty as T}from"lodash";import{DateTime as A}from"luxon";import{useState as P,useMemo as l,useEffect as ne}from"react";import{useSearchParams as me}from"react-router-dom";import se from"react-use/lib/useDebounce";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetCampaigns as pe}from"../../hooks/campaigns/useGetCampaigns.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{usePagination as ce}from"../../hooks/usePagination.esm.js";import"react-use/lib/useLocalStorage";import{useProfileImages as de}from"../../hooks/catalog/useProfileImages.esm.js";import{useLCPReporting as le}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as ge}from"../../hooks/useLoadTimeReporting.esm.js";import{useSearchNameOwner as fe}from"../../hooks/useSearchNameOwner.esm.js";import{campaignCreateRouteRef as he,campaignDetailsRouteRef as ue}from"../../routes.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as we}from"../EmptyState/EmptyStateBUI.esm.js";import{EmptyStateNoCampaigns as ye}from"../EmptyState/EmptyStateNoCampaigns.esm.js";import{ListPageCustomActions as Ce}from"../ListPageCustomActions/ListPageCustomActions.esm.js";import{LoadingTableSkeleton as Se}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import"../Menus/SimpleMenu.esm.js";import"js-yaml";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import{useCampaignActions as Pe}from"../Menus/useCampaignActions.esm.js";import"@material-ui/icons/AddAlert";import"../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"../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import"../FormFieldLabel/FormFieldLabel.esm.js";import"../LoadingIndicator/LoadingIndicator.esm.js";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import{SendCampaignNotificationDialogBUI as Re}from"../SendCampaignNotificationDialog/SendCampaignNotificationDialogBUI.esm.js";import{TableRowWithOwner as Le}from"../TableRowWithOwner/TableRowWithOwner.esm.js";const M=10,ve=["name","status","days-remaining","owner"],B=t=>{const i=A.fromISO(t),n=A.now();return Math.max(Math.ceil(i.diff(n,"days").days),0)},De=({campaign:t,profileImageMap:i})=>{const n=l(()=>t.archived?0:B(t.targetCompletionDate),[t.archived,t.targetCompletionDate]),o=N(ue),g=l(()=>t.track.levels.reduce((w,h)=>w+(h.checks?.length??0),0),[t.track.levels]),{actions:p,showNotificationDialog:f,setShowNotificationDialog:a}=Pe(t);return d(k,{children:[r(Le,{ownerEntityRef:t.ownerEntityRef,href:o({campaignId:t.id}),profileImageSrc:i[t.ownerEntityRef],menuActions:p,name:t.name??"",description:t.description??"",cells:[{title:t.archived?"Archived":"Active"},{title:`${n} day${n===1?"":"s"} remaining`,icon:r(ie,{size:16})},{title:`${g} Check${g===1?"":"s"}`}]}),t&&f&&r(Re,{campaign:t,isOpen:f,handleClose:()=>a(!1)})]})},Ee=re(()=>({container:{marginBottom:"var(--bui-space-12)"}})),be=()=>{const t=Ee(),[i,n]=me(),[o,g]=P(()=>i.get("search")??""),[p,f]=P(()=>i.get("sortDirection")==="descending"?"descending":"ascending"),[a,w]=P(()=>{const e=i.get("sort");return e&&ve.includes(e)?e:""}),{data:h,isLoading:c}=pe({}),R=l(()=>h?.edges?.map(e=>e.node)??[],[h?.edges]),{profileImageMap:O}=de(R.map(e=>e.ownerEntityRef)),L=Q(Y),y=fe(R,o),v=l(()=>{if(!a)return y;const e=ae(y,m=>a==="owner"?L.forEntity(m.ownerEntityRef).snapshot.primaryTitle.toLowerCase():a==="status"?m.archived?"archived":"active":a==="days-remaining"?m.archived?-1:B(m.targetCompletionDate):m.name.toLowerCase());return p==="descending"&&e.reverse(),e},[L,a,p,y]),{paginatedItems:C,reset:D,paginationProps:U}=ce({pageParam:"perPage",defaultPageSize:M,items:v});se(()=>{D();const e=new URLSearchParams(i.toString());o?e.set("search",o):e.delete("search"),n(e,{replace:!0})},300,[o]);const x=({direction:e,column:m})=>{const S=String(m);w(S),f(e),D();const u=new URLSearchParams(i);S?u.set("sort",S):u.delete("sort"),u.set("sortDirection",e),n(u,{replace:!0})},{loading:H,allowed:$}=_({permission:oe}),V=N(he),E=l(()=>({routeName:"soundcheck-campaigns",additionalAttributes:{}}),[]),{reportContentLoaded:b}=ge(E),{reporter:z}=le(E),I=z?.getLCPValue();ne(()=>{c||b({lcp:I})},[c,b,I]);const j=!c&&!T(C),G=v.length>M,W=!c&&T(C),F=c,K=o?r(we,{title:"No campaigns found",body:"Your current search term did not return any campaigns. Please try a different search term."}):r(ye,{});return d(k,{children:[r(q,{customActions:r(Ce,{searchValue:o,setSearchValue:g,canCreate:!H&&$,createHref:V()}),title:"Campaigns"}),d(J,{className:t.container,children:[F&&r(Se,{rowCount:10}),W&&K,j&&d(X,{onSortChange:x,sortDescriptor:{direction:p,column:a},children:[d(Z,{children:[r(s,{allowsSorting:!0,isRowHeader:!0,id:"name",style:{width:"48%"},children:"Name"}),r(s,{allowsSorting:!0,id:"status",style:{width:"10%"},children:"Status"}),r(s,{allowsSorting:!0,id:"days-remaining",style:{width:"15%"},children:"Days Remaining"}),r(s,{id:"checks",style:{width:"10%"},children:"Checks"}),r(s,{allowsSorting:!0,id:"owner",style:{width:"15%"},children:"Campaign Owner"}),r(s,{style:{width:"2%"}})]}),r(ee,{children:C.map(e=>r(De,{campaign:e,profileImageMap:O??{}},e.id))})]}),G&&r(te,{...U})]})]})};export{be as CampaignListPageBUI};
|
|
2
2
|
//# sourceMappingURL=CampaignListPageBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as t,jsxs as a}from"react/jsx-runtime";import{Text as s,Flex as n,Card as l,CardHeader as m,CardBody as h}from"@backstage/ui";import{makeStyles as u}from"@material-ui/core";import{CheckStatusTableBUI as p}from"../../CheckPage/CheckStatusTableBUI.esm.js";import"../../CheckStatusBar/CheckStatusBar.esm.js";import{CheckStatusBarBUI as C}from"../../CheckStatusBar/CheckStatusBarBUI.esm.js";import{LoadingTableSkeleton as k}from"../../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";const S=u(()=>({card:{minHeight:"15.1rem"}})),f=({status:e,states:o,isLoading:c,isError:i})=>{const d=S();let r;return c?r=t(k,{rowCount:3}):i?r=t(s,{color:"warning",children:"Failed to load check data."}):r=a(n,{direction:"column",gap:"6",children:[t(C,{status:e,states:o}),t(p,{checkStatus:e,states:o})]}),a(l,{className:d.card,children:[t(m,{children:t(s,{color:"secondary",children:"Current Status"})}),t(h,{children:r})]})};export{f as CheckStatusCard};
|
|
2
2
|
//# sourceMappingURL=CheckStatusCard.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as r,jsxs as d}from"react/jsx-runtime";import{Text as e,CardFooter as p,Box as c,TagGroup as s,Tag as h,Card as f,CardHeader as w,CardBody as u}from"@backstage/ui";import{makeStyles as x}from"@material-ui/core";import{RiUserLine as g}from"@remixicon/react";import"../../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as y}from"../../EmptyState/EmptyStateBUI.esm.js";import"@backstage/core-plugin-api";import"@backstage/plugin-permission-react";import"@spotify/backstage-plugin-soundcheck-common";import"react-router-dom";import"../../../routes.esm.js";import{LoadingTableSkeleton as C}from"../../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import"../../SoundcheckMarkdownContent/SoundcheckMarkdownContentDeprecated.esm.js";import"@backstage/core-components";import"react";import"react-markdown";import"rehype-raw";import"remark-gfm";import{SoundcheckMarkdownContentBUI as B}from"../../SoundcheckMarkdownContent/SoundcheckMarkdownContentBUI.esm.js";const l=x(()=>({card:{minHeight:"15.1rem"},scrollBox:{overflow:"auto"}})),n=({children:i,footer:o})=>{const t=l();return d(f,{className:t.card,children:[r(w,{children:r(e,{color:"secondary",children:"Description"})}),r(u,{children:i}),o]})},b=({description:i,owner:o,isError:t,isLoading:m})=>{const a=l();return m?r(n,{children:r(C,{rowCount:3})}):t?r(n,{children:r(e,{color:"warning",children:"Failed to load data."})}):!i&&!o?r(n,{children:r(y,{title:"Description not found",body:"No description and owner were found."})}):r(n,{footer:o?d(p,{children:[r(c,{mb:"3",children:r(e,{color:"secondary",children:"Owner"})}),r(s,{"aria-label":"Owner",children:r(h,{icon:r(g,{}),children:o})})]}):void 0,children:i?r(c,{className:a.scrollBox,style:{maxHeight:o?"6.3rem":"11rem"},children:r(B,{content:i})}):r(e,{children:"No description provided."})})};export{b as DescriptionCard};
|
|
2
2
|
//# sourceMappingURL=DescriptionCard.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useApi as n,configApiRef as d}from"@backstage/core-plugin-api";import{Card as l,CardHeader as f,Flex as h,Text as p,CardBody as u}from"@backstage/ui";import{makeStyles as y}from"@material-ui/core";import{CheckStatusHistoryChartBUI as k}from"../../CheckPage/CheckStatusHistoryChartBUI.esm.js";import{TimePeriodBarBUI as C}from"../../TimePeriodBar/TimePeriodBarBUI.esm.js";const I=y(()=>({card:{minHeight:"15.1rem"},cardBody:{marginTop:"var(--bui-space-1)"}})),b=({checkId:a,trackId:i,filter:c,states:o,numberOfDays:s})=>{const e=I(),m=n(d).getOptionalNumber("soundcheck.certifications.history.retentionTimeInDays");return t(l,{className:e.card,children:[r(f,{children:t(h,{align:"center",justify:"between",children:[r(p,{color:"secondary",children:"Historical Status"}),r(C,{maxNumberOfDays:m})]})}),r(u,{className:e.cardBody,children:r(k,{checkId:a,trackId:i,filter:c,states:o,numberOfDays:s})})]})};export{b as HistoricalCheckStatusCard};
|
|
2
2
|
//# sourceMappingURL=HistoricalCheckStatusCard.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r,jsxs as
|
|
1
|
+
import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useApi as l,configApiRef as h}from"@backstage/core-plugin-api";import{Text as c,Card as y,CardHeader as f,Flex as u,CardBody as g}from"@backstage/ui";import{makeStyles as k}from"@material-ui/core";import{CampaignStatusHistoryChart as C}from"../../CampaignPage/CampaignStatusHistoryChart.esm.js";import"../../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as T}from"../../EmptyState/EmptyStateBUI.esm.js";import"@backstage/plugin-permission-react";import"@remixicon/react";import"@spotify/backstage-plugin-soundcheck-common";import"react-router-dom";import"../../../routes.esm.js";import{LoadingTableSkeleton as B}from"../../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{TimePeriodBarBUI as b}from"../../TimePeriodBar/TimePeriodBarBUI.esm.js";import{TrackHistoryChartBUI as x}from"../../TrackPage/TrackHistoryChartBUI.esm.js";const H=k(()=>({card:{minHeight:"15.1rem"},cardBody:{marginTop:"var(--bui-space-1)"}})),S=({track:i,history:o,isError:a,isLoading:e,isCampaign:m})=>{const s=H(),d=l(h).getOptionalNumber("soundcheck.certifications.history.retentionTimeInDays");let t;!i||!o?t=r(T,{title:"Track history not found",body:"There is no history for the requested track."}):e?t=r(B,{rowCount:3}):a?t=r(c,{color:"warning",children:"Failed to load track data."}):m?t=r(C,{history:o}):t=r(x,{track:i,history:o});const p=i&&o&&!m&&!a&&!e;return n(y,{className:s.card,children:[r(f,{children:n(u,{align:"center",justify:"between",children:[r(c,{color:"secondary",children:"Historical Status"}),p&&r(b,{maxNumberOfDays:d})]})}),r(g,{className:s.cardBody,children:t})]})};export{S as HistoricalTrackStatusCard};
|
|
2
2
|
//# sourceMappingURL=HistoricalTrackStatusCard.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsx as t,jsxs as i,Fragment as l}from"react/jsx-runtime";import{Text as e,Flex as p,Card as u,CardHeader as f,CardBody as h}from"@backstage/ui";import{makeStyles as k}from"@material-ui/core";import"../../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as g}from"../../EmptyState/EmptyStateBUI.esm.js";import"@backstage/core-plugin-api";import"@backstage/plugin-permission-react";import"@remixicon/react";import"@spotify/backstage-plugin-soundcheck-common";import"react-router-dom";import"../../../routes.esm.js";import{LoadingTableSkeleton as S}from"../../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{TrackStatusBarBUI as C}from"../../TrackPage/TrackStatusBarBUI.esm.js";import{TrackStatusTableBUI as T}from"../../TrackPage/TrackStatusTableBUI.esm.js";const x=k(()=>({card:{minHeight:"15.1rem"}})),y=({track:a,status:o,children:c,isLoading:s,isError:n,isCampaign:m})=>{const d=x();let r;return!a||!o?r=t(g,{title:"Track status not found",body:"There is no status for the requested track."}):s?r=t(S,{rowCount:3}):n?r=t(e,{color:"warning",children:"Failed to load track data."}):r=i(l,{children:[i(p,{direction:"column",gap:"6",children:[t(C,{track:a,status:o?.certificationStatus}),t(T,{track:a,status:o?.certificationStatus,isCampaign:m})]}),c]}),i(u,{className:d.card,children:[t(f,{children:t(e,{color:"secondary",children:"Current Status"})}),t(h,{children:r})]})};export{y as TrackStatusCard};
|
|
2
2
|
//# sourceMappingURL=TrackStatusCard.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r,jsxs as
|
|
1
|
+
import{jsx as r,jsxs as p,Fragment as ce}from"react/jsx-runtime";import{parseEntityRef as le}from"@backstage/catalog-model";import{useRouteRef as R}from"@backstage/core-plugin-api";import{usePermission as ne}from"@backstage/plugin-permission-react";import{Container as V,HeaderPage as pe,Flex as $,Box as w}from"@backstage/ui";import{makeStyles as de}from"@material-ui/core";import{toEntityFilterQuery as N,combineEntityFilterQueries as fe,soundcheckCheckReadPermission as he}from"@spotify/backstage-plugin-soundcheck-common";import{useState as P,useMemo as s,useEffect as ue}from"react";import{useSearchParams as ke,useParams as ge}from"react-router-dom";import be from"react-use/lib/useDebounce";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import{useCheck as Ee}from"../../hooks/checks/useCheck.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useTrack as Ie}from"../../hooks/tracks/useTrack.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCheckStatus as Se}from"../../hooks/aggregations/useCheckStatus.esm.js";import"react-use/lib/useLocalStorage";import{useFilters as ye}from"../../hooks/filters/useFilters.esm.js";import{useLCPReporting as Te}from"../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as Ce}from"../../hooks/useLoadTimeReporting.esm.js";import{trackDetailsRouteRef as ve,checksPageRouteRef as Re,tracksPageRouteRef as we}from"../../routes.esm.js";import{DescriptionCard as Ne}from"../Cards/DescriptionCard/DescriptionCard.esm.js";import"../Cards/HistoricalTrackStatusCard/HistoricalTrackStatusCard.esm.js";import"../Cards/TrackStatusCard/TrackStatusCard.esm.js";import{CheckStatusCard as Pe}from"../Cards/CheckStatusCard/CheckStatusCard.esm.js";import{HistoricalCheckStatusCard as Ae}from"../Cards/HistoricalCheckStatusCard/HistoricalCheckStatusCard.esm.js";import{ChipSelector as Fe}from"../ChipSelector/ChipSelector.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as A}from"../EmptyState/EmptyStateBUI.esm.js";import"@remixicon/react";import"../FilterSidebar/FilterSidebar.esm.js";import"../FilterSidebar/StateFilter.esm.js";import"lodash";import{toFilter as Le}from"../FilterSidebar/util.esm.js";import{LoadingTableSkeleton as je}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import{SimpleMenu as xe}from"../Menus/SimpleMenu.esm.js";import{useCheckActions as Me}from"../Menus/useCheckActions.esm.js";import{PageCustomActions as Oe}from"../PageCustomActions/PageCustomActions.esm.js";import"../TechHealth/Filters/types.esm.js";import"../TechHealth/Filters/FacetFilter.esm.js";import"../TechHealth/Filters/FilterProvider.esm.js";import"../TechHealth/Filters/Filters.esm.js";import"../TechHealth/Filters/FiltersHeader.esm.js";import"../TechHealth/Filters/FiltersSection.esm.js";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import{parseNumberOfDays as Be}from"../TechHealth/Filters/utils.esm.js";import{CheckEntitiesTableBUI as De}from"./CheckEntitiesTable/CheckEntitiesTableBUI.esm.js";import{ExemptionsTableBUI as Qe}from"./ExemptionsTableBUI.esm.js";const Ue=de(()=>({container:{marginBottom:"var(--bui-space-12)"},tables:{margin:"var(--bui-space-12) 0 0"},tableContent:{margin:"var(--bui-space-3) 0 0"}})),d={ENTITIES:"Entities",EXEMPTIONS:"Exemptions"},Ve=(l,e)=>l.levels.flatMap(({checks:f})=>f).find(({id:f})=>f===e)||null,$e=()=>{const l=Ue(),[e,f]=ke(),{trackId:i,checkId:t}=ge(),{data:a,isLoading:u,isError:q}=Ie(i),{data:k,isLoading:h,isError:H}=Ee(t),F=k?.ownerEntityRef,X=F?le(F).name:void 0,L=Me(k??void 0),W=R(ve),z=R(Re),G=R(we),[j,J]=P(new Set([d.ENTITIES])),S=j.values().next().value??d.ENTITIES,[n,K]=P(e.get("search")||""),[x,Y]=P(""),m=s(()=>e.getAll("states"),[e]),g=s(()=>e.getAll("owners"),[e]),b=s(()=>e.getAll("lifecycles"),[e]),E=s(()=>e.getAll("types"),[e]),I=s(()=>e.getAll("systems"),[e]),y=s(()=>Be(e.get("numberOfDays")),[e]);be(()=>{Y(n);const o=new URLSearchParams(e.toString());n?o.set("search",n):o.delete("search"),f(o,{replace:!0})},300,[n]);const M=s(()=>({routeName:"soundcheck-check-insights",additionalAttributes:{checkId:t||"",trackId:i||"",filtersApplied:g.length+b.length+E.length+I.length+m.length,ownersFilter:g.join(",")||"",lifecyclesFilter:b.join(",")||"",typesFilter:E.join(",")||"",systemsFilter:I.join(",")||"",statesFilter:m.join(",")||"",numberOfDays:y,checkSearch:x}}),[t,i,g,b,E,I,m,y,x]),{reportContentLoaded:O}=Ce(M),{reporter:Z}=Te(M),c=s(()=>k??a?.levels.flatMap(o=>o.checks).find(o=>o.id===t),[k,t,a?.levels]),T=Le({lifecycles:b,owners:g,types:E,systems:I}),{data:_,isLoading:C,isError:ee}=Se({checkId:t,trackId:i,filter:T,states:m?.length?m:void 0},!!t);let v;if(t)if(a){const o=N(a.filter),me=N(Ve(a,t)?.filter);v=fe(o,me)}else c?.filter&&(v=N(c.filter));const{loading:B,allowed:D}=ne({permission:he,resourceRef:t}),te=s(()=>!!c&&!B&&!D,[D,c,B]),{filters:re,selected:ie,setSelected:oe,onRemoveTag:se,selectedTags:ae}=ye({entityFilterQuery:v,hasStatusFilters:!0}),Q=q||H||ee,U=Z?.getLCPValue();return ue(()=>{!h&&!C&&(!i||!u)&&O({lcp:U})},[h,C,u,i,O,U]),h||i&&u?r(je,{}):!h&&!c?r(V,{className:l.container,children:r(A,{title:"Check not found",body:`There is no check with the requested id: ${t}.`})}):te?r(A,{title:"Cannot view check",body:`No permission to view check with the requested id: ${t}.`}):i&&!u&&!a?r(A,{title:"No track found",body:`There is no track with the requested id: ${i}.`}):p(ce,{children:[r(pe,{title:c?.name??"",breadcrumbs:i?[{label:"Tracks",href:G()},{label:a?.name??"Track",href:W({trackId:i})}]:[{label:"Checks",href:z()}],customActions:r(xe,{label:"Check Actions",disabled:!L.length,placement:"left top",menuActions:L})}),p(V,{className:l.container,children:[p($,{children:[r(Ne,{description:c?.description??void 0,owner:X,isError:Q,isLoading:h}),r(Pe,{states:m,status:_,isLoading:C,isError:Q}),r(Ae,{checkId:t,trackId:i,filter:T,states:m,numberOfDays:y})]}),p(w,{className:l.tables,children:[p($,{justify:"between",children:[r(w,{minWidth:"12rem",children:r(Fe,{options:Object.values(d),selected:j,ariaLabel:"Sections",onSelectionChange:J})}),r(Oe,{searchValue:n,setSearchValue:o=>K(o),filters:re,selected:ie,setSelected:oe,onRemoveTag:se,selectedTags:ae,showSearch:S!==d.ENTITIES})]}),p(w,{className:l.tableContent,children:[S===d.ENTITIES&&r(De,{checkId:t,trackId:a?.id,filter:T,states:m}),S===d.EXEMPTIONS&&r(Qe,{checkId:t,searchValue:n})]})]})]})]})};export{$e as CheckPageBUI};
|
|
2
2
|
//# sourceMappingURL=CheckPageBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r,jsxs as
|
|
1
|
+
import{jsx as r,jsxs as p}from"react/jsx-runtime";import{Text as b,Box as y}from"@backstage/ui";import{makeStyles as g}from"@material-ui/core";import{DateTime as x}from"luxon";import{Line as v,ResponsiveContainer as C,LineChart as L,CartesianGrid as I,XAxis as S,YAxis as a,Tooltip as A}from"recharts";import{useCheckStatusHistory as F}from"../../hooks/aggregations/useCheckStatusHistory.esm.js";import{getChartStatusKeys as T,getChartStatusColor as D}from"../../utils/charts.esm.js";import{compactNumberFormatter as O}from"../../utils/formatters.esm.js";import{LoadingTableSkeleton as W}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";const w=g(()=>({container:{height:180,overflow:"hidden"},"@global":{".recharts-default-tooltip li":{margin:"0 !important",padding:"0 !important"}}})),K=({checkId:e,trackId:n,filter:s,states:c,numberOfDays:d})=>{const m=w(),{data:i,isLoading:l,isError:u}=F({checkId:e,trackId:n,filter:s,states:c,numberOfDays:d},!!e);if(l)return r(W,{rowCount:3});if(u)return r(b,{color:"warning",children:"Failed to load check data."});const h=t=>i?.history.some(o=>o[t]>0)??!1,f={stroke:"var(--bui-fg-secondary)",strokeWidth:1,r:5},k=T().filter(t=>h(t)).map(t=>{const o=D(t);return r(v,{type:"monotone",dataKey:t,stroke:o,yAxisId:"count",strokeWidth:2,dot:!1,isAnimationActive:!1,activeDot:{fill:o,...f}},t)});return r(y,{className:m.container,children:r(C,{debounce:1,children:p(L,{data:i?.history??[],margin:{top:0,right:0,bottom:0,left:0},children:[r(I,{stroke:"var(--bui-border)",strokeWidth:1,horizontal:!0,vertical:!1}),r(S,{dataKey:"date",tickFormatter:t=>x.fromISO(t).toFormat("MMM d"),tickLine:!1,axisLine:!1}),r(a,{yAxisId:"percentage",domain:[0,100],axisLine:!1,tickLine:!1,tickFormatter:t=>`${t}%`,ticks:[0,25,50,75,100]}),r(a,{yAxisId:"count",orientation:"right",domain:[0,i?.numberOfEntities??0],axisLine:!1,tickLine:!1,tickFormatter:t=>O(t)}),r(A,{contentStyle:{backgroundColor:"var(--bui-bg)",color:"var(--bui-fg-secondary)",border:"1px solid var(--bui-border)",borderRadius:"var(--bui-radius-3)"},cursor:{stroke:"var(--bui-fg-secondary)",strokeWidth:1}}),k]})})})};export{K as CheckStatusHistoryChartBUI};
|
|
2
2
|
//# sourceMappingURL=CheckStatusHistoryChartBUI.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t,jsxs as C}from"react/jsx-runtime";import{useApi as I,featureFlagsApiRef as re,useRouteRef as te}from"@backstage/core-plugin-api";import{usePermission as oe}from"@backstage/plugin-permission-react";import{makeStyles as ae,Button as B,Grid as a}from"@material-ui/core";import{soundcheckCheckCreatePermission as ie}from"@spotify/backstage-plugin-soundcheck-common";import{useState as i,useMemo as se,useEffect as P}from"react";import{useNavigate as ce}from"react-router-dom";import ne from"react-use/lib/useDebounce";import{soundcheckApiRef as me}from"../../../api.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import{useGetChecks as pe}from"../../../hooks/checks/useGetChecks.esm.js";import"../../../hooks/useSoundcheckAlert.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import"react-use/lib/useLocalStorage";import{useGetCheckOwners as le}from"../../../hooks/checks/useGetCheckOwners.esm.js";import{useImportChecks as de}from"../../../hooks/checks/useImportChecks.esm.js";import{useLCPReporting as he}from"../../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as ge}from"../../../hooks/useLoadTimeReporting.esm.js";import ue from"../../../images/no-results.svg";import{checkTemplatesRouteRef as fe}from"../../../routes.esm.js";import{exportChecks as ke}from"../../../utils/export.esm.js";import{FilterDefault as L}from"../../../utils/filters.esm.js";import{EmptyState as O}from"../../EmptyState/EmptyState.esm.js";import"../../EmptyState/EmptyStateBUI.esm.js";import"@remixicon/react";import{ImportExportPanelDeprecated as Ce}from"../../ImportExportPanel/ImportExportPanelDeprecated.esm.js";import{Pagination as Pe}from"../../Pagination/Pagination.esm.js";import{SearchFilters as
|
|
1
|
+
import{jsx as t,jsxs as C}from"react/jsx-runtime";import{useApi as I,featureFlagsApiRef as re,useRouteRef as te}from"@backstage/core-plugin-api";import{usePermission as oe}from"@backstage/plugin-permission-react";import{makeStyles as ae,Button as B,Grid as a}from"@material-ui/core";import{soundcheckCheckCreatePermission as ie}from"@spotify/backstage-plugin-soundcheck-common";import{useState as i,useMemo as se,useEffect as P}from"react";import{useNavigate as ce}from"react-router-dom";import ne from"react-use/lib/useDebounce";import{soundcheckApiRef as me}from"../../../api.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import{useGetChecks as pe}from"../../../hooks/checks/useGetChecks.esm.js";import"../../../hooks/useSoundcheckAlert.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import"react-use/lib/useLocalStorage";import{useGetCheckOwners as le}from"../../../hooks/checks/useGetCheckOwners.esm.js";import{useImportChecks as de}from"../../../hooks/checks/useImportChecks.esm.js";import{useLCPReporting as he}from"../../../hooks/useLCPReporting.esm.js";import{useLoadTimeReporting as ge}from"../../../hooks/useLoadTimeReporting.esm.js";import ue from"../../../images/no-results.svg";import{checkTemplatesRouteRef as fe}from"../../../routes.esm.js";import{exportChecks as ke}from"../../../utils/export.esm.js";import{FilterDefault as L}from"../../../utils/filters.esm.js";import{EmptyState as O}from"../../EmptyState/EmptyState.esm.js";import"../../EmptyState/EmptyStateBUI.esm.js";import"@remixicon/react";import{ImportExportPanelDeprecated as Ce}from"../../ImportExportPanel/ImportExportPanelDeprecated.esm.js";import{Pagination as Pe}from"../../Pagination/Pagination.esm.js";import{SearchFilters as be}from"../../SearchFilters/SearchFilters.esm.js";import{ChecksOverviewSkeleton as ve}from"../skeletons/ChecksOverviewSkeleton.esm.js";import{CheckSummaryCard as xe}from"./CheckSummaryCard.esm.js";var T=(e=>(e.title="Create a check",e.description="A check is a comparison between a defined acceptable outcome and the actual outcome of a given process.",e.callToAction="Get started",e))(T||{}),F=(e=>(e.title="No checks found",e.description="No checks matched your search. Consider changing search term and filters.",e))(F||{});const ye=ae(e=>({headerButtons:{display:"flex",gap:e.spacing(1),flexWrap:"nowrap",justifyContent:"end",alignItems:"end"},header:{padding:e.spacing(0,0,1)},container:{padding:e.spacing(3),gap:e.spacing(3)},createButton:{lineHeight:"1.25rem",paddingTop:e.spacing(1.5),paddingBottom:e.spacing(1.5)}})),Ae=({checksPerPage:e,currentCursor:E})=>{const[m,b]=i(E),[g,G]=i(""),[c,j]=i(L.Alpha),[n,D]=i(L.Owner),[p,H]=i(""),v=se(()=>({routeName:"soundcheck-checks",additionalAttributes:{checksPerPage:e,pageCursor:m||"",sortOrder:c||"",ownerFilter:n||"",nameSearch:p||""}}),[e,m,c,n,p]),{reportContentLoaded:x}=ge(v),{reporter:M}=he(v),l=ye(),{data:V,isLoading:u}=le();ne(()=>{H(g)},500,[g]);const{loading:y,allowed:W}=oe({permission:ie}),{data:o,isLoading:s}=pe({ids:void 0,first:e,after:m,orderAlphabetical:c,searchByOwner:n,searchByName:p}),[f,$]=i(o),d=f?.edges?.map(r=>r.node),[A,w]=i([]);P(()=>{b(void 0),w([])},[p,c,n]);const N=I(re),q=!N.getRegisteredFlags().find(r=>r.name==="soundcheck-enable-check-creation")||N.isActive("soundcheck-enable-check-creation"),k=!W||!q,z=r=>{j(r.target.value)},J=r=>{D(r.target.value)};P(()=>{o&&$(()=>({totalCount:o.totalCount,edges:o.edges,pageInfo:{startCursor:o.pageInfo.startCursor,endCursor:o.pageInfo.endCursor,hasNextPage:o?.pageInfo.hasNextPage??!1,hasPreviousPage:o?.pageInfo.hasPreviousPage??!1}}))},[o]);const K=ce(),Q=te(fe),R=()=>K(Q()),U=I(me),{mutateAsync:X}=de(),Y=async r=>X(r),Z=async()=>{const r=await U.getChecks({orderAlphabetical:"asc"});return ke(r.edges.map(ee=>ee.node))},S=M?.getLCPValue();if(P(()=>{!s&&!u&&x({lcp:S})},[s,u,x,S]),!s&&!d)return t(O,{title:"Create a check",description:"A check is a comparison between a defined acceptable outcome and the actual outcome of a given process.",imgSrc:ue,action:!y&&t(B,{disabled:k,variant:"contained",color:"primary",onClick:R,children:"Get started"})});let h;s?h=t(ve,{}):d?.length?h=d?.map(r=>t(a,{xs:12,sm:12,md:6,lg:4,xl:3,item:!0,role:"listitem","aria-label":`check card ${r.id}`,children:t(xe,{check:r})},r.id)):h=t(a,{xs:12,item:!0,role:"listitem","aria-label":"result",children:t(O,{title:"No checks found",description:"No checks matched your search. Consider changing search term and filters."})});const _=f?.pageInfo.hasNextPage||A?.length>0;return C(a,{container:!0,direction:"row",className:l.container,children:[C(a,{container:!0,className:l.header,children:[t(be,{searchPlaceholder:"Search Available Checks",isLoading:s||u,searchTerm:g,setSearchTerm:G,filterAlpha:c,handleAlphabeticalFilterChange:z,filterOwner:n,handleOwnerFilterChange:J,owners:V}),C(a,{item:!0,xs:4,className:l.headerButtons,children:[t(Ce,{resourceType:"check",disableImport:k,disableExport:s||!d?.length,onImport:Y,onExport:Z}),!y&&t(B,{disabled:k,variant:"contained",color:"primary",onClick:R,className:l.createButton,children:"Create Check"})]})]}),t(a,{container:!0,spacing:4,role:"list","aria-label":"checks",children:h}),_&&t(a,{item:!0,xs:12,children:t(Pe,{response:f,listingsPerPage:e,cursor:m,setCursor:b,prevCursors:A,setPrevCursors:w,labelPerPageDropdown:"Checks Per Page:",urlRoute:"checks?checksPerPage="})})]})};export{T as CheckEmptyState,Ae as CheckListPage,F as CheckNoResults};
|
|
2
2
|
//# sourceMappingURL=CheckListPageDeprecated.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as m,Fragment as K}from"react/jsx-runtime";import{useRouteRef as x,useApi as A}from"@backstage/core-plugin-api";import{entityPresentationApiRef as W}from"@backstage/plugin-catalog-react";import{usePermission as Y}from"@backstage/plugin-permission-react";import{HeaderPage as _,Flex as q,Container as Q,Table as X,TableHeader as Z,Column as g,TableBody as $,TablePagination as ee}from"@backstage/ui";import{makeStyles as te}from"@material-ui/core";import{soundcheckCheckCreatePermission as re}from"@spotify/backstage-plugin-soundcheck-common";import{sortBy as oe,isEmpty as y}from"lodash";import{useState as w,useMemo as T}from"react";import{useSearchParams as ie}from"react-router-dom";import ne from"react-use/lib/useDebounce";import{soundcheckApiRef as ae}from"../../api.esm.js";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../hooks/graphqlKeys.esm.js";import{useGetChecks as me}from"../../hooks/checks/useGetChecks.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{usePagination as se}from"../../hooks/usePagination.esm.js";import"react-use/lib/useLocalStorage";import{useProfileImages as ce}from"../../hooks/catalog/useProfileImages.esm.js";import{useImportChecks as pe}from"../../hooks/checks/useImportChecks.esm.js";import{useSearchNameOwner as le}from"../../hooks/useSearchNameOwner.esm.js";import{checkTemplatesRouteRef as de,checkDetailsRouteRef as fe}from"../../routes.esm.js";import{exportChecks as he}from"../../utils/export.esm.js";import"../EmptyState/EmptyState.esm.js";import{EmptyStateBUI as ue}from"../EmptyState/EmptyStateBUI.esm.js";import"@remixicon/react";import{EmptyStateNoChecks as ge}from"../EmptyState/EmptyStateNoChecks.esm.js";import{ImportExportPanelBUI as ye}from"../ImportExportPanel/ImportExportPanelBUI.esm.js";import"../ImportExportPanel/ImportExportPanelDeprecated.esm.js";import{ListPageCustomActions as we}from"../ListPageCustomActions/ListPageCustomActions.esm.js";import{LoadingTableSkeleton as ke}from"../LoadingTableSkeleton/LoadingTableSkeleton.esm.js";import"../Menus/SimpleMenu.esm.js";import{useCheckActions as Re}from"../Menus/useCheckActions.esm.js";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import"uuid";import"../CampaignsPage/CampaignListPage/useArchiveConfirmationModal.esm.js";import{TableRowWithOwner as Pe}from"../TableRowWithOwner/TableRowWithOwner.esm.js";const L=10,Ce=["name","owner"],Se=({check:o,profileImageMap:n})=>{const s=x(fe),i=Re(o);return t(Pe,{ownerEntityRef:o.ownerEntityRef??"",href:s({checkId:o.id}),profileImageSrc:n[o.ownerEntityRef??""],menuActions:i,name:o.name??o.id,description:o.description??"",cells:[]})},Ee=te(()=>({container:{marginBottom:"var(--bui-space-12)"}})),Ie=()=>{const o=Ee(),[n,s]=ie(),[i,B]=w(()=>n.get("search")??""),[l,N]=w(()=>n.get("sortDirection")==="descending"?"descending":"ascending"),[a,U]=w(()=>{const e=n.get("sort");return e&&Ce.includes(e)?e:""}),{isLoading:c,data:k}=me({}),d=T(()=>k?.edges?.map(e=>e.node)??[],[k?.edges]),{loading:R,allowed:P}=Y({permission:re}),D=x(de),{profileImageMap:H}=ce(d.filter(e=>e.ownerEntityRef).map(e=>e.ownerEntityRef)),C=A(W),f=le(d,i),S=T(()=>{if(!a)return f;const e=oe(f,r=>a==="owner"?r.ownerEntityRef?C.forEntity(r.ownerEntityRef).snapshot.primaryTitle:-1:a==="type"?r.type?r.type:"default":r?.name?.toLowerCase()??r.id.toLowerCase());return l==="descending"&&e.reverse(),e},[a,f,l,C]),{mutateAsync:M}=pe(),O=async e=>M(e),v=A(ae),F=async()=>{const e=await v.getChecks({orderAlphabetical:"asc"});return he(e.edges.map(r=>r.node))},{paginatedItems:h,reset:E,paginationProps:V}=se({pageParam:"perPage",defaultPageSize:L,items:S});ne(()=>{E();const e=new URLSearchParams(n.toString());i?e.set("search",i):e.delete("search"),s(e,{replace:!0})},300,[i]);const j=({direction:e,column:r})=>{const u=String(r);U(u),N(e),E();const p=new URLSearchParams(n);u?p.set("sort",u):p.delete("sort"),p.set("sortDirection",e),s(p,{replace:!0})},G=c,I=!c&&y(h),z=!c&&!y(h),J=S.length>L;let b=null;return I&&(b=i?t(ue,{title:"No checks found",body:"Your current search term did not return any checks. Please try a different search term."}):t(ge,{})),m(K,{children:[t(_,{customActions:m(q,{gap:"2",align:"center",children:[t(ye,{resourceType:"check",disableImport:!R&&!P,disableExport:c||y(d),onImport:O,onExport:F}),t(we,{searchValue:i,setSearchValue:B,canCreate:!R&&P,createHref:D()})]}),title:"Checks"}),m(Q,{className:o.container,children:[G&&t(ke,{rowCount:10}),I&&b,z&&m(X,{onSortChange:j,sortDescriptor:{direction:l,column:a},children:[m(Z,{children:[t(g,{id:"name",allowsSorting:!0,isRowHeader:!0,style:{width:"83%"},children:"Name"}),t(g,{id:"owner",allowsSorting:!0,style:{width:"15%"},children:"Check Owner"}),t(g,{id:"actions",style:{width:"2%"}})]}),t($,{children:h.map(e=>t(Se,{check:e,profileImageMap:H??{}},e.id))})]}),J&&t(ee,{...V})]})]})};export{Ie as ChecksListPageBUI};
|
|
2
2
|
//# sourceMappingURL=ChecksListPageBUI.esm.js.map
|