@spotify/backstage-plugin-soundcheck 0.14.2 → 0.14.4
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 +29 -0
- package/dist/alpha.d.ts +12 -12
- package/dist/components/AreaChart/AreaChart.esm.js +2 -0
- package/dist/components/AreaChart/ChartTooltip.esm.js +2 -0
- package/dist/components/AreaChart/Legend.esm.js +2 -0
- package/dist/components/AreaChart/LegendItem.esm.js +2 -0
- package/dist/components/AreaChart/utils.esm.js +2 -0
- package/dist/components/CacheConfig/utils.esm.js +1 -1
- package/dist/components/CampaignDetailsPage/CampaignDetailRow.esm.js +1 -1
- package/dist/components/CampaignDetailsPage/CampaignDetails.esm.js +1 -1
- package/dist/components/CampaignInsightsPage/CampaignInsightsPage.esm.js +2 -0
- package/dist/components/CampaignInsightsPage/CampaignStatusHistoryTile.esm.js +2 -0
- package/dist/components/CampaignInsightsPage/CampaignStatusTile.esm.js +2 -0
- package/dist/components/CampaignInsightsPage/DaysRemainingTile.esm.js +2 -0
- package/dist/components/CampaignsPage/CampaignListPage/CampaignMetadata.esm.js +1 -1
- package/dist/components/CampaignsPage/CampaignListPage/CampaignSummaryCard.esm.js +1 -1
- package/dist/components/CategoryBar/CategoryBar.esm.js +2 -0
- package/dist/components/CheckCard/CheckCard.esm.js +1 -1
- package/dist/components/CheckPage/CheckInsightsPage.esm.js +1 -1
- package/dist/components/CheckPage/FilterBar/FilterBar.esm.js +1 -1
- package/dist/components/ChecksPage/CheckListPage/CheckMetadata.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/FactCollectionConfig.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/DataDog/DataDogConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/GithubConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Gitlab/GitlabConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Jira/IssuesSearchFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Jira/JiraConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Kubernetes/KubernetesConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Kubernetes/KubernetesFactDetails.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Kubernetes/types.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Kubernetes/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Kubernetes/validation.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/NewRelic/NewRelicConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/PagerDuty/IncidentsFactDetailsComponent.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/PagerDuty/PagerDutyConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/ScmConfigurator.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SCM/utils.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SonarQube/MeasuresFactDetailsInput.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SonarQube/MetricsInput.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SonarQube/SonarQubeConfigurator.esm.js +1 -1
- package/dist/components/DroppableInput/DroppableInput.esm.js +1 -1
- package/dist/components/Filter/FilterPreviewTable/EntityTableColumns.esm.js +2 -0
- package/dist/components/Filter/FilterPreviewTable/FilterPreviewTable.esm.js +1 -1
- package/dist/components/FormControlledTextField/FormControlledTextField.esm.js +2 -0
- package/dist/components/LevelCard/LevelCard.esm.js +1 -1
- package/dist/components/OverviewTable/resultsTableUtils.esm.js +1 -1
- package/dist/components/PassRateGrid/PassRateMetadata.esm.js +1 -1
- package/dist/components/RoutingPage/RoutingPage.esm.js +1 -1
- package/dist/components/TechHealth/Filters/useFacetOptions.esm.js +1 -1
- package/dist/components/TrackPage/FilterBar/FilterBar.esm.js +1 -1
- package/dist/components/TrackPage/FilterBar/util.esm.js +2 -0
- package/dist/components/TrackPage/TrackEntitiesTable/TrackEntitiesTable.esm.js +1 -1
- package/dist/components/TrackPage/TrackPage.esm.js +1 -1
- package/dist/components/TrackPage/TrackProgressCard.esm.js +1 -1
- package/dist/graphql/generated/index.esm.js +1 -0
- package/dist/hooks/campaigns/useArchiveCampaign.esm.js +1 -1
- package/dist/hooks/campaigns/useCreateCampaign.esm.js +1 -1
- package/dist/hooks/campaigns/useDeleteCampaign.esm.js +1 -1
- package/dist/hooks/campaigns/useGetCampaign.esm.js +1 -1
- package/dist/hooks/checks/useCreateCheck.esm.js +1 -1
- package/dist/hooks/checks/useExecuteCheck.esm.js +1 -1
- package/dist/hooks/checks/useUpdateCheck.esm.js +1 -1
- package/dist/hooks/collectors/useUpdateCollectorConfig.esm.js +1 -1
- package/dist/hooks/tracks/useCreateTrack.esm.js +1 -1
- package/dist/hooks/tracks/useDeleteTrack.esm.js +1 -1
- package/package.json +37 -26
- package/alpha/package.json +0 -7
- package/dist/components/CampaignDetailsPage/CampaignChecks.esm.js +0 -2
- package/dist/components/CampaignDetailsPage/CampaignDetailsPage.esm.js +0 -2
- package/dist/components/CampaignDetailsPage/CampaignMilestones.esm.js +0 -2
- package/dist/components/CampaignDetailsPage/CampaignProgress.esm.js +0 -2
- package/dist/components/CampaignDetailsPage/CampaignResultsTable.esm.js +0 -2
- package/dist/hooks/campaigns/useGetCampaignProgress.esm.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @spotify/backstage-plugin-soundcheck
|
|
2
2
|
|
|
3
|
+
## 0.14.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Resolved issue with combining multiple catalog filters.
|
|
8
|
+
- Campaign Insight tiles now respect the user's filters.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @spotify/backstage-plugin-soundcheck-common@0.14.4
|
|
11
|
+
|
|
12
|
+
## 0.14.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Update to Backstage `v1.33.3`
|
|
17
|
+
- Updated dependency `uuid` to `^11.0.0`.
|
|
18
|
+
- Updated dependency `@types/node` to `^22.0.0`.
|
|
19
|
+
- Updated dependency `git-url-parse` to `^16.0.0`.
|
|
20
|
+
- Fix front end caching issue where updates sometimes did not reflect in the UI.
|
|
21
|
+
- Links on Entity Table in the Forms now open in a new tab so users don't lose progress if clcking on them accidentally.
|
|
22
|
+
- Fixes an error that could prevent the Sonarqube page from loading with incomplete configurations supplied from yaml files.
|
|
23
|
+
- Fixes a potential error on the SCM configuration page.
|
|
24
|
+
- Add Custom Resource Definition to K8S Integration UI.
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
- @spotify/backstage-plugin-core@0.8.3
|
|
30
|
+
- @spotify/backstage-plugin-soundcheck-common@0.14.3
|
|
31
|
+
|
|
3
32
|
## 0.14.2
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import * as
|
|
2
|
+
import * as _backstage_catalog_model_index from '@backstage/catalog-model/index';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
5
|
-
import * as
|
|
5
|
+
import * as _backstage_core_plugin_api_index from '@backstage/core-plugin-api/index';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @public
|
|
@@ -15,10 +15,10 @@ 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_core_plugin_api_index.AnyApiFactory, "core.api.factory", {}>;
|
|
19
19
|
inputs: {};
|
|
20
20
|
params: {
|
|
21
|
-
factory:
|
|
21
|
+
factory: _backstage_core_plugin_api_index.AnyApiFactory;
|
|
22
22
|
};
|
|
23
23
|
}>;
|
|
24
24
|
"entity-content:soundcheck/entity": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
@@ -36,7 +36,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
36
36
|
};
|
|
37
37
|
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
|
|
38
38
|
optional: true;
|
|
39
|
-
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity:
|
|
39
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model_index.Entity) => boolean, "catalog.entity-filter-function", {
|
|
40
40
|
optional: true;
|
|
41
41
|
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
42
42
|
optional: true;
|
|
@@ -47,7 +47,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
47
47
|
defaultPath: string;
|
|
48
48
|
defaultTitle: string;
|
|
49
49
|
routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
|
|
50
|
-
filter?: string | ((entity:
|
|
50
|
+
filter?: string | ((entity: _backstage_catalog_model_index.Entity) => boolean) | undefined;
|
|
51
51
|
};
|
|
52
52
|
}>;
|
|
53
53
|
"nav-item:soundcheck": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
@@ -57,13 +57,13 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
57
57
|
configInput: {};
|
|
58
58
|
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
|
|
59
59
|
title: string;
|
|
60
|
-
icon:
|
|
60
|
+
icon: _backstage_core_plugin_api_index.IconComponent;
|
|
61
61
|
routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
62
62
|
}, "core.nav-item.target", {}>;
|
|
63
63
|
inputs: {};
|
|
64
64
|
params: {
|
|
65
65
|
title: string;
|
|
66
|
-
icon:
|
|
66
|
+
icon: _backstage_core_plugin_api_index.IconComponent;
|
|
67
67
|
routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
|
|
68
68
|
};
|
|
69
69
|
}>;
|
|
@@ -76,7 +76,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
76
76
|
configInput: {
|
|
77
77
|
filter?: string | undefined;
|
|
78
78
|
};
|
|
79
|
-
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity:
|
|
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
80
|
optional: true;
|
|
81
81
|
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
82
82
|
optional: true;
|
|
@@ -84,7 +84,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
84
84
|
inputs: {};
|
|
85
85
|
params: {
|
|
86
86
|
loader: () => Promise<JSX.Element>;
|
|
87
|
-
filter?: string | ((entity:
|
|
87
|
+
filter?: string | ((entity: _backstage_catalog_model_index.Entity) => boolean) | undefined;
|
|
88
88
|
};
|
|
89
89
|
}>;
|
|
90
90
|
"entity-content:soundcheck/group": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
@@ -102,7 +102,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
102
102
|
};
|
|
103
103
|
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
|
|
104
104
|
optional: true;
|
|
105
|
-
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity:
|
|
105
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model_index.Entity) => boolean, "catalog.entity-filter-function", {
|
|
106
106
|
optional: true;
|
|
107
107
|
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
108
108
|
optional: true;
|
|
@@ -113,7 +113,7 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{}, {}, {
|
|
|
113
113
|
defaultPath: string;
|
|
114
114
|
defaultTitle: string;
|
|
115
115
|
routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
|
|
116
|
-
filter?: string | ((entity:
|
|
116
|
+
filter?: string | ((entity: _backstage_catalog_model_index.Entity) => boolean) | undefined;
|
|
117
117
|
};
|
|
118
118
|
}>;
|
|
119
119
|
"page:soundcheck/SoundcheckRoutingPage": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{makeStyles as se,useTheme as ce}from"@material-ui/core/styles";import{schemeCategory10 as de}from"d3-scale-chromatic";import t,{useState as L,useRef as V}from"react";import{ResponsiveContainer as pe,AreaChart as me,CartesianGrid as ye,XAxis as ue,Label as D,YAxis as xe,Tooltip as ge,Legend as fe,Area as ve,Dot as G,Line as ke}from"recharts";import{ChartTooltip as he}from"./ChartTooltip.esm.js";import Ee from"./Legend.esm.js";import{yDomain as Ae,hasUniqueValueForKey as z}from"./utils.esm.js";const Le=se(o=>({root:{height:"100%",width:"100%"},gridLine:{stroke:o.palette.divider},xAxis:{fontSize:"0.75rem",fill:o.palette.text.secondary},yAxis:{fontSize:"0.75rem",fill:o.palette.text.secondary},tooltip:{borderRadius:o.shape.borderRadius,border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.background.paper,color:o.palette.text.primary,boxShadow:o.shadows[1]}})),be=({data:o=[],categories:E=[],index:x,colors:b=de,categoryColors:R={},valueFormatter:C=s=>s.toString(),startEndOnly:K=!1,showXAxis:W=!0,showYAxis:P=!0,showGridLines:q=!0,yAxisWidth:I=56,intervalType:M="equidistantPreserveStart",showTooltip:X=!0,showLegend:Y=!0,autoMinValue:j=!1,minValue:B,maxValue:H,allowDecimals:U=!0,connectNulls:w=!1,className:Z,onValueChange:p,enableLegendSlider:J=!0,tickGap:Q=5,xAxisLabel:A,yAxisLabel:g,type:f="default",legendPosition:Ce="right",fill:_="gradient",tooltipCallback:T,customTooltip:N,...$})=>{const s=Le(),m=ce(),[ee,te]=L(60),[l,v]=L(void 0),[c,u]=L(void 0),y=E.reduce((e,a,i)=>(e[a]=R[a]||b[i%b.length],e),{}),ae=Ae({autoMinValue:j,minValue:B,maxValue:H}),k=!!p,ie=f==="stacked"||f==="percent",S=V(void 0),F=V(void 0),oe=({fillType:e,dot:a,legend:i,category:r})=>{const n=a||i&&i!==r?.1:.3,d=y[r]||m.palette.primary.main;switch(e){case"none":return t.createElement("stop",{stopColor:d,stopOpacity:0});case"gradient":return t.createElement(t.Fragment,null,t.createElement("stop",{offset:"5%",stopColor:d,stopOpacity:n}),t.createElement("stop",{offset:"95%",stopColor:d,stopOpacity:0}));case"solid":default:return t.createElement("stop",{stopColor:d,stopOpacity:n})}};function ne(e){return`${(e*100).toFixed(0)}%`}function re(e,a){a.stopPropagation(),k&&(e.index===l?.index&&e.dataKey===l?.dataKey||z(o,e.dataKey)&&c&&c===e.dataKey?(u(void 0),v(void 0),p?.(null)):(u(e.dataKey),v({index:e.index,dataKey:e.dataKey}),p?.({eventType:"dot",categoryClicked:e.dataKey,...e.payload})))}function O(e){k&&(e===c&&!l||z(o,e)&&l&&l.dataKey===e?(u(void 0),p?.(null)):(u(e),p?.({eventType:"category",categoryClicked:e})),v(void 0))}return t.createElement("div",{className:`${s.root} ${Z}`,...$},t.createElement(pe,null,t.createElement(me,{data:o,onClick:k&&(c||l)?()=>{v(void 0),u(void 0),p?.(null)}:void 0,margin:{bottom:A?30:void 0,left:g?20:void 0,right:g?5:void 0,top:5},stackOffset:f==="percent"?"expand":void 0},q?t.createElement(ye,{className:s.gridLine,horizontal:!0,vertical:!1}):null,t.createElement(ue,{padding:{left:20,right:20},hide:!W,dataKey:x,interval:K?"preserveStartEnd":M,tick:{transform:"translate(0, 6)"},ticks:K?[o[0][x],o[o.length-1][x]]:void 0,className:s.xAxis,tickLine:!1,axisLine:!1,minTickGap:Q},A&&t.createElement(D,{position:"insideBottom",offset:-20,className:s.xAxis},A)),t.createElement(xe,{width:I,hide:!P,axisLine:!1,tickLine:!1,type:"number",domain:ae,tick:{transform:"translate(-3, 0)"},className:s.yAxis,tickFormatter:f==="percent"?ne:C,allowDecimals:U},g&&t.createElement(D,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:s.yAxis},g)),t.createElement(ge,{wrapperStyle:{outline:"none"},isAnimationActive:!0,animationDuration:100,cursor:{stroke:m.palette.divider,strokeWidth:1},offset:20,position:{y:0},content:({active:e,payload:a,label:i})=>{const r=a?a.map(n=>({category:n.dataKey,value:n.value,index:n.payload[x],color:y[n.dataKey]??"#000",type:n.type,payload:n.payload})):[];return T&&(e!==S.current||i!==F.current)&&(T({active:e,payload:r,label:i}),S.current=e,F.current=i),X&&e?N?t.createElement(N,{active:e,payload:r,label:i}):t.createElement(he,{active:e,payload:r,label:i,valueFormatter:C}):null}}),Y?t.createElement(fe,{verticalAlign:"top",height:ee,content:({payload:e})=>t.createElement(Ee,{categories:e?.map(a=>a.value)??[],colors:e?.map(a=>y[a.value]||m.palette.primary.main)??[],onClickLegendItem:k?O:void 0,activeLegend:c,enableLegendSlider:J,setLegendHeight:te})}):null,E.map(e=>{const a=`${e.replace(/[^a-zA-Z0-9]/g,"")}`;return t.createElement(t.Fragment,{key:e},t.createElement("defs",{key:e},t.createElement("linearGradient",{id:a,x1:"0",y1:"0",x2:"0",y2:"1"},oe({fillType:_,dot:l,legend:c,category:e}))),t.createElement(ve,{stroke:y[e]||m.palette.primary.main,strokeOpacity:l||c&&c!==e?.3:1,activeDot:i=>{const{cx:r,cy:n,dataKey:d}=i;return t.createElement(G,{cx:r,cy:n,r:5,fill:y[d]||m.palette.primary.main,onClick:(h,le)=>re(i,le)})},dot:i=>{const{cx:r,cy:n,dataKey:d,index:h}=i;return l?.index===h&&l?.dataKey===e?t.createElement(G,{key:h,cx:r,cy:n,r:5,fill:y[d]||m.palette.primary.main}):t.createElement(t.Fragment,{key:h})},key:e,name:e,type:"linear",dataKey:e,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:!1,connectNulls:w,stackId:ie?"stack":void 0,fill:`url(#${a})`}))}),p?E.map(e=>t.createElement(ke,{strokeOpacity:0,key:e,name:e,type:"linear",dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:w,onClick:(a,i)=>{i.stopPropagation();const{name:r}=a;O(r)}})):null)))};export{be as AreaChart};
|
|
2
|
+
//# sourceMappingURL=AreaChart.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{makeStyles as p,createStyles as m}from"@material-ui/core/styles";import a from"react";const g=p(e=>m({tooltipContainer:{borderRadius:e.shape.borderRadius,border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.background.paper,color:e.palette.text.primary,boxShadow:e.shadows[1]},header:{borderBottom:`1px solid ${e.palette.divider}`,paddingLeft:e.spacing(1),paddingRight:e.spacing(1)},title:{fontWeight:e.typography.fontWeightMedium,color:e.palette.text.primary},content:{padding:e.spacing(1)},item:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:e.spacing(.5)},legendDash:{width:e.spacing(2),height:e.spacing(.375),borderRadius:e.spacing(.375),marginRight:e.spacing(1)},category:{display:"flex",alignItems:"center",flex:1,fontSize:"0.875rem",color:e.palette.text.secondary,marginRight:e.spacing(2)},value:{fontWeight:e.typography.fontWeightMedium,fontSize:"0.875rem",color:e.palette.text.primary}}));function o({active:e,payload:i,label:r,valueFormatter:l}){const t=g({color:"#000"});return!e||!i||i.length===0?null:a.createElement("div",{className:t.tooltipContainer},a.createElement("div",{className:t.header},a.createElement("p",{className:t.title},r)),a.createElement("div",{className:t.content},i.map(({value:n,category:c,color:s},d)=>a.createElement("div",{key:`id-${d}`,className:t.item},a.createElement("div",{className:t.category},a.createElement("span",{className:t.legendDash,style:{backgroundColor:s}}),c),a.createElement("div",{className:t.value},l(n))))))}export{o as ChartTooltip,o as default};
|
|
2
|
+
//# sourceMappingURL=ChartTooltip.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{makeStyles as v,IconButton as m}from"@material-ui/core";import b from"@material-ui/icons/ArrowBackIos";import x from"@material-ui/icons/ArrowForwardIos";import l,{useRef as d,useState as E,useCallback as S}from"react";import z from"./LegendItem.esm.js";const I=v(()=>({legendContainer:{display:"flex",alignItems:"center",overflow:"hidden",position:"relative"},legendList:{display:"flex",listStyle:"none",padding:0,margin:0,overflowX:"auto","&::-webkit-scrollbar":{display:"none"}},scrollButton:{position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:1},scrollButtonLeft:{left:0},scrollButtonRight:{right:0}})),N=({categories:u,colors:g,activeLegend:h,onClickLegendItem:p,enableLegendSlider:a=!1,legendPosition:i="right",yAxisWidth:y=0})=>{const n=I(),s=d(null),L=d(null),[c,B]=E({left:!1,right:!1}),C=S(()=>{const e=s.current;if(!e)return;const t=e.scrollLeft>0,r=e.scrollWidth-e.clientWidth>e.scrollLeft;B({left:t,right:r})},[]),f=e=>{const t=s.current;if(!t)return;const r=t.clientWidth,k=e==="left"?-r:r;t.scrollBy({left:k,behavior:"smooth"}),setTimeout(C,400)};let o;return i==="left"?o="flex-start":i==="center"?o="center":o="flex-end",l.createElement("div",{className:n.legendContainer,ref:L,style:{justifyContent:o,paddingLeft:i==="left"?y:0}},a&&c.left&&l.createElement(m,{className:`${n.scrollButton} ${n.scrollButtonLeft}`,onClick:()=>f("left"),size:"small"},l.createElement(b,{fontSize:"small"})),l.createElement("ul",{className:n.legendList,ref:s},u.map((e,t)=>l.createElement(z,{key:t,name:e,color:g[t],onClick:p,activeLegend:h}))),a&&c.right&&l.createElement(m,{className:`${n.scrollButton} ${n.scrollButtonRight}`,onClick:()=>f("right"),size:"small"},l.createElement(x,{fontSize:"small"})))};export{N as default};
|
|
2
|
+
//# sourceMappingURL=Legend.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{makeStyles as c}from"@material-ui/core/styles";import o from"react";const i=c(e=>({legendItem:{display:"flex",alignItems:"center",marginRight:e.spacing(2),opacity:1,"&:hover":{opacity:.8}},legendButton:{display:"flex",alignItems:"center",background:"none",border:"none",cursor:"pointer",padding:0,opacity:1,"&:hover":{opacity:.8}},legendDash:{width:e.spacing(2),height:e.spacing(.375),borderRadius:e.spacing(.375),backgroundColor:t=>t.color,marginRight:e.spacing(1)},legendText:{fontSize:"0.875rem",color:e.palette.text.primary}}));function s({name:e,color:t,onClick:l,activeLegend:a}){const n=i({color:t}),r=()=>{l&&l(e,t)};return o.createElement("li",{className:n.legendItem},o.createElement("button",{className:n.legendButton,onClick:r,"aria-label":`Legend item for ${e}`},o.createElement("span",{className:n.legendDash,style:{opacity:a&&a!==e?.4:1}}),o.createElement("span",{className:n.legendText,style:{opacity:a&&a!==e?.4:1}},e)))}export{s as default};
|
|
2
|
+
//# sourceMappingURL=LegendItem.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import i from"lodash";import{TimeUnit as a}from"../Frequency/types.esm.js";import{toTimeUnit as c}from"../Frequency/util.esm.js";import"../Frequency/FrequencyComponent.esm.js";const u=()=>({enabled:!1,hasDuration:!1,unit:a.Days,value:1});function s(t){if(t){const{enabled:e,hasDuration:n}=t;if(e&&n){const{unit:o,value:r}=t;return{duration:{[o]:r}}}return e}}function
|
|
1
|
+
import i from"lodash";import{TimeUnit as a}from"../Frequency/types.esm.js";import{toTimeUnit as c}from"../Frequency/util.esm.js";import"../Frequency/FrequencyComponent.esm.js";const u=()=>({enabled:!1,hasDuration:!1,unit:a.Days,value:1});function s(t){if(t){const{enabled:e,hasDuration:n}=t;if(e&&n){const{unit:o,value:r}=t;return{duration:{[o]:r}}}return e}}function m(t){const e=u();if(!t)return e;if(typeof t=="boolean")return{...e,enabled:t};if(!i.isObject(t)||!("duration"in t))return e;const n=t.duration;if(!i.isObject(n))return e;const o=Object.entries(n);if(o.length===0)return e;const[r,f]=o[0];return{...e,enabled:!0,hasDuration:!0,unit:c(r)??a.Days,value:f}}export{u as defaultCacheConfig,s as mapCacheConfigToHumanDurationOrBoolean,m as mapToCacheConfig};
|
|
2
2
|
//# sourceMappingURL=utils.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"@material-ui/core";import{makeStyles as o}from"@material-ui/core/styles";import"react";o(t=>({detailRow:{marginBottom:t.spacing(1),"&:last-child":{marginBottom:0}},label:{fontWeight:"bold",color:t.palette.text.primary},value:{marginLeft:t.spacing(1)}}));
|
|
2
2
|
//# sourceMappingURL=CampaignDetailRow.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"@backstage/plugin-catalog-react";import"@material-ui/core";import{makeStyles as o}from"@material-ui/core/styles";import"react";import"./CampaignDetailRow.esm.js";o(n=>({innerContainer:{padding:n.spacing(0,1),fontSize:n.typography.body2.fontSize},sectionLabel:{marginBottom:n.spacing(1)},ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}}}}));const e=n=>new Date(n).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});export{e as convertToReadableDate};
|
|
2
2
|
//# sourceMappingURL=CampaignDetails.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{MarkdownContent as z,Content as F}from"@backstage/core-components";import{useRouteRef as G}from"@backstage/core-plugin-api";import{EntityRefLink as O}from"@backstage/plugin-catalog-react";import{usePermission as w}from"@backstage/plugin-permission-react";import{makeStyles as H,Button as U,Paper as V,Grid as i,Typography as N,Box as W}from"@material-ui/core";import{soundcheckCampaignReadPermission as $,soundcheckCampaignUpdatePermission as j}from"@spotify/backstage-plugin-soundcheck-common";import{DateTime as R}from"luxon";import t,{useMemo as l}from"react";import{useParams as q,useNavigate as A}from"react-router-dom";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 J}from"../../hooks/campaigns/useGetCampaigns.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useSearchParam as p}from"../../hooks/useSearchParam.esm.js";import{campaignEditRouteRef as K}from"../../routes.esm.js";import{CheckCard as Q}from"../CheckCard/CheckCard.esm.js";import{LoadingIndicator as X}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as Y}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as Z}from"../SoundcheckHeader/useHeader.esm.js";import{FilterBar as _}from"../TrackPage/FilterBar/FilterBar.esm.js";import{toFilter as ee}from"../TrackPage/FilterBar/util.esm.js";import{TrackEntitiesTable as te}from"../TrackPage/TrackEntitiesTable/TrackEntitiesTable.esm.js";import{CampaignStatusHistoryTile as ae}from"./CampaignStatusHistoryTile.esm.js";import{CampaignStatusTile as re}from"./CampaignStatusTile.esm.js";import{DaysRemainingTile as ne}from"./DaysRemainingTile.esm.js";const ie=H(e=>({root:{height:"100%",background:e.palette.background.default},header:{backgroundColor:e.palette.background.paper,borderRadius:0,marginBottom:e.spacing(2),paddingLeft:e.spacing(1),borderLeft:"none",borderRight:"none"},progressContainer:{display:"flex",marginBottom:e.spacing(3)},trackContainerContent:{paddingTop:e.spacing(1),paddingBottom:e.spacing(1),backgroundColor:e.palette.background.paper},editButton:{marginLeft:"auto"},checksContainer:{},entitiesContainer:{marginTop:e.spacing(3)},headerDescription:{fontSize:e.typography.body2.fontSize,margin:e.spacing(.5,0,0),"& p":{margin:0},"& a":{color:"inherit",textDecoration:"underline"}},content:{paddingTop:0},ownerLink:{"& span":{color:"inherit","&:hover":{textDecoration:"underline"}}},sectionTitle:{paddingBottom:e.spacing(1)}})),oe=()=>{const e=ie(),[o,b]=p("owners"),[s,T]=p("lifecycles"),[m,v]=p("types"),[c,x]=p("systems"),d=l(()=>ee({lifecycles:s,owners:o,types:m,systems:c}),[s,o,m,c]),{campaignId:n}=q(),{data:B,isLoading:g}=J({ids:[n],first:1}),r=B?.edges?.[0]?.node,a=r?.track,f=a?.levels?.[0],{loading:L,allowed:S}=w({permission:$,resourceRef:n}),{loading:u,allowed:y}=w({permission:j,resourceRef:n}),E=r?R.fromISO(r.startDate):void 0,D=E?Math.max(Math.ceil(R.now().diff(E,"days").days),1):void 0,h=A(),k=G(K),P=l(()=>a?.ownerEntityRef?t.createElement(O,{color:"inherit",entityRef:a.ownerEntityRef,className:e.ownerLink}):null,[a?.ownerEntityRef,e.ownerLink]),I=l(()=>!u&&y&&a?.isEditable?t.createElement(U,{className:e.editButton,variant:"contained",color:"primary",onClick:()=>{h(k({campaignId:n}))}},"Edit Campaign"):null,[y,e.editButton,k,u,h,a,n]),M=l(()=>a?.description?t.createElement(z,{className:e.headerDescription,content:a.description}):null,[e.headerDescription,a?.description]);return Z({title:a?.name,description:M,customSubtitle:P,sectionRight:I}),t.createElement("div",null,t.createElement(Y,{entityName:"track",entityId:n,showNotFound:!g&&!r,showCannotView:!L&&!S}),g&&t.createElement(X,null),a&&t.createElement("div",{className:e.root},t.createElement(V,{elevation:1,className:e.header},t.createElement(_,{track:a,owners:o,setOwners:b,lifecycles:s,setLifecycles:T,types:m,setTypes:v,systems:c,setSystems:x})),t.createElement(F,{className:e.content},t.createElement("div",{className:e.progressContainer},t.createElement(i,{container:!0,spacing:2},t.createElement(i,{item:!0,xs:2},t.createElement(ne,{campaign:r})),t.createElement(i,{item:!0,xs:4},t.createElement(re,{campaign:r,filter:d})),t.createElement(i,{item:!0,xs:6},t.createElement(ae,{campaign:r,filter:d})))),t.createElement("div",{className:e.checksContainer},t.createElement(N,{variant:"h3",className:e.sectionTitle},"Checks"),f&&t.createElement(W,{className:e.content},t.createElement(i,{container:!0,spacing:1},f.checks.map(C=>t.createElement(i,{item:!0,xs:12,sm:6,md:4,key:C.id},t.createElement(Q,{track:a,check:C,filter:d,numberOfDays:D}))))),a&&t.createElement("div",{className:e.entitiesContainer},t.createElement(N,{variant:"h3",className:e.sectionTitle},"Entities"),t.createElement(te,{track:a,initialPageSize:10,lifecycles:s,owners:o,types:m,systems:c}))))))};export{oe as CampaignInsightsPage};
|
|
2
|
+
//# sourceMappingURL=CampaignInsightsPage.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useTheme as l,Paper as f,Box as u}from"@material-ui/core";import{makeStyles as h}from"@material-ui/core/styles";import{DateTime as m}from"luxon";import i,{useMemo as y}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"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCertificationStatusHistory as g}from"../../hooks/aggregations/useCertificationStatusHistory.esm.js";import"react-router-dom";import{AreaChart as x}from"../AreaChart/AreaChart.esm.js";const S=h(t=>({card:{display:"flex",flexDirection:"column",border:`1px solid ${t.palette.divider}`,height:"100%",width:"100%"},title:{fontWeight:"bold",fontSize:"1.1rem",lineHeight:`${t.typography.h5.fontSize}px`,cursor:"default"},content:{padding:t.spacing(1,2,1,0),width:"100%",height:"100%"}}));function H({campaign:t,filter:n}){const p=l(),a=S(),c=m.fromISO(t.startDate),d=Math.max(Math.ceil(m.now().diff(c,"days").days),1),{data:e}=g({trackId:t.track.id,filter:n,numberOfDays:d},!!t),r=e?.certificationStatusHistory.numberOfEntities,o=y(()=>e?.certificationStatusHistory.history.map(s=>({date:s.date,Passed:s.statusByLevel[0].passed/r*100})),[r,e]);return i.createElement(f,{className:a.card},i.createElement(u,{className:a.content},o&&i.createElement(x,{data:o,categories:["Passed"],categoryColors:{Passed:p.palette.success.main},index:"date",minValue:0,maxValue:100,showLegend:!1})))}export{H as CampaignStatusHistoryTile};
|
|
2
|
+
//# sourceMappingURL=CampaignStatusHistoryTile.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useTheme as F,Paper as S,Box as c,Grid as x,Typography as f}from"@material-ui/core";import{makeStyles as C}from"@material-ui/core/styles";import T from"@material-ui/icons/TrendingDown";import k from"@material-ui/icons/TrendingFlat";import B from"@material-ui/icons/TrendingUp";import{DateTime as v}from"luxon";import t,{useMemo as D}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"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCertificationStatus as I}from"../../hooks/aggregations/useCertificationStatus.esm.js";import{useCertificationStatusHistory as N}from"../../hooks/aggregations/useCertificationStatusHistory.esm.js";import"react-router-dom";import{CategoryBar as R}from"../CategoryBar/CategoryBar.esm.js";const E=C(e=>({card:{display:"flex",flexDirection:"column",border:`1px solid ${e.palette.divider}`},content:{padding:e.spacing(1),display:"flex",margin:e.spacing(1),gap:e.spacing(1)},item:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:e.spacing(.5)},legendDash:{width:e.spacing(2),height:e.spacing(1),borderRadius:e.spacing(.375),marginRight:e.spacing(1)},category:{display:"flex",alignItems:"center",flex:1,marginRight:e.spacing(2)}}));function y({label:e,value:n,total:r,color:p,valueFormatter:s}){const a=E();return t.createElement(x,{item:!0,xs:12,className:a.item},t.createElement(c,{className:a.category},t.createElement("span",{className:a.legendDash,style:{backgroundColor:p}}),t.createElement(f,null,e)),r&&t.createElement(f,null,s(n)," of ",s(r)," (",Math.round(n/r*100),"%)"))}function $({campaign:e,filter:n}){const r=F(),p=E(),{data:s}=I({trackId:e.track.id,filter:n},!0),a=s?.certificationStatus.statusByLevel[0],h=Math.max(Math.ceil(v.now().diff(v.fromISO(e.startDate),"days").days),1),{data:g}=N({trackId:e.track.id,filter:n,numberOfDays:h},!!e),o=s?.certificationStatus.numberOfEntities??0,m=D(()=>{if(o===void 0||g===void 0||a===void 0)return;const i=g.certificationStatusHistory.history[0].statusByLevel[0].passed/o*100;return a.passed/o*100-i},[g,a,o]),d=i=>i>=1e6?`${(i/1e6).toFixed(1)}M`:i>=1e3?`${(i/1e3).toFixed(1)}K`:i.toString();let u=k,l;return m!==void 0&&(l=`${m.toFixed(0)}% since campaign start`,m<=-1?(u=T,l=`-${l}`):m>=1&&(u=B,l=`+${l}`)),t.createElement(S,{className:p.card},t.createElement(c,{className:p.content},a&&t.createElement(c,{width:"100%"},t.createElement(R,{data:a,valueFormatter:d,categories:["passed","failed","notReported"],categoryFormatter:i=>i.replace(/\b\w/g,b=>b.toUpperCase()),colors:[r.palette.success.main,r.palette.error.main,r.palette.text.disabled]}),t.createElement(c,{paddingTop:"12px"},t.createElement(x,{spacing:2},t.createElement(y,{label:"Passing",value:a.passed,total:o,color:r.palette.success.main,valueFormatter:d}),t.createElement(y,{label:"Failing",value:a.failed,total:o,color:r.palette.error.main,valueFormatter:d}),t.createElement(y,{label:"Not Reported",value:a.notReported,total:o,color:r.palette.text.disabled,valueFormatter:d}),m!==void 0&&t.createElement(c,{display:"flex",alignItems:"center",paddingTop:"12px"},t.createElement(u,null),t.createElement(f,{style:{marginLeft:r.spacing(1)}},l)))))))}export{$ as CampaignStatusTile};
|
|
2
|
+
//# sourceMappingURL=CampaignStatusTile.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Paper as c,Typography as i,Divider as s}from"@material-ui/core";import{makeStyles as d}from"@material-ui/core/styles";import{DateTime as n}from"luxon";import t from"react";const p=d(a=>({root:{display:"flex",flexDirection:"column",alignItems:"center",overflow:"hidden",width:"100%",height:"100%",padding:a.spacing(.75)},textWrapper:{display:"flex",flexDirection:"column",flexGrow:1,alignItems:"center",justifyContent:"center"},daysRemaining:{textAlign:"center",fontSize:"4em",fontWeight:"bold"},daysRemainingText:{textAlign:"center",fontSize:"0.9em",fontWeight:"bold"},divider:{width:"100%"},dateContainer:{display:"flex",flexDirection:"row",justifyContent:"flex-start",width:"100%",paddingTop:"4px",flexGrow:0},dateSection:{width:"100%",paddingLeft:"4px"},dateLabel:{fontSize:"0.7em",color:a.palette.text.secondary},dateValue:{fontSize:"0.95em",color:a.palette.info.contrastText},verticalDivider:{height:"100%"}}));function f({campaign:a}){const e=p(),l=n.fromISO(a.startDate),r=n.fromISO(a.targetCompletionDate),m=n.now(),o=Math.max(Math.ceil(r.diff(m,"days").days),0);return t.createElement(c,{className:e.root},t.createElement("div",{className:e.textWrapper},t.createElement(i,{className:e.daysRemaining},o),t.createElement(i,{className:e.daysRemainingText},o===1?"DAY REMAINING":"DAYS REMAINING")),t.createElement(s,{className:e.divider}),t.createElement("div",{className:e.dateContainer},t.createElement("div",{className:e.dateSection},t.createElement(i,{className:e.dateLabel},"START"),t.createElement(i,{className:e.dateValue},l.toLocaleString({month:"short",day:"numeric"}).toLocaleUpperCase())),t.createElement("div",{className:`${e.dateSection}`},t.createElement(i,{className:e.dateLabel},"END"),t.createElement(i,{className:e.dateValue},r.toLocaleString({month:"short",day:"numeric"}).toLocaleUpperCase()))))}export{f as DaysRemainingTile};
|
|
2
|
+
//# sourceMappingURL=DaysRemainingTile.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EntityRefLink as n}from"@backstage/plugin-catalog-react";import{makeStyles as r,List as o,Typography as s,ListItem as i,Tooltip as
|
|
1
|
+
import{EntityRefLink as n}from"@backstage/plugin-catalog-react";import{makeStyles as r,List as o,Typography as s,ListItem as i,Tooltip as m,ListItemIcon as c,ListItemText as l,Badge as d}from"@material-ui/core";import p from"@material-ui/icons/Group";import e from"react";const g=r(t=>({root:{position:"relative",height:"100%"},cardSection:{marginBottom:t.spacing(2)},listItem:{padding:0},listItemText:{margin:0},campaignDetails:{display:"flex",flexDirection:"column",gap:t.spacing(1)},archivedBadge:{"& span":{position:"relative",transform:"none",transformOrigin:"unset",backgroundColor:t.palette.action.disabledBackground}},iconContainer:{minWidth:"auto",paddingRight:t.spacing(1)},ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}}}})),E=({campaign:t})=>{const a=g();return e.createElement(o,{dense:!0,disablePadding:!0,className:a.cardSection},e.createElement(s,{variant:"overline",color:"textSecondary"},"Campaign Details"),e.createElement("div",{className:a.campaignDetails},t.ownerEntityRef&&e.createElement(i,{disableGutters:!0,className:a.listItem},e.createElement(m,{title:"Owner"},e.createElement(c,{className:a.iconContainer},e.createElement(p,{color:"inherit",fontSize:"small"}))),e.createElement(l,{className:a.listItemText,primary:e.createElement(n,{entityRef:t.ownerEntityRef,className:a.ownerLink,hideIcon:!0})})),t.archived&&e.createElement(i,{disableGutters:!0,className:a.listItem},e.createElement(d,{badgeContent:"Archived",className:a.archivedBadge}))))};export{E as CampaignMetadata};
|
|
2
2
|
//# sourceMappingURL=CampaignMetadata.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useRouteRef as d}from"@backstage/core-plugin-api";import{usePermission as p}from"@backstage/plugin-permission-react";import{soundcheckCampaignUpdatePermission as M,soundcheckCampaignDeletePermission as P}from"@spotify/backstage-plugin-soundcheck-common";import c,{useCallback as
|
|
1
|
+
import{useRouteRef as d}from"@backstage/core-plugin-api";import{usePermission as p}from"@backstage/plugin-permission-react";import{soundcheckCampaignUpdatePermission as M,soundcheckCampaignDeletePermission as P}from"@spotify/backstage-plugin-soundcheck-common";import c,{useCallback as I}from"react";import{useNavigate as L}from"react-router-dom";import{v4 as S}from"uuid";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../../hooks/useSoundcheckAlert.esm.js";import{useArchiveCampaign as U}from"../../../hooks/campaigns/useArchiveCampaign.esm.js";import{useDeleteCampaign as T}from"../../../hooks/campaigns/useDeleteCampaign.esm.js";import{useCreateTrack as b}from"../../../hooks/tracks/useCreateTrack.esm.js";import{useConfirmationModal as x}from"../../../hooks/useConfirmationModal.esm.js";import{campaignDetailsRouteRef as N,campaignEditRouteRef as V}from"../../../routes.esm.js";import{SummaryCard as j}from"../../SummaryCard/SummaryCard.esm.js";import{CampaignMetadata as q}from"./CampaignMetadata.esm.js";import{useArchiveConfirmationModal as z}from"./useArchiveConfirmationModal.esm.js";const B=({campaign:e})=>{const{id:l,name:u,description:f,ownerEntityRef:g,archived:h}=e,v=d(N),C=d(V),o=L(),t=e.archived,{showModal:r}=x(),{showArchiveModal:w}=z(),{mutate:y}=b(),{mutate:m}=T(),{mutate:R}=U(),{loading:A,allowed:k}=p({permission:M,resourceRef:e.id}),{loading:n,allowed:s}=p({permission:P,resourceRef:e.id}),E=I(async()=>{await r({title:"Delete Campaign",message:`Are you sure you want to delete campaign ${e.name}?`})&&m(e.id)},[r,m,e.id,e.name]),D=()=>{const{track:i}=e,a={id:S(),ownerEntityRef:i.ownerEntityRef,description:i.description??"",name:i.name,documentationURL:i.documentationURL,type:"standard",levels:i.levels??[],filter:i.filter};y(a)};return c.createElement(j,{title:u??l,description:f,viewIsPrimaryAction:!0,children:(g||h)&&c.createElement(q,{campaign:e}),handleView:()=>o(v({campaignId:e.id})),handleEdit:!A&&k&&!t?()=>o(C({campaignId:e.id})):void 0,handleDelete:!n&&s?E:void 0,handleArchive:!n&&s&&!t?async()=>{const{saveTrack:i,confirmed:a}=await w({title:"Archive Campaign",message:`Are you sure you want to archive campaign ${e.name}?`});a&&(i&&D(),R(e.id))}:void 0})};export{B as CampaignSummaryCard};
|
|
2
2
|
//# sourceMappingURL=CampaignSummaryCard.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Typography as w,useTheme as I,Tooltip as R}from"@material-ui/core";import{makeStyles as U,createStyles as j}from"@material-ui/core/styles";import{schemeCategory10 as q}from"d3-scale-chromatic";import N from"lodash";import a,{useRef as A,useState as H,useEffect as X,useMemo as k}from"react";const F=e=>{let l=e;for(;l;){const t=window.getComputedStyle(l).backgroundColor;if(t&&t!=="rgba(0, 0, 0, 0)"&&t!=="transparent")return t;l=l.parentElement}return"transparent"},_=(e,l,t,i,s)=>{if(N.isUndefined(e))return"";if(e===0){for(let r=0;r<l.length;r++)if(l[r]>0)return s?.[t[r]]??i[r]}let m=0;for(let r=0;r<l.length;r++)if(m+=l[r],m>=e)return s?.[t[r]]??i[r];return s?.[t[l.length-1]]??i[l.length-1]},T=(e,l)=>e?e/l*100:0,W=U(e=>j({container:{display:"flex",flexDirection:"column",width:"100%"},barWrapper:{position:"relative",width:"100%"},barContainer:{display:"flex",height:e.spacing(1),overflow:"hidden",borderRadius:4,width:"100%"},barSegment:{height:"100%"},barLabel:{position:"absolute",fontSize:"0.875rem",whiteSpace:"nowrap",transform:"translateX(-50%)"},marker:{position:"absolute",width:6,height:16,top:0,bottom:0,borderRadius:4,transform:"translate(-50%, -25%)"},tooltip:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,boxShadow:e.shadows[1],fontSize:12,border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,padding:e.spacing(1)},arrow:{color:e.palette.background.paper},item:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:e.spacing(.5)},legendDash:{width:e.spacing(2),height:e.spacing(.375),borderRadius:e.spacing(.375),marginRight:e.spacing(1)},category:{display:"flex",alignItems:"center",flex:1,fontSize:"0.875rem",color:e.palette.text.secondary,marginRight:e.spacing(2)},value:{fontWeight:e.typography.fontWeightMedium,fontSize:"0.875rem",color:e.palette.text.primary}})),P=a.memo(({data:e,categories:l,valueFormatter:t,type:i,labelPosition:s})=>{const m=W(),r=l.map(p=>e[p]),o=N.sum(r);let c=0,f=0;return a.createElement("div",{className:m.barWrapper},r.map((p,C)=>{c+=p;const y=(p>=.1*o||f>=.09*o)&&o-c>=.1*o&&c>=.1*o&&c<.9*o;f=y?0:f+=p;const g=T(c,o),$=i==="percent"?`${Math.round(c/o*100)}%`:t(c);return a.createElement("div",{key:`item-${C}`,className:m.barLabel,style:{left:`${g}%`,top:s==="top"?"-1.5rem":"1.5rem"}},y&&a.createElement(w,{variant:"caption"},$))}),a.createElement(w,{variant:"caption",style:{position:"absolute",bottom:0,left:0}},i==="percent"?"0%":t(0)),a.createElement(w,{variant:"caption",style:{position:"absolute",bottom:0,right:0}},i==="percent"?"100%":t(o)))}),G=a.memo(e=>{const l=I(),t=W(),{data:i={},categories:s=[],colors:m=q,categoryColors:r,marker:o,showLabels:c=!1,showTooltip:f=!0,valueFormatter:p=n=>n.toString(),categoryFormatter:C=n=>n,type:y="value",labelPosition:g="top",className:$,...z}=e,v=s.map(n=>i[n]).filter(n=>typeof n=="number"),E=A(null),[B,D]=H("transparent");X(()=>{if(E.current){const n=F(E.current);D(n)}},[E]);const L=k(()=>_(o?.value,v,s,m,r),[o,v,s,m,r]),d=k(()=>N.sum(v),[v]),S=k(()=>{if(!N.isUndefined(o))return o.value<0?0:o.value>d?d:o.value},[o,d]),M=k(()=>T(S,d),[S,d]);return a.createElement("div",{ref:E,className:`${$} ${t.container}`,...z},a.createElement("div",{className:t.barWrapper},c&&g==="top"&&a.createElement(P,{data:i,categories:s,valueFormatter:p,type:y,labelPosition:g}),a.createElement("div",{className:t.barContainer},f?a.createElement(R,{title:a.createElement("div",{className:t.tooltip},s.map((n,u)=>{const b=i[n],h=r?.[n]??m[u]??"gray";return a.createElement("div",{key:`tooltip-item-${u}`,className:t.item},a.createElement("div",{className:t.category},a.createElement("span",{className:t.legendDash,style:{backgroundColor:h}}),a.createElement(w,null,C(n))),a.createElement("div",{className:t.value},p(b)," of ",p(d)," (",Math.round(b/d*100),"%)"))})),placement:"top",arrow:!0,classes:{tooltip:t.tooltip,arrow:t.arrow}},a.createElement("div",{className:t.barContainer},s.map((n,u)=>{const b=i[n],h=r?.[n]??m[u]??"gray",x=b/d*100;return a.createElement("div",{key:`item-${u}`,className:t.barSegment,style:{backgroundColor:h,width:`${x}%`}})}))):a.createElement("div",{className:t.barContainer},s.map((n,u)=>{const b=i[n],h=r?.[n]??m[u]??l.palette.text.disabled,x=b/d*100;return a.createElement("div",{key:`item-${u}`,className:t.barSegment,style:{backgroundColor:h,width:`${x}%`}})}))),o!==void 0&&a.createElement(R,{title:o.tooltip||"",arrow:!0},a.createElement("div",{className:t.marker,style:{left:`${M}%`,backgroundColor:L,border:`1px solid ${B}`,transition:o.showAnimation?"all 0.3s ease-in-out":"none"}})),c&&g==="bottom"&&a.createElement(P,{data:i,categories:s,valueFormatter:p,type:y,labelPosition:g})))});export{G as CategoryBar,F as getEffectiveBackgroundColor};
|
|
2
|
+
//# sourceMappingURL=CategoryBar.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as b,useTheme as D,Box as r,Paper as R,Typography as $,Tooltip as B}from"@material-ui/core";import x from"@material-ui/lab/Skeleton";import{DateTime as I}from"luxon";import t from"react";import{CircularProgressbar as O,buildStyles as P}from"react-circular-progressbar";import{useCheckStatus as T}from"../../hooks/aggregations/useCheckStatus.esm.js";import{useCheckStatusHistory as W}from"../../hooks/aggregations/useCheckStatusHistory.esm.js";import{getChartFontColor as y,formatDate as M}from"../Charts/chartUtils.esm.js";import{getApplicableCheckCount as p}from"../TrackPage/TrackEntitiesTable/utils.esm.js";import{getProgressColor as C}from"../TrackPage/utils.esm.js";import{CheckHistoryChart as j}from"./CheckHistoryChart.esm.js";import{getCheckName as z}from"./utils.esm.js";const S=b(e=>({card:{display:"flex",flexDirection:"column",border:`1px solid ${e.palette.divider}`,width:"99%"},title:{fontWeight:"bold",fontSize:"0.9rem",cursor:"default",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},headerRow:{display:"flex",padding:e.spacing(1,1),borderBottom:`1px solid ${e.palette.divider}`,width:"100%"},headerSection:{display:"flex",flexDirection:"column",gap:e.spacing(.5),flexGrow:1,width:"100%"},contentRow:{padding:e.spacing(1,1,0),display:"flex"},leftSection:{width:"75px",minWidth:"75px"},summaryCard:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between"},chartSection:{flex:1,width:"100%",minWidth:"150px"},chartSkeletonSection:{flex:1,width:"100%",minWidth:"150px",padding:e.spacing(0,0,1,1)},overallSummaryBox:{display:"flex",flexDirection:"column",height:"100%",color:y(e),textAlign:"center",gap:e.spacing(2)}})),A=()=>{const e=S();return t.createElement(r,{className:e.contentRow},t.createElement(r,{className:e.leftSection},t.createElement(r,{className:e.summaryCard},t.createElement(x,{variant:"circle",height:75}))),t.createElement(r,{className:e.chartSkeletonSection},t.createElement(x,{variant:"rect",height:92})))};function H(e){if(!e)return[];const{history:o}=e,i=I.utc();return o.map((l,a)=>{const n=p(l);return{name:M(i,o.length-a-1),passRate:n?Math.round(l.passed/n*100):100}})}function L(e){if(!e)return 0;const{passed:o}=e,i=p(e);return i?Math.round(o/i*100):100}function F(e){if(!e)return{numerator:0,denominator:0};const{passed:o}=e,i=p(e);return{numerator:o,denominator:i}}const G=({check:e,track:o,filter:i,numberOfDays:l=30})=>{const a=S(),n=D(),{data:c,isLoading:E}=T({checkId:e.id,trackId:o.id,filter:i}),{data:f,isLoading:w}=W({checkId:e.id,trackId:o.id,numberOfDays:l,filter:i}),N={dataKey:"passRate",name:"Pass rate"},k=f?.history?.length??0,v=H(f),s=L(c);let d;c?d=`${s}%`:d="No Data";let m;if(!c)m="No Data";else{const{numerator:u,denominator:g}=F(c);g>0?m=`${u} of ${g} entities passing`:m=`${u} entities passing`}const h=t.createElement(r,{className:a.overallSummaryBox},t.createElement(O,{value:s,text:d,styles:P({textColor:y(n),pathColor:C(n,s),trailColor:n.palette.divider,textSize:k?void 0:10})}));return t.createElement(R,{className:a.card,elevation:0},t.createElement(r,{className:a.headerRow},t.createElement(r,{className:a.headerSection},t.createElement($,{className:a.title},z(o,e)))),w||E?t.createElement(A,null):t.createElement(B,{title:m},t.createElement(r,{className:a.contentRow},h&&t.createElement(r,{className:a.leftSection},t.createElement(r,{className:a.summaryCard},h)),t.createElement(r,{className:a.chartSection},t.createElement(j,{data:v,lineConfig:N,color:C(n,s)})))))};export{G as CheckCard};
|
|
2
2
|
//# sourceMappingURL=CheckCard.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{MarkdownContent as j,Content as x}from"@backstage/core-components";import{useRouteRef as q}from"@backstage/core-plugin-api";import{EntityRefLink as J}from"@backstage/plugin-catalog-react";import{usePermission as L}from"@backstage/plugin-permission-react";import{makeStyles as K,useTheme as X,Button as Y,Paper as Z,Grid as y,Card as E,CardHeader as k,CardContent as C}from"@material-ui/core";import{soundcheckCheckReadPermission as _,soundcheckCheckUpdatePermission as $,toEntityFilterQuery as w,combineEntityFilterQueries as ee}from"@spotify/backstage-plugin-soundcheck-common";import e,{useMemo as S}from"react";import{useParams as te,useNavigate as re}from"react-router-dom";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useGetChecks as ie}from"../../hooks/checks/useGetChecks.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetAllTracks as ne}from"../../hooks/tracks/useGetAllTracks.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCheckStatus as oe}from"../../hooks/aggregations/useCheckStatus.esm.js";import{useSearchParam as l}from"../../hooks/useSearchParam.esm.js";import{checkEditRouteRef as ae}from"../../routes.esm.js";import{LoadingIndicator as se}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as P}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as ce}from"../SoundcheckHeader/useHeader.esm.js";import{CheckEntitiesTable as le}from"./CheckEntitiesTable/CheckEntitiesTable.esm.js";import{CheckStatusBar as me}from"./CheckStatusBar.esm.js";import{CheckStatusHistoryChart as de}from"./CheckStatusHistoryChart.esm.js";import{CheckStatusTable as pe}from"./CheckStatusTable.esm.js";import{FilterBar as fe}from"./FilterBar/FilterBar.esm.js";const ue=t=>{const{lifecycles:n,owners:r,types:o,systems:m}=t,a=n?.length?{"spec.lifecycle":n}:void 0,d=r?.length?{"relations.ownedBy":r}:void 0,s=o?.length?{"spec.type":o}:void 0,p=m?.length?{"relations.partOf":m}:void 0;if(a||d||s||p)return{...a,...d,...s,...p}};function he(t,n){for(const r of t.levels)for(const o of r.checks)if(o.id===n)return o;return null}const ge=K(t=>({root:{height:"100%",background:t.palette.background.default},header:{backgroundColor:t.palette.background.paper,borderRadius:0,marginBottom:t.spacing(2)},content:{display:"flex",flexDirection:"column",gap:t.spacing(2),paddingTop:t.spacing(0)},editButton:{marginLeft:"auto"},filterBar:{paddingTop:t.spacing(1),paddingBottom:t.spacing(1)},headerDescription:{fontSize:t.typography.body2.fontSize,margin:t.spacing(.5,0,0),"& p":{margin:0},"& a":{color:"inherit",textDecoration:"underline"}},ownerLink:{"& span":{color:"inherit","&:hover":{textDecoration:"underline"}}}})),ye=()=>{const t=ge(),{trackId:n,checkId:r}=te(),[o,m]=l("states"),[a,d]=l("owners"),[s,p]=l("lifecycles"),[v,T]=l("types"),[I,D]=l("systems"),f=ue({lifecycles:s,owners:a,types:v,systems:I}),{data:F,isLoading:H}=ne({ids:[n??""],first:1},{enabled:!!n}),c=F?.edges?.[0]?.node,{data:G,isLoading:u}=ie({ids:[r??""],first:1}),i=G?.edges?.[0]?.node,{loading:M,allowed:z}=L({permission:_,resourceRef:r}),{loading:b,allowed:R}=L({permission:$,resourceRef:r}),B=re(),N=q(ae),O=X();let h;if(r)if(c){const V=w(c.filter),W=w(he(c,r)?.filter);h=ee(V,W
|
|
1
|
+
import{MarkdownContent as j,Content as x}from"@backstage/core-components";import{useRouteRef as q}from"@backstage/core-plugin-api";import{EntityRefLink as J}from"@backstage/plugin-catalog-react";import{usePermission as L}from"@backstage/plugin-permission-react";import{makeStyles as K,useTheme as X,Button as Y,Paper as Z,Grid as y,Card as E,CardHeader as k,CardContent as C}from"@material-ui/core";import{soundcheckCheckReadPermission as _,soundcheckCheckUpdatePermission as $,toEntityFilterQuery as w,combineEntityFilterQueries as ee}from"@spotify/backstage-plugin-soundcheck-common";import e,{useMemo as S}from"react";import{useParams as te,useNavigate as re}from"react-router-dom";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useGetChecks as ie}from"../../hooks/checks/useGetChecks.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetAllTracks as ne}from"../../hooks/tracks/useGetAllTracks.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCheckStatus as oe}from"../../hooks/aggregations/useCheckStatus.esm.js";import{useSearchParam as l}from"../../hooks/useSearchParam.esm.js";import{checkEditRouteRef as ae}from"../../routes.esm.js";import{LoadingIndicator as se}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as P}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as ce}from"../SoundcheckHeader/useHeader.esm.js";import{CheckEntitiesTable as le}from"./CheckEntitiesTable/CheckEntitiesTable.esm.js";import{CheckStatusBar as me}from"./CheckStatusBar.esm.js";import{CheckStatusHistoryChart as de}from"./CheckStatusHistoryChart.esm.js";import{CheckStatusTable as pe}from"./CheckStatusTable.esm.js";import{FilterBar as fe}from"./FilterBar/FilterBar.esm.js";const ue=t=>{const{lifecycles:n,owners:r,types:o,systems:m}=t,a=n?.length?{"spec.lifecycle":n}:void 0,d=r?.length?{"relations.ownedBy":r}:void 0,s=o?.length?{"spec.type":o}:void 0,p=m?.length?{"relations.partOf":m}:void 0;if(a||d||s||p)return{...a,...d,...s,...p}};function he(t,n){for(const r of t.levels)for(const o of r.checks)if(o.id===n)return o;return null}const ge=K(t=>({root:{height:"100%",background:t.palette.background.default},header:{backgroundColor:t.palette.background.paper,borderRadius:0,marginBottom:t.spacing(2)},content:{display:"flex",flexDirection:"column",gap:t.spacing(2),paddingTop:t.spacing(0)},editButton:{marginLeft:"auto"},filterBar:{paddingTop:t.spacing(1),paddingBottom:t.spacing(1)},headerDescription:{fontSize:t.typography.body2.fontSize,margin:t.spacing(.5,0,0),"& p":{margin:0},"& a":{color:"inherit",textDecoration:"underline"}},ownerLink:{"& span":{color:"inherit","&:hover":{textDecoration:"underline"}}}})),ye=()=>{const t=ge(),{trackId:n,checkId:r}=te(),[o,m]=l("states"),[a,d]=l("owners"),[s,p]=l("lifecycles"),[v,T]=l("types"),[I,D]=l("systems"),f=ue({lifecycles:s,owners:a,types:v,systems:I}),{data:F,isLoading:H}=ne({ids:[n??""],first:1},{enabled:!!n}),c=F?.edges?.[0]?.node,{data:G,isLoading:u}=ie({ids:[r??""],first:1}),i=G?.edges?.[0]?.node,{loading:M,allowed:z}=L({permission:_,resourceRef:r}),{loading:b,allowed:R}=L({permission:$,resourceRef:r}),B=re(),N=q(ae),O=X();let h;if(r)if(c){const V=w(c.filter),W=w(he(c,r)?.filter);h=ee(V,W)}else i&&(h=w(i.filter));const{data:g}=oe({checkId:r,trackId:n,filter:f,states:o?.length?o:void 0},!!r),Q=S(()=>i?.ownerEntityRef?e.createElement(J,{color:"inherit",entityRef:i.ownerEntityRef,className:t.ownerLink}):null,[i?.ownerEntityRef,t.ownerLink]),A=S(()=>!b&&R&&i?.isEditable?e.createElement(Y,{className:t.editButton,variant:"contained",color:"primary",onClick:()=>{B(N({checkId:i.id}))}},"Edit Check"):null,[R,i?.id,i?.isEditable,t.editButton,N,b,B]),U=S(()=>i?.description?e.createElement(j,{className:t.headerDescription,content:i.description}):null,[t.headerDescription,i?.description]);return ce({title:i?.name??r??"Soundcheck",description:U,customSubtitle:Q,sectionRight:A}),e.createElement("div",null,e.createElement(P,{entityName:"track",entityId:n,showNotFound:!!n&&!H&&!c}),e.createElement(P,{entityName:"check",entityId:r,showNotFound:!u&&!i,showCannotView:i&&!M&&!z}),u&&e.createElement(se,null),!u&&!!i&&e.createElement("div",{className:t.root},e.createElement(Z,{elevation:3,className:t.header},e.createElement(x,{className:t.filterBar},e.createElement(fe,{filter:h,states:o,setStates:m,owners:a,setOwners:d,lifecycles:s,setLifecycles:p,types:v,setTypes:T,systems:I,setSystems:D}))),e.createElement(x,{className:t.content},e.createElement(y,{container:!0,spacing:2},e.createElement(y,{item:!0,xs:4},e.createElement(E,{style:{height:"100%"}},e.createElement(k,{title:"Current Status"}),e.createElement(C,null,e.createElement("div",{style:{width:"100%",height:30,display:"flex",alignItems:"flex-start"}},e.createElement(me,{checkStatus:g})),e.createElement("div",{style:{paddingTop:O.spacing(1)}},e.createElement(pe,{checkStatus:g}))))),e.createElement(y,{item:!0,xs:8},e.createElement(E,{style:{height:"100%"}},e.createElement(k,{title:"Historical Status"}),e.createElement(C,{style:{height:"90%",paddingBottom:0}},e.createElement(de,{checkId:r,trackId:n,checkStatus:g,filter:f,states:o}))))),e.createElement(E,null,e.createElement(k,{title:"Entities"}),e.createElement(C,null,e.createElement(le,{checkId:r,trackId:c?.id,filter:f,states:o}))))))};export{ye as CheckInsightsPage};
|
|
2
2
|
//# sourceMappingURL=CheckInsightsPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{parseEntityRef as T}from"@backstage/catalog-model";import{useApi as D,configApiRef as
|
|
1
|
+
import{parseEntityRef as T}from"@backstage/catalog-model";import{useApi as D,configApiRef as P}from"@backstage/core-plugin-api";import{EntityDisplayName as B}from"@backstage/plugin-catalog-react";import{makeStyles as G,Checkbox as f,Box as W,Typography as _}from"@material-ui/core";import j from"@material-ui/icons/Category";import z from"@material-ui/icons/Class";import K from"@material-ui/icons/Group";import M from"@material-ui/icons/Loop";import Q from"@material-ui/icons/PlaylistAddCheckRounded";import e,{useMemo as d}from"react";import{useGetEntityFacets as s}from"../../../hooks/catalog/useGetEntityFacets.esm.js";import{useGroupOptions as U}from"../../../hooks/groups/useGroupOptions.esm.js";import{CheckIcon as V}from"../../CheckIcon/CheckIcon.esm.js";import l from"../../MultiSelectFilter/MultiSelectFilter.esm.js";function X(t){return t.toLowerCase().split("_").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}const y=(t,{selected:r})=>e.createElement(e.Fragment,null,e.createElement(f,{value:t,checked:r,color:"primary"}),e.createElement(B,{entityRef:t,hideIcon:!0})),$=(t,{selected:r})=>e.createElement(e.Fragment,null,e.createElement(f,{value:t,checked:r,color:"primary"}),e.createElement(V,{result:t}),e.createElement(W,{mr:1}),e.createElement(_,null,X(t))),q=G(t=>({root:{display:"flex",flexDirection:"row",alignItems:"center",gap:t.spacing(2)}})),H=({filter:t,states:r,setStates:u,owners:E,setOwners:g,lifecycles:h,setLifecycles:L,types:b,setTypes:A,systems:F,setSystems:k})=>{const O=q(),n=D(P).getOptionalStringArray("soundcheck.flags")?.includes("enable-check-insights"),{options:i,isLoading:w}=U(),S=d(()=>i.map(o=>o.ref),[i]),{data:a,isLoading:C}=s("spec.lifecycle",t,n),{data:m,isLoading:R}=s("spec.type",t,n),{data:c,isLoading:x}=s("relations.partOf",t,n),p=d(()=>c?.filter(o=>{try{return T(o).kind.toLowerCase()==="system"}catch{return!1}}),[c]),I=(a||[]).length<=1,N=(m||[]).length<=1,v=(p||[]).length<=1;return e.createElement("div",{className:O.root},e.createElement(l,{name:"state",label:"State",icon:e.createElement(Q,null),options:["PASSED","FAILED","WARNING","NOT_APPLICABLE"],filters:r,setFilters:u,customRenderOption:$}),n&&e.createElement("div",null,e.createElement(l,{name:"system",label:"System",icon:e.createElement(j,null),filters:F,setFilters:k,options:p??[],disabled:x||v,customRenderOption:y}),e.createElement(l,{name:"owner",label:"Owner",icon:e.createElement(K,null),filters:E,setFilters:g,options:S??[],disabled:w,customRenderOption:y}),e.createElement(l,{name:"type",label:"Type",icon:e.createElement(z,null),filters:b,setFilters:A,options:m??[],disabled:R||N}),e.createElement(l,{name:"lifecycle",label:"Lifecycle",icon:e.createElement(M,null),filters:h,setFilters:L,options:a??[],disabled:C||I})))};export{H as FilterBar};
|
|
2
2
|
//# sourceMappingURL=FilterBar.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EntityRefLink as i}from"@backstage/plugin-catalog-react";import{makeStyles as a,List as r,Typography as o,ListItem as
|
|
1
|
+
import{EntityRefLink as i}from"@backstage/plugin-catalog-react";import{makeStyles as a,List as r,Typography as o,ListItem as m,Tooltip as c,ListItemIcon as s,ListItemText as l}from"@material-ui/core";import d from"@material-ui/icons/Group";import e from"react";const p=a(n=>({root:{position:"relative",height:"100%"},cardSection:{marginBottom:n.spacing(2)},listItem:{padding:0},listItemText:{margin:0},iconContainer:{minWidth:"auto",paddingRight:n.spacing(1)},ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}}}})),h=({check:n})=>{const t=p();return e.createElement(r,{dense:!0,disablePadding:!0,className:t.cardSection},e.createElement(o,{variant:"overline",color:"textSecondary"},"Check Details"),e.createElement(m,{disableGutters:!0,className:t.listItem},e.createElement(c,{title:"Owner"},e.createElement(s,{className:t.iconContainer},e.createElement(d,{color:"inherit",fontSize:"small"}))),e.createElement(l,{className:t.listItemText,primary:e.createElement(i,{entityRef:n.ownerEntityRef??"No Owner",hideIcon:!0,className:t.ownerLink})})))};export{h as CheckMetadata};
|
|
2
2
|
//# sourceMappingURL=CheckMetadata.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as I,FormControlLabel as G,Switch as R,Box as L,Typography as y,Divider as W,Tabs as j,Tab as p,Grid as g,Button as $}from"@material-ui/core";import H from"@material-ui/icons/Add";import J from"@material-ui/icons/Remove";import e,{useState as K}from"react";import{useFormContext as M,useFieldArray as O,useWatch as P,Controller as b}from"react-hook-form";import{validateCacheConfig as Q}from"../../../../utils/collectors.esm.js";import{validateFrequency as U}from"../../../../utils/frequency.esm.js";import"lodash";import"../../../Frequency/types.esm.js";import"../../../Frequency/util.esm.js";import{FrequencyComponent as V}from"../../../Frequency/FrequencyComponent.esm.js";import{CacheConfigComponent as X}from"../../../CacheConfig/CacheConfigComponent.esm.js";import"@spotify/backstage-plugin-soundcheck-common";import{FilterComponent as Y}from"../../../Filter/FilterComponent.esm.js";const Z=I(t=>({root:{padding:t.spacing(1.5,6)},tabsContainer:{marginRight:16},tab:{height:"64px",textAlign:"left"},contentContainer:{width:"100%",padding:t.spacing(1)},divider:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},switchTrack:{backgroundColor:`${t.palette.primary.main} !important`},buttonsContainer:{marginTop:t.spacing(1),marginBottom:t.spacing(2)}})),C="FactDetails",v="Frequency",F="Filters",k="Caching",_=({name:t,label:E,description:x,disabled:i,FactDetailsComponent:s,multipleCollectors:o})=>{const{control:m,formState:q}=M(),d=q.errors?.[t],{fields:N,insert:D,remove:T}=O({control:m,name:o?.enable?`${t}.collectors`:t}),u=o?.enable?N:[{id:t}],h=s?C:v,[r,f]=K(Array(u.length).fill(h)),w=(l,a,n)=>{f([...r.slice(0,n),a,...r.slice(n+1)])},S=l=>{D(l+1,o?.defaultConfig),f([...r.slice(0,l+1),h,...r.slice(l+1)])},A=l=>{T(l),f([...r.slice(0,l),...r.slice(l+1)])},B=P({control:m,name:`${t}.enabled`}),c=Z();return e.createElement("div",{className:c.root},e.createElement(b,{name:`${t}.enabled`,control:m,render:({field:l})=>e.createElement(G,{control:e.createElement(R,{...l,checked:l.value,"data-testid":`${t}-switch`,classes:{track:l.value?c.switchTrack:void 0},disabled:i}),label:e.createElement(L,{display:"flex",flexDirection:"column"},e.createElement(y,{variant:"body1",component:"span"},e.createElement("b",null,`${E}`)),e.createElement(y,{variant:"caption",color:"textSecondary",component:"p"},`${x}`))})}),B&&e.createElement("div",null,u.map((l,a)=>e.createElement("div",{key:l.id},a!==0&&e.createElement(W,{className:c.divider}),e.createElement(j,{orientation:"horizontal",variant:"scrollable",value:r[a],onChange:(n,z)=>w(n,z,a),className:c.tabsContainer},s&&e.createElement(p,{label:"Fact Details",value:C,className:c.tab}),e.createElement(p,{label:"Frequency",value:v,className:c.tab}),e.createElement(p,{label:"Filters",value:F,className:c.tab}),e.createElement(p,{label:"Caching",value:k,className:c.tab})),e.createElement("div",{className:c.contentContainer},r[a]===C&&s&&e.createElement(s,{name:o?.enable?`${t}.collectors.${a}.factDetails`:`${t}.factDetails`,disabled:i}),r[a]===v&&e.createElement(b,{name:o?.enable?`${t}.collectors.${a}.frequency`:`${t}.frequency`,control:m,rules:{validate:U},render:({field:n})=>e.createElement(V,{disabled:i,value:n.value,onChange:n.onChange,errors:o?.enable?d?.collectors?.[a]?.frequency:d?.frequency})}),r[a]===F&&e.createElement(b,{name:o?.enable?`${t}.collectors.${a}.filters`:`${t}.filters`,control:m,render:({field:n})=>e.createElement(Y,{disabled:i,value:n.value,onChange:n.onChange})}),r[a]===k&&e.createElement(b,{name:o?.enable?`${t}.collectors.${a}.cacheConfig`:`${t}.cacheConfig`,control:m,rules:{validate:Q},render:({field:n})=>e.createElement(X,{disabled:i,value:n.value,onChange:n.onChange,errors:o?.enable?d?.collectors?.[a]?.cacheConfig:d?.cacheConfig})})),o?.enable&&e.createElement(g,{container:!0,spacing:1,className:c.buttonsContainer},u.length>1&&e.createElement(g,{item:!0},e.createElement($,{startIcon:e.createElement(J,null),onClick:()=>A(a),disabled:i,variant:"outlined",size:"small",color:"secondary"},"Remove")),e.createElement(g,{item:!0},e.createElement($,{startIcon:e.createElement(H,null),onClick:()=>S(a),disabled:i,variant:"outlined",size:"small",color:"primary"},"Add ",E)))))))};export{_ as FactCollectionConfig};
|
|
2
2
|
//# sourceMappingURL=FactCollectionConfig.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as v,Paper as C,Divider as D}from"@material-ui/core";import e from"react";import{useForm as b,FormProvider as S}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"../../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as E}from"../../../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as h}from"../../../../hooks/useNavigateBack.esm.js";import{useUpdateCollectorConfig as y}from"../../../../hooks/collectors/useUpdateCollectorConfig.esm.js";import{integrationsPageRouteRef as F}from"../../../../routes.esm.js";import{FooterButtons as L}from"../../../FooterButtons/FooterButtons.esm.js";import"../../../SoundcheckHeader/SoundcheckHeader.esm.js";import"../../../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as k}from"../../../SoundcheckHeader/useHeader.esm.js";import{FactCollectionConfig as l}from"../Common/FactCollectionConfig.esm.js";import{collectorHeaderContent as w,confirmationModalContent as B}from"../Common/utils.esm.js";import{mapConfigToDataDogCollectorConfig as O,defaultDataDogConfig as j,mapDataDogCollectorConfigToConfig as x}from"./utils.esm.js";const M=v(o=>({spacer:{height:o.spacing(8),width:"100%"},section:{marginBottom:o.spacing(2)}})),N=({disabled:o,selectedCollector:t})=>{const i=b({defaultValues:t?O(t.config):j(),mode:"onChange"}),{formState:{errors:r},handleSubmit:a}=i,n=M(),c=!!r.serviceDefinition||!!r.serviceLevelObjective,{mutateAsync:s}=y(),[f,d]=h(F),{showModal:p}=E(),m=async g=>{if(!await p(B(t)))return;const u=x(g);await s({collectorId:t.id,config:u})&&d()};return k(w(t)),e.createElement(e.Fragment,null,e.createElement(C,{className:n.section},e.createElement(S,{...i},e.createElement("form",{onSubmit:a(m)},e.createElement(l,{name:"serviceDefinition",label:"Service Definition",description:"Collects details about Datadog service linked to an entity.",disabled:o}),e.createElement(D,null),e.createElement(l,{name:"serviceLevelObjective",label:"Service Level Objective",description:"Collects details about SLOs configured for a Datadog service linked to an entity.",disabled:o})))),e.createElement("div",{className:n.section},e.createElement(L,{onCancel:f,saveButtonText:"Save",isLoading:!1,onSave:a(m),disableSave:c})))};export{N as DataDogConfigurator};
|
|
2
2
|
//# sourceMappingURL=DataDogConfigurator.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as b,Paper as
|
|
1
|
+
import{makeStyles as b,Paper as h,Divider as l}from"@material-ui/core";import e from"react";import{useForm as y,FormProvider as E}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"../../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as v}from"../../../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as S}from"../../../../hooks/useNavigateBack.esm.js";import{useUpdateCollectorConfig as B}from"../../../../hooks/collectors/useUpdateCollectorConfig.esm.js";import{integrationsPageRouteRef as P}from"../../../../routes.esm.js";import{FooterButtons as F}from"../../../FooterButtons/FooterButtons.esm.js";import"../../../SoundcheckHeader/SoundcheckHeader.esm.js";import"../../../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as w}from"../../../SoundcheckHeader/useHeader.esm.js";import{FactCollectionConfig as i}from"../Common/FactCollectionConfig.esm.js";import{collectorHeaderContent as D,confirmationModalContent as G}from"../Common/utils.esm.js";import{mapConfigToGithubCollectorConfig as L,defaultGithubConfig as N,mapGithubCollectorConfigToConfig as R}from"./utils.esm.js";const M=b(o=>({spacer:{height:o.spacing(8),width:"100%"},section:{marginBottom:o.spacing(2)},form:{marginBottom:o.spacing(2)}})),T=({disabled:o,selectedCollector:t})=>{const a=y({defaultValues:t?L(t.config):N(),mode:"onChange"}),{formState:{errors:r},handleSubmit:n}=a,m=M(),c=!!r.branchProtections||!!r.repositoryDetails||!!r.repositoryLanguages,{mutateAsync:p}=B(),[f,d]=S(P),{showModal:u}=v(),s=async g=>{if(!await u(G(t)))return;const C=R(g);await p({collectorId:t.id,config:C})&&d()};return w(D(t)),e.createElement(e.Fragment,null,e.createElement(h,{className:m.form},e.createElement(E,{...a},e.createElement("form",{onSubmit:n(s)},e.createElement(i,{name:"branchProtections",label:"Branch Protections",description:"Collects branch protection information from an entity's repository.",disabled:o}),e.createElement(l,null),e.createElement(i,{name:"repositoryDetails",label:"Repository Details",description:"Collects details about an entity's repository.",disabled:o}),e.createElement(l,null),e.createElement(i,{name:"repositoryLanguages",label:"Repository Languages",description:"Collects details about the languages used in an entity's repository.",disabled:o})))),e.createElement("div",{className:m.section},e.createElement(F,{onCancel:f,saveButtonText:"Save",isLoading:!1,onSave:n(s),disableSave:c})))};export{T as GithubConfigurator};
|
|
2
2
|
//# sourceMappingURL=GithubConfigurator.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as b,Paper as h,Divider as
|
|
1
|
+
import{makeStyles as b,Paper as h,Divider as c}from"@material-ui/core";import e from"react";import{useForm as E,FormProvider as j}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"../../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as v}from"../../../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as P}from"../../../../hooks/useNavigateBack.esm.js";import{useUpdateCollectorConfig as S}from"../../../../hooks/collectors/useUpdateCollectorConfig.esm.js";import{integrationsPageRouteRef as y}from"../../../../routes.esm.js";import{FooterButtons as B}from"../../../FooterButtons/FooterButtons.esm.js";import"../../../SoundcheckHeader/SoundcheckHeader.esm.js";import"../../../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as F}from"../../../SoundcheckHeader/useHeader.esm.js";import{FactCollectionConfig as r}from"../Common/FactCollectionConfig.esm.js";import{collectorHeaderContent as w,confirmationModalContent as D}from"../Common/utils.esm.js";import{mapConfigToGitlabCollectorConfig as G,defaultGitlabConfig as L,mapGitlabCollectorConfigToConfig as x}from"./utils.esm.js";const M=b(t=>({spacer:{height:t.spacing(8),width:"100%"},section:{marginBottom:t.spacing(2)},form:{marginBottom:t.spacing(2)}})),N=({disabled:t,selectedCollector:o})=>{const i=E({defaultValues:o?G(o.config):L(),mode:"onChange"}),{formState:{errors:a},handleSubmit:n}=i,l=M(),s=!!a.branchProtections||!!a.projectDetails||!!a.projectLanguages,{mutateAsync:p}=S(),[f,d]=P(y),{showModal:g}=v(),m=async u=>{if(!await g(D(o)))return;const C=x(u);await p({collectorId:o.id,config:C})&&d()};return F(w(o)),e.createElement(e.Fragment,null,e.createElement(h,{className:l.form},e.createElement(j,{...i},e.createElement("form",{onSubmit:n(m)},e.createElement(r,{name:"branchProtections",label:"Branch Protections",description:"Collects branch protection information from an entity's project.",disabled:t}),e.createElement(c,null),e.createElement(r,{name:"projectDetails",label:"Project Details",description:"Collects details about an entity's project.",disabled:t}),e.createElement(c,null),e.createElement(r,{name:"projectLanguages",label:"Project Languages",description:"Collects details about the languages used in an entity's project.",disabled:t})))),e.createElement("div",{className:l.section},e.createElement(B,{onCancel:f,saveButtonText:"Save",isLoading:!1,onSave:n(m),disableSave:s})))};export{N as GitlabConfigurator};
|
|
2
2
|
//# sourceMappingURL=GitlabConfigurator.esm.js.map
|
package/dist/components/CollectorPage/Configurators/Jira/IssuesSearchFactDetailsComponent.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as x,Grid as m,Typography as
|
|
1
|
+
import{makeStyles as x,Grid as m,Typography as c,TextField as p}from"@material-ui/core";import e from"react";import{useFormContext as h,Controller as d}from"react-hook-form";import{JIRA_COLLECTOR_FIELDS as T}from"./utils.esm.js";const f=x(a=>({root:{paddingTop:a.spacing(1)},textInput:{marginTop:0,width:"500px"},helperText:{marginLeft:0}})),g=({name:a,disabled:i})=>{const t=f(),{factName:l,jql:n}=T.factDetails,{control:s}=h();return e.createElement(m,{container:!0,spacing:1,direction:"column",className:t.root},e.createElement(m,{item:!0},e.createElement(c,{variant:"subtitle2"},l.name),e.createElement(d,{name:`${a}.factName`,control:s,render:({field:o,fieldState:{error:r}})=>e.createElement(p,{...o,type:"text",variant:"outlined",margin:"dense",placeholder:l.placeholder,className:t.textInput,disabled:i,error:!!r,helperText:r?.message??l.helperText,FormHelperTextProps:{className:t.helperText}})})),e.createElement(m,{item:!0},e.createElement(c,{variant:"subtitle2"},n.name),e.createElement(d,{name:`${a}.jql`,control:s,render:({field:o,fieldState:{error:r}})=>e.createElement(p,{...o,type:"text",variant:"outlined",margin:"dense",placeholder:n.placeholder,className:t.textInput,disabled:i,error:!!r,helperText:r?.message??n.helperText,FormHelperTextProps:{className:t.helperText}})})))};export{g as IssuesSearchFactDetailsComponent};
|
|
2
2
|
//# sourceMappingURL=IssuesSearchFactDetailsComponent.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{zodResolver as
|
|
1
|
+
import{zodResolver as C}from"@hookform/resolvers/zod";import{makeStyles as g,Paper as S}from"@material-ui/core";import o from"react";import{useForm as h,FormProvider as v}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"../../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as b}from"../../../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as F}from"../../../../hooks/useNavigateBack.esm.js";import{useUpdateCollectorConfig as E}from"../../../../hooks/collectors/useUpdateCollectorConfig.esm.js";import{integrationsPageRouteRef as J}from"../../../../routes.esm.js";import{FooterButtons as w}from"../../../FooterButtons/FooterButtons.esm.js";import"../../../SoundcheckHeader/SoundcheckHeader.esm.js";import"../../../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as B}from"../../../SoundcheckHeader/useHeader.esm.js";import{FactCollectionConfig as y}from"../Common/FactCollectionConfig.esm.js";import{collectorHeaderContent as H,confirmationModalContent as I}from"../Common/utils.esm.js";import{IssuesSearchFactDetailsComponent as M}from"./IssuesSearchFactDetailsComponent.esm.js";import{mapConfigToJiraCollectorConfig as N,defaultJiraConfig as P,issueSearchCollectorConfig as R,mapJiraCollectorConfigToConfig as T}from"./utils.esm.js";import{jiraCollectorFormSchema as k}from"./validation.esm.js";const x=g(t=>({spacer:{height:t.spacing(8),width:"100%"},section:{marginBottom:t.spacing(2)}})),D=({disabled:t,selectedCollector:e})=>{const r=h({defaultValues:e?N(e.config):P(),mode:"onChange",resolver:C(k)}),{formState:{errors:n},handleSubmit:i}=r,a=x(),s=!!n.issuesSearch,{mutateAsync:l}=E(),[c,f]=F(J),{showModal:p}=b(),m=async u=>{if(!await p(I(e)))return;const d=T(u);await l({collectorId:e.id,config:d})&&f()};return B(H(e)),o.createElement(o.Fragment,null,o.createElement(S,{className:a.section},o.createElement(v,{...r},o.createElement("form",{onSubmit:i(m)},o.createElement(y,{name:"issuesSearch",label:"Issues Search",description:"Collects details about Jira issues.",disabled:t,FactDetailsComponent:M,multipleCollectors:{enable:!0,defaultConfig:R()}})))),o.createElement("div",{className:a.section},o.createElement(w,{onCancel:c,saveButtonText:"Save",isLoading:!1,onSave:i(m),disableSave:s})))};export{D as JiraConfigurator};
|
|
2
2
|
//# sourceMappingURL=JiraConfigurator.esm.js.map
|
package/dist/components/CollectorPage/Configurators/Kubernetes/KubernetesConfigurator.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as b,Paper as
|
|
1
|
+
import{zodResolver as g}from"@hookform/resolvers/zod";import{makeStyles as b,Paper as E,Divider as S}from"@material-ui/core";import e from"react";import{useForm as v,FormProvider as h}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"../../../../hooks/useSoundcheckAlert.esm.js";import{useConfirmationModal as F}from"../../../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as R}from"../../../../hooks/useNavigateBack.esm.js";import{useUpdateCollectorConfig as K}from"../../../../hooks/collectors/useUpdateCollectorConfig.esm.js";import{integrationsPageRouteRef as w}from"../../../../routes.esm.js";import{FooterButtons as y}from"../../../FooterButtons/FooterButtons.esm.js";import"../../../SoundcheckHeader/SoundcheckHeader.esm.js";import"../../../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as k}from"../../../SoundcheckHeader/useHeader.esm.js";import{FactCollectionConfig as s}from"../Common/FactCollectionConfig.esm.js";import{defaultCollectorOption as B}from"../Common/CollectorOption.esm.js";import{collectorHeaderContent as D,confirmationModalContent as L}from"../Common/utils.esm.js";import{KubernetesFactDetails as O}from"./KubernetesFactDetails.esm.js";import{mapConfigToKubernetesCollectorConfig as T,defaultKubernetesConfig as H,K8S_COLLECTOR_FIELDS as M,mapKubernetesCollectorConfigToConfig as N}from"./utils.esm.js";import{customResourceFormSchema as P}from"./validation.esm.js";const x=b(o=>({spacer:{height:o.spacing(8),width:"100%"},section:{marginBottom:o.spacing(2)}})),I=({disabled:o,selectedCollector:t})=>{const r=v({defaultValues:t?T(t.config):H(),mode:"onChange",resolver:g(P)}),m=x(),{mutateAsync:c}=K(),[p,f]=R(w),{isValid:u}=r.formState,{showModal:d}=F(),n=async a=>{if(!await d(L(t)))return;const i=N(a);await c({collectorId:t.id,config:i})&&f()};return k(D(t)),e.createElement(e.Fragment,null,e.createElement(E,{className:m.section},e.createElement(h,{...r},e.createElement("form",{onSubmit:r.handleSubmit(n)},Object.entries(M).map(([a,i],l,C)=>e.createElement("div",{key:l},e.createElement(s,{name:a,label:i.label,description:i.description,disabled:o}),l<C.length-1&&e.createElement(S,null))),e.createElement(s,{name:"customResources",label:"Custom Resources",description:"Collect facts from a kubernetes custom resource associated with an entity.",disabled:o,FactDetailsComponent:O,multipleCollectors:{enable:!0,defaultConfig:B()}})))),e.createElement("div",{className:m.section},e.createElement(y,{onCancel:p,saveButtonText:"Save",isLoading:!1,onSave:r.handleSubmit(n),disableSave:!u})))};export{I as KubernetesConfigurator};
|
|
2
2
|
//# sourceMappingURL=KubernetesConfigurator.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{makeStyles as n,Grid as c}from"@material-ui/core";import e from"react";import{useFormContext as m}from"react-hook-form";import{FormControlledTextField as a}from"../../../FormControlledTextField/FormControlledTextField.esm.js";import{FormFieldLabel as l}from"../../../FormFieldLabel/FormFieldLabel.esm.js";const i=n(o=>({root:{paddingTop:o.spacing(1)},textInput:{marginTop:0,width:500},helperText:{marginLeft:0}})),p=({name:o,disabled:r})=>{const t=i(),{control:s}=m();return e.createElement(c,{container:!0,spacing:1,direction:"column",className:t.root},e.createElement(c,{item:!0},e.createElement(l,{title:"Fact Name"}),e.createElement(a,{control:s,placeholder:"Input a unique fact name",name:`${o}.factName`,className:t.textInput,helperTextClassName:t.helperText,disabled:r})),e.createElement(c,{item:!0},e.createElement(l,{title:"Group",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/fact-collectors/3p-integrations/kubernetes#custom-resources"}),e.createElement(a,{control:s,placeholder:"Custom resource api group",name:`${o}.customResource.group`,className:t.textInput,helperTextClassName:t.helperText,disabled:r})),e.createElement(c,{item:!0},e.createElement(l,{title:"Api Version",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/fact-collectors/3p-integrations/kubernetes#custom-resources"}),e.createElement(a,{control:s,placeholder:"Custom resource api version",name:`${o}.customResource.apiVersion`,className:t.textInput,helperTextClassName:t.helperText,disabled:r})),e.createElement(c,{item:!0},e.createElement(l,{title:"Plural",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/fact-collectors/3p-integrations/kubernetes#custom-resources"}),e.createElement(a,{control:s,placeholder:"Custom resource plural",name:`${o}.customResource.plural`,className:t.textInput,helperTextClassName:t.helperText,disabled:r})))};export{p as KubernetesFactDetails};
|
|
2
|
+
//# sourceMappingURL=KubernetesFactDetails.esm.js.map
|