From 6a58412a3d65d66ea07be3332aa31ed704070990 Mon Sep 17 00:00:00 2001 From: Samuel N Cui Date: Fri, 22 Sep 2023 13:53:33 +0800 Subject: [PATCH] feat: rename to samuelncui --- apis/api.go | 6 +- apis/converts.go | 6 +- apis/device_list.go | 2 +- apis/file_delete.go | 2 +- apis/file_edit.go | 2 +- apis/file_get.go | 4 +- apis/file_list_parents.go | 2 +- apis/file_mkdir.go | 2 +- apis/job_create.go | 4 +- apis/job_delete.go | 2 +- apis/job_display.go | 2 +- apis/job_get_log.go | 2 +- apis/job_list.go | 2 +- apis/job_next.go | 2 +- apis/library_export.go | 2 +- apis/source_list.go | 2 +- apis/tape_delete.go | 2 +- apis/tape_list.go | 4 +- cmd/tape-export/main.go | 6 +- cmd/tape-httpd/main.go | 12 +- cmd/tape-httpd/tape-writer.service | 2 +- cmd/tape-import/main.go | 6 +- entity/copy_status.proto | 2 +- entity/file.proto | 2 +- entity/job.proto | 2 +- entity/job_archive.proto | 2 +- entity/job_restore.pb.go | 31 ++-- entity/job_restore.proto | 4 +- entity/library_entity_type.proto | 2 +- entity/position.proto | 2 +- entity/service.proto | 2 +- entity/source.go | 2 +- entity/source.proto | 2 +- entity/tape.proto | 2 +- executor/executor.go | 4 +- executor/job.go | 2 +- executor/job_archive_display.go | 2 +- executor/job_archive_exe.go | 8 +- executor/job_archive_param.go | 4 +- executor/job_archive_start.go | 2 +- executor/job_restore.go | 2 +- executor/job_restore_display.go | 2 +- executor/job_restore_exe.go | 6 +- executor/job_restore_param.go | 6 +- executor/job_restore_start.go | 2 +- external/external.go | 2 +- external/from_json.go | 4 +- frontend/package.json | 2 + frontend/pnpm-lock.yaml | 266 +++++++++++++++++++++++++---- frontend/src/entity/job_restore.ts | 15 +- frontend/src/pages/jobs.tsx | 35 ++-- go.mod | 4 +- go.sum | 6 +- library/library.go | 2 +- library/tape.go | 5 +- scripts/test.sh | 2 - tapechanger/changer.go | 2 +- 57 files changed, 349 insertions(+), 167 deletions(-) delete mode 100644 scripts/test.sh diff --git a/apis/api.go b/apis/api.go index bd0dfe3..d9cd712 100644 --- a/apis/api.go +++ b/apis/api.go @@ -1,9 +1,9 @@ package apis import ( - "github.com/abc950309/tapewriter/entity" - "github.com/abc950309/tapewriter/executor" - "github.com/abc950309/tapewriter/library" + "github.com/samuelncui/tapewriter/entity" + "github.com/samuelncui/tapewriter/executor" + "github.com/samuelncui/tapewriter/library" ) var ( diff --git a/apis/converts.go b/apis/converts.go index fb57fe3..1995646 100644 --- a/apis/converts.go +++ b/apis/converts.go @@ -6,9 +6,9 @@ import ( "path/filepath" "time" - "github.com/abc950309/tapewriter/entity" - "github.com/abc950309/tapewriter/executor" - "github.com/abc950309/tapewriter/library" + "github.com/samuelncui/tapewriter/entity" + "github.com/samuelncui/tapewriter/executor" + "github.com/samuelncui/tapewriter/library" ) func convertFiles(files ...*library.File) []*entity.File { diff --git a/apis/device_list.go b/apis/device_list.go index b8b8fe9..cf19092 100644 --- a/apis/device_list.go +++ b/apis/device_list.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) DeviceList(ctx context.Context, req *entity.DeviceListRequest) (*entity.DeviceListReply, error) { diff --git a/apis/file_delete.go b/apis/file_delete.go index a7c3a7a..55bf931 100644 --- a/apis/file_delete.go +++ b/apis/file_delete.go @@ -3,8 +3,8 @@ package apis import ( "context" - "github.com/abc950309/tapewriter/entity" mapset "github.com/deckarep/golang-set/v2" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) FileDelete(ctx context.Context, req *entity.FileDeleteRequest) (*entity.FileDeleteReply, error) { diff --git a/apis/file_edit.go b/apis/file_edit.go index eca8972..a3aca07 100644 --- a/apis/file_edit.go +++ b/apis/file_edit.go @@ -7,7 +7,7 @@ import ( "path" "strings" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) FileEdit(ctx context.Context, req *entity.FileEditRequest) (*entity.FileEditReply, error) { diff --git a/apis/file_get.go b/apis/file_get.go index 43b5447..e10b6e9 100644 --- a/apis/file_get.go +++ b/apis/file_get.go @@ -4,8 +4,8 @@ import ( "context" "errors" - "github.com/abc950309/tapewriter/entity" - "github.com/abc950309/tapewriter/library" + "github.com/samuelncui/tapewriter/entity" + "github.com/samuelncui/tapewriter/library" ) func (api *API) FileGet(ctx context.Context, req *entity.FileGetRequest) (*entity.FileGetReply, error) { diff --git a/apis/file_list_parents.go b/apis/file_list_parents.go index 8307e1b..4de4aaf 100644 --- a/apis/file_list_parents.go +++ b/apis/file_list_parents.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) FileListParents(ctx context.Context, req *entity.FileListParentsRequest) (*entity.FileListParentsReply, error) { diff --git a/apis/file_mkdir.go b/apis/file_mkdir.go index d4a518e..a6393d5 100644 --- a/apis/file_mkdir.go +++ b/apis/file_mkdir.go @@ -5,7 +5,7 @@ import ( "fmt" "io/fs" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) FileMkdir(ctx context.Context, req *entity.FileMkdirRequest) (*entity.FileMkdirReply, error) { diff --git a/apis/job_create.go b/apis/job_create.go index e769a3f..717ed4d 100644 --- a/apis/job_create.go +++ b/apis/job_create.go @@ -3,8 +3,8 @@ package apis import ( "context" - "github.com/abc950309/tapewriter/entity" - "github.com/abc950309/tapewriter/executor" + "github.com/samuelncui/tapewriter/entity" + "github.com/samuelncui/tapewriter/executor" ) func (api *API) JobCreate(ctx context.Context, req *entity.JobCreateRequest) (*entity.JobCreateReply, error) { diff --git a/apis/job_delete.go b/apis/job_delete.go index 4ac0c0b..4026c71 100644 --- a/apis/job_delete.go +++ b/apis/job_delete.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) JobDelete(ctx context.Context, req *entity.JobDeleteRequest) (*entity.JobDeleteReply, error) { diff --git a/apis/job_display.go b/apis/job_display.go index 1e45060..b9ea983 100644 --- a/apis/job_display.go +++ b/apis/job_display.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" "github.com/sirupsen/logrus" ) diff --git a/apis/job_get_log.go b/apis/job_get_log.go index 6a30d5e..599e72e 100644 --- a/apis/job_get_log.go +++ b/apis/job_get_log.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) JobGetLog(ctx context.Context, req *entity.JobGetLogRequest) (*entity.JobGetLogReply, error) { diff --git a/apis/job_list.go b/apis/job_list.go index 8340fae..2bd9a29 100644 --- a/apis/job_list.go +++ b/apis/job_list.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) JobList(ctx context.Context, req *entity.JobListRequest) (*entity.JobListReply, error) { diff --git a/apis/job_next.go b/apis/job_next.go index 83d0ae1..8a033f9 100644 --- a/apis/job_next.go +++ b/apis/job_next.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) JobNext(ctx context.Context, req *entity.JobNextRequest) (*entity.JobNextReply, error) { diff --git a/apis/library_export.go b/apis/library_export.go index 3d3a883..a5403de 100644 --- a/apis/library_export.go +++ b/apis/library_export.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) LibraryExport(ctx context.Context, req *entity.LibraryExportRequest) (*entity.LibraryExportReply, error) { diff --git a/apis/source_list.go b/apis/source_list.go index 8d36c6f..fa63060 100644 --- a/apis/source_list.go +++ b/apis/source_list.go @@ -8,7 +8,7 @@ import ( "path" "strings" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) SourceList(ctx context.Context, req *entity.SourceListRequest) (*entity.SourceListReply, error) { diff --git a/apis/tape_delete.go b/apis/tape_delete.go index 18089ee..ecdad2a 100644 --- a/apis/tape_delete.go +++ b/apis/tape_delete.go @@ -3,7 +3,7 @@ package apis import ( "context" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (api *API) TapeDelete(ctx context.Context, req *entity.TapeDeleteRequest) (*entity.TapeDeleteReply, error) { diff --git a/apis/tape_list.go b/apis/tape_list.go index 01c4bde..80e5172 100644 --- a/apis/tape_list.go +++ b/apis/tape_list.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/abc950309/tapewriter/entity" - "github.com/abc950309/tapewriter/library" "github.com/samber/lo" + "github.com/samuelncui/tapewriter/entity" + "github.com/samuelncui/tapewriter/library" ) func (api *API) TapeList(ctx context.Context, req *entity.TapeListRequest) (*entity.TapeListReply, error) { diff --git a/cmd/tape-export/main.go b/cmd/tape-export/main.go index a2970ce..9ec0fb0 100644 --- a/cmd/tape-export/main.go +++ b/cmd/tape-export/main.go @@ -4,9 +4,9 @@ import ( "context" "os" - "github.com/abc950309/tapewriter/external" - "github.com/abc950309/tapewriter/library" - "github.com/abc950309/tapewriter/resource" + "github.com/samuelncui/tapewriter/external" + "github.com/samuelncui/tapewriter/library" + "github.com/samuelncui/tapewriter/resource" ) func main() { diff --git a/cmd/tape-httpd/main.go b/cmd/tape-httpd/main.go index c843f4f..9424e34 100644 --- a/cmd/tape-httpd/main.go +++ b/cmd/tape-httpd/main.go @@ -11,16 +11,16 @@ import ( "runtime/debug" "time" - "github.com/abc950309/tapewriter/apis" - "github.com/abc950309/tapewriter/entity" - "github.com/abc950309/tapewriter/executor" - "github.com/abc950309/tapewriter/library" - "github.com/abc950309/tapewriter/resource" - "github.com/abc950309/tapewriter/tools" "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery" "github.com/improbable-eng/grpc-web/go/grpcweb" rotatelogs "github.com/lestrrat-go/file-rotatelogs" "github.com/rifflock/lfshook" + "github.com/samuelncui/tapewriter/apis" + "github.com/samuelncui/tapewriter/entity" + "github.com/samuelncui/tapewriter/executor" + "github.com/samuelncui/tapewriter/library" + "github.com/samuelncui/tapewriter/resource" + "github.com/samuelncui/tapewriter/tools" "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/cmd/tape-httpd/tape-writer.service b/cmd/tape-httpd/tape-writer.service index debee56..a86af34 100644 --- a/cmd/tape-httpd/tape-writer.service +++ b/cmd/tape-httpd/tape-writer.service @@ -1,6 +1,6 @@ [Unit] Description=Tape Writer Service -Documentation=https://github.com/abc950309/tapewriter/ +Documentation=https://github.com/samuelncui/tapewriter/ After=network.target [Service] diff --git a/cmd/tape-import/main.go b/cmd/tape-import/main.go index a2970ce..9ec0fb0 100644 --- a/cmd/tape-import/main.go +++ b/cmd/tape-import/main.go @@ -4,9 +4,9 @@ import ( "context" "os" - "github.com/abc950309/tapewriter/external" - "github.com/abc950309/tapewriter/library" - "github.com/abc950309/tapewriter/resource" + "github.com/samuelncui/tapewriter/external" + "github.com/samuelncui/tapewriter/library" + "github.com/samuelncui/tapewriter/resource" ) func main() { diff --git a/entity/copy_status.proto b/entity/copy_status.proto index 3e06b2b..f572bfe 100644 --- a/entity/copy_status.proto +++ b/entity/copy_status.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package copy_status; -option go_package = "github.com/abc950309/tapewriter/entity"; +option go_package = "github.com/samuelncui/tapewriter/entity"; enum CopyStatus { DRAFT = 0; diff --git a/entity/file.proto b/entity/file.proto index 880f255..ff38b43 100644 --- a/entity/file.proto +++ b/entity/file.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package file; -option go_package = "github.com/abc950309/tapewriter/entity"; +option go_package = "github.com/samuelncui/tapewriter/entity"; message File { int64 id = 1; diff --git a/entity/job.proto b/entity/job.proto index 8270a45..254aebc 100644 --- a/entity/job.proto +++ b/entity/job.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package job; -option go_package = "github.com/abc950309/tapewriter/entity"; +option go_package = "github.com/samuelncui/tapewriter/entity"; import "job_archive.proto"; import "job_restore.proto"; diff --git a/entity/job_archive.proto b/entity/job_archive.proto index d8593e3..f1fc4f0 100644 --- a/entity/job_archive.proto +++ b/entity/job_archive.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package job_archive; -option go_package = "github.com/abc950309/tapewriter/entity"; +option go_package = "github.com/samuelncui/tapewriter/entity"; import "source.proto"; diff --git a/entity/job_restore.pb.go b/entity/job_restore.pb.go index c9cb329..796f3ae 100644 --- a/entity/job_restore.pb.go +++ b/entity/job_restore.pb.go @@ -568,7 +568,6 @@ type JobRestoreDisplay struct { TotalFiles int64 `protobuf:"varint,4,opt,name=total_files,json=totalFiles,proto3" json:"total_files,omitempty"` Speed *int64 `protobuf:"varint,5,opt,name=speed,proto3,oneof" json:"speed,omitempty"` StartTime int64 `protobuf:"varint,6,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - Logs []byte `protobuf:"bytes,17,opt,name=logs,proto3" json:"logs,omitempty"` } func (x *JobRestoreDisplay) Reset() { @@ -645,13 +644,6 @@ func (x *JobRestoreDisplay) GetStartTime() int64 { return 0 } -func (x *JobRestoreDisplay) GetLogs() []byte { - if x != nil { - return x.Logs - } - return nil -} - var File_job_restore_proto protoreflect.FileDescriptor var file_job_restore_proto_rawDesc = []byte{ @@ -715,7 +707,7 @@ var file_job_restore_proto_rawDesc = []byte{ 0x12, 0x2e, 0x0a, 0x05, 0x74, 0x61, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x61, 0x70, 0x65, 0x52, 0x05, 0x74, 0x61, 0x70, 0x65, 0x73, - 0x22, 0xf3, 0x01, 0x0a, 0x11, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, + 0x22, 0xdf, 0x01, 0x0a, 0x11, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x70, 0x79, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x70, 0x79, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x70, @@ -728,17 +720,16 @@ var file_job_restore_proto_rawDesc = []byte{ 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, - 0x18, 0x11, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x73, 0x70, 0x65, 0x65, 0x64, 0x2a, 0x4c, 0x0a, 0x0e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x65, 0x70, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, - 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x46, 0x4f, - 0x52, 0x5f, 0x54, 0x41, 0x50, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x50, 0x59, - 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, - 0x44, 0x10, 0xff, 0x01, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x61, 0x62, 0x63, 0x39, 0x35, 0x30, 0x33, 0x30, 0x39, 0x2f, 0x74, 0x61, 0x70, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x70, 0x65, + 0x65, 0x64, 0x2a, 0x4c, 0x0a, 0x0e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x53, 0x74, 0x65, 0x70, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, + 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x54, 0x41, + 0x50, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x50, 0x59, 0x49, 0x4e, 0x47, 0x10, + 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0xff, 0x01, + 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x62, 0x63, 0x39, 0x35, 0x30, 0x33, 0x30, 0x39, 0x2f, 0x74, 0x61, 0x70, 0x65, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x72, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/entity/job_restore.proto b/entity/job_restore.proto index c4482f8..052d9d8 100644 --- a/entity/job_restore.proto +++ b/entity/job_restore.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package job_restore; -option go_package = "github.com/abc950309/tapewriter/entity"; +option go_package = "github.com/samuelncui/tapewriter/entity"; import "copy_status.proto"; @@ -65,6 +65,4 @@ message JobRestoreDisplay { optional int64 speed = 5; int64 start_time = 6; - - bytes logs = 17; } diff --git a/entity/library_entity_type.proto b/entity/library_entity_type.proto index 1eb7fc4..3904670 100644 --- a/entity/library_entity_type.proto +++ b/entity/library_entity_type.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package library_entity_type; -option go_package = "github.com/abc950309/tapewriter/entity"; +option go_package = "github.com/samuelncui/tapewriter/entity"; enum LibraryEntityType { NONE = 0; diff --git a/entity/position.proto b/entity/position.proto index d7bff38..528e0cb 100644 --- a/entity/position.proto +++ b/entity/position.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package position; -option go_package = "github.com/abc950309/tapewriter/entity"; +option go_package = "github.com/samuelncui/tapewriter/entity"; message Position { int64 id = 1; diff --git a/entity/service.proto b/entity/service.proto index 14a8d0a..b085c13 100644 --- a/entity/service.proto +++ b/entity/service.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package service; -option go_package = "github.com/abc950309/tapewriter/entity"; +option go_package = "github.com/samuelncui/tapewriter/entity"; import "job.proto"; import "file.proto"; diff --git a/entity/source.go b/entity/source.go index 0bcd2bc..490c9b8 100644 --- a/entity/source.go +++ b/entity/source.go @@ -3,7 +3,7 @@ package entity import ( "path" - "github.com/abc950309/acp" + "github.com/samuelncui/acp" ) func NewSourceFromACPJob(job *acp.Job) *Source { diff --git a/entity/source.proto b/entity/source.proto index 2eee6de..a312a30 100644 --- a/entity/source.proto +++ b/entity/source.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package source; -option go_package = "github.com/abc950309/tapewriter/entity"; +option go_package = "github.com/samuelncui/tapewriter/entity"; import "copy_status.proto"; diff --git a/entity/tape.proto b/entity/tape.proto index 6f6fe65..8523dab 100644 --- a/entity/tape.proto +++ b/entity/tape.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package tape; -option go_package = "github.com/abc950309/tapewriter/entity"; +option go_package = "github.com/samuelncui/tapewriter/entity"; message Tape { int64 id = 1; diff --git a/executor/executor.go b/executor/executor.go index 24a7565..2edd72d 100644 --- a/executor/executor.go +++ b/executor/executor.go @@ -6,9 +6,9 @@ import ( "sort" "sync" - "github.com/abc950309/tapewriter/entity" - "github.com/abc950309/tapewriter/library" mapset "github.com/deckarep/golang-set/v2" + "github.com/samuelncui/tapewriter/entity" + "github.com/samuelncui/tapewriter/library" "gorm.io/gorm" ) diff --git a/executor/job.go b/executor/job.go index d21b740..b8d33fb 100644 --- a/executor/job.go +++ b/executor/job.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" "gorm.io/gorm" ) diff --git a/executor/job_archive_display.go b/executor/job_archive_display.go index 404fefb..966109a 100644 --- a/executor/job_archive_display.go +++ b/executor/job_archive_display.go @@ -4,7 +4,7 @@ import ( "context" "sync/atomic" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (e *Executor) getArchiveDisplay(ctx context.Context, job *Job) (*entity.JobArchiveDisplay, error) { diff --git a/executor/job_archive_exe.go b/executor/job_archive_exe.go index 5f3182b..d7ea1d4 100644 --- a/executor/job_archive_exe.go +++ b/executor/job_archive_exe.go @@ -13,11 +13,11 @@ import ( "sync/atomic" "time" - "github.com/abc950309/acp" - "github.com/abc950309/tapewriter/entity" - "github.com/abc950309/tapewriter/library" - "github.com/abc950309/tapewriter/tools" mapset "github.com/deckarep/golang-set/v2" + "github.com/samuelncui/acp" + "github.com/samuelncui/tapewriter/entity" + "github.com/samuelncui/tapewriter/library" + "github.com/samuelncui/tapewriter/tools" "github.com/sirupsen/logrus" ) diff --git a/executor/job_archive_param.go b/executor/job_archive_param.go index f22825d..94e6a31 100644 --- a/executor/job_archive_param.go +++ b/executor/job_archive_param.go @@ -8,8 +8,8 @@ import ( "sort" "strings" - "github.com/abc950309/acp" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/acp" + "github.com/samuelncui/tapewriter/entity" ) func (e *Executor) createArchive(ctx context.Context, job *Job, param *entity.JobArchiveParam) error { diff --git a/executor/job_archive_start.go b/executor/job_archive_start.go index b0abce0..083e7b5 100644 --- a/executor/job_archive_start.go +++ b/executor/job_archive_start.go @@ -3,7 +3,7 @@ package executor import ( "context" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (e *Executor) startArchive(ctx context.Context, job *Job) error { diff --git a/executor/job_restore.go b/executor/job_restore.go index b885b1f..72d9785 100644 --- a/executor/job_restore.go +++ b/executor/job_restore.go @@ -7,7 +7,7 @@ import ( "os/exec" "time" - "github.com/abc950309/tapewriter/library" + "github.com/samuelncui/tapewriter/library" "github.com/sirupsen/logrus" ) diff --git a/executor/job_restore_display.go b/executor/job_restore_display.go index 045b3ba..87b31b1 100644 --- a/executor/job_restore_display.go +++ b/executor/job_restore_display.go @@ -4,7 +4,7 @@ import ( "context" "sync/atomic" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (e *Executor) getRestoreDisplay(ctx context.Context, job *Job) (*entity.JobRestoreDisplay, error) { diff --git a/executor/job_restore_exe.go b/executor/job_restore_exe.go index a4b9b0d..a24861d 100644 --- a/executor/job_restore_exe.go +++ b/executor/job_restore_exe.go @@ -13,12 +13,12 @@ import ( "sync/atomic" "time" - "github.com/abc950309/acp" - "github.com/abc950309/tapewriter/entity" - "github.com/abc950309/tapewriter/tools" mapset "github.com/deckarep/golang-set/v2" jsoniter "github.com/json-iterator/go" "github.com/samber/lo" + "github.com/samuelncui/acp" + "github.com/samuelncui/tapewriter/entity" + "github.com/samuelncui/tapewriter/tools" "github.com/sirupsen/logrus" ) diff --git a/executor/job_restore_param.go b/executor/job_restore_param.go index 40785fa..dd9c1c3 100644 --- a/executor/job_restore_param.go +++ b/executor/job_restore_param.go @@ -7,11 +7,11 @@ import ( "sort" "strings" - "github.com/abc950309/tapewriter/entity" - "github.com/abc950309/tapewriter/library" - "github.com/abc950309/tapewriter/tools" mapset "github.com/deckarep/golang-set/v2" "github.com/samber/lo" + "github.com/samuelncui/tapewriter/entity" + "github.com/samuelncui/tapewriter/library" + "github.com/samuelncui/tapewriter/tools" "github.com/sirupsen/logrus" ) diff --git a/executor/job_restore_start.go b/executor/job_restore_start.go index 6d73b01..42084b1 100644 --- a/executor/job_restore_start.go +++ b/executor/job_restore_start.go @@ -3,7 +3,7 @@ package executor import ( "context" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) func (e *Executor) startRestore(ctx context.Context, job *Job) error { diff --git a/external/external.go b/external/external.go index d184667..e65e5ce 100644 --- a/external/external.go +++ b/external/external.go @@ -1,6 +1,6 @@ package external -import "github.com/abc950309/tapewriter/library" +import "github.com/samuelncui/tapewriter/library" type External struct { lib *library.Library diff --git a/external/from_json.go b/external/from_json.go index fee2c63..3f10d2b 100644 --- a/external/from_json.go +++ b/external/from_json.go @@ -8,8 +8,8 @@ import ( "io" "path" - "github.com/abc950309/acp" - "github.com/abc950309/tapewriter/library" + "github.com/samuelncui/acp" + "github.com/samuelncui/tapewriter/library" ) func (e *External) ImportACPReport(ctx context.Context, barname, name, encryption string, reader io.Reader) error { diff --git a/frontend/package.json b/frontend/package.json index 0f54657..d17da40 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -18,6 +18,8 @@ "@mui/icons-material": "^5.10.16", "@mui/material": "^5.10.9", "@mui/styled-engine": "^5.10.8", + "@mui/system": "^5.14.10", + "@mui/x-tree-view": "6.0.0-alpha.3", "@protobuf-ts/grpcweb-transport": "^2.8.2", "@protobuf-ts/runtime": "^2.8.2", "@protobuf-ts/runtime-rpc": "^2.8.2", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index a842130..d7cc089 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -9,6 +9,8 @@ specifiers: '@mui/icons-material': ^5.10.16 '@mui/material': ^5.10.9 '@mui/styled-engine': ^5.10.8 + '@mui/system': ^5.14.10 + '@mui/x-tree-view': 6.0.0-alpha.3 '@protobuf-ts/grpcweb-transport': ^2.8.2 '@protobuf-ts/plugin': ^2.8.2 '@protobuf-ts/runtime': ^2.8.2 @@ -47,6 +49,8 @@ dependencies: '@mui/icons-material': 5.10.16_6usjrp3ypnzobhq35dcwvjrt3m '@mui/material': 5.10.9_ikcgkdnp4bn3rgptamntbhbo7e '@mui/styled-engine': 5.10.8_hfzxdiydbrbhhfpkwuv3jhvwmq + '@mui/system': 5.14.10_h33l6npc22g7vcra72cibfsrvm + '@mui/x-tree-view': 6.0.0-alpha.3_evnhn47gfkvlobv5hpluqj3ony '@protobuf-ts/grpcweb-transport': 2.8.2 '@protobuf-ts/runtime': 2.8.2 '@protobuf-ts/runtime-rpc': 2.8.2 @@ -321,6 +325,13 @@ packages: regenerator-runtime: 0.13.11 dev: false + /@babel/runtime/7.22.15: + resolution: {integrity: sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.0 + dev: false + /@babel/template/7.18.10: resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} engines: {node: '>=6.9.0'} @@ -402,6 +413,16 @@ packages: stylis: 4.0.13 dev: false + /@emotion/cache/11.11.0: + resolution: {integrity: sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==} + dependencies: + '@emotion/memoize': 0.8.1 + '@emotion/sheet': 1.2.2 + '@emotion/utils': 1.2.1 + '@emotion/weak-memoize': 0.3.1 + stylis: 4.2.0 + dev: false + /@emotion/hash/0.8.0: resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==} dev: false @@ -430,6 +451,10 @@ packages: resolution: {integrity: sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==} dev: false + /@emotion/memoize/0.8.1: + resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} + dev: false + /@emotion/react/11.10.4_iapumuv4e6jcjznwuxpf4tt22e: resolution: {integrity: sha512-j0AkMpr6BL8gldJZ6XQsQ8DnS9TxEQu1R+OGmDZiWjBAJtCcbt0tS3I/YffoqHXxH6MjgI7KdMbYKw3MEiU9eA==} peerDependencies: @@ -468,6 +493,10 @@ packages: resolution: {integrity: sha512-OiTkRgpxescko+M51tZsMq7Puu/KP55wMT8BgpcXVG2hqXc0Vo0mfymJ/Uj24Hp0i083ji/o0aLddh08UEjq8w==} dev: false + /@emotion/sheet/1.2.2: + resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} + dev: false + /@emotion/styled/11.10.4_g3tud4ene45llglqap74b5kkse: resolution: {integrity: sha512-pRl4R8Ez3UXvOPfc2bzIoV8u9P97UedgHS4FPX594ntwEuAMA114wlaHvOK24HB48uqfXiGlYIZYCxVJ1R1ttQ==} peerDependencies: @@ -516,10 +545,18 @@ packages: resolution: {integrity: sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw==} dev: false + /@emotion/utils/1.2.1: + resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} + dev: false + /@emotion/weak-memoize/0.3.0: resolution: {integrity: sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==} dev: false + /@emotion/weak-memoize/0.3.1: + resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} + dev: false + /@esbuild/android-arm/0.15.11: resolution: {integrity: sha512-PzMcQLazLBkwDEkrNPi9AbjFt6+3I7HKbiYF2XtWQ7wItrHvEOeO3T8Am434zAozWtVP7lrTue1bEfc2nYWeCA==} engines: {node: '>=12'} @@ -538,6 +575,34 @@ packages: dev: true optional: true + /@floating-ui/core/1.5.0: + resolution: {integrity: sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==} + dependencies: + '@floating-ui/utils': 0.1.4 + dev: false + + /@floating-ui/dom/1.5.3: + resolution: {integrity: sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==} + dependencies: + '@floating-ui/core': 1.5.0 + '@floating-ui/utils': 0.1.4 + dev: false + + /@floating-ui/react-dom/2.0.2_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==} + peerDependencies: + react: '>=16.8.0' + react-dom: '>=16.8.0' + dependencies: + '@floating-ui/dom': 1.5.3 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + dev: false + + /@floating-ui/utils/0.1.4: + resolution: {integrity: sha512-qprfWkn82Iw821mcKofJ5Pk9wgioHicxcQMxx+5zt5GSKoqdWvgG5AxVmpmUUjzTLPVSH5auBrhI93Deayn/DA==} + dev: false + /@formatjs/ecma402-abstract/1.11.4: resolution: {integrity: sha512-EBikYFp2JCdIfGEb5G9dyCkTGDmC57KSHhRQOC3aYxoPWVZvfWCDjZwkGYHN7Lis/fmuWl906bnNTJifDQ3sXw==} dependencies: @@ -719,7 +784,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 '@emotion/hash': 0.8.0 '@material-ui/types': 5.1.0_@types+react@17.0.50 '@material-ui/utils': 4.11.3_biqbaboplfbrettd7655fr4n2y @@ -751,7 +816,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 '@material-ui/utils': 4.11.3_biqbaboplfbrettd7655fr4n2y '@types/react': 17.0.50 csstype: 2.6.21 @@ -778,7 +843,7 @@ packages: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 prop-types: 15.8.1 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -809,6 +874,29 @@ packages: react-is: 18.2.0 dev: false + /@mui/base/5.0.0-beta.16_rj7ozvcq3uehdlnj3cbwzbi5ce: + resolution: {integrity: sha512-OYxhC81c9bO0wobGcM8rrY5bRwpCXAI21BL0P2wz/2vTv4ek7ALz9+U5M8wgdmtRNUhmCmAB4L2WRwFRf5Cd8Q==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.22.15 + '@floating-ui/react-dom': 2.0.2_biqbaboplfbrettd7655fr4n2y + '@mui/types': 7.2.4_@types+react@18.0.21 + '@mui/utils': 5.14.10_iapumuv4e6jcjznwuxpf4tt22e + '@popperjs/core': 2.11.8 + '@types/react': 18.0.21 + clsx: 2.0.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + dev: false + /@mui/core-downloads-tracker/5.10.9: resolution: {integrity: sha512-rqoFu4qww6KJBbXYhyRd9YXjwBHa3ylnBPSWbGf1bdfG0AYMKmVzg8zxkWvxAWOp97kvx3M2kNPb0xMIDZiogQ==} dev: false @@ -852,7 +940,7 @@ packages: '@emotion/styled': 11.10.4_g3tud4ene45llglqap74b5kkse '@mui/base': 5.0.0-alpha.101_rj7ozvcq3uehdlnj3cbwzbi5ce '@mui/core-downloads-tracker': 5.10.9 - '@mui/system': 5.10.9_h33l6npc22g7vcra72cibfsrvm + '@mui/system': 5.14.10_h33l6npc22g7vcra72cibfsrvm '@mui/types': 7.2.0_@types+react@18.0.21 '@mui/utils': 5.10.9_react@18.2.0 '@types/react': 18.0.21 @@ -866,8 +954,8 @@ packages: react-transition-group: 4.4.5_biqbaboplfbrettd7655fr4n2y dev: false - /@mui/private-theming/5.10.9_iapumuv4e6jcjznwuxpf4tt22e: - resolution: {integrity: sha512-BN7/CnsVPVyBaQpDTij4uV2xGYHHHhOgpdxeYLlIu+TqnsVM7wUeF+37kXvHovxM6xmL5qoaVUD98gDC0IZnHg==} + /@mui/private-theming/5.14.10_iapumuv4e6jcjznwuxpf4tt22e: + resolution: {integrity: sha512-f67xOj3H06wWDT9xBg7hVL/HSKNF+HG1Kx0Pm23skkbEqD2Ef2Lif64e5nPdmWVv+7cISCYtSuE2aeuzrZe78w==} engines: {node: '>=12.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 @@ -876,8 +964,8 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.20.6 - '@mui/utils': 5.10.9_react@18.2.0 + '@babel/runtime': 7.22.15 + '@mui/utils': 5.14.10_iapumuv4e6jcjznwuxpf4tt22e '@types/react': 18.0.21 prop-types: 15.8.1 react: 18.2.0 @@ -905,8 +993,30 @@ packages: react: 18.2.0 dev: false - /@mui/system/5.10.9_h33l6npc22g7vcra72cibfsrvm: - resolution: {integrity: sha512-B6fFC0sK06hNmqY7fAUfwShQv594+u/DT1YEFHPtK4laouTu7V4vSGQWi1WJT9Bjs9Db5D1bRDJ+Yy+tc3QOYA==} + /@mui/styled-engine/5.14.10_hfzxdiydbrbhhfpkwuv3jhvwmq: + resolution: {integrity: sha512-EJckxmQHrsBvDbFu1trJkvjNw/1R7jfNarnqPSnL+jEQawCkQIqVELWLrlOa611TFtxSJGkdUfCFXeJC203HVg==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@emotion/react': ^11.4.1 + '@emotion/styled': ^11.3.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@emotion/react': + optional: true + '@emotion/styled': + optional: true + dependencies: + '@babel/runtime': 7.22.15 + '@emotion/cache': 11.11.0 + '@emotion/react': 11.10.4_iapumuv4e6jcjznwuxpf4tt22e + '@emotion/styled': 11.10.4_g3tud4ene45llglqap74b5kkse + csstype: 3.1.2 + prop-types: 15.8.1 + react: 18.2.0 + dev: false + + /@mui/system/5.14.10_h33l6npc22g7vcra72cibfsrvm: + resolution: {integrity: sha512-QQmtTG/R4gjmLiL5ECQ7kRxLKDm8aKKD7seGZfbINtRVJDyFhKChA1a+K2bfqIAaBo1EMDv+6FWNT1Q5cRKjFA==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -921,16 +1031,16 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 '@emotion/react': 11.10.4_iapumuv4e6jcjznwuxpf4tt22e '@emotion/styled': 11.10.4_g3tud4ene45llglqap74b5kkse - '@mui/private-theming': 5.10.9_iapumuv4e6jcjznwuxpf4tt22e - '@mui/styled-engine': 5.10.8_hfzxdiydbrbhhfpkwuv3jhvwmq - '@mui/types': 7.2.0_@types+react@18.0.21 - '@mui/utils': 5.10.9_react@18.2.0 + '@mui/private-theming': 5.14.10_iapumuv4e6jcjznwuxpf4tt22e + '@mui/styled-engine': 5.14.10_hfzxdiydbrbhhfpkwuv3jhvwmq + '@mui/types': 7.2.4_@types+react@18.0.21 + '@mui/utils': 5.14.10_iapumuv4e6jcjznwuxpf4tt22e '@types/react': 18.0.21 - clsx: 1.2.1 - csstype: 3.1.1 + clsx: 2.0.0 + csstype: 3.1.2 prop-types: 15.8.1 react: 18.2.0 dev: false @@ -946,6 +1056,17 @@ packages: '@types/react': 18.0.21 dev: false + /@mui/types/7.2.4_@types+react@18.0.21: + resolution: {integrity: sha512-LBcwa8rN84bKF+f5sDyku42w1NTxaPgPyYKODsh01U1fVstTClbUoSA96oyRBnSNyEiAVjKm6Gwx9vjR+xyqHA==} + peerDependencies: + '@types/react': '*' + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.0.21 + dev: false + /@mui/utils/5.10.9_react@18.2.0: resolution: {integrity: sha512-2tdHWrq3+WCy+G6TIIaFx3cg7PorXZ71P375ExuX61od1NOAJP1mK90VxQ8N4aqnj2vmO3AQDkV4oV2Ktvt4bA==} engines: {node: '>=12.0.0'} @@ -960,10 +1081,60 @@ packages: react-is: 18.2.0 dev: false + /@mui/utils/5.14.10_iapumuv4e6jcjznwuxpf4tt22e: + resolution: {integrity: sha512-Rn+vYQX7FxkcW0riDX/clNUwKuOJFH45HiULxwmpgnzQoQr3A0lb+QYwaZ+FAkZrR7qLoHKmLQlcItu6LT0y/Q==} + engines: {node: '>=12.0.0'} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.22.15 + '@types/prop-types': 15.7.5 + '@types/react': 18.0.21 + prop-types: 15.8.1 + react: 18.2.0 + react-is: 18.2.0 + dev: false + + /@mui/x-tree-view/6.0.0-alpha.3_evnhn47gfkvlobv5hpluqj3ony: + resolution: {integrity: sha512-j6vPD3e4Y4dd8v19bnDkPBXdAD8Qo5pbSEAwB3XYh60tprphBU+YVjCfUo4ZZkYEqhGBen6gKsJhFz98H2v2kg==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@emotion/react': ^11.9.0 + '@emotion/styled': ^11.8.1 + '@mui/material': ^5.8.6 + '@mui/system': ^5.8.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + dependencies: + '@babel/runtime': 7.22.15 + '@emotion/react': 11.10.4_iapumuv4e6jcjznwuxpf4tt22e + '@emotion/styled': 11.10.4_g3tud4ene45llglqap74b5kkse + '@mui/base': 5.0.0-beta.16_rj7ozvcq3uehdlnj3cbwzbi5ce + '@mui/material': 5.10.9_ikcgkdnp4bn3rgptamntbhbo7e + '@mui/system': 5.14.10_h33l6npc22g7vcra72cibfsrvm + '@mui/utils': 5.14.10_iapumuv4e6jcjznwuxpf4tt22e + '@types/react-transition-group': 4.4.6 + clsx: 2.0.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + react-transition-group: 4.4.5_biqbaboplfbrettd7655fr4n2y + transitivePeerDependencies: + - '@types/react' + dev: false + /@popperjs/core/2.11.6: resolution: {integrity: sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==} dev: false + /@popperjs/core/2.11.8: + resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} + dev: false + /@protobuf-ts/grpcweb-transport/2.8.2: resolution: {integrity: sha512-VG7132dOcH7t4C95EUiirzV2RTolBxIBWGxPFmnbKwHuR1lcSWDUbZZ1FIC1C/qip5jK4qcw5R76YZfV7gf8Pw==} dependencies: @@ -1098,6 +1269,12 @@ packages: '@types/react': 18.0.21 dev: false + /@types/react-transition-group/4.4.6: + resolution: {integrity: sha512-VnCdSxfcm08KjsJVQcfBmhEQAPnLB8G08hAxn39azX1qYBQ/5RVQuoHuKIcfKOdncuaUvEpFKFzEvbtIMsfVew==} + dependencies: + '@types/react': 18.0.21 + dev: false + /@types/react-virtualized-auto-sizer/1.0.1: resolution: {integrity: sha512-GH8sAnBEM5GV9LTeiz56r4ZhMOUSrP43tAQNSRVxNexDjcNKLCEtnxusAItg1owFUFE6k0NslV26gqVClVvong==} dependencies: @@ -1164,7 +1341,7 @@ packages: resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} engines: {node: '>=10', npm: '>=6'} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 cosmiconfig: 7.0.1 resolve: 1.22.1 dev: false @@ -1289,6 +1466,11 @@ packages: engines: {node: '>=6'} dev: false + /clsx/2.0.0: + resolution: {integrity: sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==} + engines: {node: '>=6'} + dev: false + /color-convert/1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -1325,7 +1507,7 @@ packages: /css-jss/10.9.2: resolution: {integrity: sha512-85P3X4lr2MkPBRkk/cn5AQTy5WHyHOBtQPnWRSYx6F3m0O4pVKexpFKdCDDoAgihp6cwYCf38eGVwU/ssZDSjA==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 jss-preset-default: 10.9.2 dev: false @@ -1341,7 +1523,7 @@ packages: /css-vendor/2.0.8: resolution: {integrity: sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 is-in-browser: 1.1.3 dev: false @@ -1352,6 +1534,10 @@ packages: /csstype/3.1.1: resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} + /csstype/3.1.2: + resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} + dev: false + /debug/3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -1405,7 +1591,7 @@ packages: /dom-helpers/5.2.1: resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 csstype: 3.1.1 dev: false @@ -1815,7 +2001,7 @@ packages: /jss-plugin-camel-case/10.9.2: resolution: {integrity: sha512-wgBPlL3WS0WDJ1lPJcgjux/SHnDuu7opmgQKSraKs4z8dCCyYMx9IDPFKBXQ8Q5dVYij1FFV0WdxyhuOOAXuTg==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 hyphenate-style-name: 1.0.4 jss: 10.9.2 dev: false @@ -1823,7 +2009,7 @@ packages: /jss-plugin-compose/10.9.2: resolution: {integrity: sha512-XvsGar4D791VgOMqbEk1XYY5s84Ew57OMLYjbnTXl3MSaBTvmR5M3dTqQbBquJGp4pLyyqlfTcijfolZII1w4Q==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 tiny-warning: 1.0.3 dev: false @@ -1831,21 +2017,21 @@ packages: /jss-plugin-default-unit/10.9.2: resolution: {integrity: sha512-pYg0QX3bBEFtTnmeSI3l7ad1vtHU42YEEpgW7pmIh+9pkWNWb5dwS/4onSfAaI0kq+dOZHzz4dWe+8vWnanoSg==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 dev: false /jss-plugin-expand/10.9.2: resolution: {integrity: sha512-D3PGLUJu3YbHhX6vANooCa1gqfv68wLssDp08wH21YVTCt6u8jWfqkoj9NmPz5ea1Fc0WMoJtofJTlgb6ApZvw==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 dev: false /jss-plugin-extend/10.9.2: resolution: {integrity: sha512-55lXOQ7yyRtrMRYOcWUeZ3Ea4/Cd/oTndvb9j/5O3+E816nRoYbDsqKI8ob0Yx8PnfHBsQN0u10JcLnqq+8aPA==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 tiny-warning: 1.0.3 dev: false @@ -1853,14 +2039,14 @@ packages: /jss-plugin-global/10.9.2: resolution: {integrity: sha512-GcX0aE8Ef6AtlasVrafg1DItlL/tWHoC4cGir4r3gegbWwF5ZOBYhx04gurPvWHC8F873aEGqge7C17xpwmp2g==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 dev: false /jss-plugin-nested/10.9.2: resolution: {integrity: sha512-VgiOWIC6bvgDaAL97XCxGD0BxOKM0K0zeB/ECyNaVF6FqvdGB9KBBWRdy2STYAss4VVA7i5TbxFZN+WSX1kfQA==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 tiny-warning: 1.0.3 dev: false @@ -1868,14 +2054,14 @@ packages: /jss-plugin-props-sort/10.9.2: resolution: {integrity: sha512-AP1AyUTbi2szylgr+O0OB7gkIxEGzySLITZ2GpsaoX72YMCGI2jYAc+WUhPfvUnZYiauF4zTnN4V4TGuvFjJlw==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 dev: false /jss-plugin-rule-value-function/10.9.2: resolution: {integrity: sha512-vf5ms8zvLFMub6swbNxvzsurHfUZ5Shy5aJB2gIpY6WNA3uLinEcxYyraQXItRHi5ivXGqYciFDRM2ZoVoRZ4Q==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 tiny-warning: 1.0.3 dev: false @@ -1883,7 +2069,7 @@ packages: /jss-plugin-rule-value-observable/10.9.2: resolution: {integrity: sha512-SSqBD4s/k2mwsOUg6+LI/oEmvUxokIWi+5bZOyer/2nP4kMxeo3gHURc2yiAEu3v62Sf3GHhgC6pBAugxhLL9A==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 symbol-observable: 1.2.0 dev: false @@ -1891,7 +2077,7 @@ packages: /jss-plugin-template/10.9.2: resolution: {integrity: sha512-f+ANQg8n+tkYea4Fu1Qt4skv9UJiNllzJB1Ga0QyumDZZJVpCzl8/mbFT1cvQSW7h+yB31GexFYVF3ct5fFGzA==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 tiny-warning: 1.0.3 dev: false @@ -1899,7 +2085,7 @@ packages: /jss-plugin-vendor-prefixer/10.9.2: resolution: {integrity: sha512-SxcEoH+Rttf9fEv6KkiPzLdXRmI6waOTcMkbbEFgdZLDYNIP9UKNHFy6thhbRKqv0XMQZdrEsbDyV464zE/dUA==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 css-vendor: 2.0.8 jss: 10.9.2 dev: false @@ -1907,7 +2093,7 @@ packages: /jss-preset-default/10.9.2: resolution: {integrity: sha512-HMkTLgYPRjwdiu8n8ZB2VEfpO95cZ5AmmSYvFSvt76MQJMp/xDh6cP49MmZHwMpIvXwNj0LI8Peglgwz+rHKBQ==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 jss: 10.9.2 jss-plugin-camel-case: 10.9.2 jss-plugin-compose: 10.9.2 @@ -1926,7 +2112,7 @@ packages: /jss/10.9.2: resolution: {integrity: sha512-b8G6rWpYLR4teTUbGd4I4EsnWjg7MN0Q5bSsjKhVkJVjhQDy2KzkbD2AW3TuT0RYZVmZZHKIrXDn6kjU14qkUg==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 csstype: 3.1.1 is-in-browser: 1.1.3 tiny-warning: 1.0.3 @@ -2351,13 +2537,17 @@ packages: /redux/4.2.0: resolution: {integrity: sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==} dependencies: - '@babel/runtime': 7.20.6 + '@babel/runtime': 7.22.15 dev: false /regenerator-runtime/0.13.11: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} dev: false + /regenerator-runtime/0.14.0: + resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} + dev: false + /remove-accents/0.4.2: resolution: {integrity: sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA==} dev: false @@ -2483,6 +2673,10 @@ packages: resolution: {integrity: sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag==} dev: false + /stylis/4.2.0: + resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} + dev: false + /supports-color/5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} diff --git a/frontend/src/entity/job_restore.ts b/frontend/src/entity/job_restore.ts index 27408e7..cdfac3b 100644 --- a/frontend/src/entity/job_restore.ts +++ b/frontend/src/entity/job_restore.ts @@ -164,10 +164,6 @@ export interface JobRestoreDisplay { * @generated from protobuf field: int64 start_time = 6; */ startTime: bigint; - /** - * @generated from protobuf field: bytes logs = 17; - */ - logs: Uint8Array; } /** * @generated from protobuf enum job_restore.JobRestoreStep @@ -634,12 +630,11 @@ class JobRestoreDisplay$Type extends MessageType { { no: 3, name: "total_bytes", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 4, name: "total_files", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 5, name: "speed", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 6, name: "start_time", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 17, name: "logs", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + { no: 6, name: "start_time", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } ]); } create(value?: PartialMessage): JobRestoreDisplay { - const message = { copyedBytes: 0n, copyedFiles: 0n, totalBytes: 0n, totalFiles: 0n, startTime: 0n, logs: new Uint8Array(0) }; + const message = { copyedBytes: 0n, copyedFiles: 0n, totalBytes: 0n, totalFiles: 0n, startTime: 0n }; globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== undefined) reflectionMergePartial(this, message, value); @@ -668,9 +663,6 @@ class JobRestoreDisplay$Type extends MessageType { case /* int64 start_time */ 6: message.startTime = reader.int64().toBigInt(); break; - case /* bytes logs */ 17: - message.logs = reader.bytes(); - break; default: let u = options.readUnknownField; if (u === "throw") @@ -701,9 +693,6 @@ class JobRestoreDisplay$Type extends MessageType { /* int64 start_time = 6; */ if (message.startTime !== 0n) writer.tag(6, WireType.Varint).int64(message.startTime); - /* bytes logs = 17; */ - if (message.logs.length) - writer.tag(17, WireType.LengthDelimited).bytes(message.logs); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); diff --git a/frontend/src/pages/jobs.tsx b/frontend/src/pages/jobs.tsx index 70b2360..10421eb 100644 --- a/frontend/src/pages/jobs.tsx +++ b/frontend/src/pages/jobs.tsx @@ -29,6 +29,11 @@ import DialogTitle from "@mui/material/DialogTitle"; import LinearProgress from "@mui/material/LinearProgress"; import Divider from "@mui/material/Divider"; +import { TreeView, TreeItem } from "@mui/x-tree-view"; + +import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; +import ChevronRightIcon from "@mui/icons-material/ChevronRight"; + import { cli, sleep, fileBase } from "../api"; import { Job, JobDisplay, JobListRequest, JobNextRequest, JobStatus, CopyStatus, LibraryEntityType, JobDeleteRequest } from "../entity"; @@ -321,27 +326,31 @@ const RestoreViewFilesDialog = ({ tapes }: { tapes: RestoreTape[] }) => { - {/* {open && ( + {open && ( View Files - {tapes.map((tape) => { - if (!src.source) { - return null; - } - return ( - - ); - })} + } defaultExpandIcon={}> + {tapes.map((tape) => { + if (!tape.files) { + return null; + } + + return ( + + {tape.files.map((file) => ( + + ))} + + ); + })} + - )} */} + )} ); }; diff --git a/go.mod b/go.mod index 58aa61b..f975264 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,9 @@ -module github.com/abc950309/tapewriter +module github.com/samuelncui/tapewriter go 1.20 require ( github.com/HewlettPackard/structex v1.0.4 - github.com/abc950309/acp v0.0.0-20230918043059-b094d98c63cb github.com/aws/aws-sdk-go v1.44.118 github.com/benmcclelland/mtio v0.0.0-20170506231306-f929531fb4fe github.com/benmcclelland/sgio v0.0.0-20180629175614-f710aebf64c1 @@ -20,6 +19,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 github.com/samber/lo v1.38.1 + github.com/samuelncui/acp v0.0.0-20230922055057-290748251e42 github.com/sirupsen/logrus v1.9.0 google.golang.org/grpc v1.53.0 google.golang.org/protobuf v1.30.0 diff --git a/go.sum b/go.sum index 98f6c35..7bf4827 100644 --- a/go.sum +++ b/go.sum @@ -9,10 +9,6 @@ github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/abc950309/acp v0.0.0-20230516133201-df6caee40899 h1:X8Lc97MotJkEWD/1iTjjGvJq4i/owL6gSPSQkFELVck= -github.com/abc950309/acp v0.0.0-20230516133201-df6caee40899/go.mod h1:9KLpYlm8qGkr0+kJ7u2XRXlgImNVZhnymiKyCXeW7lo= -github.com/abc950309/acp v0.0.0-20230918043059-b094d98c63cb h1:UxIelTxvpCFZShiSgMWO4h1CN8janPo2C28+579xVrM= -github.com/abc950309/acp v0.0.0-20230918043059-b094d98c63cb/go.mod h1:9KLpYlm8qGkr0+kJ7u2XRXlgImNVZhnymiKyCXeW7lo= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -367,6 +363,8 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/samuelncui/acp v0.0.0-20230922055057-290748251e42 h1:FnVk2nAOBOy8la+J7le1zcZa5kI39fyWDMt30pB97lQ= +github.com/samuelncui/acp v0.0.0-20230922055057-290748251e42/go.mod h1:cy5nMv6EZMvC4K3u1vLdLWFGHVWeRRoOUNw0kk+Wtvo= github.com/schollz/progressbar/v3 v3.12.2 h1:yLqqqpQNMxGxHY8uEshRihaHWwa0rf0yb7/Zrpgq2C0= github.com/schollz/progressbar/v3 v3.12.2/go.mod h1:HFJYIYQQJX32UJdyoigUl19xoV6aMwZt6iX/C30RWfg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= diff --git a/library/library.go b/library/library.go index 6e82914..1b48477 100644 --- a/library/library.go +++ b/library/library.go @@ -5,9 +5,9 @@ import ( "encoding/json" "fmt" - "github.com/abc950309/tapewriter/entity" "github.com/modern-go/reflect2" "github.com/samber/lo" + "github.com/samuelncui/tapewriter/entity" "gorm.io/gorm" ) diff --git a/library/tape.go b/library/tape.go index f06aad7..a2e905a 100644 --- a/library/tape.go +++ b/library/tape.go @@ -6,7 +6,7 @@ import ( "os" "time" - "github.com/abc950309/tapewriter/entity" + "github.com/samuelncui/tapewriter/entity" ) var ( @@ -81,6 +81,9 @@ func (l *Library) GetTape(ctx context.Context, id int64) (*Tape, error) { } func (l *Library) DeleteTapes(ctx context.Context, ids ...int64) error { + // if r := l.db.WithContext(ctx).Where("tape_id IN (?)", ids).Delete(ModelPosition); r.Error != nil { + // return fmt.Errorf("delete file position fail, err= %w", r.Error) + // } if r := l.db.WithContext(ctx).Where("id IN (?)", ids).Delete(ModelTape); r.Error != nil { return fmt.Errorf("delete tapes fail, err= %w", r.Error) } diff --git a/scripts/test.sh b/scripts/test.sh deleted file mode 100644 index 8d9a968..0000000 --- a/scripts/test.sh +++ /dev/null @@ -1,2 +0,0 @@ -GOOS=linux go build -o ./output/ordercp ./cmd/ordercp -scp ./output/ordercp nas:ordercp diff --git a/tapechanger/changer.go b/tapechanger/changer.go index 028906a..4451d3b 100644 --- a/tapechanger/changer.go +++ b/tapechanger/changer.go @@ -3,7 +3,7 @@ package tapechanger import ( "context" - "github.com/abc950309/tapewriter/library" + "github.com/samuelncui/tapewriter/library" ) var (