Improve scraper (#28)

This commit is contained in:
Thomas
2021-04-20 21:52:01 +02:00
committed by GitHub
parent 3e3395aff9
commit 069006145a
11 changed files with 210 additions and 165 deletions

View File

@@ -81,8 +81,7 @@ const routes: Routes = [
{
preloadingStrategy: ModulePreloadService,
// enableTracing: true // <-- debugging purposes only
relativeLinkResolution: 'legacy',
scrollPositionRestoration: 'enabled'
relativeLinkResolution: 'legacy'
}
)
],

View File

@@ -40,7 +40,9 @@
class="ml-1"
[url]="position?.url"
></gf-symbol-icon>
<span class="ml-2 text-muted">({{ position?.exchange }})</span>
<span *ngIf="position?.exchange" class="ml-2 text-muted"
>({{ position.exchange }})</span
>
</div>
<div class="d-flex mt-1">
<gf-value

View File

@@ -85,6 +85,18 @@ export class HomePageComponent implements OnDestroy, OnInit {
user.permissions,
permissions.accessFearAndGreedIndex
);
if (this.hasPermissionToAccessFearAndGreedIndex) {
this.dataService
.fetchSymbolItem('GF.FEAR_AND_GREED_INDEX')
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe(({ marketPrice }) => {
this.fearAndGreedIndex = marketPrice;
this.cd.markForCheck();
});
}
this.hasPermissionToReadForeignPortfolio = hasPermission(
user.permissions,
permissions.readForeignPortfolio
@@ -180,17 +192,6 @@ export class HomePageComponent implements OnDestroy, OnInit {
this.cd.markForCheck();
});
if (this.hasPermissionToAccessFearAndGreedIndex) {
this.dataService
.fetchSymbolItem('GF.FEAR_AND_GREED_INDEX')
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe(({ marketPrice }) => {
this.fearAndGreedIndex = marketPrice;
this.cd.markForCheck();
});
}
this.cd.markForCheck();
}