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.

79 lines
3.0 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. <openerp>
  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 col="4">
  13. <group string="NSCA Check">
  14. <field name="server_id"/>
  15. <field name="service"/>
  16. <label for="interval_number" string="Frequency"/>
  17. <div>
  18. <field name="interval_number" class="oe_inline"/>
  19. <field name="interval_type" class="oe_inline"/>
  20. </div>
  21. <field name="nextcall"/>
  22. <field name="active"/>
  23. </group>
  24. <group string="Settings">
  25. <field name="nsca_model"/>
  26. <field name="nsca_function"/>
  27. <field name="nsca_args"/>
  28. <field name="allow_void_result"/>
  29. <div colspan="2">
  30. <p>The method must return a tuple (RC, MESSAGE) where RC is an integer:</p>
  31. <newline/>
  32. <ul>
  33. <li>0: OK</li>
  34. <li>1: WARNING</li>
  35. <li>2: CRITICAL</li>
  36. <li>3: UNKNOWN</li>
  37. </ul>
  38. <newline/>
  39. <p>Any other RC value will be treated as CRITICAL.</p>
  40. <p>E.g. <em>(1, u"3 mails not sent")</em></p>
  41. </div>
  42. </group>
  43. </group>
  44. </sheet>
  45. </form>
  46. </field>
  47. </record>
  48. <record id="view_nsca_check_tree" model="ir.ui.view">
  49. <field name="name">nsca.check.tree</field>
  50. <field name="model">nsca.check</field>
  51. <field name="arch" type="xml">
  52. <tree string="NSCA Checks" colors="gray: active==False">
  53. <field name="service"/>
  54. <field name="server_id"/>
  55. <field name="nextcall"/>
  56. <field name="active"/>
  57. </tree>
  58. </field>
  59. </record>
  60. <record model="ir.actions.act_window" id="action_nsca_check_tree">
  61. <field name="name">Checks</field>
  62. <field name="type">ir.actions.act_window</field>
  63. <field name="res_model">nsca.check</field>
  64. <field name="view_type">form</field>
  65. <field name="view_id" ref="view_nsca_check_tree"/>
  66. <field name="context" eval="{'default_active': True}"/>
  67. <field name="domain">['|', ('active', '=', True), ('active', '=', False)]</field>
  68. </record>
  69. <menuitem id="menu_action_nsca_check_tree"
  70. parent="menu_nsca_client"
  71. action="action_nsca_check_tree"/>
  72. </data>
  73. </openerp>