Built motion from commit 9d0783e6.|2.6.13
[motion2.git] / server / api / dashboard / dashboard.rpc.js
index 3a63501..0528f36 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1b6a=['redis','defaults','localhost','register','info','Dashboard,\x20%s,\x20%s','request\x20sent','debug','error','message','result','catch','lodash','util','moment','bluebird','../../config/logger','../../config/environment','jayson/promise','client','http'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x1b6a,0x186));var _0xa1b6=function(_0x3cfb23,_0x48307d){_0x3cfb23=_0x3cfb23-0x0;var _0x415b60=_0x1b6a[_0x3cfb23];return _0x415b60;};'use strict';var _=require(_0xa1b6('0x0'));var util=require(_0xa1b6('0x1'));var moment=require(_0xa1b6('0x2'));var BPromise=require(_0xa1b6('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xa1b6('0x4'))('rpc');var config=require(_0xa1b6('0x5'));var jayson=require(_0xa1b6('0x6'));var client=jayson[_0xa1b6('0x7')][_0xa1b6('0x8')]({'port':0x232a});config[_0xa1b6('0x9')]=_[_0xa1b6('0xa')](config['redis'],{'host':_0xa1b6('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./dashboard.socket')[_0xa1b6('0xc')](socket);function respondWithRpcPromise(_0x1a13ec,_0xbc7b59,_0x1a18fb){return new BPromise(function(_0x58c8d5,_0x2aecef){return client['request'](_0x1a13ec,_0x1a18fb)['then'](function(_0x55e81e){logger[_0xa1b6('0xd')](_0xa1b6('0xe'),_0xbc7b59,_0xa1b6('0xf'));logger[_0xa1b6('0x10')]('Dashboard,\x20%s,\x20%s,\x20%s',_0xbc7b59,_0xa1b6('0xf'),JSON['stringify'](_0x55e81e));if(_0x55e81e[_0xa1b6('0x11')]){if(_0x55e81e[_0xa1b6('0x11')]['code']===0x1f4){logger['error'](_0xa1b6('0xe'),_0xbc7b59,_0x55e81e[_0xa1b6('0x11')][_0xa1b6('0x12')]);return _0x2aecef(_0x55e81e[_0xa1b6('0x11')][_0xa1b6('0x12')]);}logger['error'](_0xa1b6('0xe'),_0xbc7b59,_0x55e81e['error'][_0xa1b6('0x12')]);return _0x58c8d5(_0x55e81e[_0xa1b6('0x11')][_0xa1b6('0x12')]);}else{logger[_0xa1b6('0xd')](_0xa1b6('0xe'),_0xbc7b59,_0xa1b6('0xf'));_0x58c8d5(_0x55e81e[_0xa1b6('0x13')]['message']);}})[_0xa1b6('0x14')](function(_0x51bf80){logger['error'](_0xa1b6('0xe'),_0xbc7b59,_0x51bf80);_0x2aecef(_0x51bf80);});});}
\ No newline at end of file
+var _0x38fb=['register','request','then','info','Dashboard,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./dashboard.socket'];(function(_0x14ad69,_0xf76368){var _0x218722=function(_0x210f59){while(--_0x210f59){_0x14ad69['push'](_0x14ad69['shift']());}};_0x218722(++_0xf76368);}(_0x38fb,0x1b0));var _0xb38f=function(_0x556927,_0x34b53f){_0x556927=_0x556927-0x0;var _0x5f1235=_0x38fb[_0x556927];return _0x5f1235;};'use strict';var _=require(_0xb38f('0x0'));var util=require(_0xb38f('0x1'));var moment=require(_0xb38f('0x2'));var BPromise=require(_0xb38f('0x3'));var rs=require(_0xb38f('0x4'));var fs=require('fs');var Redis=require(_0xb38f('0x5'));var db=require(_0xb38f('0x6'))['db'];var utils=require(_0xb38f('0x7'));var logger=require(_0xb38f('0x8'))(_0xb38f('0x9'));var config=require(_0xb38f('0xa'));var jayson=require(_0xb38f('0xb'));var client=jayson[_0xb38f('0xc')][_0xb38f('0xd')]({'port':0x232a});config[_0xb38f('0xe')]=_[_0xb38f('0xf')](config[_0xb38f('0xe')],{'host':_0xb38f('0x10'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xb38f('0xe')]));require(_0xb38f('0x11'))[_0xb38f('0x12')](socket);function respondWithRpcPromise(_0x5e037a,_0x3a5441,_0x1252b6){return new BPromise(function(_0xc17932,_0x331549){return client[_0xb38f('0x13')](_0x5e037a,_0x1252b6)[_0xb38f('0x14')](function(_0x3eb027){logger[_0xb38f('0x15')](_0xb38f('0x16'),_0x3a5441,_0xb38f('0x17'));logger[_0xb38f('0x18')]('Dashboard,\x20%s,\x20%s,\x20%s',_0x3a5441,'request\x20sent',JSON['stringify'](_0x3eb027));if(_0x3eb027['error']){if(_0x3eb027[_0xb38f('0x19')][_0xb38f('0x1a')]===0x1f4){logger[_0xb38f('0x19')](_0xb38f('0x16'),_0x3a5441,_0x3eb027[_0xb38f('0x19')][_0xb38f('0x1b')]);return _0x331549(_0x3eb027[_0xb38f('0x19')][_0xb38f('0x1b')]);}logger['error']('Dashboard,\x20%s,\x20%s',_0x3a5441,_0x3eb027[_0xb38f('0x19')]['message']);return _0xc17932(_0x3eb027[_0xb38f('0x19')][_0xb38f('0x1b')]);}else{logger[_0xb38f('0x15')](_0xb38f('0x16'),_0x3a5441,_0xb38f('0x17'));_0xc17932(_0x3eb027[_0xb38f('0x1c')][_0xb38f('0x1b')]);}})[_0xb38f('0x1d')](function(_0x57c380){logger[_0xb38f('0x19')](_0xb38f('0x16'),_0x3a5441,_0x57c380);_0x331549(_0x57c380);});});}
\ No newline at end of file