mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
#944 Speed-up the display of CSV import history. IF the feature is enabled, the CSV import history is:
1) Displayed asynchronously 2) Based on a specific 'origin' enum fields instead of parsing the userinfo comment SVN:trunk[3234]
This commit is contained in:
@@ -29,6 +29,7 @@ try
|
||||
require_once('../approot.inc.php');
|
||||
require_once(APPROOT.'/application/application.inc.php');
|
||||
require_once(APPROOT.'/application/itopwebpage.class.inc.php');
|
||||
require_once(APPROOT.'/application/ajaxwebpage.class.inc.php');
|
||||
|
||||
require_once(APPROOT.'/application/startup.inc.php');
|
||||
|
||||
@@ -305,7 +306,8 @@ try
|
||||
// We're doing it for real, let's create a change
|
||||
$sUserString = CMDBChange::GetCurrentUserName().' (CSV)';
|
||||
CMDBObject::SetTrackInfo($sUserString);
|
||||
|
||||
CMDBObject::SetTrackOrigin('csv-interactive');
|
||||
|
||||
$oMyChange = CMDBObject::GetCurrentChange();
|
||||
}
|
||||
|
||||
@@ -1485,14 +1487,21 @@ EOF
|
||||
|
||||
if (Utils::GetConfig()->Get('csv_import_history_display'))
|
||||
{
|
||||
$oPage->SetCurrentTabContainer('tabs1');
|
||||
$oPage->SetCurrentTab(Dict::S('UI:History:BulkImports'));
|
||||
BulkChange::DisplayImportHistory($oPage);
|
||||
$oPage->SetCurrentTabContainer('tabs1');
|
||||
$oPage->AddAjaxTab(Dict::S('UI:History:BulkImports'), utils::GetAbsoluteUrlAppRoot().'pages/csvimport.php?step=11', true /* bCache */);
|
||||
}
|
||||
}
|
||||
|
||||
switch($iStep)
|
||||
{
|
||||
case 11:
|
||||
// Asynchronous tab
|
||||
$oPage = new ajax_page('');
|
||||
BulkChange::DisplayImportHistory($oPage);
|
||||
$oPage->add_ready_script('$("#CSVImportHistory table.listResults").tableHover();');
|
||||
$oPage->add_ready_script('$("#CSVImportHistory table.listResults").tablesorter( { widgets: ["myZebra", "truncatedList"]} );');
|
||||
break;
|
||||
|
||||
case 10:
|
||||
// Case generated by BulkChange::DisplayImportHistory
|
||||
$iChange = (int)utils::ReadParam('changeid', 0);
|
||||
|
||||
Reference in New Issue
Block a user