Skip to content

Commit

Permalink
Polish (lint)
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiahub committed Jul 19, 2023
1 parent 3146f93 commit de8073e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
4 changes: 2 additions & 2 deletions ui/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import {AppsModule} from './apps/apps.module';
import {UrlUtilities} from './url-utilities.service';
import { TaskService } from './shared/api/task.service';
import { JobService } from './shared/api/job.service';
import {TaskService} from './shared/api/task.service';
import {JobService} from './shared/api/job.service';

@NgModule({
declarations: [AppComponent],
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/layout/nav/nav.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<clr-icon shape="cloud-scale" clrVerticalNavIcon></clr-icon>
{{ 'layout.nav.streams' | translate }}
<clr-vertical-nav-group-children>
<a data-cy="navStreams" clrVerticalNavLink routerLinkActive="active" [routerLink]="streams/list">
<a data-cy="navStreams" clrVerticalNavLink routerLinkActive="active" [routerLink]="streams / list">
{{ 'layout.nav.streams' | translate }}
</a>
<a data-cy="navRuntime" clrVerticalNavLink routerLinkActive="active" [routerLink]="streams/runtime">
<a data-cy="navRuntime" clrVerticalNavLink routerLinkActive="active" [routerLink]="streams / runtime">
{{ 'layout.nav.runtime' | translate }}
</a>
</clr-vertical-nav-group-children>
Expand Down
14 changes: 11 additions & 3 deletions ui/src/app/shared/api/job.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,24 @@ export class JobService {
const initHttpParams = new HttpParams({encoder: new DataflowEncoder()});
const params = initHttpParams.append('schemaTarget', execution.schemaTarget);
return this.httpClient
.put(UrlUtilities.calculateBaseApiUrl() + `jobs/executions/${execution.jobExecutionId}?restart=true`, {}, {headers, params})
.put(
UrlUtilities.calculateBaseApiUrl() + `jobs/executions/${execution.jobExecutionId}?restart=true`,
{},
{headers, params}
)
.pipe(catchError(ErrorUtils.catchError));
}

stop(item: JobExecution): Observable<any> {
const headers = HttpUtils.getDefaultHttpHeaders();
const initHttpParams = new HttpParams({encoder: new DataflowEncoder()})
const initHttpParams = new HttpParams({encoder: new DataflowEncoder()});
const params = initHttpParams.append('schemaTarget', item.schemaTarget);
return this.httpClient
.put(UrlUtilities.calculateBaseApiUrl() + `jobs/executions/${item.jobExecutionId}?stop=true`, {}, {headers, params})
.put(
UrlUtilities.calculateBaseApiUrl() + `jobs/executions/${item.jobExecutionId}?stop=true`,
{},
{headers, params}
)
.pipe(catchError(ErrorUtils.catchError));
}

Expand Down
15 changes: 9 additions & 6 deletions ui/src/app/shared/api/task.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ export class TaskService {

executionClean(taskExecution: TaskExecution): Observable<any> {
const headers = HttpUtils.getDefaultHttpHeaders();
const params = new HttpParams({encoder: new DataflowEncoder()})
.append('schemaTarget', taskExecution.schemaTarget);
const params = new HttpParams({encoder: new DataflowEncoder()}).append('schemaTarget', taskExecution.schemaTarget);
const url = UrlUtilities.calculateBaseApiUrl() + `tasks/executions/${taskExecution.executionId}?action=REMOVE_DATA`;
return this.httpClient
.delete<any>(url, {
Expand Down Expand Up @@ -211,10 +210,14 @@ export class TaskService {
}
const params = new HttpParams({encoder: new DataflowEncoder()});
return this.httpClient
.get<any>(UrlUtilities.calculateBaseApiUrl() + `tasks/logs/${taskExecution.externalExecutionId}?platformName=${platformName}`, {
headers,
params
})
.get<any>(
UrlUtilities.calculateBaseApiUrl() +
`tasks/logs/${taskExecution.externalExecutionId}?platformName=${platformName}`,
{
headers,
params
}
)
.pipe(catchError(ErrorUtils.catchError));
}

Expand Down
4 changes: 3 additions & 1 deletion ui/src/app/tasks-jobs/tasks/launch/launch.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ export class LaunchComponent implements OnInit, OnDestroy {
this.translate.instant('tasks.launch.main.message.successContent', {name: this.task.name})
);
this.router.navigate([
`tasks-jobs/task-executions/${launchResponse.executionId ?? 0}/schemaTarget/${launchResponse.schemaTarget ?? 'boot2'}`
`tasks-jobs/task-executions/${launchResponse.executionId ?? 0}/schemaTarget/${
launchResponse.schemaTarget ?? 'boot2'
}`
]);
},
error => {
Expand Down

0 comments on commit de8073e

Please sign in to comment.