Cluster Tools: Don't allow v1 to be installed when v2 is already installed

This commit is contained in:
Neil MacDougall 2021-06-03 14:34:30 +01:00
parent 5c5f95f181
commit 0a57ad10e8
2 changed files with 9 additions and 2 deletions

View File

@ -79,6 +79,10 @@ button,
color: var(--primary) !important; color: var(--primary) !important;
border: solid 1px var(--primary); border: solid 1px var(--primary);
line-height: $btn-height - 2px; line-height: $btn-height - 2px;
&.btn-sm {
line-height: $btn-sm-height;
}
} }
.role-tertiary { .role-tertiary {

View File

@ -187,7 +187,10 @@ export default {
// Move the app data to the v1 chart // Move the app data to the v1 chart
v1.app = v2.app; v1.app = v2.app;
v2.app = undefined; v2.app = undefined;
v2.blockedV1 = true; v2.blocked = true;
} else {
// V2 is installed, so block V1
v1.blocked = true;
} }
} }
} }
@ -358,7 +361,7 @@ export default {
<AppSummaryGraph :row="opt.app" label-key="generic.resourceCount" :link-to="opt.app.detailLocation" /> <AppSummaryGraph :row="opt.app" label-key="generic.resourceCount" :link-to="opt.app.detailLocation" />
</div> </div>
<div class="action"> <div class="action">
<template v-if="opt.blockedV1"> <template v-if="opt.blocked">
<button disabled="true" class="btn btn-sm role-primary" v-html="t('catalog.tools.action.install')" /> <button disabled="true" class="btn btn-sm role-primary" v-html="t('catalog.tools.action.install')" />
</template> </template>
<template v-else-if="opt.app && opt.chart.legacy"> <template v-else-if="opt.app && opt.chart.legacy">