' + 26 | 'no data stream available, please confirm whether there is at least one device to collect data' + 27 | '
'); 28 | return 29 | } 30 | resp.readings.forEach((r,i) => { 31 | $("#data-reading-stream").prepend('' + JSON.stringify(r) + '
'); 32 | }) 33 | }) 34 | },3000) 35 | } 36 | 37 | start() { 38 | this.pauseOperate = false; 39 | this.feedEvents(); 40 | } 41 | 42 | pause() { 43 | this.pauseOperate = true; 44 | window.clearInterval(this.feedInterval); 45 | } 46 | 47 | operateToggle() { 48 | if (this.pauseOperate) { 49 | this.pauseOperate = false; 50 | return 51 | } 52 | this.pauseOperate = true; 53 | } 54 | 55 | ngOnDestroy() { 56 | window.clearInterval(this.feedInterval); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /web/src/app/dashboard/dashboard-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { DashboardComponent } from './dashboard.component'; 4 | import { AuthGuard } from '../guards/auth/guard/auth.guard'; 5 | 6 | const routes: Routes = [ 7 | { 8 | path: '', 9 | canActivate: [AuthGuard], 10 | component: DashboardComponent 11 | } 12 | ]; 13 | 14 | @NgModule({ 15 | imports: [RouterModule.forChild(routes)], 16 | exports: [RouterModule] 17 | }) 18 | export class DashboardRoutingModule { } 19 | -------------------------------------------------------------------------------- /web/src/app/dashboard/dashboard.component.css: -------------------------------------------------------------------------------- 1 | .shadow { 2 | box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important; 3 | border-radius: .25rem!important; 4 | } 5 | 6 | .card:hover { 7 | box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important; 8 | border-radius: .25rem!important; 9 | } 10 | -------------------------------------------------------------------------------- /web/src/app/dashboard/dashboard.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { DashboardRoutingModule } from './dashboard-routing.module'; 5 | import { DashboardComponent } from './dashboard.component'; 6 | 7 | 8 | @NgModule({ 9 | declarations: [DashboardComponent], 10 | imports: [ 11 | CommonModule, 12 | DashboardRoutingModule 13 | ] 14 | }) 15 | export class DashboardModule { } 16 | -------------------------------------------------------------------------------- /web/src/app/guards/auth/auth-routing.module.ts: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright © 2021-2022 VMware, Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 | * in compliance with the License. You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License 10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 | * or implied. See the License for the specific language governing permissions and limitations under 12 | * the License. 13 | * 14 | * @author: Huaqiao Zhang,{{progressMsg}}...
34 |