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.

90 lines
3.9 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- © 2015 ABF OSIELL <http://osiell.com>
  3. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
  4. <odoo>
  5. <data>
  6. <record id="view_nsca_check_form" model="ir.ui.view">
  7. <field name="name">nsca.check.form</field>
  8. <field name="model">nsca.check</field>
  9. <field name="arch" type="xml">
  10. <form string="NSCA Check">
  11. <sheet>
  12. <group>
  13. <group string="NSCA Check">
  14. <field name="server_id"/>
  15. <field name="service"/>
  16. <label for="interval_number"
  17. string="Frequency"/>
  18. <div>
  19. <field name="interval_number"
  20. class="oe_inline"/>
  21. <field name="interval_type"
  22. class="oe_inline"/>
  23. </div>
  24. <field name="nextcall"/>
  25. <field name="active"/>
  26. </group>
  27. <group string="Settings">
  28. <field name="nsca_model"/>
  29. <field name="nsca_function"/>
  30. <field name="nsca_args" widget="ace" options="{'mode': 'python'}" />
  31. <field name="allow_void_result"/>
  32. <div colspan="2">
  33. <p>The method must return a tuple (RC,
  34. MESSAGE) where RC is an integer:
  35. </p>
  36. <newline/>
  37. <ul>
  38. <li>0: OK</li>
  39. <li>1: WARNING</li>
  40. <li>2: CRITICAL</li>
  41. <li>3: UNKNOWN</li>
  42. </ul>
  43. <newline/>
  44. <p>Any other RC value will be treated as
  45. CRITICAL.
  46. </p>
  47. <p>E.g.
  48. <em>(1, u"3 mails not sent")</em>
  49. </p>
  50. </div>
  51. </group>
  52. </group>
  53. </sheet>
  54. </form>
  55. </field>
  56. </record>
  57. <record id="view_nsca_check_tree" model="ir.ui.view">
  58. <field name="name">nsca.check.tree</field>
  59. <field name="model">nsca.check</field>
  60. <field name="arch" type="xml">
  61. <tree string="NSCA Checks" colors="gray: active==False">
  62. <field name="service"/>
  63. <field name="server_id"/>
  64. <field name="nextcall"/>
  65. <field name="active"/>
  66. </tree>
  67. </field>
  68. </record>
  69. <record model="ir.actions.act_window" id="action_nsca_check_tree">
  70. <field name="name">Checks</field>
  71. <field name="type">ir.actions.act_window</field>
  72. <field name="res_model">nsca.check</field>
  73. <field name="view_type">form</field>
  74. <field name="view_id" ref="view_nsca_check_tree"/>
  75. <field name="context" eval="{'default_active': True}"/>
  76. <field name="domain">['|', ('active', '=', True), ('active', '=',
  77. False)]
  78. </field>
  79. </record>
  80. <menuitem id="menu_action_nsca_check_tree"
  81. parent="menu_nsca_client"
  82. action="action_nsca_check_tree"/>
  83. </data>
  84. </odoo>