Clean up the frontend of ECS
[portal/nonrtric-controlpanel.git] / webapp-frontend / src / app / footer / footer.component.ts
1 /*-
2  * ========================LICENSE_START=================================
3  * O-RAN-SC
4  * %%
5  * Copyright (C) 2019 AT&T Intellectual Property
6  * Modifications Copyright (C) 2019 Nordix Foundation
7  * Modifications Copyright (C) 2020 Nordix Foundation
8  * %%
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ========================LICENSE_END===================================
21  */
22 import { Component, OnInit } from '@angular/core';
23 import { UiService } from '../services/ui/ui.service';
24
25 @Component({
26   selector: 'rd-footer',
27   templateUrl: './footer.component.html',
28   styleUrls: ['./footer.component.scss']
29 })
30
31 /**
32  * Fetches the version on load for display in the footer
33  */
34 export class FooterComponent implements OnInit {
35   darkMode: boolean;
36   controlpanelVersion: string;
37
38   // Inject the service
39   constructor(private ui: UiService) { }
40
41   ngOnInit() {
42     this.controlpanelVersion = '0.0';
43     this.ui.darkModeState.subscribe((isDark) => {
44       this.darkMode = isDark;
45     });
46   }
47
48 }