You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2022/02/02 09:09:24 UTC
[incubator-streampipes] 01/02: [hotfix] Remove old services
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch experimental-module-federation
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit fd0244a644477625f75dea6233760d507f8e89ba
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Wed Feb 2 10:04:23 2022 +0100
[hotfix] Remove old services
---
ui/deployment/appng5.module.mst | 3 -
.../new-adapter/new-adapter.component.ts | 2 -
.../services/transformation-rule.service.spec.ts | 3 +-
.../static-properties/static-property.component.ts | 15 ++--
ui/src/app/services/deployment.service.ts | 80 ----------------------
ui/src/app/services/measurement-units.service.ts | 61 -----------------
ui/src/app/shared/logger/default-log.service.ts | 65 ------------------
ui/src/app/shared/logger/log.service.ts | 79 ---------------------
8 files changed, 5 insertions(+), 303 deletions(-)
diff --git a/ui/deployment/appng5.module.mst b/ui/deployment/appng5.module.mst
index ee4aaa6..1fb4219 100644
--- a/ui/deployment/appng5.module.mst
+++ b/ui/deployment/appng5.module.mst
@@ -46,8 +46,6 @@ import { {{{ng5_moduleName}}} } from '{{{path}}}';
{{/ng5}}
{{/modulesActive}}
-import { ConsoleLogService } from './shared/logger/log.service';
-import { Logger } from './shared/logger/default-log.service';
import { NotificationModule } from './notifications/notifications.module';
import { AppComponent } from './app.component';
@@ -94,7 +92,6 @@ import * as $ from 'jquery';
AvailableRolesService,
NotificationCountService,
{ provide: HTTP_INTERCEPTORS, useClass: HttpInterceptorProvider, multi: true },
- { provide: Logger, useClass: ConsoleLogService },
{ provide: LOADING_BAR_CONFIG, useValue: { latencyThreshold: 100 }},
{
provide: RxStompService,
diff --git a/ui/src/app/connect/components/new-adapter/new-adapter.component.ts b/ui/src/app/connect/components/new-adapter/new-adapter.component.ts
index cbe25c7..1b593b5 100644
--- a/ui/src/app/connect/components/new-adapter/new-adapter.component.ts
+++ b/ui/src/app/connect/components/new-adapter/new-adapter.component.ts
@@ -29,7 +29,6 @@ import {
TransformationRuleDescriptionUnion
} from '@streampipes/platform-services';
import { ShepherdService } from '../../../services/tour/shepherd.service';
-import { Logger } from '../../../shared/logger/default-log.service';
import { ConnectService } from '../../services/connect.service';
import { ConfigurationInfo } from '../../model/ConfigurationInfo';
import { RestService } from '../../services/rest.service';
@@ -93,7 +92,6 @@ export class NewAdapterComponent implements OnInit, AfterViewInit {
viewInitialized = false;
constructor(
- private logger: Logger,
private restService: RestService,
private transformationRuleService: TransformationRuleService,
private shepherdService: ShepherdService,
diff --git a/ui/src/app/connect/services/transformation-rule.service.spec.ts b/ui/src/app/connect/services/transformation-rule.service.spec.ts
index ed2afa2..936f7dc 100644
--- a/ui/src/app/connect/services/transformation-rule.service.spec.ts
+++ b/ui/src/app/connect/services/transformation-rule.service.spec.ts
@@ -17,7 +17,6 @@
*/
import { TransformationRuleService } from './transformation-rule.service';
-import { Logger } from '../../shared/logger/default-log.service';
import {
CreateNestedRuleDescription,
DeleteRuleDescription,
@@ -31,7 +30,7 @@ import {
describe('TransformationRuleService', () => {
- const service = new TransformationRuleService(new Logger());
+ const service = new TransformationRuleService();
it('Get complete key from schema nested', () => {
diff --git a/ui/src/app/core-ui/static-properties/static-property.component.ts b/ui/src/app/core-ui/static-properties/static-property.component.ts
index 04e79ab..a6b98e8 100644
--- a/ui/src/app/core-ui/static-properties/static-property.component.ts
+++ b/ui/src/app/core-ui/static-properties/static-property.component.ts
@@ -17,10 +17,8 @@
*/
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
-import { Logger } from '../../shared/logger/default-log.service';
import { XsService } from '../../NS/xs.service';
-import { StaticPropertyUtilService } from './static-property-util.service';
import { ConfigurationInfo } from '../../connect/model/ConfigurationInfo';
import {
AnyStaticProperty,
@@ -84,17 +82,12 @@ export class StaticPropertyComponent implements OnInit {
@Input()
pipelineElement: InvocablePipelineElementUnion;
- showLabel: boolean = true;
+ showLabel = true;
@Input()
- showBorder: boolean = true;
+ showBorder = true;
- constructor(
- private logger: Logger,
- public xsService: XsService,
- public staticPropertyUtil: StaticPropertyUtilService
- ) {
- logger.log(this.staticProperty);
+ constructor() {
}
ngOnInit() {
@@ -168,7 +161,7 @@ export class StaticPropertyComponent implements OnInit {
}
valueChange(hasInput) {
- //this.staticProperty.isValid = hasInput;
+ // this.staticProperty.isValid = hasInput;
this.validateEmitter.emit();
}
diff --git a/ui/src/app/services/deployment.service.ts b/ui/src/app/services/deployment.service.ts
deleted file mode 100644
index 68c29a3..0000000
--- a/ui/src/app/services/deployment.service.ts
+++ /dev/null
@@ -1,80 +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 angular from 'angular';
-
-export class DeploymentService {
-
- $http: any;
- $rootScope: any;
- RestApi: any;
- AuthStatusService: any;
-
- constructor($http, AuthStatusService, RestApi) {
- this.$http = $http;
- this.AuthStatusService = AuthStatusService;
- this.RestApi = RestApi;
- }
-
- updateElement(deploymentConfig, model) {
- return this.$http({
- method: 'POST',
- headers: {'Accept': 'application/json', 'Content-Type': undefined},
- url: '/streampipes-backend/api/v2/users/' + this.AuthStatusService.email + '/deploy/update',
- data: this.getFormData(deploymentConfig, model)
- });
- }
-
- generateImplementation(deploymentConfig, model) {
- return this.$http({
- method: 'POST',
- responseType: 'arraybuffer',
- headers: {'Accept': 'application/zip', 'Content-Type': undefined},
- url: '/streampipes-backend/api/v2/users/' + this.AuthStatusService.email + '/deploy/implementation',
- data: this.getFormData(deploymentConfig, model)
- });
- }
-
- generateDescriptionJava(deploymentConfig, model) {
- return this.$http({
- method: 'POST',
- headers: {'Accept': 'text/plain', 'Content-Type': undefined},
- url: '/streampipes-backend/api/v2/users/' + this.$rootScope.email + '/deploy/description/java',
- data: this.getFormData(deploymentConfig, model)
- });
- }
-
- generateDescriptionJsonld(deploymentConfig, model) {
- return this.$http({
- method: 'POST',
- headers: {'Accept': 'application/json', 'Content-Type': undefined},
- url: '/streampipes-backend/api/v2/users/' + this.AuthStatusService.email + '/deploy/description/jsonld',
- data: this.getFormData(deploymentConfig, model)
- });
- }
-
- getFormData(deploymentConfig, model) {
- const formData = new FormData();
- formData.append('config', angular.toJson(deploymentConfig));
- formData.append('model', angular.toJson(model));
- return formData;
- }
-
-}
-
-// DeploymentService.$inject = ['$http', '$rootScope', 'RestApi'];
diff --git a/ui/src/app/services/measurement-units.service.ts b/ui/src/app/services/measurement-units.service.ts
deleted file mode 100644
index 429d909..0000000
--- a/ui/src/app/services/measurement-units.service.ts
+++ /dev/null
@@ -1,61 +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 MeasurementUnits {
-
- measurementUnitsService: any;
- allMeasurementUnits: any;
- allMeasurementUnitTypes: any;
- $http: any;
- RestApi: any;
-
- constructor($http, RestApi) {
- this.measurementUnitsService = {};
- this.allMeasurementUnits = {};
- this.allMeasurementUnitTypes = {};
- this.$http = $http;
- this.RestApi = RestApi;
- this.updateUnits();
- this.updateUnitTypes();
- }
-
- updateUnits() {
- this.RestApi.getAllUnits()
- .then(measurementUnits => {
- this.allMeasurementUnits = measurementUnits.data;
- });
- }
-
- updateUnitTypes() {
- this.RestApi.getAllUnitTypes()
- .then(measurementUnits => {
- this.allMeasurementUnitTypes = measurementUnits.data;
- });
- }
-
- getUnits() {
- return this.allMeasurementUnits;
- }
-
- getUnitTypes() {
- return this.allMeasurementUnitTypes;
- }
-
-}
-
-//MeasurementUnits.$inject = ['$http', 'RestApi'];
\ No newline at end of file
diff --git a/ui/src/app/shared/logger/default-log.service.ts b/ui/src/app/shared/logger/default-log.service.ts
deleted file mode 100644
index 55370e9..0000000
--- a/ui/src/app/shared/logger/default-log.service.ts
+++ /dev/null
@@ -1,65 +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.
- *
- */
-
-// Define the interface that all loggers must implement.
-export interface ILogger {
- assert( ...args: any[] ) : void;
- error( ...args: any[] ) : void;
- group( ...args: any[] ) : void;
- groupEnd( ...args: any[] ) : void;
- info( ...args: any[] ) : void;
- log( ...args: any[] ) : void;
- warn( ...args: any[] ) : void;
-}
-
-
-// Set up the default logger. The default logger doesn't actually log anything; but, it
-// provides the Dependency-Injection (DI) token that the rest of the application can use
-// for dependency resolution. Each platform can then override this with a platform-
-// specific logger implementation, like the ConsoleLogService (below).
-export class Logger implements ILogger {
-
- public assert( ...args: any[] ) : void {
- // ... the default logger does no work.
- }
-
- public error( ...args: any[] ) : void {
- // ... the default logger does no work.
- }
-
- public group( ...args: any[] ) : void {
- // ... the default logger does no work.
- }
-
- public groupEnd( ...args: any[] ) : void {
- // ... the default logger does no work.
- }
-
- public info( ...args: any[] ) : void {
- // ... the default logger does no work.
- }
-
- public log( ...args: any[] ) : void {
- // ... the default logger does no work.
- }
-
- public warn( ...args: any[] ) : void {
- // ... the default logger does no work.
- }
-
-}
\ No newline at end of file
diff --git a/ui/src/app/shared/logger/log.service.ts b/ui/src/app/shared/logger/log.service.ts
deleted file mode 100644
index b3d3ba2..0000000
--- a/ui/src/app/shared/logger/log.service.ts
+++ /dev/null
@@ -1,79 +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.
- *
- */
-
-// Declare the console as an ambient value so that TypeScript doesn't complain.
-declare var console: any;
-
-// Import the application components and services.
-import {ILogger} from "./default-log.service";
-import { Injectable } from "@angular/core";
-
-
-// I log values to the ambient console object.
-@Injectable()
-export class ConsoleLogService implements ILogger {
-
- public assert( ...args: any[] ) : void {
-
- ( console && console.assert ) && console.assert( ...args );
-
- }
-
-
- public error( ...args: any[] ) : void {
-
- ( console && console.error ) && console.error( ...args );
-
- }
-
-
- public group( ...args: any[] ) : void {
-
- ( console && console.group ) && console.group( ...args );
-
- }
-
-
- public groupEnd( ...args: any[] ) : void {
-
- ( console && console.groupEnd ) && console.groupEnd( ...args );
-
- }
-
-
- public info( ...args: any[] ) : void {
-
- ( console && console.info ) && console.info( ...args );
-
- }
-
-
- public log( ...args: any[] ) : void {
-
- ( console && console.log ) && console.log( ...args );
-
- }
-
-
- public warn( ...args: any[] ) : void {
-
- ( console && console.warn ) && console.warn( ...args );
-
- }
-
-}
\ No newline at end of file