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/common/services/api-utils.js b/app/common/services/api-utils.js
index 27b122d..ba48a49 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -679,6 +679,45 @@
data: JSON.stringify({'data': state})
})
},
+ getBootOptions: function() {
+ return $http({
+ method: 'GET',
+ url: DataService.getHost() + '/redfish/v1/Systems/system',
+ withCredentials: true
+ })
+ .then(function(response) {
+ return response.data;
+ });
+ },
+ saveBootSettings: function(data) {
+ return $http({
+ method: 'PATCH',
+ url: DataService.getHost() + '/redfish/v1/Systems/system',
+ withCredentials: true,
+ data: data
+ });
+ },
+ getTPMStatus: function() {
+ return $http({
+ method: 'GET',
+ url: DataService.getHost() +
+ '/xyz/openbmc_project/control/host0/TPMEnable',
+ withCredentials: true
+ })
+ .then(function(response) {
+ return response.data;
+ });
+ },
+ saveTPMEnable: function(data) {
+ return $http({
+ method: 'PUT',
+ url: DataService.getHost() +
+ '/xyz/openbmc_project/control/host0/TPMEnable/attr/TPMEnable',
+ withCredentials: true,
+ data: JSON.stringify({'data': data})
+ })
+ },
+
bmcReboot: function() {
return $http({
method: 'PUT',
diff --git a/app/common/services/constants.js b/app/common/services/constants.js
index ae82e76..37dd29f 100644
--- a/app/common/services/constants.js
+++ b/app/common/services/constants.js
@@ -113,11 +113,11 @@
'Time out. Did not download image in allotted time.',
},
POWER_OP: {
- POWER_ON_FAILED: 'Power On Failed',
- WARM_REBOOT_FAILED: 'Warm Reboot Failed',
- COLD_REBOOT_FAILED: 'Cold Reboot Failed',
- ORDERLY_SHUTDOWN_FAILED: 'Orderly Shutdown Failed',
- IMMEDIATE_SHUTDOWN_FAILED: 'Immediate Shutdown Failed',
+ POWER_ON_FAILED: 'Power on failed.',
+ WARM_REBOOT_FAILED: 'Warm reboot failed.',
+ COLD_REBOOT_FAILED: 'Cold reboot failed.',
+ ORDERLY_SHUTDOWN_FAILED: 'Orderly shutdown failed.',
+ IMMEDIATE_SHUTDOWN_FAILED: 'Immediate shutdown failed.',
},
SENSOR: {
NO_SENSOR_DATA: 'There are no sensors found.',