-
Notifications
You must be signed in to change notification settings - Fork 356
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
TextualSummary: unify power states. #4085
TextualSummary: unify power states. #4085
Conversation
8b249eb
to
94df913
Compare
94df913
to
edaedce
Compare
edaedce
to
59296c6
Compare
Nice... I like it |
59296c6
to
b1f7b7e
Compare
Checked commit martinpovolny@b1f7b7e with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 app/helpers/vm_cloud_helper/textual_summary.rb
|
h = {:label => _("Power State"), :value => state} | ||
h[:image] = "svg/currentstate-#{@record.template? ? 'template' : state}.svg" | ||
h | ||
VALID_POWER_STATE = %w( |
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.
This looks suspiciously similar to QuadiconHelper#MACHINE_STATE_QUADRANT
(except that one uses fonticons for those same states)
Should we try to unify those two as well?
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.
Similar, but not the same. Yes, we could and should unify that. But I don't have an authoritative set of values for this. That would have to come from the backend. Or do we know what are the valid values? @skateman ?
I see two options:
- leave this as it is now. Possibly do some unification in the user, after we somehow figure what are the valid values.
- use @skateman 's list from
QuadionHelper
ignoring the couple of extra values (powering*
).
I don't have a strong opinion here.
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.
Using this for now, eventually we should be using fonticons instead of svgs here as well.
Unify the display of power state in textual summaries (detail screens).
Display a power state icon.
ping @terezanovotna, @Loicavenel
New
Old