Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address tag display on query list page #2803

Merged
merged 4 commits into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion client/app/assets/less/inc/list-group.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
}
}

.list-group-item {
.max-character {
.text-overflow();
}
arikfr marked this conversation as resolved.
Show resolved Hide resolved

.list-group-item {
&.active {
button {
color: white;
Expand Down
10 changes: 10 additions & 0 deletions client/app/assets/less/redash/redash-newstyle.less
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,20 @@ page-header, .page-header--new {
background: fade(@redash-gray, 85%);
}

.label-default-unpublished {
background: fade(@redash-gray, 85%);
display: inline-block;
overflow: hidden;
}

.label-tag {
background: fade(@redash-gray, 10%);
color: fade(@redash-gray, 75%);
margin-right: 3px;
display: inline-block;
margin-top: 2px;
max-width: 24ch;
.text-overflow();
}

.tab-nav > li > a {
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/tags-control/control-template.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span class="label label-tag" ng-repeat="tag in $ctrl.item.tags">{{ tag }}</span
<span class="label label-tag" ng-repeat="tag in $ctrl.item.tags" title="{{tag}}">{{ tag }}</span
><a ng-if="$ctrl.canEdit && $ctrl.item.tags.length == 0" class="label label-tag"
ng-click="$ctrl.editTags()"><i class="zmdi zmdi-plus"></i> Add tag</a
><a ng-if="$ctrl.canEdit && $ctrl.item.tags.length > 0" class="label label-tag"
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/tags-list/tags-list.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="list-group m-t-10 tags-list tiled" ng-if="$ctrl.allTags.length > 0">
<a ng-repeat="tag in $ctrl.allTags" ng-class="{active: $ctrl.selectedTags.has(tag.name)}" class="list-group-item" ng-click="$ctrl.toggleTag($event, tag.name)">
<a ng-repeat="tag in $ctrl.allTags" ng-class="{active: $ctrl.selectedTags.has(tag.name)}" class="list-group-item max-character" ng-click="$ctrl.toggleTag($event, tag.name)" title="{{tag.name}}">
{{ tag.name }} <span class="badge badge-light">{{ tag.count }}</span>
</a>
</div>
15 changes: 8 additions & 7 deletions client/app/pages/queries-list/queries-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,17 @@
<td class="table-main-title">
<a href="queries/{{query.id}}">{{query.name}}</a>
<br>
<span class="label label-default" ng-if="query.is_draft">Unpublished</span>
<tags-control item="query"></tags-control>
<span>
<span class="label label-default-unpublished" ng-if="query.is_draft">Unpublished</span> <tags-control item="query"></tags-control>
</span>
</td>
<td class="p-r-0">
<td class="p-r-0 text-nowrap">
<img ng-src="{{query.user.profile_image_url}}" class="profile__image_thumb" title="Created by {{query.user.name}}" />
</td>
<td>{{query.created_at | dateTime}}</td>
<td>{{query.runtime | durationHumanize}}</td>
<td>{{query.retrieved_at | dateTime}}</td>
<td>{{query.schedule | scheduleHumanize}}</td>
<td class="text-nowrap">{{query.created_at | dateTime}}</td>
<td class="text-nowrap">{{query.runtime | durationHumanize}}</td>
<td class="text-nowrap">{{query.retrieved_at | dateTime}}</td>
<td class="text-nowrap">{{query.schedule | scheduleHumanize}}</td>
</tr>
</tbody>
</table>
Expand Down