Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
philmcmahon committed Jan 4, 2024
1 parent 90605db commit db9b35b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions backend/app/commands/IngestFile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object IngestFileResult {

class IngestFile(collectionUri: Uri, ingestionUri: Uri, uploadId: String, workspace: Option[WorkspaceItemUploadContext],
username: String, temporaryFilePath: Path, originalPath: Path, lastModifiedTime: Option[String],
manifest: Manifest, esEvents: Events, ingestionServices: IngestionServices, annotations: Annotations)(implicit ec: ExecutionContext) extends AttemptCommand[IngestFileResult] with Logging {
manifest: Manifest, esEvents: Events, ingestionServices: IngestionServices, annotations: Annotations)(implicit ec: ExecutionContext) extends AttemptCommand[IngestFileResult] {

override def process(): Attempt[IngestFileResult] = {
for {
Expand All @@ -42,7 +42,6 @@ class IngestFile(collectionUri: Uri, ingestionUri: Uri, uploadId: String, worksp
workspaceNodeId <- addToWorkspaceIfRequired(blob)
} yield {
workspaceEvent.foreach(e => ingestionServices.recordIngestionEvent(e.copy(status = EventStatus.Success)))
logger.info("ESRECORD****")
esEvents.record(
ActionComplete,
s"User $username Uploaded '$originalPath' to ingestion '${ingestionUri.value}'",
Expand All @@ -54,7 +53,6 @@ class IngestFile(collectionUri: Uri, ingestionUri: Uri, uploadId: String, worksp
"uploadId" -> uploadId
) ++ workspace.map { w => "workspace" -> w.workspaceName }
)
logger.info("***recorded")

IngestFileResult(blob, workspaceNodeId)
}
Expand Down
3 changes: 1 addition & 2 deletions backend/app/controllers/api/Workspaces.scala
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ class Workspaces(override val controllerComponents: AuthControllerComponents, an
}

private def copyTree(workspaceId: String, destinationParentId: String, tree: TreeEntry[WorkspaceEntry], user: String): Attempt[List[String]] = {
println("copy tree")
val newId = UUID.randomUUID().toString
tree match {
case TreeLeaf(_, name, data, _) =>
Expand All @@ -213,7 +212,7 @@ class Workspaces(override val controllerComponents: AuthControllerComponents, an
case _ => Attempt.Left(WorkspaceCopyFailure("Unexpected data type of TreeLeaf"))
}

case TreeNode(_, name, data, children) =>
case TreeNode(_, name, _, children) =>
val addItemData = AddItemData(name, destinationParentId, "folder", None, AddItemParameters(None, None, None))
val newChildIds = insertItem(user, workspaceId, newId, addItemData).flatMap{_ =>
Attempt.traverse(children)(child => copyTree(workspaceId, newId, child, user))
Expand Down
1 change: 0 additions & 1 deletion frontend/src/js/components/workspace/Workspaces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ class WorkspacesUnconnected extends React.Component<Props, State> {

onFocus = (entry: TreeEntry<WorkspaceEntry>, isMetaKeyHeld: boolean, isShiftKeyHeld: boolean) => {
if (isMetaKeyHeld) {
// THIS BREAKS COPY FUNCTIONALITY AT THE MOMENT - NEED TO HAVE A THINK OR USE A POP UP MODAL RATHER THAN META KEY
this.setSelectedEntriesAfterMetaClick(entry);
} else if (isShiftKeyHeld) {
this.setSelectedEntriesAfterShiftClick(entry);
Expand Down

0 comments on commit db9b35b

Please sign in to comment.