Built motion from commit (unavailable).|2.4.16
[motion2.git] / server / api / dashboard / dashboard.rpc.js
index 90885d8..1ae0d24 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xac91=['error','code','Dashboard,\x20%s,\x20%s','message','result','util','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','redis','localhost','socket.io-emitter','./dashboard.socket','then','request\x20sent','debug','Dashboard,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x5260d8,_0x2a5ddd){var _0x3a321f=function(_0x13706c){while(--_0x13706c){_0x5260d8['push'](_0x5260d8['shift']());}};_0x3a321f(++_0x2a5ddd);}(_0xac91,0x14f));var _0x1ac9=function(_0xc55d64,_0x133f2d){_0xc55d64=_0xc55d64-0x0;var _0x4194f6=_0xac91[_0xc55d64];return _0x4194f6;};'use strict';var _=require('lodash');var util=require(_0x1ac9('0x0'));var moment=require('moment');var BPromise=require(_0x1ac9('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1ac9('0x2'));var db=require(_0x1ac9('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x1ac9('0x4'))(_0x1ac9('0x5'));var config=require(_0x1ac9('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x1ac9('0x7')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x1ac9('0x8')],{'host':_0x1ac9('0x9'),'port':0x18eb});var socket=require(_0x1ac9('0xa'))(new Redis(config[_0x1ac9('0x8')]));require(_0x1ac9('0xb'))['register'](socket);function respondWithRpcPromise(_0x5a2cca,_0x56823d,_0x109447){return new BPromise(function(_0x7dfbe0,_0x1980f5){return client['request'](_0x5a2cca,_0x109447)[_0x1ac9('0xc')](function(_0x2672ac){logger['info']('Dashboard,\x20%s,\x20%s',_0x56823d,_0x1ac9('0xd'));logger[_0x1ac9('0xe')](_0x1ac9('0xf'),_0x56823d,'request\x20sent',JSON[_0x1ac9('0x10')](_0x2672ac));if(_0x2672ac['error']){if(_0x2672ac[_0x1ac9('0x11')][_0x1ac9('0x12')]===0x1f4){logger[_0x1ac9('0x11')](_0x1ac9('0x13'),_0x56823d,_0x2672ac[_0x1ac9('0x11')][_0x1ac9('0x14')]);return _0x1980f5(_0x2672ac['error']['message']);}logger[_0x1ac9('0x11')](_0x1ac9('0x13'),_0x56823d,_0x2672ac[_0x1ac9('0x11')][_0x1ac9('0x14')]);return _0x7dfbe0(_0x2672ac['error'][_0x1ac9('0x14')]);}else{logger['info'](_0x1ac9('0x13'),_0x56823d,_0x1ac9('0xd'));_0x7dfbe0(_0x2672ac[_0x1ac9('0x15')][_0x1ac9('0x14')]);}})['catch'](function(_0x1b9993){logger['error'](_0x1ac9('0x13'),_0x56823d,_0x1b9993);_0x1980f5(_0x1b9993);});});}
\ No newline at end of file
+var _0x9f89=['catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./dashboard.socket','request','then','info','Dashboard,\x20%s,\x20%s','request\x20sent','debug','Dashboard,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x133336,_0x4999bb){var _0x83557f=function(_0x33489f){while(--_0x33489f){_0x133336['push'](_0x133336['shift']());}};_0x83557f(++_0x4999bb);}(_0x9f89,0x189));var _0x99f8=function(_0x992946,_0xea5777){_0x992946=_0x992946-0x0;var _0x48e611=_0x9f89[_0x992946];return _0x48e611;};'use strict';var _=require(_0x99f8('0x0'));var util=require(_0x99f8('0x1'));var moment=require('moment');var BPromise=require(_0x99f8('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x99f8('0x3'));var db=require(_0x99f8('0x4'))['db'];var utils=require(_0x99f8('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x99f8('0x6'));var jayson=require(_0x99f8('0x7'));var client=jayson[_0x99f8('0x8')][_0x99f8('0x9')]({'port':0x232a});config[_0x99f8('0xa')]=_[_0x99f8('0xb')](config[_0x99f8('0xa')],{'host':_0x99f8('0xc'),'port':0x18eb});var socket=require(_0x99f8('0xd'))(new Redis(config[_0x99f8('0xa')]));require(_0x99f8('0xe'))['register'](socket);function respondWithRpcPromise(_0xf19263,_0x17f62e,_0x480dcf){return new BPromise(function(_0xf2e794,_0x33f9e2){return client[_0x99f8('0xf')](_0xf19263,_0x480dcf)[_0x99f8('0x10')](function(_0x139812){logger[_0x99f8('0x11')](_0x99f8('0x12'),_0x17f62e,_0x99f8('0x13'));logger[_0x99f8('0x14')](_0x99f8('0x15'),_0x17f62e,'request\x20sent',JSON[_0x99f8('0x16')](_0x139812));if(_0x139812[_0x99f8('0x17')]){if(_0x139812[_0x99f8('0x17')][_0x99f8('0x18')]===0x1f4){logger['error']('Dashboard,\x20%s,\x20%s',_0x17f62e,_0x139812[_0x99f8('0x17')][_0x99f8('0x19')]);return _0x33f9e2(_0x139812['error']['message']);}logger[_0x99f8('0x17')](_0x99f8('0x12'),_0x17f62e,_0x139812['error'][_0x99f8('0x19')]);return _0xf2e794(_0x139812[_0x99f8('0x17')][_0x99f8('0x19')]);}else{logger[_0x99f8('0x11')]('Dashboard,\x20%s,\x20%s',_0x17f62e,_0x99f8('0x13'));_0xf2e794(_0x139812[_0x99f8('0x1a')][_0x99f8('0x19')]);}})[_0x99f8('0x1b')](function(_0x490382){logger[_0x99f8('0x17')](_0x99f8('0x12'),_0x17f62e,_0x490382);_0x33f9e2(_0x490382);});});}
\ No newline at end of file