Merge pull request #7360 from devaskim/selective_widget_bundler_version_control
[3.4.2] UI: Let user to selective export widget bundles to version control.
This commit is contained in:
commit
f20d87e894
@ -16,12 +16,14 @@
|
||||
package org.thingsboard.server.common.data.widget;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.thingsboard.server.common.data.ExportableEntity;
|
||||
import org.thingsboard.server.common.data.HasName;
|
||||
import org.thingsboard.server.common.data.HasTenantId;
|
||||
import org.thingsboard.server.common.data.SearchTextBased;
|
||||
import org.thingsboard.server.common.data.id.TenantId;
|
||||
@ -31,7 +33,7 @@ import org.thingsboard.server.common.data.validation.NoXss;
|
||||
|
||||
@ApiModel
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WidgetsBundle extends SearchTextBased<WidgetsBundleId> implements HasTenantId, ExportableEntity<WidgetsBundleId> {
|
||||
public class WidgetsBundle extends SearchTextBased<WidgetsBundleId> implements HasName, HasTenantId, ExportableEntity<WidgetsBundleId> {
|
||||
|
||||
private static final long serialVersionUID = -7627368878362410489L;
|
||||
|
||||
@ -109,8 +111,9 @@ public class WidgetsBundle extends SearchTextBased<WidgetsBundleId> implements H
|
||||
return getTitle();
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
@ApiModelProperty(position = 3, value = "Same as title of the Widget Bundle. Read-only field. Update the 'title' to change the 'name' of the Widget Bundle.", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
|
||||
@Override
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
public String getName() {
|
||||
return title;
|
||||
}
|
||||
|
||||
@ -244,6 +244,11 @@ export class EntityService {
|
||||
(id) => this.assetProfileService.getAssetProfileInfo(id, config),
|
||||
entityIds);
|
||||
break;
|
||||
case EntityType.WIDGETS_BUNDLE:
|
||||
observable = this.getEntitiesByIdsObservable(
|
||||
(id) => this.widgetService.getWidgetsBundle(id, config),
|
||||
entityIds);
|
||||
break;
|
||||
}
|
||||
return observable;
|
||||
}
|
||||
@ -393,6 +398,10 @@ export class EntityService {
|
||||
pageLink.sortOrder.property = 'name';
|
||||
entitiesObservable = this.assetProfileService.getAssetProfileInfos(pageLink, config);
|
||||
break;
|
||||
case EntityType.WIDGETS_BUNDLE:
|
||||
pageLink.sortOrder.property = 'title';
|
||||
entitiesObservable = this.widgetService.getWidgetBundles(pageLink, config);
|
||||
break;
|
||||
}
|
||||
return entitiesObservable;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user