summaryrefslogtreecommitdiffstats
path: root/app/common/services
Commit message (Collapse)AuthorAgeFilesLines
...
* Set time fieldsGunnar Mills2018-09-131-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed 5 commits to set the date-time fields: time mode, time owner, BMC time, and host time. Also included is a commit to display the timezone. Set time mode Moved the selection of NTP vs Manual (time mode) to a radio button. Added code to allow the user set it. Tested: Set the time mode on a Witherspoon. Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Set time owner The time owner is now a dropdown and is set when "Save settings" is pressed. Tested: Set the time owner on a Witherspoon Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Set the BMC and Host time The BMC and host have the same time except when time mode is split. Only need to set BMC or host time when time mode is not split. When time mode is split, set both. Use time owner to determine which to set. https://github.com/openbmc/phosphor-time-manager#time-settings Have date and time as two separate inputs, this is due to Firefox not supporting "datetime-local". The "date" and "time" input fields are more widely supported. https://caniuse.com/#feat=input-datetime The idea for 2 separate input fields came from: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local Must set the time mode and time owner before setting the time, this is due to permissions of who can set the time. Tested: Set the date and time on a Witherspoon. Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Add NTP Servers The user can now view and set NTP Servers. Moved setFocusOnNewInput to a common directive since it is used on the NTP Servers and the DNS Servers on the network page. Even though NTPServers is a network interface specific path (e.g. /xyz/openbmc_project/network/eth0/attr/NTPServers) it acts like a global setting, openbmc/phosphor-time-manager#4. Using eth0 for setting and getting the NTP Servers until NTPServers is moved to a non-network interface specific path. In Redfish, NTPServers is a non-network interface specific. Tested: Set NTP Servers on a Witherspoon. Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Add timezone Added the timezone for the host and bmc date time. The timezone looks like "GMT-0400 (EDT)" or "GMT-0500 (CDT)". I got this from https://stackoverflow.com/questions/1091372/getting-the-clients-timezone-in-javascript and choose this formatting over something like "America/Chicago". Tested: See the timezone on a Witherspoon Change-Id: I59a4449d63f73a6ed14cb934f3d8577e46620c4e Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Move to default headersGunnar Mills2018-09-111-172/+1
| | | | | | | | | | | | | | | | | | | | Set the $httpProvider.defaults.headers. Overwrite the default on upload image. For more information see: https://docs.angularjs.org/api/ng/service/$http#setting-http-headers Removed "Content-Type" on GET request. There is no "Content-Type" on a GET request. Content-Type is only used with POST, PUT, and PATCH requests. See: https://en.wikipedia.org/wiki/List_of_HTTP_header_fields Tested: Manual regression test of Web UI. Performed tasks such as firmware image upload, booting the server, and deleting event logs. Change-Id: I9217ba3eab40d40a331322d0848bdc5c5ca93767 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* 'Critical' Server Health on 'High' Priority logsGunnar Mills2018-09-103-36/+11
| | | | | | | | | | | | | | Set the Server health, located in the header, to Critical when a 'High' Priority log is present. Before to determine what the Server health was the SEVERITY_TO_HEALTH_MAP was used. This followed the SEVERITY_TO_PRIORITY_MAP most of the time. Removed code and made this simpler. Checked with the design team and this way was the original intent. Resolves openbmc/phosphor-webui#16 Change-Id: I2b3dab87cf1c31e9ef156c8e4f3a1592ed49403e Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Remove unused dataService sensorDataGunnar Mills2018-09-101-1/+0
| | | | | | | dataService.sensorData was set but never used. Change-Id: I0fffd578c1c4391fec3bc3354e09dfb00db5d03e Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Remove remote_window_activeGunnar Mills2018-09-101-9/+0
| | | | | | | | remote_window_active is no longer used. Remove in: https://gerrit.openbmc-project.xyz/#/c/openbmc/phosphor-webui/+/12344/ Change-Id: I9629e64daa3dee9907a0a872fa1743fb4438f7ae Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Remove unused dataService.loading_messageGunnar Mills2018-09-101-1/+0
| | | | | Change-Id: Ic335a812537fc935264108bb7f9f93a05134c3b2 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Create new SNMP Settings pageGunnar Mills2018-09-101-0/+15
| | | | | | | | | | | | Created new page to display SNMP Managers. Display the SNMP Manager's IP and port. https://github.com/openbmc/phosphor-snmp/blob/master/docs/snmp-configuration.md Future commits will allow the user to add and delete SNMP managers. Change-Id: Ia5d633c11728a580c06b25c412e8673925cdc597 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add Time Owner and Time ModeGunnar Mills2018-09-051-0/+15
| | | | | | | | | Added the Time Owner and the Time Mode Created a new function that enumerates /xyz/openbmc_project/time. Tested: See Time Mode and Time Owner Change-Id: I3d1788bdb87b99028000d13c868b4a0cbfbc3006 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Move to clang-format-6.0Gunnar Mills2018-09-045-5/+0
| | | | | | | The docker image moved from clang-format-5.0 to clang-format-6.0. Change-Id: I3c615d7df1f21569531b4dc2cb0bc4f425cb43f8 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Set the power capGunnar Mills2018-08-241-6/+33
| | | | | | | | | | | | | Created toggle button to enable power cap and a text field to set it. This form is similar to the set network form. Moved logic for displaying the power cap as disabled to the overview controller. Resolves openbmc/openbmc#3221 Tested: Set the power cap on a Witherspoon Change-Id: I62346fe3ed123b9df58d159cee2584937d46213c Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Remove unused chassisPowerOnGunnar Mills2018-08-241-27/+0
| | | | | | | chassisPowerOff was unused and called the host object. Change-Id: If4ac2051f4eac594ac98810b157255e3294bf89a Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Remove unused get BMC functionsGunnar Mills2018-08-221-49/+0
| | | | | | | | getBMCEthernetInfo and getBMCInfo were unused. Change-Id: I625e71803fb6c6e49ff968ad58a0021684aa723a Tested: Manual GUI regression test on a Witherspoon. Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Last power operationbeccabroek2018-08-111-0/+15
| | | | | | | | | | | | | | | Displays correct power operation time. In the case that there has not been a power operation, 'not available' is displayed. Resolves openbmc/openbmc#2957 Tested: The GUI displayed 'not available' when it received a 0 value and the correct date when an epoch was recieved. Signed-off-by: beccabroek <rebecca.shaw@ibm.com> Change-Id: I9573a1cdcd31ba4c02888bd46d195c91fdb916a7
* Add Last Reboot Timebeccabroek2018-07-271-1/+15
| | | | | | | | | | | Added last reboot date and time to Reboot BMC Page. Resolves openbmc/openbmc#2956 Tested: Rebooted and verified the date and time were correct. Change-Id: I81cf46f0ad7f4e910cd6645de9830d2952091770 Signed-off-by: beccabroek <rebecca.shaw@ibm.com>
* Fix firmware page not loadingGunnar Mills2018-07-241-3/+7
| | | | | | | | | | | | | | | Had an image without an "Activation" property. This image did not have an Activation interface. Added an if for the Activation property. Also moved the activationStatus var so it would be empty if the Activation property did not exist. Resolves openbmc/openbmc#3309 Tested: The page loads now with the image missing the Activation property. Change-Id: I252e1277c88ce0a8b59b4f7441b1032954cef3e0 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Events: Filter by event typeGunnar Mills2018-06-281-0/+1
| | | | | | | | | | | | | The filter search did not work for the event type (e.g. "xyz.openbmc_project.Software.Version.Error.ManifestFileFailure") Added the event type to the search terms. Resolves openbmc/phosphor-webui#5 Tested: See example.xyz.openbmc_project.Example.Elog.AutoTestSimple events on typing "auto" or "test". Change-Id: I47361a4fee0285c5e09f63599bcdacbd51a7f3cd Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Update DNS Servers on "Save settings"Gunnar Mills2018-06-141-0/+17
| | | | | | | | | | | | | | | "Nameservers" is called "DNS Servers" on the GUI. Update the property if it has changed when the user hits Save settings and confirms. Had difficulties getting the DNS input fields to update the interface.Nameservers array. The "ng-blur="interface.Nameservers[$index] = dns" solution is from: https://stackoverflow.com/questions/13714884/difficulty-with-ng-model-ng-repeat-and-inputs Tested: Changed some DNS Servers on a Witherspoon. Change-Id: Ib9c4be044d0725ac50e57e2733c3dc2ef8e29053 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add IPV4 properties parameter validationGunnar Mills2018-06-141-0/+5
| | | | | | | | | | | | | | | | | | | Added parameter validation for the IPV4 properties: IP Address, Gateway, and Netmask prefix length. This is important since we delete the IPV4 interface before adding the new one (i.e. if the add is unsuccessful we are down an IPV4 interface). This validation helps to prevent some of the unsuccessful adds. Took the logic from the network manager valid parameter checks: https://github.com/openbmc/phosphor-networkd/blob/master/util.cpp#L217 Moved "Netmask Prefix Length" to a "number" to do this. It should have been a number. Tested: A variety of good and bad values. Change-Id: Idf4486489097bc426164b9543ea8c05eb54a2bf8 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add Support for VLAN interfacesGunnar Mills2018-06-071-2/+2
| | | | | | | | | | | | | | | | VLAN interfaces look like: /xyz/openbmc_project/network/eth0_60 Modified the regexes to pick up VLAN interfaces and VLAN IPV4 interfaces. To create a VLAN interface from the command line: busctl call xyz.openbmc_project.Network \ /xyz/openbmc_project/network \ xyz.openbmc_project.Network.VLAN.Create VLAN su "eth0" 60 Tested: Set the Netmask, IP Address, and Gateway on a Witherspoon VLAN IPV4 interface. Change-Id: If5f3c042cc8b75e8d0e6f27d921c4347c5216bd2 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Set DHCP on "Save settings"Gunnar Mills2018-06-061-0/+17
| | | | | | | | | | | | | Set the DHCP enabled field when the user selects "Save settings" and accepts the popup. Added a TODO for issue #3154, Rest server should return a proper JSON bool. Resolves openbmc/openbmc#3165 Tested: Set "Obtain an IP address automatically using DHCP" on a Witherspoon. Change-Id: I45c817e3ddd8bf9c4f582460b1f9230e38548ff8 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Set IPV4 interfacesGunnar Mills2018-06-061-0/+40
| | | | | | | | | | | | | | | | If a gateway, netmask, or IP address of an IPV4 interface changes on the page, when the user hits "Save changes" and confirms the popup, delete the old IPV4 interface and create a new one with the new values. After talking with Ratan, deleting then adding is the the correct way to change IPV4 interfaces. More information can be found in the network README up for review: https://gerrit.openbmc-project.xyz/#/c/6872/ Tested: Changed IPV4 interface properties on a Witherspoon. Also tested a Witherspoon in DHCP mode then moved over to a static IP. Change-Id: Idc0026aa01533ea327b53efc57e21147c4b68967 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Check if network settings changedGunnar Mills2018-06-061-0/+2
| | | | | | | | Before setting the Mac Address, Hostname, or DefaultGateway, check to see if those settings changed. Change-Id: Ifc735b61734ced13e2554651d74dc44d761f3432 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Set DefaultGateway on "Save settings"Gunnar Mills2018-06-061-0/+16
| | | | | | | | | | | Set the DefaultGateway field when the user selects "Save settings" and accepts the popup. Moved to q.all() with a promise array. Later commits will add to this array and do a check to make sure the field changed before setting the value. Tested: Set the DefaultGateway on a Witherspoon Change-Id: Ica6abe14169f00bc3195f34a08db61ddbc09fa92 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Display event log ID and description if presentMatt Spinler2018-06-051-0/+12
| | | | | | | | | | | | | | | | | | | | If the Event ID and Description event log properties are present, display the error log title as <ID>: <Desc> and move the Message property down into the box with the other additional data fields. If they aren't present, or not filled in (which in the case of the event ID is a value of 'None'), leave the title as it currently is, which is the Message property. Tested: Verify UI fields when the event ID is valid, when it's still in the event data but not valid, and when it isn't in the event data at all. Resolves openbmc/openbmc#3056 Change-Id: I455fc257b7d3713aceee2975d5240fb226cfa87e Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Replace "Domain Name" with "Default Gateway"Gunnar Mills2018-05-251-6/+15
| | | | | | | | | | | "Domain Name" is not as important of a network settings as "Default Gateway". Remove it for now, later we will add fields for the other network settings but getting the basic network settings going for now. To setup the network, the user needs to configure the Default Gateway, MAC Address, IP, Gateway, and netmask. Change-Id: I27066dc188c3c30a01051b473a7ce10837d40fab Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Set MAC address on "Save Settings"Gunnar Mills2018-05-251-0/+17
| | | | | | | | | Make a REST call to set the MAC address when the "Save Settings" button is pressed. Tested: Verified the MAC Address is set. Change-Id: I39f6d4688842b3453fd219795d07f819ba4ba481 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Set ignoreHttpError to false after testPasswordGunnar Mills2018-05-241-1/+0
| | | | | | | | | Moved ignoreHttpError to the controller and set it to false after testPassword. Tested: Changed the password. Change-Id: If860c073bcedcfba6a0743ea656c76ff06fd7de0 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Format code using clang-format-5.0Andrew Geissler2018-05-246-968/+1040
| | | | | | | | Once merged, this repository will have CI enforce the coding guidelines in the .clang-format file. Change-Id: I96a05972665f9c67625c6850c3da25edc540be06 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Run js-beautify and fixjsstyle on codeAndrew Geissler2018-05-246-1460/+1569
| | | | | | | | | | | Found this pointer on stackoverflow: https://stackoverflow.com/a/31660434/5508494 End goal is to get the code formatted well enough that clang format will run correctly against it. Change-Id: I80053e78d253d8eee49233e42d55e5807ae8fdc8 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Do not abort when one of multiple promises failsCamVan Nguyen2018-05-221-3/+1
| | | | | | | | | | | | | | | The goal is to load as much data as possible on the 'Server overview' page. In original code, multiple promises are executed in parallel using $q.all() to get data for the page. When any of the promises fails, the remaining promises are aborted. The fix is to write a method to resolve the promise returned from each of the APIUtils calls, which would set the scope variables, and pass the promise returned by it to $q.all instead. Resolves openbmc/openbmc#3151 Change-Id: I361c80ddd2665dbe43f8a635eda42ef2b5c0788c Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
* Remove Web UI versionGunnar Mills2018-05-171-1/+0
| | | | | | | | | No reason to manage a version number separately from the overall project. Remove the version and rename the element. Based on feedback on https://gerrit.openbmc-project.xyz/#/c/10364/. Change-Id: I055445db8bdda36dc408c057132e6e69b8935a6b Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Do not override http timeout if caller has set itAndrew Geissler2018-05-151-1/+4
| | | | | | | | | | | | | | | | | | | | | The apiInterceptor code was blindly overriding the http timeout. This caused issues for functions like code update image uploads which can require more then the default 20 seconds. During the course of investigating this defect, it was questioned why the interceptor code was needed at all since the default was set in the httpsRequest base. Some web searching found https://stackoverflow.com/questions/15015416/how-to-set-a-global-http-timeout-in-angularjs which discusses why this does not work. Testing: Verified requested timeout used during image upload and default used otherwise. Resolves openbmc/openbmc#3182 Change-Id: I9b58a328cf7ef7d224b3c4704d9d40edcc2b4d80 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Add utility to set hostnameAndrew Geissler2018-05-141-0/+14
| | | | | | | | The user needs the ability to set the hostname in a few different spots. Change-Id: Ia70e7c773d7ff951a505f3297d8eaf1b3d14fa73 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* Display ip addresses in 'BMC information' sectionCamVan Nguyen2018-05-131-2/+4
| | | | | | | | | | | BMC Host/IP Address is already displayed in the header. So in the 'BMC information' section, just display the BMC's ip addresses. There could be multiple ip addresses. Resolves openbmc/openbmc#3148 Change-Id: I4efdf4f1df2fc70d32dd659ae57b6bb7ba0fa0f4 Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
* Refresh the firmware page after downloading imageCamVan Nguyen2018-05-131-0/+3
| | | | | | | | | | | | | | | | | Fix includes - Polling the number of software objects for a new image. During which time the 'Downloading in progress' status bar will be displayed. A 2-minute timeout is used. - Displaying a 'Download complete' message if the download succeeds and refreshing the firmware page to show the new image once it is downloaded. - Displaying an error pop-up with reason for failure when the download fails. Resolves openbmc/openbmc#3054 Change-Id: I79a8b8c661c01474a12cef4af524cafdc2cee1fe Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
* Get the BMC timeGunnar Mills2018-05-041-0/+13
| | | | | | | | | | | | | | | | | | | Get the BMC time from xyz/openbmc_project/time/bmc. This time is in epoch time so convert. Before the time and date hardcoded. From https://docs.angularjs.org/api/ng/filter/date: "'medium': equivalent to 'MMM d, y h:mm:ss a' for en_US locale (e.g. Sep 3, 2010 12:05:08 PM)" This is a similar format as to what was present on the GUI before for en_US. Letting the browser choose the format, is important. Displayed in user's timezone. Resolves openbmc/openbmc#3116 Tested: Now see correct date and time, "4/19/2018, 20:31:18 UTC" Change-Id: Ie30c65b038b58afc8c4c77ca5b70667e80e76cc6 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Fix misspelling of DomainNameGunnar Mills2018-05-021-1/+1
| | | | | | | | | | | The interface object had 2 DomainName properties ("DomainName" and "domainName") Tested: Verified the interface object now only has 1 DomainName properties. Change-Id: Ic14f8e441cde8b83427b8f32f73a8bbb7efc48cc Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Remove the version from each fileGunnar Mills2018-04-306-6/+0
| | | | | | | | Already have a Web UI version, no need to track the version of each file. These have not been getting updated. Change-Id: I1cd3a2c2d67b24ded5edcca9dbfd3f6806d93ed4 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add fixes for power operationsCamVan Nguyen2018-04-262-7/+20
| | | | | | | | | | | | | | | | | | | | | | | Fixes applies to 'Power on', 'Warm reboot', 'Orderly shutdown', and 'Immediate shutdown' power operations. Fixes include: - Verifying that the chassis and host transition through the expected states for each power operation. During which time a spinner will be displayed. A timeout of 5 minutes for each state transition has been added. - Displaying the current state of the host in the 'Server power' and 'Current status' bar. The state displayed will change as the host transition through different states even as the spinner continues to spin. - Displaying an error pop-up with reason for failure when the power operation fails. Resolves openbmc/openbmc#2758 Resolves openbmc/openbmc#2787 Resolves openbmc/openbmc#2803 Change-Id: I514e030f9df7bd4d8b53634408f0449cd9abada9 Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
* Add TODO for issue 3117Gunnar Mills2018-04-231-0/+3
| | | | | | | | | Added a TODO for openbmc/openbmc#3117. This should have been part of https://gerrit.openbmc-project.xyz/#/c/10125/. Change-Id: I5005cad090ee63da962bc6c656bc631f48b62755 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Adding new button 'Normal' in sensors pageIftekharul Islam2018-04-191-1/+2
| | | | | | | | | | | | | - Adding a 3rd option called Normal in addition to Critical and Warning based on the discussion in openbmc/openbmc#2750 Fixes openbmc/openbmc#2750 Tested: Verified the 'Normal' button works. Change-Id: Ied4d37aa9284392f08818f8111ebbcc677234586 Signed-off-by: Iftekharul Islam <iffy.ryan@ibm.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add fixes for cold rebootIftekharul Islam2018-04-193-54/+86
| | | | | | | | | | | | | | | | This fixes the cold reboot issue with the following steps - It applies the command to shut off the chassis. - Then verify the chassis is off. It checks for every 5 seconds. During this time the spinner displays. A 5min timeout has been added. - Once the chassis is off, it turns on the host. fixes openbmc/openbmc#2795 Change-Id: I119a1c95e57c10ccee27be1512a1fc38cde307fa Signed-off-by: Iftekharul Islam <iffy.ryan@ibm.com> Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
* Look at correct server informationGunnar Mills2018-04-191-0/+13
| | | | | | | | | | | | Look at /xyz/openbmc_project/inventory/system for the server information. Before the "server overview" page looked at the BMC information for things like Server SerialNumber. Resolves openbmc/openbmc#3095 Tested: Verified I see the correct server information now. Change-Id: I562b28353d79fbf4a84e4c9a01db57d757a102a1 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Display error if error on uploadGunnar Mills2018-04-131-10/+2
| | | | | | | | | | | | | | | We were missing the rejected promise when image upload returned an error. Now with this change and https://gerrit.openbmc-project.xyz/#/c/9594/ image upload now uploads an image and refreshes the page to display the image or displays an error if the upload failed. Resolves openbmc/openbmc#2960 Tested: See an error if a bad image. GUI refreshes if the image was uploaded successfully. Change-Id: I5f4030fb29fc08aa65dd0d36e32368106c31a76b Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Display correct Power Consumption & Cap valuesCamVan Nguyen2018-04-132-14/+65
| | | | | | | | | | Current values are hard coded to '000 W'. This fix is to do REST calls and display the correct values. Resolves openbmc/openbmc#2735 Change-Id: I2f6766f1685a2bd52da62cda19998794f80270ec Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
* Display error if TFTP post failsGunnar Mills2018-04-091-15/+5
| | | | | | | | | | | | Display an error if the DownloadViaTFTP returns an error code. This code replaces some unused code. Resolves openbmc/openbmc#3029 Tested: Verified I see this error if the DownloadViaTFTP call returns an error code. Change-Id: I1547689059f45953b29aedda75c0599aec30079d Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Update the GUI after an image activatedGunnar Mills2018-04-042-0/+19
| | | | | | | | | | | | | | | | | | When activating an image the firmware page does not refresh after the image is activated and show the image as "Active". To get the image to show as "Active", a user must refresh the page. The activating image code now waits until the image is activated and the REST call returns "Active" or "Failed" and then refreshes the page. Resolves openbmc/openbmc#2966 Tested: Activated an image and verfied it refreshed after "Active". Change-Id: Ic68e3c9e6cb5c2ea4f5d66f48fd09252c4807f26 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Return http promise on testPasswordGunnar Mills2018-04-021-10/+2
| | | | | | | | | | Instead of creating a new promise with q.defer(), just return the http promise. This is much simpler and the recommended solution. Tested: Changed the password and verified the wrong old password returned an error on a Witherspoon. Change-Id: I1b412426da58ec3185f6d83bd53fdc984c7785e8 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Show error message received from server sideAlexander Filippov2018-03-271-1/+8
| | | | | | | | | | | | When an error occurs during authorization, display the error message received from server side instead hardcoded message. Partially resolves openbmc/openbmc#2974 Resolves openbmc/openbmc#3024 Tested: Enter invalid username or password and verify error message Change-Id: I91ca29d5a69e12e12ce490ce3206173de7d41f09 Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
* Only add ":" when a port is givenGunnar Mills2018-03-231-2/+2
| | | | | | | | | | | | | Before if no port was given, the HOST field would look like "9.41.165.233:". Added a check for a port before adding a ":". Resolves openbmc/openbmc#2995 Tested: Flashed an image with this change on a Witherspoon and verified no ":" when no port was given. Also, verified displayed data and log in looked good. Change-Id: I315c73489d419aacc041218e971e75d21ff6c255 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
OpenPOWER on IntegriCloud