summaryrefslogtreecommitdiffstats
path: root/ui
Commit message (Collapse)AuthorAgeFilesLines
* ui/ncurses: Ensure that the selected menu item is visibleJeremy Kerr2014-03-031-5/+16
| | | | | | | | | | When adding new items to the petitboot menu, we need to ensure that the scroll position of the menu includes the currently-selected item. This change adds a call to set_top_row, calculated from the selected item index, and the number of rows in the menu. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Unify key bindings & key help textJeremy Kerr2014-01-316-4/+70
| | | | | | | | | | This change is a small cleanup of the key bindings; we ensure that the general key bindings are available (and documented) on all screens. In order to keep things consistent, this change adds an initial UI guidelines text file, which documents the general key bindings. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add help to boot editor screenJeremy Kerr2014-01-313-2/+49
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add help to system configuration screenJeremy Kerr2014-01-313-4/+51
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add help to sysinfo screenJeremy Kerr2014-01-313-0/+8
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add help facility to text screensJeremy Kerr2014-01-312-0/+17
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add help text to nc-menu & generic-mainJeremy Kerr2014-01-315-2/+31
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add support for help screensJeremy Kerr2014-01-315-0/+127
| | | | | | | Add a textscreen-based help screen system, triggered from the cui module's cui_show_help() Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add text_screen_set_text()Jeremy Kerr2014-01-312-9/+38
| | | | | | When we have a large chunk of text, we'll want to add it all in one go. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Abstract text-screen code from sysinfo screenJeremy Kerr2014-01-315-140/+230
| | | | | | | | | | We want to implement help screens, which are very similar to the sysinfo screen - show a set of lines, and allow scrolling. This change splits the text-screen rendering code into a new nc-textinfo module. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: do all config screen updates in config_screen_postJeremy Kerr2014-01-311-5/+10
| | | | | | | | We call _post when the config screen is to be displayed, so do all drawing here. This means we get the same drawing code on both init and update. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Use descriptive field labels for boot editorJeremy Kerr2014-01-311-6/+10
| | | | | | | Rather than the brief names for the boot editor field label, expand (and capitalise) for a more-friendly form. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Add DEVICE_TYPE_ANY for matching any deviceJeremy Kerr2014-01-301-0/+2
| | | | | | | | | | Currently, If we want disable all but a specific device type from default boot, we need to add a negative priority for all other devices. This change adds a DEVICE_TYPE_ANY definition, to allow a simpler way to express "only boot a specific type" by default behaviour. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/pb-config: Add config_copyJeremy Kerr2014-01-301-2/+3
| | | | | | | | | | | | | | At the moment, UIs have the config_set_defaults function to estabilish an initial configuration when performing an update. Rather than using the defaults, this change provides a config_copy() function, so that the updated configuration can be initialised from the current config. With this in place, the UI/server-common pb-config module can be reduced to just the one function. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/nc-config: Add validation for network settingsJeremy Kerr2013-12-181-9/+30
| | | | | | | Use the new widget validators, plus a bit of whole-form logic, to implement some basic validation on the config UI. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/nc-widgets: Add initial textbox validation functionsJeremy Kerr2013-12-182-0/+68
| | | | | | | | | We'd like to do some validation of the system configuration parameters, so add a few validation types to the widget code. We currently need integer, ipv4 address and multiple ipv4 address types. These are implemented as small wrappers around the ncurses form validator code. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/nc-config: expand mask fieldJeremy Kerr2013-12-181-1/+1
| | | | | | This makes it obvious if there's more than two characters in the field. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* configure: Use AC_GNU_SOURCEJeremy Kerr2013-12-1819-30/+29
| | | | | | | Rather than #defining _GNU_SOURCE in our .c files, we can define this from config.h instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add link status to system info & system config screensJeremy Kerr2013-12-182-3/+9
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/util: Move mac_buf from nc code to util libraryJeremy Kerr2013-12-181-22/+4
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/boot-editor: Fix (null) when non-device resources are shownJeremy Kerr2013-12-031-1/+1
| | | | | | | | | | | We're seeing the following in the boot editor: image: (null)ftp://... the (null) is due to the sep in conditional_prefix, which should be blank, not NULL. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add key debugJeremy Kerr2013-12-021-0/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/nc-widgets: Unify select keyJeremy Kerr2013-11-221-15/+11
| | | | | | | | We have a few instances where we check for a 'select' action (enter or space key event), and some are inconsistent. Unify these with a key_is_select() function. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Redraw entire screen with ctrl+LJeremy Kerr2013-11-221-4/+2
| | | | | | Use wrefresh(curscr) to clean and repaint the entire screen. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Ensure boot editor window is properly paintedJeremy Kerr2013-11-221-0/+2
| | | | | | | We're not currently drawing the window title correctly; we need to draw the main_ncw for this to hit the terminal. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Fix use-after-free when exiting boot option editorJeremy Kerr2013-11-221-13/+29
| | | | | | | | After we've called on_exit, we can no longer use the boot editor. This change moves individual button callbacks into process_key, which returns to the main loop. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Allow boot editor sysinfo updatesJeremy Kerr2013-11-222-65/+99
| | | | | | | We may start a boot editor (via 'New') before we have the sysinfo. To allow this, we redraw the device select. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add widgetset_set_windowJeremy Kerr2013-11-222-0/+9
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add widget_select_drop_optionsJeremy Kerr2013-11-222-0/+40
| | | | | | We want to be able to re-set the options in a select widget. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Implement intra-field scrollingJeremy Kerr2013-11-222-12/+10
| | | | | | | Now that we can calculate the focus within a field, ensure that the focussed-element remains scrolled. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/widgets: Add widget focus offset queryJeremy Kerr2013-11-222-0/+24
| | | | | | | | | | When we have widgets that are larger than the screen, we'd like to scroll to the currently-focussed component of that widget. This change introduces a widget_focus_y function, which returns the y offset of the field's focus. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Draw boot editor into a scrollable padJeremy Kerr2013-11-221-5/+51
| | | | | | | | Like the config editor, draw the boot editor into a pad instead of directly into the sub window. This means that long device lists will be handled correctly. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Make boot editor paths relative to deviceJeremy Kerr2013-11-221-1/+65
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add device selector to boot editorJeremy Kerr2013-11-221-4/+93
| | | | | | | | Rather than expecting users to enter full (prefixed) mount paths, add a select widget to pick a device, and we automatically add the prefix when the form is submitted. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/widgets: Add n_options check to widget_select_get_valueJeremy Kerr2013-11-221-0/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Split boot editor layoutJeremy Kerr2013-11-221-29/+59
| | | | | | | We want to make the boot editor dynamic later, so split the widget layout from the widget creation. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Make boot editor API consistent with config & sysinfo screensJeremy Kerr2013-11-226-105/+108
| | | | | | | | | | | | The boot-editor API is a little more exposed than it needs to be: the boot_editor struct does not need to be available to other files, and the init function and on_exit functions differ from those provided for the config and sysinfo screens. This change unifies the boot_editor API with those for the other screens. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: remove boot_editor_attr_fieldJeremy Kerr2013-11-221-5/+0
| | | | | | The widgetset code handles these attributes now. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add block devices to system info screenJeremy Kerr2013-11-221-2/+17
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Fix pad size checkJeremy Kerr2013-11-191-1/+1
| | | | | | We need the y-coord, not x. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Don't mess with prog_mode in cui_bootJeremy Kerr2013-11-191-5/+0
| | | | | | | The discover_client_boot call is asynchronous, so setting and resetting prog_mode doesn't gain us anything. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/menu: Allow space to select menu itemsJeremy Kerr2013-11-141-0/+1
| | | | | | To keep consistent with buttons, which also accept space. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add descriptive text for configuration editorJeremy Kerr2013-11-141-12/+44
| | | | | | | | This change adds: - 'seconds' to the timeout text entry - examples to the ip/mask, gateway and DNS text entries Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/nc-config: Draw config form into a scrollable padJeremy Kerr2013-11-141-4/+70
| | | | | | | | | | Currently, when the config form is larger than the screen size, the form fails to draw. This change draws the config screen onto a pad instead, which we can scroll. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* nui/ncurses: Allow config screen updatesJeremy Kerr2013-11-143-9/+50
| | | | | | | | We may receive configuration (or sysinfo) data after the configuration screen has been displayed. Implement config_screen_update and redraw the widgetset when new config data arrives. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add help for the DNS optionJeremy Kerr2013-11-141-1/+14
| | | | | | It's not obvious why it's there when we're configuring DHCP. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Populate configuration interface with current defaultsJeremy Kerr2013-11-141-14/+85
| | | | | | | Sets the default values of configuration widgets to the values found in t he current config. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Parse configuration form & send to serverJeremy Kerr2013-11-145-10/+135
| | | | | | | This change implements the configuration save action, when the user submits the nc-config form. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add network configurationJeremy Kerr2013-11-141-8/+130
| | | | | | | Add network configuration parameters. This requires a somewhat-dynamic layout, as the fields shown depend on earlier configuration. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add basic config editorJeremy Kerr2013-11-148-3/+283
| | | | | | This change adds a simple configuration editor to the ncurses UI. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
OpenPOWER on IntegriCloud