From 44c2aaada3e84c3e35b014f0c6dd907a664b6cbc Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Wed, 18 Oct 2023 14:55:16 -0400 Subject: [PATCH 1/3] Remove external references from front end deps use secure transfer for jsonschema reference --- app/classes/web/routes/api/servers/index.py | 2 +- .../vendors/css/bootstrap-toggle.min.css | 28 + .../static/assets/vendors/js/bootbox.min.js | 1 + .../assets/vendors/js/bootstrap-select.min.js | 9 + .../assets/vendors/js/bootstrap-toggle.min.js | 9 + .../static/assets/vendors/js/chart.min.js | 13 + .../vendors/js/chartjs-plugin-zoom.min.js | 7 + .../assets/vendors/js/datatables.min.js | 491 ++++++++++++++++++ .../static/assets/vendors/js/hammer.min.js | 7 + .../static/assets/vendors/js/jquery.min.js | 5 + app/frontend/templates/base.html | 16 +- app/frontend/templates/panel/config_json.html | 2 +- .../templates/panel/server_webhook_edit.html | 3 +- 13 files changed, 581 insertions(+), 12 deletions(-) create mode 100644 app/frontend/static/assets/vendors/css/bootstrap-toggle.min.css create mode 100644 app/frontend/static/assets/vendors/js/bootbox.min.js create mode 100644 app/frontend/static/assets/vendors/js/bootstrap-select.min.js create mode 100644 app/frontend/static/assets/vendors/js/bootstrap-toggle.min.js create mode 100644 app/frontend/static/assets/vendors/js/chart.min.js create mode 100644 app/frontend/static/assets/vendors/js/chartjs-plugin-zoom.min.js create mode 100644 app/frontend/static/assets/vendors/js/datatables.min.js create mode 100644 app/frontend/static/assets/vendors/js/hammer.min.js create mode 100644 app/frontend/static/assets/vendors/js/jquery.min.js diff --git a/app/classes/web/routes/api/servers/index.py b/app/classes/web/routes/api/servers/index.py index d468f979..31dbd4c6 100644 --- a/app/classes/web/routes/api/servers/index.py +++ b/app/classes/web/routes/api/servers/index.py @@ -9,7 +9,7 @@ logger = logging.getLogger(__name__) new_server_schema = { "definitions": {}, - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "title": "Root", "type": "object", "required": [ diff --git a/app/frontend/static/assets/vendors/css/bootstrap-toggle.min.css b/app/frontend/static/assets/vendors/css/bootstrap-toggle.min.css new file mode 100644 index 00000000..0d42ed09 --- /dev/null +++ b/app/frontend/static/assets/vendors/css/bootstrap-toggle.min.css @@ -0,0 +1,28 @@ +/*! ======================================================================== + * Bootstrap Toggle: bootstrap-toggle.css v2.2.0 + * http://www.bootstraptoggle.com + * ======================================================================== + * Copyright 2014 Min Hur, The New York Times Company + * Licensed under MIT + * ======================================================================== */ +.checkbox label .toggle,.checkbox-inline .toggle{margin-left:-20px;margin-right:5px} +.toggle{position:relative;overflow:hidden} +.toggle input[type=checkbox]{display:none} +.toggle-group{position:absolute;width:200%;top:0;bottom:0;left:0;transition:left .35s;-webkit-transition:left .35s;-moz-user-select:none;-webkit-user-select:none} +.toggle.off .toggle-group{left:-100%} +.toggle-on{position:absolute;top:0;bottom:0;left:0;right:50%;margin:0;border:0;border-radius:0} +.toggle-off{position:absolute;top:0;bottom:0;left:50%;right:0;margin:0;border:0;border-radius:0} +.toggle-handle{position:relative;margin:0 auto;padding-top:0;padding-bottom:0;height:100%;width:0;border-width:0 1px} +.toggle.btn{min-width:59px;min-height:34px} +.toggle-on.btn{padding-right:24px} +.toggle-off.btn{padding-left:24px} +.toggle.btn-lg{min-width:79px;min-height:45px} +.toggle-on.btn-lg{padding-right:31px} +.toggle-off.btn-lg{padding-left:31px} +.toggle-handle.btn-lg{width:40px} +.toggle.btn-sm{min-width:50px;min-height:30px} +.toggle-on.btn-sm{padding-right:20px} +.toggle-off.btn-sm{padding-left:20px} +.toggle.btn-xs{min-width:35px;min-height:22px} +.toggle-on.btn-xs{padding-right:12px} +.toggle-off.btn-xs{padding-left:12px} \ No newline at end of file diff --git a/app/frontend/static/assets/vendors/js/bootbox.min.js b/app/frontend/static/assets/vendors/js/bootbox.min.js new file mode 100644 index 00000000..8b8a0197 --- /dev/null +++ b/app/frontend/static/assets/vendors/js/bootbox.min.js @@ -0,0 +1 @@ +!function(t,e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):t.bootbox=e(t.jQuery)}(this,function e(p,u){"use strict";var r,n,i,l;Object.keys||(Object.keys=(r=Object.prototype.hasOwnProperty,n=!{toString:null}.propertyIsEnumerable("toString"),l=(i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(t){if("function"!=typeof t&&("object"!=typeof t||null===t))throw new TypeError("Object.keys called on non-object");var e,o,a=[];for(e in t)r.call(t,e)&&a.push(e);if(n)for(o=0;o