Web UI to generate configuration .json files

Issue #193 resolved
Desrever Nu created an issue

have a wizard and an advanced mode

Use case scenario/acceptance test for web ui :

A new browser window opens with a list of variables.

  • The variables are the very same variables defined in setup.md
  • Variables with a default values are already filled with the default values. All fields are editable.
  • Buttons: "Load settings" , "export settings" , "reset ", "start/stop nubot" (this last as a toggle).
  • Pressing "reset" will cleanup fields and load them with default text.
  • After pressing the "start nubot" button fields becomes read only, nubot is launched using those params, and the button becomes a stop button (and the logs tab is visualised?) .

Good to have * fields are validated on "export" , 'load settings' "start nubot"

  • a link to setup.html

Comments (19)

  1. Benjamin Cordes

    I added quite a lot of things in the 193 branch:

    • jetty webserver (UIserver)
    • jetty dependencies in gradle
    • html
    • bootstrap
    • jquery
    • AJAX call
    • a servlet to handle keys
  2. Benjamin Cordes

    two cases:

    • no file exists. system creates an empty json
    • file exists. system loads it and displays values. user can change any one value and the file will be changed
  3. Benjamin Cordes

    If changes are made one should preserve the old file as backup, in case user wants to restore.

  4. Benjamin Cordes

    @desrever I'd strongly prefer to move to one configuration file i.e. one "config.json" under the root folder. It would make a lot of things easier. And if we have a UI users can manage the config that way.

    Having multiple config files introduces a lot of complexity. There is a lot that can go wrong. Writing to the wrong file, mixing options between files, etc.

  5. Benjamin Cordes

    Quote from desrever:

    Use case scenario/acceptance test for web ui :

    Mr Custodian ( MC) is a custodian and approach nubot for the first time.

    MC downloads a zipped folder from the repository. After unzipping the program, MC double-clicks an executable file.
    A new browser window opens with a list of variables. The variables are the very same variables defined in setup.md . Variables with a default values are already filled with the default values. All fields are editable.

    Some bottoms "Load settings" , "export settings" , "reset ", "start/stop nubot" (this last as a toggle).

    • Pressing "reset" will cleanup fields and load them with default text.
    • Pressing "export settings" button let the MC choose where to save current settings.
    • pressing "import settings" button let MC load settings from a json file.
    • After pressing the "start nubot" button fields becomes read only, nubot is launched using those params, and the button becomes a stop button (and the logs tab is visualised?) .

    Good to have

    • fields are validated on "export" , 'load settings' "start nubot"

    Nice to have

    • Each field has a tooltip text (description column in setup.md)
    • in the UI, fields are semantically grouped as in the setup.md
    • each field is validated on typing
    • fields that only accept some values are drop down instead of free text (example : mail-notifications )
    • a link to setup.html
  6. Log in to comment