Browse Source

web-ui: Upgrade angular to 7.2.1

prometheus-integration
Alexis Hernandez 6 years ago
parent
commit
efea7d0159
  1. 3213
      web-ui/package-lock.json
  2. 31
      web-ui/package.json
  3. 8
      web-ui/src/app/app.component.ts
  4. 6
      web-ui/src/app/components/address-details/address-details.component.ts
  5. 6
      web-ui/src/app/components/block-details/block-details.component.ts
  6. 25
      web-ui/src/app/components/latest-blocks/latest-blocks.component.ts
  7. 16
      web-ui/src/app/components/masternodes/masternodes.component.ts
  8. 10
      web-ui/src/app/components/richest-addresses/richest-addresses.component.ts
  9. 2
      web-ui/src/app/services/addresses.service.ts
  10. 2
      web-ui/src/app/services/balances.service.ts
  11. 2
      web-ui/src/app/services/blocks.service.ts
  12. 2
      web-ui/src/app/services/masternodes.service.ts
  13. 2
      web-ui/src/app/services/ticker.service.ts
  14. 2
      web-ui/src/app/services/transactions.service.ts
  15. 1034
      web-ui/yarn.lock

3213
web-ui/package-lock.json

File diff suppressed because it is too large

31
web-ui/package.json

@ -12,34 +12,34 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^6.1.0",
"@angular/common": "^6.1.0",
"@angular/compiler": "^6.1.0",
"@angular/core": "^6.1.0",
"@angular/forms": "^6.1.0",
"@angular/http": "^6.1.0",
"@angular/platform-browser": "^6.1.0",
"@angular/platform-browser-dynamic": "^6.1.0",
"@angular/router": "^6.1.0",
"@angular/animations": "^7.2.1",
"@angular/common": "^7.2.1",
"@angular/compiler": "^7.2.1",
"@angular/core": "^7.2.1",
"@angular/forms": "^7.2.1",
"@angular/http": "^7.2.1",
"@angular/platform-browser": "^7.2.1",
"@angular/platform-browser-dynamic": "^7.2.1",
"@angular/router": "^7.2.1",
"@ngx-translate/core": "^10.0.2",
"bootstrap": "^3.3.7",
"core-js": "^2.5.4",
"moment": "^2.22.2",
"ng-http-loader": "^3.1.2",
"ng-http-loader": "^5.0.0",
"ngx-bootstrap": "^3.0.1",
"ngx-infinite-scroll": "^7.0.1",
"ngx-moment": "^3.0.1",
"ngx-pagination": "^3.2.1",
"ngx-toastr": "^9.1.0",
"rxjs": "~6.2.0",
"rxjs": "~6.3.3",
"rxjs-compat": "^6.3.3",
"zone.js": "~0.8.26"
"zone.js": "~0.8.28"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.8.0",
"@angular/cli": "^7.2.2",
"@angular/compiler-cli": "^6.1.0",
"@angular/language-service": "^6.1.0",
"@angular/compiler-cli": "^7.2.1",
"@angular/language-service": "^7.2.1",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
@ -55,6 +55,7 @@
"protractor": "^5.4.1",
"ts-node": "~3.2.0",
"tslint": "~5.11.0",
"typescript": "~2.9.2"
"typescript": "~3.2.4",
"webpack": "4.24.0"
}
}

8
web-ui/src/app/app.component.ts

@ -1,8 +1,10 @@
import {distinctUntilChanged} from 'rxjs/operators';
import { Component, OnInit } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';
import 'rxjs/add/operator/distinctUntilChanged';
import { TranslateService } from '@ngx-translate/core';
@ -31,14 +33,14 @@ export class AppComponent implements OnInit {
ngOnInit() {
// integrate google analytics via gtag - based on https://stackoverflow.com/a/47658214/3211175
this.router.events.distinctUntilChanged((previous: any, current: any) => {
this.router.events.pipe(distinctUntilChanged((previous: any, current: any) => {
// Subscribe to any `NavigationEnd` events where the url has changed
if (current instanceof NavigationEnd) {
return previous.url === current.url;
}
return true;
}).subscribe((x: any) => {
})).subscribe((x: any) => {
const dirtyUrl: string = x.url || '';
const url = this.removeQueryParams(dirtyUrl);
(<any>window).gtag('config', environment.gtag.id, { 'page_path': url });

6
web-ui/src/app/components/address-details/address-details.component.ts

@ -1,3 +1,5 @@
import {tap} from 'rxjs/operators';
import { Component, OnInit, HostListener } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@ -50,8 +52,8 @@ export class AddressDetailsComponent implements OnInit {
}
this.addressesService
.getTransactionsV2(this.addressString, this.limit, lastSeenTxid, order)
.do(response => this.items.push(...response.data))
.getTransactionsV2(this.addressString, this.limit, lastSeenTxid, order).pipe(
tap(response => this.items.push(...response.data)))
.subscribe();
}

6
web-ui/src/app/components/block-details/block-details.component.ts

@ -1,3 +1,5 @@
import {tap} from 'rxjs/operators';
import { Component, OnInit, HostListener } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@ -62,8 +64,8 @@ export class BlockDetailsComponent implements OnInit {
}
this.blocksService
.getTransactionsV2(this.blockhash, this.limit, lastSeenTxid)
.do(response => this.transactions.push(...response.data))
.getTransactionsV2(this.blockhash, this.limit, lastSeenTxid).pipe(
tap(response => this.transactions.push(...response.data)))
.subscribe();
}

25
web-ui/src/app/components/latest-blocks/latest-blocks.component.ts

@ -1,14 +1,9 @@
import {tap, merge, switchMap} from 'rxjs/operators';
import { Component, OnInit, OnDestroy } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Subscription } from 'rxjs/Subscription';
import { Subject } from 'rxjs/Subject';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/merge';
import 'rxjs/add/operator/switchMap';
import { of } from 'rxjs';
import { Subscription , Subject , of } from 'rxjs';
import { Block } from '../../models/block';
@ -52,14 +47,14 @@ export class LatestBlocksComponent implements OnInit, OnDestroy {
const interval = 50000;
// polling based on https://stackoverflow.com/a/42659054/3211175
this.subscription$ = of(null)
.merge(polling$)
.switchMap(_ =>
this.blocksService.getLatest()
.do(_ => {
this.subscription$ = of(null).pipe(
merge(polling$),
switchMap(_ =>
this.blocksService.getLatest().pipe(
tap(_ => {
setTimeout(_ => polling$.next(null), interval);
})
)
}))
),)
.subscribe(
response => this.onBlockRetrieved(response),
response => this.onError(response)

16
web-ui/src/app/components/masternodes/masternodes.component.ts

@ -1,9 +1,11 @@
import {map, tap} from 'rxjs/operators';
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/map';
import { Masternode } from '../../models/masternode';
@ -38,9 +40,9 @@ export class MasternodesComponent implements OnInit {
const limit = this.pageSize;
this.asyncItems = this.masternodesService
.get(offset, limit, 'activeSeconds:desc')
.do(response => this.total = response.total)
.do(response => this.currentPage = 1 + (response.offset / this.pageSize))
.map(response => response.data);
.get(offset, limit, 'activeSeconds:desc').pipe(
tap(response => this.total = response.total),
tap(response => this.currentPage = 1 + (response.offset / this.pageSize)),
map(response => response.data),);
}
}

10
web-ui/src/app/components/richest-addresses/richest-addresses.component.ts

@ -1,7 +1,9 @@
import {tap} from 'rxjs/operators';
import { Component, OnInit, OnDestroy, HostListener } from '@angular/core';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/map';
import { Balance } from '../../models/balance';
@ -43,8 +45,8 @@ export class RichestAddressesComponent implements OnInit {
}
this.balancesService
.getHighest(this.limit, lastSeenAddress)
.do(response => this.items.push(...response.data))
.getHighest(this.limit, lastSeenAddress).pipe(
tap(response => this.items.push(...response.data)))
.subscribe();
}

2
web-ui/src/app/services/addresses.service.ts

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment';

2
web-ui/src/app/services/balances.service.ts

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment';

2
web-ui/src/app/services/blocks.service.ts

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment';

2
web-ui/src/app/services/masternodes.service.ts

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment';

2
web-ui/src/app/services/ticker.service.ts

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment';

2
web-ui/src/app/services/transactions.service.ts

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment';

1034
web-ui/yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save