Tower: upload cetmix_tower_server 18.0.2.0.0 (was 18.0.2.0.0, via marketplace)
This commit is contained in:
211
addons/cetmix_tower_server/views/cx_tower_command_log_view.xml
Normal file
211
addons/cetmix_tower_server/views/cx_tower_command_log_view.xml
Normal file
@@ -0,0 +1,211 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_command_log_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.command.log.view.form</field>
|
||||
<field name="model">cx.tower.command.log</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Running"
|
||||
bg_color="bg-info"
|
||||
invisible="not is_running"
|
||||
/>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Finished"
|
||||
invisible="is_running or not is_running and command_status != 0"
|
||||
/>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Failed"
|
||||
bg_color="bg-danger"
|
||||
invisible="is_running or not is_running and command_status in [0, -205]"
|
||||
/>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Skipped"
|
||||
bg_color="bg-dark"
|
||||
invisible="is_running or not is_running and command_status != -205"
|
||||
/>
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<field name="is_skipped" invisible="1" />
|
||||
<field name="create_uid" />
|
||||
<field name="server_id" />
|
||||
<field name="jet_id" invisible="not jet_id" />
|
||||
<field
|
||||
name="jet_template_id"
|
||||
invisible="not jet_template_id"
|
||||
/>
|
||||
<field name="waypoint_id" invisible="not waypoint_id" />
|
||||
<field name="command_id" />
|
||||
<field name="command_action" invisible="1" />
|
||||
<field
|
||||
name="condition"
|
||||
invisible="not condition"
|
||||
widget="ace"
|
||||
options="{'mode': 'python'}"
|
||||
/>
|
||||
<field name="path" invisible="not path" />
|
||||
<field name="is_running" invisible="not is_running" />
|
||||
<field name="use_sudo" invisible="not use_sudo" />
|
||||
<field
|
||||
name="plan_log_id"
|
||||
invisible="context.get('opened_from_plan', False)"
|
||||
/>
|
||||
<field
|
||||
name="triggered_plan_log_id"
|
||||
invisible="not triggered_plan_log_id"
|
||||
/>
|
||||
<field
|
||||
name="scheduled_task_id"
|
||||
invisible="not scheduled_task_id"
|
||||
/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="label" invisible="not label" />
|
||||
<field name="start_date" />
|
||||
<field name="finish_date" />
|
||||
<field name="duration_current" />
|
||||
<field name="command_status" invisible="is_running" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page
|
||||
name="result"
|
||||
string="Result"
|
||||
invisible="command_action == 'plan'"
|
||||
>
|
||||
<field
|
||||
invisible="not command_result_html"
|
||||
name="command_result_html"
|
||||
/>
|
||||
</page>
|
||||
<page
|
||||
name="code"
|
||||
string="Command"
|
||||
invisible="command_action == 'plan'"
|
||||
>
|
||||
<field name="code" />
|
||||
</page>
|
||||
<page
|
||||
name="triggered"
|
||||
string="Triggered Commands"
|
||||
invisible="command_action != 'plan'"
|
||||
>
|
||||
<field name="triggered_plan_command_log_ids">
|
||||
<list default_order="id asc" />
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_command_log_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.command.log.view.list</field>
|
||||
<field name="model">cx.tower.command.log</field>
|
||||
<field name="arch" type="xml">
|
||||
<list
|
||||
decoration-danger="command_status not in [0, -205]"
|
||||
decoration-info="is_running == True"
|
||||
decoration-muted="command_status == -205"
|
||||
>
|
||||
<field name="start_date" />
|
||||
<field name="finish_date" optional="hide" />
|
||||
<field name="duration_current" optional="show" />
|
||||
<field name="server_id" optional="show" />
|
||||
<field name="jet_id" optional="show" />
|
||||
<field name="jet_template_id" optional="hide" />
|
||||
<field name="command_id" optional="show" />
|
||||
<field name="command_action" optional="show" />
|
||||
<field name="command_status" optional="show" />
|
||||
<field name="is_running" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_command_log_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.command.log.view.search</field>
|
||||
<field name="model">cx.tower.command.log</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Command Log">
|
||||
<field name="command_id" />
|
||||
<field name="server_id" />
|
||||
<field name="jet_id" />
|
||||
<field name="jet_template_id" />
|
||||
<field name="label" />
|
||||
<separator />
|
||||
<filter
|
||||
string="Success"
|
||||
name="filter_success"
|
||||
domain="[('command_status', '=', 0)]"
|
||||
/>
|
||||
<filter
|
||||
string="Error"
|
||||
name="filter_error"
|
||||
domain="[('command_status', '!=', 0)]"
|
||||
/>
|
||||
<filter
|
||||
string="Running Now"
|
||||
name="filter_is_running"
|
||||
domain="[('is_running', '=', True)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Labeled"
|
||||
name="filter_labeled"
|
||||
domain="[('label', '!=', False)]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Server"
|
||||
name="group_server"
|
||||
domain="[]"
|
||||
context="{'group_by': 'server_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Command"
|
||||
name="group_command"
|
||||
domain="[]"
|
||||
context="{'group_by': 'command_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Action"
|
||||
name="group_action"
|
||||
domain="[]"
|
||||
context="{'group_by': 'command_action'}"
|
||||
/>
|
||||
<filter
|
||||
string="Start date"
|
||||
name="group_start"
|
||||
domain="[]"
|
||||
context="{'group_by': 'start_date:day'}"
|
||||
/>
|
||||
<filter
|
||||
string="Finish date"
|
||||
name="group_finish"
|
||||
domain="[]"
|
||||
context="{'group_by': 'finish_date:day'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="command_action" string="Action" icon="fa-cog" />
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_command_log" model="ir.actions.act_window">
|
||||
<field name="name">Command Log</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">cetmix_tower_command_logs</field>
|
||||
<field name="res_model">cx.tower.command.log</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="context">{}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
342
addons/cetmix_tower_server/views/cx_tower_command_view.xml
Normal file
342
addons/cetmix_tower_server/views/cx_tower_command_view.xml
Normal file
@@ -0,0 +1,342 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_command_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.command.view.form</field>
|
||||
<field name="model">cx.tower.command</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_open_plans"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
invisible="flight_plan_used_ids_count == 0"
|
||||
icon="fa-paper-plane"
|
||||
>
|
||||
<field
|
||||
name="flight_plan_used_ids_count"
|
||||
string="Used in Plans"
|
||||
widget="statinfo"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
name="action_open_command_logs"
|
||||
type="object"
|
||||
string="Logs"
|
||||
class="oe_stat_button"
|
||||
icon="fa-code"
|
||||
/>
|
||||
</div>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<div
|
||||
class="alert alert-warning"
|
||||
role="alert"
|
||||
invisible="action not in ['file_using_template', 'python_code', 'plan', 'jet_action', 'create_waypoint']"
|
||||
style="margin-bottom:0px;"
|
||||
>
|
||||
<p
|
||||
invisible="action not in ['file_using_template', 'plan', 'jet_action', 'create_waypoint']"
|
||||
>
|
||||
This command can be used only in Flight Plans.
|
||||
</p>
|
||||
<p invisible="action != 'python_code'">
|
||||
Remember: Python code is executed on the Tower server, not on the remote
|
||||
one.
|
||||
</p>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
<field name="active" invisible='1' />
|
||||
<field name="action" />
|
||||
<field
|
||||
name="file_template_id"
|
||||
invisible="action != 'file_using_template'"
|
||||
required="action == 'file_using_template'"
|
||||
/>
|
||||
<field
|
||||
name="flight_plan_id"
|
||||
invisible="action != 'plan'"
|
||||
required="action == 'plan'"
|
||||
/>
|
||||
<field
|
||||
name="path"
|
||||
widget="ace_tower"
|
||||
invisible="action == 'python_code'"
|
||||
placeholder="optional, eg /home/{{ tower.server.username }}"
|
||||
/>
|
||||
<field
|
||||
name="if_file_exists"
|
||||
invisible="action != 'file_using_template'"
|
||||
required="action == 'file_using_template'"
|
||||
/>
|
||||
<field
|
||||
name="disconnect_file"
|
||||
invisible="action != 'file_using_template'"
|
||||
/>
|
||||
<field
|
||||
name="jet_template_id"
|
||||
invisible="action != 'jet_action'"
|
||||
required="action == 'jet_action'"
|
||||
/>
|
||||
<field
|
||||
name="jet_action_id"
|
||||
invisible="action != 'jet_action'"
|
||||
required="action == 'jet_action'"
|
||||
/>
|
||||
<field
|
||||
name="waypoint_template_id"
|
||||
invisible="action != 'create_waypoint'"
|
||||
required="action == 'create_waypoint'"
|
||||
/>
|
||||
<field
|
||||
name="fly_here"
|
||||
invisible="action != 'create_waypoint'"
|
||||
/>
|
||||
<field name="allow_parallel_run" />
|
||||
<field
|
||||
name="no_split_for_sudo"
|
||||
invisible="action != 'ssh_command'"
|
||||
/>
|
||||
<field name="note" />
|
||||
</group>
|
||||
<group>
|
||||
<field
|
||||
name="server_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
<field
|
||||
name="os_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
<field name="access_level" />
|
||||
<field name="server_status" widget="server_status" />
|
||||
<field
|
||||
name="variable_ids"
|
||||
widget="many2many_tags"
|
||||
groups="cetmix_tower_server.group_manager,cetmix_tower_server.group_root"
|
||||
readonly="1"
|
||||
invisible="not variable_ids"
|
||||
/>
|
||||
<field
|
||||
name="secret_ids"
|
||||
widget="many2many_tags"
|
||||
groups="cetmix_tower_server.group_manager,cetmix_tower_server.group_root"
|
||||
invisible="not secret_ids"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page
|
||||
name="code"
|
||||
string="Code"
|
||||
invisible="action not in ['ssh_command', 'python_code']"
|
||||
>
|
||||
<field
|
||||
name="code"
|
||||
required="action == 'python_code'"
|
||||
widget="ace_tower"
|
||||
options="{'mode': 'python'}"
|
||||
placeholder="Enter Python code here. Help about Python expression is available in the help tab of this document."
|
||||
/>
|
||||
</page>
|
||||
<page
|
||||
string="Help"
|
||||
name="python_help_info"
|
||||
invisible="action != 'python_code'"
|
||||
>
|
||||
<field name="command_help" />
|
||||
</page>
|
||||
<page
|
||||
name="plan_lines"
|
||||
string="Flight Plan Lines"
|
||||
invisible="action != 'plan'"
|
||||
>
|
||||
<field name="flight_plan_line_ids">
|
||||
<list>
|
||||
<field name="command_id" />
|
||||
<field name="tag_ids" widget="many2many_tags" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="template_code"
|
||||
string="Template Code"
|
||||
invisible="action != 'file_using_template'"
|
||||
>
|
||||
<field
|
||||
name="template_code"
|
||||
widget="ace"
|
||||
options="{'mode': 'python'}"
|
||||
readonly="1"
|
||||
/>
|
||||
</page>
|
||||
<page
|
||||
name="access"
|
||||
string="Access"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<group name="access">
|
||||
<field
|
||||
name="user_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="users who can view this record"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="manager_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="managers who can modify this record"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_command_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.command.view.list</field>
|
||||
<field name="model">cx.tower.command</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="action" />
|
||||
<field name="access_level" optional="hide" />
|
||||
<field
|
||||
name="server_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
optional="show"
|
||||
/>
|
||||
<field name="path" optional="show" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="os_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
optional="hide"
|
||||
/>
|
||||
<field
|
||||
name="secret_ids"
|
||||
widget="many2many_tags"
|
||||
groups="cetmix_tower_server.group_manager,cetmix_tower_server.group_root"
|
||||
optional="hide"
|
||||
/>
|
||||
<field name="allow_parallel_run" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_command_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.command.view.search</field>
|
||||
<field name="model">cx.tower.command</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Commands">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="code" />
|
||||
<field name="user_ids" />
|
||||
<field name="manager_ids" />
|
||||
<filter
|
||||
string="Global"
|
||||
name="filter_global"
|
||||
domain="[('server_ids', '=', False)]"
|
||||
/>
|
||||
<filter
|
||||
string="Server tight"
|
||||
name="server_tight"
|
||||
domain="[('server_ids', '!=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Allow Parallel Run"
|
||||
name="filter_run_parallel"
|
||||
domain="[('allow_parallel_run', '=', True)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Used in Plans"
|
||||
name="filter_used_in_plans"
|
||||
domain="[('flight_plan_used_ids', '!=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Tagged"
|
||||
name="filter_tagged"
|
||||
domain="[('tag_ids', '!=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Archived"
|
||||
name="archived"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Action"
|
||||
name="group_action"
|
||||
domain="[]"
|
||||
context="{'group_by': 'action'}"
|
||||
/>
|
||||
<filter
|
||||
string="Access Level"
|
||||
name="group_access_level"
|
||||
domain="[]"
|
||||
context="{'group_by': 'access_level'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="action" string="Action" icon="fa-cog" />
|
||||
<field name="access_level" string="Access Level" icon="fa-shield" />
|
||||
<field name="tag_ids" string="Tags" icon="fa-tags" select="multi" />
|
||||
<field
|
||||
name="os_ids"
|
||||
string="OSes"
|
||||
icon="fa-server"
|
||||
select="multi"
|
||||
/>
|
||||
<field
|
||||
name="server_ids"
|
||||
string="Servers"
|
||||
icon="fa-server"
|
||||
select="multi"
|
||||
/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_command" model="ir.actions.act_window">
|
||||
<field name="name">Command</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">cetmix_tower_commands</field>
|
||||
<field name="res_model">cx.tower.command</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
163
addons/cetmix_tower_server/views/cx_tower_file_template_view.xml
Normal file
163
addons/cetmix_tower_server/views/cx_tower_file_template_view.xml
Normal file
@@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_file_template_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.file.template.view.form</field>
|
||||
<field name="model">cx.tower.file.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_open_files"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-files-o"
|
||||
>
|
||||
<field name="file_count" widget="statinfo" string="Files" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1>
|
||||
<field name="name" placeholder="Name" required="1" />
|
||||
</h1>
|
||||
<h3>
|
||||
<field
|
||||
name="reference"
|
||||
placeholder="Reference. Can contain English letters, digits and '_'. Leave blank to autogenerate"
|
||||
/>
|
||||
</h3>
|
||||
<field name="active" invisible="1" />
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="file_name" widget="ace_tower" />
|
||||
<field name="server_dir" widget="ace_tower" />
|
||||
<field name="source" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
<field
|
||||
name="keep_when_deleted"
|
||||
invisible="source == 'server'"
|
||||
/>
|
||||
<field name="file_type" />
|
||||
<field name="auto_sync" invisible="source == 'server'" />
|
||||
<field name="note" />
|
||||
<field
|
||||
name="variable_ids"
|
||||
widget="many2many_tags"
|
||||
groups="cetmix_tower_server.group_manager,cetmix_tower_server.group_root"
|
||||
readonly="1"
|
||||
invisible="not variable_ids"
|
||||
/>
|
||||
<field
|
||||
name="secret_ids"
|
||||
widget="many2many_tags"
|
||||
invisible="not secret_ids"
|
||||
groups="cetmix_tower_server.group_manager,cetmix_tower_server.group_root"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page
|
||||
name="code"
|
||||
string="Code"
|
||||
invisible="file_type == 'binary' or source == 'server'"
|
||||
>
|
||||
<field name="code" widget="ace_tower" nolabel="1" />
|
||||
</page>
|
||||
<page
|
||||
name="access"
|
||||
string="Access"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<group name="access">
|
||||
<field
|
||||
name="user_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="users who can view this record"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="manager_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="managers who can modify this record"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_file_template_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.file.template.view.list</field>
|
||||
<field name="model">cx.tower.file.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="file_type" optional="show" />
|
||||
<field name="file_name" optional="show" />
|
||||
<field name="server_dir" optional="hide" />
|
||||
<field name="auto_sync" optional="hide" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
optional="show"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_file_template_view_search" model="ir.ui.view">
|
||||
<field name="name">cx.tower.file.template.view.search</field>
|
||||
<field name="model">cx.tower.file.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search File Templates">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="server_dir" />
|
||||
<filter
|
||||
string="Archived"
|
||||
name="archived"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
name="group_by_file_type"
|
||||
string="File Type"
|
||||
context="{'group_by': 'file_type'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="source" string="Source" icon="fa-server" />
|
||||
<field name="file_type" string="File Type" icon="fa-file" />
|
||||
<field name="tag_ids" string="Tags" icon="fa-tags" select="multi" />
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_file_template_action" model="ir.actions.act_window">
|
||||
<field name="name">Templates</field>
|
||||
<field name="res_model">cx.tower.file.template</field>
|
||||
<field name="path">cetmix_tower_file_templates</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="cx_tower_file_template_view_search" />
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Add a new file template
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
307
addons/cetmix_tower_server/views/cx_tower_file_view.xml
Normal file
307
addons/cetmix_tower_server/views/cx_tower_file_view.xml
Normal file
@@ -0,0 +1,307 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_file_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.file.view.form</field>
|
||||
<field name="model">cx.tower.file</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
name="action_push_to_server"
|
||||
string="Push to Server"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
invisible="source != 'tower'"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
<button
|
||||
name="action_pull_from_server"
|
||||
string="Pull from Server"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
invisible="source != 'server'"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" widget="ace_tower" />
|
||||
<!-- This is done to get the priority to the auto generated reference -->
|
||||
<field name="reference" invisible="not reference" />
|
||||
<field name="source" required="1" />
|
||||
<field name="file_type" />
|
||||
<field name="id" invisible="1" />
|
||||
<field
|
||||
name="file"
|
||||
filename="name"
|
||||
invisible="file_type != 'binary'"
|
||||
readonly="id or source == 'server'"
|
||||
required="file_type == 'binary' and source != 'server'"
|
||||
/>
|
||||
<field
|
||||
name="template_id"
|
||||
domain="[('source', '=', source)]"
|
||||
/>
|
||||
<field
|
||||
name="keep_when_deleted"
|
||||
invisible="source != 'tower'"
|
||||
/>
|
||||
<field name="auto_sync" />
|
||||
<field
|
||||
name="auto_sync_interval"
|
||||
invisible="not auto_sync or source != 'server'"
|
||||
required="auto_sync and source == 'server'"
|
||||
/>
|
||||
<field
|
||||
name="sync_date_next"
|
||||
invisible="not auto_sync or source != 'server'"
|
||||
/>
|
||||
<field name="sync_date_last" />
|
||||
</group>
|
||||
<group>
|
||||
<field
|
||||
name="server_id"
|
||||
readonly="jet_id"
|
||||
required="not jet_id"
|
||||
/>
|
||||
<field
|
||||
name="jet_template_id"
|
||||
invisible="not jet_template_id"
|
||||
readonly="jet_id"
|
||||
/>
|
||||
<field name="jet_id" invisible="not jet_id" />
|
||||
<field name="server_dir" widget="ace_tower" />
|
||||
<field name="full_server_path" />
|
||||
<field
|
||||
name="variable_ids"
|
||||
widget="many2many_tags"
|
||||
groups="cetmix_tower_server.group_manager,cetmix_tower_server.group_root"
|
||||
invisible="not variable_ids"
|
||||
/>
|
||||
<field
|
||||
name="secret_ids"
|
||||
widget="many2many_tags"
|
||||
groups="cetmix_tower_server.group_manager,cetmix_tower_server.group_root"
|
||||
invisible="not secret_ids"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page
|
||||
name="code"
|
||||
string="Code"
|
||||
invisible="file_type == 'binary'"
|
||||
>
|
||||
<button
|
||||
string="Modify Code"
|
||||
icon="fa-pencil-square-o"
|
||||
name="action_unlink_from_template"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
confirm="File will be disconnected from template. Continue?"
|
||||
invisible="not template_id"
|
||||
/>
|
||||
<field
|
||||
name="code"
|
||||
widget="ace_tower"
|
||||
nolabel="1"
|
||||
readonly="template_id or source == 'server'"
|
||||
/>
|
||||
</page>
|
||||
<page
|
||||
name="rendered_code"
|
||||
string="Preview"
|
||||
invisible="source != 'tower' or file_type == 'binary'"
|
||||
>
|
||||
<field
|
||||
name="rendered_code"
|
||||
nolabel="1"
|
||||
class="o_field_text"
|
||||
/>
|
||||
</page>
|
||||
<page
|
||||
name="code_on_server"
|
||||
string="Server Version"
|
||||
invisible="source != 'tower' or file_type == 'binary'"
|
||||
>
|
||||
<group>
|
||||
<button
|
||||
name="action_get_current_server_code"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
>Refresh</button>
|
||||
</group>
|
||||
|
||||
<field
|
||||
name="code_on_server"
|
||||
nolabel="1"
|
||||
class="o_field_text"
|
||||
/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_file_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.file.view.list</field>
|
||||
<field name="model">cx.tower.file</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" optional="hide" />
|
||||
<field name="rendered_name" optional="show" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="full_server_path" optional="hide" />
|
||||
<field name="source" />
|
||||
<field name="file_type" optional="show" />
|
||||
<field name="server_id" />
|
||||
<field name="jet_template_id" optional="hide" />
|
||||
<field name="jet_id" optional="hide" />
|
||||
<field name="sync_date_last" optional="show" />
|
||||
<field name="template_id" optional="show" />
|
||||
<field
|
||||
name="secret_ids"
|
||||
widget="many2many_tags"
|
||||
groups="cetmix_tower_server.group_manager,cetmix_tower_server.group_root"
|
||||
optional="hide"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_file_view_search" model="ir.ui.view">
|
||||
<field name="name">cx.tower.file.view.search</field>
|
||||
<field name="model">cx.tower.file</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Files">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="code" />
|
||||
<field name="server_id" />
|
||||
<field name="server_dir" />
|
||||
<filter
|
||||
string="Has Template"
|
||||
name="filter_has_template"
|
||||
domain="[('template_id', '!=', False)]"
|
||||
/>
|
||||
<filter
|
||||
string="No Template"
|
||||
name="filter_no_template"
|
||||
domain="[('template_id', '=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Synced"
|
||||
name="filter_is_synced"
|
||||
domain="[('server_response', '=', 'ok')]"
|
||||
/>
|
||||
<filter
|
||||
string="No Synced"
|
||||
name="filter_is_no_synced"
|
||||
domain="[('server_response', '=', False)]"
|
||||
/>
|
||||
<filter
|
||||
string="Sync Error"
|
||||
name="filter_is_error_synced"
|
||||
domain="[('server_response', 'not in', ['ok', False])]"
|
||||
/>
|
||||
<separator />
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Source"
|
||||
name="group_by_source"
|
||||
domain="[]"
|
||||
context="{'group_by': 'source'}"
|
||||
/>
|
||||
<filter
|
||||
string="File Type"
|
||||
name="group_by_file_type"
|
||||
domain="[]"
|
||||
context="{'group_by': 'file_type'}"
|
||||
/>
|
||||
<filter
|
||||
string="Server"
|
||||
name="group_by_server"
|
||||
domain="[]"
|
||||
context="{'group_by': 'server_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Jet Template"
|
||||
name="group_by_jet_template"
|
||||
domain="[]"
|
||||
context="{'group_by': 'jet_template_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Jet"
|
||||
name="group_by_jet"
|
||||
domain="[]"
|
||||
context="{'group_by': 'jet_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Template"
|
||||
name="group_by_template"
|
||||
domain="[]"
|
||||
context="{'group_by': 'template_id'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="source" string="Source" icon="fa-server" />
|
||||
<field name="file_type" string="File Type" icon="fa-file" />
|
||||
<field name="template_id" string="Template" icon="fa-file" />
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_file_action" model="ir.actions.act_window">
|
||||
<field name="name">Files</field>
|
||||
<field name="res_model">cx.tower.file</field>
|
||||
<field name="path">cetmix_tower_files</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="cx_tower_file_view_search" />
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Add a new file
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cetmix_tower_file_upload_action" model="ir.actions.server">
|
||||
<field name="name">Upload</field>
|
||||
<field name="model_id" ref="model_cx_tower_file" />
|
||||
<field name="binding_model_id" ref="model_cx_tower_file" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.action_push_to_server()</field>
|
||||
</record>
|
||||
|
||||
<record id="cetmix_tower_file_download_action" model="ir.actions.server">
|
||||
<field name="name">Download</field>
|
||||
<field name="model_id" ref="model_cx_tower_file" />
|
||||
<field name="binding_model_id" ref="model_cx_tower_file" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.action_pull_from_server()</field>
|
||||
</record>
|
||||
|
||||
<record id="cetmix_tower_file_delete_action" model="ir.actions.server">
|
||||
<field name="name">Delete from server</field>
|
||||
<field name="model_id" ref="model_cx_tower_file" />
|
||||
<field name="binding_model_id" ref="model_cx_tower_file" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.action_delete_from_server()</field>
|
||||
<field
|
||||
name="groups_id"
|
||||
eval="[
|
||||
(4, ref('cetmix_tower_server.group_manager')),
|
||||
(4, ref('cetmix_tower_server.group_root')),
|
||||
]"
|
||||
/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<!-- State Form View -->
|
||||
<record id="cx_tower_jet_action_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.action.form</field>
|
||||
<field name="model">cx.tower.jet.action</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field
|
||||
name="name"
|
||||
placeholder="action name, e.g. 'Start'"
|
||||
/>
|
||||
</h1>
|
||||
</div>
|
||||
<group name="action_form_main">
|
||||
<group name="action_form_general">
|
||||
<field
|
||||
name="reference"
|
||||
groups="base.group_no_one"
|
||||
placeholder="leave blank to autogenerate"
|
||||
/>
|
||||
<field name="priority" groups="base.group_no_one" />
|
||||
<field name="access_level" />
|
||||
<field name="plan_id" />
|
||||
</group>
|
||||
<group name="action_form_states">
|
||||
<field name="state_from_id" />
|
||||
<field name="state_transit_id" />
|
||||
<field name="state_to_id" />
|
||||
<field name="state_error_id" />
|
||||
</group>
|
||||
<field name="note" placeholder="Put your notes here" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<!-- List View -->
|
||||
<record id="view_cx_tower_jet_request_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.request.list</field>
|
||||
<field name="model">cx.tower.jet.request</field>
|
||||
<field name="arch" type="xml">
|
||||
<list
|
||||
decoration-info="state == 'new'"
|
||||
decoration-warning="state == 'processing'"
|
||||
decoration-success="state == 'success'"
|
||||
decoration-danger="state == 'failed'"
|
||||
>
|
||||
<field name="create_date" />
|
||||
<field name="write_date" optional="hide" />
|
||||
<field name="server_id" />
|
||||
<field name="requested_by_jet_id" />
|
||||
<field name="jet_template_id" optional="show" />
|
||||
<field name="state_requested_id" optional="show" />
|
||||
<field name="jet_id" />
|
||||
<field name="state" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_cx_tower_jet_request_search" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.request.search</field>
|
||||
<field name="model">cx.tower.jet.request</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="server_id" string="Server" />
|
||||
<field name="jet_id" string="Jet" />
|
||||
<field name="jet_template_id" string="Jet Template" />
|
||||
<field name="requested_by_jet_id" string="Requested By Jet" />
|
||||
<filter
|
||||
name="success"
|
||||
string="Success"
|
||||
domain="[('state','=','success')]"
|
||||
/>
|
||||
<filter
|
||||
name="failed"
|
||||
string="Failed"
|
||||
domain="[('state','=','failed')]"
|
||||
/>
|
||||
<filter
|
||||
name="group_by_server"
|
||||
string="Server"
|
||||
context="{'group_by': 'server_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="group_by_jet"
|
||||
string="Jet"
|
||||
context="{'group_by': 'jet_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="group_by_jet_template"
|
||||
string="Jet Template"
|
||||
context="{'group_by': 'jet_template_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="group_by_requested_by_jet"
|
||||
string="Requested By Jet"
|
||||
context="{'group_by': 'requested_by_jet_id'}"
|
||||
/>
|
||||
<searchpanel>
|
||||
<field
|
||||
name="state"
|
||||
string="State"
|
||||
icon="fa-cog"
|
||||
enable_counters="1"
|
||||
/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action -->
|
||||
<record id="action_cx_tower_jet_request" model="ir.actions.act_window">
|
||||
<field name="name">Jet Requests</field>
|
||||
<field name="res_model">cx.tower.jet.request</field>
|
||||
<field name="view_mode">list</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No jet requests found
|
||||
</p>
|
||||
<p>
|
||||
Jet requests will appear here when jets request resources from templates.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
87
addons/cetmix_tower_server/views/cx_tower_jet_state_view.xml
Normal file
87
addons/cetmix_tower_server/views/cx_tower_jet_state_view.xml
Normal file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<!-- State Form View -->
|
||||
<record id="cx_tower_jet_state_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.state.form</field>
|
||||
<field name="model">cx.tower.jet.state</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Jet State">
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. Running" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field
|
||||
name="reference"
|
||||
placeholder="Reference. Can contain English letters, digits and '_'. Leave blank to autogenerate"
|
||||
/>
|
||||
<field name="active" invisible="1" />
|
||||
<field name="sequence" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Notes" name="notes">
|
||||
<field name="note" placeholder="Add notes here..." />
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- State List View -->
|
||||
<record id="cx_tower_jet_state_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.state.list</field>
|
||||
<field name="model">cx.tower.jet.state</field>
|
||||
<field name="arch" type="xml">
|
||||
<list editable="top">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="access_level" optional="show" />
|
||||
<field name="color" widget="color_picker" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- State Search View -->
|
||||
<record id="cx_tower_jet_state_view_search" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.state.search</field>
|
||||
<field name="model">cx.tower.jet.state</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Jet States">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
<filter
|
||||
string="Archived"
|
||||
name="inactive"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- State Action -->
|
||||
<record id="cx_tower_jet_state_action" model="ir.actions.act_window">
|
||||
<field name="name">Jet States</field>
|
||||
<field name="res_model">cx.tower.jet.state</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create your first Jet State!
|
||||
</p>
|
||||
<p>
|
||||
Jet States represent the different states a jet can be in during its lifecycle.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<!-- Template Install List View -->
|
||||
<record id="cx_tower_jet_template_install_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.template.install.list</field>
|
||||
<field name="model">cx.tower.jet.template.install</field>
|
||||
<field name="arch" type="xml">
|
||||
<list create="false" edit="false">
|
||||
<field name="jet_template_id" />
|
||||
<field name="server_id" />
|
||||
<field name="action" />
|
||||
<field
|
||||
name="state"
|
||||
widget="badge"
|
||||
decoration-success="state == 'installed'"
|
||||
decoration-danger="state == 'failed'"
|
||||
/>
|
||||
<field name="create_date" string="Started" />
|
||||
<field name="date_done" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Template Install Form View -->
|
||||
<record id="cx_tower_jet_template_install_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.template.install.form</field>
|
||||
<field name="model">cx.tower.jet.template.install</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Jet Template Installation" create="false" edit="false">
|
||||
<header>
|
||||
<field
|
||||
name="state"
|
||||
widget="statusbar"
|
||||
statusbar_visible="processing"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Done"
|
||||
invisible="state != 'installed'"
|
||||
/>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Failed"
|
||||
bg_color="bg-danger"
|
||||
invisible="state != 'failed'"
|
||||
/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_view_flight_plan_logs"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-list-alt"
|
||||
>
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Flight Plan</span>
|
||||
<span class="o_stat_text">Logs</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="jet_template_id" />
|
||||
<field name="server_id" />
|
||||
<field name="action" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="create_date" string="Started" />
|
||||
<field
|
||||
name="current_line_id"
|
||||
invisible="not current_line_id"
|
||||
/>
|
||||
<field name="date_done" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Installation Steps" name="installation_steps">
|
||||
<field name="line_ids">
|
||||
<list>
|
||||
<field name="jet_template_id" />
|
||||
<field name="state" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Template Install Search View -->
|
||||
<record id="cx_tower_jet_template_install_view_search" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.template.install.search</field>
|
||||
<field name="model">cx.tower.jet.template.install</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Template Installations">
|
||||
<field name="jet_template_id" />
|
||||
<field name="server_id" />
|
||||
<filter
|
||||
string="Processing"
|
||||
name="processing"
|
||||
domain="[('state', '=', 'processing')]"
|
||||
/>
|
||||
<filter
|
||||
string="Done"
|
||||
name="done"
|
||||
domain="[('state', '=', 'installed')]"
|
||||
/>
|
||||
<filter
|
||||
string="Failed"
|
||||
name="failed"
|
||||
domain="[('state', '=', 'failed')]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Uninstall Action"
|
||||
name="uninstall_action"
|
||||
domain="[('action', '=', 'uninstall')]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Template"
|
||||
name="group_by_template"
|
||||
context="{'group_by': 'jet_template_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Server"
|
||||
name="group_by_server"
|
||||
context="{'group_by': 'server_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="State"
|
||||
name="group_by_state"
|
||||
context="{'group_by': 'state'}"
|
||||
/>
|
||||
<filter
|
||||
string="Action"
|
||||
name="group_by_action"
|
||||
context="{'group_by': 'action'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field
|
||||
name="state"
|
||||
string="State"
|
||||
icon="fa-cog"
|
||||
enable_counters="1"
|
||||
/>
|
||||
<field
|
||||
name="action"
|
||||
string="Action"
|
||||
icon="fa-cog"
|
||||
enable_counters="1"
|
||||
/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Template Install Action -->
|
||||
<record id="cx_tower_jet_template_install_action" model="ir.actions.act_window">
|
||||
<field name="name">Template Installations</field>
|
||||
<field name="res_model">cx.tower.jet.template.install</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="context">{'search_default_processing': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No template installations found!
|
||||
</p>
|
||||
<p>
|
||||
Template installations are created automatically when you install jet templates on servers.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
583
addons/cetmix_tower_server/views/cx_tower_jet_template_view.xml
Normal file
583
addons/cetmix_tower_server/views/cx_tower_jet_template_view.xml
Normal file
@@ -0,0 +1,583 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<!-- Template Form View -->
|
||||
<record id="cx_tower_jet_template_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.template.form</field>
|
||||
<field name="model">cx.tower.jet.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Jet Template">
|
||||
<header>
|
||||
<button
|
||||
name="action_install_on_servers"
|
||||
type="object"
|
||||
string="Install"
|
||||
class="btn-primary"
|
||||
icon="fa-plus-square"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
<button
|
||||
name="action_new_jet"
|
||||
type="object"
|
||||
string="New Jet"
|
||||
class="btn-primary"
|
||||
icon="fa-plane"
|
||||
invisible="not show_in_create_wizard"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_open_jets"
|
||||
type="object"
|
||||
string="Jets"
|
||||
class="oe_stat_button"
|
||||
icon="fa-plane"
|
||||
invisible="jet_count == 0"
|
||||
>
|
||||
<field name="jet_count" widget="statinfo" string="Jets" />
|
||||
</button>
|
||||
<button
|
||||
name="action_open_command_logs"
|
||||
type="object"
|
||||
string="Command Logs"
|
||||
class="oe_stat_button"
|
||||
icon="fa-code"
|
||||
/>
|
||||
<button
|
||||
name="action_open_plan_logs"
|
||||
type="object"
|
||||
string="Flight Plan Logs"
|
||||
class="oe_stat_button"
|
||||
icon="fa-paper-plane"
|
||||
/>
|
||||
<button
|
||||
name="action_open_files"
|
||||
type="object"
|
||||
string="Files"
|
||||
class="oe_stat_button"
|
||||
icon="fa-files-o"
|
||||
/>
|
||||
</div>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<field
|
||||
name="icon"
|
||||
widget="image"
|
||||
class="oe_avatar"
|
||||
options="{'preview_image': 'icon'}"
|
||||
/>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. Odoo Instance" />
|
||||
</h1>
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="Tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
</div>
|
||||
<notebook>
|
||||
<field name="active" invisible="1" />
|
||||
<page
|
||||
string="General Settings"
|
||||
name="general_settings"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<group name="main">
|
||||
<group name="general" string="General Settings">
|
||||
<field
|
||||
name="reference"
|
||||
placeholder="Reference. Can contain English letters, digits and '_'. Leave blank to autogenerate"
|
||||
/>
|
||||
<field name="access_level" />
|
||||
<field name="show_in_create_wizard" />
|
||||
</group>
|
||||
<group name="servers" string="Installation">
|
||||
<field name="plan_install_id" />
|
||||
<field name="plan_uninstall_id" />
|
||||
<field name="limit_per_server" />
|
||||
</group>
|
||||
<field name="note" placeholder="Add notes here..." />
|
||||
<group name="cloning" string="Cloning">
|
||||
<field
|
||||
name="plan_clone_same_server_id"
|
||||
string="Same Server"
|
||||
/>
|
||||
<field
|
||||
name="plan_clone_different_server_id"
|
||||
string="Different Server"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<div
|
||||
class="alert alert-warning"
|
||||
role="alert"
|
||||
invisible="not plan_clone_same_server_id and not plan_clone_different_server_id"
|
||||
style="margin-bottom:0px;"
|
||||
>
|
||||
<p>
|
||||
Flight plan is run on the cloned jet, not on the original one. Following variables are available in the flight plan:
|
||||
<ul>
|
||||
<li><code
|
||||
>__original_jet__</code> The reference of the original jet</li>
|
||||
<li><code
|
||||
>__original_server__</code> The reference of the original server</li>
|
||||
<li><code
|
||||
>__requested_jet_state__</code> The reference of the requested state of the new jet</li>
|
||||
</ul>
|
||||
You can also use <code
|
||||
>jet.jet_cloned_from_id</code> to get the original jet in Python commands.
|
||||
</p>
|
||||
</div>
|
||||
</page>
|
||||
<page name="configuration" string="Configuration">
|
||||
<field name="variable_value_ids" order="variable_reference">
|
||||
<list editable="bottom">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field
|
||||
name="variable_reference"
|
||||
column_invisible="True"
|
||||
/>
|
||||
<field name="variable_id" />
|
||||
<field
|
||||
name="variable_type"
|
||||
column_invisible="True"
|
||||
/>
|
||||
<field
|
||||
name="value_char"
|
||||
readonly="variable_type == 'o'"
|
||||
widget="ace_tower"
|
||||
/>
|
||||
<field
|
||||
name="option_id"
|
||||
options="{'no_create': True, 'no_create_edit': True}"
|
||||
readonly="variable_type == 's'"
|
||||
/>
|
||||
<field name="access_level" optional="show" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="variable_id" />
|
||||
<field
|
||||
name="variable_reference"
|
||||
widget="CopyClipboardChar"
|
||||
options="{'string': 'Copy reference'}"
|
||||
/>
|
||||
<field
|
||||
name="value_char"
|
||||
widget="CopyClipboardChar"
|
||||
options="{'string': 'Copy value'}"
|
||||
/>
|
||||
<field name="access_level" />
|
||||
</group>
|
||||
<field
|
||||
name="note"
|
||||
placeholder="Put your notes here..."
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Actions" name="actions">
|
||||
<field name="action_ids">
|
||||
<list
|
||||
decoration-success="not state_from_id"
|
||||
decoration-danger="not state_to_id"
|
||||
>
|
||||
<field name="priority" widget="handle" />
|
||||
<field name="name" />
|
||||
<field
|
||||
name="state_from_id"
|
||||
placeholder="Is initial"
|
||||
/>
|
||||
<field name="state_transit_id" />
|
||||
<field name="state_to_id" placeholder="Is final" />
|
||||
<field
|
||||
name="color"
|
||||
widget="color_picker"
|
||||
string=" "
|
||||
/>
|
||||
<field name="state_error_id" optional="show" />
|
||||
<field name="plan_id" />
|
||||
<field name="reference" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
<p
|
||||
id="message_actions"
|
||||
class="alert alert-warning"
|
||||
role="alert"
|
||||
>
|
||||
Help:
|
||||
<ul>
|
||||
<li
|
||||
>Action with an initial state can be triggered only from that state.</li>
|
||||
<li
|
||||
>Action without an initial state can be triggered from any state. Such actions can be used to create a new Jet.</li>
|
||||
<li
|
||||
>Action without a final state do not change the state. Such actions can be used to destroy a Jet.</li>
|
||||
<li
|
||||
>You need to save your changes to be able to select newly added actions in the fields below.</li>
|
||||
</ul>
|
||||
</p>
|
||||
<group>
|
||||
<field name="action_create_id" />
|
||||
<field name="action_destroy_id" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Dependencies" name="dependencies">
|
||||
<group>
|
||||
<group name="requires" string="Requires">
|
||||
<field name="template_requires_ids" string=" ">
|
||||
<list editable="bottom">
|
||||
<field
|
||||
name="template_id"
|
||||
column_invisible="True"
|
||||
/>
|
||||
<field name="template_required_id" />
|
||||
<field name="state_required_id" />
|
||||
</list>
|
||||
</field>
|
||||
<field
|
||||
name="dependency_graph_image"
|
||||
string=" "
|
||||
widget="image"
|
||||
invisible="not dependency_graph_image"
|
||||
/>
|
||||
</group>
|
||||
<group name="required_by" string="Required By">
|
||||
<field name="template_required_by_ids" string=" ">
|
||||
<list editable="bottom">
|
||||
<field name="template_id" />
|
||||
<field name="state_required_id" />
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page
|
||||
name="waypoints"
|
||||
string="Waypoints"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<field name="waypoint_template_ids">
|
||||
<list>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="access_level" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="access"
|
||||
string="Access"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<group name="access">
|
||||
<field
|
||||
name="user_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="users who can access this jet template"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="manager_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="managers who can modify this jet template"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
<page
|
||||
name="logs"
|
||||
string="Jet Logs"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<field name="server_log_ids">
|
||||
<list>
|
||||
<field name="name" />
|
||||
</list>
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1
|
||||
class="d-flex flex-grow justify-content-between"
|
||||
>
|
||||
<field name="name" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<field
|
||||
name="server_template_id"
|
||||
invisible="1"
|
||||
/>
|
||||
<field name="access_level" />
|
||||
<field name="log_type" />
|
||||
<field
|
||||
name="command_id"
|
||||
domain="[('server_ids', '=', False)]"
|
||||
invisible="log_type != 'command'"
|
||||
required="log_type == 'command'"
|
||||
/>
|
||||
<field
|
||||
name="use_sudo"
|
||||
invisible="log_type != 'command'"
|
||||
/>
|
||||
<field
|
||||
name="file_template_id"
|
||||
invisible="log_type != 'file'"
|
||||
required="log_type == 'file'"
|
||||
/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="scheduled_tasks"
|
||||
string="Scheduled Tasks"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<field name="scheduled_task_ids">
|
||||
<list create="0" edit="0">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="display_name" />
|
||||
<field name="action" />
|
||||
<field name="interval_type" />
|
||||
<field name="interval_number" optional="hide" />
|
||||
<field name="is_running" optional="hide" />
|
||||
<field name="next_call" optional="hide" />
|
||||
<field name="last_call" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="servers"
|
||||
string="Installed on Servers"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<field name="server_ids">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="partner_id" optional="show" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="color"
|
||||
widget="color_picker"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="status"
|
||||
widget="badge"
|
||||
decoration-danger="status == 'stopped'"
|
||||
decoration-info="status in ['stopping','restarting','starting']"
|
||||
decoration-success="status == 'running'"
|
||||
decoration-warning="status in ['deleting','delete_error']"
|
||||
/>
|
||||
<button
|
||||
name="action_uninstall_jet_template"
|
||||
type="object"
|
||||
string="Uninstall"
|
||||
class="btn-danger"
|
||||
confirm="Jet template will be uninstalled from the server. Are you sure?"
|
||||
context="{'jet_template_id': parent.id}"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="installations"
|
||||
string="Installation Logs"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<field name="install_ids">
|
||||
<list>
|
||||
<field name="create_date" />
|
||||
<field name="server_id" />
|
||||
<field name="state" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="create_date" />
|
||||
<field name="server_id" />
|
||||
<field name="state" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Template List View -->
|
||||
<record id="cx_tower_jet_template_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.template.list</field>
|
||||
<field name="model">cx.tower.jet.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="jet_count" string="Jets" />
|
||||
<field
|
||||
name="show_in_create_wizard"
|
||||
optional="show"
|
||||
widget="boolean_toggle"
|
||||
/>
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="access_level" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Template Search View -->
|
||||
<record id="cx_tower_jet_template_view_search" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.template.search</field>
|
||||
<field name="model">cx.tower.jet.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Jet Templates">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="jet_count" />
|
||||
<filter
|
||||
string="Create from Wizard"
|
||||
name="create_from_wizard"
|
||||
domain="[('show_in_create_wizard', '=', True)]"
|
||||
/>
|
||||
<filter
|
||||
string="User Access"
|
||||
name="user_access"
|
||||
domain="[('access_level', '=', '1')]"
|
||||
/>
|
||||
<filter
|
||||
string="Manager Access"
|
||||
name="manager_access"
|
||||
domain="[('access_level', '=', '2')]"
|
||||
/>
|
||||
<filter
|
||||
string="Root Access"
|
||||
name="root_access"
|
||||
domain="[('access_level', '=', '3')]"
|
||||
/>
|
||||
<filter
|
||||
string="Archived"
|
||||
name="inactive"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Access Level"
|
||||
name="group_by_access_level"
|
||||
context="{'group_by': 'access_level'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="access_level" string="Access Level" icon="fa-shield" />
|
||||
<field name="tag_ids" string="Tags" icon="fa-tags" select="multi" />
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Template Kanban View -->
|
||||
<record id="cx_tower_jet_template_view_kanban" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.template.kanban</field>
|
||||
<field name="model">cx.tower.jet.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban sample="1">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
<field name="tag_ids" />
|
||||
<field name="icon" />
|
||||
<field name="jet_count" />
|
||||
<field name="show_in_create_wizard" />
|
||||
<field name="active" />
|
||||
<templates>
|
||||
<t t-name="card" class="flex-row">
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="text-bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<aside class="o_kanban_aside_full">
|
||||
<field
|
||||
name="icon"
|
||||
widget="image"
|
||||
alt="Jet template icon"
|
||||
options="{'img_class': 'object-fit-contain w-100 h-100'}"
|
||||
/>
|
||||
</aside>
|
||||
<main class="ps-2 ps-md-0 d-flex flex-column">
|
||||
<div
|
||||
class="d-flex align-items-start justify-content-between"
|
||||
>
|
||||
<div>
|
||||
<strong class="fs-5">
|
||||
<field name="name" />
|
||||
</strong>
|
||||
<div class="text-muted">
|
||||
<field name="reference" />
|
||||
</div>
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
</div>
|
||||
<a
|
||||
t-if="record.jet_count.raw_value"
|
||||
type="object"
|
||||
name="action_open_jets"
|
||||
title="Open jets"
|
||||
class="ms-2 text-nowrap"
|
||||
>
|
||||
<i class="fa fa-plane me-1" />
|
||||
<field name="jet_count" />
|
||||
</a>
|
||||
</div>
|
||||
<footer class="mt-auto">
|
||||
<span title="Show in create wizard">
|
||||
<i class="fa fa-magic me-1" />
|
||||
<field
|
||||
name="show_in_create_wizard"
|
||||
widget="boolean_toggle"
|
||||
/>
|
||||
</span>
|
||||
</footer>
|
||||
</main>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Template Action -->
|
||||
<record id="cx_tower_jet_template_action" model="ir.actions.act_window">
|
||||
<field name="name">Jet Templates</field>
|
||||
<field name="res_model">cx.tower.jet.template</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create your first Jet Template!
|
||||
</p>
|
||||
<p>
|
||||
Jet Templates are used to create and manage Jets.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
647
addons/cetmix_tower_server/views/cx_tower_jet_view.xml
Normal file
647
addons/cetmix_tower_server/views/cx_tower_jet_view.xml
Normal file
@@ -0,0 +1,647 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<!-- Jet Kanban View -->
|
||||
<record id="cx_tower_jet_view_kanban" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.kanban</field>
|
||||
<field name="model">cx.tower.jet</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban quick_create="false" records_draggable="0" group_create="false">
|
||||
<field name="name" />
|
||||
<field name="tag_ids" />
|
||||
<field name="reference" />
|
||||
<field name="icon" />
|
||||
<field name="jet_template_id" />
|
||||
<field name="jet_template_state_ids" />
|
||||
<field name="server_id" />
|
||||
<field name="state_id" />
|
||||
<field name="url" />
|
||||
<field name="action_available_ids" />
|
||||
<field name="color" />
|
||||
<field name="sequence" />
|
||||
<field name="partner_id" />
|
||||
<templates>
|
||||
<t t-name="card" class="flex-row">
|
||||
<aside t-if="record.icon.raw_value">
|
||||
<field
|
||||
name="icon"
|
||||
widget="image"
|
||||
alt="Jet icon"
|
||||
options="{'size': [48, 48], 'img_class': 'object-fit-contain rounded'}"
|
||||
/>
|
||||
</aside>
|
||||
<main class="ps-2 ps-md-0 d-flex flex-column">
|
||||
<div
|
||||
class="d-flex align-items-start justify-content-between mb-1"
|
||||
>
|
||||
<div>
|
||||
<strong class="fs-5">
|
||||
<field name="name" />
|
||||
</strong>
|
||||
<div class="text-muted">
|
||||
<field name="reference" />
|
||||
</div>
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="list-unstyled mb-0 text-muted small flex-grow-1">
|
||||
<li
|
||||
t-if="record.state_id.raw_value"
|
||||
class="d-flex align-items-center mb-1"
|
||||
>
|
||||
<i class="fa fa-circle me-2" title="State" />
|
||||
<field name="state_id" />
|
||||
</li>
|
||||
<li
|
||||
class="d-flex align-items-center mb-1"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<i class="fa fa-cube me-2" title="Template" />
|
||||
<field name="jet_template_id" />
|
||||
</li>
|
||||
<li class="d-flex align-items-center mb-1">
|
||||
<i class="fa fa-server me-2" title="Server" />
|
||||
<field name="server_id" />
|
||||
</li>
|
||||
<li
|
||||
t-if="record.partner_id.raw_value"
|
||||
class="d-flex align-items-center mb-1"
|
||||
>
|
||||
<i class="fa fa-user me-2" title="Partner" />
|
||||
<field name="partner_id" />
|
||||
</li>
|
||||
</ul>
|
||||
<footer>
|
||||
<div
|
||||
t-if="record.action_available_ids.raw_value"
|
||||
class="d-flex align-items-center gap-1"
|
||||
>
|
||||
<i class="fa fa-list" title="Available Actions" />
|
||||
<field
|
||||
name="action_available_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
</div>
|
||||
<a
|
||||
t-if="record.url.raw_value"
|
||||
t-att-href="record.url.raw_value"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
title="Open Jet URL"
|
||||
class="ms-auto"
|
||||
>
|
||||
<i class="fa fa-external-link" />
|
||||
</a>
|
||||
</footer>
|
||||
</main>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Jet List View -->
|
||||
<record id="cx_tower_jet_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.list</field>
|
||||
<field name="model">cx.tower.jet</field>
|
||||
<field name="arch" type="xml">
|
||||
<list duplicate="false">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field
|
||||
name="jet_template_id"
|
||||
optional="show"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
<field name="server_id" optional="show" />
|
||||
<field name="partner_id" optional="show" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
optional="show"
|
||||
/>
|
||||
<field name="state_id" />
|
||||
<field name="jet_template_state_ids" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Jet Form View -->
|
||||
<record id="cx_tower_jet_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.form</field>
|
||||
<field name="model">cx.tower.jet</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Jet" duplicate="false">
|
||||
<header>
|
||||
<button
|
||||
name="action_run_command"
|
||||
type="object"
|
||||
string="Command"
|
||||
class="btn-primary"
|
||||
icon="fa-code"
|
||||
invisible="current_action_id"
|
||||
/>
|
||||
<button
|
||||
name="action_run_flight_plan"
|
||||
type="object"
|
||||
string="Flight Plan"
|
||||
class="btn-primary"
|
||||
icon="fa-plane"
|
||||
invisible="current_action_id"
|
||||
/>
|
||||
<field name="state_id" widget="statusbar" />
|
||||
<field name="jet_template_state_ids" invisible="1" />
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_open_command_logs"
|
||||
type="object"
|
||||
string="Command Logs"
|
||||
class="oe_stat_button"
|
||||
icon="fa-code"
|
||||
/>
|
||||
<button
|
||||
name="action_open_plan_logs"
|
||||
type="object"
|
||||
string="Flight Plan Logs"
|
||||
class="oe_stat_button"
|
||||
icon="fa-paper-plane"
|
||||
/>
|
||||
<button
|
||||
name="action_open_files"
|
||||
type="object"
|
||||
string="Files"
|
||||
class="oe_stat_button"
|
||||
icon="fa-files-o"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="alert alert-warning"
|
||||
role="alert"
|
||||
invisible="not deletable"
|
||||
style="margin-bottom:0px;"
|
||||
>
|
||||
<p>
|
||||
This jet can be deleted.
|
||||
</p>
|
||||
</div>
|
||||
<field
|
||||
name="icon"
|
||||
widget="image"
|
||||
class="oe_avatar"
|
||||
options="{'preview_image': 'icon'}"
|
||||
readonly="1"
|
||||
/>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. Production Odoo" />
|
||||
</h1>
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="Tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
</div>
|
||||
<group name="general">
|
||||
<group>
|
||||
<field
|
||||
name="reference"
|
||||
placeholder="leave blank to autogenerate"
|
||||
/>
|
||||
<field
|
||||
name="url"
|
||||
placeholder="Jet URL, eg 'https://meme.example.com'"
|
||||
widget="url"
|
||||
/>
|
||||
<field name="partner_id" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="jet_template_domain" invisible="1" />
|
||||
<field name="create_date" invisible="1" />
|
||||
<field
|
||||
name="jet_template_id"
|
||||
readonly="create_date"
|
||||
domain="jet_template_domain"
|
||||
/>
|
||||
<field
|
||||
name="jet_cloned_from_id"
|
||||
invisible="not jet_cloned_from_id"
|
||||
/>
|
||||
<field
|
||||
name="server_id"
|
||||
domain="server_allowed_domain"
|
||||
readonly="create_date"
|
||||
/>
|
||||
<field name="waypoint_id" invisible="not waypoint_id" />
|
||||
<field name="server_allowed_domain" invisible="1" />
|
||||
<field name="deletable" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="state" string="States and Actions">
|
||||
<group name="stats">
|
||||
<field
|
||||
name="show_available_states"
|
||||
widget="boolean_toggle"
|
||||
invisible="current_action_id"
|
||||
/>
|
||||
<field
|
||||
name="current_action_id"
|
||||
invisible="not target_state_id"
|
||||
/>
|
||||
<field
|
||||
name="target_state_id"
|
||||
invisible="not target_state_id"
|
||||
/>
|
||||
<field
|
||||
name="served_jet_request_id"
|
||||
invisible="not served_jet_request_id"
|
||||
/>
|
||||
</group>
|
||||
<group name="states_and_actions">
|
||||
<group
|
||||
name="available_actions"
|
||||
string="Available Actions"
|
||||
>
|
||||
<field
|
||||
name="action_available_ids"
|
||||
string=" "
|
||||
invisible="current_action_id"
|
||||
>
|
||||
<list>
|
||||
<field name="name" />
|
||||
<button
|
||||
type="object"
|
||||
name="trigger"
|
||||
class="fa fa-play oe_highlight"
|
||||
context="{'jet_id': parent.id}"
|
||||
title="Trigger action"
|
||||
confirm="Do you want to trigger this action?"
|
||||
/>
|
||||
</list>
|
||||
<form>
|
||||
<field name="note" invisible="not note" />
|
||||
<field name="name" invisible="note" />
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
<group
|
||||
name="available_states"
|
||||
string="Available States"
|
||||
invisible="not show_available_states"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<field
|
||||
name="state_available_ids"
|
||||
string=" "
|
||||
invisible="current_action_id"
|
||||
>
|
||||
<list>
|
||||
<field name="name" />
|
||||
<button
|
||||
type="object"
|
||||
name="set_state"
|
||||
class="fa fa-check oe_highlight"
|
||||
context="{'jet_id': parent.id}"
|
||||
title="Set state"
|
||||
confirm="Do you want to set this state?"
|
||||
/>
|
||||
</list>
|
||||
<form>
|
||||
<field name="note" invisible="not note" />
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page name="configuration" string="Configuration">
|
||||
<field
|
||||
name="variable_value_ids"
|
||||
order="variable_reference"
|
||||
context="{'default_server_id': False}"
|
||||
>
|
||||
<list editable="bottom">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field
|
||||
name="variable_reference"
|
||||
column_invisible="True"
|
||||
/>
|
||||
<field name="variable_id" />
|
||||
<field
|
||||
name="variable_type"
|
||||
column_invisible="True"
|
||||
/>
|
||||
<field
|
||||
name="value_char"
|
||||
readonly="variable_type == 'o'"
|
||||
widget="ace_tower"
|
||||
/>
|
||||
<field
|
||||
name="option_id"
|
||||
options="{'no_create': True, 'no_create_edit': True}"
|
||||
readonly="variable_type == 's'"
|
||||
/>
|
||||
<field name="access_level" optional="show" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="variable_id" />
|
||||
<field
|
||||
name="variable_reference"
|
||||
widget="CopyClipboardChar"
|
||||
options="{'string': 'Copy reference'}"
|
||||
/>
|
||||
<field
|
||||
name="value_char"
|
||||
widget="CopyClipboardChar"
|
||||
options="{'string': 'Copy value'}"
|
||||
/>
|
||||
<field name="access_level" />
|
||||
</group>
|
||||
<field
|
||||
name="note"
|
||||
placeholder="Put your notes here..."
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="waypoints"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
string="Waypoints"
|
||||
invisible="not is_waypoints_available"
|
||||
>
|
||||
<field name="is_waypoints_available" invisible="1" />
|
||||
<field name="waypoint_ids">
|
||||
<list
|
||||
delete="0"
|
||||
decoration-success="state == 'current'"
|
||||
>
|
||||
<field name="create_date" />
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="access_level" optional="hide" />
|
||||
<field name="waypoint_template_id" />
|
||||
<field
|
||||
name="jet_template_id"
|
||||
column_invisible="True"
|
||||
/>
|
||||
<field name="can_fly_to" column_invisible="True" />
|
||||
<field name="state" />
|
||||
<button
|
||||
type="object"
|
||||
name="prepare"
|
||||
icon="fa-check"
|
||||
string="Prepare"
|
||||
title="Prepare Waypoint"
|
||||
confirm="Do you want to prepare this waypoint?"
|
||||
invisible="state != 'draft'"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
name="fly_to"
|
||||
icon="fa-plane"
|
||||
string="Fly here"
|
||||
title="Fly to this waypoint"
|
||||
confirm="Do you want to fly to this waypoint?"
|
||||
invisible="not can_fly_to"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
name="unlink"
|
||||
icon="fa-trash"
|
||||
string="Delete"
|
||||
title="Delete the Waypoint"
|
||||
confirm="Do you want to delete this waypoint? This action cannot be undone."
|
||||
invisible="state not in [False, 'draft', 'deleted', 'ready', 'error']"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
string="Dependencies"
|
||||
name="dependencies"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<group>
|
||||
<group name="requires" string="Depends on">
|
||||
<div class="o_form_label" />
|
||||
<button
|
||||
name="action_open_requires_jets"
|
||||
type="object"
|
||||
string="Open"
|
||||
title="Open jets that this jet depends on"
|
||||
icon="fa-external-link"
|
||||
/>
|
||||
<field name="jet_requires_ids" string=" ">
|
||||
<list>
|
||||
<field
|
||||
name="jet_depends_on_id"
|
||||
placeholder="..no jet is assigned yet"
|
||||
/>
|
||||
<field
|
||||
name="jet_template_dependency_id"
|
||||
optional="hide"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
<group name="required_by" string="Serves dependencies">
|
||||
<div class="o_form_label" />
|
||||
<button
|
||||
name="action_open_required_by_jets"
|
||||
type="object"
|
||||
string="Open"
|
||||
title="Open jets that depend on this jet"
|
||||
icon="fa-external-link"
|
||||
/>
|
||||
<field name="jet_required_by_ids" string=" ">
|
||||
<list>
|
||||
<field
|
||||
name="jet_id"
|
||||
placeholder="...no jet is assigned yet"
|
||||
/>
|
||||
<field
|
||||
name="jet_template_dependency_id"
|
||||
optional="hide"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page
|
||||
name="access"
|
||||
string="Access"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<group name="access">
|
||||
<field
|
||||
name="user_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="users who can access this jet"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="manager_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="managers who can modify this jet"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
<page name="logs" string="Jet Logs">
|
||||
<field name="server_log_ids">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<button
|
||||
type="object"
|
||||
string="Open"
|
||||
name="action_open_log"
|
||||
title="Open full form"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="scheduled_tasks"
|
||||
string="Scheduled Tasks"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<field name="scheduled_task_ids">
|
||||
<list create="0" edit="0">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="display_name" />
|
||||
<field name="action" />
|
||||
<field name="interval_type" />
|
||||
<field name="interval_number" optional="hide" />
|
||||
<field name="is_running" optional="hide" />
|
||||
<field name="next_call" optional="hide" />
|
||||
<field name="last_call" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="metadata"
|
||||
string="Metadata"
|
||||
groups="base.group_no_one"
|
||||
>
|
||||
<group>
|
||||
<field name="metadata" invisible="1" />
|
||||
<field
|
||||
name="metadata_text"
|
||||
string="Metadata"
|
||||
readonly="1"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
<field name="note" placeholder="Put your notes here..." />
|
||||
</sheet>
|
||||
<chatter />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Jet Search View -->
|
||||
<record id="cx_tower_jet_view_search" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.search</field>
|
||||
<field name="model">cx.tower.jet</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Jets">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference/URL"
|
||||
filter_domain="['|', '|', ('name', 'ilike', self), ('reference', 'ilike', self), ('url', 'ilike', self)]"
|
||||
/>
|
||||
<field name="partner_id" />
|
||||
<field name="server_id" />
|
||||
<field name="jet_template_id" />
|
||||
<field name="user_ids" />
|
||||
<field name="manager_ids" />
|
||||
<filter
|
||||
string="With URL"
|
||||
name="with_url"
|
||||
domain="[('url', '!=', False)]"
|
||||
/>
|
||||
<filter
|
||||
string="Archived"
|
||||
name="inactive"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Deletable"
|
||||
name="deletable"
|
||||
domain="[('deletable', '=', True)]"
|
||||
/>
|
||||
<filter
|
||||
string="Not Deletable"
|
||||
name="not_deletable"
|
||||
domain="[('deletable', '=', False)]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Template"
|
||||
name="group_by_template"
|
||||
context="{'group_by': 'jet_template_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Server"
|
||||
name="group_by_server"
|
||||
context="{'group_by': 'server_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="State"
|
||||
name="group_by_state"
|
||||
context="{'group_by': 'state_id'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field
|
||||
name="state_id"
|
||||
string="State"
|
||||
icon="fa-cog"
|
||||
enable_counters="1"
|
||||
/>
|
||||
<field name="jet_template_id" string="Template" icon="fa-plane" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
string="Tags"
|
||||
select="multi"
|
||||
icon="fa-server"
|
||||
/>
|
||||
<field
|
||||
name="jet_cloned_from_id"
|
||||
string="Cloned from"
|
||||
icon="fa-clone"
|
||||
/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Update Jet Action to include kanban view -->
|
||||
<record id="cx_tower_jet_action" model="ir.actions.act_window">
|
||||
<field name="name">Jets</field>
|
||||
<field name="res_model">cx.tower.jet</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create your first Jet!
|
||||
</p>
|
||||
<p>
|
||||
Jets represent application instances that are managed independently
|
||||
from their host servers.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<!-- Waypoint Template Form View -->
|
||||
<record id="cx_tower_jet_waypoint_template_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.waypoint.template.form</field>
|
||||
<field name="model">cx.tower.jet.waypoint.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field
|
||||
name="name"
|
||||
placeholder="waypoint template name, e.g. 'Snapshot'"
|
||||
/>
|
||||
</h1>
|
||||
</div>
|
||||
<group name="waypoint_template_form_main">
|
||||
<group name="general">
|
||||
<field
|
||||
name="reference"
|
||||
placeholder="Leave blank to autogenerate"
|
||||
/>
|
||||
<field name="access_level" />
|
||||
<field name="jet_template_id" />
|
||||
</group>
|
||||
<group name="flight_plans">
|
||||
<field name="plan_create_id" />
|
||||
<field name="plan_arrive_id" />
|
||||
<field name="plan_leave_id" />
|
||||
<field name="plan_delete_id" />
|
||||
</group>
|
||||
<field name="note" placeholder="Put your notes here" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Waypoint Template List View -->
|
||||
<record id="cx_tower_jet_waypoint_template_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.waypoint.template.list</field>
|
||||
<field name="model">cx.tower.jet.waypoint.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="access_level" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Waypoint Template Search View -->
|
||||
<record id="cx_tower_jet_waypoint_template_view_search" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.waypoint.template.search</field>
|
||||
<field name="model">cx.tower.jet.waypoint.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Waypoint Templates">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="jet_template_id" />
|
||||
<filter
|
||||
string="User Access"
|
||||
name="user_access"
|
||||
domain="[('access_level', '=', '1')]"
|
||||
/>
|
||||
<filter
|
||||
string="Manager Access"
|
||||
name="manager_access"
|
||||
domain="[('access_level', '=', '2')]"
|
||||
/>
|
||||
<filter
|
||||
string="Root Access"
|
||||
name="root_access"
|
||||
domain="[('access_level', '=', '3')]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Jet Template"
|
||||
name="group_by_jet_template"
|
||||
context="{'group_by': 'jet_template_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Access Level"
|
||||
name="group_by_access_level"
|
||||
context="{'group_by': 'access_level'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Waypoint Template Action -->
|
||||
<record id="cx_tower_jet_waypoint_template_action" model="ir.actions.act_window">
|
||||
<field name="name">Waypoint Templates</field>
|
||||
<field name="res_model">cx.tower.jet.waypoint.template</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create your first Waypoint Template!
|
||||
</p>
|
||||
<p>
|
||||
Waypoint Templates define waypoints for jet templates.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
134
addons/cetmix_tower_server/views/cx_tower_jet_waypoint_view.xml
Normal file
134
addons/cetmix_tower_server/views/cx_tower_jet_waypoint_view.xml
Normal file
@@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<!-- Waypoint Form View -->
|
||||
<record id="cx_tower_jet_waypoint_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.waypoint.form</field>
|
||||
<field name="model">cx.tower.jet.waypoint</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<field name="state" widget="statusbar" />
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field
|
||||
name="name"
|
||||
placeholder="waypoint name, e.g. 'Snapshot before update'"
|
||||
/>
|
||||
</h1>
|
||||
</div>
|
||||
<group name="waypoint_form_main">
|
||||
<group name="waypoint_form_general">
|
||||
<field
|
||||
name="reference"
|
||||
readonly="1"
|
||||
invisible="not reference"
|
||||
/>
|
||||
<field
|
||||
name="waypoint_template_id"
|
||||
options="{'no_create': '1', 'no_quick_create': '1'}"
|
||||
/>
|
||||
<field name="access_level" />
|
||||
<field name="jet_id" invisible="1" />
|
||||
<field name="jet_template_id" invisible="1" />
|
||||
</group>
|
||||
<group name="data" groups="base.group_no_one">
|
||||
<field name="variable_values" invisible="1" />
|
||||
<field
|
||||
name="variable_values_text"
|
||||
string="Variable Values"
|
||||
invisible="not variable_values"
|
||||
/>
|
||||
<field name="metadata" invisible="1" />
|
||||
<field
|
||||
name="metadata_text"
|
||||
string="Metadata"
|
||||
invisible="not metadata"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Waypoint List View -->
|
||||
<record id="cx_tower_jet_waypoint_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.waypoint.list</field>
|
||||
<field name="model">cx.tower.jet.waypoint</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="waypoint_template_id" />
|
||||
<field name="jet_template_id" column_invisible="True" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="access_level" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Waypoint Search View -->
|
||||
<record id="cx_tower_jet_waypoint_view_search" model="ir.ui.view">
|
||||
<field name="name">cx.tower.jet.waypoint.search</field>
|
||||
<field name="model">cx.tower.jet.waypoint</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Waypoints">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="jet_id" />
|
||||
<field name="waypoint_template_id" />
|
||||
<filter
|
||||
string="User Access"
|
||||
name="user_access"
|
||||
domain="[('access_level', '=', '1')]"
|
||||
/>
|
||||
<filter
|
||||
string="Manager Access"
|
||||
name="manager_access"
|
||||
domain="[('access_level', '=', '2')]"
|
||||
/>
|
||||
<filter
|
||||
string="Root Access"
|
||||
name="root_access"
|
||||
domain="[('access_level', '=', '3')]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Jet"
|
||||
name="group_by_jet"
|
||||
context="{'group_by': 'jet_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Waypoint Template"
|
||||
name="group_by_waypoint_template"
|
||||
context="{'group_by': 'waypoint_template_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Access Level"
|
||||
name="group_by_access_level"
|
||||
context="{'group_by': 'access_level'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Waypoint Action -->
|
||||
<record id="cx_tower_jet_waypoint_action" model="ir.actions.act_window">
|
||||
<field name="name">Waypoints</field>
|
||||
<field name="res_model">cx.tower.jet.waypoint</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create your first Waypoint!
|
||||
</p>
|
||||
<p>
|
||||
Waypoints represent waypoints for jets.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
151
addons/cetmix_tower_server/views/cx_tower_key_view.xml
Normal file
151
addons/cetmix_tower_server/views/cx_tower_key_view.xml
Normal file
@@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_key_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.key.view.form</field>
|
||||
<field name="model">cx.tower.key</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="reference" widget="CopyClipboardChar" />
|
||||
<field
|
||||
name="reference_code"
|
||||
widget="CopyClipboardChar"
|
||||
options="{'string': 'Copy'}"
|
||||
invisible="key_type == 'k'"
|
||||
/>
|
||||
<field
|
||||
name="key_type"
|
||||
invisible="context.get('secrets_only')"
|
||||
/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="note" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page
|
||||
name="value"
|
||||
string="Key Value"
|
||||
invisible="key_type != 'k'"
|
||||
>
|
||||
<field name="secret_value" />
|
||||
</page>
|
||||
<page
|
||||
name="secret_values"
|
||||
string="Secret Values"
|
||||
invisible="key_type != 's'"
|
||||
>
|
||||
<field name="value_ids">
|
||||
<list
|
||||
editable="bottom"
|
||||
decoration-info="is_global == True"
|
||||
>
|
||||
<field name="is_global" />
|
||||
<field name="partner_id" />
|
||||
<field name="server_id" />
|
||||
<field name="secret_value" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="is_global" />
|
||||
<field name="server_id" invisible="is_global" />
|
||||
<field
|
||||
name="partner_id"
|
||||
invisible="is_global"
|
||||
/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="servers"
|
||||
string="Used for"
|
||||
invisible="key_type != 'k'"
|
||||
>
|
||||
<field name="server_ssh_ids">
|
||||
<list>
|
||||
<field name="name" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="name" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="access"
|
||||
string="Access"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<group name="access">
|
||||
<field
|
||||
name="user_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="users who can view this record"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="manager_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="managers who can modify this record"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_key_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.key.view.search</field>
|
||||
<field name="model">cx.tower.key</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Keys/Secrets">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="server_ssh_ids" string="Servers (SSH)" />
|
||||
<field name="user_ids" />
|
||||
<field name="manager_ids" />
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Key Type"
|
||||
name="group_by_key_type"
|
||||
domain="[]"
|
||||
context="{'group_by': 'key_type'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="key_type" string="Key Type" icon="fa-cog" />
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_key_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.key.view.list</field>
|
||||
<field name="model">cx.tower.key</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="key_type" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_key" model="ir.actions.act_window">
|
||||
<field name="name">SSH Key / Secret</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">cetmix_tower_keys</field>
|
||||
<field name="res_model">cx.tower.key</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
63
addons/cetmix_tower_server/views/cx_tower_os_view.xml
Normal file
63
addons/cetmix_tower_server/views/cx_tower_os_view.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_os_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.os.view.form</field>
|
||||
<field name="model">cx.tower.os</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field
|
||||
name="reference"
|
||||
placeholder="Can contain English letters, digits and '_'. Leave blank to autogenerate"
|
||||
/>
|
||||
<field name="color" widget="color_picker" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="parent_id" />
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_os_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.os.view.list</field>
|
||||
<field name="model">cx.tower.os</field>
|
||||
<field name="arch" type="xml">
|
||||
<list editable="top">
|
||||
<field name="name" />
|
||||
<field name="reference" optional="show" />
|
||||
<field name="parent_id" />
|
||||
<field name="color" widget="color_picker" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_os_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.os.view.search</field>
|
||||
<field name="model">cx.tower.os</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search OS">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="parent_id" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_os" model="ir.actions.act_window">
|
||||
<field name="name">OS</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">cetmix_tower_os</field>
|
||||
<field name="res_model">cx.tower.os</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="cx_tower_os_search_view" />
|
||||
</record>
|
||||
</odoo>
|
||||
169
addons/cetmix_tower_server/views/cx_tower_plan_line_view.xml
Normal file
169
addons/cetmix_tower_server/views/cx_tower_plan_line_view.xml
Normal file
@@ -0,0 +1,169 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_plan_line_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.plan.line.view.form</field>
|
||||
<field name="model">cx.tower.plan.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group name="main">
|
||||
<field name="sequence" />
|
||||
<field
|
||||
name="reference"
|
||||
placeholder="Can contain English letters, digits and '_'. Leave blank to autogenerate"
|
||||
/>
|
||||
<field
|
||||
name="path"
|
||||
placeholder="e.g. /such/much/{{ path }}, overrides command path"
|
||||
invisible="action != 'ssh_command'"
|
||||
/>
|
||||
<label for="command_id" />
|
||||
<div class="o_row">
|
||||
<field name="action" nolabel="1" />
|
||||
<span invisible="action != 'ssh_command'">sudo</span>
|
||||
<field
|
||||
name="use_sudo"
|
||||
invisible="action != 'ssh_command'"
|
||||
/>
|
||||
<field name="command_id" />
|
||||
</div>
|
||||
<field name="plan_run_id" invisible="action != 'plan'" />
|
||||
<field
|
||||
name="file_template_id"
|
||||
invisible="action != 'file_using_template'"
|
||||
/>
|
||||
<field name="note" readonly="1" invisible="not note" />
|
||||
</group>
|
||||
<group name="condition">
|
||||
<field name="condition" widget="ace_tower" />
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="preview" string="Preview">
|
||||
<field
|
||||
name="command_code"
|
||||
invisible="action not in ['ssh_command', 'python_code']"
|
||||
/>
|
||||
<field
|
||||
name="file_template_code"
|
||||
string="Template Code"
|
||||
invisible="action != 'file_using_template'"
|
||||
/>
|
||||
<field
|
||||
name="plan_run_line_ids"
|
||||
string="Flight Plan Lines"
|
||||
invisible="action != 'plan'"
|
||||
>
|
||||
<list>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field
|
||||
name="action"
|
||||
optional="show"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
<field
|
||||
name="tag_ids"
|
||||
optional="show"
|
||||
widget="many2many_tags"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
<field name="use_sudo" optional="show" />
|
||||
<field name="path" optional="show" />
|
||||
<field
|
||||
name="condition"
|
||||
widget="ace_tower"
|
||||
optional="show"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page name="actions" string="Post Run Actions">
|
||||
<field name="action_ids">
|
||||
<list>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="sequence" />
|
||||
<label for="condition" string="If exit code" />
|
||||
<div class="o_row">
|
||||
<field name="condition" />
|
||||
<field name="value_char" />
|
||||
</div>
|
||||
<label for="action" string="Then" />
|
||||
<div class="o_row">
|
||||
<field name="action" />
|
||||
<field
|
||||
name="custom_exit_code"
|
||||
invisible="action != 'ec'"
|
||||
required="action == 'ec'"
|
||||
/>
|
||||
</div>
|
||||
</group>
|
||||
<p>
|
||||
<b>AND</b>
|
||||
</p>
|
||||
<group>
|
||||
<field
|
||||
name="variable_value_ids"
|
||||
order="variable_reference"
|
||||
string="Set Variable Values"
|
||||
>
|
||||
<list editable="bottom">
|
||||
<field
|
||||
name="sequence"
|
||||
widget="handle"
|
||||
/>
|
||||
<field
|
||||
name="reference"
|
||||
optional="hide"
|
||||
/>
|
||||
<field
|
||||
name="variable_reference"
|
||||
optional="hide"
|
||||
/>
|
||||
<field name="variable_id" />
|
||||
<field
|
||||
name="variable_type"
|
||||
column_invisible="1"
|
||||
/>
|
||||
<field
|
||||
name="value_char"
|
||||
readonly="variable_type == 'o'"
|
||||
/>
|
||||
<field
|
||||
name="option_id"
|
||||
options="{'no_create': True, 'no_create_edit': True}"
|
||||
readonly="variable_type == 's'"
|
||||
/>
|
||||
<field
|
||||
name="access_level"
|
||||
optional="show"
|
||||
/>
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="variable_id" />
|
||||
<field name="value_char" />
|
||||
<field name="access_level" />
|
||||
</group>
|
||||
<field
|
||||
name="note"
|
||||
placeholder="Put your notes here..."
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_plan_line_view_action_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.plan.line.view.action.form</field>
|
||||
<field name="model">cx.tower.plan.line.action</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="sequence" />
|
||||
<label for="condition" string="If exit code" />
|
||||
<div class="o_row">
|
||||
<field name="condition" />
|
||||
<field name="value_char" />
|
||||
</div>
|
||||
<label for="action" string="Then" />
|
||||
<div class="o_row">
|
||||
<field name="action" />
|
||||
<field
|
||||
name="custom_exit_code"
|
||||
invisible="action != 'ec'"
|
||||
required="action == 'ec'"
|
||||
/>
|
||||
</div>
|
||||
</group>
|
||||
<p>
|
||||
<b>AND</b>
|
||||
</p>
|
||||
<group>
|
||||
<field
|
||||
name="variable_value_ids"
|
||||
order="variable_reference"
|
||||
string="Set Custom Values"
|
||||
help="Custom values will be available in the current flight plan context only. They can be used in Python commands and line conditions"
|
||||
>
|
||||
<list editable="bottom">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="variable_reference" optional="hide" />
|
||||
<field name="variable_id" />
|
||||
<field name="variable_type" column_invisible="True" />
|
||||
<field
|
||||
name="value_char"
|
||||
readonly="variable_type == 'o'"
|
||||
/>
|
||||
<field
|
||||
name="option_id"
|
||||
options="{'no_create': True, 'no_create_edit': True}"
|
||||
readonly="variable_type == 's'"
|
||||
/>
|
||||
<field name="access_level" optional="show" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="variable_id" />
|
||||
<field name="value_char" />
|
||||
<field name="access_level" />
|
||||
</group>
|
||||
<field
|
||||
name="note"
|
||||
placeholder="Put your notes here..."
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
227
addons/cetmix_tower_server/views/cx_tower_plan_log_view.xml
Normal file
227
addons/cetmix_tower_server/views/cx_tower_plan_log_view.xml
Normal file
@@ -0,0 +1,227 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_plan_log_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.plan.log.view.form</field>
|
||||
<field name="model">cx.tower.plan.log</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
name="action_stop"
|
||||
string="Stop"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
invisible="not is_running or is_stopped"
|
||||
confirm="Flight Plan will be terminated after executing the current command. Continue?"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Running"
|
||||
bg_color="bg-info"
|
||||
invisible="not is_running"
|
||||
/>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Finished"
|
||||
invisible="is_running or is_stopped or not is_running and plan_status != 0"
|
||||
/>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Stopped"
|
||||
bg_color="bg-danger"
|
||||
invisible="not is_stopped"
|
||||
/>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Failed"
|
||||
bg_color="bg-danger"
|
||||
invisible="is_running or is_stopped or not is_running and plan_status == 0"
|
||||
/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="create_uid" />
|
||||
<field name="server_id" />
|
||||
<field
|
||||
name="jet_template_id"
|
||||
invisible="not jet_template_id or jet_id"
|
||||
/>
|
||||
<field name="jet_id" invisible="not jet_id" />
|
||||
<field name="jet_action_id" invisible="not jet_action_id" />
|
||||
<field name="waypoint_id" invisible="not waypoint_id" />
|
||||
<field name="plan_id" />
|
||||
<field
|
||||
name="scheduled_task_id"
|
||||
invisible="not scheduled_task_id"
|
||||
/>
|
||||
<field
|
||||
name="parent_flight_plan_log_id"
|
||||
invisible="not parent_flight_plan_log_id"
|
||||
/>
|
||||
<field name="is_running" invisible="not is_running" />
|
||||
<field name="is_stopped" invisible="not is_stopped" />
|
||||
<field
|
||||
name="plan_line_executed_id"
|
||||
invisible="not is_running"
|
||||
/>
|
||||
<field name="plan_status" invisible="is_running" />
|
||||
<field
|
||||
name="custom_message"
|
||||
invisible="not custom_message"
|
||||
/>
|
||||
<field
|
||||
name="jet_template_install_id"
|
||||
invisible="not jet_template_install_id"
|
||||
/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="label" invisible="not label" />
|
||||
<field name="start_date" />
|
||||
<field name="finish_date" />
|
||||
<field name="duration_current" />
|
||||
</group>
|
||||
<field
|
||||
name="command_log_ids"
|
||||
context="{'opened_from_plan': True}"
|
||||
>
|
||||
<list
|
||||
decoration-danger="command_status not in [0, -205]"
|
||||
decoration-info="is_running == True"
|
||||
decoration-muted="command_status == -205"
|
||||
default_order="id asc"
|
||||
>
|
||||
<field name="id" column_invisible="1" />
|
||||
<field name="command_id" optional="show" />
|
||||
<field name="command_action" optional="show" />
|
||||
<field name="start_date" optional="hide" />
|
||||
<field name="finish_date" optional="hide" />
|
||||
<field name="duration_current" optional="show" />
|
||||
<field name="command_status" optional="show" />
|
||||
<field name="is_running" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_plan_log_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.plan.log.view.list</field>
|
||||
<field name="model">cx.tower.plan.log</field>
|
||||
<field name="arch" type="xml">
|
||||
<list
|
||||
decoration-danger="plan_status != 0"
|
||||
decoration-info="is_running == True"
|
||||
>
|
||||
<header>
|
||||
<button
|
||||
name="action_stop"
|
||||
string="Stop"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
confirm="Flight Plan will be terminated after executing the current command. Continue?"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
</header>
|
||||
<field name="start_date" />
|
||||
<field name="finish_date" optional="hide" />
|
||||
<field name="duration_current" optional="show" />
|
||||
<field name="server_id" optional="show" />
|
||||
<field name="plan_id" optional="show" />
|
||||
<field name="parent_flight_plan_log_id" optional="hide" />
|
||||
<field name="plan_status" optional="show" />
|
||||
<field name="is_running" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_plan_log_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.plan.log.view.search</field>
|
||||
<field name="model">cx.tower.plan.log</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Flight Plan Log">
|
||||
<field name="plan_id" />
|
||||
<field name="server_id" />
|
||||
<field name="jet_id" />
|
||||
<field name="jet_template_id" />
|
||||
<field name="label" />
|
||||
<filter
|
||||
string="Success"
|
||||
name="filter_success"
|
||||
domain="[('plan_status', '=', 0)]"
|
||||
/>
|
||||
<filter
|
||||
string="Error"
|
||||
name="filter_error"
|
||||
domain="[('plan_status', '!=', 0)]"
|
||||
/>
|
||||
<filter
|
||||
string="Running Now"
|
||||
name="filter_is_running"
|
||||
domain="[('is_running', '=', True)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Labeled"
|
||||
name="filter_labeled"
|
||||
domain="[('label', '!=', False)]"
|
||||
/>
|
||||
<filter
|
||||
string="Main plans"
|
||||
name="filter_main_plans"
|
||||
domain="[('parent_flight_plan_log_id', '=', False)]"
|
||||
/>
|
||||
<filter
|
||||
string="Child plans"
|
||||
name="filter_child_plans"
|
||||
domain="[('parent_flight_plan_log_id', '!=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Server"
|
||||
name="group_server"
|
||||
domain="[]"
|
||||
context="{'group_by': 'server_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Flight Plan"
|
||||
name="group_plan"
|
||||
domain="[]"
|
||||
context="{'group_by': 'plan_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Start date"
|
||||
name="group_start"
|
||||
domain="[]"
|
||||
context="{'group_by': 'start_date:day'}"
|
||||
/>
|
||||
<filter
|
||||
string="Finish date"
|
||||
name="group_finish"
|
||||
domain="[]"
|
||||
context="{'group_by': 'finish_date:day'}"
|
||||
/>
|
||||
<filter
|
||||
string="Main plan"
|
||||
name="group_main_plan"
|
||||
domain="[]"
|
||||
context="{'group_by': 'parent_flight_plan_log_id'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_plan_log" model="ir.actions.act_window">
|
||||
<field name="name">Flight Plan Log</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">cetmix_tower_flight_plan_logs</field>
|
||||
<field name="res_model">cx.tower.plan.log</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="context">{'search_default_filter_main_plans': 1}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
212
addons/cetmix_tower_server/views/cx_tower_plan_view.xml
Normal file
212
addons/cetmix_tower_server/views/cx_tower_plan_view.xml
Normal file
@@ -0,0 +1,212 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_plan_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.plan.view.form</field>
|
||||
<field name="model">cx.tower.plan</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_open_plan_logs"
|
||||
type="object"
|
||||
string="Logs"
|
||||
class="oe_stat_button"
|
||||
icon="fa-paper-plane"
|
||||
/>
|
||||
</div>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<div
|
||||
groups="cetmix_tower_server.group_root,cetmix_tower_server.group_manager"
|
||||
class="alert alert-warning"
|
||||
role="alert"
|
||||
invisible="not access_level_warn_msg"
|
||||
style="margin-bottom:0px;"
|
||||
>
|
||||
<p>
|
||||
<i
|
||||
class="fa fa-info-circle"
|
||||
role="img"
|
||||
aria-label="Info"
|
||||
title="Info"
|
||||
/>
|
||||
<span>&nbsp;</span>
|
||||
<field name="access_level_warn_msg" class="text-center" />
|
||||
</p>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
<field name="allow_parallel_run" />
|
||||
<field name="active" invisible='1' />
|
||||
<label for="on_error_action" />
|
||||
<div class="o_row">
|
||||
<field name="on_error_action" />
|
||||
<field
|
||||
name="custom_exit_code"
|
||||
invisible="on_error_action != 'ec'"
|
||||
required="on_error_action == 'ec'"
|
||||
/>
|
||||
</div>
|
||||
<field name="note" />
|
||||
</group>
|
||||
<group>
|
||||
<field
|
||||
name="server_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
<field name="access_level" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="plan_lines" string="Commands">
|
||||
<field name="line_ids">
|
||||
<list decoration-bf="action=='plan'">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="action" optional="show" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
optional="show"
|
||||
widget="many2many_tags"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
<field name="use_sudo" optional="show" />
|
||||
<field name="path" optional="show" />
|
||||
<field
|
||||
name="condition"
|
||||
widget="ace_tower"
|
||||
options="{'mode': 'python'}"
|
||||
optional="show"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="access"
|
||||
string="Access"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<group name="access">
|
||||
<field
|
||||
name="user_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="users who can view this record"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="manager_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="managers who can modify this record"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_plan_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.plan.view.list</field>
|
||||
<field name="model">cx.tower.plan</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="access_level" optional="hide" />
|
||||
<field
|
||||
name="server_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
optional="show"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_plan_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.plan.view.search</field>
|
||||
<field name="model">cx.tower.plan</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Flight Plans">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="user_ids" />
|
||||
<field name="manager_ids" />
|
||||
<filter
|
||||
string="Global"
|
||||
name="filter_global"
|
||||
domain="[('server_ids', '=', False)]"
|
||||
/>
|
||||
<filter
|
||||
string="Server tight"
|
||||
name="server_tight"
|
||||
domain="[('server_ids', '!=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Tagged"
|
||||
name="filter_tagged"
|
||||
domain="[('tag_ids', '!=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Archived"
|
||||
name="archived"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Access Level"
|
||||
name="group_access_level"
|
||||
domain="[]"
|
||||
context="{'group_by': 'access_level'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="access_level" string="Access Level" icon="fa-shield" />
|
||||
<field name="tag_ids" string="Tags" icon="fa-tags" select="multi" />
|
||||
<field
|
||||
name="server_ids"
|
||||
string="Servers"
|
||||
icon="fa-server"
|
||||
select="multi"
|
||||
/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_plan" model="ir.actions.act_window">
|
||||
<field name="name">Flight Plan</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">cetmix_tower_flight_plans</field>
|
||||
<field name="res_model">cx.tower.plan</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,267 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_cx_tower_scheduled_task_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.scheduled.task.view.list</field>
|
||||
<field name="model">cx.tower.scheduled.task</field>
|
||||
<field name="arch" type="xml">
|
||||
<list decoration-info="is_running == True" decoration-muted="not active">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="action" />
|
||||
<field name="active" optional="hide" />
|
||||
<field name="interval_number" invisible="interval_type == 'dow'" />
|
||||
<field name="interval_type" />
|
||||
<field name="next_call" optional="hide" />
|
||||
<field name="last_call" optional="hide" />
|
||||
<field name="is_running" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_cx_tower_scheduled_task_view_calendar" model="ir.ui.view">
|
||||
<field name="name">cx.tower.scheduled.task.view.calendar</field>
|
||||
<field name="model">cx.tower.scheduled.task</field>
|
||||
<field name="arch" type="xml">
|
||||
<calendar date_start="next_call" string="Next Call" color="interval_type">
|
||||
<field name="name" />
|
||||
<field name="action" />
|
||||
<field name="interval_type" />
|
||||
<field name="interval_number" invisible="interval_type == 'dow'" />
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_cx_tower_scheduled_task_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.scheduled.task.view.form</field>
|
||||
<field name="model">cx.tower.scheduled.task</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
name="action_run"
|
||||
string="Run Manually"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
invisible="is_running"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Running"
|
||||
bg_color="bg-info"
|
||||
invisible="not is_running"
|
||||
/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_open_command_logs"
|
||||
type="object"
|
||||
string="Command Logs"
|
||||
invisible="action != 'command'"
|
||||
class="oe_stat_button"
|
||||
icon="fa-code"
|
||||
/>
|
||||
<button
|
||||
name="action_open_plan_logs"
|
||||
type="object"
|
||||
string="Flight Plan Logs"
|
||||
invisible="action != 'plan'"
|
||||
class="oe_stat_button"
|
||||
icon="fa-paper-plane"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="alert alert-warning"
|
||||
role="alert"
|
||||
invisible="not warning_message"
|
||||
>
|
||||
<p>
|
||||
<i
|
||||
class="fa fa-info-circle"
|
||||
role="img"
|
||||
aria-label="Info"
|
||||
title="Info"
|
||||
/>
|
||||
<span>&nbsp;</span>
|
||||
<field name="warning_message" class="text-center" />
|
||||
</p>
|
||||
</div>
|
||||
<group name="main">
|
||||
<group name="info">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
<field name="active" />
|
||||
<field name="sequence" />
|
||||
<field name="action" />
|
||||
<field name="command_id" invisible="action != 'command'" />
|
||||
<field name="plan_id" invisible="action != 'plan'" />
|
||||
<field name="is_running" invisible="1" />
|
||||
</group>
|
||||
<group name="schedule">
|
||||
<field name="interval_number" />
|
||||
<field name="interval_type" />
|
||||
<field
|
||||
name="last_call"
|
||||
readonly="1"
|
||||
invisible="is_running"
|
||||
/>
|
||||
<field name="next_call" />
|
||||
<label
|
||||
for="monday"
|
||||
string="Days of Week"
|
||||
invisible="interval_type != 'dow'"
|
||||
/>
|
||||
<div class="o_row" invisible="interval_type != 'dow'">
|
||||
<span class="o_form_label">Mo</span>
|
||||
<field name="monday" />
|
||||
<span class="o_form_label">Tu</span>
|
||||
<field name="tuesday" />
|
||||
<span class="o_form_label">We</span>
|
||||
<field name="wednesday" />
|
||||
<span class="o_form_label">Th</span>
|
||||
<field name="thursday" />
|
||||
<span class="o_form_label">Fr</span>
|
||||
<field name="friday" />
|
||||
<span class="o_form_label">Sa</span>
|
||||
<field name="saturday" />
|
||||
<span class="o_form_label">Su</span>
|
||||
<field name="sunday" />
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="servers" string="Servers">
|
||||
<field name="server_ids">
|
||||
<list create="0" edit="0">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page name="server_templates" string="Server Templates">
|
||||
<field name="server_template_ids">
|
||||
<list create="0" edit="0">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page name="jets" string="Jets">
|
||||
<field name="jet_ids">
|
||||
<list create="0" edit="0">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
<field name="jet_template_id" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page name="jet_templates" string="Jet Templates">
|
||||
<field name="jet_template_ids">
|
||||
<list create="0" edit="0">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page name="configuration_values" string="Configuration Values">
|
||||
<field name="custom_variable_value_ids">
|
||||
<list editable="bottom">
|
||||
<field name="variable_id" />
|
||||
<field
|
||||
name="variable_type"
|
||||
column_invisible="True"
|
||||
/>
|
||||
<field
|
||||
name="value_char"
|
||||
readonly="variable_type != 's'"
|
||||
/>
|
||||
<field
|
||||
name="option_id"
|
||||
readonly="variable_type != 'o'"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page name="access" string="Access">
|
||||
<group name="access">
|
||||
<field
|
||||
name="user_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="users who can view this record"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="manager_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="managers who can modify this record"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_scheduled_task_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.scheduled.task.search</field>
|
||||
<field name="model">cx.tower.scheduled.task</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Scheduled Tasks">
|
||||
<field name="command_id" />
|
||||
<field name="plan_id" />
|
||||
<field name="server_ids" />
|
||||
<field name="user_ids" />
|
||||
<field name="manager_ids" />
|
||||
<filter
|
||||
string="All"
|
||||
name="all"
|
||||
domain="['|', ('active', '=', True), ('active', '=', False)]"
|
||||
/>
|
||||
<filter
|
||||
string="Archived"
|
||||
name="archived"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Running"
|
||||
name="running"
|
||||
domain="[('is_running', '=', True)]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Action"
|
||||
name="group_by_action"
|
||||
domain="[]"
|
||||
context="{'group_by': 'action'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="action" string="Action" icon="fa-cog" />
|
||||
<field name="interval_type" string="Interval Type" icon="fa-cog" />
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_scheduled_task" model="ir.actions.act_window">
|
||||
<field name="name">Scheduled Tasks</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">cx.tower.scheduled.task</field>
|
||||
<field name="path">cetmix_tower_scheduled_tasks</field>
|
||||
<field name="view_mode">list,calendar,form</field>
|
||||
<field name="search_view_id" ref="cx_tower_scheduled_task_search_view" />
|
||||
<field name="context">{'search_default_all': 1}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_server_log_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.server.log.view.form</field>
|
||||
<field name="model">cx.tower.server.log</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
name="action_update_log"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
string="Refresh"
|
||||
invisible="not server_id"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1 class="d-flex flex-grow justify-content-between">
|
||||
<field name="name" />
|
||||
</h1>
|
||||
<h3>
|
||||
<field
|
||||
name="reference"
|
||||
placeholder="Can contain English letters, digits and '_'. Leave blank to autogenerate"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
</h3>
|
||||
</div>
|
||||
<group>
|
||||
<field name="server_id" invisible="1" />
|
||||
<field name="server_template_id" invisible="1" />
|
||||
<field name="jet_template_id" invisible="1" />
|
||||
<field name="jet_id" invisible="1" />
|
||||
<field
|
||||
name="access_level"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
<field
|
||||
name="log_type"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
<field
|
||||
name="command_id"
|
||||
invisible="log_type != 'command'"
|
||||
required="log_type == 'command'"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
<field
|
||||
name="use_sudo"
|
||||
invisible="log_type != 'command'"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
<field
|
||||
name="file_id"
|
||||
invisible="log_type != 'file'"
|
||||
required="log_type == 'file'"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
</group>
|
||||
<field name="log_html" />
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,356 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_server_template_view_kanban" model="ir.ui.view">
|
||||
<field name="name">cx.tower.server.template.view.kanban</field>
|
||||
<field name="model">cx.tower.server.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban highlight_color="color" records_draggable="0">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
<field name="tag_ids" />
|
||||
<field name="os_id" />
|
||||
<field name="color" />
|
||||
<field name="server_count" />
|
||||
<templates>
|
||||
<t t-name="menu">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-8 o_kanban_card_manage_section">
|
||||
<div role="menuitem">
|
||||
<a
|
||||
role="menuitem"
|
||||
type="object"
|
||||
name="action_create_server"
|
||||
>Create Server</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_card_manage_settings row">
|
||||
<div role="menuitem" aria-haspopup="true" class="col-6">
|
||||
<field name="color" widget="kanban_color_picker" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="card">
|
||||
<strong class="fs-5 d-block mb-1">
|
||||
<field name="name" />
|
||||
</strong>
|
||||
<ul class="list-unstyled text-muted small flex-grow-1 mb-0">
|
||||
<li t-if="record.server_count.raw_value">
|
||||
<strong>Servers:</strong>
|
||||
<field name="server_count" />
|
||||
</li>
|
||||
<li t-if="record.os_id.raw_value">
|
||||
<strong>Operating System:</strong>
|
||||
<field name="os_id" />
|
||||
</li>
|
||||
</ul>
|
||||
<footer>
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
invisible="not tag_ids"
|
||||
/>
|
||||
</footer>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_server_template_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.server.template.view.list</field>
|
||||
<field name="model">cx.tower.server.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="reference" optional="show" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
optional="show"
|
||||
/>
|
||||
<field name="color" widget="color_picker" optional="show" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_server_template_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.server.template.view.form</field>
|
||||
<field name="model">cx.tower.server.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
name="action_create_server"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
string="Create Server"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_open_servers"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-server"
|
||||
>
|
||||
<field
|
||||
name="server_count"
|
||||
widget="statinfo"
|
||||
string="Servers"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<div class="oe_title">
|
||||
<field name="color" widget="color_picker" />
|
||||
<h1 class="d-flex flex-grow justify-content-between">
|
||||
<field name="name" placeholder="Name" />
|
||||
</h1>
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="Tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
</div>
|
||||
<group>
|
||||
<field
|
||||
name="reference"
|
||||
placeholder="Reference. Can contain English letters, digits and '_'. Leave blank to autogenerate"
|
||||
/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="General" string="General Settings">
|
||||
<group name="root">
|
||||
<group name="main">
|
||||
<field name="flight_plan_id" />
|
||||
<field name="plan_delete_id" />
|
||||
<field name="os_id" />
|
||||
<field name="active" invisible='1' />
|
||||
</group>
|
||||
<group name="ssh">
|
||||
<field name="ssh_auth_mode" />
|
||||
<field name="ssh_port" />
|
||||
<field name="ssh_username" />
|
||||
<field name="use_sudo" placeholder="No/Undefined" />
|
||||
<field name="ssh_password" password="True" />
|
||||
<field
|
||||
name="ssh_key_id"
|
||||
context="{'default_key_type': 'k', 'secrets_only': True}"
|
||||
/>
|
||||
</group>
|
||||
<field name="note" placeholder="Put your notes here" />
|
||||
</group>
|
||||
</page>
|
||||
<page name="variables" string="Configuration">
|
||||
<field name="variable_value_ids" order="variable_reference">
|
||||
<list editable="bottom">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field
|
||||
name="variable_reference"
|
||||
column_invisible="1"
|
||||
/>
|
||||
<field name="variable_id" />
|
||||
<field name="variable_type" column_invisible="1" />
|
||||
<field
|
||||
name="value_char"
|
||||
readonly="variable_type == 'o'"
|
||||
widget="ace_tower"
|
||||
/>
|
||||
<field
|
||||
name="option_id"
|
||||
options="{'no_create': True, 'no_create_edit': True}"
|
||||
readonly="variable_type == 's'"
|
||||
/>
|
||||
<field name="access_level" optional="show" />
|
||||
<field name="required" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="variable_id" />
|
||||
<field
|
||||
name="variable_reference"
|
||||
widget="CopyClipboardChar"
|
||||
options="{'string': 'Copy reference'}"
|
||||
/>
|
||||
<field
|
||||
name="value_char"
|
||||
widget="CopyClipboardChar"
|
||||
options="{'string': 'Copy value'}"
|
||||
/>
|
||||
<field name="access_level" />
|
||||
<field name="required" />
|
||||
</group>
|
||||
<field
|
||||
name="note"
|
||||
placeholder="Put your notes here..."
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="access"
|
||||
string="Access"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<group name="access">
|
||||
<field
|
||||
name="user_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="users who can access this template"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="manager_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="managers who can modify this template"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
<page name="logs" string="Server Logs">
|
||||
<field name="server_log_ids">
|
||||
<list>
|
||||
<field name="name" />
|
||||
</list>
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1
|
||||
class="d-flex flex-grow justify-content-between"
|
||||
>
|
||||
<field name="name" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<field
|
||||
name="server_template_id"
|
||||
invisible="1"
|
||||
/>
|
||||
<field name="access_level" />
|
||||
<field name="log_type" />
|
||||
<field
|
||||
name="command_id"
|
||||
domain="[('server_ids', '=', False)]"
|
||||
invisible="log_type != 'command'"
|
||||
required="log_type == 'command'"
|
||||
/>
|
||||
<field
|
||||
name="use_sudo"
|
||||
invisible="log_type != 'command'"
|
||||
/>
|
||||
<field
|
||||
name="file_template_id"
|
||||
invisible="log_type != 'file'"
|
||||
required="log_type == 'file'"
|
||||
/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page name="shortcuts" string="Shortcuts">
|
||||
<field name="shortcut_ids">
|
||||
<list create="0" edit="0">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="action" optional="hide" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="action" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page name="scheduled_tasks" string="Scheduled Tasks">
|
||||
<field name="scheduled_task_ids">
|
||||
<list create="0" edit="0">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="action" optional="hide" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="action" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_server_template_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.server.template.view.search</field>
|
||||
<field name="model">cx.tower.server.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Server Templates">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="user_ids" />
|
||||
<field name="manager_ids" />
|
||||
<filter
|
||||
string="Archived"
|
||||
name="archived"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="OS"
|
||||
name="group_by_os"
|
||||
domain="[]"
|
||||
context="{'group_by': 'os_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Users"
|
||||
name="group_by_user_ids"
|
||||
domain="[]"
|
||||
context="{'group_by': 'user_ids'}"
|
||||
/>
|
||||
<filter
|
||||
string="Managers"
|
||||
name="group_by_manager_ids"
|
||||
domain="[]"
|
||||
context="{'group_by': 'manager_ids'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="tag_ids" string="Tags" icon="fa-tags" select="multi" />
|
||||
<field name="os_id" string="OS" icon="fa-server" />
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_server_template" model="ir.actions.act_window">
|
||||
<field name="name">Server Templates</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">cx.tower.server.template</field>
|
||||
<field name="path">cetmix_tower_server_templates</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="search_view_id" ref="cx_tower_server_template_search_view" />
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">Add a new server template</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
604
addons/cetmix_tower_server/views/cx_tower_server_view.xml
Normal file
604
addons/cetmix_tower_server/views/cx_tower_server_view.xml
Normal file
@@ -0,0 +1,604 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_server_view_kanban" model="ir.ui.view">
|
||||
<field name="name">cx.tower.server.view.kanban</field>
|
||||
<field name="model">cx.tower.server</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban highlight_color="color" records_draggable="0" sample="1">
|
||||
<field name="name" />
|
||||
<field name="url" />
|
||||
<field name="partner_id" />
|
||||
<field name="tag_ids" />
|
||||
<field name="os_id" />
|
||||
<field name="ip_v4_address" />
|
||||
<field name="ip_v6_address" />
|
||||
<field name="color" />
|
||||
<templates>
|
||||
<t t-name="menu">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-8 o_kanban_card_manage_section">
|
||||
<div role="menuitem">
|
||||
<a
|
||||
role="menuitem"
|
||||
type="object"
|
||||
name="action_run_command"
|
||||
>Command</a>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a
|
||||
role="menuitem"
|
||||
type="object"
|
||||
name="action_run_flight_plan"
|
||||
>Flight Plan</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_card_manage_settings row">
|
||||
<div role="menuitem" aria-haspopup="true" class="col-6">
|
||||
<field name="color" widget="kanban_color_picker" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="card">
|
||||
<div
|
||||
class="d-flex justify-content-between align-items-start mb-1"
|
||||
>
|
||||
<strong class="fs-5">
|
||||
<field name="name" />
|
||||
</strong>
|
||||
<field
|
||||
name="status"
|
||||
widget="server_status"
|
||||
options="{'hide_label': False}"
|
||||
/>
|
||||
</div>
|
||||
<div t-if="record.url.raw_value" class="mb-1">
|
||||
<field name="url" widget="url" />
|
||||
</div>
|
||||
<ul class="list-unstyled text-muted small flex-grow-1 mb-0">
|
||||
<li t-if="record.partner_id.raw_value">
|
||||
<strong>Partner:</strong>
|
||||
<field name="partner_id" />
|
||||
</li>
|
||||
<li
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
t-if="record.os_id.raw_value"
|
||||
>
|
||||
<strong>Operating System:</strong>
|
||||
<field name="os_id" />
|
||||
</li>
|
||||
<li
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
t-if="record.ip_v4_address.raw_value"
|
||||
>
|
||||
<strong>IPv4:</strong>
|
||||
<field name="ip_v4_address" />
|
||||
</li>
|
||||
<li
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
t-if="record.ip_v6_address.raw_value"
|
||||
>
|
||||
<strong>IPv6:</strong>
|
||||
<field name="ip_v6_address" />
|
||||
</li>
|
||||
</ul>
|
||||
<footer>
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
invisible="not tag_ids"
|
||||
/>
|
||||
</footer>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_server_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.server.view.list</field>
|
||||
<field name="model">cx.tower.server</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<header>
|
||||
<button
|
||||
name="action_run_command"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
string="Command"
|
||||
icon="fa-code"
|
||||
/>
|
||||
<button
|
||||
name="action_run_flight_plan"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
string="Flight Plan"
|
||||
icon="fa-plane"
|
||||
/>
|
||||
</header>
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="partner_id" optional="show" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
optional="show"
|
||||
/>
|
||||
<field name="color" widget="color_picker" optional="show" />
|
||||
<field
|
||||
name="status"
|
||||
widget="badge"
|
||||
decoration-danger="status == 'stopped'"
|
||||
decoration-info="status in ['stopping','restarting','starting']"
|
||||
decoration-success="status == 'running'"
|
||||
decoration-warning="status in ['deleting','delete_error']"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_server_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.server.view.form</field>
|
||||
<field name="model">cx.tower.server</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
name="action_run_command"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
string="Command"
|
||||
icon="fa-code"
|
||||
/>
|
||||
<button
|
||||
name="action_run_flight_plan"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
string="Flight Plan"
|
||||
icon="fa-paper-plane"
|
||||
/>
|
||||
<button
|
||||
name="action_new_jet"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
string="New Jet"
|
||||
icon="fa-plane"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
invisible="not jet_template_ids"
|
||||
/>
|
||||
<button
|
||||
name="test_ssh_connection"
|
||||
type="object"
|
||||
icon="fa-check-square-o"
|
||||
string="Test Connection"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_open_command_logs"
|
||||
type="object"
|
||||
string="Command Logs"
|
||||
class="oe_stat_button"
|
||||
icon="fa-code"
|
||||
/>
|
||||
<button
|
||||
name="action_open_plan_logs"
|
||||
type="object"
|
||||
string="Flight Plan Logs"
|
||||
class="oe_stat_button"
|
||||
icon="fa-paper-plane"
|
||||
/>
|
||||
<button
|
||||
name="action_open_files"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-files-o"
|
||||
>
|
||||
<field name="file_count" widget="statinfo" string="Files" />
|
||||
</button>
|
||||
<button
|
||||
name="action_open_jets"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-plane"
|
||||
>
|
||||
<field name="jet_count" string="Jets" widget="statinfo" />
|
||||
</button>
|
||||
</div>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<div class="oe_title">
|
||||
<field name="color" widget="color_picker" />
|
||||
<h1 class="d-flex flex-grow justify-content-between">
|
||||
<field name="name" placeholder="Name" />
|
||||
<field
|
||||
name="status"
|
||||
widget="server_status"
|
||||
options="{'hide_label': False}"
|
||||
class="ml-auto"
|
||||
/>
|
||||
</h1>
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="Tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
</div>
|
||||
<group>
|
||||
<field
|
||||
name="reference"
|
||||
placeholder="Reference. Can contain English letters, digits and '_'. Leave blank to autogenerate"
|
||||
/>
|
||||
<field
|
||||
name="url"
|
||||
placeholder="Server URL, eg 'https://meme.example.com'"
|
||||
widget="url"
|
||||
/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="shortcuts" string="Shortcuts">
|
||||
<field name="shortcut_ids">
|
||||
<list create="0" edit="0">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="action" optional="hide" />
|
||||
<button
|
||||
type="object"
|
||||
name="run"
|
||||
class="fa fa-play oe_highlight"
|
||||
context="{'server_id': parent.id}"
|
||||
title="Trigger shortcut"
|
||||
confirm="Are you sure?"
|
||||
/>
|
||||
</list>
|
||||
<form>
|
||||
<field name="note" readonly="1" />
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page name="General" string="General Settings">
|
||||
<group name="root">
|
||||
<group name="main">
|
||||
<field name="id" invisible="1" />
|
||||
<field name="partner_id" />
|
||||
<field name="os_id" />
|
||||
<field name="active" invisible='1' />
|
||||
<field name="ip_v4_address" />
|
||||
<field name="ip_v6_address" />
|
||||
<label
|
||||
for="host_key"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
invisible="skip_host_key"
|
||||
/>
|
||||
<div
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
class="o_row"
|
||||
invisible="skip_host_key"
|
||||
>
|
||||
<field name="host_key" placeholder="Host key" />
|
||||
<button
|
||||
name="action_show_host_key"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
type="object"
|
||||
string="Get from Host"
|
||||
class="btn-secondary"
|
||||
/>
|
||||
</div>
|
||||
<field
|
||||
name="skip_host_key"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
<div class="o_form_label" />
|
||||
<div
|
||||
class="alert alert-warning"
|
||||
id="host_key_alert"
|
||||
role="alert"
|
||||
style="margin-bottom:0px;"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
invisible="not skip_host_key"
|
||||
>
|
||||
In the Secure Shell (SSH) protocol, host keys are used to verify the identity of remote hosts. Accepting unknown host keys may leave the connection open to man-in-the-middle attacks.
|
||||
</div>
|
||||
</group>
|
||||
<group name="ssh">
|
||||
<field name="ssh_auth_mode" />
|
||||
<field name="ssh_port" />
|
||||
<field name="ssh_username" />
|
||||
<field name="use_sudo" placeholder="No" />
|
||||
<field
|
||||
name="ssh_password"
|
||||
required="ssh_auth_mode == 'p'"
|
||||
/>
|
||||
<field
|
||||
name="ssh_key_id"
|
||||
required="ssh_auth_mode == 'k'"
|
||||
context="{'default_key_type': 'k', 'secrets_only': True}"
|
||||
/>
|
||||
</group>
|
||||
<group name="extra">
|
||||
<field
|
||||
name="server_template_id"
|
||||
invisible="not server_template_id"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
<field name="plan_delete_id" />
|
||||
</group>
|
||||
<field name="note" placeholder="Put your notes here" />
|
||||
</group>
|
||||
</page>
|
||||
<page name="configuration" string="Configuration">
|
||||
<field name="variable_value_ids" order="variable_reference">
|
||||
<list editable="bottom">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field
|
||||
name="variable_reference"
|
||||
column_invisible="1"
|
||||
/>
|
||||
<field name="variable_id" />
|
||||
<field name="variable_type" column_invisible="1" />
|
||||
<field
|
||||
name="value_char"
|
||||
widget="ace_tower"
|
||||
readonly="variable_type == 'o'"
|
||||
/>
|
||||
<field
|
||||
name="option_id"
|
||||
options="{'no_create': True, 'no_create_edit': True}"
|
||||
readonly="variable_type == 's'"
|
||||
/>
|
||||
<field name="access_level" optional="show" />
|
||||
<field name="required" optional="show" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="variable_id" />
|
||||
<field
|
||||
name="variable_reference"
|
||||
widget="CopyClipboardChar"
|
||||
options="{'string': 'Copy reference'}"
|
||||
/>
|
||||
<field
|
||||
name="value_char"
|
||||
widget="CopyClipboardChar"
|
||||
options="{'string': 'Copy value'}"
|
||||
/>
|
||||
<field name="access_level" />
|
||||
<field name="required" />
|
||||
</group>
|
||||
<field
|
||||
name="note"
|
||||
placeholder="Put your notes here..."
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="access"
|
||||
string="Access"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<group name="access">
|
||||
<field
|
||||
name="user_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="users who can access this server"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="manager_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="managers who can modify this server"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
<page
|
||||
name="secrets"
|
||||
string="Secrets"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<field name="secret_ids">
|
||||
<list editable="bottom">
|
||||
<field
|
||||
name="key_id"
|
||||
context="{'default_key_type': 's', 'secrets_only': True}"
|
||||
/>
|
||||
<field name="secret_value" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page name="logs" string="Server Logs">
|
||||
<button
|
||||
name="action_update_server_logs"
|
||||
string="Refresh All"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
/>
|
||||
<field name="server_log_ids">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="jet_id" />
|
||||
<button
|
||||
type="object"
|
||||
string="Open"
|
||||
name="action_open_log"
|
||||
title="Open full form"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="scheduled_tasks"
|
||||
string="Scheduled Tasks"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<field name="scheduled_task_ids">
|
||||
<list create="0" edit="0">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="display_name" />
|
||||
<field name="action" />
|
||||
<field name="interval_type" />
|
||||
<field name="interval_number" optional="hide" />
|
||||
<field name="is_running" optional="hide" />
|
||||
<field name="next_call" optional="hide" />
|
||||
<field name="last_call" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="jet_templates"
|
||||
string="Jet Templates"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<button
|
||||
name="action_install_jet_template"
|
||||
string="Install Jet Template"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
/>
|
||||
<field name="jet_template_ids">
|
||||
<list create="0" edit="0">
|
||||
<field name="name" />
|
||||
<button
|
||||
name="action_uninstall_from_server"
|
||||
type="object"
|
||||
string="Uninstall"
|
||||
class="btn-danger"
|
||||
confirm="Jet template will be uninstalled from the server. Are you sure?"
|
||||
context="{'server_id': parent.id}"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="metadata"
|
||||
string="Metadata"
|
||||
groups="base.group_no_one"
|
||||
>
|
||||
<group>
|
||||
<field name="metadata" invisible="1" />
|
||||
<field
|
||||
name="metadata_text"
|
||||
string="Metadata"
|
||||
readonly="1"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_server_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.server.view.search</field>
|
||||
<field name="model">cx.tower.server</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Servers">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="url" />
|
||||
<field name="partner_id" />
|
||||
<field name="user_ids" />
|
||||
<field name="manager_ids" />
|
||||
<field name="ip_v4_address" />
|
||||
<field name="ip_v6_address" />
|
||||
<filter
|
||||
string="Archived"
|
||||
name="archived"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Running"
|
||||
name="running"
|
||||
domain="[('status', '=', 'running')]"
|
||||
/>
|
||||
<filter
|
||||
string="Not Running"
|
||||
name="not_running"
|
||||
domain="[('status', '!=', 'running')]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="With Jets"
|
||||
name="with_jets"
|
||||
domain="[('jet_ids', '!=', False)]"
|
||||
/>
|
||||
<filter
|
||||
string="With Jet Templates"
|
||||
name="with_jet_templates"
|
||||
domain="[('jet_template_ids', '!=', False)]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Status"
|
||||
name="group_by_status"
|
||||
domain="[]"
|
||||
context="{'group_by': 'status'}"
|
||||
/>
|
||||
<filter
|
||||
string="Partner"
|
||||
name="group_by_partner_id"
|
||||
domain="[]"
|
||||
context="{'group_by': 'partner_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Users"
|
||||
name="group_by_user_ids"
|
||||
domain="[]"
|
||||
context="{'group_by': 'user_ids'}"
|
||||
/>
|
||||
<filter
|
||||
string="Managers"
|
||||
name="group_by_manager_ids"
|
||||
domain="[]"
|
||||
context="{'group_by': 'manager_ids'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field
|
||||
name="status"
|
||||
string="Status"
|
||||
icon="fa-cog"
|
||||
enable_counters="1"
|
||||
/>
|
||||
<field name="tag_ids" string="Tags" icon="fa-tags" select="multi" />
|
||||
<field name="os_id" string="OS" icon="fa-server" />
|
||||
<field
|
||||
name="server_template_id"
|
||||
string="Server Template"
|
||||
icon="fa-server"
|
||||
/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_server" model="ir.actions.act_window">
|
||||
<field name="name">Servers</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">cetmix_tower_servers</field>
|
||||
<field name="res_model">cx.tower.server</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="search_view_id" ref="cx_tower_server_search_view" />
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">Add a new server</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
113
addons/cetmix_tower_server/views/cx_tower_shortcut_view.xml
Normal file
113
addons/cetmix_tower_server/views/cx_tower_shortcut_view.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_shortcut_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.shortcut.view.list</field>
|
||||
<field name="model">cx.tower.shortcut</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="action" />
|
||||
<field name="access_level" optional="show" />
|
||||
<field name="command_id" optional="hide" />
|
||||
<field name="plan_id" optional="hide" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_shortcut_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.shortcut.view.form</field>
|
||||
<field name="model">cx.tower.shortcut</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<group name="main">
|
||||
<group name="info">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
<field name="access_level" />
|
||||
<field name="active" />
|
||||
<field name="sequence" />
|
||||
</group>
|
||||
<group name="action">
|
||||
<field name="action" />
|
||||
<field name="command_id" invisible="action != 'command'" />
|
||||
<field name="use_sudo" invisible="action != 'command'" />
|
||||
<field name="plan_id" invisible="action != 'plan'" />
|
||||
</group>
|
||||
<field name="note" placeholder="Put your notes here" />
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="servers" string="Servers">
|
||||
<field name="server_ids">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page name="server_templates" string="Server Templates">
|
||||
<field name="server_template_ids">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_shortcut_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.shortcut.view.search</field>
|
||||
<field name="model">cx.tower.shortcut</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Shortcuts">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="command_id" />
|
||||
<field name="plan_id" />
|
||||
<field name="server_ids" />
|
||||
<filter
|
||||
string="Archived"
|
||||
name="archived"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<separator />
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Action"
|
||||
name="group_by_action"
|
||||
domain="[]"
|
||||
context="{'group_by': 'action'}"
|
||||
/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<field name="action" string="Action" icon="fa-cog" />
|
||||
<field name="access_level" string="Access Level" icon="fa-shield" />
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_shortcut" model="ir.actions.act_window">
|
||||
<field name="name">Shortcuts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">cx.tower.shortcut</field>
|
||||
<field name="path">cetmix_tower_shortcuts</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="cx_tower_shortcut_search_view" />
|
||||
</record>
|
||||
</odoo>
|
||||
63
addons/cetmix_tower_server/views/cx_tower_tag_view.xml
Normal file
63
addons/cetmix_tower_server/views/cx_tower_tag_view.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_tag_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.tag.view.form</field>
|
||||
<field name="model">cx.tower.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="color" widget="color_picker" />
|
||||
</group>
|
||||
<group>
|
||||
<field
|
||||
name="reference"
|
||||
placeholder="Can contain English letters, digits and '_'. Leave blank to autogenerate"
|
||||
/>
|
||||
<field name="server_ids" widget="many2many_tags" />
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_tag_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.tag.view.list</field>
|
||||
<field name="model">cx.tower.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="server_ids" widget="many2many_tags" optional="show" />
|
||||
<field name="reference" optional="show" />
|
||||
<field name="color" widget="color_picker" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_tag_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.tag.view.search</field>
|
||||
<field name="model">cx.tower.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Tags">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<field name="server_ids" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_tag" model="ir.actions.act_window">
|
||||
<field name="name">Tag</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">cx.tower.tag</field>
|
||||
<field name="path">cetmix_tower_tags</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="cx_tower_tag_search_view" />
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_variable_value_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.variable.value.view.list</field>
|
||||
<field name="model">cx.tower.variable.value</field>
|
||||
<field name="arch" type="xml">
|
||||
<list editable="top" decoration-bf="is_global==True">
|
||||
<field name="variable_type" column_invisible="1" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="variable_id" />
|
||||
<field name="is_global" widget="boolean_toggle" />
|
||||
<field
|
||||
name="server_id"
|
||||
optional="show"
|
||||
readonly="plan_line_action_id or jet_template_id or jet_id or server_template_id"
|
||||
/>
|
||||
<field
|
||||
name="jet_template_id"
|
||||
optional="show"
|
||||
readonly="server_id or plan_line_action_id or jet_id or server_template_id"
|
||||
/>
|
||||
<field
|
||||
name="jet_id"
|
||||
optional="show"
|
||||
readonly="server_id or plan_line_action_id or jet_template_id or server_template_id"
|
||||
/>
|
||||
<field
|
||||
name="server_template_id"
|
||||
optional="show"
|
||||
readonly="server_id or plan_line_action_id or jet_template_id or jet_id"
|
||||
/>
|
||||
<field
|
||||
name="plan_line_action_id"
|
||||
optional="show"
|
||||
readonly="server_id or jet_template_id or jet_id or server_template_id"
|
||||
/>
|
||||
<field
|
||||
name="value_char"
|
||||
readonly="variable_type == 'o'"
|
||||
widget="ace_tower"
|
||||
/>
|
||||
<field
|
||||
name="option_id"
|
||||
optional="show"
|
||||
readonly="variable_type == 's'"
|
||||
/>
|
||||
<field name="required" optional="show" />
|
||||
<field name="access_level" optional="show" />
|
||||
<field name="variable_ids" optional="hide" widget="many2many_tags" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="cx_tower_variable_value_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.variable.value.view.search</field>
|
||||
<field name="model">cx.tower.variable.value</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Values">
|
||||
<field name="reference" />
|
||||
<field name="variable_id" string="Variable" />
|
||||
<field name="value_char" string="Value" />
|
||||
<filter
|
||||
string="Local"
|
||||
name="local"
|
||||
domain="[('is_global', '=', False)]"
|
||||
/>
|
||||
<filter
|
||||
string="Global"
|
||||
name="global"
|
||||
domain="[('is_global', '=', True)]"
|
||||
/>
|
||||
<searchpanel>
|
||||
<field name="access_level" string="Access Level" icon="fa-shield" />
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_cx_tower_variable_value" model="ir.actions.act_window">
|
||||
<field name="name">Variable Values</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">cetmix_tower_variable_values</field>
|
||||
<field name="res_model">cx.tower.variable.value</field>
|
||||
<field name="view_mode">list</field>
|
||||
</record>
|
||||
</odoo>
|
||||
263
addons/cetmix_tower_server/views/cx_tower_variable_view.xml
Normal file
263
addons/cetmix_tower_server/views/cx_tower_variable_view.xml
Normal file
@@ -0,0 +1,263 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="cx_tower_variable_view_form" model="ir.ui.view">
|
||||
<field name="name">cx.tower.variable.view.form</field>
|
||||
<field name="model">cx.tower.variable</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_open_values"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
invisible="value_ids_count == 0"
|
||||
>
|
||||
<field
|
||||
name="value_ids_count"
|
||||
widget="statinfo"
|
||||
string="Values"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
name="action_open_commands"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-code"
|
||||
invisible="command_ids_count == 0"
|
||||
>
|
||||
<field
|
||||
name="command_ids_count"
|
||||
widget="statinfo"
|
||||
string="Commands"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
name="action_open_plan_lines"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
invisible="plan_line_ids_count == 0"
|
||||
icon="fa-paper-plane"
|
||||
>
|
||||
<field
|
||||
name="plan_line_ids_count"
|
||||
widget="statinfo"
|
||||
string="Plan Lines"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
name="action_open_files"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
invisible="file_ids_count == 0"
|
||||
icon="fa-files-o"
|
||||
>
|
||||
<field
|
||||
name="file_ids_count"
|
||||
widget="statinfo"
|
||||
string="Files"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
name="action_open_file_templates"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
invisible="file_template_ids_count == 0"
|
||||
icon="fa-file"
|
||||
>
|
||||
<field
|
||||
name="file_template_ids_count"
|
||||
widget="statinfo"
|
||||
string="File Templates"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
name="action_open_variable_values"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
invisible="variable_value_ids_count == 0"
|
||||
>
|
||||
<field
|
||||
name="variable_value_ids_count"
|
||||
widget="statinfo"
|
||||
string="Used in Values"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<group>
|
||||
<group name="variable_info">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
<field name="access_level" />
|
||||
<field name="variable_type" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
/>
|
||||
</group>
|
||||
<group name="variable_validation">
|
||||
<field
|
||||
name="validation_pattern"
|
||||
placeholder="Regex expression, eg. ^[a-z0-9]+$"
|
||||
/>
|
||||
<field
|
||||
name="validation_message"
|
||||
placeholder="Custom message to display when pattern check fails"
|
||||
/>
|
||||
<field name="note" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Options" invisible="variable_type == 's'">
|
||||
<field name="option_ids" widget="one2many">
|
||||
<list editable="bottom">
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="reference" optional="hide" />
|
||||
<field name="name" />
|
||||
<field name="value_char" />
|
||||
<field name="access_level" optional="show" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field
|
||||
name="reference"
|
||||
widget="CopyClipboardChar"
|
||||
options="{'string': 'Copy reference'}"
|
||||
/>
|
||||
<field
|
||||
name="value_char"
|
||||
widget="CopyClipboardChar"
|
||||
options="{'string': 'Copy value'}"
|
||||
/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Values">
|
||||
<field name="value_ids">
|
||||
<list editable="top" decoration-bf="is_global==True">
|
||||
<field name="variable_id" column_invisible="1" />
|
||||
<field name="variable_type" column_invisible="1" />
|
||||
<field name="is_global" widget="boolean_toggle" />
|
||||
<field name="server_id" optional="hide" />
|
||||
<field name="server_template_id" optional="hide" />
|
||||
<field name="jet_template_id" optional="hide" />
|
||||
<field name="jet_id" optional="hide" />
|
||||
<field name="plan_line_action_id" optional="hide" />
|
||||
<field
|
||||
name="value_char"
|
||||
placeholder="undefined"
|
||||
readonly="variable_type == 'o'"
|
||||
widget="ace_tower"
|
||||
/>
|
||||
<field
|
||||
name="option_id"
|
||||
optional="show"
|
||||
readonly="variable_type == 's'"
|
||||
/>
|
||||
<field name="required" optional="show" />
|
||||
</list>
|
||||
<form>
|
||||
<group>
|
||||
<field name="server_id" column_invisible="1" />
|
||||
<field name="variable_id" invisible="1" />
|
||||
<field name="variable_type" invisible="1" />
|
||||
<field name="is_global" />
|
||||
<field name="server_template_id" />
|
||||
<field
|
||||
name="value_char"
|
||||
invisible="variable_type == 'o'"
|
||||
/>
|
||||
<field
|
||||
name="option_id"
|
||||
optional="show"
|
||||
invisible="variable_type == 's'"
|
||||
/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page name="value_modifier" string="Value Modifier">
|
||||
<div class="alert alert-info" role="alert">
|
||||
<p>
|
||||
Python code that is used to modify the variable values.
|
||||
<br />
|
||||
Available variables and functions:
|
||||
<ul>
|
||||
<li>value: variable value</li>
|
||||
<li
|
||||
>result: final result that will be used as a variable value</li>
|
||||
<li
|
||||
>general python functions (eg. lower(), replace(), etc.)</li>
|
||||
<li
|
||||
>re: regex operations (eg. re.sub, re.match, etc.)</li>
|
||||
</ul>
|
||||
Example:
|
||||
<br />
|
||||
<code>
|
||||
result = value.lower().strip().replace('_', '-').replace(" ","") if value.startswith('http') else 'https://' + re.sub(r'\s+', '', value)
|
||||
</code>
|
||||
</p>
|
||||
</div>
|
||||
<field
|
||||
name="applied_expression"
|
||||
widget="ace"
|
||||
options="{'mode': 'python'}"
|
||||
/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_variable_view_tree" model="ir.ui.view">
|
||||
<field name="name">cx.tower.variable.view.list</field>
|
||||
<field name="model">cx.tower.variable</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="reference" optional="show" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"
|
||||
optional="show"
|
||||
/>
|
||||
<field name="access_level" optional="show" />
|
||||
<field name="value_ids_count" optional="show" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="cx_tower_variable_search_view" model="ir.ui.view">
|
||||
<field name="name">cx.tower.variable.view.search</field>
|
||||
<field name="model">cx.tower.variable</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Values">
|
||||
<field
|
||||
name="name"
|
||||
string="Name/Reference"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('reference', 'ilike', self)]"
|
||||
/>
|
||||
<searchpanel>
|
||||
<field name="variable_type" string="Variable Type" icon="fa-cog" />
|
||||
<field name="access_level" string="Access Level" icon="fa-shield" />
|
||||
<field name="tag_ids" string="Tags" select="multi" icon="fa-tags" />
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_tower_variable" model="ir.actions.act_window">
|
||||
<field name="name">Variables</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="path">cetmix_tower_variables</field>
|
||||
<field name="res_model">cx.tower.variable</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
263
addons/cetmix_tower_server/views/menuitems.xml
Normal file
263
addons/cetmix_tower_server/views/menuitems.xml
Normal file
@@ -0,0 +1,263 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<menuitem
|
||||
id="menu_root"
|
||||
name="Cetmix Tower"
|
||||
groups="group_user"
|
||||
web_icon="cetmix_tower_server,static/description/icon.png"
|
||||
/>
|
||||
<!-- ========================= Servers ========================= -->
|
||||
<menuitem
|
||||
id="menu_cx_tower_server_root"
|
||||
name="Servers"
|
||||
parent="menu_root"
|
||||
sequence="3"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_server"
|
||||
name="Servers"
|
||||
action="action_cx_tower_server"
|
||||
parent="menu_cx_tower_server_root"
|
||||
sequence="3"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_server_template"
|
||||
name="Templates"
|
||||
action="action_cx_tower_server_template"
|
||||
parent="menu_cx_tower_server_root"
|
||||
groups="group_manager"
|
||||
sequence="10"
|
||||
/>
|
||||
|
||||
<!-- ========================= Partners ========================= -->
|
||||
<menuitem
|
||||
id="menu_cx_tower_partner"
|
||||
name="Partners"
|
||||
action="action_cx_cetmix_tower_partner"
|
||||
parent="menu_cx_tower_server_root"
|
||||
sequence="15"
|
||||
/>
|
||||
|
||||
<!-- ========================= Jets ========================= -->
|
||||
<menuitem id="menu_cx_tower_jet_root" name="Jets" parent="menu_root" sequence="5" />
|
||||
|
||||
<menuitem
|
||||
id="menu_cx_tower_jet"
|
||||
name="Jets"
|
||||
parent="menu_cx_tower_jet_root"
|
||||
action="cx_tower_jet_action"
|
||||
sequence="10"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_cx_tower_jet_template"
|
||||
name="Templates"
|
||||
parent="menu_cx_tower_jet_root"
|
||||
action="cx_tower_jet_template_action"
|
||||
sequence="20"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_cx_tower_create_jet"
|
||||
name="Launch New Jet"
|
||||
parent="menu_cx_tower_jet_root"
|
||||
action="action_cx_tower_jet_create"
|
||||
sequence="30"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
/>
|
||||
|
||||
<!-- ========================= Logs ========================= -->
|
||||
<menuitem
|
||||
id="menu_cx_tower_log_root"
|
||||
name="Logs"
|
||||
parent="menu_root"
|
||||
sequence="20"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_command_log"
|
||||
name="Command Log"
|
||||
action="action_cx_tower_command_log"
|
||||
parent="menu_cx_tower_log_root"
|
||||
sequence="1"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_plan_log"
|
||||
name="Flight Plan Log"
|
||||
action="action_cx_tower_plan_log"
|
||||
parent="menu_cx_tower_log_root"
|
||||
sequence="20"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_jet_request"
|
||||
name="Jet Requests"
|
||||
action="action_cx_tower_jet_request"
|
||||
parent="menu_cx_tower_log_root"
|
||||
sequence="30"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_jet_template_install"
|
||||
name="Jet Template Installations"
|
||||
parent="menu_cx_tower_log_root"
|
||||
action="cx_tower_jet_template_install_action"
|
||||
sequence="35"
|
||||
/>
|
||||
|
||||
<!-- ========================= Commands ========================= -->
|
||||
<menuitem
|
||||
id="menu_cx_tower_command_root"
|
||||
name="Commands"
|
||||
parent="menu_root"
|
||||
sequence="30"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_command"
|
||||
name="Commands"
|
||||
action="action_cx_tower_command"
|
||||
parent="menu_cx_tower_command_root"
|
||||
sequence="10"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_plan"
|
||||
name="Flight Plans"
|
||||
action="action_cx_tower_plan"
|
||||
parent="menu_cx_tower_command_root"
|
||||
sequence="20"
|
||||
/>
|
||||
|
||||
<!-- ========================= Files ========================= -->
|
||||
<menuitem
|
||||
id="menu_cx_tower_file_root"
|
||||
name="Files"
|
||||
parent="menu_root"
|
||||
sequence="40"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_file"
|
||||
name="Files"
|
||||
action="cx_tower_file_action"
|
||||
parent="menu_cx_tower_file_root"
|
||||
sequence="1"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_file_template"
|
||||
name="Templates"
|
||||
action="cx_tower_file_template_action"
|
||||
parent="menu_cx_tower_file_root"
|
||||
sequence="2"
|
||||
/>
|
||||
|
||||
<!-- ========================= Tools ========================= -->
|
||||
<menuitem id="menu_tools" name="Tools" parent="menu_root" sequence="50" />
|
||||
|
||||
<!-- ========================= Settings ========================= -->
|
||||
<menuitem
|
||||
id="menu_settings"
|
||||
name="Settings"
|
||||
parent="menu_root"
|
||||
sequence="60"
|
||||
groups="group_manager"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cetmix_tower_general_settings"
|
||||
name="General Settings"
|
||||
parent="menu_settings"
|
||||
sequence="0"
|
||||
action="action_cetmix_tower_config_settings"
|
||||
groups="group_manager"
|
||||
/>
|
||||
<!-- Variables -->
|
||||
<menuitem
|
||||
id="menu_cx_tower_variable_root"
|
||||
name="Variables"
|
||||
parent="menu_settings"
|
||||
sequence="10"
|
||||
groups="group_manager"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_variable"
|
||||
name="Variables"
|
||||
parent="menu_cx_tower_variable_root"
|
||||
action="action_cx_tower_variable"
|
||||
sequence="1"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_variable_value"
|
||||
name="Variable Values"
|
||||
action="action_cx_tower_variable_value"
|
||||
parent="menu_cx_tower_variable_root"
|
||||
sequence="2"
|
||||
/>
|
||||
|
||||
<!-- Keys and Secrets -->
|
||||
<menuitem
|
||||
id="menu_cx_tower_key_root"
|
||||
name="Keys and Secrets"
|
||||
parent="menu_settings"
|
||||
sequence="20"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_key"
|
||||
name="Keys and Secrets"
|
||||
action="action_cx_tower_key"
|
||||
parent="menu_cx_tower_key_root"
|
||||
sequence="1"
|
||||
/>
|
||||
<!-- Jets -->
|
||||
<menuitem
|
||||
id="menu_cx_tower_jet_settings_root"
|
||||
name="Jets"
|
||||
parent="menu_settings"
|
||||
sequence="25"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_jet_state"
|
||||
name="States"
|
||||
parent="menu_cx_tower_jet_settings_root"
|
||||
action="cx_tower_jet_state_action"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
sequence="10"
|
||||
/>
|
||||
<!-- Automation -->
|
||||
<menuitem
|
||||
id="menu_cx_tower_automation_root"
|
||||
name="Automation"
|
||||
parent="menu_settings"
|
||||
sequence="30"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_scheduled_task"
|
||||
name="Scheduled Tasks"
|
||||
action="action_cx_tower_scheduled_task"
|
||||
parent="menu_cx_tower_automation_root"
|
||||
sequence="1"
|
||||
groups="group_manager"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_shortcut"
|
||||
name="Shortcuts"
|
||||
action="action_cx_tower_shortcut"
|
||||
parent="menu_cx_tower_automation_root"
|
||||
sequence="2"
|
||||
/>
|
||||
<!-- Properties -->
|
||||
<menuitem
|
||||
id="menu_cx_tower_property_root"
|
||||
name="Properties"
|
||||
parent="menu_settings"
|
||||
sequence="500"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_os"
|
||||
name="Operating Systems"
|
||||
action="action_cx_tower_os"
|
||||
parent="menu_cx_tower_property_root"
|
||||
sequence="100"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_cx_tower_tag"
|
||||
name="Tags"
|
||||
action="action_cx_tower_tag"
|
||||
parent="menu_cx_tower_property_root"
|
||||
sequence="13"
|
||||
/>
|
||||
</odoo>
|
||||
113
addons/cetmix_tower_server/views/res_config_settings.xml
Normal file
113
addons/cetmix_tower_server/views/res_config_settings.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">
|
||||
res.config.settings.view.form.inherit.cetmix.tower.settings
|
||||
</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<form position="inside">
|
||||
<app
|
||||
data-string="Cetmix Tower"
|
||||
string="Cetmix Tower"
|
||||
name="cetmix_tower_server"
|
||||
groups="cetmix_tower_server.group_root"
|
||||
>
|
||||
<block name="cetmix_tower_server_settings" title="System Settings">
|
||||
<setting
|
||||
id="cetmix_tower_command_timeout"
|
||||
help="Command timeout in seconds after which the command will be terminated. Set to 0 to disable timeout."
|
||||
>
|
||||
<field name="cetmix_tower_command_timeout" />
|
||||
<div class="mt8">
|
||||
<button
|
||||
name="action_configure_zombie_commands_cron"
|
||||
string="Cron Job"
|
||||
type="object"
|
||||
class="btn-link"
|
||||
icon="fa-arrow-right"
|
||||
/>
|
||||
</div>
|
||||
</setting>
|
||||
<setting
|
||||
id="cetmix_tower_pull_files_from_server"
|
||||
title="Pull files from server"
|
||||
help="Files will be pulled from server to Tower automatically using cron job."
|
||||
>
|
||||
<div class="o_form_label">
|
||||
<span>Pull files from server</span>
|
||||
</div>
|
||||
<div class="text-muted">
|
||||
<span
|
||||
>Files will be pulled from server to Tower automatically using cron job.</span>
|
||||
</div>
|
||||
<div class="mt8">
|
||||
<button
|
||||
name="action_configure_cron_pull_files_from_server"
|
||||
string="Cron Job"
|
||||
type="object"
|
||||
class="btn-link"
|
||||
icon="fa-arrow-right"
|
||||
/>
|
||||
</div>
|
||||
</setting>
|
||||
<setting
|
||||
id="cetmix_tower_run_scheduled_tasks"
|
||||
title="Run scheduled tasks"
|
||||
help="Scheduled tasks will be run automatically using cron job."
|
||||
>
|
||||
<div class="o_form_label">
|
||||
<span>Run scheduled tasks</span>
|
||||
</div>
|
||||
<div class="text-muted">
|
||||
<span
|
||||
>Scheduled tasks will be run automatically using cron job.</span>
|
||||
</div>
|
||||
<div class="mt8">
|
||||
<button
|
||||
name="action_configure_run_scheduled_tasks_cron"
|
||||
string="Cron Job"
|
||||
type="object"
|
||||
class="btn-link"
|
||||
icon="fa-arrow-right"
|
||||
/>
|
||||
</div>
|
||||
</setting>
|
||||
</block>
|
||||
<block
|
||||
name="cetmix_tower_notifications_settings"
|
||||
title="Notifications"
|
||||
>
|
||||
<setting
|
||||
id="cetmix_tower_notification_type_error"
|
||||
help="Show notifications for error events. Select 'Sticky' to keep the notification visible until dismissed. Leave empty to disable notifications."
|
||||
>
|
||||
<field name="cetmix_tower_notification_type_error" />
|
||||
</setting>
|
||||
<setting
|
||||
id="cetmix_tower_notification_type_success"
|
||||
help="Show notifications for success events. Select 'Sticky' to keep the notification visible until dismissed. Leave empty to disable notifications."
|
||||
>
|
||||
<field name="cetmix_tower_notification_type_success" />
|
||||
</setting>
|
||||
</block>
|
||||
</app>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ## Action ## -->
|
||||
<record id="action_cetmix_tower_config_settings" model="ir.actions.act_window">
|
||||
<field name="name">General Settings</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.config.settings</field>
|
||||
<field name="view_id" ref="res_config_settings_view_form" />
|
||||
<field name="path">cetmix_tower_settings</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">inline</field>
|
||||
<field
|
||||
name="context"
|
||||
>{'module' : 'cetmix_tower_server', 'bin_size': False}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
82
addons/cetmix_tower_server/views/res_partner_view.xml
Normal file
82
addons/cetmix_tower_server/views/res_partner_view.xml
Normal file
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_res_partner_form_inherit_cetmix_tower" model="ir.ui.view">
|
||||
<field name="name">res.partner.form.inherit.cetmix.tower</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button
|
||||
name="action_view_partner_servers"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-server"
|
||||
groups="cetmix_tower_server.group_user"
|
||||
invisible="server_count == 0"
|
||||
>
|
||||
<field name="server_count" widget="statinfo" string="Servers" />
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//sheet/notebook" position="inside">
|
||||
<page string="Cetmix Tower" groups="cetmix_tower_server.group_user">
|
||||
<group>
|
||||
<group name="group_servers" string="Servers">
|
||||
<field name="server_ids" string="" readonly="1">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="status" />
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
<group
|
||||
name="group_secrets"
|
||||
string="Secrets"
|
||||
groups="cetmix_tower_server.group_manager"
|
||||
>
|
||||
<field name="secret_ids" string="">
|
||||
<list editable="bottom">
|
||||
<field
|
||||
name="key_id"
|
||||
context="{'default_key_type': 's', 'secrets_only': True}"
|
||||
/>
|
||||
<field name="server_id" />
|
||||
<field name="secret_value" />
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_res_partner_filter" model="ir.ui.view">
|
||||
<field name="name">res.partner.select.inherit.cetmix.tower</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_res_partner_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='user_id']" position="after">
|
||||
<field name="server_ids" string="Servers" />
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='group_by']" position="before">
|
||||
<filter
|
||||
string="With Servers"
|
||||
name="filter_with_servers"
|
||||
domain="[('server_ids', '!=', False)]"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_cx_cetmix_tower_partner" model="ir.actions.act_window">
|
||||
<field name="name">Partners</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.partner</field>
|
||||
<field name="context">{'search_default_filter_with_servers': 1}</field>
|
||||
<field name="view_mode">kanban,list,form,activity</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">Add a new partner</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user