Skip to content

Commit

Permalink
Add message when search no result and fix #41
Browse files Browse the repository at this point in the history
  • Loading branch information
tobegit3hub committed Mar 25, 2015
1 parent bd0b4ae commit 1fe4705
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions static/html/containers.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ <h1 class="page-header-left">{{'containers'|translate}} <a ng-href="{{canonicalS
</thead>

<tbody>
<!-- When search result is null, display the message -->
<tr ng-show="(containers | filter: search).length == 0">
<td colspan="7" align="center">No search result for <b style="color:blue">{{search}}</b></td>
</tr>

<tr ng-repeat="container in containers | filter: search | orderBy:predicate:reverse track by $index">
<td><a ng-href="/containers/{{container.Id}}">{{container.Id | limitTo:12}}</a></td> <!-- Shorten container id -->
<td class="wrap-td" title="{{container.Names | array_to_string}}">{{container.Names | array_to_string}}</td> <!-- Add comma between names -->
Expand Down
5 changes: 5 additions & 0 deletions static/html/dockerhub.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ <h1 class="page-header-left">{{'dockerhub'|translate}} <a ng-href="{{canonicalSe
</thead>

<tbody>
<!-- When search result is null, display the message -->
<tr ng-show="(images | filter: search).length == 0">
<td colspan="7" align="center">No search result</td>
</tr>

<tr ng-repeat="image in images track by $index">
<td><a ng-href="{{getImageLink(image.name)}}" target="_blank">{{image.name}}</a></td>
<td>{{image.description}}</td>
Expand Down
5 changes: 5 additions & 0 deletions static/html/images.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ <h1 class="page-header-left">{{'images'|translate}} <a ng-href="{{canonicalServe
</thead>

<tbody>
<!-- When search result is null, display the message -->
<tr ng-show="(images | filter: search).length == 0">
<td colspan="7" align="center">No search result for <b style="color:blue">{{search}}</b></td>
</tr>

<tr ng-repeat="image in images | filter: search | orderBy:predicate:reverse track by $index ">
<td><a ng-href="/images/{{image.Id}}">{{image.Id | limitTo:12}}</a></td> <!-- Shorten image id -->
<td>{{image.RepoTags | array_to_string}}</td> <!-- Add comma between tags -->
Expand Down

0 comments on commit 1fe4705

Please sign in to comment.