@spotify/backstage-plugin-soundcheck 0.14.1 → 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 +35 -12
- package/dist/alpha.d.ts +43 -14
- package/dist/api.esm.js +1 -1
- 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/CampaignForm/Steps/CampaignDetailsStep/CampaignOwnerField.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/CertificationSidebar/Check.esm.js +1 -1
- package/dist/components/CertificationSidebar/CheckResultSummaryList.esm.js +1 -1
- package/dist/components/CheckCard/CheckCard.esm.js +1 -1
- package/dist/components/CheckDetails/CheckDetails.esm.js +1 -1
- package/dist/components/CheckDetails/CollapseRow.esm.js +2 -0
- package/dist/components/CheckDetails/FixMeDialog.esm.js +2 -0
- package/dist/components/CheckDetails/OngoingTaskComponent.esm.js +2 -0
- package/dist/components/CheckDetails/ResultStateBox.esm.js +1 -1
- package/dist/components/CheckDetails/ReviewStateComponent.esm.js +2 -0
- package/dist/components/CheckDryRun/CheckDryRunDetails.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/TeamDetailsInput/TeamDetailsInput.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/ChecksPage/CheckListPage/CheckSummaryCard.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Common/FactCollectionConfig.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Configurator.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 +2 -0
- package/dist/components/CollectorPage/Configurators/Gitlab/utils.esm.js +2 -0
- 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 +2 -0
- package/dist/components/CollectorPage/Configurators/NewRelic/utils.esm.js +2 -0
- 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/CollectorsPage/CollectorListPage/CollectorLogo.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorListPage/CollectorSummaryCard.esm.js +1 -1
- package/dist/components/DroppableInput/DroppableInput.esm.js +1 -1
- package/dist/components/EntityContent/EntityContent.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/FormFieldLabel/FormFieldLabel.esm.js +1 -1
- package/dist/components/GroupSelector/GroupSelector.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/Router.esm.js +1 -1
- package/dist/components/RoutingPage/RoutingPage.esm.js +1 -1
- package/dist/components/SoundcheckHeader/SoundcheckHeaderContext.esm.js +1 -1
- package/dist/components/SoundcheckHeader/useHeader.esm.js +1 -1
- package/dist/components/TechHealth/Filters/useFacetOptions.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackOwnerSelect/TrackOwnerSelect.esm.js +1 -1
- package/dist/components/TrackPage/FilterBar/FilterBar.esm.js +1 -1
- package/dist/components/TrackPage/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/contexts/UserProvider.esm.js +1 -1
- package/dist/graphql/generated/index.esm.js +35 -27
- package/dist/hooks/aggregations/useAggregatedTrackPassRateTrend.esm.js +1 -1
- 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/useDeleteCheck.esm.js +1 -1
- package/dist/hooks/checks/useExecutableChecks.esm.js +2 -0
- 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/graphqlKeys.esm.js +1 -1
- package/dist/hooks/groups/useGroupOptions.esm.js +2 -0
- package/dist/hooks/tracks/useCreateTrack.esm.js +1 -1
- package/dist/hooks/tracks/useDeleteTrack.esm.js +1 -1
- package/dist/images/new-relic-rgb.svg +1 -0
- package/dist/images/new-relic-white.svg +1 -0
- package/package.json +40 -24
- 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/components/GroupSelector/useOptions.esm.js +0 -2
- package/dist/hooks/campaigns/useGetCampaignProgress.esm.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EntityRefLink as b}from"@backstage/plugin-catalog-react";import{makeStyles as S,Box as c,Typography as a,Divider as f,Grid as l}from"@material-ui/core";import{parseFactRef as N,getRuleHash as k}from"@spotify/backstage-plugin-soundcheck-common";import e from"react";import{ResultState as R}from"../../graphql/generated/index.esm.js";import{ResultStateBox as B}from"../CheckDetails/ResultStateBox.esm.js";import{ExpressionTypeReadableMap as F,ExpressionType as T}from"../CheckForm/types/ExpressionType.esm.js";import"../Frequency/types.esm.js";import"../Frequency/util.esm.js";import"../Frequency/FrequencyComponent.esm.js";import"../CheckForm/types/Path.esm.js";import{mapRuleToExpression as P}from"../CheckForm/utils/checkFormUtils.esm.js";import{CheckIcon as w}from"../CheckIcon/CheckIcon.esm.js";import{ExpandableSection as z}from"../ExpandableSection/ExpandableSection.esm.js";import{FormattedPreview as x}from"../FormattedPreview/FormattedPreview.esm.js";const v=S(t=>({dryRunRoot:{padding:t.spacing(2)},dryRunSection:{marginBottom:t.spacing(2)},rulesSection:{padding:t.spacing(2),margin:0,width:"100%"},resultBox:{fontSize:t.typography.body1.fontSize},factBox:{padding:0,border:`1px solid ${t.palette.divider}`,overflow:"auto",fontSize:t.typography.body2.fontSize,maxHeight:500},nested:{margin:t.spacing(3)},expressionType:{padding:t.spacing(1,2)},expressionWrapper:{border:`1px solid ${t.palette.divider}`,marginBottom:t.spacing(2)},resultDisplay:{display:"flex",alignItems:"center"},resultIcon:{marginRight:t.spacing(.25)},ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}},fontSize:t.typography.body1.fontSize},valueBox:{maxHeight:500,overflow:"auto"}})),D=({passed:t})=>{const n=v();return e.createElement(a,{variant:"body1",className:n.resultDisplay},e.createElement(w,{className:n.resultIcon,result:t?R.Passed:R.Failed})," ",t?"Passed":"Failed")},g=({check:t,expression:n,facts:i,ruleResults:m})=>{const o=v();return e.createElement(e.Fragment,null,e.createElement(c,{className:o.expressionWrapper},e.createElement(a,{className:o.expressionType,variant:"subtitle1"},F[n.expressionType??T.AllOf]),n.conditions?.map((r,s)=>{const p=r.operatorPrefix?`${r.operatorPrefix}:${r.operator}`:r.operator,d=N(r.factRef),y=i?.find(E=>E.factRef===r.factRef),h=k({factRef:d,value:r.value,operator:p,path:r.path}),u=m?.find(E=>E.name===h);return e.createElement("div",{key:`expression-${s}`},e.createElement(f,{variant:"middle"}),e.createElement(l,{container:!0,className:o.rulesSection,spacing:2},e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Integration"),e.createElement(a,{variant:"body1"},d.source)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Fact"),e.createElement(a,{variant:"body1"},d.name)),t?.pathResolver&&e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Path Resolver"),e.createElement(a,{variant:"body1"},t.pathResolver)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Path"),e.createElement(a,{variant:"body1"},r.path)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Operator"),e.createElement(a,{variant:"body1"},p)),u?.result!==void 0&&e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Result"),e.createElement(D,{passed:u.result})),e.createElement(l,{item:!0,xs:12},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Expected"),e.createElement(a,{component:"div",variant:"body2",className:o.valueBox},e.createElement(x,{data:r?.value}))),e.createElement(l,{item:!0,xs:12},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Resolved Value"),e.createElement(a,{component:"div",variant:"body2",className:o.valueBox},e.createElement(x,{data:u?.factResult}))),!!y&&e.createElement(l,{item:!0,xs:12},e.createElement(z,{elevation:0,title:"Related Fact"},e.createElement("div",{className:o.factBox},e.createElement(x,{data:y.data}))))))}),!!n?.expressions&&e.createElement(e.Fragment,null,e.createElement(f,{variant:"middle"}),e.createElement(c,{className:o.nested},n?.expressions?.map((r,s)=>e.createElement(g,{check:t,facts:i,ruleResults:m,expression:r,key:`nested-expression-${s}`}))))))},I=({entityRef:t,check:n,checkResult:i,notes:m,facts:o,ruleResults:r})=>{const s=v(),p=P(n?.rule);return e.createElement(c,{className:s.dryRunRoot},e.createElement(c,{className:s.dryRunSection},t&&e.createElement(e.Fragment,null,e.createElement(a,{variant:"h5"},"Entity"),e.createElement(a,{variant:"body1"},e.createElement(b,{className:s.ownerLink,entityRef:t})))),e.createElement(c,{className:s.dryRunSection},e.createElement(a,{variant:"h5"},"Check Result"),e.createElement("div",{className:s.resultBox},i?e.createElement(B,{state:i,notes:m}):"No Results")),e.createElement(a,{variant:"h5"},"Rules"),e.createElement(g,{check:n,facts:o,ruleResults:r,expression:p}))};export{I as CheckDryRunDetails};
|
|
1
|
+
import{EntityRefLink as b}from"@backstage/plugin-catalog-react";import{makeStyles as S,Box as c,Typography as a,Divider as f,Grid as l}from"@material-ui/core";import{parseFactRef as N,getRuleHash as k}from"@spotify/backstage-plugin-soundcheck-common";import e from"react";import{ResultState as R}from"../../graphql/generated/index.esm.js";import{ResultStateBox as B}from"../CheckDetails/ResultStateBox.esm.js";import{ExpressionTypeReadableMap as F,ExpressionType as T}from"../CheckForm/types/ExpressionType.esm.js";import"../Frequency/types.esm.js";import"../Frequency/util.esm.js";import"../Frequency/FrequencyComponent.esm.js";import"../CheckForm/types/Path.esm.js";import{mapRuleToExpression as P}from"../CheckForm/utils/checkFormUtils.esm.js";import{CheckIcon as w}from"../CheckIcon/CheckIcon.esm.js";import{ExpandableSection as z}from"../ExpandableSection/ExpandableSection.esm.js";import{FormattedPreview as x}from"../FormattedPreview/FormattedPreview.esm.js";const v=S(t=>({dryRunRoot:{padding:t.spacing(2)},dryRunSection:{marginBottom:t.spacing(2)},rulesSection:{padding:t.spacing(2),margin:0,width:"100%"},resultBox:{fontSize:t.typography.body1.fontSize},factBox:{padding:0,border:`1px solid ${t.palette.divider}`,overflow:"auto",fontSize:t.typography.body2.fontSize,maxHeight:500},nested:{margin:t.spacing(3)},expressionType:{padding:t.spacing(1,2)},expressionWrapper:{border:`1px solid ${t.palette.divider}`,marginBottom:t.spacing(2)},resultDisplay:{display:"flex",alignItems:"center"},resultIcon:{marginRight:t.spacing(.25)},ownerLink:{"& span":{"&:hover":{textDecoration:"underline"}},fontSize:t.typography.body1.fontSize},valueBox:{maxHeight:500,overflow:"auto"}})),D=({passed:t})=>{const n=v();return e.createElement(a,{variant:"body1",className:n.resultDisplay},e.createElement(w,{className:n.resultIcon,result:t?R.Passed:R.Failed})," ",t?"Passed":"Failed")},g=({check:t,expression:n,facts:i,ruleResults:m})=>{const o=v();return e.createElement(e.Fragment,null,e.createElement(c,{className:o.expressionWrapper},e.createElement(a,{className:o.expressionType,variant:"subtitle1"},F[n.expressionType??T.AllOf]),n.conditions?.map((r,s)=>{const p=r.operatorPrefix?`${r.operatorPrefix}:${r.operator}`:r.operator,d=N(r.factRef),y=i?.find(E=>E.factRef===r.factRef),h=k({factRef:d,value:r.value,operator:p,path:r.path}),u=m?.find(E=>E.name===h);return e.createElement("div",{key:`expression-${s}`},e.createElement(f,{variant:"middle"}),e.createElement(l,{container:!0,className:o.rulesSection,spacing:2},e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Integration"),e.createElement(a,{variant:"body1"},d.source)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Fact"),e.createElement(a,{variant:"body1"},d.name)),t?.pathResolver&&e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Path Resolver"),e.createElement(a,{variant:"body1"},t.pathResolver)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Path"),e.createElement(a,{variant:"body1"},r.path)),e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Operator"),e.createElement(a,{variant:"body1"},p)),u?.result!==void 0&&e.createElement(l,{item:!0,xs:6},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Result"),e.createElement(D,{passed:u.result})),e.createElement(l,{item:!0,xs:12},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Expected"),e.createElement(a,{component:"div",variant:"body2",className:o.valueBox},e.createElement(x,{data:r?.value}))),e.createElement(l,{item:!0,xs:12},e.createElement(a,{variant:"subtitle2",color:"textSecondary"},"Resolved Value"),e.createElement(a,{component:"div",variant:"body2",className:o.valueBox},e.createElement(x,{data:u?.factResult}))),!!y&&e.createElement(l,{item:!0,xs:12},e.createElement(z,{elevation:0,title:"Related Fact"},e.createElement("div",{className:o.factBox},e.createElement(x,{data:y.data}))))))}),!!n?.expressions&&e.createElement(e.Fragment,null,e.createElement(f,{variant:"middle"}),e.createElement(c,{className:o.nested},n?.expressions?.map((r,s)=>e.createElement(g,{check:t,facts:i,ruleResults:m,expression:r,key:`nested-expression-${s}`}))))))},I=({entityRef:t,check:n,checkResult:i,notes:m,facts:o,ruleResults:r})=>{const s=v(),p=P(n?.rule);return e.createElement(c,{className:s.dryRunRoot},e.createElement(c,{className:s.dryRunSection},t&&e.createElement(e.Fragment,null,e.createElement(a,{variant:"h5"},"Entity"),e.createElement(a,{variant:"body1"},e.createElement(b,{className:s.ownerLink,entityRef:t})))),e.createElement(c,{className:s.dryRunSection},e.createElement(a,{variant:"h5"},"Check Result"),e.createElement("div",{className:s.resultBox},i?e.createElement(B,{name:n?.name??"",state:i,notes:m}):"No Results")),e.createElement(a,{variant:"h5"},"Rules"),e.createElement(g,{check:n,facts:o,ruleResults:r,expression:p}))};export{I as CheckDryRunDetails};
|
|
2
2
|
//# sourceMappingURL=CheckDryRunDetails.esm.js.map
|
package/dist/components/CheckForm/FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as b,ButtonGroup as g,Button as
|
|
1
|
+
import{makeStyles as b,ButtonGroup as g,Button as k}from"@material-ui/core";import n,{useState as E}from"react";import{useFormContext as f,Controller as y}from"react-hook-form";import{ExpressionType as a,ExpressionTypeReadableMap as C}from"../../../types/ExpressionType.esm.js";import"../../../../Frequency/types.esm.js";import"../../../../Frequency/util.esm.js";import"../../../../Frequency/FrequencyComponent.esm.js";import"../../../types/Path.esm.js";const x=b(e=>({button:{backgroundColor:e.palette.background.paper,padding:e.spacing(.5,1.5)},selectedButton:{backgroundColor:e.palette.action.selected}})),B=({name:e,disabled:l})=>{const o=x(),{control:p,getValues:s}=f(),m=`${e}`,c=s(m),[i,u]=E(c||a.AllOf),d=r=>{u(r)};return n.createElement(y,{control:p,name:e,render:({field:{onChange:r}})=>n.createElement(g,{color:"primary"},Object.values(a).map(t=>n.createElement(k,{key:t,className:i===t?`${o.selectedButton} ${o.button}`:`${o.button}`,onClick:()=>{d(t),r(t)},disabled:l},C[t])))})};export{B as ExpressionTypeToggle};
|
|
2
2
|
//# sourceMappingURL=ExpressionTypeToggle.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{parseEntityRef as v}from"@backstage/catalog-model";import{Typography as y}from"@material-ui/core";import{makeStyles as b}from"@material-ui/core/styles";import{uniqBy as g}from"lodash";import o from"react";import{useFormContext as h}from"react-hook-form";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import{useLoggedInUser as w}from"../../../../contexts/UserProvider.esm.js";import{
|
|
1
|
+
import{parseEntityRef as v}from"@backstage/catalog-model";import{Typography as y}from"@material-ui/core";import{makeStyles as b}from"@material-ui/core/styles";import{uniqBy as g}from"lodash";import o from"react";import{useFormContext as h}from"react-hook-form";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import{useLoggedInUser as w}from"../../../../contexts/UserProvider.esm.js";import{useGroupOptions as x}from"../../../../hooks/groups/useGroupOptions.esm.js";import{FormControlledAutocomplete as L}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import{useLabelOptions as S}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"@material-ui/lab";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{CHECK_FIELDS as C}from"../../utils/checkFormUtils.esm.js";const R=b(a=>({container:{display:"flex",flexDirection:"column",gap:a.spacing(1)}})),T=({control:a,disabled:l,error:n})=>{const i=R(),{options:p,isLoading:s}=x();let e=g(p.map(m=>({value:m.ref,label:m.name})),"value");const{user:c,userEntityRef:r}=w();r&&(e=[{value:r,label:c?.metadata?.name??r},...e]);const{watch:u}=h(),t=u("detailsStep.ownerEntityRef");t&&r!==t&&!e.some(m=>m.value===t)&&(e=[{value:t,label:v(t).name},...e]);const f=S(e),{owner:{name:d,selectLabel:E}}=C.details;return o.createElement("div",{className:i.container},o.createElement("div",null,o.createElement(y,{variant:"subtitle2"},d)),o.createElement("div",null,o.createElement(L,{freeSolo:!1,name:"detailsStep.ownerEntityRef",control:a,placeholder:E,width:250,helperText:n?.message??void 0,disabled:l||s,...f})))};export{T as TeamDetailsInput};
|
|
2
2
|
//# sourceMappingURL=TeamDetailsInput.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{parseEntityRef 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{useRouteRef as d
|
|
1
|
+
import{useRouteRef as d}from"@backstage/core-plugin-api";import{usePermission as l}from"@backstage/plugin-permission-react";import{soundcheckCheckUpdatePermission as g,soundcheckCheckDeletePermission as P}from"@spotify/backstage-plugin-soundcheck-common";import p,{useCallback as r}from"react";import{useNavigate as v}from"react-router-dom";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{useConfirmationModal as x}from"../../../hooks/useConfirmationModal.esm.js";import{useDeleteCheck as I}from"../../../hooks/checks/useDeleteCheck.esm.js";import{checkDetailsRouteRef as M,checkEditRouteRef as S}from"../../../routes.esm.js";import{exportCheck as b}from"../../../utils/export.esm.js";import{SummaryCard as A}from"../../SummaryCard/SummaryCard.esm.js";import{CheckMetadata as $}from"./CheckMetadata.esm.js";const N=({check:o})=>{const{id:e,name:i,description:h,isEditable:m,ownerEntityRef:u}=o,t=v(),c=d(M),a=d(S),{loading:f,allowed:k}=l({permission:g,resourceRef:e}),{loading:C,allowed:R}=l({permission:P,resourceRef:e}),{showModal:s}=x(),{mutate:n}=I(),w=r(async()=>{await s({title:"Delete Check",message:`Are you sure you want to delete the check '${i??e}'?`})&&n(e)},[s,i,n,e]),y=r(()=>{t(c({checkId:e}))},[c,e,t]),E=r(()=>{t(a({checkId:e}))},[a,e,t]),D=r(()=>{b(o)},[o]);return p.createElement(A,{title:i??e,description:h,children:u&&p.createElement($,{check:o}),handleView:y,handleEdit:m&&!f&&k?E:void 0,handleDelete:m&&!C&&R?w:void 0,handleExport:D,viewIsPrimaryAction:!0})};export{N as CheckSummaryCard};
|
|
2
2
|
//# sourceMappingURL=CheckSummaryCard.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 t from"react";import{DataDogConfigurator as e}from"./DataDog/DataDogConfigurator.esm.js";import{GithubConfigurator as i}from"./Github/GithubConfigurator.esm.js";import{
|
|
1
|
+
import t from"react";import{DataDogConfigurator as e}from"./DataDog/DataDogConfigurator.esm.js";import{GithubConfigurator as i}from"./Github/GithubConfigurator.esm.js";import{GitlabConfigurator as a}from"./Gitlab/GitlabConfigurator.esm.js";import{JiraConfigurator as m}from"./Jira/JiraConfigurator.esm.js";import{KubernetesConfigurator as f}from"./Kubernetes/KubernetesConfigurator.esm.js";import{NewRelicConfigurator as n}from"./NewRelic/NewRelicConfigurator.esm.js";import{PagerDutyConfigurator as u}from"./PagerDuty/PagerDutyConfigurator.esm.js";import{ScmConfigurator as g}from"./SCM/ScmConfigurator.esm.js";import{SonarQubeConfigurator as p}from"./SonarQube/SonarQubeConfigurator.esm.js";const c={github:i,gitlab:a,scm:g,pagerduty:u,datadog:e,kubernetes:f,jira:m,sonarqube:p,newrelic:n},C=({selectedCollector:r})=>{const o=c[r?.id];return t.createElement(o,{selectedCollector:r})};export{C as Configurator};
|
|
2
2
|
//# sourceMappingURL=Configurator.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 h,Divider 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
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
+
//# sourceMappingURL=GitlabConfigurator.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{asArray as b}from"@spotify/backstage-plugin-soundcheck-common";import{mapToCacheConfig as l,mapCacheConfigToHumanDurationOrBoolean as s}from"../../../CacheConfig/utils.esm.js";import"../../../CacheConfig/CacheConfigComponent.esm.js";import{mapCatalogFilterToFilters as u,mapFiltersToCatalogFilter as p}from"../../../Filter/utils.esm.js";import"../../../Filter/FilterComponent.esm.js";import"../../../Frequency/types.esm.js";import{mapHumanDurationOrCronToFrequency as C,mapFrequencyToHumanDurationOrCron as m}from"../../../Frequency/util.esm.js";import"../../../Frequency/FrequencyComponent.esm.js";import{defaultCollectorOption as h}from"../Common/CollectorOption.esm.js";const g="branch_protections",y="project_details",T="project_languages",q=()=>({branchProtections:h(),projectDetails:h(),projectLanguages:h()});function O(r){const{branchProtections:c,projectDetails:o,projectLanguages:e}=r;if(c.enabled||o.enabled||e.enabled){const n={},f=[];if(n.collects=f,c.enabled){const{cacheConfig:t,frequency:a,filters:i}=c;f.push({type:g,frequency:m(a),filter:p(i),cache:s(t)})}if(o.enabled){const{cacheConfig:t,frequency:a,filters:i}=o;f.push({type:y,frequency:m(a),filter:p(i),cache:s(t)})}if(e.enabled){const{cacheConfig:t,frequency:a,filters:i}=e;f.push({type:T,frequency:m(a),filter:p(i),cache:s(t)})}return n}return{collects:[]}}function d(r){const c=q();if(r){const o=r.collects;if(o)for(const e of b(o)){const n=e.type;n===g&&(c.branchProtections={enabled:!0,frequency:C(e.frequency??r.frequency),filters:u(e.filter??r.filter),cacheConfig:l(e.cache??r.cache)}),n===y&&(c.projectDetails={enabled:!0,frequency:C(e.frequency??r.frequency),filters:u(e.filter??r.filter),cacheConfig:l(e.cache??r.cache)}),n===T&&(c.projectLanguages={enabled:!0,frequency:C(e.frequency??r.frequency),filters:u(e.filter??r.filter),cacheConfig:l(e.cache??r.cache)})}}return c}export{g as BRANCH_PROTECTIONS_COLLECTOR_TYPE,y as PROJECT_DETAILS_COLLECTOR_TYPE,T as PROJECT_LANGUAGES_COLLECTOR_TYPE,q as defaultGitlabConfig,d as mapConfigToGitlabCollectorConfig,O as mapGitlabCollectorConfigToConfig};
|
|
2
|
+
//# sourceMappingURL=utils.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
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{asArray as
|
|
1
|
+
import{asArray as _}from"@spotify/backstage-plugin-soundcheck-common";import{mapToCacheConfig as p,mapCacheConfigToHumanDurationOrBoolean as f}from"../../../CacheConfig/utils.esm.js";import"../../../CacheConfig/CacheConfigComponent.esm.js";import{mapCatalogFilterToFilters as d,mapFiltersToCatalogFilter as m}from"../../../Filter/utils.esm.js";import"../../../Filter/FilterComponent.esm.js";import"../../../Frequency/types.esm.js";import{mapHumanDurationOrCronToFrequency as y,mapFrequencyToHumanDurationOrCron as b}from"../../../Frequency/util.esm.js";import"../../../Frequency/FrequencyComponent.esm.js";import{defaultCollectorOption as c}from"../Common/CollectorOption.esm.js";import{K8S_CUSTOM_RESOURCE as C}from"./types.esm.js";const l={pods:{type:"k8s_pods",label:"Pods",description:"Collects details about kubernetes pods associated with an entity."},services:{type:"k8s_services",label:"Services",description:"Collects details about kubernetes services associated with an entity."},deployments:{type:"k8s_deployments",label:"Deployments",description:"Collects details about kubernetes deployments associated with an entity."},hpas:{type:"k8s_hpas",label:"Horizontal Pod Autoscalers",description:"Collects details about kubernetes horizontal pod autoscalers associated with an entity."},statefulSets:{type:"k8s_stateful_sets",label:"Stateful Sets",description:"Collects details about kubernetes stateful sets associated with an entity."},podDisruptionBudgets:{type:"k8s_pod_disruption_budgets",label:"Pod Disruption Budgets",description:"Collects details about kubernetes pod disruption budgets associated with an entity."},ingresses:{type:"k8s_ingresses",label:"Ingresses",description:"Collects details about kubernetes ingresses associated with an entity."}},u={...c(),factDetails:{factName:"custom-resource",customResource:{group:"",plural:"",apiVersion:""}}},h=()=>({pods:c(),services:c(),deployments:c(),hpas:c(),statefulSets:c(),podDisruptionBudgets:c(),ingresses:c(),customResources:{enabled:!1,collectors:[u]}});function O(t){if(Object.values(t).some(o=>o.enabled)){const o={},a=[];return o.collects=a,Object.entries(t).forEach(([r,i])=>{if(r==="customResources"&&i.enabled){const e=i.collectors?.map(s=>({type:C,factName:s.factDetails.factName,customResource:s.factDetails.customResource,frequency:b(s.frequency),filter:m(s.filters),cache:f(s.cacheConfig)}))??[];a.push(...e)}else if(i.enabled){const{cacheConfig:e,frequency:s,filters:n}=i;a.push({type:l[r].type,frequency:b(s),filter:m(n),cache:f(e)})}}),o}return{collects:[]}}function k(t){const o=h();if(t){const a=[],r=t.collects;if(r){for(const e of _(r)){const s=e.type;if(e.type===C){const n={enabled:!0,frequency:y(e.frequency??t.frequency),filters:d(e.filter??t.filter),cacheConfig:p(e.cache??t.cache),factDetails:{factName:e.factName,customResource:e.customResource}};a.push(n);continue}Object.entries(l).map(([n,g])=>{s===g.type&&(o[n]={enabled:!0,frequency:y(e.frequency??t.frequency),filters:d(e.filter??t.filter),cacheConfig:p(e.cache??t.cache)})})}const i=a.length>0;o.customResources={enabled:i,collectors:i?a:[u]}}}return o}export{u as DEFAULT_CUSTOM_RESOURCE_OPTION,l as K8S_COLLECTOR_FIELDS,h as defaultKubernetesConfig,k as mapConfigToKubernetesCollectorConfig,O as mapKubernetesCollectorConfigToConfig};
|
|
2
2
|
//# sourceMappingURL=utils.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{validNameRegex as f}from"@spotify/backstage-plugin-soundcheck-common";import{z as e}from"zod";import{FIELD_IS_REQUIRED_MSG as u}from"../../../../utils/validation.esm.js";import{BaseCollectorSchema as d,CollectorOptionSchema as t}from"../Common/CollectorOption.esm.js";const i="Fact name is not unique",n="The field contains forbidden characters",m="Max 100 characters",p=d.extend({enabled:e.boolean(),factDetails:e.strictObject({factName:e.string().min(1,u).max(100,m).regex(f,n),customResource:e.strictObject({group:e.string(),apiVersion:e.string(),plural:e.string()})})}).strict(),_=e.strictObject({enabled:e.boolean(),collectors:e.array(p).superRefine((o,l)=>{const c=o.map(s=>s.factDetails.factName),r=c.filter((s,a)=>c.indexOf(s)!==a);r.length&&o.forEach((s,a)=>{r.includes(s.factDetails.factName)&&l.addIssue({code:e.ZodIssueCode.custom,message:i,path:[a,"factDetails","factName"]})})})}),S=e.strictObject({deployments:t,hpas:t,ingresses:t,podDisruptionBudgets:t,pods:t,services:t,statefulSets:t,customResources:_});export{i as FACT_NAME_IS_NOT_UNIQUE_MSG,n as INVALID_CHARACTERS_MSG,m as MAX_100_CHARACTERS_MSG,S as customResourceFormSchema};
|
|
2
|
+
//# sourceMappingURL=validation.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{makeStyles as h,Paper as S,Divider as m}from"@material-ui/core";import e from"react";import{useForm as b,FormProvider as w}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 y}from"../../../../hooks/useNavigateBack.esm.js";import{useUpdateCollectorConfig as N}from"../../../../hooks/collectors/useUpdateCollectorConfig.esm.js";import{integrationsPageRouteRef as R}from"../../../../routes.esm.js";import{FooterButtons as v}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 r}from"../Common/FactCollectionConfig.esm.js";import{collectorHeaderContent as F,confirmationModalContent as P}from"../Common/utils.esm.js";import{mapConfigToNewRelicCollectorConfig as T,defaultNewRelicConfig as M,mapNewRelicCollectorConfigToConfig as k}from"./utils.esm.js";const x=h(t=>({spacer:{height:t.spacing(8),width:"100%"},section:{marginBottom:t.spacing(2)},form:{marginBottom:t.spacing(2)}})),H=({disabled:t,selectedCollector:o})=>{const a=b({defaultValues:o?T(o.config):M(),mode:"onChange"}),{formState:{errors:i},handleSubmit:n}=a,l=x(),s=!!i.entity||!!i.entitySearch||!!i.policiesSearch,{mutateAsync:p}=N(),[f,d]=y(R),{showModal:u}=E(),c=async g=>{if(!await u(P(o)))return;const C=k(g);await p({collectorId:o.id,config:C})&&d()};return B(F(o)),e.createElement(e.Fragment,null,e.createElement(S,{className:l.form},e.createElement(w,{...a},e.createElement("form",{onSubmit:n(c)},e.createElement(r,{name:"entity",label:"Entity",description:"Collects details about New Relic entity with a specific id.",disabled:t}),e.createElement(m,null),e.createElement(r,{name:"entitySearch",label:"Entity Search",description:"Collects details about New Relic entities with a specific tag.",disabled:t}),e.createElement(m,null),e.createElement(r,{name:"policiesSearch",label:"Policies Search",description:"Collects details about New Relic policies for a specific account.",disabled:t})))),e.createElement("div",{className:l.section},e.createElement(v,{onCancel:f,saveButtonText:"Save",isLoading:!1,onSave:n(c),disableSave:s})))};export{H as NewRelicConfigurator};
|
|
2
|
+
//# sourceMappingURL=NewRelicConfigurator.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{asArray as d}from"@spotify/backstage-plugin-soundcheck-common";import{mapToCacheConfig as l,mapCacheConfigToHumanDurationOrBoolean as u}from"../../../CacheConfig/utils.esm.js";import"../../../CacheConfig/CacheConfigComponent.esm.js";import{mapCatalogFilterToFilters as s,mapFiltersToCatalogFilter as C}from"../../../Filter/utils.esm.js";import"../../../Filter/FilterComponent.esm.js";import"../../../Frequency/types.esm.js";import{mapHumanDurationOrCronToFrequency as p,mapFrequencyToHumanDurationOrCron as y}from"../../../Frequency/util.esm.js";import"../../../Frequency/FrequencyComponent.esm.js";import{defaultCollectorOption as h}from"../Common/CollectorOption.esm.js";const m="entity",T="entity-search",q="policies-search",g=()=>({entity:h(),entitySearch:h(),policiesSearch:h()});function E(c){const{entity:r,entitySearch:n,policiesSearch:e}=c;if(r.enabled||n.enabled||e.enabled){const i={},a=[];if(i.collects=a,r.enabled){const{cacheConfig:o,frequency:t,filters:f}=r;a.push({type:m,frequency:y(t),filter:C(f),cache:u(o)})}if(n.enabled){const{cacheConfig:o,frequency:t,filters:f}=n;a.push({type:T,frequency:y(t),filter:C(f),cache:u(o)})}if(e.enabled){const{cacheConfig:o,frequency:t,filters:f}=e;a.push({type:q,frequency:y(t),filter:C(f),cache:u(o)})}return i}return{collects:[]}}function O(c){const r=g();if(c){const n=c.collects;if(n)for(const e of d(n)){const i=e.type;i===m&&(r.entity={enabled:!0,frequency:p(e.frequency??c.frequency),filters:s(e.filter??c.filter),cacheConfig:l(e.cache??c.cache)}),i===T&&(r.entitySearch={enabled:!0,frequency:p(e.frequency??c.frequency),filters:s(e.filter??c.filter),cacheConfig:l(e.cache??c.cache)}),i===q&&(r.policiesSearch={enabled:!0,frequency:p(e.frequency??c.frequency),filters:s(e.filter??c.filter),cacheConfig:l(e.cache??c.cache)})}}return r}export{m as ENTITY_COLLECTOR_TYPE,T as ENTITY_SEARCH_COLLECTOR_TYPE,q as POLICIES_SEARCH_COLLECTOR_TYPE,g as defaultNewRelicConfig,O as mapConfigToNewRelicCollectorConfig,E as mapNewRelicCollectorConfigToConfig};
|
|
2
|
+
//# sourceMappingURL=utils.esm.js.map
|
package/dist/components/CollectorPage/Configurators/PagerDuty/IncidentsFactDetailsComponent.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as i,Typography as p,TextField as c}from"@material-ui/core";import e from"react";import{useFormContext as d,Controller as s}from"react-hook-form";import{StatusesComponent as f}from"./StatusesComponent.esm.js";import{PAGERDUTY_COLLECTOR_FIELDS as x}from"./utils.esm.js";const T=i(t=>({root:{paddingTop:t.spacing(1)},textInput:{marginTop:0,width:"255px"},helperText:{marginLeft:0}})),h=({name:t,disabled:l})=>{const o=T(),{control:m}=d(),{factName:n}=x.factDetails;return e.createElement("div",{className:o.root},e.createElement(p,{variant:"subtitle2"},n.name),e.createElement(s,{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(s,{name:`${t}.statuses`,control:m,render:({field:r,fieldState:{error:a}})=>e.createElement(f,{disabled:l,value:r.value,onChange:r.onChange,errors:a})}))};export{h as IncidentsFactDetailsComponent};
|
|
2
2
|
//# sourceMappingURL=IncidentsFactDetailsComponent.esm.js.map
|
|
@@ -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 p,useTheme as
|
|
1
|
+
import{makeStyles as p,useTheme as c}from"@material-ui/core";import s from"react";import g from"../../../images/cat-blk.svg";import n from"../../../images/cat-wht.svg";import f from"../../../images/dd_logo_h_rgb.svg";import l from"../../../images/dd_logo_h_white.svg";import h from"../../../images/GitHub_Logo.svg";import u from"../../../images/GitHub_Logo_White.svg";import d from"../../../images/gitlab-rgb.svg";import b from"../../../images/gitlab-white.svg";import k from"../../../images/jira-rgb.svg";import w from"../../../images/jira-white.svg";import y from"../../../images/k8s_blue.svg";import j from"../../../images/k8s_white.svg";import q from"../../../images/new-relic-rgb.svg";import B from"../../../images/new-relic-white.svg";import x from"../../../images/pd-black.svg";import I from"../../../images/pd-white.svg";import L from"../../../images/SCM_DARK.svg";import S from"../../../images/SCM_LIGHT.svg";import T from"../../../images/sonarqube-rgb.svg";import D from"../../../images/sonarqube-white.svg";import E from"../../../images/soundcheck-black.svg";import $ from"../../../images/soundcheck-white.svg";import A from"../../../images/tech-black.svg";import C from"../../../images/tech-white.svg";import{isDarkTheme as F}from"../../Charts/chartUtils.esm.js";const t={github:h,gitlab:d,datadog:f,scm:S,pagerduty:x,catalog:g,soundcheck:E,techinsights:A,kubernetes:y,jira:k,sonarqube:T,newrelic:q},i={github:u,gitlab:b,datadog:l,scm:L,pagerduty:I,catalog:n,soundcheck:$,techinsights:C,kubernetes:j,jira:w,sonarqube:D,newrelic:B},G=new Set(["catalog","soundcheck","techinsights","sonarqube"]),H=p(o=>({image:{objectFit:"contain",color:"white",height:o.spacing(5)-4,maxWidth:"100%",marginBottom:o.spacing(1.5)},tallImage:{height:o.spacing(6.5),marginBottom:o.spacing(0)}})),M=o=>!!t[o]&&!!i[o],N=({collectorId:o,noMargin:e})=>{const r=H(),a=c(),m=F(a)?i[o]:t[o];return m?s.createElement("img",{src:m,alt:o,style:e?{marginBottom:0}:{},className:`${r.image} ${G.has(o)?r.tallImage:""}`}):null};export{N as CollectorLogo,M as hasLogo};
|
|
2
2
|
//# sourceMappingURL=CollectorLogo.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{MarkdownContent as E}from"@backstage/core-components";import{useRouteRef as v}from"@backstage/core-plugin-api";import{usePermission as N}from"@backstage/plugin-permission-react";import{makeStyles as I,CardContent as g,CardHeader as k,Typography as u,Divider as x,CardActions as S,Button as T}from"@material-ui/core";import{soundcheckCollectorUpdatePermission as $}from"@spotify/backstage-plugin-soundcheck-common";import e from"react";import{useNavigate as A}from"react-router-dom";import{integrationDetailsRouteRef as B}from"../../../routes.esm.js";import{useSummaryCardStyles as
|
|
1
|
+
import{MarkdownContent as E}from"@backstage/core-components";import{useRouteRef as v}from"@backstage/core-plugin-api";import{usePermission as N}from"@backstage/plugin-permission-react";import{makeStyles as I,CardContent as g,CardHeader as k,Typography as u,Divider as x,CardActions as S,Button as T}from"@material-ui/core";import{soundcheckCollectorUpdatePermission as $}from"@spotify/backstage-plugin-soundcheck-common";import e from"react";import{useNavigate as A}from"react-router-dom";import{integrationDetailsRouteRef as B}from"../../../routes.esm.js";import{useSummaryCardStyles as H,Card as L}from"../../SummaryCard/SummaryCard.esm.js";import{hasLogo as R,CollectorLogo as w}from"./CollectorLogo.esm.js";const D=I(o=>({cardContent:{flex:1,paddingTop:o.spacing(1)},logoHeader:{paddingBottom:0,flex:0},headerContent:{display:"flex",alignItems:"center",height:o.spacing(5),marginBottom:o.spacing(1.5)},headerTypography:{marginBottom:0}})),l=["github","gitlab","scm","pagerduty","datadog","kubernetes","jira","sonarqube","newrelic"],M=({collector:o})=>{const{description:p,id:t,isConfigurable:s,isEditable:m,name:f}=o,{loading:c,allowed:d}=N({permission:$}),y=A(),h=v(B),a=H(),n=D(),C=l.includes(t)&&s&&m&&!c&&d,b=()=>{y(h({integrationId:t}))};let r;c||!d?r="You don't have permissions to configure this integration.":s?m?l.includes(t)||(r="Integration can only be configured through YAML"):r="Integration is already configured via YAML and cannot be configured through the UI.":r="Integration is not configurable.";const i=f??t;return e.createElement(L,{"data-testid":t,className:a.card},R(t)?e.createElement(g,{className:n.logoHeader},e.createElement(w,{collectorId:t})):e.createElement(k,{title:i,titleTypographyProps:{className:`${a.summaryName} ${n.headerTypography}`},classes:{content:n.headerContent}}),e.createElement(g,{className:n.cardContent},e.createElement(u,{variant:"body1",component:"div"},e.createElement(E,{className:a.summaryDescription,content:p??""})),e.createElement(u,{color:"textSecondary",variant:"body2"},r)),C&&e.createElement("div",null,e.createElement(x,null),e.createElement(S,{className:a.actionArea},e.createElement(T,{"aria-label":`${i}-edit`,"data-testid":`${i}-button`,size:"medium",role:"link",onClick:b,className:a.button,variant:"outlined"},"Configure"))))};export{M as CollectorSummaryCard,l as ConfigurableCollectorIds};
|
|
2
2
|
//# sourceMappingURL=CollectorSummaryCard.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
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{useApi as r,githubAuthApiRef as l,configApiRef as f}from"@backstage/core-plugin-api";import{identityApiRef as p}from"@backstage/frontend-plugin-api";import{useTemplateSecrets as g}from"@backstage/plugin-scaffolder-react";import{makeStyles as d}from"@material-ui/core";import{SpotifyLicenseBanner as u}from"@spotify/backstage-plugin-core";import e from"react";import E from"react-use/lib/useAsync";import{AlertProvider as A}from"../../hooks/useSoundcheckAlert.esm.js";import{soundcheckBackend as y,invalidLicenseMessage as k}from"../../utils/license.esm.js";import{CertificationsPage as v}from"../CertificationsPage/CertificationsPage.esm.js";const h=d(t=>({root:{"&:not(:first-child)":{marginTop:t.spacing(2)}}})),L=()=>{const t=h(),o=r(l),i=r(p),n=r(f).getOptionalStringArray("soundcheck.flags")?.includes("enable-fix-me"),{setSecrets:a}=g();return E(async()=>{const[m,s,c]=await Promise.all([n?o.getAccessToken(void 0,{optional:!0}):Promise.resolve(""),i.getProfileInfo(),i.getBackstageIdentity()]);a({GHE_LOGIN:c.userEntityRef.replace("default/",""),GHE_EMAIL:s.email,GHE_TOKEN:m})},[o,i]),e.createElement(e.Fragment,null,e.createElement(A,null,e.createElement(u,{backend:y,invalidLicenseMessage:k,inline:!0}),e.createElement("div",{className:t.root},e.createElement(v,null))))};export{L as EntityContent};
|
|
2
2
|
//# sourceMappingURL=EntityContent.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
|