mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 13:15:14 +09:00
Bug #4409: Sunstone: remember the number of VMs to show in HOST view
This commit is contained in:
1 parent
f45fe15bc5
commit
175a6a8519
3 files changed
+32
-10
No files matched your search
@@ -187,6 +187,28 @@ define(function(require) {
|
||||
}
|
||||
},
|
||||
|
||||
"User.append_sunstone_setting" : {
|
||||
type: "single",
|
||||
call: function(params){
|
||||
OpenNebulaResource.show({
|
||||
data : {
|
||||
id: params.data.id
|
||||
},
|
||||
success: function(request, response) {
|
||||
var sunstone_template = {};
|
||||
if (response[XML_ROOT].TEMPLATE.SUNSTONE) {
|
||||
$.extend(sunstone_template, response[XML_ROOT].TEMPLATE.SUNSTONE);
|
||||
}
|
||||
|
||||
$.extend(sunstone_template, params.data.extra_param)
|
||||
var template_str = TemplateUtils.templateToString({'SUNSTONE': sunstone_template});
|
||||
Sunstone.runAction("User.append_template", params.data.id, template_str);
|
||||
},
|
||||
error: Notifier.onError
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
"User.fetch_quotas" : {
|
||||
type: "single",
|
||||
call: OpenNebulaResource.show,
|
||||
|
||||
@@ -189,7 +189,7 @@ define(function(require) {
|
||||
|
||||
this.initSelectResourceTableSelect();
|
||||
} else {
|
||||
this.dataTableOptions.pageLength = parseInt(config['page_length']);
|
||||
this.dataTableOptions.pageLength = parseInt(config['user_config']['page_length']);
|
||||
}
|
||||
|
||||
this.dataTable = $('#' + this.dataTableId).dataTable(this.dataTableOptions);
|
||||
@@ -197,11 +197,9 @@ define(function(require) {
|
||||
// Remember page length only for non selectable datatables
|
||||
if (!this.conf.select) {
|
||||
this.dataTable.on( 'length.dt', function ( e, settings, len ) {
|
||||
config['page_length'] = len;
|
||||
|
||||
var template_str = 'TABLE_DEFAULT_PAGE_LENGTH = "'+len+'"';
|
||||
|
||||
Sunstone.runAction("User.append_template", config['user_id'], template_str);
|
||||
config['user_config']['page_length'] = len;
|
||||
var sunstone_setting = {'TABLE_DEFAULT_PAGE_LENGTH': len};
|
||||
Sunstone.runAction("User.append_sunstone_setting", config['user_id'], sunstone_setting);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -403,6 +401,8 @@ define(function(require) {
|
||||
that.preUpdateView();
|
||||
}
|
||||
|
||||
that.dataTable.DataTable().page.len(parseInt(config['user_config']['page_length']));
|
||||
|
||||
var row_id_index = this.dataTable.attr("row_id");
|
||||
|
||||
if (row_id_index != undefined) {
|
||||
@@ -530,7 +530,7 @@ define(function(require) {
|
||||
}
|
||||
|
||||
function _getElementData(id, resource_tag) {
|
||||
// TODO If the element is not included in the visible rows of
|
||||
// TODO If the element is not included in the visible rows of
|
||||
// the table, it will not be included in the fnGetNodes response
|
||||
var nodes = this.dataTable.fnGetNodes();
|
||||
var tr = $('#' + resource_tag + '_' + id, nodes).closest('tr');
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
'lang' : '<%= session[:lang] %>',
|
||||
'vnc_wss' : '<%= session[:vnc_wss] %>',
|
||||
'table_order' : '<%= session[:table_order] %>',
|
||||
'default_view' : '<%= session[:default_view] %>'
|
||||
'default_view' : '<%= session[:default_view] %>',
|
||||
'page_length' : '<%= session[:page_length] %>'
|
||||
},
|
||||
'system_config' : {
|
||||
'marketplace_url' : '<%= $conf[:marketplace_url] %>',
|
||||
@@ -42,7 +43,6 @@
|
||||
'display_name' : '<%= session[:display_name] %>',
|
||||
'zone_name' : '<%= session[:zone_name] %>',
|
||||
'zone_id' : '<%= session[:zone_id] %>',
|
||||
'page_length' : '<%= session[:page_length] %>',
|
||||
'vm_logos' : <%= logos_conf.to_json %>,
|
||||
'oned_conf' : <%= oned_conf.to_json %>
|
||||
};
|
||||
@@ -68,7 +68,7 @@
|
||||
</div>
|
||||
<div id="footer" class="text-center large-12 columns">
|
||||
<a href="http://opennebula.org" target="_blank">OpenNebula 4.90.0</a>
|
||||
<br> by
|
||||
<br> by
|
||||
<a href="http://OpenNebula.systems" target="_blank">OpenNebula Systems</a>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user