fix: 修复配额说明重复和undefined问题

- 在editStorageForm中初始化oss_storage_quota_value和oss_quota_unit
- 删除重复的旧配额说明块,保留新的当前配额设置显示

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-22 19:39:53 +08:00
commit 4350113979
7649 changed files with 897277 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
export * from "./waitForBucketExists";
export * from "./waitForBucketNotExists";
export * from "./waitForObjectExists";
export * from "./waitForObjectNotExists";

View File

@@ -0,0 +1,26 @@
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
import { HeadBucketCommand } from "../commands/HeadBucketCommand";
const checkState = async (client, input) => {
let reason;
try {
let result = await client.send(new HeadBucketCommand(input));
reason = result;
return { state: WaiterState.SUCCESS, reason };
}
catch (exception) {
reason = exception;
if (exception.name && exception.name == "NotFound") {
return { state: WaiterState.RETRY, reason };
}
}
return { state: WaiterState.RETRY, reason };
};
export const waitForBucketExists = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
};
export const waitUntilBucketExists = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
return checkExceptions(result);
};

View File

@@ -0,0 +1,25 @@
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
import { HeadBucketCommand } from "../commands/HeadBucketCommand";
const checkState = async (client, input) => {
let reason;
try {
let result = await client.send(new HeadBucketCommand(input));
reason = result;
}
catch (exception) {
reason = exception;
if (exception.name && exception.name == "NotFound") {
return { state: WaiterState.SUCCESS, reason };
}
}
return { state: WaiterState.RETRY, reason };
};
export const waitForBucketNotExists = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
};
export const waitUntilBucketNotExists = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
return checkExceptions(result);
};

View File

@@ -0,0 +1,26 @@
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
import { HeadObjectCommand } from "../commands/HeadObjectCommand";
const checkState = async (client, input) => {
let reason;
try {
let result = await client.send(new HeadObjectCommand(input));
reason = result;
return { state: WaiterState.SUCCESS, reason };
}
catch (exception) {
reason = exception;
if (exception.name && exception.name == "NotFound") {
return { state: WaiterState.RETRY, reason };
}
}
return { state: WaiterState.RETRY, reason };
};
export const waitForObjectExists = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
};
export const waitUntilObjectExists = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
return checkExceptions(result);
};

View File

@@ -0,0 +1,25 @@
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
import { HeadObjectCommand } from "../commands/HeadObjectCommand";
const checkState = async (client, input) => {
let reason;
try {
let result = await client.send(new HeadObjectCommand(input));
reason = result;
}
catch (exception) {
reason = exception;
if (exception.name && exception.name == "NotFound") {
return { state: WaiterState.SUCCESS, reason };
}
}
return { state: WaiterState.RETRY, reason };
};
export const waitForObjectNotExists = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
};
export const waitUntilObjectNotExists = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
return checkExceptions(result);
};