- Adds the k8s.cluster and k8s.odoo.instance models - Successful connection test (ignoring SSL self-signed cert error) - Successfully pulls OdooInstance information from the cluster Further work roadmap: - Fix the SSL issue (cluster-side, most likely) - Get rid of the text fields containing straight JSON and convert to appropriately typed Odoo fields (on read). - Allow updating OdooInstance fields and writing patches back to the cluster. Failed patch should result in a failed write and reverting back to actual cluster status.
49 lines
2.4 KiB
XML
49 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Sync Instances Wizard Form -->
|
|
<record id="view_k8s_sync_instances_wizard_form" model="ir.ui.view">
|
|
<field name="name">k8s.sync.instances.wizard.form</field>
|
|
<field name="model">k8s.sync.instances.wizard</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Sync Odoo Instances">
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h1>Sync Odoo Instances from Kubernetes</h1>
|
|
</div>
|
|
|
|
<group invisible="state != 'draft'">
|
|
<field name="sync_all"/>
|
|
<field name="cluster_ids" widget="many2many_tags" invisible="sync_all" required="not sync_all"/>
|
|
<field name="state" invisible="1"/>
|
|
</group>
|
|
|
|
<div invisible="state != 'done'">
|
|
<h3>Sync Results:</h3>
|
|
<field name="sync_result" readonly="1" widget="text"/>
|
|
</div>
|
|
|
|
<div invisible="state != 'syncing'">
|
|
<div class="text-center">
|
|
<i class="fa fa-spinner fa-spin fa-2x" title="Loading"/>
|
|
<p>Synchronizing instances from clusters...</p>
|
|
</div>
|
|
</div>
|
|
</sheet>
|
|
<footer>
|
|
<button string="Start Sync" name="action_sync_instances" type="object" class="btn-primary" invisible="state != 'draft'"/>
|
|
<button string="View Instances" name="action_view_instances" type="object" class="btn-secondary" invisible="state != 'done'"/>
|
|
<button string="Close" name="action_close" type="object" class="btn-secondary" invisible="state == 'syncing'"/>
|
|
<button string="Cancel" class="btn-secondary" special="cancel" invisible="state != 'syncing'"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Sync Instances Wizard Action -->
|
|
<record id="action_k8s_sync_instances_wizard" model="ir.actions.act_window">
|
|
<field name="name">Sync Odoo Instances</field>
|
|
<field name="res_model">k8s.sync.instances.wizard</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">new</field>
|
|
</record>
|
|
</odoo>
|