Project

General

Profile

Actions

Refactor #9767

closed

duplicate color definitions

Added by Shlomi Zadok almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Branch:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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.


Related issues 1 (0 open1 closed)

Related to OpenSCAP - Refactor #11576: Remove 'Scaptimony' from filenames ClosedOndřej Pražák08/26/2015Actions
Actions #1

Updated by Silvia Pérez almost 10 years ago

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

Actions #2

Updated by Shlomi Zadok almost 10 years ago

  • 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'

Actions #3

Updated by Shlomi Zadok over 9 years ago

  • Target version deleted (0.4.0)
Actions #4

Updated by Marek Hulán over 9 years ago

  • Status changed from New to Closed

Seems to be implemented in https://github.com/theforeman/foreman_openscap/pull/128 so closing as duplicate

Actions #5

Updated by Marek Hulán over 9 years ago

Actions

Also available in: Atom PDF