From 62f58f03558b439fd728854aef061631817a881a Mon Sep 17 00:00:00 2001 From: csmig <33138761+csmig@users.noreply.github.com> Date: Tue, 27 Oct 2020 18:43:17 -0400 Subject: [PATCH 1/2] Issue #27 fix --- api/source/service/mysql/utils.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/api/source/service/mysql/utils.js b/api/source/service/mysql/utils.js index acc4a08a0..c9c91856f 100644 --- a/api/source/service/mysql/utils.js +++ b/api/source/service/mysql/utils.js @@ -419,18 +419,16 @@ module.exports.updateStatsAssetStig = async function(connection, options) { mediumCount = stats.mediumCount, lowCount = stats.lowCount ` - console.log(`Connection ${connection.connection.connectionId} STATS SELECT`) const [stats] = await connection.query(sqlSelect, binds) - console.log(`Connection ${connection.connection.connectionId} STATS UPDATE`) - const [result] = await connection.query(sqlUpdate, stats[0]) - if (result.affectedRows == 0) { - console.log(`Connection ${connection.connection.connectionId} STATS INSERT`) - await connection.query(sqlInsert, stats[0]) + if (stats.length > 0) { + const [result] = await connection.query(sqlUpdate, stats[0]) + if (result.affectedRows == 0) { + await connection.query(sqlInsert, stats[0]) + } } return true } catch (err) { - console.log(`Connection ${connection.connection.connectionId} STATS ERROR ${err.message}`) throw err } } From 1d90ac6903cdb0e4db88a5ceadec2ad12e3773ae Mon Sep 17 00:00:00 2001 From: csmig <33138761+csmig@users.noreply.github.com> Date: Tue, 27 Oct 2020 19:52:19 -0400 Subject: [PATCH 2/2] Increment version to 1.0.0-beta.2 --- api/source/package.json | 2 +- api/source/specification/stig-manager.yaml | 2 +- api/source/utils/config.js | 2 +- clients/extjs/js/Env.js | 2 +- clients/extjs/js/Env.js.template | 2 +- docs/Release_Notes.md | 5 ++++- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/api/source/package.json b/api/source/package.json index bc61bb688..0ded70dd3 100644 --- a/api/source/package.json +++ b/api/source/package.json @@ -1,6 +1,6 @@ { "name": "stig-management-api", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "description": "An API for managing evaluations of Security Technical Implementation Guide (STIG) assessments.", "main": "index.js", "scripts": { diff --git a/api/source/specification/stig-manager.yaml b/api/source/specification/stig-manager.yaml index 4e0e14c70..cad110d8c 100644 --- a/api/source/specification/stig-manager.yaml +++ b/api/source/specification/stig-manager.yaml @@ -7,7 +7,7 @@ info: contact: name: Carl Smigielski email: carl.a.smigielski@saic.com - version: 1.0.0-beta.1 + version: 1.0.0-beta.2 servers: - url: 'http://localhost:54000/api' paths: diff --git a/api/source/utils/config.js b/api/source/utils/config.js index 174736927..10ced33fa 100644 --- a/api/source/utils/config.js +++ b/api/source/utils/config.js @@ -1,5 +1,5 @@ let config = { - version: '1.0.0-beta.1', + version: '1.0.0-beta.2', commit: { branch: process.env.COMMIT_BRANCH || 'na', sha: process.env.COMMIT_SHA || 'na', diff --git a/clients/extjs/js/Env.js b/clients/extjs/js/Env.js index b34fd5a78..5ab200284 100644 --- a/clients/extjs/js/Env.js +++ b/clients/extjs/js/Env.js @@ -1,7 +1,7 @@ Ext.ns('STIGMAN') STIGMAN.Env = { - version: '1.0.0-beta.1', + version: '1.0.0-beta.2', apiBase: "/api" || "../api", commit: { branch: "" || "na", diff --git a/clients/extjs/js/Env.js.template b/clients/extjs/js/Env.js.template index 3c1ad0dc4..be5bb8f59 100644 --- a/clients/extjs/js/Env.js.template +++ b/clients/extjs/js/Env.js.template @@ -1,7 +1,7 @@ Ext.ns('STIGMAN') STIGMAN.Env = { - version: '1.0.0-beta.1', + version: '1.0.0-beta.2', apiBase: "${STIGMAN_CLIENT_API_BASE}" || "../api", commit: { branch: "${COMMIT_BRANCH}" || "na", diff --git a/docs/Release_Notes.md b/docs/Release_Notes.md index dae52fda9..06da6b493 100644 --- a/docs/Release_Notes.md +++ b/docs/Release_Notes.md @@ -6,4 +6,7 @@ This is the initial beta release of STIG Manager ### 1.0.0-beta.1 -Numerous enhancements and bug fixes, including token handling and better concurrency. The project is ready for non-production deployments and pilots to demonstrate suitability for first production release. \ No newline at end of file +Numerous enhancements and bug fixes, including token handling and better concurrency. The project is ready for non-production deployments and pilots to demonstrate suitability for first production release. + +### 1.0.0-beta.2 +Fixed GitHub Issue #27. STIG checklist imports were critically affected by a regression introduced with beta.1 \ No newline at end of file