X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fui%2Fconfig-event%2Fconfig-event.component.ts;fp=webapp-frontend%2Fsrc%2Fapp%2Fui%2Fconfig-event%2Fconfig-event.component.ts;h=0000000000000000000000000000000000000000;hb=8848d27a648dbfe88346425a7c4c36cb1aff9e46;hp=031147c2ffc5d28e0af40a25a44df5a0457398d5;hpb=4d016dc92a169835f1ab9b043b32b2775817ff6c;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/ui/config-event/config-event.component.ts b/webapp-frontend/src/app/ui/config-event/config-event.component.ts deleted file mode 100644 index 031147c2..00000000 --- a/webapp-frontend/src/app/ui/config-event/config-event.component.ts +++ /dev/null @@ -1,76 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * O-RAN-SC - * %% - * Copyright (C) 2019 AT&T Intellectual Property - * %% - * Licensed 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. - * ========================LICENSE_END=================================== - */ -import { Component, OnInit } from '@angular/core'; -import { FormControl, Validators } from '@angular/forms'; -import { StatsService } from '../../services/stats/stats.service'; - -@Component({ - selector: 'rd-app-config-event', - templateUrl: './config-event.component.html', - styleUrls: ['./config-event.component.scss'] -}) -export class ConfigEventComponent implements OnInit { - - public renderValue; - - contactFormModalJsonUrl = new FormControl('', Validators.required); - contactFormModalHost = new FormControl('', Validators.required); - contactFormModalMetrics = new FormControl('', Validators.required); - contactFormModalDelay = new FormControl('', Validators.required); - contactFormModalLoad = new FormControl('', Validators.required); - contactFormModalDelayMax = new FormControl('', Validators.required); - contactFormModalLoadMax = new FormControl('', Validators.required); - onOpened(event: any) { - this.service.loadConfig(); - this.contactFormModalJsonUrl.setValue(this.service.jsonURL); - this.contactFormModalHost.setValue(this.service.hostURL); - this.contactFormModalMetrics.setValue(this.service.metricsPath); - this.contactFormModalDelay.setValue(this.service.delayPath); - this.contactFormModalLoad.setValue(this.service.loadPath); - this.contactFormModalDelayMax.setValue(this.service.delayMax); - this.contactFormModalLoadMax.setValue(this.service.loadMax); - console.log(event); - } - - - constructor(private service: StatsService) { } - - ngOnInit() { - // load from file - this.service.loadConfig(); - // console.log(this.service.hostURL); - //this.contactFormModalHost.setValue(this.service.hostURL); - //this.contactFormModalJsonUrl.setValue(this.service.jsonURL); - } - - save() { - // save to file - this.service.saveConfig('jsonURL', this.contactFormModalJsonUrl.value); - this.service.saveConfig('host', this.contactFormModalHost.value); - this.service.saveConfig('metricspath', this.contactFormModalMetrics.value); - this.service.saveConfig('delaypath', this.contactFormModalDelay.value); - this.service.saveConfig('loadpath', this.contactFormModalLoad.value); - this.service.saveConfig('delaymax', this.contactFormModalDelayMax.value); - this.service.saveConfig('loadmax', this.contactFormModalLoadMax.value); - this.service.loadConfig(); - } - - -}