-
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
Tenant options instead of free text #690
Conversation
78ba391
to
0f4ab04
Compare
@yaacov can we have an hard-coded table to have nice strings for "System" ( |
96bec3f
to
0612c9b
Compare
32892f1
to
e43c434
Compare
"tenants": | ||
[ | ||
{"label": "System", "value": "_system"}, | ||
{"label": "Ops", "value": "_ops"}, |
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.
@yaacov I think we can call this "Operations".
def humanize(id) | ||
special_cases = { | ||
"_system" => "System", | ||
"_ops" => "Operations" |
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.
@yaacov isn't this duplicating what you have in container_live_dashboard_tenant_response.json
? Is there a way to unify this so we won't have multiple places to update?
Update: my mistake... that's a spec file sorry.
"_ops" => "Operations" | ||
} | ||
|
||
if special_cases.key?(id) |
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.
@yaacov why all this complex logic. If it's in the special_cases
(rename and make it a constant) then use that, otherwise just use the plain hawkular id.
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.
@simon3z 👍 yes, it was just .humenize
at the beginning, and then things escalated a little :-)
I'll fix it tomorrow.
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.
@simon3z Done :-)
c4759b7
to
995b599
Compare
@@ -1,6 +1,15 @@ | |||
class HawkularProxyService | |||
include UiServiceMixin | |||
|
|||
MAX_LEN = 25 | |||
SPECIAL_CASES = { |
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.
@yaacov I think should be more meaningful of "special cases" (think of other engineers that are not familiar with what you're doing... special cases of what?)
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.
@simon3z 👍 right ! changed to tenant_label_special_cases
e5ad13c
to
d9e1118
Compare
@simon3z @cben PTAL , |
LGTM |
This pull request is not mergeable. Please rebase and repush. |
@yaacov please rebase/repush. |
@h-kataria 👍 conflicts resolved :-) |
Checked commit yaacov@a5c4944 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@yaacov Cannot apply the following label because they are not recognized: euwe/no enhancement |
@miq-bot add_label euwe/no, enhancement |
Description
Compute > Containers > Providers - pick a provider - toolbar Monitoring > Ad hoc Metrics
Make _system and _ops easier to discover. Make the tenant html input element a select instead of type-ahead free text input.
(*) maybe using nice labels "System" and "Operators", or anything more descriptive)
Screenshot
![gifrecord_2017-03-16_133854](https://cloud.githubusercontent.com/assets/2181522/23994582/3558f55e-0a4e-11e7-9d2c-3046b36c2ed8.gif)