Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions examples/nodegoat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Node modules
node_modules

# Logs and databases
*.log
*.db

# OS files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?

# Idea stuff
.idea/**

# Zap output
report*.html

# e2e
test/e2e/screenshots/
test/e2e/videos/

# ignore sensitive files
.env.local
.env

# ignore Snyk Code scanner files
.dccache
2 changes: 2 additions & 0 deletions examples/nodegoat/.jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
app/assets/vendor/
39 changes: 39 additions & 0 deletions examples/nodegoat/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment.
"browser": true, // Standard browser globals e.g. `window`, `document`.
"esversion": 9, // Allow EcmaScript 9 syntax.
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.).
"camelcase": true, // Permit only camelcase for `var` and `object indexes`.
"curly": false, // Require {} for every new block or scope.
"eqeqeq": true, // Require triple equals i.e. `===`.
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`.
"latedef": true, // Prohibit variable use before definition.
"newcap": true, // Require capitalization of all constructor functions e.g. `new F()`.
"noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"quotmark": "double", // Define quotes to string values.
"regexp": true, // Prohibit `.` and `[^...]` in regular expressions.
"undef": true, // Require all non-global variables be declared before they are used.
"unused": false, // Warn unused variables.
"strict": true, // Require `use strict` pragma in every file.
"trailing": true, // Prohibit trailing whitespaces.
"smarttabs": false, // Suppresses warnings about mixed tabs and spaces.
"indent": 4, // Specify indentation spacing.
"maxlen": 120, // Max line length.
"devel": false, // Allow development statements e.g. `console.log();`.
"noempty": true, // Prohibit use of empty blocks.
"overrides": {
"test/e2e/**": {
"globals": {
"cy": false,
"Cypress": false,
"it": false,
"describe": false,
"before": false,
"after": false,
"beforeEach": false,
"afterEach": false,
"expect": false
}
}
}
}
Binary file added examples/nodegoat/app/assets/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/nodegoat/app/assets/images/owasplogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 120 additions & 0 deletions examples/nodegoat/app/assets/js/chart/chart-data-morris.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
/* globals $, Morris */
$(function() {

"use strict";

if ($("#morris-chart-area").length > 0) {
let oneYearAgo = new Date().getFullYear() - 1,
twoYearsAgo = oneYearAgo - 1,
threeYearsAgo = oneYearAgo - 2;

Morris.Area({
// ID of the element in which to draw the chart.
element: "morris-chart-area",
// Chart data records -- each entry in this array corresponds to a point on the chart.
data: [{
d: threeYearsAgo + "-5-01",
balance: 1020
}, {
d: threeYearsAgo + "-6-02",
balance: 3000
}, {
d: threeYearsAgo + "-7-03",
balance: 5470
}, {
d: threeYearsAgo + "-8-04",
balance: 7000
}, {
d: threeYearsAgo + "-9-05",
balance: 7920
}, {
d: threeYearsAgo + "-10-06",
balance: 12990
}, {
d: threeYearsAgo + "-11-07",
balance: 15000
}, {
d: threeYearsAgo + "-12-08",
balance: 16820
}, {
d: twoYearsAgo + "-1-09",
balance: 15592
}, {
d: twoYearsAgo + "-2-10",
balance: 14250
}, {
d: twoYearsAgo + "-3-11",
balance: 18999
}, {
d: twoYearsAgo + "-4-12",
balance: 19000
}, {
d: twoYearsAgo + "-5-13",
balance: 20778
}, {
d: twoYearsAgo + "-6-14",
balance: 23001
}, {
d: twoYearsAgo + "-7-15",
balance: 30001
}, {
d: twoYearsAgo + "-8-16",
balance: 34500
}, {
d: twoYearsAgo + "-9-17",
balance: 40987
}, {
d: twoYearsAgo + "-10-18",
balance: 38908
}, {
d: twoYearsAgo + "-11-19",
balance: 39000
}, {
d: twoYearsAgo + "-12-20",
balance: 39125
}, {
d: oneYearAgo + "-1-21",
balance: 50200
}, {
d: oneYearAgo + "-2-22",
balance: 56002
}, {
d: oneYearAgo + "-3-23",
balance: 60888
}, {
d: oneYearAgo + "-4-24",
balance: 70897
}, {
d: oneYearAgo + "-5-25",
balance: 79330
}, {
d: oneYearAgo + "-6-26",
balance: 80993
}, {
d: oneYearAgo + "-7-27",
balance: 84000
}, {
d: oneYearAgo + "-8-28",
balance: 82098
}, {
d: oneYearAgo + "-9-29",
balance: 86044
}, {
d: oneYearAgo + "-10-30",
balance: 89000
}, {
d: oneYearAgo + "-11-31",
balance: 89925
}],

// The name of the data record attribute that contains x-balances.
xkey: "d",
// A list of names of data record attributes that contain y-balances.
ykeys: ["balance"],
// Labels for the ykeys -- will be displayed when you hover over the chart.
labels: ["Balance ($)"],
// Disables line smoothing
smooth: false
});
}
});
29 changes: 29 additions & 0 deletions examples/nodegoat/app/assets/js/tour/redirects-steps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* globals $, Tour */

const redirectsTour = new Tour({
name: "redirects"
});

redirectsTour.addSteps([{
title: "A10 Redirects",
content: "Contents here",
orphan: true
}, {
element: "#learn-menu-link",
title: "Title of my popover1",
content: "Content of my popover1"
}, {
element: "#profile-menu-link",
title: "Title of my popover ",
content: "Content of my popover"
}, {
element: "#logout-menu-link",
title: "Title of my popover lo ",
content: "Content of my popover oi"
}]);

$("#redirects-tour").on("click", () => {
"use strict";
redirectsTour.init();
redirectsTour.restart();
});
65 changes: 65 additions & 0 deletions examples/nodegoat/app/assets/vendor/bootstrap/bootstrap-tour.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/* ===========================================================
# bootstrap-tour - v0.8.0
# http://bootstraptour.com
# ==============================================================
# Copyright 2012-2013 Ulrich Sossou
#
# 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, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
.tour-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1030;
background-color: #000;
opacity: 0.8;
}
.tour-step-backdrop {
position: relative;
z-index: 1031;
background: inherit;
}
.tour-step-background {
position: absolute;
z-index: 1030;
background: inherit;
border-radius: 6px;
}
.popover[class*="tour-"] {
z-index: 1030;
}
.popover[class*="tour-"] .popover-navigation {
padding: 9px 14px;
}
.popover[class*="tour-"] .popover-navigation *[data-role=end] {
float: right;
}
.popover[class*="tour-"] .popover-navigation *[data-role=prev],
.popover[class*="tour-"] .popover-navigation *[data-role=next],
.popover[class*="tour-"] .popover-navigation *[data-role=end] {
cursor: pointer;
}
.popover[class*="tour-"] .popover-navigation *[data-role=prev].disabled,
.popover[class*="tour-"] .popover-navigation *[data-role=next].disabled,
.popover[class*="tour-"] .popover-navigation *[data-role=end].disabled {
cursor: default;
}
.popover[class*="tour-"].orphan {
position: fixed;
margin-top: 0;
}
.popover[class*="tour-"].orphan .arrow {
display: none;
}
Loading