Closed AhmedElywa closed 4 years ago
The Original Requirement Document May be easier to read in VS Code (Markdown preview mode)
Will's Points Estimate: 2 points
This is the primary dashboard. The Structure or layout of this page will be defined by the Sections and Steps that are associated with the Dashboard.
The dyanmic data on the page will be associated with the individual job executions, or JobRuns
for a given day.
Section.order
)Each Section will be a <Card>
UI type,
Card Header
: Section NameCard Body
: Contains the following columns.
JobRun.status
. Badge has ICON for Status (see mapping below) I can choose an Eva Icon for each Status, I just need you to design the mapping/configuration. There needs to be a COLOR mapping as well for STATUS.
JobRun
s for that 24-hour period, the number of runs should be displayed on the badgeJournalEntry
for the Step created today()
then display it next to the name, along with the author. It shuold have a background color to help it stand out.Job.name
example: http://jilcheck.corp/job={{Job.name}}Step Status | Step Name | Start Time | End Time | Action LInks / BUttons |
---|---|---|---|---|
col-xs1 | col-xs-5 | col-xs-2 | col-xs-2 | col-xs2 |
I am not very good at "responsive" if you have a better approach, please do what is best.
query:
query dashboardView{
findOneDashboard(where:{id: 66}){
name
sections {
name
order
steps {
name # alias for the Job
order
job {
name # display on hover (tooltip)
runs {
startTime
endTime
status # associate to Color and Icon Mapping tables
}
}
}
}
}
}
Above query is missing JOurnal Entries
JobStatus
icon_map = (
"RUNNING" => 'play-circle',
"STARTING" => 'play-circle',
"SUCCESS" => 'ok',
"FAILURE" => 'remove',
"TERMINATED" => 'remove',
"ON_ICE" => 'asterisk',
"INACTIVE" => 'unchecked',
"ACTIVATED" => 'unchecked',
"RESTART" => 'unchecked',
"ON_HOLD" => 'pause',
"QUE_WAIT" => 'unchecked',
"WAIT_REPLY" => 'unchecked',
"PEND_MACH" => 'unchecked',
"RESWAIT" => 'unchecked',
"ON_NOEXEC" => 'unchecked',
);
css_color_map = (
"RUNNING" => 'warning',
"STARTING" => 'warning',
"SUCCESS" => 'success',
"FAILURE" => 'danger',
"TERMINATED" => 'danger',
"ON_ICE" => 'primary',
"INACTIVE" => 'primary',
"ACTIVATED" => 'warning',
"RESTART" => 'warning',
"ON_HOLD" => 'primary',
"QUE_WAIT" => 'default',
"WAIT_REPLY" => 'default',
"PEND_MACH" => 'default',
"RESWAIT" => 'default',
"ON_NOEXEC" => 'default',
);
Routing
A user will need to access a dashboard with a "slug" URL, something similar to this: /realtime/id/dashboard-name-here
for the following reasons:
/realtime/<id>/
the same dashboard is displayedAll the task is done please give the last review and if it's an ok move to done and close this issue
DashBoard.tsx
breaks if step.job.runs.length === 0
I updated, but need a more elegant solution
<CardBody>
{section.steps.map((step, index) => {
const runs = step.job.runs.length;
const lastRun = step.job.runs[runs - 1];
if (runs) {
return (
<Row key={index} middle="xs" style={{ borderBottom: '1px solid #eee' }}>
<StyledCol breakPoint={{ xs: 12, lg: 4, xl: 2 }}>
<Button
status={status[lastRun.status]}
appearance="outline"
style={{ position: 'relative', display: 'flex', alignItems: 'center' }}
shape="Round"
size="Tiny"
>
<EvaIcon name={statusIcons[lastRun.status]} />
<span>{lastRun.status}</span>
</Button>
<Badge position="bottomLeft" status={status[lastRun.status]}>
{runs}
</Badge>
</StyledCol>
<StyledCol
breakPoint={{ xs: 12, lg: 8, xl: 4 }}
style={{ display: 'flex', alignItems: 'center' }}
>
<Tooltip trigger="hint" placement="top" content={step.job.name} status={status[lastRun.status]}>
<span>{step.name}</span>
</Tooltip>
</StyledCol>
<StyledCol breakPoint={{ xs: 12, lg: 4, xl: 2 }}>
{moment(lastRun.startTime).format('YYYY-MM-DD HH:mm')}
</StyledCol>
<StyledCol breakPoint={{ xs: 12, lg: 4, xl: 2 }}>
{moment(lastRun.startTime).format('YYYY-MM-DD HH:mm')}
</StyledCol>
<StyledCol breakPoint={{ xs: 12, lg: 4, xl: 2 }}>
<Button appearance="ghost" size="Tiny">
<EvaIcon name="edit-outline" />
</Button>
<Button appearance="ghost" size="Tiny">
<EvaIcon name="calendar-outline" />
</Button>
<Button appearance="ghost" size="Tiny">
<EvaIcon name="arrow-forward-outline" />
</Button>
</StyledCol>
</Row>
);
} else {
return (
<Row key={index} middle="xs" style={{ borderBottom: '1px solid #eee' }}>
<StyledCol breakPoint={{ xs: 12, lg: 4, xl: 2 }}></StyledCol>
<StyledCol
breakPoint={{ xs: 12, lg: 8, xl: 4 }}
style={{ display: 'flex', alignItems: 'center' }}
>
<Tooltip trigger="hint" placement="top" content={step.job.name}>
<span>{step.name}</span>
</Tooltip>
</StyledCol>
<StyledCol breakPoint={{ xs: 12, lg: 4, xl: 2 }}>...</StyledCol>
<StyledCol breakPoint={{ xs: 12, lg: 4, xl: 2 }}>...</StyledCol>
<StyledCol breakPoint={{ xs: 12, lg: 4, xl: 2 }}>
<Button appearance="ghost" size="Tiny">
<EvaIcon name="edit-outline" />
</Button>
<Button appearance="ghost" size="Tiny">
<EvaIcon name="calendar-outline" />
</Button>
<Button appearance="ghost" size="Tiny">
<EvaIcon name="arrow-forward-outline" />
</Button>
</StyledCol>
</Row>
);
}
})}
</CardBody>
To recreate this case, go to JobRun Model Editor. Connect JobRun { id: 1} to Job { id: 2 }. it should display like this
Step Status indicator should not behave like a button. (mouse pointer should not change)
No components were made.
[x] Create a responsive Dashboard Layout that displays well on tablet and phone
[x] On the Dashboard view: a user should be able to see all the Dashboards associated with the groups they belong to from a drop-down menu. Include a simple toggle to "show all dashboards"