-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show condition run as child for taskrun (#292)
* #277 show condition run as child for taskrun Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com> * Fix all issues related to start and refreash tree Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com> * remove unused variables Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com> * add more descriptive message in case taskrun load error Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com> * Use new state icons for some tree items Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
- Loading branch information
Showing
28 changed files
with
1,261 additions
and
2,924 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,4 @@ node_modules | |
*.vsix | ||
coverage/ | ||
preview/ | ||
|
||
.DS_Store |
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,41 @@ | ||
/*----------------------------------------------------------------------------------------------- | ||
* Copyright (c) Red Hat, Inc. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE file in the project root for license information. | ||
*-----------------------------------------------------------------------------------------------*/ | ||
import * as path from 'path'; | ||
import * as fs from 'fs-extra'; | ||
import * as svgTools from 'simple-svg-tools'; | ||
import { exit } from 'shelljs'; | ||
|
||
const icons = ['C.svg', 'TR.svg', 'PLR.svg']; | ||
const stateToColor = { | ||
error: 'red', | ||
pending: 'grey' | ||
}; | ||
|
||
const imagesPath = path.join(__dirname, '..', '..', 'images'); | ||
const destinationPath = path.join(__dirname, '..', '..', 'images', 'generated'); | ||
fs.ensureDirSync(destinationPath); | ||
|
||
|
||
async function generateIcons(): Promise<void> { | ||
for (const icon of icons) { | ||
const iconPath = path.join(imagesPath, icon); | ||
if (fs.existsSync(iconPath)) { | ||
|
||
for (const state in stateToColor) { | ||
const color = stateToColor[state]; | ||
fs.ensureDirSync(path.join(destinationPath, state)); | ||
let svg = await svgTools.ImportSVG(iconPath); | ||
svg = await svgTools.SVGO(svg); | ||
svg = await svgTools.ChangePalette(svg, { | ||
'#38812f': color, | ||
}); | ||
|
||
await svgTools.ExportSVG(svg, path.join(destinationPath, state, icon)); | ||
} | ||
} | ||
} | ||
} | ||
|
||
generateIcons().then(() => exit(0)); |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Oops, something went wrong.