Upload SPDX Documents using the button or by dragging and drop
-
+
-
+
@@ -50,7 +50,7 @@
Upload SPDX Documents using the button or by dragging and drop
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
dropArea.addEventListener(eventName, preventDefaults, false)
});
-
+
function preventDefaults (e) {
e.preventDefault()
e.stopPropagation()
@@ -59,19 +59,19 @@
Upload SPDX Documents using the button or by dragging and drop
['dragenter', 'dragover'].forEach(eventName => {
dropArea.addEventListener(eventName, highlight, false)
});
-
+
['dragleave', 'drop'].forEach(eventName => {
dropArea.addEventListener(eventName, unhighlight, false)
});
-
+
function highlight(e) {
dropArea.classList.add('highlight')
}
-
+
function unhighlight(e) {
dropArea.classList.remove('highlight')
}
-
+
dropArea.addEventListener('drop', handleDrop, false)
function handleDrop(e) {
@@ -83,7 +83,7 @@
Upload SPDX Documents using the button or by dragging and drop
function handleFiles(files) {
([...files]).forEach(checkFile)
}
-
+
function checkFile(file){
if(file && selected_files.length<13){
if ($(".file-name").text() == "No file selected"){
@@ -153,7 +153,7 @@
Upload SPDX Documents using the button or by dragging and drop
$("#modal-body").html('
Upload SPDX Documents using the button or by dragging and drop
$("#modal-header").removeClass("green-modal");
try{
var obj = JSON.parse(e.responseText);
+ if (obj.type=="rate_limit"){
+ $("#modal-header").removeClass("red-modal");
+ $("#modal-header").addClass("yellow-modal");
+ $("#modal-title").html("Warning!");
+ $("#modal-body").text(obj.data);
+ }
if (obj.type=="warning"){
$("#modal-header").removeClass("red-modal");
$("#modal-header").addClass("yellow-modal");
@@ -208,7 +214,7 @@
Upload SPDX Documents using the button or by dragging and drop
$("#myModal").modal({
backdrop: 'static',
- keyboard: true,
+ keyboard: true,
show: true
});
$("#comparebutton").text("Compare");
@@ -231,4 +237,4 @@
Upload SPDX Documents using the button or by dragging and drop
});
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/src/app/templates/app/convert.html b/src/app/templates/app/convert.html
index c56c9e20..28e3c50b 100644
--- a/src/app/templates/app/convert.html
+++ b/src/app/templates/app/convert.html
@@ -55,20 +55,20 @@
Upload SPDX Document using the button or by dragging and dropp
-
+
-
+
-->
-
+
-
+
@@ -88,7 +88,7 @@
Upload SPDX Document using the button or by dragging and dropp
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
dropArea.addEventListener(eventName, preventDefaults, false)
});
-
+
function preventDefaults (e) {
e.preventDefault()
e.stopPropagation()
@@ -97,19 +97,19 @@
Upload SPDX Document using the button or by dragging and dropp
['dragenter', 'dragover'].forEach(eventName => {
dropArea.addEventListener(eventName, highlight, false)
});
-
+
['dragleave', 'drop'].forEach(eventName => {
dropArea.addEventListener(eventName, unhighlight, false)
});
-
+
function highlight(e) {
dropArea.classList.add('highlight')
}
-
+
function unhighlight(e) {
dropArea.classList.remove('highlight')
}
-
+
dropArea.addEventListener('drop', handleDrop, false)
function handleDrop(e) {
@@ -121,7 +121,7 @@
Upload SPDX Document using the button or by dragging and dropp
function handleFiles(files) {
([...files]).forEach(checkFile)
}
-
+
function checkFile(file){
if(file){
$(".file-name").html("Selected File: "+file.name);
@@ -264,7 +264,7 @@
Upload SPDX Document using the button or by dragging and dropp
$("#modal-body").html('
Upload SPDX Document using the button or by dragging and dropp
$("#modal-body").text("");
try{
var obj = JSON.parse(e.responseText);
+ if (obj.type=="rate_limit"){
+ $("#modal-header").removeClass("red-modal");
+ $("#modal-header").addClass("yellow-modal");
+ $("#modal-title").html("Warning!");
+ $("#modal-body").text(obj.data);
+ }
if (obj.type=="warning"){
$("#modal-header").removeClass("red-modal");
$("#modal-header").addClass("yellow-modal");
@@ -297,10 +303,10 @@
Upload SPDX Document using the button or by dragging and dropp
$("#modal-title").html("Error!");
$("#modal-body").text("The application could not be connected. Please try later.");
}
-
+
$("#myModal").modal({
backdrop: 'static',
- keyboard: true,
+ keyboard: true,
show: true
});
$("#convertbutton").text("Convert");
@@ -319,4 +325,4 @@
Upload SPDX Document using the button or by dragging and dropp
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/src/app/templates/app/submit_new_license.html b/src/app/templates/app/submit_new_license.html
index 4b1a8157..1b73c820 100644
--- a/src/app/templates/app/submit_new_license.html
+++ b/src/app/templates/app/submit_new_license.html
@@ -244,7 +244,7 @@
$("#modal-header").removeClass("green-modal");
try {
var obj = JSON.parse(e.responseText);
- if (obj.type=="warning"){
+ if (obj.type=="warning" || obj.type=="rate_limit"){
$("#modal-header").removeClass("red-modal");
$("#modal-header").addClass("yellow-modal");
$("#modal-title").html("Warning!");
diff --git a/src/app/templates/app/validate.html b/src/app/templates/app/validate.html
index d582f04c..6314873f 100644
--- a/src/app/templates/app/validate.html
+++ b/src/app/templates/app/validate.html
@@ -23,7 +23,7 @@
Upload file using the button or by dragging and dropping onto the dashed reg
- {% include "app/modal.html" %}
+ {% include "app/modal.html" %}
@@ -40,7 +40,7 @@
Upload file using the button or by dragging and dropping onto the dashed reg
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
dropArea.addEventListener(eventName, preventDefaults, false)
});
-
+
function preventDefaults (e) {
e.preventDefault()
e.stopPropagation()
@@ -49,19 +49,19 @@
Upload file using the button or by dragging and dropping onto the dashed reg
['dragenter', 'dragover'].forEach(eventName => {
dropArea.addEventListener(eventName, highlight, false)
});
-
+
['dragleave', 'drop'].forEach(eventName => {
dropArea.addEventListener(eventName, unhighlight, false)
});
-
+
function highlight(e) {
dropArea.classList.add('highlight')
}
-
+
function unhighlight(e) {
dropArea.classList.remove('highlight')
}
-
+
dropArea.addEventListener('drop', handleDrop, false)
function handleDrop(e) {
@@ -73,7 +73,7 @@
Upload file using the button or by dragging and dropping onto the dashed reg
function handleFiles(files) {
([...files]).forEach(checkFile)
}
-
+
function checkFile(file){
if(file){
$(".file-name").html("Selected File: "+file.name);
@@ -125,7 +125,7 @@
Upload file using the button or by dragging and dropping onto the dashed reg
$("#modal-body").html("
Upload file using the button or by dragging and dropping onto the dashed reg
$("#modal-header").removeClass("green-modal");
try {
var obj = JSON.parse(e.responseText);
- if (obj.type=="warning"){
+ if (obj.type=="warning" || obj.type=="rate_limit"){
$("#modal-header").removeClass("red-modal");
$("#modal-header").addClass("yellow-modal");
$("#modal-title").html("Warning!");
@@ -156,7 +156,7 @@
Upload file using the button or by dragging and dropping onto the dashed reg
}
$("#myModal").modal({
backdrop: 'static',
- keyboard: true,
+ keyboard: true,
show: true
});
$("#validatebutton").text("Validate");
@@ -236,4 +236,4 @@
Upload file using the button or by dragging and dropping onto the dashed reg
-->
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/src/app/templates/app/xml_upload.html b/src/app/templates/app/xml_upload.html
index 2726f337..e42ed7eb 100644
--- a/src/app/templates/app/xml_upload.html
+++ b/src/app/templates/app/xml_upload.html
@@ -28,7 +28,7 @@