Skip to content
Snippets Groups Projects

[PLATFORM-2768] Migrate away from deprecated Flux APIs

Merged Alain Atemnkeng requested to merge aatemnke2-PLATFORM-2768 into main
Viewing commit 3af5ed6f
Show latest version
4 files
+ 5028
8330
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -4,7 +4,7 @@ import {
SimpleTable,
StatusLabel,
} from '@kinvolk/headlamp-plugin/lib/CommonComponents';
import { KubeObject } from '@kinvolk/headlamp-plugin/lib/K8s/cluster';
import { KubeObject } from '@kinvolk/headlamp-plugin/lib/lib/k8s/cluster';
import { Box } from '@mui/material';
import { useEffect, useState } from 'react';
import { listHelmCharts, listHelmChartsByNamespace } from '../api/helmCharts';
@@ -32,7 +32,7 @@ export default function HelmChartList(props: HelmChartListProps) {
}
}, [searchTerm]);
function processResponse(response) {
function processResponse(response: { items: any[]; }) {
if (!response.items) {
setHelmCharts([]);
return;
@@ -80,7 +80,7 @@ export default function HelmChartList(props: HelmChartListProps) {
const conditions = helmChart.status?.conditions ?? [];
let message = '';
let status = 'Unknown';
conditions.forEach(condition => {
conditions.forEach((condition: { type: string; status: string; message: string; }) => {
if (condition.type === 'Ready') {
status = condition.status ?? 'Unknown';
message = condition.message ?? '';