Semi functional client webUI
- can update client info for sure - Working on notifications now
This commit is contained in:
@@ -27,7 +27,12 @@ exports.updateId = (updatedId) => {
|
||||
/**
|
||||
* Wrapper to update any or all keys in the client config
|
||||
*
|
||||
* @param {*} configObject Object with what keys you wish to update (node object format, will be converted)
|
||||
* @param {Object} configObject Object with what keys you wish to update (node object format, will be converted)
|
||||
* @param {number} configObject.id The ID given to the node to update
|
||||
* @param {string} configObject.name The name of the node
|
||||
* @param {string} configObject.ip The IP the server can contact the node on
|
||||
* @param {number} configObject.port The port the server can contact the node on
|
||||
* @param {string} configObject.location The physical location of the node
|
||||
* @returns
|
||||
*/
|
||||
exports.updateClientConfig = (configObject) => {
|
||||
@@ -39,6 +44,7 @@ exports.updateClientConfig = (configObject) => {
|
||||
if (runningConfig.id != configObject.id) {
|
||||
this.updateConfig('CLIENT_ID', configObject.id);
|
||||
updatedKeys.push({'CLIENT_ID': configObject.id});
|
||||
process.env.CLIENT_ID = configObject.id;
|
||||
log.DEBUG("Updated ID to: ", configObject.id);
|
||||
}
|
||||
}
|
||||
@@ -46,6 +52,7 @@ exports.updateClientConfig = (configObject) => {
|
||||
if (runningConfig.name != configObject.name) {
|
||||
this.updateConfig('CLIENT_NAME', configObject.name);
|
||||
updatedKeys.push({'CLIENT_NAME': configObject.name});
|
||||
process.env.CLIENT_NAME = configObject.name;
|
||||
log.DEBUG("Updated name to: ", configObject.name);
|
||||
}
|
||||
}
|
||||
@@ -53,6 +60,7 @@ exports.updateClientConfig = (configObject) => {
|
||||
if (runningConfig.ip != configObject.ip) {
|
||||
this.updateConfig('CLIENT_IP', configObject.ip);
|
||||
updatedKeys.push({'CLIENT_IP': configObject.ip});
|
||||
process.env.CLIENT_IP = configObject.ip;
|
||||
log.DEBUG("Updated ip to: ", configObject.ip);
|
||||
}
|
||||
}
|
||||
@@ -60,6 +68,7 @@ exports.updateClientConfig = (configObject) => {
|
||||
if (runningConfig.port != configObject.port) {
|
||||
this.updateConfig('CLIENT_PORT', configObject.port);
|
||||
updatedKeys.push({'CLIENT_PORT': configObject.port});
|
||||
process.env.CLIENT_PORT = configObject.port;
|
||||
log.DEBUG("Updated port to: ", configObject.port);
|
||||
}
|
||||
}
|
||||
@@ -67,6 +76,7 @@ exports.updateClientConfig = (configObject) => {
|
||||
if (runningConfig.location != configObject.location) {
|
||||
this.updateConfig('CLIENT_LOCATION', configObject.location);
|
||||
updatedKeys.push({'CLIENT_LOCATION': configObject.location});
|
||||
process.env.CLIENT_LOCATION = configObject.location;
|
||||
log.DEBUG("Updated location to: ", configObject.location);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user