diff --git a/webclient/src/Admin.js b/webclient/src/Admin.js index 05c1f21..855982a 100644 --- a/webclient/src/Admin.js +++ b/webclient/src/Admin.js @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'; import { BrowserRouter as Router, Switch, Route, Link, useParams, useHistory } from 'react-router-dom'; import './light.css'; import { Button, Container, Checkbox, Dimmer, Divider, Dropdown, Form, Grid, Header, Icon, Image, Menu, Message, Segment, Table } from 'semantic-ui-react'; -import moment from 'moment'; +import moment from 'moment-timezone'; import { apiUrl, statusColor, BasicTable, staticUrl, requester } from './utils.js'; import { NotFound } from './Misc.js'; @@ -62,6 +62,55 @@ export function AdminHistory(props) { ); }; +let backupsCache = false; + +export function AdminBackups(props) { + const [backups, setBackups] = useState(backupsCache); + const [error, setError] = useState(false); + + useEffect(() => { + requester('/backup/', 'GET') + .then(res => { + setBackups(res); + backupsCache = res; + }) + .catch(err => { + console.log(err); + }); + }, []); + + return ( +
Loading...
+ : +Error loading.
+ } +Spaceport backups are created daily. 14 days are kept on the server.
-Backups contain the complete member data and must be kept secure.
-Talk to Tanner to learn how to get backups.
+ +Last 100 database changes: