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.

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