Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / api / dashboardItem / dashboardItem.rpc.js
index 6ce7480..a2aaed1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x86f4=['stringify','error','code','message','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','redis','defaults','socket.io-emitter','./dashboardItem.socket','register','then','info','DashboardItem,\x20%s,\x20%s','request\x20sent','debug'];(function(_0xa8883,_0x1f107f){var _0x479426=function(_0x4e56b9){while(--_0x4e56b9){_0xa8883['push'](_0xa8883['shift']());}};_0x479426(++_0x1f107f);}(_0x86f4,0xf5));var _0x486f=function(_0x2185a1,_0x10c70f){_0x2185a1=_0x2185a1-0x0;var _0x522b04=_0x86f4[_0x2185a1];return _0x522b04;};'use strict';var _=require('lodash');var util=require(_0x486f('0x0'));var moment=require(_0x486f('0x1'));var BPromise=require(_0x486f('0x2'));var rs=require(_0x486f('0x3'));var fs=require('fs');var Redis=require(_0x486f('0x4'));var db=require(_0x486f('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x486f('0x6'))(_0x486f('0x7'));var config=require(_0x486f('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config[_0x486f('0x9')]=_[_0x486f('0xa')](config[_0x486f('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x486f('0xb'))(new Redis(config[_0x486f('0x9')]));require(_0x486f('0xc'))[_0x486f('0xd')](socket);function respondWithRpcPromise(_0x1660b8,_0x2d505a,_0x197830){return new BPromise(function(_0x28d7d3,_0x52e3f2){return client['request'](_0x1660b8,_0x197830)[_0x486f('0xe')](function(_0x19e222){logger[_0x486f('0xf')](_0x486f('0x10'),_0x2d505a,_0x486f('0x11'));logger[_0x486f('0x12')]('DashboardItem,\x20%s,\x20%s,\x20%s',_0x2d505a,_0x486f('0x11'),JSON[_0x486f('0x13')](_0x19e222));if(_0x19e222[_0x486f('0x14')]){if(_0x19e222[_0x486f('0x14')][_0x486f('0x15')]===0x1f4){logger[_0x486f('0x14')](_0x486f('0x10'),_0x2d505a,_0x19e222[_0x486f('0x14')][_0x486f('0x16')]);return _0x52e3f2(_0x19e222[_0x486f('0x14')][_0x486f('0x16')]);}logger[_0x486f('0x14')](_0x486f('0x10'),_0x2d505a,_0x19e222[_0x486f('0x14')]['message']);return _0x28d7d3(_0x19e222[_0x486f('0x14')][_0x486f('0x16')]);}else{logger[_0x486f('0xf')](_0x486f('0x10'),_0x2d505a,_0x486f('0x11'));_0x28d7d3(_0x19e222['result'][_0x486f('0x16')]);}})[_0x486f('0x17')](function(_0x191574){logger[_0x486f('0x14')](_0x486f('0x10'),_0x2d505a,_0x191574);_0x52e3f2(_0x191574);});});}
\ No newline at end of file
+var _0x6405=['redis','defaults','localhost','register','info','debug','DashboardItem,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','DashboardItem,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http'];(function(_0x26c1dd,_0x63293b){var _0x40f336=function(_0x2d24ed){while(--_0x2d24ed){_0x26c1dd['push'](_0x26c1dd['shift']());}};_0x40f336(++_0x63293b);}(_0x6405,0x109));var _0x5640=function(_0x3c546f,_0x276e64){_0x3c546f=_0x3c546f-0x0;var _0x9f4e3d=_0x6405[_0x3c546f];return _0x9f4e3d;};'use strict';var _=require(_0x5640('0x0'));var util=require(_0x5640('0x1'));var moment=require(_0x5640('0x2'));var BPromise=require('bluebird');var rs=require(_0x5640('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5640('0x4'))['db'];var utils=require(_0x5640('0x5'));var logger=require('../../config/logger')(_0x5640('0x6'));var config=require(_0x5640('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x5640('0x8')][_0x5640('0x9')]({'port':0x232a});config[_0x5640('0xa')]=_[_0x5640('0xb')](config['redis'],{'host':_0x5640('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5640('0xa')]));require('./dashboardItem.socket')[_0x5640('0xd')](socket);function respondWithRpcPromise(_0x2976be,_0x7631b2,_0x9f4f57){return new BPromise(function(_0x442980,_0x40aa35){return client['request'](_0x2976be,_0x9f4f57)['then'](function(_0x432456){logger[_0x5640('0xe')]('DashboardItem,\x20%s,\x20%s',_0x7631b2,'request\x20sent');logger[_0x5640('0xf')](_0x5640('0x10'),_0x7631b2,_0x5640('0x11'),JSON[_0x5640('0x12')](_0x432456));if(_0x432456[_0x5640('0x13')]){if(_0x432456[_0x5640('0x13')][_0x5640('0x14')]===0x1f4){logger[_0x5640('0x13')](_0x5640('0x15'),_0x7631b2,_0x432456[_0x5640('0x13')][_0x5640('0x16')]);return _0x40aa35(_0x432456[_0x5640('0x13')][_0x5640('0x16')]);}logger['error'](_0x5640('0x15'),_0x7631b2,_0x432456[_0x5640('0x13')]['message']);return _0x442980(_0x432456[_0x5640('0x13')]['message']);}else{logger[_0x5640('0xe')](_0x5640('0x15'),_0x7631b2,_0x5640('0x11'));_0x442980(_0x432456[_0x5640('0x17')][_0x5640('0x16')]);}})[_0x5640('0x18')](function(_0x45d469){logger[_0x5640('0x13')](_0x5640('0x15'),_0x7631b2,_0x45d469);_0x40aa35(_0x45d469);});});}
\ No newline at end of file