|
|
@ -18,6 +18,7 @@ import { |
|
|
|
ScraperConfiguration, |
|
|
|
User |
|
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
|
import { DateRange } from '@ghostfolio/common/types'; |
|
|
|
import { GfCurrencySelectorComponent } from '@ghostfolio/ui/currency-selector'; |
|
|
|
import { GfEntityLogoComponent } from '@ghostfolio/ui/entity-logo'; |
|
|
|
import { GfHistoricalMarketDataEditorComponent } from '@ghostfolio/ui/historical-market-data-editor'; |
|
|
@ -190,6 +191,32 @@ export class GfAssetProfileDialogComponent implements OnDestroy, OnInit { |
|
|
|
}; |
|
|
|
|
|
|
|
public currencies: string[] = []; |
|
|
|
public dateRangeOptions = [ |
|
|
|
{ |
|
|
|
label: $localize`Current week` + ' (' + $localize`WTD` + ')', |
|
|
|
value: 'wtd' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: $localize`Current month` + ' (' + $localize`MTD` + ')', |
|
|
|
value: 'mtd' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: $localize`Current year` + ' (' + $localize`YTD` + ')', |
|
|
|
value: 'ytd' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '1 ' + $localize`year` + ' (' + $localize`1Y` + ')', |
|
|
|
value: '1y' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '5 ' + $localize`years` + ' (' + $localize`5Y` + ')', |
|
|
|
value: '5y' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: $localize`Max`, |
|
|
|
value: 'max' |
|
|
|
} |
|
|
|
]; |
|
|
|
public historicalDataItems: LineChartItem[]; |
|
|
|
public isBenchmark = false; |
|
|
|
public isDataGatheringEnabled: boolean; |
|
|
@ -405,9 +432,15 @@ export class GfAssetProfileDialogComponent implements OnDestroy, OnInit { |
|
|
|
.subscribe(); |
|
|
|
} |
|
|
|
|
|
|
|
public onGatherSymbol({ dataSource, symbol }: AssetProfileIdentifier) { |
|
|
|
public onGatherSymbol({ |
|
|
|
dataSource, |
|
|
|
range, |
|
|
|
symbol |
|
|
|
}: { |
|
|
|
range?: DateRange; |
|
|
|
} & AssetProfileIdentifier) { |
|
|
|
this.adminService |
|
|
|
.gatherSymbol({ dataSource, symbol }) |
|
|
|
.gatherSymbol({ dataSource, range, symbol }) |
|
|
|
.pipe(takeUntil(this.unsubscribeSubject)) |
|
|
|
.subscribe(); |
|
|
|
} |
|
|
|