Skip to content
Snippets Groups Projects
Commit 73f4ba6f authored by Sam Kagan's avatar Sam Kagan
Browse files

Merge branch 'fix-secci-planes-checklist' into 'release/2.4.3-rc1'

Fixed bug where planes checklist didn't show up for SECCI exec's

See merge request !22
parents 47149d96 148557b6
No related branches found
No related tags found
2 merge requests!25Merge 2.4.3 UI to main,!22Fixed bug where planes checklist didn't show up for SECCI exec's
......@@ -41,7 +41,7 @@
</h4>
<div class="w-100" *ngFor="let plane of planeKeys" [formGroup]="planesFormGroup">
<label><input type="checkbox" value="{{plane}}" checked/>{{plane}}</label>
<input type="checkbox" value="{{plane}}" checked/> <label>{{plane}}</label>
</div>
</div>
<div *ngIf="canSelectTiles()">
......
input[type="checkbox"] {
margin-right: 5px;
vertical-align: middle;
}
......@@ -71,8 +71,8 @@ export class ExecutionDetailComponent implements OnInit, OnDestroy, OnChanges {
});
}
if (this.canSelectPlanes()) {
this.jobService.getPlanes(job.job_id).subscribe((response: string) => {
this.planeKeys = response.split(/\r?\n|\r|\n/g); // Source: https://stackoverflow.com/a/21712066
this.jobService.getPlanes(job.job_id).subscribe((response: object) => {
this.planeKeys = Object.keys(response);
for (const controlName in this.planesFormGroup.controls) {
this.planesFormGroup.removeControl(controlName);
}
......@@ -204,7 +204,7 @@ export class ExecutionDetailComponent implements OnInit, OnDestroy, OnChanges {
};
canSelectPlanes(): boolean {
return this.jobDetail.queueName === 'se_continuum_cube_imaging' && this.canAcceptArchive(this.jobDetail.status, this.jobDetail.archiveStatus);
return this.jobDetail.queueName === 'se_coarse_cube_imaging' && this.canAcceptArchive(this.jobDetail.status, this.jobDetail.archiveStatus);
}
canSelectTiles(): boolean {
......
......@@ -165,8 +165,8 @@ export class JobsService {
}
// Returns a JSON encoded string of plane information
public getPlanes(id: number): Observable<string> {
return this.http.get<string>(this.configService.config.url + this.endPoint + 'jobs/' + id + '/planes', {observe: 'response'}).pipe(
public getPlanes(id: number): Observable<object> {
return this.http.get<object>(this.configService.config.url + this.endPoint + 'jobs/' + id + '/planes', {observe: 'response'}).pipe(
map(response => {
return response.body;
}));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment