</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';
@NgModule({
declarations: [
ConfirmDialogComponent,
+ ControlpanelComponent,
EICardComponent,
EICoordinatorComponent,
ErrorDialogComponent,
FooterComponent,
MainComponent,
+ NodeModulesComponent,
NoTypePolicyInstanceDialogComponent,
PolicyCardComponent,
PolicyControlComponent,
PolicyInstanceComponent,
PolicyInstanceDialogComponent,
- ControlpanelComponent,
SidenavListComponent,
- NodeModulesComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
ChartsModule,
+ ControlpanelRoutingModule,
+ CookieModule.forRoot(),
FlexLayoutModule,
FormsModule,
HttpClientModule,
MatToolbarModule,
MatTooltipModule,
MDBBootstrapModule.forRoot(),
- ControlpanelRoutingModule,
ReactiveFormsModule,
ToastrModule.forRoot(),
- CookieModule.forRoot()
],
exports: [
ErrorDialogComponent,
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;
});
import * as policyinstanceedit from './mock/policy-instance-edit.json';
import * as eijobs from './mock/ei-jobs.json';
import * as eiproducers from './mock/ei-producers.json';
+import * as rics from './mock/rics.json';
const urls = [
{
{
url: 'api/enrichment/eiproducers',
json: eiproducers
+ },
+ {
+ url: 'api/policy/rics?policyType=1',
+ json: rics
}
];
constructor(private injector: Injector) {}
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
+ if (request.method === "PUT" && request.url.includes("policies")) {
+ console.log('Answered PUT policy ' + request.url);
+ return of(new HttpResponse({ status: 200 }));
+ }
for (const element of urls) {
if (request.url === element.url) {
console.log('Loaded from stub json : ' + request.url);
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
+[
+ "ric1",
+ "ric2"
+]
\ No newline at end of file
+++ /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');
- }
-
-}