Skip to content

Commit

Permalink
Merge pull request #45 from AzCiS/parvezah
Browse files Browse the repository at this point in the history
The formatting files for Get Task
  • Loading branch information
Sankaranarayanan Mahadevan committed Apr 10, 2015
2 parents e88b8eb + dda1e49 commit 21f4676
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ServiceManagement/Services/Commands.Utilities/Azure.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ ScriptsToProcess = @()
TypesToProcess = @(
'.\Services\Microsoft.WindowsAzure.Commands.Websites.Types.ps1xml',
'.\Sql\Microsoft.WindowsAzure.Commands.SqlDatabase.Types.ps1xml'
'.\Storage\Microsoft.WindowsAzure.Commands.Storage.Types.ps1xml'
'.\Storage\Microsoft.WindowsAzure.Commands.Storage.Types.ps1xml',
'.\StorSimple\Microsoft.WindowsAzure.Commands.StorSimple.Types.ps1xml'
)

# Format files (.ps1xml) to be loaded when importing this module
Expand All @@ -70,7 +71,8 @@ FormatsToProcess = @(
'.\Services\Microsoft.WindowsAzure.Commands.Scheduler.format.ps1xml',
'.\Compute\Microsoft.WindowsAzure.Commands.ServiceManagement.format.ps1xml',
'.\Services\Microsoft.WindowsAzure.Commands.Profile.format.ps1xml',
'.\Network\Microsoft.Azure.Commands.Network.format.ps1xml'
'.\Network\Microsoft.Azure.Commands.Network.format.ps1xml',
'.\StorSimple\Microsoft.WindowsAzure.Commands.StorSimple.format.ps1xml'
)

# Modules to import as nested modules of the module specified in ModuleToProcess
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Microsoft.WindowsAzure.Commands.StorSimple.format.ps1xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Microsoft.WindowsAzure.Commands.StorSimple.types.ps1xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="MSSharedLibKey.snk" />
<None Include="packages.config">
<SubType>Designer</SubType>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
<ViewDefinitions>
<View>
<Name>Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStatusInfo</Name>
<ViewSelectedBy>
<TypeName>Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStatusInfo</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>InstanceId</Label>
<Width>36</Width>
</TableColumnHeader>
<TableColumnHeader>
<Label>Result</Label>
<Width>16</Width>
</TableColumnHeader>
<TableColumnHeader>
<Label>Steps</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Errors</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<Wrap/>
<TableColumnItems>
<TableColumnItem>
<PropertyName>TaskId</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>AsyncTaskAggregatedResult</PropertyName>
</TableColumnItem>
<TableColumnItem>
<ScriptBlock>$_.GetSteps</ScriptBlock>
</TableColumnItem>
<TableColumnItem>
<ScriptBlock>$_.GetErrors</ScriptBlock>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStep</Name>
<ViewSelectedBy>
<TypeName>Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStep</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Message</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Message</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.WindowsAzure.Management.StorSimple.Models.ErrorDetails</Name>
<ViewSelectedBy>
<TypeName>Microsoft.WindowsAzure.Management.StorSimple.Models.ErrorDetails</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Message</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Code</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Message</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Code</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
</ViewDefinitions>
</Configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<Types>
<Type>
<Name>Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStatusInfo</Name>
<Members>
<ScriptProperty>
<Name>GetSteps</Name>
<GetScriptBlock>if( ($_.TaskSteps | Select Message -ExpandProperty Message) -ne $null ) { [string]::Join(" `n", ($_.TaskSteps | Select -ExpandProperty Message)) } else { "No Steps" }</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>GetErrors</Name>
<GetScriptBlock>if( ($_.Error | Select Message -ExpandProperty Message) -ne $null ) { [string]::Join(" `n", ($_.Error | Select -ExpandProperty Message)) } else { "No Errors" }</GetScriptBlock>
</ScriptProperty>
</Members>
</Type>
</Types>

0 comments on commit 21f4676

Please sign in to comment.