Skip to content

Commit

Permalink
Merge pull request #1277 from avoinsystems/11.0-mig-dead_mans_switch_…
Browse files Browse the repository at this point in the history
…client

[11.0][MIG] dead_mans_switch_client
  • Loading branch information
pedrobaeza committed Feb 6, 2019
2 parents 0d8bd6d + a748e4a commit e72385b
Show file tree
Hide file tree
Showing 79 changed files with 3,252 additions and 0 deletions.
75 changes: 75 additions & 0 deletions dead_mans_switch_client/README.rst
@@ -0,0 +1,75 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

==========================
Dead man's switch (client)
==========================

This module is the client part of `dead_mans_switch_server`. It is responsible
of sending the server status updates, which in turn takes action if those
updates don't come in time.

Configuration
=============

After installing this module, you need to fill in the system parameter
``dead_mans_switch_client.url``. This must be the full URL to the server's
controller, usually of the form ``https://your.server/dead_mans_switch/alive``.

This module attempts to send CPU and RAM statistics to the server. While this
is not mandatory, it's helpful for assessing a server's health. If you want
this, you need to install ``psutil``.

You can also have the number of currently online users logged, but this only
works if the ``bus`` module is installed and longpolling configured correctly.

Usage
=====

This module doesn't have any visible effect on the client.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/149/10.0

For further information, please visit:

* https://www.odoo.com/forum/help-1

Known issues / Roadmap
======================

* certificate pinning would be nice

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/server-tools/issues/new?body=module:%20dead_mans_switch_client%0Aversion:%209.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Credits
=======

Contributors
------------

* Holger Brunn <hbrunn@therp.nl>
* Jairo Llopis <yajo.sk8@gmail.com>
* Miku Laitinen <miku@avoin.systems>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.
3 changes: 3 additions & 0 deletions dead_mans_switch_client/__init__.py
@@ -0,0 +1,3 @@
# © 2015 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models
23 changes: 23 additions & 0 deletions dead_mans_switch_client/__manifest__.py
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Therp BV <http://therp.nl>
# © 2017 Avoin.Systems - Miku Laitinen
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Dead man's switch (client)",
"version": "11.0.1.0.0",
"author": "Therp BV, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Monitoring",
"summary": "Be notified when customers' Odoo instances go down",
"depends": [
'base',
],
"data": [
"data/ir_actions.xml",
"data/ir_cron.xml",
],
"demo": [
"demo/dead_mans_switch_client_demo.yml",
],
'installable': True,
}
10 changes: 10 additions & 0 deletions dead_mans_switch_client/data/ir_actions.xml
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<act_window id="action_setup" res_model="ir.config_parameter"
name="Configure the dead man's switch server" view_mode="form"
context="{'default_key': 'dead_mans_switch_client.url'}"/>
<record id="todo_setup" model="ir.actions.todo">
<field name="name">Configure the dead man's switch server</field>
<field name="action_id" ref="action_setup"/>
</record>
</odoo>
12 changes: 12 additions & 0 deletions dead_mans_switch_client/data/ir_cron.xml
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo noupdate="1">
<record id="cron_client" model="ir.cron">
<field name="name">Dead man&apos;s switch client</field>
<field name="interval_number">5</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="model_id" ref="dead_mans_switch_client.model_dead_mans_switch_client"/>
<field name="state">code</field>
<field name="code">model.alive()</field>
</record>
</odoo>
5 changes: 5 additions & 0 deletions dead_mans_switch_client/demo/dead_mans_switch_client_demo.yml
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

- !function {model: dead.mans.switch.client, name: _install_default_url}
44 changes: 44 additions & 0 deletions dead_mans_switch_client/i18n/am.po
@@ -0,0 +1,44 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * dead_mans_switch_client
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-10 02:53+0000\n"
"PO-Revision-Date: 2016-09-10 02:53+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Amharic (https://www.transifex.com/oca/teams/23907/am/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: am\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. module: dead_mans_switch_client
#: model:ir.actions.act_window,name:dead_mans_switch_client.action_setup
msgid "Configure the dead man's switch server"
msgstr ""

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client_display_name
msgid "Display Name"
msgstr ""

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client_id
msgid "ID"
msgstr "ID"

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client___last_update
msgid "Last Modified on"
msgstr ""

#. module: dead_mans_switch_client
#: model:ir.model,name:dead_mans_switch_client.model_dead_mans_switch_client
msgid "dead.mans.switch.client"
msgstr ""
44 changes: 44 additions & 0 deletions dead_mans_switch_client/i18n/ar.po
@@ -0,0 +1,44 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * dead_mans_switch_client
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-16 02:17+0000\n"
"PO-Revision-Date: 2017-12-16 02:17+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ar\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"

#. module: dead_mans_switch_client
#: model:ir.actions.act_window,name:dead_mans_switch_client.action_setup
msgid "Configure the dead man's switch server"
msgstr ""

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client_display_name
msgid "Display Name"
msgstr "اسم العرض"

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client_id
msgid "ID"
msgstr "المعرف"

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client___last_update
msgid "Last Modified on"
msgstr "آخر تعديل في"

#. module: dead_mans_switch_client
#: model:ir.model,name:dead_mans_switch_client.model_dead_mans_switch_client
msgid "dead.mans.switch.client"
msgstr ""
44 changes: 44 additions & 0 deletions dead_mans_switch_client/i18n/bg.po
@@ -0,0 +1,44 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * dead_mans_switch_client
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-16 02:17+0000\n"
"PO-Revision-Date: 2017-12-16 02:17+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Bulgarian (https://www.transifex.com/oca/teams/23907/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: dead_mans_switch_client
#: model:ir.actions.act_window,name:dead_mans_switch_client.action_setup
msgid "Configure the dead man's switch server"
msgstr ""

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client_display_name
msgid "Display Name"
msgstr "Име за Показване"

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client_id
msgid "ID"
msgstr "ID"

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client___last_update
msgid "Last Modified on"
msgstr "Последно обновено на"

#. module: dead_mans_switch_client
#: model:ir.model,name:dead_mans_switch_client.model_dead_mans_switch_client
msgid "dead.mans.switch.client"
msgstr ""
44 changes: 44 additions & 0 deletions dead_mans_switch_client/i18n/bs.po
@@ -0,0 +1,44 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * dead_mans_switch_client
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-16 02:17+0000\n"
"PO-Revision-Date: 2017-12-16 02:17+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Bosnian (https://www.transifex.com/oca/teams/23907/bs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: bs\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"

#. module: dead_mans_switch_client
#: model:ir.actions.act_window,name:dead_mans_switch_client.action_setup
msgid "Configure the dead man's switch server"
msgstr ""

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client_display_name
msgid "Display Name"
msgstr "Prikaži naziv"

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client_id
msgid "ID"
msgstr "ID"

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client___last_update
msgid "Last Modified on"
msgstr "Zadnje mijenjano"

#. module: dead_mans_switch_client
#: model:ir.model,name:dead_mans_switch_client.model_dead_mans_switch_client
msgid "dead.mans.switch.client"
msgstr ""
44 changes: 44 additions & 0 deletions dead_mans_switch_client/i18n/ca.po
@@ -0,0 +1,44 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * dead_mans_switch_client
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-16 02:17+0000\n"
"PO-Revision-Date: 2017-12-16 02:17+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: dead_mans_switch_client
#: model:ir.actions.act_window,name:dead_mans_switch_client.action_setup
msgid "Configure the dead man's switch server"
msgstr ""

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client_display_name
msgid "Display Name"
msgstr "Veure el nom"

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client_id
msgid "ID"
msgstr "ID"

#. module: dead_mans_switch_client
#: model:ir.model.fields,field_description:dead_mans_switch_client.field_dead_mans_switch_client___last_update
msgid "Last Modified on"
msgstr "Darrera modificació el"

#. module: dead_mans_switch_client
#: model:ir.model,name:dead_mans_switch_client.model_dead_mans_switch_client
msgid "dead.mans.switch.client"
msgstr ""

0 comments on commit e72385b

Please sign in to comment.