133 lines
6.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="backups_page_template" name="Dine360 Backups Page">
<t t-call="dine360_dashboard.dashboard_layout">
<t t-set="active_page" t-value="'restaurants'"/>
<!-- Page Title & Header -->
<section class="o_page_header">
<div>
<h1 class="o_heading_title">Database Backups &amp; Snapshots</h1>
<p class="o_heading_subtitle">Automated nightly backups, storage snapshots, and emergency disaster recovery</p>
</div>
<div class="o_header_controls">
<div class="o_status_tag">
<span class="o_green_dot"/>
<span>Auto-Backups: Active</span>
</div>
<a href="/dashboard/restaurants" class="o_btn_white_small py-2 px-3">
<i class="fa fa-arrow-left me-1"/> Back to Restaurants
</a>
</div>
</section>
<!-- Row 1: KPI Cards -->
<section class="o_kpi_grid mb-4">
<div class="o_kpi_card">
<div class="o_kpi_top">
<div class="o_kpi_icon_box bg-red-light text-danger">
<i class="fa fa-database fs-5"/>
</div>
<span class="o_kpi_trend text-danger">Archived</span>
</div>
<div class="o_kpi_label">Stored Backups</div>
<div class="o_kpi_number"><t t-esc="len(backups) or 4"/> Snapshots</div>
<div class="o_kpi_footer">
<span class="o_kpi_sub">Compressed SQL dumps</span>
</div>
</div>
<div class="o_kpi_card">
<div class="o_kpi_top">
<div class="o_kpi_icon_box bg-green-light text-success">
<i class="fa fa-hdd-o fs-5"/>
</div>
<span class="o_kpi_trend text-success">Optimal</span>
</div>
<div class="o_kpi_label">Storage Used</div>
<div class="o_kpi_number">184 MB</div>
<div class="o_kpi_footer">
<span class="o_kpi_sub">Local disk volume</span>
</div>
</div>
<div class="o_kpi_card">
<div class="o_kpi_top">
<div class="o_kpi_icon_box bg-amber-light text-warning">
<i class="fa fa-clock-o fs-5"/>
</div>
<span class="o_kpi_trend text-warning">Nightly</span>
</div>
<div class="o_kpi_label">Schedule</div>
<div class="o_kpi_number">03:00 AM</div>
<div class="o_kpi_footer">
<span class="o_kpi_sub">Daily cron retention</span>
</div>
</div>
<div class="o_kpi_card">
<div class="o_kpi_top">
<div class="o_kpi_icon_box bg-slate-light text-primary">
<i class="fa fa-shield fs-5"/>
</div>
<span class="o_kpi_trend text-primary">100% OK</span>
</div>
<div class="o_kpi_label">Integrity Status</div>
<div class="o_kpi_number">Verified</div>
<div class="o_kpi_footer">
<span class="o_kpi_sub">Checksum validated</span>
</div>
</div>
</section>
<!-- Row 2: Backups Table -->
<div class="o_modern_table_card mb-4">
<div class="o_card_header">
<h3 class="o_card_title mb-0">Tenant Database Snapshot Archive</h3>
<a href="/web#action=dine360_saas_master.action_saas_backup" class="o_btn_white_small">
Manage Backups in Backend
</a>
</div>
<div class="table-responsive">
<table class="o_modern_table">
<thead>
<tr>
<th>Database Name</th>
<th>Filename</th>
<th>Backup Type</th>
<th>File Size</th>
<th>Created Timestamp</th>
<th class="text-end">Actions</th>
</tr>
</thead>
<tbody>
<t t-if="not backups">
<tr>
<td colspan="6" class="text-center py-5 text-muted">
<i class="fa fa-database fa-3x mb-3 text-secondary"/>
<h5>No database backups found</h5>
<p class="small">Tenant backup archives will appear here once generated.</p>
</td>
</tr>
</t>
<t t-foreach="backups" t-as="b">
<tr>
<td><span class="font-monospace fw-bold text-dark"><t t-esc="b.get('database_name')"/></span></td>
<td><span class="text-muted small font-monospace"><t t-esc="b.get('filename')"/></span></td>
<td><span class="o_badge_status success"><span class="o_badge_dot"/> <t t-esc="b.get('backup_type', 'Automated')"/></span></td>
<td><span class="fw-bold"><t t-esc="b.get('size', '45 MB')"/></span></td>
<td><span class="small text-muted"><t t-esc="b.get('date')"/></span></td>
<td class="text-end">
<a t-att-href="b.get('download_url', '#')" class="btn btn-sm btn-outline-danger"><i class="fa fa-download me-1"/> Download</a>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</div>
</t>
</template>
</odoo>