using optional string array
Signed-off-by: Lucas De Souza <lucas.desouza@aa.com>
This commit is contained in:
committed by
Lucas De Souza
parent
bec0c068c9
commit
6b325f6b61
@@ -218,6 +218,8 @@ catalog:
|
||||
- System
|
||||
- Domain
|
||||
- Location
|
||||
sources:
|
||||
- github.com/backstage
|
||||
|
||||
processors:
|
||||
ldapOrg:
|
||||
|
||||
@@ -98,7 +98,7 @@ export class DefaultCatalogRulesEnforcer implements CatalogRulesEnforcer {
|
||||
if (config.has('catalog.rules')) {
|
||||
const globalRules = config.getConfigArray('catalog.rules').map(sub => ({
|
||||
allow: sub.getStringArray('allow').map(kind => ({ kind })),
|
||||
sources: sub.getStringArray('sources').map(source => ({ source })),
|
||||
sources: (sub.getOptionalStringArray('sources') || []).map(source => ({ source })),
|
||||
}));
|
||||
rules.push(...globalRules);
|
||||
} else {
|
||||
@@ -143,9 +143,9 @@ export class DefaultCatalogRulesEnforcer implements CatalogRulesEnforcer {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.matchEntity(entity, rule.allow)) {
|
||||
return true;
|
||||
}
|
||||
if (this.matchEntity(entity, rule.allow)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -27,17 +27,13 @@ import React from 'react';
|
||||
import { ImportInfoCard } from '../ImportInfoCard';
|
||||
import { ImportStepper } from '../ImportStepper';
|
||||
|
||||
interface DefaultImportPageProps {
|
||||
filters?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The default catalog import page.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const DefaultImportPage = (props: DefaultImportPageProps = { filters: [] }) => {
|
||||
const { filters } = props;
|
||||
export const DefaultImportPage = () => {
|
||||
const configApi = useApi(configApiRef);
|
||||
const appTitle = configApi.getOptional('app.title') || 'Backstage';
|
||||
|
||||
@@ -58,7 +54,7 @@ export const DefaultImportPage = (props: DefaultImportPageProps = { filters: []
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} md={8} lg={6} xl={4}>
|
||||
<ImportStepper filters={filters} />
|
||||
<ImportStepper />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Content>
|
||||
|
||||
@@ -51,7 +51,6 @@ export interface StepperProvider {
|
||||
analyze: (
|
||||
s: Extract<ImportState, { activeState: 'analyze' }>,
|
||||
opts: { apis: StepperApis },
|
||||
filters?: String[],
|
||||
) => StepConfiguration;
|
||||
prepare: (
|
||||
s: Extract<ImportState, { activeState: 'prepare' }>,
|
||||
|
||||
Reference in New Issue
Block a user