@@ -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 <div className="date">{day} {months[month - 1]} {year}</div>;
+ return <div className="date">{day} {months[month]} {year}</div>;
}
return (
@@ -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 => {
<div><span>{i18n.Memory}: <span className="stat">{data.MEM} {i18n.mb}</span></span></div>
</Container>
<Container className="c-3">
- <div><span>{i18n.Uptime}: <span className="stat">{printTime(data.RTIME)} {i18n.days}</span></span></div>
+ <div><span>{i18n.Uptime}: <span className="stat">{data.RTIME}</span></span></div>
<Container className="c-1" />
</div>
@@ -9,13 +9,6 @@ import { useSelector } from 'react-redux';
const Server = props => {
- const token = localStorage.getItem("token");
props.checkItem(props.data.HOSTNAME);
@@ -39,7 +32,7 @@ const Server = props => {
<div>{i18n['Load Average']}: <span><span className="stat">{data.LOADAVERAGE}</span></span></div>
- <div><span>{i18n.Uptime}: <span className="stat">{printTime(data.UPTIME)} {i18n.days}</span></span></div>
+ <div><span>{i18n.Uptime}: <span className="stat">{data.UPTIME}</span></span></div>
@@ -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));
@@ -330,10 +330,8 @@ const CronJobs = props => {
@@ -285,10 +285,8 @@ export default function DnsRecords(props) {
bulkAction(action, selection, state.domain)
@@ -330,10 +330,8 @@ const Databases = props => {
@@ -346,10 +346,8 @@ const DomainNameSystems = props => {
bulkDomainAction(action, selection)
@@ -236,10 +236,8 @@ const BanLists = props => {
@@ -324,10 +324,8 @@ const Firewalls = props => {
@@ -318,10 +318,8 @@ const InternetProtocols = props => {
@@ -324,10 +324,8 @@ export default function MailAccounts(props) {
bulkMailAccountAction(action, props.domain, selection)
@@ -337,10 +337,8 @@ const Mails = props => {
@@ -314,10 +314,8 @@ const Packages = props => {
@@ -259,10 +259,8 @@ const Servers = props => {
displayModal(res.data.error);
@@ -328,10 +328,8 @@ const Users = props => {
bulkAction(action, state.selection)
@@ -322,10 +322,8 @@ const Web = props => {
setLoading(true);