1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(helm): helm actions [r8s-259] (#715)

Co-authored-by: James Player <james.player@portainer.io>
Co-authored-by: Cara Ryan <cara.ryan@portainer.io>
Co-authored-by: stevensbkang <skan070@gmail.com>
This commit is contained in:
Ali 2025-05-13 22:15:04 +12:00 committed by GitHub
parent dfa32b6755
commit 4ee349bd6b
117 changed files with 4161 additions and 696 deletions

View file

@ -3,8 +3,11 @@ import { useState } from 'react';
import { useCurrentUser } from '@/react/hooks/useUser';
import { Chart } from '../types';
import {
useHelmChartList,
useHelmRepositories,
} from '../queries/useHelmChartList';
import { useHelmChartList } from './queries/useHelmChartList';
import { HelmTemplatesList } from './HelmTemplatesList';
import { HelmTemplatesSelectedItem } from './HelmTemplatesSelectedItem';
@ -18,10 +21,8 @@ export function HelmTemplates({ onSelectHelmChart, namespace, name }: Props) {
const [selectedChart, setSelectedChart] = useState<Chart | null>(null);
const { user } = useCurrentUser();
const { data: charts = [], isLoading: chartsLoading } = useHelmChartList(
user.Id
);
const helmReposQuery = useHelmRepositories(user.Id);
const chartListQuery = useHelmChartList(user.Id, helmReposQuery.data ?? []);
function clearHelmChart() {
setSelectedChart(null);
onSelectHelmChart('');
@ -44,9 +45,9 @@ export function HelmTemplates({ onSelectHelmChart, namespace, name }: Props) {
/>
) : (
<HelmTemplatesList
charts={charts}
charts={chartListQuery.data}
selectAction={handleChartSelection}
loading={chartsLoading}
isLoading={chartListQuery.isInitialLoading}
/>
)}
</div>