Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
web_interface:dashboard_setup [2021/04/28 11:06] – [Configure the dashboards] Gary Willettsweb_interface:dashboard_setup [2024/04/09 02:01] (current) Mark Glover
Line 1: Line 1:
 {{indexmenu_n>60}} {{indexmenu_n>60}}
-====== 18.06. Mobile Dashboard set up (after v4.0) ======+====== 19.06. Mobile Dashboard set up (after v4.0) ======
 <WRAP center round alert 80%> <WRAP center round alert 80%>
-August 2020:  The instructions on this page are for configuring mSupply's legacy web dashboard and [[https://docs.msupply.foundation/en:mobile:user_guide:mobile_dashboard|mSupply Mobile dashboards]].  mSupply's legacy web dashboard has been superseded by the [[https://docs.msupply.foundation/en:dashboard|mSupply Grafana web dashboard]].+August 2020: 
 + 
 +  The instructions on this page are for configuring both: 
 +    * [[web_interface:dashboard_using#legacy_web_dashboard|mSupply's legacy web dashboard]].  This is now superseded by the [[https://docs.msupply.foundation/en:dashboard|mSupply Grafana web dashboard]]  
 +    * [[https://docs.msupply.foundation/mobile/introduction/mobile-dashboard/|mSupply Mobile dashboards]].  The instruction on this page are still the only way to configure them for mSupply versions 4.0 and later
 </WRAP> </WRAP>
  
Line 16: Line 20:
 Sustainable Solutions can help with these.</WRAP> Sustainable Solutions can help with these.</WRAP>
  
-===== Configure the dashboards ===== +===== Access the dashboards configuration =====
   - On the **Admin** tab of the Navigator click on the **Dashboard** button: {{ :web_interface:dashboard2.png?600 |}}   - On the **Admin** tab of the Navigator click on the **Dashboard** button: {{ :web_interface:dashboard2.png?600 |}}
   - This will show you a list of the available dashboard reports: {{ :web_interface:dashboard_report_list.png?600 |}}   - This will show you a list of the available dashboard reports: {{ :web_interface:dashboard_report_list.png?600 |}}
 +
 +==== Configure the dashboards ====
   - Tick the box in the **Is active** column for each report that you want generated. Note that if one or more reports are selected, the scheduled process for generating and refreshing the dashboard reports is automatically started, there is no separate setting for turning it on and off. Similarly, if no reports are selected the dashboard report generating process will be turned off automatically.    - Tick the box in the **Is active** column for each report that you want generated. Note that if one or more reports are selected, the scheduled process for generating and refreshing the dashboard reports is automatically started, there is no separate setting for turning it on and off. Similarly, if no reports are selected the dashboard report generating process will be turned off automatically. 
   - Set the number of minutes in the **Update Period (mins)** column to set how often each of these reports is generated.  ''1440'' is one full day.   - Set the number of minutes in the **Update Period (mins)** column to set how often each of these reports is generated.  ''1440'' is one full day.
  
-===== Available dashboard reports =====+  * The **Export settings** tab is for telling mSupply when and how to update the data behind the dashboard (see the [[web_interface:dashboard_setup#exporting_msupply_data_to_the_dashboard|Exporting msupply data to the dashboard]] tab section below). 
 +  * The //Dashboard Tab// tab is for setting up Dashboard tabs (see the [[web_interface:dashboard_setup#dashboard_tabs|Dashboard tabs]] section below) for the Legacy mSupply dashboard.  As of 2024, this section is most likely irrelevant. 
 +==== Available dashboard reports ====
 There are several built-in dashboard reports that everyone can use.  The table below documents what they show and what properties can be edited: There are several built-in dashboard reports that everyone can use.  The table below documents what they show and what properties can be edited:
  
Line 144: Line 151:
 If you can't make a dashboard report that does what you want then please speak to us, it's usually a fairly simple matter for us to create one for you. If you can't make a dashboard report that does what you want then please speak to us, it's usually a fairly simple matter for us to create one for you.
  
-===== Editing dashboard reports =====+ 
 +==== Editing dashboard reports ====
 Double-click a report in the list shown above and the following window will open: Double-click a report in the list shown above and the following window will open:
  
 {{ :web_interface:dashboard_report_edit.png?400 |}} {{ :web_interface:dashboard_report_edit.png?400 |}}
  
 +=== Parameters tab ===
   * If there are any properties shown in the list, these can be edited to change what is displayed.   * If there are any properties shown in the list, these can be edited to change what is displayed.
   * To edit a property or value, click once to select the row, and then click again in the appropriate cell to edit it.   * To edit a property or value, click once to select the row, and then click again in the appropriate cell to edit it.
   * To add or delete a row use the **New line** and **Delete line(s)** buttons at the top of the window.   * To add or delete a row use the **New line** and **Delete line(s)** buttons at the top of the window.
   * In the example shown in the screenshot above (a map report), the coordinates of two of the map corners and the item code of the item whose stocks will be shown on the map have been entered. Note that if you add extra properties to the default reports they'll be ignored.   * In the example shown in the screenshot above (a map report), the coordinates of two of the map corners and the item code of the item whose stocks will be shown on the map have been entered. Note that if you add extra properties to the default reports they'll be ignored.
 +
 +=== Method code tab ===
 +This tab is password protected. After entering the password you are shown the code used to execute the report, which you can edit as necessary. 
 +
 +=== Json tab ===
 +This tab shows the JSON formatted text that was returned from the last successful execution of the report.
 +
 +=== Notification Rules tab ===
 +On this tab you can enter JSON formatted text to define the rules for notifying users with the results of the report. To Add, edit or delete any rules you must first click on the **Click to unlock** button and enter the password to allow editing.
 +
 +An example of a valid rule is:
 +<code>{"Rules":[{"userTags":["Monthly_report_emails"],"notificationPeriod":1,"lastSentAt":"2022-02-07T08:28:42Z"}]}</code>
 +
 +The elements are as follows:
 +  * ''userTags'' defines the tags the users must have to be sent the report. Add as many as you wish.
 +  * ''notificationPeriod'' the period in whole days between sendings of the report.
 +  * ''lastSentAt'' the date and time the report was last sent, in the format YYYY-MM-DDTHH:MM:SSZ. If set to "" (blank) this will trigger the sending of the report when the time in ''notificationPeriod'' has elapsed, measured from the time the **OK** button is clicked on this window.
 +
 +===== Exporting mSupply data to the dashboard =====
 +The mSupply Grafana dashboard has its own separate Postgres database to improve performance and prevent use of the dashboard slowing mSupply down. This means that the data for the dashboard must be exported from the mSupply database to the dashboard's database. You control the settings for this process by clicking on the //Export settings// tab of the window which is displayed when you click on the //Dashboard// icon on the //Admin// tab of the Navigator:
 +
 +{{ :web_interface:screenshot_2022-02-14_at_16.01.43.png?600 |}}
 +
 +=== Postgres server section ===
 +Enter the details of the dashboard's Postgres server in here:
 +  * **Server**: the URL of the server the database resides on
 +  * **Port**: the port the database is being served on
 +  * **User**: the username mSupply will use to login to the dashboard's database
 +  * **Password**: the password ms will use ot login to the dashboard's database
 +  * **Database name**: the name the dashboard's database has been given in Postgres
 +
 +Test connection button: when you have enetered all the details in this section, click on this button to test the connection to the dashboard's database. mSupply will tell you whether the connection is successful or not.
 +
 +=== Export settings section ===
 +In the table select the tables in the mSupply database that you want to export to the dashboard. Care needs to be taken here; you need to choose all the tables that will provide the information you need in the dashboard but not those you do not need as this may impact on the speed of the export, and therefore how quickly your dashboard can be updated.
 +
 +Use the **All/None** checkbox to quickly check or uncheck all the tables in the list.
 +
 +The **URL** field shows you the URL that mSupply is exporting the data to.
 +
 +**Full export of Checked Tables button:** Clicking this will force mSupply to empty the dashboard database and export all the data from the selected tables to the dashboard database.
 +
 +**Run Next Scheduled Export Now button:** Clicking this will make mSupply immediately export to the dashboard database all the data that has changed in its database since the last export to the dashboard.
 +
 +When these settings have been saved, mSupply will use them to automatically export the selected data to the dashboard according to the schedule that has been set.
 +
  
 <WRAP center round alert 60%> <WRAP center round alert 60%>
 August 2020:  The remaining instructions on this page are for configuring mSupply's legacy web dashboard.  This may still work, but is no longer supported as it has been superseded by the [[https://docs.msupply.foundation/en:dashboard|mSupply Grafana web dashboard]].  The instructions are left here for historic reference only. August 2020:  The remaining instructions on this page are for configuring mSupply's legacy web dashboard.  This may still work, but is no longer supported as it has been superseded by the [[https://docs.msupply.foundation/en:dashboard|mSupply Grafana web dashboard]].  The instructions are left here for historic reference only.
 </WRAP> </WRAP>
 +
 +
 ===== Dashboard tabs ===== ===== Dashboard tabs =====
-You set up Dashboard tabs which will display on your dashboard. Dashboard tabs are "containers" for one or more dashboard reports. To edit them go to //File > Preferences// and click on the //Dashboard tabs// tab on the left hand side:+You set up Dashboard tabs which will display on your dashboard. Dashboard tabs are "containers" for one or more dashboard reports. To edit them click on the //Dashboard Tabs// tab of the window which is displayed when you click on the //Dashboard// icon on the //Admin// tab of the Navigator:
  
-{{ :preferences:dashboard_tabs.png |}}<WRAP clear/>+{{ :web_interface:screenshot_2022-02-14_at_15.22.40.png?600 |}}
  
 To add a tab click the **Add** button. To edit a tab, double-click it. You will be shown a window for editing a dashboard tab: To add a tab click the **Add** button. To edit a tab, double-click it. You will be shown a window for editing a dashboard tab:
Line 167: Line 224:
  
 Now you add reports that will show on this tab. Now you add reports that will show on this tab.
-==== Understanding rows and columns ==== 
  
 +==== Understanding rows and columns ====
 Take this example dashboard tab: Take this example dashboard tab:
  
Line 185: Line 242:
  
 ==== Adding a report to a dashboard tab ==== ==== Adding a report to a dashboard tab ====
- 
 Click **New Line** to add a new report to the tab. Then edit the values in each column Click **New Line** to add a new report to the tab. Then edit the values in each column
   * **Row:** The row it will be in   * **Row:** The row it will be in
Line 201: Line 257:
  
 ==== Configure users to have access to dashboards ==== ==== Configure users to have access to dashboards ====
- 
 Once the tabs have been setup you have to choose which users will see which tabs. You do this in individual users' settings. For instructions on how to do this, see: Once the tabs have been setup you have to choose which users will see which tabs. You do this in individual users' settings. For instructions on how to do this, see:
   * [[admin:managing_users#user_can|Managing users > General tab > Users can:]] (Use the Dashboard permission)   * [[admin:managing_users#user_can|Managing users > General tab > Users can:]] (Use the Dashboard permission)
   * [[admin:managing_users#the_dashboard_tab|Managing users > Dashboard tab]]   * [[admin:managing_users#the_dashboard_tab|Managing users > Dashboard tab]]
 + \\ 
 + \\
 |  //  Previous:  **[[web_interface:dashboard_using]]** | | Next: **[[web_interface:online_catalogue]]** //  | |  //  Previous:  **[[web_interface:dashboard_using]]** | | Next: **[[web_interface:online_catalogue]]** //  |
 ---- struct data ---- ---- struct data ----
  • Last modified: 2021/04/28 11:06
  • by Gary Willetts