Update to 0.7.0-unstable9
This commit is contained in:
parent
02b1d50432
commit
2304d269d8
|
@ -107,7 +107,7 @@ const MarketPage = () => {
|
||||||
const [showcase, setShowcase] = useState([]);
|
const [showcase, setShowcase] = useState([]);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isDark = theme.palette.mode === 'dark';
|
const isDark = theme.palette.mode === 'dark';
|
||||||
const { appName } = useParams();
|
const { appName, appStore } = useParams();
|
||||||
|
|
||||||
const backgroundStyle = isDark ? {
|
const backgroundStyle = isDark ? {
|
||||||
backgroundColor: 'rgb(0,0,0)',
|
backgroundColor: 'rgb(0,0,0)',
|
||||||
|
@ -127,7 +127,7 @@ const MarketPage = () => {
|
||||||
|
|
||||||
let openedApp = null;
|
let openedApp = null;
|
||||||
if (appName && Object.keys(apps).length > 0) {
|
if (appName && Object.keys(apps).length > 0) {
|
||||||
openedApp = apps[Object.keys(apps)[0]].find((app) => app.name === appName);
|
openedApp = apps[appStore].find((app) => app.name === appName);
|
||||||
}
|
}
|
||||||
|
|
||||||
return <>
|
return <>
|
||||||
|
@ -227,6 +227,7 @@ const MarketPage = () => {
|
||||||
minHeight: 'calc(65vh - 80px)',
|
minHeight: 'calc(65vh - 80px)',
|
||||||
padding: '24px',
|
padding: '24px',
|
||||||
}}>
|
}}>
|
||||||
|
<h2>Applications</h2>
|
||||||
{(!apps || !Object.keys(apps).length) && <Box style={{
|
{(!apps || !Object.keys(apps).length) && <Box style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
@ -241,13 +242,12 @@ const MarketPage = () => {
|
||||||
/>
|
/>
|
||||||
</Box>}
|
</Box>}
|
||||||
|
|
||||||
<h2>Applications</h2>
|
|
||||||
{apps && Object.keys(apps).length > 0 && <Grid2 container spacing={{ xs: 1, sm: 1, md: 2 }}>
|
{apps && Object.keys(apps).length > 0 && <Grid2 container spacing={{ xs: 1, sm: 1, md: 2 }}>
|
||||||
{apps[Object.keys(apps)[0]].map((app) => {
|
{Object.keys(apps).map(appstore => apps[appstore].map((app) => {
|
||||||
return <Grid2 style={{
|
return <Grid2 style={{
|
||||||
...gridAnim,
|
...gridAnim,
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
}} xs={12} sm={12} md={6} lg={4} xl={3} key={app.name} item><Link to={"/cosmos-ui/market-listing/" + app.name} style={{
|
}} xs={12} sm={12} md={6} lg={4} xl={3} key={app.name} item><Link to={"/cosmos-ui/market-listing/" + appstore + "/" + app.name} style={{
|
||||||
textDecoration: 'none',
|
textDecoration: 'none',
|
||||||
}}>
|
}}>
|
||||||
<div key={app.name} style={appCardStyle(theme)}>
|
<div key={app.name} style={appCardStyle(theme)}>
|
||||||
|
@ -271,7 +271,7 @@ const MarketPage = () => {
|
||||||
|
|
||||||
</Link>
|
</Link>
|
||||||
</Grid2>
|
</Grid2>
|
||||||
})}
|
}))}
|
||||||
</Grid2>}
|
</Grid2>}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
|
@ -34,6 +34,7 @@ import {version} from '../../../../../package.json';
|
||||||
import cmp from 'semver-compare';
|
import cmp from 'semver-compare';
|
||||||
import { HostnameChecker } from '../../../utils/routes';
|
import { HostnameChecker } from '../../../utils/routes';
|
||||||
import { CosmosContainerPicker } from '../../config/users/containerPicker';
|
import { CosmosContainerPicker } from '../../config/users/containerPicker';
|
||||||
|
import { randomString } from '../../../utils/indexs';
|
||||||
|
|
||||||
function checkIsOnline() {
|
function checkIsOnline() {
|
||||||
API.isOnline().then((res) => {
|
API.isOnline().then((res) => {
|
||||||
|
@ -307,6 +308,11 @@ const DockerComposeImport = ({ refresh, dockerComposeInit, installerInit, defaul
|
||||||
ServiceName: serviceName,
|
ServiceName: serviceName,
|
||||||
Hostnames: hostnames,
|
Hostnames: hostnames,
|
||||||
Context: context,
|
Context: context,
|
||||||
|
Passwords: [
|
||||||
|
randomString(32),
|
||||||
|
randomString(32),
|
||||||
|
randomString(32)
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
const jsoned = JSON.parse(rendered);
|
const jsoned = JSON.parse(rendered);
|
||||||
|
|
|
@ -92,7 +92,7 @@ const MainRoutes = {
|
||||||
element: <MarketPage />
|
element: <MarketPage />
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/cosmos-ui/market-listing/:appName',
|
path: '/cosmos-ui/market-listing/:appStore/:appName',
|
||||||
element: <MarketPage />
|
element: <MarketPage />
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
VERSION=$(grep -o '\"version\": \"[^\"]*\"' package.json | sed 's/[^0-9.]//g')
|
VERSION=$(grep -o '\"version\": \"[^\"]*\"' package.json | sed 's/[^0-9a-z.-]//g')
|
||||||
LATEST="latest"
|
LATEST="latest"
|
||||||
|
|
||||||
# if branch is unstable in git for circle ci
|
# if branch is unstable in git for circle ci
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
VERSION=$(grep -o '\"version\": \"[^\"]*\"' package.json | sed 's/[^0-9.]//g')
|
VERSION=$(grep -o '\"version\": \"[^\"]*\"' package.json | sed 's/[^0-9a-z.-]//g')
|
||||||
LATEST="latest"
|
LATEST="latest"
|
||||||
|
|
||||||
# if branch is unstable in git for circle ci
|
# if branch is unstable in git for circle ci
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cosmos-server",
|
"name": "cosmos-server",
|
||||||
"version": "0.7.0-unstable8",
|
"version": "0.7.0-unstable9",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "test-server.js",
|
"main": "test-server.js",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|
|
@ -44,8 +44,8 @@ func updateCache(w http.ResponseWriter, req *http.Request) error {
|
||||||
resp, err := http.Get(cachedMarket.Url)
|
resp, err := http.Get(cachedMarket.Url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Error("MarketUpdate: Error while fetching market" + cachedMarket.Url, err)
|
utils.Error("MarketUpdate: Error while fetching market" + cachedMarket.Url, err)
|
||||||
utils.HTTPError(w, "Market Get Error " + cachedMarket.Url, http.StatusInternalServerError, "MK001")
|
// utils.HTTPError(w, "Market Get Error " + cachedMarket.Url, http.StatusInternalServerError, "MK001")
|
||||||
return err
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
@ -56,8 +56,8 @@ func updateCache(w http.ResponseWriter, req *http.Request) error {
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Error("MarketUpdate: Error while parsing market" + cachedMarket.Url, err)
|
utils.Error("MarketUpdate: Error while parsing market" + cachedMarket.Url, err)
|
||||||
utils.HTTPError(w, "Market Get Error " + cachedMarket.Url, http.StatusInternalServerError, "MK003")
|
// utils.HTTPError(w, "Market Get Error " + cachedMarket.Url, http.StatusInternalServerError, "MK003")
|
||||||
return err
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
cachedMarket.Results = result
|
cachedMarket.Results = result
|
||||||
|
|
Loading…
Reference in a new issue