You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
827 B
TypeScript
25 lines
827 B
TypeScript
import { Component, OnInit, Input } from '@angular/core';
|
|
import { formatDate } from '@angular/common';
|
|
|
|
import { GraphNode } from '../../../shared/models/lndModels';
|
|
|
|
@Component({
|
|
selector: 'rtl-node-lookup',
|
|
templateUrl: './node-lookup.component.html',
|
|
styleUrls: ['./node-lookup.component.css']
|
|
})
|
|
export class NodeLookupComponent implements OnInit {
|
|
@Input() lookupResult: GraphNode;
|
|
public displayedColumns = ['network', 'addr'];
|
|
|
|
constructor() { }
|
|
|
|
ngOnInit() {
|
|
if (undefined !== this.lookupResult && undefined !== this.lookupResult.node && undefined !== this.lookupResult.node.last_update_str) {
|
|
this.lookupResult.node.last_update_str = (this.lookupResult.node.last_update_str === '') ?
|
|
'' : formatDate(this.lookupResult.node.last_update_str, 'MMM/dd/yy HH:mm:ss', 'en-US');
|
|
}
|
|
}
|
|
|
|
}
|