Configurable UI branding, keyboard list and hide-able columns through a new config.js file#3258
Conversation
This introduces a new UI `config.js` file using which the UI could be configured by the admin from a single config/js file. In the first commit this allows for easy configuration of list of keyboards. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
At some point, let's merge this with PR #3217 otherwise this will lead to merge conflicts for related features extending/using config.js |
abd0f19 to
d43d696
Compare
|
@blueorangutan package |
|
@anuragaw a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2678 |
|
Put some after-loaded method/js file that does something looping over sections minimizing changes to the listview/widget/library: |
|
Closed #3217 in favour of this one |
This helps brands in setting up relevant resources in their deployement.
21a052e to
924e4da
Compare
We want users to be able to hide some columns in metrics tables that may not be necessary for their organizations. The current commit will start supporting metrics table and it can be extended to any table with similar logic Added all options to the config file for ease of use
924e4da to
37abd92
Compare
| @@ -860,6 +860,8 @@ | |||
| if (groupableColumns) { | |||
| $tr.addClass('groupable-header-columns').addClass('groupable-header'); | |||
| $.each(fields, function(key) { | |||
There was a problem hiding this comment.
This was broken in existing code and needed fixing. If an upper field is hidden we must not draw it's containing columns.
|
@rhtyd I have updated the PR with the changes we discussed. |
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2708 |
borisstoyanov
left a comment
There was a problem hiding this comment.
LGTM, manually checked all the changes
PaulAngus
left a comment
There was a problem hiding this comment.
Background: show/hide column feature enables cloud operator to hide 'sensitive' infrastructure data from users.
- Columns hidden from users are also hidden from administrator
Consolidation of keyboard types:
- keyboard list on console proxy does not reflect the configured (in config.js) keyboard types.
|
@PaulAngus - addressed all the comments in the latest commit. There are 5 keyboards specified in the config.js. I get first 4 of them. I wanted to confirm if the keyboard options you get were only missing "Simplified Chinese Keyboard" or any more? |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2765 |
|
Purely UI changes, merging based on tests and reviews. |
|
Created PR #3429 to clean up config file with redundant columns. |
This is a purely documentation change of config file. The cleanup was needed post merge of PR #3258
Description
We want to support hiding selective columns in metrics tables for "users" through a config file so that admins can make the relevant information hidden as per their organization needs.
Current PR code will supports metrics tables but can be extended to any table with minimal work in future. Config file will take the key of the metrics column from metrics.js file for the sake of minimal changes and simplicity of development along with future extension.
(#3217 was merged with this PR)
Problem: The keyboard list in the UI is not consistent across views such as in the instance wizard and in the register template form. There is also no way to customize about url/text and doc title and help URL in the UI.
Root Cause: The list is hardcoded in the UI allowing no centralised configuration.
Solution: Introduce a new
config.jsfile installed at the/usr/share/cloudstackmanagement/webapp/config.jslocation. The config.js allows configurable keyboard list, about url/text, doc title, and help URL. It will also allow defining which columns need to be hidden.Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
Testing and further documentation in progress and will be updated with proper notes.
Image with all columns showing up -

Change in config.js file -
View after change in config file -

Post Merge Update:
Please note that Admins can still see all information and only Users cannot see the columns that are specified. Consequently metrics tables that users don't see have no relevance in the config file. These include zone, clusters, hosts.