_c61.js 2.7 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: irot
  3. // (C) Copyright IBM Corp. 2003, 2022.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. define(['haljs!cchl/_zt5'],function(){'use strict';function _c61(_vl7, _sw3, _of4, _fs6, _x66, _n83, _q15, _z17, _wh, _wg6){this._y46=_wg6||'v1/smarts/visualization-recommender/recommend';this._0d7=_vl7;this._v09={};this._v09.sourceModuleId=_sw3;this._v09.columns=_fs6; if(_z17){this._v09.chartType=_z17;}if(typeof _n83!=='undefined'){this._v09.oneChartPerType=!!_n83; }if(typeof _q15!=='undefined'){this._v09.numResults=_q15;}this._v09.allowBindingsWithWarnings=!!_wh;if(!!_of4){this._v09.tempModule=JSON.stringify(_of4);this._v09.shapedModule=true;this._v09.isJoinSafe=true;}if(_x66){this._v09.excludedCharts=["Tiledmap"];}this._zu4=null;_c61.baseConstructor.call(this, this._0d7, "POST", this._y46, JSON.stringify(this._v09));};_9t7._v88(_c61, _zt5);_c61.prototype._ok4=function(){var _e48=_c61.superClass._ok4.call(this);return _e48;};_c61.prototype._sz3=function(){return JSON.stringify(this._v09);};_c61.prototype._3g3=function(){_c61.superClass._3g3.call(this);var _sw8=this._cr7();if(_sw8){this._b97("_7g3");return;}var _535=this._0f3();if(!_535){this._vw5(_4l6._m67("IDS_CCHL_BAD_VIZ_RECOMMENDER_RESPONSE"));return;}if(_535.smartsStatus!=0){var _f78=_535.details.slice(0,_535.details.indexOf('\r'));_f78=_f78.lastIndexOf('Exception: ') != -1?_f78.slice(_f78.lastIndexOf('Exception: ') + 'Exception: '.length):_f78;this._vw5(_f78, _535.details, _535.smartsStatus);this._b97("_7g3");return;}this._zu4=_535;};_c61.prototype._232=function(){return this._zu4?this._zu4.recommendations:[];};_c61.prototype.STATUS_REST_SERVICE_ERROR=-1; _c61.prototype.STATUS_OK= 0; _c61.prototype.STATUS_NO_SMARTS_MODULE_SPECIFIED= 1; _c61.prototype.STATUS_SMARTS_MODULE_NOT_FOUND= 2; _c61.prototype.STATUS_SMARTS_MODULE_TIMEOUT= 3; _c61.prototype.STATUS_JSON_INPUT_ERROR= 4; _c61.prototype.STATUS_UNKNOWN_CHART_TYPE= 5; _c61.prototype.STATUS_GEN_RECOMMENDATION_TIMEDOUT= 6; _c61.prototype.STATUS_MODULE_MUST_BE_SPECIFIED= 7; _c61.prototype.STATUS_NO_UNBOUND_COLUMNS= 8; _c61.prototype.STATUS_INVALID_LEARNING_DIRECTIVE= 9; _c61.prototype.STATUS_INVALID_ACTION_TYPE= 10; _c61.prototype.STATUS_INVALID_ACTION_PAYLOAD= 11; _c61.prototype.STATUS_COLUMNS_NOT_JOINED= 12; _c61.prototype.STATUS_ERROR= 100; _c61.prototype._6f3=function(){return this._zu4?this._zu4.smartsStatus:this.STATUS_REST_SERVICE_ERROR;};_c61.prototype._9x2=function(){return this._zu4?this._zu4.details:null;};_c61.prototype._6h2=function(){return this._zu4?this._j84.columns.warnings:null;};return _c61;});