[release] v0.7.8
This commit is contained in:
parent
602dce53f2
commit
aa569f8c90
|
@ -1,4 +1,5 @@
|
|||
## Version 0.7.1 -> 0.7.7
|
||||
## Version 0.7.1 -> 0.7.8
|
||||
- Fix issue where multiple DBs get created at the setup
|
||||
- Add more special characters to be used for password validation
|
||||
- Add configurable default data path for binds
|
||||
- Remove Redirects from home page
|
||||
|
|
|
@ -53,62 +53,13 @@ let isOnline = () => {
|
|||
}
|
||||
|
||||
let newInstall = (req, onProgress) => {
|
||||
if(req.step == '2') {
|
||||
const requestOptions = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(req)
|
||||
};
|
||||
|
||||
return fetch('/cosmos/api/newInstall', requestOptions)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error(response.statusText);
|
||||
}
|
||||
|
||||
// The response body is a ReadableStream. This code reads the stream and passes chunks to the callback.
|
||||
const reader = response.body.getReader();
|
||||
|
||||
// Read the stream and pass chunks to the callback as they arrive
|
||||
return new ReadableStream({
|
||||
start(controller) {
|
||||
function read() {
|
||||
return reader.read().then(({ done, value }) => {
|
||||
if (done) {
|
||||
controller.close();
|
||||
return;
|
||||
}
|
||||
// Decode the UTF-8 text
|
||||
let text = new TextDecoder().decode(value);
|
||||
// Split by lines in case there are multiple lines in one chunk
|
||||
let lines = text.split('\n');
|
||||
for (let line of lines) {
|
||||
if (line) {
|
||||
// Call the progress callback
|
||||
onProgress(line);
|
||||
}
|
||||
}
|
||||
controller.enqueue(value);
|
||||
return read();
|
||||
});
|
||||
}
|
||||
return read();
|
||||
}
|
||||
});
|
||||
}).catch((e) => {
|
||||
alert(e);
|
||||
});
|
||||
} else {
|
||||
return wrap(fetch('/cosmos/api/newInstall', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(req)
|
||||
}))
|
||||
}
|
||||
return wrap(fetch('/cosmos/api/newInstall', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(req)
|
||||
}))
|
||||
}
|
||||
|
||||
let checkHost = (host) => {
|
||||
|
|
|
@ -73,7 +73,7 @@ export const TransparentHeader = () => {
|
|||
|
||||
const HomePage = () => {
|
||||
const { routeName } = useParams();
|
||||
const [serveApps, setServeApps] = useState([]);
|
||||
const [servApps, setServApps] = useState([]);
|
||||
const [config, setConfig] = useState(null);
|
||||
const [coStatus, setCoStatus] = useState(null);
|
||||
const [containers, setContainers] = useState(null);
|
||||
|
@ -105,7 +105,7 @@ const HomePage = () => {
|
|||
|
||||
const refreshConfig = () => {
|
||||
API.docker.list().then((res) => {
|
||||
setServeApps(res.data);
|
||||
setServApps(res.data);
|
||||
});
|
||||
API.config.get().then((res) => {
|
||||
setConfig(res.data);
|
||||
|
@ -166,11 +166,11 @@ const HomePage = () => {
|
|||
</Stack>
|
||||
|
||||
<Grid2 container spacing={2} style={{ zIndex: 2 }}>
|
||||
{config && serveApps && routes.map((route) => {
|
||||
{config && servApps && routes.map((route) => {
|
||||
let skip = route.Mode == "REDIRECT";
|
||||
if(route.Mode == "SERVAPP") {
|
||||
const containerName = route.Target.split(':')[1].slice(2);
|
||||
const container = serveApps.find((c) => c.Names.includes('/' + containerName));
|
||||
const container = servApps.find((c) => c.Names.includes('/' + containerName));
|
||||
if(!container || container.State != "running") {
|
||||
skip = true
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ const GetActions = ({
|
|||
Id,
|
||||
state,
|
||||
image,
|
||||
refreshServeApps,
|
||||
refreshServApps,
|
||||
setIsUpdatingId,
|
||||
updateAvailable
|
||||
}) => {
|
||||
|
@ -30,10 +30,10 @@ const GetActions = ({
|
|||
setIsUpdatingId(Id, true);
|
||||
return API.docker.manageContainer(Id, action).then((res) => {
|
||||
setIsUpdating(false);
|
||||
refreshServeApps();
|
||||
refreshServApps();
|
||||
}).catch((err) => {
|
||||
setIsUpdating(false);
|
||||
refreshServeApps();
|
||||
refreshServApps();
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -119,7 +119,7 @@ const GetActions = ({
|
|||
request={pullRequest}
|
||||
title="Updating ServeApp..."
|
||||
OnSuccess={() => {
|
||||
refreshServeApps();
|
||||
refreshServApps();
|
||||
}}
|
||||
/>
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ const ContainerOverview = ({ containerInfo, config, refresh, updatesAvailable, s
|
|||
Id={containerInfo.Name}
|
||||
image={Image}
|
||||
state={State.Status}
|
||||
refreshServeApps={() => {
|
||||
refreshServApps={() => {
|
||||
refreshAll()
|
||||
}}
|
||||
setIsUpdatingId={() => {
|
||||
|
|
|
@ -9,7 +9,7 @@ import * as API from '../../api';
|
|||
import { CheckOutlined, ClockCircleOutlined, DashboardOutlined, DeleteOutlined, DownOutlined, LockOutlined, UpOutlined } from "@ant-design/icons";
|
||||
import IsLoggedIn from '../../isLoggedIn';
|
||||
import PrettyTabbedView from '../../components/tabbedView/tabbedView';
|
||||
import ServeApps from './servapps';
|
||||
import ServApps from './servapps';
|
||||
import VolumeManagementList from './volumes';
|
||||
import NetworkManagementList from './networks';
|
||||
|
||||
|
@ -20,7 +20,7 @@ const ServappsIndex = () => {
|
|||
<PrettyTabbedView path="/cosmos-ui/servapps/:tab" tabs={[
|
||||
{
|
||||
title: 'Containers',
|
||||
children: <ServeApps />,
|
||||
children: <ServApps />,
|
||||
path: 'containers'
|
||||
},
|
||||
{
|
||||
|
|
|
@ -35,8 +35,8 @@ const noOver = {
|
|||
height: "50px"
|
||||
}
|
||||
|
||||
const ServeApps = () => {
|
||||
const [serveApps, setServeApps] = useState([]);
|
||||
const ServApps = () => {
|
||||
const [servApps, setServApps] = useState([]);
|
||||
const [isUpdating, setIsUpdating] = useState({});
|
||||
const [search, setSearch] = useState("");
|
||||
const [config, setConfig] = useState(null);
|
||||
|
@ -47,9 +47,9 @@ const ServeApps = () => {
|
|||
const [openRestartModal, setOpenRestartModal] = useState(false);
|
||||
const [selfName, setSelfName] = useState("");
|
||||
|
||||
const refreshServeApps = () => {
|
||||
const refreshServApps = () => {
|
||||
API.docker.list().then((res) => {
|
||||
setServeApps(res.data);
|
||||
setServApps(res.data);
|
||||
});
|
||||
API.config.get().then((res) => {
|
||||
setConfig(res.data);
|
||||
|
@ -67,7 +67,7 @@ const ServeApps = () => {
|
|||
}
|
||||
|
||||
useEffect(() => {
|
||||
refreshServeApps();
|
||||
refreshServApps();
|
||||
}, []);
|
||||
|
||||
function updateRoutes(newRoute) {
|
||||
|
@ -123,7 +123,7 @@ const ServeApps = () => {
|
|||
<ExposeModal
|
||||
openModal={openModal}
|
||||
setOpenModal={setOpenModal}
|
||||
container={serveApps.find((app) => {
|
||||
container={servApps.find((app) => {
|
||||
return app.Names[0].replace('/', '') === (openModal && openModal.Names[0].replace('/', ''));
|
||||
})}
|
||||
config={config}
|
||||
|
@ -148,7 +148,7 @@ const ServeApps = () => {
|
|||
}}
|
||||
/>
|
||||
<ResponsiveButton variant="contained" startIcon={<ReloadOutlined />} onClick={() => {
|
||||
refreshServeApps();
|
||||
refreshServApps();
|
||||
}}>Refresh</ResponsiveButton>
|
||||
<Link to="/cosmos-ui/servapps/new-service">
|
||||
<ResponsiveButton
|
||||
|
@ -156,7 +156,7 @@ const ServeApps = () => {
|
|||
startIcon={<AppstoreAddOutlined />}
|
||||
>Start ServApp</ResponsiveButton>
|
||||
</Link>
|
||||
<DockerComposeImport refresh={refreshServeApps}/>
|
||||
<DockerComposeImport refresh={refreshServApps}/>
|
||||
</Stack>
|
||||
|
||||
<Grid2 container spacing={{xs: 1, sm: 1, md: 2 }}>
|
||||
|
@ -165,7 +165,7 @@ const ServeApps = () => {
|
|||
<Alert severity="info">Update are available for {Object.keys(updatesAvailable).join(', ')}</Alert>
|
||||
</Item>
|
||||
</Grid2>}
|
||||
{serveApps && serveApps.filter(app => search.length < 2 || app.Names[0].toLowerCase().includes(search.toLowerCase())).map((app) => {
|
||||
{servApps && servApps.filter(app => search.length < 2 || app.Names[0].toLowerCase().includes(search.toLowerCase())).map((app) => {
|
||||
return <Grid2 style={gridAnim} xs={12} sm={6} md={6} lg={6} xl={4} key={app.Id} item>
|
||||
<Item>
|
||||
<Stack justifyContent='space-around' direction="column" spacing={2} padding={2} divider={<Divider orientation="horizontal" flexItem />}>
|
||||
|
@ -202,7 +202,7 @@ const ServeApps = () => {
|
|||
image={app.Image}
|
||||
state={app.State}
|
||||
setIsUpdatingId={setIsUpdatingId}
|
||||
refreshServeApps={refreshServeApps}
|
||||
refreshServApps={refreshServApps}
|
||||
updateAvailable={updatesAvailable && updatesAvailable[app.Names[0]]}
|
||||
/>
|
||||
</Stack>
|
||||
|
@ -247,11 +247,11 @@ const ServeApps = () => {
|
|||
API.docker.secure(name, e.target.checked).then(() => {
|
||||
setTimeout(() => {
|
||||
setIsUpdatingId(name, false);
|
||||
refreshServeApps();
|
||||
refreshServApps();
|
||||
}, 3000);
|
||||
}).catch(() => {
|
||||
setIsUpdatingId(name, false);
|
||||
refreshServeApps();
|
||||
refreshServApps();
|
||||
})
|
||||
}}
|
||||
/> Force Secure Network <ContainerNetworkWarning container={app} />
|
||||
|
@ -267,11 +267,11 @@ const ServeApps = () => {
|
|||
API.docker.autoUpdate(name, e.target.checked).then(() => {
|
||||
setTimeout(() => {
|
||||
setIsUpdatingId(name, false);
|
||||
refreshServeApps();
|
||||
refreshServApps();
|
||||
}, 3000);
|
||||
}).catch(() => {
|
||||
setIsUpdatingId(name, false);
|
||||
refreshServeApps();
|
||||
refreshServApps();
|
||||
})
|
||||
}}
|
||||
/> Auto Update Container
|
||||
|
@ -321,4 +321,4 @@ const ServeApps = () => {
|
|||
</div>
|
||||
}
|
||||
|
||||
export default ServeApps;
|
||||
export default ServApps;
|
||||
|
|
|
@ -6,7 +6,7 @@ import MainLayout from '../layout/MainLayout';
|
|||
import UserManagement from '../pages/config/users/usermanagement';
|
||||
import ConfigManagement from '../pages/config/users/configman';
|
||||
import ProxyManagement from '../pages/config/users/proxyman';
|
||||
import ServeAppsIndex from '../pages/servapps/';
|
||||
import ServAppsIndex from '../pages/servapps/';
|
||||
import { Navigate } from 'react-router';
|
||||
import RouteConfigPage from '../pages/config/routeConfigPage';
|
||||
import logo from '../assets/images/icons/cosmos.png';
|
||||
|
@ -57,7 +57,7 @@ const MainRoutes = {
|
|||
},
|
||||
{
|
||||
path: '/cosmos-ui/servapps',
|
||||
element: <ServeAppsIndex />
|
||||
element: <ServAppsIndex />
|
||||
},
|
||||
{
|
||||
path: '/cosmos-ui/config-users',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.7.7",
|
||||
"version": "0.7.8",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
|
|
|
@ -121,7 +121,6 @@ func NewInstallRoute(w http.ResponseWriter, req *http.Request) {
|
|||
utils.SaveConfigTofile(newConfig)
|
||||
utils.LoadBaseMainConfig(newConfig)
|
||||
} else if (request.Step == "4") {
|
||||
|
||||
adminObj := AdminJSON{
|
||||
Nickname: request.Nickname,
|
||||
Password: request.Password,
|
||||
|
|
Loading…
Reference in a new issue