define([
  'extensions/controllers/module',
  'common/views/visualisations/user-satisfaction',
  'common/collections/list'
],
function (ModuleController, UserSatisfactionView, ListCollection) {
  var UserSatisfactionModule = ModuleController.extend({
    className: function () {
      var classes = this.model.get('classes');

      return ['user_satisfaction'].concat(classes || []).join(' ');
    },
    visualisationClass: UserSatisfactionView,
    collectionClass: ListCollection,
    clientRenderOnInit: true,
    collectionOptions: function () {
      return {
        id: 'user_satisfaction',
        title: 'User satisfaction',
        sortBy: '_timestamp:descending',
        valueAttr: this.model.get("value-attribute")
      };
    }
  });

  return UserSatisfactionModule;
});

define([
  'extensions/controllers/module',
  'common/views/visualisations/user-satisfaction',
  'common/collections/list'
],
function (ModuleController, UserSatisfactionView, ListCollection) {
  var UserSatisfactionModule = ModuleController.extend({
    className: function () {
      var classes = this.model.get('classes');

      return ['user_satisfaction'].concat(classes || []).join(' ');
    },
    visualisationClass: UserSatisfactionView,
    collectionClass: ListCollection,
    clientRenderOnInit: true,
    collectionOptions: function () {
      return {
        id: 'user_satisfaction',
        title: 'User satisfaction',
        sortBy: '_timestamp:ascending',
        limit: 0,
        valueAttr: this.model.get("value-attribute")
      };
    }
  });

  return UserSatisfactionModule;
});

Use correct Backdrop options for user satisfaction.
Use correct Backdrop options for user satisfaction.

Sort by "_timestamp: ascending" and provide a limit of 0. This gives
us all available data, and works against live Backdrop data on preview.

It would be better to sort by "_timestamp:descending" and use a limit
of 2, since at the moment we only require 2 data points. However, this
would require us to refactor delta.js to cope with data in a different
order, and we may soon add a sparkline for this view that uses all
available data in any case. So I think this is an acceptable fix.
