@spotify/backstage-plugin-soundcheck 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/api.esm.js +1 -1
- package/dist/blueprints/IntegrationPageBlueprint.esm.js +1 -1
- package/dist/components/Badges/StatusBadge.esm.js +1 -1
- package/dist/components/CampaignForm/Steps/CampaignDetailsStep/CampaignOwnerField.esm.js +1 -1
- package/dist/components/CheckForm/CheckForm.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/CheckPathResolverInput.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/CheckScheduleSection/ScheduleSection.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/RuleInput/Conditions/useRuleOptions.esm.js +1 -1
- package/dist/components/CheckForm/FormFields/TeamDetailsInput/TeamDetailsInput.esm.js +1 -1
- package/dist/components/CheckPage/CheckInsightsPage.esm.js +1 -1
- package/dist/components/CollapsablePanel/CollapsablePanel.esm.js +1 -1
- package/dist/components/CollectorPage/CollectorDetailsPage.esm.js +2 -0
- package/dist/components/CollectorPage/CollectorFactTable.esm.js +2 -0
- package/dist/components/CollectorPage/Configurators/Github/CodeScanningAlertsFactDetails.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/DependabotAlertsFactDetails.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/SecretScanningAlertsFactDetails.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/Github/SecurityAdvisoriesFactDetails.esm.js +1 -1
- package/dist/components/CollectorPage/Configurators/SonarQube/IssuesFactDetailsInput.esm.js +1 -1
- package/dist/components/CollectorsPage/CollectorListPage/CollectorSummaryCard.esm.js +1 -1
- package/dist/components/ColorChip/ColorChip.esm.js +2 -0
- package/dist/components/Expand/Expand.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorer.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorerContext.esm.js +1 -1
- package/dist/components/FactExplorer/FactExplorerDialog.esm.js +1 -1
- package/dist/components/FactExplorer/useFactOptions.esm.js +1 -1
- package/dist/components/FormControlledAutocomplete/ControlledAutocomplete.esm.js +1 -1
- package/dist/components/GroupHierarchySelector/GroupHierarchyCategorySelection.esm.js +2 -0
- package/dist/components/GroupHierarchySelector/GroupHierarchyChip.esm.js +2 -0
- package/dist/components/GroupHierarchySelector/GroupHierarchyGroupInfo.esm.js +2 -0
- package/dist/components/GroupHierarchySelector/GroupHierarchySelector.esm.js +2 -0
- package/dist/components/GroupHierarchySelector/GroupHierarchySelectorDialog.esm.js +2 -0
- package/dist/components/GroupHierarchySelector/usePreviousSelectedGroups.esm.js +2 -0
- package/dist/components/QuickstartPage/HowDoIListItem.esm.js +1 -1
- package/dist/components/QuickstartPage/QuickstartCardBase.esm.js +1 -1
- package/dist/components/QuickstartPage/QuickstartPage.esm.js +2 -1
- package/dist/components/QuickstartPage/WelcomeHelpSection.esm.js +5 -5
- package/dist/components/QuickstartPage/WelcomeModal.esm.js +1 -1
- package/dist/components/QuickstartPage/styles.esm.js +1 -1
- package/dist/components/RoutingPage/RoutingPage.esm.js +1 -1
- package/dist/components/SoundcheckHeader/SoundcheckHeader.esm.js +1 -1
- package/dist/components/SoundcheckHeader/headerUtil.esm.js +1 -1
- package/dist/components/TechHealth/Filters/FilterProvider.esm.js +1 -1
- package/dist/components/TechHealth/Loading/Loading.esm.js +1 -1
- package/dist/components/TechHealth/Loading/TechHealthLoading.esm.js +1 -1
- package/dist/components/TechInsights/ColorLegend.esm.js +1 -1
- package/dist/components/TechInsights/ColorSchemeSelector.esm.js +2 -0
- package/dist/components/TechInsights/FilterControls.esm.js +2 -0
- package/dist/components/TechInsights/HierarchicalTechInsightsPage.esm.js +2 -0
- package/dist/components/TechInsights/HierarchyTable.esm.js +2 -0
- package/dist/components/TechInsights/LoadingOverlay.esm.js +1 -1
- package/dist/components/TechInsights/LowestPerformingTeams.esm.js +1 -1
- package/dist/components/TechInsights/NivoCirclePacking.esm.js +1 -1
- package/dist/components/TechInsights/NivoIcicle.esm.js +1 -1
- package/dist/components/TechInsights/NivoSunburst.esm.js +1 -1
- package/dist/components/TechInsights/NivoTreemap.esm.js +1 -1
- package/dist/components/TechInsights/SelectedNodeSidebar.esm.js +2 -0
- package/dist/components/TechInsights/SummaryTiles.esm.js +2 -0
- package/dist/components/TechInsights/TeamComparison/FailingComponentsTable.esm.js +1 -1
- package/dist/components/TechInsights/TeamComparison/MultiCheckStatusHistoryChart.esm.js +1 -1
- package/dist/components/TechInsights/TeamPerformanceCard.esm.js +1 -1
- package/dist/components/TechInsights/TeamStatusBar.esm.js +2 -0
- package/dist/components/TechInsights/TechInsightsCardsView.esm.js +2 -0
- package/dist/components/TechInsights/TechInsightsChartView.esm.js +2 -0
- package/dist/components/TechInsights/TechInsightsGroupSelector.esm.js +1 -1
- package/dist/components/TechInsights/TechInsightsPage2.esm.js +1 -1
- package/dist/components/TechInsights/TechInsightsTableView.esm.js +2 -0
- package/dist/components/TechInsights/TechInsightsViewSelector.esm.js +1 -1
- package/dist/components/TechInsights/Tiles/TileUtils.esm.js +1 -1
- package/dist/components/TechInsights/Tiles/TrackStatusCard.esm.js +2 -0
- package/dist/components/TechInsights/TopPerformingTeams.esm.js +1 -1
- package/dist/components/TechInsights/ViewModeControls.esm.js +2 -0
- package/dist/components/TechInsights/VisualizationBreadcrumb.esm.js +2 -0
- package/dist/components/TechInsights/findNodePath.esm.js +2 -0
- package/dist/components/TechInsights/hierarchy/GroupNode.esm.js +1 -1
- package/dist/components/TechInsights/hierarchy/Hierarchy.esm.js +1 -1
- package/dist/components/TechInsights/hierarchyToNivo.esm.js +1 -1
- package/dist/components/TechInsights/persistence/FavoriteViews.esm.js +1 -1
- package/dist/components/TechInsights/styles.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackBadgeTypeSelect/TrackBadgeTypeSelect.esm.js +1 -1
- package/dist/components/TrackForm/Steps/TrackDetailsStep/TrackOwnerSelect/TrackOwnerSelect.esm.js +1 -1
- package/dist/components/TrackPage/TrackEntitiesTable/TrackStatusChip.esm.js +1 -1
- package/dist/components/TrackPage/TrackPage.esm.js +1 -1
- package/dist/components/TrackSelection/TrackSelection.esm.js +2 -0
- package/dist/graphql/generated/index.esm.js +188 -133
- package/dist/hooks/cache/useEntityCountCached.esm.js +2 -0
- package/dist/hooks/cache/useTrackCountCached.esm.js +2 -0
- package/dist/hooks/campaigns/useGetCampaigns.esm.js +1 -1
- package/dist/hooks/catalog/useGetEntityCount.esm.js +2 -0
- package/dist/hooks/checks/useUpdateCheck.esm.js +1 -1
- package/dist/hooks/graphqlKeys.esm.js +1 -1
- package/dist/hooks/groups/useAllGroups.esm.js +1 -1
- package/dist/hooks/groups/useGroupOptions.esm.js +1 -1
- package/dist/hooks/heirarchy/useBatchedHierarchicalTrackStatuses.esm.js +2 -0
- package/dist/hooks/heirarchy/useGroupHierarchy.esm.js +1 -1
- package/dist/hooks/heirarchy/useGroupTypeHierarchy.esm.js +2 -0
- package/dist/hooks/heirarchy/useHierarchicalTrackStatus.esm.js +1 -1
- package/dist/hooks/tracks/useGetAllTracks.esm.js +1 -1
- package/dist/hooks/tracks/useGetTracksApplicableEntityCount.esm.js +2 -0
- package/dist/hooks/tracks/useTracksApplicableToGroup.esm.js +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/routes.esm.js +1 -1
- package/package.json +25 -24
- package/dist/components/QuickstartPage/QuickStartChecksCard.esm.js +0 -2
- package/dist/components/QuickstartPage/QuickstartCollectorConfigurationsCard.esm.js +0 -2
- package/dist/components/QuickstartPage/QuickstartTracksCard.esm.js +0 -2
- package/dist/components/TechHealth/Loading/Emoji.esm.js +0 -2
- package/dist/components/TechHealth/Loading/EmojiFountain.esm.js +0 -2
- package/dist/components/TechInsights/TeamComparison/CheckComparison.esm.js +0 -2
- package/dist/components/TechInsights/TeamComparison/LineChartContainer.esm.js +0 -2
- package/dist/components/TechInsights/TeamComparison/MultiTrackHistoryChart.esm.js +0 -2
- package/dist/components/TechInsights/TeamComparison/TeamComparison.esm.js +0 -2
- package/dist/components/TechInsights/TeamComparison/TrackComparison.esm.js +0 -2
- package/dist/components/TechInsights/TechInsightsPage.esm.js +0 -2
- package/dist/components/TechInsights/TechInsightsSidebar.esm.js +0 -2
- package/dist/components/TechInsights/Tiles/CheckStatusTile.esm.js +0 -2
- package/dist/components/TechInsights/Tiles/TrackStatusTile.esm.js +0 -2
- package/dist/components/TechInsights/TrackCardGrid.esm.js +0 -2
- package/dist/components/TechInsights/TrackCardGridBox.esm.js +0 -2
- package/dist/components/TechInsights/hierarchy/VirtualRow.esm.js +0 -2
- package/dist/hooks/aggregations/useCertificationStatusHistories.esm.js +0 -2
- package/dist/hooks/aggregations/useCertificationStatuses.esm.js +0 -2
- package/dist/hooks/aggregations/useCheckStatusByGroups.esm.js +0 -2
- package/dist/hooks/aggregations/useCheckStatusHistoriesMultiFilter.esm.js +0 -2
- package/dist/hooks/heirarchy/useRootGroups.esm.js +0 -2
- package/dist/hooks/savedViews/useDeleteView.esm.js +0 -2
- package/dist/hooks/savedViews/useSaveView.esm.js +0 -2
- package/dist/hooks/savedViews/useSavedViews.esm.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @spotify/backstage-plugin-soundcheck
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependency `@types/git-url-parse` to `^16.0.0`.
|
|
8
|
+
- Updated dependency `@types/jest` to `^30.0.0`.
|
|
9
|
+
- Updated dependency `slate` to `^0.117.0`.
|
|
10
|
+
Updated dependency `slate-history` to `0.113.1`.
|
|
11
|
+
Updated dependency `slate-react` to `^0.117.0`.
|
|
12
|
+
- Updated dependency `backstage` to `1.41.1`.
|
|
13
|
+
- Soundcheck - Adds pseudo landing page for portal installs only.
|
|
14
|
+
- Added initial integration details page.
|
|
15
|
+
- Updates the loading screen used by Soundcheck to display a useful message instead of a simple icon.
|
|
16
|
+
- Changed fact explorer to allow an arbitrary fact ref to use for custom tracks.
|
|
17
|
+
- Removed some MUI v5 dependencies
|
|
18
|
+
- Added applicableEntitiesCount property to Track graphql API.
|
|
19
|
+
- Made it more obvious in the Check form that we do not recommend scheduling checks.
|
|
20
|
+
- Added advanced group selection to tech insights page
|
|
21
|
+
- Updated types.
|
|
22
|
+
- Fixed issue where checks with check results pushed in through API would not have a check insights page.
|
|
23
|
+
- Fixed Soundcheck fact collector references in No-Code UI.
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
- @spotify/backstage-plugin-core@0.8.9
|
|
30
|
+
- @spotify/backstage-plugin-soundcheck-common@0.18.1
|
|
31
|
+
|
|
3
32
|
## 0.18.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
package/dist/api.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createApiRef as c}from"@backstage/core-plugin-api";import{GraphQLClient as h}from"graphql-request";import{getSdk as u}from"./graphql/generated/index.esm.js";const y=c({id:"plugin.soundcheck"}),o=r=>"response"in r&&"errors"in r.response,g=r=>"response"in r&&"message"in r.response;class p{#s;#a;#t;constructor(t){this.#s=t.fetchApi,this.#a=t.discoveryApi;const e=new h("/graphql",{fetch:async(s,a)=>{const n=`${await this.#a.getBaseUrl("soundcheck")}${s}`;return this.#s.fetch(n,a)}});this.#t=u(e)}#r=t=>o(t)?t.response?.errors?.[0].message??`${t}`:g(t)?t.response.message:`${t}`;#e=async t=>{try{return await t()}catch(e){throw new Error(`Error from Soundcheck backend: ${this.#r(e)}`)}};async getAllCertifications(t,e=!1,s=!1){return this.#e(async()=>{const{certifications:a}=await this.#t.getAllCertifications({entityRef:t,includeFilteredChecks:e,includeDraftTracks:s});return a})}async getCertificationDetails(t,e=!1,s=!1){return this.#e(async()=>{const{certifications:a}=await this.#t.getCertificationDetails({entityRef:t,includeFilteredChecks:e,includeDraftTracks:s});return a})}async getCertificationDetailsForTrack(t,e,s){return this.#e(async()=>{const{trackCertification:a}=await this.#t.getCertificationDetailsForTrack({entityRef:t,trackId:e,includeFilteredChecks:s});return a})}async getCheckResultDetails(t,e,s){return this.#e(async()=>{const{checkResult:a}=await this.#t.getCheckResultDetails({entityRef:t,trackId:e,checkId:s});return a})}async getFacetsForOwner(t){return this.#e(async()=>{const{facetsForOwner:e}=await this.#t.getFacetsForOwner({ownerEntityRef:t});return e})}async getTrackOverviewForOwner(t,e,s,a,n){return this.#e(async()=>{const{trackOverviewForOwner:i}=await this.#t.getTrackOverviewForOwner({ownerEntityRef:t,facet:e,first:s,after:a,entitySearch:n});return i})}async getTracks(t){return this.#e(async()=>{const{tracks:e}=await this.#t.getTracks({filter:t});return e})}async getTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.getTrack({id:t});return e})}async createTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.createTrack({input:t});return e})}async updateTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.updateTrack({input:t});return e})}async deleteTrack(t){return this.#e(async()=>{const{trackDeleted:e}=await this.#t.deleteTrack({trackId:t});return e})}async importTracks(t){return this.#e(async()=>{const{status:e}=await this.#t.importTracks({tracks:t});return e})}async getPlaylists(t){return this.#e(async()=>{const{playlists:e}=await this.#t.getPlaylists({entityRef:t});return e})}async getOperators(){return this.#e(async()=>{const{operators:t}=await this.#t.getOperators();return t})}async getCheck(t){return this.#e(async()=>(await this.#t.getCheck({id:t})).check)}async getChecks(t){return this.#e(async()=>{const{checkers:e}=await this.#t.getCheckers({filter:t});return e})}async getExecutableChecks(){return this.#e(async()=>{const{executableChecks:t}=await this.#t.getExecutableChecks();return t})}async createCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.createCheck({input:t});return e})}async updateCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.updateCheck({input:t});return e})}async deleteCheck(t){return this.#e(async()=>await this.#t.deleteChecker({checkerId:t}))}async executeCheck(t){return this.#e(async()=>{const{result:e}=await this.#t.executeCheck({input:t});return e})}async importChecks(t){return this.#e(async()=>{const{status:e}=await this.#t.importCheckers({checkers:t});return e})}async setEntityExempt(t){return this.#e(async()=>{const{setEntityExempt:e}=await this.#t.setEntityExempt({input:t});return e})}async setManualCheckResult(t){return this.#e(async()=>await this.#t.setManualCheckResult({input:t}))}async deleteExemption(t,e){return this.#e(async()=>await this.#t.deleteExemption({checkId:t,entityRef:e}))}async getExemption(t,e){return this.#e(async()=>await this.#t.getExemption({checkId:t,entityRef:e}))}async getExemptions(t,e,s,a,n){return this.#e(async()=>await this.#t.getExemptions({checkId:t,first:e,after:s,last:a,before:n}))}async getExemptCheckIds(t,e){return this.#e(async()=>await this.#t.getExemptCheckIds({entityRef:t,trackId:e}))}async getCollectors(t){return this.#e(async()=>{const{collectors:e}=await this.#t.getCollectors({ids:t});return e})}async getFactSchema(t,e){if(!(!t||!e))return this.#e(async()=>{const{factSchema:s}=await this.#t.getFactSchemas({collectorId:t,factName:e});return s})}async updateCollectorConfig(t){return this.#e(async()=>{const{collector:e}=await this.#t.updateCollectorConfig({input:t});return e})}async getOverallCheckPassRates(t){return this.#e(async()=>await this.#t.getOverallCheckPassRates({filter:t}))}async getIndividualCheckPassRates(t){return this.#e(async()=>await this.#t.getIndividualCheckPassRates({filter:t}))}async getOverallTrackPassRate(t){return this.#e(async()=>await this.#t.getOverallTrackPassRate({filter:t}))}async getIndividualTrackPassRate(t){return this.#e(async()=>await this.#t.getIndividualTrackPassRate({filter:t}))}async getOverallEntityPassRates(t){return this.#e(async()=>await this.#t.getOverallEntityPassRates({filter:t}))}async getIndividualEntityPassRates(t){return this.#e(async()=>await this.#t.getIndividualEntityPassRates({input:t}))}async getOverallGroupPassRates(t){return this.#e(async()=>await this.#t.getOverallGroupPassRates({input:t}))}async getIndividualGroupPassRates(t){return this.#e(async()=>await this.#t.getIndividualGroupPassRates({input:t}))}async getEntityRefsForTechHealthFilter(t){return this.#e(async()=>await this.#t.getEntityRefsForTechHealthFilter({ownerEntityRef:t}))}async getTrackEntities(t){return this.#e(async()=>await this.#t.getTrackEntities({input:t}))}async getCampaigns(t,e){return this.#e(async()=>{const{campaigns:s}=await this.#t.getCampaigns({filter:t,byTrackIds:e});return s})}async createCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.createCampaign({input:t});return e})}async updateCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.updateCampaign({input:t});return e})}async deleteCampaign(t){return this.#e(async()=>{const{campaignDeleted:e}=await this.#t.deleteCampaign({campaignId:t});return e})}async sendCampaignNotification(t){return this.#e(async()=>{const{sendCampaignNotification:e}=await this.#t.sendCampaignNotification({input:t});return e})}async archiveCampaign(t){return this.#e(async()=>{const{campaignArchived:e}=await this.#t.archiveCampaign({campaignId:t});return e})}async getCampaignOwners(){return this.#e(async()=>{const{campaignOwners:t}=await this.#t.getCampaignOwners();return t})}async getCheckOwners(){return this.#e(async()=>{const{checkOwners:t}=await this.#t.getCheckOwners();return t})}async getTrackOwners(){return this.#e(async()=>{const{trackOwners:t}=await this.#t.getTrackOwners();return t})}async getCertificationStatus(t){return this.#e(async()=>this.#t.getCertificationStatus({input:t}))}async getCertificationStatusHistory(t){return this.#e(async()=>this.#t.getCertificationStatusHistory({input:t}))}async getCheckStatus(t){return this.#e(async()=>(await this.#t.getCheckStatus({input:t})).checkStatus)}async getCheckStatuses(t){return this.#e(async()=>(await this.#t.getCheckStatuses({input:t})).checkStatuses)}async getCheckStatusHistory(t){return this.#e(async()=>(await this.#t.getCheckStatusHistory({input:t})).checkStatusHistory)}async getCheckStatusHistories(t){return this.#e(async()=>(await this.#t.getCheckStatusHistories({input:t})).checkStatusHistories)}async getCheckEntities(t){return this.#e(async()=>await this.#t.getCheckEntities({input:t}))}async getSavedViews(t){return this.#e(async()=>await this.#t.getSavedViews({input:t}))}async saveView(t){return this.#e(async()=>{const{saveView:e}=await this.#t.saveView({input:t});return e})}async deleteView(t){return this.#e(async()=>{const{deleteView:e}=await this.#t.deleteView({input:t});return e})}async getPathResolvers(){return this.#e(async()=>{const{pathResolvers:t}=await this.#t.getPathResolvers();return t})}async getCheckTemplates(){return this.#e(async()=>{const{checkerTemplates:t}=await this.#t.getCheckTemplates();return t})}async getFact(t){return this.#e(async()=>{const{fact:e}=await this.#t.getFact(t);return e})}async getRootGroups(){return this.#e(async()=>{const{rootGroups:t}=await this.#t.rootGroups();return t})}async getDescendantsOfGroups(t){return this.#e(async()=>{const{getDescendantsOfGroups:e}=await this.#t.getDescendentsOfGroups({ids:t});return e})}async getGroupTypeHierarchy(){return this.#e(async()=>{const{groupTypeHierarchy:t}=await this.#t.getGroupTypeHierarchy();return t})}async getGroupHierarchy(t){return this.#e(async()=>{const{groupHierarchy:e}=await this.#t.getGroupHierarchy({groupRef:t});return e})}async getHierarchicalTrackStatus(t,e){return this.#e(async()=>{const{hierarchicalTrackStatus:s}=await this.#t.getHierarchicalTrackStatus({trackId:t,groupRef:e});return s})}}export{p as SoundcheckApi,y as soundcheckApiRef};
|
|
1
|
+
import{createApiRef as c}from"@backstage/core-plugin-api";import{GraphQLClient as u}from"graphql-request";import{getSdk as h}from"./graphql/generated/index.esm.js";const y=c({id:"plugin.soundcheck"}),o=r=>"response"in r&&"errors"in r.response,g=r=>"response"in r&&"message"in r.response;class p{#s;#a;#t;constructor(t){this.#s=t.fetchApi,this.#a=t.discoveryApi;const e=new u("/graphql",{fetch:async(s,a)=>{const i=`${await this.#a.getBaseUrl("soundcheck")}${s}`;return this.#s.fetch(i,a)}});this.#t=h(e)}#r=t=>o(t)?t.response?.errors?.[0].message??`${t}`:g(t)?t.response.message:`${t}`;#e=async t=>{try{return await t()}catch(e){throw new Error(`Error from Soundcheck backend: ${this.#r(e)}`)}};async getMultipleTrackStatuses(t){return this.#e(async()=>{const{multipleTrackStatuses:e}=await this.#t.getMultipleTrackStatuses({input:t});return e})}async getAllCertifications(t,e=!1,s=!1){return this.#e(async()=>{const{certifications:a}=await this.#t.getAllCertifications({entityRef:t,includeFilteredChecks:e,includeDraftTracks:s});return a})}async getCertificationDetails(t,e=!1,s=!1){return this.#e(async()=>{const{certifications:a}=await this.#t.getCertificationDetails({entityRef:t,includeFilteredChecks:e,includeDraftTracks:s});return a})}async getCertificationDetailsForTrack(t,e,s){return this.#e(async()=>{const{trackCertification:a}=await this.#t.getCertificationDetailsForTrack({entityRef:t,trackId:e,includeFilteredChecks:s});return a})}async getCheckResultDetails(t,e,s){return this.#e(async()=>{const{checkResult:a}=await this.#t.getCheckResultDetails({entityRef:t,trackId:e,checkId:s});return a})}async getFacetsForOwner(t){return this.#e(async()=>{const{facetsForOwner:e}=await this.#t.getFacetsForOwner({ownerEntityRef:t});return e})}async getTrackOverviewForOwner(t,e,s,a,i){return this.#e(async()=>{const{trackOverviewForOwner:n}=await this.#t.getTrackOverviewForOwner({ownerEntityRef:t,facet:e,first:s,after:a,entitySearch:i});return n})}async getTracks(t){return this.#e(async()=>{const{tracks:e}=await this.#t.getTracks({filter:t});return e})}async getTracksApplicableEntityCount(t,e){return this.#e(async()=>{const{tracks:s}=await this.#t.getTracksApplicableEntityCount({filter:t,groupRef:e});return s?.edges?.map(({node:a})=>({id:a.id,applicableEntityCount:a.applicableEntityCount??0}))})}async getTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.getTrack({id:t});return e})}async createTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.createTrack({input:t});return e})}async updateTrack(t){return this.#e(async()=>{const{track:e}=await this.#t.updateTrack({input:t});return e})}async deleteTrack(t){return this.#e(async()=>{const{trackDeleted:e}=await this.#t.deleteTrack({trackId:t});return e})}async importTracks(t){return this.#e(async()=>{const{status:e}=await this.#t.importTracks({tracks:t});return e})}async getPlaylists(t){return this.#e(async()=>{const{playlists:e}=await this.#t.getPlaylists({entityRef:t});return e})}async getOperators(){return this.#e(async()=>{const{operators:t}=await this.#t.getOperators();return t})}async getCheck(t){return this.#e(async()=>(await this.#t.getCheck({id:t})).check)}async getChecks(t){return this.#e(async()=>{const{checkers:e}=await this.#t.getCheckers({filter:t});return e})}async getExecutableChecks(){return this.#e(async()=>{const{executableChecks:t}=await this.#t.getExecutableChecks();return t})}async createCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.createCheck({input:t});return e})}async updateCheck(t){return this.#e(async()=>{const{check:e}=await this.#t.updateCheck({input:t});return e})}async deleteCheck(t){return this.#e(async()=>await this.#t.deleteChecker({checkerId:t}))}async executeCheck(t){return this.#e(async()=>{const{result:e}=await this.#t.executeCheck({input:t});return e})}async importChecks(t){return this.#e(async()=>{const{status:e}=await this.#t.importCheckers({checkers:t});return e})}async setEntityExempt(t){return this.#e(async()=>{const{setEntityExempt:e}=await this.#t.setEntityExempt({input:t});return e})}async setManualCheckResult(t){return this.#e(async()=>await this.#t.setManualCheckResult({input:t}))}async deleteExemption(t,e){return this.#e(async()=>await this.#t.deleteExemption({checkId:t,entityRef:e}))}async getExemption(t,e){return this.#e(async()=>await this.#t.getExemption({checkId:t,entityRef:e}))}async getExemptions(t,e,s,a,i){return this.#e(async()=>await this.#t.getExemptions({checkId:t,first:e,after:s,last:a,before:i}))}async getExemptCheckIds(t,e){return this.#e(async()=>await this.#t.getExemptCheckIds({entityRef:t,trackId:e}))}async getCollectors(t){return this.#e(async()=>{const{collectors:e}=await this.#t.getCollectors({ids:t});return e})}async getFactSchema(t,e){if(!(!t||!e))return this.#e(async()=>{const{factSchema:s}=await this.#t.getFactSchemas({collectorId:t,factName:e});return s})}async updateCollectorConfig(t){return this.#e(async()=>{const{collector:e}=await this.#t.updateCollectorConfig({input:t});return e})}async getOverallCheckPassRates(t){return this.#e(async()=>await this.#t.getOverallCheckPassRates({filter:t}))}async getIndividualCheckPassRates(t){return this.#e(async()=>await this.#t.getIndividualCheckPassRates({filter:t}))}async getOverallTrackPassRate(t){return this.#e(async()=>await this.#t.getOverallTrackPassRate({filter:t}))}async getIndividualTrackPassRate(t){return this.#e(async()=>await this.#t.getIndividualTrackPassRate({filter:t}))}async getOverallEntityPassRates(t){return this.#e(async()=>await this.#t.getOverallEntityPassRates({filter:t}))}async getIndividualEntityPassRates(t){return this.#e(async()=>await this.#t.getIndividualEntityPassRates({input:t}))}async getOverallGroupPassRates(t){return this.#e(async()=>await this.#t.getOverallGroupPassRates({input:t}))}async getIndividualGroupPassRates(t){return this.#e(async()=>await this.#t.getIndividualGroupPassRates({input:t}))}async getEntityRefsForTechHealthFilter(t){return this.#e(async()=>await this.#t.getEntityRefsForTechHealthFilter({ownerEntityRef:t}))}async getTrackEntities(t){return this.#e(async()=>await this.#t.getTrackEntities({input:t}))}async getCampaigns(t,e){return this.#e(async()=>{const{campaigns:s}=await this.#t.getCampaigns({filter:t,byTrackIds:e});return s})}async createCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.createCampaign({input:t});return e})}async updateCampaign(t){return this.#e(async()=>{const{campaign:e}=await this.#t.updateCampaign({input:t});return e})}async deleteCampaign(t){return this.#e(async()=>{const{campaignDeleted:e}=await this.#t.deleteCampaign({campaignId:t});return e})}async sendCampaignNotification(t){return this.#e(async()=>{const{sendCampaignNotification:e}=await this.#t.sendCampaignNotification({input:t});return e})}async archiveCampaign(t){return this.#e(async()=>{const{campaignArchived:e}=await this.#t.archiveCampaign({campaignId:t});return e})}async getCampaignOwners(){return this.#e(async()=>{const{campaignOwners:t}=await this.#t.getCampaignOwners();return t})}async getCheckOwners(){return this.#e(async()=>{const{checkOwners:t}=await this.#t.getCheckOwners();return t})}async getTrackOwners(){return this.#e(async()=>{const{trackOwners:t}=await this.#t.getTrackOwners();return t})}async getCertificationStatus(t){return this.#e(async()=>this.#t.getCertificationStatus({input:t}))}async getCertificationStatusHistory(t){return this.#e(async()=>this.#t.getCertificationStatusHistory({input:t}))}async getTrackStatusHistory(t){return this.#e(async()=>(await this.#t.getTrackStatusHistory({input:t})).trackStatusHistory)}async getTrackStatusHistories(t){return this.#e(async()=>(await this.#t.getTrackStatusHistories({input:t})).trackStatusHistories)}async getCheckStatus(t){return this.#e(async()=>(await this.#t.getCheckStatus({input:t})).checkStatus)}async getCheckStatuses(t){return this.#e(async()=>(await this.#t.getCheckStatuses({input:t})).checkStatuses)}async getCheckStatusHistory(t){return this.#e(async()=>(await this.#t.getCheckStatusHistory({input:t})).checkStatusHistory)}async getCheckStatusHistories(t){return this.#e(async()=>(await this.#t.getCheckStatusHistories({input:t})).checkStatusHistories)}async getCheckEntities(t){return this.#e(async()=>await this.#t.getCheckEntities({input:t}))}async getSavedViews(t){return this.#e(async()=>await this.#t.getSavedViews({input:t}))}async saveView(t){return this.#e(async()=>{const{saveView:e}=await this.#t.saveView({input:t});return e})}async deleteView(t){return this.#e(async()=>{const{deleteView:e}=await this.#t.deleteView({input:t});return e})}async getPathResolvers(){return this.#e(async()=>{const{pathResolvers:t}=await this.#t.getPathResolvers();return t})}async getCheckTemplates(){return this.#e(async()=>{const{checkerTemplates:t}=await this.#t.getCheckTemplates();return t})}async getFact(t){return this.#e(async()=>{const{fact:e}=await this.#t.getFact(t);return e})}async getRootGroups(){return this.#e(async()=>{const{rootGroups:t}=await this.#t.rootGroups();return t})}async getDescendantsOfGroups(t){return this.#e(async()=>{const{getDescendantsOfGroups:e}=await this.#t.getDescendentsOfGroups({ids:t});return e})}async getAncestorsOfGroups(t){return this.#e(async()=>{const{getAncestorsOfGroups:e}=await this.#t.getAncestorsOfGroups({ids:t});return e})}async getGroupTypeHierarchy(){return this.#e(async()=>{const{groupTypeHierarchy:t}=await this.#t.getGroupTypeHierarchy();return t})}async getGroupHierarchy(t,e,s){return this.#e(async()=>{const{groupHierarchy:a}=await this.#t.getGroupHierarchy({groupRef:t,ownedEntitiesFilter:e,includeParent:s});return a})}async getHierarchicalTrackStatus(t,e){return this.#e(async()=>{const{hierarchicalTrackStatus:s}=await this.#t.getHierarchicalTrackStatus({trackId:t,groupRef:e});return s})}async getHierarchicalTrackStatuses(t,e){return this.#e(async()=>{const{hierarchicalTrackStatuses:s}=await this.#t.getHierarchicalTrackStatuses({trackIds:t,groupRef:e});return s})}}export{p as SoundcheckApi,y as soundcheckApiRef};
|
|
2
2
|
//# sourceMappingURL=api.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{compatWrapper as c}from"@backstage/core-compat-api";import{createExtensionDataRef as s,createExtensionBlueprint as g,coreExtensionData as t,ExtensionBoundary as l}from"@backstage/frontend-plugin-api";import{lazy as f}from"react";import{RoutingPageWrapper as m}from"../components/RoutingPage/RoutingPage.esm.js";const e=s().with({id:"soundcheck.integrationId"}),h=g({kind:"integration",attachTo:[{id:"page:soundcheck/SoundcheckRoutingPage",input:"integrations"},{id:"app/routes",input:"routes"}],output:[t.routePath,t.reactElement,t.routeRef.optional(),e],dataRefs:{integrationId:e},*factory({integrationId:n,loader:r,path:a,routeRef:i},{node:d}){const p=f(()=>r().then(u=>({default:()=>u})));yield t.routePath(a??`/soundcheck/integrations/${n}`),yield t.reactElement(c(o(l,{node:d,children:o(m,{children:o(p,{})})}))),i&&(yield t.routeRef(i)),yield e(n)}});export{h as IntegrationPageBlueprint,e as integrationIdExtensionDataRef};
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{compatWrapper as c}from"@backstage/core-compat-api";import{createExtensionDataRef as s,createExtensionBlueprint as g,coreExtensionData as t,ExtensionBoundary as l}from"@backstage/frontend-plugin-api";import{lazy as f}from"react";import{RoutingPageWrapper as m}from"../components/RoutingPage/RoutingPage.esm.js";const e=s().with({id:"soundcheck.integrationId"}),h=g({kind:"integration",attachTo:[{id:"page:soundcheck/SoundcheckRoutingPage",input:"integrations"},{id:"app/routes",input:"routes"}],output:[t.routePath,t.reactElement,t.routeRef.optional(),e],dataRefs:{integrationId:e},*factory({integrationId:n,loader:r,path:a,routeRef:i},{node:d}){const p=f(()=>r().then(u=>({default:()=>u})));yield t.routePath(a??`/soundcheck/integrations/${n}/edit`),yield t.reactElement(c(o(l,{node:d,children:o(m,{children:o(p,{})})}))),i&&(yield t.routeRef(i)),yield e(n)}});export{h as IntegrationPageBlueprint,e as integrationIdExtensionDataRef};
|
|
2
2
|
//# sourceMappingURL=IntegrationPageBlueprint.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,Fragment as k,jsxs as d}from"react/jsx-runtime";import{makeStyles as C,useTheme as b,Box as y,Tooltip as $}from"@material-ui/core";import z from"@material-ui/icons/Check";import N from"@material-ui/icons/Close";import v from"@material-ui/icons/
|
|
1
|
+
import{jsx as e,Fragment as k,jsxs as d}from"react/jsx-runtime";import{makeStyles as C,useTheme as b,Box as y,Tooltip as $}from"@material-ui/core";import z from"@material-ui/icons/Check";import N from"@material-ui/icons/Close";import v from"@material-ui/icons/HelpOutline";import x from"@material-ui/icons/PriorityHigh";import W from"classnames";import{CircularProgressbarWithChildren as p,buildStyles as c}from"react-circular-progressbar";import"react-circular-progressbar/dist/styles.css";const u=24,w=15,h=s=>s==="small"?1:2,L=C(s=>({root:{position:"relative",display:"inline-block",alignItems:"center",justifyContent:"center",cursor:"default",lineHeight:0,width:({size:t})=>`${u*h(t)}px`,height:({size:t})=>`${u*h(t)}px`},icon:{color:s.palette.background.default,fontSize:({size:t})=>w*h(t)}})),S=({className:s,status:t,size:f="small"})=>{const l=L({size:f}),n=b();if(!t)return e(k,{});const o=t.passed+t.failed+t.warning+t.error+t.notReported,r=o?t.passed/o*100:0,a=o?t.warning/o*100:0,i=o?(t.failed+t.error)/o*100:0,m=100-r-a-i,g=e(y,{className:W(s,l.root),role:"img","aria-label":`${r} badge`,children:d(p,{value:r,strokeWidth:r<100?15:50,styles:c({pathColor:n.palette.success.main,trailColor:"transparent",strokeLinecap:"butt",rotation:0}),children:[r===100&&e(z,{className:l.icon}),r<100&&d(p,{value:a,strokeWidth:a<100?15:50,styles:c({pathColor:n.palette.warning.main,trailColor:"transparent",strokeLinecap:"butt",rotation:r/100}),children:[a===100&&e(x,{className:l.icon}),a<100&&d(p,{value:i,strokeWidth:i<100?15:50,styles:c({pathColor:n.palette.error.main,trailColor:"transparent",strokeLinecap:"butt",rotation:(r+a)/100}),children:[i===100&&e(N,{className:l.icon}),i<100&&e(p,{value:m,strokeWidth:m<100?15:50,styles:c({pathColor:n.palette.divider,trailColor:"transparent",strokeLinecap:"butt",rotation:(r+a+i)/100}),children:m===100&&e(v,{className:l.icon})})]})]})]})});return e($,{title:`${t.passed}/${o} checks passed (${Math.round(r)}%)`,children:g})};export{S as StatusBadge};
|
|
2
2
|
//# sourceMappingURL=StatusBadge.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as l,jsx as o}from"react/jsx-runtime";import{makeStyles as g,Typography as m}from"@material-ui/core";import{uniqBy as h}from"lodash";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import"react";import{useLoggedInUser as v}from"../../../../contexts/UserProvider.esm.js";import{useGroupOptions as x}from"../../../../hooks/groups/useGroupOptions.esm.js";import{FormControlledAutocomplete as y}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"react-hook-form";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelOptions as w}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import{CAMPAIGN_FIELDS as b}from"../../utils/campaignFormUtils.esm.js";const C=g(e=>({helperText:{marginLeft:0},selectField:{display:"flex",flexDirection:"column",gap:e.spacing(1),marginBottom:e.spacing(2)},fieldContainer:{width:"250px"}})),F=({control:e,errors:p,isLoading:s,disabled:d})=>{const
|
|
1
|
+
import{jsxs as l,jsx as o}from"react/jsx-runtime";import{makeStyles as g,Typography as m}from"@material-ui/core";import{uniqBy as h}from"lodash";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import"react";import{useLoggedInUser as v}from"../../../../contexts/UserProvider.esm.js";import{useGroupOptions as x}from"../../../../hooks/groups/useGroupOptions.esm.js";import{FormControlledAutocomplete as y}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"react-hook-form";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelOptions as w}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"../../../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{CAMPAIGN_FIELDS as b}from"../../utils/campaignFormUtils.esm.js";const C=g(e=>({helperText:{marginLeft:0},selectField:{display:"flex",flexDirection:"column",gap:e.spacing(1),marginBottom:e.spacing(2)},fieldContainer:{width:"250px"}})),F=({control:e,errors:p,isLoading:s,disabled:d})=>{const t=C(),{owner:n}=b.details,{options:c}=x(),{user:f,userEntityRef:r}=v();let i=h(c?.map(a=>({value:a.ref,label:a.name})),"value");const u=w(i);return r&&(i=[{value:r,label:f?.metadata.name??r},...i]),l("div",{className:t.selectField,children:[l("header",{children:[o(m,{variant:"subtitle2",children:n.name}),o(m,{variant:"caption",children:n.description})]}),o("div",{className:t.fieldContainer,children:o(y,{name:"detailsStep.ownerEntityRef",control:e,placeholder:"Owner",freeSolo:!1,disabled:d||s,helperText:p?.ownerEntityRef?.message??void 0,...u})})]})};export{F as CampaignOwnerField};
|
|
2
2
|
//# sourceMappingURL=CampaignOwnerField.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{Content as s}from"@backstage/core-components";import{FormProvider as d}from"react-hook-form";import"../../contexts/TrackFormContext.esm.js";import{useCheckFormContext as h}from"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"react";import"../../contexts/UserProvider.esm.js";import{formStyles as f}from"../../utils/formStyles.esm.js";import"@material-ui/core";import"@material-ui/icons/Search";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import"../FactExplorer/FactExplorer.esm.js";import{FactExplorerProvider as S}from"../FactExplorer/FactExplorerContext.esm.js";import{FormStepper as u}from"../FormStepper/FormStepper.esm.js";import"./FormFields/CheckNameInput/CheckNameInput.esm.js";import"./FormFields/PassFailMessageInput/PassFailMessageInput.esm.js";import"../FormMarkdownInput/FormMarkdownInput.esm.js";import"./utils/checkFormUtils.esm.js";import"./FormFields/TeamDetailsInput/TeamDetailsInput.esm.js";import"./FormFields/RuleInput/AddMenuButton.esm.js";import"./FormFields/RuleInput/RuleInputBox.esm.js";import"./FormFields/RuleInput/Expressions/ExpressionBox.esm.js";import"./FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js";import"@material-ui/icons/Close";import"@material-ui/icons/Delete";import"@material-ui/icons/List";import"@spotify/backstage-plugin-soundcheck-common";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"./FormFields/RuleInput/Conditions/styles.esm.js";import"@backstage/catalog-model";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import"./FormFields/RuleInput/Conditions/ValueListInput.esm.js";import"./FormFields/RuleInput/Conditions/ConditionList.esm.js";import{ScheduleSection as C}from"./FormFields/CheckScheduleSection/ScheduleSection.esm.js";import"./FormFields/CheckPathResolverInput.esm.js";import{CheckDetailsStep as b}from"./Steps/CheckDetailsStep.esm.js";import{CheckRulesStep as k}from"./Steps/CheckRulesStep.esm.js";import{CheckApplicabilityStep as g}from"./Steps/CheckApplicabilityStep.esm.js";import{CheckReviewStep as v}from"./Steps/CheckReviewStep.esm.js";import"./types/ExpressionType.esm.js";import{CheckStepNameMapping as y}from"./types/CheckFormTypes.esm.js";import"../Frequency/types.esm.js";import"../Frequency/util.esm.js";import"../Frequency/FrequencyComponent.esm.js";import"./types/Path.esm.js";import{useCheckForm as F}from"./useCheckForm.esm.js";const
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Content as s}from"@backstage/core-components";import{FormProvider as d}from"react-hook-form";import"../../contexts/TrackFormContext.esm.js";import{useCheckFormContext as h}from"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"react";import"../../contexts/UserProvider.esm.js";import{formStyles as f}from"../../utils/formStyles.esm.js";import"@material-ui/core";import"@material-ui/icons/Search";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import"../FactExplorer/FactExplorer.esm.js";import{FactExplorerProvider as S}from"../FactExplorer/FactExplorerContext.esm.js";import{FormStepper as u}from"../FormStepper/FormStepper.esm.js";import"./FormFields/CheckNameInput/CheckNameInput.esm.js";import"./FormFields/PassFailMessageInput/PassFailMessageInput.esm.js";import"../FormMarkdownInput/FormMarkdownInput.esm.js";import"./utils/checkFormUtils.esm.js";import"./FormFields/TeamDetailsInput/TeamDetailsInput.esm.js";import"./FormFields/RuleInput/AddMenuButton.esm.js";import"./FormFields/RuleInput/RuleInputBox.esm.js";import"./FormFields/RuleInput/Expressions/ExpressionBox.esm.js";import"./FormFields/RuleInput/Expressions/ExpressionTypeToggle.esm.js";import"@material-ui/icons/Close";import"@material-ui/icons/Delete";import"@material-ui/icons/List";import"@spotify/backstage-plugin-soundcheck-common";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"./FormFields/RuleInput/Conditions/styles.esm.js";import"@backstage/catalog-model";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import"./FormFields/RuleInput/Conditions/ValueListInput.esm.js";import"./FormFields/RuleInput/Conditions/ConditionList.esm.js";import{ScheduleSection as C}from"./FormFields/CheckScheduleSection/ScheduleSection.esm.js";import"./FormFields/CheckPathResolverInput.esm.js";import{CheckDetailsStep as b}from"./Steps/CheckDetailsStep.esm.js";import{CheckRulesStep as k}from"./Steps/CheckRulesStep.esm.js";import{CheckApplicabilityStep as g}from"./Steps/CheckApplicabilityStep.esm.js";import{CheckReviewStep as v}from"./Steps/CheckReviewStep.esm.js";import"./types/ExpressionType.esm.js";import{CheckStepNameMapping as y}from"./types/CheckFormTypes.esm.js";import"../Frequency/types.esm.js";import"../Frequency/util.esm.js";import"../Frequency/FrequencyComponent.esm.js";import"./types/Path.esm.js";import{useCheckForm as F}from"./useCheckForm.esm.js";const R=({onSave:p,onClose:r})=>{const{isLoading:n,isReadOnly:e,selectedItem:l}=h(),{formMethods:o,onSubmit:i}=F(p),c=f(),m=[{label:"Enter check details",content:()=>t(b,{})},{label:"Add rules",content:()=>t(k,{})},{label:"Choose the affected entities (Optional)",content:()=>t(g,{})},{label:"Review and test (Optional)",content:()=>t(v,{})},{label:"Set the check schedule (Not Recommended)",content:()=>t(C,{control:o.control,disabled:e})}],a=l?[...Array(m.length).keys()]:[0];return t(s,{className:c.formWrapper,children:t(d,{...o,children:t(S,{children:t("form",{onSubmit:o.handleSubmit(i),children:t(u,{onClose:()=>r?r():void 0,handleSubmit:o.handleSubmit,trigger:o.trigger,onSubmit:i,initialVisited:a,stepNameMap:y,steps:m,isLoading:n,isReadOnly:e,saveButtonText:"Save Check"})})})})})};export{R as CheckForm};
|
|
2
2
|
//# sourceMappingURL=CheckForm.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as i,jsx as e}from"react/jsx-runtime";import{makeStyles as l}from"@material-ui/core";import{useMemo as m}from"react";import{useGetPathResolvers as n}from"../../../hooks/useGetPathResolvers.esm.js";import{FormControlledAutocomplete as c}from"../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"react-hook-form";import"../../ListboxVirtualized/ListboxVirtualized.esm.js";import"../../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{FormFieldLabel as d}from"../../FormFieldLabel/FormFieldLabel.esm.js";const h=l(t=>({wrapper:{marginBottom:t.spacing(2)}})),u=({control:t})=>{const p=h(),{data:r,isLoading:s}=n(),a=m(()=>r?.map(o=>o.id),[r]);return i("div",{className:p.wrapper,children:[e(d,{title:"Path resolver (Optional)",docLink:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/checks#path-resolvers"}),e("div",{children:e(c,{control:t,name:"rulesStep.pathResolver",disabled:s,options:a??[],freeSolo:!1,disableClearable:!0,width:250,getOptionLabel:o=>o==="jsonpath"?"jsonpath (default)":o,getOptionValue:o=>o&&o==="jsonpath (default)"?"jsonpath":o??"",placeholder:"path resolver"})})]})};export{u as CheckPathResolverInput};
|
|
2
2
|
//# sourceMappingURL=CheckPathResolverInput.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{makeStyles as p,Typography as i,Box as f,Link as b,Grid as l,FormControlLabel as y,Checkbox as g}from"@material-ui/core";import{Alert as k}from"@material-ui/lab";import{useWatch as C,useFormContext as S,Controller as d}from"react-hook-form";import"../../../Frequency/types.esm.js";import"../../../Frequency/util.esm.js";import{FrequencyComponent as x}from"../../../Frequency/FrequencyComponent.esm.js";import{CHECK_FIELDS as v}from"../../utils/checkFormUtils.esm.js";const F=p(n=>({container:{display:"flex",flexDirection:"column",gap:n.spacing(1)}})),N=({control:n,disabled:t})=>{const c=F(),a=C({control:n,name:"scheduleStep.schedule"}),{watch:h}=S(),s=h("detailsStep.type"),{description:u}=v.schedule;return o("div",{className:c.container,children:[s==="manual"&&e("div",{className:c.container,children:e(i,{children:"Schedules do not apply to manual checks. These types of checks are meant to be executed manually by users and so cannot be scheduled."})}),s!=="manual"&&o("div",{className:c.container,children:[e(i,{variant:"body2",children:u}),e(f,{maxWidth:900,children:e(k,{severity:a.enabled?"error":"warning",action:e(b,{href:"https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/fact-collectors/#fact-framework",target:"_blank",children:"Docs"}),children:a.enabled?"You are currently scheduling this Check. This is unnecessary in a majority of cases and should be disabled.":"Scheduling Checks is NOT RECOMMEND and can cause severe rate limit issues. Schedule integrations instead."})}),o(l,{item:!0,xs:12,children:[e(l,{item:!0,children:e(d,{name:"scheduleStep.schedule.enabled",control:n,render:({field:r})=>e(y,{disabled:t,control:e(g,{checked:r.value,onChange:r.onChange}),label:"My check does not use the fact framework and requires manual scheduling"})})}),a.enabled&&e(l,{item:!0,children:e(d,{name:"scheduleStep.schedule.frequency",control:n,render:({field:r,fieldState:m})=>e(x,{disabled:t||!a.enabled,value:r.value,onChange:r.onChange,errors:m.error})})})]})]})]})};export{N as ScheduleSection};
|
|
2
2
|
//# sourceMappingURL=ScheduleSection.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{parseFactRef as p,stringifyFactRef as
|
|
1
|
+
import{parseFactRef as p,stringifyFactRef as $}from"@spotify/backstage-plugin-soundcheck-common";import{useState as b,useEffect as y,useMemo as f}from"react";import{useWatch as C}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{useGetAllTracks as F}from"../../../../../hooks/tracks/useGetAllTracks.esm.js";import"../../../../../hooks/useConfirmationModal.esm.js";import"react-router-dom";import{useGetCollectors as G}from"../../../../../hooks/collectors/useGetCollectors.esm.js";import{useGetFactSchema as O}from"../../../../../hooks/collectors/useGetFactSchema.esm.js";import{generateJsonPaths as L}from"../../../utils/checkFormUtils.esm.js";const M=(o,d)=>{const{data:m,isLoading:h}=G(),{data:s}=F({}),r=C({control:d,name:`${o}.factRef`}),[i,g]=b(()=>l(r));y(()=>{g(l(r))},[r]);const{data:n}=O(i?.source,i?.name),k=f(()=>n?L(n.schema):[],[n]),R=f(()=>m?.flatMap(e=>e.factNames.map(a=>{const t=e.id==="soundcheck"?{source:e.id,scope:"default",name:a}:p(a,{defaultSource:e.id,defaultScope:"default"});let u=t.name;if(t.source==="soundcheck"){const c=s?.edges.find(S=>S.node.id===t.name.replace("track/",""))?.node;u=c?`${c.type==="campaign"?"Campaign: ":"Track: "}${c.name}`:t.name}return{label:`${t.source} - ${u}`,value:$(t)}}))?.sort((e,a)=>e.label.localeCompare(a.label))??[],[m,s]);return{isLoading:h,pathOptions:k,factRefOptions:R}};function l(o){if(o)try{return p(o,{defaultSource:"unknown",defaultScope:"default"})}catch{return null}return null}export{M as useRuleOptions};
|
|
2
2
|
//# sourceMappingURL=useRuleOptions.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as y,jsx as i}from"react/jsx-runtime";import{parseEntityRef as h}from"@backstage/catalog-model";import{Typography as b}from"@material-ui/core";import{makeStyles as g}from"@material-ui/core/styles";import{uniqBy as x}from"lodash";import{useFormContext as E}from"react-hook-form";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import"react";import{useLoggedInUser as w}from"../../../../contexts/UserProvider.esm.js";import{useGroupOptions as L}from"../../../../hooks/groups/useGroupOptions.esm.js";import{FormControlledAutocomplete as S}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelOptions as C}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import{CHECK_FIELDS as R}from"../../utils/checkFormUtils.esm.js";const T=g(m=>({container:{display:"flex",flexDirection:"column",gap:m.spacing(1)}})),D=({control:m,disabled:a,error:n})=>{const l=T(),{options:p,isLoading:s}=L();let e=x(p.map(r=>({value:r.ref,label:r.name})),"value");const{user:c,userEntityRef:t}=w();t&&(e=[{value:t,label:c?.metadata?.name??t},...e]);const{watch:d}=E(),o=d("detailsStep.ownerEntityRef");o&&t!==o&&!e.some(r=>r.value===o)&&(e=[{value:o,label:h(o).name},...e]);const f=C(e),{owner:{name:u,selectLabel:v}}=R.details;return y("div",{className:l.container,children:[i("div",{children:i(b,{variant:"subtitle2",children:u})}),i("div",{children:i(S,{freeSolo:!1,name:"detailsStep.ownerEntityRef",control:m,placeholder:v,width:250,helperText:n?.message??void 0,disabled:a||s,...f})})]})};export{D as TeamDetailsInput};
|
|
1
|
+
import{jsxs as y,jsx as i}from"react/jsx-runtime";import{parseEntityRef as h}from"@backstage/catalog-model";import{Typography as b}from"@material-ui/core";import{makeStyles as g}from"@material-ui/core/styles";import{uniqBy as x}from"lodash";import{useFormContext as E}from"react-hook-form";import"../../../../contexts/TrackFormContext.esm.js";import"../../../../contexts/CheckFormContext.esm.js";import"../../../../contexts/CampaignFormContext.esm.js";import"react";import{useLoggedInUser as w}from"../../../../contexts/UserProvider.esm.js";import{useGroupOptions as L}from"../../../../hooks/groups/useGroupOptions.esm.js";import{FormControlledAutocomplete as S}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelOptions as C}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"../../../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{CHECK_FIELDS as R}from"../../utils/checkFormUtils.esm.js";const T=g(m=>({container:{display:"flex",flexDirection:"column",gap:m.spacing(1)}})),D=({control:m,disabled:a,error:n})=>{const l=T(),{options:p,isLoading:s}=L();let e=x(p.map(r=>({value:r.ref,label:r.name})),"value");const{user:c,userEntityRef:t}=w();t&&(e=[{value:t,label:c?.metadata?.name??t},...e]);const{watch:d}=E(),o=d("detailsStep.ownerEntityRef");o&&t!==o&&!e.some(r=>r.value===o)&&(e=[{value:o,label:h(o).name},...e]);const f=C(e),{owner:{name:u,selectLabel:v}}=R.details;return y("div",{className:l.container,children:[i("div",{children:i(b,{variant:"subtitle2",children:u})}),i("div",{children:i(S,{freeSolo:!1,name:"detailsStep.ownerEntityRef",control:m,placeholder:v,width:250,helperText:n?.message??void 0,disabled:a||s,...f})})]})};export{D as TeamDetailsInput};
|
|
2
2
|
//# sourceMappingURL=TeamDetailsInput.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i,jsxs as m}from"react/jsx-runtime";import{useRouteRef as oe}from"@backstage/core-plugin-api";import{EntityRefLink as ne}from"@backstage/plugin-catalog-react";import{usePermission as j}from"@backstage/plugin-permission-react";import{makeStyles as ae,useTheme as le,Button as ce,Typography as Q,Tabs as de,Tab as G,Box as J}from"@material-ui/core";import{soundcheckCheckReadPermission as me,soundcheckCheckUpdatePermission as pe,toEntityFilterQuery as A,combineEntityFilterQueries as he}from"@spotify/backstage-plugin-soundcheck-common";import b from"lodash/isEqual";import{useMemo as n,useState as w,useEffect as fe,useCallback as K}from"react";import{useSearchParams as ue,useParams as ge,useNavigate as ye}from"react-router-dom";import"@backstage/catalog-model";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import{useCheck as ke}from"../../hooks/checks/useCheck.esm.js";import"../../hooks/useSoundcheckAlert.esm.js";import{useTrack as Ce}from"../../hooks/tracks/useTrack.esm.js";import"../../hooks/useConfirmationModal.esm.js";import{useCheckStatus as Se}from"../../hooks/aggregations/useCheckStatus.esm.js";import{checkEditRouteRef as xe}from"../../routes.esm.js";import{toFilter as ve}from"../../utils/helpers.esm.js";import{CheckStatusBar as we}from"../CheckStatusBar/CheckStatusBar.esm.js";import{FilterSidebar as be}from"../FilterSidebar/FilterSidebar.esm.js";import{StateFilter as Ee}from"../FilterSidebar/StateFilter.esm.js";import{LoadingIndicator as Ne}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as V}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as Ie}from"../SoundcheckHeader/useHeader.esm.js";import{SoundcheckMarkdownContent as Re}from"../SoundcheckMarkdownContent/SoundcheckMarkdownContent.esm.js";import"@backstage/core-components";import"react-markdown";import"rehype-raw";import"remark-gfm";import"../TechHealth/Filters/types.esm.js";import"../TechHealth/Filters/FacetFilter.esm.js";import"../TechHealth/Filters/FilterProvider.esm.js";import"../TechHealth/Filters/Filters.esm.js";import"../TechHealth/Filters/FiltersHeader.esm.js";import"../TechHealth/Filters/FiltersSection.esm.js";import"lodash";import"../../contexts/TrackFormContext.esm.js";import"../../contexts/CheckFormContext.esm.js";import"../../contexts/CampaignFormContext.esm.js";import"../../contexts/UserProvider.esm.js";import{parseNumberOfDays as Te}from"../TechHealth/Filters/utils.esm.js";import{CheckEntitiesTable as Le}from"./CheckEntitiesTable/CheckEntitiesTable.esm.js";import{CheckStatusHistoryChart as Be}from"./CheckStatusHistoryChart.esm.js";import{CheckStatusTable as De}from"./CheckStatusTable.esm.js";import{ExemptionsTable as Fe}from"./ExemptionsTable.esm.js";function Ae(e,r){for(const h of e.levels)for(const l of h.checks)if(l.id===r)return l;return null}const Pe=ae(e=>({root:{height:"100%"},pageContent:{display:"flex",minHeight:`calc(100vh - ${e.spacing(15)}px)`,borderTop:`1px solid ${e.palette.divider}`,height:"100%"},mainContentArea:{flex:1,display:"flex",flexDirection:"column",minWidth:0},editButton:{marginLeft:"auto"},statusContainer:{borderBottom:`1px solid ${e.palette.divider}`,padding:e.spacing(3,0,2,3)},statusCards:{display:"flex",gap:e.spacing(2)},currentStatusSection:{width:"325px",minWidth:"325px",flex:0,display:"flex",flexDirection:"column"},historicalStatusSection:{flex:1,flexShrink:1,flexGrow:1,flexBasis:"auto",minWidth:"150px",display:"flex",flexDirection:"column"},statusTitle:{fontWeight:"bold",fontSize:"1.1rem",lineHeight:`${e.typography.h5.fontSize}px`,cursor:"default",marginBottom:e.spacing(2)},headerDescription:{fontSize:e.typography.body2.fontSize,margin:e.spacing(.5,0,0),"& p":{margin:0},"& a":{color:"inherit",textDecoration:"underline"}},entitiesContainer:{padding:e.spacing(2,3,3,3)},ownerLink:{"& span":{color:"inherit","&:hover":{textDecoration:"underline"}}}})),Oe=()=>{const e=Pe(),[r,h]=ue(),{trackId:l,checkId:s}=ge(),a=n(()=>r.getAll("states"),[r]),f=n(()=>r.getAll("owners"),[r]),u=n(()=>r.getAll("lifecycles"),[r]),g=n(()=>r.getAll("types"),[r]),y=n(()=>r.getAll("systems"),[r]),X=n(()=>Te(r.get("numberOfDays")),[r]),[k,E]=w(u),[C,N]=w(f),[S,I]=w(g),[x,R]=w(y),[v,T]=w(a);fe(()=>{N(f),E(u),I(g),R(y),T(a)},[f,u,g,y,a]);const Y=n(()=>{const t={owners:!b(C,f),lifecycles:!b(k,u),types:!b(S,g),systems:!b(x,y),states:!b(v,a)};return Object.values(t).some(Boolean)},[C,f,k,u,S,g,x,y,v,a]),Z=K(()=>{const t=new URLSearchParams(r);t.delete("lifecycles"),t.delete("owners"),t.delete("types"),t.delete("systems"),t.delete("states"),k.length>0&&k.forEach(o=>t.append("lifecycles",o)),C.length>0&&C.forEach(o=>t.append("owners",o)),S.length>0&&S.forEach(o=>t.append("types",o)),x.length>0&&x.forEach(o=>t.append("systems",o)),v.length>0&&v.forEach(o=>t.append("states",o)),h(t)},[r,k,C,S,x,v,h]),q=K(()=>{E([]),N([]),I([]),R([]),T([]);const t=new URLSearchParams(r);t.delete("lifecycles"),t.delete("owners"),t.delete("types"),t.delete("systems"),t.delete("states"),h(t)},[r,h]),L=ve({lifecycles:u,owners:f,types:g,systems:y}),{data:p,isLoading:P}=Ce(l),{data:c,isLoading:O}=ke(s),{loading:H,allowed:B}=j({permission:me,resourceRef:s}),d=n(()=>c??p?.levels.flatMap(t=>t.checks).find(t=>t.id===s),[c,s,p?.levels]),{loading:W,allowed:z}=j({permission:pe,resourceRef:s}),M=ye(),U=oe(xe),_=le();let D;if(s)if(p){const t=A(p.filter),o=A(Ae(p,s)?.filter);D=he(t,o)}else d?.filter&&(D=A(d.filter));const{data:$}=Se({checkId:s,trackId:l,filter:L,states:a?.length?a:void 0},!!s),ee=n(()=>c?.ownerEntityRef?i(ne,{color:"inherit",entityRef:c.ownerEntityRef,className:e.ownerLink}):null,[c?.ownerEntityRef,e.ownerLink]),te=n(()=>!W&&z&&c?.isEditable?i(ce,{className:e.editButton,variant:"contained",color:"primary",onClick:()=>{M(U({checkId:c.id}))},children:"Edit Check"}):null,[z,c?.id,c?.isEditable,e.editButton,U,W,M]),ie=n(()=>d?.description?i(Re,{className:e.headerDescription,content:d.description}):null,[e.headerDescription,d?.description]);Ie({title:d?.name??s??"Soundcheck",description:ie,customSubtitle:ee,sectionRight:te});const re=n(()=>!!d&&!H&&!B,[B,d,H]),[F,se]=w(0);return m("div",{children:[i(V,{entityName:"track",entityId:l,showNotFound:!!l&&!P&&!p}),i(V,{entityName:"check",entityId:s,showCannotView:re}),(O||!!l&&P)&&i(Ne,{}),!O&&B&&i("div",{className:e.root,children:m("div",{className:e.pageContent,children:[i(be,{trackFilter:D,stagedTypes:S,stagedLifecycles:k,stagedOwners:C,stagedSystems:x,onTypesChange:I,onLifecyclesChange:E,onOwnersChange:N,onSystemsChange:R,onApplyFilters:Z,onClearFilters:q,hasFilterChanges:Y,children:i(Ee,{states:a,stagedStates:v,onStagedStatesChange:T})}),m("div",{className:e.mainContentArea,children:[i("div",{className:e.statusContainer,children:m("div",{className:e.statusCards,children:[m("div",{className:e.currentStatusSection,children:[i(Q,{className:e.statusTitle,children:"Current Status"}),i("div",{style:{width:"100%",height:30,display:"flex",alignItems:"flex-start",marginBottom:_.spacing(2)},children:i(we,{status:$})}),i("div",{children:i(De,{checkStatus:$})})]}),m("div",{className:e.historicalStatusSection,children:[i(Q,{className:e.statusTitle,children:"Historical Status"}),i("div",{style:{height:"100%"},children:i(Be,{checkId:s,trackId:l,filter:L,states:a,numberOfDays:X})})]})]})}),m("div",{className:e.entitiesContainer,children:[m(de,{value:F,onChange:(t,o)=>se(o),indicatorColor:"primary",textColor:"primary","aria-label":"Entities and Exemptions Tabs",children:[i(G,{label:"Entities"}),i(G,{label:"Exemptions"})]}),i(J,{hidden:F!==0,children:i(Le,{checkId:s,trackId:p?.id,filter:L,states:a})}),i(J,{hidden:F!==1,children:i(Fe,{checkId:s})})]})]})]})})]})};export{Oe as CheckInsightsPage};
|
|
2
2
|
//# sourceMappingURL=CheckInsightsPage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{makeStyles as
|
|
1
|
+
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{makeStyles as f,Box as i,Typography as h,Tooltip as x,Icon as y,IconButton as I}from"@material-ui/core";import b from"@material-ui/icons/ArrowDropDown";import u from"@material-ui/icons/ArrowDropUp";import g from"@material-ui/icons/HelpOutline";import v from"../Expand/Expand.esm.js";const D=f(({palette:l})=>({header:{display:"flex",alignItems:"left",flexDirection:"row",cursor:"pointer",justifyContent:"space-between"},label:{display:"flex",alignItems:"center"},tooltipIcon:{display:"flex",alignItems:"center",justifyContent:"center",color:l.text.primary}})),E=({label:l,tooltip:r,isExpanded:a,setIsExpanded:p,children:d,onExpandDone:m=()=>{}})=>{const n=D(),s=()=>{p(t=>!t)},c=t=>{(t.key==="Enter"||t.key===" ")&&s()};return o(i,{children:[o("div",{className:n.header,onClick:s,onKeyDown:c,role:"button",tabIndex:0,children:[o("div",{className:n.label,children:[e(i,{children:e(h,{variant:"subtitle2",children:l})}),r&&e(x,{title:r,className:n.tooltipIcon,children:e(y,{children:e(g,{style:{fontSize:16,verticalAlign:"text-top"}})})})]}),e(i,{children:e(I,{size:"small",onKeyDown:c,children:a?e(u,{fontSize:"small"}):e(b,{fontSize:"small"})})})]}),e(v,{visible:a,onExpandDone:m,children:d})]})};export{E as CollapsablePanel};
|
|
2
2
|
//# sourceMappingURL=CollapsablePanel.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as a,jsx as e}from"react/jsx-runtime";import{Content as E,LinkButton as D}from"@backstage/core-components";import{useRouteRef as y}from"@backstage/core-plugin-api";import{usePermission as x}from"@backstage/plugin-permission-react";import{makeStyles as F,Box as i,Button as I,Typography as g,Card as S,CardHeader as j,CardContent as A,Tooltip as G,CardActions as H}from"@material-ui/core";import{Alert as L}from"@material-ui/lab";import{soundcheckCollectorReadPermission as M,soundcheckCollectorUpdatePermission as U,parseFactRef as N,asArray as $}from"@spotify/backstage-plugin-soundcheck-common";import{isEmpty as P,uniq as O}from"lodash";import{useMemo as b}from"react";import{useParams as V,useNavigate as W}from"react-router-dom";import{useGetCollectors as q}from"../../hooks/collectors/useGetCollectors.esm.js";import{integrationEditRouteRef as _,integrationsPageRouteRef as z,checkDetailsRouteRef as J}from"../../routes.esm.js";import{mapRuleToExpression as K}from"../CheckForm/utils/checkFormUtils.esm.js";import"@material-ui/icons/Search";import"../SoundcheckDialog/SoundcheckDialog.esm.js";import"../FactExplorer/FactExplorer.esm.js";import{FactExplorerProvider as Q}from"../FactExplorer/FactExplorerContext.esm.js";import{LoadingIndicator as X}from"../LoadingIndicator/LoadingIndicator.esm.js";import{PageWarningMessage as Y}from"../PageWarningMessage/PageWarningMessage.esm.js";import"../SoundcheckHeader/SoundcheckHeader.esm.js";import"../SoundcheckHeader/SoundcheckHeaderContext.esm.js";import{useHeader as Z}from"../SoundcheckHeader/useHeader.esm.js";import{SoundcheckMarkdownContent as ee}from"../SoundcheckMarkdownContent/SoundcheckMarkdownContent.esm.js";import"react-markdown";import"rehype-raw";import"remark-gfm";import{CollectorFactTable as te}from"./CollectorFactTable.esm.js";const oe=F(d=>({card:{width:360},cardDescription:{"& p":{marginTop:d.spacing(.5),marginBottom:d.spacing(.5)}},cardContent:{flexGrow:1}})),re=({id:d,title:C,description:o,rules:l,integrationId:h,hasSchedule:k})=>{const m=oe(),R=y(J),f=b(()=>{const t=[],s=c=>{for(const r of c.conditions??[])t.push(r.factRef),typeof r.value=="object"&&Object.hasOwn(r.value,"factRef")&&t.push(r.value.factRef);for(const r of c.expressions??[])s(r)};return l&&s(l),O(t).filter(c=>{try{return N(c).source===h}catch{return!1}})},[h,l]);return a(S,{className:m.card,children:[e(j,{title:C}),a(A,{className:m.cardContent,children:[o&&e(i,{overflow:"auto",maxHeight:200,children:e(ee,{className:m.cardDescription,content:o})}),!P(f)&&a(i,{marginTop:1,overflow:"auto",maxHeight:120,children:[e(g,{variant:"subtitle2",children:"Used Fact Refs"}),f.map(t=>e(i,{children:t},"factRef"))]}),k&&e(i,{marginTop:1,children:e(G,{title:"Configure this integration's collection schedule instead.",children:e(L,{severity:"warning",children:"Check Schedule Detected"})})})]}),e(H,{children:e(D,{variant:"outlined",to:R({checkId:d}),target:"_blank",children:"View"})})]})},ie=({id:d})=>{const C=V(),o=d??C.integrationId,{data:l,isLoading:h}=q([o??""]),{loading:k,allowed:m}=x({permission:M}),{loading:R,allowed:f}=x({permission:U}),t=l?.[0],s=h||R||k,c=f&&t?.isEditable,r=W(),v=y(_),w=y(z),B=b(()=>a(i,{display:"flex",gridGap:12,children:[e(I,{variant:"contained",color:"primary",onClick:()=>{r(w())},children:"All Integrations"}),o&&c&&e(I,{variant:"contained",color:"primary",onClick:()=>{r(v({integrationId:o}))},children:"Edit Integration"})]}),[w,v,o,c,r]);return Z({title:t?.name??o,description:t?t.description??"":"",docLink:t?`https://backstage.spotify.com/docs/plugins/soundcheck/core-concepts/fact-collectors/3p-integrations/${t.id}`:"",sectionRight:B}),e(Q,{hidePath:!0,children:a(E,{children:[s&&e(X,{}),e(Y,{entityName:"Integration",entityId:o,showNotFound:!s&&!t,showCannotView:!s&&!m}),t&&a(i,{children:[a(i,{marginBottom:2,children:[e(g,{variant:"h6",children:"Facts"}),e(i,{marginBottom:2,children:e(te,{facts:t.factNames.map(n=>{const u=(p=>{try{return N(p).name}catch{return p}})(n),T=$(t.config?.collects).find(p=>p?.type===u||p?.factName===u);return{factRef:`${o}:default/${u}`,factName:u,config:T,uiConfig:!!t.hasUIConfig}})})})]}),a(i,{marginBottom:2,children:[e(g,{variant:"h6",children:"Dependant Checks"}),P(t.dependentChecks)?e(g,{variant:"body2",children:"No dependant checks"}):e(i,{display:"flex",gridGap:12,flexWrap:"wrap",children:t.dependentChecks.map(n=>e(re,{id:n.id,title:n.name??n.id,description:n.description??void 0,rules:K(n.rule),integrationId:o,hasSchedule:n.schedule},n.id))})]})]})]})})};export{ie as CollectorDetailsPage};
|
|
2
|
+
//# sourceMappingURL=CollectorDetailsPage.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e,jsxs as c}from"react/jsx-runtime";import{makeStyles as s,TableContainer as h,Paper as m,Table as u,TableHead as g,TableRow as i,TableCell as r,TableBody as p,Box as t}from"@material-ui/core";import{isEmpty as y}from"lodash";import{getCronDescription as b}from"../../utils/cron.esm.js";import{FactExplorerDialogButton as C}from"../FactExplorer/FactExplorerDialog.esm.js";import"../FactExplorer/FactExplorerContext.esm.js";const T=s(o=>({noConfig:{color:o.palette.action.disabled}})),q=({facts:o})=>{const l=T();return e(h,{component:m,children:c(u,{size:"small",children:[e(g,{children:c(i,{children:[e(r,{children:"Fact Name"}),e(r,{align:"center",width:120,children:"Source"}),e(r,{children:"Schedule"}),e(r,{align:"center",width:150,children:"Test"})]})}),c(p,{children:[y(o)&&e(i,{children:e(r,{colSpan:10,children:"No Available Facts Found for Integration"})}),o.map(({factName:d,config:n,uiConfig:f,factRef:a})=>c(i,{children:[e(r,{children:e("strong",{children:d})}),c(r,{className:n?void 0:l.noConfig,align:"center",children:[!n&&"No Config",n&&(f?"UI":"YAML")]}),c(r,{children:[n?.frequency&&(n.frequency.cron?c(t,{children:["cron(",n.frequency.cron,")"," ",b(n.frequency.cron)]}):c(t,{children:["Every ",Object.values(n.frequency)[0]," ",Object.keys(n.frequency)[0]]})),!n?.frequency&&e(t,{className:l.noConfig,children:"No Schedule Configured"})]}),e(r,{align:"center",children:e(C,{variant:"text",factRef:a,size:"small",text:"Test"})})]},a))]})]})})};export{q as CollectorFactTable};
|
|
2
|
+
//# sourceMappingURL=CollectorFactTable.esm.js.map
|
package/dist/components/CollectorPage/Configurators/Github/CodeScanningAlertsFactDetails.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as u,jsx as e}from"react/jsx-runtime";import{Typography as n,Box as m,TextField as c}from"@material-ui/core";import{useFormContext as S,Controller as s}from"react-hook-form";import{FormControlledAutocomplete as p}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelOptions as f}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"
|
|
1
|
+
import{jsxs as u,jsx as e}from"react/jsx-runtime";import{Typography as n,Box as m,TextField as c}from"@material-ui/core";import{useFormContext as S,Controller as s}from"react-hook-form";import{FormControlledAutocomplete as p}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelOptions as f}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"../../../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{FormFieldLabel as d}from"../../../FormFieldLabel/FormFieldLabel.esm.js";import{useStyles as x}from"./GithubConfigurator.esm.js";import{CODE_SCANNING_ALERTS_STATE_OPTIONS as T,CODE_SCANNING_ALERTS_SEVERITY_OPTIONS as v}from"./types.esm.js";const b=({name:r,disabled:a})=>{const l=x(),{control:i}=S(),h=f(T.map(t=>({label:t,value:t}))),N=f(v.map(t=>({label:t,value:t})));return u("div",{className:l.root,children:[e(d,{title:"Fact Name"}),e(n,{variant:"caption",children:"Fact name must be unique"}),e(m,{children:e(s,{name:`${r}.factName`,control:i,render:({field:t,fieldState:{error:o}})=>e(c,{...t,type:"text",variant:"outlined",margin:"dense",placeholder:"Fact Name",className:l.formInput,disabled:a,error:!!o,helperText:o?.message,FormHelperTextProps:{className:l.helperText}})})}),e(d,{title:"Code Scanning Tool Name"}),e(n,{variant:"caption",children:"Optional, if not provided results by all code scanning tools will be collected"}),e(m,{children:e(s,{name:`${r}.toolName`,control:i,render:({field:t,fieldState:{error:o}})=>e(c,{...t,type:"text",variant:"outlined",margin:"dense",placeholder:"Example: CodeQL",className:l.formInput,disabled:a,error:!!o,helperText:o?.message,FormHelperTextProps:{className:l.helperText}})})}),e(d,{title:"Code Scanning Alert State"}),e(n,{variant:"caption",children:"Optional, if not provided code scanning alerts with all states will be collected"}),e(m,{className:l.formInput,children:e(p,{name:`${r}.state`,control:i,fullWidth:!0,freeSolo:!1,disabled:a,placeholder:"Example: open",...h})}),e(d,{title:"Code Scanning Alert Severity"}),e(n,{variant:"caption",children:"Optional, if not provided code scanning alerts with all severities will be collected"}),e(m,{className:l.formInput,children:e(p,{name:`${r}.severity`,control:i,fullWidth:!0,freeSolo:!1,disabled:a,placeholder:"Example: critical",...N})})]})};export{b as CodeScanningAlertsFactDetails};
|
|
2
2
|
//# sourceMappingURL=CodeScanningAlertsFactDetails.esm.js.map
|
package/dist/components/CollectorPage/Configurators/Github/DependabotAlertsFactDetails.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as h,jsx as e}from"react/jsx-runtime";import{Typography as i,Box as
|
|
1
|
+
import{jsxs as h,jsx as e}from"react/jsx-runtime";import{Typography as i,Box as n,TextField as u}from"@material-ui/core";import{useFormContext as b,Controller as T}from"react-hook-form";import"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import{FormControlledMultipleAutocomplete as d}from"../../../FormControlledAutocomplete/FormControlledMultipleAutocomplete.esm.js";import{useLabelOptions as s}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"../../../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{FormFieldLabel as m}from"../../../FormFieldLabel/FormFieldLabel.esm.js";import{useStyles as v}from"./GithubConfigurator.esm.js";import{DEPENDABOT_ALERTS_STATE_OPTIONS as x,DEPENDABOT_ALERTS_SEVERITY_OPTIONS as N}from"./types.esm.js";const S=({name:r,disabled:o})=>{const l=v(),{control:a}=b(),c=s(x.map(t=>({label:t,value:t}))),f=s(N.map(t=>({label:t,value:t})));return h("div",{className:l.root,children:[e(m,{title:"Fact Name"}),e(i,{variant:"caption",children:"Fact name must be unique"}),e(n,{children:e(T,{name:`${r}.factName`,control:a,render:({field:t,fieldState:{error:p}})=>e(u,{...t,type:"text",variant:"outlined",margin:"dense",placeholder:"Fact Name",className:l.formInput,disabled:o,error:!!p,helperText:p?.message,FormHelperTextProps:{className:l.helperText}})})}),e(m,{title:"Dependabot Alert States"}),e(i,{variant:"caption",children:"Optional, if not provided dependabot alerts with all states will be collected"}),e(n,{className:l.formInput,children:e(d,{name:`${r}.states`,control:a,fullWidth:!0,freeSolo:!1,disabled:o,placeholder:"Example: open",...c})}),e(m,{title:"Dependabot Alert Severities"}),e(i,{variant:"caption",children:"Optional, if not provided dependabot alerts with all severities will be collected"}),e(n,{className:l.formInput,children:e(d,{name:`${r}.severities`,control:a,fullWidth:!0,freeSolo:!1,disabled:o,placeholder:"Example: critical",...f})})]})};export{S as DependabotAlertsFactDetails};
|
|
2
2
|
//# sourceMappingURL=DependabotAlertsFactDetails.esm.js.map
|
package/dist/components/CollectorPage/Configurators/Github/SecretScanningAlertsFactDetails.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as f,jsx as e}from"react/jsx-runtime";import{Typography as i,Box as n,TextField as S}from"@material-ui/core";import{useFormContext as u,Controller as h}from"react-hook-form";import{FormControlledAutocomplete as N}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import{FormControlledMultipleAutocomplete as T}from"../../../FormControlledAutocomplete/FormControlledMultipleAutocomplete.esm.js";import{useLabelOptions as
|
|
1
|
+
import{jsxs as f,jsx as e}from"react/jsx-runtime";import{Typography as i,Box as n,TextField as S}from"@material-ui/core";import{useFormContext as u,Controller as h}from"react-hook-form";import{FormControlledAutocomplete as N}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import{FormControlledMultipleAutocomplete as T}from"../../../FormControlledAutocomplete/FormControlledMultipleAutocomplete.esm.js";import{useLabelOptions as s}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"../../../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{FormFieldLabel as m}from"../../../FormFieldLabel/FormFieldLabel.esm.js";import{useStyles as v}from"./GithubConfigurator.esm.js";import{SECRET_SCANNING_ALERTS_STATE_OPTIONS as x,SECRET_SCANNING_ALERTS_VALIDITY_OPTIONS as b}from"./types.esm.js";const A=({name:r,disabled:o})=>{const l=v(),{control:a}=u(),d=s(x.map(t=>({label:t,value:t}))),p=s(b.map(t=>({label:t,value:t})));return f("div",{className:l.root,children:[e(m,{title:"Fact Name"}),e(i,{variant:"caption",children:"Fact name must be unique"}),e(n,{children:e(h,{name:`${r}.factName`,control:a,render:({field:t,fieldState:{error:c}})=>e(S,{...t,type:"text",variant:"outlined",margin:"dense",placeholder:"Fact Name",className:l.formInput,disabled:o,error:!!c,helperText:c?.message,FormHelperTextProps:{className:l.helperText}})})}),e(m,{title:"Secret Scanning Alert State"}),e(i,{variant:"caption",children:"Optional, if not provided secret scanning alerts with all states will be collected"}),e(n,{className:l.formInput,children:e(N,{name:`${r}.state`,control:a,fullWidth:!0,freeSolo:!1,disabled:o,placeholder:"Example: open",...d})}),e(m,{title:"Secret Scanning Alert Validities"}),e(i,{variant:"caption",children:"Optional, if not provided secret scanning alerts with all validities will be collected"}),e(n,{className:l.formInput,children:e(T,{name:`${r}.validities`,control:a,fullWidth:!0,freeSolo:!1,disabled:o,placeholder:"Example: active",...p})})]})};export{A as SecretScanningAlertsFactDetails};
|
|
2
2
|
//# sourceMappingURL=SecretScanningAlertsFactDetails.esm.js.map
|
package/dist/components/CollectorPage/Configurators/Github/SecurityAdvisoriesFactDetails.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as d,jsx as e}from"react/jsx-runtime";import{Typography as m,Box as s,TextField as c}from"@material-ui/core";import{useFormContext as u,Controller as f}from"react-hook-form";import{FormControlledAutocomplete as h}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelOptions as x}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"
|
|
1
|
+
import{jsxs as d,jsx as e}from"react/jsx-runtime";import{Typography as m,Box as s,TextField as c}from"@material-ui/core";import{useFormContext as u,Controller as f}from"react-hook-form";import{FormControlledAutocomplete as h}from"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"../../../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelOptions as x}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"../../../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{FormFieldLabel as n}from"../../../FormFieldLabel/FormFieldLabel.esm.js";import{useStyles as S}from"./GithubConfigurator.esm.js";import{SECURITY_ADVISORIES_STATE_OPTIONS as F}from"./types.esm.js";const b=({name:o,disabled:l})=>{const t=S(),{control:i}=u(),p=x(F.map(r=>({label:r,value:r})));return d("div",{className:t.root,children:[e(n,{title:"Fact Name"}),e(m,{variant:"caption",children:"Fact name must be unique"}),e(s,{children:e(f,{name:`${o}.factName`,control:i,render:({field:r,fieldState:{error:a}})=>e(c,{...r,type:"text",variant:"outlined",margin:"dense",placeholder:"Fact Name",className:t.formInput,disabled:l,error:!!a,helperText:a?.message,FormHelperTextProps:{className:t.helperText}})})}),e(n,{title:"Security Advisory State"}),e(m,{variant:"caption",children:"Optional, if not provided security advisories with all states will be collected"}),e(s,{className:t.formInput,children:e(h,{name:`${o}.state`,control:i,fullWidth:!0,freeSolo:!1,disabled:l,placeholder:"Example: published",...p})})]})};export{b as SecurityAdvisoriesFactDetails};
|
|
2
2
|
//# sourceMappingURL=SecurityAdvisoriesFactDetails.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as h,jsx as e}from"react/jsx-runtime";import{makeStyles as I,Typography as i,Box as s,TextField as S}from"@material-ui/core";import{useFormContext as T,Controller as v}from"react-hook-form";import"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import{FormControlledMultipleAutocomplete as p}from"../../../FormControlledAutocomplete/FormControlledMultipleAutocomplete.esm.js";import{useLabelOptions as m}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"
|
|
1
|
+
import{jsxs as h,jsx as e}from"react/jsx-runtime";import{makeStyles as I,Typography as i,Box as s,TextField as S}from"@material-ui/core";import{useFormContext as T,Controller as v}from"react-hook-form";import"../../../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import{FormControlledMultipleAutocomplete as p}from"../../../FormControlledAutocomplete/FormControlledMultipleAutocomplete.esm.js";import{useLabelOptions as m}from"../../../FormControlledAutocomplete/useLabelOptions.esm.js";import"../../../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{FormFieldLabel as n}from"../../../FormFieldLabel/FormFieldLabel.esm.js";import{ISSUE_STATUS_OPTIONS as x,ISSUE_SEVERITY_OPTIONS as b,ISSUE_TYPE_OPTIONS as N}from"./utils.esm.js";const O=I(t=>({root:{paddingTop:t.spacing(1)},formInput:{marginTop:0,width:"500px",marginBottom:t.spacing(2)},helperText:{marginLeft:0}})),E=({name:t,disabled:r})=>{const o=O(),{control:a}=T(),c=m(x.map(l=>({label:l,value:l}))),u=m(b.map(l=>({label:l,value:l}))),f=m(N.map(l=>({label:l,value:l})));return h("div",{className:o.root,children:[e(n,{title:"Fact Name"}),e(i,{variant:"caption",children:"Fact name must be unique"}),e(s,{children:e(v,{name:`${t}.factName`,control:a,render:({field:l,fieldState:{error:d}})=>e(S,{...l,type:"text",variant:"outlined",margin:"dense",placeholder:"Fact Name",className:o.formInput,disabled:r,error:!!d,helperText:d?.message,FormHelperTextProps:{className:o.helperText}})})}),e(n,{title:"Issue Statuses (Optional)"}),e(i,{variant:"caption",children:"If not provided issues with all statuses will be collected"}),e(s,{className:o.formInput,children:e(p,{name:`${t}.statuses`,control:a,fullWidth:!0,freeSolo:!1,disabled:r,placeholder:"Example: OPEN",...c})}),e(n,{title:"Issue Severities (Optional)"}),e(i,{variant:"caption",children:"If not provided issues with all severities will be collected"}),e(s,{className:o.formInput,children:e(p,{name:`${t}.severities`,control:a,fullWidth:!0,freeSolo:!1,disabled:r,placeholder:"Example: BLOCKER",...u})}),e(n,{title:"Issue Types (Optional)"}),e(i,{variant:"caption",children:"If not provided issues with all types will be collected"}),e(s,{className:o.formInput,children:e(p,{name:`${t}.types`,control:a,fullWidth:!0,freeSolo:!1,disabled:r,placeholder:"Example: VULNERABILITY",...f})})]})};export{E as IssuesFactDetailsInput};
|
|
2
2
|
//# sourceMappingURL=IssuesFactDetailsInput.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as i,jsx as e}from"react/jsx-runtime";import{useRouteRef as
|
|
1
|
+
import{jsxs as i,jsx as e}from"react/jsx-runtime";import{LinkButton as S}from"@backstage/core-components";import{useRouteRef as u}from"@backstage/core-plugin-api";import{usePermission as U}from"@backstage/plugin-permission-react";import{makeStyles as D,CardContent as f,CardHeader as R,Typography as c,Tooltip as B,Divider as H,CardActions as L,Button as j}from"@material-ui/core";import{soundcheckCollectorUpdatePermission as A}from"@spotify/backstage-plugin-soundcheck-common";import{useNavigate as P}from"react-router-dom";import{integrationEditRouteRef as $,integrationDetailsRouteRef as M}from"../../../routes.esm.js";import{SoundcheckMarkdownContent as Y}from"../../SoundcheckMarkdownContent/SoundcheckMarkdownContent.esm.js";import"react";import"react-markdown";import"rehype-raw";import"remark-gfm";import{useSummaryCardStyles as w,Card as z}from"../../SummaryCard/SummaryCard.esm.js";import{hasLogo as E,CollectorLogo as q}from"./CollectorLogo.esm.js";const F=D(t=>({cardContent:{flex:1,paddingTop:t.spacing(1)},logoHeader:{paddingBottom:0,flex:0},headerContent:{display:"flex",alignItems:"center",height:t.spacing(5),marginBottom:t.spacing(1.5)},headerTypography:{marginBottom:0},usageText:{marginTop:t.spacing(.5)},checkUsageHover:{textDecoration:"underline",textDecorationStyle:"dotted","&:hover":{cursor:"default"}}})),G=({collector:t,hasNoCodeUI:l,routePath:y})=>{const{description:C,id:o,isConfigurable:m,isEditable:g,name:v}=t,{loading:p,allowed:h}=U({permission:A}),N=P(),b=u($),k=u(M),r=w(),a=F(),x=l&&m&&g&&!p&&h,I=()=>{N(y??b({integrationId:o}))};let n;p||!h?n="You don't have permissions to configure this integration.":m?g?l?t.hasUIConfig&&(n="Configured via UI."):n="Integration can only be configured through YAML.":n="Integration is already configured via YAML and cannot be configured through the UI.":n="Integration is not configurable.";const s=t?.dependentChecks?.length??0,d=v??o;return i(z,{"data-testid":o,className:r.card,children:[E(o)?e(f,{className:a.logoHeader,children:e(q,{collectorId:o})}):e(R,{title:d,titleTypographyProps:{className:`${r.summaryName} ${a.headerTypography}`},classes:{content:a.headerContent}}),i(f,{className:a.cardContent,children:[e(c,{variant:"body1",component:"div",children:e(Y,{className:r.summaryDescription,content:C??""})}),e(c,{color:"textSecondary",variant:"body2",children:n}),s>0&&i(c,{className:a.usageText,color:"textSecondary",variant:"body2",children:[e(B,{title:t.dependentChecks?.map(T=>T.name).join(", ")??"",children:i("span",{className:a.checkUsageHover,children:[s," check",s>1?"s":""]})})," ","use facts from this integration."]})]}),i("div",{children:[e(H,{}),i(L,{className:r.actionArea,children:[e(S,{size:"medium",variant:"outlined",className:r.button,to:k({integrationId:o}),children:"Details"}),x&&e(j,{"aria-label":`${d}-edit`,"data-testid":`${d}-button`,size:"medium",role:"link",onClick:I,className:r.button,variant:"outlined",children:"Configure"})]})]})]})};export{G as CollectorSummaryCard};
|
|
2
2
|
//# sourceMappingURL=CollectorSummaryCard.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{Typography as m}from"@material-ui/core";import{getContrastTextColor as p}from"../TechInsights/colorContrast.esm.js";const s=({value:r,getColor:l,numericValue:o,size:t="medium"})=>{const e=l(o||0),i=p(e);return n(m,{style:{backgroundColor:e,color:i,borderRadius:"4px",textAlign:"center",fontWeight:"bold",fontSize:t==="small"?"0.7rem":"0.9rem",minWidth:t==="small"?"32px":"48px",width:t==="small"?"32px":"48px",height:t==="small"?"15px":"28px",display:"flex",alignItems:"center",justifyContent:"center",padding:t==="small"?"0 4px":"0 8px"},children:r})};export{s as ColorChip};
|
|
2
|
+
//# sourceMappingURL=ColorChip.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{motion as a}from"framer-motion";const d={hidden:{height:0,opacity:0,overflow:"hidden"},visible:{height:"auto",opacity:1,overflow:"visible"}};function r({visible:o,onExpandDone:i,...e}){return t(a.div,{...e,animate:o?"visible":"hidden",initial:"hidden",variants:d,onAnimationComplete:n=>{n==="visible"&&i&&i()}})}export{r as default};
|
|
2
2
|
//# sourceMappingURL=Expand.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";import{makeStyles as q,Box as o,Typography as r,TextField as X,Button as j}from"@material-ui/core";import{Alert as Y}from"@material-ui/lab";import{parseFactRef as Z}from"@spotify/backstage-plugin-soundcheck-common";import ee from"lodash";import{useMemo as g,useState as S,useEffect as te,useCallback as ae}from"react";import{useGetEntityRefs as ie}from"../../hooks/catalog/useGetEntityRefs.esm.js";import{useGetCollectors as oe}from"../../hooks/collectors/useGetCollectors.esm.js";import{useGetFactSchema as re}from"../../hooks/collectors/useGetFactSchema.esm.js";import{useGetFact as ne}from"../../hooks/useGetFact.esm.js";import{useGetPathResolvers as le}from"../../hooks/useGetPathResolvers.esm.js";import{generateJsonPaths as ce}from"../CheckForm/utils/checkFormUtils.esm.js";import{hasLogo as se,CollectorLogo as de}from"../CollectorsPage/CollectorListPage/CollectorLogo.esm.js";import{ExpandableSection as B}from"../ExpandableSection/ExpandableSection.esm.js";import{mapFiltersToCatalogFilter as he}from"../Filter/utils.esm.js";import"../Filter/FilterComponent.esm.js";import{emptyFilters as pe}from"../Filter/types.esm.js";import{FormattedPreview as E}from"../FormattedPreview/FormattedPreview.esm.js";import"../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"react-hook-form";import"../ListboxVirtualized/ListboxVirtualized.esm.js";import{useLabelOptions as me}from"../FormControlledAutocomplete/useLabelOptions.esm.js";import{ControlledAutocomplete as y}from"../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{LoadingIndicator as fe}from"../LoadingIndicator/LoadingIndicator.esm.js";import{useFactOptions as ue}from"./useFactOptions.esm.js";const ve=800,ge=q(t=>({content:{padding:t.spacing(2,3),width:ve},section:{margin:t.spacing(2,0)},expandedSection:{borderTop:`1px solid ${t.palette.divider}`,padding:t.spacing(0,2)},loading:{margin:t.spacing(2)},preview:{maxHeight:500,overflow:"auto",border:`1px solid ${t.palette.divider}`},pathSection:{display:"flex",alignItems:"center",margin:t.spacing(1,0)},testPathButton:{margin:t.spacing(1,1,.5,0)},collectorName:{fontSize:24}})),I=t=>{const p=!t||Object.values(t).every(h=>!h?.length)?{...pe(),selectedKinds:["Component","System"]}:t;return he(p)},ye=({factRef:t,updateFactRef:p,path:h,updatePath:W,entityRef:m,updateEntityRef:k,pathResolver:s,filters:G,onSave:C,hidePath:w})=>{const i=ge(),d=g(()=>{if(t)try{return Z(t)}catch{return}},[t]),[F,L]=S(d?.source??null);te(()=>{d?.source&&L(d.source)},[d?.source]);const[b,V]=S("jsonpath"),[x,P]=S(),[N,M]=S(),{data:O}=le(),$=g(()=>O?.map(c=>c.id)??[],[O]),{data:f}=re(d?.source,d?.name,!0),A=g(()=>f?ce(f.schema):[],[f]),{data:R,isLoading:D}=oe(),J=R?.map(c=>c.id)?.sort()??[],{data:z,isLoading:H}=ie(I(G),500),n=g(()=>R?.find(c=>c.id===F),[R,F]),{factOptions:K}=ue({selectedCollector:n}),{options:Q,getOptionLabel:T}=me(K),{data:l,isLoading:u}=ne({factRef:t||"",entityRef:N||"",path:x,pathResolver:s??b??void 0},!!t&&!!N),U=ae(()=>{P(h),M(m)},[m,h]),_=g(()=>!!n?.config?.cache,[n]);return e(o,{className:i.content,"data-testid":"fact-explorer",children:a(o,{children:[a(o,{children:[e(r,{variant:"subtitle1",children:"Select an Integration"}),e(y,{options:J,onChange:c=>{L(c),p("")},value:F,placeholder:"Integration",disabled:D,fullWidth:!0,freeSolo:!0})]}),!n&&e(v,{children:a(o,{children:[e(r,{variant:"subtitle1",children:"Enter a Fact Ref Directly"}),e(X,{value:t,onChange:c=>p(c.currentTarget.value),variant:"outlined",margin:"dense",placeholder:"Enter the full fact ref, i.e. custom:default/custom-fact",fullWidth:!0})]})}),!!n&&e(v,{children:a(o,{className:i.section,children:[se(n.id)?e(de,{noMargin:!0,collectorId:n.id}):a(r,{variant:"h5",className:i.collectorName,component:"div",children:[n.name??n.id," "]}),!!n.description&&e(r,{variant:"body2",children:n.description}),e(y,{options:Q,onChange:p,value:t??null,placeholder:"Select Fact",getOptionLabel:T,noOptionsText:"No Facts",fullWidth:!0})]})}),!!t&&!!d&&a(v,{children:[!!f?.schema&&e(o,{className:i.section,children:e(B,{elevation:1,title:"JSON Schema",children:e("div",{className:i.preview,children:e(E,{data:f.schema})})})}),!w&&a(v,{children:[a(o,{className:i.section,children:[e(r,{variant:"subtitle1",children:"Path Resolver"}),!s&&e(r,{variant:"caption",children:"Defaults to jsonpath"}),s?e(r,{variant:"body1",children:s}):e(y,{options:$,onChange:V,value:s??b,placeholder:"Path Resolver (Optional)",getOptionLabel:T,fullWidth:!0,disabled:!!s,freeSolo:!0})]}),a(o,{className:i.section,children:[e(r,{variant:"subtitle1",children:"Path"}),e(y,{options:(s??b)==="jsonpath"?A:[],onChange:c=>{x&&P(void 0),W(c)},value:h??null,placeholder:"Path",fullWidth:!0,freeSolo:!0}),e("div",{className:i.pathSection,children:!!C&&e(j,{className:i.testPathButton,variant:"contained",onClick:()=>C({factRef:t,path:h??"",pathResolver:b??s??""}),disabled:!h,color:"primary",children:"Save"})})]})]})]}),!!t&&!!d&&e(B,{alwaysExpanded:w,elevation:0,title:"Sample Fact and Test Path",children:a(o,{className:i.expandedSection,children:[a(o,{marginBottom:1,children:[e(r,{variant:"subtitle1",children:"Select an Entity"}),a(r,{variant:"caption",children:["Fact will be sampled from this entity.",e("br",{}),"If you don't see the entity in the drop-down list, you can type its reference in the format ","<kind>:<namespace>/<name>","."]}),e(y,{options:z??[],onChange:k,value:m??null,placeholder:"Entity Selection",isLoading:H,freeSolo:!0,fullWidth:!0})]}),e(o,{children:e(j,{className:i.testPathButton,variant:"contained",onClick:U,disabled:!m,color:"primary",children:"Sample Fact"})}),a(v,{children:[!!x&&!u&&a(o,{className:i.section,children:[e(r,{variant:"subtitle1",children:"Resolved Value"}),l?.resolvedValue!==null&&l?.resolvedValue!==void 0?e(o,{className:i.preview,children:e(E,{data:l?.resolvedValue})}):e(r,{color:"textSecondary",variant:"body2",children:"Could not resolve path"})]}),!!N&&a(o,{className:i.section,children:[e(r,{variant:"subtitle1",children:"Fact Data"}),_&&e(r,{variant:"caption",children:"Uses cache when available."}),!!u&&e("div",{className:i.loading,children:e(fe,{})}),!u&&!!l?.fact&&e(o,{className:i.preview,children:l?.fact?.sensitive&&ee.isEmpty(l?.fact?.data)?e(o,{children:e(Y,{severity:"info",children:"The associated fact contains potentially sensitive information and has been redacted."})}):e(E,{data:l?.fact?.data})}),!u&&!!l?.collectionError&&a(r,{color:"textSecondary",variant:"body2",children:["Failed to collect:"," ",l?.collectionError?.errorMessage]}),!u&&!l?.fact&&!l?.collectionError&&a(r,{color:"textSecondary",variant:"body2",children:["Fact ",t," unavailable for entity ",m]})]})]})]})})]})})};export{ye as FactExplorer,I as toEntityFilterQuery};
|
|
2
2
|
//# sourceMappingURL=FactExplorer.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as R,Fragment as P}from"react/jsx-runtime";import{createContext as F,useState as e}from"react";import{useFormContext as E}from"react-hook-form";import{FactExplorerDialog as S}from"./FactExplorerDialog.esm.js";const a=F({open:!1,updateOpen:()=>{},updateOnSave:()=>{},updateFactRef:()=>{},updatePath:()=>{},updateEntityRef:()=>{},updatePathResolver:()=>{}}),g=({children:r,hidePath:o})=>{const[p,n]=e(!1),[d,i]=e(),[u,l]=e(),[f,h]=e(),[s,c]=e(),[m,v]=e(),x=E()?.getValues("filtersStep.filter");return t(a.Provider,{value:{open:p,updateOpen:n,onSave:d,updateOnSave:i,factRef:u,updateFactRef:l,path:f,updatePath:h,entityRef:s,updateEntityRef:c,pathResolver:m,updatePathResolver:v,filters:x},children:R(P,{children:[r,t(S,{hidePath:o})]})})};export{a as FactExplorerContext,g as FactExplorerProvider};
|
|
2
2
|
//# sourceMappingURL=FactExplorerContext.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import{Button as
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{Button as v}from"@material-ui/core";import F from"@material-ui/icons/Search";import{useContext as d}from"react";import{SoundcheckDialog as E}from"../SoundcheckDialog/SoundcheckDialog.esm.js";import{FactExplorer as P}from"./FactExplorer.esm.js";import{FactExplorerContext as h}from"./FactExplorerContext.esm.js";const S=({hidePath:t})=>{const{open:o,updateOpen:r,onSave:p,factRef:n,updateFactRef:i,path:c,updatePath:l,entityRef:f,updateEntityRef:e,pathResolver:s,filters:u}=d(h);return a(E,{open:o,handleClose:()=>r(!1),title:"Fact Explorer",fullScreen:!1,children:a(P,{onSave:p,factRef:n,updateFactRef:i,path:c,updatePath:l,entityRef:f,updateEntityRef:e,pathResolver:s,filters:u,hidePath:t})})},g=({onSave:t,factRef:o,path:r,pathResolver:p,className:n,text:i="Explore Facts",hideIcon:c,variant:l="text",size:f})=>{const{updateOpen:e,updateOnSave:s,updateFactRef:u,updatePath:m,updatePathResolver:R}=d(h);return a(v,{onClick:()=>{e(!0),u(o??""),m(r??""),R(p??""),s(()=>x=>{t&&t(x),e(!1)})},className:n,variant:l,size:f,startIcon:c?void 0:a(F,{}),children:i})};export{S as FactExplorerDialog,g as FactExplorerDialogButton};
|
|
2
2
|
//# sourceMappingURL=FactExplorerDialog.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{parseFactRef as
|
|
1
|
+
import{parseFactRef as i,stringifyFactRef as p}from"@spotify/backstage-plugin-soundcheck-common";import{useMemo as n}from"react";import"@backstage/catalog-model";import"@backstage/core-plugin-api";import"@tanstack/react-query";import"../../api.esm.js";import"../../hooks/graphqlKeys.esm.js";import"@backstage/plugin-catalog-react";import"../../hooks/useSoundcheckAlert.esm.js";import{useGetAllTracks as s}from"../../hooks/tracks/useGetAllTracks.esm.js";import"../../hooks/useConfirmationModal.esm.js";import"react-router-dom";const l=({selectedCollector:e})=>{const{data:a}=s({});return{factOptions:n(()=>e?.factNames?.map(o=>{const t=e.id==="soundcheck"?{source:e.id,scope:"default",name:o}:i(o,{defaultSource:e.id,defaultScope:"default"});let m=t.name;if(e?.id==="soundcheck"){const r=a?.edges.find(c=>c.node.id===t.name.replace("track/",""))?.node;m=r?`${r.type==="campaign"?"Campaign: ":"Track: "}${r.name}`:t.name}return{label:m,value:p(t)}})?.sort((o,t)=>o.label.localeCompare(t.label))??[],[e?.factNames,e?.id,a])}};export{l as useFactOptions};
|
|
2
2
|
//# sourceMappingURL=useFactOptions.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n,jsxs as P,Fragment as T}from"react/jsx-runtime";import{makeStyles as V,TextField as v,IconButton as z}from"@material-ui/core";import j from"@material-ui/icons/Clear";import{Autocomplete as k}from"@material-ui/lab";import{useState as F,useMemo as W}from"react";import{ListboxVirtualized as y}from"../ListboxVirtualized/ListboxVirtualized.esm.js";const B=V(l=>({clearIndicator:{marginRight:l.spacing(.5)}})),D=({options:l,onChange:r,value:t,placeholder:d,getOptionLabel:s,disabled:p,fullWidth:u,noOptionsText:m,freeSolo:c=!1,isLoading:g=!1,autoSelect:I=!0,renderOption:f,testId:h,disableCloseOnSelect:S,multiple:o,multipleValue:a,getOptionSelected:b})=>{const[C,O]=F(t??""),x=B(),A=W(()=>o?a||[]:t||null,[o,a,t]),L=!o&&t;return n(k,{multiple:o,disableCloseOnSelect:S,options:l,inputValue:C,classes:{clearIndicator:x.clearIndicator},onInputChange:(e,i)=>O(i),onChange:(e,i)=>r(i),value:A,getOptionLabel:s,ListboxComponent:y,disabled:p,fullWidth:u,noOptionsText:m,freeSolo:c,loading:g,closeIcon:null,disableClearable:!0,getOptionSelected:b,autoSelect:I,renderOption:f,renderTags:()=>null,"data-testid":h,renderInput:e=>n(v,{...e,placeholder:d,variant:"outlined",margin:"dense",InputProps:{...e.InputProps,endAdornment:L?P(T,{children:[n(z,{onClick:()=>r(""),size:"small",children:n(j,{fontSize:"small"})}),e.InputProps.endAdornment]}):e.InputProps.endAdornment}})})};export{D as ControlledAutocomplete};
|
|
2
2
|
//# sourceMappingURL=ControlledAutocomplete.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as m,jsx as t}from"react/jsx-runtime";import{Box as l,Typography as c}from"@material-ui/core";import{upperFirst as f,isEmpty as g}from"lodash";import{useMemo as i}from"react";import"../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"react-hook-form";import"../ListboxVirtualized/ListboxVirtualized.esm.js";import{ControlledAutocomplete as G}from"../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{GroupHierarchyChip as x}from"./GroupHierarchyChip.esm.js";const C=({selectedGroupEntityRef:p,groupType:o,allOptions:a,selectGroup:n,isLoading:u})=>{const e=i(()=>a.filter(r=>r.type===o),[a,o]),d=i(()=>e.map(r=>r.ref),[e]),s=i(()=>e.filter(r=>r.key==="My Groups").map(r=>r.ref),[e]),y=i(()=>e.find(r=>r.ref===p)?.ref||null,[e,p]);return m(l,{maxWidth:480,marginBottom:1,children:[t(c,{variant:"subtitle2",children:f(o)}),t(G,{value:y,options:d,onChange:n,autoSelect:!1,getOptionLabel:r=>e.find(h=>h.ref===r)?.name??r,isLoading:u,placeholder:`Search all ${o}s`}),!g(s)&&m(l,{marginTop:1,children:[m(c,{variant:"subtitle2",children:["My ",f(o),"s"]}),t(l,{marginTop:1,children:s.map(r=>t(x,{selectedGroupRef:p,groupEntityRef:r,setSelectedGroup:n},r))})]})]})};export{C as GroupHierarchyCategorySelection};
|
|
2
|
+
//# sourceMappingURL=GroupHierarchyCategorySelection.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{EntityDisplayName as l}from"@backstage/plugin-catalog-react";import{Chip as p}from"@material-ui/core";const s=({groupEntityRef:o,selectedGroupRef:e,setSelectedGroup:i})=>{const t=o===e;return r(p,{onClick:t?void 0:()=>i(o),size:"small",color:t?"secondary":"default",label:r(l,{entityRef:o,disableTooltip:!0}),style:{marginBottom:6}},o)};export{s as GroupHierarchyChip};
|
|
2
|
+
//# sourceMappingURL=GroupHierarchyChip.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as r,jsx as e,Fragment as b}from"react/jsx-runtime";import{useEntityPresentation as B,EntityDisplayName as O}from"@backstage/plugin-catalog-react";import{Box as l,Typography as p}from"@material-ui/core";import{isEmpty as d}from"lodash";import{useMemo as s}from"react";import{useGroupHierarchy as x}from"../../hooks/heirarchy/useGroupHierarchy.esm.js";import"../FormControlledAutocomplete/FormControlledAutocomplete.esm.js";import"@material-ui/icons/CheckBox";import"@material-ui/icons/CheckBoxOutlineBlank";import"@material-ui/lab";import"react-hook-form";import"../ListboxVirtualized/ListboxVirtualized.esm.js";import{ControlledAutocomplete as j}from"../FormControlledAutocomplete/ControlledAutocomplete.esm.js";import{LoadingIndicator as C}from"../LoadingIndicator/LoadingIndicator.esm.js";import{GroupHierarchyChip as H}from"./GroupHierarchyChip.esm.js";const S=({filteredGroupOptions:t,setSelectedGroup:m,selectedGroupRef:u})=>{const c=s(()=>t.map(n=>n.ref),[t]),h=s(()=>t.find(n=>n.ref===u)?.ref||null,[t,u]);return r(b,{children:[!d(t)&&t.length>=20&&e(l,{marginBottom:2,children:e(j,{options:c,onChange:m,value:h,autoSelect:!1,getOptionLabel:n=>t.find(f=>f.ref===n)?.name??n,placeholder:"Search groups"})}),!d(t)&&t.length<20&&t.map(({ref:n})=>e(H,{setSelectedGroup:m,groupEntityRef:n},n))]})},L=({groupEntityRef:t,selectedGroup:m,setSelectedGroup:u,groupOptions:c})=>{const{primaryTitle:h,secondaryTitle:n}=B(t),{isLoading:f,data:R}=x(t,{includeParent:!0}),i=R?.[t],y=s(()=>{if(!i)return 0;let a=0;const o=(E={})=>{a+=E.ownedEntityRefs?.length??0;for(const w of Object.values(E.children))o(w)};return o(i),a},[i]),g=s(()=>{const a=i?.children??{};return Object.values(a).map(o=>({ref:o.entityRef,type:o.type}))},[i?.children]),G=s(()=>{if(d(g))return[];const a=new Set(g.map(o=>o.ref));return c.filter(o=>a.has(o.ref))},[g,c]),v=s(()=>{if(d(i?.parents))return[];const a=new Set(i?.parents??[]);return c.filter(o=>a.has(o.ref))},[i?.parents,c]);return r(l,{children:[r(l,{marginBottom:1,children:[e(p,{variant:"h6",children:e(O,{entityRef:t})}),e(p,{variant:"caption",children:n})]}),f&&r(l,{textAlign:"center",marginTop:2,marginBottom:2,children:[e(C,{}),e(l,{marginTop:2,children:e(p,{variant:"caption",children:"Loading Group Hierarchy"})})]}),i?.ownedEntityRefs&&r(l,{marginBottom:2,children:[e(p,{variant:"subtitle2",children:"Entity Ownership"}),r(p,{variant:"body2",children:[r("strong",{children:[h," directly owns:"]})," ",i.ownedEntityRefs.length," ",i.ownedEntityRefs.length===0?"Entity":"Entities"]}),r(p,{variant:"body2",children:[r("strong",{children:[h," and it's subgroups own:"]})," ",y," ",y===0?"Entity":"Entities"]})]}),!f&&r(b,{children:[r(l,{marginBottom:2,children:[e(p,{variant:"subtitle2",children:"Select Child Group"}),d(G)&&e(p,{variant:"body2",children:"No child groups"}),e(S,{filteredGroupOptions:G,setSelectedGroup:u,selectedGroupRef:m})]}),r(l,{marginBottom:2,children:[e(p,{variant:"subtitle2",children:"Select Parent Group"}),d(v)&&e(p,{variant:"body2",children:"No parent groups"}),e(S,{filteredGroupOptions:v,setSelectedGroup:u,selectedGroupRef:m})]})]})]})};export{L as GroupHierarchyGroupInfo};
|
|
2
|
+
//# sourceMappingURL=GroupHierarchyGroupInfo.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as d,Fragment as f,jsx as t}from"react/jsx-runtime";import{Button as G}from"@material-ui/core";import y from"@material-ui/icons/Menu";import{useState as l,useCallback as s}from"react";import{GroupHierarchySelectorDialog as h}from"./GroupHierarchySelectorDialog.esm.js";import{usePreviousSelectedGroups as S}from"./usePreviousSelectedGroups.esm.js";const g=({buttonProps:u,currentSelectedGroup:r,applyGroup:p})=>{const[c,e]=l(!1),[o,i]=l(""),{groupEntityRefs:n}=S(),a=s(()=>{r&&i(r),e(!0)},[r]),m=s(()=>{p(o),e(!1)},[p,o]);return d(f,{children:[t(G,{onClick:a,color:"primary",variant:"outlined",...u,size:"small",startIcon:t(y,{}),children:"Group"}),t(h,{open:c,handleClose:()=>e(!1),handleApply:m,previousGroupEntityRefs:n,selectedGroup:o,setSelectedGroup:i})]})};export{g as GroupHierarchySelector};
|
|
2
|
+
//# sourceMappingURL=GroupHierarchySelector.esm.js.map
|