diff --git a/pkg/harvester/config/harvester.js b/pkg/harvester/config/harvester.js index 9766770bf8c..b321143501d 100644 --- a/pkg/harvester/config/harvester.js +++ b/pkg/harvester/config/harvester.js @@ -78,7 +78,8 @@ export function init($plugin, store) { product: PRODUCT_NAME, resource: HCI.DASHBOARD } - } + }, + hideNamespaceLocation: true, }); basicType([HCI.DASHBOARD]); diff --git a/pkg/harvester/models/harvesterhci.io.virtualmachineimage.js b/pkg/harvester/models/harvesterhci.io.virtualmachineimage.js index 90ab9fad8dd..3165f914a4c 100644 --- a/pkg/harvester/models/harvesterhci.io.virtualmachineimage.js +++ b/pkg/harvester/models/harvesterhci.io.virtualmachineimage.js @@ -10,10 +10,26 @@ import { formatSi } from '@shell/utils/units'; import { ucFirst } from '@shell/utils/string'; import { stateDisplay, colorForState } from '@shell/plugins/dashboard-store/resource-class'; import { _CLONE } from '@shell/config/query-params'; -import { isReady } from '@shell/machine-config/harvester'; import HarvesterResource from './harvester'; import { PRODUCT_NAME as HARVESTER_PRODUCT } from '../config/harvester'; +function isReady() { + function getStatusConditionOfType(type, defaultValue = []) { + const conditions = Array.isArray(get(this, 'status.conditions')) ? this.status.conditions : defaultValue; + + return conditions.find( cond => cond.type === type); + } + + const initialized = getStatusConditionOfType.call(this, 'Initialized'); + const imported = getStatusConditionOfType.call(this, 'Imported'); + const isCompleted = this.status?.progress === 100; + + if ([initialized?.status, imported?.status].includes('False')) { + return false; + } else { + return isCompleted && true; + } +} export default class HciVmImage extends HarvesterResource { get availableActions() { let out = super._availableActions; diff --git a/shell/components/ExplorerProjectsNamespaces.vue b/shell/components/ExplorerProjectsNamespaces.vue index 64d7d7cd0ee..06c23843c60 100644 --- a/shell/components/ExplorerProjectsNamespaces.vue +++ b/shell/components/ExplorerProjectsNamespaces.vue @@ -399,10 +399,14 @@ export default {