Delay enable until VM operator agent started.
This commit is contained in:
parent
a1e941276e
commit
b4bc0c7b0f
1 changed files with 7 additions and 7 deletions
|
|
@ -74,7 +74,7 @@ window.orgJDrupesVmOperatorVmAccess.initPreview = (previewDom: HTMLElement,
|
||||||
const busy = computed(() => previewApi.vmDefinition.spec
|
const busy = computed(() => previewApi.vmDefinition.spec
|
||||||
&& (previewApi.vmDefinition.spec.vm.state === 'Running'
|
&& (previewApi.vmDefinition.spec.vm.state === 'Running'
|
||||||
&& (previewApi.poolName
|
&& (previewApi.poolName
|
||||||
? !previewApi.vmDefinition.booted
|
? !previewApi.vmDefinition.vmopAgent
|
||||||
: !previewApi.vmDefinition.running)
|
: !previewApi.vmDefinition.running)
|
||||||
|| previewApi.vmDefinition.spec.vm.state === 'Stopped'
|
|| previewApi.vmDefinition.spec.vm.state === 'Stopped'
|
||||||
&& previewApi.vmDefinition.running));
|
&& previewApi.vmDefinition.running));
|
||||||
|
|
@ -87,7 +87,7 @@ window.orgJDrupesVmOperatorVmAccess.initPreview = (previewDom: HTMLElement,
|
||||||
previewApi.vmDefinition.spec.vm.state !== 'Stopped'
|
previewApi.vmDefinition.spec.vm.state !== 'Stopped'
|
||||||
&& previewApi.vmDefinition.running);
|
&& previewApi.vmDefinition.running);
|
||||||
const running = computed(() => previewApi.vmDefinition.running);
|
const running = computed(() => previewApi.vmDefinition.running);
|
||||||
const booted = computed(() => previewApi.vmDefinition.booted);
|
const vmopAgent = computed(() => previewApi.vmDefinition.vmopAgent);
|
||||||
const inUse = computed(() => previewApi.vmDefinition.usedBy != '');
|
const inUse = computed(() => previewApi.vmDefinition.usedBy != '');
|
||||||
const permissions = computed(() => previewApi.permissions);
|
const permissions = computed(() => previewApi.permissions);
|
||||||
const osicon = computed(() => {
|
const osicon = computed(() => {
|
||||||
|
|
@ -123,7 +123,7 @@ window.orgJDrupesVmOperatorVmAccess.initPreview = (previewDom: HTMLElement,
|
||||||
};
|
};
|
||||||
|
|
||||||
return { localize, resourceBase, vmAction, poolName, vmName,
|
return { localize, resourceBase, vmAction, poolName, vmName,
|
||||||
configured, busy, startable, stoppable, running, booted,
|
configured, busy, startable, stoppable, running, vmopAgent,
|
||||||
inUse, permissions, osicon };
|
inUse, permissions, osicon };
|
||||||
},
|
},
|
||||||
template: `
|
template: `
|
||||||
|
|
@ -133,7 +133,7 @@ window.orgJDrupesVmOperatorVmAccess.initPreview = (previewDom: HTMLElement,
|
||||||
<td rowspan="2" style="position: relative"><span
|
<td rowspan="2" style="position: relative"><span
|
||||||
style="position: absolute;" :class="{ busy: busy }"
|
style="position: absolute;" :class="{ busy: busy }"
|
||||||
><img role=button :aria-disabled="(poolName
|
><img role=button :aria-disabled="(poolName
|
||||||
? !booted : !running)
|
? !vmopAgent : !running)
|
||||||
|| !permissions.includes('accessConsole')"
|
|| !permissions.includes('accessConsole')"
|
||||||
v-on:click="vmAction('openConsole')"
|
v-on:click="vmAction('openConsole')"
|
||||||
:src="resourceBase + (running
|
:src="resourceBase + (running
|
||||||
|
|
@ -215,9 +215,9 @@ JGConsole.registerConletFunction("org.jdrupes.vmoperator.vmaccess.VmAccess",
|
||||||
vmDefinition.running = condition.status === "True";
|
vmDefinition.running = condition.status === "True";
|
||||||
vmDefinition.runningConditionSince
|
vmDefinition.runningConditionSince
|
||||||
= new Date(condition.lastTransitionTime);
|
= new Date(condition.lastTransitionTime);
|
||||||
} else if (condition.type === "Booted") {
|
} else if (condition.type === "VmopAgentConnected") {
|
||||||
vmDefinition.booted = condition.status === "True";
|
vmDefinition.vmopAgent = condition.status === "True";
|
||||||
vmDefinition.bootedConditionSince
|
vmDefinition.vmopAgentConditionSince
|
||||||
= new Date(condition.lastTransitionTime);
|
= new Date(condition.lastTransitionTime);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue