-
Notifications
You must be signed in to change notification settings - Fork 54
Refactoring SQL joblog view #556
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
04eecd3
New view for WRKJOB
buzzia2001 c595ca3
Import command for joblog from Core
buzzia2001 a3be275
Updated status bar to show job id
buzzia2001 8b9960e
Color for status bar element
buzzia2001 77cc0b5
Refactor job log command to use job ID and update status bar color pa…
buzzia2001 e52f1a6
hot reload for colors
buzzia2001 30c4f5b
Remove any cast
SanjulaGanepola 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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,19 @@ | ||
| const HEX_COLOR = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i; | ||
|
|
||
| /** The colour picker has no empty state, so black is what it reports when no colour was ever picked. */ | ||
| const NO_COLOR = `#000000`; | ||
|
|
||
| /** | ||
| * Normalizes a status bar colour into `#rrggbb`; returns undefined when it's empty, invalid or black, | ||
| * which leaves the status bar item with the colour of the current theme. | ||
| */ | ||
| export function parseStatusBarColor(color?: string) { | ||
|
buzzia2001 marked this conversation as resolved.
Outdated
|
||
| const trimmed = (color || ``).trim(); | ||
| if (!HEX_COLOR.test(trimmed)) { | ||
| return undefined; | ||
| } | ||
|
|
||
| const hex = trimmed.substring(1); | ||
| const normalized = `#${hex.length === 3 ? hex.split(``).map(channel => channel + channel).join(``) : hex}`.toLowerCase(); | ||
| return normalized === NO_COLOR ? undefined : normalized; | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.