Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fix: certificate injection
Browse files Browse the repository at this point in the history
  • Loading branch information
olexii4 committed Mar 18, 2023
1 parent d650365 commit bc08036
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/dashboard-frontend/src/pages/GetStarted/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { selectWorkspaceByQualifiedName } from '../../store/Workspaces/selectors
import { selectDefaultNamespace } from '../../store/InfrastructureNamespaces/selectors';
import getRandomString from '../../services/helpers/random';
import devfileApi from '../../services/devfileApi';
import { FactoryParams } from '../../containers/Loader/buildFactoryParams';

const SamplesListTab = React.lazy(() => import('./GetStartedTab'));

Expand Down Expand Up @@ -116,9 +117,9 @@ export class GetStarted extends React.PureComponent<Props, State> {
[fileName: string]: string;
},
): Promise<void> {
const attr: { [key: string]: string } = {};
const attr: Partial<FactoryParams> = {};
if (stackName) {
attr.stackName = stackName;
attr.factoryId = stackName;
}
if (isCheDevfile(devfile) && !devfile.metadata.name && devfile.metadata.generateName) {
const name = devfile.metadata.generateName + getRandomString(4).toLowerCase();
Expand All @@ -130,8 +131,12 @@ export class GetStarted extends React.PureComponent<Props, State> {
: this.props.defaultNamespace.name;
let workspace: Workspace | undefined;
try {
await this.props.createWorkspaceFromDevfile(devfile, attr, optionalFilesContent);
this.props.setWorkspaceQualifiedName(namespace, devfile.metadata.name as string);
await this.props.createWorkspaceFromDevfile(
devfile,
attr as FactoryParams,
optionalFilesContent,
);
this.props.setWorkspaceQualifiedName(namespace, devfile.metadata.name);
workspace = this.props.activeWorkspace;
} catch (e) {
const errorMessage = common.helpers.errors.getMessage(e);
Expand Down

0 comments on commit bc08036

Please sign in to comment.