Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve warning for modules disabled but loaded #362

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions public/i18n/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1900,8 +1900,8 @@
"loaded_on_kernel": "Loaded on kernel",
"loaded": "Loaded",
"not_loaded": "Not loaded",
"enabled_but_not_loaded_tooltip": "The module is enabled but not loaded on the kernel.",
"disabled_but_loaded_tooltip": "This module is disabled but currently loaded on the kernel: you might need to reboot the unit to unload it.",
"enabled_but_not_loaded_tooltip": "This module is enabled but not loaded in the kernel.",
"disabled_but_loaded_tooltip": "This module is currently disabled but still loaded in the kernel. It may have been loaded as a dependency of another module or manually disabled. If manually disabled, a system reboot may be required to fully unload it.",
"filter_nat_helpers": "Filter NAT helpers",
"no_nat_helpers_found": "No NAT helpers found",
"edit_nat_helper": "Edit NAT helper",
Expand Down
18 changes: 11 additions & 7 deletions src/components/standalone/firewall/nat/NatHelpersTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ const { currentPage, paginatedItems } = useItemPagination(() => props.filteredNa
: t('standalone.nat_helpers.not_loaded')
}}
</span>
<!-- enabled/loaded inconsistency warning -->
<NeTooltip v-if="(item.enabled && !item.loaded) || (!item.enabled && item.loaded)">
<!-- module enabled but not loaded warning -->
<NeTooltip v-if="item.enabled && !item.loaded">
<template #trigger>
<font-awesome-icon
:icon="['fas', 'triangle-exclamation']"
Expand All @@ -120,11 +120,15 @@ const { currentPage, paginatedItems } = useItemPagination(() => props.filteredNa
</template>
<template #content>
<p>
{{
item.enabled && !item.loaded
? t('standalone.nat_helpers.enabled_but_not_loaded_tooltip')
: t('standalone.nat_helpers.disabled_but_loaded_tooltip')
}}
{{ t('standalone.nat_helpers.enabled_but_not_loaded_tooltip') }}
</p>
</template>
</NeTooltip>
<!-- module disabled but loaded warning -->
<NeTooltip v-else-if="!item.enabled && item.loaded">
<template #content>
<p>
{{ t('standalone.nat_helpers.disabled_but_loaded_tooltip') }}
</p>
</template>
</NeTooltip>
Expand Down