C_QanLog_BoxView.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /****************************************************************************************************************************
  2. Licensed Materials - Property of IBM
  3. BI and PM: QFW
  4. © Copyright IBM Corp. 2005, 2010
  5. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6. *****************************************************************************************************************************/
  7. function C_QanLog_BoxView( iLog )
  8. {
  9. this.m_iLog = iLog;
  10. this.m_divLogContainer = G_QanApp.F_GetElementInLoggingView( "log_" + this.m_iLog );
  11. this.m_divEPContainers = [];
  12. this.m_divEPViews = [];
  13. }
  14. C_QanLog_BoxView.prototype.F_Init = function()
  15. {
  16. this.F_GetNodeDetailsContainer();
  17. this.F_GetView( "Execution Plan" );
  18. this.F_GetView( "Data Flow" );
  19. G_QanApp.F_GetLoggingView().setLogItemPresentation( "Data Flow", this.m_divLogContainer );
  20. this.F_GetExecPlanPropertyPane();
  21. }
  22. C_QanLog_BoxView.prototype.F_GetExecutionTreeContainer = function()
  23. {
  24. this.F_GetView( "Data Flow" );
  25. }
  26. C_QanLog_BoxView.prototype.f_initTreeContainer = function( sTreeType, sTreeTypeShort )
  27. {
  28. G_QanApp.m_executionTreeViews.push( v_oPlanTreeView );
  29. }
  30. C_QanLog_BoxView.prototype.F_GetView = function( sTreeType )
  31. {
  32. if( this.m_divEPContainers[sTreeType] )
  33. return this.m_divEPContainers[sTreeType];
  34. var v_sTreeTypeShort;
  35. var v_oPlanTreeView;
  36. if( sTreeType == "Execution Plan" )
  37. {
  38. v_sTreeTypeShort = "EP";
  39. v_oPlanTreeView = new C_QanExecPlan_TreeView( G_QanApp.F_GetExecutionTree(this.m_iLog) );
  40. }
  41. else if( sTreeType == "Data Flow" )
  42. {
  43. v_sTreeTypeShort = "DF";
  44. v_oPlanTreeView = new C_QanExecFlow_TreeView( G_QanApp.F_GetExecutionTree(this.m_iLog) );
  45. }
  46. else if( sTreeType == "Full Log" )
  47. {
  48. v_sTreeTypeShort = "FL";
  49. v_oPlanTreeView = new C_QanLog_FullView( this.m_iLog );
  50. }
  51. else
  52. return;
  53. var v_divEPContainer = this.f_createTreeContainer(sTreeType, v_sTreeTypeShort);
  54. v_oPlanTreeView.F_Init( v_divEPContainer,
  55. G_QanApp.F_GetElementInLoggingView("tempTreeContainer") );
  56. this.m_divEPContainers[sTreeType] = v_divEPContainer;
  57. this.m_divEPViews[sTreeType] = v_oPlanTreeView;
  58. }
  59. C_QanLog_BoxView.prototype.f_createTreeContainer = function( sTreeType, sTreeTypeShort )
  60. {
  61. var v_sId = "log" + sTreeTypeShort + "_" + this.m_iLog;
  62. var v_divEPContainer = G_QanApp.F_GetElementInLoggingView( v_sId );
  63. if( v_divEPContainer )
  64. {
  65. this.m_divEPContainers[sTreeType] = v_divEPContainer;
  66. return v_divEPContainer;
  67. }
  68. if( !this.m_divLogContainer )
  69. return;
  70. v_divEPContainer = this.m_divLogContainer.document.createElement( "DIV" );
  71. v_divEPContainer.className = "planTree " + sTreeTypeShort;
  72. v_divEPContainer.id = v_sId;
  73. v_divEPContainer.presentation = sTreeType;
  74. this.m_divLogContainer.insertBefore(
  75. v_divEPContainer, this.m_divLogContainer.children[2] );
  76. this.m_divEPContainers[sTreeType] = v_divEPContainer;
  77. return v_divEPContainer;
  78. }
  79. C_QanLog_BoxView.prototype.F_ShowPresentation = function( v_sPresentationType )
  80. {
  81. }
  82. C_QanLog_BoxView.prototype.F_GetNodeDetailsContainer = function()
  83. {
  84. if( this.m_divDetailsContainer )
  85. return this.m_divDetailsContainer;
  86. if( !this.m_divLogContainer )
  87. return;
  88. this.m_divDetailsContainer = this.m_divLogContainer.document.createElement( "DIV" );
  89. this.m_divLogContainer.appendChild( this.m_divDetailsContainer );
  90. this.m_divDetailsContainer.className = "planNodeDetails";
  91. this.m_divDetailsContainer.presentation = "Execution Plan; Data Flow";
  92. return this.m_divDetailsContainer;
  93. }
  94. C_QanLog_BoxView.prototype.F_GetExecPlanPropertyPane = function()
  95. {
  96. if( this.m_oPropertyPane )
  97. return this.m_oPropertyPane;
  98. this.m_oPropertyPane = new C_QanEPNode_PropPane( this.F_GetNodeDetailsContainer() );
  99. this.m_oPropertyPane.F_Init();
  100. return this.m_oPropertyPane;
  101. }