Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { readFile } from 'node:fs/promises';

import { ENABLE_NEXT_DOCKER_RELEASE } from '@app/environment.js';
import {
FileModification,
ShouldApplyWithReason,
Expand All @@ -12,28 +11,9 @@ export default class DockerContainersPageModification extends FileModification {
'/usr/local/emhttp/plugins/dynamix.docker.manager/DockerContainers.page';

async shouldApply(): Promise<ShouldApplyWithReason> {
const baseCheck = await super.shouldApply({ checkOsVersion: false });
if (!baseCheck.shouldApply) {
return baseCheck;
}

if (!ENABLE_NEXT_DOCKER_RELEASE) {
return {
shouldApply: false,
reason: 'ENABLE_NEXT_DOCKER_RELEASE is not enabled, so Docker overview table modification is not applied',
};
}

if (await this.isUnraidVersionGreaterThanOrEqualTo('7.3.0')) {
return {
shouldApply: true,
reason: 'Docker overview table WILL BE integrated in Unraid 7.3 or later. This modification is a temporary measure for testing.',
};
}

return {
shouldApply: false,
reason: 'Docker overview table modification is disabled for Unraid < 7.3',
reason: '',
};
}

Expand Down
Loading