Skip to content

armgit / dashy

Public Imported from GitHub
0

🚀 A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:fire: Remove references to mock data

Marcell Fülöpdb0fc0454d35
diff --git a/src/components/Widgets/NextcloudNotifications.vue b/src/components/Widgets/NextcloudNotifications.vue
index f8b90bb7..b05c983a 100644
--- a/src/components/Widgets/NextcloudNotifications.vue
+++ b/src/components/Widgets/NextcloudNotifications.vue
@@ -38,7 +38,6 @@
<script>
import WidgetMixin from '@/mixins/WidgetMixin';
import NextcloudMixin from '@/mixins/NextcloudMixin';
-// //import { NcdNotif } from '@/utils/ncd';
/**
* NextcloudNotifications widget - Displays the user's notifications
@@ -83,7 +82,6 @@ export default {
return;
}
this.makeRequest(this.endpoint('notifications'), this.headers)
- // //Promise.resolve(NcdNotif)
.then(this.processNotifications)
.finally(this.finishLoading);
},
@@ -117,14 +115,12 @@ export default {
},
deleteNotifications() {
this.makeRequest(this.endpoint('notifications'), this.headers, 'DELETE')
- // //Promise.resolve()
.then(() => {
this.notifications = [];
});
},
deleteNotification(id) {
this.makeRequest(`${this.endpoint('notifications')}/${id}`, this.headers, 'DELETE')
- // //Promise.resolve()
.then(this.fetchData);
},
/* Tooltip generators */
diff --git a/src/components/Widgets/NextcloudStats.vue b/src/components/Widgets/NextcloudStats.vue
index a03f247f..f1c02fc0 100644
--- a/src/components/Widgets/NextcloudStats.vue
+++ b/src/components/Widgets/NextcloudStats.vue
@@ -58,7 +58,6 @@
<script>
import WidgetMixin from '@/mixins/WidgetMixin';
import NextcloudMixin from '@/mixins/NextcloudMixin';
-// //import { NcdServer } from '@/utils/ncd';
/**
* NextcloudStats widget - Shows statistics about Nextcloud usage
@@ -130,7 +129,6 @@ export default {
fetchData() {
if (!this.hasValidCredentials()) return;
this.makeRequest(this.endpoint('serverinfo'), this.headers)
- // //Promise.resolve(NcdServer)
.then(this.processServerInfo)
.finally(this.finishLoading);
},
diff --git a/src/components/Widgets/NextcloudSystem.vue b/src/components/Widgets/NextcloudSystem.vue
index 1e4e5bde..182b4e26 100644
--- a/src/components/Widgets/NextcloudSystem.vue
+++ b/src/components/Widgets/NextcloudSystem.vue
@@ -46,7 +46,6 @@ import WidgetMixin from '@/mixins/WidgetMixin';
import NextcloudMixin from '@/mixins/NextcloudMixin';
import GaugeChart from '@/components/Charts/Gauge';
import ChartingMixin from '@/mixins/ChartingMixin';
-// //import { NcdServer } from '@/utils/ncd';
const NextcloudSystemSchema = {
server: {
@@ -107,7 +106,6 @@ export default {
async fetchData() {
if (!this.hasValidCredentials()) return;
this.makeRequest(this.endpoint('serverinfo'), this.headers)
- // //Promise.resolve(NcdServer)
.then(this.processServerInfo)
.finally(() => this.finishLoading());
},
diff --git a/src/components/Widgets/NextcloudUser.vue b/src/components/Widgets/NextcloudUser.vue
index 832fa3ba..75e3a222 100644
--- a/src/components/Widgets/NextcloudUser.vue
+++ b/src/components/Widgets/NextcloudUser.vue
@@ -45,7 +45,6 @@ import WidgetMixin from '@/mixins/WidgetMixin';
import NextcloudMixin from '@/mixins/NextcloudMixin';
import PercentageChart from '@/components/Charts/PercentageChart';
import { convertBytes } from '@/utils/MiscHelpers';
-// //import { NcdUsr } from '@/utils/ncd';
/**
* NextcloudUser widget - Displays branding and user information
@@ -85,7 +84,6 @@ export default {
},
loadUser() {
return this.makeRequest(this.endpoint('user'), this.headers)
- // //return Promise.resolve(NcdUsr)
.then(this.processUser);
},
processUser(userResponse) {
diff --git a/src/components/Widgets/NextcloudUserStatus.vue b/src/components/Widgets/NextcloudUserStatus.vue
index 0e2e1c02..5cfac344 100644
--- a/src/components/Widgets/NextcloudUserStatus.vue
+++ b/src/components/Widgets/NextcloudUserStatus.vue
@@ -38,7 +38,6 @@
<script>
import WidgetMixin from '@/mixins/WidgetMixin';
import NextcloudMixin from '@/mixins/NextcloudMixin';
-// //import { NcdStatusAll, NcdStatusSingle } from '@/utils/ncd';
// Nextcloud User Status API supports getting all user statuses at once
// or a single user's status. {fetchStrategy} determines which of these methods to use.
@@ -96,7 +95,6 @@ export default {
}
if (this.fetchStrategy === fetchStrategies.allAtOnce) {
this.makeRequest(this.endpoint('userstatus'), this.headers)
- // //Promise.resolve(NcdStatusAll)
.then(this.processStatuses)
.finally(this.finishLoading);
} else {
@@ -105,7 +103,6 @@ export default {
this.users.forEach((user) => {
promises.push(
this.makeRequest(`${this.endpoint('userstatus')}/${user}`, this.headers)
- // //Promise.resolve(NcdStatusSingle)
.then(this.processStatus),
);
});
diff --git a/src/mixins/NextcloudMixin.js b/src/mixins/NextcloudMixin.js
index 0d933f85..fd89bb54 100644
--- a/src/mixins/NextcloudMixin.js
+++ b/src/mixins/NextcloudMixin.js
@@ -2,7 +2,6 @@ import { serviceEndpoints } from '@/utils/defaults';
import {
convertBytes, formatNumber, getTimeAgo, timestampToDateTime,
} from '@/utils/MiscHelpers';
-// //import { NcdCap } from '@/utils/ncd';
/**
* Reusable mixin for Nextcloud widgets
@@ -146,7 +145,6 @@ export default {
loadCapabilities() {
if ((new Date().getTime()) - this.capabilitiesLastUpdated > this.capabilitiesTtl) {
return this.makeRequest(this.endpoint('capabilities'), this.headers)
- // //return Promise.resolve(NcdCap)
.then(this.processCapabilities);
}
return Promise.resolve();