DataSourcesModel.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. 'use strict';
  2. /*
  3. *+------------------------------------------------------------------------+
  4. *| Licensed Materials - Property of IBM
  5. *| IBM Cognos Products: Dashboard
  6. *| (C) Copyright IBM Corp. 2017
  7. *|
  8. *| US Government Users Restricted Rights - Use, duplication or disclosure
  9. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  10. *+------------------------------------------------------------------------+
  11. */
  12. define(['../../lib/@waca/dashboard-common/dist/core/Model', './sources/SourcesCollection', 'underscore'], function (Model, SourcesCollection, _) {
  13. 'use strict';
  14. var SourcesModelVersion = '1.0';
  15. var DataSourceModel = Model.extend({
  16. nestedCollections: {
  17. sources: SourcesCollection
  18. },
  19. whitelistAttrs: ['version', 'sources'],
  20. init: function init(model) {
  21. if (model) {
  22. _.defaults(model, {
  23. sources: [],
  24. version: SourcesModelVersion
  25. });
  26. }
  27. DataSourceModel.inherited('init', this, arguments);
  28. }
  29. });
  30. return DataSourceModel;
  31. });
  32. //# sourceMappingURL=DataSourcesModel.js.map