X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=webapp%2Fsrc%2Fapp%2Fpages%2Fconfig%2Fconfig-global%2Fconfig-global.component.ts;h=35d1e175743cb15e15a067d088744007db2f6067;hb=48739a930ceb0c6a4b843471750da70db2052890;hp=fcd8b62a3d568617f8c17bf2c6459d514913bf34;hpb=38c0c21a969e621c725245ce91c78e77076c5ce7;p=src%2Fxds%2Fxds-agent.git diff --git a/webapp/src/app/pages/config/config-global/config-global.component.ts b/webapp/src/app/pages/config/config-global/config-global.component.ts index fcd8b62..35d1e17 100644 --- a/webapp/src/app/pages/config/config-global/config-global.component.ts +++ b/webapp/src/app/pages/config/config-global/config-global.component.ts @@ -1,3 +1,21 @@ +/** +* @license +* Copyright (C) 2017-2018 "IoT.bzh" +* Author Sebastien Douheret +* +* 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. +*/ + import { Component, OnInit } from '@angular/core'; import { ConfigService, IConfig } from '../../../@core-xds/services/config.service'; @@ -10,6 +28,7 @@ import { ConfigService, IConfig } from '../../../@core-xds/services/config.servi export class ConfigGlobalComponent implements OnInit { public configFormChanged = false; + public Config: IConfig = {}; constructor( private configSvr: ConfigService, @@ -17,9 +36,12 @@ export class ConfigGlobalComponent implements OnInit { } ngOnInit() { + this.configSvr.Conf$.subscribe(cfg => this.Config = cfg); } onSubmit() { + this.configSvr.save(this.Config); + this.configFormChanged = false; } }