1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Display loading spinner while switching between helm charts

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-11-05 11:08:30 -04:00
parent 0eb1e71d3a
commit 945d134280

View File

@ -49,9 +49,9 @@ const LargeTooltip = withStyles({
@observer
export class HelmChartDetails extends Component<Props> {
@observable chartVersions: HelmChart[];
@observable selectedChart: HelmChart;
@observable readme: string = null;
@observable error: string = null;
@observable selectedChart?: HelmChart;
@observable readme?: string;
@observable error?: string;
private abortController?: AbortController;
@ -68,6 +68,10 @@ export class HelmChartDetails extends Component<Props> {
disposeOnUnmount(this, [
reaction(() => this.props.chart, async ({ name, repo, version }) => {
try {
this.selectedChart = undefined;
this.chartVersions = undefined;
this.readme = undefined;
const { readme, versions } = await getChartDetails(repo, name, { version });
this.readme = readme;