Skip to content

Commit

Permalink
Fixed tsc issues
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Cai <yicai@redhat.com>
  • Loading branch information
ciiay committed Oct 24, 2024
1 parent 6ce6ca1 commit 73abf9a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const BootOrderSummary: React.FC<BootOrderSummaryProps> = ({
<BootOrderEmptySummary devices={devices} />
) : (
<ol>
{sources.map(source => (
{sources.map((source: any) => (
<li key={deviceKey(source)}>{deviceLabel(source)}</li>
))}
</ol>
Expand Down
2 changes: 2 additions & 0 deletions workspaces/topology/plugins/topology/src/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ declare module '*.svg' {
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
export default content;
}

declare module 'lodash';
6 changes: 3 additions & 3 deletions workspaces/topology/plugins/topology/src/utils/vm-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ export const getVmiIpAddresses = (vmi: VMIKind | null) => {
return uniq(
flatMap(
// get IPs only for named interfaces because Windows reports IPs for other devices like Loopback Pseudo-Interface 1 etc.
get(vmi, 'status.interfaces', []).filter(i => !!i.name),
i => {
get(vmi, 'status.interfaces', []).filter((i: { name: any }) => !!i.name),
(i: { ipAddress: string; ipAddresses: string[] }) => {
const arr = [];
if (i.ipAddress) {
// the "ipAddress" is deprecated but still can contain useful value
Expand All @@ -174,7 +174,7 @@ export const getVmiIpAddresses = (vmi: VMIKind | null) => {
}
return arr;
},
).filter(ip => ip && ip.length > 0),
).filter((ip: string | any[]) => ip && ip.length > 0),
);
};

Expand Down

0 comments on commit 73abf9a

Please sign in to comment.