Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
91b71418
Commit
91b71418
authored
Feb 22, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parchado de errores
parent
ac0a5e60
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
240 additions
and
220 deletions
+240
-220
aside.html
administration/templates/aside.html
+2
-2
users_table.html
administration/templates/users_table.html
+2
-2
repsat_test_dev
reports/static/reports/tmpImages/repsat_test_dev
+1
-1
L2ASCL_data.html
reports/templates/L2ASCL_data.html
+77
-208
Reports.html
reports/templates/Reports.html
+6
-7
aside.html
reports/templates/aside.html
+140
-0
views.py
reports/views.py
+12
-0
No files found.
administration/templates/aside.html
View file @
91b71418
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<br>
<br>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<li>
<li>
<a
class=
"treeview "
href=
"{{ BASE_URL }}/
catalog
"
>
<a
class=
"treeview "
href=
"{{ BASE_URL }}/
administration
"
>
<i
class=
"fa fa-map"
></i>
<i
class=
"fa fa-map"
></i>
<span>
Home
</span>
<span>
Home
</span>
<span
class=
"pull-right-container"
>
<span
class=
"pull-right-container"
>
...
...
administration/templates/users_table.html
View file @
91b71418
...
@@ -160,8 +160,8 @@
...
@@ -160,8 +160,8 @@
{%
if
user
.
superuser =
=
True
%}
checked
{%
endif
%}
>
{%
if
user
.
superuser =
=
True
%}
checked
{%
endif
%}
>
</td>
</td>
<td>
<td>
<button
type=
"submit"
class=
"btn btn-success"
><i
class=
"fa fa-save"
></i></button>
<button
t
itle=
"save"
t
ype=
"submit"
class=
"btn btn-success"
><i
class=
"fa fa-save"
></i></button>
<
a
href=
"#"
class=
"btn btn-danger"
><i
class=
"fa fa-trash"
></i></a
>
<
!--a href="#" class="btn btn-danger"><i class="fa fa-trash"></i></a--
>
</td>
</td>
</form>
</form>
</tr>
</tr>
...
...
reports/static/reports/tmpImages/repsat_test_dev
View file @
91b71418
/home/emmanuelhp/NAS/repsat_test_dev
/home/ulises/NAS/repsat_test_dev
\ No newline at end of file
\ No newline at end of file
reports/templates/L2ASCL_data.html
View file @
91b71418
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/body.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/body.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'reports/css/scldata.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'reports/css/scldata.css' %}"
type=
"text/css"
>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"
/>
<script
type=
"text/javascript"
src=
"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"
></script>
{% endblock %}
{% endblock %}
...
@@ -104,146 +104,7 @@
...
@@ -104,146 +104,7 @@
</ul>
</ul>
{% endblock %}
{% endblock %}
{% block sidebar %}
{% block sidebar %}
<div
class=
"form-group"
>
{% include 'aside.html' %}
<br>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<li>
<a
class=
"treeview "
href=
"{{ BASE_URL }}/catalog"
>
<i
class=
"fa fa-map"
></i>
<span>
Home
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li
class=
"treeview"
>
<a
href=
"#"
>
<i
class=
"fa fa-file-archive-o"
></i>
<span>
Report
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
<ul
class=
"treeview-menu sidebar-form"
>
{% for folder in folders %}
<li>
<a
class=
"treeview submenu"
href=
"{{ folder }}_sclData"
>
<i
class=
"fa fa-pie-chart"
></i>
<span>
{{ folder }}
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
{% endfor %}
</ul>
</li>
<li
class=
"treeview"
>
<a
href=
"#"
>
<i
class=
"fa fa-area-chart"
></i>
<span>
Chart Type
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
<ul
class=
"treeview-menu sidebar-form"
>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('line')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Line Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('bar')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Bar Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('bubble')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Bubble Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('polarArea')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Polar Area Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('doughnut')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Doughnut Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('pie')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Pie Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('radar')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Radar Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
</ul>
</li>
<li
class=
"treeview"
>
<a
href=
"#"
>
<i
class=
"fa fa-download"
></i>
<span>
Download as
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
<ul
class=
"treeview-menu sidebar-form"
>
<li>
<a
class=
"treeview submenu"
href=
"#"
>
<i
class=
"fa fa-file-code-o"
></i>
<span>
Export to JSON
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
id=
"downloadPdf"
>
<i
class=
"fa fa-file-pdf-o"
></i>
<span>
Export to PDF
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
<!-- form-group-->
<!-- form-group-->
{% endblock %}
{% endblock %}
{% block user %}
{% block user %}
...
@@ -267,22 +128,22 @@
...
@@ -267,22 +128,22 @@
<div
class=
"box-body with-border"
>
<div
class=
"box-body with-border"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-lg-2 text-center"
>
<div
class=
"col-lg-2 text-center"
>
<h4>
Zone: {{
zone
}}
</h4>
<h4>
Zone: {{
zone
}}
</h4>
</div>
</div>
<div
class=
"col-lg-2 text-center"
>
<div
class=
"col-lg-2 text-center"
>
<h4>
Platform: {{
platform
}}
</h4>
<h4>
Platform: {{
platform
}}
</h4>
</div>
</div>
<div
class=
"col-lg-2 text-center"
>
<div
class=
"col-lg-2 text-center"
>
<h4>
Product level: {{
productLevel
}}
</h4>
<h4>
Product level: {{
productLevel
}}
</h4>
</div>
</div>
<div
class=
"col-lg-2 text-center"
>
<div
class=
"col-lg-2 text-center"
>
<h4>
Start date: {{
startDate
}}
</h4>
<h4>
Start date: {{
startDate
}}
</h4>
</div>
</div>
<div
class=
"col-lg-2 text-center"
>
<div
class=
"col-lg-2 text-center"
>
<h4>
End date: {{
endDate
}}
</h4>
<h4>
End date: {{
endDate
}}
</h4>
</div>
</div>
<div
class=
"col-lg-2 text-center"
>
<div
class=
"col-lg-2 text-center"
>
<h4>
Clouds: {{
clouds
}}
</h4>
<h4>
Clouds: {{
clouds
}}
</h4>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -321,15 +182,17 @@
...
@@ -321,15 +182,17 @@
<div
class=
"box box-danger"
>
<div
class=
"box box-danger"
>
<div
class=
"box-header with-border"
>
<div
class=
"box-header with-border"
>
<div
class=
"pull-left"
>
<div
class=
"pull-left"
>
<button
type=
"button"
id=
"play"
class=
"btn btn-block btn-primary btn-xs"
style=
""
onclick=
"play()"
>
<button
type=
"button"
id=
"play"
class=
"btn btn-block btn-primary btn-xs"
style=
""
onclick=
"play()"
>
<i
class=
"fa fa-play"
></i>
Play
<i
class=
"fa fa-play"
></i>
Play
</button>
</button>
<button
type=
"button"
id=
"stop"
class=
"btn btn-block btn-primary btn-xs"
style=
"display: none; margin: 0px;"
onclick=
"stop()"
>
<button
type=
"button"
id=
"stop"
class=
"btn btn-block btn-primary btn-xs"
style=
"display: none; margin: 0px;"
onclick=
"stop()"
>
<i
class=
"fa fa-stop"
></i>
Stop
<i
class=
"fa fa-stop"
></i>
Stop
</button>
</button>
</div>
</div>
<!-- <h3 class="box-title" id="titleMap">{{dafaultLabel}} - {{defaultDataSet}}</h3> -->
<!-- <h3 class="box-title" id="titleMap">{{dafaultLabel}} - {{defaultDataSet}}</h3> -->
<h3
class=
"box-title"
id=
"titleMap"
>
{{
defaultDataSet
}}
</h3>
<h3
class=
"box-title"
id=
"titleMap"
>
{{
defaultDataSet
}}
</h3>
<div
class=
"box-tools pull-right"
>
<div
class=
"box-tools pull-right"
>
<button
type=
"button"
class=
"btn btn-box-tool"
data-widget=
"collapse"
><i
<button
type=
"button"
class=
"btn btn-box-tool"
data-widget=
"collapse"
><i
...
@@ -345,8 +208,10 @@
...
@@ -345,8 +208,10 @@
<i
class=
"glyphicon glyphicon-chevron-left"
onclick=
"prev()"
></i>
<i
class=
"glyphicon glyphicon-chevron-left"
onclick=
"prev()"
></i>
</div>
</div>
<div
class=
"col-lg-10 col-md-9 col-xs-10 col-lg-offset-1"
id=
"showImage"
>
<div
class=
"col-lg-10 col-md-9 col-xs-10 col-lg-offset-1"
id=
"showImage"
>
<img
onclick=
"window.open(this.src)"
class=
"img-responsive"
id=
"satImage"
width=
"400"
<img
onclick=
"window.open(this.src)"
class=
"img-responsive"
id=
"satImage"
height=
"400px"
src =
"../../static/reports/tmpImages/repsat_test_dev/{{IMAGE_PATH}}{{dafaultLabel}}_TCI_60m.jpg"
width=
"400"
height=
"400px"
src=
"../../static/reports/tmpImages/repsat_test_dev/
{{ IMAGE_PATH }}{{ dafaultLabel }}_TCI_60m.jpg"
style=
"margin-left: auto; margin-right: auto; display: block;"
>
style=
"margin-left: auto; margin-right: auto; display: block;"
>
</div>
</div>
<div
class=
"col-lg-1 col-md-1 col-xs-1 next"
style=
"display: none"
>
<div
class=
"col-lg-1 col-md-1 col-xs-1 next"
style=
"display: none"
>
...
@@ -407,7 +272,7 @@
...
@@ -407,7 +272,7 @@
</div>
</div>
<!-- Copyright -->
<!-- Copyright -->
</footer>
</footer>
<!-- Footer -->
<!-- Footer -->
<!-- /.content -->
<!-- /.content -->
...
@@ -444,10 +309,10 @@
...
@@ -444,10 +309,10 @@
var
firstPoint
=
activePoint
[
0
];
var
firstPoint
=
activePoint
[
0
];
var
label
=
myChart
.
data
.
labels
[
firstPoint
.
_index
];
var
label
=
myChart
.
data
.
labels
[
firstPoint
.
_index
];
//if (!firstPoint) return;
//if (!firstPoint) return;
activePoints
.
forEach
(
function
(
value
,
index
)
{
activePoints
.
forEach
(
function
(
value
,
index
)
{
//if(value==firstPoint){
//if(value==firstPoint){
if
(
value
==
label
)
{
if
(
value
==
label
)
{
imageNumber
=
index
;
imageNumber
=
index
;
}
}
});
});
...
@@ -458,18 +323,21 @@
...
@@ -458,18 +323,21 @@
//document.getElementById("satImage").src = "{{ IMAGE_PATH }}"+label+"_TCI_60m.jpg";
//document.getElementById("satImage").src = "{{ IMAGE_PATH }}"+label+"_TCI_60m.jpg";
};
};
function
play
(){
function
play
()
{
$
(
"#play"
).
hide
();
$
(
"#play"
).
hide
();
$
(
"#stop"
).
show
();
$
(
"#stop"
).
show
();
// $(".next").hide();
// $(".next").hide();
// $(".prev").hide();
// $(".prev").hide();
// $("#showImage").addClass('col-lg-offset-1');
// $("#showImage").addClass('col-lg-offset-1');
playImages
=
setInterval
(()
=>
{
playImages
=
setInterval
(()
=
>
{
next
();
next
();
},
4000
);
},
4000
)
;
}
}
function
stop
(){
function
stop
()
{
clearInterval
(
playImages
)
clearInterval
(
playImages
)
// $("#showImage").removeClass('col-lg-offset-1');
// $("#showImage").removeClass('col-lg-offset-1');
$
(
"#play"
).
show
();
$
(
"#play"
).
show
();
...
@@ -477,11 +345,12 @@
...
@@ -477,11 +345,12 @@
// $(".next").show();
// $(".next").show();
// $(".prev").show();
// $(".prev").show();
}
}
// cambiar el tipo de gráfica
// cambiar el tipo de gráfica
function
next
(){
function
next
()
{
if
(
imageNumber
==
(
activePoints
.
length
-
1
))
{
if
(
imageNumber
==
(
activePoints
.
length
-
1
))
{
imageNumber
=
0
;
imageNumber
=
0
;
}
else
{
}
else
{
imageNumber
++
;
imageNumber
++
;
}
}
var
imagePoint
=
activePoints
[
imageNumber
];
var
imagePoint
=
activePoints
[
imageNumber
];
...
@@ -503,12 +372,12 @@
...
@@ -503,12 +372,12 @@
updateImage
(
imagePoint
);
updateImage
(
imagePoint
);
}
}
function
updateImage
(
imagePoint
){
function
updateImage
(
imagePoint
)
{
//label = myChart.data.labels[imagePoint._index];
//label = myChart.data.labels[imagePoint._index];
//datasets = myChart.data.datasets[imagePoint._datasetIndex].label;
//datasets = myChart.data.datasets[imagePoint._datasetIndex].label;
//document.getElementById("titleMap").innerHTML = label + " - " + datasets;
//document.getElementById("titleMap").innerHTML = label + " - " + datasets;
label
=
imagePoint
;
label
=
imagePoint
;
titleLabel
=
label
.
slice
(
0
,
4
)
+
"/"
+
label
.
slice
(
4
,
6
)
+
"/"
+
label
.
slice
(
6
);
titleLabel
=
label
.
slice
(
0
,
4
)
+
"/"
+
label
.
slice
(
4
,
6
)
+
"/"
+
label
.
slice
(
6
);
document
.
getElementById
(
"titleMap"
).
innerHTML
=
titleLabel
;
document
.
getElementById
(
"titleMap"
).
innerHTML
=
titleLabel
;
document
.
getElementById
(
"satImage"
).
src
=
"../../static/reports/tmpImages/repsat_test_dev/{{IMAGE_PATH}}"
+
label
+
"_TCI_60m.jpg"
document
.
getElementById
(
"satImage"
).
src
=
"../../static/reports/tmpImages/repsat_test_dev/{{IMAGE_PATH}}"
+
label
+
"_TCI_60m.jpg"
}
}
...
@@ -526,8 +395,8 @@
...
@@ -526,8 +395,8 @@
var
temp
=
jQuery
.
extend
(
true
,
{},
config
);
var
temp
=
jQuery
.
extend
(
true
,
{},
config
);
temp
.
type
=
newType
;
temp
.
type
=
newType
;
if
(
newType
==
'radar'
||
newType
==
'pie'
||
newType
==
'polarArea'
||
newType
==
'doughnut'
)
{
if
(
newType
==
'radar'
||
newType
==
'pie'
||
newType
==
'polarArea'
||
newType
==
'doughnut'
)
{
temp
.
options
.
scales
.
xAxes
=
{
"display"
:
false
};
temp
.
options
.
scales
.
xAxes
=
{
"display"
:
false
};
temp
.
options
.
scales
.
yAxes
=
{
"display"
:
false
};
temp
.
options
.
scales
.
yAxes
=
{
"display"
:
false
};
}
}
...
...
reports/templates/Reports.html
View file @
91b71418
...
@@ -173,11 +173,9 @@
...
@@ -173,11 +173,9 @@
<i
class=
"fa fa-eye"
></i>
<i
class=
"fa fa-eye"
></i>
</a>
</a>
<a
title=
"Download zip"
{%
if
product
.
progress =
=
100
%}
<a
title=
"Download zip"
{%
if
product
.
progress =
=
100
%}
href=
"#"
href=
"../../static/reports/tmpImages/repsat_test_dev/{{ request.user.email }}/{{ product.purchase_id }}/myzip.zip"
disabled
{%
else
%}
{%
else
%}
href=
"#"
href=
"#"
disabled
{%
endif
%}
class=
"btn btn-warning"
>
{%
endif
%}
class=
"btn btn-warning"
>
<i
class=
"fa fa-file-zip-o"
></i>
<i
class=
"fa fa-file-zip-o"
></i>
</a>
</a>
...
@@ -233,5 +231,6 @@
...
@@ -233,5 +231,6 @@
<!-- /.modals -->
<!-- /.modals -->
{% endblock %}
{% endblock %}
{% block scripts %}
{% block scripts %}
<script
src=
"{% static 'reports/js/Reports_scripts.js' %}"
></script>
<script
src=
"{% static 'reports/js/Reports_scripts.js' %}"
>
</script>
{% endblock %}
{% endblock %}
reports/templates/aside.html
0 → 100644
View file @
91b71418
<div
class=
"form-group"
>
<br>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<li>
<a
class=
"treeview "
href=
"{{ BASE_URL }}/reports"
>
<i
class=
"fa fa-map"
></i>
<span>
Home
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li
class=
"treeview"
>
<a
href=
"#"
>
<i
class=
"fa fa-file-archive-o"
></i>
<span>
Report
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
<ul
class=
"treeview-menu sidebar-form"
>
{% for folder in folders %}
<li>
<a
class=
"treeview submenu"
href=
"{{ folder }}_sclData"
>
<i
class=
"fa fa-pie-chart"
></i>
<span>
{{ folder }}
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
{% endfor %}
</ul>
</li>
<li
class=
"treeview"
>
<a
href=
"#"
>
<i
class=
"fa fa-area-chart"
></i>
<span>
Chart Type
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
<ul
class=
"treeview-menu sidebar-form"
>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('line')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Line Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('bar')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Bar Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('bubble')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Bubble Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('polarArea')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Polar Area Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('doughnut')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Doughnut Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('pie')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Pie Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('radar')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Radar Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
</ul>
</li>
<li
class=
"treeview"
>
<a
href=
"#"
>
<i
class=
"fa fa-download"
></i>
<span>
Download as
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
<ul
class=
"treeview-menu sidebar-form"
>
<li>
<a
class=
"treeview submenu"
href=
"#"
>
<i
class=
"fa fa-file-code-o"
></i>
<span>
Export to JSON
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
id=
"downloadPdf"
>
<i
class=
"fa fa-file-pdf-o"
></i>
<span>
Export to PDF
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
\ No newline at end of file
reports/views.py
View file @
91b71418
...
@@ -115,6 +115,7 @@ def Reports(request):
...
@@ -115,6 +115,7 @@ def Reports(request):
productList
=
[]
productList
=
[]
size
=
0
size
=
0
folders
=
[]
folders
=
[]
zip
=
""
product_list
=
Purchase
.
objects
.
values
(
'id'
,
'productList'
,
'aggreg_date'
,
'search__clouds'
,
'search__startDate'
,
product_list
=
Purchase
.
objects
.
values
(
'id'
,
'productList'
,
'aggreg_date'
,
'search__clouds'
,
'search__startDate'
,
'search__endDate'
,
'search__process_id__name'
)
.
filter
(
'search__endDate'
,
'search__process_id__name'
)
.
filter
(
user_id
=
request
.
user
.
id
,
purchased
=
1
)
user_id
=
request
.
user
.
id
,
purchased
=
1
)
...
@@ -160,7 +161,16 @@ def Reports(request):
...
@@ -160,7 +161,16 @@ def Reports(request):
else
:
else
:
initial_folder
=
folders
.
pop
(
0
)
+
"_sclData"
initial_folder
=
folders
.
pop
(
0
)
+
"_sclData"
zip_path
=
USERS_PATH
+
request
.
user
.
email
+
"/"
+
str
(
producto
[
'id'
])
#print(zip_path)
#"../ static / reports / tmpImages / repsat_test_dev / umorales @ centrogeo.edu.mx / "+str(producto['id']) / myzip.zip"
for
file
in
os
.
listdir
(
path
=
zip_path
):
if
file
.
endswith
(
".zip"
):
print
(
file
)
zip
=
zip_path
+
"/"
+
file
print
(
zip
)
productList
.
append
({
productList
.
append
({
"process"
:
producto
[
'search__process_id__name'
],
"process"
:
producto
[
'search__process_id__name'
],
"purchase_date"
:
producto
[
'aggreg_date'
],
"purchase_date"
:
producto
[
'aggreg_date'
],
...
@@ -172,12 +182,14 @@ def Reports(request):
...
@@ -172,12 +182,14 @@ def Reports(request):
"progress"
:
progress
,
"progress"
:
progress
,
"log_info"
:
log
,
"log_info"
:
log
,
"initial_folder"
:
initial_folder
,
"initial_folder"
:
initial_folder
,
"zip"
:
zip
,
})
})
size
=
0
size
=
0
final_size
=
0
final_size
=
0
log_info
=
""
log_info
=
""
progress
=
0
progress
=
0
initial_folder
=
""
initial_folder
=
""
zip
=
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment