Commit 49521a9d authored by Jan Marchel's avatar Jan Marchel
Browse files

adding snack bar

parent 3fcf728c
Pipeline #16009 canceled with stages
in 0 seconds
This diff is collapsed.
......@@ -12,6 +12,9 @@ import {CpVariablesViewComponent} from '../cp-variables-view/cp-variables-view.c
import {DeploymentDifferenceComponent} from '../deployment-difference/deployment-difference.component';
import {AppConfigService} from '../../app-config/service/app-config.service';
import {ConfirmationDialogComponent} from "../../common-template/confirmation-dialog/confirmation-dialog.component";
import {Observable} from "rxjs";
import {tap} from "rxjs/operators";
import {HttpClient} from "@angular/common/http";
@Component({
......@@ -25,6 +28,7 @@ export class ProcessViewComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(CpVariablesViewComponent) cpVariablesViewComponent: CpVariablesViewComponent;
@ViewChild(DeploymentDifferenceComponent) deploymentDifferenceComponent: DeploymentDifferenceComponent;
private http : HttpClient
apiUrl = `${AppConfigService.settings.apiUrl}/auth/environment`;
currentProcessVariables: ProcessVariables;
deploymentCompleted = false;
......@@ -33,7 +37,7 @@ export class ProcessViewComponent implements OnInit, AfterViewInit, OnDestroy {
existingProcess: boolean;
processListDialog: MatDialogRef<ActiveProcessListComponent>;
totalNumberOffers = 0;
static counter = 0;
counter = 0;
initialCheckingFetchingOffersState = true;
narrowWindowOnLastCheck = false;
loadingNumberOfOffersInProgress = false;
......@@ -444,10 +448,15 @@ export class ProcessViewComponent implements OnInit, AfterViewInit, OnDestroy {
}
deleteProcess(applicationId): Observable<{}> {
const url = `${this.apiUrl}/{processId}`;
return this.http.delete(url, httpOptions, applicationId).pipe(
const url = `${this.apiUrl}/{processId}`;
return this.http.delete(url, applicationId).pipe(
tap(() => console.log('Process deletion started.'),
e => console.error(`Error by deletion of process: `, e))
);
e => {
console.error(`Error by deletion of process: `, e)
this.snackBar.open(`Problem by starting cleaning databases: ${e.error.message}. Please, try again.`, 'Close',
{duration: 10000});
}
)
)
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment