You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/01/23 16:29:07 UTC
[incubator-streampipes] 22/26: [housekeeping] Remove obsolete AppContainer module
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 868bb0a38a2d87ccf02b2e65e86ea30596eecfd6
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Sun Jan 23 16:16:37 2022 +0100
[housekeeping] Remove obsolete AppContainer module
---
.../app/app-container/app-container.component.css | 25 -----
.../app/app-container/app-container.component.html | 52 ---------
.../app/app-container/app-container.component.ts | 52 ---------
ui/src/app/app-container/app-container.module.ts | 67 ------------
.../app-container/shared/app-container.service.ts | 42 --------
.../app-container/shared/installed-app.model.ts | 24 -----
ui/src/app/app-container/view/view.component.css | 18 ----
ui/src/app/app-container/view/view.component.html | 19 ----
ui/src/app/app-container/view/view.component.ts | 118 ---------------------
9 files changed, 417 deletions(-)
diff --git a/ui/src/app/app-container/app-container.component.css b/ui/src/app/app-container/app-container.component.css
deleted file mode 100644
index 8e55f41..0000000
--- a/ui/src/app/app-container/app-container.component.css
+++ /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.
- *
- */
-
-mat-card {
- box-shadow: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12);
- margin: 10px;
-}
-.page-container-padding-inner {
- margin: 10px;
-}
\ No newline at end of file
diff --git a/ui/src/app/app-container/app-container.component.html b/ui/src/app/app-container/app-container.component.html
deleted file mode 100644
index ee39e96..0000000
--- a/ui/src/app/app-container/app-container.component.html
+++ /dev/null
@@ -1,52 +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 fxLayout="column" fxFlex="100" class="page-container page-container-padding page-container-connect">
- <div fxLayout="row" style="padding:0px;background-color:#f6f6f6;">
- <div fxLayoutAlign="end center" fxLayout="fill"
- style="padding-right:10px; width:100%;min-height:50px;line-height:24px;border-bottom:1px solid #ccc;margin-bottom:1px;">
- <div *ngIf="isAppActive">
- <button mat-button mat-raised-button color="primary" (click)="appClosed()">
- Close App
- </button>
- </div>
- </div>
- </div>
-
- <div class="fixed-height page-container-padding-inner" fxLayout="column" fxFlex="100" *ngIf="!isAppActive">
- <div fxFlex="100" fxLayout="column">
- <h1>My apps</h1>
- <mat-card class="example-card" *ngFor="let installedApp of installedApps">
- <div fxFlex="100" fxLayout="row">
- <div fxFlex="75" fxLayout="column" fxLayoutAlign="center start">
- <mat-card-header>
- <mat-card-title> {{installedApp.name}} - {{installedApp.version}} </mat-card-title>
- <mat-card-subtitle>{{installedApp.description}}</mat-card-subtitle>
- </mat-card-header>
- </div>
- <div fxFlex="25" fxLayoutAlign="center end" fxLayout="column">
- <button mat-button mat-raised-button color="primary" (click)="activateApp(installedApp)">Open
- App
- </button>
- </div>
- </div>
- </mat-card>
- </div>
- </div>
- <view *ngIf="isAppActive" [installedApp]="activeApp"></view>
-</div>
\ No newline at end of file
diff --git a/ui/src/app/app-container/app-container.component.ts b/ui/src/app/app-container/app-container.component.ts
deleted file mode 100644
index 26c004f..0000000
--- a/ui/src/app/app-container/app-container.component.ts
+++ /dev/null
@@ -1,52 +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 {ChangeDetectorRef, Component} from '@angular/core';
-
-import {AppContainerService} from './shared/app-container.service';
-import {InstalledApp} from './shared/installed-app.model';
-
-
-@Component({
- templateUrl: './app-container.component.html',
- styleUrls: ['./app-container.component.css']
-})
-export class AppContainerComponent {
-
- installedApps: InstalledApp[];
- activeApp: InstalledApp;
- isAppActive = false;
-
- constructor(private appContainerService: AppContainerService, private changeDetector: ChangeDetectorRef) {
- this.appContainerService.getInstalledApps().subscribe(installedApps => {
- this.installedApps = installedApps;
- });
- }
-
- activateApp(installedApp: InstalledApp): void {
- this.isAppActive = false;
- this.changeDetector.detectChanges();
- this.activeApp = installedApp;
- this.isAppActive = true;
- }
-
- appClosed() {
- this.isAppActive = false;
- }
-
-}
\ No newline at end of file
diff --git a/ui/src/app/app-container/app-container.module.ts b/ui/src/app/app-container/app-container.module.ts
deleted file mode 100644
index 4ab811c..0000000
--- a/ui/src/app/app-container/app-container.module.ts
+++ /dev/null
@@ -1,67 +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 {Compiler, COMPILER_OPTIONS, CompilerFactory, NgModule} from '@angular/core';
-import {FlexLayoutModule} from '@angular/flex-layout';
-import {CommonModule} from '@angular/common';
-
-import {AppContainerComponent} from './app-container.component';
-import {AppContainerService} from './shared/app-container.service';
-import {ViewComponent} from './view/view.component';
-
-import {JitCompilerFactory} from '@angular/platform-browser-dynamic';
-import {MatDialogModule} from '@angular/material/dialog';
-import {CustomMaterialModule} from '../CustomMaterial/custom-material.module';
-
-@NgModule({
- imports: [
- CommonModule,
- FlexLayoutModule,
- MatDialogModule,
- CustomMaterialModule
- ],
- declarations: [
- AppContainerComponent,
- ViewComponent
- ],
- providers: [
- AppContainerService,
- {
- provide: COMPILER_OPTIONS,
- useValue: {},
- multi: true
- },
- {
- provide: CompilerFactory,
- useClass: JitCompilerFactory,
- deps: [COMPILER_OPTIONS]
- },
- {
- provide: Compiler,
- useFactory: (fn: CompilerFactory) => {
- return fn.createCompiler();
- },
- deps: [CompilerFactory]
- },
- ],
- entryComponents: [
- AppContainerComponent
- ]
-})
-export class AppContainerModule {
-}
\ No newline at end of file
diff --git a/ui/src/app/app-container/shared/app-container.service.ts b/ui/src/app/app-container/shared/app-container.service.ts
deleted file mode 100644
index 5bac1f3..0000000
--- a/ui/src/app/app-container/shared/app-container.service.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 {Injectable} from '@angular/core';
-import {HttpClient} from '@angular/common/http';
-import {Observable} from 'rxjs';
-
-
-import {InstalledApp} from './installed-app.model';
-
-@Injectable()
-export class AppContainerService {
-
- constructor(private http: HttpClient) {
- }
-
- getServerUrl() {
- return '/streampipes-backend';
- }
-
- getInstalledApps(): Observable<InstalledApp[]> {
- //return this.http.get(this.getServerUrl() + '/api/v2/consul').map(res => <InstalledApp[]>res);
- //TODO: Mock
- return this.http.get('/streampipes-apps/') as Observable<InstalledApp[]>;
- }
-
-}
\ No newline at end of file
diff --git a/ui/src/app/app-container/shared/installed-app.model.ts b/ui/src/app/app-container/shared/installed-app.model.ts
deleted file mode 100644
index f002ced..0000000
--- a/ui/src/app/app-container/shared/installed-app.model.ts
+++ /dev/null
@@ -1,24 +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 interface InstalledApp {
- name: string;
- version: string;
- description: string;
- entry: string;
-}
\ No newline at end of file
diff --git a/ui/src/app/app-container/view/view.component.css b/ui/src/app/app-container/view/view.component.css
deleted file mode 100644
index 58ba04b..0000000
--- a/ui/src/app/app-container/view/view.component.css
+++ /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.
- *
- */
-
diff --git a/ui/src/app/app-container/view/view.component.html b/ui/src/app/app-container/view/view.component.html
deleted file mode 100644
index 1c36551..0000000
--- a/ui/src/app/app-container/view/view.component.html
+++ /dev/null
@@ -1,19 +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 #pluginHost></div>
diff --git a/ui/src/app/app-container/view/view.component.ts b/ui/src/app/app-container/view/view.component.ts
deleted file mode 100644
index 1d60611..0000000
--- a/ui/src/app/app-container/view/view.component.ts
+++ /dev/null
@@ -1,118 +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 * as angularCore from '@angular/core';
-import {AfterViewInit, Compiler, Component, Injector, Input, ViewChild, ViewContainerRef} from '@angular/core';
-
-import {InstalledApp} from '../shared/installed-app.model';
-import * as angularCommon from '@angular/common';
-import * as angularPlatformBrowser from '@angular/platform-browser';
-import * as angularAnimations from '@angular/animations';
-import * as angularCdkA11y from '@angular/cdk/a11y';
-import * as angularCdkStepper from '@angular/cdk/stepper';
-import * as angularCdkBidi from '@angular/cdk/bidi';
-import * as angularCdkCoercion from '@angular/cdk/coercion';
-import * as angularCdkPortal from '@angular/cdk/portal';
-import * as angularCdkCollections from '@angular/cdk/collections';
-import * as angularCdkTable from '@angular/cdk/table';
-import * as angularCdkKeycodes from '@angular/cdk/keycodes';
-import * as angularCdkScrolling from '@angular/cdk/scrolling';
-import * as angularCdkOverlay from '@angular/cdk/overlay';
-import * as angularCdkLayout from '@angular/cdk/layout';
-import * as angularCdkPlatform from '@angular/cdk/platform';
-import * as angularPlatformBrowserAnimations from '@angular/platform-browser/animations';
-import * as angularCdk from '@angular/cdk';
-import * as angularCdkObservers from '@angular/cdk/observers';
-import * as angularCommonHttp from '@angular/common/http';
-//import * as angularMaterial from '@angular/material';
-import * as angularFlexLayout from '@angular/flex-layout';
-import * as angularForms from '@angular/forms';
-import * as angularMaterialDialog from '@angular/material/dialog';
-import * as angularMaterialStepper from '@angular/material/stepper';
-import * as angularMaterialRadio from '@angular/material/radio';
-import * as angularMaterialTable from '@angular/material/table';
-import * as angularMaterialAutocomplete from '@angular/material/autocomplete';
-import * as angularMaterialTooltip from '@angular/material/tooltip';
-import * as rxjs from 'rxjs';
-import * as angularCdkTree from '@angular/cdk/tree';
-import * as ngxColorPicker from 'ngx-color-picker';
-
-declare const SystemJS;
-
-SystemJS.set('@angular/core', SystemJS.newModule(angularCore));
-SystemJS.set('@angular/common', SystemJS.newModule(angularCommon));
-SystemJS.set('@angular/platform-browser', SystemJS.newModule(angularPlatformBrowser));
-SystemJS.set('@angular/animations', SystemJS.newModule(angularAnimations));
-SystemJS.set('@angular/cdk/a11y', SystemJS.newModule(angularCdkA11y));
-SystemJS.set('@angular/cdk/stepper', SystemJS.newModule(angularCdkStepper));
-SystemJS.set('@angular/cdk/bidi', SystemJS.newModule(angularCdkBidi));
-SystemJS.set('@angular/cdk/collections', SystemJS.newModule(angularCdkCollections));
-SystemJS.set('@angular/cdk/coercion', SystemJS.newModule(angularCdkCoercion));
-SystemJS.set('@angular/cdk/portal', SystemJS.newModule(angularCdkPortal));
-SystemJS.set('@angular/cdk/table', SystemJS.newModule(angularCdkTable));
-SystemJS.set('@angular/cdk/keycodes', SystemJS.newModule(angularCdkKeycodes));
-SystemJS.set('@angular/cdk/scrolling', SystemJS.newModule(angularCdkScrolling));
-SystemJS.set('@angular/cdk/overlay', SystemJS.newModule(angularCdkOverlay));
-SystemJS.set('@angular/cdk/layout', SystemJS.newModule(angularCdkLayout));
-SystemJS.set('@angular/cdk/platform', SystemJS.newModule(angularCdkPlatform));
-SystemJS.set('@angular/platform-browser/animations', SystemJS.newModule(angularPlatformBrowserAnimations));
-SystemJS.set('@angular/cdk', SystemJS.newModule(angularCdk));
-SystemJS.set('@angular/cdk/observers', SystemJS.newModule(angularCdkObservers));
-SystemJS.set('@angular/common/http', SystemJS.newModule(angularCommonHttp));
-//SystemJS.set('@angular/material', SystemJS.newModule(angularMaterial));
-SystemJS.set('@angular/flex-layout', SystemJS.newModule(angularFlexLayout));
-SystemJS.set('@angular/forms', SystemJS.newModule(angularForms));
-SystemJS.set('@angular/material/dialog', SystemJS.newModule(angularMaterialDialog));
-SystemJS.set('@angular/material/stepper', SystemJS.newModule(angularMaterialStepper));
-SystemJS.set('@angular/material/radio', SystemJS.newModule(angularMaterialRadio));
-SystemJS.set('@angular/material/table', SystemJS.newModule(angularMaterialTable));
-SystemJS.set('@angular/material/autocomplete', SystemJS.newModule(angularMaterialAutocomplete));
-SystemJS.set('@angular/material/tooltip', SystemJS.newModule(angularMaterialTooltip));
-SystemJS.set('rxjs', SystemJS.newModule(rxjs));
-SystemJS.set('@angular/cdk/tree', SystemJS.newModule(angularCdkTree));
-SystemJS.set('ngx-color-picker', SystemJS.newModule(ngxColorPicker));
-
-@Component({
- selector: 'view',
- templateUrl: './view.component.html',
- styleUrls: ['./view.component.css']
-})
-export class ViewComponent implements AfterViewInit {
-
- @Input() installedApp: InstalledApp;
- @ViewChild('pluginHost', { read: ViewContainerRef, static: true }) content: ViewContainerRef;
-
- constructor(private compiler: Compiler, private injector: Injector) {
- }
-
- ngAfterViewInit(): void {
- this.load();
- }
-
- async load() {
- const module = await SystemJS.import('/streampipes-apps' + this.installedApp.entry);
- const moduleFactory = await this.compiler.compileModuleAndAllComponentsAsync<any>(module["AppModule"]);
- const moduleRef = moduleFactory.ngModuleFactory.create(this.injector);
- for (const component of moduleFactory.componentFactories) {
- if (component.selector === 'app-component') {
- this.content.createComponent(component, null, this.injector, [], moduleRef)
- }
- }
- }
-
-}
\ No newline at end of file