ConfigAdmin Template Rewrite Plan
1. Objective
Rewrite the AngularJS-based *template*.html files located primarily within the UI/Js/ConfigAdmin/ directory structure of the MiX.Fleet.UI project.
2. Scope
- In Scope: All
*.htmltemplate files underUI/Js/ConfigAdmin/, including shared templates referenced viang:include(often prefixed with_cdn/Templates/ConfigAdmin/) and dynamically included templates (e.g., calibration templates, property-specific templates loaded viaproperty.templateUrl). - Out of Scope (for now): Templates residing in other directories like
UI/Js/Operations/,UI/Js/JourneyManagement/,UI/Js/Tracking/,UI/Js/FleetAdmin/, unless they are identified as essential shared dependencies forConfigAdmintemplates during the rewrite.
3. Identified Templates (ConfigAdmin Focus)
Main Template Files (Examples from initial analysis):
UI/Js/ConfigAdmin/Templates/MobileDeviceTemplateTemplate.htmlUI/Js/ConfigAdmin/Templates/LocationTemplateTemplate.htmlUI/Js/ConfigAdmin/Templates/EventTemplateTemplate.htmlUI/Js/ConfigAdmin/Templates/EventDuplicateTemplateTemplate.htmlUI/Js/ConfigAdmin/Templates/MobileDeviceTemplatePeripheralTemplate.htmlUI/Js/ConfigAdmin/Templates/AssetMobileDevicePeripheralEditTemplate.htmlUI/Js/ConfigAdmin/Templates/LogicalDeviceSettingsTemplate.htmlUI/Js/ConfigAdmin/Templates/LogicalCameraDeviceSettings.htmlUI/Js/ConfigAdmin/Templates/EventCreateTemplate.htmlUI/Js/ConfigAdmin/Templates/EventEditTemplate.htmlUI/Js/ConfigAdmin/Templates/EventInTemplateEditTemplate.htmlUI/Js/ConfigAdmin/Templates/EventLibraryTemplate.htmlUI/Js/ConfigAdmin/Templates/EventTemplateListTemplate.htmlUI/Js/ConfigAdmin/Templates/LocationEditTemplate.htmlUI/Js/ConfigAdmin/Templates/LocationInTemplateEditTemplate.htmlUI/Js/ConfigAdmin/Templates/LocationsLibraryTemplate.htmlUI/Js/ConfigAdmin/Templates/LocationTemplateListTemplate.htmlUI/Js/ConfigAdmin/Templates/MobileDeviceEditTemplate.htmlUI/Js/ConfigAdmin/Templates/MobileDeviceLibraryTemplate.htmlUI/Js/ConfigAdmin/Templates/MobileDeviceTemplateListTemplate.htmlUI/Js/ConfigAdmin/Templates/PeripheralCreateTemplate.htmlUI/Js/ConfigAdmin/Templates/PeripheralEditTemplate.htmlUI/Js/ConfigAdmin/Templates/PeripheralLibraryTemplate.htmlUI/Js/ConfigAdmin/Templates/ParameterEditTemplate.htmlUI/Js/ConfigAdmin/Templates/ParameterLibraryTemplate.htmlUI/Js/ConfigAdmin/Templates/PeripheralParameterEditTemplate.htmlUI/Js/ConfigAdmin/Templates/AssetEventEditTemplate.htmlUI/Js/ConfigAdmin/Templates/AssetTemplateLocationEditTemplate.htmlUI/Js/ConfigAdmin/Templates/CANLibraryTemplate.htmlUI/Js/ConfigAdmin/Templates/FirmwareLibraryTemplate.html- (Note: This list is based on initial analysis and may not be exhaustive. Further exploration during implementation might reveal more templates.)
Shared/Included Templates (within _cdn/Templates/ConfigAdmin/):
TemplateListTabsTemplate.html(Tabs for Template management screens)LibraryTabsTemplate.html(Tabs for Library management screens)PleaseBePatientModal.html/PleaseBePatientModalLibrary.html(Loading modals)DeviceSettingsTemplate.html(Common device settings fields)LogicalDeviceSettingsTemplate.html(Displays non-camera logical device settings; includes dynamic property templates)LogicalCameraDeviceSettings.html(Displays camera settings; includes dynamic property templates)EventEditContentTemplate.html(Core form fields for event editing)LocationEditContentTemplate.html(Core form fields for location editing)TemplateListGridTemplate.html(Grid display for template lists)- (Dynamically included calibration templates)
- (Dynamically included property templates via
property.templateUrl)
4. Dependency Analysis
The templates exhibit significant reuse through ng:include. Core settings, layout components, and editing forms are often encapsulated in shared templates.
graph TD
subgraph Shared Core Templates
A[_cdn/.../PleaseBePatientModal*.html]
B[_cdn/.../DeviceSettingsTemplate.html]
C[_cdn/.../LogicalDeviceSettingsTemplate.html] --> D{Dynamic Property Templates}
E[_cdn/.../LogicalCameraDeviceSettings.html] --> D
F[_cdn/.../EventEditContentTemplate.html]
G[_cdn/.../LocationEditContentTemplate.html]
end
subgraph Shared Navigation/Layout Templates
H[_cdn/.../TemplateListTabsTemplate.html]
I[_cdn/.../LibraryTabsTemplate.html]
J[_cdn/.../TemplateListGridTemplate.html]
end
subgraph Main Template Screens
K[MobileDeviceTemplateTemplate.html] --> H & A
L[LocationTemplateTemplate.html] --> H
M[EventTemplateTemplate.html] --> H
N[EventDuplicateTemplateTemplate.html] --> H
O[MobileDeviceTemplatePeripheralTemplate.html] --> H & A & B & C & E
P[...TemplateListTemplate.html] --> H & J
end
subgraph Main Library Screens
Q[MobileDeviceLibraryTemplate.html] --> I & A(PleaseBePatientModalLibrary.html)
R[LocationLibraryTemplate.html] --> I & A
S[EventLibraryTemplate.html] --> I & A
T[PeripheralLibraryTemplate.html] --> I & A
U[ParameterLibraryTemplate.html] --> I & A
V[FirmwareLibraryTemplate.html] --> I & A
W[CANLibraryTemplate.html] --> I
end
subgraph Edit Screens
X[MobileDeviceEditTemplate.html] --> I & B & C
Y[LocationEditTemplate.html] --> I & G
Z[EventEditTemplate.html] --> I & F
AA[PeripheralEditTemplate.html] --> I & B & C & E
AB[ParameterEditTemplate.html] --> I
AC[PeripheralParameterEditTemplate.html] --> I
end
subgraph Asset Edit Screens
AD[AssetMobileDevicePeripheralEditTemplate.html] --> A & B & C
AE[AssetEventEditTemplate.html] --> F
AF[AssetTemplateLocationEditTemplate.html] --> G
end
A & B & C & E & F & G & H & I & J --> K & L & M & N & O & P & Q & R & S & T & U & V & W & X & Y & Z & AA & AB & AC & AD & AE & AF
style Shared Core Templates fill:#f9f,stroke:#333,stroke-width:2px
style Shared Navigation/Layout Templates fill:#ccf,stroke:#333,stroke-width:2px
style Main Template Screens fill:#cfc,stroke:#333,stroke-width:2px
style Main Library Screens fill:#ffc,stroke:#333,stroke-width:2px
style Edit Screens fill:#fcc,stroke:#333,stroke-width:2px
style Asset Edit Screens fill:#cff,stroke:#333,stroke-width:2px
5. Suggested Rewrite Order
- Core Shared Templates: Start with the most deeply nested and widely used shared templates under
_cdn/Templates/ConfigAdmin/:PleaseBePatientModal.html/PleaseBePatientModalLibrary.htmlDeviceSettingsTemplate.htmlLogicalDeviceSettingsTemplate.html(Requires identifying/rewriting the dynamic property templates it includes)LogicalCameraDeviceSettings.html(Requires identifying/rewriting the dynamic property templates it includes)EventEditContentTemplate.htmlLocationEditContentTemplate.html- (Identify and rewrite dynamic calibration templates)
- Navigation/Layout Shared Templates:
TemplateListTabsTemplate.htmlLibraryTabsTemplate.htmlTemplateListGridTemplate.html
- Main Screens (Templates, Libraries, Edits): Once the shared components are rewritten, tackle the main container templates, following the dependencies outlined in the diagram (e.g.,
MobileDeviceTemplateTemplate.html,LocationTemplateTemplate.html,MobileDeviceLibraryTemplate.html, etc.). - Asset-Specific Screens: Address templates used for editing configurations directly on assets (e.g.,
AssetMobileDevicePeripheralEditTemplate.html).
This order aims to minimize rework by ensuring foundational components are stable before building upon them.