Skip to content

Commit

Permalink
fix: improve warning for modules disabled but loaded (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
andre8244 authored Sep 12, 2024
1 parent 9718fed commit 1d33296
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
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

0 comments on commit 1d33296

Please sign in to comment.