@ -37,16 +37,24 @@ import {numToColor} from "../../utils/Utils";
* ngFor = "let node of nodes | NodeDtoSort: sort.type | NodeDtoSearch: search.type: searchContent"
[ style ] = "{'background-color':numToColor(node.num)}" >
< mat - card - header >
< mat - card - title > { { node . long_name } } < / m a t - c a r d - t i t l e >
< mat - card - subtitle > { { node . short_name } } ( { { node . num } } ) < / m a t - c a r d - s u b t i t l e >
< mat - card - title >
< p style = "display: inline; padding-right: 8px" > { { node . long_name } } < / p >
< p style = "display: inline" * ngIf = "node.view_in_packets" > < mat - icon style = "font-size: 14px; height: 16px; width: 16px" matTooltip = "Имеет подтвержденный пакет" > done < / m a t - i c o n > < / p >
< p style = "display: inline" * ngIf = "node.havePosition" > < mat - icon style = "font-size: 14px; height: 16px; width: 16px" matTooltip = "Доступна позиция ноды" > add_location < / m a t - i c o n > < / p >
< p style = "display: inline" * ngIf = "node.haveMetrics" > < mat - icon style = "font-size: 14px; height: 16px; width: 16px" matTooltip = "Есть данные о состоянии" > battery_unknown < / m a t - i c o n > < / p >
< / m a t - c a r d - t i t l e >
< mat - card - subtitle >
< p > { { node . short_name } } ( { { node . num } } ) < / p >
< / m a t - c a r d - s u b t i t l e >
< / m a t - c a r d - h e a d e r >
<!-- < mat - card - content >
< / m a t - c a r d - c o n t e n t > - - >
< mat - card - actions >
< button mat - button > { { node . ts * 1000 | date : "HH:mm dd.MM.yyyy" } } < / button >
< button mat - button * ngIf = "node.hops_away > 0" > П р ы ж к о в : { { node . hops_away } } < / button >
< button mat - button > SNR : { { node . snr } } < / button >
< button mat - button * ngIf = "node.hops_away != null" matTooltip = "Прыжки" > { { node . hops_away > 0 ? node . hops_away : "Прямая" } } < / button >
< button mat - button * ngIf = "node.snr != null" matTooltip = "SNR" > { { node . snr } } dB < / button >
< button mat - button * ngIf = "node.rssi != null" matTooltip = "RSSI" > { { node . rssi } } dB < / button >
< button mat - button ( click ) = " goTo ( ' / network / status / ' + node.num ) " > С т а т и с т и к а < / button >
< / m a t - c a r d - a c t i o n s >
< / m a t - c a r d >
@ -65,6 +73,9 @@ export class NodesListComponent implements OnInit {
sortVars : { name : string , type : string } [ ] = [
{ name : "Последнему пингу" , type : "ts" } ,
{ name : "SNR" , type : "snr" } ,
{ name : "RSSI" , type : "rssi" } ,
{ name : "Хопам" , type : "hops_away" } ,
{ name : "Наличию пакетов" , type : "view_in_packets" }
//{name: "Имени", type: "long_name"}
]
sort : { name : string , type : string } = this . sortVars [ 0 ]