Skip to content

Commit

Permalink
F #3951: rename FireEdge (#926)
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Lobo <[email protected]>
  • Loading branch information
jloboescalona2 authored Mar 8, 2021
1 parent 4133d04 commit 4ea0628
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/fireedge/fireedge-server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ log: prod
# Enable cors (cross-origin resource sharing)
cors: true

# Fireedge server host
# FireEdge server host
host: '0.0.0.0'

# FireEdge server port
Expand Down
2 changes: 1 addition & 1 deletion src/sunstone/etc/sunstone-server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
:threshold_high: 66

################################################################################
# Fireedge
# FireEdge
################################################################################

:private_fireedge_endpoint: http://localhost:2616
Expand Down
32 changes: 16 additions & 16 deletions src/sunstone/public/app/utils/fireedge-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
define(function (require) {

var Config = require("sunstone-config");
var Notifier = require('utils/notifier');
var Notifier = require("utils/notifier");

// user config
const fireedge_endpoint = Config.publicFireedgeEndpoint;
Expand All @@ -32,15 +32,15 @@ define(function (require) {

var _connected = function(){
return connection == STATUS.CONNECTED;
}
};

var _disconnected = function(){
return connection == STATUS.DISCONNECTED;
}
};

var _processing = function(){
return connection == STATUS.PROCESSING;
}
};

/**
* Aux function to change the fireedge_token value.
Expand All @@ -61,7 +61,7 @@ define(function (require) {

/**
* This function sets the fireedge_token variable if fireedge is running.
* If the Fireedge Server is not running the value of fireedge_token will
* If the FireEdge Server is not running the value of fireedge_token will
* be "".
*/
var _validate_fireedge_token = function(success, error) {
Expand All @@ -71,31 +71,31 @@ define(function (require) {
type: "GET",
success: function(data) {
set_fireedge_token(data.token);
if (typeof success == "function"){
if (typeof success === "function"){
success(fireedge_token);
}
},
error: function(request, response, data) {
Notifier.onError(request, {error:{ message: "Fireedge private endpoint is not working, please contact your cloud administrator"}});
Notifier.onError(request, {error:{ message: "FireEdge private endpoint is not working, please contact your cloud administrator"}});
is_fireedge_configured = false;
clear_fireedge_token();
if (typeof error == "function"){
if (typeof error === "function"){
error();
}
}
});
}
else if (is_fireedge_configured){
if (typeof success == "function"){
if (typeof success === "function"){
success(fireedge_token);
}
}
else{
if (typeof error == "function"){
if (typeof error === "function"){
error();
}
}
}
};

var _check_fireedge_public_url = function (success, aux, error) {
if (fireedge_endpoint){
Expand All @@ -104,26 +104,26 @@ define(function (require) {
type: "GET",
success: function() {
is_fireedge_configured = true;
if (typeof success == "function" && typeof aux == "function"){
if (typeof success === "function" && typeof aux === "function"){
success(aux);
}
},
error: function(request, response, data) {
Notifier.onError(request, {error:{ message: "Fireedge public endpoint is not working, please contact your cloud administrator"}});
Notifier.onError(request, {error:{ message: "FireEdge public endpoint is not working, please contact your cloud administrator"}});
is_fireedge_configured = false;
if (typeof error == "function"){
if (typeof error === "function"){
error();
}
}
});
}
else {
is_fireedge_configured = false;
if (typeof error == "function"){
if (typeof error === "function"){
error();
}
}
}
};

var fireedge_validator = {
"validateFireedgeToken": _validate_fireedge_token,
Expand Down
4 changes: 2 additions & 2 deletions src/sunstone/sunstone-server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ def destroy_session
end

##############################################################################
# GET Fireedge token
# GET FireEdge token
##############################################################################
get '/fireedge' do
begin
Expand All @@ -934,7 +934,7 @@ def destroy_session
response = {:token => fireedge_token}
[200, response.to_json]
rescue StandardError => error
logger.info("Fireedge server is not running. Error: #{error}")
logger.info("FireEdge server is not running. Error: #{error}")
response = {:token => ""}
[400, response.to_json]
end
Expand Down

0 comments on commit 4ea0628

Please sign in to comment.