@spotify/backstage-plugin-soundcheck 0.14.2 → 0.14.3
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 +20 -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/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/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/TrackEntitiesTable/TrackEntitiesTable.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
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{zodResolver as E}from"@hookform/resolvers/zod";import{makeStyles as v,Paper as S,Divider as
|
|
1
|
+
import{zodResolver as E}from"@hookform/resolvers/zod";import{makeStyles as v,Paper as S,Divider as s}from"@material-ui/core";import e from"react";import{useForm as b,FormProvider as y}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 D}from"../../../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as P}from"../../../../hooks/useNavigateBack.esm.js";import{useUpdateCollectorConfig as T}from"../../../../hooks/collectors/useUpdateCollectorConfig.esm.js";import{integrationsPageRouteRef as L}from"../../../../routes.esm.js";import{FooterButtons as h}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 a}from"../Common/FactCollectionConfig.esm.js";import{collectorHeaderContent as F,confirmationModalContent as R}from"../Common/utils.esm.js";import{IncidentsFactDetailsComponent as I}from"./IncidentsFactDetailsComponent.esm.js";import{mapConfigToPagerDutyCollectorConfig as N,defaultPagerDutyConfig as O,SERVICE_COLLECTOR_TYPE as _,STANDARDS_COLLECTOR_TYPE as k,INCIDENTS_COLLECTOR_TYPE as B,incidentsCollectorConfig as A,mapPagerDutyCollectorConfigToConfig as M}from"./utils.esm.js";import{pagerDutyCollectorFormSchema as Y}from"./validation.esm.js";const x=v(t=>({spacer:{height:t.spacing(8),width:"100%"},section:{marginBottom:t.spacing(2)}})),H=({disabled:t,selectedCollector:o})=>{const i=b({defaultValues:o?N(o.config):O(),mode:"onChange",resolver:E(Y)}),{formState:{errors:r},handleSubmit:n}=i,l=x(),c=!!r.service||!!r.standards||!!r.incidents,{mutateAsync:d}=T(),[p,C]=P(L),{showModal:f}=D(),m=async u=>{if(!await f(R(o)))return;const g=M(u);await d({collectorId:o.id,config:g})&&C()};return w(F(o)),e.createElement(e.Fragment,null,e.createElement(S,{className:l.section},e.createElement(y,{...i},e.createElement("form",{onSubmit:n(m)},e.createElement(a,{name:_.toLowerCase(),label:"Service",description:"Collects details about PagerDuty service linked to an entity.",disabled:t}),e.createElement(s,null),e.createElement(a,{name:k.toLowerCase(),label:"Standards",description:"Collects details about standards applied to a PagerDuty service linked to an entity.",disabled:t}),e.createElement(s,null),e.createElement(a,{name:B.toLowerCase(),label:"Incidents",description:"Collects details about incidents associated with a PagerDuty service linked to an entity.",disabled:t,FactDetailsComponent:I,multipleCollectors:{enable:!0,defaultConfig:A()}})))),e.createElement("div",{className:l.section},e.createElement(h,{onCancel:p,saveButtonText:"Save",isLoading:!1,onSave:n(m),disableSave:c})))};export{H as PagerDutyConfigurator};
|
|
2
2
|
//# sourceMappingURL=PagerDutyConfigurator.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{zodResolver as
|
|
1
|
+
import{zodResolver as S}from"@hookform/resolvers/zod";import{makeStyles as O,Paper as L,Divider as c}from"@material-ui/core";import e from"react";import{useForm as T,FormProvider as x}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 h}from"../../../../hooks/useNavigateBack.esm.js";import{useUpdateCollectorConfig as v}from"../../../../hooks/collectors/useUpdateCollectorConfig.esm.js";import{integrationsPageRouteRef as y}from"../../../../routes.esm.js";import{FooterButtons as R}from"../../../FooterButtons/FooterButtons.esm.js";import"../../../SoundcheckHeader/SoundcheckHeader.esm.js";import"../../../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as _}from"../../../SoundcheckHeader/useHeader.esm.js";import{collectorHeaderContent as F,confirmationModalContent as N}from"../Common/utils.esm.js";import{FactCollectionConfig as n}from"./FactCollectionConfig.esm.js";import{mapConfigToScmCollectorConfig as M,DEFAULT_SCM_COLLECTOR_CONFIG as P,EXISTS_COLLECTOR_TYPE as w,REGEX_COLLECTOR_TYPE as J,JSON_COLLECTOR_TYPE as Y,mapScmCollectorConfigToConfig as A}from"./utils.esm.js";import{scmCollectorFormSchema as B}from"./validation.esm.js";const I=O(o=>({spacer:{height:o.spacing(8),width:"100%"},section:{marginBottom:o.spacing(2)}})),j=({disabled:o,selectedCollector:r})=>{const a=T({defaultValues:r?M(r.config):P,mode:"onChange",resolver:S(B)}),{control:i,formState:{errors:t},handleSubmit:m}=a,s=I(),p=!!t.exists||!!t.regex||!!t.json,{mutateAsync:f}=v(),[d,C]=h(y),{showModal:g}=b(),l=async E=>{if(!await g(N(r)))return;const u=A(E);await f({collectorId:r.id,config:u})&&C()};return _(F(r)),e.createElement(e.Fragment,null,e.createElement(L,{className:s.section},e.createElement(x,{...a},e.createElement("form",{onSubmit:m(l)},e.createElement(n,{name:w,label:"Exists",description:"Collects information on the existence of files within an entity's repository.",control:i,disabled:o,errors:t.exists}),e.createElement(c,null),e.createElement(n,{name:J,label:"Regex",description:"Executes regular expressions against a specified file in an entity's repository and collects its capture groups.",control:i,disabled:o,errors:t.regex}),e.createElement(c,null),e.createElement(n,{name:Y,label:"JSON / YAML",description:"Collects data from a JSON/YAML file at specified JSON paths in an entity's repository.",control:i,disabled:o,errors:t.json})))),e.createElement("div",{className:s.section},e.createElement(R,{onCancel:d,saveButtonText:"Save",isLoading:!1,onSave:m(l),disableSave:p,noMargin:!0})))};export{j as ScmConfigurator};
|
|
2
2
|
//# sourceMappingURL=ScmConfigurator.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{asArray as D}from"@spotify/backstage-plugin-soundcheck-common";import{mapToCacheConfig as h,mapCacheConfigToHumanDurationOrBoolean as p,defaultCacheConfig as F}from"../../../CacheConfig/utils.esm.js";import"../../../CacheConfig/CacheConfigComponent.esm.js";import{mapCatalogFilterToFilters as m,mapFiltersToCatalogFilter as u}from"../../../Filter/utils.esm.js";import"../../../Filter/FilterComponent.esm.js";import{emptyFilters as N}from"../../../Filter/types.esm.js";import"../../../Frequency/types.esm.js";import{mapHumanDurationOrCronToFrequency as d,mapFrequencyToHumanDurationOrCron as g,defaultFrequency as _}from"../../../Frequency/util.esm.js";import"../../../Frequency/FrequencyComponent.esm.js";const y={exists:{collectors:[]},regex:{collectors:[]},json:{collectors:[]}},C={name:"",path:""},L={name:"",type:"string"},E={name:"",jsonPath:"",type:"string"},q={factName:"",data:[C]},O={factName:"",path:"",regex:"",data:[]},A={factName:"",path:"",data:[E]},S={factDetails:{factName:{name:"Fact Name",helperText:"Fact name must be unique",placeholder:"Fact Name"},branch:{name:"Custom Branch:",helperText:"If omitted collects data from default branch",placeholder:"Example: develop"},filePath:{name:"File Path",helperText:"Path to the file whose content will be searched",placeholder:"Example: /catalog-info.yaml"},label:{name:"Label",placeholder:"Label"},type:{name:"Type",placeholder:"Type"},exists:{filesSection:{name:"Files",description:"List the files whose existence will be checked"}},regex:{regex:{name:"RegEx",helperText:"Regex to match",placeholder:"Example: ^apiVersion: backstage.io/(.+)"},trueFalseMode:{label:"True / False Mode",description:"True / False Mode uses a RegEx to search for a match in the given file."},captureGroupsMode:{label:"Capture Groups Mode",description:"RegEx Capture Groups Mode allows the collector to associate capture groups within a RegEx to named values."},captureGroupsSection:{name:"Capture Groups",description:"Each element must correspond to a capture group in the given RegEx"}},json:{jsonPath:{name:"Json Path",placeholder:"Example: metadata.tags"},jsonElementsSection:{name:"JSON / YAML Elements",description:"List json / yaml paths from which to pull data from the given file"}}}},i="exists",s="regex",f="json",T=["string","number","integer","boolean","object"],x=T.map(b),P=t=>{let c;switch(t){case i:c=q;break;case s:c=O;break;case f:c=A;break;default:throw Error(`Unsupported fact type ${t}`)}return{factDetails:c,filters:{...N(),selectedKinds:["Component"]},frequency:_(),cacheConfig:F()}};function R(t){const{exists:c,regex:o,json:e}=t;if(c.collectors.length||o.collectors.length||e.collectors.length){const r={},n=[];return r.collects=n,c.collectors.forEach(a=>{n.push({type:i,factName:a.factDetails.factName,branch:a.factDetails.branch?.length?a.factDetails.branch:void 0,data:a.factDetails.data,frequency:g(a.frequency),filter:u(a.filters),cache:p(a.cacheConfig)})}),o.collectors.forEach(a=>{n.push({type:s,factName:a.factDetails.factName,branch:a.factDetails.branch?.length?a.factDetails.branch:void 0,path:a.factDetails.path,regex:a.factDetails.regex,data:a.factDetails.data.length?a.factDetails.data:void 0,frequency:g(a.frequency),filter:u(a.filters),cache:p(a.cacheConfig)})}),e.collectors.forEach(a=>{n.push({type:f,factName:a.factDetails.factName,branch:a.factDetails.branch?.length?a.factDetails.branch:void 0,path:a.factDetails.path,data:a.factDetails.data.map(l=>x.includes(l.type)?{name:l.name,jsonPath:l.jsonPath,type:"array",items:{type:M(l.type)}}:l),frequency:g(a.frequency),filter:u(a.filters),cache:p(a.cacheConfig)})}),r}return[]}function j(t){const c=t?.collects;if(c){const o=D(c);return{exists:{collectors:o.filter(e=>e.type===i).map(e=>({factDetails:{factName:e.factName,branch:e.branch,data:e.data},frequency:d(e.frequency??t.frequency),filters:m(e.filter??t.filter),cacheConfig:h(e.cache)}))},regex:{collectors:o.filter(e=>e.type===s).map(e=>({factDetails:{factName:e.factName,branch:e.branch,path:e.path,regex:e.regex,data:e.data},frequency:d(e.frequency??t.frequency),filters:m(e.filter??t.filter),cacheConfig:h(e.cache)}))},json:{collectors:o.filter(e=>e.type===f).map(e=>({factDetails:{factName:e.factName,branch:e.branch,path:e.path,data:e.data.map(r=>r.type==="array"?{name:r.name,jsonPath:r.jsonPath,type:b(r.items
|
|
1
|
+
import{asArray as D}from"@spotify/backstage-plugin-soundcheck-common";import{mapToCacheConfig as h,mapCacheConfigToHumanDurationOrBoolean as p,defaultCacheConfig as F}from"../../../CacheConfig/utils.esm.js";import"../../../CacheConfig/CacheConfigComponent.esm.js";import{mapCatalogFilterToFilters as m,mapFiltersToCatalogFilter as u}from"../../../Filter/utils.esm.js";import"../../../Filter/FilterComponent.esm.js";import{emptyFilters as N}from"../../../Filter/types.esm.js";import"../../../Frequency/types.esm.js";import{mapHumanDurationOrCronToFrequency as d,mapFrequencyToHumanDurationOrCron as g,defaultFrequency as _}from"../../../Frequency/util.esm.js";import"../../../Frequency/FrequencyComponent.esm.js";const y={exists:{collectors:[]},regex:{collectors:[]},json:{collectors:[]}},C={name:"",path:""},L={name:"",type:"string"},E={name:"",jsonPath:"",type:"string"},q={factName:"",data:[C]},O={factName:"",path:"",regex:"",data:[]},A={factName:"",path:"",data:[E]},S={factDetails:{factName:{name:"Fact Name",helperText:"Fact name must be unique",placeholder:"Fact Name"},branch:{name:"Custom Branch:",helperText:"If omitted collects data from default branch",placeholder:"Example: develop"},filePath:{name:"File Path",helperText:"Path to the file whose content will be searched",placeholder:"Example: /catalog-info.yaml"},label:{name:"Label",placeholder:"Label"},type:{name:"Type",placeholder:"Type"},exists:{filesSection:{name:"Files",description:"List the files whose existence will be checked"}},regex:{regex:{name:"RegEx",helperText:"Regex to match",placeholder:"Example: ^apiVersion: backstage.io/(.+)"},trueFalseMode:{label:"True / False Mode",description:"True / False Mode uses a RegEx to search for a match in the given file."},captureGroupsMode:{label:"Capture Groups Mode",description:"RegEx Capture Groups Mode allows the collector to associate capture groups within a RegEx to named values."},captureGroupsSection:{name:"Capture Groups",description:"Each element must correspond to a capture group in the given RegEx"}},json:{jsonPath:{name:"Json Path",placeholder:"Example: metadata.tags"},jsonElementsSection:{name:"JSON / YAML Elements",description:"List json / yaml paths from which to pull data from the given file"}}}},i="exists",s="regex",f="json",T=["string","number","integer","boolean","object"],x=T.map(b),P=t=>{let c;switch(t){case i:c=q;break;case s:c=O;break;case f:c=A;break;default:throw Error(`Unsupported fact type ${t}`)}return{factDetails:c,filters:{...N(),selectedKinds:["Component"]},frequency:_(),cacheConfig:F()}};function R(t){const{exists:c,regex:o,json:e}=t;if(c.collectors.length||o.collectors.length||e.collectors.length){const r={},n=[];return r.collects=n,c.collectors.forEach(a=>{n.push({type:i,factName:a.factDetails.factName,branch:a.factDetails.branch?.length?a.factDetails.branch:void 0,data:a.factDetails.data,frequency:g(a.frequency),filter:u(a.filters),cache:p(a.cacheConfig)})}),o.collectors.forEach(a=>{n.push({type:s,factName:a.factDetails.factName,branch:a.factDetails.branch?.length?a.factDetails.branch:void 0,path:a.factDetails.path,regex:a.factDetails.regex,data:a.factDetails.data.length?a.factDetails.data:void 0,frequency:g(a.frequency),filter:u(a.filters),cache:p(a.cacheConfig)})}),e.collectors.forEach(a=>{n.push({type:f,factName:a.factDetails.factName,branch:a.factDetails.branch?.length?a.factDetails.branch:void 0,path:a.factDetails.path,data:a.factDetails.data.map(l=>x.includes(l.type)?{name:l.name,jsonPath:l.jsonPath,type:"array",items:{type:M(l.type)}}:l),frequency:g(a.frequency),filter:u(a.filters),cache:p(a.cacheConfig)})}),r}return[]}function j(t){const c=t?.collects;if(c){const o=D(c);return{exists:{collectors:o.filter(e=>e.type===i).map(e=>({factDetails:{factName:e.factName,branch:e.branch,data:e.data},frequency:d(e.frequency??t.frequency),filters:m(e.filter??t.filter),cacheConfig:h(e.cache)}))},regex:{collectors:o.filter(e=>e.type===s).map(e=>({factDetails:{factName:e.factName,branch:e.branch,path:e.path,regex:e.regex,data:e.data},frequency:d(e.frequency??t.frequency),filters:m(e.filter??t.filter),cacheConfig:h(e.cache)}))},json:{collectors:o.filter(e=>e.type===f).map(e=>({factDetails:{factName:e.factName,branch:e.branch,path:e.path,data:e.data.map(r=>r.type==="array"?{name:r.name,jsonPath:r.jsonPath,type:b(r.items?.type)}:r)},frequency:d(e.frequency??t.frequency),filters:m(e.filter??t.filter),cacheConfig:h(e.cache)}))}}}return y}function b(t){return`array[${t}]`}function M(t){const c="array[";return t.substring(t.indexOf(c)+c.length,t.lastIndexOf("]"))}export{x as ARRAY_ELEMENT_TYPES,C as DEFAULT_EXISTS_FACT_DATA,E as DEFAULT_JSON_FACT_DATA,L as DEFAULT_REGEX_FACT_DATA,y as DEFAULT_SCM_COLLECTOR_CONFIG,T as ELEMENT_TYPES,i as EXISTS_COLLECTOR_TYPE,f as JSON_COLLECTOR_TYPE,s as REGEX_COLLECTOR_TYPE,S as SCM_COLLECTOR_FIELDS,P as defaultCollectorConfig,j as mapConfigToScmCollectorConfig,R as mapScmCollectorConfigToConfig};
|
|
2
2
|
//# sourceMappingURL=utils.esm.js.map
|
package/dist/components/CollectorPage/Configurators/SonarQube/MeasuresFactDetailsInput.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as p,Typography as s,TextField as c}from"@material-ui/core";import e from"react";import{useFormContext as d,Controller as i}from"react-hook-form";import{MetricsInput as f}from"./MetricsInput.esm.js";import{SONARQUBE_COLLECTOR_FIELDS as x}from"./utils.esm.js";const u=p(t=>({root:{paddingTop:t.spacing(1)},textInput:{marginTop:0,width:"500px"},helperText:{marginLeft:0}})),h=({name:t,disabled:l})=>{const o=u(),{control:m}=d(),{factName:n}=x.factDetails;return e.createElement("div",{className:o.root},e.createElement(s,{variant:"subtitle2"},n.name),e.createElement(i,{name:`${t}.factName`,control:m,render:({field:r,fieldState:{error:a}})=>e.createElement(c,{...r,type:"text",variant:"outlined",margin:"dense",placeholder:n.placeholder,className:o.textInput,disabled:l,error:!!a,helperText:a?.message??n.helperText,FormHelperTextProps:{className:o.helperText}})}),e.createElement(i,{name:`${t}.metrics`,control:m,render:({field:r,fieldState:{error:a}})=>e.createElement(f,{disabled:l,value:r.value,onChange:r.onChange,errors:a})}))};export{h as MeasuresFactDetailsInput};
|
|
2
2
|
//# sourceMappingURL=MeasuresFactDetailsInput.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as x,Typography as T,Grid as o,Chip as v,TextField as y}from"@material-ui/core";import t,{useState as u,useEffect as C}from"react";import{SONARQUBE_COLLECTOR_FIELDS as N}from"./utils.esm.js";const b=x(r=>({caption:{marginTop:r.spacing(2),marginBottom:r.spacing(1)},metricsInput:{width:"500px"},metricChips:{marginBottom:r.spacing(1)},helperText:{marginLeft:0}})),I=({value:r,onChange:l,disabled:p,errors:d})=>{const i=b(),{metrics:
|
|
1
|
+
import{makeStyles as x,Typography as T,Grid as o,Chip as v,TextField as y}from"@material-ui/core";import t,{useState as u,useEffect as C}from"react";import{SONARQUBE_COLLECTOR_FIELDS as N}from"./utils.esm.js";const b=x(r=>({caption:{marginTop:r.spacing(2),marginBottom:r.spacing(1)},metricsInput:{width:"500px"},metricChips:{marginBottom:r.spacing(1)},helperText:{marginLeft:0}})),I=({value:r,onChange:l,disabled:p,errors:d})=>{const i=b(),{metrics:m}=N.factDetails,[a,g]=u(r),[n,h]=u("");C(()=>{l&&l(a)},[a,l]);const E=e=>{e.key==="Enter"&&(a?.includes(n.trim())||g(a?[...a,n.trim()]:[n.trim()]),h(""))},f=(e,s)=>{g(a?.filter(c=>c!==s))};return t.createElement("div",null,t.createElement("div",{className:i.caption},t.createElement(T,{variant:"subtitle2"},m.name)),t.createElement(o,{container:!0,direction:"column",spacing:0,className:i.metricsInput},t.createElement(o,{item:!0},a?.map((e,s)=>t.createElement(v,{key:`${e}-${s}`,label:e,disabled:p,size:"small",onDelete:c=>f(c,e),className:i.metricChips}))),t.createElement(o,{item:!0},t.createElement(y,{type:"text",variant:"outlined",margin:"dense",placeholder:m.placeholder,className:i.metricsInput,disabled:p,error:!!d,fullWidth:!0,value:n,onChange:e=>h(e.target.value),onKeyDown:E,helperText:d?.message??m.helperText,FormHelperTextProps:{className:i.helperText}}))))};export{I as MetricsInput};
|
|
2
2
|
//# sourceMappingURL=MetricsInput.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{zodResolver as b}from"@hookform/resolvers/zod";import{makeStyles as S,Paper as
|
|
1
|
+
import{zodResolver as b}from"@hookform/resolvers/zod";import{makeStyles as S,Paper as E,Divider as i}from"@material-ui/core";import e from"react";import{useForm as j,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 h}from"../../../../hooks/useConfirmationModal.esm.js";import{useNavigateBack as Q}from"../../../../hooks/useNavigateBack.esm.js";import{useUpdateCollectorConfig as F}from"../../../../hooks/collectors/useUpdateCollectorConfig.esm.js";import{integrationsPageRouteRef as y}from"../../../../routes.esm.js";import{FooterButtons as k}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 a}from"../Common/FactCollectionConfig.esm.js";import{collectorHeaderContent as T,confirmationModalContent as M}from"../Common/utils.esm.js";import{MeasuresFactDetailsInput as P}from"./MeasuresFactDetailsInput.esm.js";import{mapConfigToSonarQubeCollectorConfig as B,defaultSonarQubeConfig as D,measuresCollectorConfig as H,mapSonarQubeCollectorConfigToConfig as I}from"./utils.esm.js";import{sonarQubeCollectorFormSchema as N}from"./validation.esm.js";const R=S(o=>({spacer:{height:o.spacing(8),width:"100%"},section:{marginBottom:o.spacing(2)}})),x=({disabled:o,selectedCollector:t})=>{const n=j({defaultValues:t?B(t.config):D(),mode:"onChange",resolver:b(N)}),{formState:{errors:r},handleSubmit:l}=n,s=R(),c=!!r.projects||!!r.projectTags||!!r.issues||!!r.measures,{mutateAsync:p}=F(),[u,d]=Q(y),{showModal:f}=h(),m=async C=>{if(!await f(M(t)))return;const g=I(C);await p({collectorId:t.id,config:g})&&d()};return w(T(t)),e.createElement(e.Fragment,null,e.createElement(E,{className:s.section},e.createElement(v,{...n},e.createElement("form",{onSubmit:l(m)},e.createElement(a,{name:"projects",label:"Projects",description:"Collects details about SonarQube project linked to an entity.",disabled:o}),e.createElement(i,null),e.createElement(a,{name:"projectTags",label:"Project Tags",description:"Collects details about tags set on a SonarQube project linked to an entity.",disabled:o}),e.createElement(i,null),e.createElement(a,{name:"issues",label:"Issues",description:"Collects details about issues associated with a SonarQube project linked to an entity.",disabled:o}),e.createElement(i,null),e.createElement(a,{name:"measures",label:"Measures",description:"Collects details about measures associated with a SonarQube project linked to an entity.",disabled:o,FactDetailsComponent:P,multipleCollectors:{enable:!0,defaultConfig:H()}})))),e.createElement("div",{className:s.section},e.createElement(k,{onCancel:u,saveButtonText:"Save",isLoading:!1,onSave:l(m),disableSave:c})))};export{x as SonarQubeConfigurator};
|
|
2
2
|
//# sourceMappingURL=SonarQubeConfigurator.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as y,Chip as M}from"@material-ui/core";import D from"@material-ui/icons/DragIndicator";import r,{useState as E}from"react";import{useDrop as S}from"react-dnd";import{useContextMenu as B}from"../../hooks/useContextMenu.esm.js";import{ContextMenu as N}from"../ContextMenu/ContextMenu.esm.js";import{useChipStyles as O}from"../DraggableChip/chipStyles.esm.js";const z=y(e=>({input:{border:`1px solid ${e.palette.divider}`,borderRadius:4,padding:e.spacing(1),minHeight:80},hoverBackground:{background:e.palette.action.hover},normalBackground:{background:e.palette.background.default},error:{border:"1px solid red"},chipContainer:{display:"flex",flexDirection:"column",fontSize:e.typography.body1.fontSize,color:e.palette.text.primary,gap:e.spacing(.75)}})),I=({chips:e,onDelete:a,onDrop:i,error:c=!1,placeholder:m="",disabled:s})=>{const o=z(),d=O(),[{isOver:u},
|
|
1
|
+
import{makeStyles as y,Chip as M}from"@material-ui/core";import D from"@material-ui/icons/DragIndicator";import r,{useState as E}from"react";import{useDrop as S}from"react-dnd";import{useContextMenu as B}from"../../hooks/useContextMenu.esm.js";import{ContextMenu as N}from"../ContextMenu/ContextMenu.esm.js";import{useChipStyles as O}from"../DraggableChip/chipStyles.esm.js";const z=y(e=>({input:{border:`1px solid ${e.palette.divider}`,borderRadius:4,padding:e.spacing(1),minHeight:80},hoverBackground:{background:e.palette.action.hover},normalBackground:{background:e.palette.background.default},error:{border:"1px solid red"},chipContainer:{display:"flex",flexDirection:"column",fontSize:e.typography.body1.fontSize,color:e.palette.text.primary,gap:e.spacing(.75)}})),I=({chips:e,onDelete:a,onDrop:i,error:c=!1,placeholder:m="",disabled:s})=>{const o=z(),d=O(),[{isOver:u},h]=S(()=>({accept:"chip",drop:t=>{i(t)},collect:t=>({isOver:t.isOver()})}),[i]),g=["Remove check"],{contextMenu:l,onContextMenu:x,onContextMenuClose:C,onContextMenuClick:f}=B(),[p,b]=E(null),k=(t,n)=>{x(t),b(n)},v=()=>{f(),p&&a(p)};return r.createElement("div",{ref:h,className:`${o.input} ${c?o.error:""} ${u?o.hoverBackground:o.normalBackground}`,"data-testid":"droppable-input"},r.createElement("div",{className:o.chipContainer},e?.length?e.map(t=>r.createElement(M,{key:t.id,label:t.name,className:d.chip,icon:r.createElement(D,null),style:{cursor:"pointer"},onDelete:()=>a(t),disabled:s,onContextMenu:n=>k(n,t)})):m),r.createElement(N,{x:l.mouseX,y:l.mouseY,menuItems:g,onClose:C,onClick:v}))};export{I as DroppableInput};
|
|
2
2
|
//# sourceMappingURL=DroppableInput.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{RELATION_PART_OF as s,RELATION_OWNED_BY as p}from"@backstage/catalog-model";import{EntityRefLink as f,EntityRefLinks as u,getEntityRelations as y,humanizeEntityRef as g}from"@backstage/plugin-catalog-react";import{Chip as E}from"@material-ui/core";import a from"react";const o=t=>{const{title:i,relation:c,defaultKind:r,filter:d}=t,m=e=>y(e,c,d),n=e=>m(e).map(l=>g(l,{defaultKind:r})).join(", ");return{title:i,customFilterAndSearch(e,l){return n(l).includes(e)},customSort(e,l){return n(e).localeCompare(n(l))},render:e=>a.createElement(u,{entityRefs:m(e),defaultKind:r,target:"_blank"})}},R=()=>({title:"Name",highlight:!0,render:t=>a.createElement(f,{entityRef:t,title:t.metadata?.title,target:"_blank",rel:"noreferrer"})}),C=()=>o({title:"System",relation:s,defaultKind:"system",filter:{kind:"system"}}),T=()=>o({title:"Owner",relation:p,defaultKind:"group"}),x=()=>({title:"Lifecycle",field:"spec.lifecycle"}),S=()=>({title:"Type",field:"spec.type"}),h=()=>({title:"Tags",field:"metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:t=>a.createElement(a.Fragment,null,t.metadata.tags&&t.metadata.tags.map(i=>a.createElement(E,{key:i,label:i,size:"small",variant:"outlined",style:{marginTop:"4px",marginBottom:"4px"}})))});export{R as createEntityRefColumn,T as createOwnerColumn,x as createSpecLifecycleColumn,S as createSpecTypeColumn,C as createSystemColumn,h as createTagsColumn};
|
|
2
|
+
//# sourceMappingURL=EntityTableColumns.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Table as f}from"@backstage/core-components";import{
|
|
1
|
+
import{Table as f}from"@backstage/core-components";import{useEntityList as T,EntityTypeFilter as w,EntityOwnerFilter as E,EntityLifecycleFilter as h}from"@backstage/plugin-catalog-react";import{makeStyles as b,useTheme as S}from"@material-ui/core";import l,{useEffect as v,useMemo as C}from"react";import{EntityKindsFilter as F}from"./EntityKindsFilter.esm.js";import{EntitySystemsFilter as L}from"./EntitySystemsFilter.esm.js";import{createEntityRefColumn as x,createSystemColumn as N,createOwnerColumn as z,createSpecTypeColumn as M,createSpecLifecycleColumn as O,createTagsColumn as R}from"./EntityTableColumns.esm.js";import{CatalogTableToolbar as A}from"./EntityTableToolbar.esm.js";import{EntityTagFilter as D}from"./EntityTagFilter.esm.js";const I=b(()=>({entityTable:{'& span[class*="CatalogReactEntityDisplayName-root"]':{"&:hover":{textDecoration:"underline"}}}})),a=[x(),N(),z(),M(),O(),R()],K=e=>({kinds:e.selectedKinds.length?new F(e.selectedKinds):void 0,systems:e.selectedSystems.length?new L(e.selectedSystems):void 0,type:e.selectedTypes.length?new w(e.selectedTypes):void 0,owners:e.selectedOwners.length?new E(e.selectedOwners):void 0,lifecycles:e.selectedLifecycles.length?new h(e.selectedLifecycles):void 0,tag:e.selectedTags.length?new D(e.selectedTags):void 0}),P=({filter:e,additionalColumns:n=[],title:r,hideTags:i=!1})=>{const{updateFilters:s,entities:c,pageInfo:t,totalItems:m,loading:p}=T(),d=S(),y=I();v(()=>{const o=K(e);s(o)},[e,s]);const g=C(()=>i?[...a.slice(0,-1),...n]:[...a,...n],[n,i]),u=r||`All (${m||0})`;return l.createElement(l.Fragment,null,l.createElement("div",{className:y.entityTable},l.createElement(f,{title:u,columns:g,data:c,options:{padding:"dense",paging:!!t?.next||!!t?.prev,toolbar:!0,draggable:!1,tableLayout:"fixed",search:!1,showTitle:!0,rowStyle:{fontSize:d.typography.body1.fontSize},showFirstLastPageButtons:!1,emptyRowsWhenPaging:!1,pageSizeOptions:[],loadingType:"linear",showEmptyDataSourceMessage:!p,pageSize:10},onPageChange:o=>{o>0?t?.next?.():t?.prev?.()},components:{Toolbar:A},page:t?.prev?1:0,totalCount:t?.next?Number.MAX_VALUE:Number.MIN_SAFE_INTEGER,localization:{pagination:{labelDisplayedRows:""}}})))};export{P as FilterPreviewTable};
|
|
2
2
|
//# sourceMappingURL=FilterPreviewTable.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{TextField as n}from"@material-ui/core";import l from"react";import{Controller as i}from"react-hook-form";const p=({control:o,disabled:t,className:a,helperTextClassName:m,name:s,placeholder:d})=>l.createElement(i,{name:s,control:o,render:({field:e,fieldState:r})=>l.createElement(n,{...e,value:e.value??"",type:"text",variant:"outlined",margin:"dense",placeholder:d,className:a,disabled:t,error:!!r.error,helperText:r.error?.message,FormHelperTextProps:{className:m}})});export{p as FormControlledTextField};
|
|
2
|
+
//# sourceMappingURL=FormControlledTextField.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{parseEntityRef as
|
|
1
|
+
import{parseEntityRef as n}from"@backstage/catalog-model";import{humanizeEntityRef as r}from"@backstage/plugin-catalog-react";import{BadgeVariant as c}from"../../graphql/generated/index.esm.js";const a=8,d=16,f={trackTitle:70,levelTitle:30,check:42,entityRefFooter:100,paginationControl:50},l={trackTitle:350+d*2,checkResult:42},g=e=>e*l.checkResult+l.trackTitle,h=e=>e.filter(t=>t!==void 0).map(t=>{const i=n(t);return r(i,{defaultKind:i.kind})}).reduce((t,i)=>t.length>i.length?t:i,""),s=e=>a*e+a,o="NoLevel",m=e=>({name:o,badge:{options:{level:0,color:""},variant:c.Medal},entityRef:e,ordinal:0});export{l as CellWidths,o as NO_LEVEL_BADGE_NAME,f as RowHeights,s as calculateHeightForRefTitle,g as calculateTableWidth,h as findLongestRefTitle,m as generateNoLevelBadge};
|
|
2
2
|
//# sourceMappingURL=resultsTableUtils.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EntityRefLink as I}from"@backstage/plugin-catalog-react";import{makeStyles as f,List as h,Typography as m,ListItem as i,Tooltip as l,ListItemIcon as o,ListItemText as s}from"@material-ui/core";import y from"@material-ui/icons/Group";import N from"@material-ui/icons/TrendingDown";import
|
|
1
|
+
import{EntityRefLink as I}from"@backstage/plugin-catalog-react";import{makeStyles as f,List as h,Typography as m,ListItem as i,Tooltip as l,ListItemIcon as o,ListItemText as s}from"@material-ui/core";import y from"@material-ui/icons/Group";import N from"@material-ui/icons/TrendingDown";import g from"@material-ui/icons/TrendingFlat";import L from"@material-ui/icons/TrendingUp";import e from"react";import{Trend as n}from"./types.esm.js";const T=f(a=>({cardSection:{marginBottom:a.spacing(2)},listItem:{padding:0},listItemText:{margin:0},listItemIcon:{marginRight:a.spacing(1),minWidth:0},ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}}}})),x=({ownerEntityRef:a,passRates:c})=>{const t=T();return e.createElement(h,{dense:!0,disablePadding:!0,className:t.cardSection},e.createElement(m,{variant:"overline",color:"textSecondary"},"Details"),a&&e.createElement(i,{disableGutters:!0,className:t.listItem},e.createElement(l,{title:"Owner"},e.createElement(o,{className:t.listItemIcon},e.createElement(y,{color:"inherit",fontSize:"small"}))),e.createElement(s,{className:t.listItemText,primary:e.createElement(I,{className:t.ownerLink,entityRef:a??"No Owner",hideIcon:!0})})),c.map(({name:p,value:d,trend:r},E)=>e.createElement(i,{disableGutters:!0,className:t.listItem,key:E},e.createElement(l,{title:"The most recent pass rate."},e.createElement(o,{className:t.listItemIcon},r===n.UP&&e.createElement(L,{color:"inherit",fontSize:"small"}),r===n.DOWN&&e.createElement(N,{color:"inherit",fontSize:"small"}),r===n.FLAT&&e.createElement(g,{color:"inherit",fontSize:"small"}))),e.createElement(s,{className:t.listItemText,primary:e.createElement(m,{variant:"body2",color:"textPrimary"},p??"Latest Pass Rate",": ",e.createElement("b",null,Math.round(d),"%"))}))))};export{x as PassRateMetadata};
|
|
2
2
|
//# sourceMappingURL=PassRateMetadata.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Page as F,TabbedLayout as l}from"@backstage/core-components";import{useApi as s,featureFlagsApiRef as S,configApiRef as L}from"@backstage/core-plugin-api";import{usePermission as m}from"@backstage/plugin-permission-react";import{makeStyles as D,Box as i}from"@material-ui/core";import{SpotifyLicenseBanner as H}from"@spotify/backstage-plugin-core";import{soundcheckCampaignCreatePermission as N,soundcheckCollectorReadPermission as O,soundcheckCheckCreatePermission as B,soundcheckTrackCreatePermission as G}from"@spotify/backstage-plugin-soundcheck-common";import e from"react";import{Routes as Q,Route as t}from"react-router-dom";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import{UserProvider as $}from"../../contexts/UserProvider.esm.js";import q from"../../hooks/useConfirmationModal.esm.js";import{AlertProvider as M}from"../../hooks/useSoundcheckAlert.esm.js";import{
|
|
1
|
+
import{Page as F,TabbedLayout as l}from"@backstage/core-components";import{useApi as s,featureFlagsApiRef as S,configApiRef as L}from"@backstage/core-plugin-api";import{usePermission as m}from"@backstage/plugin-permission-react";import{makeStyles as D,Box as i}from"@material-ui/core";import{SpotifyLicenseBanner as H}from"@spotify/backstage-plugin-core";import{soundcheckCampaignCreatePermission as N,soundcheckCollectorReadPermission as O,soundcheckCheckCreatePermission as B,soundcheckTrackCreatePermission as G}from"@spotify/backstage-plugin-soundcheck-common";import e from"react";import{Routes as Q,Route as t}from"react-router-dom";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import{UserProvider as $}from"../../contexts/UserProvider.esm.js";import q from"../../hooks/useConfirmationModal.esm.js";import{AlertProvider as M}from"../../hooks/useSoundcheckAlert.esm.js";import{CampaignInsightsPage as U}from"../CampaignInsightsPage/CampaignInsightsPage.esm.js";import{CampaignsPage as V}from"../CampaignsPage/CampaignsPage.esm.js";import{CampaignCreatePage as W}from"../CampaignCreatePage/CampaignCreatePage.esm.js";import{EditCampaignView as j}from"../CampaignsPage/EditCampaignView.esm.js";import{CheckCreatePage as z}from"../CheckCreatePage/CheckCreatePage.esm.js";import{CheckPage as J}from"../CheckPage/CheckPage.esm.js";import{CheckInsightsPage as p}from"../CheckPage/CheckInsightsPage.esm.js";import{ChecksTab as K}from"../ChecksTab/ChecksTab.esm.js";import{CheckTemplatesPage as X}from"../CheckTemplatesPage/CheckTemplatesPage.esm.js";import{CollectorPage as Y}from"../CollectorPage/CollectorPage.esm.js";import{CollectorsPage as Z}from"../CollectorsPage/CollectorsPage.esm.js";import{OverviewPageContent as _}from"../OverviewPage/OverviewPageContent.esm.js";import{QuickstartPage as ee}from"../QuickstartPage/QuickstartPage.esm.js";import{SoundcheckHeader as te}from"../SoundcheckHeader/SoundcheckHeader.esm.js";import{SoundcheckHeaderProvider as ae}from"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{SoundcheckQueryClientProvider as ne}from"../SoundcheckQueryClientProvider/SoundcheckQueryClientProvider.esm.js";import{TechHealth as le}from"../TechHealth/TechHealth.esm.js";import{TrackCreatePage as re}from"../TrackCreatePage/TrackCreatePage.esm.js";import{TrackEditPage as ce}from"../TrackEditPage/TrackEditPage.esm.js";import{TrackPage as me}from"../TrackPage/TrackPage.esm.js";import{TracksTab as ie}from"../TracksTab/TracksTab.esm.js";const oe=D(r=>({tabContent:{margin:0,padding:0},root:{"& > *":{display:"flex",flexDirection:"column",flexGrow:1}},pageContent:{display:"flex",flexDirection:"row",flexGrow:1},pageLayout:{display:"flex",flexDirection:"column",flex:"1 1 0%",maxWidth:"100%","& > article":{display:"flex",flexDirection:"column",flex:"1 1 auto",padding:`${r.spacing(3)}px !important`}}})),se=({title:r="Soundcheck"})=>{const c=oe(),a=s(S),d=s(L).getOptionalStringArray("soundcheck.flags"),h=(!a.getRegisteredFlags().find(n=>n.name==="soundcheck-enable-tech-health")||a.isActive("soundcheck-enable-tech-health"))&&!d?.includes("soundcheck-disable-tech-health"),u=!a.getRegisteredFlags().find(n=>n.name==="soundcheck-enable-collectors")||a.isActive("soundcheck-enable-collectors"),o=!a.getRegisteredFlags().find(n=>n.name==="soundcheck-enable-campaigns")||a.isActive("soundcheck-enable-campaigns"),{loading:g,allowed:k}=m({permission:N}),f=!g&&k,{loading:E,allowed:C}=m({permission:O}),{loading:b,allowed:P}=m({permission:B}),v=!a.getRegisteredFlags().find(n=>n.name==="soundcheck-enable-check-creation")||a.isActive("soundcheck-enable-check-creation"),x=!b&&P&&v,{loading:R,allowed:w}=m({permission:G}),T=!a.getRegisteredFlags().find(n=>n.name==="soundcheck-enable-track-creation")||a.isActive("soundcheck-enable-track-creation"),I=!R&&w&&T,y=u&&!E&&C,A=h;return e.createElement(M,null,e.createElement($,null,e.createElement(ne,null,e.createElement(ae,{defaultTitle:r},e.createElement(q,null,e.createElement(i,{className:c.root},e.createElement(F,{themeId:"website"},e.createElement(H,{backend:"soundcheck",invalidLicenseMessage:"Submitted facts and check results will still be stored, but it will not be possible to view certifications or individual results until a valid license is present."}),e.createElement(te,{documentTitle:r}),e.createElement(i,{className:c.pageContent},e.createElement(i,{className:c.pageLayout},e.createElement(Q,null,o&&e.createElement(e.Fragment,null,e.createElement(t,{path:"/campaigns/:campaignId/edit",element:e.createElement(j,null)}),e.createElement(t,{path:"/campaigns/:campaignId",element:e.createElement(U,null)}),f&&e.createElement(t,{path:"/campaigns/create",element:e.createElement(W,null)})),e.createElement(t,{path:"/quickstart",element:e.createElement(ee,null)}),e.createElement(t,{path:"/tracks/:trackId/edit",element:e.createElement(ce,null)}),I&&e.createElement(t,{path:"/tracks/create",element:e.createElement(re,null)}),e.createElement(t,{path:"/tracks/:trackId",element:e.createElement(me,null)}),e.createElement(t,{path:"/tracks/:trackId/checks/:checkId",element:e.createElement(p,null)}),e.createElement(t,{path:"/checks/:checkId",element:e.createElement(p,null)}),e.createElement(t,{path:"/checks/:checkId/edit",element:e.createElement(J,null)}),x&&e.createElement(e.Fragment,null,e.createElement(t,{path:"/checks/create",element:e.createElement(z,null)}),e.createElement(t,{path:"/checks/templates",element:e.createElement(X,null)})),e.createElement(t,{path:"/integrations/:integrationId",element:e.createElement(Y,null)}),e.createElement(t,{path:"/*",element:e.createElement(l,null,e.createElement(l.Route,{title:"Overview",path:"/"},e.createElement("div",{className:c.tabContent},e.createElement(_,{campaignsEnabled:!0}))),A&&e.createElement(l.Route,{title:"Tech Health",path:"/tech-health"},e.createElement(le,null)),e.createElement(l.Route,{title:"Checks",path:"/checks"},e.createElement(K,null)),e.createElement(l.Route,{title:"Tracks",path:"/tracks"},e.createElement(ie,null)),o&&e.createElement(l.Route,{title:"Campaigns",path:"/campaigns"},e.createElement(V,null)),y&&e.createElement(l.Route,{title:"Integrations",path:"/integrations"},e.createElement(Z,null)))}))," ")))))))))};export{se as RoutingPage};
|
|
2
2
|
//# sourceMappingURL=RoutingPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{parseEntityRef as T}from"@backstage/catalog-model";import C from"lodash";import{useState as
|
|
1
|
+
import{parseEntityRef as T}from"@backstage/catalog-model";import C from"lodash";import{useState as $,useMemo as l,useEffect as A}from"react";import"../../../contexts/TrackFormContext.esm.js";import"../../../contexts/CheckFormContext.esm.js";import"../../../contexts/CampaignFormContext.esm.js";import{useLoggedInUser as S}from"../../../contexts/UserProvider.esm.js";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../../api.esm.js";import"../../../hooks/graphqlKeys.esm.js";import{useAllGroups as x}from"../../../hooks/groups/useAllGroups.esm.js";import"@backstage/plugin-catalog-react";import{useGetChecks as U}from"../../../hooks/checks/useGetChecks.esm.js";import"../../../hooks/useSoundcheckAlert.esm.js";import{useGetAllTracks as q}from"../../../hooks/tracks/useGetAllTracks.esm.js";import"../../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{useGetEntityFacets as f}from"../../../hooks/catalog/useGetEntityFacets.esm.js";import{useEntityRefsForUser as B}from"../../../hooks/entities/useEntityRefsForUser.esm.js";import{Facet as s}from"./types.esm.js";const I=(i,o)=>{const a=[];for(const r of i)a.push({label:r.name??r.id,value:r.id});const e=i.map(r=>r.id);for(const r of o)for(const m of r.levels??[])for(const n of m.checks??[])e.includes(n.id)||(e.push(n.id),a.push({label:n.name??n.id,value:n.id}));return a},K=i=>{const o=[];for(const a of i??[])for(const e of a.levels??[])o.includes(e.ordinal)||o.push(e.ordinal);return o.sort().map(a=>({label:`Level ${a}`,value:`${a}`}))},M=(i,o)=>{const a=new Set(i.filter(e=>e.ownerEntityRef).map(e=>e.ownerEntityRef));return Array.from(a).map(e=>({label:o[e]??e,value:e}))},d=i=>(i??[]).map(o=>({label:o,value:o})),V=()=>{const[i,o]=$(!1),{userEntityRef:a}=S(),{data:e,isLoading:r}=B(a),{data:m,isLoading:n}=x(),u=l(()=>C.mapValues(C.keyBy(m??[],"ref"),t=>t.name),[m]),{data:y,isLoading:g}=q({first:100}),p=l(()=>y?.edges.map(t=>t.node)??[],[y]),{data:L,isLoading:v}=U({first:100}),c=l(()=>L?.edges.map(t=>t.node)??[],[L]),{data:E,isLoading:b}=f("kind"),{data:h,isLoading:k}=f("spec.lifecycle"),{data:R,isLoading:w}=f("spec.type"),{data:F,isLoading:O}=f("spec.system"),G=l(()=>({[s.Kind]:d(E),[s.Lifecycle]:d(h),[s.Type]:d(R),[s.System]:d(F),[s.Entity]:e.map(t=>({label:T(t).name,value:t})),[s.EntityOwner]:m?.map(t=>({label:t.name,value:t.ref}))??[],[s.Track]:p.map(t=>({label:t.name,value:t.id})),[s.Level]:K(p),[s.Check]:I(c,p),[s.CheckOwner]:M(c,u)}),[E,h,R,e,m,u,p,c,F]);return A(()=>{o(b||k||w||r||n||g||v||O)},[b,k,w,r,n,g,v,O]),{facetOptions:G,isLoading:i}};export{V as useFacetOptions};
|
|
2
2
|
//# sourceMappingURL=useFacetOptions.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{parseEntityRef as B}from"@backstage/catalog-model";import{EntityDisplayName as C}from"@backstage/plugin-catalog-react";import{makeStyles as D,Typography as G,Checkbox as N}from"@material-ui/core";import
|
|
1
|
+
import{parseEntityRef as B}from"@backstage/catalog-model";import{EntityDisplayName as C}from"@backstage/plugin-catalog-react";import{makeStyles as D,Typography as G,Checkbox as N}from"@material-ui/core";import Q from"@material-ui/icons/Category";import $ from"@material-ui/icons/Class";import z from"@material-ui/icons/Group";import M from"@material-ui/icons/Loop";import{toEntityFilterQuery as P}from"@spotify/backstage-plugin-soundcheck-common";import e,{useMemo as f}from"react";import{useGetEntityFacets as n}from"../../../hooks/catalog/useGetEntityFacets.esm.js";import{useGroupOptions as W}from"../../../hooks/groups/useGroupOptions.esm.js";import l from"../../MultiSelectFilter/MultiSelectFilter.esm.js";const j=D(t=>({root:{display:"flex",flexDirection:"row",alignItems:"center",gap:t.spacing(2)}})),y=(t,{selected:r})=>e.createElement(e.Fragment,null,e.createElement(N,{value:t,checked:r,color:"primary"}),e.createElement(C,{entityRef:t,hideIcon:!0})),q=({track:t,label:r,owners:d,setOwners:E,lifecycles:u,setLifecycles:g,types:b,setTypes:h,systems:F,setSystems:L})=>{const w=j(),o=P(t.filter),{options:s,isLoading:k}=W(),O=f(()=>s.map(i=>i.ref),[s]),{data:a,isLoading:x}=n("spec.lifecycle",o),{data:m,isLoading:v}=n("spec.type",o),{data:c,isLoading:R}=n("relations.partOf",o),p=f(()=>c?.filter(i=>{try{return B(i).kind.toLowerCase()==="system"}catch{return!1}}),[c]),S=(a||[]).length<=1,T=(m||[]).length<=1,I=(p||[]).length<=1;return e.createElement("div",{className:w.root},r&&e.createElement(G,{variant:"caption"},`${r}:`),e.createElement(l,{name:"system",label:"System",icon:e.createElement(Q,null),filters:F,setFilters:L,options:p??[],disabled:R||I,customRenderOption:y}),e.createElement(l,{name:"owner",label:"Owner",icon:e.createElement(z,null),filters:d,setFilters:E,options:O??[],disabled:k,customRenderOption:y}),e.createElement(l,{name:"type",label:"Type",icon:e.createElement($,null),filters:b,setFilters:h,options:m??[],disabled:v||T}),e.createElement(l,{name:"lifecycle",label:"Lifecycle",icon:e.createElement(M,null),filters:u,setFilters:g,options:a??[],disabled:x||S}))};export{q as FilterBar};
|
|
2
2
|
//# sourceMappingURL=FilterBar.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{stringifyEntityRef as
|
|
1
|
+
import{stringifyEntityRef as B}from"@backstage/catalog-model";import{Table as R}from"@backstage/core-components";import{makeStyles as L}from"@material-ui/core";import z from"lodash";import u,{useState as P,useEffect as O,useCallback as y}from"react";import{TrackEntityField as r,Direction as C}from"../../../graphql/generated/index.esm.js";import{useEntitiesByRefs as x}from"../../../hooks/catalog/useEntitiesByRefs.esm.js";import{useTrackEntities as D}from"../../../hooks/entities/useTrackEntities.esm.js";import{columnFactories as n}from"./columns.esm.js";import{toTrackEntityRow as F}from"./utils.esm.js";const N=[n.createBadgeColumn(),n.createNameColumn(),n.createStatusColumn(),n.createSystemColumn(),n.createOwnerColumn(),n.createSpecTypeColumn(),n.createSpecLifecycleColumn()],q=[r.CertificationLevel,r.Name,r.CheckPassRate,r.System,r.Owner,r.Type,r.Lifecycle],w=g=>{const{lifecycles:p,owners:a,types:i,systems:s}=g,f=p?.length?{"spec.lifecycle":p}:void 0,m=a?.length?{"relations.ownedBy":a}:void 0,e=i?.length?{"spec.type":i}:void 0,d=s?.length?{"relations.partOf":s}:void 0;return{...f,...m,...e,...d}},A=L({tableContainer:{display:"flex",flexDirection:"column",height:"100%"}}),W=({track:g,initialPageSize:p,lifecycles:a,owners:i,types:s,systems:f})=>{const m=A(),[e,d]=P({orderBy:void 0,filter:w({lifecycles:a,owners:i,types:s,systems:f}),pageInfo:{page:0,pageSize:p??10,direction:"forward",cursor:null}});O(()=>{d(t=>({...t,pageInfo:{...t.pageInfo,page:0,cursor:null},filter:w({lifecycles:a,owners:i,types:s,systems:f})}))},[a,i,s,f]);const{data:c,isLoading:k}=D({trackId:g.id,orderBy:e.orderBy,filter:e.filter,[e.pageInfo.direction==="forward"?"first":"last"]:e.pageInfo.pageSize,[e.pageInfo.direction==="forward"?"after":"before"]:e.pageInfo.cursor}),I=y((t,l)=>{let o;t===-1?o=void 0:o={field:q[t],direction:l==="asc"?C.Asc:C.Desc},d({...e,orderBy:o,pageInfo:{...e.pageInfo,page:0,cursor:null}})},[e]),h=y((t,l)=>{const o=t>e.pageInfo.page?"forward":"backward",v=o==="forward"?c?.trackEntities.pageInfo.endCursor??null:c?.trackEntities.pageInfo.startCursor??null;d({...e,pageInfo:{page:t,pageSize:l,direction:o,cursor:v}})},[c,e]),E=c?.trackEntities.edges.map(t=>t.node.entityRef)??[],{data:S,isLoading:T}=x({entityRefs:E}),b=z.compact(c?.trackEntities.edges.map(t=>{const l=S?.items.find(o=>!!o&&B(o)===t.node.entityRef);return l?F({trackDetails:t.node,track:g,entity:l}):void 0}))??[];return u.createElement("div",{className:m.tableContainer},u.createElement(R,{columns:N,data:b,options:{paging:!0,showFirstLastPageButtons:!1,paginationPosition:"both",emptyRowsWhenPaging:!1,pageSizeOptions:[10,25,50],pageSize:p??25,search:!1,showTitle:!1,padding:"dense"},onOrderChange:I,onPageChange:h,page:e.pageInfo.page,totalCount:c?.trackEntities.totalCount??0,isLoading:k||T,components:{Toolbar:()=>null}}))};export{W as TrackEntitiesTable};
|
|
2
2
|
//# sourceMappingURL=TrackEntitiesTable.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as l,Paper as m,Box as r,Typography as d}from"@material-ui/core";import t from"react";import{TrackHistoryChart as p}from"./TrackHistoryChart.esm.js";import{TrackLevelsChart as f}from"./TrackLevelsChart.esm.js";const g=l(e=>({card:{display:"flex",flexDirection:"column",border:`1px solid ${e.palette.divider}`},title:{fontWeight:"bold",fontSize:"1.1rem",lineHeight:`${e.typography.h5.fontSize}px`,cursor:"default"},header:{display:"flex",padding:e.spacing(1,1),borderBottom:`1px solid ${e.palette.divider}`,flexDirection:"column",gap:e.spacing(.5)},content:{padding:e.spacing(1,1,0),display:"flex",margin:e.spacing(1),gap:e.spacing(1)},leftSection:{width:"225px",minWidth:"225px"},summaryCard:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between"},chartSection:{flex:1,width:"100%",minWidth:"150px"}})),h=({track:e,status:c,history:s,isLoading:i,isError:n,title:o})=>{const a=g();return t.createElement(m,{className:a.card},t.createElement(r,{className:a.header},!i&&e&&t.createElement(d,{className:a.title},o??"Track Progress")),t.createElement(r,{className:a.content},t.createElement(r,{className:a.leftSection},t.createElement(r,{className:a.summaryCard},t.createElement(f,{data:c,isLoading:i}))),t.createElement(r,{className:a.chartSection},t.createElement(p,{track:e,data:s,isError:n}))))};export{h as TrackProgressCard};
|
|
2
2
|
//# sourceMappingURL=TrackProgressCard.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as m}from"@backstage/core-plugin-api";import{useQueryClient as c,useMutation as u}from"@tanstack/react-query";import{soundcheckApiRef as p}from"../../api.esm.js";import{MutationKeys as g,QueryKeys as o}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as h}from"../useSoundcheckAlert.esm.js";const l="Error Archiving Campaign";function y(){const t=m(p),i=c(),{showAlert:n}=h(),s=async e=>{const r=await t.archiveCampaign(e);if(!r)throw new Error(`Failed to archive campaign ${e}`);return r};return u([g.ArchiveCampaign],s,{onSuccess:()=>
|
|
1
|
+
import{useApi as m}from"@backstage/core-plugin-api";import{useQueryClient as c,useMutation as u}from"@tanstack/react-query";import{soundcheckApiRef as p}from"../../api.esm.js";import{MutationKeys as g,QueryKeys as o}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as h}from"../useSoundcheckAlert.esm.js";const l="Error Archiving Campaign";function y(){const t=m(p),i=c(),{showAlert:n}=h(),s=async e=>{const r=await t.archiveCampaign(e);if(!r)throw new Error(`Failed to archive campaign ${e}`);return r};return u([g.ArchiveCampaign],s,{onSuccess:()=>Promise.all([i.invalidateQueries({queryKey:[o.GetCampaigns]}),i.invalidateQueries({queryKey:[o.GetCampaignOwners]})]),onError:(e,r)=>{let a=`Failed to archive campaign ${r}`;e instanceof Error&&(a=e.message),n({severity:"error",title:l,message:a})}})}export{y as useArchiveCampaign};
|
|
2
2
|
//# sourceMappingURL=useArchiveCampaign.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as m}from"@backstage/core-plugin-api";import{useQueryClient as u,useMutation as c}from"@tanstack/react-query";import{soundcheckApiRef as p}from"../../api.esm.js";import{MutationKeys as l,QueryKeys as a}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as g}from"../useSoundcheckAlert.esm.js";const y="Error Creating Campaign",i="Failed to create campaign.";function C(){const o=m(p),t=u(),{showAlert:n}=g(),s=async r=>{const e=await o.createCampaign(r);if(!e)throw new Error(i);return e};return c([l.CreateCampaign],s,{onSuccess:()=>
|
|
1
|
+
import{useApi as m}from"@backstage/core-plugin-api";import{useQueryClient as u,useMutation as c}from"@tanstack/react-query";import{soundcheckApiRef as p}from"../../api.esm.js";import{MutationKeys as l,QueryKeys as a}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as g}from"../useSoundcheckAlert.esm.js";const y="Error Creating Campaign",i="Failed to create campaign.";function C(){const o=m(p),t=u(),{showAlert:n}=g(),s=async r=>{const e=await o.createCampaign(r);if(!e)throw new Error(i);return e};return c([l.CreateCampaign],s,{onSuccess:()=>Promise.all([t.invalidateQueries({queryKey:[a.GetCampaigns]}),t.invalidateQueries({queryKey:[a.GetCampaignOwners]})]),onError:r=>{let e=i;r instanceof Error&&(e=r.message),n({severity:"error",title:y,message:e})}})}export{C as useCreateCampaign};
|
|
2
2
|
//# sourceMappingURL=useCreateCampaign.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as m}from"@backstage/core-plugin-api";import{useQueryClient as u,useMutation as l}from"@tanstack/react-query";import{soundcheckApiRef as p}from"../../api.esm.js";import{MutationKeys as c,QueryKeys as o}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as g}from"../useSoundcheckAlert.esm.js";const y="Error Deleting Campaign";function d(){const a=m(p),t=u(),{showAlert:n}=g(),s=async e=>{const r=await a.deleteCampaign(e);if(!r)throw new Error(`Failed to delete campaign ${e}`);return r};return l([c.DeleteCampaign],s,{onSuccess:()=>
|
|
1
|
+
import{useApi as m}from"@backstage/core-plugin-api";import{useQueryClient as u,useMutation as l}from"@tanstack/react-query";import{soundcheckApiRef as p}from"../../api.esm.js";import{MutationKeys as c,QueryKeys as o}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as g}from"../useSoundcheckAlert.esm.js";const y="Error Deleting Campaign";function d(){const a=m(p),t=u(),{showAlert:n}=g(),s=async e=>{const r=await a.deleteCampaign(e);if(!r)throw new Error(`Failed to delete campaign ${e}`);return r};return l([c.DeleteCampaign],s,{onSuccess:()=>Promise.all([t.invalidateQueries({queryKey:[o.GetCampaigns]}),t.invalidateQueries({queryKey:[o.GetCampaignOwners]})]),onError:(e,r)=>{let i=`Failed to delete campaign ${r}`;e instanceof Error&&(i=e.message),n({severity:"error",title:y,message:i})}})}export{d as useDeleteCampaign};
|
|
2
2
|
//# sourceMappingURL=useDeleteCampaign.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as i}from"@backstage/core-plugin-api";import{useQuery as
|
|
1
|
+
import{useApi as i}from"@backstage/core-plugin-api";import{useQuery as n}from"@tanstack/react-query";import{soundcheckApiRef as m}from"../../api.esm.js";import{QueryKeys as s}from"../graphqlKeys.esm.js";function a(r,o=!0){const t=i(m),e={ids:[r]};return n([s.GetCampaigns,e],async()=>t.getCampaigns(e),{staleTime:5*60*1e3,refetchInterval:!1,refetchOnWindowFocus:!1,enabled:o})}export{a as useGetCampaign};
|
|
2
2
|
//# sourceMappingURL=useGetCampaign.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as a}from"@backstage/core-plugin-api";import{useQueryClient as n,useMutation as u}from"@tanstack/react-query";import{soundcheckApiRef as l}from"../../api.esm.js";import{MutationKeys as h,QueryKeys as o}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as m}from"../useSoundcheckAlert.esm.js";const y="Error Creating Check";function k(){const i=a(l),t=n(),{showAlert:s}=m(),c=async r=>{const e=await i.createCheck(r);if(!e)throw new Error("Failed to create check.");return e};return u([h.CreateCheck],c,{onSuccess:()=>
|
|
1
|
+
import{useApi as a}from"@backstage/core-plugin-api";import{useQueryClient as n,useMutation as u}from"@tanstack/react-query";import{soundcheckApiRef as l}from"../../api.esm.js";import{MutationKeys as h,QueryKeys as o}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as m}from"../useSoundcheckAlert.esm.js";const y="Error Creating Check";function k(){const i=a(l),t=n(),{showAlert:s}=m(),c=async r=>{const e=await i.createCheck(r);if(!e)throw new Error("Failed to create check.");return e};return u([h.CreateCheck],c,{onSuccess:()=>Promise.all([t.invalidateQueries({queryKey:[o.GetChecks]}),t.invalidateQueries({queryKey:[o.GetCheckOwners]}),t.invalidateQueries({queryKey:[o.ExecutableChecks]})]),onError:r=>{let e="Failed to create check.";r instanceof Error&&(e=r.message),s({severity:"error",title:y,message:e})}})}export{k as useCreateCheck};
|
|
2
2
|
//# sourceMappingURL=useCreateCheck.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as n}from"@backstage/core-plugin-api";import{useQueryClient as y,useMutation as l}from"@tanstack/react-query";import{useParams as m}from"react-router-dom";import{soundcheckApiRef as f}from"../../api.esm.js";import{MutationKeys as k,QueryKeys as t}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as d}from"../useSoundcheckAlert.esm.js";const h="Error Executing Check";function p(){const a=n(f),e=y(),{showAlert:o}=d(),c=async r=>await a.executeCheck(r),{trackId:
|
|
1
|
+
import{useApi as n}from"@backstage/core-plugin-api";import{useQueryClient as y,useMutation as l}from"@tanstack/react-query";import{useParams as m}from"react-router-dom";import{soundcheckApiRef as f}from"../../api.esm.js";import{MutationKeys as k,QueryKeys as t}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as d}from"../useSoundcheckAlert.esm.js";const h="Error Executing Check";function p(){const a=n(f),e=y(),{showAlert:o}=d(),c=async r=>await a.executeCheck(r),{trackId:u}=m();return l([k.ExecuteCheck],c,{onSuccess:(r,{checkerId:i,entityRef:s})=>Promise.all([e.invalidateQueries({queryKey:[t.CertificationDetails,s]}),e.invalidateQueries({queryKey:[t.CertificationStatus,s]}),e.invalidateQueries({queryKey:[t.Certifications,s]}),e.invalidateQueries({queryKey:[t.CheckDetails,s,u,i]}),e.invalidateQueries({queryKey:[t.CheckStatus,i,s]}),e.invalidateQueries({queryKey:[t.TrackEntities]})]),onError:r=>{let i="Failed to execute check.";r instanceof Error&&(i=r.message),o({severity:"error",title:h,message:i})}})}export{p as useExecuteCheck};
|
|
2
2
|
//# sourceMappingURL=useExecuteCheck.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as u}from"@backstage/core-plugin-api";import{useQueryClient as a,useMutation as n}from"@tanstack/react-query";import{soundcheckApiRef as h}from"../../api.esm.js";import{MutationKeys as l,QueryKeys as o}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as m}from"../useSoundcheckAlert.esm.js";const p="Error Creating Check";function d(){const i=u(h),t=a(),{showAlert:s}=m(),c=async r=>{const e=await i.updateCheck(r);if(!e)throw new Error("Failed to update check.");return e};return n([l.UpdateCheck],c,{onSuccess:()=>
|
|
1
|
+
import{useApi as u}from"@backstage/core-plugin-api";import{useQueryClient as a,useMutation as n}from"@tanstack/react-query";import{soundcheckApiRef as h}from"../../api.esm.js";import{MutationKeys as l,QueryKeys as o}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as m}from"../useSoundcheckAlert.esm.js";const p="Error Creating Check";function d(){const i=u(h),t=a(),{showAlert:s}=m(),c=async r=>{const e=await i.updateCheck(r);if(!e)throw new Error("Failed to update check.");return e};return n([l.UpdateCheck],c,{onSuccess:()=>Promise.all([t.invalidateQueries({queryKey:[o.GetChecks]}),t.invalidateQueries({queryKey:[o.GetCheckOwners]}),t.invalidateQueries({queryKey:[o.ExecutableChecks]})]),onError:r=>{let e="Failed to update check.";r instanceof Error&&(e=r.message),s({severity:"error",title:p,message:e})}})}export{d as useUpdateCheck};
|
|
2
2
|
//# sourceMappingURL=useUpdateCheck.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as s}from"@backstage/core-plugin-api";import{useQueryClient as u,useMutation as a}from"@tanstack/react-query";import{soundcheckApiRef as c}from"../../api.esm.js";import{MutationKeys as l,QueryKeys as f}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as g}from"../useSoundcheckAlert.esm.js";const p="Error Configuring Integration";function m(){const r=s(c),t=u(),{showAlert:i}=g(),n=async e=>{const o=await r.updateCollectorConfig(e);if(!o)throw new Error("Failed to update integration configuration.");return o};return a([l.UpdateCollectorConfig],n,{onSuccess:()=>
|
|
1
|
+
import{useApi as s}from"@backstage/core-plugin-api";import{useQueryClient as u,useMutation as a}from"@tanstack/react-query";import{soundcheckApiRef as c}from"../../api.esm.js";import{MutationKeys as l,QueryKeys as f}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as g}from"../useSoundcheckAlert.esm.js";const p="Error Configuring Integration";function m(){const r=s(c),t=u(),{showAlert:i}=g(),n=async e=>{const o=await r.updateCollectorConfig(e);if(!o)throw new Error("Failed to update integration configuration.");return o};return a([l.UpdateCollectorConfig],n,{onSuccess:()=>t.invalidateQueries({queryKey:[f.GetCollectors]}),onError:e=>{let o="Failed to update integration configuration.";e instanceof Error&&(o=e.message),i({severity:"error",title:p,message:o})}})}export{m as useUpdateCollectorConfig};
|
|
2
2
|
//# sourceMappingURL=useUpdateCollectorConfig.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as
|
|
1
|
+
import{useApi as i}from"@backstage/core-plugin-api";import{useQueryClient as c,useMutation as u}from"@tanstack/react-query";import{soundcheckApiRef as m}from"../../api.esm.js";import{MutationKeys as l,QueryKeys as t}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as k}from"../useSoundcheckAlert.esm.js";const d="Error Creating Track";function f(){const a=i(m),o=c(),{showAlert:s}=k(),n=async e=>{const r=await a.createProgram(e);if(!r)throw new Error("Failed to create track.");return r};return u([l.CreateProgram],n,{onSuccess:async()=>{const e=[t.GetAllPrograms,t.GetOverallTrackPassRateTrends,t.GetIndividualTrackPassRateTrends,t.GetTrackOwners];return Promise.all(e.map(r=>o.invalidateQueries({queryKey:[r]})))},onError:e=>{let r="Failed to create track.";e instanceof Error&&(r=e.message),s({severity:"error",title:d,message:r})}})}export{f as useCreateTrack};
|
|
2
2
|
//# sourceMappingURL=useCreateTrack.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useApi as
|
|
1
|
+
import{useApi as l}from"@backstage/core-plugin-api";import{useQueryClient as c,useMutation as u}from"@tanstack/react-query";import{soundcheckApiRef as m}from"../../api.esm.js";import{MutationKeys as d,QueryKeys as t}from"../graphqlKeys.esm.js";import{useSoundcheckAlert as f}from"../useSoundcheckAlert.esm.js";const k="Error Deleting Track";function p(){const s=l(m),a=c(),{showAlert:n}=f(),i=async e=>{const r=await s.deleteProgram(e);if(!r)throw new Error(`Failed to delete track ${e}`);return r};return u([d.DeleteProgram],i,{onSuccess:()=>{const e=[t.GetAllPrograms,t.GetOverallTrackPassRateTrends,t.GetIndividualTrackPassRateTrends,t.GetTrackOwners];return Promise.all(e.map(r=>a.invalidateQueries({queryKey:[r]})))},onError:(e,r)=>{let o=`Failed to delete track ${r}`;e instanceof Error&&(o=e.message),n({severity:"error",title:k,message:o})}})}export{p as useDeleteTrack};
|
|
2
2
|
//# sourceMappingURL=useDeleteTrack.esm.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotify/backstage-plugin-soundcheck",
|
|
3
3
|
"description": "Ensure quality, reliability and alignment of software development with codified checks and guidance.",
|
|
4
|
-
"version": "0.14.
|
|
4
|
+
"version": "0.14.3",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://backstage.spotify.com",
|
|
7
7
|
"main": "./dist/index.esm.js",
|
|
@@ -32,6 +32,16 @@
|
|
|
32
32
|
},
|
|
33
33
|
"./package.json": "./package.json"
|
|
34
34
|
},
|
|
35
|
+
"typesVersions": {
|
|
36
|
+
"*": {
|
|
37
|
+
"index": [
|
|
38
|
+
"dist/index.d.ts"
|
|
39
|
+
],
|
|
40
|
+
"alpha": [
|
|
41
|
+
"dist/alpha.d.ts"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
35
45
|
"scripts": {
|
|
36
46
|
"start": "backstage-cli package start",
|
|
37
47
|
"build": "backstage-cli package build --minify",
|
|
@@ -45,16 +55,16 @@
|
|
|
45
55
|
"prepare": "yarn generate"
|
|
46
56
|
},
|
|
47
57
|
"dependencies": {
|
|
48
|
-
"@backstage/catalog-client": "^1.
|
|
49
|
-
"@backstage/catalog-model": "^1.7.
|
|
50
|
-
"@backstage/core-compat-api": "^0.3.
|
|
51
|
-
"@backstage/core-components": "^0.
|
|
52
|
-
"@backstage/core-plugin-api": "^1.10.
|
|
53
|
-
"@backstage/frontend-plugin-api": "^0.9.
|
|
54
|
-
"@backstage/plugin-catalog-react": "^1.14.
|
|
55
|
-
"@backstage/plugin-permission-react": "^0.4.
|
|
56
|
-
"@backstage/plugin-scaffolder-react": "^1.
|
|
57
|
-
"@backstage/types": "^1.
|
|
58
|
+
"@backstage/catalog-client": "^1.8.0",
|
|
59
|
+
"@backstage/catalog-model": "^1.7.1",
|
|
60
|
+
"@backstage/core-compat-api": "^0.3.3",
|
|
61
|
+
"@backstage/core-components": "^0.16.1",
|
|
62
|
+
"@backstage/core-plugin-api": "^1.10.1",
|
|
63
|
+
"@backstage/frontend-plugin-api": "^0.9.2",
|
|
64
|
+
"@backstage/plugin-catalog-react": "^1.14.2",
|
|
65
|
+
"@backstage/plugin-permission-react": "^0.4.28",
|
|
66
|
+
"@backstage/plugin-scaffolder-react": "^1.14.1",
|
|
67
|
+
"@backstage/types": "^1.2.0",
|
|
58
68
|
"@date-io/luxon": "^1.0.0",
|
|
59
69
|
"@hookform/resolvers": "^3.3.2",
|
|
60
70
|
"@material-ui/core": "^4.12.2",
|
|
@@ -62,16 +72,17 @@
|
|
|
62
72
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
63
73
|
"@material-ui/pickers": "3.3.11",
|
|
64
74
|
"@mui/styles": "^5.14.7",
|
|
65
|
-
"@spotify/backstage-plugin-core": "^0.8.
|
|
66
|
-
"@spotify/backstage-plugin-soundcheck-common": "^0.14.
|
|
75
|
+
"@spotify/backstage-plugin-core": "^0.8.3",
|
|
76
|
+
"@spotify/backstage-plugin-soundcheck-common": "^0.14.3",
|
|
67
77
|
"@tanstack/react-query": "^4.6.1",
|
|
68
78
|
"@types/react-csv": "^1.1.6",
|
|
69
79
|
"@uiw/react-md-editor": "3.20.10",
|
|
70
80
|
"classnames": "^2.3.2",
|
|
71
81
|
"cron-validate": "^1.4.5",
|
|
72
82
|
"cronstrue": "^2.28.0",
|
|
83
|
+
"d3-scale-chromatic": "^3.0.0",
|
|
73
84
|
"framer-motion": "^6.0.0",
|
|
74
|
-
"git-url-parse": "^
|
|
85
|
+
"git-url-parse": "^16.0.0",
|
|
75
86
|
"graphql-request": "6.1.0",
|
|
76
87
|
"js-yaml": "^4.1.0",
|
|
77
88
|
"lodash": "^4.17.21",
|
|
@@ -87,7 +98,7 @@
|
|
|
87
98
|
"react-window": "^1.8.8",
|
|
88
99
|
"recharts": "^2.8.0",
|
|
89
100
|
"rehype-sanitize": "^6.0.0",
|
|
90
|
-
"uuid": "^
|
|
101
|
+
"uuid": "^11.0.0",
|
|
91
102
|
"zod": "^3.20.0"
|
|
92
103
|
},
|
|
93
104
|
"peerDependencies": {
|
|
@@ -96,27 +107,28 @@
|
|
|
96
107
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
97
108
|
},
|
|
98
109
|
"devDependencies": {
|
|
99
|
-
"@backstage/cli": "^0.
|
|
100
|
-
"@backstage/core-app-api": "^1.15.
|
|
101
|
-
"@backstage/dev-utils": "^1.1.
|
|
110
|
+
"@backstage/cli": "^0.29.2",
|
|
111
|
+
"@backstage/core-app-api": "^1.15.2",
|
|
112
|
+
"@backstage/dev-utils": "^1.1.4",
|
|
102
113
|
"@backstage/e2e-test-utils": "^0.1.1",
|
|
103
|
-
"@backstage/frontend-test-utils": "^0.2.
|
|
104
|
-
"@backstage/test-utils": "^1.7.
|
|
114
|
+
"@backstage/frontend-test-utils": "^0.2.3",
|
|
115
|
+
"@backstage/test-utils": "^1.7.2",
|
|
105
116
|
"@graphql-codegen/cli": "^5.0.0",
|
|
106
117
|
"@graphql-codegen/typescript": "^4.0.0",
|
|
107
118
|
"@graphql-codegen/typescript-graphql-request": "^6.0.0",
|
|
108
119
|
"@graphql-codegen/typescript-operations": "^4.0.0",
|
|
109
120
|
"@playwright/test": "^1.32.3",
|
|
110
|
-
"@sp4b-dev/test-utils": "^0.0.
|
|
111
|
-
"@spotify/backstage-plugin-core-common": "^0.6.
|
|
112
|
-
"@spotify/backstage-plugin-soundcheck-node": "^0.8.
|
|
121
|
+
"@sp4b-dev/test-utils": "^0.0.9",
|
|
122
|
+
"@spotify/backstage-plugin-core-common": "^0.6.3",
|
|
123
|
+
"@spotify/backstage-plugin-soundcheck-node": "^0.8.4",
|
|
113
124
|
"@testing-library/jest-dom": "^6.0.0",
|
|
114
125
|
"@testing-library/react": "^14.0.0",
|
|
115
126
|
"@testing-library/user-event": "^14.0.0",
|
|
127
|
+
"@types/d3-scale-chromatic": "^3.0.0",
|
|
116
128
|
"@types/git-url-parse": "^9.0.0",
|
|
117
129
|
"@types/jest": "^29.4.0",
|
|
118
130
|
"@types/luxon": "^3.0.1",
|
|
119
|
-
"@types/node": "^
|
|
131
|
+
"@types/node": "^22.0.0",
|
|
120
132
|
"@types/react-window": "^1.8.5",
|
|
121
133
|
"cross-fetch": "^4.0.0",
|
|
122
134
|
"msw": "^1.0.0"
|
|
@@ -124,8 +136,7 @@
|
|
|
124
136
|
"files": [
|
|
125
137
|
"dist",
|
|
126
138
|
"!dist/**/*.map",
|
|
127
|
-
"config.d.ts"
|
|
128
|
-
"alpha"
|
|
139
|
+
"config.d.ts"
|
|
129
140
|
],
|
|
130
141
|
"configSchema": "config.d.ts",
|
|
131
142
|
"module": "./dist/index.esm.js"
|
package/alpha/package.json
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Typography as i}from"@material-ui/core";import{makeStyles as n}from"@material-ui/core/styles";import e from"react";import{DraggableChip as c}from"../DraggableChip/DraggableChip.esm.js";const l=n(t=>({sectionLabel:{marginBottom:t.spacing(2)},chipContainer:{display:"flex",flexDirection:"column",fontWeight:"bold",fontSize:t.typography.pxToRem(16),color:t.palette.grey[600],"& .Mui-disabled":{opacity:1}}})),m=({campaign:t})=>{const a=l(),o=t.track?.levels?.[0].checks??[];return e.createElement(e.Fragment,null,e.createElement(i,{color:"textPrimary",variant:"h5",className:a.sectionLabel},"Campaign Checks"),e.createElement("div",{className:a.chipContainer},o.length?o.map(r=>e.createElement(c,{key:r.id,chip:r,disabled:!0})):e.createElement(i,{variant:"body1",color:"textSecondary",style:{alignSelf:"center"}},"There are no checks for this campaign.")))};export{m as CampaignChecks};
|
|
2
|
-
//# sourceMappingURL=CampaignChecks.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Grid as n,Paper as m}from"@material-ui/core";import{makeStyles as c}from"@material-ui/core/styles";import e from"react";import{DndProvider as p}from"react-dnd";import{HTML5Backend as s}from"react-dnd-html5-backend";import{useParams as l}from"react-router-dom";import{useGetCampaign as g}from"../../hooks/campaigns/useGetCampaign.esm.js";import{EmptyCampaignState as d}from"../CampaignsPage/CampaignEmptyState.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as E}from"../SoundcheckHeader/useHeader.esm.js";import{Loading as f}from"../TechHealth/Loading/Loading.esm.js";import{CampaignChecks as S}from"./CampaignChecks.esm.js";import{CampaignDetails as u}from"./CampaignDetails.esm.js";import{CampaignMilestones as C}from"./CampaignMilestones.esm.js";import{CampaignProgress as x}from"./CampaignProgress.esm.js";const N=c(t=>({root:{flexGrow:1,padding:t.spacing(2)},progressSection:{minHeight:350,fontSize:t.typography.body1.fontSize},contentSection:{overflow:"auto",padding:t.spacing(2)}})),v=()=>{const t=N(),{campaignId:r}=l(),{data:i,isLoading:o}=g(r??""),a=i?.edges?.[0]?.node;return E({title:a?.name??"View Campaign",description:a?.description}),o?e.createElement("div",{"data-testid":"loading-indicator"},e.createElement(f,null)):a?e.createElement("div",null,e.createElement(p,{backend:s},e.createElement(n,{container:!0,className:t.root,spacing:2,direction:"column"},e.createElement(n,{item:!0,xs:12},e.createElement(m,{className:t.contentSection},e.createElement(u,{campaign:a}))),e.createElement(n,{item:!0,xs:6},e.createElement(m,{className:t.contentSection},e.createElement(S,{campaign:a}))),e.createElement(n,{item:!0,xs:12,className:t.progressSection},e.createElement(m,{className:t.contentSection},e.createElement(x,{campaign:a}))),e.createElement(n,{item:!0,xs:12},e.createElement(m,{className:t.contentSection},e.createElement(C,{campaign:a})))))):e.createElement(d,null)};export{v as CampaignDetailsPage};
|
|
2
|
-
//# sourceMappingURL=CampaignDetailsPage.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Typography as o,Grid as i,Divider as s}from"@material-ui/core";import{makeStyles as c}from"@material-ui/core/styles";import e from"react";import{CampaignDetailRow as l}from"./CampaignDetailRow.esm.js";const p=c(t=>({milestones:{flexGrow:1,padding:t.spacing(0,1)},sectionLabel:{marginBottom:t.spacing(2)},divider:{margin:`${t.spacing(2)}px 0`}})),g=({campaign:t})=>{const a=p(),n=t.milestones;return e.createElement(e.Fragment,null,e.createElement(o,{variant:"h5",className:a.sectionLabel,color:"textPrimary"},"Campaign Milestones"),e.createElement(i,{container:!0,className:a.milestones,spacing:2},n.length?n.map((r,m)=>e.createElement(i,{item:!0,container:!0,xs:12,key:m,spacing:2},e.createElement(i,{item:!0,xs:12},e.createElement(l,{label:"Name",value:r.name}),e.createElement(l,{label:"Description",value:r.description}),e.createElement(l,{label:"Goal pass rate",value:`${r.targetPercent}%`}),m<n.length-1&&e.createElement(s,{className:a.divider})))):e.createElement(o,{variant:"body1",color:"textSecondary"},"There are no milestones for this campaign.")))};export{g as CampaignMilestones};
|
|
2
|
-
//# sourceMappingURL=CampaignMilestones.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Typography as n}from"@material-ui/core";import{makeStyles as C}from"@material-ui/core/styles";import e from"react";import{useGetCampaignProgress as P}from"../../hooks/campaigns/useGetCampaignProgress.esm.js";import{OverviewTableSkeleton as f}from"../OverviewTable/OverviewTableSkeleton.esm.js";import"../Pagination/Pagination.esm.js";import{useCursorPagination as v,CursorPagination as b}from"../Pagination/CursorPagination.esm.js";import{CampaignResultsTable as S}from"./CampaignResultsTable.esm.js";const i=C(r=>({sectionLabel:{marginBottom:r.spacing(2)},paginationContainer:{margin:r.spacing(0,0,0,-4)}})),o=25,t=()=>{const r=i();return e.createElement(n,{variant:"h5",className:r.sectionLabel,color:"textPrimary"},"Campaign Progress")},k=({campaign:r})=>{const m=i(),{cursor:s,pageSize:l,...c}=v({defaultPageSize:o,label:"entitiesPerPage"}),{data:a,isLoading:g,isError:p}=P(r.id,l,s);if(g)return e.createElement(e.Fragment,null,e.createElement(t,null),e.createElement("div",{"data-testid":"progress-indicator"},e.createElement(f,{checkCount:1,levelCount:1})));if(p)return e.createElement(e.Fragment,null,e.createElement(t,null),e.createElement(n,{color:"error"},"Failed to load campaign progress."));if(!a)return e.createElement(e.Fragment,null,e.createElement(t,null),e.createElement(n,null,"No campaign progress available."));const{totalCount:u,endCursor:E,prevCursor:d}=a;return e.createElement(e.Fragment,null,e.createElement(t,null),e.createElement(S,{results:a,campaignTrackId:r.track.id}),e.createElement("div",{className:m.paginationContainer},e.createElement(b,{...c,totalCount:u,defaultPageSize:o,endCursor:E,prevCursor:d,pageSize:l,rowsPerPageOptions:[o],labelRowsPerPage:"Entities per page:"})))};export{k as CampaignProgress};
|
|
2
|
-
//# sourceMappingURL=CampaignProgress.esm.js.map
|