projects
/
osm
/
UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RIFT-16172: Project switch does not affect polling and socket pages.
[osm/UI.git]
/
skyquake
/
skyquake.js
diff --git
a/skyquake/skyquake.js
b/skyquake/skyquake.js
index
b9af78a
..
2396e1a
100644
(file)
--- a/
skyquake/skyquake.js
+++ b/
skyquake/skyquake.js
@@
-83,6
+83,9
@@
if (cluster.isMaster && clusteredLaunch) {
var sslOptions = null;
var sslOptions = null;
+ var apiServer = argv['api-server'] ? argv['api-server'] : 'localhost';
+ var uploadServer = argv['upload-server'] ? argv['upload-server'] : null;
+
try {
if (argv['enable-https']) {
var keyFilePath = argv['keyfile-path'];
try {
if (argv['enable-https']) {
var keyFilePath = argv['keyfile-path'];
@@
-102,9
+105,12
@@
if (cluster.isMaster && clusteredLaunch) {
var app = express();
var app = express();
+ app.set('views', __dirname + '/framework/core/views');
+ app.engine('html', require('ejs').renderFile);
+
app.use(session({
secret: 'ritio rocks',
app.use(session({
secret: 'ritio rocks',
- resave:
tru
e,
+ resave:
fals
e,
saveUninitialized: true
}));
app.use(bodyParser.json());
saveUninitialized: true
}));
app.use(bodyParser.json());
@@
-132,6
+138,9
@@
if (cluster.isMaster && clusteredLaunch) {
var descriptor_routes = require('./framework/core/modules/routes/descriptorModel');
var configuration_routes = require('./framework/core/modules/routes/configuration');
var configurationAPI = require('./framework/core/modules/api/configuration');
var descriptor_routes = require('./framework/core/modules/routes/descriptorModel');
var configuration_routes = require('./framework/core/modules/routes/configuration');
var configurationAPI = require('./framework/core/modules/api/configuration');
+ var userManagement_routes = require('./framework/core/modules/routes/userManagement');
+ var projectManagement_routes = require('./framework/core/modules/routes/projectManagement');
+ var session_routes = require('./framework/core/modules/routes/sessions');
/**
* Processing when a plugin is added or modified
* @param {string} plugin_name - Name of the plugin
/**
* Processing when a plugin is added or modified
* @param {string} plugin_name - Name of the plugin
@@
-153,6
+162,15
@@
if (cluster.isMaster && clusteredLaunch) {
}
}
+ /**
+ * Serve jquery
+ */
+ app.use('/jquery', express.static('./node_modules/jquery/dist/jquery.min.js'));
+ /**
+ * Serve images
+ */
+ app.use('/img', express.static('./framework/style/img'));
+
/**
* Start listening on a port
* @param {string} port - Port to listen on
/**
* Start listening on a port
* @param {string} port - Port to listen on
@@
-194,9
+212,16
@@
if (cluster.isMaster && clusteredLaunch) {
app.use(inactivity_routes);
// Configure global config with ssl enabled/disabled
app.use(inactivity_routes);
// Configure global config with ssl enabled/disabled
- configurationAPI.globalConfiguration.update({
- ssl_enabled: httpsConfigured
- });
+ var globalConfig = {
+ ssl_enabled: httpsConfigured,
+ api_server: apiServer
+ };
+
+ if (uploadServer) {
+ globalConfig.upload_server = uploadServer;
+ }
+
+ configurationAPI.globalConfiguration.update(globalConfig);
// Configure configuration route(s)
app.use(configuration_routes);
// Configure configuration route(s)
app.use(configuration_routes);
@@
-204,6
+229,15
@@
if (cluster.isMaster && clusteredLaunch) {
//Configure descriptor route(s)
app.use(descriptor_routes);
//Configure descriptor route(s)
app.use(descriptor_routes);
+ //Configure user management route(s)
+ app.use(userManagement_routes);
+
+ //Configure project management route(s)
+ app.use(projectManagement_routes);
+
+ //Configure session route(s)
+ app.use(session_routes);
+
// app.get('/testme', function(req, res) {
// res.sendFile(__dirname + '/index.html');
// });
// app.get('/testme', function(req, res) {
// res.sendFile(__dirname + '/index.html');
// });