diff --git a/gateway-admin-ui/.eslintrc.json b/gateway-admin-ui/.eslintrc.json
deleted file mode 100644
index 71378a09f6..0000000000
--- a/gateway-admin-ui/.eslintrc.json
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- "root": true,
- "overrides": [
- {
- "files": [
- "*.ts"
- ],
- "parserOptions": {
- "project": [
- "admin-ui/tsconfig.json"
- ],
- "createDefaultProgram": true
- },
- "extends": [
- "plugin:@angular-eslint/recommended",
- "plugin:@angular-eslint/template/process-inline-templates"
- ],
- "rules": {
- "@typescript-eslint/naming-convention": [
- "error",
- {
- "selector": ["class"],
- "format": ["PascalCase"]
- }
- ],
- "spaced-comment": "error",
- "curly": "error",
- "eol-last": "error",
- "guard-for-in": "error",
- "no-unused-labels": "error",
- "max-len": [
- "error",
- { "code": 140 }
- ],
- "@typescript-eslint/explicit-member-accessibility": [
- "off",
- {"accessibility": "no-public"}
- ],
- "@typescript-eslint/member-ordering": [
- "error",
- { "default": ["static-field", "instance-field", "field", "method"] }
- ],
- "no-caller": "error",
- "no-bitwise": "error",
- "no-console": "off",
- "no-new-wrappers": "error",
- "no-debugger": "error",
- "no-redeclare": "off",
- "no-empty": "error",
- "no-eval": "error",
- "@typescript-eslint/no-inferrable-types": "error",
- "no-shadow": "error",
- "dot-notation": "off",
- "no-fallthrough": "error",
- "no-trailing-spaces": "error",
- "no-unused-expressions": "error",
- "no-var": "error",
- "sort-keys": "off",
- "brace-style": ["error","1tbs", { "allowSingleLine": true }],
- "quotes": ["error", "single"],
- "radix": "error",
- "@typescript-eslint/semi": "error",
- "eqeqeq": ["error", "always", {"null": "ignore"}],
- "@typescript-eslint/type-annotation-spacing": "error",
- "@angular-eslint/directive-selector": [
- "error",
- {
- "type": "attribute",
- "prefix": "app",
- "style": "camelCase"
- }
- ],
- "@angular-eslint/component-selector": [
- "error",
- {
- "type": "element",
- "prefix": "app",
- "style": "kebab-case"
- }
- ],
- "@angular-eslint/no-input-rename": "off",
- "@angular-eslint/no-output-rename": "error",
- "@angular-eslint/use-pipe-transform-interface": "error",
- "@angular-eslint/component-class-suffix": "error",
- "@angular-eslint/directive-class-suffix": "error"
- }
- },
- {
- "files": [
- "*.html"
- ],
- "extends": [
- "plugin:@angular-eslint/template/recommended"
- ],
- "rules": {}
- }
- ]
-}
diff --git a/gateway-admin-ui/admin-ui/app/app.component.spec.ts b/gateway-admin-ui/admin-ui/app/app.component.spec.ts
deleted file mode 100644
index f341605862..0000000000
--- a/gateway-admin-ui/admin-ui/app/app.component.spec.ts
+++ /dev/null
@@ -1,53 +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.
- */
-/* tslint:disable:no-unused-variable */
-import {AppComponent} from './app.component';
-
-import {TestBed} from '@angular/core/testing';
-
-import {By} from '@angular/platform-browser';
-
-// SPECS
-
-// Delete this
-describe('Smoke test', () => {
- it('should run a passing test', () => {
- expect(true).toEqual(true, 'should pass');
- });
-});
-
-describe('AppComponent with TCB', function () {
- beforeEach(() => {
- TestBed.configureTestingModule({declarations: [AppComponent]});
- });
-
- it('should instantiate component', () => {
- let fixture = TestBed.createComponent(AppComponent);
- expect(fixture.componentInstance instanceof AppComponent).toBe(true, 'should create AppComponent');
- });
-
- it('should have expected
text', () => {
- let fixture = TestBed.createComponent(AppComponent);
- fixture.detectChanges();
-
- let h1 = fixture.debugElement.query(el => el.name === 'h1').nativeElement; // it works
-
- h1 = fixture.debugElement.query(By.css('h1')).nativeElement; // preferred
-
- expect(h1.innerText).toMatch(/angular 2 app/i, '
should say something about "Angular 2 App"');
- });
-});
diff --git a/gateway-admin-ui/admin-ui/app/app.component.ts b/gateway-admin-ui/admin-ui/app/app.component.ts
index 63fd7e777b..d2bed8c8a3 100644
--- a/gateway-admin-ui/admin-ui/app/app.component.ts
+++ b/gateway-admin-ui/admin-ui/app/app.component.ts
@@ -15,14 +15,14 @@
* limitations under the License.
*/
import {Component} from '@angular/core';
-import {TopologyService} from './topology.service';
-import {ServiceDefinitionService} from './service-definition/servicedefinition.service';
-import {ResourceTypesService} from './resourcetypes/resourcetypes.service';
+import {ResourcetypesComponent} from './resourcetypes/resourcetypes.component';
+import {ResourceComponent} from './resource/resource.component';
+import {ResourceDetailComponent} from './resource-detail/resource-detail.component';
@Component({
selector: 'app-resource-management',
template: `
-
+
@@ -36,12 +36,8 @@ import {ResourceTypesService} from './resourcetypes/resourcetypes.service';
`,
- providers: [TopologyService, ServiceDefinitionService, ResourceTypesService]
+ imports: [ResourcetypesComponent, ResourceComponent, ResourceDetailComponent]
})
export class AppComponent {
- constructor(private topologyService: TopologyService,
- private serviceDefinitionService: ServiceDefinitionService,
- private resourcetypesService: ResourceTypesService) {
- }
}
diff --git a/gateway-admin-ui/admin-ui/app/app.module.ts b/gateway-admin-ui/admin-ui/app/app.module.ts
deleted file mode 100644
index bc51ea9e94..0000000000
--- a/gateway-admin-ui/admin-ui/app/app.module.ts
+++ /dev/null
@@ -1,97 +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 {NgModule} from '@angular/core';
-import {DataTableModule} from 'angular2-datatable';
-import {BrowserModule} from '@angular/platform-browser';
-import {HttpClientModule, HttpClientXsrfModule} from '@angular/common/http';
-import {FormsModule} from '@angular/forms';
-import {CustomFormsModule} from 'ng2-validation';
-import {APP_BASE_HREF} from '@angular/common';
-
-import {AppComponent} from './app.component';
-import {TopologyService} from './topology.service';
-import {ServiceDefinitionService} from './service-definition/servicedefinition.service';
-import {ServiceDefinitionDetailComponent} from './service-definition/servicedefinition-detail.component';
-import {NewServiceDefinitionComponent} from './service-definition/new-service-definition.component';
-import {GatewayVersionService} from './gateway-version.service';
-import {GatewayVersionComponent} from './gateway-version.component';
-import {TopologyComponent} from './topology.component';
-import {TopologyDetailComponent} from './topology-detail.component';
-import {XmlPipe} from './utils/xml.pipe';
-import {JsonPrettyPipe} from './utils/json-pretty.pipe';
-import {TabComponent} from './utils/tab.component';
-import {TabsComponent} from './utils/tabs.component';
-
-import {AceEditorModule} from 'ng2-ace-editor';
-import {BsModalModule} from 'ng2-bs3-modal';
-import {ResourcetypesComponent} from './resourcetypes/resourcetypes.component';
-import {ResourceTypesService} from './resourcetypes/resourcetypes.service';
-import {ResourceComponent} from './resource/resource.component';
-import {ResourceService} from './resource/resource.service';
-import {DescriptorComponent} from './descriptor/descriptor.component';
-import {ResourceDetailComponent} from './resource-detail/resource-detail.component';
-import {ProviderConfigSelectorComponent} from './provider-config-selector/provider-config-selector.component';
-import {NewDescWizardComponent} from './new-desc-wizard/new-desc-wizard.component';
-import {ProviderConfigWizardComponent} from './provider-config-wizard/provider-config-wizard.component';
-import {SessionInformationComponent} from './sessionInformation/session.information.component';
-import {SafeHtmlPipe} from './sessionInformation/session.information.component';
-
-@NgModule({
- imports: [BrowserModule,
- HttpClientModule,
- HttpClientXsrfModule,
- FormsModule,
- CustomFormsModule,
- BsModalModule,
- AceEditorModule,
- DataTableModule
- ],
- declarations: [AppComponent,
- TopologyComponent,
- TopologyDetailComponent,
- ServiceDefinitionDetailComponent,
- NewServiceDefinitionComponent,
- GatewayVersionComponent,
- XmlPipe,
- JsonPrettyPipe,
- TabsComponent,
- TabComponent,
- ResourcetypesComponent,
- ResourceComponent,
- DescriptorComponent,
- ResourceDetailComponent,
- ProviderConfigSelectorComponent,
- NewDescWizardComponent,
- ProviderConfigWizardComponent,
- SessionInformationComponent,
- SafeHtmlPipe
- ],
- providers: [TopologyService,
- ServiceDefinitionService,
- GatewayVersionService,
- ResourceComponent,
- ResourceTypesService,
- ResourceService,
- {provide: APP_BASE_HREF, useValue: '/'}
- ],
- bootstrap: [AppComponent,
- GatewayVersionComponent,
- SessionInformationComponent
- ]
-})
-export class AppModule {
-}
diff --git a/gateway-admin-ui/admin-ui/app/descriptor/descriptor.component.css b/gateway-admin-ui/admin-ui/app/descriptor/descriptor.component.css
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/gateway-admin-ui/admin-ui/app/descriptor/descriptor.component.html b/gateway-admin-ui/admin-ui/app/descriptor/descriptor.component.html
deleted file mode 100644
index c4e7fc1ef8..0000000000
--- a/gateway-admin-ui/admin-ui/app/descriptor/descriptor.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
- descriptor works!
-
diff --git a/gateway-admin-ui/admin-ui/app/descriptor/descriptor.component.spec.ts b/gateway-admin-ui/admin-ui/app/descriptor/descriptor.component.spec.ts
deleted file mode 100644
index 850d7064b9..0000000000
--- a/gateway-admin-ui/admin-ui/app/descriptor/descriptor.component.spec.ts
+++ /dev/null
@@ -1,41 +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 {async, ComponentFixture, TestBed} from '@angular/core/testing';
-
-import {DescriptorComponent} from './descriptor.component';
-
-describe('DescriptorComponent', () => {
- let component: DescriptorComponent;
- let fixture: ComponentFixture;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- declarations: [DescriptorComponent]
- })
- .compileComponents();
- }));
-
- beforeEach(() => {
- fixture = TestBed.createComponent(DescriptorComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/gateway-admin-ui/admin-ui/app/descriptor/descriptor.component.ts b/gateway-admin-ui/admin-ui/app/descriptor/descriptor.component.ts
deleted file mode 100644
index c0a4471641..0000000000
--- a/gateway-admin-ui/admin-ui/app/descriptor/descriptor.component.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 {Component, OnInit} from '@angular/core';
-
-@Component({
- selector: 'app-descriptor',
- templateUrl: './descriptor.component.html',
- styleUrls: ['./descriptor.component.css']
-})
-export class DescriptorComponent {
-
- constructor() {
- }
-
-}
diff --git a/gateway-admin-ui/admin-ui/app/gateway-version.component.ts b/gateway-admin-ui/admin-ui/app/gateway-version/gateway-version.component.ts
similarity index 62%
rename from gateway-admin-ui/admin-ui/app/gateway-version.component.ts
rename to gateway-admin-ui/admin-ui/app/gateway-version/gateway-version.component.ts
index 602e889e6e..4f315a488d 100644
--- a/gateway-admin-ui/admin-ui/app/gateway-version.component.ts
+++ b/gateway-admin-ui/admin-ui/app/gateway-version/gateway-version.component.ts
@@ -15,17 +15,39 @@
* limitations under the License.
*/
import {Component, OnInit} from '@angular/core';
-import {GatewayVersion} from './gateway-version';
-import {GatewayVersionService} from './gateway-version.service';
+import {GatewayVersion} from '../model/gateway-version';
+import {GatewayVersionService} from '../service/gateway-version.service';
+
@Component({
selector: 'app-gateway-version',
template: `
-
- Version {{this.gatewayVersion.version}}
- Hash {{this.gatewayVersion.hash}}
-
`,
- providers: [GatewayVersionService]
+ @if (gatewayVersion) {
+ Version {{gatewayVersion.version}}
+ |
+ Hash {{gatewayVersion.hash}}
+ }
+ `,
+ styles: [`
+ :host {
+ display: inline;
+ }
+
+ .version-item {
+ font-size: 12px;
+ color: #888;
+ }
+
+ .version-item strong {
+ color: #555;
+ margin-right: 3px;
+ }
+
+ .version-divider {
+ margin: 0 8px;
+ color: #ccc;
+ }
+ `]
})
export class GatewayVersionComponent implements OnInit {
@@ -42,4 +64,3 @@ export class GatewayVersionComponent implements OnInit {
this.getVersion();
}
}
-
diff --git a/gateway-admin-ui/admin-ui/app/index.ts b/gateway-admin-ui/admin-ui/app/index.ts
deleted file mode 100644
index d7b550ca9e..0000000000
--- a/gateway-admin-ui/admin-ui/app/index.ts
+++ /dev/null
@@ -1,18 +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 * from './app.component';
-export * from './app.module';
diff --git a/gateway-admin-ui/admin-ui/app/main.ts b/gateway-admin-ui/admin-ui/app/main.ts
deleted file mode 100644
index 03ea8874ff..0000000000
--- a/gateway-admin-ui/admin-ui/app/main.ts
+++ /dev/null
@@ -1,21 +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 {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
-
-import {AppModule} from './app.module';
-
-platformBrowserDynamic().bootstrapModule(AppModule);
diff --git a/gateway-admin-ui/admin-ui/app/resource-detail/descriptor.ts b/gateway-admin-ui/admin-ui/app/model/descriptor.ts
similarity index 98%
rename from gateway-admin-ui/admin-ui/app/resource-detail/descriptor.ts
rename to gateway-admin-ui/admin-ui/app/model/descriptor.ts
index 85d90ae022..e9ee90cadb 100644
--- a/gateway-admin-ui/admin-ui/app/resource-detail/descriptor.ts
+++ b/gateway-admin-ui/admin-ui/app/model/descriptor.ts
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import {Service} from '../resource/service';
+import {Service} from './service';
export class Descriptor {
discoveryType: string;
diff --git a/gateway-admin-ui/admin-ui/app/gateway-version.ts b/gateway-admin-ui/admin-ui/app/model/gateway-version.ts
similarity index 100%
rename from gateway-admin-ui/admin-ui/app/gateway-version.ts
rename to gateway-admin-ui/admin-ui/app/model/gateway-version.ts
diff --git a/gateway-admin-ui/admin-ui/app/resource-detail/provider-config.ts b/gateway-admin-ui/admin-ui/app/model/provider-config.ts
similarity index 100%
rename from gateway-admin-ui/admin-ui/app/resource-detail/provider-config.ts
rename to gateway-admin-ui/admin-ui/app/model/provider-config.ts
diff --git a/gateway-admin-ui/admin-ui/app/resource/resource.ts b/gateway-admin-ui/admin-ui/app/model/resource.ts
similarity index 95%
rename from gateway-admin-ui/admin-ui/app/resource/resource.ts
rename to gateway-admin-ui/admin-ui/app/model/resource.ts
index 1cdc2e8ba0..b8774ce198 100644
--- a/gateway-admin-ui/admin-ui/app/resource/resource.ts
+++ b/gateway-admin-ui/admin-ui/app/model/resource.ts
@@ -18,8 +18,6 @@
export class Resource {
timestamp: number;
name: string;
- uri: string;
href: string;
- content: string;
service: string;
}
diff --git a/gateway-admin-ui/admin-ui/app/resource/service.ts b/gateway-admin-ui/admin-ui/app/model/service.ts
similarity index 100%
rename from gateway-admin-ui/admin-ui/app/resource/service.ts
rename to gateway-admin-ui/admin-ui/app/model/service.ts
diff --git a/gateway-admin-ui/admin-ui/app/service-definition/servicedefinition.ts b/gateway-admin-ui/admin-ui/app/model/servicedefinition.ts
similarity index 89%
rename from gateway-admin-ui/admin-ui/app/service-definition/servicedefinition.ts
rename to gateway-admin-ui/admin-ui/app/model/servicedefinition.ts
index 8a71e6a49c..456914855a 100644
--- a/gateway-admin-ui/admin-ui/app/service-definition/servicedefinition.ts
+++ b/gateway-admin-ui/admin-ui/app/model/servicedefinition.ts
@@ -14,11 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import {RewriteRules} from './rewrite.rules';
-import {Service} from './service';
-
export class ServiceDefinition {
- name: string;
service: string;
role: string;
version: string;
diff --git a/gateway-admin-ui/admin-ui/app/sessionInformation/session.information.ts b/gateway-admin-ui/admin-ui/app/model/session-information.ts
similarity index 91%
rename from gateway-admin-ui/admin-ui/app/sessionInformation/session.information.ts
rename to gateway-admin-ui/admin-ui/app/model/session-information.ts
index 8bdefe3d75..98a8dbcfbc 100644
--- a/gateway-admin-ui/admin-ui/app/sessionInformation/session.information.ts
+++ b/gateway-admin-ui/admin-ui/app/model/session-information.ts
@@ -17,8 +17,5 @@
export class SessionInformation {
user: string;
- logoutUrl: string;
- logoutPageUrl: string;
- globalLgoutPageUrl: string;
bannerText: string;
}
diff --git a/gateway-admin-ui/admin-ui/app/topology.ts b/gateway-admin-ui/admin-ui/app/model/topology.ts
similarity index 100%
rename from gateway-admin-ui/admin-ui/app/topology.ts
rename to gateway-admin-ui/admin-ui/app/model/topology.ts
diff --git a/gateway-admin-ui/admin-ui/app/new-desc-wizard/new-desc-wizard.component.css b/gateway-admin-ui/admin-ui/app/new-desc-wizard/new-desc-wizard.component.css
index 0cc494ab8c..1bd97a818f 100644
--- a/gateway-admin-ui/admin-ui/app/new-desc-wizard/new-desc-wizard.component.css
+++ b/gateway-admin-ui/admin-ui/app/new-desc-wizard/new-desc-wizard.component.css
@@ -2,4 +2,27 @@ td {
border-collapse: collapse;
padding: 8px;
vertical-align: top;
+}
+
+.services-table {
+ table-layout: fixed;
+ width: 100%;
+}
+
+.service-checkbox {
+ display: flex;
+ align-items: baseline;
+ gap: 6px;
+ margin: 4px 0;
+ cursor: pointer;
+ font-weight: normal;
+}
+
+.service-checkbox input[type="checkbox"] {
+ flex-shrink: 0;
+}
+
+.service-checkbox span {
+ overflow: hidden;
+ text-overflow: ellipsis;
}
\ No newline at end of file
diff --git a/gateway-admin-ui/admin-ui/app/new-desc-wizard/new-desc-wizard.component.html b/gateway-admin-ui/admin-ui/app/new-desc-wizard/new-desc-wizard.component.html
index 1c9a9770af..4872dcf6e3 100644
--- a/gateway-admin-ui/admin-ui/app/new-desc-wizard/new-desc-wizard.component.html
+++ b/gateway-admin-ui/admin-ui/app/new-desc-wizard/new-desc-wizard.component.html
@@ -1,149 +1,157 @@
-
-
+
+