summaryrefslogtreecommitdiffstats
path: root/ui
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* ui/ncurses: Receive config messagesJeremy Kerr2013-11-132-0/+8
| | | | | | We just store the config in the cui for now. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Use nc-widgets for boot editorJeremy Kerr2013-11-132-240/+75
| | | | | | | Now that we have a simple widget set available, use this for the boot editor. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add simple ncurses form widget setJeremy Kerr2013-11-133-1/+804
| | | | | | | | | We're doing a lot of the same stuff with forms, and we'll to implement a lot of fields with the upcoming configuration interface. This change introduces a simple ncurses widget set. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add sysinfo screenJeremy Kerr2013-11-138-8/+332
| | | | | | | | Add a simple screen for displaying the struct system_info. We add this to the main menu as a selectable option, and separate it from the boot option list with an unselectable blank entry. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses/scr: Add definition for frame offsetJeremy Kerr2013-11-132-1/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: nc-menu.h needs assert.hJeremy Kerr2013-11-131-0/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/common: Don't talloc_free sysinfo and status explicitlyJeremy Kerr2013-11-132-8/+21
| | | | | | | | | | | | | Currently, we talloc_free() the sysinfo and status messages in the discover client, right after performing the ui's callback. However, the client may wish to keep a reference to this information beyond the callback invocation. This change introduces a per-message talloc context, which these structures are allocated under. This allows the callbacks to talloc_steal() anything they wish to keep a reference to. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add nc_scr_{un,}post()Jeremy Kerr2013-11-134-11/+29
| | | | | | | We may have nc_scrs that aren't interested in post/unpost information, so create helper functions that allow a NULL callback. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Move general nc init code to cui moduleJeremy Kerr2013-11-133-35/+32
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* config: Implement config messagesJeremy Kerr2013-11-132-0/+19
| | | | | | On client connect, send a PB_PROTOCOL_ACTION_CONFIG message. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* logging: Clean up debug logsJeremy Kerr2013-11-0110-40/+27
| | | | | | | We have quite a few pb_logs which should be pb_debug. This change moves developer-specific info to pb_debug. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Use OK & Cancel buttons for boot editor completionJeremy Kerr2013-10-112-6/+47
| | | | | | | Rather than using enter to complete a boot_editor session, add OK and Cancel buttons. Enter will move between fields. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Use 'x' as exit keyJeremy Kerr2013-10-114-5/+6
| | | | | | | | | | | Because terminals will send escape-sequences starting with escape, ncurses will pause after receiving a signle escape, to detect these sequences. This introduces a 1-second delay when exiting the petitboot UI. Instead, use 'x'. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Allow booting custom boot optionsJeremy Kerr2013-10-102-6/+1
| | | | | | | Currently, we can't boot user-created boot options, as they have no option ID associated. This change removes the check for option ID. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Defer item creation until boot editor is doneJeremy Kerr2013-10-108-93/+88
| | | | | | | | | | | | Currently, when creating new menu entries, we create an empty item, add it to the menu, then run the boot editor. This means that cancelling the edit will leave an empty item in the menu. This change defers the creation until the boot editor is done. To do this, we modify the on_open callback to take a menu rather than an item, and pass NULL boot data to the editor. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Use 'New' instead of 'Open'Jeremy Kerr2013-10-102-3/+2
| | | | | | "Open" is ambiguous in the context of the boot menu; use "new" instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Display sysinfo type & identifierJeremy Kerr2013-10-096-5/+46
| | | | | | | Hook into the sysinfo updates to display the type & id at the top of the petitboot main menu. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add system info messagesJeremy Kerr2013-10-093-0/+50
| | | | | | | | Add a little infrastructure for communicating information about the system to the petitboot UIs. We just send some identifying info (type and identifier), as well as the interfaces. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/log: Cleanup log APIJeremy Kerr2013-09-192-18/+11
| | | | | | | | | | Rather than exposing log internals (through always_flush and set_stream), do all logging init through pb_log_init(). If pb_log_init() hasn't been called, pb_log will drop messages. Also, add a pb_debug() function, specifically for debugging information. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: populate udev device typesJeremy Kerr2013-09-181-0/+16
| | | | | | Now that we have device types, populate from the udev info. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Allow both DEL and ^H to map to backspaceJeremy Kerr2013-09-061-0/+8
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/process: Add dry_run argument to process_initJeremy Kerr2013-08-203-3/+4
| | | | | | | Implement dry-run behaviour on the discover server by passing a bool to process_init. UIs don't need to support dry runs. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/process: replace pb_run_cmdJeremy Kerr2013-08-194-15/+21
| | | | | | | This change replaces the pb_run_cmd() function with proper usage of the process API. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/process: replace pb_run_cmd_pipeJeremy Kerr2013-08-192-0/+6
| | | | | | Replace pb_run_cmd_pipe with process_create / process_run_sync. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/waiter: handle -EINTRJeremy Kerr2013-08-192-2/+2
| | | | | | | Now that we're handing non-fatal signals (i.e., SIGCHLD in the process lib), we need to gracefully handle -EINTR from poll(). Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* configure: Update to use AX_WITH_CURSESGeoff Levand2013-07-2310-12/+47
| | | | | | | | | | | For a more portable build system convert to using the autoconf-archive AX_WITH_CURSES macros. Allows building on openSUSE, which has a different header file layout than other distros, and fixes menu entries with UTF-8 characters; this causes fedora installs (codename "Schrödinger´s cat") to break the UI. Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/ncurses: Add setlocale callJeremy Kerr2013-07-231-0/+3
| | | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/ncurses: Remove unused 'cod' variableJeremy Kerr2013-06-241-2/+1
| | | | | | | | | | | | When configured with --disable-debug, we get an unused variable warning: ui/ncurses/nc-cui.c: In function 'cui_device_remove': ui/ncurses/nc-cui.c:439:24: error: unused variable 'cod' cc1: all warnings being treated as errors This change just removes the temporary variable. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add initial dtb supportGeoff Levand2013-06-246-6/+19
| | | | | | | Updates & fixes by Jeremy Kerr <jk@ozlabs.org>. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add cancel-default reportingJeremy Kerr2013-06-244-78/+6
| | | | | | | | | When we first see key input, we can tell the discover server to cancel the default boot. Untested on ps3. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/common: Add code to send cancel-default messagesJeremy Kerr2013-06-242-0/+17
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui: implement timers with waitsetsJeremy Kerr2013-06-245-91/+21
| | | | | | | A temporary change to the timers; we'll eventually remove these from the ui code. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/waiter: Add timeout waitersJeremy Kerr2013-06-243-6/+6
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/test: print default status of boot optionsJeremy Kerr2013-06-241-0/+1
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/test: Add boot status messages to test clientJeremy Kerr2013-05-211-0/+12
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: implement global keysJeremy Kerr2013-05-211-0/+16
| | | | | | | Add process_global_keys to handle global key events. Using this, implement ctrl+l to refresh. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
OpenPOWER on IntegriCloud