diff --git a/web/js/react/src/components/RRD/RRD.jsx b/web/js/react/src/components/RRD/RRD.jsx index 268943b2e..60bb9a6a2 100644 --- a/web/js/react/src/components/RRD/RRD.jsx +++ b/web/js/react/src/components/RRD/RRD.jsx @@ -17,7 +17,7 @@ const RRD = props => { let year = newDate.getFullYear(); let months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; - return
{day}   {months[month - 1]}   {year}
; + return
{day}   {months[month]}   {year}
; } return ( diff --git a/web/js/react/src/components/Server/Server.jsx b/web/js/react/src/components/Server/Server.jsx index 20c7d12a3..cc274d2c0 100644 --- a/web/js/react/src/components/Server/Server.jsx +++ b/web/js/react/src/components/Server/Server.jsx @@ -10,12 +10,6 @@ const Server = props => { const { data } = props; const { i18n } = useSelector(state => state.session); - const printTime = seconds => { - let hours = seconds / 60; - let days = Math.floor(hours / 24); - return days; - } - const checkItem = () => { props.checkItem(data.NAME); } @@ -41,7 +35,7 @@ const Server = props => {
{i18n.Memory}: {data.MEM} {i18n.mb}
-
{i18n.Uptime}: {printTime(data.RTIME)} {i18n.days}
+
{i18n.Uptime}: {data.RTIME}
diff --git a/web/js/react/src/components/Server/ServerSys.jsx b/web/js/react/src/components/Server/ServerSys.jsx index c34f43180..1cf8001fb 100644 --- a/web/js/react/src/components/Server/ServerSys.jsx +++ b/web/js/react/src/components/Server/ServerSys.jsx @@ -9,13 +9,6 @@ import { useSelector } from 'react-redux'; const Server = props => { const { data } = props; const { i18n } = useSelector(state => state.session); - const token = localStorage.getItem("token"); - - const printTime = seconds => { - let hours = seconds / 60; - let days = Math.floor(hours / 24); - return days; - } const checkItem = () => { props.checkItem(props.data.HOSTNAME); @@ -39,7 +32,7 @@ const Server = props => {
{i18n['Load Average']}: {data.LOADAVERAGE}
-
{i18n.Uptime}: {printTime(data.UPTIME)} {i18n.days}
+
{i18n.Uptime}: {data.UPTIME}
diff --git a/web/js/react/src/containers/Backups/Backups.jsx b/web/js/react/src/containers/Backups/Backups.jsx index 2b454563d..d955a1fc4 100644 --- a/web/js/react/src/containers/Backups/Backups.jsx +++ b/web/js/react/src/containers/Backups/Backups.jsx @@ -285,10 +285,8 @@ const Backups = props => { bulkAction(action, selection) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/CronJobs/CronJobs.jsx b/web/js/react/src/containers/CronJobs/CronJobs.jsx index b230d44e7..b2c1dbbd3 100644 --- a/web/js/react/src/containers/CronJobs/CronJobs.jsx +++ b/web/js/react/src/containers/CronJobs/CronJobs.jsx @@ -330,10 +330,8 @@ const CronJobs = props => { bulkAction(action, selection) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/DNSRecords/DNSRecords.jsx b/web/js/react/src/containers/DNSRecords/DNSRecords.jsx index ff57d184c..8baf1b888 100644 --- a/web/js/react/src/containers/DNSRecords/DNSRecords.jsx +++ b/web/js/react/src/containers/DNSRecords/DNSRecords.jsx @@ -285,10 +285,8 @@ export default function DnsRecords(props) { bulkAction(action, selection, state.domain) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/Databases/Databases.jsx b/web/js/react/src/containers/Databases/Databases.jsx index d16aa41b2..1519de0e4 100644 --- a/web/js/react/src/containers/Databases/Databases.jsx +++ b/web/js/react/src/containers/Databases/Databases.jsx @@ -330,10 +330,8 @@ const Databases = props => { bulkAction(action, selection) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/DomainNameSystems/DomainNameSystems.jsx b/web/js/react/src/containers/DomainNameSystems/DomainNameSystems.jsx index 74709073c..7bf7718c0 100644 --- a/web/js/react/src/containers/DomainNameSystems/DomainNameSystems.jsx +++ b/web/js/react/src/containers/DomainNameSystems/DomainNameSystems.jsx @@ -346,10 +346,8 @@ const DomainNameSystems = props => { bulkDomainAction(action, selection) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/Firewalls/Banlist/index.jsx b/web/js/react/src/containers/Firewalls/Banlist/index.jsx index 030654c15..1c0e63a72 100644 --- a/web/js/react/src/containers/Firewalls/Banlist/index.jsx +++ b/web/js/react/src/containers/Firewalls/Banlist/index.jsx @@ -236,10 +236,8 @@ const BanLists = props => { bulkAction(action, selection) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/Firewalls/Firewalls.jsx b/web/js/react/src/containers/Firewalls/Firewalls.jsx index a58f96b6a..5dd87cd8e 100644 --- a/web/js/react/src/containers/Firewalls/Firewalls.jsx +++ b/web/js/react/src/containers/Firewalls/Firewalls.jsx @@ -324,10 +324,8 @@ const Firewalls = props => { bulkAction(action, selection) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/InternetProtocols/InternetProtocols.jsx b/web/js/react/src/containers/InternetProtocols/InternetProtocols.jsx index 38e1a3106..f38bf90ca 100644 --- a/web/js/react/src/containers/InternetProtocols/InternetProtocols.jsx +++ b/web/js/react/src/containers/InternetProtocols/InternetProtocols.jsx @@ -318,10 +318,8 @@ const InternetProtocols = props => { bulkAction(action, selection) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/MailAccounts/MailAccounts.jsx b/web/js/react/src/containers/MailAccounts/MailAccounts.jsx index f43427d07..a1b6f3ba4 100644 --- a/web/js/react/src/containers/MailAccounts/MailAccounts.jsx +++ b/web/js/react/src/containers/MailAccounts/MailAccounts.jsx @@ -324,10 +324,8 @@ export default function MailAccounts(props) { bulkMailAccountAction(action, props.domain, selection) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/Mails/Mails.jsx b/web/js/react/src/containers/Mails/Mails.jsx index 45e24cf6e..10b211db6 100644 --- a/web/js/react/src/containers/Mails/Mails.jsx +++ b/web/js/react/src/containers/Mails/Mails.jsx @@ -337,10 +337,8 @@ const Mails = props => { bulkAction(action, selection) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/Packages/Packages.jsx b/web/js/react/src/containers/Packages/Packages.jsx index 25d66cc36..9ee512446 100644 --- a/web/js/react/src/containers/Packages/Packages.jsx +++ b/web/js/react/src/containers/Packages/Packages.jsx @@ -314,10 +314,8 @@ const Packages = props => { bulkAction(action, selection) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/Servers/Servers.jsx b/web/js/react/src/containers/Servers/Servers.jsx index f55a2441c..16a8b7da5 100644 --- a/web/js/react/src/containers/Servers/Servers.jsx +++ b/web/js/react/src/containers/Servers/Servers.jsx @@ -259,10 +259,8 @@ const Servers = props => { displayModal(res.data.error); } - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); }) .catch(err => console.error(err)); } diff --git a/web/js/react/src/containers/Users/Users.jsx b/web/js/react/src/containers/Users/Users.jsx index b77bffd42..b1d75aa0d 100644 --- a/web/js/react/src/containers/Users/Users.jsx +++ b/web/js/react/src/containers/Users/Users.jsx @@ -328,10 +328,8 @@ const Users = props => { bulkAction(action, state.selection) .then(result => { if (result.status === 200) { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); } }) .catch(err => console.error(err)); diff --git a/web/js/react/src/containers/Web/Web.jsx b/web/js/react/src/containers/Web/Web.jsx index ebd60b7d8..f16838b66 100644 --- a/web/js/react/src/containers/Web/Web.jsx +++ b/web/js/react/src/containers/Web/Web.jsx @@ -322,10 +322,8 @@ const Web = props => { setLoading(true); bulkAction(action, state.selection) .then(result => { - fetchData().then(() => { - refreshMenuCounters(); - toggleAll(false); - }); + toggleAll(false); + fetchData().then(() => refreshMenuCounters()); }) .catch(err => console.error(err)); }