Fixed multiple issues with how files are downloaded and uploaded
This commit is contained in:
@@ -24,7 +24,7 @@ require (
|
||||
github.com/h2non/filetype v1.1.3
|
||||
github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da // indirect
|
||||
github.com/satori/go.uuid v1.2.0
|
||||
github.com/shuffle/shuffle-shared v0.2.79
|
||||
github.com/shuffle/shuffle-shared v0.2.87
|
||||
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
|
||||
google.golang.org/api v0.65.0
|
||||
|
||||
+38
-38
@@ -1,43 +1,43 @@
|
||||
version: '3'
|
||||
services:
|
||||
#frontend:
|
||||
# #build: ./frontend
|
||||
# image: ghcr.io/frikky/shuffle-frontend:nightly
|
||||
# container_name: shuffle-frontend
|
||||
# hostname: shuffle-frontend
|
||||
# ports:
|
||||
# - "${FRONTEND_PORT}:80"
|
||||
# - "${FRONTEND_PORT_HTTPS}:443"
|
||||
# networks:
|
||||
# - shuffle
|
||||
# environment:
|
||||
# - BACKEND_HOSTNAME=${BACKEND_HOSTNAME}
|
||||
# restart: unless-stopped
|
||||
# depends_on:
|
||||
# - backend
|
||||
#backend:
|
||||
# #build: ./backend
|
||||
# image: ghcr.io/frikky/shuffle-backend:nightly
|
||||
# container_name: shuffle-backend
|
||||
# hostname: ${BACKEND_HOSTNAME}
|
||||
# # Here for debugging:
|
||||
# ports:
|
||||
# - "${BACKEND_PORT}:5001"
|
||||
# networks:
|
||||
# - shuffle
|
||||
# volumes:
|
||||
# - /var/run/docker.sock:/var/run/docker.sock
|
||||
# - ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z
|
||||
# - ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z
|
||||
# #- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate
|
||||
# env_file: .env
|
||||
# environment:
|
||||
# #- DOCKER_HOST=tcp://docker-socket-proxy:2375
|
||||
# - SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps
|
||||
# - SHUFFLE_FILE_LOCATION=/shuffle-files
|
||||
# restart: unless-stopped
|
||||
# #depends_on:
|
||||
# #- opensearch #Not necessary because dependancy is handled within the backend itself instead
|
||||
frontend:
|
||||
#build: ./frontend
|
||||
image: ghcr.io/frikky/shuffle-frontend:nightly
|
||||
container_name: shuffle-frontend
|
||||
hostname: shuffle-frontend
|
||||
ports:
|
||||
- "${FRONTEND_PORT}:80"
|
||||
- "${FRONTEND_PORT_HTTPS}:443"
|
||||
networks:
|
||||
- shuffle
|
||||
environment:
|
||||
- BACKEND_HOSTNAME=${BACKEND_HOSTNAME}
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- backend
|
||||
backend:
|
||||
#build: ./backend
|
||||
image: ghcr.io/frikky/shuffle-backend:nightly
|
||||
container_name: shuffle-backend
|
||||
hostname: ${BACKEND_HOSTNAME}
|
||||
# Here for debugging:
|
||||
ports:
|
||||
- "${BACKEND_PORT}:5001"
|
||||
networks:
|
||||
- shuffle
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ${SHUFFLE_APP_HOTLOAD_LOCATION}:/shuffle-apps:z
|
||||
- ${SHUFFLE_FILE_LOCATION}:/shuffle-files:z
|
||||
#- ${SHUFFLE_OPENSEARCH_CERTIFICATE_FILE}:/shuffle-files/es_certificate
|
||||
env_file: .env
|
||||
environment:
|
||||
#- DOCKER_HOST=tcp://docker-socket-proxy:2375
|
||||
- SHUFFLE_APP_HOTLOAD_FOLDER=/shuffle-apps
|
||||
- SHUFFLE_FILE_LOCATION=/shuffle-files
|
||||
restart: unless-stopped
|
||||
#depends_on:
|
||||
#- opensearch #Not necessary because dependancy is handled within the backend itself instead
|
||||
#- database
|
||||
orborus:
|
||||
image: ghcr.io/frikky/shuffle-orborus:nightly
|
||||
|
||||
@@ -37,7 +37,6 @@ import {
|
||||
PlayArrow as PlayArrowIcon,
|
||||
} from "@material-ui/icons";
|
||||
|
||||
import WorkflowPaper from "../components/WorkflowPaper.jsx"
|
||||
|
||||
const searchClient = algoliasearch("JNSS5CFDZZ", "db08e40265e2941b9a7d8f644b6e5240")
|
||||
const CreatorGrid = props => {
|
||||
@@ -174,7 +173,7 @@ const CreatorGrid = props => {
|
||||
</Typography>
|
||||
</div>
|
||||
<Typography variant="body1" color="textSecondary" style={{marginTop: 10, }}>
|
||||
<b>10</b> apps <span style={{marginLeft: 15, }}/><b>23</b> workflows
|
||||
<b>{data.apps}</b> apps <span style={{marginLeft: 15, }}/><b>{data.workflows}</b> workflows
|
||||
</Typography>
|
||||
{data.specialized_apps !== undefined && data.specialized_apps !== null && data.specialized_apps.length > 0 ?
|
||||
<AvatarGroup max={10} style={{flexDirection: "row", padding: 0, margin: 0, itemAlign: "left", textAlign: "left",}}>
|
||||
|
||||
@@ -1338,20 +1338,18 @@ const Admin = (props) => {
|
||||
const downloadFile = (file) => {
|
||||
fetch(globalUrl + "/api/v1/files/" + file.id + "/content", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json",
|
||||
},
|
||||
credentials: "include",
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.status !== 200) {
|
||||
console.log("Status not 200 for apps :O!");
|
||||
return "";
|
||||
}
|
||||
.then((response) => {
|
||||
if (response.status !== 200) {
|
||||
console.log("Status not 200 for apps :O!");
|
||||
return "";
|
||||
}
|
||||
|
||||
return response.text();
|
||||
})
|
||||
console.log("Resp: ", response)
|
||||
|
||||
return response.blob()
|
||||
})
|
||||
.then((respdata) => {
|
||||
if (respdata.length === 0) {
|
||||
alert.error("Failed getting file. Is it deleted?");
|
||||
@@ -1591,18 +1589,13 @@ const Admin = (props) => {
|
||||
document.title = "Shuffle - admin";
|
||||
}
|
||||
|
||||
console.log("NEWVALUE: ", newValue);
|
||||
|
||||
if (newValue === 6) {
|
||||
console.log("Should get apps for categories.");
|
||||
}
|
||||
|
||||
console.log("PROPS: ", props);
|
||||
|
||||
navigate(`/admin?tab=${views[newValue]}`);
|
||||
|
||||
setModalUser({});
|
||||
};
|
||||
}
|
||||
|
||||
if (firstRequest) {
|
||||
setFirstRequest(false);
|
||||
|
||||
@@ -776,7 +776,9 @@ const UsecaseListComponent = ({keys, isCloud, globalUrl, frameworkData, isLogged
|
||||
var baseTypeInfo = subcase.type !== undefined ? subcase.type : "communication"
|
||||
if (frameworkData !== undefined && frameworkData !== null) {
|
||||
if (frameworkData[baseTypeInfo] !== undefined && frameworkData[baseTypeInfo] !== null && subdata.app !== undefined && subdata.app !== null) {
|
||||
if (frameworkData[baseTypeInfo].name.toLowerCase().replaceAll("_", " ") === subdata.app.toLowerCase().replaceAll("_", " ")) {
|
||||
console.log("Name: ", frameworkData[baseTypeInfo], baseTypeInfo)
|
||||
console.log("Name2: ", subdata.app)
|
||||
if (frameworkData[baseTypeInfo].name !== undefined && frameworkData[baseTypeInfo].name.toLowerCase().replaceAll("_", " ") === subdata.app.toLowerCase().replaceAll("_", " ")) {
|
||||
highlight = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ const Search = (props) => {
|
||||
<DocsGrid maxRows={6} parsedXs={12} showSuggestion={true} globalUrl={globalUrl} isMobile={isMobile} userdata={userdata} />
|
||||
:
|
||||
curTab === 3 ?
|
||||
<CreatorGrid maxRows={3} parsedXs={4} showSuggestion={true} globalUrl={globalUrl} isMobile={isMobile} userdata={userdata} />
|
||||
<CreatorGrid parsedXs={4} showSuggestion={true} globalUrl={globalUrl} isMobile={isMobile} userdata={userdata} />
|
||||
:
|
||||
null}
|
||||
</div>
|
||||
|
||||
@@ -2949,9 +2949,7 @@ const Workflows = (props) => {
|
||||
|
||||
const WorkflowView = () => {
|
||||
if (workflows.length === 0) {
|
||||
console.log("USER: ", userdata)
|
||||
console.log("PROPS: ", props)
|
||||
if (userdata.tutorials !== undefined && userdata.tutorials !== null && !userdata.tutorials.includes("getting-started")) {
|
||||
if ((userdata.tutorials !== undefined && userdata.tutorials !== null && !userdata.tutorials.includes("getting-started")) || userdata.tutorials === null) {
|
||||
return <Navigate to="/getting-started" replace />;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user