importWizardMSAS.js 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179
  1. /****************************************************************
  2. ** IBM Confidential
  3. **
  4. ** OCO Source Materials
  5. **
  6. ** IBM Cognos Products: mdsrv
  7. **
  8. ** (C) Copyright IBM Corp. 2008, 2014
  9. **
  10. ** The source code for this program is not published or otherwise
  11. ** divested of its trade secrets, irrespective of what has been
  12. ** deposited with the U.S. Copyright Office.
  13. *****************************************************************/
  14. G_HAL.F_Include( WEB_CONTENT + "/hal/C_Deck.js" );
  15. G_HAL.F_Include( WEB_CONTENT + "/hal/C_TreeView.js" );
  16. G_HAL.F_Include( WEB_CONTENT + "/hal/C_ListView.js" );
  17. G_HAL.F_Include( WEB_CONTENT + "/hal/U_CookieJar.js" );
  18. G_HAL.F_Include( WEB_CONTENT + "/hal/C_Dialog.js" );
  19. G_HAL.F_Include( WEB_CONTENT + "/common/json/json2.js" );
  20. G_HAL.F_Include( WEB_CONTENT + "/hal/G_ResManager.js" );
  21. G_HAL.F_Include( WEB_CONTENT + "/hal/C_MultiScriptRequest.js" );
  22. //G_HAL.F_Include( WEB_CONTENT + "hal/G_KeyboardManager.js");
  23. G_HAL.F_Include( WEB_CONTENT + "/hal/C_ComboBox.js" );
  24. G_HAL.F_Include( WEB_CONTENT + "/hal/C_PropertySheet.js" );
  25. //TO DO & Ideas:
  26. //
  27. // - button: Unselect all
  28. //
  29. // - label: Number of objects selected
  30. // These are meant to be constants (even if JavaScript allows you to change them; you MUST NOT change them).
  31. var kDatabaseTypeStr = "database";
  32. var kCatalogTypeStr = "catalog";
  33. var kCubeTypeStr = "cube";
  34. var kInfoQueryTypeStr = "infoQuery";
  35. var kDimensionGroupTypeStr = "dimensionGroup";
  36. var kDimensionTypeStr = "dimension";
  37. var kMeasuresGroupTypeStr = "Measures";
  38. var kMeasureTypeStr = "measure";
  39. var asyncErrorPagePid = "importWizard_communication_error_page";
  40. var G_App = {};
  41. function ImportWizard()
  42. {
  43. this.credentials = "";
  44. }
  45. ImportWizard.prototype.setDataSourceCredentials = function(credentialString)
  46. {
  47. this.credentials = credentialString;
  48. urlRequestInvoker.RequestFinished();
  49. }
  50. ImportWizard.prototype.updateCredentials = function(newCredentials)
  51. {
  52. var urlPostParams = new Object();
  53. urlPostParams["pid"] = "updateCredentials";
  54. urlPostParams["current_credentials"] = this.credentials;
  55. urlPostParams["newcredentials_password"] = newCredentials;
  56. urlPostParams["error_pid"] = asyncErrorPagePid;
  57. var updateCredentialsRequestURL = GATEWAY_URL + "/metadataUIService";
  58. urlRequestInvoker.MakeAsyncRequestInIFrame( updateCredentialsRequestURL, urlPostParams );
  59. }
  60. IMPORTWIZARD = new ImportWizard();
  61. G_App.F_HAL_OnLoad = function()
  62. {
  63. // @todo Must pass proper locale code!
  64. G_ResManager.F_SetLocale( "en" );
  65. // This call is needed even if we don't pass a filename as an argument,
  66. // in order to load the standard HAL string resources.
  67. G_ResManager.F_LoadStrings( [ /*WEB_CONTENT + "/mdsrv/res/strings"*/], this );
  68. //Enable Accessibility for FireFox Browser only, pass false as second parameter if you don't want the focus ring in Firefox
  69. G_HAL.F_EnableAccessibility( G_BrowserInfo.M_bIsFirefox );
  70. //Enable High Contrast Mode need for FireFox only, Need testing to enable it for IE as well
  71. //if( G_BrowserInfo.M_bIsFirefox )
  72. // Need to check if the high contrast mode is enabled, waiting for HAL to expose this function or may not need it
  73. //G_HAL.F_EnableHighContrastMode();
  74. };
  75. G_App.initControls = function()
  76. {
  77. this.m_oDeck = new C_Deck( document.getElementById( "divDeck" ), this );
  78. UpdateButtonsEnableStatus( 0 /* cardIndex */ );
  79. this.F_ApplySkin( "corporate|portal" );
  80. // this.F_ApplySkin( "windows|app" );
  81. this.m_treeViewNodesDoc = U_XML.F_CreateDocument();
  82. var treeViewElem = this.m_treeViewNodesDoc.appendChild( this.m_treeViewNodesDoc.createElement( 'treeView' ) );
  83. treeViewElem.setAttribute( "id", "TreeView" );
  84. treeViewElem.setAttribute( "showCheckboxes", "true" );
  85. // Only populate with the root node if in "create" mode!
  86. if (!IMPORTWIZARD.isEdit)
  87. {
  88. this.PopulateTreeView_RootNode( this.m_treeViewNodesDoc, treeViewElem );
  89. }
  90. this.m_oTreeViewCheckboxes = new C_TreeView( document.getElementById( "divTreeViewCheckboxes" ), treeViewElem, this );
  91. g_expandTreeLevel = 0;
  92. var useV5DataServerCheckBox = document.getElementById( "useV5DataServer" );
  93. useV5DataServerCheckBox.checked = IMPORTWIZARD.bUseV5DataServer;
  94. if (IMPORTWIZARD.bDisableClassic == "true")
  95. //useV5DataServerCheckBox.disabled=true;
  96. useV5DataServerCheckBox.style.display = "none";
  97. var ms_useV5DataServerCheckBox = document.getElementById( "ms_useV5DataServer" );
  98. ms_useV5DataServerCheckBox.checked = IMPORTWIZARD.bUseV5DataServer;
  99. PopulateLanguagesListBox();
  100. if (IMPORTWIZARD.enableTest == false)
  101. {
  102. ShowPackageRenameDlgIfNeeded();
  103. }
  104. }
  105. G_App.expandNode = function( node)
  106. {
  107. // testing code to expand the root node
  108. if (IMPORTWIZARD.enableTest == true)
  109. {
  110. //var node = g_viewNodeToExpand.selectSingleNode( "treeNode" );
  111. if (node != null)
  112. {
  113. G_App.m_oTreeViewCheckboxes.F_ExpandNode(node );
  114. G_App.m_oTreeViewCheckboxes.F_Draw();
  115. }
  116. }
  117. }
  118. function PopulateLanguagesListBox()
  119. {
  120. var getLanguagesRequestURL = GATEWAY_URL + "/metadataUIService";
  121. D_Progress.F_DisableCancel();
  122. D_Progress.F_Show( null, localizedStrings["MSR_SAP_Loading"]);
  123. var getLanguagesRequestPostParams = {};
  124. getLanguagesRequestPostParams["pid"] = "OLAPImportWizard_Languages_pid"
  125. getLanguagesRequestPostParams["datasource"] = IMPORTWIZARD.dataSourceName;
  126. getLanguagesRequestPostParams["dataSourceCredentials"] = IMPORTWIZARD.credentials;
  127. getLanguagesRequestPostParams["error_pid"] = asyncErrorPagePid;
  128. urlRequestInvoker.MakeAsyncRequestInIFrame( getLanguagesRequestURL, getLanguagesRequestPostParams );
  129. }
  130. function providerLangResultsReceived( providerLanguages )
  131. {
  132. var languagesList = providerLanguages.lang;
  133. var designLocaleList = document.getElementById( "designLanguage" );
  134. var selIndex = 0;
  135. for (var i = 0; i < languagesList.length; i++)
  136. {
  137. if (languagesList[i].localeId == IMPORTWIZARD.productLocale)
  138. selIndex = i;
  139. designLocaleList.options[i]=new Option(languagesList[i].localeName, languagesList[i].localeId);
  140. }
  141. designLocaleList.selectedIndex = selIndex;
  142. hideProgressIfShowing();
  143. //D_Progress.F_Hide();
  144. urlRequestInvoker.RequestFinished();
  145. // expand the root node
  146. //alert( "In providerLangResultsReceived( providerLanguages ).\n" );
  147. setTimeout( function(){
  148. var treeRootViewNode = G_App.m_oTreeViewCheckboxes.F_GetTreeViewNode();
  149. var node = treeRootViewNode.selectSingleNode( "treeNode" );
  150. G_App.expandNode(node);
  151. }, 700 );
  152. }
  153. function OnUseV5DataServerBtnClicked( sourceUseV5DataServerChkBox )
  154. {
  155. G_App.m_oTreeViewCheckboxes.F_Detach();
  156. G_App.initializeTreeViewCheckBox();
  157. }
  158. ImportWizard.prototype.checkDesignLocaleSelected = function(){
  159. var designLocaleList = document.getElementById( "designLanguage" );
  160. if (designLocaleList.selectedIndex < 0){
  161. return localizedStrings["MSR_SAP_designLocaleRequired"];
  162. }
  163. }
  164. G_App.initializeTreeViewCheckBox = function( )
  165. {
  166. //this.m_oTreeViewCheckboxes.F_Detach();
  167. this.m_treeViewNodesDoc = U_XML.F_CreateDocument();
  168. var treeViewElem = this.m_treeViewNodesDoc.appendChild( this.m_treeViewNodesDoc.createElement( 'treeView' ) );
  169. treeViewElem.setAttribute( "id", "TreeView" );
  170. treeViewElem.setAttribute( "showCheckboxes", "true" );
  171. this.PopulateTreeView_RootNode( this.m_treeViewNodesDoc, treeViewElem );
  172. this.m_oTreeViewCheckboxes = new C_TreeView( document.getElementById( "divTreeViewCheckboxes" ), treeViewElem, this );
  173. g_expandTreeLevel = 0;
  174. // expand the root node
  175. var treeRootViewNode = G_App.m_oTreeViewCheckboxes.F_GetTreeViewNode();
  176. var node = treeRootViewNode.selectSingleNode( "treeNode" );
  177. if (node != null)
  178. {
  179. setTimeout( function(){
  180. G_App.expandNode( node);
  181. }, 700 );
  182. }
  183. }
  184. function selectFirstItemInTreeControl()
  185. {
  186. var v_elSpanFirst = G_App.m_oTreeViewCheckboxes.F_GetFirstVisibleTreeItem();
  187. if ( v_elSpanFirst )
  188. {
  189. v_elSpanFirst.focus();
  190. }
  191. }
  192. G_App.F_ResManager_OnStringsLoaded = function( v_aFiles )
  193. {
  194. G_ResManager.F_LoadResources( [ WEB_CONTENT + "/mdsrv/res/EditVariablesResources.xml" ],this );
  195. };
  196. G_App.F_ResManager_OnResourcesLoaded = function( v_aFiles )
  197. {
  198. //LoadStrings is async call therefore load all the controls after G_ResManager.F_LoadStrings G_ResManager.F_LoadResources are completed. This change was done because the Treeview tries to access HAL string before it is loaded.
  199. this.initControls();
  200. }
  201. function retrieveImportSpec()
  202. {
  203. var getImportSpecRequestURL = GATEWAY_URL + "/metadataUIService";
  204. D_Progress.F_DisableCancel();
  205. D_Progress.F_Show( null, localizedStrings["MSR_SAP_Loading"] );
  206. var getImportSpecRequestPostParams = {};
  207. getImportSpecRequestPostParams["pid"] = "importWizard_ImportSpec_pid";
  208. getImportSpecRequestPostParams["packageLocation"] = IMPORTWIZARD.packageLocation;
  209. getImportSpecRequestPostParams["packageName"] = IMPORTWIZARD.packageName;
  210. getImportSpecRequestPostParams["error_pid"] = asyncErrorPagePid;
  211. IMPORTWIZARD.onResumeFromNonRecoverableError = function(){
  212. hideProgressIfShowing();
  213. }
  214. urlRequestInvoker.MakeAsyncRequestInIFrame( getImportSpecRequestURL, getImportSpecRequestPostParams );
  215. }
  216. function GenerateJSONString( obj )
  217. {
  218. var strObjJSON = "";
  219. for (var i in obj)
  220. {
  221. strObjJSON += "\t\t\"" + i + "\": ";
  222. strObjJSON += "\"" + obj[i] + "\",\n";
  223. }
  224. // The last comma must be removed, in order to have a syntactically correct JSON string.
  225. // Firefox doesn't care about this, but IE fails to work properly if this isn't done.
  226. var lastCommaIndex = strObjJSON.lastIndexOf( ',' );
  227. strObjJSON = "\t{\n" + strObjJSON.substr(0, lastCommaIndex ) + "\n\t}\n";
  228. // alert( "GenerateJSONString\n\n" + strObjJSON ); // Debugging
  229. return strObjJSON;
  230. }
  231. G_App.PopulateTreeView_RootNode = function( aDoc, treeViewElem )
  232. {
  233. var rootNodeElem = treeViewElem.appendChild( aDoc.createElement( "treeNode" ) );
  234. var nodeValueObj = {};
  235. nodeValueObj["type"] = kDatabaseTypeStr;
  236. nodeValueObj["uniqueName"] = kDatabaseTypeStr;
  237. var nodeIcon = GetIconFilePath( kDatabaseTypeStr );
  238. var nodeValue = GenerateJSONString( nodeValueObj );
  239. rootNodeElem.setAttribute( "value", nodeValue );
  240. rootNodeElem.setAttribute( "label", IMPORTWIZARD.dataSourceName);
  241. rootNodeElem.setAttribute( "smallIcon", nodeIcon );
  242. rootNodeElem.setAttribute( "expandedSmallIcon", nodeIcon );
  243. rootNodeElem.setAttribute( "expandable", "true" );
  244. rootNodeElem.setAttribute( "staticCheckbox", "true" );
  245. rootNodeElem.setAttribute( "role", "treeItem" );
  246. rootNodeElem.setAttribute( "tooltip", kDatabaseTypeStr );
  247. };
  248. function importSpecReceivedReceived( treeSnippet )
  249. {
  250. D_Progress.F_Hide();
  251. urlRequestInvoker.RequestFinished();
  252. G_App.m_oTreeViewCheckboxes.F_StartAsyncLoad();
  253. var aDoc = G_App.m_treeViewNodesDoc;
  254. var treeViewElem = G_App.m_oTreeViewCheckboxes.F_GetTreeViewNode();
  255. IMPORTWIZARD.dataSourceName = treeSnippet.node.Name; // In edit scenario we didn't know the ds name, so we populate it now
  256. PopulateTreeView( treeSnippet.node, aDoc, treeViewElem );
  257. G_App.m_oTreeViewCheckboxes.F_EndAsyncLoad( true /* v_bSucceeded */);
  258. selectFirstItemInTreeControl();
  259. }
  260. function SaveModifiedSettings()
  261. {
  262. var saveModifiedSettingsURL = GATEWAY_URL + "/metadataUIService";
  263. D_Progress.F_DisableCancel();
  264. D_Progress.F_Show( null, localizedStrings["MSR_SAP_Saving"]);
  265. var saveModifiedSettingsParams = {};
  266. saveModifiedSettingsParams["pid"] = "saveModifiedPackageSettings_pid";
  267. saveModifiedSettingsParams["searchPath"] = IMPORTWIZARD.packageLocation + "/package[@name=" + EncloseInQuotes( IMPORTWIZARD.packageName ) + "]/model";
  268. saveModifiedSettingsParams["property"] = "http://developer.cognos.com/ceba/constants/queryOptionEnum#mode";
  269. var ms_useV5DataServerCheckBox = document.getElementById( "ms_useV5DataServer" );
  270. if (ms_useV5DataServerCheckBox.checked)
  271. {
  272. saveModifiedSettingsParams["value"] = "http://developer.cognos.com/ceba/constants/queryModeEnum#dynamic"; // XQE
  273. }
  274. else
  275. {
  276. saveModifiedSettingsParams["value"] = "http://developer.cognos.com/ceba/constants/queryModeEnum#compatible"; // Legacy query stack
  277. }
  278. saveModifiedSettingsParams["error_pid"] = asyncErrorPagePid;
  279. urlRequestInvoker.MakeAsyncRequestInIFrame( saveModifiedSettingsURL, saveModifiedSettingsParams );
  280. }
  281. function OnSaveModifiedPackageSettingsRequestCompleted()
  282. {
  283. D_Progress.F_Hide();
  284. urlRequestInvoker.RequestFinished();
  285. window.location.replace( IMPORTWIZARD.backURL );
  286. }
  287. //
  288. // Populates the tree view based on data obtained from the server side
  289. // (through a JSP async call).
  290. // This data could be coming from either:
  291. // - the browse JSP (when expanding tree nodes for the first time)
  292. // - the import spec JSP (when editing an existing package)
  293. //
  294. function PopulateTreeView( treeViewNodeData, aDoc, treeViewElem )
  295. {
  296. var nodeLabel = treeViewNodeData.Name;
  297. var nodeType = treeViewNodeData.Type;
  298. var bIsNodeSelected = treeViewNodeData.Selected != null && treeViewNodeData.Selected != "false";
  299. var nodeValueObj = {};
  300. nodeValueObj["type"] = nodeType;
  301. nodeValueObj["uniqueName"] = (treeViewNodeData.uniqueName != null) ? treeViewNodeData.uniqueName : treeViewNodeData.Name;
  302. var nodeValue = GenerateJSONString( nodeValueObj );
  303. var nodeIcon = GetIconFilePath( nodeType );
  304. var nodeExpandedIcon = GetIconFilePath( nodeType );
  305. // var stateSmallIcon = "hal/images/icon_information_16x16.gif";
  306. //var bExpandable = (nodeType != kDimensionTypeStr && nodeType != kMeasureTypeStr);
  307. var bExpandable = (nodeType != kCubeTypeStr);
  308. var bHideCheckBox = (nodeType == kDimensionGroupTypeStr || nodeType == kDimensionTypeStr
  309. || nodeType == kMeasuresGroupTypeStr || nodeType == kMeasureTypeStr);
  310. //var bStaticCheckBox = (nodeType == kDatabaseTypeStr || nodeType == kCatalogTypeStr);
  311. var bStaticCheckBox = (nodeType != kCubeTypeStr);
  312. var bChecked = !bHideCheckBox && bIsNodeSelected;
  313. var nodeElem = treeViewElem.appendChild( aDoc.createElement( "treeNode" ) );
  314. nodeElem.setAttribute( "value", nodeValue );
  315. nodeElem.setAttribute( "label", nodeLabel );
  316. nodeElem.setAttribute( "smallIcon", nodeIcon );
  317. nodeElem.setAttribute( "expandedSmallIcon", nodeExpandedIcon );
  318. // nodeElem.setAttribute( "stateSmallIcon", stateSmallIcon );
  319. nodeElem.setAttribute( "tooltip", nodeType );
  320. nodeElem.setAttribute( "expandable", bExpandable ? "true" : "false" );
  321. nodeElem.setAttribute( "hideCheckbox", bHideCheckBox ? "true" : "false" );
  322. nodeElem.setAttribute( "staticCheckbox", bStaticCheckBox ? "true" : "false" );
  323. nodeElem.setAttribute( "checked", bChecked ? "true" : "false" );
  324. // testing code
  325. if (IMPORTWIZARD.enableTest)
  326. {
  327. if (nodeValueObj["uniqueName"] == IMPORTWIZARD.treeLevels[g_expandTreeLevel])
  328. {
  329. // remember treeViewNodeData
  330. g_viewNodeToExpand = nodeElem;
  331. }
  332. if (nodeValueObj["type"] == kCubeTypeStr)
  333. {
  334. if (nodeValueObj["uniqueName"] == IMPORTWIZARD.cubeToSelect)
  335. {
  336. nodeElem.setAttribute( "checked","true" );
  337. }
  338. }
  339. }
  340. // testing code end
  341. if (treeViewNodeData.children != null)
  342. {
  343. for (var i = 0; i < treeViewNodeData.children.length; i++)
  344. {
  345. PopulateTreeView( treeViewNodeData.children[i], aDoc, nodeElem );
  346. }
  347. }
  348. }
  349. /**
  350. * Used in edit mode, to pass to the browse JSP, the selected nodes recursively.
  351. */
  352. function ExtractSelectedTreeNodes( v_nTreeNode, nodePathEntry )
  353. {
  354. if (v_nTreeNode.childNodes != null && v_nTreeNode.childNodes.length > 0)
  355. {
  356. nodePathEntry.children = [];
  357. for (var i = 0; i < v_nTreeNode.childNodes.length; i++)
  358. {
  359. var childNodeName = v_nTreeNode.childNodes[i].getAttribute( "label" );
  360. var childNodeValue = v_nTreeNode.childNodes[i].getAttribute( "value" );
  361. var childNodeValueObj = eval( "(" + childNodeValue + ")" );
  362. var childNodeType = childNodeValueObj.type;
  363. var childNodeUniqueName = childNodeValueObj.uniqueName;
  364. nodePathEntry.children[i] = {};
  365. nodePathEntry.children[i]["uniqueName"] = childNodeUniqueName;
  366. nodePathEntry.children[i].Selected = "true";
  367. nodePathEntry.children[i].Type = childNodeType;
  368. nodePathEntry.children[i].Value = "false";
  369. nodePathEntry.children[i].Name = childNodeName;
  370. ExtractSelectedTreeNodes( v_nTreeNode.childNodes[i], nodePathEntry.children[i] );
  371. }
  372. }
  373. }
  374. var g_treeNodeBeingPopulated = null;
  375. var g_expandTreeLevel = 0; // used only for testing (does not expect collapsing the tree nodes)
  376. var g_viewNodeToExpand = null; // node to expand based on the provided drill down path
  377. G_App.F_TreeView_OnPopulateChildren = function( v_oTreeView, v_nTreeNode )
  378. {
  379. //
  380. // Disable the Finish button temporarily, to prevent 2 async calls from colliding in the same IFrame.
  381. //
  382. var finishButton = document.getElementById( "finishButton" );
  383. IMPORTWIZARD.isFinishButtonEnabled = IsButtonEnabled( finishButton );
  384. EnableButton( finishButton, false );// bEnable );
  385. var currentNode = v_nTreeNode;
  386. var nodePath = "";
  387. // The nodePath is being build back-wards
  388. do
  389. {
  390. var nodeName = currentNode.getAttribute( "label" );
  391. var nodeValue = currentNode.getAttribute( "value" );
  392. var nodeValueObj = eval( "(" + nodeValue + ")" );
  393. var nodeType = nodeValueObj.type;
  394. var nodeUniqueName = nodeValueObj.uniqueName;
  395. // if the node path is empty then we are at the beginning
  396. var bIsSelectedNode = (nodePath == "");
  397. var nodePathEntry = {};
  398. nodePathEntry.Name = nodeName;
  399. nodePathEntry.Type = nodeType;
  400. nodePathEntry.Value = "false";
  401. if (nodeType == kDatabaseTypeStr)
  402. {
  403. nodePathEntry.dbType = IMPORTWIZARD.dataSourceType; //save dbType in the ImportSpec just for FMMD to load DimImport for CQM packages
  404. }
  405. else
  406. {
  407. nodePathEntry.uniqueName = nodeUniqueName;
  408. }
  409. if (bIsSelectedNode)
  410. {
  411. nodePathEntry.Selected = "true";
  412. nodePathEntry.expansion = "true";
  413. ExtractSelectedTreeNodes( v_nTreeNode, nodePathEntry );
  414. }
  415. strNodePathEntry = JSON.stringify( nodePathEntry, null, "\t" );
  416. var nodePathEntryPostfix = (currentNode == v_nTreeNode) ? "\n" : ",\n";
  417. nodePath = strNodePathEntry + nodePathEntryPostfix + nodePath;
  418. currentNode = currentNode.parentNode;
  419. }
  420. while (currentNode != null && currentNode.tagName == "treeNode");
  421. nodePath = "{\"node\":[\n" + nodePath + "]}";
  422. g_treeNodeBeingPopulated = v_nTreeNode;
  423. var browseTreeRequestURL = GATEWAY_URL + "/metadataUIService";
  424. var browseTreeRequestPostParams = {};
  425. if (IMPORTWIZARD.enableTestNoDBConnection)
  426. browseTreeRequestPostParams["pid"] = "importWizard_GetTreeNodes_TEST_pid";
  427. else
  428. browseTreeRequestPostParams["pid"] = "importWizard_GetTreeNodes_pid";
  429. browseTreeRequestPostParams["connectionName"] = IMPORTWIZARD.dataSourceName;
  430. browseTreeRequestPostParams["nodePath"] = nodePath;
  431. browseTreeRequestPostParams["dataSourceCredentials"] = IMPORTWIZARD.credentials;
  432. browseTreeRequestPostParams["error_pid"] = asyncErrorPagePid;
  433. var useV5DataServerCheckBox = document.getElementById( "useV5DataServer" );
  434. browseTreeRequestPostParams["useV5DataServer"] = useV5DataServerCheckBox.checked ? "true" : "false";
  435. IMPORTWIZARD.onResumeFromRecoveredErrorHandler = function()
  436. {
  437. urlRequestInvoker.RequestFinished();
  438. G_App.m_oTreeViewCheckboxes.F_EndAsyncLoad( false );// v_bSucceeded );
  439. g_treeNodeBeingPopulated = null;
  440. if (this.retry)
  441. {
  442. this.retry = false;
  443. G_App.m_oTreeViewCheckboxes.F_ExpandNode(v_nTreeNode);
  444. }
  445. };
  446. IMPORTWIZARD.onResumeFromNonRecoverableError = function()
  447. {
  448. G_App.m_oTreeViewCheckboxes.F_EndAsyncLoad( false );// v_bSucceeded );
  449. g_treeNodeBeingPopulated = null;
  450. urlRequestInvoker.RequestFinished();
  451. }
  452. urlRequestInvoker.MakeAsyncRequestInIFrame( browseTreeRequestURL, browseTreeRequestPostParams );
  453. return true;
  454. };
  455. G_App.F_HAL_OnUnLoad = function()
  456. {
  457. this.m_oTreeViewCheckboxes.F_Detach();
  458. //this.m_oListViewCheckboxes.F_Detach();
  459. if (this.m_oPropertySheet != null)
  460. {
  461. this.m_oPropertySheet.F_Detach();
  462. }
  463. };
  464. G_App.F_ApplySkin = function( v_sSkin )
  465. {
  466. // Build the path to the appropriate skin css file
  467. var v_aSkin = v_sSkin.split( "|" );
  468. var v_sSkinName = v_aSkin[0];
  469. var v_sSkinType = v_aSkin[1];
  470. var v_sSkinPath = WEB_CONTENT + "/skins/" + v_sSkinName + "/hal/hal_portal_skin.css";
  471. var v_sSkinPath2 = WEB_CONTENT + "/skins/" + v_sSkinName + "/hal/hal_skin.css";
  472. // Remove existing link tag to skin css
  473. var v_nExistingCSSNode = document.getElementById( "idHALSkinCSS" );
  474. if ( v_nExistingCSSNode )
  475. {
  476. v_nExistingCSSNode.parentNode.removeChild( v_nExistingCSSNode );
  477. }
  478. // Create and append new link tag to skin css
  479. var v_elHead = document.getElementsByTagName( "head" )[0];
  480. var v_elLinkCSS = document.createElement( "link" );
  481. v_elLinkCSS.id = "idHALSkinCSS";
  482. v_elLinkCSS.type = "text/css";
  483. v_elLinkCSS.rel = "stylesheet";
  484. v_elLinkCSS.href = v_sSkinPath;
  485. v_elHead.appendChild( v_elLinkCSS );
  486. var v_elLinkCSS2 = document.createElement( "link" );
  487. v_elLinkCSS2.id = "idHALSkinCSS";
  488. v_elLinkCSS2.type = "text/css";
  489. v_elLinkCSS2.rel = "stylesheet";
  490. v_elLinkCSS2.href = v_sSkinPath2;
  491. v_elHead.appendChild( v_elLinkCSS2 );
  492. document.body.style.backgroundColor = ( v_sSkinType == "portal" ) ? "#FFFFFF" : "";
  493. // Set skin value in cookie
  494. var v_dateExpires = new Date();
  495. v_dateExpires.setUTCFullYear( v_dateExpires.getUTCFullYear() + 1 );
  496. U_CookieJar.F_SetCookie( "skin", v_sSkin, v_dateExpires );
  497. };
  498. G_App.F_Deck_OnBeforeCardVisible = function( v_oDeck, v_divNewCard, v_iOldCardIndex, v_iNewCardIndex )
  499. {
  500. };
  501. G_App.F_Deck_OnAfterCardVisible = function( v_oDeck, v_divNewCard, v_iOldCardIndex, v_iNewCardIndex )
  502. {
  503. if (v_oDeck == this.m_oDeck)
  504. {
  505. var pageTitles =
  506. [
  507. localizedStrings["MSR_SAP_selectObjectsTitle"],
  508. localizedStrings["MSR_SAP_selectLanguagesTitle"],
  509. localizedStrings["MSR_SAP_generateDimensionsTitle"]
  510. ];
  511. // var pageTitlePostfix = (IMPORTWIZARD.isEdit) ? " &nbsp; <i>[Edit Package Mode]</i>" : "";
  512. document.getElementById( "dialogHeaderTitle" ).innerHTML = pageTitles[v_iNewCardIndex];
  513. UpdateButtonsEnableStatus( v_iNewCardIndex );
  514. }
  515. };
  516. G_App.F_Back = function()
  517. {
  518. this.m_oDeck.F_Back();
  519. };
  520. G_App.F_TreeView_OnNodeCheck = function( v_oTreeView, v_nTreeNode )
  521. {
  522. };
  523. G_App.F_TreeView_OnNodeClick = function( v_oTreeView, v_nTreeNode, v_iMouseButton )
  524. {
  525. };
  526. G_App.F_TreeView_OnNodeDblClick = function( v_oTreeView, v_nTreeNode )
  527. {
  528. };
  529. function IsButtonEnabled( button )
  530. {
  531. return (button.className == "commandButton");
  532. }
  533. // Enables the button (if bEnable is true), or disables it (if bEnable is false).
  534. // It preserves and restores the OnClick and OnDblClick events properly.
  535. function EnableButton( button, bEnable )
  536. {
  537. var prevEnabledState = IsButtonEnabled( button );
  538. if (bEnable == true /*&& button.className == "commandButtonInactiveII"*/)
  539. {
  540. button.className = "commandButton";
  541. button.onmouseover = function( e ) { this.className = "commandButtonOver"; };
  542. button.onmouseout = function( e ) { this.className = "commandButton"; };
  543. button.onmousedown = function( e ) { this.className = "commandButton"; };
  544. button.onkeypress = handle_onkeydown;
  545. button.children[0].tabIndex = 0;
  546. if (prevEnabledState == false)
  547. {
  548. if (button.onclick_enabled != null)
  549. {
  550. button.onclick = button.onclick_enabled;
  551. }
  552. if (button.ondblclick_enabled != null)
  553. {
  554. button.ondblclick = button.ondblclick_enabled;
  555. }
  556. }
  557. }
  558. else if (bEnable == false)
  559. {
  560. button.className = "commandButtonInactiveII";
  561. button.onmouseover = null;
  562. button.onmouseout = null;
  563. button.onmousedown = null;
  564. button.onkeypress = null;
  565. button.children[0].tabIndex = -1;
  566. // preserve the previous event handlers
  567. if (prevEnabledState == true)
  568. {
  569. button.onclick_enabled = button.onclick;
  570. button.ondblclick_enabled = button.ondblclick;
  571. }
  572. button.onclick = "";
  573. button.ondblclick = "";
  574. }
  575. }
  576. function UpdateButtonsEnableStatus( cardIndex )
  577. {
  578. var prevButton = document.getElementById( "prevButton" );
  579. var bEnablePrevButton = (cardIndex != 0);
  580. if (bEnablePrevButton)
  581. {
  582. prevButton.onclick = function( e ) { G_App.F_Back(); };
  583. prevButton.ondblclick = function( e ) { G_App.F_Back(); };
  584. }
  585. EnableButton( prevButton, bEnablePrevButton );
  586. var finishButton = document.getElementById( "finishButton" );
  587. var bEnableFinishButton = (cardIndex == G_App.m_oDeck.F_GetNumberOfCards() - 1);
  588. if (bEnableFinishButton)
  589. {
  590. finishButton.onclick = function( e ) { WizardDone(); };
  591. finishButton.ondblclick = function( e ) { WizardDone(); };
  592. EnableButton( finishButton, bEnableFinishButton );
  593. }
  594. }
  595. function WizardDone()
  596. {
  597. // Build the importSpec object
  598. var treeNodesList = G_App.m_oTreeViewCheckboxes.F_GetCheckedNodes();
  599. if (treeNodesList.length == 0)
  600. {
  601. alert( "No objects have been selected for the import.\n\nImport action cancelled.\n" );
  602. return;
  603. }
  604. var treeNodesPaths = [];
  605. for (var n = 0; n < treeNodesList.length; n++)
  606. {
  607. var treeNode = treeNodesList.item( n );
  608. treeNodesPaths[n] = GetTreeNodePath( treeNode );
  609. }
  610. ConsolidateTree( treeNodesPaths, 0 /* referenceNodeIndex */ );
  611. if (treeNodesPaths.length != 1)
  612. {
  613. alert( "ASSERT FAILED: The number tree objects must be 1!\n\nIt is currently: " + treeNodesPaths.length );
  614. }
  615. // all nodes from treeNodesPaths[0] can have zero or one child !
  616. var curentNode = treeNodesPaths[0].children[0];
  617. while (curentNode.children != null)
  618. {
  619. curentNode = curentNode.children[0];
  620. }
  621. var importSpec = {};
  622. importSpec["node"] = [];
  623. importSpec["node"][0] = treeNodesPaths[0];
  624. var strImportSpec = JSON.stringify( importSpec, null, "\t" );
  625. // gets the cube name
  626. var cubeName = curentNode.Name;
  627. // Build the parameters object
  628. var useV5DataServerCheckBox = document.getElementById( "useV5DataServer" );
  629. var designLocaleCombo = document.getElementById("designLanguage");
  630. var parameters = {};
  631. parameters["params"] = {};
  632. parameters["params"]["UseV5DataServer"] = useV5DataServerCheckBox.checked ? "true" : "false";
  633. parameters["params"]["CubeName"] = cubeName;
  634. parameters["params"].designLocale = designLocaleCombo.options[designLocaleCombo.selectedIndex].value;
  635. var strParameters = JSON.stringify( parameters, null, "\t" );
  636. var pkgInfo = {};
  637. pkgInfo["pkgInfo"]={};
  638. pkgInfo["pkgInfo"]["Name"]=IMPORTWIZARD.packageName;
  639. pkgInfo["pkgInfo"]["Description"]=IMPORTWIZARD.packageDescription;
  640. pkgInfo["pkgInfo"]["ScreenTip"]=IMPORTWIZARD.packageScreentip;
  641. pkgInfo["pkgInfo"]["Location"]=IMPORTWIZARD.packageLocation;
  642. var strPkgInfo = JSON.stringify( pkgInfo, null, "\t" );
  643. IMPORTWIZARD.onResumeFromNonRecoverableError = function(){
  644. hideProgressIfShowing();
  645. }
  646. var importHelper = new ImportHelper(strImportSpec, strParameters, strPkgInfo);
  647. importHelper.runImport();
  648. D_Progress.F_DisableCancel();
  649. D_Progress.F_Show( null, localizedStrings["MSR_SAP_creatingPackage"] );
  650. }
  651. function hideProgressIfShowing()
  652. {
  653. if (D_Progress.F_IsActiveDialog())
  654. {
  655. // hide any progress that may be up
  656. D_Progress.F_Hide();
  657. }
  658. }
  659. function GetTreeNodePath( v_nTreeNode )
  660. {
  661. var currentNode = v_nTreeNode;
  662. var nodePathObj = {};
  663. var bIsLeaf = true;
  664. // The nodePath is being build back-wards
  665. do
  666. {
  667. var nodeLabel = currentNode.getAttribute( "label" );
  668. var nodeValue = currentNode.getAttribute( "value" );
  669. var nodeValueObj = eval( "(" + nodeValue + ")" );
  670. var nodeType = nodeValueObj.type;
  671. var nodeUniqueName = nodeValueObj.uniqueName;
  672. var nodeEntry = {};
  673. nodeEntry.Name = nodeLabel;
  674. nodeEntry.Type = nodeType;
  675. nodeEntry.Value = (nodeType == kDatabaseTypeStr || nodeType == kCatalogTypeStr) ? "partial" : "true";
  676. if (nodeType == kDatabaseTypeStr)
  677. {
  678. nodeEntry.dbType = IMPORTWIZARD.dataSourceType; //save dbType in the ImportSpec just for FMMD to load DimImport for CQM packages
  679. }
  680. else
  681. {
  682. nodeEntry.uniqueName = nodeUniqueName;
  683. }
  684. // if (nodePathObj != undefined)
  685. if (!bIsLeaf)
  686. {
  687. nodeEntry.children = [nodePathObj];
  688. }
  689. nodePathObj = nodeEntry;
  690. currentNode = currentNode.parentNode;
  691. bIsLeaf = false;
  692. }
  693. while (currentNode != null && currentNode.tagName == "treeNode");
  694. return nodePathObj;
  695. }
  696. // The first node in the array will end up containing the cosolidated tree nodes.
  697. function ConsolidateTree( treeNodesPaths, referenceNodeIndex )
  698. {
  699. // Consolidate the various trees (tree node paths) into a single unified tree.
  700. if (referenceNodeIndex < treeNodesPaths.length - 2)
  701. {
  702. ConsolidateTree( treeNodesPaths, referenceNodeIndex + 1);
  703. }
  704. // Traverse the list of nodes in reverse, to be able to remove elements on the fly.
  705. for (var n = treeNodesPaths.length - 1; n > (referenceNodeIndex); n--)
  706. {
  707. var firstTreeNode = treeNodesPaths[referenceNodeIndex];
  708. var currentTreeNode = treeNodesPaths[n];
  709. if (AreObjectsEqual( firstTreeNode, currentTreeNode, ["children"] ))
  710. {
  711. // var strTreeNodePathBEFORE = JSON.stringify( firstTreeNode, null, "\t" );
  712. // alert( "(BEFORE) same root node found\n\n\""
  713. /// + strTreeNodePathBEFORE);
  714. if (firstTreeNode.children == undefined || firstTreeNode.children == null)
  715. {
  716. firstTreeNode.children = currentTreeNode.children;
  717. }
  718. else
  719. {
  720. firstTreeNode.children = firstTreeNode.children.concat( currentTreeNode.children );
  721. }
  722. // node already processed; remove it from the collection.
  723. treeNodesPaths.splice( n, 1 );
  724. ConsolidateTree( firstTreeNode.children, 0 /* referenceNodeIndex */ );
  725. // var strTreeNodePathAFTER = JSON.stringify( firstTreeNode, null, "\t" );
  726. // alert( "(AFTER) same root node found\n\n\""
  727. // + strTreeNodePathAFTER);
  728. }
  729. }
  730. }
  731. G_App.F_OnCancel = function()
  732. {
  733. D_Progress.F_Hide();
  734. };
  735. function GetIconFilePath( objectType )
  736. {
  737. // hal/images/tv_folder.gif hal/images/tv_folder_expanded.gif
  738. //
  739. // This directory has all the images necessary:
  740. // C:\Program Files\cognos\c8.5.17.3_Colorado_2009-02-13\webcontent\pat\images
  741. var iconDirPath = WEB_CONTENT + "/mdsrv/importWizardUI/images/";
  742. //
  743. // This is NOT an associative array, but rather a HACK,
  744. // where the keys are actually elements of the object properties.
  745. //
  746. var iconMap = [];
  747. iconMap[kDatabaseTypeStr] = iconDirPath + "icon_data_source.gif";
  748. iconMap[kCatalogTypeStr] = iconDirPath + "icon_catalog.gif";
  749. iconMap[kCubeTypeStr] = iconDirPath + "icon_cube.gif";
  750. iconMap[kInfoQueryTypeStr] = iconDirPath + "icon_info_query.gif";
  751. iconMap[kDimensionGroupTypeStr] = iconDirPath + "icon_folder_dimensions.gif";
  752. iconMap[kDimensionTypeStr] = iconDirPath + "icon_dimension.gif";
  753. iconMap[kMeasuresGroupTypeStr] = iconDirPath + "icon_folder_measures.gif";
  754. iconMap[kMeasureTypeStr] = iconDirPath + "icon_measure.gif";
  755. iconMap["unknown"] = WEB_CONTENT + "/hal/images/btn_new.gif";
  756. var objectIconFilePath = iconMap[objectType];
  757. if (objectIconFilePath == null)
  758. {
  759. objectIconFilePath = iconMap["unknown"];
  760. }
  761. return objectIconFilePath;
  762. }
  763. function metadataTreeResultsReceived( treeSnippet )
  764. {
  765. if (g_treeNodeBeingPopulated == null)
  766. {
  767. return;
  768. }
  769. if (treeSnippet == null)
  770. {
  771. G_App.m_oTreeViewCheckboxes.F_EndAsyncLoad( true /* v_bSucceeded */ );
  772. g_treeNodeBeingPopulated = null;
  773. urlRequestInvoker.RequestFinished();
  774. return;
  775. }
  776. g_viewNodeToExpand = null;
  777. // This function will clear only the child nodes.
  778. G_App.m_oTreeViewCheckboxes.F_Clear( g_treeNodeBeingPopulated );
  779. for (var i = 0; i < treeSnippet.node.children.length; i++)
  780. {
  781. var aDoc = G_App.m_treeViewNodesDoc;
  782. PopulateTreeView( treeSnippet.node.children[i], aDoc, g_treeNodeBeingPopulated );
  783. }
  784. G_App.m_oTreeViewCheckboxes.F_EndAsyncLoad( true /* v_bSucceeded */ );
  785. g_treeNodeBeingPopulated = null;
  786. urlRequestInvoker.RequestFinished();
  787. //
  788. // Re-enable the Finish button
  789. //
  790. var finishButton = document.getElementById( "finishButton" );
  791. EnableButton( finishButton, IMPORTWIZARD.isFinishButtonEnabled /* bEnable */ );
  792. g_expandTreeLevel += 1;
  793. if (g_viewNodeToExpand != null)
  794. {
  795. setTimeout( function(){
  796. G_App.expandNode( g_viewNodeToExpand);
  797. }, 700 );
  798. }
  799. if (IMPORTWIZARD.enableTest == true)
  800. {
  801. if (g_expandTreeLevel == IMPORTWIZARD.treeLevels.length + 1)
  802. {
  803. setTimeout( function(){
  804. //G_App.F_Next();
  805. WizardDone();
  806. }, 700 );
  807. }
  808. }
  809. }
  810. function HandleException(jsonExceptionObj)
  811. {
  812. hideProgressIfShowing();
  813. var errorPageMgr = new ErrorPageManager();
  814. if (jsonExceptionObj.isQF)
  815. {
  816. document.getElementById( "main" ).style.display = "none";
  817. errorPageMgr.handleQF(jsonExceptionObj.faultDom, ErrorPageClosed);
  818. }
  819. else if (jsonExceptionObj.isCAM)
  820. {
  821. document.getElementById( "main" ).style.display = "none";
  822. errorPageMgr.handleCAM(jsonExceptionObj, ErrorPageClosed);
  823. }
  824. else
  825. {
  826. var msg = jsonExceptionObj.messageString;
  827. if (msg === "")
  828. {
  829. msg = localizedStrings["MSR_SAP_unknownErrorMessage"];
  830. }
  831. var stackTrace = jsonExceptionObj.stackTrace;
  832. stackTrace = unescape(stackTrace);
  833. document.getElementById( "main" ).style.display = "none";
  834. document.getElementById( "editSelection" ).style.display = "none"
  835. errorPageMgr.setupAndDisplayErrorPage(localizedStrings["MSR_SAP_errorPageTitle"], "",
  836. msg, stackTrace, ErrorPageClosed);
  837. }
  838. }
  839. function ErrorPageClosed(recovered)
  840. {
  841. document.getElementById("main").style.display = "block";
  842. // If its been recovered, then we presume that call back will occur at a later time
  843. if (IMPORTWIZARD.onResumeFromNonRecoverableError && !recovered){
  844. IMPORTWIZARD.onResumeFromNonRecoverableError();
  845. }
  846. }
  847. function launchFromEdit()
  848. {
  849. var selectMetadataRadioBtn = document.getElementById( "modifyMetadataSelections" );
  850. var editVariablesRadioBtn = document.getElementById( "editVariables" );
  851. var modifySettingsRadioBtn = document.getElementById( "modifySettings" );
  852. var editSelectionPage = document.getElementById( "editSelection" );
  853. if (selectMetadataRadioBtn.checked)
  854. {
  855. editSelectionPage.style.display = "none";
  856. var main = document.getElementById( "main" );
  857. main.style.display = "block";
  858. retrieveImportSpec();
  859. }
  860. else if (editVariablesRadioBtn.checked)
  861. {
  862. editSelectionPage.style.display = "none";
  863. OnShowVariables();
  864. }
  865. else if (modifySettingsRadioBtn.checked)
  866. {
  867. SaveModifiedSettings();
  868. }
  869. }
  870. function ImportHelper(importSpec, parameters, packageInfo)
  871. {
  872. this.m_importSpec = importSpec;
  873. this.m_parameters = parameters;
  874. this.m_packageInfo = packageInfo;
  875. }
  876. ImportHelper.prototype.runImport = function()
  877. {
  878. var importRequestURL = GATEWAY_URL + "/metadataUIService"
  879. this.m_requestId = new Date().getTime();
  880. var importRequestPostParams = {};
  881. if (IMPORTWIZARD.enableTestNoDBConnection)
  882. importRequestPostParams["pid"] = "OLAPImportWizard_Import_TEST_pid";
  883. else
  884. importRequestPostParams["pid"] = "OLAPImportWizard_Import_pid";
  885. importRequestPostParams["importSpec"] = this.m_importSpec;
  886. importRequestPostParams["parameters"] = this.m_parameters;
  887. importRequestPostParams["packageInfo"] = this.m_packageInfo;
  888. importRequestPostParams["requestId"] = this.m_requestId;
  889. importRequestPostParams["dataSourceCredentials"] = IMPORTWIZARD.credentials;
  890. importRequestPostParams["error_pid"] = asyncErrorPagePid;
  891. if (IMPORTWIZARD.enableTest == true)
  892. {
  893. importRequestPostParams["enableTest"] = "true";
  894. }
  895. urlRequestInvoker.MakeAsyncRequestInIFrame( importRequestURL, importRequestPostParams );
  896. }