Skip to content

Commit

Permalink
Minor refactor of configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary A. Stafford committed Oct 5, 2017
1 parent 31eb4ba commit 5f35d3f
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 45 deletions.
12 changes: 6 additions & 6 deletions dist/main-built.js

Large diffs are not rendered by default.

29 changes: 18 additions & 11 deletions js/data/data_radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
* https://github.com/garystafford/cd-maturity-model
*/

/*properties
app, applications, averageTitle, axis, categories, definition, emptyDataSet,
idAverageCategories, legendTitle, maturityData, maturityLevels, pageTitle,
referenceLink, referenceLinkTitle, score, value
*/
/*properties
app, applications, averageTitle, axis, categoryCount, categories, definition,
emptyDataSet, idAverageCategories, legendTitle, maturityData, maturityLevels,
pageTitle, referenceLink1, referenceLinkTitle1, referenceLink2, referenceLinkTitle2,
score, value
*/

/*global define */
define(function() {
Expand All @@ -24,8 +25,10 @@ define(function() {
pageTitle,
legendTitle,
averageTitle,
referenceLink,
referenceLinkTitle,
referenceLink1,
referenceLinkTitle1,
referenceLink2,
referenceLinkTitle2,
maturityData;

/* CONSTANTS */
Expand Down Expand Up @@ -94,8 +97,10 @@ define(function() {
pageTitle = "CD Maturity Gap Analysis: First Federated Bank";
legendTitle = "Banking Platforms";
averageTitle = "Average Maturity - All Systems";
referenceLink = "https://github.com/garystafford/cd-maturity-model";
referenceLinkTitle = "Gary A. Stafford - 2017";
referenceLink1 = "https://github.com/garystafford/cd-maturity-model";
referenceLinkTitle1 = "CD Maturity Model";
referenceLink2 = "https://github.com/garystafford/cd-maturity-model";
referenceLinkTitle2 = "Gary A. Stafford - 2017";

applications = [
"Core Banking Application",
Expand Down Expand Up @@ -368,8 +373,10 @@ define(function() {
legendTitle: legendTitle,
averageTitle: averageTitle,
idAverageCategories: ID_AVERAGE_CATEGORIES,
referenceLink: referenceLink,
referenceLinkTitle: referenceLinkTitle,
referenceLink1: referenceLink1,
referenceLinkTitle1: referenceLinkTitle1,
referenceLink2: referenceLink2,
referenceLinkTitle2: referenceLinkTitle2,
maturityLevels: MATURITY_LEVELS,
categories: CATEGORIES,
emptyDataSet: EMPTY_DATASET,
Expand Down
41 changes: 24 additions & 17 deletions js/data/iac_radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
/*properties
app, applications, averageTitle, axis, categoryCount, categories, definition,
emptyDataSet, idAverageCategories, legendTitle, maturityData, maturityLevels,
pageTitle, referenceLink, referenceLinkTitle, score, value
pageTitle, referenceLink1, referenceLinkTitle1, referenceLink2, referenceLinkTitle2,
score, value
*/

/*global define */
Expand All @@ -24,8 +25,10 @@ define(function() {
pageTitle,
legendTitle,
averageTitle,
referenceLink,
referenceLinkTitle,
referenceLink1,
referenceLinkTitle1,
referenceLink2,
referenceLinkTitle2,
maturityData;

/* CONSTANTS */
Expand Down Expand Up @@ -89,8 +92,10 @@ define(function() {
pageTitle = "IaC Maturity Gap Analysis: First Federated Bank";
legendTitle = "Banking Platforms";
averageTitle = "Average Maturity - All Systems";
referenceLink = "https://github.com/garystafford/cd-maturity-model";
referenceLinkTitle = "Gary A. Stafford - 2017";
referenceLink1 = "https://github.com/garystafford/cd-maturity-model";
referenceLinkTitle1 = "CD Maturity Model";
referenceLink2 = "https://github.com/garystafford/cd-maturity-model";
referenceLinkTitle2 = "Gary A. Stafford - 2017";

applications = [
"Commercial Lending",
Expand Down Expand Up @@ -187,44 +192,44 @@ define(function() {
"value": -1
}],
[{ //Mobile Banking
"app": applications[3],
"app": applications[4],
"axis": CATEGORIES[0],
"value": 0
}, {
"app": applications[3],
"app": applications[4],
"axis": CATEGORIES[1],
"value": 2
}, {
"app": applications[3],
"app": applications[4],
"axis": CATEGORIES[2],
"value": 1
}, {
"app": applications[3],
"app": applications[4],
"axis": CATEGORIES[3],
"value": -1
}, {
"app": applications[3],
"app": applications[4],
"axis": CATEGORIES[4],
"value": 0
}],
[{ //Risk Management
"app": applications[3],
"app": applications[5],
"axis": CATEGORIES[0],
"value": 1
}, {
"app": applications[3],
"app": applications[5],
"axis": CATEGORIES[1],
"value": 1
}, {
"app": applications[3],
"app": applications[5],
"axis": CATEGORIES[2],
"value": -1
}, {
"app": applications[3],
"app": applications[5],
"axis": CATEGORIES[3],
"value": 0
}, {
"app": applications[3],
"app": applications[5],
"axis": CATEGORIES[4],
"value": 2
}]
Expand All @@ -235,8 +240,10 @@ define(function() {
legendTitle: legendTitle,
averageTitle: averageTitle,
idAverageCategories: ID_AVERAGE_CATEGORIES,
referenceLink: referenceLink,
referenceLinkTitle: referenceLinkTitle,
referenceLink1: referenceLink1,
referenceLinkTitle1: referenceLinkTitle1,
referenceLink2: referenceLink2,
referenceLinkTitle2: referenceLinkTitle2,
maturityLevels: MATURITY_LEVELS,
categoryCount: CATEGORY_COUNT,
categories: CATEGORIES,
Expand Down
4 changes: 2 additions & 2 deletions js/radar/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ define(["dataRadar", "d3", "./transform"],
// Values can be overridden from setup.config object passed to draw.options param
cfg = {
radius: 5,
w: 600,
h: 600,
w: 800,
h: 800,
factor: 1,
factorLegend: 0.85,
levels: 3,
Expand Down
18 changes: 9 additions & 9 deletions js/radar/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
data, draw, enter, getAppNames, getCategoryAvgs, getElementById,
getElementsByClassName, getLegendNames, getSelectedData, getSingleDataSet, h,
height, htmlFor, id, idAverageCategories, indexOf, innerHTML, legendTitle, length,
levels, maxValue, name, onclick, pageTitle, push, referenceLinkTitle,
referenceLink, scale, select, selectAll, setAttribute, splice, style, text, type,
value, w, width
levels, maxValue, name, onclick, pageTitle, push, referenceLinkTitle1,
referenceLinkTitle2, referenceLink1, referenceLink2, scale, select, selectAll,
setAttribute, splice, style, text, type, value, w, width
*/

/*global d3, dataRadar, transform, document, radar, define */
Expand Down Expand Up @@ -49,11 +49,11 @@ define(["dataRadar", "d3", "./transform", "./radar"],

//Options for the Radar chart, other than default
config = {
w: 450,
h: 450,
w: 600,
h: 600,
maxValue: 100,
levels: 5,
ExtraWidthX: 550
ExtraWidthX: 650
};

//Initiate legend
Expand Down Expand Up @@ -265,7 +265,7 @@ define(["dataRadar", "d3", "./transform", "./radar"],

createModelPopup = function() {
var newPara = document.createElement("p");
newPara.innerHTML = "IaC Maturity Model";
newPara.innerHTML = dataRadar.referenceLinkTitle1;
newPara.className = "footerLinks";
newPara.addEventListener("click", function() {
if (document.getElementById("model").className === "showModel") {
Expand Down Expand Up @@ -295,8 +295,8 @@ define(["dataRadar", "d3", "./transform", "./radar"],
createRefLink = function() {
var newLink = document.createElement("a");
newLink.className = "footerLinks";
newLink.setAttribute("href", dataRadar.referenceLink);
newLink.innerHTML = dataRadar.referenceLinkTitle;
newLink.setAttribute("href", dataRadar.referenceLink2);
newLink.innerHTML = dataRadar.referenceLinkTitle2;
document.getElementById("footer")
.appendChild(newLink);
};
Expand Down

0 comments on commit 5f35d3f

Please sign in to comment.