Skip to content

Commit

Permalink
WIP modifying based on designer feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed May 10, 2018
1 parent 9a5f6c6 commit 10a8b17
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


import React from 'react';
import { EuiPanel } from '@elastic/eui';

import { DetailDrawer } from '../detail_drawer';

Expand Down Expand Up @@ -66,11 +65,9 @@ export class ConfigViewer extends React.Component {

return (
<div>
<EuiPanel className="configViewer">
{
getStatementListFromPipeline(pipeline, this.onShowVertexDetails).map(section => renderSection(section))
}
</EuiPanel>
{
getStatementListFromPipeline(pipeline, this.onShowVertexDetails).map(section => renderSection(section))
}
{ this.renderDetailDrawer() }
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,27 @@ import React from 'react';
import {
EuiFlexItem,
EuiFlexGroup,
EuiIcon,
EuiPanel,
EuiSpacer,
EuiFlexGrid,
//EuiSpacer,
EuiButtonEmpty
} from '@elastic/eui';

const StatementStatsList = ({ stats }) => (
stats.map(({ value, isHighlighted }, index) => (
<EuiFlexItem
grow={false}
key={index}
>
<StatOverview
value={value}
isHighlighted={isHighlighted}
/>
</EuiFlexItem>
<div>
<EuiFlexItem
grow={false}
key={index}
className="statement__stat"
>
<StatOverview
value={value}
isHighlighted={isHighlighted}
/>
</EuiFlexItem>
</div>
))
);

Expand All @@ -40,7 +45,7 @@ const getStatStyle = isHighlighted => (
);

const StatOverview = ({ value, isHighlighted }) => (
<span style={getStatStyle(isHighlighted)} >{value}</span>
<div style={getStatStyle(isHighlighted)} >{value}</div>
);

export const PluginStatement = ({ statement, stats, vertexSelected }) => (
Expand All @@ -50,45 +55,51 @@ export const PluginStatement = ({ statement, stats, vertexSelected }) => (
className="statement__content"
paddingSize="s"
>
<EuiFlexGroup
alignItems="flexStart"
gutterSize="s"
>
<EuiFlexItem
grow={false}
style={{ padding: "0px", margin: "0px" }}
>
<EuiButtonEmpty
color="text"
flush="left"
onClick={vertexSelected}
size="xs"
>
<strong>{statement.name}</strong>
</EuiButtonEmpty>
</EuiFlexItem>
{
statement.hasExplicitId &&
<EuiFlexItem
grow={false}
style={{ paddingTop: "1px" }}
>
<span>
<em>{statement.id}</em>
</span>
<div>
<EuiFlexGroup justifyContent="spaceBetween">
<EuiFlexItem grow={false}>
<EuiFlexGroup gutterSize="xs">
<EuiFlexItem
grow={false}
>
<EuiIcon className="statement__dot" type="dot" />
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonEmpty
color="text"
flush="left"
onClick={vertexSelected}
size="xs"
className="statement__name"
>
<span className="statement__name">
{statement.name}
</span>
</EuiButtonEmpty>
</EuiFlexItem>
<EuiFlexItem grow={false}>
{
statement.hasExplicitId &&
<span className="statement__explicitId">
{statement.id}
</span>
}
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem grow={false}>
{
stats &&
stats.length > 0 &&
<EuiFlexGrid>
<StatementStatsList
stats={stats}
/>
</EuiFlexGrid>
}
</EuiFlexItem>
}
</EuiFlexGroup>
<EuiSpacer size="s" />
{
stats &&
stats.length > 0 &&
<EuiFlexGroup>
<StatementStatsList
stats={stats}
/>
</EuiFlexGroup>
}
</div>
</EuiPanel>
</div>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React from 'react';
import {
EuiFlexGroup,
EuiFlexItem,
EuiHorizontalRule,
// EuiHorizontalRule,
EuiIcon,
EuiPanel,
EuiSpacer,
Expand All @@ -20,7 +20,7 @@ import {
const StatementSection = ({ headerText, icon, children }) => (
<EuiPanel
paddingSize="s"
hasShadow
className="statementSection"
>
<EuiFlexGroup style={{ marginBottom: "2px" }}>
<EuiFlexItem grow={false}>
Expand All @@ -32,7 +32,6 @@ const StatementSection = ({ headerText, icon, children }) => (
</EuiTitle>
</EuiFlexItem>
</EuiFlexGroup>
<EuiHorizontalRule margin="none" />
<ul>
{
children
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,52 @@
.configViewer {
background-color: #efefef;
}

.ifPill__condition {
margin-top: 5px;
}

.statement__content {
min-width: 190px;
max-width: 400px;
max-height: 320px;
border: none;
box-shadow: none;
//min-width: 190px;
//max-width: 400px;
//max-height: 320px;
}

.statement__dot {
color: green;
margin-top: 5px;
}

.statement__name {
color: green;
font-weight: bold;
margin-top: 0px;
}

.statement__explicitId {
font-weight: bold;
background-color: #d0d0d0;
padding: 4px;
border-radius: 2px;
margin-top: 2px;
}

.statement__stat {
text-align: right;
margin-left: 15px;
min-width: 150px;
}

.ifChildren {
border-left: 1px dashed #D0D0D0;
padding-left: 8px;
margin: 8px 0px 8px 0px;
margin-left: 12px;
}

.statement {
margin-top: 10px;
border: none;
// margin-top: 10px;
}

.statementSection {
border: none;
box-shadow: none;
}

0 comments on commit 10a8b17

Please sign in to comment.