@@ -132,6 +132,7 @@ public partial class MainForm : Form
132132 SubscriptionTags,
133133 ResourceGroupTags = ResourceGroupTags_dynamic,
134134 ResourceTags = ResourceTags_dynamic
135+ | extend CombinedTags = bag_merge(ResourceTags, ResourceGroupTags, SubscriptionTags)
135136| order by EntityType desc, (tolower(SubscriptionName)) asc, (tolower(ResourceGroup)) asc, (tolower(ResourceName)) asc
136137" ;
137138
@@ -808,7 +809,7 @@ private async void MenuItem_RefreshTags_Click(object sender, EventArgs e)
808809 . ToList ( ) ;
809810
810811 var resourceIds = string . Join ( ", " , selectedResources . Select ( r => $ "'{ r . Id } '") ) ;
811- var query = _baseQuery + $@ "| where Id in ({ resourceIds } ) | project Id, SubscriptionTags, ResourceGroupTags, ResourceTags";
812+ var query = _baseQuery + $@ "| where Id in ({ resourceIds } ) | project Id, SubscriptionTags, ResourceGroupTags, ResourceTags, CombinedTags ";
812813
813814 var updatedResources = await _azureService . QueryResourcesAsync ( query ) ;
814815
@@ -820,6 +821,7 @@ private async void MenuItem_RefreshTags_Click(object sender, EventArgs e)
820821 localResource . SubscriptionTags = updatedResource . SubscriptionTags ;
821822 localResource . ResourceGroupTags = updatedResource . ResourceGroupTags ;
822823 localResource . ResourceTags = updatedResource . ResourceTags ;
824+ localResource . CombinedTags = updatedResource . CombinedTags ;
823825 }
824826 }
825827
@@ -996,7 +998,8 @@ private void DataGridView_Results_CellMouseEnter(object sender, DataGridViewCell
996998 if ( column != null &&
997999 column . DataPropertyName == "ResourceTags" ||
9981000 column . DataPropertyName == "ResourceGroupTags" ||
999- column . DataPropertyName == "SubscriptionTags" )
1001+ column . DataPropertyName == "SubscriptionTags" ||
1002+ column . DataPropertyName == "CombinedTags" )
10001003 {
10011004 _currentCellEventArgs = e ;
10021005 _tooltipTimer . Start ( ) ;
@@ -1039,7 +1042,8 @@ private void ToolTipTimer_Tick(object sender, EventArgs e)
10391042 var column = _gvwResults . Columns [ cellEventArgs . ColumnIndex ] ;
10401043 if ( column . DataPropertyName == "ResourceTags" ||
10411044 column . DataPropertyName == "ResourceGroupTags" ||
1042- column . DataPropertyName == "SubscriptionTags" )
1045+ column . DataPropertyName == "SubscriptionTags" ||
1046+ column . DataPropertyName == "CombinedTags" )
10431047 {
10441048 var tags = cell . Value as IDictionary < string , string > ;
10451049 if ( tags != null && tags . Count > 0 )
@@ -1108,7 +1112,8 @@ private void DataGridView_Results_ColumnHeaderMouseDoubleClick(object sender, Da
11081112 {
11091113 if ( columnName == "ResourceTags" ||
11101114 columnName == "ResourceGroupTags" ||
1111- columnName == "SubscriptionTags" )
1115+ columnName == "SubscriptionTags" ||
1116+ columnName == "CombinedTags" )
11121117 {
11131118 var queryText = $ "| where { columnName } [''] =~ ''";
11141119 _txtSearchQuery . Text = queryText ;
0 commit comments