aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-03-10 09:28:01 -0800
committerGitHub <noreply@github.com>2021-03-10 09:28:01 -0800
commit624914d7bbafc3b78c439dd35d725ca368f0fd0d (patch)
treefd7cf6f5b984a8ad81329e4cd628fd935f33be60
parent8d9094fef58a86545a713c7cf23b2f4a598945b8 (diff)
parent11f9b3dd258f70183e07b0a37ce36996dd853837 (diff)
downloadtrackermap-web-624914d7bbafc3b78c439dd35d725ca368f0fd0d.tar.gz
trackermap-web-624914d7bbafc3b78c439dd35d725ca368f0fd0d.tar.bz2
trackermap-web-624914d7bbafc3b78c439dd35d725ca368f0fd0d.zip
Merge pull request #825 from mail2bishnoi/driver_group_mapping
Add driver, computed attribute etc linking
-rw-r--r--modern/src/DevicePage.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/modern/src/DevicePage.js b/modern/src/DevicePage.js
index 145ecc9f..ed5a6cba 100644
--- a/modern/src/DevicePage.js
+++ b/modern/src/DevicePage.js
@@ -137,6 +137,34 @@ const DevicePage = () => {
titleGetter={it => t(prefixString('event', it.type))}
label={t('sharedNotifications')}
variant="filled" />
+ <LinkField
+ margin="normal"
+ endpointAll="/api/drivers"
+ endpointLinked={"/api/drivers?deviceId=" + item.id}
+ baseId={item.id}
+ keyBase="deviceId"
+ keyLink="driverId"
+ label={t('sharedDrivers')}
+ variant="filled" />
+ <LinkField
+ margin="normal"
+ endpointAll="/api/attributes/computed"
+ endpointLinked={"/api/attributes/computed?deviceId=" + item.id}
+ baseId={item.id}
+ keyBase="deviceId"
+ keyLink="attributeId"
+ titleGetter={it => it.description}
+ label={t('sharedComputedAttributes')}
+ variant="filled" />
+ <LinkField
+ margin="normal"
+ endpointAll="/api/maintenance"
+ endpointLinked={"/api/maintenance?deviceId=" + item.id}
+ baseId={item.id}
+ keyBase="deviceId"
+ keyLink="maintenanceId"
+ label={t('sharedMaintenance')}
+ variant="filled" />
</AccordionDetails>
</Accordion>
}