| 58 | var templates = template.Must(template.New("info").Parse(TEMPLATE_PAGE)) |
| 59 | |
| 60 | func newNgbNodeInfo(ngbId string, ngbType string, ngbAddr string, httpInfoAddr string, httpInfoPort uint16, httpInfoStart bool, ngbVersion string) *NgbNodeInfo { |
| 61 | return &NgbNodeInfo{NgbId: ngbId, NgbType: ngbType, NgbAddr: ngbAddr, HttpInfoAddr: httpInfoAddr, |
| 62 | HttpInfoPort: httpInfoPort, HttpInfoStart: httpInfoStart, NgbVersion: ngbVersion} |
| 63 | } |
| 64 | |
| 65 | func initPageInfo(blockHeight uint32, curNodeType string, ngbrCnt int, ngbrsInfo []NgbNodeInfo) (*Info, error) { |
| 66 | id := fmt.Sprintf("0x%x", node.GetID()) |