);
+ console.log(resp.jobParameters.jobSize)
let actions = (this.renderActions(resp.owner, resp.job_id, resp.status, resp.deleted));
- let difference = Date.parse(resp.endTime)/1000 - Date.parse(resp.startTime)/1000;
+ let difference = (Date.parse(resp.endTime) - Date.parse(resp.startTime))/1000;
let speed = parseFloat((resp.jobParameters.jobSize/1000000)*8)/(difference);
if (isNaN(speed))
{
@@ -85,10 +86,10 @@ export default class RowElement extends React.Component {
{humanReadableSpeed(speed)}
- {resp.jobParameters.sourceBasePath}
+ {resp.jobParameters.sourceCredential}
- {resp.jobParameters.destBasePath}
+ {resp.jobParameters.destCredential}
{ this.props.adminPg &&
diff --git a/src/main/react-front-end/src/views/Transfer/BrowseModuleComponent.js b/src/main/react-front-end/src/views/Transfer/BrowseModuleComponent.js
index 731d3e5b9..b1626ca31 100755
--- a/src/main/react-front-end/src/views/Transfer/BrowseModuleComponent.js
+++ b/src/main/react-front-end/src/views/Transfer/BrowseModuleComponent.js
@@ -39,7 +39,7 @@ import {styled} from "@material-ui/core/styles";
import EndpointBrowseComponent from "./EndpointBrowseComponent";
import EndpointAuthenticateComponent from "./EndpointAuthenticateComponent";
-import { GRIDFTP, VFS, getType} from "../../constants";
+import { VFS, getType} from "../../constants";
import {showText, showType, showDisplay} from "../../constants";
import {OAuthFunctions} from "../../APICalls/EndpointAPICalls";
@@ -65,12 +65,6 @@ export default class BrowseModuleComponent extends Component {
const checkIfOneSideIsLoggedInAsGrid = (currentState) => {
return (getType(currentState.endpoint1) === showType.gsiftp || getType(currentState.endpoint2) === showType.gsiftp) && (currentState.endpoint1.login || currentState.endpoint1.login);
}
- const checkIfGridftpIsOpen = (currentState) => {
- return (getType(currentState.endpoint1) === showType.gsiftp
- || getType(currentState.endpoint2) === showType.gsiftp)
- || !(currentState.endpoint1.login || currentState.endpoint1.login);
- }
-
let constructState = store.getState();
@@ -80,21 +74,9 @@ export default class BrowseModuleComponent extends Component {
endpoint: props.endpoint,
mode: props.mode,
loading: false,
- oneSideIsLoggedInAsGridftp: checkIfOneSideIsLoggedInAsGrid(constructState),
- gridftpIsOpen: checkIfGridftpIsOpen(constructState)
};
- this.unsubcribe = store.subscribe(() => {
- let currentState = store.getState();
- // Check if either side is logged in as GRID_FTP
- let oneSideIsLoggedInAsGrid = checkIfOneSideIsLoggedInAsGrid(currentState);
- let gridftpIsOpen = checkIfGridftpIsOpen(currentState);
- if(oneSideIsLoggedInAsGrid !== this.state.oneSideIsLoggedInAsGridftp || gridftpIsOpen !== this.state.gridftpIsOpen){
- this.setState({oneSideIsLoggedInAsGridftp: oneSideIsLoggedInAsGrid, gridftpIsOpen: gridftpIsOpen});
- }
- });
-
this.setLoading = this.setLoading.bind(this);
this.getLoading = this.getLoading.bind(this);
@@ -182,7 +164,7 @@ export default class BrowseModuleComponent extends Component {
}
render() {
- const {endpoint, mode, history, type, loading, creds, oneSideIsLoggedInAsGridftp, gridftpIsOpen} = this.state;
+ const {endpoint, mode, history, type, loading, creds} = this.state;
const {update} = this.props;
@@ -196,7 +178,7 @@ export default class BrowseModuleComponent extends Component {
{(!endpoint.login && mode === pickModule) &&
{displays.map( (service) => {
- const disable = (service[0] === GRIDFTP ? !gridftpIsOpen : oneSideIsLoggedInAsGridftp) || (service[0] === VFS && this.checkIfOneSideIsLoggedInAsVFS());
+ const disable = (service[0] === VFS && this.checkIfOneSideIsLoggedInAsVFS());
return(
{this.login(service)}}>
diff --git a/src/main/react-front-end/src/views/Transfer/EndpointAuthenticateComponent.js b/src/main/react-front-end/src/views/Transfer/EndpointAuthenticateComponent.js
index cb542cc2a..725ba2bc9 100755
--- a/src/main/react-front-end/src/views/Transfer/EndpointAuthenticateComponent.js
+++ b/src/main/react-front-end/src/views/Transfer/EndpointAuthenticateComponent.js
@@ -21,7 +21,7 @@
*/
-import React, { Component } from 'react';
+import React, { Component, Fragment } from 'react';
import PropTypes from "prop-types";
import {/*openDropboxOAuth, openGoogleDriveOAuth, openBoxOAuth,*/
listFiles} from "../../APICalls/EndpointAPICalls";
@@ -98,6 +98,7 @@ export default class EndpointAuthenticateComponent extends Component {
needPassword: false,
username: "",
password: "",
+ credentialID: "",
endpointSelected: {},
selectingEndpoint: false,
portNum: -1,
@@ -114,9 +115,7 @@ export default class EndpointAuthenticateComponent extends Component {
let loginType = getType(props.endpoint)
let endpointName = getName(props.endpoint)
- if(loginType === showType.gsiftp /*loginType === GRIDFTP_TYPE*/){
- this.endpointIdsListUpdateFromBackend();
- }else if(!isOAuth[loginType]/*loginType === FTP_TYPE || loginType === SFTP_TYPE || loginType === HTTP_TYPE*/){
+ if(!isOAuth[loginType]/*loginType === FTP_TYPE || loginType === SFTP_TYPE || loginType === HTTP_TYPE*/){
this.historyListUpdateFromBackend(endpointName);
}
this.handleChange = this.handleChange.bind(this);
@@ -523,7 +522,7 @@ export default class EndpointAuthenticateComponent extends Component {
}
// Encrypting user password
- const credId = username+"@"+ url.toString().split("://")[1];
+ const credId = this.state.credentialID === ""? username+"@"+ url.toString().split("://")[1]: this.state.credentialID;
this.endpointCheckin(url,
@@ -704,8 +703,6 @@ export default class EndpointAuthenticateComponent extends Component {
{/* Google Drive, Dropbox, Box login handler */}
{(isOAuth[loginType] && loginType !== showType.gsiftp) && this.getCredentialListComponentFromList(credList, type, loginType)}
- {/* GridFTP OAuth handler */}
- {loginType === showType.gsiftp && this.getEndpointListComponentFromList(endpointIdsList)}
{/* Other login handlers*/}
{!isOAuth[loginType] && historyList &&
this.getHistoryListComponentFromList(historyList)}
@@ -780,6 +777,24 @@ export default class EndpointAuthenticateComponent extends Component {
}
}}
/>
+ {loginType === showType.s3?
+ ():(
+ {
+ if (e.key === 'Enter') {
+ this.handleClick()
+ }
+ }}
+ />
+ )}
diff --git a/src/main/react-front-end/src/views/Transfer/TransferComponent.js b/src/main/react-front-end/src/views/Transfer/TransferComponent.js
index 686d38c89..6b0897d06 100755
--- a/src/main/react-front-end/src/views/Transfer/TransferComponent.js
+++ b/src/main/react-front-end/src/views/Transfer/TransferComponent.js
@@ -41,6 +41,11 @@
import AccordionDetails from "@material-ui/core/AccordionDetails";
import Divider from "@material-ui/core/Divider";
+ import { DateTimePicker } from '@mui/x-date-pickers';
+ import { LocalizationProvider } from '@mui/x-date-pickers';
+ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'
+ import dayjs from 'dayjs';
+
import {KeyboardArrowRightRounded, KeyboardArrowLeftRounded, KeyboardArrowDownRounded, KeyboardArrowUpRounded, ExpandMore} from "@material-ui/icons";
import { submitTransferRequest } from "../../APICalls/APICalls";
@@ -81,7 +86,7 @@
pipeSize:localStorage.hasOwnProperty("pipeSize")?Number(localStorage.getItem("pipeSize")):1,
chunkSize:localStorage.hasOwnProperty("chunkSize")?Number(localStorage.getItem("chunkSize")):10400000,
parallelThreadCount:localStorage.hasOwnProperty("parallelThreadCount")?Number(localStorage.getItem("parallelThreadCount")):1,
-
+ scheduledTime: new Date().toISOString(),
},
compact: store.getState().compactViewEnabled,
notif: false,
@@ -104,6 +109,7 @@
this.sendFile = this.sendFile.bind(this);
this.onSendToRight = this.onSendToRight.bind(this);
this.onSendToLeft = this.onSendToLeft.bind(this);
+ this.setDate = this.setDate.bind(this);
this.printError();
@@ -145,6 +151,12 @@
// this.setState({ width: window.innerWidth, height: window.innerHeight });
this.setState({ compact: store.getState().compactViewEnabled });
}
+
+ setDate = (new_date) => {
+ const date = new Date(new_date);
+ const iso8601_conversion = date.toISOString();
+ this.setState({ settings: { ...this.state.settings, scheduledTime: iso8601_conversion } })
+ }
sendFile = (processed) => {
if (processed.selectedTasks.length === 0) {
@@ -160,7 +172,7 @@
let sourceParent = ""
let destParent = ""
- let infoList=[]
+ let infoList={}
let sourceCredId =""
let destCredId = ""
if(isOAuth[showType[sType]]){
@@ -174,14 +186,14 @@
sourceCredId = endpointSrc?.credential?.credId
sourceParent = Array.isArray(processed.fromTo[0].path) ? "" : processed.fromTo[0].path
processed.selectedTasks.forEach(x=>{
- infoList.push({path:x.value,id:x.value, size: x.size})
+ infoList = {path:x.value,id:x.value, size: x.size}
})
}
else{
sourceParent = longestCommonPrefix(processed.fromTo[0].selectedTasks.map(x=>x.id))
sourceParent = sourceParent.includes(".") ? sourceParent.substr(0,sourceParent.lastIndexOf("/"))+(sourceParent!=="")?"":"/" : sourceParent
sourceCredId = endpointSrc.credential.credId
- processed.selectedTasks.forEach(x=>infoList.push({path:x.id, id:x.name ,size:x.size}))
+ processed.selectedTasks.forEach(x=>infoList = {path:x.id, id:x.name ,size:x.size})
}
if(isOAuth[showType[dType]]){
let ids = processed.fromTo[1].ids
@@ -201,26 +213,23 @@
destParent = destParent.includes(".") ? destParent.substr(0,destParent.lastIndexOf("/"))+"/":destParent
destCredId = endpointDest.credential.credId
}
-
+
let source = {
credId:sourceCredId,
type:sType,
- parentInfo:{
- id:sourceParent,
- size:"",
- path:sourceParent
+ fileSourcePath: sourceParent,
+ resourceList:{
+ id: infoList.id,
+ size: infoList.size,
+ path: infoList.path
},
- infoList:infoList
}
let destination={
credId:destCredId,
type:dType,
- parentInfo:{
- id:destParent,
- size:"",
- path:destParent
- }
+ fileDesinationPath: destParent,
}
+
var optionParsed = {}
Object.keys(options).forEach((v)=>{
var value = options[v];
@@ -229,6 +238,7 @@
}
optionParsed[v] = value
})
+ console.log({source, destination, optionParsed})
submitTransferRequest(source,destination, optionParsed, (response) => {
eventEmitter.emit("messageOccured", "Transfer initiated! Please visit the queue page to monitor the transfer");
setBeforeTransferReorder(processed);
@@ -501,6 +511,15 @@
{this.state.settings.retry} Times
+
+
+
+ Date
+
+ Date} defaultValue={dayjs()} onChange={(e) => this.setDate(e)} minDate={dayjs()}/>
+
+
+
diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties
new file mode 100644
index 000000000..71dae0ce3
--- /dev/null
+++ b/src/main/resources/application-dev.properties
@@ -0,0 +1,3 @@
+cred.service.uri=${ODS_CRED_URI:http://localhost:8081/v1/endpoint-cred}
+transfer.scheduler.service.uri="http://localhost:8061"
+meta.service.uri=${ODS_META_URI:http://localhost:8084}
diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties
new file mode 100644
index 000000000..85c4feb1c
--- /dev/null
+++ b/src/main/resources/application-prod.properties
@@ -0,0 +1,3 @@
+spring.data.mongodb.username=${DOCUMENTDB_USER}
+spring.data.mongodb.password=${DOCUMENTDB_PASS}
+spring.data.mongodb.uri=mongodb://${DOCUMENTDB_USER}:${DOCUMENTDB_PASS}@${DOCUMENTDB_HOST}/${spring.data.mongodb.database}?retryWrites=false&ssl=true&replicaSet=rs0&readpreference=secondaryPreferred
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index cce9105b2..a178b9866 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -2,7 +2,7 @@
# Define a custom port instead of the default 8080
server.port=${ODS_APP_PORT:8080}
-spring.application.name=OneDataShareMonolith
+spring.application.name=ODSCore
redirect.uri=${ODS_REDIRECT_URI:http://localhost:${server.port}}
redirect.uri.string=http://localhost:8080
@@ -13,8 +13,7 @@ cred.service.uri=${ODS_CRED_URI:http://EndpointCredentialService/v1/endpoint-cre
meta.service.uri=${ODS_META_URI:http://ODSMETADATA}
#Transfer Scheduler Url will be using Eureka the env variable isfor local testing and should be added to the boot.sh otherwise you probably want to use eureka
-transfer.job.service.uri=${ODS_SCHEDULER_URI:http://ODSTRANSFERSCHEDULERSERVICE}
-
+transfer.scheduler.service.uri=${ODS_SCHEDULER_URI:http://ODSTRANSFERSCHEDULERSERVICE}
#Private key for ods
ods.rsa.private.key=${ODS_RSA_PRIVATE_KEY}
@@ -48,9 +47,6 @@ gftp.clientSecret=${ODS_GSIFTP_CLIENT_SECRET}
# Database settings
spring.data.mongodb.database=onedatashare
-#spring.data.mongodb.username=${DOCUMENTDB_USER}
-#spring.data.mongodb.password=${DOCUMENTDB_PASS}
-spring.data.mongodb.uri=mongodb://${DOCUMENTDB_USER}:${DOCUMENTDB_PASS}@${DOCUMENTDB_HOST}/${spring.data.mongodb.database}?retryWrites=false&ssl=true&replicaSet=rs0&readpreference=secondaryPreferred
#logging.file=${HOME}/logs/application.log
logging.level.org.springframework.web=DEBUG
@@ -73,7 +69,7 @@ springbootwebfluxjjwt.jjwt.secret=${ODS_JWT_SECRET}
eureka.client.enabled=true
eureka.client.serviceUrl.defaultZone= http://${EUREKA_USER:admin}:${EUREKA_PASS:admin}@${EUREKA_URI:localhost:8090}/eureka
eureka.client.healthcheck.enabled=true
-eureka.instance.metadata-map.startup= ${random.int}
+eureka.instance.metadata-map.startup=${random.int}
management.endpoint.health.enabled=true