Skip to content

Commit

Permalink
fix: fixed tehe timago issue and added the workflow icon
Browse files Browse the repository at this point in the history
  • Loading branch information
rajesh-jonnalagadda committed Jul 17, 2024
1 parent f5c567b commit 9a05887
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions keep-ui/app/workflows/noworfklows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Workflow } from './models';
import { useRouter } from "next/navigation";
import { MdArrowForwardIos } from "react-icons/md";
import { IoMdCard } from "react-icons/io";
import Image from "next/image";


const links = [
Expand All @@ -29,6 +30,12 @@ const DetailsSection = () => {
const router = useRouter();
return (
<section className="flex flex-col items-center justify-center mb-10">
<Image
src="/icons/workflow-icon.png"
alt="loading"
width={200}
height={200}
/>
<h2 className="sm:text-2xl text-xl font-bold">Create your first workflow</h2>
<p className="mt-2 font-bold text-sm">You do not have any workflow added yet.</p>
<div className="text-sm mt-4 text-gray-500 max-w-md text-center">you can start by creating your very first Workflow from scratch, or browse thorugh some available Workflow templates below</div>
Expand Down
4 changes: 2 additions & 2 deletions keep-ui/app/workflows/workflow-tile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ function WorkflowTile({ workflow }: { workflow: Workflow }) {
Trigger
</button>
</div>
{workflow?.last_execution_started ? (
<TimeAgo date={parseISO(workflow?.last_execution_started?.toLocaleString())} className="text-sm text-gray-500" />
{workflow && workflow.last_execution_started ? (
<TimeAgo date={workflow?.last_execution_started + 'Z'} className="text-sm text-gray-500" />
) : null
}
</div>
Expand Down
Binary file added keep-ui/public/icons/workflow-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion keep/workflowmanager/workflowstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ def group_last_workflow_executions(self, workflows: list[dict]) -> list[dict]:
# Update the latest execution details if available
if workflow_dict[workflow_id]["workflow_last_run_started"] is None :
workflow_dict[workflow_id]["workflow_last_run_status"] = status
workflow_dict[workflow_id]["workflow_last_run_time"] = execution_time
workflow_dict[workflow_id]["workflow_last_run_started"] = started
workflow_dict[workflow_id]["workflow_last_run_time"] = started

# Add the execution to the list of executions
if started is not None:
Expand Down

0 comments on commit 9a05887

Please sign in to comment.