🚧 Working on CPU Usage Widgets

This commit is contained in:
Alicia Sykes
2022-01-07 23:25:32 +00:00
parent 9ebdf67a44
commit 4a14b27cf3
6 changed files with 132 additions and 7 deletions

View File

@@ -17,6 +17,7 @@ const WidgetMixin = {
data: () => ({
progress: new ProgressBar({ color: 'var(--progress-bar)' }),
overrideProxyChoice: false,
disableLoader: false, // Prevent ever showing the loader
}),
/* When component mounted, fetch initial data */
mounted() {
@@ -44,8 +45,10 @@ const WidgetMixin = {
},
/* When a data request update starts, show loader */
startLoading() {
this.$emit('loading', true);
this.progress.start();
if (!this.disableLoader) {
this.$emit('loading', true);
this.progress.start();
}
},
/* When a data request finishes, hide loader */
finishLoading() {