diff --git a/html/pfappserver/root/src/components/new/BaseButtonServiceSaas.vue b/html/pfappserver/root/src/components/new/BaseButtonServiceSaas.vue index 03d97f241d8c..ed9a3d9c2c3e 100644 --- a/html/pfappserver/root/src/components/new/BaseButtonServiceSaas.vue +++ b/html/pfappserver/root/src/components/new/BaseButtonServiceSaas.vue @@ -96,7 +96,7 @@ const setup = (props, context) => { }) const replicas = computed(() => { const { [service.value]: { total_replicas, updated_replicas } = {} } = $store.state.k8s.services - // eslint-disable-next-line no-unused-vars + return [ ...Array(total_replicas) ].map((_, i) => (i < updated_replicas)) }) diff --git a/html/pfappserver/root/src/utils/regex.js b/html/pfappserver/root/src/utils/regex.js index c4cf1db35b4f..da85058e3bb9 100644 --- a/html/pfappserver/root/src/utils/regex.js +++ b/html/pfappserver/root/src/utils/regex.js @@ -21,5 +21,5 @@ export const reNumeric = value => /^-?[0-9]*$/.test(value) // eslint-disable-next-line no-useless-escape export const reStaticRoute = value => /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/?(\d+)?\s+?(via\s+(?:[0-9]{1,3}\.){3}[0-9]{1,3}\s+?)?dev\s+[a-z,0-9\.]+$/i.test(value) -// eslint-disable-next-line no-control-regex + export const reAscii = value => /^([\x20-\x7E]+)$/.test(value) \ No newline at end of file diff --git a/html/pfappserver/root/src/views/Configuration/eventLoggers/_components/TheSearch.vue b/html/pfappserver/root/src/views/Configuration/eventLoggers/_components/TheSearch.vue index 724869693492..cc0482323e47 100644 --- a/html/pfappserver/root/src/views/Configuration/eventLoggers/_components/TheSearch.vue +++ b/html/pfappserver/root/src/views/Configuration/eventLoggers/_components/TheSearch.vue @@ -11,9 +11,6 @@ :to="{ name: 'newEventLogger', params: { eventLoggerType: value } }" >{{ text }} - - -

-

- {{ $t('Some services must be restarted to load the new settings.') }} - -

- - - - - - diff --git a/html/pfappserver/root/src/views/Configuration/monit/_components/TheView.js b/html/pfappserver/root/src/views/Configuration/monit/_components/TheView.js index 6fd97ba6c867..111cc5fa7f8c 100644 --- a/html/pfappserver/root/src/views/Configuration/monit/_components/TheView.js +++ b/html/pfappserver/root/src/views/Configuration/monit/_components/TheView.js @@ -1,6 +1,6 @@ import { - AlertServices, BaseView, + FormButtonBar, TheForm } from './' @@ -10,36 +10,17 @@ const components = { TheForm } -import { computed } from '@vue/composition-api' -import { renderHOCWithScopedSlots } from '@/components/new/' import { useViewResource, useViewResourceProps as props } from '../../_composables/useViewResource' -import * as resource from '../_composables/useResource' - -const setup = (props, context) => { - - const viewResource = useViewResource(resource, props, context) - const { - isLoading, - isModified - } = viewResource - const scopedSlotProps = computed(() => ({ ...props, isLoading: isLoading.value, isModified: isModified.value })) - - return { - ...viewResource, - scopedSlotProps - } -} - -const render = renderHOCWithScopedSlots(BaseView, { components, props, setup }, { - buttonsPrepend: AlertServices -}) +import * as resource from '../_composables/useResource' +const setup = (props, context) => useViewResource(resource, props, context) // @vue/component export default { name: 'the-view', extends: BaseView, inheritAttrs: false, + components, props, - render + setup } diff --git a/html/pfappserver/root/src/views/Configuration/monit/_components/index.js b/html/pfappserver/root/src/views/Configuration/monit/_components/index.js index 0c769e1b0281..4847957ad35c 100644 --- a/html/pfappserver/root/src/views/Configuration/monit/_components/index.js +++ b/html/pfappserver/root/src/views/Configuration/monit/_components/index.js @@ -5,7 +5,6 @@ import { BaseFormGroupTextarea, BaseFormGroupToggleDisabledEnabled } from '@/components/new/' -import AlertServices from './AlertServices' import TheForm from './TheForm' import TheView from './TheView' @@ -20,7 +19,6 @@ export { BaseFormGroupInput as FormGroupSubjectPrefix, BaseViewResource as BaseView, - AlertServices, TheForm, TheView } diff --git a/html/pfappserver/root/src/views/Configuration/networks/fencing/_components/AlertServices.vue b/html/pfappserver/root/src/views/Configuration/networks/fencing/_components/AlertServices.vue deleted file mode 100644 index 8e1a9de316d4..000000000000 --- a/html/pfappserver/root/src/views/Configuration/networks/fencing/_components/AlertServices.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - diff --git a/html/pfappserver/root/src/views/Configuration/networks/fencing/_composables/useResource.js b/html/pfappserver/root/src/views/Configuration/networks/fencing/_composables/useResource.js index 8b865e4b7f7a..57401f2931ba 100644 --- a/html/pfappserver/root/src/views/Configuration/networks/fencing/_composables/useResource.js +++ b/html/pfappserver/root/src/views/Configuration/networks/fencing/_composables/useResource.js @@ -11,3 +11,10 @@ export const useStore = $store => { updateItem: params => $store.dispatch('$_bases/updateFencing', params) } } + +export const useServices = () => computed(() => { + return { + message: i18n.t('Creating or modifying the syslog forwarders requires to restart the rsyslog system service.'), + services: ['pfdns', 'iptables'], + } +}) diff --git a/html/pfappserver/root/src/views/Configuration/syslogForwarders/_components/AlertServices.vue b/html/pfappserver/root/src/views/Configuration/syslogForwarders/_components/AlertServices.vue deleted file mode 100644 index da310eae01dd..000000000000 --- a/html/pfappserver/root/src/views/Configuration/syslogForwarders/_components/AlertServices.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - diff --git a/html/pfappserver/root/src/views/Configuration/syslogForwarders/_components/TheView.js b/html/pfappserver/root/src/views/Configuration/syslogForwarders/_components/TheView.js index 0eddb66e52b3..d006b2277d8d 100644 --- a/html/pfappserver/root/src/views/Configuration/syslogForwarders/_components/TheView.js +++ b/html/pfappserver/root/src/views/Configuration/syslogForwarders/_components/TheView.js @@ -1,5 +1,4 @@ import { - AlertServices, BaseView, FormButtonBar, TheForm @@ -10,8 +9,6 @@ const components = { TheForm } -import { computed } from '@vue/composition-api' -import { renderHOCWithScopedSlots } from '@/components/new/' import { useViewCollectionItem, useViewCollectionItemProps } from '../../_composables/useViewCollectionItem' import * as collection from '../_composables/useCollection' @@ -20,25 +17,7 @@ const props = { ...collection.useItemProps } -const setup = (props, context) => { - - const viewCollectionItem = useViewCollectionItem(collection, props, context) - const { - isLoading, - isModified - } = viewCollectionItem - - const scopedSlotProps = computed(() => ({ ...props, isLoading: isLoading.value, isModified: isModified.value })) - - return { - ...viewCollectionItem, - scopedSlotProps - } -} - -const render = renderHOCWithScopedSlots(BaseView, { components, props, setup }, { - buttonsPrepend: AlertServices -}) +const setup = (props, context) => useViewCollectionItem(collection, props, context) // @vue/component export default { @@ -47,5 +26,5 @@ export default { extends: BaseView, components, props, - render + setup } diff --git a/html/pfappserver/root/src/views/Configuration/syslogForwarders/_components/index.js b/html/pfappserver/root/src/views/Configuration/syslogForwarders/_components/index.js index ec65549bc336..8239d1e1e07a 100644 --- a/html/pfappserver/root/src/views/Configuration/syslogForwarders/_components/index.js +++ b/html/pfappserver/root/src/views/Configuration/syslogForwarders/_components/index.js @@ -7,7 +7,6 @@ import { BaseFormGroupInputNumber, BaseFormGroupToggleDisabledEnabled } from '@/components/new/' -import AlertServices from './AlertServices' import TheForm from './TheForm' import TheView from './TheView' @@ -22,7 +21,6 @@ export { BaseFormGroupInputNumber as FormGroupPort, BaseFormGroupChosenOne as FormGroupProto, - AlertServices, TheForm, TheView } diff --git a/html/pfappserver/root/src/views/Configuration/syslogForwarders/_composables/useCollection.js b/html/pfappserver/root/src/views/Configuration/syslogForwarders/_composables/useCollection.js index 096e3ae65a4a..39b35da85f75 100644 --- a/html/pfappserver/root/src/views/Configuration/syslogForwarders/_composables/useCollection.js +++ b/html/pfappserver/root/src/views/Configuration/syslogForwarders/_composables/useCollection.js @@ -47,8 +47,6 @@ export const useServices = () => computed(() => { return { message: i18n.t('Creating or modifying the syslog forwarders requires to restart the rsyslog system service.'), system_services: ['rsyslog'], - k8s_services: [], - systemd: false } })