Built motion from commit 9d0783e6.|2.6.13
[motion2.git] / server / api / dashboard / dashboard.rpc.js
index 68ae496..0528f36 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x80b9=['http','redis','defaults','localhost','socket.io-emitter','./dashboard.socket','register','info','Dashboard,\x20%s,\x20%s','request\x20sent','Dashboard,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x2bda14,_0x4fab1b){var _0xb5dd49=function(_0x1da71e){while(--_0x1da71e){_0x2bda14['push'](_0x2bda14['shift']());}};_0xb5dd49(++_0x4fab1b);}(_0x80b9,0x123));var _0x980b=function(_0x6d21a2,_0x27e591){_0x6d21a2=_0x6d21a2-0x0;var _0x32d1b0=_0x80b9[_0x6d21a2];return _0x32d1b0;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x980b('0x0'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x980b('0x1'));var db=require(_0x980b('0x2'))['db'];var utils=require(_0x980b('0x3'));var logger=require(_0x980b('0x4'))(_0x980b('0x5'));var config=require(_0x980b('0x6'));var jayson=require(_0x980b('0x7'));var client=jayson[_0x980b('0x8')][_0x980b('0x9')]({'port':0x232a});config[_0x980b('0xa')]=_[_0x980b('0xb')](config[_0x980b('0xa')],{'host':_0x980b('0xc'),'port':0x18eb});var socket=require(_0x980b('0xd'))(new Redis(config[_0x980b('0xa')]));require(_0x980b('0xe'))[_0x980b('0xf')](socket);function respondWithRpcPromise(_0x456a4e,_0x525331,_0x1e403e){return new BPromise(function(_0x31c497,_0x4931f5){return client['request'](_0x456a4e,_0x1e403e)['then'](function(_0x2e11b8){logger[_0x980b('0x10')](_0x980b('0x11'),_0x525331,_0x980b('0x12'));logger['debug'](_0x980b('0x13'),_0x525331,_0x980b('0x12'),JSON[_0x980b('0x14')](_0x2e11b8));if(_0x2e11b8['error']){if(_0x2e11b8[_0x980b('0x15')]['code']===0x1f4){logger['error'](_0x980b('0x11'),_0x525331,_0x2e11b8['error'][_0x980b('0x16')]);return _0x4931f5(_0x2e11b8[_0x980b('0x15')][_0x980b('0x16')]);}logger[_0x980b('0x15')](_0x980b('0x11'),_0x525331,_0x2e11b8[_0x980b('0x15')][_0x980b('0x16')]);return _0x31c497(_0x2e11b8[_0x980b('0x15')][_0x980b('0x16')]);}else{logger['info']('Dashboard,\x20%s,\x20%s',_0x525331,'request\x20sent');_0x31c497(_0x2e11b8[_0x980b('0x17')]['message']);}})[_0x980b('0x18')](function(_0x370d2a){logger[_0x980b('0x15')](_0x980b('0x11'),_0x525331,_0x370d2a);_0x4931f5(_0x370d2a);});});}
\ 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