Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Synopsis

Need The goal for 2.0 to look generic, but much of the UI and code is country specific. The was a generic, globally applicable release.  As 2.0 was a fairly fast consolidation of several branches/forks created for specific projects, some features are country specific.  Separating these features into standalone modules was too large of a task, not to mention the lack of a robust modularization framework.  The stop-gap solution for 2.0 is to implement a feature toggle mechanism, where a property would be set during build time to toggle toggles on or off the set of country-specific UI elements. The underlying code . The property setting is in the gradle.properties file, called toggleOnCustomand logic remain, ready for use when toggled on.  As explained below, a toggling is accomplished by hiding certain portions of the user interface, such as menu items.

This toggle setting is set for all custom project-specific code, not for each country-specific project. So there is no toggleOnVIMS, toggleOnJSI, toggleOnMoz, etc.

The build property setting is in the gradle.properties file, called toggleOnCustom.  The actual toggling functionality will use uses the existing permissions framework to toggle features on or off. Most  Most of the UI is hidden or shown based on if the rights of the current logged in user has permission to see it. So toggling will be done by not allowing any users to have certain .  Thus, the "toggling" is accomplished simply by denying permissions to the country-specific permissionsfeatures. This is enforced by REMOVING the definitions of country-specific permissions (the rights table) at build time. The gradle build simply calls (or does not call) certain SQL scripts to remove (or re-add) those permission definitions to the system. The country-specific permission definitions are always removed during the build–if custom code is toggled on, then they are re-added.

With the removal of permission definitions, certain parts of the system are now hidden or changed.  

Again, this is a stop-gap, cosmetic solution.  A project requiring any number of the toggled off features simply needs to load the appropriate permission(s).

UI

  • Default page at login is changed from the dashboard to /public/pages/index.html
  • Manage distributions link is moved from the Vaccine menu to its own Distributions menu
  • 1.0 reports link is moved from its own Reports menu to under the new Reports menu, with the name Admin Reports
  • Maintenance Requests and Service Contracts are hidden under the Equipment menu
  • Vaccine menu is hidden
  • Almost all reports, with the exception of the User Summary report (in the Admin submenu), are hidden under the Reports menu
  • Vaccine, Manage Custom Reports and Help menu items are hidden (under Administration menu)
  • Seasoning / Rationing Type and Adjustment Basis are hidden (under Configure submenu)
  • In create/edit roles, all of the country-specific rights have been removed and are no longer shown
  • ILS Gateway menu is hidden
  • Dashboard menu is hidden
  • Certain headings have been slightly renamed
    • Equipments menu has been renamed to Equipment
    • Right categories headings in the editing rights for a role have been renamed (e.g.: Admin and general operations rights to Admin and General Operations Rights)

...

Adding Features to Toggle

See the docs/Feature Toggle.md file in the code to understand feature toggling in more detail and how to extend it.