summaryrefslogtreecommitdiffstats
path: root/app/common/services
Commit message (Collapse)AuthorAgeFilesLines
* User logged in when IsAuthenticated cookie is set.Wiktor Gołgowski2019-12-161-3/+6
| | | | | | | | | | | | | | | | | | | | | | Related to https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/27270 Currently the only condition checked when user is logged in was the "LOGIN_ID" value in browser session storage. The only place in the code where it is set is the Basic Authorization flow. In case of mTLS authentication, we are not able to set session storage value. This is why additional 'IsAuthenticated' cookie is added. In the case when user session expires, the failing XHR should cause the page to redirect to the login prompt. Additionally, IsAuthenticated cookie is removed to disable redirection. Tested: verified the flow with the mTLS changes. User is put in the webUI interface without login prompt when using mTLS authentication. If the authentication fails, browser redirects to the login page. Signed-off-by: Wiktor Gołgowski <wiktor.golgowski@intel.com> Change-Id: Ia7061f3e146c6547d4bfdf42940150b1a5c06903
* Certificate delete API – frontendZbigniew Kurzynski2019-11-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | With introducing option to add multiple certificates there is a need to give user a possibility to remove selected certificates, for example when they expire. This commit adds implementation of DELETE function to GUI. A new icon will appear in action section on certificate table. The delete icon will be enabled only for TrustStore certificates and disabled for others which does not have support for delete option. When user clicks on the delete icon then ‘user prompt’ is displayed and after confirmation, proper redfish action is used to delete the certificate. Middlewere implementation is here: https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/25281 Backend implementation is here: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-certificate-manager/+/25268 Tested on Chrome and Mozilla. New icon appears in action section. The delete option is available only for TrustStore certificates. User is able to delete selected certificate. Depends-On: I9781c5c79288ec5d080e80e42c63a55e471ddb77 Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com> Change-Id: I68c5f54767d6982ae3cb00830b3a1b4f5e237bea
* Update toast notificationYoshie Muranaka2019-10-221-6/+30
| | | | | | | | | | | | | | Added new toast notification types, warn and info, and updated visual styling. All toasts will need to be manually closed by clicking the 'X' close icon, except a success toast which will be dismissed automatically after 10 secs. - Small updates to critical and success/on icon - Added new colors for toast status background colors Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I9077109042621b2d3346b4121d6344da502b6b26
* Update object-mapper.md linkGunnar Mills2019-10-211-1/+1
| | | | | | | | | | object-mapper.md is moving under architecture/ as part of https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/26250/ 26250 should merge before this is merged. Change-Id: Ie2372690faf6af9629a15badccb4af31da9041bb Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Inventory: Remove old associations interfaceGunnar Mills2019-10-171-8/+0
| | | | | | | | | Moved to the new associations interface here: https://github.com/openbmc/openbmc/issues/3584 Tested: Loaded on a Witherspoon Change-Id: I2065f0919c8cc9d9dd219a1f9d8d0fc75265fa6f Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Logs: Move over to new AssociationsGunnar Mills2019-10-171-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Logging moved over to the new Associations interface here: https://github.com/openbmc/phosphor-logging/commit/27d82814c3e79865221f599b98ce069c31c4d60a Without this change was seeing: TypeError: "r.data[h].associations is undefined" getLogs https://w81.aus.stglabs.ibm.com/app.bundle.js:41 d https://w81.aus.stglabs.ibm.com/app.bundle.js:6 d https://w81.aus.stglabs.ibm.com/app.bundle.js:6 $digest https://w81.aus.stglabs.ibm.com/app.bundle.js:6 $apply https://w81.aus.stglabs.ibm.com/app.bundle.js:6 y https://w81.aus.stglabs.ibm.com/app.bundle.js:6 C https://w81.aus.stglabs.ibm.com/app.bundle.js:6 onload https://w81.aus.stglabs.ibm.com/app.bundle.js:6 Possibly unhandled rejection: {} Added an hasOwnProperty before the foreach. Tested: No longer see the error. See the "Related items:" on the event log panel. Change-Id: I60be885feea72b1388b7cbf4c3a7b9df7dbb9a02 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add searchable properties to event log filterYoshie Muranaka2019-10-081-7/+1
| | | | | | | | | | | The current event log search doesn't match inputs like the event id, severity or priority. This commit will add additional searchable log properties to the search filter so users can enter search terms like 'High' or 'Error' or other visible keywords. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I569112468a9f97034449799f407137f1651cec16
* LDAP configuration and user groupsbeccabroek2019-09-261-0/+8
| | | | | | | | | | | | | | | | | Adds LDAP page and ability to add and change configuration settings. Adds ability to add, remove and edit user groups for LDAP. Resolves openbmc/phosphor-webui#38 Resolves openbmc/phosphor-webui#39 Tested: Loaded on to a witherspoon and able to add initial LDAP config as well us update the configuration and role groups. Appropriate messages displayed to user when required fields are missing or in the incorrect format. Change-Id: If8a21f3f9d9334415ead73472e90b2a0823bf9ea Signed-off-by: beccabroek <beccabroek@gmail.com> Signed-off-by: Dixsie Wolmers <dixsiew@gmail.com> Signed-off-by: Derick Montague <derick.montague@ibm.com>
* Remove Purpose property from inventory itemGunnar Mills2019-09-241-0/+10
| | | | | | | | | | | | | | | | | | | | | The Purpose property is not useful in the inventory item. The field overflows to another line. The Purpose property under a power supply inventory item: PURPOSE xyz.openbmc_project.Software.Version.VersionPurpose.Other When we move to Redfish, this can be removed. An alternatives considered was only using the last part of the purpose property (e.g. Other). Still didn not find this userful to customers so just removed. https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Software/Version.interface.yaml#L14 Tested: Built and loaded on a Witherspoon. Don't see the property. Change-Id: Ie004c90f6a5e625cfa65ba39ab2be97e5e256705 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add local user manual unlockYoshie Muranaka2019-08-231-1/+4
| | | | | | | | Enables manual unlock from the GUI when a user is locked out due to failed login attempts above allowed threshold. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I63e28a4d6feed9eb6d4d09c0431d31e7bd6924c2
* Enable CA certificate uploadYoshie Muranaka2019-08-221-2/+9
| | | | | | | | This patchset enables CA certificate type to be uploaded in the GUI. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I52953933f6fd3dbd363c42b887996942b99b358e
* Create csr modalmiramurali232019-08-222-2/+270
| | | | | | | | | | | | | | | | | | The CSR Modal allows users to generate a CSR code. Once the user types in the necessary information to generate the CSR code, that modal will then render the code and the user will be able to either copy the code or download the code in a txt file. Tested: loaded onto Witherspoon and able to view on certificate management page. Click on generate csr and type in necessary (or any additional info), then click on generate CSR. The CSR code is then visible and is able to be copied or downloaded. In error state in which CSR code is unable to generate, the modal closes and an error toast message appears. FYI: Sometimes you have to reboot system in order for csr to successfully generate.y Signed-off-by: Mira Murali <miramurali23@gmail.com> Change-Id: I3cca09c494357496166164b5ee8ff99250ef981d
* Add boot option override and TPM enable toggleDixsie Wolmers2019-08-212-5/+44
| | | | | | | | | | | | | | | | | - 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>
* Update local user table to new designYoshie Muranaka2019-08-131-20/+11
| | | | | | | | | | | | | | | | | | | | | | This commit will introduce a reusable data table component. By creating a reusable component, we can ensure tables in the GUI will look consistent and common table actions (sort, select row) are shared. - Created new components directory to store shared components - Add password-confirmation directive - Remove some error handling from API utils so it can be handled in the UI TODO: - Add show/hide toggle to password fields - Enhance table component with icons - Manual user unlock - Batch table actions - Role table Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I03c95874d2942a2450a5da2f1d2a8bb895aa1746
* Remove Associations property from inventory itemGunnar Mills2019-07-311-5/+26
| | | | | | | | | | | | | | | | | | | | | | | If the inventory item had a Assocations interface, it would have a Assocations property. This Assocations property showed on the inventory panel under the individual inventory item dropdown. There can be a lot of Associations, the chassis for example associates to a lot of sensors, and they are long, full D-Bus paths. Not very useful and can overwhelm the dropdown so remove the property. One day we might want something to associate an inventory item to an object (e.g. sensors). This would require design changes to accommodate this. Support both the old and new Associations interface. See https://github.com/openbmc/openbmc/issues/3584 Tested: Built an image and loaded on a Witherspoon. No longer see this property. Change-Id: Ib67e36c7536a42eb56e65b6dbe6fd8798976ee08 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Refactor power operationsYoshie Muranaka2019-07-292-30/+0
| | | | | | | | | | | | | | | | | | Refactored power operations to use checkHostStatus function that checks host_status property provided by dataService, instead of polling for host/chassis status. Added property to check when a power operation is in progress. This property will show/hide the in progress message and make other operations unavailable until the operation completes. We were previously checking whether the server_state property was set to 'Unreachable', which enables the Power on button in the middle of a reboot, since the server_state changes to 'Off' during reboot. - Removed unused $timeout service Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I234749a9a875c7370b52bd23ed74d6e9617cf5e2
* Add 403 $location redirect to http interceptor serviceYoshie Muranaka2019-07-241-2/+9
| | | | | | | | | | | | This is a temporary solution to redirect any 403 responses to a dedicated 403 'Unauthorized' page. This could occur on inital navigation to a page or while attempting an operation. Once permission role mapping is defined, the code should be updated to handle 403 responses in context of user attempted actions. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: Ia207f2bcdd87fb20888fe6a1588d0ccd310e484c
* Fix array index out of bounds exceptionGeorge Liu2019-07-221-6/+9
| | | | | | | | | | | | We should be verified string length when the phosphor-webui calls the getFirmwares function to handle the property value of ExtenVersion. because it is risky to get the first address of array when that is empty Tested: Built phosphor-webui and get a effective array of titlePart via console from WEBUI. Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ife08d208eb7fbeb71284ae0700fb5d871343a298
* Create certificate management pagebeccabroek2019-07-092-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Displays certificates and the ability to add up to one of each type of certificate (as limited by the backend implementation). HTTPS certificate and LDAP client cert are implemented in this commit, with the ability to add more types as needed by adding them to the constants.js CERTIFICATE_TYPES array. Also provides the ability to replace a certificate once it is added. Resolves openbmc/phosphor-webui#43 Tested: loaded onto a witherspoon and able to view and replace both the HTTPS certificate and the LDAP certificate. GUI only allows to upload an LDAP certificate if one doesn't already exist. The GUI limits the user to one file per type as expected at this time and provides the appropriate validation messages. Alert messages appear above the table if the certificate is expired or within 30 days of expiring. Change-Id: I345267280ecd3cb257e9304886cde9ebb69b1240 Signed-off-by: beccabroek <beccabroek@gmail.com> Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
* Fix cold reboot errorYoshie Muranaka2019-06-261-5/+6
| | | | | | | | | | | | Cold reboot will check the host status by referring to the server_state property in the dataService instead of making API requests to check host/chassis status. TODO: Refactor other power control options to follow a similar pattern. Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I74b1b78fa39caee514fbaea8492c8a5ad6f8145b
* Add remote logging serverYoshie Muranaka2019-06-211-0/+59
| | | | | | | | | | | | | Remote logging enables the user to configure a remote server to stream out local logs. This feature will be available on the Event Log page. The user can add a remote server, edit/change an existing server configuration and remove/disable the remote server. Resolves openbmc/phosphor-webui#68 Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: I8284cbdbdaaf85f5c95f237efc72290c66904b40
* Sort sensors alphanumericallyAlexander Filippov2019-06-181-0/+5
| | | | | | | | | Sort the list of sensors in alphanumeric order. Relatives openbmc/openbmc#3386 Change-Id: Ie30f48417038a2cdf8c67de6ac357f078c8aaae7 Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
* Remove unused errors.htmlGunnar Mills2019-05-231-3/+0
| | | | | | | | | | | | | | | | | | | Also removed errorModalDetails and displayErrorModal from dataService since they are no longer used. errors.html was only active when displayErrorModal was true. displayErrorModal was only true when activateErrorModal was called. activateErrorModal was removed in a previous commit. activateErrorModal's only use was removed here: https://github.com/openbmc/phosphor-webui/commit/a38a287ccaa97eddc9df7333e33357b14772d4c6#diff-65affd2488457363c5b9e9266258c3b8 Tested: Searched the repo. Built an image and loaded onto a Witherspoon. No regressions observed. Change-Id: I96e26dd3817d7b02bbce74b4cc093b75dab669ed Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Remove unused chassis_stateGunnar Mills2019-05-231-1/+0
| | | | | | | | | | Only display the server/host state on the GUI. Tested: Searched the repo for 'chassis_state'. Built an image, loaded on a Witherspoon, power on/off, and verified correct host state. Change-Id: Ibdefeef7744e08cd737410741a1402ccb9e69200 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Remove unused activateErrorModalGunnar Mills2019-05-232-25/+0
| | | | | | | | | | | | | | | activateErrorModal was unused. Also remove Constants.ERROR_MODAL since activateErrorModal was the only place which used it. https://github.com/openbmc/phosphor-webui/commit/a1d238f3a53db2ec3cc4c2fd52fe78738b37968b#diff-65affd2488457363c5b9e9266258c3b8 added activateErrorModal / deactivateErrorModal. https://github.com/openbmc/phosphor-webui/commit/a38a287ccaa97eddc9df7333e33357b14772d4c6#diff-65affd2488457363c5b9e9266258c3b8 removed its use. Tested: Searched the repo and when testing the GUI on a a Witherspoon, toasts worked as expected. Change-Id: I98107f397fab039123f8507cd7bbac2ef8e5fb7b Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Remove unused server_statusGunnar Mills2019-05-233-7/+0
| | | | | | | | | | | | dataService.server_status is unused. server_status was set to a HOST_STATE constants which are now unused. Removed the HOST_STATE constants also. Tested: Searched the repo for 'server_status' and 'HOST_STATE' Built an image, loaded on a Witherspoon, power on/off, and verified correct host state. Change-Id: I10a915852634277bb5261e113b9706857acf66d6 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Virtual media pagebeccabroek2019-05-231-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | Adds page to manage virtual media devices. User selects file and pushes 'start' button to establish websocket connection. nbdServerService added to provide ability for user to navigate away from the page and return with the ability to see the current active sessions. Currently only supports 1 Virtual Media device. Resolves openbmc/phosphor-webui#40 Tested: uploaded ubuntu image file, started the connection and mounted virtual media device from host console. Able to see Ubuntu image file. Also uploaded file and navigated away from the page, checking that the websocket remained open and was sending / recieving messages. Finally, tested that when connection was stopped, 'USB disconnect' log was present in host console. Change-Id: Ia3155d27cbcfef94c2753dde1303a151e08847cc Signed-off-by: beccabroek <beccabroek@gmail.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Signed-off-by: Derick Montague <derick.montague@ibm.com>
* Remove unused hostShutdownGunnar Mills2019-05-171-23/+0
| | | | | | | | | | | | | hostShutdown in api-utils is not used. The Orderly shutdown on the power operations page calls APIUtils.hostPowerOff. The immediate shutdown calls APIUtils.chassisPowerOff. Tested: Did not. Searched the code and double checked the firmware panel and power operations panel. Change-Id: I6f0d209c3d2f13539bbe3ed2405221e902aaf590 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Fix activate image and reboot BMCDixsie Wolmers2019-05-131-18/+3
| | | | | | | | | | | | | - Change bmcReboot callback in apiutils.js to HTTP request that returns a promise that is resolved with response object - Remove emitted 'user-logged-in' as it is not needed to reboot BMC on firmware controller and bmc reboot controller - Add toast message for visual confirmation of successful BMC reboot Tested: On Server Configuration > Firmware page uploaded new image to activate and automatically reboot. After 2-3 minutes confirmed image activated and then BMC rebooted after image activation. Tested Server Control > Reboot BMC page by selecting Reboot BMC, confirmed BMC rebooted. Resolves openbmc/phosphor-webui#79 Signed-off-by: Dixsie Wolmers <dixsiew@gmail.com> Change-Id: Ied6809ad1ed6cc3c73ac5c818c7a06607810c396
* Revert "WebUI: Sensors page modifications"Gunnar Mills2019-05-011-39/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2f481e4cb83f0c72a9f3aad11431e4abcf5d632c. "/xyz/openbmc_project/sensors/power/" sensors (e.g. p0_vcs_power) and "/xyz/openbmc_project/sensors/current/" sensors (e.g. p0_vcs_current) are no longer on the GUI Sensors Page. Since all sensors do not map to Thermal or Power, the SensorCollection, /redfish/v1/Chassis/{ChassisId}/Sensors, needs to be implemented before we move the GUI sensors page over to Redfish. The SensorCollection contains all sensors not covered elsewhere in the model. The SensorCollection will contain all sensors under /current and all non-powersupply sensors under /power. IBM is planning on working on the SensorCollection, it will be sometime before the code is in because of this, reverting moving the GUI sensor page over to Redfish. Apologies on not catching this in the review. For more information see: https://redfishforum.com/thread/190/sensorcollection-contain-all-sensors-chassis https://redfish.dmtf.org/schemas/SensorCollection.json Tested: The current and power sensors are back on the Sensor page. Change-Id: Ia818fc05b49a8181b71f8756a6066c27e94dc46e Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* WebUI: Sensors page modificationsAppaRao Puli2019-04-051-142/+39
| | | | | | | | | | | | | | Modified sensors page to use Redfish as backend. Also added threshold sensor values in page view. Tested By: Loaded webui page and tested all operations. - Sensors page load and layout. - Search Filter and Severity filters. - Export functionality. Change-Id: Ic799453ffcd17e9a69e073a12173b4e97a928458 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
* User management: Remove disable redfish supportGunnar Mills2019-03-301-299/+81
| | | | | | | | | | | | | | | | | | | | | | | Removed redfishSupportEnabled = false for the user management page. The default is redfishSupportEnabled = true and no meta layers have redfishSupportEnabled = false so unused upstream. When redfishSupportEnabled = false, the /xyz/openbmc_project/user/<user>/action/SetPassword API is called. Neither bmcweb or phosphor-rest-server have a SetPassword API and so the user management page did not work when redfishSupportEnabled = false. The SetPassword API was removed when the new backend user management code was added, it was removed for security concerns. See https://github.com/openbmc/openbmc/issues/3454 for more info. Tested: On a Witherspoon, added users, updated roles and passwords, and deleted users. Change-Id: I3d9e30c0fc655fb23dee38fa5eeb52239c9faa64 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* WebUI: Support for configure failed login attemptsAppaRao Puli2019-03-271-0/+33
| | | | | | | | | | | | | | | | This commit adds the support for failed login attempts configuration. With this user can configure the number of failed login attempts and account lockout duration. This also adds provision to view other user account properties like MaxPassword, MinPassword etc. Tested By: Loaded the Webui and modified values like Failed login Attempts and Account lockout duration. Also tested other account properties view. Change-Id: I6abd5a16771956640ba6b6d81c1c7ad9503067b1 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
* Fix login error messagebeccabroek2019-03-271-2/+2
| | | | | | | | | | | | | | | | Respose for invalid credentials changed and login page was no longer displaying the correct error message to the user when invalid credentials were entered. Resolves openbmc/phosphor-webui#72 Tested: Logged in with incorrect credentials and saw the correct message. Also logged in with an unreachable host and saw that that message was displaying correctly. Change-Id: I65cc6d6a061986568aded09555c5f75bcd59fe56 Signed-off-by: beccabroek <beccabroek@gmail.com>
* WebUI system logs implementationAppaRao Puli2019-03-192-0/+53
| | | | | | | | | | | | | | | | | | | | This commit implements the webui logs page which will show all system logs depends on user selection( SEL or Event or Oem). This is based out of redfish systems log services. - View logs with pagination. - Search filter for logs view. - Sort option with Type, Id, Severity, Date. - Clear logs. - Export logs. UnitTest: - Existing bmcweb send the system logs of EntryType "Event". So Loaded UI, selected Type "Event" and validated all the above mentioned operations. Change-Id: I0384e475f7913ca66b6db5d64831583fb382f8d5 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
* Hardware: Filter out associationsGunnar Mills2019-03-051-0/+7
| | | | | | | | | | | | | | | Don't display associations on the "Hardware status" page. All and only associations have the "endpoints" property, use this is to filter. An example of an association is from the BMC inventory item to BMC software images. Tested: Loaded on a Witherspoon and no longer see the "Activation" item on the page. This "Activation" item was an association. All other items appear as normal. Change-Id: I6e6e24737b0a19e91dbd7eb691dd3d78f1b4c12c Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add role alert to toastsbeccabroek2019-02-061-0/+28
| | | | | | | | | | For accessibility reasons, 'role="alert" is required for toast messages. This notifies screen readers that an error or success message has appeared. Adds a service layer for toast messages that adds the role attribute to the message. Change-Id: Ic4dbf5556337eea589de5692c1b4c3323e771813 Signed-off-by: beccabroek <beccabroek@gmail.com>
* Fix error log resolveGunnar Mills2019-01-281-10/+2
| | | | | | | | | | | | | logging/entry/<entryId>/attr/Resolved is a boolean as such send true when resolving. Before the function was always returning successful, fixed this and log to the console when it fails. Tested: Resolved multiple error logs and see the fail in the console on a fail. Change-Id: I60496f30f9241ffb6b6b73cf87b7481bea10b24f Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Firmware: Remove unnecessary promisesGunnar Mills2019-01-231-61/+34
| | | | | | | | | From the firmware functions in api-utils.js, don't create a new promise. Tested: Changed Priority, deleted, and activated images. Change-Id: I53e4def6dda2e1868f65ccd365510cd84d01a065 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add toast to LED pagebeccabroek2019-01-211-17/+2
| | | | | | | | Toast error notification alerts user if LED light switch was not successful. Change-Id: I4f7af80276b6fefa93c8d0f0f50f8b28a06bced3 Signed-off-by: beccabroek <beccabroek@gmail.com>
* Removed unused changePassword()Gunnar Mills2019-01-081-31/+0
| | | | | | | | | | | | changePassword in api-utils.js is no longer used. https://github.com/openbmc/phosphor-webui/commit/28711a6ad2cff8277bfa537c3b140caf690ab575 removed the use of it. 28711a6 moved us over to multiple user account management and has its own function to set the user's password (setUserPassword). Change-Id: I4ac4175a33b10f2ae4f89b5e83d6c3ffa2b09912 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Fix RequestedBMCTransition capitalizationGunnar Mills2019-01-041-1/+1
| | | | | | | | | | | The property name is capitalized as RequestedBMCTransition. BMCweb is case sensitive. https://github.com/openbmc/phosphor-dbus-interfaces/blob/f019ea0979ce9d29654e0ce7bfbeb57783c59bd9/xyz/openbmc_project/State/BMC.interface.yaml#L8 Tested: Rebooted a Witherspoon system via GUI. Change-Id: Ie1379125d32d4c8e17aadcac7e0d65c89d49d2bd Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* WebUI: Dynamically get accountService rolesAppaRao Puli2019-01-021-1/+56
| | | | | | | | | | | | | Get the AccountService roles dynamically by calling redfish/rest API's and use them in user management webui. Test: Loaded web page and checked user management page for appropriate roles fetched from dbus. Change-Id: I4f51cb0a622a1be8b0bfec2b2fe3ecdee2538c6a Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
* WebUI: User management full implementation.AppaRao Puli2019-01-021-15/+269
| | | | | | | | | | | | | | | | | | | | | | | | Added webui user accounts management. This support both redfish and rest based backend API calls depending on redfishSupportEnabled flag. It does following actions: - View all user list and there properties like name, privilege, enabled state, Locked etc.. - Create new user account. - Delete existing user account. - Update the existing user properties like password, privilege, enabled state. Unit Test: - Viewed all user information is proper or not. - Created new user and validated. - Deleted specific user and checked. - Modified user info and validated the change. All tests are done by enabling and disabling redfishSupportEnabled flag using conifg.json. Change-Id: Ifecf63844dc42c44771509958bf75947a92997ac Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
* Enabling redfish support under configuration.AppaRao Puli2018-12-212-19/+32
| | | | | | | | | | | | | | | | This commit contains: 1) Enabling redfish support under configuration. While loading header, get the redfish root node and sets the redfishSupport configuration param. 2) Depending on redfish support flag, it decide to use redfish URI or REST uri for user password change. Tested: - Tested both redfish enable and dsiable scenarios. Change-Id: I98ecc7f419ddcfdbfac9c212ad2834479e9986b5 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
* Server Health: Check if logs are resolvedGunnar Mills2018-11-121-5/+5
| | | | | | | | | When determining the server health, check if the logs are resolved. A resolved log should not cause the server health to display "Warning" or "Critical". Change-Id: I9bd46150410719441876b03c129cdf2e280150d4 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* API Utils: Remove date-time headersGunnar Mills2018-11-021-24/+0
| | | | | | | | These are not needed due to: https://github.com/openbmc/phosphor-webui/commit/dd9d4c32992568d0b634df10a0eeaf7fcd06d3dd Change-Id: Ic58569c774bc2524089e74fb108fb764df89c4e7 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add and modify SNMP ManagersGunnar Mills2018-10-291-0/+46
| | | | | | | | This allows the user to add and edit SNMP managers. Tested: Added SNMP managers on a Witherspoon. Change-Id: Iab8d6463b03de75928e4989135172d93ab0f28a3 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Order hardware componentsbeccabroek2018-10-111-7/+44
| | | | | | | | | | | | Lists hardware components by depth, and within those with the same depth, orders the components alphanumerically. Places child components beneath their parent compenent. Resolves openbmc/openbmc#3386 Change-Id: I4b0e63164fbc9bd24078b9e36c6dc7788be06744 Signed-off-by: beccabroek <beccabroek@gmail.com>
* Activate image and reboot hostbeccabroek2018-09-191-2/+108
| | | | | | | | | | | | | | | | | | | When activating a host image, gives the option to: a) Activate image without booting b) Activate image and boot host. If server is in 'off' status the option is to power on. If the server is in 'unavailable', 'on', or 'error' status the option is to reboot Also updated polling during boot and reboot to use /subscribe API. Resolves openbmc/openbmc#3323 Tested: The GUI displays the options and boots / reboots appropriately based on server status. Change-Id: I62c19e094ecc7112263c26844fcd30b2bf3c2b84 Signed-off-by: beccabroek <rebecca.shaw@ibm.com>
OpenPOWER on IntegriCloud