123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: rs
- // (C) Copyright IBM Corp. 2003, 2022.
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- define(['haljs!cchl/_yzf'],function(){'use strict';function _mk3(_b6k, _62b, _ofc, _x7i, _zsg, _379, _a0e, _kwi, _lm1, _9jh){this._dog=_9jh||'v1/smarts/visualization-recommender/recommend';this._vij=_b6k;this._r2n={};this._r2n.sourceModuleId=_62b;this._r2n.columns=_x7i; if(_kwi){this._r2n.chartType=_kwi;}if(typeof _379!=='undefined'){this._r2n.oneChartPerType=!!_379; }if(typeof _a0e!=='undefined'){this._r2n.numResults=_a0e;}this._r2n.allowBindingsWithWarnings=!!_lm1;if(!!_ofc){this._r2n.tempModule=JSON.stringify(_ofc);this._r2n.shapedModule=true;this._r2n.isJoinSafe=true;}if(_zsg){this._r2n.excludedCharts=["Tiledmap"];}this._yfd=null;_mk3.baseConstructor.call(this, this._vij, "POST", this._dog, JSON.stringify(this._r2n));};_olk._vjl(_mk3, _yzf);_mk3.prototype._hrc=function(){var _yal=_mk3.superClass._hrc.call(this);return _yal;};_mk3.prototype._z7b=function(){return JSON.stringify(this._r2n);};_mk3.prototype._kt9=function(){_mk3.superClass._kt9.call(this);var _5um=this._8ik();if(_5um){this._dbj("_xt9");return;}var _53e=this._zq9();if(!_53e){this._b6g(_frh._c6j("IDS_CCHL_BAD_VIZ_RECOMMENDER_RESPONSE"));return;}if(_53e.smartsStatus!=0){var _xgl=_53e.details.slice(0,_53e.details.indexOf('\r'));_xgl=_xgl.lastIndexOf('Exception: ') != -1?_xgl.slice(_xgl.lastIndexOf('Exception: ') + 'Exception: '.length):_xgl;this._b6g(_xgl, _53e.details, _53e.smartsStatus);this._dbj("_xt9");return;}this._yfd=_53e;};_mk3.prototype._f66=function(){return this._yfd?this._yfd.recommendations:[];};_mk3.prototype.STATUS_REST_SERVICE_ERROR=-1; _mk3.prototype.STATUS_OK= 0; _mk3.prototype.STATUS_NO_SMARTS_MODULE_SPECIFIED= 1; _mk3.prototype.STATUS_SMARTS_MODULE_NOT_FOUND= 2; _mk3.prototype.STATUS_SMARTS_MODULE_TIMEOUT= 3; _mk3.prototype.STATUS_JSON_INPUT_ERROR= 4; _mk3.prototype.STATUS_UNKNOWN_CHART_TYPE= 5; _mk3.prototype.STATUS_GEN_RECOMMENDATION_TIMEDOUT= 6; _mk3.prototype.STATUS_MODULE_MUST_BE_SPECIFIED= 7; _mk3.prototype.STATUS_NO_UNBOUND_COLUMNS= 8; _mk3.prototype.STATUS_INVALID_LEARNING_DIRECTIVE= 9; _mk3.prototype.STATUS_INVALID_ACTION_TYPE= 10; _mk3.prototype.STATUS_INVALID_ACTION_PAYLOAD= 11; _mk3.prototype.STATUS_COLUMNS_NOT_JOINED= 12; _mk3.prototype.STATUS_ERROR= 100; _mk3.prototype._9r9=function(){return this._yfd?this._yfd.smartsStatus:this.STATUS_REST_SERVICE_ERROR;};_mk3.prototype._1h8=function(){return this._yfd?this._yfd.details:null;};_mk3.prototype._387=function(){return this._yfd?this._oub.columns.warnings:null;};return _mk3;});
|