I’ve been struggling to get Universal Dashboard to accept any function as valid endpoint input. I have formatted objects being returned in my functions but UD doesn’t seem to be able to read the data.
$Dashboard = New-UDDashboard -Title "Test" -Content {
New-UDRow -Columns {
New-UDColumn -SmallSize 4 -Content {
New-UDGrid -Title "test" -Endpoint {Get-SQLInfo | select-object "MachineName","MissingUpdates","LastCommTime" | Out-UDGridData }
}
}
}
Start-UDDashboard -Dashboard $Dashboard -Port 10005
Here’s some sample data returned from my function call
MachineName : Device01
MissingUpdates : 1
LastCommTime : 5/18/2020 4:51:49 PM
This is all my dashboard returns
Results of “return $result | gm | ft | clip” at the end of my function:
TypeName: System.Data.DataRow
Name MemberType Definition
AcceptChanges Method void AcceptChanges()
BeginEdit Method void BeginEdit()
CancelEdit Method void CancelEdit()
ClearErrors Method void ClearErrors()
Delete Method void Delete()
EndEdit Method void EndEdit()
Equals Method bool Equals(System.Object obj)
GetChildRows Method System.Data.DataRow[] GetChildRows(string relationName), System.Data.DataRow[] GetChildRows(string relationName, System.Data.DataRowVersion version), System.D…
GetColumnError Method string GetColumnError(int columnIndex), string GetColumnError(string columnName), string GetColumnError(System.Data.DataColumn column)
GetColumnsInError Method System.Data.DataColumn[] GetColumnsInError()
GetHashCode Method int GetHashCode()
GetParentRow Method System.Data.DataRow GetParentRow(string relationName), System.Data.DataRow GetParentRow(string relationName, System.Data.DataRowVersion version), System.Data…
GetParentRows Method System.Data.DataRow[] GetParentRows(string relationName), System.Data.DataRow[] GetParentRows(string relationName, System.Data.DataRowVersion version), System…
GetType Method type GetType()
HasVersion Method bool HasVersion(System.Data.DataRowVersion version)
IsNull Method bool IsNull(int columnIndex), bool IsNull(string columnName), bool IsNull(System.Data.DataColumn column), bool IsNull(System.Data.DataColumn column, System.Da…
RejectChanges Method void RejectChanges()
SetAdded Method void SetAdded()
SetColumnError Method void SetColumnError(int columnIndex, string error), void SetColumnError(string columnName, string error), void SetColumnError(System.Data.DataColumn column, s…
SetModified Method void SetModified()
SetParentRow Method void SetParentRow(System.Data.DataRow parentRow), void SetParentRow(System.Data.DataRow parentRow, System.Data.DataRelation relation)
ToString Method string ToString()
Item ParameterizedProperty System.Object Item(int columnIndex) {get;set;}, System.Object Item(string columnName) {get;set;}, System.Object Item(System.Data.DataColumn column) {get;set;}…
LastCommTime Property datetime LastCommTime {get;set;}
MachineName Property string MachineName {get;set;}
MissingUpdates Property int MissingUpdates {get;set;}