format-data/devices.ps1xml

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
    <Controls>
        <Control>
        <Name>Cumulocity-DeviceCollectionFormat</Name>
        <CustomControl>
            <CustomEntries>
                <CustomEntry>
                    <CustomItem>
                        <Frame>
                            <LeftIndent>4</LeftIndent>
                            <CustomItem>
                                <Text>self: </Text>
                                <ExpressionBinding>
                                    <ScriptBlock>$_.self</ScriptBlock>
                                </ExpressionBinding>
                                <NewLine/>
                                <Text> next: </Text>
                                <ExpressionBinding>
                                    <ScriptBlock>$_.next</ScriptBlock>
                                </ExpressionBinding>
                            </CustomItem>
                        </Frame>
                    </CustomItem>
                </CustomEntry>
            </CustomEntries>
        </CustomControl>
        </Control>
    </Controls>
    <ViewDefinitions>
        <View>
            <Name>Default</Name>
            <ViewSelectedBy>
                <TypeName>application/vnd.com.nsn.cumulocity.customDevice+json</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Width>20</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>35</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>25</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>35</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>30</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>c8y_ActiveAlarmsStatus</Label>
                        <Width>30</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>c8y_Availability.status</Label>
                        <Width>40</Width>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <!-- <Wrap /> -->
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>id</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>name</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Type</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>owner</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>lastUpdated</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    if ($_.c8y_ActiveAlarmsStatus) {
                                        $_.c8y_ActiveAlarmsStatus
                                    }
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>
                                    if ($_.c8y_Availability) {
                                        $_.c8y_Availability.status
                                    }
                                </ScriptBlock>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
        <View>
            <Name>Default</Name>
            <ViewSelectedBy>
                <TypeName>application/vnd.com.nsn.cumulocity.customDeviceCollection+json</TypeName>
            </ViewSelectedBy>
            <GroupBy>
                <PropertyName>self</PropertyName>
                <CustomControlName>Cumulocity-DeviceCollectionFormat</CustomControlName>
            </GroupBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <label>currentPage</label>
                        <Width>15</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <label>pageSize</label>
                        <Width>15</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <label>totalPages</label>
                        <Width>15</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <label>totalElements</label>
                        <Width>15</Width>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Width>150</Width>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <!-- <Wrap /> -->
                        <TableColumnItems>
                            <TableColumnItem>
                                <scriptblock>$_.statistics.currentPage</scriptblock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <scriptblock>$_.statistics.pageSize</scriptblock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <scriptblock>$_.statistics.totalPages</scriptblock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <scriptblock>$_.statistics.totalElements</scriptblock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>managedObjects</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>
    </ViewDefinitions>
</Configuration>