Skip to content

Commit d884e6c

Browse files
committed
Retain getquota API
1 parent 3eb2dc1 commit d884e6c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

public/admin/repquota.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
<h3>Paste repquota Output</h3>
4949
<textarea v-model="rawInput" placeholder="Paste results here..."></textarea>
5050
<div style="text-align: right;">
51+
<button @click="getQuota" style="border: none; padding: 12px 24px;">Fetch from Server</button>
5152
<button @click="parseQuota" style="background: #3182ce; color: white; border: none; padding: 12px 24px;">Analyze Storage</button>
5253
</div>
5354
</div>
@@ -95,6 +96,12 @@ <h3>Paste repquota Output</h3>
9596
};
9697
},
9798
methods: {
99+
async getQuota() {
100+
try {
101+
const resp = await fetch('/status/repquota');
102+
this.rawInput = await resp.text();
103+
} catch(e) { alert("Failed to fetch: " + e); }
104+
},
98105
formatSize(kb) {
99106
if (kb === 0) return '0 KB';
100107
if (kb < 1024) return kb + ' KB';

0 commit comments

Comments
 (0)