Add boot option override and TPM enable toggle
- Adds ability to set a bootsource override to allowable target value
- Adds ability to enable or disable TPM required policy
- Replaces power operations confirm directive with bootstrap modal
Tested: Confirmed override settings saved to redfish but unable to verify
if settings are automatically set to disabled by petitboot after a
one time boot. Passes DAP.
Resolves openbmc/phosphor-webui#82
Resolves openbmc/phosphor-webui#90
Signed-off-by: Dixsie Wolmers <dixsiew@gmail.com>
Change-Id: If0ffd6f9328939d70c7958ee11fb90bd20a1e685
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/app/server-control/controllers/power-operations-modal.html b/app/server-control/controllers/power-operations-modal.html
new file mode 100644
index 0000000..3524b4c
--- /dev/null
+++ b/app/server-control/controllers/power-operations-modal.html
@@ -0,0 +1,48 @@
+<!-- Shutdown and Reboot modal -->
+<div class="uib-modal__content">
+ <button
+ aria-label="Close"
+ type="button"
+ class="btn btn--close float-right"
+ ng-click="$dismiss()"
+ >
+ <icon file="icon-close.svg"></icon>
+ </button>
+ <div class="modal-header" id="modal-operation">
+ <h3>
+ <div class="icon__warning inline" aria-label="Warning"></div>
+ {{
+ activeModal === 2 || activeModal === 3
+ ? "Server shutdown will cause outage"
+ : "Server reboot will cause outage"
+ }}
+ </h3>
+ </div>
+ <div class="modal-body">
+ <p ng-if="activeModal === 2 || activeModal === 3">
+ Are you sure you want to
+ {{ activeModal === 2 ? "orderly" : "immediate" }}
+ shutdown?
+ </p>
+ <p ng-if="activeModal === 0 || activeModal === 1">
+ Are you sure you want to
+ {{ activeModal === 0 ? "orderly" : "immediate" }}
+ reboot?
+ </p>
+ </div>
+ <div class="modal-footer">
+ <!-- Power operation confirm buttons -->
+ <button
+ type="submit"
+ class="btn btn-primary"
+ ng-click="$close(activeModal)"
+ >
+ <span ng-if="activeModal === 0 || activeModal === 1">Reboot</span>
+ <span ng-if="activeModal === 2 || activeModal === 3">Shutdown</span>
+ </button>
+ <!-- Cancel modal power confirmation -->
+ <button type="button" class="btn btn-secondary" ng-click="$dismiss()">
+ Cancel
+ </button>
+ </div>
+</div>