Sync from cloud for 2.1.0-rc1
This commit is contained in:
@@ -237,7 +237,8 @@ const Admin2 = (props) => {
|
||||
defaults,
|
||||
sso_config,
|
||||
lead_info,
|
||||
{ mfa_required } = {}
|
||||
{ mfa_required } = {},
|
||||
editing,
|
||||
) => {
|
||||
const data = {
|
||||
name: name,
|
||||
@@ -248,6 +249,7 @@ const Admin2 = (props) => {
|
||||
sso_config: sso_config,
|
||||
lead_info: lead_info,
|
||||
mfa_required: mfa_required !== undefined ? mfa_required : selectedOrganization?.mfa_required,
|
||||
editing: editing?.length > 0 ? editing : "",
|
||||
};
|
||||
|
||||
const url = globalUrl + `/api/v1/orgs/${selectedOrganization.id}`;
|
||||
|
||||
@@ -1973,7 +1973,7 @@ const AppCreator = (defaultprops) => {
|
||||
// Saving the app that's been configured.
|
||||
// Save SAVE app
|
||||
const submitApp = () => {
|
||||
toast("Uploading and building app " + name);
|
||||
toast.info("Uploading and building app " + name + ". This may take a minute or two.");
|
||||
setAppBuilding(true);
|
||||
setErrorCode("");
|
||||
|
||||
@@ -2600,15 +2600,23 @@ const AppCreator = (defaultprops) => {
|
||||
}
|
||||
|
||||
if (setExtraAuth.length > 0) {
|
||||
const invalidfieldnames = ["apikey", "username", "password", "username_basic", "password_basic", "url", "access_token"]
|
||||
for (let authkey in extraAuth) {
|
||||
const curauth = extraAuth[authkey];
|
||||
|
||||
if (curauth.name.length === 0 || curauth.name.toLowerCase() == "url") {
|
||||
toast("Can't add extra auth with empty name or Name URL");
|
||||
setAppBuilding(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Additional comparisonchecks
|
||||
if (authenticationOption !== "No authentication" && authenticationOption !== "") {
|
||||
if (invalidfieldnames.includes(curauth.name.toLowerCase())) {
|
||||
toast.warn("Skipping extra auth field: " + curauth.name + ". This is not valid.")
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
data.components.securitySchemes[curauth.name] = {
|
||||
type: "apiKey",
|
||||
in: curauth.type,
|
||||
@@ -2662,9 +2670,15 @@ const AppCreator = (defaultprops) => {
|
||||
if (responseJson.reason !== undefined) {
|
||||
setErrorCode(responseJson.reason);
|
||||
|
||||
toast.error("Failed to build: " + responseJson.reason, {
|
||||
autoClose: 10000
|
||||
})
|
||||
if (responseJson.details !== undefined && responseJson.details !== null) {
|
||||
toast.error("Failed to build - contact support@shuffler.io: " + responseJson.details, {
|
||||
autoClose: 60000
|
||||
})
|
||||
} else {
|
||||
toast.error("Failed to build: " + responseJson.reason, {
|
||||
autoClose: 10000
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
toast.success("Successfully built openapi app! Added job to rebuild it in your hybrid runtime locations (Orborus).");
|
||||
@@ -2678,7 +2692,7 @@ const AppCreator = (defaultprops) => {
|
||||
.catch((error) => {
|
||||
setAppBuilding(false);
|
||||
setErrorCode(error.toString());
|
||||
toast(error.toString());
|
||||
toast.error(error.toString());
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2810,10 +2824,21 @@ const AppCreator = (defaultprops) => {
|
||||
margin="normal"
|
||||
variant="outlined"
|
||||
defaultValue={extraAuth[index].name}
|
||||
helperText={
|
||||
<Typography variant="caption" style={{ color: theme.palette.error.main, marginTop: 10, marginBottom: 10, }}>
|
||||
{extraAuth[index]?.name?.toLowerCase() === "url"
|
||||
|| extraAuth[index]?.name?.toLowerCase() === "apikey"
|
||||
? `ERROR: Invalid key: ${extraAuth[index].name}. ` : ""}
|
||||
</Typography>
|
||||
}
|
||||
onChange={(e) => {
|
||||
extraAuth[index].name = e.target.value;
|
||||
setExtraAuth(extraAuth);
|
||||
}}
|
||||
onBlur={(e) => {
|
||||
// Forcerender
|
||||
setUpdate(Math.random());
|
||||
}}
|
||||
InputProps={{
|
||||
classes: {
|
||||
notchedOutline: classes.notchedOutline,
|
||||
@@ -5865,7 +5890,9 @@ const AppCreator = (defaultprops) => {
|
||||
</h2>
|
||||
</Link>
|
||||
<h2>
|
||||
{name}{" "}
|
||||
<Link to={props?.match?.params?.appid !== undefined && props?.match?.params?.appid !== null && props?.match?.params?.appid.length > 0 ? `/apps/${props?.match?.params?.appid}` : "/apps" } style={{ textDecoration: "none", color: theme.palette.text.primary }}>
|
||||
{name}{" "}
|
||||
</Link>
|
||||
{actions === null ||
|
||||
actions === undefined ||
|
||||
actions.length === 0 ? null : (
|
||||
|
||||
@@ -3121,12 +3121,12 @@ const buttonBackground = "linear-gradient(to right, #f86a3e, #f34079)";
|
||||
style={{ marginBottom: 0, marginLeft: 0, marginRight: 0, minWidth: 800, maxWidth: 800, margin: "auto", }}
|
||||
aria-label="disabled tabs example"
|
||||
>
|
||||
<Tab style={{marginLeft: 0, color: theme.palette.text.primary }} icon={<DescriptionIcon />} label="Docs" />
|
||||
<Tab icon={appType === 0 || appType === 2 ? <OpenInNewIcon /> : <AppsIcon />} label={appType === 0 || appType === 2 ? "Explore the API" : "Try it out"} />
|
||||
<Tab style={{marginLeft: 0, color: theme.palette.text.primary, textTransform: "none",}} icon={<DescriptionIcon />} label="Docs" />
|
||||
<Tab style={{color: theme.palette.text.primary, textTransform: "none", }} icon={appType === 0 || appType === 2 ? <OpenInNewIcon /> : <AppsIcon />} label={appType === 0 || appType === 2 ? "Try the API" : "Try it out"} />
|
||||
|
||||
<Tab icon={<ShowChartIcon />} style={{color: theme.palette.text.primary}} label="Stats" />
|
||||
<Tab icon={<PolylineIcon />} disabled style={{color: theme.palette.text.secondary}} label="Integrations" />
|
||||
<Tab icon={<PersonIcon />} disabled={userdata.support !== true} style={{color: userdata.support !== true ? theme.palette.text.secondary: theme.palette.text.primary}} label="Creator" value={4} />
|
||||
<Tab icon={<ShowChartIcon />} style={{color: theme.palette.text.primary, textTransform: "none", }} label="Stats & Downloads" />
|
||||
<Tab icon={<PolylineIcon />} style={{color: theme.palette.text.primary, textTransform: "none", }} disabled style={{color: theme.palette.text.secondary}} label="Integrations" />
|
||||
<Tab icon={<PersonIcon />} disabled={userdata.support !== true} style={{color: userdata.support !== true ? theme.palette.text.secondary: theme.palette.text.primary, textTransform: "none", }} label="Creator" value={4} />
|
||||
</Tabs>
|
||||
<div style={{ marginTop: 25 }}>
|
||||
{selectedTab === 1 && app.skipped_build == false ? (
|
||||
@@ -3135,8 +3135,8 @@ const buttonBackground = "linear-gradient(to right, #f86a3e, #f34079)";
|
||||
<SelectedActionView action={currentAction} />
|
||||
</div>
|
||||
<div style={{ marginLeft: 25, maxWidth: 350 }}>
|
||||
{currentAction.description !== undefined && currentAction.description !== null && currentAction.description !== "" ?
|
||||
<div
|
||||
{currentAction.description !== undefined && currentAction.description !== null && currentAction.description !== "" ?
|
||||
<div
|
||||
style={{
|
||||
maxHeight: 175,
|
||||
overflowX: "hidden",
|
||||
@@ -3253,11 +3253,11 @@ const buttonBackground = "linear-gradient(to right, #f86a3e, #f34079)";
|
||||
Use the App onprem (hybrid)
|
||||
</Typography>
|
||||
<Typography variant="body2" color="textSecondary" style={{marginTop: 5, }}>
|
||||
Due to using docker containers with privately uploaded containers, we had to use a custom registry. Use the command below to download the image to the server if it fails to run.
|
||||
Custom uses a custom Docker registry for private containers. Use the command below to download the app image to a server if it fails to do so automatically.
|
||||
|
||||
It will authenticate and authorize you, before redirecting to a Signed URL on https://storage.googleapis.com
|
||||
The downloadable image may not be ready until 5 minutes after the app was built.
|
||||
|
||||
<b> Now also works for ARM containers!</b>
|
||||
<b> Now also works for ARM containers (?arch=arm)!</b>
|
||||
</Typography>
|
||||
|
||||
<div
|
||||
@@ -4027,7 +4027,7 @@ const buttonBackground = "linear-gradient(to right, #f86a3e, #f34079)";
|
||||
</IconButton>
|
||||
) : null}
|
||||
|
||||
{selectedOrganization !== undefined && selectedOrganization !== null && selectedOrganization.id !== undefined && userdata.support === true ?
|
||||
{selectedOrganization !== undefined && selectedOrganization !== null && selectedOrganization.id !== undefined ?
|
||||
// Iconbutton for authentication with just an icon. Link to /apps/authentication?app_id=app.id
|
||||
<IconButton
|
||||
color="secondary"
|
||||
@@ -4165,7 +4165,7 @@ const buttonBackground = "linear-gradient(to right, #f86a3e, #f34079)";
|
||||
style={{ height: 40, marginTop: 5, marginLeft: 5, }}
|
||||
>
|
||||
<OpenInNewIcon style={{marginRight: 5, }}/>
|
||||
Explore API
|
||||
Try the API
|
||||
</Button>
|
||||
</a>
|
||||
<Select
|
||||
|
||||
@@ -191,6 +191,7 @@ const SetAuthentication = (props) => {
|
||||
appAuthentication={appAuthentication} />}
|
||||
</Typography>
|
||||
|
||||
{/*
|
||||
<Typography variant="h6" style={{ marginTop: 50, marginBottom: 20, }}>
|
||||
What can they do with this?
|
||||
</Typography>
|
||||
@@ -217,6 +218,7 @@ const SetAuthentication = (props) => {
|
||||
</div>
|
||||
</div>
|
||||
</Typography>
|
||||
*/}
|
||||
</div>
|
||||
<>
|
||||
<div style={{ height: 100, }}></div>
|
||||
|
||||
Reference in New Issue
Block a user