disable cluster link if harvester version lower than v1.3.0

Signed-off-by: andy.lee <andy.lee@suse.com>
This commit is contained in:
andy.lee
2024-11-12 11:50:42 +01:00
committed by Francesco Torchia
parent 244a3f8e06
commit b566caf2e1
4 changed files with 40 additions and 2 deletions
@@ -87,6 +87,16 @@ export default {
},
methods: {
disableClusterLink(row) {
// eslint-disable-next-line no-console
console.log('🚀 ~ disableClusterLink ~ row:', row);
if (!row.isSupportedHarvesterVersion) {
return true;
}
return this.navigating ? true : null;
},
async goToCluster(row) {
const timeout = setTimeout(() => {
// Don't show loading indicator for quickly fetched plugins
@@ -148,7 +158,7 @@ export default {
<a
v-if="row.isReady"
class="link"
:disabled="navigating ? true : null"
:disabled="disableClusterLink(row)"
@click="goToCluster(row)"
>{{ row.nameDisplay }}</a>
<span v-else>