61 changed files with 1596 additions and 385 deletions
@ -0,0 +1,122 @@ |
|||
/** |
|||
* Copyright © 2016-2017 The Thingsboard Authors |
|||
* |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); |
|||
* you may not use this file except in compliance with the License. |
|||
* You may obtain a copy of the License at |
|||
* |
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
|||
* |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, |
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
* See the License for the specific language governing permissions and |
|||
* limitations under the License. |
|||
*/ |
|||
package org.thingsboard.server.common.data; |
|||
|
|||
import org.thingsboard.server.common.data.id.CustomerId; |
|||
import org.thingsboard.server.common.data.id.DashboardId; |
|||
import org.thingsboard.server.common.data.id.TenantId; |
|||
|
|||
public class DashboardInfo extends SearchTextBased<DashboardId> { |
|||
|
|||
private TenantId tenantId; |
|||
private CustomerId customerId; |
|||
private String title; |
|||
|
|||
public DashboardInfo() { |
|||
super(); |
|||
} |
|||
|
|||
public DashboardInfo(DashboardId id) { |
|||
super(id); |
|||
} |
|||
|
|||
public DashboardInfo(DashboardInfo dashboardInfo) { |
|||
super(dashboardInfo); |
|||
this.tenantId = dashboardInfo.getTenantId(); |
|||
this.customerId = dashboardInfo.getCustomerId(); |
|||
this.title = dashboardInfo.getTitle(); |
|||
} |
|||
|
|||
public TenantId getTenantId() { |
|||
return tenantId; |
|||
} |
|||
|
|||
public void setTenantId(TenantId tenantId) { |
|||
this.tenantId = tenantId; |
|||
} |
|||
|
|||
public CustomerId getCustomerId() { |
|||
return customerId; |
|||
} |
|||
|
|||
public void setCustomerId(CustomerId customerId) { |
|||
this.customerId = customerId; |
|||
} |
|||
|
|||
public String getTitle() { |
|||
return title; |
|||
} |
|||
|
|||
public void setTitle(String title) { |
|||
this.title = title; |
|||
} |
|||
|
|||
@Override |
|||
public String getSearchText() { |
|||
return title; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
final int prime = 31; |
|||
int result = super.hashCode(); |
|||
result = prime * result + ((customerId == null) ? 0 : customerId.hashCode()); |
|||
result = prime * result + ((tenantId == null) ? 0 : tenantId.hashCode()); |
|||
result = prime * result + ((title == null) ? 0 : title.hashCode()); |
|||
return result; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object obj) { |
|||
if (this == obj) |
|||
return true; |
|||
if (!super.equals(obj)) |
|||
return false; |
|||
if (getClass() != obj.getClass()) |
|||
return false; |
|||
DashboardInfo other = (DashboardInfo) obj; |
|||
if (customerId == null) { |
|||
if (other.customerId != null) |
|||
return false; |
|||
} else if (!customerId.equals(other.customerId)) |
|||
return false; |
|||
if (tenantId == null) { |
|||
if (other.tenantId != null) |
|||
return false; |
|||
} else if (!tenantId.equals(other.tenantId)) |
|||
return false; |
|||
if (title == null) { |
|||
if (other.title != null) |
|||
return false; |
|||
} else if (!title.equals(other.title)) |
|||
return false; |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder builder = new StringBuilder(); |
|||
builder.append("DashboardInfo [tenantId="); |
|||
builder.append(tenantId); |
|||
builder.append(", customerId="); |
|||
builder.append(customerId); |
|||
builder.append(", title="); |
|||
builder.append(title); |
|||
builder.append("]"); |
|||
return builder.toString(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,53 @@ |
|||
/** |
|||
* Copyright © 2016-2017 The Thingsboard Authors |
|||
* |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); |
|||
* you may not use this file except in compliance with the License. |
|||
* You may obtain a copy of the License at |
|||
* |
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
|||
* |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, |
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
* See the License for the specific language governing permissions and |
|||
* limitations under the License. |
|||
*/ |
|||
package org.thingsboard.server.dao.dashboard; |
|||
|
|||
import java.util.List; |
|||
import java.util.UUID; |
|||
|
|||
import org.thingsboard.server.common.data.Dashboard; |
|||
import org.thingsboard.server.common.data.page.TextPageLink; |
|||
import org.thingsboard.server.dao.Dao; |
|||
import org.thingsboard.server.dao.model.DashboardEntity; |
|||
import org.thingsboard.server.dao.model.DashboardInfoEntity; |
|||
|
|||
/** |
|||
* The Interface DashboardInfoDao. |
|||
* |
|||
* @param <T> the generic type |
|||
*/ |
|||
public interface DashboardInfoDao extends Dao<DashboardInfoEntity> { |
|||
|
|||
/** |
|||
* Find dashboards by tenantId and page link. |
|||
* |
|||
* @param tenantId the tenantId |
|||
* @param pageLink the page link |
|||
* @return the list of dashboard objects |
|||
*/ |
|||
List<DashboardInfoEntity> findDashboardsByTenantId(UUID tenantId, TextPageLink pageLink); |
|||
|
|||
/** |
|||
* Find dashboards by tenantId, customerId and page link. |
|||
* |
|||
* @param tenantId the tenantId |
|||
* @param customerId the customerId |
|||
* @param pageLink the page link |
|||
* @return the list of dashboard objects |
|||
*/ |
|||
List<DashboardInfoEntity> findDashboardsByTenantIdAndCustomerId(UUID tenantId, UUID customerId, TextPageLink pageLink); |
|||
|
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
/** |
|||
* Copyright © 2016-2017 The Thingsboard Authors |
|||
* |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); |
|||
* you may not use this file except in compliance with the License. |
|||
* You may obtain a copy of the License at |
|||
* |
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
|||
* |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, |
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
* See the License for the specific language governing permissions and |
|||
* limitations under the License. |
|||
*/ |
|||
package org.thingsboard.server.dao.dashboard; |
|||
|
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Component; |
|||
import org.thingsboard.server.common.data.page.TextPageLink; |
|||
import org.thingsboard.server.dao.AbstractSearchTextDao; |
|||
import org.thingsboard.server.dao.model.DashboardInfoEntity; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
import java.util.UUID; |
|||
|
|||
import static com.datastax.driver.core.querybuilder.QueryBuilder.eq; |
|||
import static org.thingsboard.server.dao.model.ModelConstants.*; |
|||
|
|||
@Component |
|||
@Slf4j |
|||
public class DashboardInfoDaoImpl extends AbstractSearchTextDao<DashboardInfoEntity> implements DashboardInfoDao { |
|||
|
|||
@Override |
|||
protected Class<DashboardInfoEntity> getColumnFamilyClass() { |
|||
return DashboardInfoEntity.class; |
|||
} |
|||
|
|||
@Override |
|||
protected String getColumnFamilyName() { |
|||
return DASHBOARD_COLUMN_FAMILY_NAME; |
|||
} |
|||
|
|||
@Override |
|||
public List<DashboardInfoEntity> findDashboardsByTenantId(UUID tenantId, TextPageLink pageLink) { |
|||
log.debug("Try to find dashboards by tenantId [{}] and pageLink [{}]", tenantId, pageLink); |
|||
List<DashboardInfoEntity> dashboardEntities = findPageWithTextSearch(DASHBOARD_BY_TENANT_AND_SEARCH_TEXT_COLUMN_FAMILY_NAME, |
|||
Collections.singletonList(eq(DASHBOARD_TENANT_ID_PROPERTY, tenantId)), |
|||
pageLink); |
|||
|
|||
log.trace("Found dashboards [{}] by tenantId [{}] and pageLink [{}]", dashboardEntities, tenantId, pageLink); |
|||
return dashboardEntities; |
|||
} |
|||
|
|||
@Override |
|||
public List<DashboardInfoEntity> findDashboardsByTenantIdAndCustomerId(UUID tenantId, UUID customerId, TextPageLink pageLink) { |
|||
log.debug("Try to find dashboards by tenantId [{}], customerId[{}] and pageLink [{}]", tenantId, customerId, pageLink); |
|||
List<DashboardInfoEntity> dashboardEntities = findPageWithTextSearch(DASHBOARD_BY_CUSTOMER_AND_SEARCH_TEXT_COLUMN_FAMILY_NAME, |
|||
Arrays.asList(eq(DASHBOARD_CUSTOMER_ID_PROPERTY, customerId), |
|||
eq(DASHBOARD_TENANT_ID_PROPERTY, tenantId)), |
|||
pageLink); |
|||
|
|||
log.trace("Found dashboards [{}] by tenantId [{}], customerId [{}] and pageLink [{}]", dashboardEntities, tenantId, customerId, pageLink); |
|||
return dashboardEntities; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,201 @@ |
|||
/** |
|||
* Copyright © 2016-2017 The Thingsboard Authors |
|||
* |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); |
|||
* you may not use this file except in compliance with the License. |
|||
* You may obtain a copy of the License at |
|||
* |
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
|||
* |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, |
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
* See the License for the specific language governing permissions and |
|||
* limitations under the License. |
|||
*/ |
|||
package org.thingsboard.server.dao.model; |
|||
|
|||
import java.util.UUID; |
|||
|
|||
import org.thingsboard.server.common.data.Dashboard; |
|||
import org.thingsboard.server.common.data.DashboardInfo; |
|||
import org.thingsboard.server.common.data.id.CustomerId; |
|||
import org.thingsboard.server.common.data.id.DashboardId; |
|||
import org.thingsboard.server.common.data.id.TenantId; |
|||
import org.thingsboard.server.dao.model.type.JsonCodec; |
|||
|
|||
import com.datastax.driver.core.utils.UUIDs; |
|||
import com.datastax.driver.mapping.annotations.Column; |
|||
import com.datastax.driver.mapping.annotations.PartitionKey; |
|||
import com.datastax.driver.mapping.annotations.Table; |
|||
import com.datastax.driver.mapping.annotations.Transient; |
|||
import com.fasterxml.jackson.databind.JsonNode; |
|||
|
|||
@Table(name = ModelConstants.DASHBOARD_COLUMN_FAMILY_NAME) |
|||
public class DashboardInfoEntity implements SearchTextEntity<DashboardInfo> { |
|||
|
|||
@Transient |
|||
private static final long serialVersionUID = 2998395951247446191L; |
|||
|
|||
@PartitionKey(value = 0) |
|||
@Column(name = ModelConstants.ID_PROPERTY) |
|||
private UUID id; |
|||
|
|||
@PartitionKey(value = 1) |
|||
@Column(name = ModelConstants.DASHBOARD_TENANT_ID_PROPERTY) |
|||
private UUID tenantId; |
|||
|
|||
@PartitionKey(value = 2) |
|||
@Column(name = ModelConstants.DASHBOARD_CUSTOMER_ID_PROPERTY) |
|||
private UUID customerId; |
|||
|
|||
@Column(name = ModelConstants.DASHBOARD_TITLE_PROPERTY) |
|||
private String title; |
|||
|
|||
@Column(name = ModelConstants.SEARCH_TEXT_PROPERTY) |
|||
private String searchText; |
|||
|
|||
public DashboardInfoEntity() { |
|||
super(); |
|||
} |
|||
|
|||
public DashboardInfoEntity(DashboardInfo dashboardInfo) { |
|||
if (dashboardInfo.getId() != null) { |
|||
this.id = dashboardInfo.getId().getId(); |
|||
} |
|||
if (dashboardInfo.getTenantId() != null) { |
|||
this.tenantId = dashboardInfo.getTenantId().getId(); |
|||
} |
|||
if (dashboardInfo.getCustomerId() != null) { |
|||
this.customerId = dashboardInfo.getCustomerId().getId(); |
|||
} |
|||
this.title = dashboardInfo.getTitle(); |
|||
} |
|||
|
|||
public UUID getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(UUID id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public UUID getTenantId() { |
|||
return tenantId; |
|||
} |
|||
|
|||
public void setTenantId(UUID tenantId) { |
|||
this.tenantId = tenantId; |
|||
} |
|||
|
|||
public UUID getCustomerId() { |
|||
return customerId; |
|||
} |
|||
|
|||
public void setCustomerId(UUID customerId) { |
|||
this.customerId = customerId; |
|||
} |
|||
|
|||
public String getTitle() { |
|||
return title; |
|||
} |
|||
|
|||
public void setTitle(String title) { |
|||
this.title = title; |
|||
} |
|||
|
|||
@Override |
|||
public String getSearchTextSource() { |
|||
return title; |
|||
} |
|||
|
|||
@Override |
|||
public void setSearchText(String searchText) { |
|||
this.searchText = searchText; |
|||
} |
|||
|
|||
public String getSearchText() { |
|||
return searchText; |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
final int prime = 31; |
|||
int result = 1; |
|||
result = prime * result + ((customerId == null) ? 0 : customerId.hashCode()); |
|||
result = prime * result + ((id == null) ? 0 : id.hashCode()); |
|||
result = prime * result + ((searchText == null) ? 0 : searchText.hashCode()); |
|||
result = prime * result + ((tenantId == null) ? 0 : tenantId.hashCode()); |
|||
result = prime * result + ((title == null) ? 0 : title.hashCode()); |
|||
return result; |
|||
} |
|||
|
|||
@Override |
|||
public boolean equals(Object obj) { |
|||
if (this == obj) |
|||
return true; |
|||
if (obj == null) |
|||
return false; |
|||
if (getClass() != obj.getClass()) |
|||
return false; |
|||
DashboardInfoEntity other = (DashboardInfoEntity) obj; |
|||
if (customerId == null) { |
|||
if (other.customerId != null) |
|||
return false; |
|||
} else if (!customerId.equals(other.customerId)) |
|||
return false; |
|||
if (id == null) { |
|||
if (other.id != null) |
|||
return false; |
|||
} else if (!id.equals(other.id)) |
|||
return false; |
|||
if (searchText == null) { |
|||
if (other.searchText != null) |
|||
return false; |
|||
} else if (!searchText.equals(other.searchText)) |
|||
return false; |
|||
if (tenantId == null) { |
|||
if (other.tenantId != null) |
|||
return false; |
|||
} else if (!tenantId.equals(other.tenantId)) |
|||
return false; |
|||
if (title == null) { |
|||
if (other.title != null) |
|||
return false; |
|||
} else if (!title.equals(other.title)) |
|||
return false; |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder builder = new StringBuilder(); |
|||
builder.append("DashboardInfoEntity [id="); |
|||
builder.append(id); |
|||
builder.append(", tenantId="); |
|||
builder.append(tenantId); |
|||
builder.append(", customerId="); |
|||
builder.append(customerId); |
|||
builder.append(", title="); |
|||
builder.append(title); |
|||
builder.append(", searchText="); |
|||
builder.append(searchText); |
|||
builder.append("]"); |
|||
return builder.toString(); |
|||
} |
|||
|
|||
@Override |
|||
public DashboardInfo toData() { |
|||
DashboardInfo dashboardInfo = new DashboardInfo(new DashboardId(id)); |
|||
dashboardInfo.setCreatedTime(UUIDs.unixTimestamp(id)); |
|||
if (tenantId != null) { |
|||
dashboardInfo.setTenantId(new TenantId(tenantId)); |
|||
} |
|||
if (customerId != null) { |
|||
dashboardInfo.setCustomerId(new CustomerId(customerId)); |
|||
} |
|||
dashboardInfo.setTitle(title); |
|||
return dashboardInfo; |
|||
} |
|||
|
|||
} |
|||
File diff suppressed because one or more lines are too long
@ -0,0 +1,127 @@ |
|||
/* |
|||
* Copyright © 2016-2017 The Thingsboard Authors |
|||
* |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); |
|||
* you may not use this file except in compliance with the License. |
|||
* You may obtain a copy of the License at |
|||
* |
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
|||
* |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, |
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
* See the License for the specific language governing permissions and |
|||
* limitations under the License. |
|||
*/ |
|||
import './dashboard-autocomplete.scss'; |
|||
|
|||
import thingsboardApiDashboard from '../api/dashboard.service'; |
|||
import thingsboardApiUser from '../api/user.service'; |
|||
|
|||
/* eslint-disable import/no-unresolved, import/default */ |
|||
|
|||
import dashboardAutocompleteTemplate from './dashboard-autocomplete.tpl.html'; |
|||
|
|||
/* eslint-enable import/no-unresolved, import/default */ |
|||
|
|||
|
|||
export default angular.module('thingsboard.directives.dashboardAutocomplete', [thingsboardApiDashboard, thingsboardApiUser]) |
|||
.directive('tbDashboardAutocomplete', DashboardAutocomplete) |
|||
.name; |
|||
|
|||
/*@ngInject*/ |
|||
function DashboardAutocomplete($compile, $templateCache, $q, dashboardService, userService) { |
|||
|
|||
var linker = function (scope, element, attrs, ngModelCtrl) { |
|||
var template = $templateCache.get(dashboardAutocompleteTemplate); |
|||
element.html(template); |
|||
|
|||
scope.tbRequired = angular.isDefined(scope.tbRequired) ? scope.tbRequired : false; |
|||
scope.dashboard = null; |
|||
scope.dashboardSearchText = ''; |
|||
|
|||
scope.fetchDashboards = function(searchText) { |
|||
var pageLink = {limit: 50, textSearch: searchText}; |
|||
|
|||
var deferred = $q.defer(); |
|||
|
|||
var promise; |
|||
if (scope.dashboardsScope === 'customer' || userService.getAuthority() === 'CUSTOMER_USER') { |
|||
if (scope.customerId) { |
|||
promise = dashboardService.getCustomerDashboards(scope.customerId, pageLink); |
|||
} else { |
|||
promise = $q.when({data: []}); |
|||
} |
|||
} else { |
|||
promise = dashboardService.getTenantDashboards(pageLink); |
|||
} |
|||
|
|||
promise.then(function success(result) { |
|||
deferred.resolve(result.data); |
|||
}, function fail() { |
|||
deferred.reject(); |
|||
}); |
|||
|
|||
return deferred.promise; |
|||
} |
|||
|
|||
scope.dashboardSearchTextChanged = function() { |
|||
} |
|||
|
|||
scope.updateView = function () { |
|||
if (!scope.disabled) { |
|||
ngModelCtrl.$setViewValue(scope.dashboard ? scope.dashboard.id.id : null); |
|||
} |
|||
} |
|||
|
|||
ngModelCtrl.$render = function () { |
|||
if (ngModelCtrl.$viewValue) { |
|||
dashboardService.getDashboard(ngModelCtrl.$viewValue).then( |
|||
function success(dashboard) { |
|||
scope.dashboard = dashboard; |
|||
}, |
|||
function fail() { |
|||
scope.dashboard = null; |
|||
} |
|||
); |
|||
} else { |
|||
scope.dashboard = null; |
|||
} |
|||
} |
|||
|
|||
scope.$watch('dashboard', function () { |
|||
scope.updateView(); |
|||
}); |
|||
|
|||
scope.$watch('disabled', function () { |
|||
scope.updateView(); |
|||
}); |
|||
|
|||
if (scope.selectFirstDashboard) { |
|||
var pageLink = {limit: 1, textSearch: ''}; |
|||
scope.dashboardFetchFunction(pageLink).then(function success(result) { |
|||
var dashboards = result.data; |
|||
if (dashboards.length > 0) { |
|||
scope.dashboard = dashboards[0]; |
|||
} |
|||
}, function fail() { |
|||
}); |
|||
} |
|||
|
|||
$compile(element.contents())(scope); |
|||
} |
|||
|
|||
return { |
|||
restrict: "E", |
|||
require: "^ngModel", |
|||
link: linker, |
|||
scope: { |
|||
dashboardsScope: '@', |
|||
customerId: '=', |
|||
theForm: '=?', |
|||
tbRequired: '=?', |
|||
disabled:'=ngDisabled', |
|||
selectFirstDashboard: '=' |
|||
} |
|||
}; |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
/** |
|||
* Copyright © 2016-2017 The Thingsboard Authors |
|||
* |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); |
|||
* you may not use this file except in compliance with the License. |
|||
* You may obtain a copy of the License at |
|||
* |
|||
* http://www.apache.org/licenses/LICENSE-2.0 |
|||
* |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, |
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
* See the License for the specific language governing permissions and |
|||
* limitations under the License. |
|||
*/ |
|||
.tb-dashboard-autocomplete { |
|||
.tb-not-found { |
|||
display: block; |
|||
line-height: 1.5; |
|||
height: 48px; |
|||
} |
|||
.tb-dashboard-item { |
|||
display: block; |
|||
height: 48px; |
|||
} |
|||
li { |
|||
height: auto !important; |
|||
white-space: normal !important; |
|||
} |
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
<!-- |
|||
|
|||
Copyright © 2016-2017 The Thingsboard Authors |
|||
|
|||
Licensed under the Apache License, Version 2.0 (the "License"); |
|||
you may not use this file except in compliance with the License. |
|||
You may obtain a copy of the License at |
|||
|
|||
http://www.apache.org/licenses/LICENSE-2.0 |
|||
|
|||
Unless required by applicable law or agreed to in writing, software |
|||
distributed under the License is distributed on an "AS IS" BASIS, |
|||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
See the License for the specific language governing permissions and |
|||
limitations under the License. |
|||
|
|||
--> |
|||
<md-autocomplete ng-required="tbRequired" |
|||
ng-disabled="disabled" |
|||
md-input-name="dashboard" |
|||
ng-model="dashboard" |
|||
md-selected-item="dashboard" |
|||
md-search-text="dashboardSearchText" |
|||
md-search-text-change="dashboardSearchTextChanged()" |
|||
md-items="item in fetchDashboards(dashboardSearchText)" |
|||
md-item-text="item.title" |
|||
md-min-length="0" |
|||
placeholder="{{ 'dashboard.select-dashboard' | translate }}" |
|||
md-menu-class="tb-dashboard-autocomplete"> |
|||
<md-item-template> |
|||
<div class="tb-dashboard-item"> |
|||
<span md-highlight-text="dashboardSearchText" md-highlight-flags="^i">{{item.title}}</span> |
|||
</div> |
|||
</md-item-template> |
|||
<md-not-found> |
|||
<div class="tb-not-found"> |
|||
<span translate translate-values='{ dashboard: dashboardSearchText }'>dashboard.no-dashboards-matching</span> |
|||
</div> |
|||
</md-not-found> |
|||
<div ng-messages="theForm.dashboard.$error"> |
|||
<div translate ng-message="required">dashboard.dashboard-required</div> |
|||
</div> |
|||
</md-autocomplete> |
|||
Loading…
Reference in new issue