Add getProcessName

This commit is contained in:
NicolasCantu 2025-03-03 17:18:14 +01:00
parent 7f6eabaa90
commit 6e57225529

View File

@ -1188,6 +1188,17 @@ export default class Services {
} }
} }
public getProcessName(process: Process): string | null {
const lastCommitedState = this.getLastCommitedState(process);
if (lastCommitedState && lastCommitedState.descriptions) {
const processName = lastCommitedState!.descriptions['processName'];
if (processName) { return processName }
else { return null }
} else {
return null;
}
}
public async getMyProcesses(): Promise<string[]> { public async getMyProcesses(): Promise<string[]> {
try { try {
const processes = await this.getProcesses(); const processes = await this.getProcesses();