diff --git a/ui/src/app/configuration/configuration.module.ts b/ui/src/app/configuration/configuration.module.ts index db24cb548d..f0cc6b5915 100644 --- a/ui/src/app/configuration/configuration.module.ts +++ b/ui/src/app/configuration/configuration.module.ts @@ -61,9 +61,10 @@ import { ServiceConfigsTextComponent } from './extensions-service-management/ext 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 { SpRegisteredExtensionsServiceComponent } from './extensions-service-management/registered-extensions-services/registered-extensions-services.component'; import { SpExtensionsServiceConfigurationComponent } from './extensions-service-management/extensions-service-configuration/extensions-service-configuration.component'; import { SpMessagingBrokerConfigComponent } from './messaging-configuration/broker-config/broker-config.component'; +import { SpExtensionsServiceDetailsDialogComponent } from './dialog/extensions-service-details/extensions-service-details-dialog.component'; @NgModule({ imports: [ @@ -154,6 +155,7 @@ import { SpMessagingBrokerConfigComponent } from './messaging-configuration/brok SpDataExportItemComponent, SpDataImportDialogComponent, SpEditLabelComponent, + SpExtensionsServiceDetailsDialogComponent, SpLabelConfigurationComponent, SpMessagingBrokerConfigComponent, SpRegisteredExtensionsServiceComponent, diff --git a/ui/src/app/configuration/dialog/extensions-service-details/extensions-service-details-dialog.component.html b/ui/src/app/configuration/dialog/extensions-service-details/extensions-service-details-dialog.component.html new file mode 100644 index 0000000000..6b3bee9038 --- /dev/null +++ b/ui/src/app/configuration/dialog/extensions-service-details/extensions-service-details-dialog.component.html @@ -0,0 +1,69 @@ + + +
+
+
+
+
Service ID
+
{{ serviceReg.svcId }}
+
+
+
Service Group
+
{{ serviceReg.svcGroup }}
+
+
+
Location
+
+ {{ serviceReg.scheme }}://{{ serviceReg.host }}:{{ + serviceReg.port + }} +
+
+
+
Tags
+
+
+
+ {{ + tag.prefix.toLowerCase() + }} + {{ + tag.value + }} +
+
+
+
+
+
+ +
+ +
+
diff --git a/ui/src/app/configuration/dialog/extensions-service-details/extensions-service-details-dialog.component.scss b/ui/src/app/configuration/dialog/extensions-service-details/extensions-service-details-dialog.component.scss new file mode 100644 index 0000000000..eb97e719b0 --- /dev/null +++ b/ui/src/app/configuration/dialog/extensions-service-details/extensions-service-details-dialog.component.scss @@ -0,0 +1,40 @@ +/*! + * 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 '../../../../scss/sp/sp-dialog.scss'; + +.service-tag { + border-radius: 5px; + margin-right: 10px; + margin-top: 5px; + margin-bottom: 5px; + font-size: small; + border: 1px solid var(--color-bg-3); + display: inline-block; + padding-top: 5px; + padding-bottom: 5px; +} + +.service-tag-prefix { + padding: 5px; +} + +.service-tag-value { + padding: 5px; + font-weight: bold; +} diff --git a/ui/src/app/configuration/dialog/extensions-service-details/extensions-service-details-dialog.component.ts b/ui/src/app/configuration/dialog/extensions-service-details/extensions-service-details-dialog.component.ts new file mode 100644 index 0000000000..5e597ffc5e --- /dev/null +++ b/ui/src/app/configuration/dialog/extensions-service-details/extensions-service-details-dialog.component.ts @@ -0,0 +1,39 @@ +/* + * 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, Input } from '@angular/core'; +import { DialogRef } from '@streampipes/shared-ui'; +import { SpServiceRegistration } from '@streampipes/platform-services'; + +@Component({ + selector: 'sp-extensions-service-details-dialog', + templateUrl: './extensions-service-details-dialog.component.html', + styleUrls: ['./extensions-service-details-dialog.component.scss'], +}) +export class SpExtensionsServiceDetailsDialogComponent { + @Input() + serviceReg: SpServiceRegistration; + + constructor( + private dialogRef: DialogRef, + ) {} + + close() { + this.dialogRef.close(); + } +} diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/extensions-service-configuration.component.html b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/extensions-service-configuration.component.html index 18dd75698d..f13afbfa03 100644 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/extensions-service-configuration.component.html +++ b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/extensions-service-configuration.component.html @@ -25,15 +25,15 @@ > - Service Name + Service Group - Action + @@ -100,10 +106,10 @@ " >
- + >
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 38bdad6055..96855639b4 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 @@ -65,7 +65,6 @@ export class SpExtensionsServiceConfigurationComponent { const sortedServices = this.sort(response); this.consulServices = sortedServices; this.dataSource.data = sortedServices; - console.log(this.consulServices); }, error => { console.error(error); diff --git a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs.component.html b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs.component.html index 477c716102..9f6e1734f2 100644 --- a/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs.component.html +++ b/ui/src/app/configuration/extensions-service-management/extensions-service-configuration/service-configs/service-configs.component.html @@ -26,6 +26,7 @@ fxLayout="column" *ngFor="let configuration of consulService.configs" > +
{{ configuration.key }}
+ + + Service Group + + + {{ element.svcGroup }} + + + + + + + + + + + + - diff --git a/ui/src/app/configuration/extensions-service-management/registrered-extensions-services/registered-extensions-services.component.scss b/ui/src/app/configuration/extensions-service-management/registered-extensions-services/registered-extensions-services.component.scss similarity index 100% rename from ui/src/app/configuration/extensions-service-management/registrered-extensions-services/registered-extensions-services.component.scss rename to ui/src/app/configuration/extensions-service-management/registered-extensions-services/registered-extensions-services.component.scss diff --git a/ui/src/app/configuration/extensions-service-management/registrered-extensions-services/registered-extensions-services.component.ts b/ui/src/app/configuration/extensions-service-management/registered-extensions-services/registered-extensions-services.component.ts similarity index 70% rename from ui/src/app/configuration/extensions-service-management/registrered-extensions-services/registered-extensions-services.component.ts rename to ui/src/app/configuration/extensions-service-management/registered-extensions-services/registered-extensions-services.component.ts index cb1f3a50cf..437c56cde1 100644 --- a/ui/src/app/configuration/extensions-service-management/registrered-extensions-services/registered-extensions-services.component.ts +++ b/ui/src/app/configuration/extensions-service-management/registered-extensions-services/registered-extensions-services.component.ts @@ -21,6 +21,8 @@ import { MatPaginator } from '@angular/material/paginator'; import { MatTableDataSource } from '@angular/material/table'; import { SpServiceRegistration } from '@streampipes/platform-services'; import { ConfigurationService } from '../../shared/configuration.service'; +import { DialogService, PanelType } from '@streampipes/shared-ui'; +import { SpExtensionsServiceDetailsDialogComponent } from '../../dialog/extensions-service-details/extensions-service-details-dialog.component'; @Component({ selector: 'sp-registered-extensions-services', @@ -28,11 +30,14 @@ import { ConfigurationService } from '../../shared/configuration.service'; styleUrls: ['./registered-extensions-services.component.scss'], }) export class SpRegisteredExtensionsServiceComponent { - displayedColumns: string[] = ['status', 'name']; + displayedColumns: string[] = ['status', 'name', 'group', 'action']; @ViewChild(MatPaginator, { static: false }) paginator: MatPaginator; dataSource = new MatTableDataSource(); - constructor(private configurationService: ConfigurationService) { + constructor( + private configurationService: ConfigurationService, + private dialogService: DialogService, + ) { this.getRegisteredServices(); } @@ -43,4 +48,15 @@ export class SpRegisteredExtensionsServiceComponent { this.dataSource.data = res; }); } + + openServiceDetails(serviceReg: SpServiceRegistration) { + this.dialogService.open(SpExtensionsServiceDetailsDialogComponent, { + panelType: PanelType.STANDARD_PANEL, + title: 'Service details', + width: '70vw', + data: { + serviceReg, + }, + }); + } }