Skip to content

Commit

Permalink
Improve state feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlipp committed Jun 5, 2024
1 parent 9180323 commit d6a0cc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@
v-html="controller.breakBeforeDots(entry[key])"></span>
</td>
<td class="jdrupes-vmoperator-vmconlet-view-action-list">
<span role="button" v-if="entry.spec.vm.state != 'Running'"
<span role="button"
v-if="entry.spec.vm.state != 'Running' && !entry['running']"
tabindex="0" class="fa fa-play" :title="localize('Start VM')"
v-on:click="vmAction(entry.name, 'start')"></span>
<span role="button" v-else class="fa fa-play"
aria-disabled="true" :title="localize('Start VM')"></span>
<span role="button" v-if="entry.spec.vm.state != 'Stopped'"
<span role="button"
v-if="entry.spec.vm.state != 'Stopped' && entry['running']"
tabindex="0" class="fa fa-stop" :title="localize('Stop VM')"
v-on:click="vmAction(entry.name, 'stop')"></span>
<span role="button" v-else class="fa fa-stop"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,15 @@ window.orgJDrupesVmOperatorVmViewer.initPreview = (previewDom: HTMLElement,
:title="localize('Open console')"></td>
<td v-if="vmDef.spec"
class="jdrupes-vmoperator-vmviewer-preview-action-list">
<span role="button" v-if="vmDef.spec.vm.state != 'Running'"
<span role="button"
v-if="vmDef.spec.vm.state != 'Running' && !vmDef.running"
:aria-disabled="!vmDef.userPermissions.includes('start')"
tabindex="0" class="fa fa-play" :title="localize('Start VM')"
v-on:click="vmAction(vmDef.name, 'start')"></span>
<span role="button" v-else class="fa fa-play"
aria-disabled="true" :title="localize('Start VM')"></span>
<span role="button" v-if="vmDef.spec.vm.state != 'Stopped'"
<span role="button"
v-if="vmDef.spec.vm.state != 'Stopped' && vmDef.running"
:aria-disabled="!vmDef.userPermissions.includes('stop')"
tabindex="0" class="fa fa-stop" :title="localize('Stop VM')"
v-on:click="vmAction(vmDef.name, 'stop')"></span>
Expand Down

0 comments on commit d6a0cc6

Please sign in to comment.