forked from atkinsroy/HPESimpliVity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHPESimpliVity.Backup.Format.ps1xml
117 lines (117 loc) · 5.37 KB
/
HPESimpliVity.Backup.Format.ps1xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
<ViewDefinitions>
<View>
<Name>SvtBackupTable</Name>
<ViewSelectedBy>
<TypeName>HPE.SimpliVity.Backup</TypeName>
</ViewSelectedBy>
<TableControl>
<AutoSize />
<TableHeaders>
<TableColumnHeader>
<Label>BackupName</Label>
<Width>25</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>VmName</Label>
<Width>40</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>CreateDate</Label>
<Width>22</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>ExpiryDate</Label>
<Width>22</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>BackupState</Label>
<Width>12</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>DatastoreName</Label>
<Width>20</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>DestinationName</Label>
<Width>20</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>SizeGB</Label>
<Width>10</Width>
<Alignment>right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>SentMb</Label>
<Width>6</Width>
<Alignment>right</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>SentDuration</Label>
<Width>12</Width>
<Alignment>right</Alignment>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>BackupName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>VmName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>CreateDate</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>ExpiryDate</PropertyName>
</TableColumnItem>
<TableColumnItem>
<!--PropertyName>BackupState</PropertyName-->
<ScriptBlock>
if ($host.name -match 'Console' -and $_.BackupState -ne "PROTECTED") {
Switch ($_.BackupState) {
"FAILED" {$ansi = "[38;5;9m"} #8bit red
default {$ansi = "[38;5;11m"} #8bit yellow
}
"$([char]27)$ansi$($_.BackupState)$([char]27)[0m"
}
else {
$_.BackupState
}
</ScriptBlock>
</TableColumnItem>
<TableColumnItem>
<PropertyName>DatastoreName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>DestinationName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>SizeGB</PropertyName>
<FormatString>{0:N2}</FormatString>
</TableColumnItem>
<TableColumnItem>
<PropertyName>SentMb</PropertyName>
<FormatString>{0:N0}</FormatString>
</TableColumnItem>
<TableColumnItem>
<PropertyName>SentDuration</PropertyName>
<FormatString>{0:N0}</FormatString>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
</ViewDefinitions>
</Configuration>