Browse Source

Control widgets

pull/2411/head
Igor Kulikov 6 years ago
parent
commit
bd142f8646
  1. 14
      application/src/main/data/json/system/widget_bundles/control_widgets.json
  2. 4
      ui-ngx/src/app/core/http/attribute.service.ts
  3. 2
      ui-ngx/src/app/modules/home/components/widget/widget.component.ts
  4. 2
      ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html
  5. 16
      ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.scss

14
application/src/main/data/json/system/widget_bundles/control_widgets.json

File diff suppressed because one or more lines are too long

4
ui-ngx/src/app/core/http/attribute.service.ts

@ -77,7 +77,7 @@ export class AttributeService {
} else {
saveEntityAttributesObservable = of(null);
}
return forkJoin(saveEntityAttributesObservable, deleteEntityAttributesObservable);
return forkJoin([saveEntityAttributesObservable, deleteEntityAttributesObservable]);
}
public saveEntityTimeseries(entityId: EntityId, timeseriesScope: string, timeseries: Array<AttributeData>,
@ -105,6 +105,6 @@ export class AttributeService {
} else {
saveEntityTimeseriesObservable = of(null);
}
return forkJoin(saveEntityTimeseriesObservable, deleteEntityTimeseriesObservable);
return forkJoin([saveEntityTimeseriesObservable, deleteEntityTimeseriesObservable]);
}
}

2
ui-ngx/src/app/modules/home/components/widget/widget.component.ts

@ -94,10 +94,12 @@ import { AssetService } from '@core/http/asset.service';
import { DialogService } from '@core/services/dialog.service';
import { CustomDialogService } from '@home/components/widget/dialog/custom-dialog.service';
import { DatePipe } from '@angular/common';
import { AttributeService } from '@core/http/attribute.service';
const ServicesMap = new Map<string, Type<any>>();
ServicesMap.set('deviceService', DeviceService);
ServicesMap.set('assetService', AssetService);
ServicesMap.set('attributeService', AttributeService);
ServicesMap.set('dialogs', DialogService);
ServicesMap.set('customDialog', CustomDialogService);
ServicesMap.set('date', DatePipe);

2
ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html

@ -74,7 +74,7 @@
(mouseenter)="typeHeaderMouseEnter($event, ruleNodeType)"
(mouseleave)="destroyTooltips()">
<mat-panel-title>
<mat-icon style="margin-right: 8px;">{{ ruleNodeTypeDescriptorsMap.get(ruleNodeType).icon }}</mat-icon>
<mat-icon>{{ ruleNodeTypeDescriptorsMap.get(ruleNodeType).icon }}</mat-icon>
<div class="tb-panel-title" translate>{{ ruleNodeTypeDescriptorsMap.get(ruleNodeType).name }}</div>
</mat-panel-title>
</mat-expansion-panel-header>

16
ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.scss

@ -124,6 +124,18 @@
&:hover {
background: #dadada;
}
.mat-expansion-panel-header-title {
line-height: 48px;
height: 48px;
.mat-icon {
min-width: 24px;
margin: auto 8px auto auto;
}
.tb-panel-title {
min-width: 140px;
user-select: none;
}
}
}
&.mat-expanded {
.mat-expansion-panel-header {
@ -135,10 +147,6 @@
.mat-expansion-panel-body {
padding: 0;
}
.tb-panel-title {
min-width: 140px;
user-select: none;
}
.fc-canvas {
background: #f9f9f9;
}

Loading…
Cancel
Save