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 (#4269)

This commit is contained in:
Sebastian Malton 2021-11-08 10:12:17 -05:00 committed by GitHub
parent 90d4899ece
commit 3666c56319
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;