-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polish/scraper overlay #12317
Merged
Merged
Polish/scraper overlay #12317
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b1feeb7
Condense layout of scraper form
alexpaxton 833d6a2
Introduce overlay component for creating scrapers
alexpaxton 28ac973
Merge branch 'master' into polish/scraper-overlay
alexpaxton bd2e72f
Simplify Bucket selection dropdown
alexpaxton cecc08d
Relocate create scraper overlay component
alexpaxton be5c9fe
Introduce create scraper form component
alexpaxton c7e22f0
Add missing blank header cell to scrapers table
alexpaxton 0f41edf
Fix URL validation
alexpaxton 8f70ff7
WIP cleanup
alexpaxton 7d44022
Merge branch 'master' into polish/scraper-overlay
alexpaxton 8254a60
Use CreateScraperOverlay in buckets list
alexpaxton 592e301
Remove unused components and update tests a little bit
alexpaxton e5cc680
Update unit tests
alexpaxton c4a4669
Allow override of initial bucket selection in create scraper overlay
alexpaxton c3995c1
Disable scraper/collector create button and show warning when no buck…
alexpaxton 589cffd
Introduce alert component in clockface
alexpaxton 1aad9cd
Use alert component in no buckets warning
alexpaxton c85a0a2
Update scraper e2e tests
alexpaxton 7955bd3
Update changelog
alexpaxton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
@import 'src/style/modules'; | ||
|
||
/* | ||
Alert | ||
------------------------------------------------------------------------------ | ||
*/ | ||
|
||
.alert { | ||
width: 100%; | ||
border-radius: $radius; | ||
padding: $ix-border; | ||
font-size: $form-md-font; | ||
user-select: none; | ||
|
||
p, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6, | ||
ol, | ||
ul, | ||
li { | ||
font-weight: 600; | ||
strong { | ||
font-weight: 900; | ||
} | ||
|
||
&:first-of-type { | ||
margin-top: 0; | ||
} | ||
|
||
&:last-child { | ||
margin-bottom: 0; | ||
} | ||
} | ||
|
||
p { | ||
font-size: $form-md-font; | ||
} | ||
} | ||
|
||
.alert--contents { | ||
width: 100%; | ||
border-radius: $radius - 1px; | ||
padding: $ix-marg-b; | ||
background-color: rgba($g3-castle, 0.85); | ||
} | ||
|
||
.alert--has-icon { | ||
padding-left: $ix-marg-d + $ix-marg-b; | ||
position: relative; | ||
} | ||
|
||
.alert--icon { | ||
position: absolute; | ||
top: 50%; | ||
left: $ix-marg-b + $ix-marg-a; | ||
transform: translateY(-50%); | ||
font-size: 1.5em; | ||
color: rgba($g3-castle, 0.85); | ||
} | ||
|
||
/* Color Modifiers */ | ||
@mixin alertColorModifier($mainColor, $accentColor, $textColor, $boldColor) { | ||
color: $textColor; | ||
|
||
strong { | ||
color: $boldColor; | ||
} | ||
|
||
@include gradient-h($mainColor, $accentColor); | ||
} | ||
|
||
.alert--default { | ||
@include alertColorModifier($g7-graphite, $g5-pepper, $g13-mist, $g20-white); | ||
} | ||
|
||
.alert--primary { | ||
@include alertColorModifier($c-ocean, $c-star, $c-hydrogen, $g20-white); | ||
} | ||
|
||
.alert--secondary { | ||
@include alertColorModifier($c-comet, $c-star, $c-moonstone, $g20-white); | ||
} | ||
|
||
.alert--success { | ||
@include alertColorModifier( | ||
$c-rainforest, | ||
$c-viridian, | ||
$c-wasabi, | ||
$g20-white | ||
); | ||
} | ||
|
||
.alert--warning { | ||
@include alertColorModifier($c-pineapple, $c-thunder, $c-sulfur, $g20-white); | ||
} | ||
|
||
.alert--danger { | ||
@include alertColorModifier( | ||
$c-dreamsicle, | ||
$c-curacao, | ||
$c-marmelade, | ||
$g20-white | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Libraries | ||
import React, {SFC} from 'react' | ||
import classnames from 'classnames' | ||
|
||
// Types | ||
import {ComponentColor, IconFont} from '@influxdata/clockface' | ||
|
||
// Styles | ||
import 'src/clockface/components/alerts/Alert.scss' | ||
|
||
interface Props { | ||
children: JSX.Element | JSX.Element[] | ||
color: ComponentColor | ||
icon?: IconFont | ||
} | ||
|
||
const Alert: SFC<Props> = ({children, color, icon}) => { | ||
const className = classnames('alert', { | ||
[`alert--${color}`]: color, | ||
'alert--has-icon': icon, | ||
}) | ||
|
||
return ( | ||
<div className={className}> | ||
{icon && <span className={`alert--icon icon ${icon}`} />} | ||
<div className="alert--contents">{children}</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Alert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay an alert component! :)