Skip to content

Commit e39ea2f

Browse files
committed
feat: Show pathOnDevice in destination of fileUploadRequest
Display the path on device in the destination of file upload requests, that gets set using a trigger. Signed-off-by: Omar <omar.brbutovic@secomind.com>
1 parent db61e6e commit e39ea2f

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

frontend/src/api/schema.graphql

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4897,6 +4897,7 @@ enum FileDownloadRequestSortField {
48974897
GROUP_ID
48984898
DESTINATION_TYPE
48994899
DESTINATION
4900+
PATH_ON_DEVICE
49004901
PROGRESS
49014902
STATUS
49024903
STATUS_PROGRESS
@@ -4982,6 +4983,19 @@ input FileDownloadRequestFilterProgress {
49824983
greaterThanOrEqual: Boolean
49834984
}
49844985

4986+
input FileDownloadRequestFilterPathOnDevice {
4987+
isNil: Boolean
4988+
eq: String
4989+
notEq: String
4990+
in: [String]
4991+
lessThan: String
4992+
greaterThan: String
4993+
lessThanOrEqual: String
4994+
greaterThanOrEqual: String
4995+
like: String
4996+
ilike: String
4997+
}
4998+
49854999
input FileDownloadRequestFilterDestination {
49865000
isNil: Boolean
49875001
eq: String
@@ -5166,6 +5180,9 @@ input FileDownloadRequestFilterInput {
51665180
"Destination-specific information on where to write the file to."
51675181
destination: FileDownloadRequestFilterDestination
51685182

5183+
"Path on the device for the transferred file"
5184+
pathOnDevice: FileDownloadRequestFilterPathOnDevice
5185+
51695186
"Flag to enable the progress reporting of the download."
51705187
progress: FileDownloadRequestFilterProgress
51715188

@@ -5231,6 +5248,9 @@ type FileDownloadRequest {
52315248
"Destination-specific information on where to write the file to."
52325249
destination: String
52335250

5251+
"Path on the device for the transferred file"
5252+
pathOnDevice: String
5253+
52345254
"Flag to enable the progress reporting of the download."
52355255
progress: Boolean
52365256

frontend/src/components/DeviceTabs/FilesUploadTab.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ const DEVICE_FILE_DOWNLOAD_REQUESTS_FRAGMENT = graphql`
7777
message
7878
destinationType
7979
destination
80+
pathOnDevice
8081
progress
8182
ttlSeconds
8283
digest
@@ -124,6 +125,7 @@ const DEVICE_CREATE_FILE_DOWNLOAD_REQUEST_MUTATION = graphql`
124125
message
125126
destinationType
126127
destination
128+
pathOnDevice
127129
progress
128130
ttlSeconds
129131
digest

frontend/src/components/FileDownloadRequestsTable.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,13 @@ const columns = [
102102
),
103103
cell: ({ getValue, row }) => {
104104
const destinationType = getValue();
105-
const destination = row.original.destination;
106105

107106
if (destinationType == "FILESYSTEM") {
108-
return destination;
107+
return `"FILESYSTEM": ${row.original.destination}`;
108+
}
109+
110+
if (destinationType == "STORAGE") {
111+
return `"STORAGE": ${row.original.pathOnDevice ?? ""}`;
109112
}
110113

111114
return destinationType;

0 commit comments

Comments
 (0)