synced with private web console
This commit is contained in:
@@ -5,13 +5,13 @@
|
||||
|
||||
require('../mini_poem/configuration/constants');
|
||||
var Cache = require('../mini_poem/cache/redis.js');
|
||||
var logger = require('../mini_poem/logging/logger4js').helper;
|
||||
var Enums = require('../constants/enums');
|
||||
var ErrorCode = require('../constants/error_code');
|
||||
|
||||
var enums = new Enums();
|
||||
var errorCode = new ErrorCode();
|
||||
|
||||
var logger = require('../mini_poem/logging/logger4js').helper;
|
||||
|
||||
var AdminAuth = function(_cacheHost, _cachePort, _cacheAdmin, _cachePassword) {
|
||||
this.cache = new Cache(_cacheHost, _cachePort, _cacheAdmin, _cachePassword);
|
||||
|
||||
@@ -44,28 +44,11 @@ function Enums() {
|
||||
this.STAT_TYPE_REMOTE_BY_CITY = 4;
|
||||
this.STAT_TYPE_UPDATE_RECORD = 5;
|
||||
|
||||
this.BLE_REMOTE_INDEX_KEY_MAP_POWER_OFF = 0;
|
||||
this.BLE_REMOTE_INDEX_KEY_MAP_POWER_ON = 1;
|
||||
|
||||
this.JPUSH_DEVICE_TYPE_IOS = 0;
|
||||
this.JPUSH_DEVICE_TYPE_ANDROID = 1;
|
||||
this.JPUSH_DEVICE_TYPE_BOTH = 2;
|
||||
|
||||
this.JPUSH_DEST_TYPE_BROADCAST = 0;
|
||||
this.JPUSH_DEST_TYPE_PEER = 1;
|
||||
this.JPUSH_DEST_TYPE_GROUP = 2;
|
||||
|
||||
this.JPUSH_PUSH_TYPE_MESSAGE = 0;
|
||||
this.JPUSH_PUSH_TYPE_NOTIFICATION = 1;
|
||||
|
||||
this.JPUSH_FROM_PEER_CONSOLE = 0;
|
||||
this.JPUSH_FROM_PEER_DEVICE = 1;
|
||||
|
||||
this.PROTOCOL_TYPE_G1 = 0;
|
||||
this.PROTOCOL_TYPE_G2_QUATERNARY = 1;
|
||||
this.PROTOCOL_TYPE_G2_HEXDECIMAL = 2;
|
||||
|
||||
this.ADMIN_TYPE_UCON = 1;
|
||||
this.ADMIN_TYPE_IREXT = 1;
|
||||
this.ADMIN_TYPE_EXTERNAL = 2;
|
||||
}
|
||||
|
||||
|
||||
BIN
src/web_console/data/temp/rc_extension.tar.gz
Normal file
BIN
src/web_console/data/temp/rc_extension.tar.gz
Normal file
Binary file not shown.
@@ -12,9 +12,10 @@ var methodOverride = require('method-override');
|
||||
// global inclusion
|
||||
require('./mini_poem/configuration/constants');
|
||||
var System = require('./mini_poem/utils/system_utils');
|
||||
var systemConfig = require('./configuration/system_configs');
|
||||
var dbConn = require('./mini_poem/db/mysql/mysql_connection');
|
||||
|
||||
// local inclusion
|
||||
var systemConfig = require('./configuration/system_configs');
|
||||
var Enums = require('./constants/enums');
|
||||
var ErrorCode = require('./constants/error_code');
|
||||
var enums = new Enums();
|
||||
@@ -35,7 +36,6 @@ app.use("/", express.static(__dirname + '/web/'));
|
||||
systemConfig.setupEnvironment();
|
||||
serverListenPort = LISTEN_PORT;
|
||||
|
||||
var dbConn = require('./mini_poem/db/mysql/mysql_connection');
|
||||
|
||||
console.log("initializing MySQL connection to : " + MYSQL_DB_SERVER_ADDRESS + ":" + MYSQL_DB_NAME);
|
||||
dbConn.setMySQLParameter(MYSQL_DB_SERVER_ADDRESS, MYSQL_DB_NAME, MYSQL_DB_USER, MYSQL_DB_PASSWORD);
|
||||
@@ -80,7 +80,6 @@ function tokenValidation (req, res, next) {
|
||||
// request of content type of multipart/form-data would be validated inside each service
|
||||
next();
|
||||
} else {
|
||||
console.log("adminID = " + adminID + ", token = " + token);
|
||||
certificateLogic.verifyTokenWorkUnit(adminID, token, function(validateTokenErr) {
|
||||
if(errorCode.SUCCESS.code != validateTokenErr.code) {
|
||||
var fakeResponse = {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
var app = require('../irext_console.js');
|
||||
var intService = require('../services/internal_service.js');
|
||||
var intService = require('../services/code_manage_service.js');
|
||||
|
||||
app.post('/irext/int/list_provinces', intService.listProvinces);
|
||||
app.post('/irext/int/list_cities', intService.listCities);
|
||||
@@ -29,4 +29,5 @@ app.post('/irext/int/create_protocol', intService.createProtocol);
|
||||
|
||||
app.get('/irext/int/list_remote_indexes', intService.listRemoteIndexes);
|
||||
app.get('/irext/int/search_remote_indexes', intService.searchRemoteIndexes);
|
||||
|
||||
app.get('/irext/int/download_remote_index', intService.downloadRemoteIndex);
|
||||
@@ -6,6 +6,6 @@
|
||||
var server = require('../irext_console.js');
|
||||
|
||||
require('./navigation_routes.js');
|
||||
require('./internal_routes.js');
|
||||
require('./code_manage_routes.js');
|
||||
require('./certificate_routes.js');
|
||||
require('./stat_routes.js');
|
||||
|
||||
@@ -19,7 +19,7 @@ var CityResponse = require('../response/city_response.js');
|
||||
var OperatorResponse = require('../response/operator_response.js');
|
||||
var RemoteIndexResponse = require('../response/remote_index_response.js');
|
||||
|
||||
var internalLogic = require('../work_unit/internal_logic.js');
|
||||
var internalLogic = require('../work_unit/code_manage_logic.js');
|
||||
|
||||
var Enums = require('../constants/enums');
|
||||
var ErrorCode = require('../constants/error_code');
|
||||
@@ -379,8 +379,10 @@ exports.fallbackRemoteIndex = function (req, res) {
|
||||
* return : ServiceResponse
|
||||
*/
|
||||
exports.publishRemoteIndex = function (req, res) {
|
||||
var adminID = req.body.admin_id;
|
||||
|
||||
var serviceResponse = new ServiceResponse();
|
||||
internalLogic.publishRemoteIndexWorkUnit(function (publishRemoteErr) {
|
||||
internalLogic.publishRemoteIndexWorkUnit(adminID, function (publishRemoteErr) {
|
||||
serviceResponse.status = publishRemoteErr;
|
||||
res.send(serviceResponse);
|
||||
res.end();
|
||||
@@ -410,8 +412,10 @@ exports.createBrand = function (req, res) {
|
||||
* return : Service response
|
||||
*/
|
||||
exports.publishBrands = function (req, res) {
|
||||
var adminID = req.body.admin_id;
|
||||
|
||||
var serviceResponse = new ServiceResponse();
|
||||
internalLogic.publishBrandsWorkUnit(function (publishBrandsErr) {
|
||||
internalLogic.publishBrandsWorkUnit(adminID, function (publishBrandsErr) {
|
||||
serviceResponse.status = publishBrandsErr;
|
||||
res.send(serviceResponse);
|
||||
res.end();
|
||||
@@ -7,8 +7,6 @@
|
||||
var constants = require('../mini_poem/configuration/constants');
|
||||
var formidable = require('formidable');
|
||||
|
||||
// local inclusion
|
||||
var logger = require('../mini_poem/logging/logger4js').helper;
|
||||
|
||||
/*
|
||||
* function : Navigation to certain URL
|
||||
|
||||
Reference in New Issue
Block a user