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.

103 lines
5.3 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_profile_form">
  18. <field name="name">view profile form</field>
  19. <field name="model">profiler.profile</field>
  20. <field name="arch" type="xml">
  21. <form string="Profile">
  22. <header>
  23. <button name="enable" string="Enable" type="object"
  24. groups="base.group_system" states="disabled"/>
  25. <button name="disable" string="Disable" type="object"
  26. groups="base.group_system" states="enabled"/>
  27. <button name="clear" string="Clear" type="object"
  28. groups="base.group_system" states="enabled"/>
  29. <field name="state" widget="statusbar" statusbar_visible="disabled,enabled"/>
  30. </header>
  31. <sheet>
  32. <div class="oe_button_box" name="button_box">
  33. <button name="action_view_attachment"
  34. type="object"
  35. class="oe_stat_button"
  36. icon="fa-pencil-square-o"
  37. attrs="{'invisible': [('attachment_count', '=', 0)]}">
  38. <field name="attachment_count" widget="statinfo" string="Attachments"/>
  39. </button>
  40. </div>
  41. <div class="oe_title">
  42. <h1>
  43. <field name="name"/>
  44. </h1>
  45. </div>
  46. <group>
  47. <group>
  48. <field name="enable_python" attrs="{'readonly': [('state','=', 'enabled')]}"/>
  49. <field name="use_py_index"/>
  50. </group>
  51. <group>
  52. <field name="enable_postgresql" attrs="{'readonly': [('state','=', 'enabled')]}"/>
  53. <field name="pg_log_path"/>
  54. <field name="pg_remote"/>
  55. </group>
  56. <group>
  57. <field name="date_started"/>
  58. <field name="date_finished"/>
  59. </group>
  60. <group colspan="4">
  61. <field name="description" nolabel="1"/>
  62. </group>
  63. </group>
  64. <notebook>
  65. <page string="PostgreSQL Stats - Slowest" attrs="{'invisible': ['|', ('enable_postgresql', '=', False), ('date_finished', '=', False)]}">
  66. <field name="pg_stats_slowest_html" nolabel="1" colspan="4"/>
  67. </page>
  68. <page string="PostgreSQL Stats - Time Consuming" attrs="{'invisible': ['|', ('enable_postgresql', '=', False), ('date_finished', '=', False)]}">
  69. <field name="pg_stats_time_consuming_html" nolabel="1" colspan="4"/>
  70. </page>
  71. <page string="PostgreSQL Stats - Most Frequent" attrs="{'invisible': ['|', ('enable_postgresql', '=', False), ('date_finished', '=', False)]}">
  72. <field name="pg_stats_most_frequent_html" nolabel="1" colspan="4"/>
  73. </page>
  74. <page string="Python Stats - Profiling Lines" attrs="{'invisible': ['|', ('enable_python', '=', False), ('date_finished', '=', False)]}">
  75. <field name="py_stats_lines" nolabel="1" colspan="4">
  76. <tree>
  77. <field name="cprof_ncalls"/>
  78. <field name="cprof_nrcalls"/>
  79. <field name="cprof_tottime"/>
  80. <field name="cprof_ttpercall"/>
  81. <field name="cprof_cumtime"/>
  82. <field name="cprof_ctpercall"/>
  83. <field name="cprof_fname"/>
  84. </tree>
  85. </field>
  86. </page>
  87. </notebook>
  88. </sheet>
  89. </form>
  90. </field>
  91. </record>
  92. <record model="ir.actions.act_window" id="profile_action_window">
  93. <field name="name">Profiler</field>
  94. <field name="res_model">profiler.profile</field>
  95. <field name="view_mode">tree,form</field>
  96. </record>
  97. <menuitem name="Profiler" id="menu_profiler_root" web_icon="profiler,static/description/icon.png"/>
  98. <menuitem name="Profiler" id="menu_profiler" parent="menu_profiler_root"/>
  99. <menuitem name="Profile" id="menu_profile" parent="menu_profiler"
  100. action="profile_action_window"/>
  101. </odoo>