mirror of
https://github.com/wekan/wekan.git
synced 2026-03-02 03:40:16 +01:00
Commented out Admin Panel/Settings/Migrations related menu option and code to speed up WeKan.
Thanks to xet7 ! Fixes #6146
This commit is contained in:
parent
d57c5f736f
commit
9b3ecd795f
4 changed files with 358 additions and 422 deletions
|
|
@ -9,12 +9,12 @@ if ('serviceWorker' in navigator) {
|
||||||
import '/client/lib/boardConverter';
|
import '/client/lib/boardConverter';
|
||||||
import '/client/components/boardConversionProgress';
|
import '/client/components/boardConversionProgress';
|
||||||
|
|
||||||
// Import migration manager and progress UI
|
// Import migration manager and progress UI - COMMENTED OUT
|
||||||
import '/client/lib/attachmentMigrationManager';
|
// import '/client/lib/attachmentMigrationManager';
|
||||||
import '/client/components/settings/migrationProgress';
|
// import '/client/components/settings/migrationProgress';
|
||||||
|
|
||||||
// Import cron settings
|
// Import cron settings - COMMENTED OUT
|
||||||
import '/client/components/settings/cronSettings';
|
// import '/client/components/settings/cronSettings';
|
||||||
// Custom head tags
|
// Custom head tags
|
||||||
|
|
||||||
// Mirror Meteor login token into a cookie for server-side file route auth
|
// Mirror Meteor login token into a cookie for server-side file route auth
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,7 @@ template(name="setting")
|
||||||
span.emoji-icon
|
span.emoji-icon
|
||||||
i.fa.fa-paperclip
|
i.fa.fa-paperclip
|
||||||
| {{_ 'attachments'}}
|
| {{_ 'attachments'}}
|
||||||
else if isCronSettings
|
//- COMMENTED OUT: Migration settings title section
|
||||||
span
|
|
||||||
span.emoji-icon
|
|
||||||
i.fa.fa-clock
|
|
||||||
| {{_ 'cron'}}
|
|
||||||
.content-body
|
.content-body
|
||||||
.side-menu
|
.side-menu
|
||||||
ul
|
ul
|
||||||
|
|
@ -103,11 +99,7 @@ template(name="setting")
|
||||||
span.emoji-icon
|
span.emoji-icon
|
||||||
i.fa.fa-paperclip
|
i.fa.fa-paperclip
|
||||||
| {{_ 'attachments'}}
|
| {{_ 'attachments'}}
|
||||||
li(class="{{#if isCronSettings}}active{{/if}}")
|
//- COMMENTED OUT: Migration menu item
|
||||||
a.js-setting-menu(data-id="cron-settings")
|
|
||||||
span.emoji-icon
|
|
||||||
i.fa.fa-clock
|
|
||||||
| {{_ 'migrations'}}
|
|
||||||
.main-body
|
.main-body
|
||||||
if isLoading
|
if isLoading
|
||||||
+spinner
|
+spinner
|
||||||
|
|
@ -182,62 +174,6 @@ template(name="setting")
|
||||||
.form-group
|
.form-group
|
||||||
button.js-test-s3-connection.btn.btn-secondary {{_ 'test-s3-connection'}}
|
button.js-test-s3-connection.btn.btn-secondary {{_ 'test-s3-connection'}}
|
||||||
button.js-save-s3-settings.btn.btn-primary {{_ 'save-s3-settings'}}
|
button.js-save-s3-settings.btn.btn-primary {{_ 'save-s3-settings'}}
|
||||||
else if isCronSettings
|
|
||||||
ul#cron-setting.setting-detail
|
|
||||||
li
|
|
||||||
h3 {{_ 'migrations'}}
|
|
||||||
.form-group
|
|
||||||
label {{_ 'select-migration'}}
|
|
||||||
select.js-migration-select.wekan-form-control
|
|
||||||
option(value="0") 0 - {{_ 'all-migrations'}}
|
|
||||||
each migrationStepsWithIndex
|
|
||||||
option(value="{{index}}") {{index}} - {{name}}
|
|
||||||
.form-group
|
|
||||||
label {{_ 'migration-status'}}
|
|
||||||
.status-indicator
|
|
||||||
span.status-label {{_ 'status'}}:
|
|
||||||
span.status-value
|
|
||||||
if isMigrating
|
|
||||||
i.fa.fa-spinner.fa-spin(style="margin-right: 8px;")
|
|
||||||
else if isUpdatingMigrationDropdown
|
|
||||||
i.fa.fa-spinner.fa-spin(style="margin-right: 8px;")
|
|
||||||
| {{#if isMigrating}}{{migrationStatusLine}}{{else}}{{migrationStatus}}{{/if}}
|
|
||||||
if isMigrating
|
|
||||||
.progress-section
|
|
||||||
if migrationCurrentAction
|
|
||||||
.step-counter
|
|
||||||
| {{migrationCurrentAction}}
|
|
||||||
else if migrationJobTotalSteps
|
|
||||||
.step-counter
|
|
||||||
| Step {{migrationJobStepNum}}/{{migrationJobTotalSteps}}
|
|
||||||
else if migrationTotalSteps
|
|
||||||
.step-counter
|
|
||||||
| Migration {{migrationCurrentStepNum}}/{{migrationTotalSteps}}
|
|
||||||
else
|
|
||||||
.step-counter
|
|
||||||
i.fa.fa-spinner.fa-spin(style="margin-right: 8px;")
|
|
||||||
| Calculating migration scope...
|
|
||||||
.progress
|
|
||||||
.progress-bar(role="progressbar" style="width: {{migrationJobProgress}}%" aria-valuenow="{{migrationJobProgress}}" aria-valuemin="0" aria-valuemax="100")
|
|
||||||
| {{migrationJobProgress}}%
|
|
||||||
.progress-text
|
|
||||||
| {{migrationJobProgress}}% {{_ 'complete'}}
|
|
||||||
.migration-details
|
|
||||||
if migrationJobTotalSteps
|
|
||||||
if migrationJobTotalSteps gt 1
|
|
||||||
.detail-line
|
|
||||||
| Job step: {{migrationJobStepNum}}/{{migrationJobTotalSteps}}
|
|
||||||
if migrationEtaSeconds
|
|
||||||
.detail-line
|
|
||||||
| ETA: {{formatDurationSeconds migrationEtaSeconds}}
|
|
||||||
if migrationElapsedSeconds
|
|
||||||
.detail-line
|
|
||||||
| Elapsed: {{formatDurationSeconds migrationElapsedSeconds}}
|
|
||||||
|
|
||||||
.form-group
|
|
||||||
button.js-start-migration.primary(disabled="{{#if isMigrating}}disabled{{/if}}") {{_ 'start-all-migrations'}}
|
|
||||||
button.js-pause-all-migrations.primary(disabled="{{#unless isMigrating}}disabled{{/unless}}") {{_ 'pause-all-migrations'}}
|
|
||||||
button.js-stop-all-migrations.primary(disabled="{{#unless isMigrating}}disabled{{/unless}}") {{_ 'stop-all-migrations'}}
|
|
||||||
else if isGeneralSetting
|
else if isGeneralSetting
|
||||||
+general
|
+general
|
||||||
else if isEmailSetting
|
else if isEmailSetting
|
||||||
|
|
|
||||||
|
|
@ -2,24 +2,24 @@ import { ReactiveCache } from '/imports/reactiveCache';
|
||||||
import { TAPi18n } from '/imports/i18n';
|
import { TAPi18n } from '/imports/i18n';
|
||||||
import { ALLOWED_WAIT_SPINNERS } from '/config/const';
|
import { ALLOWED_WAIT_SPINNERS } from '/config/const';
|
||||||
import LockoutSettings from '/models/lockoutSettings';
|
import LockoutSettings from '/models/lockoutSettings';
|
||||||
import {
|
// import {
|
||||||
cronMigrationProgress,
|
// cronMigrationProgress,
|
||||||
cronMigrationStatus,
|
// cronMigrationStatus,
|
||||||
cronMigrationCurrentStep,
|
// cronMigrationCurrentStep,
|
||||||
cronMigrationSteps,
|
// cronMigrationSteps,
|
||||||
cronIsMigrating,
|
// cronIsMigrating,
|
||||||
cronJobs,
|
// cronJobs,
|
||||||
cronMigrationCurrentStepNum,
|
// cronMigrationCurrentStepNum,
|
||||||
cronMigrationTotalSteps,
|
// cronMigrationTotalSteps,
|
||||||
cronMigrationCurrentAction,
|
// cronMigrationCurrentAction,
|
||||||
cronMigrationJobProgress,
|
// cronMigrationJobProgress,
|
||||||
cronMigrationJobStepNum,
|
// cronMigrationJobStepNum,
|
||||||
cronMigrationJobTotalSteps,
|
// cronMigrationJobTotalSteps,
|
||||||
cronMigrationEtaSeconds,
|
// cronMigrationEtaSeconds,
|
||||||
cronMigrationElapsedSeconds,
|
// cronMigrationElapsedSeconds,
|
||||||
cronMigrationCurrentNumber,
|
// cronMigrationCurrentNumber,
|
||||||
cronMigrationCurrentName,
|
// cronMigrationCurrentName,
|
||||||
} from '/imports/cronMigrationClient';
|
// } from '/imports/cronMigrationClient';
|
||||||
import { format } from '/imports/lib/dateUtils';
|
import { format } from '/imports/lib/dateUtils';
|
||||||
|
|
||||||
BlazeComponent.extendComponent({
|
BlazeComponent.extendComponent({
|
||||||
|
|
@ -36,8 +36,8 @@ BlazeComponent.extendComponent({
|
||||||
this.layoutSetting = new ReactiveVar(false);
|
this.layoutSetting = new ReactiveVar(false);
|
||||||
this.webhookSetting = new ReactiveVar(false);
|
this.webhookSetting = new ReactiveVar(false);
|
||||||
this.attachmentSettings = new ReactiveVar(false);
|
this.attachmentSettings = new ReactiveVar(false);
|
||||||
this.cronSettings = new ReactiveVar(false);
|
// this.cronSettings = new ReactiveVar(false);
|
||||||
this.migrationErrorsList = new ReactiveVar([]);
|
// this.migrationErrorsList = new ReactiveVar([]);
|
||||||
|
|
||||||
Meteor.subscribe('setting');
|
Meteor.subscribe('setting');
|
||||||
Meteor.subscribe('mailServer');
|
Meteor.subscribe('mailServer');
|
||||||
|
|
@ -49,21 +49,21 @@ BlazeComponent.extendComponent({
|
||||||
Meteor.subscribe('lockoutSettings');
|
Meteor.subscribe('lockoutSettings');
|
||||||
|
|
||||||
// Poll for migration errors
|
// Poll for migration errors
|
||||||
this.errorPollInterval = Meteor.setInterval(() => {
|
// this.errorPollInterval = Meteor.setInterval(() => {
|
||||||
if (this.cronSettings.get()) {
|
// if (this.cronSettings.get()) {
|
||||||
Meteor.call('cron.getAllMigrationErrors', 50, (error, result) => {
|
// Meteor.call('cron.getAllMigrationErrors', 50, (error, result) => {
|
||||||
if (!error && result) {
|
// if (!error && result) {
|
||||||
this.migrationErrorsList.set(result);
|
// this.migrationErrorsList.set(result);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}, 5000); // Poll every 5 seconds
|
// }, 5000); // Poll every 5 seconds
|
||||||
},
|
},
|
||||||
|
|
||||||
onDestroyed() {
|
onDestroyed() {
|
||||||
if (this.errorPollInterval) {
|
// if (this.errorPollInterval) {
|
||||||
Meteor.clearInterval(this.errorPollInterval);
|
// Meteor.clearInterval(this.errorPollInterval);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
setError(error) {
|
setError(error) {
|
||||||
|
|
@ -100,9 +100,9 @@ BlazeComponent.extendComponent({
|
||||||
isAttachmentSettings() {
|
isAttachmentSettings() {
|
||||||
return this.attachmentSettings && this.attachmentSettings.get();
|
return this.attachmentSettings && this.attachmentSettings.get();
|
||||||
},
|
},
|
||||||
isCronSettings() {
|
// isCronSettings() {
|
||||||
return this.cronSettings && this.cronSettings.get();
|
// return this.cronSettings && this.cronSettings.get();
|
||||||
},
|
// },
|
||||||
isLoading() {
|
isLoading() {
|
||||||
return this.loading && this.loading.get();
|
return this.loading && this.loading.get();
|
||||||
},
|
},
|
||||||
|
|
@ -151,124 +151,124 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
// Cron settings helpers
|
// Cron settings helpers
|
||||||
migrationStatus() {
|
// migrationStatus() {
|
||||||
return cronMigrationStatus.get() || TAPi18n.__('idle');
|
// return cronMigrationStatus.get() || TAPi18n.__('idle');
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationProgress() {
|
// migrationProgress() {
|
||||||
return cronMigrationProgress.get() || 0;
|
// return cronMigrationProgress.get() || 0;
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationCurrentStep() {
|
// migrationCurrentStep() {
|
||||||
return cronMigrationCurrentStep.get() || '';
|
// return cronMigrationCurrentStep.get() || '';
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
isMigrating() {
|
// isMigrating() {
|
||||||
return cronIsMigrating.get() || false;
|
// return cronIsMigrating.get() || false;
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationSteps() {
|
// migrationSteps() {
|
||||||
return cronMigrationSteps.get() || [];
|
// return cronMigrationSteps.get() || [];
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationStepsWithIndex() {
|
// migrationStepsWithIndex() {
|
||||||
const steps = cronMigrationSteps.get() || [];
|
// const steps = cronMigrationSteps.get() || [];
|
||||||
return steps.map((step, idx) => ({
|
// return steps.map((step, idx) => ({
|
||||||
...step,
|
// ...step,
|
||||||
index: idx + 1,
|
// index: idx + 1,
|
||||||
}));
|
// }));
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
cronJobs() {
|
// cronJobs() {
|
||||||
return cronJobs.get() || [];
|
// return cronJobs.get() || [];
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
isCronJobPaused(status) {
|
// isCronJobPaused(status) {
|
||||||
return status === 'paused';
|
// return status === 'paused';
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationCurrentStepNum() {
|
// migrationCurrentStepNum() {
|
||||||
return cronMigrationCurrentStepNum.get() || 0;
|
// return cronMigrationCurrentStepNum.get() || 0;
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationTotalSteps() {
|
// migrationTotalSteps() {
|
||||||
return cronMigrationTotalSteps.get() || 0;
|
// return cronMigrationTotalSteps.get() || 0;
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationCurrentAction() {
|
// migrationCurrentAction() {
|
||||||
return cronMigrationCurrentAction.get() || '';
|
// return cronMigrationCurrentAction.get() || '';
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationJobProgress() {
|
// migrationJobProgress() {
|
||||||
return cronMigrationJobProgress.get() || 0;
|
// return cronMigrationJobProgress.get() || 0;
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationJobStepNum() {
|
// migrationJobStepNum() {
|
||||||
return cronMigrationJobStepNum.get() || 0;
|
// return cronMigrationJobStepNum.get() || 0;
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationJobTotalSteps() {
|
// migrationJobTotalSteps() {
|
||||||
return cronMigrationJobTotalSteps.get() || 0;
|
// return cronMigrationJobTotalSteps.get() || 0;
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationEtaSeconds() {
|
// migrationEtaSeconds() {
|
||||||
return cronMigrationEtaSeconds.get();
|
// return cronMigrationEtaSeconds.get();
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationElapsedSeconds() {
|
// migrationElapsedSeconds() {
|
||||||
return cronMigrationElapsedSeconds.get();
|
// return cronMigrationElapsedSeconds.get();
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationNumber() {
|
// migrationNumber() {
|
||||||
return cronMigrationCurrentNumber.get();
|
// return cronMigrationCurrentNumber.get();
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationName() {
|
// migrationName() {
|
||||||
return cronMigrationCurrentName.get() || '';
|
// return cronMigrationCurrentName.get() || '';
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationStatusLine() {
|
// migrationStatusLine() {
|
||||||
const number = cronMigrationCurrentNumber.get();
|
// const number = cronMigrationCurrentNumber.get();
|
||||||
const name = cronMigrationCurrentName.get();
|
// const name = cronMigrationCurrentName.get();
|
||||||
if (number && name) {
|
// if (number && name) {
|
||||||
return `${number} - ${name}`;
|
// return `${number} - ${name}`;
|
||||||
}
|
// }
|
||||||
return this.migrationStatus();
|
// return this.migrationStatus();
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
isUpdatingMigrationDropdown() {
|
// isUpdatingMigrationDropdown() {
|
||||||
const status = this.migrationStatus();
|
// const status = this.migrationStatus();
|
||||||
return (
|
// return (
|
||||||
status && status.startsWith('Updating Select Migration dropdown menu')
|
// status && status.startsWith('Updating Select Migration dropdown menu')
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
migrationErrors() {
|
// migrationErrors() {
|
||||||
return this.migrationErrorsList ? this.migrationErrorsList.get() : [];
|
// return this.migrationErrorsList ? this.migrationErrorsList.get() : [];
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
hasErrors() {
|
// hasErrors() {
|
||||||
const errors = this.migrationErrors();
|
// const errors = this.migrationErrors();
|
||||||
return errors && errors.length > 0;
|
// return errors && errors.length > 0;
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
formatDateTime(date) {
|
// formatDateTime(date) {
|
||||||
if (!date) return '';
|
// if (!date) return '';
|
||||||
return format(date, 'YYYY-MM-DD HH:mm:ss');
|
// return format(date, 'YYYY-MM-DD HH:mm:ss');
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
formatDurationSeconds(seconds) {
|
// formatDurationSeconds(seconds) {
|
||||||
if (seconds === null || seconds === undefined) return '';
|
// if (seconds === null || seconds === undefined) return '';
|
||||||
const total = Math.max(0, Math.floor(seconds));
|
// const total = Math.max(0, Math.floor(seconds));
|
||||||
const hrs = Math.floor(total / 3600);
|
// const hrs = Math.floor(total / 3600);
|
||||||
const mins = Math.floor((total % 3600) / 60);
|
// const mins = Math.floor((total % 3600) / 60);
|
||||||
const secs = total % 60;
|
// const secs = total % 60;
|
||||||
const parts = [];
|
// const parts = [];
|
||||||
if (hrs > 0) parts.push(String(hrs).padStart(2, '0'));
|
// if (hrs > 0) parts.push(String(hrs).padStart(2, '0'));
|
||||||
parts.push(String(mins).padStart(2, '0'));
|
// parts.push(String(mins).padStart(2, '0'));
|
||||||
parts.push(String(secs).padStart(2, '0'));
|
// parts.push(String(secs).padStart(2, '0'));
|
||||||
return parts.join(':');
|
// return parts.join(':');
|
||||||
},
|
// },
|
||||||
|
|
||||||
setLoading(w) {
|
setLoading(w) {
|
||||||
this.loading.set(w);
|
this.loading.set(w);
|
||||||
|
|
@ -311,188 +311,188 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
// Event handlers for cron settings
|
// Event handlers for cron settings
|
||||||
'click button.js-start-migration'(event) {
|
// 'click button.js-start-migration'(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
this.setLoading(true);
|
// this.setLoading(true);
|
||||||
cronIsMigrating.set(true);
|
// cronIsMigrating.set(true);
|
||||||
cronMigrationStatus.set(TAPi18n.__('migration-starting'));
|
// cronMigrationStatus.set(TAPi18n.__('migration-starting'));
|
||||||
cronMigrationCurrentAction.set('');
|
// cronMigrationCurrentAction.set('');
|
||||||
cronMigrationJobProgress.set(0);
|
// cronMigrationJobProgress.set(0);
|
||||||
cronMigrationJobStepNum.set(0);
|
// cronMigrationJobStepNum.set(0);
|
||||||
cronMigrationJobTotalSteps.set(0);
|
// cronMigrationJobTotalSteps.set(0);
|
||||||
const selectedIndex = parseInt($('.js-migration-select').val() || '0', 10);
|
// const selectedIndex = parseInt($('.js-migration-select').val() || '0', 10);
|
||||||
|
//
|
||||||
if (selectedIndex === 0) {
|
// if (selectedIndex === 0) {
|
||||||
// Run all migrations
|
// // Run all migrations
|
||||||
Meteor.call('cron.startAllMigrations', (error, result) => {
|
// Meteor.call('cron.startAllMigrations', (error, result) => {
|
||||||
this.setLoading(false);
|
// this.setLoading(false);
|
||||||
if (error) {
|
// if (error) {
|
||||||
alert(TAPi18n.__('migration-start-failed') + ': ' + error.reason);
|
// alert(TAPi18n.__('migration-start-failed') + ': ' + error.reason);
|
||||||
} else {
|
// } else {
|
||||||
alert(TAPi18n.__('migration-started'));
|
// alert(TAPi18n.__('migration-started'));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
// Run specific migration
|
// // Run specific migration
|
||||||
Meteor.call(
|
// Meteor.call(
|
||||||
'cron.startSpecificMigration',
|
// 'cron.startSpecificMigration',
|
||||||
selectedIndex - 1,
|
// selectedIndex - 1,
|
||||||
(error, result) => {
|
// (error, result) => {
|
||||||
this.setLoading(false);
|
// this.setLoading(false);
|
||||||
if (error) {
|
// if (error) {
|
||||||
alert(TAPi18n.__('migration-start-failed') + ': ' + error.reason);
|
// alert(TAPi18n.__('migration-start-failed') + ': ' + error.reason);
|
||||||
} else if (result && result.skipped) {
|
// } else if (result && result.skipped) {
|
||||||
cronIsMigrating.set(false);
|
// cronIsMigrating.set(false);
|
||||||
cronMigrationStatus.set(TAPi18n.__('migration-not-needed'));
|
// cronMigrationStatus.set(TAPi18n.__('migration-not-needed'));
|
||||||
alert(TAPi18n.__('migration-not-needed'));
|
// alert(TAPi18n.__('migration-not-needed'));
|
||||||
} else {
|
// } else {
|
||||||
alert(TAPi18n.__('migration-started'));
|
// alert(TAPi18n.__('migration-started'));
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
'click button.js-start-all-migrations'(event) {
|
// 'click button.js-start-all-migrations'(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
this.setLoading(true);
|
// this.setLoading(true);
|
||||||
Meteor.call('cron.startAllMigrations', (error) => {
|
// Meteor.call('cron.startAllMigrations', (error) => {
|
||||||
this.setLoading(false);
|
// this.setLoading(false);
|
||||||
if (error) {
|
// if (error) {
|
||||||
alert(TAPi18n.__('migration-start-failed') + ': ' + error.reason);
|
// alert(TAPi18n.__('migration-start-failed') + ': ' + error.reason);
|
||||||
} else {
|
// } else {
|
||||||
alert(TAPi18n.__('migration-started'));
|
// alert(TAPi18n.__('migration-started'));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
'click button.js-pause-all-migrations'(event) {
|
// 'click button.js-pause-all-migrations'(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
this.setLoading(true);
|
// this.setLoading(true);
|
||||||
Meteor.call('cron.pauseAllMigrations', (error) => {
|
// Meteor.call('cron.pauseAllMigrations', (error) => {
|
||||||
this.setLoading(false);
|
// this.setLoading(false);
|
||||||
if (error) {
|
// if (error) {
|
||||||
alert(TAPi18n.__('migration-pause-failed') + ': ' + error.reason);
|
// alert(TAPi18n.__('migration-pause-failed') + ': ' + error.reason);
|
||||||
} else {
|
// } else {
|
||||||
alert(TAPi18n.__('migration-paused'));
|
// alert(TAPi18n.__('migration-paused'));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
'click button.js-stop-all-migrations'(event) {
|
// 'click button.js-stop-all-migrations'(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
if (confirm(TAPi18n.__('migration-stop-confirm'))) {
|
// if (confirm(TAPi18n.__('migration-stop-confirm'))) {
|
||||||
this.setLoading(true);
|
// this.setLoading(true);
|
||||||
Meteor.call('cron.stopAllMigrations', (error) => {
|
// Meteor.call('cron.stopAllMigrations', (error) => {
|
||||||
this.setLoading(false);
|
// this.setLoading(false);
|
||||||
if (error) {
|
// if (error) {
|
||||||
alert(TAPi18n.__('migration-stop-failed') + ': ' + error.reason);
|
// alert(TAPi18n.__('migration-stop-failed') + ': ' + error.reason);
|
||||||
} else {
|
// } else {
|
||||||
alert(TAPi18n.__('migration-stopped'));
|
// alert(TAPi18n.__('migration-stopped'));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
'click button.js-pause-migration'(event) {
|
// 'click button.js-pause-migration'(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
this.setLoading(true);
|
// this.setLoading(true);
|
||||||
cronIsMigrating.set(false);
|
// cronIsMigrating.set(false);
|
||||||
cronMigrationStatus.set(TAPi18n.__('migration-pausing'));
|
// cronMigrationStatus.set(TAPi18n.__('migration-pausing'));
|
||||||
Meteor.call('cron.pauseAllMigrations', (error, result) => {
|
// Meteor.call('cron.pauseAllMigrations', (error, result) => {
|
||||||
this.setLoading(false);
|
// this.setLoading(false);
|
||||||
if (error) {
|
// if (error) {
|
||||||
alert(TAPi18n.__('migration-pause-failed') + ': ' + error.reason);
|
// alert(TAPi18n.__('migration-pause-failed') + ': ' + error.reason);
|
||||||
} else {
|
// } else {
|
||||||
alert(TAPi18n.__('migration-paused'));
|
// alert(TAPi18n.__('migration-paused'));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
'click button.js-stop-migration'(event) {
|
// 'click button.js-stop-migration'(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
if (confirm(TAPi18n.__('migration-stop-confirm'))) {
|
// if (confirm(TAPi18n.__('migration-stop-confirm'))) {
|
||||||
this.setLoading(true);
|
// this.setLoading(true);
|
||||||
cronIsMigrating.set(false);
|
// cronIsMigrating.set(false);
|
||||||
cronMigrationStatus.set(TAPi18n.__('migration-stopping'));
|
// cronMigrationStatus.set(TAPi18n.__('migration-stopping'));
|
||||||
cronMigrationCurrentAction.set('');
|
// cronMigrationCurrentAction.set('');
|
||||||
cronMigrationJobProgress.set(0);
|
// cronMigrationJobProgress.set(0);
|
||||||
cronMigrationJobStepNum.set(0);
|
// cronMigrationJobStepNum.set(0);
|
||||||
cronMigrationJobTotalSteps.set(0);
|
// cronMigrationJobTotalSteps.set(0);
|
||||||
Meteor.call('cron.stopAllMigrations', (error, result) => {
|
// Meteor.call('cron.stopAllMigrations', (error, result) => {
|
||||||
this.setLoading(false);
|
// this.setLoading(false);
|
||||||
if (error) {
|
// if (error) {
|
||||||
alert(TAPi18n.__('migration-stop-failed') + ': ' + error.reason);
|
// alert(TAPi18n.__('migration-stop-failed') + ': ' + error.reason);
|
||||||
} else {
|
// } else {
|
||||||
alert(TAPi18n.__('migration-stopped'));
|
// alert(TAPi18n.__('migration-stopped'));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
'click button.js-start-job'(event) {
|
// 'click button.js-start-job'(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
const jobName = $(event.target).data('job-name');
|
// const jobName = $(event.target).data('job-name');
|
||||||
this.setLoading(true);
|
// this.setLoading(true);
|
||||||
Meteor.call('cron.startJob', jobName, (error) => {
|
// Meteor.call('cron.startJob', jobName, (error) => {
|
||||||
this.setLoading(false);
|
// this.setLoading(false);
|
||||||
if (error) {
|
// if (error) {
|
||||||
alert(TAPi18n.__('cron-job-start-failed') + ': ' + error.reason);
|
// alert(TAPi18n.__('cron-job-start-failed') + ': ' + error.reason);
|
||||||
} else {
|
// } else {
|
||||||
alert(TAPi18n.__('cron-job-started'));
|
// alert(TAPi18n.__('cron-job-started'));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
'click button.js-pause-job'(event) {
|
// 'click button.js-pause-job'(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
const jobName = $(event.target).data('job-name');
|
// const jobName = $(event.target).data('job-name');
|
||||||
this.setLoading(true);
|
// this.setLoading(true);
|
||||||
Meteor.call('cron.pauseJob', jobName, (error) => {
|
// Meteor.call('cron.pauseJob', jobName, (error) => {
|
||||||
this.setLoading(false);
|
// this.setLoading(false);
|
||||||
if (error) {
|
// if (error) {
|
||||||
alert(TAPi18n.__('cron-job-pause-failed') + ': ' + error.reason);
|
// alert(TAPi18n.__('cron-job-pause-failed') + ': ' + error.reason);
|
||||||
} else {
|
// } else {
|
||||||
alert(TAPi18n.__('cron-job-paused'));
|
// alert(TAPi18n.__('cron-job-paused'));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
'click button.js-resume-job'(event) {
|
// 'click button.js-resume-job'(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
const jobName = $(event.target).data('job-name');
|
// const jobName = $(event.target).data('job-name');
|
||||||
this.setLoading(true);
|
// this.setLoading(true);
|
||||||
Meteor.call('cron.resumeJob', jobName, (error) => {
|
// Meteor.call('cron.resumeJob', jobName, (error) => {
|
||||||
this.setLoading(false);
|
// this.setLoading(false);
|
||||||
if (error) {
|
// if (error) {
|
||||||
alert(TAPi18n.__('cron-job-resume-failed') + ': ' + error.reason);
|
// alert(TAPi18n.__('cron-job-resume-failed') + ': ' + error.reason);
|
||||||
} else {
|
// } else {
|
||||||
alert(TAPi18n.__('cron-job-resumed'));
|
// alert(TAPi18n.__('cron-job-resumed'));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
'click button.js-delete-job'(event) {
|
// 'click button.js-delete-job'(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
const jobName = $(event.target).data('job-name');
|
// const jobName = $(event.target).data('job-name');
|
||||||
if (confirm(TAPi18n.__('cron-job-delete-confirm'))) {
|
// if (confirm(TAPi18n.__('cron-job-delete-confirm'))) {
|
||||||
this.setLoading(true);
|
// this.setLoading(true);
|
||||||
Meteor.call('cron.removeJob', jobName, (error) => {
|
// Meteor.call('cron.removeJob', jobName, (error) => {
|
||||||
this.setLoading(false);
|
// this.setLoading(false);
|
||||||
if (error) {
|
// if (error) {
|
||||||
alert(TAPi18n.__('cron-job-delete-failed') + ': ' + error.reason);
|
// alert(TAPi18n.__('cron-job-delete-failed') + ': ' + error.reason);
|
||||||
} else {
|
// } else {
|
||||||
alert(TAPi18n.__('cron-job-deleted'));
|
// alert(TAPi18n.__('cron-job-deleted'));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
'click button.js-add-cron-job'(event) {
|
// 'click button.js-add-cron-job'(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
// Placeholder for adding a new cron job (e.g., open a modal)
|
// // Placeholder for adding a new cron job (e.g., open a modal)
|
||||||
alert(TAPi18n.__('add-cron-job-placeholder'));
|
// alert(TAPi18n.__('add-cron-job-placeholder'));
|
||||||
},
|
// },
|
||||||
|
|
||||||
checkField(selector) {
|
checkField(selector) {
|
||||||
const value = $(selector).val();
|
const value = $(selector).val();
|
||||||
|
|
@ -565,11 +565,11 @@ BlazeComponent.extendComponent({
|
||||||
console.log('Initializing attachment sub-menu');
|
console.log('Initializing attachment sub-menu');
|
||||||
},
|
},
|
||||||
|
|
||||||
initializeCronSubMenu() {
|
// initializeCronSubMenu() {
|
||||||
// Set default sub-menu state for cron settings
|
// // Set default sub-menu state for cron settings
|
||||||
// This will be handled by the cron settings template
|
// // This will be handled by the cron settings template
|
||||||
console.log('Initializing cron sub-menu');
|
// console.log('Initializing cron sub-menu');
|
||||||
},
|
// },
|
||||||
switchMenu(event) {
|
switchMenu(event) {
|
||||||
const target = $(event.target);
|
const target = $(event.target);
|
||||||
if (!target.hasClass('active')) {
|
if (!target.hasClass('active')) {
|
||||||
|
|
@ -588,7 +588,7 @@ BlazeComponent.extendComponent({
|
||||||
this.layoutSetting.set(false);
|
this.layoutSetting.set(false);
|
||||||
this.webhookSetting.set(false);
|
this.webhookSetting.set(false);
|
||||||
this.attachmentSettings.set(false);
|
this.attachmentSettings.set(false);
|
||||||
this.cronSettings.set(false);
|
// this.cronSettings.set(false);
|
||||||
|
|
||||||
// Set the selected setting to true
|
// Set the selected setting to true
|
||||||
if (targetID === 'registration-setting') {
|
if (targetID === 'registration-setting') {
|
||||||
|
|
@ -610,10 +610,10 @@ BlazeComponent.extendComponent({
|
||||||
} else if (targetID === 'attachment-settings') {
|
} else if (targetID === 'attachment-settings') {
|
||||||
this.attachmentSettings.set(true);
|
this.attachmentSettings.set(true);
|
||||||
this.initializeAttachmentSubMenu();
|
this.initializeAttachmentSubMenu();
|
||||||
} else if (targetID === 'cron-settings') {
|
} // else if (targetID === 'cron-settings') {
|
||||||
this.cronSettings.set(true);
|
// this.cronSettings.set(true);
|
||||||
this.initializeCronSubMenu();
|
// this.initializeCronSubMenu();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,13 +38,13 @@ if (errors.length > 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Import cron job storage for persistent job tracking
|
// Import cron job storage for persistent job tracking
|
||||||
import './cronJobStorage';
|
// import './cronJobStorage';
|
||||||
|
|
||||||
// Import migrations
|
// Import migrations - COMMENTED OUT
|
||||||
import './migrations/fixMissingListsMigration';
|
// import './migrations/fixMissingListsMigration';
|
||||||
import './migrations/fixAvatarUrls';
|
// import './migrations/fixAvatarUrls';
|
||||||
import './migrations/fixAllFileUrls';
|
// import './migrations/fixAllFileUrls';
|
||||||
import './migrations/comprehensiveBoardMigration';
|
// import './migrations/comprehensiveBoardMigration';
|
||||||
|
|
||||||
// Import file serving routes
|
// Import file serving routes
|
||||||
import './routes/universalFileServer';
|
import './routes/universalFileServer';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue