diff --git a/bale/interfaces/sshdl.py b/bale/interfaces/sshdl.py index 4baf665..83295fd 100644 --- a/bale/interfaces/sshdl.py +++ b/bale/interfaces/sshdl.py @@ -240,7 +240,7 @@ class SshFileFind(SshFileBrowse): "headerName": "Modified", "field": "modified_timestamp", "filter": "agTextColumnFilter", - "maxWidth": 200, + "maxWidth": 125, ":cellRenderer": """(data) => { var date = new Date(data.value * 1000).toLocaleString(undefined, {dateStyle: 'short', timeStyle: 'short', hour12: false});; return date; diff --git a/bale/tabs/automation.py b/bale/tabs/automation.py index 9e775c0..bd074df 100644 --- a/bale/tabs/automation.py +++ b/bale/tabs/automation.py @@ -161,8 +161,16 @@ class Automation(Tab): "maxWidth": 150, }, {"headerName": "Command", "field": "command", "filter": "agTextColumnFilter"}, - {"headerName": "Next Date", "field": "next_run_date", "filter": "agDateColumnFilter", "maxWidth": 100}, - {"headerName": "Next Time", "field": "next_run_time", "maxWidth": 100}, + { + "headerName": "Next Run", + "field": "next_run", + "filter": "agTextColumnFilter", + "maxWidth": 125, + ":cellRenderer": """(data) => { + var date = new Date(data.value * 1000).toLocaleString(undefined, {dateStyle: 'short', timeStyle: 'short', hour12: false});; + return date; + }""", + }, { "headerName": "Status", "field": "status", @@ -227,11 +235,9 @@ class Automation(Tab): self._automations.clear() for job in self.scheduler.scheduler.get_jobs(): if job.next_run_time is not None: - next_run_date = job.next_run_time.strftime("%Y/%m/%d") - next_run_time = job.next_run_time.strftime("%H:%M") + next_run = job.next_run_time.timestamp() else: - next_run_date = "NA" - next_run_time = "NA" + next_run = "NA" if "data" in job.kwargs: jd = json.loads(job.kwargs["data"]) if self.host == jd["host"]: @@ -239,8 +245,7 @@ class Automation(Tab): { "name": job.id.split("@")[0], "command": jd["command"], - "next_run_date": next_run_date, - "next_run_time": next_run_time, + "next_run": next_run, "status": "", } ) diff --git a/bale/tabs/history.py b/bale/tabs/history.py index 59708b4..9cdd3cc 100644 --- a/bale/tabs/history.py +++ b/bale/tabs/history.py @@ -52,7 +52,7 @@ class History(Tab): "headerName": "Timestamp", "field": "timestamp", "filter": "agTextColumnFilter", - "maxWidth": 200, + "maxWidth": 125, ":cellRenderer": """(data) => { var date = new Date(data.value * 1000).toLocaleString(undefined, {dateStyle: 'short', timeStyle: 'short', hour12: false});; return date; diff --git a/bale/tabs/manage.py b/bale/tabs/manage.py index 2be8ad8..6e5546a 100644 --- a/bale/tabs/manage.py +++ b/bale/tabs/manage.py @@ -82,7 +82,7 @@ class Manage(Tab): "headerName": "Created", "field": "creation", "filter": "agTextColumnFilter", - "maxWidth": 200, + "maxWidth": 125, ":cellRenderer": """(data) => { var date = new Date(data.value * 1000).toLocaleString(undefined, {dateStyle: 'short', timeStyle: 'short', hour12: false});; return date;