Skip to content

Commit

Permalink
click event on devices and gateways in monitoring view
Browse files Browse the repository at this point in the history
  • Loading branch information
cpoder committed Nov 14, 2024
1 parent 773bae4 commit 15f2eaa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/lora-package/src/monitoring/monitor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Component } from "@angular/core";
import { IManagedObject, InventoryService } from "@c8y/client";
import { ECharts, EChartsOption } from 'echarts';
import { LnsService } from "../service/LnsService";
import { Location } from "@angular/common";

@Component({
selector: "loramonitoring",
Expand Down Expand Up @@ -83,7 +84,7 @@ export class MonitorComponent {
]
};

constructor(private lnsService: LnsService, private inventory: InventoryService) {
constructor(private lnsService: LnsService, private inventory: InventoryService, public location: Location) {
}

getAvailabilityStyle(mor: IManagedObject): string {
Expand Down Expand Up @@ -153,7 +154,7 @@ export class MonitorComponent {
params.data["unfold"] = true;
}
if (params.data["lora_ns_device_LoRaDevice"] || params.data["lora_ns_gateway_LoRaGateway"]) {

this.location.replaceState("/device/" + params.data["id"]);
}
}
})
Expand Down

0 comments on commit 15f2eaa

Please sign in to comment.