|
@ -1,9 +1,4 @@ |
|
|
<form |
|
|
<div class="d-flex flex-column h-100"> |
|
|
class="d-flex flex-column h-100" |
|
|
|
|
|
[formGroup]="assetProfileForm" |
|
|
|
|
|
(keyup.enter)="assetProfileForm.valid && onSubmit()" |
|
|
|
|
|
(ngSubmit)="onSubmit()" |
|
|
|
|
|
> |
|
|
|
|
|
<div class="d-flex mb-3"> |
|
|
<div class="d-flex mb-3"> |
|
|
<h1 class="flex-grow-1 m-0" mat-dialog-title> |
|
|
<h1 class="flex-grow-1 m-0" mat-dialog-title> |
|
|
{{ assetProfile?.name ?? data.symbol }} |
|
|
{{ assetProfile?.name ?? data.symbol }} |
|
@ -91,12 +86,34 @@ |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<div class="row"> |
|
|
<div class="row"> |
|
|
|
|
|
@if (isEditSymbolMode) { |
|
|
|
|
|
<div class="col-12 mb-3"> |
|
|
|
|
|
<mat-form-field appearance="outline"> |
|
|
|
|
|
<mat-label i18n>Name, symbol or ISIN</mat-label> |
|
|
|
|
|
<gf-symbol-autocomplete |
|
|
|
|
|
formControlName="searchSymbol" |
|
|
|
|
|
[includeIndices]="true" |
|
|
|
|
|
/> |
|
|
|
|
|
</mat-form-field> |
|
|
|
|
|
<button class="mx-1 no-min-width px-2" mat-button type="button"> |
|
|
|
|
|
Apply |
|
|
|
|
|
</button> |
|
|
|
|
|
<button |
|
|
|
|
|
class="mx-1 no-min-width px-2" |
|
|
|
|
|
mat-button |
|
|
|
|
|
type="button" |
|
|
|
|
|
(click)="onCancelEditSymboleMode()" |
|
|
|
|
|
> |
|
|
|
|
|
Cancel |
|
|
|
|
|
</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
} @else { |
|
|
<div class="col-6 mb-3"> |
|
|
<div class="col-6 mb-3"> |
|
|
<gf-value i18n size="medium" [value]="assetProfile?.symbol" |
|
|
<gf-value i18n size="medium" [value]="assetProfile?.symbol" |
|
|
>Symbol</gf-value |
|
|
>Symbol</gf-value |
|
|
> |
|
|
> |
|
|
</div> |
|
|
</div> |
|
|
<div class="col-6 mb-3"> |
|
|
<div class="col-4 mb-3"> |
|
|
<gf-value |
|
|
<gf-value |
|
|
i18n |
|
|
i18n |
|
|
size="medium" |
|
|
size="medium" |
|
@ -106,6 +123,18 @@ |
|
|
>Data Source</gf-value |
|
|
>Data Source</gf-value |
|
|
> |
|
|
> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="col-1 mb-3"> |
|
|
|
|
|
<button |
|
|
|
|
|
class="mx-1 no-min-width px-2" |
|
|
|
|
|
mat-button |
|
|
|
|
|
type="button" |
|
|
|
|
|
[disabled]="assetProfileForm.dirty" |
|
|
|
|
|
(click)="onSetEditSymboleMode()" |
|
|
|
|
|
> |
|
|
|
|
|
<ion-icon name="create-outline"></ion-icon> |
|
|
|
|
|
</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
<div class="col-6 mb-3"> |
|
|
<div class="col-6 mb-3"> |
|
|
<gf-value i18n size="medium" [value]="assetProfile?.currency" |
|
|
<gf-value i18n size="medium" [value]="assetProfile?.currency" |
|
|
>Currency</gf-value |
|
|
>Currency</gf-value |
|
@ -202,6 +231,11 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<form |
|
|
|
|
|
[formGroup]="assetProfileForm" |
|
|
|
|
|
(keyup.enter)="assetProfileForm.valid && onSubmitAssetProfileForm()" |
|
|
|
|
|
(ngSubmit)="onSubmitAssetProfileForm()" |
|
|
|
|
|
> |
|
|
<div class="mt-3"> |
|
|
<div class="mt-3"> |
|
|
<mat-form-field appearance="outline" class="w-100 without-hint"> |
|
|
<mat-form-field appearance="outline" class="w-100 without-hint"> |
|
|
<mat-label i18n>Name</mat-label> |
|
|
<mat-label i18n>Name</mat-label> |
|
@ -251,6 +285,7 @@ |
|
|
color="primary" |
|
|
color="primary" |
|
|
i18n |
|
|
i18n |
|
|
[checked]="isBenchmark" |
|
|
[checked]="isBenchmark" |
|
|
|
|
|
[disabled]="isEditSymbolMode" |
|
|
(change)=" |
|
|
(change)=" |
|
|
isBenchmark |
|
|
isBenchmark |
|
|
? onUnsetBenchmark({ |
|
|
? onUnsetBenchmark({ |
|
@ -296,7 +331,10 @@ |
|
|
</mat-expansion-panel-header> |
|
|
</mat-expansion-panel-header> |
|
|
<div formGroupName="scraperConfiguration"> |
|
|
<div formGroupName="scraperConfiguration"> |
|
|
<div class="mt-3"> |
|
|
<div class="mt-3"> |
|
|
<mat-form-field appearance="outline" class="w-100 without-hint"> |
|
|
<mat-form-field |
|
|
|
|
|
appearance="outline" |
|
|
|
|
|
class="w-100 without-hint" |
|
|
|
|
|
> |
|
|
<mat-label i18n>Default Market Price</mat-label> |
|
|
<mat-label i18n>Default Market Price</mat-label> |
|
|
<input |
|
|
<input |
|
|
formControlName="defaultMarketPrice" |
|
|
formControlName="defaultMarketPrice" |
|
@ -306,7 +344,10 @@ |
|
|
</mat-form-field> |
|
|
</mat-form-field> |
|
|
</div> |
|
|
</div> |
|
|
<div class="mt-3"> |
|
|
<div class="mt-3"> |
|
|
<mat-form-field appearance="outline" class="w-100 without-hint"> |
|
|
<mat-form-field |
|
|
|
|
|
appearance="outline" |
|
|
|
|
|
class="w-100 without-hint" |
|
|
|
|
|
> |
|
|
<mat-label i18n>HTTP Request Headers</mat-label> |
|
|
<mat-label i18n>HTTP Request Headers</mat-label> |
|
|
<textarea |
|
|
<textarea |
|
|
cdkTextareaAutosize |
|
|
cdkTextareaAutosize |
|
@ -318,13 +359,19 @@ |
|
|
</mat-form-field> |
|
|
</mat-form-field> |
|
|
</div> |
|
|
</div> |
|
|
<div class="mt-3"> |
|
|
<div class="mt-3"> |
|
|
<mat-form-field appearance="outline" class="w-100 without-hint"> |
|
|
<mat-form-field |
|
|
|
|
|
appearance="outline" |
|
|
|
|
|
class="w-100 without-hint" |
|
|
|
|
|
> |
|
|
<mat-label i18n>Locale</mat-label> |
|
|
<mat-label i18n>Locale</mat-label> |
|
|
<input formControlName="locale" matInput type="text" /> |
|
|
<input formControlName="locale" matInput type="text" /> |
|
|
</mat-form-field> |
|
|
</mat-form-field> |
|
|
</div> |
|
|
</div> |
|
|
<div class="mt-3"> |
|
|
<div class="mt-3"> |
|
|
<mat-form-field appearance="outline" class="w-100 without-hint"> |
|
|
<mat-form-field |
|
|
|
|
|
appearance="outline" |
|
|
|
|
|
class="w-100 without-hint" |
|
|
|
|
|
> |
|
|
<mat-label i18n>Mode</mat-label> |
|
|
<mat-label i18n>Mode</mat-label> |
|
|
<mat-select formControlName="mode"> |
|
|
<mat-select formControlName="mode"> |
|
|
@for (modeValue of modeValues; track modeValue) { |
|
|
@for (modeValue of modeValues; track modeValue) { |
|
@ -336,7 +383,10 @@ |
|
|
</mat-form-field> |
|
|
</mat-form-field> |
|
|
</div> |
|
|
</div> |
|
|
<div class="mt-3"> |
|
|
<div class="mt-3"> |
|
|
<mat-form-field appearance="outline" class="w-100 without-hint"> |
|
|
<mat-form-field |
|
|
|
|
|
appearance="outline" |
|
|
|
|
|
class="w-100 without-hint" |
|
|
|
|
|
> |
|
|
<mat-label> |
|
|
<mat-label> |
|
|
<ng-container i18n>Selector</ng-container>* |
|
|
<ng-container i18n>Selector</ng-container>* |
|
|
</mat-label> |
|
|
</mat-label> |
|
@ -349,7 +399,10 @@ |
|
|
</mat-form-field> |
|
|
</mat-form-field> |
|
|
</div> |
|
|
</div> |
|
|
<div class="mt-3"> |
|
|
<div class="mt-3"> |
|
|
<mat-form-field appearance="outline" class="w-100 without-hint"> |
|
|
<mat-form-field |
|
|
|
|
|
appearance="outline" |
|
|
|
|
|
class="w-100 without-hint" |
|
|
|
|
|
> |
|
|
<mat-label> |
|
|
<mat-label> |
|
|
<ng-container i18n>Url</ng-container>* |
|
|
<ng-container i18n>Url</ng-container>* |
|
|
</mat-label> |
|
|
</mat-label> |
|
@ -364,8 +417,8 @@ |
|
|
[disabled]=" |
|
|
[disabled]=" |
|
|
assetProfileForm.controls.scraperConfiguration.controls |
|
|
assetProfileForm.controls.scraperConfiguration.controls |
|
|
.selector.value === '' || |
|
|
.selector.value === '' || |
|
|
assetProfileForm.controls.scraperConfiguration.controls.url |
|
|
assetProfileForm.controls.scraperConfiguration.controls |
|
|
.value === '' |
|
|
.url.value === '' |
|
|
" |
|
|
" |
|
|
(click)="onTestMarketData()" |
|
|
(click)="onTestMarketData()" |
|
|
> |
|
|
> |
|
@ -426,6 +479,7 @@ |
|
|
></textarea> |
|
|
></textarea> |
|
|
</mat-form-field> |
|
|
</mat-form-field> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</form> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="d-flex justify-content-end" mat-dialog-actions> |
|
|
<div class="d-flex justify-content-end" mat-dialog-actions> |
|
@ -439,4 +493,4 @@ |
|
|
<ng-container i18n>Save</ng-container> |
|
|
<ng-container i18n>Save</ng-container> |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
</form> |
|
|
</div> |
|
|