Merge claude/1
This commit is contained in:
commit
78c463d3ac
@ -13,29 +13,30 @@ LP.features.register({
|
|||||||
id: 'backup',
|
id: 'backup',
|
||||||
routes: ['/backup', '/backup*'],
|
routes: ['/backup', '/backup*'],
|
||||||
// Controllers the feature needs; lazy-loaded on first mount (idempotent).
|
// Controllers the feature needs; lazy-loaded on first mount (idempotent).
|
||||||
|
// Controllers, organised by sub-system (tabs). core/ first: schema + base
|
||||||
|
// class + the shared data/cron, then each tab's prototype-augment clusters.
|
||||||
scripts: [
|
scripts: [
|
||||||
'/components/backup/js/backup-schema.js',
|
'/components/backup/core/js/backup-schema.js',
|
||||||
'/components/backup/js/backup-page.js', // base: class + constructor + init/switchTab/render
|
'/components/backup/core/js/backup-page.js', // base: class + constructor + init/switchTab/render
|
||||||
// prototype-augment clusters (load after the base, order among them is free):
|
'/components/backup/core/js/backup-fetch-client.js',
|
||||||
'/components/backup/js/backup-fetch-client.js',
|
'/components/backup/core/js/backup-cron-schedule.js',
|
||||||
'/components/backup/js/backup-dashboard.js',
|
'/components/backup/dashboard/js/backup-dashboard.js',
|
||||||
'/components/backup/js/backup-snapshots.js',
|
'/components/backup/snapshots/js/backup-snapshots.js',
|
||||||
'/components/backup/js/backup-locations.js',
|
'/components/backup/snapshots/js/backup-snapshot-actions.js',
|
||||||
'/components/backup/js/backup-location-fields.js',
|
'/components/backup/locations/js/backup-locations.js',
|
||||||
'/components/backup/js/backup-ssh-key.js',
|
'/components/backup/locations/js/backup-location-fields.js',
|
||||||
'/components/backup/js/backup-retention-presets.js',
|
'/components/backup/locations/js/backup-location-modal.js',
|
||||||
'/components/backup/js/backup-configuration.js',
|
'/components/backup/locations/js/backup-ssh-key.js',
|
||||||
'/components/backup/js/backup-engine-details.js',
|
'/components/backup/migrate/js/backup-migrate.js',
|
||||||
'/components/backup/js/backup-location-modal.js',
|
'/components/backup/configuration/js/backup-configuration.js',
|
||||||
'/components/backup/js/backup-snapshot-actions.js',
|
'/components/backup/configuration/js/backup-retention-presets.js',
|
||||||
'/components/backup/js/backup-migrate.js',
|
'/components/backup/configuration/js/backup-engine-details.js',
|
||||||
'/components/backup/js/backup-cron-schedule.js',
|
|
||||||
'/core/lib/backup-app-card.js',
|
'/core/lib/backup-app-card.js',
|
||||||
],
|
],
|
||||||
|
|
||||||
async mount(ctx) {
|
async mount(ctx) {
|
||||||
await ctx.loadScripts(this.scripts);
|
await ctx.loadScripts(this.scripts);
|
||||||
const html = await ctx.loadFragment('/components/backup/html/backup-content.html');
|
const html = await ctx.loadFragment('/components/backup/core/html/backup-content.html');
|
||||||
ctx.setContent(html, 'Backups');
|
ctx.setContent(html, 'Backups');
|
||||||
if (typeof BackupPage === 'undefined') {
|
if (typeof BackupPage === 'undefined') {
|
||||||
throw new Error('BackupPage controller failed to load');
|
throw new Error('BackupPage controller failed to load');
|
||||||
|
|||||||
@ -370,10 +370,10 @@ class LibrePortalSPAClean {
|
|||||||
// backup-page.js + backup-app-card.js are loaded on first navigation.
|
// backup-page.js + backup-app-card.js are loaded on first navigation.
|
||||||
// loadScript is idempotent — subsequent /backup navigations are no-ops.
|
// loadScript is idempotent — subsequent /backup navigations are no-ops.
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this.loadScript('/components/backup/js/backup-page.js'),
|
this.loadScript('/components/backup/core/js/backup-page.js'),
|
||||||
this.loadScript('/core/lib/backup-app-card.js')
|
this.loadScript('/core/lib/backup-app-card.js')
|
||||||
]);
|
]);
|
||||||
const html = await this.fetchContent('/components/backup/html/backup-content.html');
|
const html = await this.fetchContent('/components/backup/core/html/backup-content.html');
|
||||||
this.loadContent(html, 'Backups');
|
this.loadContent(html, 'Backups');
|
||||||
if (typeof BackupPage !== 'undefined') {
|
if (typeof BackupPage !== 'undefined') {
|
||||||
window.backupPage = new BackupPage();
|
window.backupPage = new BackupPage();
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<link rel="stylesheet" href="/core/css/style.css">
|
<link rel="stylesheet" href="/core/css/style.css">
|
||||||
<link rel="stylesheet" href="/components/admin/config/css/ip-whitelist.css">
|
<link rel="stylesheet" href="/components/admin/config/css/ip-whitelist.css">
|
||||||
<link rel="stylesheet" href="/components/apps/port-manager/css/port-manager.css">
|
<link rel="stylesheet" href="/components/apps/port-manager/css/port-manager.css">
|
||||||
<link rel="stylesheet" href="/components/backup/css/backup.css">
|
<link rel="stylesheet" href="/components/backup/core/css/backup.css">
|
||||||
<link rel="stylesheet" href="/components/admin/ssh/css/ssh.css">
|
<link rel="stylesheet" href="/components/admin/ssh/css/ssh.css">
|
||||||
<link rel="stylesheet" href="/components/admin/core/css/admin.css">
|
<link rel="stylesheet" href="/components/admin/core/css/admin.css">
|
||||||
<link rel="stylesheet" href="/components/apps/services/css/services.css">
|
<link rel="stylesheet" href="/components/apps/services/css/services.css">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user