Skip to content

Commit 54abecd

Browse files
sg00dwinf0x11
authored andcommitted
Update table label filter to reuse data-toolbar data-toolbar-filter and extend on top of table
Fixes openshift#1824
1 parent 1c4f962 commit 54abecd

File tree

4 files changed

+80
-25
lines changed

4 files changed

+80
-25
lines changed

app/views/browse/build-config.html

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -314,19 +314,15 @@ <h4>{{imageSource.from | imageObjectRef : buildConfig.metadata.namespace}}</h4>
314314
</span>
315315
</dd>
316316
</div>
317-
<div class="run-policy">
318-
<dt translate>Run Policy:</dt>
319-
<dd>
320-
{{buildConfig.spec.runPolicy | sentenceCase}}
321-
<span class="help action-inline">
322-
<a href ng-switch="buildConfig.spec.runPolicy">
323-
<i ng-switch-when="Serial" class="pficon pficon-help" data-toggle="tooltip" aria-hidden="true" data-original-title="{{'Builds triggered from this Build Configuration will run one at the time, in the order they have been triggered.'|translate}}"></i>
324-
<i ng-switch-when="Parallel" class="pficon pficon-help" data-toggle="tooltip" aria-hidden="true" data-original-title="{{'Builds triggered from this Build Configuration will run all at the same time. The order in which they will finish is not guaranteed.'|translate}}"></i>
325-
<i ng-switch-when="SerialLatestOnly" class="pficon pficon-help" data-toggle="tooltip" aria-hidden="true" data-original-title="{{'Builds triggered from this Build Configuration will run one at the time. When a currently running build completes, the next build that will run is the latest build created. Other queued builds will be cancelled.'|translate}}"></i>
326-
<i ng-switch-default class="pficon pficon-help" data-toggle="tooltip" aria-hidden="true" data-original-title="Builds triggered from this Build Configuration will run using the {{buildConfig.spec.runPolicy | sentenceCase}} policy."></i>
327-
</a>
328-
</span>
329-
</dd>
317+
<build-trends-chart builds="builds"></build-trends-chart>
318+
</div>
319+
<div ng-if="loaded && (unfilteredBuilds | hashSize) > 0" class="mar-bottom-xl">
320+
<div class="table-filter-extension">
321+
<div class="data-toolbar">
322+
<div class="data-toolbar-filter">
323+
<project-filter></project-filter>
324+
</div>
325+
</div>
330326
</div>
331327
<!-- Put the field values that use full editors last so that they don't interrupt the flow of other <dl> items. -->
332328
<div ng-if="buildConfig.spec.source.dockerfile">

app/views/browse/deployment-config.html

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -159,18 +159,61 @@ <h1 class="contains-actions">
159159
</span>
160160
<!-- TODO would be nice to have the deploymentStatusReason in a popup, when there is one -->
161161
</div>
162-
</td>
163-
<td data-title="{{'Created'|translate}}">
164-
<span am-time-ago="deployment.metadata.creationTimestamp"></span>
165-
</td>
166-
<td data-title="{{'Trigger'|translate}}">
167-
<span ng-if="!deployment.causes.length" translate>Unknown</span>
168-
<span ng-if="deployment.causes.length">
169-
<span ng-repeat="cause in deployment.causes">
170-
<span ng-switch="cause.type">
171-
<span ng-switch-when="ImageChange">
172-
<span ng-if="cause.imageTrigger.from">
173-
<abbr title="{{cause.imageTrigger.from | imageObjectRef : null : true}}" translate>Image</abbr> <translate>change</translate>
162+
</div>
163+
<div class="table-filter-extension">
164+
<div class="data-toolbar">
165+
<div class="data-toolbar-filter">
166+
<project-filter></project-filter>
167+
</div>
168+
</div>
169+
</div>
170+
<table class="table table-bordered table-hover table-mobile">
171+
<thead>
172+
<tr>
173+
<th translate>Deployment</th>
174+
<th translate>Status</th>
175+
<th translate>Created</th>
176+
<th translate>Trigger</th>
177+
</tr>
178+
</thead>
179+
<tbody ng-if="(deployments | hashSize) == 0">
180+
<tr><td colspan="4"><em>{{emptyMessage}}</em></td></tr>
181+
</tbody>
182+
<tbody ng-if="(deployments | hashSize) > 0">
183+
<tr ng-repeat="deployment in orderedDeployments">
184+
<td data-title="Deployment">
185+
<!-- Deployment number and link -->
186+
<span ng-if="deployment | annotation : 'deploymentVersion'">
187+
<a ng-href="{{deployment | navigateResourceURL}}">#{{deployment | annotation : 'deploymentVersion'}}</a>
188+
<span ng-if="deploymentConfig.status.latestVersion == (deployment | annotation : 'deploymentVersion')">(latest)</span>
189+
</span>
190+
</td>
191+
<td data-title="Status">
192+
<div row class="status">
193+
<status-icon status="deployment | deploymentStatus" disable-animation></status-icon>
194+
<span flex>
195+
{{deployment | deploymentStatus}}<span ng-if="(deployment | deploymentStatus) == 'Active' || (deployment | deploymentStatus) == 'Running'">,
196+
<span ng-if="deployment.spec.replicas !== deployment.status.replicas">{{deployment.status.replicas}}/</span>{{deployment.spec.replicas}} replica<span ng-if="deployment.spec.replicas != 1">s</span></span>
197+
</span>
198+
<!-- TODO would be nice to have the deploymentStatusReason in a popup, when there is one -->
199+
</div>
200+
</td>
201+
<td data-title="Created">
202+
<span am-time-ago="deployment.metadata.creationTimestamp"></span>
203+
</td>
204+
<td data-title="Trigger">
205+
<span ng-if="!deployment.causes.length" translate>Unknown</span>
206+
<span ng-if="deployment.causes.length">
207+
<span ng-repeat="cause in deployment.causes">
208+
<span ng-switch="cause.type">
209+
<span ng-switch-when="ImageChange">
210+
<span ng-if="cause.imageTrigger.from">
211+
<abbr title="{{cause.imageTrigger.from | imageObjectRef : null : true}}" translate>Image</abbr> change
212+
</span>
213+
</span>
214+
<span ng-switch-when="ConfigChange" translate>Config change</span>
215+
<span ng-switch-default>{{cause.type}}</span>
216+
</span>
174217
</span>
175218
</span>
176219
<span ng-switch-when="ConfigChange" translate>Config change</span>

dist/scripts/templates.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,11 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
17641764
"</div>\n" +
17651765
"</div>\n" +
17661766
"</div>\n" +
1767+
<<<<<<< db7101402b68a3d5a346780fc9c59e440358d1fa
17671768
"<table ng-if=\"!(buildConfig | isJenkinsPipelineStrategy)\" class=\"table table-bordered table-mobile\">\n" +
1769+
=======
1770+
"<table ng-if=\"!(buildConfig | isJenkinsPipelineStrategy)\" class=\"table table-bordered table-hover table-mobile\">\n" +
1771+
>>>>>>> Update table label filter to reuse data-toolbar data-toolbar-filter and extend on top of table
17681772
"<thead>\n" +
17691773
"<tr>\n" +
17701774
"<th translate>Build</th>\n" +
@@ -2419,7 +2423,11 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
24192423
"</div>\n" +
24202424
"</div>\n" +
24212425
"</div>\n" +
2426+
<<<<<<< db7101402b68a3d5a346780fc9c59e440358d1fa
24222427
"<table class=\"table table-bordered table-mobile\">\n" +
2428+
=======
2429+
"<table class=\"table table-bordered table-hover table-mobile\">\n" +
2430+
>>>>>>> Update table label filter to reuse data-toolbar data-toolbar-filter and extend on top of table
24232431
"<thead>\n" +
24242432
"<tr>\n" +
24252433
"<th translate>Deployment</th>\n" +

dist/scripts/vendor.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36756,12 +36756,20 @@ b.$el ? b.$el.empty() : b.$el = this._newNodeEl(b, c).addClass("node-" + this._e
3675636756
b.$el.attr("data-" + a, c);
3675736757
}), b.$el.attr("data-nodeId", b.nodeId), b.tooltip && b.$el.attr("title", b.tooltip);
3675836758
for (var e = 0; e < b.level - 1; e++) b.$el.append(this._template.indent.clone());
36759+
<<<<<<< db7101402b68a3d5a346780fc9c59e440358d1fa
3675936760
if (b.$el.append(b.nodes || b.lazyLoad ? this._template.icon.expand.clone() : this._template.icon.empty.clone()), this._options.checkboxFirst ? (this._addCheckbox(b), this._addIcon(b), this._addImage(b)) : (this._addIcon(b), this._addImage(b), this._addCheckbox(b)), this._options.wrapNodeText) {
36761+
=======
36762+
if (b.$el.append(b.nodes || b.lazyLoad ? this._template.icon.expand.clone() :this._template.icon.empty.clone()), this._options.checkboxFirst ? (this._addCheckbox(b), this._addIcon(b), this._addImage(b)) :(this._addIcon(b), this._addImage(b), this._addCheckbox(b)), this._options.wrapNodeText) {
36763+
>>>>>>> Update table label filter to reuse data-toolbar data-toolbar-filter and extend on top of table
3676036764
var g = this._template.text.clone();
3676136765
b.$el.append(g), g.append(b.text);
3676236766
} else b.$el.append(b.text);
3676336767
this._options.showTags && b.tags && a.each(b.tags, a.proxy(function(a, c) {
36768+
<<<<<<< db7101402b68a3d5a346780fc9c59e440358d1fa
3676436769
b.$el.append(this._template.badge.clone().addClass(("object" == typeof c ? c["class"] : d) || b.tagsClass || this._options.tagsClass).append(("object" == typeof c ? c.text : d) || c));
36770+
=======
36771+
b.$el.append(this._template.badge.clone().addClass(("object" == typeof c ? c["class"] :d) || b.tagsClass || this._options.tagsClass).append(("object" == typeof c ? c.text :d) || c));
36772+
>>>>>>> Update table label filter to reuse data-toolbar data-toolbar-filter and extend on top of table
3676536773
}, this)), this._setSelected(b, b.state.selected), this._setChecked(b, b.state.checked), this._setSearchResult(b, b.searchResult), this._setExpanded(b, b.state.expanded), this._setDisabled(b, b.state.disabled), this._setVisible(b, b.state.visible), this._triggerEvent("nodeRendered", b, f.options);
3676636774
}
3676736775
}, g.prototype._addCheckbox = function(a) {

0 commit comments

Comments
 (0)