|
@ -281,11 +281,11 @@ |
|
|
<div class="mb-3"> |
|
|
<div class="mb-3"> |
|
|
<mat-accordion class="my-3"> |
|
|
<mat-accordion class="my-3"> |
|
|
<mat-expansion-panel |
|
|
<mat-expansion-panel |
|
|
(closed)="panelOpenState.set(false)" |
|
|
(closed)="scraperConfiguationIsExpanded.set(false)" |
|
|
(opened)="panelOpenState.set(true)" |
|
|
(opened)="scraperConfiguationIsExpanded.set(true)" |
|
|
> |
|
|
> |
|
|
<mat-expansion-panel-header> |
|
|
<mat-expansion-panel-header> |
|
|
<mat-panel-title> Scraper Configuration </mat-panel-title> |
|
|
<mat-panel-title i18n> Scraper Configuration </mat-panel-title> |
|
|
</mat-expansion-panel-header> |
|
|
</mat-expansion-panel-header> |
|
|
<div formGroupName="scraperConfiguration"> |
|
|
<div formGroupName="scraperConfiguration"> |
|
|
<div class="mt-3"> |
|
|
<div class="mt-3"> |
|
@ -296,39 +296,36 @@ |
|
|
matInput |
|
|
matInput |
|
|
type="number" |
|
|
type="number" |
|
|
/> |
|
|
/> |
|
|
<div class="align-items-end d-flex"></div> |
|
|
|
|
|
</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>Headers</mat-label> |
|
|
<mat-label i18n>Headers</mat-label> |
|
|
<div class="align-items-end d-flex"> |
|
|
<textarea |
|
|
<textarea |
|
|
cdkTextareaAutosize |
|
|
cdkTextareaAutosize |
|
|
formControlName="headers" |
|
|
formControlName="headers" |
|
|
matInput |
|
|
matInput |
|
|
type="text" |
|
|
type="text" |
|
|
[matAutocomplete]="auto" |
|
|
[matAutocomplete]="auto" |
|
|
></textarea> |
|
|
></textarea> |
|
|
|
|
|
</div> |
|
|
|
|
|
</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> |
|
|
<div class="align-items-end d-flex"> |
|
|
<input formControlName="locale" matInput type="text" /> |
|
|
<input formControlName="locale" matInput type="text" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</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 |
|
|
<mat-option [value]="null" /> |
|
|
formControlName="mode" |
|
|
@for (modeVal of modeValues; track modeVal) { |
|
|
[(ngModel)]="selectedModeValue" |
|
|
<mat-option [value]="modeVal.value">{{ |
|
|
> |
|
|
modeVal.viewValue |
|
|
@for (modeValue of modeValues; track modeValue) { |
|
|
|
|
|
<mat-option [value]="modeValue.value">{{ |
|
|
|
|
|
modeValue.viewValue |
|
|
}}</mat-option> |
|
|
}}</mat-option> |
|
|
} |
|
|
} |
|
|
</mat-select> |
|
|
</mat-select> |
|
@ -337,32 +334,38 @@ |
|
|
<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>Selector</mat-label> |
|
|
<mat-label i18n>Selector</mat-label> |
|
|
<div class="align-items-end d-flex"> |
|
|
<textarea |
|
|
<textarea |
|
|
cdkTextareaAutosize |
|
|
cdkTextareaAutosize |
|
|
formControlName="selector" |
|
|
formControlName="selector" |
|
|
matInput |
|
|
matInput |
|
|
type="text" |
|
|
type="text" |
|
|
></textarea> |
|
|
(keyup.enter)="$event.stopPropagation()" |
|
|
|
|
|
></textarea> |
|
|
|
|
|
</div> |
|
|
|
|
|
</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>URL</mat-label> |
|
|
<mat-label i18n>URL</mat-label> |
|
|
<div class="align-items-end d-flex"> |
|
|
<input formControlName="url" matInput type="text" /> |
|
|
<input formControlName="url" matInput type="text" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</mat-form-field> |
|
|
</mat-form-field> |
|
|
</div> |
|
|
</div> |
|
|
<div class="m-3"> |
|
|
<div class="my-3"> |
|
|
<button |
|
|
<button |
|
|
color="accent" |
|
|
color="accent" |
|
|
mat-flat-button |
|
|
mat-flat-button |
|
|
type="button" |
|
|
type="button" |
|
|
[disabled]=" |
|
|
[disabled]=" |
|
|
assetProfileForm.get('scraperConfiguration').value === '{}' |
|
|
assetProfileForm.controls.scraperConfiguration.controls |
|
|
|
|
|
.defaultMarketPrice.value === null && |
|
|
|
|
|
assetProfileForm.controls.scraperConfiguration.controls |
|
|
|
|
|
.headers.value === '{}' && |
|
|
|
|
|
assetProfileForm.controls.scraperConfiguration.controls |
|
|
|
|
|
.locale.value === '' && |
|
|
|
|
|
!assetProfileForm.controls.scraperConfiguration.controls |
|
|
|
|
|
.mode.dirty && |
|
|
|
|
|
assetProfileForm.controls.scraperConfiguration.controls |
|
|
|
|
|
.selector.value === '' && |
|
|
|
|
|
assetProfileForm.controls.scraperConfiguration.controls.url |
|
|
|
|
|
.value === '' |
|
|
" |
|
|
" |
|
|
(click)="onTestMarketData()" |
|
|
(click)="onTestMarketData()" |
|
|
> |
|
|
> |
|
|