🔥 Remove references to mock data

This commit is contained in:
Marcell Fülöp 2022-06-19 16:20:16 +00:00
parent 4b930939c7
commit db0fc0454d
6 changed files with 0 additions and 15 deletions

View File

@ -38,7 +38,6 @@
<script> <script>
import WidgetMixin from '@/mixins/WidgetMixin'; import WidgetMixin from '@/mixins/WidgetMixin';
import NextcloudMixin from '@/mixins/NextcloudMixin'; import NextcloudMixin from '@/mixins/NextcloudMixin';
// //import { NcdNotif } from '@/utils/ncd';
/** /**
* NextcloudNotifications widget - Displays the user's notifications * NextcloudNotifications widget - Displays the user's notifications
@ -83,7 +82,6 @@ export default {
return; return;
} }
this.makeRequest(this.endpoint('notifications'), this.headers) this.makeRequest(this.endpoint('notifications'), this.headers)
// //Promise.resolve(NcdNotif)
.then(this.processNotifications) .then(this.processNotifications)
.finally(this.finishLoading); .finally(this.finishLoading);
}, },
@ -117,14 +115,12 @@ export default {
}, },
deleteNotifications() { deleteNotifications() {
this.makeRequest(this.endpoint('notifications'), this.headers, 'DELETE') this.makeRequest(this.endpoint('notifications'), this.headers, 'DELETE')
// //Promise.resolve()
.then(() => { .then(() => {
this.notifications = []; this.notifications = [];
}); });
}, },
deleteNotification(id) { deleteNotification(id) {
this.makeRequest(`${this.endpoint('notifications')}/${id}`, this.headers, 'DELETE') this.makeRequest(`${this.endpoint('notifications')}/${id}`, this.headers, 'DELETE')
// //Promise.resolve()
.then(this.fetchData); .then(this.fetchData);
}, },
/* Tooltip generators */ /* Tooltip generators */

View File

@ -58,7 +58,6 @@
<script> <script>
import WidgetMixin from '@/mixins/WidgetMixin'; import WidgetMixin from '@/mixins/WidgetMixin';
import NextcloudMixin from '@/mixins/NextcloudMixin'; import NextcloudMixin from '@/mixins/NextcloudMixin';
// //import { NcdServer } from '@/utils/ncd';
/** /**
* NextcloudStats widget - Shows statistics about Nextcloud usage * NextcloudStats widget - Shows statistics about Nextcloud usage
@ -130,7 +129,6 @@ export default {
fetchData() { fetchData() {
if (!this.hasValidCredentials()) return; if (!this.hasValidCredentials()) return;
this.makeRequest(this.endpoint('serverinfo'), this.headers) this.makeRequest(this.endpoint('serverinfo'), this.headers)
// //Promise.resolve(NcdServer)
.then(this.processServerInfo) .then(this.processServerInfo)
.finally(this.finishLoading); .finally(this.finishLoading);
}, },

View File

@ -46,7 +46,6 @@ import WidgetMixin from '@/mixins/WidgetMixin';
import NextcloudMixin from '@/mixins/NextcloudMixin'; import NextcloudMixin from '@/mixins/NextcloudMixin';
import GaugeChart from '@/components/Charts/Gauge'; import GaugeChart from '@/components/Charts/Gauge';
import ChartingMixin from '@/mixins/ChartingMixin'; import ChartingMixin from '@/mixins/ChartingMixin';
// //import { NcdServer } from '@/utils/ncd';
const NextcloudSystemSchema = { const NextcloudSystemSchema = {
server: { server: {
@ -107,7 +106,6 @@ export default {
async fetchData() { async fetchData() {
if (!this.hasValidCredentials()) return; if (!this.hasValidCredentials()) return;
this.makeRequest(this.endpoint('serverinfo'), this.headers) this.makeRequest(this.endpoint('serverinfo'), this.headers)
// //Promise.resolve(NcdServer)
.then(this.processServerInfo) .then(this.processServerInfo)
.finally(() => this.finishLoading()); .finally(() => this.finishLoading());
}, },

View File

@ -45,7 +45,6 @@ import WidgetMixin from '@/mixins/WidgetMixin';
import NextcloudMixin from '@/mixins/NextcloudMixin'; import NextcloudMixin from '@/mixins/NextcloudMixin';
import PercentageChart from '@/components/Charts/PercentageChart'; import PercentageChart from '@/components/Charts/PercentageChart';
import { convertBytes } from '@/utils/MiscHelpers'; import { convertBytes } from '@/utils/MiscHelpers';
// //import { NcdUsr } from '@/utils/ncd';
/** /**
* NextcloudUser widget - Displays branding and user information * NextcloudUser widget - Displays branding and user information
@ -85,7 +84,6 @@ export default {
}, },
loadUser() { loadUser() {
return this.makeRequest(this.endpoint('user'), this.headers) return this.makeRequest(this.endpoint('user'), this.headers)
// //return Promise.resolve(NcdUsr)
.then(this.processUser); .then(this.processUser);
}, },
processUser(userResponse) { processUser(userResponse) {

View File

@ -38,7 +38,6 @@
<script> <script>
import WidgetMixin from '@/mixins/WidgetMixin'; import WidgetMixin from '@/mixins/WidgetMixin';
import NextcloudMixin from '@/mixins/NextcloudMixin'; import NextcloudMixin from '@/mixins/NextcloudMixin';
// //import { NcdStatusAll, NcdStatusSingle } from '@/utils/ncd';
// Nextcloud User Status API supports getting all user statuses at once // 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. // 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) { if (this.fetchStrategy === fetchStrategies.allAtOnce) {
this.makeRequest(this.endpoint('userstatus'), this.headers) this.makeRequest(this.endpoint('userstatus'), this.headers)
// //Promise.resolve(NcdStatusAll)
.then(this.processStatuses) .then(this.processStatuses)
.finally(this.finishLoading); .finally(this.finishLoading);
} else { } else {
@ -105,7 +103,6 @@ export default {
this.users.forEach((user) => { this.users.forEach((user) => {
promises.push( promises.push(
this.makeRequest(`${this.endpoint('userstatus')}/${user}`, this.headers) this.makeRequest(`${this.endpoint('userstatus')}/${user}`, this.headers)
// //Promise.resolve(NcdStatusSingle)
.then(this.processStatus), .then(this.processStatus),
); );
}); });

View File

@ -2,7 +2,6 @@ import { serviceEndpoints } from '@/utils/defaults';
import { import {
convertBytes, formatNumber, getTimeAgo, timestampToDateTime, convertBytes, formatNumber, getTimeAgo, timestampToDateTime,
} from '@/utils/MiscHelpers'; } from '@/utils/MiscHelpers';
// //import { NcdCap } from '@/utils/ncd';
/** /**
* Reusable mixin for Nextcloud widgets * Reusable mixin for Nextcloud widgets
@ -146,7 +145,6 @@ export default {
loadCapabilities() { loadCapabilities() {
if ((new Date().getTime()) - this.capabilitiesLastUpdated > this.capabilitiesTtl) { if ((new Date().getTime()) - this.capabilitiesLastUpdated > this.capabilitiesTtl) {
return this.makeRequest(this.endpoint('capabilities'), this.headers) return this.makeRequest(this.endpoint('capabilities'), this.headers)
// //return Promise.resolve(NcdCap)
.then(this.processCapabilities); .then(this.processCapabilities);
} }
return Promise.resolve(); return Promise.resolve();