The Console is the Graphical User Inferface that allows an administrator to manage various tasks that will become Commands sent to the CMDSRV. It requires authentication credentials of the user and then displays a number of menu tabs to panels that support the following functionality:
- Control of the Server such as poweroff and reboot
- Configuration - manage services installed and active and networking paramters
- Content Installation - menu driven selection of various types of content from third parties
- Content Menus - Manage the home page and the details of items on that menue
- Utilities - Change Password and display of various server parameters and status
During installation the console role in the github repo gets installed to /opt/admin/console/.
The Console is a single-page application (SPA) launched with /opt/admin/console/index.html. On startup it loads various javascript and css files and then invokes a main function in javascript that loads html files and the initial set of data in the form of json files. These are loaded via ajax calls.
The application employs a number of javascript/css libraries includig jquery, bootstrap, and fonts. There are also several specialized libraries for things like maps, markdown, and message encryption.
As is the case with most SPA applications, the complexity is in the javascript files all of which are in https://github.com/iiab/iiab-admin-console/tree/master/roles/console/files/js:
- admin_console.js is the top level and contains the function main(). It handles initialization, the server api, and most panels except those dealing with content download and menuing. It also handles setting all the button event handlers.
- content_functions.js, map_functions.js, oer2go_functions.js, and zim_functions.js contain specialized javascript for downloading and otherwise managing IIAB content.
- js_menu_functions.js handles the creation and editing of the home page menu and menu items on that page.
The best description of the panels and their dialog boxes is the help accessible via the top level Help menu tab. Those who wish to read these directly from the github repos should browse https://github.com/iiab/iiab-admin-console/tree/master/roles/console/files/help.
The main types of content supported by IIAB are:
- Kiwix ZIMS
- OER2Go Modules
- OSM Maps
Each of these has a Catalog, and the Admin Console downloads these catalogs during install and periodically thereafter on demand. These catalogs are used to display a pick list of content items that can be installed by checking a box beside those selected and then clicking an Install Selected button. When the button is clicked a command is sent to CMDSRV, which causes it to download and install the requested content. The progress mayb be viewed in the Display Job Status panel of the Utilities menu.
They are also described further in the relevant help sections.
Because Admin Console is intended for offline use it is not possible to have SSL support other than with a self-signed certificate. To ameliorate this problem the Console and CMDSRV exchange a set of tokens and nonces to defeat sniffing attacks. (Without SSL certs it is not possible to prevent 'man-in-the-middle' attacks.)
Sensitive exchanges with the server, such as passwords and password management, are also encrypted.
Wiki content comes in a growing list of languages. In order to translate language codes between those used by Kiwix and other representations Admin Console has its own set of language codes. The need to have new code added periodically.
The best way to see under the hood is to open the Javascript Console in your browser. Many functions write status to the console that can be examined.
This document was last maintained on December 29, 2022.