113 lines
5.3 KiB
XML
113 lines
5.3 KiB
XML
<?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'>IPv4 Address</th>
|
|
<th class='d-none d-md-table-cell'>IPv6 Address</th>
|
|
<th class='text-right'>CPU</th>
|
|
<th class='text-right'>RAM (GB)</th>
|
|
<th class='text-right'>Storage (GB)</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.ipv4_address"/>
|
|
</td>
|
|
<td class="d-none d-md-table-cell">
|
|
<span t-field="server.ipv6_address"/>
|
|
</td>
|
|
<td class='text-right'>
|
|
<span t-field="server.cpu"/>
|
|
</td>
|
|
<td class='text-right'>
|
|
<span t-field="server.ram"/>
|
|
</td>
|
|
<td class='text-right'>
|
|
<span t-field="server.storage"/>
|
|
</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&model=vps.server&id=%s&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 mb-4">
|
|
<div class="col-12 text-right">
|
|
<a t-att-href="'/my/vps/%s/restart' % vps_server.id"
|
|
class="btn btn-primary"
|
|
onclick="return confirm('Are you sure you want to restart this VPS?');">
|
|
<i class="fa fa-refresh"/> Restart VPS
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12 col-md-6">
|
|
<strong>IPv4 Address:</strong> <span t-field="vps_server.ipv4_address"/>
|
|
</div>
|
|
<div class="col-12 col-md-6">
|
|
<strong>IPv6 Address:</strong> <span t-field="vps_server.ipv6_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 class="col-12 col-md-6">
|
|
<strong>State:</strong> <span t-field="vps_server.state"/>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
</odoo> |