Add multi-layer RIC instance selector
[portal/ric-dashboard.git] / webapp-frontend / src / app / control / control.component.ts
index 1520862..18545af 100644 (file)
@@ -1,8 +1,8 @@
 /*-
  * ========================LICENSE_START=================================
- * ORAN-OSC
+ * O-RAN-SC
  * %%
- * Copyright (C) 2019 AT&T Intellectual Property and Nokia
+ * Copyright (C) 2019 AT&T Intellectual Property
  * %%
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * ========================LICENSE_END===================================
  */
 import { Component, OnInit } from '@angular/core';
-import { LocalDataSource } from 'ng2-smart-table';
-import { ControlService } from '../services/control/control.service';
-import { Router } from '@angular/router';
 
 @Component({
-  selector: 'app-control',
+  selector: 'rd-control',
   templateUrl: './control.component.html',
-  styleUrls: ['./control.component.css']
+  styleUrls: ['./control.component.scss']
 })
-export class ControlComponent {
+export class ControlComponent implements OnInit {
 
-    settings = {
-    hideSubHeader: true,
-    actions: {
-      columnTitle: 'Actions',
-      add: false,
-      edit: false,
-      delete: false,
-      custom: [
-      { name: 'view', title: 'view', },
-    ],
-      position: 'right'
+  constructor() { }
 
-    },
-    columns: {
-      id: {
-        title: 'ID',
-        type: 'number',
-      },
-      xAppName: {
-        title: 'xApp Name',
-        type: 'string',
-      },
-      xAppType: {
-        title: 'xApp Type',
-        type: 'string',
-      },
-      podId: {
-        title: 'Pod ID',
-        type: 'number',
-      },
-      k8Status: {
-        title: 'k8 Status',
-        type: 'string',
-      },
-      age: {
-        title: 'Age',
-        type: 'string',
-      },
-    },
-  };
-
-  source: LocalDataSource = new LocalDataSource();
-
-  constructor(private service: ControlService, private router: Router) {
-    const data = this.service.getData();
-    this.source.load(data);
+  ngOnInit() {
   }
 
-  view(event): void {
-      const url = '/xapp';
-      this.router.navigate([url, event]).then( (e) => {
-            if (e) {
-                console.log(event.data);
-                console.log('Navigation is successful!');
-            } else {
-                console.log('Navigation has failed!');
-            }
-        });
-  }
-
-
 }