You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
7.2 KiB

  1. <odoo>
  2. <record model="ir.ui.view" id="view_profile_list">
  3. <field name="name">view profile list</field>
  4. <field name="model">profiler.profile</field>
  5. <field name="arch" type="xml">
  6. <tree>
  7. <field name="name"/>
  8. <field name="enable_python"/>
  9. <field name="use_py_index"/>
  10. <field name="enable_postgresql"/>
  11. <field name="date_started"/>
  12. <field name="date_finished"/>
  13. <field name="state"/>
  14. </tree>
  15. </field>
  16. </record>
  17. <record model="ir.ui.view" id="view_profiling_lines">
  18. <field name="name">view profiling_lines</field>
  19. <field name="model">profiler.profile.python.line</field>
  20. <field name="arch" type="xml">
  21. <tree>
  22. <field name="cprof_ncalls"/>
  23. <field name="cprof_nrcalls"/>
  24. <field name="cprof_tottime"/>
  25. <field name="cprof_ttpercall"/>
  26. <field name="cprof_cumtime"/>
  27. <field name="cprof_ctpercall"/>
  28. <field name="cprof_fname"/>
  29. </tree>
  30. </field>
  31. </record>
  32. <record id="view_profiling_lines_search" model="ir.ui.view">
  33. <field name="name">view.profiling.lines.search</field>
  34. <field name="model">profiler.profile.python.line</field>
  35. <field name="arch" type="xml">
  36. <search string="Search Profiling lines">
  37. <field name="profile_id"/>
  38. <field name="cprof_fname"/>
  39. </search>
  40. </field>
  41. </record>
  42. <record id="action_view_profiling_lines" model="ir.actions.act_window">
  43. <field name="name">Profiling lines</field>
  44. <field name="res_model">profiler.profile.python.line</field>
  45. <field name="view_type">form</field>
  46. <field name="view_mode">tree,form</field>
  47. <field eval="False" name="view_id"/>
  48. <field name="domain">[]</field>
  49. <field name="context">{}</field>
  50. </record>
  51. <record model="ir.ui.view" id="view_profile_form">
  52. <field name="name">view profile form</field>
  53. <field name="model">profiler.profile</field>
  54. <field name="arch" type="xml">
  55. <form string="Profile">
  56. <header>
  57. <button name="enable" string="Enable" type="object"
  58. groups="base.group_system" states="disabled"/>
  59. <button name="disable" string="Disable" type="object"
  60. groups="base.group_system" states="enabled"/>
  61. <button name="clear" string="Clear" type="object"
  62. groups="base.group_system" states="enabled"/>
  63. <field name="state" widget="statusbar" statusbar_visible="disabled,enabled"/>
  64. </header>
  65. <sheet>
  66. <div class="oe_button_box" name="button_box">
  67. <button name="%(action_view_profiling_lines)s"
  68. type="action" string="View profiling lines"
  69. class="oe_stat_button"
  70. icon="fa-share-square-o"
  71. context="{'search_default_profile_id': active_id, 'default_profile_id': active_id}"
  72. attrs="{'invisible': ['|', ('enable_python', '=', False), ('date_finished', '=', False)]}">
  73. </button>
  74. <button name="action_view_attachment"
  75. type="object"
  76. class="oe_stat_button"
  77. icon="fa-pencil-square-o"
  78. attrs="{'invisible': [('attachment_count', '=', 0)]}">
  79. <field name="attachment_count" widget="statinfo" string="Attachments"/>
  80. </button>
  81. </div>
  82. <div class="oe_title">
  83. <h1>
  84. <field name="name"/>
  85. </h1>
  86. </div>
  87. <group>
  88. <group>
  89. <field name="enable_python" attrs="{'readonly': [('state','=', 'enabled')]}"/>
  90. <field name="use_py_index"/>
  91. </group>
  92. <group>
  93. <field name="enable_postgresql" attrs="{'readonly': [('state','=', 'enabled')]}"/>
  94. <field name="pg_log_path"/>
  95. <field name="pg_remote"/>
  96. </group>
  97. <group>
  98. <field name="date_started"/>
  99. <field name="date_finished"/>
  100. </group>
  101. <group colspan="4">
  102. <field name="description" nolabel="1"/>
  103. </group>
  104. </group>
  105. <notebook>
  106. <page string="PostgreSQL Stats - Slowest" attrs="{'invisible': ['|', ('enable_postgresql', '=', False), ('date_finished', '=', False)]}">
  107. <field name="pg_stats_slowest_html" nolabel="1" colspan="4"/>
  108. </page>
  109. <page string="PostgreSQL Stats - Time Consuming" attrs="{'invisible': ['|', ('enable_postgresql', '=', False), ('date_finished', '=', False)]}">
  110. <field name="pg_stats_time_consuming_html" nolabel="1" colspan="4"/>
  111. </page>
  112. <page string="PostgreSQL Stats - Most Frequent" attrs="{'invisible': ['|', ('enable_postgresql', '=', False), ('date_finished', '=', False)]}">
  113. <field name="pg_stats_most_frequent_html" nolabel="1" colspan="4"/>
  114. </page>
  115. <page string="Python Stats - Profiling Lines" attrs="{'invisible': ['|', ('enable_python', '=', False), ('date_finished', '=', False)]}">
  116. <field name="py_stats_lines" nolabel="1" colspan="4">
  117. <tree>
  118. <field name="cprof_ncalls"/>
  119. <field name="cprof_nrcalls"/>
  120. <field name="cprof_tottime"/>
  121. <field name="cprof_ttpercall"/>
  122. <field name="cprof_cumtime"/>
  123. <field name="cprof_ctpercall"/>
  124. <field name="cprof_fname"/>
  125. </tree>
  126. </field>
  127. </page>
  128. </notebook>
  129. </sheet>
  130. </form>
  131. </field>
  132. </record>
  133. <record model="ir.actions.act_window" id="profile_action_window">
  134. <field name="name">Profiler</field>
  135. <field name="res_model">profiler.profile</field>
  136. <field name="view_mode">tree,form</field>
  137. </record>
  138. <menuitem name="Profiler" id="menu_profiler_root" web_icon="profiler,static/description/icon.png"/>
  139. <menuitem name="Profiler" id="menu_profiler" parent="menu_profiler_root"/>
  140. <menuitem name="Profile" id="menu_profile" parent="menu_profiler"
  141. action="profile_action_window"/>
  142. </odoo>