Skip to content

Commit b1021e3

Browse files
authored
Merge pull request #6125 from FlowFuse/expose-remote-instance-device-group
Expose and display remote instance device group
2 parents 8b1f95c + 64d7404 commit b1021e3

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

forge/db/models/Device.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ module.exports = {
348348
}
349349
},
350350
{ model: M.ProjectSnapshot, as: 'targetSnapshot', attributes: ['id', 'hashid', 'name'] },
351-
{ model: M.ProjectSnapshot, as: 'activeSnapshot', attributes: ['id', 'hashid', 'name'] }
351+
{ model: M.ProjectSnapshot, as: 'activeSnapshot', attributes: ['id', 'hashid', 'name'] },
352+
{ model: M.DeviceGroup }
352353
]
353354
}
354355
return this.findOne({

frontend/src/pages/device/Overview.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@
6161
<span v-else>None</span>
6262
</template>
6363
</InfoCardRow>
64+
<InfoCardRow property="Group:" v-if="device?.application && device.deviceGroup">
65+
<template #value>
66+
<ff-team-link
67+
:to="{ name: 'ApplicationDeviceGroupIndex',
68+
params: {
69+
deviceGroupId: device.deviceGroup.id,
70+
applicationId: device.application.id
71+
}}"
72+
>
73+
{{ device.deviceGroup.name }}
74+
</ff-team-link>
75+
</template>
76+
</InfoCardRow>
6477
<InfoCardRow v-if="device.ownerType!=='application'" property="Instance:">
6578
<template #value>
6679
<router-link v-if="device?.instance" :to="{name: 'Instance', params: { id: device.instance.id }}">

0 commit comments

Comments
 (0)