123456789101112131415161718192021222324252627282930 |
- "use strict";
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: admin
- * Copyright IBM Corp. 2017
- * US Government Users Restricted Rights - Use,
- * duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['underscore', 'bi/commons/ui/core/Class'], function (_, Class) {
- var SystemSettingService = Class.extend({
- init: function init(options) {
- SystemSettingService.inherited('init', this, arguments);
- _.extend(this, options);
- },
- getSystemSettings: function getSystemSettings(setting) {
- var ajaxService = this.glassContext.services.ajax;
- return setting.values.map(function (value) {
- var url = 'v1/configuration/keys/' + setting.name + '.' + value;
- var promise = ajaxService.ajax({
- 'type': 'GET',
- 'url': url
- });
- return promise;
- }.bind(this));
- }
- });
- return SystemSettingService;
- });
|