Skip to content

Commit

Permalink
Show "Uses SPICE" warning on the overview
Browse files Browse the repository at this point in the history
It turns out that the overview already reads all the VM's XML, so we can
show the alert label from commit 5258c32 also on the overview.
  • Loading branch information
martinpitt authored and mvollmer committed Jan 31, 2024
1 parent ad58485 commit bcb2f76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/vms/hostvmslist.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { vmId, rephraseUI, dummyVmsFilter, DOMAINSTATE } from "../../helpers.js"
import { ListingTable } from "cockpit-components-table.jsx";
import StateIcon from '../common/stateIcon.jsx';
import { VmNeedsShutdown } from '../common/needsShutdown.jsx';
import { VmUsesSpice } from '../vm/usesSpice.jsx';
import { AggregateStatusCards } from "../aggregateStatusCards.jsx";
import store from "../../store.js";

Expand All @@ -59,7 +60,7 @@ const VmState = ({ vm, dismissError }) => {
error={vm.error}
state={state}
valueId={`${vmId(vm.name)}-${vm.connectionName}-state`}
additionalState={<VmNeedsShutdown vm={vm} />} />
additionalState={<><VmNeedsShutdown vm={vm} /><VmUsesSpice vm={vm} /></>} />
);
};

Expand Down
4 changes: 3 additions & 1 deletion test/check-machines-create
Original file line number Diff line number Diff line change
Expand Up @@ -2518,10 +2518,12 @@ vnc_password= "{vnc_passwd}"
self.login_and_go("/machines")
self.waitPageInit()
self.waitVmRow(vmName, "system")
# warns on the overview
b.wait_visible(f"#vm-{vmName}-uses-spice")
self.goToVmPage(vmName)
b.wait_text(f"#vm-{vmName}-system-state", "Shut off")

# warns
# warns on the details page
b.wait_visible(f"#vm-{vmName}-uses-spice")
# and indeed startup fails
b.click(f"#vm-{vmName}-system-run")
Expand Down

0 comments on commit bcb2f76

Please sign in to comment.