This is an automated email from the ASF dual-hosted git repository. riemer pushed a commit to branch remove-consul in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 865b1db3c0709c29faa75fc8108892356ac9bbf5 Author: Dominik Riemer <[email protected]> AuthorDate: Sun Aug 6 14:07:51 2023 +0200 Rename consul configuration components in UI --- ui/src/app/configuration/configuration.module.ts | 22 +++--- .../consul-service/consul-service.component.css | 49 ------------- .../consul-service/consul-service.component.html | 58 --------------- .../consul-service/consul-service.component.ts | 42 ----------- .../datalake-configuration.component.ts | 2 - .../configuration/export/data-export.service.ts | 2 +- .../consul-configs-boolean.component.css | 17 ----- .../consul-configs-number.component.css | 17 ----- .../consul-configs-text.component.css | 17 ----- .../consul-configs/consul-configs.component.css | 17 ----- .../extensions-service-configuration.component.ts | 3 +- .../service-configs-boolean.component.html} | 0 .../service-configs-boolean.component.ts} | 5 +- .../service-configs-number.component.html} | 0 .../service-configs-number.component.ts} | 5 +- .../service-configs-password.component.css} | 0 .../service-configs-password.component.html} | 0 .../service-configs-password.component.spec.ts} | 10 +-- .../service-configs-password.component.ts} | 6 +- .../service-configs-text.component.html} | 0 .../service-configs-text.component.ts} | 5 +- .../service-configs.component.html} | 0 .../service-configs.component.ts} | 5 +- .../extensions-service-management.component.ts | 14 +--- .../abstract-security-principal-config.ts | 2 +- .../edit-user-dialog/edit-user-dialog.component.ts | 4 +- .../user-group-configuration.component.ts | 2 +- .../shared/configuration.service.spec.ts | 1 - .../configuration/shared/configuration.service.ts | 2 - .../shared/configuration.test.service.ts | 84 ---------------------- .../shared/streampipes-pe-container-configs.ts | 25 ------- .../shared/streampipes-pe-container.model.ts | 29 -------- 32 files changed, 33 insertions(+), 412 deletions(-) diff --git a/ui/src/app/configuration/configuration.module.ts b/ui/src/app/configuration/configuration.module.ts index 8dc6fc641..fbea2a2e3 100644 --- a/ui/src/app/configuration/configuration.module.ts +++ b/ui/src/app/configuration/configuration.module.ts @@ -27,7 +27,6 @@ import { FlexLayoutModule } from '@ngbracket/ngx-layout'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { ConfigurationService } from './shared/configuration.service'; -import { ConsulServiceComponent } from './consul-service/consul-service.component'; import { CustomMaterialModule } from '../CustomMaterial/custom-material.module'; import { MessagingConfigurationComponent } from './messaging-configuration/messaging-configuration.component'; @@ -57,11 +56,11 @@ import { SpEditLabelComponent } from './label-configuration/edit-label/edit-labe import { SpLabelConfigurationComponent } from './label-configuration/label-configuration.component'; import { ColorPickerModule } from 'ngx-color-picker'; import { ExtensionsServiceManagementComponent } from './extensions-service-management/extensions-service-management.component'; -import { ConsulConfigsComponent } from './extensions-service-management/extensions-service-configuration/consul-configs/consul-configs.component'; -import { ConsulConfigsTextComponent } from './extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-text/consul-configs-text.component'; -import { ConsulConfigsPasswordComponent } from './extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-password/consul-configs-password.component'; -import { ConsulConfigsBooleanComponent } from './extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-boolean/consul-configs-boolean.component'; -import { ConsulConfigsNumberComponent } from './extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-number/consul-configs-number.component'; +import { ServiceConfigsComponent } from './extensions-service-management/extensions-service-configuration/service-configs/service-configs.component'; +import { ServiceConfigsTextComponent } from './extensions-service-management/extensions-service-configuration/service-configs/service-configs-text/service-configs-text.component'; +import { ServiceConfigsPasswordComponent } from './extensions-service-management/extensions-service-configuration/service-configs/service-configs-password/service-configs-password.component'; +import { ServiceConfigsBooleanComponent } from './extensions-service-management/extensions-service-configuration/service-configs/service-configs-boolean/service-configs-boolean.component'; +import { ServiceConfigsNumberComponent } from './extensions-service-management/extensions-service-configuration/service-configs/service-configs-number/service-configs-number.component'; import { SpRegisteredExtensionsServiceComponent } from './extensions-service-management/registrered-extensions-services/registered-extensions-services.component'; import { SpExtensionsServiceConfigurationComponent } from './extensions-service-management/extensions-service-configuration/extensions-service-configuration.component'; @@ -131,12 +130,11 @@ import { SpExtensionsServiceConfigurationComponent } from './extensions-service- ColorPickerModule, ], declarations: [ - ConsulServiceComponent, - ConsulConfigsComponent, - ConsulConfigsTextComponent, - ConsulConfigsPasswordComponent, - ConsulConfigsBooleanComponent, - ConsulConfigsNumberComponent, + ServiceConfigsComponent, + ServiceConfigsTextComponent, + ServiceConfigsPasswordComponent, + ServiceConfigsBooleanComponent, + ServiceConfigsNumberComponent, DeleteDatalakeIndexComponent, EditUserDialogComponent, EditGroupDialogComponent, diff --git a/ui/src/app/configuration/consul-service/consul-service.component.css b/ui/src/app/configuration/consul-service/consul-service.component.css deleted file mode 100644 index 1bcf4ab7e..000000000 --- a/ui/src/app/configuration/consul-service/consul-service.component.css +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * - */ - -.service-icon-passing { - cursor: default; - color: #4caf50; -} - -.service-icon-critical { - cursor: default; - color: #f44336; -} - -.show-configuration-icon { - cursor: pointer; - color: rgba(0, 0, 0, 0.54); -} - -.tooltip-icon { - cursor: default; - font-size: 150%; -} - -.submit-button { - width: 100%; -} - -.form-field { - width: 100%; -} - -.checkbox-field { - padding-bottom: 1.25em; -} diff --git a/ui/src/app/configuration/consul-service/consul-service.component.html b/ui/src/app/configuration/consul-service/consul-service.component.html deleted file mode 100644 index 13fe34293..000000000 --- a/ui/src/app/configuration/consul-service/consul-service.component.html +++ /dev/null @@ -1,58 +0,0 @@ -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one or more - ~ contributor license agreements. See the NOTICE file distributed with - ~ this work for additional information regarding copyright ownership. - ~ The ASF licenses this file to You 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. - ~ - --> - -<div - class="assemblyOptions sp-blue-bg" - fxLayout="row" - fxLayoutAlign="space-between center" -> - <span - *ngIf="consulService.meta.status === 'passing'" - fxLayoutAlign="center center" - > - <mat-icon class="service-icon-passing">lens</mat-icon> - </span> - <span - *ngIf="consulService.meta.status === 'critical'" - fxLayoutAlign="center center" - > - <mat-icon class="service-icon-critical">lens</mat-icon> - </span> - <h4>{{ consulService.name }}</h4> - <span - *ngIf="showConfiguration" - fxLayoutAlign="center center" - class="show-configuration-icon" - > - <mat-icon (click)="toggleConfiguration()">expand_less</mat-icon> - </span> - <span - *ngIf="!showConfiguration" - fxLayoutAlign="center center" - class="show-configuration-icon" - > - <mat-icon (click)="toggleConfiguration()">expand_more</mat-icon> - </span> -</div> - -<div class="sp-blue-border" *ngIf="showConfiguration" style="padding: 5px"> - <sp-consul-configs - [consulService]="consulService" - (updateConsulService)="updateConfiguration()" - ></sp-consul-configs> -</div> diff --git a/ui/src/app/configuration/consul-service/consul-service.component.ts b/ui/src/app/configuration/consul-service/consul-service.component.ts deleted file mode 100644 index ef595de7b..000000000 --- a/ui/src/app/configuration/consul-service/consul-service.component.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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 { Component, EventEmitter, Input, Output } from '@angular/core'; -import { StreampipesPeContainer } from '../shared/streampipes-pe-container.model'; - -@Component({ - selector: 'sp-consul-service', - templateUrl: './consul-service.component.html', - styleUrls: ['./consul-service.component.css'], -}) -export class ConsulServiceComponent { - @Input() consulService: StreampipesPeContainer; - @Output() updateConsulService: EventEmitter<StreampipesPeContainer> = - new EventEmitter<StreampipesPeContainer>(); - showConfiguration = false; - - constructor() {} - - toggleConfiguration(): void { - this.showConfiguration = !this.showConfiguration; - } - - updateConfiguration(): void { - this.updateConsulService.emit(this.consulService); - } -} diff --git a/ui/src/app/configuration/datalake-configuration/datalake-configuration.component.ts b/ui/src/app/configuration/datalake-configuration/datalake-configuration.component.ts index 783f8b093..5a0b63bfa 100644 --- a/ui/src/app/configuration/datalake-configuration/datalake-configuration.component.ts +++ b/ui/src/app/configuration/datalake-configuration/datalake-configuration.component.ts @@ -20,12 +20,10 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { MatTableDataSource } from '@angular/material/table'; import { DataLakeConfigurationEntry } from './datalake-configuration-entry'; import { - DataExplorerDataConfig, DatalakeQueryParameterBuilder, DatalakeQueryParameters, DatalakeRestService, DataViewDataExplorerService, - DateRange, EventSchema, FieldConfig, SpQueryResult, diff --git a/ui/src/app/configuration/export/data-export.service.ts b/ui/src/app/configuration/export/data-export.service.ts index 5fe23cf69..61082b761 100644 --- a/ui/src/app/configuration/export/data-export.service.ts +++ b/ui/src/app/configuration/export/data-export.service.ts @@ -19,8 +19,8 @@ import { Injectable } from '@angular/core'; import { AssetExportConfiguration, - PlatformServicesCommons, ExportConfiguration, + PlatformServicesCommons, } from '@streampipes/platform-services'; import { HttpClient, diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-boolean/consul-configs-boolean.component.css b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-boolean/consul-configs-boolean.component.css deleted file mode 100644 index 13cbc4aac..000000000 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-boolean/consul-configs-boolean.component.css +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * - */ diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-number/consul-configs-number.component.css b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-number/consul-configs-number.component.css deleted file mode 100644 index 13cbc4aac..000000000 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-number/consul-configs-number.component.css +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * - */ diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-text/consul-configs-text.component.css b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-text/consul-configs-text.component.css deleted file mode 100644 index 13cbc4aac..000000000 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-text/consul-configs-text.component.css +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * - */ diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs.component.css b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs.component.css deleted file mode 100644 index 13cbc4aac..000000000 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs.component.css +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * - */ diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/extensions-service-configuration.component.ts b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/extensions-service-configuration.component.ts index 9ea5ff50c..38bdad605 100644 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/extensions-service-configuration.component.ts +++ b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/extensions-service-configuration.component.ts @@ -19,7 +19,6 @@ import { Component, ViewChild } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatTableDataSource } from '@angular/material/table'; -import { StreampipesPeContainer } from '../../shared/streampipes-pe-container.model'; import { ConfigurationService } from '../../shared/configuration.service'; import { animate, @@ -106,7 +105,7 @@ export class SpExtensionsServiceConfigurationComponent { ); } - expand(element: StreampipesPeContainer) { + expand(element: SpServiceConfiguration) { if (this.expandedElement === element) { this.expandedElement = undefined; } else { diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-boolean/consul-configs-boolean.component.html b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-boolean/service-configs-boolean.component.html similarity index 100% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-boolean/consul-configs-boolean.component.html rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-boolean/service-configs-boolean.component.html diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-boolean/consul-configs-boolean.component.ts b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-boolean/service-configs-boolean.component.ts similarity index 87% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-boolean/consul-configs-boolean.component.ts rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-boolean/service-configs-boolean.component.ts index 26a612265..cf69fa2e3 100644 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-boolean/consul-configs-boolean.component.ts +++ b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-boolean/service-configs-boolean.component.ts @@ -22,11 +22,10 @@ import { ConfigItem } from '@streampipes/platform-services'; @Component({ selector: 'sp-consul-configs-boolean', - templateUrl: './consul-configs-boolean.component.html', - styleUrls: ['./consul-configs-boolean.component.css'], + templateUrl: './service-configs-boolean.component.html', providers: [ConfigurationService], }) -export class ConsulConfigsBooleanComponent { +export class ServiceConfigsBooleanComponent { @Input() configuration: ConfigItem; constructor(public configService: ConfigurationService) {} } diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-number/consul-configs-number.component.html b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-number/service-configs-number.component.html similarity index 100% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-number/consul-configs-number.component.html rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-number/service-configs-number.component.html diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-number/consul-configs-number.component.ts b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-number/service-configs-number.component.ts similarity index 87% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-number/consul-configs-number.component.ts rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-number/service-configs-number.component.ts index f530fa7a3..ecf3b139b 100644 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-number/consul-configs-number.component.ts +++ b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-number/service-configs-number.component.ts @@ -22,10 +22,9 @@ import { ConfigItem } from '@streampipes/platform-services'; @Component({ selector: 'sp-consul-configs-number', - templateUrl: './consul-configs-number.component.html', - styleUrls: ['./consul-configs-number.component.css'], + templateUrl: './service-configs-number.component.html', }) -export class ConsulConfigsNumberComponent { +export class ServiceConfigsNumberComponent { @Input() configuration: ConfigItem; constructor(public configService: ConfigurationService) {} } diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-password/consul-configs-password.component.css b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-password/service-configs-password.component.css similarity index 100% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-password/consul-configs-password.component.css rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-password/service-configs-password.component.css diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-password/consul-configs-password.component.html b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-password/service-configs-password.component.html similarity index 100% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-password/consul-configs-password.component.html rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-password/service-configs-password.component.html diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-password/consul-configs-password.component.spec.ts b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-password/service-configs-password.component.spec.ts similarity index 91% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-password/consul-configs-password.component.spec.ts rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-password/service-configs-password.component.spec.ts index 4ac5314c6..b3a72508b 100644 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-password/consul-configs-password.component.spec.ts +++ b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-password/service-configs-password.component.spec.ts @@ -19,7 +19,7 @@ import { DebugElement } from '@angular/core'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { ConsulConfigsPasswordComponent } from './consul-configs-password.component'; +import { ServiceConfigsPasswordComponent } from './service-configs-password.component'; import { ConfigurationService } from '../../../../shared/configuration.service'; import { CommonModule } from '@angular/common'; import { FlexLayoutModule } from '@ngbracket/ngx-layout'; @@ -34,11 +34,11 @@ import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatTooltipModule } from '@angular/material/tooltip'; describe('ConsulConfigsPasswordComponent', () => { - let fixture: ComponentFixture<ConsulConfigsPasswordComponent>; + let fixture: ComponentFixture<ServiceConfigsPasswordComponent>; let configurationServiceStub: Partial<ConfigurationService>; - let component: ConsulConfigsPasswordComponent; + let component: ServiceConfigsPasswordComponent; let configurationServcie: ConfigurationService; @@ -68,7 +68,7 @@ describe('ConsulConfigsPasswordComponent', () => { FormsModule, HttpClientTestingModule, ], - declarations: [ConsulConfigsPasswordComponent], + declarations: [ServiceConfigsPasswordComponent], providers: [ { provide: ConfigurationService, @@ -77,7 +77,7 @@ describe('ConsulConfigsPasswordComponent', () => { ], }).compileComponents(); - fixture = TestBed.createComponent(ConsulConfigsPasswordComponent); + fixture = TestBed.createComponent(ServiceConfigsPasswordComponent); configurationServcie = fixture.debugElement.injector.get(ConfigurationService); diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-password/consul-configs-password.component.ts b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-password/service-configs-password.component.ts similarity index 91% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-password/consul-configs-password.component.ts rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-password/service-configs-password.component.ts index 23d2f5527..cccf0d7e7 100644 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-password/consul-configs-password.component.ts +++ b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-password/service-configs-password.component.ts @@ -24,11 +24,11 @@ const hiddenPasswordString = '*****'; @Component({ selector: 'sp-consul-configs-password', - templateUrl: './consul-configs-password.component.html', - styleUrls: ['./consul-configs-password.component.css'], + templateUrl: './service-configs-password.component.html', + styleUrls: ['./service-configs-password.component.css'], providers: [ConfigurationService], }) -export class ConsulConfigsPasswordComponent { +export class ServiceConfigsPasswordComponent { @Input() configuration: ConfigItem; password: string; diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-text/consul-configs-text.component.html b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-text/service-configs-text.component.html similarity index 100% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-text/consul-configs-text.component.html rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-text/service-configs-text.component.html diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-text/consul-configs-text.component.ts b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-text/service-configs-text.component.ts similarity index 88% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-text/consul-configs-text.component.ts rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-text/service-configs-text.component.ts index d86c09041..20c3a2082 100644 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs-text/consul-configs-text.component.ts +++ b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs-text/service-configs-text.component.ts @@ -22,11 +22,10 @@ import { ConfigItem } from '@streampipes/platform-services'; @Component({ selector: 'sp-consul-configs-text', - templateUrl: './consul-configs-text.component.html', - styleUrls: ['./consul-configs-text.component.css'], + templateUrl: './service-configs-text.component.html', providers: [ConfigurationService], }) -export class ConsulConfigsTextComponent { +export class ServiceConfigsTextComponent { @Input() configuration: ConfigItem; constructor(public configService: ConfigurationService) {} } diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs.component.html b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs.component.html similarity index 100% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs.component.html rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs.component.html diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs.component.ts b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs.component.ts similarity index 90% rename from ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs.component.ts rename to ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs.component.ts index 9d59368e4..8bfce5ba1 100644 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/consul-configs/consul-configs.component.ts +++ b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs.component.ts @@ -22,11 +22,10 @@ import { SpServiceConfiguration } from '@streampipes/platform-services'; @Component({ selector: 'sp-consul-configs', - templateUrl: './consul-configs.component.html', - styleUrls: ['./consul-configs.component.css'], + templateUrl: './service-configs.component.html', providers: [XsService], }) -export class ConsulConfigsComponent { +export class ServiceConfigsComponent { @Input() consulService: SpServiceConfiguration; @Output() updateConsulService: EventEmitter<SpServiceConfiguration> = new EventEmitter<SpServiceConfiguration>(); diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-management.component.ts b/ui/src/app/configuration/extensions-service-management/extensions-service-management.component.ts index 37aa63b53..2f3dff556 100644 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-management.component.ts +++ b/ui/src/app/configuration/extensions-service-management/extensions-service-management.component.ts @@ -16,19 +16,7 @@ * */ -import { Component, OnInit, ViewChild } from '@angular/core'; -import { - animate, - state, - style, - transition, - trigger, -} from '@angular/animations'; -import { ConfigurationService } from '../shared/configuration.service'; -import { StreampipesPeContainer } from '../shared/streampipes-pe-container.model'; -import { StreampipesPeContainerConifgs } from '../shared/streampipes-pe-container-configs'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatTableDataSource } from '@angular/material/table'; +import { Component, OnInit } from '@angular/core'; import { SpConfigurationTabs } from '../configuration-tabs'; import { SpBreadcrumbService } from '@streampipes/shared-ui'; import { SpConfigurationRoutes } from '../configuration.routes'; diff --git a/ui/src/app/configuration/security-configuration/abstract-security-principal-config.ts b/ui/src/app/configuration/security-configuration/abstract-security-principal-config.ts index 7bb388d2e..998f9e8e1 100644 --- a/ui/src/app/configuration/security-configuration/abstract-security-principal-config.ts +++ b/ui/src/app/configuration/security-configuration/abstract-security-principal-config.ts @@ -23,8 +23,8 @@ import { MatTableDataSource } from '@angular/material/table'; import { ServiceAccount, UserAccount, - UserService, UserAdminService, + UserService, } from '@streampipes/platform-services'; import { Observable } from 'rxjs'; import { DialogService, PanelType } from '@streampipes/shared-ui'; diff --git a/ui/src/app/configuration/security-configuration/edit-user-dialog/edit-user-dialog.component.ts b/ui/src/app/configuration/security-configuration/edit-user-dialog/edit-user-dialog.component.ts index a8a268b18..03fa4641b 100644 --- a/ui/src/app/configuration/security-configuration/edit-user-dialog/edit-user-dialog.component.ts +++ b/ui/src/app/configuration/security-configuration/edit-user-dialog/edit-user-dialog.component.ts @@ -20,12 +20,12 @@ import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { CurrentUserService, DialogRef } from '@streampipes/shared-ui'; import { Group, + MailConfigService, Role, ServiceAccount, UserAccount, - MailConfigService, - UserService, UserGroupService, + UserService, } from '@streampipes/platform-services'; import { AbstractControl, diff --git a/ui/src/app/configuration/security-configuration/user-group-configuration/user-group-configuration.component.ts b/ui/src/app/configuration/security-configuration/user-group-configuration/user-group-configuration.component.ts index 24f05e948..d4f23cf61 100644 --- a/ui/src/app/configuration/security-configuration/user-group-configuration/user-group-configuration.component.ts +++ b/ui/src/app/configuration/security-configuration/user-group-configuration/user-group-configuration.component.ts @@ -21,7 +21,7 @@ import { Group, UserGroupService } from '@streampipes/platform-services'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; -import { PanelType, DialogService } from '@streampipes/shared-ui'; +import { DialogService, PanelType } from '@streampipes/shared-ui'; import { EditGroupDialogComponent } from '../edit-group-dialog/edit-group-dialog.component'; @Component({ diff --git a/ui/src/app/configuration/shared/configuration.service.spec.ts b/ui/src/app/configuration/shared/configuration.service.spec.ts index 61f3355f6..c1138d8d8 100644 --- a/ui/src/app/configuration/shared/configuration.service.spec.ts +++ b/ui/src/app/configuration/shared/configuration.service.spec.ts @@ -22,7 +22,6 @@ import { HttpTestingController, } from '@angular/common/http/testing'; import { ConfigurationService } from './configuration.service'; -import { StreampipesPeContainer } from './streampipes-pe-container.model'; import { SpServiceConfiguration } from '../../../../projects/streampipes/platform-services/src/lib/model/gen/streampipes-model'; describe('ConfigurationService', () => { diff --git a/ui/src/app/configuration/shared/configuration.service.ts b/ui/src/app/configuration/shared/configuration.service.ts index 7eba82ad9..e23c8ce32 100644 --- a/ui/src/app/configuration/shared/configuration.service.ts +++ b/ui/src/app/configuration/shared/configuration.service.ts @@ -20,8 +20,6 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; - -import { StreampipesPeContainer } from './streampipes-pe-container.model'; import { MessagingSettings } from './messaging-settings.model'; import { MultipartUtils } from './multipart-utils'; import { diff --git a/ui/src/app/configuration/shared/configuration.test.service.ts b/ui/src/app/configuration/shared/configuration.test.service.ts deleted file mode 100644 index b762f7cc8..000000000 --- a/ui/src/app/configuration/shared/configuration.test.service.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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 { Injectable } from '@angular/core'; -import { Observable, of } from 'rxjs'; - -import { StreampipesPeContainer } from './streampipes-pe-container.model'; -import { StreampipesPeContainerConifgs } from './streampipes-pe-container-configs'; - -@Injectable() -export class ConfigurationMockService { - constructor() {} - - getServerUrl() { - return '/streampipes-backend'; - } - - getConsulServices(): Observable<StreampipesPeContainer[]> { - const config: StreampipesPeContainerConifgs[] = []; - config[0] = new StreampipesPeContainerConifgs(); - config[0].description = 'test int'; - config[0].key = 'testint'; - config[0].value = '80'; - config[0].valueType = 'xs:integer'; - config[0].isPassword = false; - - return of([ - { - mainKey: 'sp/test/1', - meta: { - status: 'passing', - }, - name: 'test1', - configs: [ - config[0], - { - key: 'teststring', - value: '765', - valueType: 'xs:string', - isPassword: false, - description: 'test string', - }, - ], - }, - { - mainKey: 'sp/test/2', - meta: { - status: 'critical', - }, - name: 'test2', - configs: [ - { - key: 'testbool', - value: 'false', - valueType: 'xs:boolean', - isPassword: false, - description: 'test bool', - }, - ], - }, - ] as StreampipesPeContainer[]); - } - - updateConsulService( - consulService: StreampipesPeContainer, - ): Observable<Object> { - return of({}); - } -} diff --git a/ui/src/app/configuration/shared/streampipes-pe-container-configs.ts b/ui/src/app/configuration/shared/streampipes-pe-container-configs.ts deleted file mode 100644 index bc3a211df..000000000 --- a/ui/src/app/configuration/shared/streampipes-pe-container-configs.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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. - * - */ - -export class StreampipesPeContainerConifgs { - valueType: string; - isPassword: boolean; - description: string; - key: string; - value: string | number | boolean; -} diff --git a/ui/src/app/configuration/shared/streampipes-pe-container.model.ts b/ui/src/app/configuration/shared/streampipes-pe-container.model.ts deleted file mode 100644 index 5061bad88..000000000 --- a/ui/src/app/configuration/shared/streampipes-pe-container.model.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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 { StreampipesPeContainerConifgs } from './streampipes-pe-container-configs'; - -// ConsulService = StreampipesPeContainer ERLEDIGT -export interface StreampipesPeContainer { - name: string; - mainKey: string; - meta: { - status: string; - }; - configs: [StreampipesPeContainerConifgs]; -}
