Skip to content

Commit 382cce8

Browse files
committed
Update based on Atif's review feedback
Signed-off-by: Keith Chong <kykchong@redhat.com>
1 parent 9b0ef8e commit 382cce8

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

src/gitops/components/rollout/RolloutRevisionsTab.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from 'react';
2-
import { RouteComponentProps } from 'react-router';
32
import classNames from 'classnames';
43
import { PodKind } from 'src/components/topology/console/types';
54

@@ -12,10 +11,7 @@ import { Flex, FlexItem, PageSection, PageSectionVariants, Title } from '@patter
1211
import { ReplicaSetKind, RolloutKind } from './model/RolloutModel';
1312
import { Revisions } from './revisions/Revisions';
1413

15-
type RolloutRevisionsTabProps = RouteComponentProps<{
16-
ns: string;
17-
name: string;
18-
}> & {
14+
type RolloutRevisionsTabProps = {
1915
obj?: RolloutKind;
2016
};
2117

src/gitops/components/rollout/components/AnalysisRunStatus/AnalysisRunStatus.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ export const AnalysisRunStatusFragment: React.FC<AnalysisRunStatusProps> = ({
4747
color = 'green';
4848
break;
4949
}
50-
case (AnalysisRunStatus.Failed, AnalysisRunStatus.Error): {
50+
case AnalysisRunStatus.Failed:
51+
case AnalysisRunStatus.Error: {
5152
icon = <AnalysisRunStatusFailureIcon />;
5253
color = 'red';
5354
break;
@@ -103,7 +104,7 @@ const Metrics: React.FC<MetricsProps> = ({ arInfo }) => {
103104
<DescriptionList
104105
isHorizontal
105106
isCompact
106-
className="gitops_admin_plugin__tight_description_list"
107+
className="gitops_plugin__tight_description_list"
107108
>
108109
<DescriptionListGroup>
109110
<DescriptionListTerm>Started At:</DescriptionListTerm>
@@ -256,7 +257,7 @@ function getMeasurementTooltip(measurement: Measurement) {
256257
<tr>
257258
<th style={{ whiteSpace: 'nowrap' }}>Finished At: </th>
258259
<td>
259-
<Timestamp simple timestamp={measurement.startedAt} />
260+
<Timestamp simple timestamp={measurement.finishedAt} />
260261
</td>
261262
</tr>
262263
{measurement.value && (

src/gitops/components/rollout/revisions/ReplicaSetInfo.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export type AnalysisRunInfo = {
3434
};
3535

3636
export type PodInfo = {
37-
readyReplicas: number;
38-
replicas: number;
37+
readyReplicas?: number;
38+
replicas?: number;
3939
pods: PodKind[];
4040
ownerReferences: OwnerReference[];
4141
};
@@ -142,7 +142,7 @@ export const getReplicaSetInfo = async (
142142
[revision: string]: any;
143143
};
144144

145-
const revisions: RevisionsMap = [];
145+
const revisions: RevisionsMap = {};
146146

147147
// Go through each replicaset and add to list
148148
replicaSets.forEach((rs) => {

0 commit comments

Comments
 (0)