Skip to content

Commit 5112f74

Browse files
authored
Merge pull request #7755 from maddieclayton/profileformat
Add table format to Profile
2 parents 90802b5 + a57576c commit 5112f74

17 files changed

+331
-343
lines changed

src/ResourceManager/Profile/Commands.Profile/Az.Profile.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ RequiredAssemblies = '.\Microsoft.Azure.PowerShell.Authentication.Abstractions.d
8484
TypesToProcess = '.\Microsoft.Azure.Commands.Profile.types.ps1xml'
8585

8686
# Format files (.ps1xml) to be loaded when importing this module
87-
FormatsToProcess = '.\Microsoft.Azure.Commands.Profile.format.ps1xml'
87+
FormatsToProcess = @('.\Microsoft.Azure.Commands.Profile.format.ps1xml', '.\Microsoft.Azure.Commands.Profile.generated.format.ps1xml')
8888

8989
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
9090
NestedModules = @('.\Microsoft.Azure.Commands.Profile.dll')

src/ResourceManager/Profile/Commands.Profile/AzureRM.Profile.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ RequiredAssemblies =
9292
TypesToProcess = '.\Microsoft.Azure.Commands.Profile.types.ps1xml'
9393

9494
# Format files (.ps1xml) to be loaded when importing this module
95-
FormatsToProcess = '.\Microsoft.Azure.Commands.Profile.format.ps1xml'
95+
FormatsToProcess = @('.\Microsoft.Azure.Commands.Profile.format.ps1xml', '.\Microsoft.Azure.Commands.Profile.generated.format.ps1xml')
9696

9797
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
9898
NestedModules = @('.\Microsoft.Azure.Commands.Profile.dll')

src/ResourceManager/Profile/Commands.Profile/Commands.Profile.Netcore.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
<None Update="Microsoft.Azure.Commands.Profile.format.ps1xml">
7474
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
7575
</None>
76+
<None Update="Microsoft.Azure.Commands.Profile.generated.format.ps1xml">
77+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
78+
</None>
7679
<None Update="Microsoft.Azure.Commands.Profile.types.ps1xml">
7780
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
7881
</None>

src/ResourceManager/Profile/Commands.Profile/Commands.Profile.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@
104104
<SubType>Designer</SubType>
105105
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
106106
</Content>
107+
<Content Include="Microsoft.Azure.Commands.Profile.generated.format.ps1xml">
108+
<SubType>Designer</SubType>
109+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
110+
</Content>
107111
<None Include="AzureRM.Profile.psd1">
108112
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
109113
</None>

src/ResourceManager/Profile/Commands.Profile/Microsoft.Azure.Commands.Profile.format.ps1xml

Lines changed: 0 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -11,131 +11,6 @@
1111
</SelectionSet>
1212
</SelectionSets>
1313
<ViewDefinitions>
14-
<View>
15-
<Name>Microsoft.Azure.Commands.Profile.Models.PSAzureProfile</Name>
16-
<ViewSelectedBy>
17-
<TypeName>Microsoft.Azure.Commands.Profile.Models.PSAzureProfile</TypeName>
18-
</ViewSelectedBy>
19-
<ListControl>
20-
<ListEntries>
21-
<ListEntry>
22-
<ListItems>
23-
<ListItem>
24-
<Label>Account</Label>
25-
<ScriptBlock>$_.Context.Account.ToString()</ScriptBlock>
26-
</ListItem>
27-
<ListItem>
28-
<Label>SubscriptionName</Label>
29-
<ScriptBlock>$_.Context.Subscription.Name</ScriptBlock>
30-
</ListItem>
31-
<ListItem>
32-
<Label>SubscriptionId</Label>
33-
<ScriptBlock>$_.Context.Subscription.ToString()</ScriptBlock>
34-
</ListItem>
35-
<ListItem>
36-
<ItemSelectionCondition>
37-
<ScriptBlock>$_.Context.Subscription -ne $null -and $_.Context.Subscription.CurrentStorageAccountName -ne $null</ScriptBlock>
38-
</ItemSelectionCondition>
39-
<Label>CurrentStorageAccount</Label>
40-
<ScriptBlock>$_.Context.Subscription.CurrentStorageAccountName</ScriptBlock>
41-
</ListItem>
42-
<ListItem>
43-
<Label>TenantId</Label>
44-
<ScriptBlock>$_.Context.Tenant.ToString()</ScriptBlock>
45-
</ListItem>
46-
<ListItem>
47-
<Label>Environment</Label>
48-
<ScriptBlock>$_.Context.Environment.ToString()</ScriptBlock>
49-
</ListItem>
50-
</ListItems>
51-
</ListEntry>
52-
</ListEntries>
53-
</ListControl>
54-
</View>
55-
<View>
56-
<Name>Microsoft.Azure.Commands.Profile.Models.PSAzureContext</Name>
57-
<ViewSelectedBy>
58-
<TypeName>Microsoft.Azure.Commands.Profile.Models.PSAzureContext</TypeName>
59-
</ViewSelectedBy>
60-
<ListControl>
61-
<ListEntries>
62-
<ListEntry>
63-
<ListItems>
64-
<ListItem>
65-
<PropertyName>Name</PropertyName>
66-
</ListItem>
67-
<ListItem>
68-
<PropertyName>Account</PropertyName>
69-
</ListItem>
70-
<ListItem>
71-
<Label>SubscriptionName</Label>
72-
<ScriptBlock>$_.Subscription.Name</ScriptBlock>
73-
</ListItem>
74-
<ListItem>
75-
<ItemSelectionCondition>
76-
<ScriptBlock>$_.Subscription -ne $null -and $_.Subscription.CurrentStorageAccountName -ne $null</ScriptBlock>
77-
</ItemSelectionCondition>
78-
<Label>CurrentStorageAccount</Label>
79-
<ScriptBlock>$_.Subscription.CurrentStorageAccountName</ScriptBlock>
80-
</ListItem>
81-
<ListItem>
82-
<Label>TenantId</Label>
83-
<ScriptBlock>$_.Tenant.ToString()</ScriptBlock>
84-
</ListItem>
85-
<ListItem>
86-
<PropertyName>Environment</PropertyName>
87-
</ListItem>
88-
</ListItems>
89-
</ListEntry>
90-
</ListEntries>
91-
</ListControl>
92-
</View>
93-
<View>
94-
<Name>Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription</Name>
95-
<ViewSelectedBy>
96-
<TypeName>Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription</TypeName>
97-
</ViewSelectedBy>
98-
<ListControl>
99-
<ListEntries>
100-
<ListEntry>
101-
<ListItems>
102-
<ListItem>
103-
<PropertyName>Name</PropertyName>
104-
</ListItem>
105-
<ListItem>
106-
<PropertyName>Id</PropertyName>
107-
</ListItem>
108-
<ListItem>
109-
<PropertyName>TenantId</PropertyName>
110-
</ListItem>
111-
<ListItem>
112-
<PropertyName>State</PropertyName>
113-
</ListItem>
114-
</ListItems>
115-
</ListEntry>
116-
</ListEntries>
117-
</ListControl>
118-
</View>
119-
<View>
120-
<Name>Microsoft.Azure.Commands.Profile.Models.PSAzureTenant</Name>
121-
<ViewSelectedBy>
122-
<TypeName>Microsoft.Azure.Commands.Profile.Models.PSAzureTenant</TypeName>
123-
</ViewSelectedBy>
124-
<ListControl>
125-
<ListEntries>
126-
<ListEntry>
127-
<ListItems>
128-
<ListItem>
129-
<PropertyName>Id</PropertyName>
130-
</ListItem>
131-
<ListItem>
132-
<PropertyName>Directory</PropertyName>
133-
</ListItem>
134-
</ListItems>
135-
</ListEntry>
136-
</ListEntries>
137-
</ListControl>
138-
</View>
13914
<View>
14015
<Name>Microsoft.Azure.Commands.Profile.Errors.AzureRestExceptionRecord</Name>
14116
<ViewSelectedBy>

0 commit comments

Comments
 (0)