Built motion from commit 4c281f94.|2.6.31
[motion2.git] / server / api / dashboard / dashboard.rpc.js
index c263c21..70ba01d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd20e=['localhost','socket.io-emitter','./dashboard.socket','register','request','info','Dashboard,\x20%s,\x20%s','request\x20sent','debug','Dashboard,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults'];(function(_0x3ff851,_0x43191c){var _0x41ed4b=function(_0x1b5793){while(--_0x1b5793){_0x3ff851['push'](_0x3ff851['shift']());}};_0x41ed4b(++_0x43191c);}(_0xd20e,0x198));var _0xed20=function(_0x4f9b18,_0x2cb5ca){_0x4f9b18=_0x4f9b18-0x0;var _0x29f20c=_0xd20e[_0x4f9b18];return _0x29f20c;};'use strict';var _=require(_0xed20('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xed20('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xed20('0x2'));var db=require(_0xed20('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xed20('0x4'))(_0xed20('0x5'));var config=require(_0xed20('0x6'));var jayson=require(_0xed20('0x7'));var client=jayson[_0xed20('0x8')][_0xed20('0x9')]({'port':0x232a});config[_0xed20('0xa')]=_[_0xed20('0xb')](config[_0xed20('0xa')],{'host':_0xed20('0xc'),'port':0x18eb});var socket=require(_0xed20('0xd'))(new Redis(config[_0xed20('0xa')]));require(_0xed20('0xe'))[_0xed20('0xf')](socket);function respondWithRpcPromise(_0x1b9016,_0xea3eb2,_0x152f8b){return new BPromise(function(_0x74e995,_0x374e82){return client[_0xed20('0x10')](_0x1b9016,_0x152f8b)['then'](function(_0x447271){logger[_0xed20('0x11')](_0xed20('0x12'),_0xea3eb2,_0xed20('0x13'));logger[_0xed20('0x14')](_0xed20('0x15'),_0xea3eb2,'request\x20sent',JSON[_0xed20('0x16')](_0x447271));if(_0x447271[_0xed20('0x17')]){if(_0x447271[_0xed20('0x17')][_0xed20('0x18')]===0x1f4){logger[_0xed20('0x17')](_0xed20('0x12'),_0xea3eb2,_0x447271[_0xed20('0x17')][_0xed20('0x19')]);return _0x374e82(_0x447271[_0xed20('0x17')]['message']);}logger['error']('Dashboard,\x20%s,\x20%s',_0xea3eb2,_0x447271['error']['message']);return _0x74e995(_0x447271[_0xed20('0x17')][_0xed20('0x19')]);}else{logger[_0xed20('0x11')](_0xed20('0x12'),_0xea3eb2,_0xed20('0x13'));_0x74e995(_0x447271[_0xed20('0x1a')][_0xed20('0x19')]);}})[_0xed20('0x1b')](function(_0x9143e3){logger[_0xed20('0x17')](_0xed20('0x12'),_0xea3eb2,_0x9143e3);_0x374e82(_0x9143e3);});});}
\ No newline at end of file
+var _0x29fb=['../../config/environment','http','redis','localhost','socket.io-emitter','register','request','then','info','request\x20sent','stringify','error','code','Dashboard,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0xcf15e6,_0x2361a6){var _0x2d95ff=function(_0x6db98e){while(--_0x6db98e){_0xcf15e6['push'](_0xcf15e6['shift']());}};_0x2d95ff(++_0x2361a6);}(_0x29fb,0x1d3));var _0xb29f=function(_0x253037,_0x31c9ce){_0x253037=_0x253037-0x0;var _0xbb23f6=_0x29fb[_0x253037];return _0xbb23f6;};'use strict';var _=require(_0xb29f('0x0'));var util=require(_0xb29f('0x1'));var moment=require(_0xb29f('0x2'));var BPromise=require(_0xb29f('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb29f('0x4'));var db=require(_0xb29f('0x5'))['db'];var utils=require(_0xb29f('0x6'));var logger=require(_0xb29f('0x7'))('rpc');var config=require(_0xb29f('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0xb29f('0x9')]({'port':0x232a});config[_0xb29f('0xa')]=_['defaults'](config[_0xb29f('0xa')],{'host':_0xb29f('0xb'),'port':0x18eb});var socket=require(_0xb29f('0xc'))(new Redis(config[_0xb29f('0xa')]));require('./dashboard.socket')[_0xb29f('0xd')](socket);function respondWithRpcPromise(_0x199fd8,_0x49e908,_0x359e72){return new BPromise(function(_0x24932a,_0xbb2588){return client[_0xb29f('0xe')](_0x199fd8,_0x359e72)[_0xb29f('0xf')](function(_0x418b06){logger[_0xb29f('0x10')]('Dashboard,\x20%s,\x20%s',_0x49e908,_0xb29f('0x11'));logger['debug']('Dashboard,\x20%s,\x20%s,\x20%s',_0x49e908,'request\x20sent',JSON[_0xb29f('0x12')](_0x418b06));if(_0x418b06[_0xb29f('0x13')]){if(_0x418b06['error'][_0xb29f('0x14')]===0x1f4){logger[_0xb29f('0x13')](_0xb29f('0x15'),_0x49e908,_0x418b06[_0xb29f('0x13')]['message']);return _0xbb2588(_0x418b06[_0xb29f('0x13')][_0xb29f('0x16')]);}logger[_0xb29f('0x13')]('Dashboard,\x20%s,\x20%s',_0x49e908,_0x418b06['error'][_0xb29f('0x16')]);return _0x24932a(_0x418b06[_0xb29f('0x13')][_0xb29f('0x16')]);}else{logger[_0xb29f('0x10')](_0xb29f('0x15'),_0x49e908,_0xb29f('0x11'));_0x24932a(_0x418b06[_0xb29f('0x17')]['message']);}})[_0xb29f('0x18')](function(_0x1cf37b){logger['error'](_0xb29f('0x15'),_0x49e908,_0x1cf37b);_0xbb2588(_0x1cf37b);});});}
\ No newline at end of file