Skip to content

Commit

Permalink
Merge pull request #4325 from vikram-raj/odc-3042
Browse files Browse the repository at this point in the history
Bug 1803252: Add connector when adding a project through connector
  • Loading branch information
openshift-merge-robot committed Feb 15, 2020
2 parents 2abb9a5 + ba57ef1 commit 35c0449
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('addResourceMenuUtils: ', () => {
expect(url.searchParams.get('importType')).toBe('git');
expect(url.searchParams.get('application')).toBe('application-1');
expect(url.searchParams.get('contextSource')).toBe(
'apps.openshift.io~v1~DeploymentConfig%2Fnodejs',
'apps.openshift.io~v1~DeploymentConfig/nodejs',
);
expect(Array.from(url.searchParams.entries())).toHaveLength(3);
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { K8sResourceKind, referenceFor } from '@console/internal/module/k8s';
import { KebabOption } from '@console/internal/components/utils';
import { ImportOptions } from '../components/import/import-types';
import { QUERY_PROPERTIES } from '../const';

const PART_OF = 'app.kubernetes.io/part-of';

Expand Down Expand Up @@ -38,10 +39,10 @@ export const getAddPageUrl = (
throw new Error('Invalid Import option provided');
}
if (hasApplication && appGroup) {
params.append('application', encodeURIComponent(appGroup));
params.append(QUERY_PROPERTIES.APPLICATION, appGroup);
}
if (contextSource) {
params.append('contextSource', encodeURIComponent(contextSource));
params.append(QUERY_PROPERTIES.CONTEXT_SOURCE, contextSource);
}
return `${pageUrl}?${params.toString()}`;
};
Expand Down

0 comments on commit 35c0449

Please sign in to comment.