mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Show available space of storages.
This commit is contained in:
@@ -79,6 +79,7 @@ export default function StorageView() {
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{t("Name")}</td>
|
<td>{t("Name")}</td>
|
||||||
<td>{t("Created At")}</td>
|
<td>{t("Created At")}</td>
|
||||||
|
<td>{t("Size")}</td>
|
||||||
<td>{t("Action")}</td>
|
<td>{t("Action")}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -92,6 +93,9 @@ export default function StorageView() {
|
|||||||
<td>
|
<td>
|
||||||
{(new Date(s.createdAt)).toLocaleString()}
|
{(new Date(s.createdAt)).toLocaleString()}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{(s.currentSize/1024/1024).toFixed(2)} / {s.maxSize/1024/1024} MB
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button className={"btn btn-square"} type={"button"} onClick={() => {
|
<button className={"btn btn-square"} type={"button"} onClick={() => {
|
||||||
const dialog = document.getElementById(`confirm_delete_dialog_${s.id}`) as HTMLDialogElement;
|
const dialog = document.getElementById(`confirm_delete_dialog_${s.id}`) as HTMLDialogElement;
|
||||||
|
@@ -336,7 +336,7 @@ function CreateFileDialog({resourceId}: { resourceId: number }) {
|
|||||||
<option value={""} disabled>{t("Select Storage")}</option>
|
<option value={""} disabled>{t("Select Storage")}</option>
|
||||||
{
|
{
|
||||||
storages.current?.map((s) => {
|
storages.current?.map((s) => {
|
||||||
return <option key={s.id} value={s.id}>{s.name}</option>
|
return <option key={s.id} value={s.id}>{s.name}({(s.currentSize/1024/1024).toFixed(2)}/{s.maxSize/1024/1024}MB)</option>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</select>
|
</select>
|
||||||
|
Reference in New Issue
Block a user