Also added "owner" data to the mocked jobs.
Also fixed so the side navigation bar is closed when a selection has
been made.
Change-Id: I651ae7e8eea3f40992fdcbe9900489534e0562f4
Issue-ID: NONRTRIC-372
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
</div>
</section>
<section #sidenav class="menu-body">
- <rd-sidenav-list></rd-sidenav-list>
+ <rd-sidenav-list (sidenavClose)="drawer.toggle()">></rd-sidenav-list>
</section>
<section class="menu-footer">
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ToastrModule } from 'ngx-toastr';
import { ConfirmDialogComponent } from './ui/confirm-dialog/confirm-dialog.component';
-import { ControlpanelService } from './services/controlpanel/controlpanel.service';
import { ErrorDialogComponent } from './ui/error-dialog/error-dialog.component';
import { ErrorDialogService } from './services/ui/error-dialog.service';
import { FlexLayoutModule } from '@angular/flex-layout';
PolicyInstanceDialogComponent
],
providers: [
- ControlpanelService,
ErrorDialogService,
UiService,
{
* ========================LICENSE_END===================================
*/
import { Component, OnInit } from '@angular/core';
-import { ControlpanelSuccessTransport } from '../interfaces/controlpanel.types';
-import { ControlpanelService } from '../services/controlpanel/controlpanel.service';
import { UiService } from '../services/ui/ui.service';
@Component({
controlpanelVersion: string;
// Inject the service
- constructor(private controlpanelService: ControlpanelService,
- private ui: UiService) { }
+ constructor(private ui: UiService) { }
ngOnInit() {
this.controlpanelVersion = '0.0';
- // this.controlpanelService.getVersion().subscribe((res: ControlpanelSuccessTransport) => this.controlpanelVersion = res.data);
this.ui.darkModeState.subscribe((isDark) => {
this.darkMode = isDark;
});
status: number;
data: string;
}
-
-export interface EcompRoleFunction {
- name: string;
- code: string;
- type: string;
- action: string;
-}
-
-export interface EcompRole {
- id: number;
- name: string;
- [position: number]: EcompRoleFunction;
-}
-
-export interface EcompUser {
- orgId?: number;
- managerId?: string;
- firstName?: string;
- middleInitial?: string;
- lastName?: string;
- phone?: string;
- email?: string;
- hrid?: string;
- orgUserId?: string;
- orgCode?: string;
- orgManagerUserId?: string;
- jobTitle?: string;
- loginId: string;
- active: boolean;
- [position: number]: EcompRole;
-}
{
"ei_job_identity": "job1",
"ei_type_identity": "type1",
+ "owner": "owner1",
"ei_job_data": {
"jobparam2": "value2_job1",
"jobparam3": "value3_job1",
+++ /dev/null
-/*-
- * ========================LICENSE_START=================================
- * O-RAN-SC
- * %%
- * Copyright (C) 2019 AT&T Intellectual Property
- * Modifications Copyright (C) 2020 Nordix Foundation
- * %%
- * 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 { TestBed } from '@angular/core/testing';
-
-import { ControlpanelService } from './controlpanel.service';
-
-describe('ControlpanelService', () => {
- beforeEach(() => TestBed.configureTestingModule({}));
-
- it('should be created', () => {
- const service: ControlpanelService = TestBed.get(ControlpanelService);
- expect(service).toBeTruthy();
- });
-});
+++ /dev/null
-/*-
- * ========================LICENSE_START=================================
- * O-RAN-SC
- * %%
- * Copyright (C) 2019 AT&T Intellectual Property
- * Modifications Copyright (C) 2020 Nordix Foundation
- * %%
- * 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 { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import { Observable } from 'rxjs';
-import { ControlpanelSuccessTransport, EcompUser } from '../../interfaces/controlpanel.types';
-
-@Injectable({
- providedIn: 'root'
-})
-
-/**
- * Services to query the Control Panel's admin endpoints.
- */
-export class ControlpanelService {
-
- private basePath = 'api/admin/';
-
- constructor(private httpClient: HttpClient) {
- // injects to variable httpClient
- }
-
- /**
- * Checks app health
- * @returns Observable that should yield a ControlpanelSuccessTransport
- */
- getHealth(): Observable<ControlpanelSuccessTransport> {
- return this.httpClient.get<ControlpanelSuccessTransport>(this.basePath + 'health');
- }
-
- /**
- * Gets Control Panel version details
- * @returns Observable that should yield a ControlpanelSuccessTransport object
- */
- getVersion(): Observable<ControlpanelSuccessTransport> {
- return this.httpClient.get<ControlpanelSuccessTransport>(this.basePath + 'version');
- }
-
- /**
- * Gets Control Panel users
- * @returns Observable that should yield a EcompUser array
- */
- getUsers(): Observable<EcompUser[]> {
- return this.httpClient.get<EcompUser[]>(this.basePath + 'user');
- }
-
-}