Skip to content

Commit 7ab8203

Browse files
committed
Changes based on Atif's review; Update SDK version
Signed-off-by: Keith Chong <kykchong@redhat.com>
1 parent 81460b5 commit 7ab8203

File tree

7 files changed

+31
-28
lines changed

7 files changed

+31
-28
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
},
1818
"devDependencies": {
1919
"@dagrejs/dagre": "^1.1.8",
20-
"@openshift-console/dynamic-plugin-sdk": "^4.19.0-prerelease.2",
21-
"@openshift-console/dynamic-plugin-sdk-internal": "^4.19.0-prerelease.2",
22-
"@openshift-console/dynamic-plugin-sdk-webpack": "^4.19.0-prerelease.2",
20+
"@openshift-console/dynamic-plugin-sdk": "^4.19.1",
21+
"@openshift-console/dynamic-plugin-sdk-internal": "^4.19.1",
22+
"@openshift-console/dynamic-plugin-sdk-webpack": "^4.19.1",
2323
"@openshift-console/plugin-shared": "^0.0.3",
2424
"@patternfly/quickstarts": "^6.4.0",
2525
"@patternfly/react-charts": "^8.4.0",

src/gitops/Statuses/SyncStatus.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import * as React from 'react';
2-
import {
3-
OutOfSyncIcon,
4-
SyncUnknownIcon,
5-
} from 'src/gitops/utils/components/Icons/Icons';
2+
import { OutOfSyncIcon, SyncUnknownIcon } from 'src/gitops/utils/components/Icons/Icons';
63
import { SyncStatus as SS } from 'src/gitops/utils/constants';
74

85
import { GreenCheckCircleIcon } from '@openshift-console/dynamic-plugin-sdk';

src/gitops/components/application/graph/ApplicationGraphView.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,14 @@ const customComponentFactory =
198198
} else if (label === t('Delete Application')) {
199199
launchDeleteModal();
200200
} else if (
201-
label === 'Show ' + graphElement.getData().kindPlural ||
202-
label === 'Hide ' + graphElement.getData().kindPlural
201+
label ===
202+
t('Show {{x}}', {
203+
x: graphElement.getData().kindPlural,
204+
}) ||
205+
label ===
206+
t('Hide {{x}}', {
207+
x: graphElement.getData().kindPlural,
208+
})
203209
) {
204210
const key = graphElement.getData().kindPlural;
205211
setGroupNodeStates((prev) => {
@@ -382,7 +388,7 @@ export const ApplicationGraphView: React.FC<{
382388
graph: {
383389
id: 'g1',
384390
type: 'graph',
385-
layout: 'PipleineDagreLayout',
391+
layout: 'Dagre',
386392
},
387393
};
388394

src/gitops/components/application/graph/graph-utils.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const createApplicationNode = (application: ApplicationKind): NodeModel => {
6464
),
6565
rank: 0,
6666
nodeStatus: nodeStatus,
67-
reourceHealthStatus: application?.status?.health?.status,
67+
resourceHealthStatus: application?.status?.health?.status,
6868
appHealthStatus: application?.status?.health?.status,
6969
syncStatus: application?.status?.sync?.status,
7070
},
@@ -304,14 +304,14 @@ export const getInitialNodes = (
304304
// Spacer node to the right of the application node. Fixed.
305305
initialNodes.push(createSpacerNode(1, 'application-node-spacer'));
306306
// Add child resources
307-
resources.forEach((resource, count) => {
307+
resources.forEach((resource) => {
308308
const kind = resource.kind;
309309
const badgeLabel = allK8sModels[kind]?.abbr || kindToAbbr(kind);
310310
const color =
311311
RESOURCE_COLORS.get(
312312
RESOURCE_BADGE_COLORS.get('.co-m-resource-' + resource.kind.toLowerCase()),
313313
) || RESOURCE_COLORS.get('color-container-dark');
314-
const nodeId = count + '-' + resource.kind + '-' + resource.name + '-' + resource.namespace;
314+
const nodeId = resource.kind + '-' + resource.name + '-' + resource.namespace;
315315
const key = resource.kind + 's';
316316
const resourceGroupExpandState = groupNodeStates.includes(key);
317317

src/gitops/components/application/graph/nodes/ApplicationNode.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ const ApplicationSyncStatusIcon = ({ status }: { status: SyncStatus }) => {
9393
);
9494
break;
9595
case SyncStatus.UNKNOWN:
96+
default:
9697
icon = (
9798
<CircleNotchIcon
9899
className={'fa-spin'}

src/gitops/components/application/graph/nodes/ResourceGroupNode.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ export const ResourceGroupNode: React.FC<
8585
{/* eslint-disable no-nested-ternary */}
8686
{data.hasProgressing ? (
8787
<SvgTextWithOverflow text={`Progressing`} maxWidth={200} x="69" y="40" />
88-
) : data.hasMissing ? (
89-
<SvgTextWithOverflow text={`Missing`} maxWidth={200} x="69" y="40" />
9088
) : data.hasDegraded ? (
9189
<SvgTextWithOverflow text={`Degraded`} maxWidth={200} x="69" y="40" />
90+
) : data.hasMissing ? (
91+
<SvgTextWithOverflow text={`Missing`} maxWidth={200} x="69" y="40" />
9292
) : data.hasSuspended ? (
9393
<SvgTextWithOverflow text={`Suspended`} maxWidth={200} x="69" y="40" />
9494
) : data.hasUnknown ? (

yarn.lock

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,10 +1148,10 @@
11481148
"@nodelib/fs.scandir" "2.1.5"
11491149
fastq "^1.6.0"
11501150

1151-
"@openshift-console/dynamic-plugin-sdk-internal@^4.19.0-prerelease.2":
1152-
version "4.19.0"
1153-
resolved "https://registry.yarnpkg.com/@openshift-console/dynamic-plugin-sdk-internal/-/dynamic-plugin-sdk-internal-4.19.0.tgz#df9ec5191d002f57250064c40bda6b8f0528bad9"
1154-
integrity sha512-OnC/2CV/oejtOzXQujYk/0JGSPuFjR6F51KsKKPelX9KqF+A2G2GW/yESR3n/FkGMtXxl6ZCUXUBCDMLXVRH/g==
1151+
"@openshift-console/dynamic-plugin-sdk-internal@^4.19.1":
1152+
version "4.20.0"
1153+
resolved "https://registry.yarnpkg.com/@openshift-console/dynamic-plugin-sdk-internal/-/dynamic-plugin-sdk-internal-4.20.0.tgz#938702cf6e79dbf732dddb98a24c22680a0b049c"
1154+
integrity sha512-QEV0XiydJBA33gtVz1g92HLTvG1n99igQ3FR+UBr+ufzl3DvW0hwXH+EZgskff3WBVnEHWlOAI2SGy8ujdfdjg==
11551155
dependencies:
11561156
"@patternfly/react-topology" "^6.2.0"
11571157
immutable "3.x"
@@ -1164,10 +1164,10 @@
11641164
redux "4.0.1"
11651165
redux-thunk "2.4.0"
11661166

1167-
"@openshift-console/dynamic-plugin-sdk-webpack@^4.19.0-prerelease.2":
1168-
version "4.19.0"
1169-
resolved "https://registry.yarnpkg.com/@openshift-console/dynamic-plugin-sdk-webpack/-/dynamic-plugin-sdk-webpack-4.19.0.tgz#6a0171702d9089f6cbe6cb74665ea855bb42af7e"
1170-
integrity sha512-a4zxkrEe4qhKir5R21OK/wJVCn8Gzm/y3smLxRDi/BjHFgcnNQKEgCMP4IhvTlT0NRJQ4Q9AmPT1WXBlV3ip3g==
1167+
"@openshift-console/dynamic-plugin-sdk-webpack@^4.19.1":
1168+
version "4.20.0"
1169+
resolved "https://registry.yarnpkg.com/@openshift-console/dynamic-plugin-sdk-webpack/-/dynamic-plugin-sdk-webpack-4.20.0.tgz#5b42772625bf44fc3faf76ecf94b5223ed3e6644"
1170+
integrity sha512-cTpBy8Jz2C65Qy/3fXIRv8IehvKRkms8rMcjz0KGo7DRoaDPnSyMXi5gH0BIA01nr5U6sBncNSbaD/3PXaZaig==
11711171
dependencies:
11721172
"@openshift/dynamic-plugin-sdk-webpack" "^4.0.2"
11731173
ajv "^6.12.3"
@@ -1180,13 +1180,12 @@
11801180
semver "6.x"
11811181
webpack "^5.75.0"
11821182

1183-
"@openshift-console/dynamic-plugin-sdk@^4.19.0-prerelease.2":
1184-
version "4.19.0"
1185-
resolved "https://registry.yarnpkg.com/@openshift-console/dynamic-plugin-sdk/-/dynamic-plugin-sdk-4.19.0.tgz#c9b6c1338b14c174520bff827f4e2be5ab2290a4"
1186-
integrity sha512-v1pNt2eDCyXwRZX+66QDnaYtrwbLapRMtCQql65pgePsE5/5aoOSGIsTjIB812j+oagAB1yk4r7OUlopA2F8kw==
1183+
"@openshift-console/dynamic-plugin-sdk@^4.19.1":
1184+
version "4.20.0"
1185+
resolved "https://registry.yarnpkg.com/@openshift-console/dynamic-plugin-sdk/-/dynamic-plugin-sdk-4.20.0.tgz#f5e6aaa147f02f651e3e6a734a1fb55555bad56a"
1186+
integrity sha512-Rf6XfWweXccmz10UpBT0tJTXBDf6jqRaiwQjzXGJ4W+ewVh5BQwxXIeBwzxjuAr3Bt972MhIqksHrlh54moERA==
11871187
dependencies:
11881188
"@patternfly/react-topology" "^6.2.0"
1189-
classnames "2.x"
11901189
immutable "3.x"
11911190
lodash "^4.17.21"
11921191
react "^17.0.1"

0 commit comments

Comments
 (0)