Skip to content

Commit

Permalink
Merge branch 'bugfix/448076_toggle_values' into 'develop'
Browse files Browse the repository at this point in the history
bugfix/448076_toggle_values

See merge request upm-inesdata/inesdata-connector-interface!40
  • Loading branch information
ralconada-gmv committed Nov 25, 2024
2 parents 04ade83 + 4eeaa8b commit eca62d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/pages/assets/asset-create/asset-create.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,25 +161,25 @@ <h2 class="title-section">Create an asset</h2>
</div>

<div class="form-field toggle">
<mat-slide-toggle [(ngModel)]="httpDataAddress.proxyBody" color="accent">
<mat-slide-toggle [(ngModel)]="httpDataAddress.proxyBody"(ngModelChange)="onToggleChange('proxyBody', $event)" color="accent">
Proxy Body
</mat-slide-toggle>
</div>

<div class="form-field toggle">
<mat-slide-toggle [(ngModel)]="httpDataAddress.proxyPath" color="accent">
<mat-slide-toggle [(ngModel)]="httpDataAddress.proxyPath" (ngModelChange)="onToggleChange('proxyPath', $event)" color="accent">
Proxy Path
</mat-slide-toggle>
</div>

<div class="form-field toggle">
<mat-slide-toggle [(ngModel)]="httpDataAddress.proxyQueryParams" color="accent">
<mat-slide-toggle [(ngModel)]="httpDataAddress.proxyQueryParams" (ngModelChange)="onToggleChange('proxyQueryParams', $event)" color="accent">
Proxy Query Params
</mat-slide-toggle>
</div>

<div class="form-field toggle">
<mat-slide-toggle [(ngModel)]="httpDataAddress.proxyMethod" color="accent">
<mat-slide-toggle [(ngModel)]="httpDataAddress.proxyMethod" (ngModelChange)="onToggleChange('proxyMethod', $event)" color="accent">
Proxy Method
</mat-slide-toggle>
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/app/pages/assets/asset-create/asset-create.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import { AssetService } from 'src/app/shared/services/asset.service';
import { BehaviorSubject } from 'rxjs';
import { Router } from '@angular/router';
import { MatSlideToggleChange } from '@angular/material/slide-toggle';


@Component({
Expand Down Expand Up @@ -438,4 +439,8 @@ export class AssetCreateComponent implements OnInit {
navigateToAsset() {
this.router.navigate(['assets'])
}

onToggleChange(propertyName: string, event: MatSlideToggleChange): void {
this.httpDataAddress[propertyName] = event ? 'true' : 'false';
}
}

0 comments on commit eca62d3

Please sign in to comment.