Set time fields

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>
8 files changed
tree: d3d60c80e6d66e5074f805959575611116c0b871
  1. app/
  2. gulp_tasks/
  3. .babelrc
  4. .clang-format
  5. .gitignore
  6. bower.json
  7. config.json
  8. format-code.sh
  9. gulp-options.js
  10. gulpfile.js
  11. karma.conf.js
  12. LICENSE
  13. MAINTAINERS
  14. package-lock.json
  15. package.json
  16. postcss.config.js
  17. README.md
  18. sonar-project.properties
  19. webpack.config.js
README.md

OpenBMC Web User Interface

The OpenBMC WebUI is a Web-based user interface for the OpenBMC firmware stack. The WebUI uses AngularJS. Features include:

  • View system overview data such as model information and serial number
  • View and manage event logs
  • View inventory data
  • View sensor data
  • Power On/Off server operations
  • Reboot BMC
  • Manage and update BMC and Host firmware
  • IPv4 network settings
  • SoL console

Requirements

nodejs npm

Installation

npm install

Running locally

npm run-script server

This will start a server instance and begin listening for connections at http://localhost:8080. This development server provides live reloading on code changes. NOTE: Browsing to https://<BMC> and accepting the self-signed certificate might be required to prevent your browser from blocking traffic to the BMC.

Logging in

Enter the BMC Host or BMC IP address, username, and password. The default username and password are root/0penBmc.