Merge pull request #374 from ayusun/bug3898_att2
Bug fix 3898-Structure/page not refreshed. Updating Table stats
This commit is contained in:
commit
35f12c9ac7
@ -150,7 +150,7 @@ AJAX.registerOnload('tbl_structure.js', function() {
|
||||
var question = $.sprintf(PMA_messages['strDoYouReally'], 'ALTER TABLE `' + escapeHtml(curr_table_name) + '` DROP `' + escapeHtml(curr_column_name) + '`;');
|
||||
$(this).PMA_confirm(question, $(this).attr('href'), function(url) {
|
||||
var $msg = PMA_ajaxShowMessage(PMA_messages['strDroppingColumn'], false);
|
||||
$.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function(data) {
|
||||
$.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true, 'ajax_page_request' : true}, function (data) {
|
||||
if (data.success == true) {
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
if ($('#result_query').length) {
|
||||
@ -169,8 +169,12 @@ AJAX.registerOnload('tbl_structure.js', function() {
|
||||
}
|
||||
$after_field_item.remove();
|
||||
$curr_row.hide("medium").remove();
|
||||
//refresh table stats
|
||||
if (data.tableStat) {
|
||||
$('#tablestatistics').html(data.tableStat);
|
||||
}
|
||||
// refresh the list of indexes (comes from sql.php)
|
||||
$('#indexes').html(data.indexes_list);
|
||||
$('.index_info').replaceWith(data.indexes_list);
|
||||
PMA_reloadNavigation();
|
||||
} else {
|
||||
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error, false);
|
||||
|
||||
@ -532,7 +532,7 @@ class PMA_Index
|
||||
$no_indexes .= '</div>';
|
||||
|
||||
if (! $print_mode) {
|
||||
$r = '<fieldset>';
|
||||
$r = '<fieldset class="index_info">';
|
||||
$r .= '<legend id="index_header">' . __('Indexes');
|
||||
$r .= PMA_Util::showMySQLDocu(
|
||||
'optimization', 'optimizing-database-structure'
|
||||
|
||||
@ -436,6 +436,8 @@ if (! $tbl_is_view
|
||||
&& ! $db_is_information_schema
|
||||
&& 'ARCHIVE' != $tbl_storage_engine
|
||||
) {
|
||||
//return the list of index
|
||||
$response->addJSON('indexes_list', PMA_Index::getView($GLOBALS['table'], $GLOBALS['db']));
|
||||
$response->addHTML(PMA_getHtmlForDisplayIndexes());
|
||||
}
|
||||
|
||||
@ -445,13 +447,15 @@ if (! $tbl_is_view
|
||||
// BEGIN - Calc Table Space
|
||||
// Get valid statistics whatever is the table type
|
||||
if ($cfg['ShowStats']) {
|
||||
$response->addHTML(
|
||||
PMA_getHtmlForDisplayTableStats(
|
||||
$showtable, $table_info_num_rows, $tbl_is_view,
|
||||
$db_is_information_schema, $tbl_storage_engine,
|
||||
$url_query, $tbl_collation
|
||||
)
|
||||
);
|
||||
//get table stats in HTML format
|
||||
$tablestats = PMA_getHtmlForDisplayTableStats(
|
||||
$showtable, $table_info_num_rows, $tbl_is_view,
|
||||
$db_is_information_schema, $tbl_storage_engine,
|
||||
$url_query, $tbl_collation
|
||||
);
|
||||
//returning the response in JSON format to be used by Ajax
|
||||
$response->addJSON('tableStat', $tablestats);
|
||||
$response->addHTML($tablestats);
|
||||
}
|
||||
// END - Calc Table Space
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user