Skip to content

Commit

Permalink
Merge pull request #14 from factly/fix/table
Browse files Browse the repository at this point in the history
Fix/table
  • Loading branch information
100mi authored Jan 19, 2023
2 parents 3942e33 + 1e0c661 commit 5e6f5f8
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 27 deletions.
2 changes: 1 addition & 1 deletion studio/src/components/expectationcard.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function ExpectationCard(Expectation) {
title: key === '1' ? 'Row' : key,
dataIndex: key,
key: key,
width: 20 + (key === '1' ? 3 : key.length === 100 ? 80 : key.length),
width: 200,
};
});
return unexpectedColumns;
Expand Down
2 changes: 1 addition & 1 deletion studio/src/components/googleSheets.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function GoogleSheetsForm({ style, ...props }) {
<Input />
</Form.Item>

<Form.Item label="Path/Prefix" name="worksheet">
<Form.Item label="Work Sheet Name" name="worksheet">
<Input />
</Form.Item>
<Form.Item
Expand Down
58 changes: 33 additions & 25 deletions studio/src/pages/validly/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function Validly({ mode = 'datasets' }) {
if (expectation.success) {
return;
}
if ((mode = 'metafacts')) {
if (mode === 'metafacts') {
dispatch(
addMetaFactsExpectationCard(updateExpectationsArray(expectations, expectation, index)),
);
Expand Down Expand Up @@ -97,30 +97,38 @@ function Validly({ mode = 'datasets' }) {
<Row gutter={16}>
<Col span={8}>
<Card bodyStyle={{ padding: '6px' }}>
{file.expectations_Validated_List.map((expectation) => (
<Card
hoverable
style={
expectation.success
? { backgroundColor: '#effaf5', margin: '4px' }
: { backgroundColor: '#feecf0', margin: '4px' }
}
onClick={() => displayExpectation(expectation, index)}
>
{expectation.success ? (
<CheckSquareTwoTone
style={{ fontSize: '125%', fontWeight: 'bold', paddingRight: '4px' }}
twoToneColor="#48C78E"
/>
) : (
<StopTwoTone
style={{ fontSize: '125%', fontWeight: 'bolder', paddingRight: '4px' }}
twoToneColor="#F14668"
/>
)}
<b> {expectation.Expectation_name.replaceAll('_', ' ')} </b>
</Card>
))}
{file.expectations_Validated_List
.sort((a, b) => {
return a.success === b.success ? 0 : a.success ? 1 : -1;
})
.map((expectation) => (
<Card
hoverable
style={
expectation.success
? { backgroundColor: '#effaf5', margin: '4px' }
: { backgroundColor: '#feecf0', margin: '4px' }
}
onClick={() => displayExpectation(expectation, index)}
>
{expectation.success ? (
<CheckSquareTwoTone
style={{ fontSize: '125%', fontWeight: 'bold', paddingRight: '4px' }}
twoToneColor="#48C78E"
/>
) : (
<StopTwoTone
style={{
fontSize: '125%',
fontWeight: 'bolder',
paddingRight: '4px',
}}
twoToneColor="#F14668"
/>
)}
<b> {expectation.Expectation_name.replaceAll('_', ' ')} </b>
</Card>
))}
</Card>
</Col>
<Col span={16}>
Expand Down

0 comments on commit 5e6f5f8

Please sign in to comment.