This commit is contained in:
raja.blaze 2019-08-07 19:19:33 +05:30
parent 4ac6adee4d
commit e6ce38970f
5 changed files with 24 additions and 9 deletions

View File

@ -134,7 +134,9 @@ connection
});
const io = require("socket.io").listen(server);
io.sockets.on("connection", socket => {
setInterval(function() {
universalGetLatestBlockDetails(socket);
},1000);
});
})
.catch(error => {

View File

@ -2,6 +2,7 @@ import { getConnection } from "typeorm";
const moment = require("moment");
export async function universalGetLatestBlockDetails(socket) {
let block_height = "",
letest_block = "",
letest_block_num = "",

View File

@ -16,15 +16,18 @@ export class ChartService {
private server = environment.domain;
private socket;
constructor(public http: HttpClient) {}
public createSocketConnection() {
constructor(public http: HttpClient) {
this.socket = io.connect(this.server);
this.socket.on("connect", function(socket) {
console.log("Connected!");
});
}
// public createSocketConnection() {
// console.log("environment.domain",environment.domain);
// this.socket = io.connect(this.server);
// this.socket.on("connect", function(socket) {
// console.log("Connected!");
// });
// }
public apiGetRequest(request: any, reqUrl): Observable<any> {
return this.http
.get(`${environment.apiUrl}` + reqUrl, {

View File

@ -31,6 +31,8 @@ export class BlockDetailListComponent implements OnInit {
ngOnInit() {
this.gettinglatesthashList();
this.getBlockDetails();
console.log("Enter Nginit");
}
ngAfterViewInit() {

View File

@ -645,3 +645,10 @@ body.dark_theme {
.dark_theme .view_content table{border-color: #384566;}
.dark_theme .card-body{background-color: #1c2437;}
.diff_margin{margin-bottom: -10px !important; margin-top: -10px !important;}
.item-highlight {
animation: yellowfade 5s ;
-moz-animation: yellowfade 5s ;
-webkit-animation: yellowfade 5s ;
-o-animation: yellowfade 5s ;
}