diff --git a/litmus-portal/frontend/src/graphql/quries.ts b/litmus-portal/frontend/src/graphql/quries.ts index 2286476dc..62e01fbb1 100644 --- a/litmus-portal/frontend/src/graphql/quries.ts +++ b/litmus-portal/frontend/src/graphql/quries.ts @@ -10,6 +10,7 @@ export const WORKFLOW_DETAILS = gql` project_id cluster_name last_updated + cluster_type } } `; @@ -31,6 +32,8 @@ export const SCHEDULE_DETAILS = gql` created_at project_id cluster_id + cluster_type + cluster_name } } `; diff --git a/litmus-portal/frontend/src/models/graphql/scheduleData.ts b/litmus-portal/frontend/src/models/graphql/scheduleData.ts index 38ddb7b3c..42c3fae19 100644 --- a/litmus-portal/frontend/src/models/graphql/scheduleData.ts +++ b/litmus-portal/frontend/src/models/graphql/scheduleData.ts @@ -15,6 +15,8 @@ export interface ScheduleWorkflow { workflow_id: string; workflow_manifest: string; workflow_name: string; + cluster_name: string; + cluster_type: string; } export interface Schedules { diff --git a/litmus-portal/frontend/src/models/graphql/workflowData.ts b/litmus-portal/frontend/src/models/graphql/workflowData.ts index 649e8a2c0..6a9328936 100644 --- a/litmus-portal/frontend/src/models/graphql/workflowData.ts +++ b/litmus-portal/frontend/src/models/graphql/workflowData.ts @@ -46,6 +46,7 @@ export interface WorkflowRun { workflow_id: string; workflow_name: string; workflow_run_id: string; + cluster_type: string; } export interface Workflow { diff --git a/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/TableData.tsx b/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/TableData.tsx index 4fb19eda2..5b0377de3 100644 --- a/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/TableData.tsx +++ b/litmus-portal/frontend/src/views/ChaosWorkflows/BrowseSchedule/TableData.tsx @@ -48,8 +48,8 @@ const TableData: React.FC = ({ data, deleteRow }) => { }; // Function to convert UNIX time in format of DD MMM YYY - const formatDate = (date: any) => { - const updated = new Date(date * 1000).toString(); + const formatDate = (date: string) => { + const updated = new Date(parseInt(date, 10) * 1000).toString(); const resDate = moment(updated).format('DD MMM YYYY'); if (date) return resDate; return 'Date not available'; @@ -76,7 +76,7 @@ const TableData: React.FC = ({ data, deleteRow }) => { - Internal + {data.cluster_name}