From edd6b7d7cfe94d9c35499f6a983d83b4ae1cb849 Mon Sep 17 00:00:00 2001 From: Nanne Baars Date: Sun, 5 Jan 2020 20:22:50 +0100 Subject: [PATCH] Reset lesson bug (#741) * Remove old code from UI * Remove old code * Remove old functions * Remove unnecessary divs * Remove logging to console * Clear lesson messages (checkmark, output text etc) when lesson resets --- .../webgoat/service/LessonPlanService.java | 74 ------- .../service/LessonProgressService.java | 24 --- .../webgoat/service/PluginReloadService.java | 67 ------- .../js/goatApp/controller/LessonController.js | 36 +--- .../js/goatApp/model/LabelDebugModel.js | 1 - .../js/goatApp/model/LessonPlanModel.js | 17 -- .../js/goatApp/model/LessonProgressModel.js | 13 -- .../static/js/goatApp/model/ParamModel.js | 12 -- .../js/goatApp/model/PluginReloadModel.js | 19 -- .../static/js/goatApp/model/SolutionModel.js | 18 -- .../static/js/goatApp/model/SourceModel.js | 19 -- .../js/goatApp/view/DeveloperControlsView.js | 77 ------- .../static/js/goatApp/view/GoatRouter.js | 2 - .../js/goatApp/view/HelpControlsView.js | 8 - .../static/js/goatApp/view/HelpView.js | 23 --- .../static/js/goatApp/view/HintView.js | 1 - .../js/goatApp/view/LessonContentView.js | 7 +- .../js/goatApp/view/LessonOverviewView.js | 57 ------ .../js/goatApp/view/LessonProgressView.js | 26 --- .../static/js/goatApp/view/MenuStageView.js | 14 -- .../static/js/goatApp/view/ParamView.js | 36 ---- .../static/js/goatApp/view/PlanView.js | 25 --- .../static/js/goatApp/view/SolutionView.js | 22 -- .../static/js/goatApp/view/SourceView.js | 21 -- .../main/resources/templates/list_users.html | 189 ------------------ .../main/resources/templates/main_new.html | 33 --- 26 files changed, 9 insertions(+), 832 deletions(-) delete mode 100644 webgoat-container/src/main/java/org/owasp/webgoat/service/LessonPlanService.java delete mode 100644 webgoat-container/src/main/java/org/owasp/webgoat/service/PluginReloadService.java delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/model/LessonPlanModel.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/model/LessonProgressModel.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/model/ParamModel.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/model/PluginReloadModel.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/model/SolutionModel.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/model/SourceModel.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/view/DeveloperControlsView.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/view/HelpView.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/view/LessonOverviewView.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/view/LessonProgressView.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/view/MenuStageView.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/view/ParamView.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/view/PlanView.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/view/SolutionView.js delete mode 100644 webgoat-container/src/main/resources/static/js/goatApp/view/SourceView.js delete mode 100644 webgoat-container/src/main/resources/templates/list_users.html diff --git a/webgoat-container/src/main/java/org/owasp/webgoat/service/LessonPlanService.java b/webgoat-container/src/main/java/org/owasp/webgoat/service/LessonPlanService.java deleted file mode 100644 index 976f583e4..000000000 --- a/webgoat-container/src/main/java/org/owasp/webgoat/service/LessonPlanService.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * ************************************************************************************************* - * - * - * This file is part of WebGoat, an Open Web Application Security Project - * utility. For details, please see http://www.owasp.org/ - * - * Copyright (c) 2002 - 20014 Bruce Mayhew - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Getting Source ============== - * - * Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository - * for free software projects. - * - */ - -package org.owasp.webgoat.service; - -import org.owasp.webgoat.session.WebSession; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; - -/** - *

LessonPlanService class.

- * - * @author rlawson - * @version $Id: $Id - */ -@Controller -//TODO remove -public class LessonPlanService { - - private final WebSession webSession; - - public LessonPlanService(WebSession webSession) { - this.webSession = webSession; - } - - /** - * Returns source for current attack - * - * @return a {@link java.lang.String} object. - */ - @RequestMapping(path = "/service/lessonplan.mvc", produces = "application/html") - public @ResponseBody - String showPlan() { - String plan = getPlan(); - return plan; - } - - /** - * Description of the Method - * - * @return Description of the Return Value - */ - protected String getPlan() { - return "Plan is not available for this lesson."; - } -} diff --git a/webgoat-container/src/main/java/org/owasp/webgoat/service/LessonProgressService.java b/webgoat-container/src/main/java/org/owasp/webgoat/service/LessonProgressService.java index 17b9ae156..8db037a8f 100644 --- a/webgoat-container/src/main/java/org/owasp/webgoat/service/LessonProgressService.java +++ b/webgoat-container/src/main/java/org/owasp/webgoat/service/LessonProgressService.java @@ -31,30 +31,6 @@ public class LessonProgressService { private UserTrackerRepository userTrackerRepository; private WebSession webSession; - /** - *

LessonProgressService.

- * - * @return a {@link LessonInfoModel} object. - */ - @RequestMapping(value = "/service/lessonprogress.mvc", produces = "application/json") - @ResponseBody - public Map getLessonInfo() { - Map json = new HashMap(); - UserTracker userTracker = userTrackerRepository.findByUser(webSession.getUserName()); - if (webSession.getCurrentLesson() != null) { - LessonTracker lessonTracker = userTracker.getLessonTracker(webSession.getCurrentLesson()); - String successMessage = ""; - boolean lessonCompleted = false; - if (lessonTracker != null) { - lessonCompleted = isLessonComplete(lessonTracker.getLessonOverview(), webSession.getCurrentLesson()); - successMessage = "LessonCompleted"; //@todo we still use this?? - } - json.put("lessonCompleted", lessonCompleted); - json.put("successMessage", successMessage); - } - return json; - } - /** * Endpoint for fetching the complete lesson overview which informs the user about whether all the assignments are solved. * Used as the last page of the lesson to generate a lesson overview. diff --git a/webgoat-container/src/main/java/org/owasp/webgoat/service/PluginReloadService.java b/webgoat-container/src/main/java/org/owasp/webgoat/service/PluginReloadService.java deleted file mode 100644 index 917920158..000000000 --- a/webgoat-container/src/main/java/org/owasp/webgoat/service/PluginReloadService.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * ************************************************************************************************* - *

- *

- * This file is part of WebGoat, an Open Web Application Security Project - * utility. For details, please see http://www.owasp.org/ - *

- * Copyright (c) 2002 - 20014 Bruce Mayhew - *

- * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - *

- * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - *

- * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place - Suite 330, Boston, MA 02111-1307, USA. - *

- * Getting Source ============== - *

- * Source for this application is maintained at - * https://github.com/WebGoat/WebGoat, a repository for free software projects. - */ - -package org.owasp.webgoat.service; - -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; - -import javax.servlet.http.HttpSession; -import java.util.HashMap; -import java.util.Map; - -/** - *

PluginReloadService class.

- * - * @author nbaars - * @version $Id: $Id - */ -//TODO REMOVE? -@Controller -public class PluginReloadService { - - /** - * Reload all the plugins - * - * @param session a {@link javax.servlet.http.HttpSession} object. - * @return a {@link org.springframework.http.ResponseEntity} object. - */ - @RequestMapping(path = "/service/reloadplugins.mvc", produces = MediaType.APPLICATION_JSON_VALUE) - public @ResponseBody - ResponseEntity> reloadPlugins(HttpSession session) { - Map result = new HashMap(); - result.put("success", true); - result.put("message", "Plugins reloaded"); - return new ResponseEntity<>(result, HttpStatus.OK); - } -} diff --git a/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js b/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js index f9bfadf6e..1be250906 100644 --- a/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js +++ b/webgoat-container/src/main/resources/static/js/goatApp/controller/LessonController.js @@ -3,22 +3,13 @@ define(['jquery', 'libs/backbone', 'goatApp/model/LessonContentModel', 'goatApp/view/LessonContentView', -// 'goatApp/view/PlanView', -// 'goatApp/view/SourceView', -// 'goatApp/view/SolutionView', 'goatApp/view/HintView', 'goatApp/view/HelpControlsView', - 'goatApp/view/ParamView', - 'goatApp/model/ParamModel', - 'goatApp/view/DeveloperControlsView', 'goatApp/support/GoatUtils', 'goatApp/view/UserAndInfoView', 'goatApp/view/MenuButtonView', 'goatApp/model/LessonInfoModel', - 'goatApp/view/TitleView', - 'goatApp/model/LessonProgressModel', - 'goatApp/view/LessonProgressView', - 'goatApp/view/LessonOverviewView' + 'goatApp/view/TitleView' ], function($, _, @@ -27,27 +18,18 @@ define(['jquery', LessonContentView, HintView, HelpControlsView, - ParamView, - ParamModel, - DeveloperControlsView, GoatUtils, UserAndInfoView, MenuButtonView, LessonInfoModel, - TitleView, - LessonProgressModel, - LessonProgressView, - LessonOverviewView + TitleView ) { 'use strict' var Controller = function(options) { this.lessonContent = new LessonContentModel(); - this.lessonProgressModel = new LessonProgressModel(); - this.lessonProgressView = new LessonProgressView(this.lessonProgressModel); this.lessonContentView = options.lessonContentView; this.titleView = options.titleView; - this.developerControlsView = new DeveloperControlsView(); _.extend(Controller.prototype,Backbone.Events); @@ -107,7 +89,6 @@ define(['jquery', this.listenTo(this.helpControlsView,'hints:show',this.showHintsView); this.listenTo(this.helpControlsView,'lesson:restart',this.restartLesson); - this.listenTo(this.developerControlsView, 'dev:labels', this.restartLesson); this.helpControlsView.render(); this.showHintsView(); @@ -129,18 +110,9 @@ define(['jquery', //TODO: consider moving hintView as child of lessonContentView ... this.createLessonHintView(); - //TODO: instantiate model with values (not sure why was not working before) - var paramModel = new ParamModel({}); - paramModel.set('scrParam',this.lessonContent.get('scrParam')); - paramModel.set('menuParam',this.lessonContent.get('menuParam')); - paramModel.set('stageParam',this.lessonContent.get('stageParam')); - paramModel.set('numParam',this.lessonContent.get('numParam')); - this.paramView = new ParamView({model:paramModel}); - $('.lesson-help').hide(); } //this.trigger('menu:reload'); - this.lessonProgressModel.completed(); }; this.createLessonHintView = function () { @@ -177,6 +149,7 @@ define(['jquery', self.loadLesson(self.name); self.updateMenu(); self.callPaginationUpdate(); + self.lessonContentView.resetLesson(); }); }; @@ -191,8 +164,5 @@ define(['jquery', }; - - - return Controller; }); diff --git a/webgoat-container/src/main/resources/static/js/goatApp/model/LabelDebugModel.js b/webgoat-container/src/main/resources/static/js/goatApp/model/LabelDebugModel.js index dbaa7dd09..62c3eaf6c 100644 --- a/webgoat-container/src/main/resources/static/js/goatApp/model/LabelDebugModel.js +++ b/webgoat-container/src/main/resources/static/js/goatApp/model/LabelDebugModel.js @@ -32,7 +32,6 @@ define([ labelStatusLoaded: function(data) { this.enabled = data.enabled; this.label = this.enabled ? this.labels['disable'] : this.labels['enable']; - this.trigger('plugins:loaded', this, data); } }); diff --git a/webgoat-container/src/main/resources/static/js/goatApp/model/LessonPlanModel.js b/webgoat-container/src/main/resources/static/js/goatApp/model/LessonPlanModel.js deleted file mode 100644 index 7f23e8a46..000000000 --- a/webgoat-container/src/main/resources/static/js/goatApp/model/LessonPlanModel.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['jquery', - 'underscore', - 'backbone', - 'goatApp/model/HTMLContentModel'], - function($, - _, - Backbone, - HTMLContentModel) { - return HTMLContentModel.extend({ - url:'service/lessonplan.mvc', - checkNullModel: function() { - if (this.get('content').indexOf('Could not find lesson plan for') > -1) { - this.set('content',null); - } - } - }); -}); \ No newline at end of file diff --git a/webgoat-container/src/main/resources/static/js/goatApp/model/LessonProgressModel.js b/webgoat-container/src/main/resources/static/js/goatApp/model/LessonProgressModel.js deleted file mode 100644 index 2582583ac..000000000 --- a/webgoat-container/src/main/resources/static/js/goatApp/model/LessonProgressModel.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['jquery', - 'underscore', - 'backbone'], - function ($, - _, - Backbone) { - return Backbone.Model.extend({ - url: 'service/lessonprogress.mvc', - completed: function () { - this.fetch(); - } - }); - }); \ No newline at end of file diff --git a/webgoat-container/src/main/resources/static/js/goatApp/model/ParamModel.js b/webgoat-container/src/main/resources/static/js/goatApp/model/ParamModel.js deleted file mode 100644 index 116c6b696..000000000 --- a/webgoat-container/src/main/resources/static/js/goatApp/model/ParamModel.js +++ /dev/null @@ -1,12 +0,0 @@ -define([ - 'backbone'], - function( - Backbone) { - return Backbone.Model.extend({ - initialize: function(options) { - for (var key in options) { - this.set(key, options.key); - } - } - }); -}); \ No newline at end of file diff --git a/webgoat-container/src/main/resources/static/js/goatApp/model/PluginReloadModel.js b/webgoat-container/src/main/resources/static/js/goatApp/model/PluginReloadModel.js deleted file mode 100644 index d10d583fa..000000000 --- a/webgoat-container/src/main/resources/static/js/goatApp/model/PluginReloadModel.js +++ /dev/null @@ -1,19 +0,0 @@ -define([ - 'backbone'], - function( - Backbone) { - return Backbone.Model.extend({ - url: 'service/reloadplugins.mvc', - id: 'reload-plugins', - label: 'Reload plugins', - - load: function () { - this.fetch().then(this.pluginsLoaded.bind(this)); - }, - - pluginsLoaded: function(data) { - this.trigger('plugins:loaded', this, data); - } - - }); -}); diff --git a/webgoat-container/src/main/resources/static/js/goatApp/model/SolutionModel.js b/webgoat-container/src/main/resources/static/js/goatApp/model/SolutionModel.js deleted file mode 100644 index b7b7561ce..000000000 --- a/webgoat-container/src/main/resources/static/js/goatApp/model/SolutionModel.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['jquery', - 'underscore', - 'backbone', - 'goatApp/model/HTMLContentModel'], - function($, - _, - Backbone, - HTMLContentModel) { - return HTMLContentModel.extend({ - url:'service/solution.mvc', - checkNullModel: function() { - if (this.get('content').indexOf('Could not find the solution file or solution file does not exist') === 0) { - this.set('content',null); - } - } - - }); -}); \ No newline at end of file diff --git a/webgoat-container/src/main/resources/static/js/goatApp/model/SourceModel.js b/webgoat-container/src/main/resources/static/js/goatApp/model/SourceModel.js deleted file mode 100644 index e6fc08625..000000000 --- a/webgoat-container/src/main/resources/static/js/goatApp/model/SourceModel.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['jquery', - 'underscore', - 'backbone', - 'goatApp/model/HTMLContentModel'], - function($, - _, - Backbone, - HTMLContentModel) { - return HTMLContentModel.extend({ - url:'service/source.mvc', - checkNullModel: function () { - //TODO: move this function into HTMLContentModel and make the string a property of this 'child' model - if (this.get('content').indexOf("Could not find the source file or") > -1) { - this.set('content',null); - } - } - - }); -}); \ No newline at end of file diff --git a/webgoat-container/src/main/resources/static/js/goatApp/view/DeveloperControlsView.js b/webgoat-container/src/main/resources/static/js/goatApp/view/DeveloperControlsView.js deleted file mode 100644 index 42d383f52..000000000 --- a/webgoat-container/src/main/resources/static/js/goatApp/view/DeveloperControlsView.js +++ /dev/null @@ -1,77 +0,0 @@ -define(['jquery', - 'underscore', - 'backbone', - 'goatApp/model/PluginReloadModel', - 'goatApp/model/LabelDebugModel'], -function( - $, - _, - Backbone, - PluginReloadModel, - LabelDebugModel) { - return Backbone.View.extend({ - el: '#developer-controls', - - onControlClick: function(model) { - $('#' + model.id).find('td').text('Loading...'); - model.load(); - }, - - onPluginsLoaded: function(model) { - window.location.href = 'welcome.mvc'; - }, - - onLabelsLoaded: function(model) { - this.models[1] = model; - this.render(); - this.trigger('dev:labels') - }, - - initialize: function(options) { - this.addMenuListener(); - this.models = [new PluginReloadModel(), new LabelDebugModel()]; - this.listenTo(this.models[0], 'plugins:loaded', this.onPluginsLoaded); - this.listenTo(this.models[1], 'plugins:loaded', this.onLabelsLoaded); - this.render(); - }, - - addMenuListener: function() { - var showHandler = function(e) { - e.preventDefault(); - $('#developer-control-container').show(); - $(this).text('Hide developer controls').off().on('click', hideHandler); - }; - - var hideHandler = function(e) { - e.preventDefault(); - $('#developer-control-container').hide(); - $(this).text('Show developer controls').off().on('click', showHandler); - }; - - $('a[href="#developer-controls"]').click(showHandler); - }, - - render: function() { - this.$el.html(''); - var table = $('',{'class':'developer-controls-table table-nonfluid'}); - var self = this; - _.each(this.models, function(model) { - var newRow = $('', { id: model.id }); - var headerCell = $(''); - newRow.append($('
') - var statusCell = $('') - - var link = $('', { - 'text': model.label, - 'title': model.label - }); - link.click(_.bind(self.onControlClick, self, model)); - - newRow.append(headerCell.append(link)); - newRow.append(statusCell); - table.append(newRow); - }); - - this.$el.append(table); - } - }); -}); diff --git a/webgoat-container/src/main/resources/static/js/goatApp/view/GoatRouter.js b/webgoat-container/src/main/resources/static/js/goatApp/view/GoatRouter.js index 84a23334f..21f4cc450 100644 --- a/webgoat-container/src/main/resources/static/js/goatApp/view/GoatRouter.js +++ b/webgoat-container/src/main/resources/static/js/goatApp/view/GoatRouter.js @@ -7,7 +7,6 @@ define(['jquery', 'goatApp/controller/MenuController', 'goatApp/view/LessonContentView', 'goatApp/view/MenuView', - 'goatApp/view/DeveloperControlsView', 'goatApp/view/TitleView' ], function ($, $vuln, @@ -18,7 +17,6 @@ define(['jquery', MenuController, LessonContentView, MenuView, - DeveloperControlsView, TitleView) { function getContentElement() { diff --git a/webgoat-container/src/main/resources/static/js/goatApp/view/HelpControlsView.js b/webgoat-container/src/main/resources/static/js/goatApp/view/HelpControlsView.js index 4986c1284..ea8123bc5 100644 --- a/webgoat-container/src/main/resources/static/js/goatApp/view/HelpControlsView.js +++ b/webgoat-container/src/main/resources/static/js/goatApp/view/HelpControlsView.js @@ -41,14 +41,6 @@ function($,_,Backbone) { this.trigger('hints:show','hint'); }, - showSource: function() { - this.trigger('source:show','source'); - }, - - showSolution: function() { - this.trigger('solution:show','solution'); - }, - restartLesson: function() { this.trigger('lesson:restart'); } diff --git a/webgoat-container/src/main/resources/static/js/goatApp/view/HelpView.js b/webgoat-container/src/main/resources/static/js/goatApp/view/HelpView.js deleted file mode 100644 index f40a1424a..000000000 --- a/webgoat-container/src/main/resources/static/js/goatApp/view/HelpView.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['jquery', - 'underscore', - 'backbone', - 'goatApp/model/SourceModel'], -function($, - _, - Backbone, - SourceModel) { - return Backbone.View.extend({ - el:'#lessonHelpWrapper .lessonHelp.lessonPlan', //Check this - initialize: function() { - this.model = new SourceModel(); - this.listenTo(this.model,'loaded',this.onModelLoaded); - this.model.loadData(); - }, - render:function(title) { - - }, - onModelLoaded: function() { - this.trigger(this.loadedMessage,this.helpElement); - } - }); -}); \ No newline at end of file diff --git a/webgoat-container/src/main/resources/static/js/goatApp/view/HintView.js b/webgoat-container/src/main/resources/static/js/goatApp/view/HintView.js index a1d83ef89..6e8703471 100644 --- a/webgoat-container/src/main/resources/static/js/goatApp/view/HintView.js +++ b/webgoat-container/src/main/resources/static/js/goatApp/view/HintView.js @@ -79,7 +79,6 @@ function($, self.hintsToShow.push(hintModel.get('hint')); } }); - console.log(this.hintsToShow); }, onModelLoaded: function() { diff --git a/webgoat-container/src/main/resources/static/js/goatApp/view/LessonContentView.js b/webgoat-container/src/main/resources/static/js/goatApp/view/LessonContentView.js index 117761108..a9a8779b4 100644 --- a/webgoat-container/src/main/resources/static/js/goatApp/view/LessonContentView.js +++ b/webgoat-container/src/main/resources/static/js/goatApp/view/LessonContentView.js @@ -186,7 +186,6 @@ define(['jquery', for (var i=0; i',{'class':'param-table table-striped table-nonfluid'}); - var self = this; - _.each(this.model.keys(), function(attribute) { - var attributeLabel = attribute.replace(/Param/,''); - var newRow = $('
',{text:_.escape(attributeLabel)})) - newRow.append($('',{text:_.escape(self.model.get(attribute))})); - paramsTable.append(newRow); - }); - - this.$el.append($('

',{text:'Parameters'})); - this.$el.append(paramsTable); - } - }); -}); \ No newline at end of file diff --git a/webgoat-container/src/main/resources/static/js/goatApp/view/PlanView.js b/webgoat-container/src/main/resources/static/js/goatApp/view/PlanView.js deleted file mode 100644 index 557969e5e..000000000 --- a/webgoat-container/src/main/resources/static/js/goatApp/view/PlanView.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['jquery', - 'underscore', - 'backbone', - 'goatApp/model/LessonPlanModel'], -function($, - _, - Backbone, - LessonPlanModel) { - return Backbone.View.extend({ - el:'#lessonHelpWrapper .lessonHelp.lessonPlan', //Check this - initialize: function() { - this.model = new LessonPlanModel(); - this.listenTo(this.model,'loaded',this.onModelLoaded); - this.model.loadData(); - }, - - render:function(title) { - - }, - - onModelLoaded: function() { - this.trigger('plan:loaded',{'helpElement':'plan','value':true}); - } - }); -}); \ No newline at end of file diff --git a/webgoat-container/src/main/resources/static/js/goatApp/view/SolutionView.js b/webgoat-container/src/main/resources/static/js/goatApp/view/SolutionView.js deleted file mode 100644 index 25a8df293..000000000 --- a/webgoat-container/src/main/resources/static/js/goatApp/view/SolutionView.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['jquery', - 'underscore', - 'backbone', - 'goatApp/model/SolutionModel'], - //TODO: create a base 'HelpView class' -function($,_,Backbone,SolutionModel) { - return Backbone.View.extend({ - el:'#lessonHelpWrapper .lessonHelp.lessonSolution', //Check this - initialize: function() { - this.model = new SolutionModel(); - this.listenTo(this.model,'loaded',this.onModelLoaded); - this.model.loadData(); - //TODO: handle error cases - }, - render:function(title) { - - }, - onModelLoaded: function() { - this.trigger('solution:loaded',{'helpElement':'solution','value':true}); - } - }); -}); \ No newline at end of file diff --git a/webgoat-container/src/main/resources/static/js/goatApp/view/SourceView.js b/webgoat-container/src/main/resources/static/js/goatApp/view/SourceView.js deleted file mode 100644 index 10c5a9ada..000000000 --- a/webgoat-container/src/main/resources/static/js/goatApp/view/SourceView.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['jquery', - 'underscore', - 'backbone', - 'goatApp/model/SourceModel', - 'goatApp/view/HelpView'], -function($, - _, - Backbone, - SourceModel, - HelpView) { - return HelpView.extend({ - helpElement:{'helpElement':'source','value':true}, - loadedMessage:'source:loaded', - el:'#lessonHelpWrapper .lessonHelp.lessonPlan', //Check this - initialize: function() { - this.model = new SourceModel(); - this.listenTo(this.model,'loaded',this.onModelLoaded); - this.model.loadData(); - } - }); -}); \ No newline at end of file diff --git a/webgoat-container/src/main/resources/templates/list_users.html b/webgoat-container/src/main/resources/templates/list_users.html deleted file mode 100644 index 050c85dc7..000000000 --- a/webgoat-container/src/main/resources/templates/list_users.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -