12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- 'use strict';
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /*
- *+------------------------------------------------------------------------+
- *| Licensed Materials - Property of IBM
- *| IBM Cognos Products: Dashboard
- *| (C) Copyright IBM Corp. 2018
- *|
- *| US Government Users Restricted Rights - Use, duplication or disclosure
- *| restricted by GSA ADP Schedule Contract with IBM Corp.
- *+------------------------------------------------------------------------+
- */
- define(['../../widgets/livewidget/nls/StringResources'], function (StringResources) {
- 'use strict';
- var SmartsRecommenderError = function (_Error) {
- _inherits(SmartsRecommenderError, _Error);
- _createClass(SmartsRecommenderError, null, [{
- key: 'STATUS',
- // Smarts Recommender status codes
- get: function get() {
- return {
- OK: 0,
- NO_SMARTS_MODULE_SPECIFIED: 1,
- SMARTS_MODULE_NOT_FOUND: 2,
- SMARTS_MODULE_TIMEOUT: 3,
- JSON_ERROR_IN_INPUT: 4,
- UNKNOWN_CHART_TYPE: 5,
- MISSING_REQUIRED_PARAMETERS: 6,
- UNKNOWN_CHART_SPECIFIED: 7,
- NO_UNBOUND_COLUMNS: 8,
- INVALID_LEARNING_DIRECTIVE: 9,
- INVALID_ACTION_TYPE: 10,
- INVALID_ACTION_PAYLOAD: 11,
- COLUMNS_NOT_FROM_SAME_OR_JOINED_DATASET: 12,
- MISSING_ACTION: 13,
- SMARTS_MODULE_NOT_READY: 14,
- NO_COLUMNS: 15,
- INVALID_BINDING: 16,
- ERROR: 100
- };
- }
- /**
- * Static property to load SmartsRecommenderError common message
- */
- }, {
- key: 'msg',
- get: function get() {
- // ensure the common message is loaded only once
- if (!SmartsRecommenderError._message) {
- SmartsRecommenderError._message = StringResources.get('recommendRequestFailed');
- }
- return SmartsRecommenderError._message;
- }
- }]);
- function SmartsRecommenderError(status, details) {
- _classCallCheck(this, SmartsRecommenderError);
- var _this = _possibleConstructorReturn(this, _Error.call(this, SmartsRecommenderError.msg));
- _this.status = status;
- _this.details = details;
- return _this;
- }
- return SmartsRecommenderError;
- }(Error);
- // common message appied to all SmartsRecommenderError instances
- SmartsRecommenderError._message = null;
- return SmartsRecommenderError;
- });
- //# sourceMappingURL=SmartsRecommenderError.js.map
|