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.

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