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=dc8af4f19f05aae27b2a0c0e542a284c30b199e0;hpb=82ede02a56e12026b2dfb1baeacabfbd564006b1;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 dc8af4f..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,6 +1,6 @@ /** * @license -* Copyright (C) 2017 "IoT.bzh" +* Copyright (C) 2017-2018 "IoT.bzh" * Author Sebastien Douheret * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -28,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, @@ -35,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; } }