Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion frontend/public/components/deployment-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ import {
} from './factory';
import {
AsyncComponent,
history,
Kebab,
KebabAction,
ContainerTable,
DeploymentPodCounts,
navFactory,
pluralize,
ResourceSummary,
resourcePath,
SectionHeading,
togglePaused,
WorkloadPausedAlert,
Expand All @@ -47,9 +49,15 @@ const rollout = (dc: K8sResourceKind): Promise<K8sResourceKind> => {
return k8sCreate(DeploymentConfigModel, req, opts);
};

const determineReplicationControllerName = (dc: K8sResourceKind): string => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are doing the same thing in origin

return `${dc.metadata.name}-${dc.status.latestVersion}`;
};

const RolloutAction: KebabAction = (kind: K8sKind, obj: K8sResourceKind) => ({
label: 'Start Rollout',
callback: () => rollout(obj).catch(err => {
callback: () => rollout(obj).then(deployment => {
history.push(resourcePath('ReplicationController', determineReplicationControllerName(deployment), deployment.metadata.namespace));
}).catch(err => {
const error = err.message;
errorModal({error});
}),
Expand Down