Merge pull request #2111 from serghey-rodin/feature/improved-web-and-server

Improved server sys tab and web backend template.
This commit is contained in:
Serghey Rodin 2021-11-01 00:24:11 +02:00 committed by GitHub
commit 52a5425a94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -46,7 +46,7 @@ const Server = props => {
</div> </div>
<div> <div>
<button className="link-download restart" onClick={() => props.handleAction(`/api/v1/restart/service?srv=${data.NAME}`)}> <button className="link-download restart" onClick={() => props.handleAction(`/api/v1/restart/system/?hostname=${data.NAME}`)}>
{i18n.restart} {i18n.restart}
{ {
data.FOCUSED data.FOCUSED

View file

@ -24,6 +24,7 @@ import HtmlParser from 'react-html-parser';
const EditWeb = props => { const EditWeb = props => {
const token = localStorage.getItem("token"); const token = localStorage.getItem("token");
const { i18n } = useSelector(state => state.session); const { i18n } = useSelector(state => state.session);
const { session } = useSelector(state => state.userSession);
const history = useHistory(); const history = useHistory();
const dispatch = useDispatch(); const dispatch = useDispatch();
const [errorMessage, setErrorMessage] = useState(''); const [errorMessage, setErrorMessage] = useState('');
@ -184,7 +185,7 @@ const EditWeb = props => {
title={i18n['Web Template']} /> title={i18n['Web Template']} />
{ {
state.data.WEB_BACKEND && ( session.WEB_BACKEND && (
<SelectInput <SelectInput
options={state.data.backend_templates} options={state.data.backend_templates}
selected={state.data.backend_template || 'default'} selected={state.data.backend_template || 'default'}