Commit 3abd2104 authored by Alexander Philipp Nowosad's avatar Alexander Philipp Nowosad
Browse files

Fix types running-process component

parent 1c3a04e3
Pipeline #138986 failed with stages
in 8 minutes and 12 seconds
......@@ -47,18 +47,21 @@ export class RunningProcessComponent implements OnInit {
@ViewChild(RunningProcessViewerComponent)
runningProcessViewer: RunningProcessViewerComponent;
@ViewChild('infoModal', { static: true }) infoModal: any;
@ViewChild('infoModal', { static: true }) infoModal: unknown;
@ViewChild('multipleOptionsInfoModal', { static: true })
multipleOptionsInfoModal: any;
multipleOptionsInfoModal: unknown;
@ViewChild('showArtifactVersionModal', { static: true })
showArtifactVersionModal: any;
@ViewChild('selectMethodModal', { static: true }) selectMethodModal: any;
showArtifactVersionModal: unknown;
@ViewChild('selectMethodModal', { static: true }) selectMethodModal: unknown;
@ViewChild('methodConfigurationModal', { static: true })
methodConfigurationModal: any;
@ViewChild('commentsModal', { static: true }) commentsModal: any;
@ViewChild('artifactExportModal', { static: true }) artifactExportModal: any;
@ViewChild('artifactImportModal', { static: true }) artifactImportModal: any;
@ViewChild('artifactRenameModal', { static: true }) artifactRenameModal: any;
methodConfigurationModal: unknown;
@ViewChild('commentsModal', { static: true }) commentsModal: unknown;
@ViewChild('artifactExportModal', { static: true })
artifactExportModal: unknown;
@ViewChild('artifactImportModal', { static: true })
artifactImportModal: unknown;
@ViewChild('artifactRenameModal', { static: true })
artifactRenameModal: unknown;
constructor(
private bmProcessService: BmProcessService,
......@@ -73,7 +76,7 @@ export class RunningProcessComponent implements OnInit {
private runningProcessService: RunningProcessService
) {}
ngOnInit() {
ngOnInit(): void {
this.runningProcessLoaderService.loaded.subscribe(() =>
this.afterReload(this.runningProcess)
);
......@@ -82,7 +85,7 @@ export class RunningProcessComponent implements OnInit {
openShowArtifactVersionModal(
artifact: RunningArtifact,
version: ArtifactVersion
) {
): void {
this.modalArtifact = artifact;
this.modalArtifactVersion = version;
this.modalReference = this.modalService.open(
......@@ -91,7 +94,7 @@ export class RunningProcessComponent implements OnInit {
);
}
viewArtifactReference(reference: ArtifactDataReference) {
viewArtifactReference(reference: ArtifactDataReference): void {
this.modalReference.close();
this.metaModelService
.getMetaModelApi(reference.type)
......@@ -101,7 +104,7 @@ export class RunningProcessComponent implements OnInit {
});
}
openInfoModal(decision: Decision) {
openInfoModal(decision: Decision): void {
this.modalDecision = decision;
this.modalReference = this.modalService.open(this.infoModal, {
size: 'lg',
......@@ -150,11 +153,11 @@ export class RunningProcessComponent implements OnInit {
);
}
updateDecision(updates: any) {
updateDecision(updates: any): void {
this.modalDecision.update(updates);
}
async executeStep(nodeId: string) {
async executeStep(nodeId: string): Promise<void> {
const selectedFlow = this.runningProcessViewer.getSelectedFlow();
try {
await this.runningProcessService.executeStep(
......@@ -179,7 +182,7 @@ export class RunningProcessComponent implements OnInit {
}
}
async addMethod() {
async addMethod(): Promise<void> {
this.modalReference.close();
await this.runningProcessService.addMethod(
this.runningProcess,
......@@ -187,7 +190,7 @@ export class RunningProcessComponent implements OnInit {
);
}
async removeMethod(executionId: string) {
async removeMethod(executionId: string): Promise<void> {
await this.runningProcessService.removeMethod(
this.runningProcess,
executionId
......@@ -214,7 +217,7 @@ export class RunningProcessComponent implements OnInit {
);
}
async viewExecution(executionId) {
async viewExecution(executionId): Promise<void> {
await this.router.navigate([
'runningprocess',
'runningprocessview',
......@@ -224,39 +227,42 @@ export class RunningProcessComponent implements OnInit {
]);
}
focus(id: string) {
focus(id: string): void {
this.runningProcessViewer.focus(id);
}
async startNodeExecution(nodeId: string) {
async startNodeExecution(nodeId: string): Promise<void> {
await this.runningProcessService.startMethodExecution(
this.runningProcess._id,
nodeId
);
}
async startExecution(executionId: string) {
async startExecution(executionId: string): Promise<void> {
await this.runningProcessService.startTodoMethodExecution(
this.runningProcess._id,
executionId
);
}
openCommentsModal(executionId: string) {
openCommentsModal(executionId: string): void {
this.modalRunningMethodInfo = this.runningProcess.getMethod(executionId);
this.modalReference = this.modalService.open(this.commentsModal, {
size: 'lg',
});
}
openArtifactExportModal(artifact: RunningArtifact) {
openArtifactExportModal(artifact: RunningArtifact): void {
this.modalArtifact = artifact;
this.modalReference = this.modalService.open(this.artifactExportModal, {
size: 'lg',
});
}
async exportArtifact(identifier: string, artifact: RunningArtifact) {
async exportArtifact(
identifier: string,
artifact: RunningArtifact
): Promise<void> {
artifact = await this.concreteArtifactService.export(
identifier,
artifact,
......@@ -270,13 +276,13 @@ export class RunningProcessComponent implements OnInit {
]);
}
openArtifactImportModal() {
openArtifactImportModal(): void {
this.modalReference = this.modalService.open(this.artifactImportModal, {
size: 'lg',
});
}
async importArtifact(artifactId: string) {
async importArtifact(artifactId: string): Promise<void> {
const artifact = await this.concreteArtifactService.get(artifactId);
const copiedArtifact = await this.concreteArtifactService.copy(artifact);
await this.runningProcessService.importArtifact(
......@@ -285,14 +291,17 @@ export class RunningProcessComponent implements OnInit {
);
}
openRenameArtifactModal(artifact: RunningArtifact) {
openRenameArtifactModal(artifact: RunningArtifact): void {
this.modalArtifact = artifact;
this.modalReference = this.modalService.open(this.artifactRenameModal, {
size: 'lg',
});
}
async renameArtifact(identifier: string, artifact: RunningArtifact) {
async renameArtifact(
identifier: string,
artifact: RunningArtifact
): Promise<void> {
await this.runningProcessService.renameArtifact(
this.runningProcess,
artifact,
......@@ -308,7 +317,7 @@ export class RunningProcessComponent implements OnInit {
return ArtifactDataType.REFERENCE;
}
private async afterReload(runningProcess: RunningProcess) {
private async afterReload(runningProcess: RunningProcess): Promise<void> {
this.decisions =
await this.runningProcessService.getExecutableDecisionNodes(
runningProcess
......
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