diff --git a/dynamic-mapping-ui/src/configuration/service-configuration.component.ts b/dynamic-mapping-ui/src/configuration/service-configuration.component.ts index cbd5c020..6fc100a7 100644 --- a/dynamic-mapping-ui/src/configuration/service-configuration.component.ts +++ b/dynamic-mapping-ui/src/configuration/service-configuration.component.ts @@ -18,15 +18,15 @@ * * @authors Christof Strack */ +import { HttpStatusCode } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { AlertService, gettext } from '@c8y/ngx-components'; import { BsModalService } from 'ngx-bootstrap/modal'; import packageJson from '../../package.json'; +import { ConnectorConfigurationService } from '../connector'; import { Feature, Operation, SharedService } from '../shared'; import { ServiceConfiguration } from './shared/configuration.model'; -import { ConnectorConfigurationService } from '../connector'; -import { HttpStatusCode } from '@angular/common/http'; @Component({ selector: 'd11r-mapping-service-configuration', diff --git a/dynamic-mapping-ui/src/connector/connector-configuration.module.ts b/dynamic-mapping-ui/src/connector/connector-configuration.module.ts index 7791e5c8..6db6173a 100644 --- a/dynamic-mapping-ui/src/connector/connector-configuration.module.ts +++ b/dynamic-mapping-ui/src/connector/connector-configuration.module.ts @@ -22,11 +22,10 @@ import { NgModule } from '@angular/core'; import { CoreModule, hookRoute } from '@c8y/ngx-components'; -import { connectorResolver, SharedModule } from '../shared'; +import { connectorResolver, SharedModule, ConnectorDetailsComponent } from '../shared'; import { ConnectorConfigurationComponent } from './connector-configuration.component'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { NODE3 } from '../shared/mapping/util'; -import { ConnectorDetailsComponent } from '../shared/connector-details/connector-details.component'; @NgModule({ declarations: [ConnectorConfigurationComponent], diff --git a/dynamic-mapping-ui/src/extension/grid/extension.component.ts b/dynamic-mapping-ui/src/extension/grid/extension.component.ts index 64599e93..34179f23 100644 --- a/dynamic-mapping-ui/src/extension/grid/extension.component.ts +++ b/dynamic-mapping-ui/src/extension/grid/extension.component.ts @@ -21,13 +21,13 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { IManagedObject } from '@c8y/client'; +import { AlertService } from '@c8y/ngx-components'; import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal'; import { BehaviorSubject, Observable, Subject } from 'rxjs'; import { catchError, retry, shareReplay, switchMap, takeUntil, tap, timeout } from 'rxjs/operators'; -import { ExtensionService } from '../extension.service'; -import { AddExtensionComponent } from '../add/add-extension-modal.component'; -import { AlertService } from '@c8y/ngx-components'; import { Feature, Operation, SharedService } from '../../shared'; +import { AddExtensionComponent } from '../add/add-extension-modal.component'; +import { ExtensionService } from '../extension.service'; interface ExtensionState { reloading: boolean; diff --git a/dynamic-mapping-ui/src/extension/share/extension.model.ts b/dynamic-mapping-ui/src/extension/share/extension.model.ts index ad0ce9b4..e55e6e5a 100644 --- a/dynamic-mapping-ui/src/extension/share/extension.model.ts +++ b/dynamic-mapping-ui/src/extension/share/extension.model.ts @@ -1,8 +1,3 @@ -import { inject } from "@angular/core"; -import { ResolveFn } from "@angular/router"; -import { IManagedObject } from "@c8y/client"; -import { ExtensionService } from "../extension.service"; - /* * Copyright (c) 2022 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, * and/or its subsidiaries and/or its affiliates and/or their licensors. @@ -23,6 +18,11 @@ import { ExtensionService } from "../extension.service"; * * @authors Christof Strack */ +import { inject } from "@angular/core"; +import { ResolveFn } from "@angular/router"; +import { IManagedObject } from "@c8y/client"; +import { ExtensionService } from "../extension.service"; + export enum ERROR_TYPE { TYPE_VALIDATION = 'TYPE_VALIDATION', ALREADY_SUBSCRIBED = 'ALREADY_SUBSCRIBED', diff --git a/dynamic-mapping-ui/src/landing/landing.component.ts b/dynamic-mapping-ui/src/landing/landing.component.ts index 7198a6c2..b6dfc5b7 100644 --- a/dynamic-mapping-ui/src/landing/landing.component.ts +++ b/dynamic-mapping-ui/src/landing/landing.component.ts @@ -22,11 +22,10 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { MappingService } from '../mapping/core/mapping.service'; -import { Direction, JsonEditorComponent } from '../shared'; +import { Direction, JsonEditorComponent, NODE1, NODE3 } from '../shared'; import { BehaviorSubject, from, Subject } from 'rxjs'; import { ConnectorConfigurationService } from '../connector'; import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; -import { NODE1, NODE3 } from '../shared/mapping/util'; @Component({ selector: 'd11r-landing', diff --git a/dynamic-mapping-ui/src/landing/landing.module.ts b/dynamic-mapping-ui/src/landing/landing.module.ts index dd4fad09..70c1aa9c 100644 --- a/dynamic-mapping-ui/src/landing/landing.module.ts +++ b/dynamic-mapping-ui/src/landing/landing.module.ts @@ -20,13 +20,13 @@ */ import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; import { CoreModule, hookRoute } from '@c8y/ngx-components'; import { CollapseModule } from 'ngx-bootstrap/collapse'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; -import { SharedModule } from '../shared'; import { MappingModule } from '../mapping/mapping.module'; +import { SharedModule } from '../shared'; import { LandingComponent } from './landing.component'; -import { RouterModule } from '@angular/router'; @NgModule({ declarations: [LandingComponent], diff --git a/dynamic-mapping-ui/src/mapping-tree/tree.component.ts b/dynamic-mapping-ui/src/mapping-tree/tree.component.ts index ba5b4aaa..5f5bd1b5 100644 --- a/dynamic-mapping-ui/src/mapping-tree/tree.component.ts +++ b/dynamic-mapping-ui/src/mapping-tree/tree.component.ts @@ -19,10 +19,10 @@ * @authors Christof Strack */ import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; -import { MappingTreeService } from './tree.service'; -import { JsonEditorComponent } from '../shared'; import { ActivatedRoute } from '@angular/router'; import { BehaviorSubject } from 'rxjs'; +import { JsonEditorComponent } from '../shared'; +import { MappingTreeService } from './tree.service'; @Component({ selector: 'd11r-mapping-tree-grid', diff --git a/dynamic-mapping-ui/src/mapping-tree/tree.service.ts b/dynamic-mapping-ui/src/mapping-tree/tree.service.ts index 6d6c0e3b..4cfd8032 100644 --- a/dynamic-mapping-ui/src/mapping-tree/tree.service.ts +++ b/dynamic-mapping-ui/src/mapping-tree/tree.service.ts @@ -18,13 +18,13 @@ * * @authors Christof Strack */ +import { HttpStatusCode } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { FetchClient, InventoryService } from '@c8y/client'; import { AlertService } from '@c8y/ngx-components'; -import { BASE_URL, PATH_MAPPING_TREE_ENDPOINT } from '../shared'; import * as _ from 'lodash'; -import { HttpStatusCode } from '@angular/common/http'; import { isTypeOf } from '../mapping/shared/util'; +import { BASE_URL, PATH_MAPPING_TREE_ENDPOINT } from '../shared'; @Injectable({ providedIn: 'root' }) export class MappingTreeService { diff --git a/dynamic-mapping-ui/src/mapping/core/mapping.service.ts b/dynamic-mapping-ui/src/mapping/core/mapping.service.ts index a1635df6..180ca8df 100644 --- a/dynamic-mapping-ui/src/mapping/core/mapping.service.ts +++ b/dynamic-mapping-ui/src/mapping/core/mapping.service.ts @@ -68,7 +68,6 @@ import { EventRealtimeService, RealtimeSubjectService } from '@c8y/ngx-components'; -import { patchC8YTemplateForTesting } from '../shared/util'; @Injectable({ providedIn: 'root' diff --git a/dynamic-mapping-ui/src/mapping/core/mock/mock-identity.service.ts b/dynamic-mapping-ui/src/mapping/core/mock/mock-identity.service.ts index 528f0242..78a22d35 100644 --- a/dynamic-mapping-ui/src/mapping/core/mock/mock-identity.service.ts +++ b/dynamic-mapping-ui/src/mapping/core/mock/mock-identity.service.ts @@ -23,7 +23,6 @@ import { Injectable } from '@angular/core'; import { IExternalIdentity, IFetchResponse, - IIdentified, IResult, IResultList } from '@c8y/client'; diff --git a/dynamic-mapping-ui/src/mapping/core/processor/base-processor-inbound.service.ts b/dynamic-mapping-ui/src/mapping/core/processor/base-processor-inbound.service.ts index f68856ec..a42a408b 100644 --- a/dynamic-mapping-ui/src/mapping/core/processor/base-processor-inbound.service.ts +++ b/dynamic-mapping-ui/src/mapping/core/processor/base-processor-inbound.service.ts @@ -18,15 +18,18 @@ * * @authors Christof Strack */ +import { HttpStatusCode } from '@angular/common/http'; import { Injectable } from '@angular/core'; +import { IExternalIdentity } from '@c8y/client'; import { AlertService } from '@c8y/ngx-components'; import * as _ from 'lodash'; import { API, + MAPPING_TEST_DEVICE_FRAGMENT, + MAPPING_TEST_DEVICE_TYPE, Mapping, RepairStrategy, - MAPPING_TEST_DEVICE_TYPE, - MAPPING_TEST_DEVICE_FRAGMENT + getPathTargetForDeviceIdentifiers, transformGenericPath2C8YPath } from '../../../shared'; import { randomIdAsString, splitTopicExcludingSeparator } from '../../shared/util'; import { C8YAgent } from '../c8y-agent.service'; @@ -34,14 +37,10 @@ import { IDENTITY, ProcessingContext, SubstituteValue, - SubstituteValueType + SubstituteValueType, + TOKEN_TOPIC_LEVEL, + getDeviceEntries, getTypedValue, substituteValueInPayload } from './processor.model'; -import { TOKEN_TOPIC_LEVEL } from './processor.model'; -import { getDeviceEntries, getTypedValue, substituteValueInPayload } from './processor.model'; -import { getPathTargetForDeviceIdentifiers, transformGenericPath2C8YPath } from '../../../shared/mapping/mapping.model'; -import { HttpStatusCode } from '@angular/common/http'; -import { IExternalIdentity } from '@c8y/client'; -import { map } from 'cypress/types/bluebird'; @Injectable({ providedIn: 'root' }) export abstract class BaseProcessorInbound { diff --git a/dynamic-mapping-ui/src/mapping/core/processor/base-processor-outbound.service.ts b/dynamic-mapping-ui/src/mapping/core/processor/base-processor-outbound.service.ts index 53851185..c4e0d32f 100644 --- a/dynamic-mapping-ui/src/mapping/core/processor/base-processor-outbound.service.ts +++ b/dynamic-mapping-ui/src/mapping/core/processor/base-processor-outbound.service.ts @@ -28,13 +28,13 @@ import { splitTopicIncludingSeparator } from '../../shared/util'; import { C8YAgent } from '../c8y-agent.service'; +import { MQTTClient } from '../mqtt-client.service'; import { ProcessingContext, SubstituteValue, - SubstituteValueType + SubstituteValueType, + getTypedValue } from './processor.model'; -import { MQTTClient } from '../mqtt-client.service'; -import { getTypedValue } from './processor.model'; @Injectable({ providedIn: 'root' }) export abstract class BaseProcessorOutbound { diff --git a/dynamic-mapping-ui/src/mapping/core/processor/impl/json-processor-inbound.service.ts b/dynamic-mapping-ui/src/mapping/core/processor/impl/json-processor-inbound.service.ts index 11a58de3..dd4b0bc3 100644 --- a/dynamic-mapping-ui/src/mapping/core/processor/impl/json-processor-inbound.service.ts +++ b/dynamic-mapping-ui/src/mapping/core/processor/impl/json-processor-inbound.service.ts @@ -21,18 +21,16 @@ import { Injectable } from '@angular/core'; import * as _ from 'lodash'; import { API, Mapping, RepairStrategy } from '../../../../shared'; +import { + TIME, +} from '../../../shared/util'; import { BaseProcessorInbound } from '../base-processor-inbound.service'; import { ProcessingContext, + processSubstitute, SubstituteValue, SubstituteValueType } from '../processor.model'; -import { - TIME, - TOKEN_TOPIC_LEVEL, - splitTopicExcludingSeparator -} from '../../../shared/util'; -import { processSubstitute } from '../processor.model'; @Injectable({ providedIn: 'root' }) export class JSONProcessorInbound extends BaseProcessorInbound { diff --git a/dynamic-mapping-ui/src/mapping/grid/mapping.component.ts b/dynamic-mapping-ui/src/mapping/grid/mapping.component.ts index 8e76f55d..06e05e0c 100644 --- a/dynamic-mapping-ui/src/mapping/grid/mapping.component.ts +++ b/dynamic-mapping-ui/src/mapping/grid/mapping.component.ts @@ -55,22 +55,21 @@ import { uuidCustom } from '../../shared'; +import { HttpStatusCode } from '@angular/common/http'; import { Router } from '@angular/router'; import { IIdentified } from '@c8y/client'; import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal'; -import { BehaviorSubject, filter, finalize, Subject, switchMap, take } from 'rxjs'; -import { LabelRendererComponent, SharedService } from '../../shared'; +import { BehaviorSubject, Subject, filter, finalize, switchMap, take } from 'rxjs'; +import { DeploymentMapEntry, ExtensionType, LabelRendererComponent, MappingTypeDescriptionMap, SharedService, StepperConfiguration } from '../../shared'; import { MappingService } from '../core/mapping.service'; +import { MappingFilterComponent } from '../filter/mapping-filter.component'; import { ImportMappingsComponent } from '../import/import-modal.component'; import { MappingTypeComponent } from '../mapping-type/mapping-type.component'; -import { StatusActivationRendererComponent } from '../renderer/status-activation.renderer.component'; -import { StatusRendererComponent } from '../renderer/status.renderer.component'; -import { HttpStatusCode } from '@angular/common/http'; -import { DeploymentMapEntry, ExtensionType, MappingTypeDescriptionMap, StepperConfiguration } from '../../shared'; -import { MappingFilterComponent } from '../filter/mapping-filter.component'; import { MappingDeploymentRendererComponent } from '../renderer/mapping-deployment.renderer.component'; import { MappingIdCellRendererComponent } from '../renderer/mapping-id.renderer.component'; import { SnoopedTemplateRendererComponent } from '../renderer/snooped-template.renderer.component'; +import { StatusActivationRendererComponent } from '../renderer/status-activation.renderer.component'; +import { StatusRendererComponent } from '../renderer/status.renderer.component'; import { PayloadWrapper } from '../shared/mapping.model'; diff --git a/dynamic-mapping-ui/src/mapping/mapping-type/mapping-type.component.ts b/dynamic-mapping-ui/src/mapping/mapping-type/mapping-type.component.ts index 423b5885..898b5b4d 100644 --- a/dynamic-mapping-ui/src/mapping/mapping-type/mapping-type.component.ts +++ b/dynamic-mapping-ui/src/mapping/mapping-type/mapping-type.component.ts @@ -30,7 +30,7 @@ import { import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { C8yStepper, ModalLabels } from '@c8y/ngx-components'; import { Subject } from 'rxjs'; -import { Direction, MappingTypeDescriptionMap, MappingType } from '../../shared'; +import { Direction, MappingType, MappingTypeDescriptionMap } from '../../shared'; import { isDisabled } from '../shared/util'; @Component({ diff --git a/dynamic-mapping-ui/src/mapping/stepper-mapping/mapping-stepper.component.ts b/dynamic-mapping-ui/src/mapping/stepper-mapping/mapping-stepper.component.ts index 4e56105a..245e4868 100644 --- a/dynamic-mapping-ui/src/mapping/stepper-mapping/mapping-stepper.component.ts +++ b/dynamic-mapping-ui/src/mapping/stepper-mapping/mapping-stepper.component.ts @@ -42,11 +42,13 @@ import { API, COLOR_HIGHLIGHTED, ConnectorType, + countDeviceIdentifiers, DeploymentMapEntry, Direction, Extension, ExtensionEntry, getExternalTemplate, + getGenericDeviceIdentifier, getSchema, JsonEditorComponent, Mapping, @@ -54,9 +56,7 @@ import { RepairStrategy, SAMPLE_TEMPLATES_C8Y, SnoopStatus, - StepperConfiguration, - countDeviceIdentifiers, - getGenericDeviceIdentifier + StepperConfiguration } from '../../shared'; import { MappingService } from '../core/mapping.service'; import { ValidationError } from '../shared/mapping.model'; diff --git a/dynamic-mapping-ui/src/shared/index.ts b/dynamic-mapping-ui/src/shared/index.ts index 2794c256..19c270ec 100644 --- a/dynamic-mapping-ui/src/shared/index.ts +++ b/dynamic-mapping-ui/src/shared/index.ts @@ -14,13 +14,12 @@ export * from './mapping/mapping.model'; export * from './mapping/util'; export * from './misc/admin.guard'; export * from './misc/camel-case.pipe'; -export * from './misc/filter-json.pipe'; export * from './misc/capitalize-case.pipe'; +export * from './misc/filter-json.pipe'; export * from './misc/format-string.pipe'; export * from './misc/mapping-tab.factory'; export * from './misc/navigation.factory'; export * from './misc/overview.guard'; export * from './service/shared.model'; export * from './service/shared.service'; -export * from './shared.module'; - +export * from './shared.module'; \ No newline at end of file