mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
We want to support hiding table columns, specifically in metrics table, through config file so that users can make the relevant bits hidden as per their organization. Current work will support the metrics table 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. 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 custom 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.js file installed at the /usr/share/cloudstackmanagement/webapp/config.js location. The config.js allows configurable keyboard list, about url/text, doc title, and help URL. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
41 lines
2.2 KiB
JavaScript
41 lines
2.2 KiB
JavaScript
// Licensed to the Apache Software Foundation (ASF) under one
|
|
// or more contributor license agreements. See the NOTICE file
|
|
// distributed with this work for additional information
|
|
// regarding copyright ownership. The ASF licenses this file
|
|
// to you under the Apache License, Version 2.0 (the
|
|
// "License"); you may not use this file except in compliance
|
|
// with the License. You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing,
|
|
// software distributed under the License is distributed on an
|
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
// KIND, either express or implied. See the License for the
|
|
// specific language governing permissions and limitations
|
|
// under the License.
|
|
|
|
// Define custom options configurable by admins for UI
|
|
cloudStackOptions = {
|
|
aboutText: "label.app.name", // This is the text shown in the 'About' box
|
|
aboutTitle: "label.about.app", // This is the Application 'Title' shown in the 'About' box
|
|
docTitle: "label.app.name", // This is the Application 'Title' shown on browser tab.
|
|
|
|
helpURL: "http://docs.cloudstack.apache.org/", // This is the URL that opens when users click Help
|
|
keyboardOptions: {
|
|
"us": "label.standard.us.keyboard",
|
|
"uk": "label.uk.keyboard",
|
|
"fr": "label.french.azerty.keyboard",
|
|
"jp": "label.japanese.keyboard",
|
|
"sc": "label.simplified.chinese.keyboard"
|
|
},
|
|
hiddenFields: {
|
|
"metrics.zones":[], // Options - "name", "state", "clusters", "cpuused", "cpuallocated", "memused", "memallocated"
|
|
"metrics.clusters": [], // Options - "name", "state", "hosts", "cpuused", "cpuallocated", "memused", "memallocated"
|
|
"metrics.hosts": [], // Options - "name", "state", "powerstate", "instances", "cpuused", "memused", "network"
|
|
"metrics.storagepool": [], // Options - "name", "property", "disk",
|
|
"metrics.instances": [], // Options - "name", "state", "ipaddress", "zonename", "cpuused", "memused", "network", "disk"
|
|
"metrics.volumes": [] // Options - "name", "state", "vmname", "sizegb", "physicalsize", "utilization", "storagetype", "storage"
|
|
}
|
|
};
|