Fix UI budget
This commit is contained in:
parent
42c52bfdba
commit
a3468265ab
@ -14,8 +14,7 @@
|
|||||||
/// limitations under the License.
|
/// limitations under the License.
|
||||||
///
|
///
|
||||||
|
|
||||||
import { JsonSchema, JsonSettingsSchema } from '@app/shared/public-api';
|
import { JsonSettingsSchema } from '@shared/models/widget.models';
|
||||||
|
|
||||||
|
|
||||||
export function initSchema(): JsonSettingsSchema {
|
export function initSchema(): JsonSettingsSchema {
|
||||||
return {
|
return {
|
||||||
@ -63,7 +62,7 @@ export function mergeSchemes(schemes: JsonSettingsSchema[]): JsonSettingsSchema
|
|||||||
}, initSchema());
|
}, initSchema());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addCondition(schema: JsonSettingsSchema, condition: String): JsonSettingsSchema {
|
export function addCondition(schema: JsonSettingsSchema, condition: string): JsonSettingsSchema {
|
||||||
schema.form = schema.form.map(element => {
|
schema.form = schema.form.map(element => {
|
||||||
if (typeof element === 'string') {
|
if (typeof element === 'string') {
|
||||||
return {
|
return {
|
||||||
@ -71,7 +70,7 @@ export function addCondition(schema: JsonSettingsSchema, condition: String): Jso
|
|||||||
condition
|
condition
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (typeof element == 'object') {
|
if (typeof element === 'object') {
|
||||||
if (element.condition) {
|
if (element.condition) {
|
||||||
element.condition += ' && ' + condition
|
element.condition += ' && ' + condition
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
/// limitations under the License.
|
/// limitations under the License.
|
||||||
///
|
///
|
||||||
|
|
||||||
import { JsonSettingsSchema } from '@app/shared/public-api';
|
import { JsonSettingsSchema } from '@shared/models/widget.models';
|
||||||
|
|
||||||
export interface MapWidgetInterface {
|
export interface MapWidgetInterface {
|
||||||
resize(),
|
resize(),
|
||||||
|
|||||||
@ -30,13 +30,15 @@ import {
|
|||||||
} from './schemes';
|
} from './schemes';
|
||||||
import { MapWidgetStaticInterface, MapWidgetInterface } from './map-widget.interface';
|
import { MapWidgetStaticInterface, MapWidgetInterface } from './map-widget.interface';
|
||||||
import { OpenStreetMap, TencentMap, GoogleMap, HEREMap, ImageMap } from './providers';
|
import { OpenStreetMap, TencentMap, GoogleMap, HEREMap, ImageMap } from './providers';
|
||||||
import { parseFunction, parseArray, parseData } from '@app/core/utils';
|
import { parseFunction, parseArray, parseData } from '@core/utils';
|
||||||
import { initSchema, addToSchema, mergeSchemes, addCondition, addGroupInfo } from '@app/core/schema-utils';
|
import { initSchema, addToSchema, mergeSchemes, addCondition, addGroupInfo } from '@core/schema-utils';
|
||||||
import { AttributeScope, EntityId, JsonSettingsSchema } from '@app/shared/public-api';
|
|
||||||
import { forkJoin } from 'rxjs';
|
import { forkJoin } from 'rxjs';
|
||||||
import { WidgetContext } from '@app/modules/home/models/widget-component.models';
|
import { WidgetContext } from '@app/modules/home/models/widget-component.models';
|
||||||
import { AttributeService } from '@app/core/public-api';
|
|
||||||
import { getDefCenterPosition } from './maps-utils';
|
import { getDefCenterPosition } from './maps-utils';
|
||||||
|
import { JsonSettingsSchema } from '@shared/models/widget.models';
|
||||||
|
import { EntityId } from '@shared/models/id/entity-id';
|
||||||
|
import { AttributeScope } from '@shared/models/telemetry/telemetry.models';
|
||||||
|
import { AttributeService } from '@core/http/attribute.service';
|
||||||
|
|
||||||
let providerSets;
|
let providerSets;
|
||||||
let defaultSettings;
|
let defaultSettings;
|
||||||
|
|||||||
@ -26,12 +26,13 @@ import { parseArray, parseTemplate, safeExecute } from '@app/core/utils';
|
|||||||
import { initSchema, addToSchema, addGroupInfo } from '@app/core/schema-utils';
|
import { initSchema, addToSchema, addGroupInfo } from '@app/core/schema-utils';
|
||||||
import { tripAnimationSchema } from '../lib/maps/schemes';
|
import { tripAnimationSchema } from '../lib/maps/schemes';
|
||||||
import { DomSanitizer } from '@angular/platform-browser';
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
import { WidgetConfig, JsonSchema, JsonSettingsSchema } from '@app/shared/public-api';
|
|
||||||
import { WidgetContext } from '@app/modules/home/models/widget-component.models';
|
import { WidgetContext } from '@app/modules/home/models/widget-component.models';
|
||||||
import { getRatio, findAngle } from '../lib/maps/maps-utils';
|
import { getRatio, findAngle } from '../lib/maps/maps-utils';
|
||||||
|
import { JsonSettingsSchema, WidgetConfig } from '@shared/models/widget.models';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
// tslint:disable-next-line:component-selector
|
||||||
selector: 'trip-animation',
|
selector: 'trip-animation',
|
||||||
templateUrl: './trip-animation.component.html',
|
templateUrl: './trip-animation.component.html',
|
||||||
styleUrls: ['./trip-animation.component.scss']
|
styleUrls: ['./trip-animation.component.scss']
|
||||||
|
|||||||
@ -128,7 +128,7 @@ import { LedLightComponent } from '@shared/components/led-light.component';
|
|||||||
import { TbJsonToStringDirective } from '@shared/components/directives/tb-json-to-string.directive';
|
import { TbJsonToStringDirective } from '@shared/components/directives/tb-json-to-string.directive';
|
||||||
import { JsonObjectEditDialogComponent } from '@shared/components/dialog/json-object-edit-dialog.component';
|
import { JsonObjectEditDialogComponent } from '@shared/components/dialog/json-object-edit-dialog.component';
|
||||||
import { HistorySelectorComponent } from './components/time/history-selector/history-selector.component';
|
import { HistorySelectorComponent } from './components/time/history-selector/history-selector.component';
|
||||||
import { TbTemplatePipe } from './pipe/public-api';
|
import { TbTemplatePipe } from '@shared/pipe/template.pipe';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
providers: [
|
providers: [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user