OE-605 Alerts Column logic Config Group

Date: 2025-01-30 Time: 11:51
Parent:: OE-513 Configuration Groups - Frangularisation and enhancements
Friend:: 2025-01-30
JIRA:OE-605 Alerts Column logic Config Group
[OE-605] [UI] [API] Alerts Column Configuration Groups - Jira

TODO

function callout(text, type) {
    const allText = `> [!${type}]\n` + text;
    const lines = allText.split('\n');
    return lines.join('\n> ') + '\n'
}
 
const query = `
not done
path includes ${dv.current().file.path}
# you can add any number of extra Tasks instructions, for example:
# group by heading
`;
 
dv.paragraph(callout('```tasks\n' + query + '\n```', 'todo'));

Branch

Config/MR/Feature/OE-605-Alerts-Column-logic-Config-Group.INT

Description

Please see the parent item to view where this fits in.
PLEASE NOTE This only handles the Config Groups list.

We’ll start with 4 alert states and add more in future

  • Assets in config Upload requested state for more than 5 days
  • Assets in FW upload requested state for more than 3 days
  • Preferred FW version that is older than 2 releases back. Jacques van Wyk will have more info?
  • Assets that have events with a status of ā€œEvents not monitored - missing parametersā€

The alerts column should display the number of alerts for the config group (so max 4 at the moment)
The alert count should be a clickable link

Green header Alerts
(PLEASE NOTE the new styling across the system is no longer with a green header, please just double check with the PO, but I think this is OK.)
Below this display each alert and the asset count associated to the alert

AlertAsset count
Configuration upload request expired5
FW upload request expired5
Preferred FW version not supported5
Event not monitored - missing parameters1

In the bottom right corner is a green Close button
(ALL the other Modal in this type of scenario show an OK. I have left it as an OK. Please confirm with the PO if this is OK)

This needs to happen for both panels

  • This is needed for the config groups grid.
  • It is also needed for individual assets’ rows in the assets grid. (This will be a new story)

Idea

  • On Assets could have these as columns for easy selecting and then eg. sending FW again

NEXT: Config Group Section

  • NOT NEEDED
    • Lines: miXVisionSerialnumber
    • Alerts: preferredFWVersion, serialnumber, commsLog (messageStatusDateUtc)
  • MAYBE NEEDED
    • 3: lines: hos, sp, fuel, rpm, speed
    • 3: alerts: fwVersion,
      • alerts << Call other one, strip out what is needed…

Route: GetConfigurationGroupsOtherColumns = ā€œconfiguration-groups-multiselect/groupId/{groupId}/other-columnsā€;

FORGOT

  • One of the alerts were NOT done on asset level (Asset DB…) Go look!!

Investigation Notes

  • This one is partly outstanding - MAYBE

    • Configuration upload request expired
      • The Deviceconfiguration and DP part has been done (Mesa, etc)
        • It was easy to look at the last message status and types and then determine if it has expired according to the rules
      • The Asset DB part has not been done (as I am not sure about the following):
        • I am not sure WHAT to look at which will tell me it is not yet completed.
        • It just seems like a list of messages that came in, no way to determine except if we look for strings within that list…
  • All of these have been done as they all come from the Deviceconfiguration and DP DBs.

    • FW upload request expired
    • Preferred FW version not supported
      • This MIGHT have CanbusIncompatible missing logic where ā€˜E’ FW needs to be removed, however while testing I didn’t find issues.
    • Event not monitored - missing parameters

Temp note

Columns that will not show for the time being:

  • lines: hos, sp, fuel, rpm, speed, fwVersion
  • alerts

Lazy Loading notes

  • lazyLoadingCGOther: boolean = false;
  • lazyLoadingCGAlerts: boolean = false;
  • lazyLoadingCGOtherUnits: string = ā€;
  • lazyLoadingCGAlertsUnits: string = ā€;

Code

<div>
  <div *ngIf="
  (col?.lazy === 'alerts' && lazyLoadingAlerts && unitIsLazyLoading(dataItem.configurationGroupId, lazyLoadingAlertsUnits)) ||
  (col?.lazy === 'lines' && lazyLoadingLines && unitIsLazyLoading(dataItem.configurationGroupId, lazyLoadingLinesUnits))">
	<kendo-skeleton
	  shape="text"
	  animation="pulse"
	  width="100%"
></kendo-skeleton>
  </div>
</div>
 
 
<!-- <kendo-grid
	[kendoGridBinding]="configAlertData"
	[height]="270">
	<kendo-grid-column field="alert" title="{{'Alert'|dmxTranslate}}" [width]="150">
	</kendo-grid-column>
	<kendo-grid-column field="count" title="{{'Asset count'|dmxTranslate}}" [width]="50">
	</kendo-grid-column>
  </kendo-grid> -->

Languaging

  • All these āœ… 2025-02-06
  • Alert
  • Asset count