File tree Expand file tree Collapse file tree 3 files changed +49
-7
lines changed
AzureDevOpsTeamMembersVelocity/Pages Expand file tree Collapse file tree 3 files changed +49
-7
lines changed Original file line number Diff line number Diff line change @@ -363,4 +363,6 @@ certs/
363
363
364
364
coverage.cobertura.xml
365
365
366
- AzureDevOpsTeamMembersVelocity_ * .log
366
+ AzureDevOpsTeamMembersVelocity_ * .log
367
+
368
+ .vscode /
Original file line number Diff line number Diff line change 106
106
<hr />
107
107
108
108
<div class =" row" >
109
- <button class =" btn btn-primary"
110
- type =" button"
111
- @onclick =' () => Collapsing("collapsePods")' >
112
- Pods
113
- </button >
109
+ <div class =" col-1" >
110
+ <button class =" btn btn-primary"
111
+ type =" button"
112
+ @onclick =' () => Collapsing("collapsePods")' >
113
+ Pods
114
+ </button >
115
+ </div >
116
+ <div class =" col-11 @Settings.PodsCollapseClass" >
117
+ <div class =" input-group mb-3" >
118
+ <input id =" search-pods"
119
+ type =" text"
120
+ class =" form-control"
121
+ placeholder =" Search pods"
122
+ @bind =" SearchPods" />
123
+ <div class =" input-group-append" >
124
+ <button class =" btn btn-outline-secondary"
125
+ type =" button"
126
+ @onclick =" () => ClearSearchPods()" >
127
+ Clear
128
+ </button >
129
+ </div >
130
+ </div >
131
+ </div >
114
132
</div >
115
133
116
134
<div class =" @Settings.PodsCollapseClass" id =" collapsePods" >
127
145
</tr >
128
146
</thead >
129
147
<tbody >
130
- @foreach ( var pod in Pods .Values )
148
+ @foreach ( var pod in Pods .Values . Where ( p => SearchPods == " " || p . Name () ? . Contains ( SearchPods , StringComparison . InvariantCulture ) == true ) )
131
149
{
132
150
var podNamespace = pod .Namespace ();
133
151
var podName = pod .Name ();
Original file line number Diff line number Diff line change @@ -621,5 +621,27 @@ public void Collapsing(string collapseId)
621
621
622
622
UserPreference . SetAsync ( Settings ) ;
623
623
}
624
+
625
+ /// <summary>
626
+ /// Property use to filter the pods table
627
+ /// </summary>
628
+ public string SearchPods { get ; set ; } = string . Empty ;
629
+
630
+ /// <summary>
631
+ /// Set the search pods property to empty string
632
+ /// </summary>
633
+ public void ClearSearchPods ( )
634
+ {
635
+ SearchPods = string . Empty ;
636
+ }
637
+
638
+ /// <summary>
639
+ /// Append when user type in the search pods input
640
+ /// </summary>
641
+ public Task OnSearchPods ( ChangeEventArgs args )
642
+ {
643
+ SearchPods = args . Value ? . ToString ( ) ?? string . Empty ;
644
+ return Task . CompletedTask ;
645
+ }
624
646
}
625
647
}
You can’t perform that action at this time.
0 commit comments