This commit is contained in:
Mario
2024-08-04 01:30:06 +02:00
commit 04d1057a8a
17 changed files with 310 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="portal_my_home_vps_servers" name="Portal My Home : VPS Servers" inherit_id="portal.portal_my_home" customize_show="True" priority="30">
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
<t t-call="portal.portal_docs_entry">
<t t-set="title">VPS Servers</t>
<t t-set="url" t-value="'/my/vps-servers'" />
<t t-set="placeholder_count" t-value="'vps_server_count'" />
</t>
</xpath>
</template>
<template id="portal_my_vps_servers" name="My VPS Servers">
<t t-call="portal.portal_layout">
<t t-set="breadcrumbs_searchbar" t-value="True" />
<t t-call="portal.portal_searchbar">
<t t-set="title">VPS Servers</t>
</t>
<t t-if="vps_servers" t-call="portal.portal_table">
<thead>
<tr class="active">
<th>Server Name</th>
<th class='d-none d-md-table-cell'>IP Address</th>
<th class='d-none d-md-table-cell'>CPU</th>
<th class='text-right'>RAM</th>
</tr>
</thead>
<tbody>
<t t-foreach="vps_servers" t-as="server">
<tr>
<td>
<a t-att-href="server.get_portal_url()"
t-attf-class="tr_vps_server_link"
t-att-title="server.name">
<t t-esc="server.name" />
</a>
</td>
<td class="d-none d-md-table-cell">
<span t-field="server.ip_address" />
</td>
<td class="d-none d-md-table-cell">
<span t-field="server.cpu" />
</td>
<td class='text-right'>
<span t-field="server.ram" />
</td>
</tr>
</t>
</tbody>
</t>
</t>
</template>
<template id="portal_vps_server_page" name="VPS Server Page">
<t t-call="portal.portal_layout">
<t t-set="o_portal_fullwidth_alert" groups="base.group_user">
<t t-call="portal.portal_back_in_edit_mode">
<t t-set="backend_url" t-value="'/web#return_label=Website&amp;model=vps.server&amp;id=%s&amp;view_type=form' % (vps_server.id)"/>
</t>
</t>
<t t-call="portal.portal_record_layout">
<t t-set="card_header">
<h5 class="mb-0">
<span t-field="vps_server.name"/>
</h5>
</t>
<t t-set="card_body">
<div class="row">
<div class="col-12 col-md-6">
<strong>IP Address:</strong> <span t-field="vps_server.ip_address"/>
</div>
<div class="col-12 col-md-6">
<strong>CPU:</strong> <span t-field="vps_server.cpu"/> cores
</div>
<div class="col-12 col-md-6">
<strong>RAM:</strong> <span t-field="vps_server.ram"/> GB
</div>
<div class="col-12 col-md-6">
<strong>Storage:</strong> <span t-field="vps_server.storage"/> GB
</div>
<div class="col-12 col-md-6">
<strong>Operating System:</strong> <span t-field="vps_server.os"/>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>