Refactor #9767
closed
duplicate color definitions
Added by Shlomi Zadok almost 10 years ago.
Updated over 9 years ago.
Description
Copied from: https://github.com/OpenSCAP/foreman_openscap/issues/88
git grep 89A54E
app/helpers/concerns/foreman_openscap/hosts_helper_extensions.rb: :passed => '#89A54E',
app/helpers/scaptimony_policy_dashboard_helper.rb: :compliant_hosts => '#89A54E',
app/helpers/scaptimony_report_dashboard_helper.rb: :passed => '#89A54E',
We should have these color definitions only in one place and re-use them.
Hello, I'd like to try fix this issue, do you help me?
is it possible To solve this in this way?:
to move the color to a constant somewhere, maybe something like lib/foreman_openscap/colors or app/helpers ?
thanks in advanced
- Assignee set to Steve Loranz
Yeah, putting it in a helper or a module under lib/foreman_openscap would be okay.
Maybe a module with the colors as methods, e.g., something like ScapColors.passed will return '#89A54E'
- Target version deleted (
0.4.0)
- Status changed from New to Closed
Also available in: Atom
PDF