Skip to content

Commit 5cd328a

Browse files
committed
Add tags display format
1 parent 574d9da commit 5cd328a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Resources/ResourceManager/ResourceManager.format.ps1xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,10 @@
437437
<Label>ResourceId</Label>
438438
<PropertyName>Id</PropertyName>
439439
</ListItem>
440+
<ListItem>
441+
<Label>Tags</Label>
442+
<PropertyName>TagsTable</PropertyName>
443+
</ListItem>
440444
</ListItems>
441445
</ListEntry>
442446
</ListEntries>

src/Resources/ResourceManager/SdkModels/Resources/PSResource.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Resources;
1717
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions;
1818
using Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkExtensions;
19+
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
1920
using Microsoft.Azure.Management.ResourceManager.Models;
2021
using Newtonsoft.Json.Linq;
2122
using System;
@@ -63,6 +64,11 @@ public class PSResource
6364

6465
public IDictionary<string, string> Tags { get; set; }
6566

67+
public string TagsTable
68+
{
69+
get { return ResourcesExtensions.ConstructTagsTable(TagsConversionHelper.CreateTagHashtable(Tags)); }
70+
}
71+
6672
public string SubscriptionId { get; set; }
6773

6874
public DateTime? CreatedTime { get; set; }

0 commit comments

Comments
 (0)