bemade-addons/k8s_odoo_manager/wizards/k8s_cluster_test_wizard_views.xml
Marc Durepos 9019d8f280 k8s_odoo_manager: first little MVP
- 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.
2025-10-01 20:32:46 -04:00

47 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Cluster Test Wizard Form -->
<record id="view_k8s_cluster_test_wizard_form" model="ir.ui.view">
<field name="name">k8s.cluster.test.wizard.form</field>
<field name="model">k8s.cluster.test.wizard</field>
<field name="arch" type="xml">
<form string="Test Cluster Connection">
<sheet>
<div class="oe_title">
<h1>Test Kubernetes Cluster Connection</h1>
</div>
<group>
<field name="cluster_id" options="{'no_create': True}" readonly="state != 'draft'"/>
<field name="state" invisible="1"/>
</group>
<div invisible="state != 'done'">
<h3>Test Result:</h3>
<field name="test_result" readonly="1" widget="text"/>
</div>
<div invisible="state != 'testing'">
<div class="text-center">
<i class="fa fa-spinner fa-spin fa-2x" title="Loading"/>
<p>Testing connection...</p>
</div>
</div>
</sheet>
<footer>
<button string="Test Connection" name="action_test_connection" type="object" class="btn-primary" invisible="state != 'draft'"/>
<button string="Close" name="action_close" type="object" class="btn-secondary" invisible="state == 'testing'"/>
<button string="Cancel" class="btn-secondary" special="cancel" invisible="state != 'testing'"/>
</footer>
</form>
</field>
</record>
<!-- Cluster Test Wizard Action -->
<record id="action_k8s_cluster_test_wizard" model="ir.actions.act_window">
<field name="name">Test Cluster Connection</field>
<field name="res_model">k8s.cluster.test.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</odoo>