mirror of
https://github.com/samuelncui/yatm.git
synced 2026-09-20 15:04:21 +00:00
fix: misspell
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.8.2
|
||||
// @generated by protobuf-ts 2.9.1
|
||||
// @generated from protobuf file "copy_status.proto" (package "copy_status", syntax proto3)
|
||||
// tslint:disable
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.8.2
|
||||
// @generated by protobuf-ts 2.9.1
|
||||
// @generated from protobuf file "file.proto" (package "file", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.8.2
|
||||
// @generated by protobuf-ts 2.9.1
|
||||
// @generated from protobuf file "job.proto" (package "job", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.8.2
|
||||
// @generated by protobuf-ts 2.9.1
|
||||
// @generated from protobuf file "job_archive.proto" (package "job_archive", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
@@ -96,13 +96,13 @@ export interface JobArchiveState {
|
||||
*/
|
||||
export interface JobArchiveDisplay {
|
||||
/**
|
||||
* @generated from protobuf field: int64 copyed_bytes = 1;
|
||||
* @generated from protobuf field: int64 copied_bytes = 1;
|
||||
*/
|
||||
copyedBytes: bigint;
|
||||
copiedBytes: bigint;
|
||||
/**
|
||||
* @generated from protobuf field: int64 copyed_files = 2;
|
||||
* @generated from protobuf field: int64 copied_files = 2;
|
||||
*/
|
||||
copyedFiles: bigint;
|
||||
copiedFiles: bigint;
|
||||
/**
|
||||
* @generated from protobuf field: int64 total_bytes = 3;
|
||||
*/
|
||||
@@ -429,8 +429,8 @@ export const JobArchiveState = new JobArchiveState$Type();
|
||||
class JobArchiveDisplay$Type extends MessageType<JobArchiveDisplay> {
|
||||
constructor() {
|
||||
super("job_archive.JobArchiveDisplay", [
|
||||
{ no: 1, name: "copyed_bytes", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 2, name: "copyed_files", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 1, name: "copied_bytes", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 2, name: "copied_files", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ 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*/ },
|
||||
@@ -438,7 +438,7 @@ class JobArchiveDisplay$Type extends MessageType<JobArchiveDisplay> {
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<JobArchiveDisplay>): JobArchiveDisplay {
|
||||
const message = { copyedBytes: 0n, copyedFiles: 0n, totalBytes: 0n, totalFiles: 0n, startTime: 0n };
|
||||
const message = { copiedBytes: 0n, copiedFiles: 0n, totalBytes: 0n, totalFiles: 0n, startTime: 0n };
|
||||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<JobArchiveDisplay>(this, message, value);
|
||||
@@ -449,11 +449,11 @@ class JobArchiveDisplay$Type extends MessageType<JobArchiveDisplay> {
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* int64 copyed_bytes */ 1:
|
||||
message.copyedBytes = reader.int64().toBigInt();
|
||||
case /* int64 copied_bytes */ 1:
|
||||
message.copiedBytes = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* int64 copyed_files */ 2:
|
||||
message.copyedFiles = reader.int64().toBigInt();
|
||||
case /* int64 copied_files */ 2:
|
||||
message.copiedFiles = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* int64 total_bytes */ 3:
|
||||
message.totalBytes = reader.int64().toBigInt();
|
||||
@@ -479,12 +479,12 @@ class JobArchiveDisplay$Type extends MessageType<JobArchiveDisplay> {
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: JobArchiveDisplay, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* int64 copyed_bytes = 1; */
|
||||
if (message.copyedBytes !== 0n)
|
||||
writer.tag(1, WireType.Varint).int64(message.copyedBytes);
|
||||
/* int64 copyed_files = 2; */
|
||||
if (message.copyedFiles !== 0n)
|
||||
writer.tag(2, WireType.Varint).int64(message.copyedFiles);
|
||||
/* int64 copied_bytes = 1; */
|
||||
if (message.copiedBytes !== 0n)
|
||||
writer.tag(1, WireType.Varint).int64(message.copiedBytes);
|
||||
/* int64 copied_files = 2; */
|
||||
if (message.copiedFiles !== 0n)
|
||||
writer.tag(2, WireType.Varint).int64(message.copiedFiles);
|
||||
/* int64 total_bytes = 3; */
|
||||
if (message.totalBytes !== 0n)
|
||||
writer.tag(3, WireType.Varint).int64(message.totalBytes);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.8.2
|
||||
// @generated by protobuf-ts 2.9.1
|
||||
// @generated from protobuf file "job_restore.proto" (package "job_restore", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
@@ -145,13 +145,13 @@ export interface JobRestoreState {
|
||||
*/
|
||||
export interface JobRestoreDisplay {
|
||||
/**
|
||||
* @generated from protobuf field: int64 copyed_bytes = 1;
|
||||
* @generated from protobuf field: int64 copied_bytes = 1;
|
||||
*/
|
||||
copyedBytes: bigint;
|
||||
copiedBytes: bigint;
|
||||
/**
|
||||
* @generated from protobuf field: int64 copyed_files = 2;
|
||||
* @generated from protobuf field: int64 copied_files = 2;
|
||||
*/
|
||||
copyedFiles: bigint;
|
||||
copiedFiles: bigint;
|
||||
/**
|
||||
* @generated from protobuf field: int64 total_bytes = 3;
|
||||
*/
|
||||
@@ -636,8 +636,8 @@ export const JobRestoreState = new JobRestoreState$Type();
|
||||
class JobRestoreDisplay$Type extends MessageType<JobRestoreDisplay> {
|
||||
constructor() {
|
||||
super("job_restore.JobRestoreDisplay", [
|
||||
{ no: 1, name: "copyed_bytes", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 2, name: "copyed_files", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 1, name: "copied_bytes", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 2, name: "copied_files", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ 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*/ },
|
||||
@@ -645,7 +645,7 @@ class JobRestoreDisplay$Type extends MessageType<JobRestoreDisplay> {
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<JobRestoreDisplay>): JobRestoreDisplay {
|
||||
const message = { copyedBytes: 0n, copyedFiles: 0n, totalBytes: 0n, totalFiles: 0n, startTime: 0n };
|
||||
const message = { copiedBytes: 0n, copiedFiles: 0n, totalBytes: 0n, totalFiles: 0n, startTime: 0n };
|
||||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<JobRestoreDisplay>(this, message, value);
|
||||
@@ -656,11 +656,11 @@ class JobRestoreDisplay$Type extends MessageType<JobRestoreDisplay> {
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* int64 copyed_bytes */ 1:
|
||||
message.copyedBytes = reader.int64().toBigInt();
|
||||
case /* int64 copied_bytes */ 1:
|
||||
message.copiedBytes = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* int64 copyed_files */ 2:
|
||||
message.copyedFiles = reader.int64().toBigInt();
|
||||
case /* int64 copied_files */ 2:
|
||||
message.copiedFiles = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* int64 total_bytes */ 3:
|
||||
message.totalBytes = reader.int64().toBigInt();
|
||||
@@ -686,12 +686,12 @@ class JobRestoreDisplay$Type extends MessageType<JobRestoreDisplay> {
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: JobRestoreDisplay, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* int64 copyed_bytes = 1; */
|
||||
if (message.copyedBytes !== 0n)
|
||||
writer.tag(1, WireType.Varint).int64(message.copyedBytes);
|
||||
/* int64 copyed_files = 2; */
|
||||
if (message.copyedFiles !== 0n)
|
||||
writer.tag(2, WireType.Varint).int64(message.copyedFiles);
|
||||
/* int64 copied_bytes = 1; */
|
||||
if (message.copiedBytes !== 0n)
|
||||
writer.tag(1, WireType.Varint).int64(message.copiedBytes);
|
||||
/* int64 copied_files = 2; */
|
||||
if (message.copiedFiles !== 0n)
|
||||
writer.tag(2, WireType.Varint).int64(message.copiedFiles);
|
||||
/* int64 total_bytes = 3; */
|
||||
if (message.totalBytes !== 0n)
|
||||
writer.tag(3, WireType.Varint).int64(message.totalBytes);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.8.2
|
||||
// @generated by protobuf-ts 2.9.1
|
||||
// @generated from protobuf file "library_entity_type.proto" (package "library_entity_type", syntax proto3)
|
||||
// tslint:disable
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.8.2
|
||||
// @generated by protobuf-ts 2.9.1
|
||||
// @generated from protobuf file "position.proto" (package "position", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.8.2
|
||||
// @generated by protobuf-ts 2.9.1
|
||||
// @generated from protobuf file "service.proto" (package "service", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.8.2
|
||||
// @generated by protobuf-ts 2.9.1
|
||||
// @generated from protobuf file "service.proto" (package "service", syntax proto3)
|
||||
// tslint:disable
|
||||
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.8.2
|
||||
// @generated by protobuf-ts 2.9.1
|
||||
// @generated from protobuf file "source.proto" (package "source", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.8.2
|
||||
// @generated by protobuf-ts 2.9.1
|
||||
// @generated from protobuf file "tape.proto" (package "tape", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
|
||||
+18
-18
@@ -250,10 +250,10 @@ const ArchiveCard = ({
|
||||
submitedBytes += Number(file.size);
|
||||
}
|
||||
|
||||
const copyedFiles = submitedFiles + Number(display?.copyedFiles || 0n);
|
||||
const copyedBytes = submitedBytes + Number(display?.copyedBytes || 0n);
|
||||
const copiedFiles = submitedFiles + Number(display?.copiedFiles || 0n);
|
||||
const copiedBytes = submitedBytes + Number(display?.copiedBytes || 0n);
|
||||
const avgSpeed = (() => {
|
||||
if (!display || !display.copyedBytes || !display.startTime) {
|
||||
if (!display || !display.copiedBytes || !display.startTime) {
|
||||
return NaN;
|
||||
}
|
||||
|
||||
@@ -262,17 +262,17 @@ const ArchiveCard = ({
|
||||
return NaN;
|
||||
}
|
||||
|
||||
return Number(display.copyedBytes) / duration;
|
||||
return Number(display.copiedBytes) / duration;
|
||||
})();
|
||||
|
||||
const progress = (totalBytes > 0 ? copyedBytes / totalBytes : 1) * 100;
|
||||
const progress = (totalBytes > 0 ? copiedBytes / totalBytes : 1) * 100;
|
||||
const fields = [
|
||||
{ name: "Current Step", value: JobArchiveStep[state.step] },
|
||||
{ name: "Current Speed", value: display?.speed ? `${formatFilesize(display?.speed)}/s` : "--" },
|
||||
{ name: "Average Speed", value: !isNaN(avgSpeed) ? `${formatFilesize(avgSpeed)}/s` : "--" },
|
||||
{ name: "Estimated Time", value: !isNaN(avgSpeed) ? format(((totalBytes - copyedBytes) * 1000) / avgSpeed) : "--" },
|
||||
{ name: "Copyed Files", value: copyedFiles },
|
||||
{ name: "Copyed Bytes", value: formatFilesize(copyedBytes) },
|
||||
{ name: "Estimated Time", value: !isNaN(avgSpeed) ? format(((totalBytes - copiedBytes) * 1000) / avgSpeed) : "--" },
|
||||
{ name: "Copied Files", value: copiedFiles },
|
||||
{ name: "Copied Bytes", value: formatFilesize(copiedBytes) },
|
||||
{ name: "Submited Files", value: submitedFiles },
|
||||
{ name: "Submited Bytes", value: formatFilesize(submitedBytes) },
|
||||
{ name: "Total Files", value: totalFiles },
|
||||
@@ -396,8 +396,8 @@ const RestoreCard = ({
|
||||
const totalFiles = state.tapes.reduce((count, tape) => count + tape.files.length, 0);
|
||||
let successFiles = 0,
|
||||
successBytes = 0,
|
||||
copyedFiles = Number(display?.copyedFiles || 0n),
|
||||
copyedBytes = Number(display?.copyedBytes || 0n),
|
||||
copiedFiles = Number(display?.copiedFiles || 0n),
|
||||
copiedBytes = Number(display?.copiedBytes || 0n),
|
||||
totalBytes = 0;
|
||||
for (const tape of state.tapes) {
|
||||
for (const file of tape.files) {
|
||||
@@ -409,14 +409,14 @@ const RestoreCard = ({
|
||||
}
|
||||
|
||||
if (file.status === CopyStatus.SUBMITED) {
|
||||
copyedFiles++;
|
||||
copyedBytes += Number(file.size);
|
||||
copiedFiles++;
|
||||
copiedBytes += Number(file.size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const avgSpeed = (() => {
|
||||
if (!display || !display.copyedBytes || !display.startTime) {
|
||||
if (!display || !display.copiedBytes || !display.startTime) {
|
||||
return NaN;
|
||||
}
|
||||
|
||||
@@ -425,17 +425,17 @@ const RestoreCard = ({
|
||||
return NaN;
|
||||
}
|
||||
|
||||
return Number(display.copyedBytes) / duration;
|
||||
return Number(display.copiedBytes) / duration;
|
||||
})();
|
||||
|
||||
const progress = (totalBytes > 0 ? copyedBytes / totalBytes : 1) * 100;
|
||||
const progress = (totalBytes > 0 ? copiedBytes / totalBytes : 1) * 100;
|
||||
const fields = [
|
||||
{ name: "Current Step", value: JobArchiveStep[state.step] },
|
||||
{ name: "Current Speed", value: display?.speed ? `${formatFilesize(display?.speed)}/s` : "--" },
|
||||
{ name: "Average Speed", value: !isNaN(avgSpeed) ? `${formatFilesize(avgSpeed)}/s` : "--" },
|
||||
{ name: "Estimated Time", value: !isNaN(avgSpeed) ? format(((totalBytes - copyedBytes) * 1000) / avgSpeed) : "--" },
|
||||
{ name: "Copyed Files", value: copyedFiles },
|
||||
{ name: "Copyed Bytes", value: formatFilesize(copyedBytes) },
|
||||
{ name: "Estimated Time", value: !isNaN(avgSpeed) ? format(((totalBytes - copiedBytes) * 1000) / avgSpeed) : "--" },
|
||||
{ name: "Copied Files", value: copiedFiles },
|
||||
{ name: "Copied Bytes", value: formatFilesize(copiedBytes) },
|
||||
{ name: "Success Files", value: successFiles },
|
||||
{ name: "Success Bytes", value: formatFilesize(successBytes) },
|
||||
{ name: "Total Files", value: totalFiles },
|
||||
|
||||
Reference in New Issue
Block a user