Skip to content
This repository has been archived by the owner on May 21, 2020. It is now read-only.

Commit

Permalink
Merge pull request #60 from eapowertools/add-version-number
Browse files Browse the repository at this point in the history
Added version number to test page and server log.
  • Loading branch information
goldbergjeffrey authored Nov 16, 2016
2 parents b904b44 + 4a8bd08 commit 51c4b16
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
18 changes: 15 additions & 3 deletions app/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,29 @@


};

function getVersion()
{
$.get("../masterlib/version", function(result,strStatus,xhr)
{
if(xhr.status==200)
{
$("#gmsTitle").text("Governed Metrics Service " + result);
}
})
};

</script>
</head>

<body>
<body onload="getVersion()">
<def>
</def>
<div id="header" class="frame">
<div id="header-text"><h1 style='color: #FFFFFF; font-size: 23pt; font-weight: bold; font-family: Arial;'>Governed Metrics Service</h1></div>
<div id="header-text"><h1 id="gmsTitle" style="color: #FFFFFF; font-size: 23pt; font-weight: bold; font-family: Arial;">Governed Metrics Service</h1></div>
</div>

<div id=main-body>
<div id="main-body">
<div id="left-buttons">
<button class="lui-button lui-button--toolbar-inverse button-spacing" onclick="testConnection()">Test Connection</button>
<br/>
Expand Down
1 change: 1 addition & 0 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var config = {
root: path.resolve(certPath,'root.pem')
},
gms: {
version: '1.5.3.0',
port: 8590,
hostname: friendlyHostname !== undefined ? friendlyHostname : globalHostname,
routePath: path.join(__dirname, '/../routes/'),
Expand Down
6 changes: 6 additions & 0 deletions routes/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ router.route('/changeOwner')
});
});

router.route("/version")
.get(function(request, response)
{
response.status(200).send(config.gms.version);
});

function isEmpty(obj){
for(var prop in obj){
if(obj.hasOwnProperty(prop))
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ app.use('/masterlib',popmasterlib);
var server = https.createServer(httpsOptions, app);
server.listen(config.gms.port, function()
{
logger.info('Governed Metrics Service started',{module:'server'});
logger.info('Governed Metrics Service version ' + config.gms.version + ' started',{module:'server'});
});

0 comments on commit 51c4b16

Please sign in to comment.