Unverified Commit 31e565d6 authored by Tao Feng's avatar Tao Feng Committed by GitHub

fix: make last run state in dashboard page optional (#814)

* fix: make last run state in dashboard page optional
Signed-off-by: 's avatarfeng-tao <fengtao04@gmail.com>

* update
Signed-off-by: 's avatarfeng-tao <fengtao04@gmail.com>

* update
Signed-off-by: 's avatarfeng-tao <fengtao04@gmail.com>

* update
Signed-off-by: 's avatarfeng-tao <fengtao04@gmail.com>
parent b730effa
......@@ -160,6 +160,8 @@ export class DashboardPage extends React.Component<
const { dashboard, isLoading } = this.props;
const hasDescription =
dashboard.description && dashboard.description.length > 0;
const hasLastRunState =
dashboard.last_run_state && dashboard.last_run_state.length > 0;
if (isLoading) {
return <LoadingSpinner />;
......@@ -294,6 +296,7 @@ export class DashboardPage extends React.Component<
uriKey={this.props.dashboard.uri}
/>
</EditableSection>
{hasLastRunState && [
<section className="metadata-section">
<div className="section-title title-3">
Last Successful Run
......@@ -306,7 +309,7 @@ export class DashboardPage extends React.Component<
})
: NO_TIMESTAMP_TEXT}
</time>
</section>
</section>,
<section className="metadata-section">
<div className="section-title title-3">Last Run</div>
<div>
......@@ -327,7 +330,8 @@ export class DashboardPage extends React.Component<
/>
</div>
</div>
</section>
</section>,
]}
</section>
</section>
<ImagePreview uri={this.state.uri} redirectUrl={dashboard.url} />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment