Stage¶
The Stage tab on the Analytics page allows the user to see the changes on the following elements for a specific project:
Sites
Groups
Access Points
Measurements
Pipe Specifications
The figure below displays the Stage tab selected with some examples. The red rectangle highlights the Stage tab.
Page sections:
The Stage tab main element is the Batch changes table, which has 11 columns:
Project - the project name.
Form/Graph - the form or graph where the change occurred. For example, changes on the sites, groups, or measurements forms. Changes may also be related to the access points and pipe specifications graph.
Row ID - the identifier of the changed row, or
new_rowstring when the record was created.Change Created At - the date and time when the change was recorded.
Change Author - the user who created the change.
Merged At - the date and time when the change was merged, when available.
Merge Author - the user who merged the change, when available.
Site - the site affected by the change.
Group - the group affected by the change, when available.
Old Data - the previous value or values before the change.
New Data - the updated value or values after the change.
Batch Changes Table Controls¶
The Batch Changes table has four action icons located at the top right of its wrapper card:
| Show/hide the previous changes for each batch change. The default state shows only the last changes for a given element in the table. | |
| Zoom in the table's cells to improve readability in small size screens. | |
| Zoom out the table's cells to improve readability in large size screens. | |
| Reset the zoom level to the default value. |
The figure below displays the Batch Changes’ action icons:
Stage Workflow¶
The workflow graph below presents the Stage’s lifecycle:
- Project's batch changes on the Stage tab.
- button clicked.
- Analytics script running.
- Batch's results.
- button clicked.
- button clicked.
Stage State Alert Icon¶
When loading the DRI-Platform webapp, it’s possible to check if there are changes on the Stage tab or not without visiting it. Look at the stage state icon, located to the left of the navbar to immediately check it from any page in the site.
The figure below shows the stage state icon activated.
The stage state icon can have two states:
| There are one or more changes in one or more projects' batches and a Merge Request action is required. | |
| All projects' batches are empty and no action is required. |
Merge Request¶
The figure below displays the button on the Stage tab.
When the user clicks on the button, an alert will show two messages saying the batch changes was sent to the backend and they are being analysed regarding their impacts on the database. The figure below displays the alerts.
At the same time, an e-mail is sent to the Analytics team with some information regarding the request and links to visit the API endpoint to see its content. Also, the Merge Request button will be hidden. See the figure below.
After that, the backend script will send a result to the Stage tab.
Merge Request Results¶
Depending on the results of the backend analytics script, three situations may happen:
| No impacts | The batch changes have no impacts on the analytics database, so no further action is necessary and the cycle is complete. | |
| Impacts | The batch changes impact the analytics database and an analytics team member should decide to commit the changes or deny them. | |
| Script errors | The analytics script threw one or more errors and couldn't continue checking the impacts. An analytics team member should review the issue and propose a solution, perhaps manually. |
No Impacts¶
If the batch changes don’t impact the analytics database, no further actions are needed. An alert showing no impact will be displayed. See the figure below.
After that, the project’s batch changes will be deleted and the cycle is completed.
Impacts¶
If the batch changes impact the analytics database, a list of impact results will be shown. See the figure below.
After that, the analytics team member should decide if commit the changes or deny them using the respective action buttons Commit or Deny.
Script Errors¶
If the analytics script throws errors during its execution, it won’t be possible to know if the changes will have impacts or not in the analytics database. In this case, an error alert with a list of errors will be displayed on the Stage tab. See the figure below.
After that, an analytics team member should review the issue and propose a solution, perhaps manually.