mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
85fa457c10
commit
f3accec020
@ -36,7 +36,6 @@ enabled_tabs:
|
||||
- vdcs-tab
|
||||
- acls-tab
|
||||
- settings-tab
|
||||
- support-tab
|
||||
- vmgroup-tab
|
||||
features:
|
||||
# True to show showback monthly reports, and VM cost
|
||||
@ -891,18 +890,6 @@ tabs:
|
||||
SecurityGroup.delete: true
|
||||
SecurityGroup.edit_labels: true
|
||||
SecurityGroup.menu_labels: true
|
||||
support-tab:
|
||||
panel_tabs:
|
||||
support_info_tab: true
|
||||
table_columns:
|
||||
#- 0 # Checkbox
|
||||
- 1 # ID
|
||||
- 2 # Subject
|
||||
- 3 # Created at
|
||||
- 4 # Status
|
||||
actions:
|
||||
Support.refresh: true
|
||||
Support.create_dialog: true
|
||||
settings-tab:
|
||||
panel_tabs:
|
||||
settings_info_tab: true
|
||||
|
@ -36,7 +36,6 @@ enabled_tabs:
|
||||
#- vdcs-tab
|
||||
#- acls-tab
|
||||
- settings-tab
|
||||
#- support-tab
|
||||
- vmgroup-tab
|
||||
features:
|
||||
# True to show showback monthly reports, and VM cost
|
||||
@ -888,18 +887,6 @@ tabs:
|
||||
SecurityGroup.delete: false
|
||||
SecurityGroup.edit_labels: true
|
||||
SecurityGroup.menu_labels: true
|
||||
support-tab:
|
||||
panel_tabs:
|
||||
support_info_tab: true
|
||||
table_columns:
|
||||
#- 0 # Checkbox
|
||||
- 1 # ID
|
||||
- 2 # Subject
|
||||
- 3 # Created at
|
||||
- 4 # Status
|
||||
actions:
|
||||
Support.refresh: true
|
||||
Support.create_dialog: true
|
||||
settings-tab:
|
||||
panel_tabs:
|
||||
settings_info_tab: true
|
||||
|
@ -36,7 +36,6 @@ enabled_tabs:
|
||||
#- vdcs-tab
|
||||
#- acls-tab
|
||||
- settings-tab
|
||||
#- support-tab
|
||||
- vmgroup-tab
|
||||
features:
|
||||
# True to show showback monthly reports, and VM cost
|
||||
@ -884,18 +883,6 @@ tabs:
|
||||
SecurityGroup.delete: true
|
||||
SecurityGroup.edit_labels: true
|
||||
SecurityGroup.menu_labels: true
|
||||
support-tab:
|
||||
panel_tabs:
|
||||
support_info_tab: true
|
||||
table_columns:
|
||||
#- 0 # Checkbox
|
||||
- 1 # ID
|
||||
- 2 # Subject
|
||||
- 3 # Created at
|
||||
- 4 # Status
|
||||
actions:
|
||||
Support.refresh: true
|
||||
Support.create_dialog: true
|
||||
settings-tab:
|
||||
panel_tabs:
|
||||
settings_info_tab: true
|
||||
|
@ -36,7 +36,6 @@ enabled_tabs:
|
||||
- vdcs-tab
|
||||
- acls-tab
|
||||
- settings-tab
|
||||
- support-tab
|
||||
- vmgroup-tab
|
||||
features:
|
||||
# True to show showback monthly reports, and VM cost
|
||||
@ -893,18 +892,6 @@ tabs:
|
||||
SecurityGroup.delete: true
|
||||
SecurityGroup.edit_labels: true
|
||||
SecurityGroup.menu_labels: true
|
||||
support-tab:
|
||||
panel_tabs:
|
||||
support_info_tab: true
|
||||
table_columns:
|
||||
#- 0 # Checkbox
|
||||
- 1 # ID
|
||||
- 2 # Subject
|
||||
- 3 # Created at
|
||||
- 4 # Status
|
||||
actions:
|
||||
Support.refresh: true
|
||||
Support.create_dialog: true
|
||||
settings-tab:
|
||||
panel_tabs:
|
||||
settings_info_tab: true
|
||||
|
@ -36,7 +36,6 @@ enabled_tabs:
|
||||
#- vdcs-tab
|
||||
#- acls-tab
|
||||
- settings-tab
|
||||
#- support-tab
|
||||
- vmgroup-tab
|
||||
features:
|
||||
# True to show showback monthly reports, and VM cost
|
||||
@ -892,18 +891,6 @@ tabs:
|
||||
SecurityGroup.delete: false
|
||||
SecurityGroup.edit_labels: true
|
||||
SecurityGroup.menu_labels: true
|
||||
support-tab:
|
||||
panel_tabs:
|
||||
support_info_tab: true
|
||||
table_columns:
|
||||
#- 0 # Checkbox
|
||||
- 1 # ID
|
||||
- 2 # Subject
|
||||
- 3 # Created at
|
||||
- 4 # Status
|
||||
actions:
|
||||
Support.refresh: true
|
||||
Support.create_dialog: true
|
||||
settings-tab:
|
||||
panel_tabs:
|
||||
settings_info_tab: true
|
||||
|
@ -36,7 +36,6 @@ enabled_tabs:
|
||||
#- vdcs-tab
|
||||
#- acls-tab
|
||||
- settings-tab
|
||||
#- support-tab
|
||||
- vmgroup-tab
|
||||
features:
|
||||
# True to show showback monthly reports, and VM cost
|
||||
@ -885,18 +884,6 @@ tabs:
|
||||
SecurityGroup.delete: true
|
||||
SecurityGroup.edit_labels: true
|
||||
SecurityGroup.menu_labels: true
|
||||
support-tab:
|
||||
panel_tabs:
|
||||
support_info_tab: true
|
||||
table_columns:
|
||||
#- 0 # Checkbox
|
||||
- 1 # ID
|
||||
- 2 # Subject
|
||||
- 3 # Created at
|
||||
- 4 # Status
|
||||
actions:
|
||||
Support.refresh: true
|
||||
Support.create_dialog: true
|
||||
settings-tab:
|
||||
panel_tabs:
|
||||
settings_info_tab: true
|
||||
|
@ -36,7 +36,6 @@ enabled_tabs:
|
||||
- vdcs-tab
|
||||
- acls-tab
|
||||
- settings-tab
|
||||
- support-tab
|
||||
- vmgroup-tab
|
||||
features:
|
||||
# True to show showback monthly reports, and VM cost
|
||||
@ -888,18 +887,6 @@ tabs:
|
||||
SecurityGroup.delete: true
|
||||
SecurityGroup.edit_labels: true
|
||||
SecurityGroup.menu_labels: true
|
||||
support-tab:
|
||||
panel_tabs:
|
||||
support_info_tab: true
|
||||
table_columns:
|
||||
#- 0 # Checkbox
|
||||
- 1 # ID
|
||||
- 2 # Subject
|
||||
- 3 # Created at
|
||||
- 4 # Status
|
||||
actions:
|
||||
Support.refresh: true
|
||||
Support.create_dialog: true
|
||||
settings-tab:
|
||||
panel_tabs:
|
||||
settings_info_tab: true
|
||||
|
@ -36,7 +36,6 @@ enabled_tabs:
|
||||
#- vdcs-tab
|
||||
#- acls-tab
|
||||
- settings-tab
|
||||
#- support-tab
|
||||
- vmgroup-tab
|
||||
features:
|
||||
# True to show showback monthly reports, and VM cost
|
||||
@ -889,18 +888,6 @@ tabs:
|
||||
SecurityGroup.delete: false
|
||||
SecurityGroup.edit_labels: true
|
||||
SecurityGroup.menu_labels: true
|
||||
support-tab:
|
||||
panel_tabs:
|
||||
support_info_tab: true
|
||||
table_columns:
|
||||
#- 0 # Checkbox
|
||||
- 1 # ID
|
||||
- 2 # Subject
|
||||
- 3 # Created at
|
||||
- 4 # Status
|
||||
actions:
|
||||
Support.refresh: true
|
||||
Support.create_dialog: true
|
||||
settings-tab:
|
||||
panel_tabs:
|
||||
settings_info_tab: true
|
||||
|
@ -36,7 +36,6 @@ enabled_tabs:
|
||||
#- vdcs-tab
|
||||
#- acls-tab
|
||||
- settings-tab
|
||||
#- support-tab
|
||||
- vmgroup-tab
|
||||
features:
|
||||
# True to show showback monthly reports, and VM cost
|
||||
@ -882,18 +881,6 @@ tabs:
|
||||
SecurityGroup.delete: true
|
||||
SecurityGroup.edit_labels: true
|
||||
SecurityGroup.menu_labels: true
|
||||
support-tab:
|
||||
panel_tabs:
|
||||
support_info_tab: true
|
||||
table_columns:
|
||||
#- 0 # Checkbox
|
||||
- 1 # ID
|
||||
- 2 # Subject
|
||||
- 3 # Created at
|
||||
- 4 # Status
|
||||
actions:
|
||||
Support.refresh: true
|
||||
Support.create_dialog: true
|
||||
settings-tab:
|
||||
panel_tabs:
|
||||
settings_info_tab: true
|
||||
|
@ -18,10 +18,24 @@ define(function(require) {
|
||||
require("jquery");
|
||||
// Clone the local config object in a private var
|
||||
var _config = $.extend(true, {}, config);
|
||||
|
||||
var inmutableTabs = ['official-support-tab', 'support-tab']
|
||||
|
||||
function enabledTabs () {
|
||||
return _config["view"]["enabled_tabs"].concat(inmutableTabs)
|
||||
}
|
||||
|
||||
function allTabs () {
|
||||
return Object.keys(_config["view"]["tabs"]).concat(inmutableTabs)
|
||||
}
|
||||
|
||||
function isInmutableTab (tabName) {
|
||||
return inmutableTabs.indexOf(tabName) !== -1
|
||||
}
|
||||
|
||||
var Config = {
|
||||
"isTabEnabled": function(tabName) {
|
||||
var enabled = _config["view"]["enabled_tabs"].indexOf(tabName) != -1;
|
||||
return enabled;
|
||||
return enabledTabs().indexOf(tabName) !== -1
|
||||
},
|
||||
|
||||
"changeFilter": function(bool) {
|
||||
@ -33,6 +47,9 @@ define(function(require) {
|
||||
},
|
||||
|
||||
"isTabActionEnabled": function(tabName, actionName, panelName) {
|
||||
// exception with inmutable tabs
|
||||
if (isInmutableTab(tabName)) { return true }
|
||||
|
||||
var enabled = false;
|
||||
var configTab = _config["view"]["tabs"][tabName];
|
||||
|
||||
@ -48,6 +65,9 @@ define(function(require) {
|
||||
},
|
||||
|
||||
"isTabPanelEnabled": function(tabName, panelTabName) {
|
||||
// exception with inmutable tabs
|
||||
if (isInmutableTab(tabName)) { return true }
|
||||
|
||||
if (_config["view"]["tabs"][tabName]) {
|
||||
var enabled = _config["view"]["tabs"][tabName]["panel_tabs"][panelTabName];
|
||||
return enabled;
|
||||
@ -163,16 +183,14 @@ define(function(require) {
|
||||
"link_logo": (_config["view"]["link_logo"] || false),
|
||||
"text_link_logo": (_config["view"]["text_link_logo"] || false),
|
||||
"vmLogos": (_config["vm_logos"]),
|
||||
"enabledTabs": _config["view"]["enabled_tabs"],
|
||||
"enabledTabs": enabledTabs(),
|
||||
"onedConf": _config["oned_conf"],
|
||||
"confirmVMActions": _config["view"]["confirm_vms"],
|
||||
"scaleFactor": _config["view"]["features"]["instantiate_cpu_factor"],
|
||||
"filterView": _config["view"]["filter-view"],
|
||||
"doCountAnimation": _config["view"]["do_count_animation"],
|
||||
|
||||
"allTabs": function() {
|
||||
return Object.keys(_config["view"]["tabs"]);
|
||||
},
|
||||
"allTabs": allTabs,
|
||||
"thresholds":{
|
||||
"min":_config["user_config"]["threshold_min"],
|
||||
"low":_config["user_config"]["threshold_low"],
|
||||
|
@ -135,9 +135,6 @@ define(function(require) {
|
||||
$.each(Config.allTabs(), function(i, tabName){
|
||||
_addAction(i, tabName);
|
||||
});
|
||||
|
||||
//add actions official support
|
||||
_addAction(null, "official-support-tab");
|
||||
};
|
||||
|
||||
var _addDialogs = function(dialogs) {
|
||||
@ -190,30 +187,6 @@ define(function(require) {
|
||||
});
|
||||
}
|
||||
}
|
||||
var support_tab = "support-tab";
|
||||
var official_support_tab = "official-support-tab";
|
||||
if(SunstoneCfg &&
|
||||
SunstoneCfg.tabs &&
|
||||
!SunstoneCfg.tabs[support_tab]
|
||||
){
|
||||
SunstoneCfg.tabs[support_tab] = {
|
||||
actions: {
|
||||
"Support.create_dialog": true,
|
||||
"Support.refresh": true
|
||||
},
|
||||
panels_tabs:{
|
||||
"support_info_tab": true
|
||||
},
|
||||
table_columns: [1,2,3,4]
|
||||
};
|
||||
_addMainTab(support_tab);
|
||||
_insertTab(support_tab);
|
||||
_setupDataTable(support_tab);
|
||||
}
|
||||
|
||||
//Separate the logic be supported with the banner
|
||||
_addMainTab(official_support_tab);
|
||||
_insertTab(official_support_tab);
|
||||
|
||||
_setupTabs();
|
||||
};
|
||||
@ -262,14 +235,13 @@ define(function(require) {
|
||||
} else {
|
||||
liItem = "<li id=\"li_" + tabName + "\" class=\"" + tabClass + "\">" + "<a href=\"#\">" + title + "</a>" + "</li>";
|
||||
$("div#menu ul#navigation").append(liItem);
|
||||
if(config && config.user_config){
|
||||
if(tabName === "support-tab" && config.user_config.default_view === "cloud"){
|
||||
_addAction(null, "official-support-tab");
|
||||
if (config && config.user_config && tabName === "support-tab") {
|
||||
if (config.user_config.default_view === "cloud") {
|
||||
$(".sunstone-header").addClass("support_place").append(title);
|
||||
$("#support-tab").remove();
|
||||
}
|
||||
if(config.user_config.default_view !== "admin"){
|
||||
$("#support-tab").remove();
|
||||
|
||||
if (config.user_config.default_view !== "admin") {
|
||||
$("#support-tab, #official-support-tab").remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,10 +16,7 @@
|
||||
|
||||
define(function(require) {
|
||||
var Actions = require("./official-support-tab/actions");
|
||||
var Notifier = require("utils/notifier");
|
||||
var SupportUtils = require("./official-support-tab/utils/common");
|
||||
var Sunstone = require("sunstone");
|
||||
var Locale = require("utils/locale");
|
||||
var TAB_ID = require("./official-support-tab/tabId");
|
||||
|
||||
var Tab = {
|
||||
@ -31,7 +28,7 @@ define(function(require) {
|
||||
|
||||
return Tab;
|
||||
|
||||
function _setup(context) {
|
||||
function _setup() {
|
||||
SupportUtils.checkValidateOfficialSupport();
|
||||
SupportUtils.checkLastVersionSupport();
|
||||
$(".support_not_connected > button").on("click", function(e){
|
||||
|
@ -15,8 +15,6 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
define(function(require) {
|
||||
var Sunstone = require("sunstone");
|
||||
var Notifier = require("utils/notifier");
|
||||
var OpenNebulaSupport = require("opennebula/support");
|
||||
var SupportUtils = require("../support-tab/utils/common");
|
||||
|
||||
|
@ -23,8 +23,6 @@ define(function(require) {
|
||||
|
||||
var TAB_ID = require("../../support-tab/tabId");
|
||||
|
||||
var support_interval_function;
|
||||
|
||||
function _show_support_connect() {
|
||||
$(".support_info").hide();
|
||||
$("#"+Sunstone.getDataTable(TAB_ID).dataTableId+"Container", "#"+TAB_ID).hide();
|
||||
|
@ -89,6 +89,7 @@ define(function(require) {
|
||||
url: "support/credentials",
|
||||
type: "POST",
|
||||
data: JSON.stringify(data),
|
||||
contentType: false,
|
||||
success: function(){
|
||||
$(".submit_support_credentials_button", context).removeAttr("disabled");
|
||||
$(".submit_support_credentials_button", context).html(Locale.tr("Sign in"));
|
||||
|
@ -24,26 +24,7 @@ define(function(require) {
|
||||
var TAB_ID = require("./tabId");
|
||||
var CREATE_DIALOG_ID = require("./form-panels/create/formPanelId");
|
||||
var UPLOAD_DIALOG_ID = require("./dialogs/upload/dialogId");
|
||||
var majorVersion = function(version){
|
||||
var r = 0;
|
||||
if(version && version.length){
|
||||
var major = version.substring(0, version.lastIndexOf("."));
|
||||
if(major && major.length){
|
||||
r = parseFloat(major);
|
||||
}
|
||||
}
|
||||
return r;
|
||||
};
|
||||
var minorVersion = function(version){
|
||||
var r = 0;
|
||||
if(version && version.length){
|
||||
var minor = version.substring(version.lastIndexOf(".")+1);
|
||||
if(minor && minor.length){
|
||||
r = parseFloat(minor);
|
||||
}
|
||||
}
|
||||
return r;
|
||||
};
|
||||
|
||||
var _actions = {
|
||||
"Support.list" : {
|
||||
type: "list",
|
||||
@ -76,7 +57,7 @@ define(function(require) {
|
||||
Sunstone.runAction(RESOURCE+".list", {force: true});
|
||||
}
|
||||
},
|
||||
error: function(request, error_json) {
|
||||
error: function() {
|
||||
SupportUtils.showSupportConnect();
|
||||
}
|
||||
},
|
||||
@ -89,14 +70,14 @@ define(function(require) {
|
||||
Sunstone.insertPanels(TAB_ID, response);
|
||||
}
|
||||
},
|
||||
error: function(request, error_json) {
|
||||
error: function() {
|
||||
SupportUtils.showSupportConnect();
|
||||
}
|
||||
},
|
||||
"Support.create" : {
|
||||
type: "create",
|
||||
call: OpenNebulaSupport.create,
|
||||
callback: function(request, response){
|
||||
callback: function(){
|
||||
Sunstone.resetFormPanel(TAB_ID, CREATE_DIALOG_ID);
|
||||
Sunstone.hideFormPanel(TAB_ID);
|
||||
Sunstone.runAction("Support.refresh");
|
||||
@ -120,13 +101,12 @@ define(function(require) {
|
||||
"Support.update" : {
|
||||
type: "single",
|
||||
call: OpenNebulaSupport.update,
|
||||
callback: function(request, response){
|
||||
callback: function(){
|
||||
Sunstone.runAction("Support.refresh");
|
||||
Notifier.notifyMessage("Comment added correctly");
|
||||
},
|
||||
error: function(request, response){
|
||||
error: function(){
|
||||
Sunstone.runAction("Support.refresh");
|
||||
//Notifier.onError(request, response);
|
||||
Notifier.notifyError("Comment failed to be added");
|
||||
}
|
||||
},
|
||||
@ -142,7 +122,7 @@ define(function(require) {
|
||||
Sunstone.runAction("Support.refresh");
|
||||
},
|
||||
error: function(response){
|
||||
if (response.status=="401") {
|
||||
if (response.status === "401") {
|
||||
Notifier.notifyError("Support credentials are incorrect");
|
||||
} else {
|
||||
Notifier.notifyError(response.responseText);
|
||||
|
@ -20,8 +20,6 @@ define(function(require) {
|
||||
*/
|
||||
|
||||
var TabDataTable = require('utils/tab-datatable');
|
||||
var SunstoneConfig = require('sunstone-config');
|
||||
var Locale = require('utils/locale');
|
||||
|
||||
/*
|
||||
CONSTANTS
|
||||
@ -49,16 +47,17 @@ define(function(require) {
|
||||
"aoColumnDefs": [
|
||||
{"bSortable": false, "aTargets": ["check"]},
|
||||
{"sWidth": "35px", "aTargets": [0]},
|
||||
{"bVisible": true, "aTargets": SunstoneConfig.tabTableColumns(TAB_NAME)},
|
||||
{"bVisible": true, "aTargets": [1, 2, 3, 4]},
|
||||
{"bVisible": false, "aTargets": ['_all']}
|
||||
]
|
||||
};
|
||||
|
||||
this.columns = [
|
||||
"ID",
|
||||
"Subject",
|
||||
"Requested",
|
||||
"Status"
|
||||
// Checkbox // 0
|
||||
"ID", // 1
|
||||
"Subject", // 2
|
||||
"Requested",// 3
|
||||
"Status" // 4
|
||||
];
|
||||
|
||||
|
||||
|
@ -19,9 +19,7 @@ define(function(require) {
|
||||
DEPENDENCIES
|
||||
*/
|
||||
|
||||
var Locale = require('utils/locale');
|
||||
var Sunstone = require('sunstone');
|
||||
|
||||
var TemplateInfo = require('hbs!./info/html');
|
||||
|
||||
/*
|
||||
|
@ -80,5 +80,4 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<p class="text-center" style="font-size: 14px; color: #999;">This tab can be disabled in the sunstone views configuration files</p>
|
||||
<br>
|
Loading…
x
Reference in New Issue
Block a user