diff --git a/components/file_metadata/details/file_metadata_details.templ b/components/file_metadata/details/file_metadata_details.templ index 6a05496..5827770 100644 --- a/components/file_metadata/details/file_metadata_details.templ +++ b/components/file_metadata/details/file_metadata_details.templ @@ -4,128 +4,228 @@ import ( "context" "fmt" "strconv" + "github.com/starfleetcptn/gomft/components" "github.com/starfleetcptn/gomft/components/file_metadata" - "github.com/starfleetcptn/gomft/components/file_metadata/utils" - "github.com/starfleetcptn/gomft/components/layout" + "github.com/starfleetcptn/gomft/components/file_metadata/dialog" // Import dialog package + "github.com/starfleetcptn/gomft/components/file_metadata/utils" // Import utils package ) -// FileMetadataDetails renders the details view for a file metadata +// FileMetadataDetails renders the details view for a file metadata, matching original structure templ FileMetadataDetails(ctx context.Context, data file_metadata.FileMetadataDetailsData) { - @layout.LayoutWithContext("File Details", ctx) { + @components.LayoutWithContext("File Details", ctx) {
- - @utils.fileMetadataJS() - -
+ + @utils.FileMetadataJS() // Include JS for toasts, etc. + +

- File Details + File Details: { data.File.FileName }

- + + Back to Files +
- +
- File Information + { data.File.FileName }

- ID: { strconv.FormatInt(int64(data.File.ID), 10) } + File ID: { strconv.FormatUint(uint64(data.File.ID), 10) }

- +
-
File Information
-
-
-
Filename
-
{ data.File.FileName }
-
-
-
Size
-
{ strconv.FormatInt(data.File.FileSize, 10) } bytes
-
-
-
Hash
-
{ data.File.FileHash }
-
-
-
Status
-
- - { data.File.Status } - -
-
-
+
+ File Information +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Filename + + { data.File.FileName } +
+ Size + + { utils.FormatFileSize(data.File.FileSize) } +
+ Hash + + if data.File.FileHash != "" { + { data.File.FileHash } + } else { + Not available + } +
+ Status + + + { data.File.Status } + +
+ Original Path + +
+ + { data.File.OriginalPath } +
+
+ Destination Path + +
+ + { data.File.DestinationPath } +
+
+
- +
-
Processing Information
-
-
-
Original Path
-
{ data.File.OriginalPath }
-
-
-
Destination Path
-
{ data.File.DestinationPath }
-
-
-
Processed At
-
{ data.File.ProcessedTime.Format("2006-01-02 15:04:05") }
-
- if data.File.Status == "error" && data.File.ErrorMessage != "" { -
-
Error
-
{ data.File.ErrorMessage }
-
- } -
+
+ Processing Information +
+
+ + + + + + + + + + + + + + + + + + + if data.File.Status == "error" && data.File.ErrorMessage != "" { + + + + + } + + + + + + + + + +
+ Job + + + { data.File.Job.Name } + +
+ Processed Time + +
+ + { data.File.ProcessedTime.Format("2006-01-02 15:04:05") } +
+
+ Creation Time + +
+ + { data.File.CreationTime.Format("2006-01-02 15:04:05") } +
+
+ Modification Time + +
+ + { data.File.ModTime.Format("2006-01-02 15:04:05") } +
+
+ Error + +
+ + { data.File.ErrorMessage } +
+
+ Record Created + + { data.File.CreatedAt.Format("2006-01-02 15:04:05") } +
+ Record Updated + + { data.File.UpdatedAt.Format("2006-01-02 15:04:05") } +
+
- - -
- -
-
-
-
- -