The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::ZFSCurses::UI - the UI drawing logic.

VERSION

Version 1.02.

SYNOPSIS

App::ZFSCurses::UI is the meat of the application and is in charge of drawing the components that make up the UI.

METHODS

new

Create an instance of App::ZFSCurses::UI.

draw_and_run

Draw and run the UI. Also perform a couple of checks before actually running the UI which are: 1) checking whether the 'zfs' command is actually installed, 2) checking whether the user is root (required for tweaking properties).

exit_dialog

Callback when Ctrl+q is pressed. Draw a dialog to ask user for confirmation if he wants to quit the program.

show_help

Callback when F1 is pressed. Draw a dialog to print info about the selected property.

draw_properties_button

Draw the "Get properties" button.

NOTE: There are severals of these functions. They are called when going back and forth from one screen to another to redraw some parts of the screen such as buttons and labels.

draw_main_listbox

Draw the main listbox.

draw_change_go_back_bbox

Draw the "Change properties" and "Go back" button box.

draw_dataset_properties_screen

Draw the dataset properties screen.

draw_property_change_screen

Draw the property change screen.

onpress_show_dataset_properties

Callback when a dataset is selected and shown.

onpress_change_property

Callback when a property is changed.

onpress_back_to_datasets_list

Callback when the user goes back to the list of datasets.

onpress_back_to_properties_list

Callback when the user goes back to the list of properties.

SEE ALSO

The Curses::UI Perl module.

AUTHOR

Patrice Clement <monsieurp at cpan.org>

LICENSE AND COPYRIGHT

This software is copyright (c) 2020 by Patrice Clement.

This is free software, licensed under the (three-clause) clause BSD License.

See the LICENSE file.