From f7f1ab925d8e9e81cb28f4bc3f5ae2be8bdf5f98 Mon Sep 17 00:00:00 2001 From: Alex Shatov Date: Mon, 18 Sep 2017 15:25:42 -0400 Subject: more commit+branch info for deployment_handler Change-Id: Ib91f54dd94695c1c5d4759837a20776bf63288ed Issue-Id: DCAEGEN2-62 Signed-off-by: Alex Shatov --- lib/info.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/info.js b/lib/info.js index 94d6455..f6b37a8 100644 --- a/lib/info.js +++ b/lib/info.js @@ -1,16 +1,16 @@ /* -Copyright(c) 2017 AT&T Intellectual Property. All rights reserved. +Copyright(c) 2017 AT&T Intellectual Property. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. +CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ @@ -27,9 +27,16 @@ const config = process.mainModule.exports.config; router.get('/', function(req, res) { res.json( { - apiVersion: config.apiVersion, - serverVersion: config.version, - links: config.apiLinks + "server" : { + "name": config.name, + "description": config.description, + "version": config.version, + "branch": config.branch, + "commit": config.commit, + "commit_datetime": config.commit_datetime + }, + "apiVersion": config.apiVersion, + "links": config.apiLinks } ); require('./logging').getLogger().audit(req, 200); -- cgit 1.2.3-korg