aboutsummaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/js-src/components/root.vue
diff options
context:
space:
mode:
Diffstat (limited to 'apps/updatenotification/js-src/components/root.vue')
-rw-r--r--apps/updatenotification/js-src/components/root.vue37
1 files changed, 26 insertions, 11 deletions
diff --git a/apps/updatenotification/js-src/components/root.vue b/apps/updatenotification/js-src/components/root.vue
index a52e1b12bd4..7902d80c951 100644
--- a/apps/updatenotification/js-src/components/root.vue
+++ b/apps/updatenotification/js-src/components/root.vue
@@ -79,11 +79,13 @@
</template>
<script>
- export default {
- name: "root",
-
- el: '#updatenotification',
+ import vSelect from 'vue-select';
+ export default {
+ name: 'root',
+ components: {
+ vSelect,
+ },
data: function () {
return {
newVersionString: '',
@@ -261,7 +263,23 @@
this.hideAvailableUpdates = !this.hideAvailableUpdates;
}
},
-
+ beforeMount: function() {
+ // Parse server data
+ var data = JSON.parse($('#updatenotification').attr('data-json'));
+
+ this.newVersionString = data.newVersionString;
+ this.lastCheckedDate = data.lastChecked;
+ this.isUpdateChecked = data.isUpdateChecked;
+ this.updaterEnabled = data.updaterEnabled;
+ this.downloadLink = data.downloadLink;
+ this.isNewVersionAvailable = data.isNewVersionAvailable;
+ this.updateServerURL = data.updateServerURL;
+ this.currentChannel = data.currentChannel;
+ this.channels = data.channels;
+ this.notifyGroups = data.notifyGroups;
+ this.isDefaultUpdateServerURL = data.isDefaultUpdateServerURL;
+ this.versionIsEol = data.versionIsEol;
+ },
mounted: function () {
this._$el = $(this.$el);
this._$releaseChannel = this._$el.find('#release-channel');
@@ -271,15 +289,12 @@
}.bind(this));
$.ajax({
- url: OC.generateUrl('/settings/users/groups'),
+ url: OC.linkToOCS('cloud', 2)+ '/groups',
dataType: 'json',
success: function(data) {
var results = [];
- $.each(data.data.adminGroups, function(i, group) {
- results.push({value: group.id, label: group.name});
- });
- $.each(data.data.groups, function(i, group) {
- results.push({value: group.id, label: group.name});
+ $.each(data.ocs.data.groups, function(i, group) {
+ results.push({value: group, label: group});
});
this.availableGroups = results;