Browse Source

feat: add units map component

fzadrazil 4 years ago
parent
commit
146af9e5cb

+ 1 - 1
src/app/app-routing.module.ts

@@ -5,7 +5,7 @@ import {DashboardComponent} from './dashboard/components/dashboard.component';
 import {AuthGuard} from './auth/guards/auth.guard';
 import {RoleGuard} from './auth/guards/role.guard';
 import {SensorComponent} from './sensor/components/sensor.component';
-import {UnitComponent} from './unit/components/unit.component';
+import { UnitComponent } from './unit/components/unit.component';
 
 const routes: Routes = [
   {

+ 1 - 3
src/app/app.module.ts

@@ -15,7 +15,6 @@ import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
 import {UnitModule} from './unit/unit.module';
 import {ConfirmationService, MessageService} from 'primeng/api';
 import { ToastModule } from 'primeng/toast';
-import { HslayersModule } from 'hslayers-ng'
 
 @NgModule({
   declarations: [
@@ -33,8 +32,7 @@ import { HslayersModule } from 'hslayers-ng'
     SensorModule,
     FontAwesomeModule,
     UnitModule,
-    ToastModule,
-    HslayersModule
+    ToastModule
   ],
   providers: [
     ConfirmationService,

+ 10 - 23
src/app/dashboard/components/dashboard.component.html

@@ -1,29 +1,16 @@
 <app-nav-bar (emitNewUnit)="addUnit($event)" [sensorTypes]="sensorTypes"></app-nav-bar>
 
 <div class="container dashboard">
-  <p-accordion>
-      <p-accordionTab *ngFor="let unit of units">
-        <p-header [className]="'dashboard-unit-wrapper'">
-          <div [className]="'row dashboard-unit'">
-            <div class="col-sm-5 col-md-7 col-xl-9"><h3 class="unitName">{{ unit.unit.description}}</h3></div>
-            <div class="col-sm-7 col-md-5 col-xl-3 dashboard-unit-heading">
-              <button pButton type="button" label="Sensors graph" class="p-button-primary" icon="pi pi-chart-line" [id]="unit.unit.description"  [routerLink]="['/dashboard/unit', unit.unit.unitId]" [queryParams]="{unitDescription: unit.unit.description}"></button>
-              <div class="dashboard-button-separator"></div>
-              <button pButton type="button" class="p-button-warning" icon="pi pi-cog" [id]="'manipulation_'+unit.unit.unitId"  (click)="showItems($event, unit.unit); menu.toggle($event)"></button>
-              <p-menu #menu [popup]="true" [model]="items" [appendTo]="'body'" [baseZIndex]="50"></p-menu>
-            </div>
-          </div>
-        </p-header>
-        <div>
-          <ng-container *ngFor="let sensor of unit.sensors; let i = index">
-            <ng-container *ngIf="i > 0 && unit.sensors[i].sensorId.toString().slice(0, 5) !== unit.sensors[i-1].sensorId.toString().slice(0, 5)">
-              <hr>
-            </ng-container>
-            <app-sensors *ngIf="sensor" [sensor]="sensor" [unit]="unit.unit" [phenomenons]="phenomenons" [loggedUser]="loggedUser" (emitSensorDeletion)="deleteSensor(unit.unit.unitId, $event)" [sensorTypes]="sensorTypes"></app-sensors>
-          </ng-container>
-        </div>
-      </p-accordionTab>
-  </p-accordion>
+  <p-tabView>
+    <p-tabPanel header="Dashboard">
+      <unit-list [user]="loggedUser" [units]="units"></unit-list>
+    </p-tabPanel>
+    <p-tabPanel header="Map view">
+      <ng-template pTemplate="content">
+        <app-map></app-map>
+      </ng-template>
+    </p-tabPanel>
+  </p-tabView>
 </div>
 
 <app-unit-popup *ngIf="showEditUnitPopup" [(isVisible)]="showEditUnitPopup" [unit]="editedUnit"></app-unit-popup>

+ 12 - 0
src/app/dashboard/components/dashboard.component.scss

@@ -0,0 +1,12 @@
+::ng-deep .loading-progress {
+  min-height: 200px;
+}
+
+::ng-deep .p-tabview-nav li {
+  width: 50%;
+}
+/*::ng-deep .p-tabview {
+  color: #0B1226;
+  background-color: #F2F2F2;
+  padding: 0;
+}*/

+ 7 - 129
src/app/dashboard/components/dashboard.component.ts

@@ -26,7 +26,6 @@ import {Subscription} from 'rxjs';
 export class DashboardComponent implements OnInit, OnDestroy {
 
   loggedUser: User;
-  items: MenuItem[] = [];
   position: 'bottom';
   groups: Group[];
   units: Array<{ drivers?: Drivers; generalInfo?: GeneralInfo; holder?: any; lastpos?: Lastpos; sensors?: Array<Sensor>; unit?: Unit }>;
@@ -34,16 +33,16 @@ export class DashboardComponent implements OnInit, OnDestroy {
   showEditUnitPopup = false;
   showInsertSensorPopup = false;
   showInsertPositionPopup = false;
-  phenomenons: Phenomenon[];
+  //phenomenons: Phenomenon[];
   sensorTypes: SensorType[];
   subscription: Subscription[] = [];
 
   constructor(
     private dataService: DataService,
     private sensorService: SensorsService,
-    private confirmationService: ConfirmationService,
-    private messageService: MessageService,
-    private managementService: ManagementService,
+    //private confirmationService: ConfirmationService,
+    //private messageService: MessageService,
+    //private managementService: ManagementService,
     private toastService: ToastService,
     private authService: AuthService
   ) {
@@ -64,9 +63,9 @@ export class DashboardComponent implements OnInit, OnDestroy {
    * Get necessary data from backend
    */
   initData() {
-    this.sensorService.getPhenomenons().subscribe(
-      response => this.phenomenons = response
-    );
+    //this.sensorService.getPhenomenons().subscribe(
+    //  response => this.phenomenons = response
+    //);
     this.sensorService.getSensorTypes().subscribe(
       response => this.sensorTypes = response
     );
@@ -96,89 +95,6 @@ export class DashboardComponent implements OnInit, OnDestroy {
   }
 
   /**
-   * Show edit unit
-   * @param $event click event
-   * @param unit edited unit
-   */
-  editUnitPopup($event: MouseEvent, unit: Unit) {
-    this.editedUnit = unit;
-    this.showEditUnitPopup = true;
-  }
-
-  /**
-   * Show insert unit
-   * @param $event click event
-   * @param unit unit for sensor insert
-   */
-  insertSensorPopup($event: any, unit: Unit) {
-    this.showInsertSensorPopup = true;
-    this.editedUnit = unit;
-  }
-
-  /**
-   * Detele unit confirmation
-   * @param $event click event
-   * @param unit unit to delete
-   */
-  deleteUnit($event: any, unit: Unit) {
-    this.confirmationService.confirm({
-      message: 'Do you want to delete this unit?',
-      header: 'Delete unit confirmation',
-      icon: 'pi pi-info-circle',
-      accept: () => {
-        this.processUnitDeletion(unit);
-      },
-      reject: () => {
-        this.toastService.operationRejected();
-      },
-      key: 'positionDialog'
-    });
-  }
-
-  /**
-   * Send delete unit request to backend
-   * @param unit to delete
-   */
-  processUnitDeletion(unit: Unit) {
-    this.managementService.deleteUnit$Response({body: {
-      unit: {
-        unit_id: unit.unitId
-      }}
-    }).pipe(
-      map((response: HttpResponse<any>) => {
-        if (response.status === 200) {
-          this.toastService.showSuccessMessage(response.body.message);
-          this.units = this.units.filter(testedUnit => testedUnit.unit.unitId !== unit.unitId);
-        } else {
-        }
-      })
-    ).toPromise().then().catch(err => this.toastService.showError(err.error.message));
-  }
-
-  /**
-   * Show menu items to manipulate with unit
-   * @param $event click event
-   * @param unit unit we want edit
-   */
-  showItems($event: any, unit: Unit) {
-    $event.stopPropagation();
-    this.items = [
-      {label: 'Edit unit', icon: 'pi pi-cog', command: () => {
-          this.editUnitPopup($event, unit);
-        }},
-      {label: 'Insert position', icon: 'pi pi-cog', command: () => {
-          this.insertPosition($event, unit);
-        }},
-      {label: 'Delete unit', icon: 'pi pi-times', command: () => {
-          this.deleteUnit($event, unit);
-        }},
-      {label: 'Add sensor', icon: 'pi pi-cog', command: () => {
-          this.insertSensorPopup($event, unit);
-        }}
-    ]
-  }
-
-  /**
    * Add created unit to memory so we do not need call backend
    * @param inserted unit
    */
@@ -202,42 +118,4 @@ export class DashboardComponent implements OnInit, OnDestroy {
       sensors
     })
   }
-
-  /**
-   * Add created sensors to unit in memory so we do not need call backend
-   * @param inserted sensors
-   */
-  addSensors(inserted: any) {
-    inserted.sensors.forEach(sens => {
-      this.units.find(un => un.unit.unitId === inserted.unit.unit_id).sensors.push({
-        sensorId: sens.sensor_id,
-        sensorType: sens.sensor_type,
-        sensorName: sens.sensor_name,
-        phenomenon: {
-          phenomenonId: sens.phenomenon.phenomenon_id.toString()
-        }
-      })
-    });
-  }
-
-  /**
-   * Delete sensor from memory
-   * @param unitId sensor unit
-   * @param sensor sensor to delete
-   */
-  deleteSensor(unitId: number, sensor: Sensor) {
-    this.units.find(unit => unit.unit.unitId === unitId).sensors =
-      this.units.find(unit => unit.unit.unitId === unitId).sensors.filter(testedSensor => testedSensor.sensorId !== sensor.sensorId);
-  }
-
-  /**
-   * Show insert position popup
-   * @param $event click event
-   * @param unit unit to insert position for
-   */
-  insertPosition($event: any, unit: Unit) {
-    $event.stopPropagation();
-    this.showInsertPositionPopup = true;
-    this.editedUnit = unit;
-  }
 }

+ 3 - 0
src/app/dashboard/components/map/map.component.html

@@ -0,0 +1,3 @@
+<div class="container map">
+  <hslayers></hslayers>
+</div>

+ 3 - 0
src/app/dashboard/components/map/map.component.scss

@@ -0,0 +1,3 @@
+hslayers {
+  height: 600px;
+}

+ 1 - 1
src/app/map/map.component.ts → src/app/dashboard/components/map/map.component.ts

@@ -18,7 +18,7 @@ import {
   templateUrl: './map.component.html',
   styleUrls: ['./map.component.scss']
 })
-export class DashboardComponent implements OnInit, OnDestroy {
+export class MapComponent implements OnInit, OnDestroy {
 
 
   constructor(

+ 23 - 0
src/app/dashboard/components/map/map.module.ts

@@ -0,0 +1,23 @@
+////import { NgModule } from '@angular/core';
+////import { CommonModule } from '@angular/common';
+////import { MapComponent } from './map.component';
+////import { NavBarModule } from '../shared/nav-bar/nav-bar.module';
+////import { RouterModule } from '@angular/router';
+////import { ButtonModule } from 'primeng/button';
+////import { MenuModule } from 'primeng/menu';
+////import { HslayersModule } from 'hslayers-ng';
+
+
+
+////@NgModule({
+////  declarations: [MapComponent],
+////  imports: [
+////    HslayersModule,
+////    CommonModule,
+////    NavBarModule,
+////    RouterModule,
+////    ButtonModule,
+////    MenuModule
+////  ]
+////})
+////export class MapModule { }

+ 25 - 0
src/app/dashboard/components/unit-list/unit-list.component.html

@@ -0,0 +1,25 @@
+<div *ngIf="(units == null)" class="loading-progress">Loading sensor data<p-progressBar mode="indeterminate" [style]="{'height': '6px'}"></p-progressBar></div>
+
+<p-accordion>
+  <p-accordionTab *ngFor="let unit of units">
+    <p-header [className]="'dashboard-unit-wrapper'">
+      <div [className]="'row dashboard-unit'">
+        <div class="col-sm-5 col-md-7 col-xl-9"><h3 class="unitName">{{ unit.unit.description}}</h3></div>
+        <div class="col-sm-7 col-md-5 col-xl-3 dashboard-unit-heading">
+          <button pButton type="button" label="Sensors graph" class="p-button-primary" icon="pi pi-chart-line" [id]="unit.unit.description" [routerLink]="['/dashboard/unit', unit.unit.unitId]" [queryParams]="{unitDescription: unit.unit.description}"></button>
+          <div class="dashboard-button-separator"></div>
+          <button pButton type="button" class="p-button-warning" icon="pi pi-cog" [id]="'manipulation_'+unit.unit.unitId" (click)="showItems($event, unit.unit); menu.toggle($event)"></button>
+          <p-menu #menu [popup]="true" [model]="items" [appendTo]="'body'" [baseZIndex]="50"></p-menu>
+        </div>
+      </div>
+    </p-header>
+    <div>
+      <ng-container *ngFor="let sensor of unit.sensors; let i = index">
+        <ng-container *ngIf="i > 0 && unit.sensors[i].sensorId.toString().slice(0, 5) !== unit.sensors[i-1].sensorId.toString().slice(0, 5)">
+          <hr>
+        </ng-container>
+        <app-sensors *ngIf="sensor" [sensor]="sensor" [unit]="unit.unit" [phenomenons]="phenomenons" [loggedUser]="loggedUser" (emitSensorDeletion)="deleteSensor(unit.unit.unitId, $event)" [sensorTypes]="sensorTypes"></app-sensors>
+      </ng-container>
+    </div>
+  </p-accordionTab>
+</p-accordion>

+ 4 - 0
src/app/dashboard/components/unit-list/unit-list.component.scss

@@ -0,0 +1,4 @@
+::ng-deep .p-accordion.p-component {
+  max-height: calc(100vh - 220px);
+  overflow: auto;
+}

+ 256 - 0
src/app/dashboard/components/unit-list/unit-list.component.ts

@@ -0,0 +1,256 @@
+import { Component, Input, OnDestroy, OnInit } from '@angular/core';
+import { Group } from '../../../shared/api/endpoints/models/group';
+import { Drivers } from '../../../shared/api/endpoints/models/drivers';
+import { GeneralInfo } from '../../../shared/api/endpoints/models/general-info';
+import { Lastpos } from '../../../shared/api/endpoints/models/lastpos';
+import { Sensor } from '../../../shared/api/endpoints/models/sensor';
+import { Unit } from '../../../shared/api/endpoints/models/unit';
+import { DataService } from '../../../shared/api/endpoints/services/data.service';
+import { Phenomenon } from '../../../shared/api/endpoints/models/phenomenon';
+import { SensorsService } from '../../../shared/api/endpoints/services/sensors.service';
+import { ConfirmationService, MenuItem, MessageService } from 'primeng/api';
+import { ManagementService } from '../../../shared/api/endpoints/services/management.service';
+import { ToastService } from '../../../shared/services/toast.service';
+import { map } from 'rxjs/operators';
+import { HttpResponse } from '@angular/common/http';
+import { AuthService } from '../../../auth/services/auth.service';
+import { User } from '../../../auth/models/user';
+import { SensorType } from '../../../shared/api/endpoints/models/sensor-type';
+import { Subscription } from 'rxjs';
+
+@Component({
+  selector: 'unit-list',
+  templateUrl: './unit-list.component.html',
+  styleUrls: ['./unit-list.component.scss']
+})
+export class UnitListComponent implements OnInit, OnDestroy {
+
+  @Input('user') loggedUser: User;
+  @Input('units') units: Array<{ drivers?: Drivers; generalInfo?: GeneralInfo; holder?: any; lastpos?: Lastpos; sensors?: Array<Sensor>; unit?: Unit }>;
+
+  phenomenons: Phenomenon[];
+  sensorTypes: SensorType[];
+
+  inProgress: Boolean = true;
+  items: MenuItem[] = [];
+  position: 'bottom';
+  groups: Group[];
+  editedUnit: Unit;
+  showEditUnitPopup = false;
+  showInsertSensorPopup = false;
+  showInsertPositionPopup = false;
+  subscription: Subscription[] = [];
+
+  constructor(
+    private dataService: DataService,
+    private sensorService: SensorsService,
+    private confirmationService: ConfirmationService,
+    private messageService: MessageService,
+    private managementService: ManagementService,
+    private toastService: ToastService,
+    private authService: AuthService
+  ) {
+    this.initData();
+  }
+
+  ngOnInit(): void {
+  }
+
+  /**
+   * Unsubscribe after leaving
+   */
+  ngOnDestroy(): void {
+    this.subscription.forEach(subs => subs.unsubscribe());
+  }
+
+  /**
+   * Get necessary data from backend
+   */
+  initData() {
+    this.sensorService.getPhenomenons().subscribe(
+      response => this.phenomenons = response
+    );
+  //  this.sensorService.getSensorTypes().subscribe(
+  //    response => this.sensorTypes = response
+  //  );
+  //  this.setUser();
+  //  this.getUnits();
+  }
+
+  /**
+   * Get user from user state
+   */
+  setUser() {
+    this.authService.getUserState().subscribe(res => {
+      if (res) {
+        this.loggedUser = res;
+      }
+    });
+  }
+
+  /**
+   * Get all units and theirs sensors from backend
+   */
+  getUnits() {
+    this.dataService.getData().subscribe(data => {
+      this.units = data;
+      this.units.forEach(unit => unit.sensors.sort((a, b) => a.sensorId - b.sensorId));
+    }, err => this.toastService.showError(err.error.message));
+  }
+
+  /**
+   * Show edit unit
+   * @param $event click event
+   * @param unit edited unit
+   */
+  editUnitPopup($event: MouseEvent, unit: Unit) {
+    this.editedUnit = unit;
+    this.showEditUnitPopup = true;
+  }
+
+  /**
+   * Show insert unit
+   * @param $event click event
+   * @param unit unit for sensor insert
+   */
+  insertSensorPopup($event: any, unit: Unit) {
+    this.showInsertSensorPopup = true;
+    this.editedUnit = unit;
+  }
+
+  /**
+   * Detele unit confirmation
+   * @param $event click event
+   * @param unit unit to delete
+   */
+  deleteUnit($event: any, unit: Unit) {
+    this.confirmationService.confirm({
+      message: 'Do you want to delete this unit?',
+      header: 'Delete unit confirmation',
+      icon: 'pi pi-info-circle',
+      accept: () => {
+        this.processUnitDeletion(unit);
+      },
+      reject: () => {
+        this.toastService.operationRejected();
+      },
+      key: 'positionDialog'
+    });
+  }
+
+  /**
+   * Send delete unit request to backend
+   * @param unit to delete
+   */
+  processUnitDeletion(unit: Unit) {
+    this.managementService.deleteUnit$Response({
+      body: {
+        unit: {
+          unit_id: unit.unitId
+        }
+      }
+    }).pipe(
+      map((response: HttpResponse<any>) => {
+        if (response.status === 200) {
+          this.toastService.showSuccessMessage(response.body.message);
+          this.units = this.units.filter(testedUnit => testedUnit.unit.unitId !== unit.unitId);
+        } else {
+        }
+      })
+    ).toPromise().then().catch(err => this.toastService.showError(err.error.message));
+  }
+
+  /**
+   * Show menu items to manipulate with unit
+   * @param $event click event
+   * @param unit unit we want edit
+   */
+  showItems($event: any, unit: Unit) {
+    $event.stopPropagation();
+    this.items = [
+      {
+        label: 'Edit unit', icon: 'pi pi-cog', command: () => {
+          this.editUnitPopup($event, unit);
+        }
+      },
+      {
+        label: 'Insert position', icon: 'pi pi-cog', command: () => {
+          this.insertPosition($event, unit);
+        }
+      },
+      {
+        label: 'Delete unit', icon: 'pi pi-times', command: () => {
+          this.deleteUnit($event, unit);
+        }
+      },
+      {
+        label: 'Add sensor', icon: 'pi pi-cog', command: () => {
+          this.insertSensorPopup($event, unit);
+        }
+      }
+    ]
+  }
+
+  /**
+   * Add created unit to memory so we do not need call backend
+   * @param inserted unit
+   */
+  addUnit(inserted: any) {
+    const sensors: Sensor[] = [];
+    inserted.sensors.forEach(sens => {
+      sensors.push({
+        sensorId: sens.sensor_id,
+        sensorType: sens.sensor_type,
+        sensorName: sens.sensor_name,
+        phenomenon: {
+          phenomenonId: sens.phenomenon.phenomenon_id.toString()
+        }
+      })
+    });
+    this.units.push({
+      unit: {
+        unitId: inserted.unit.unit_id,
+        description: inserted.unit.description
+      },
+      sensors
+    })
+  }
+
+  /**
+   * Add created sensors to unit in memory so we do not need call backend
+   * @param inserted sensors
+   */
+  addSensors(inserted: any) {
+    inserted.sensors.forEach(sens => {
+      this.units.find(un => un.unit.unitId === inserted.unit.unit_id).sensors.push({
+        sensorId: sens.sensor_id,
+        sensorType: sens.sensor_type,
+        sensorName: sens.sensor_name,
+        phenomenon: {
+          phenomenonId: sens.phenomenon.phenomenon_id.toString()
+        }
+      })
+    });
+  }
+
+  /**
+   * Delete sensor from memory
+   * @param unitId sensor unit
+   * @param sensor sensor to delete
+   */
+  deleteSensor(unitId: number, sensor: Sensor) {
+    this.units.find(unit => unit.unit.unitId === unitId).sensors =
+      this.units.find(unit => unit.unit.unitId === unitId).sensors.filter(testedSensor => testedSensor.sensorId !== sensor.sensorId);
+  }
+
+  /**
+   * Show insert position popup
+   * @param $event click event
+   * @param unit unit to insert position for
+   */
+  insertPosition($event: any, unit: Unit) {
+    $event.stopPropagation();
+    this.showInsertPositionPopup = true;
+    this.editedUnit = unit;
+  }
+}

+ 30 - 24
src/app/dashboard/dashboard.module.ts

@@ -1,37 +1,43 @@
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { DashboardComponent } from './components/dashboard.component';
-import {NavBarModule} from '../shared/nav-bar/nav-bar.module';
-import {RouterModule} from '@angular/router';
-import {ButtonModule} from 'primeng/button';
-import {AccordionModule} from 'primeng/accordion';
+import { NavBarModule } from '../shared/nav-bar/nav-bar.module';
+import { RouterModule } from '@angular/router';
+import { ButtonModule } from 'primeng/button';
+import { AccordionModule } from 'primeng/accordion';
 import { SensorsComponent } from './components/sensors/sensors.component';
 import { UnitPopupComponent } from './components/unit-popup/unit-popup.component';
-import {DialogModule} from 'primeng/dialog';
+import { DialogModule } from 'primeng/dialog';
 import { SensorPopupComponent } from './components/sensor-popup/sensor-popup.component';
-import {ReactiveFormsModule} from '@angular/forms';
+import { ReactiveFormsModule } from '@angular/forms';
 import { SensorInsertPopupComponent } from './components/sensor-insert-popup/sensor-insert-popup.component';
-import {ConfirmDialogModule} from 'primeng/confirmdialog';
-import {SplitButtonModule} from 'primeng/splitbutton';
+import { ConfirmDialogModule } from 'primeng/confirmdialog';
+import { SplitButtonModule } from 'primeng/splitbutton';
 import { PositionInsertPopupComponent } from './components/position-insert-popup/position-insert-popup.component';
-import {MenuModule} from 'primeng/menu';
-
-
+import { MenuModule } from 'primeng/menu';
+import { HslayersModule } from 'hslayers-ng';
+import { UnitListComponent } from './components/unit-list/unit-list.component';
+import { MapComponent } from './components/map/map.component';
+import { ProgressBarModule } from 'primeng/progressbar';
+import { TabViewModule } from 'primeng/tabview';
 
 @NgModule({
   declarations: [DashboardComponent, SensorsComponent, UnitPopupComponent, SensorPopupComponent, SensorInsertPopupComponent,
-    PositionInsertPopupComponent],
-    imports: [
-        CommonModule,
-        NavBarModule,
-        RouterModule,
-        ButtonModule,
-        AccordionModule,
-        DialogModule,
-        ReactiveFormsModule,
-        ConfirmDialogModule,
-        SplitButtonModule,
-        MenuModule
-    ]
+    PositionInsertPopupComponent, UnitListComponent, MapComponent],
+  imports: [
+    CommonModule,
+    NavBarModule,
+    RouterModule,
+    ButtonModule,
+    AccordionModule,
+    DialogModule,
+    ReactiveFormsModule,
+    ConfirmDialogModule,
+    SplitButtonModule,
+    MenuModule,
+    HslayersModule,
+    ProgressBarModule,
+    TabViewModule
+  ]
 })
 export class DashboardModule { }

+ 0 - 5
src/app/map/map.component.html

@@ -1,5 +0,0 @@
-<!--<app-nav-bar (emitNewUnit)="addUnit($event)" [sensorTypes]="sensorTypes"></app-nav-bar>-->
-
-<div class="container map">
-  <hslayers></hslayers>
-</div>

+ 0 - 1
src/app/shared/nav-bar/components/data-download/data-download-popup.component.ts

@@ -9,7 +9,6 @@ import { DataService } from '../../../api/endpoints/services/data.service';
 import { Sensor } from '../../../api/endpoints/models/sensor';
 import { Unit } from '../../../api/endpoints/models/unit';
 import * as moment from 'moment-timezone';
-import { DashboardComponent } from '../../../../dashboard/components/dashboard.component';
 import { formatDate } from '@angular/common';
 
 @Component({

+ 1 - 1
src/environments/environment.ts

@@ -1,4 +1,4 @@
 export const environment = {
   production: false,
-  sensLogBaseUrl: 'https://sensor.lesprojekt.cz'
+  sensLogBaseUrl: ''
 };