Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / dashboard / dashboard.rpc.js
index 75998bd..c46741c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf8ca=['../../config/utils','rpc','jayson/promise','client','redis','defaults','localhost','register','request','then','info','Dashboard,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','randomstring','../../mysqldb'];(function(_0x1adf76,_0x828c70){var _0x3ca9ec=function(_0x1aeb0e){while(--_0x1aeb0e){_0x1adf76['push'](_0x1adf76['shift']());}};_0x3ca9ec(++_0x828c70);}(_0xf8ca,0x173));var _0xaf8c=function(_0x20589d,_0x55d5bf){_0x20589d=_0x20589d-0x0;var _0x422de9=_0xf8ca[_0x20589d];return _0x422de9;};'use strict';var _=require(_0xaf8c('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xaf8c('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xaf8c('0x2'))['db'];var utils=require(_0xaf8c('0x3'));var logger=require('../../config/logger')(_0xaf8c('0x4'));var config=require('../../config/environment');var jayson=require(_0xaf8c('0x5'));var client=jayson[_0xaf8c('0x6')]['http']({'port':0x232a});config[_0xaf8c('0x7')]=_[_0xaf8c('0x8')](config[_0xaf8c('0x7')],{'host':_0xaf8c('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xaf8c('0x7')]));require('./dashboard.socket')[_0xaf8c('0xa')](socket);function respondWithRpcPromise(_0x45f5b4,_0x57dbae,_0x40ff8a){return new BPromise(function(_0x3d8a57,_0x3cdf07){return client[_0xaf8c('0xb')](_0x45f5b4,_0x40ff8a)[_0xaf8c('0xc')](function(_0x43849b){logger[_0xaf8c('0xd')](_0xaf8c('0xe'),_0x57dbae,_0xaf8c('0xf'));logger[_0xaf8c('0x10')]('Dashboard,\x20%s,\x20%s,\x20%s',_0x57dbae,_0xaf8c('0xf'),JSON[_0xaf8c('0x11')](_0x43849b));if(_0x43849b[_0xaf8c('0x12')]){if(_0x43849b['error']['code']===0x1f4){logger['error']('Dashboard,\x20%s,\x20%s',_0x57dbae,_0x43849b[_0xaf8c('0x12')][_0xaf8c('0x13')]);return _0x3cdf07(_0x43849b[_0xaf8c('0x12')]['message']);}logger[_0xaf8c('0x12')](_0xaf8c('0xe'),_0x57dbae,_0x43849b['error']['message']);return _0x3d8a57(_0x43849b[_0xaf8c('0x12')]['message']);}else{logger[_0xaf8c('0xd')](_0xaf8c('0xe'),_0x57dbae,_0xaf8c('0xf'));_0x3d8a57(_0x43849b[_0xaf8c('0x14')][_0xaf8c('0x13')]);}})[_0xaf8c('0x15')](function(_0x38503f){logger[_0xaf8c('0x12')](_0xaf8c('0xe'),_0x57dbae,_0x38503f);_0x3cdf07(_0x38503f);});});}
\ No newline at end of file
+var _0xe5b1=['info','catch','lodash','util','moment','bluebird','ioredis','../../config/logger','rpc','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./dashboard.socket','request','then','request\x20sent','debug','Dashboard,\x20%s,\x20%s,\x20%s','error','code','message','Dashboard,\x20%s,\x20%s'];(function(_0x372fe0,_0x17716b){var _0x4eebd2=function(_0xee7acb){while(--_0xee7acb){_0x372fe0['push'](_0x372fe0['shift']());}};_0x4eebd2(++_0x17716b);}(_0xe5b1,0x1ab));var _0x1e5b=function(_0x36d203,_0x3653f3){_0x36d203=_0x36d203-0x0;var _0x2f9e62=_0xe5b1[_0x36d203];return _0x2f9e62;};'use strict';var _=require(_0x1e5b('0x0'));var util=require(_0x1e5b('0x1'));var moment=require(_0x1e5b('0x2'));var BPromise=require(_0x1e5b('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1e5b('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x1e5b('0x5'))(_0x1e5b('0x6'));var config=require('../../config/environment');var jayson=require(_0x1e5b('0x7'));var client=jayson[_0x1e5b('0x8')]['http']({'port':0x232a});config[_0x1e5b('0x9')]=_[_0x1e5b('0xa')](config[_0x1e5b('0x9')],{'host':_0x1e5b('0xb'),'port':0x18eb});var socket=require(_0x1e5b('0xc'))(new Redis(config[_0x1e5b('0x9')]));require(_0x1e5b('0xd'))['register'](socket);function respondWithRpcPromise(_0x22dddd,_0x38e414,_0x34efe1){return new BPromise(function(_0x5cbc53,_0x1873b5){return client[_0x1e5b('0xe')](_0x22dddd,_0x34efe1)[_0x1e5b('0xf')](function(_0x1df7e0){logger['info']('Dashboard,\x20%s,\x20%s',_0x38e414,_0x1e5b('0x10'));logger[_0x1e5b('0x11')](_0x1e5b('0x12'),_0x38e414,_0x1e5b('0x10'),JSON['stringify'](_0x1df7e0));if(_0x1df7e0[_0x1e5b('0x13')]){if(_0x1df7e0[_0x1e5b('0x13')][_0x1e5b('0x14')]===0x1f4){logger[_0x1e5b('0x13')]('Dashboard,\x20%s,\x20%s',_0x38e414,_0x1df7e0[_0x1e5b('0x13')][_0x1e5b('0x15')]);return _0x1873b5(_0x1df7e0[_0x1e5b('0x13')][_0x1e5b('0x15')]);}logger[_0x1e5b('0x13')](_0x1e5b('0x16'),_0x38e414,_0x1df7e0[_0x1e5b('0x13')][_0x1e5b('0x15')]);return _0x5cbc53(_0x1df7e0[_0x1e5b('0x13')][_0x1e5b('0x15')]);}else{logger[_0x1e5b('0x17')](_0x1e5b('0x16'),_0x38e414,_0x1e5b('0x10'));_0x5cbc53(_0x1df7e0['result']['message']);}})[_0x1e5b('0x18')](function(_0x8d4581){logger[_0x1e5b('0x13')](_0x1e5b('0x16'),_0x38e414,_0x8d4581);_0x1873b5(_0x8d4581);});});}
\ No newline at end of file