Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / dashboard / dashboard.rpc.js
index c290078..36a36fd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x622f=['redis','localhost','socket.io-emitter','./dashboard.socket','register','request','then','info','Dashboard,\x20%s,\x20%s','request\x20sent','debug','Dashboard,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x1a21ff,_0x4a7550){var _0x25afc1=function(_0x4a66ec){while(--_0x4a66ec){_0x1a21ff['push'](_0x1a21ff['shift']());}};_0x25afc1(++_0x4a7550);}(_0x622f,0xe9));var _0xf622=function(_0x5db810,_0x140222){_0x5db810=_0x5db810-0x0;var _0x14a975=_0x622f[_0x5db810];return _0x14a975;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xf622('0x0'));var BPromise=require(_0xf622('0x1'));var rs=require(_0xf622('0x2'));var fs=require('fs');var Redis=require(_0xf622('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xf622('0x4'))(_0xf622('0x5'));var config=require(_0xf622('0x6'));var jayson=require(_0xf622('0x7'));var client=jayson[_0xf622('0x8')][_0xf622('0x9')]({'port':0x232a});config[_0xf622('0xa')]=_['defaults'](config['redis'],{'host':_0xf622('0xb'),'port':0x18eb});var socket=require(_0xf622('0xc'))(new Redis(config[_0xf622('0xa')]));require(_0xf622('0xd'))[_0xf622('0xe')](socket);function respondWithRpcPromise(_0x286aef,_0x2ee4ff,_0x1ede4a){return new BPromise(function(_0x3cee86,_0x111f8a){return client[_0xf622('0xf')](_0x286aef,_0x1ede4a)[_0xf622('0x10')](function(_0x2feaab){logger[_0xf622('0x11')](_0xf622('0x12'),_0x2ee4ff,_0xf622('0x13'));logger[_0xf622('0x14')](_0xf622('0x15'),_0x2ee4ff,_0xf622('0x13'),JSON[_0xf622('0x16')](_0x2feaab));if(_0x2feaab['error']){if(_0x2feaab['error'][_0xf622('0x17')]===0x1f4){logger[_0xf622('0x18')](_0xf622('0x12'),_0x2ee4ff,_0x2feaab[_0xf622('0x18')][_0xf622('0x19')]);return _0x111f8a(_0x2feaab[_0xf622('0x18')]['message']);}logger[_0xf622('0x18')](_0xf622('0x12'),_0x2ee4ff,_0x2feaab[_0xf622('0x18')][_0xf622('0x19')]);return _0x3cee86(_0x2feaab[_0xf622('0x18')][_0xf622('0x19')]);}else{logger[_0xf622('0x11')](_0xf622('0x12'),_0x2ee4ff,'request\x20sent');_0x3cee86(_0x2feaab[_0xf622('0x1a')]['message']);}})['catch'](function(_0x20add4){logger['error'](_0xf622('0x12'),_0x2ee4ff,_0x20add4);_0x111f8a(_0x20add4);});});}
\ No newline at end of file
+var _0x057c=['rpc','client','http','redis','defaults','socket.io-emitter','request','then','info','debug','Dashboard,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','Dashboard,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','../../config/utils','../../config/logger'];(function(_0x4d6321,_0x13044d){var _0x185667=function(_0x556b6a){while(--_0x556b6a){_0x4d6321['push'](_0x4d6321['shift']());}};_0x185667(++_0x13044d);}(_0x057c,0xd2));var _0xc057=function(_0x5d55eb,_0x761a8e){_0x5d55eb=_0x5d55eb-0x0;var _0x3e6204=_0x057c[_0x5d55eb];return _0x3e6204;};'use strict';var _=require(_0xc057('0x0'));var util=require(_0xc057('0x1'));var moment=require(_0xc057('0x2'));var BPromise=require(_0xc057('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xc057('0x4'));var logger=require(_0xc057('0x5'))(_0xc057('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xc057('0x7')][_0xc057('0x8')]({'port':0x232a});config[_0xc057('0x9')]=_[_0xc057('0xa')](config[_0xc057('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0xc057('0xb'))(new Redis(config['redis']));require('./dashboard.socket')['register'](socket);function respondWithRpcPromise(_0x346457,_0x171885,_0x2fc8db){return new BPromise(function(_0x3fb9d0,_0x3c8266){return client[_0xc057('0xc')](_0x346457,_0x2fc8db)[_0xc057('0xd')](function(_0x5b9ef0){logger[_0xc057('0xe')]('Dashboard,\x20%s,\x20%s',_0x171885,'request\x20sent');logger[_0xc057('0xf')](_0xc057('0x10'),_0x171885,_0xc057('0x11'),JSON[_0xc057('0x12')](_0x5b9ef0));if(_0x5b9ef0[_0xc057('0x13')]){if(_0x5b9ef0[_0xc057('0x13')][_0xc057('0x14')]===0x1f4){logger[_0xc057('0x13')](_0xc057('0x15'),_0x171885,_0x5b9ef0['error'][_0xc057('0x16')]);return _0x3c8266(_0x5b9ef0[_0xc057('0x13')][_0xc057('0x16')]);}logger['error']('Dashboard,\x20%s,\x20%s',_0x171885,_0x5b9ef0[_0xc057('0x13')]['message']);return _0x3fb9d0(_0x5b9ef0[_0xc057('0x13')][_0xc057('0x16')]);}else{logger[_0xc057('0xe')](_0xc057('0x15'),_0x171885,'request\x20sent');_0x3fb9d0(_0x5b9ef0[_0xc057('0x17')][_0xc057('0x16')]);}})['catch'](function(_0x3548a2){logger[_0xc057('0x13')](_0xc057('0x15'),_0x171885,_0x3548a2);_0x3c8266(_0x3548a2);});});}
\ No newline at end of file