mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user