Added functionality to the disk usage display in the ui settings

This commit is contained in:
Leon Etienne (ubuntu wsl)
2020-09-30 21:44:52 +02:00
parent c33216f2dd
commit 2f0935cddc
14 changed files with 52 additions and 18 deletions

View File

@@ -0,0 +1,24 @@
import axios from 'axios';
export const state = () => ({
usage: {}
});
export const mutations = {
update(state, data) {
state.usage = data;
},
};
export const actions = {
update(context, instance) {
axios.post("/api", {
request: "get_disk_usage"
})
.then(function(response) {
if (response.data.status === "OK") {
instance.$store.commit("diskUsage/update", response.data.disk_usage);
}
});
},
};