Update/agent (#13298)

* Revert "Fix Agent not working (#13126)"

This reverts commit a0ee8b00fb.

* agent fix and bump
This commit is contained in:
Aditya Bist
2020-11-09 09:00:03 -08:00
committed by GitHub
parent 8b73391845
commit fa9a38d74a
6 changed files with 70 additions and 47 deletions

View File

@@ -40,16 +40,28 @@ export class JobManagementUtilities {
return bool ? nls.localize('agentUtilities.yes', "Yes") : nls.localize('agentUtilities.no', "No");
}
public static convertToNextRun(date: string) {
return date.includes('1/1/0001') ? nls.localize('agentUtilities.notScheduled', "Not Scheduled") : date;
public static convertToNextRun(date: string): string {
if (date.includes('1/1/0001')) {
return nls.localize('agentUtilities.notScheduled', "Not Scheduled");
} else {
return date;
}
}
public static convertToLastRun(date: string) {
return date.includes('1/1/0001') ? nls.localize('agentUtilities.neverRun', "Never Run") : date;
public static convertToLastRun(date: string): string {
if (date.includes('1/1/0001')) {
return nls.localize('agentUtilities.neverRun', "Never Run");
} else {
return date;
}
}
public static setRunnable(icon: HTMLElement, index: number) {
icon.classList.remove('non-runnable');
let temp = icon.className as unknown;
let classNameArr = temp as [];
if (classNameArr.find(x => x === 'non-runnable')) {
icon.className = icon.className.slice(0, index);
}
}
public static getActionIconClassName(startIcon: HTMLElement, stopIcon: HTMLElement, executionStatus: number) {