diff options
| author | Dixsie Wolmers <dixsiew@gmail.com> | 2019-06-21 13:48:06 -0500 |
|---|---|---|
| committer | Gunnar Mills <gmills@us.ibm.com> | 2019-08-21 21:14:16 +0000 |
| commit | e368108fc4fb3777ff02089f81b551d9735b393f (patch) | |
| tree | ac27cc621cca640442b09d5489157eb8304e6a05 /app/common | |
| parent | fb79e54c55af0b516d35c94c702213b7549acafe (diff) | |
| download | phosphor-webui-e368108fc4fb3777ff02089f81b551d9735b393f.tar.gz phosphor-webui-e368108fc4fb3777ff02089f81b551d9735b393f.zip | |
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>
Diffstat (limited to 'app/common')
| -rw-r--r-- | app/common/services/api-utils.js | 39 | ||||
| -rw-r--r-- | app/common/services/constants.js | 10 | ||||
| -rw-r--r-- | app/common/styles/elements/modals.scss | 11 |
3 files changed, 54 insertions, 6 deletions
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 @@ window.angular && (function(angular) { 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 @@ window.angular && (function(angular) { '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.', diff --git a/app/common/styles/elements/modals.scss b/app/common/styles/elements/modals.scss index 0e21a39..450a26b 100644 --- a/app/common/styles/elements/modals.scss +++ b/app/common/styles/elements/modals.scss @@ -107,6 +107,15 @@ } .uib-modal__content { padding: 1em; + .modal-header { + display: block; + } + .btn--close { + padding: 0; + svg { + height: 1.6em; + } + } } .uib-modal { @@ -118,4 +127,4 @@ height: 2em; } } -}
\ No newline at end of file +} |

