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
f56c858f
Commit
f56c858f
authored
Mar 13, 2019
by
Emmanuel René Huchim Puc
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab.geoint.mx:mario.chirinos/GeoInt_SIDT into images_map
parents
0ff150d6
41381b9b
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
368 additions
and
209 deletions
+368
-209
views.py
administration/views.py
+4
-4
scldata.css
reports/static/reports/css/scldata.css
+25
-0
reportImg.js
reports/static/reports/js/reportImg.js
+44
-21
L2ASCL_data.html
reports/templates/L2ASCL_data.html
+152
-132
aside.html
reports/templates/aside.html
+9
-0
views.py
reports/views.py
+131
-49
views.py
users/views.py
+3
-3
No files found.
administration/views.py
View file @
f56c858f
...
...
@@ -231,13 +231,13 @@ def to_if(name):
#-----------------------------------------------
def
best_unit_size
(
bytes_size
):
"""
Obtenga un tama
ño en bytes y convié
rtalo en el mejor prefijo IEC para facilitar la lectura.
Obtenga un tama
no en bytes y convie
rtalo en el mejor prefijo IEC para facilitar la lectura.
Devuelva un diccionario con tres pares de claves / valores:
"s" - (flotador) Tama
ño del camino convertido a la mejor unidad para una fá
cil lectura
"s" - (flotador) Tama
no del camino convertido a la mejor unidad para una fa
cil lectura
"u" - (str) El prefijo (IEC) para s (de bytes (2 ^ 0) a YiB (2 ^ 80))
"b" - (int / long) El tama
ñ
o original en bytes
"b" - (int / long) El tama
n
o original en bytes
"""
for
exp
in
range
(
0
,
90
,
10
):
...
...
@@ -249,4 +249,4 @@ def best_unit_size(bytes_size):
return
str
(
round
(
bu_size
,
2
))
+
" "
+
unit
#------------------------------------------------
\ No newline at end of file
reports/static/reports/css/scldata.css
View file @
f56c858f
...
...
@@ -26,11 +26,36 @@ body
height
:
550px
;
/*should be the same height as the images*/
}
.listImg
{
z-index
:
4
;
}
.listImg
ul
{
list-style
:
none
;
padding
:
0px
;
margin
:
0px
;
cursor
:
pointer
;
}
.listImg
ul
li
:hover
{
background
:
#87CEFA
;
}
.listImg
ul
.active
{
color
:
red
}
.list
{
max-height
:
220px
;
overflow
:
auto
;
}
.img-comp-img
{
position
:
absolute
;
width
:
auto
;
height
:
auto
;
overflow
:
hidden
;
z-index
:
2
;
}
.img-comp-img
img
{
...
...
reports/static/reports/js/reportImg.js
View file @
f56c858f
...
...
@@ -13,9 +13,6 @@ var reportImg = activePoints[0];
// mostrar imagen al dar click en los puntos
document
.
getElementById
(
"myChart"
).
onclick
=
function
(
evt
)
{
if
(
slider
!=
false
)
{
deleteComparisons
()
}
stop
();
console
.
log
(
"on click"
)
...
...
@@ -45,8 +42,6 @@ document.getElementById("myChart").onclick = function (evt) {
});
var
imagePoint
=
activePoints
[
imageNumber
];
oldLabel
=
label
.
slice
(
0
,
4
)
+
"/"
+
label
.
slice
(
4
,
6
)
+
"/"
+
label
.
slice
(
6
);
document
.
getElementById
(
"satImageSecond"
).
src
=
"../../static/reports/tmpImages/repsat_test_dev/"
+
image_path
+
label
+
"_TCI_60m.jpg"
updateImage
(
imagePoint
);
//updateImage(firstPoint);
//alert("{{ IMAGE_PATH }}"+label+"_TCI_60m.jpg");
...
...
@@ -62,11 +57,7 @@ function play() {
$
(
"#stop"
).
show
();
// $(".next").hide();
// $(".prev").hide();
// $("#showImage").addClass('col-lg-offset-1');
if
(
slider
==
false
)
{
document
.
getElementById
(
"titleMap"
).
innerHTML
=
oldLabel
+
" vs "
+
oldLabel
;
initComparisons
()
}
// $("#showImage").addClass('col-lg-offset-1');
playImages
=
setInterval
(
function
()
{
next
();
},
4000
);
}
...
...
@@ -129,12 +120,9 @@ function updateImage(imagePoint) {
label
=
imagePoint
;
reportImg
=
imagePoint
;
titleLabel
=
label
.
slice
(
0
,
4
)
+
"/"
+
label
.
slice
(
4
,
6
)
+
"/"
+
label
.
slice
(
6
);
if
(
slider
!=
false
)
{
document
.
getElementById
(
"titleMap"
).
innerHTML
=
oldLabel
+
" vs "
+
titleLabel
;
}
else
{
document
.
getElementById
(
"titleMap"
).
innerHTML
=
titleLabel
;
}
document
.
getElementById
(
"titleMap"
).
innerHTML
=
titleLabel
;
document
.
getElementById
(
"titleSCL"
).
innerHTML
=
titleLabel
document
.
getElementById
(
"satImage"
).
src
=
"../../static/reports/tmpImages/repsat_test_dev/"
+
image_path
+
label
+
"_TCI_60m.jpg"
document
.
getElementById
(
"scl_saturated"
).
src
=
"../../static/reports/tmpImages/repsat_test_dev/"
+
scl_path
+
label
+
"_SCL_60m_saturated.png"
...
...
@@ -175,11 +163,11 @@ function change(newType) {
let
img
,
imgWidth
=
0
,
slider
=
false
,
clicked
=
0
;
function
initComparisons
()
{
$
(
"#showSecondImage"
).
show
()
setTimeout
(
function
()
{
//
$("#showSecondImage").show()
//
setTimeout(function() {
img
=
document
.
getElementsByClassName
(
"img-comp-overlay"
)[
0
];
compareImages
(
img
);
});
//
});
// setTimeout(function(){
// img = document.getElementsByClassName("img-comp-overlay")[0];
// compareImages(img);
...
...
@@ -195,7 +183,7 @@ function compareImages(img) {
img
.
style
.
width
=
((
imgWidth
/
2
))
+
15
+
"px"
;
/*create slider:*/
slider
=
document
.
createElement
(
"DIV"
);
slider
.
setAttribute
(
"class"
,
"img-comp-slider col-lg-offset-
1 col-md-offset-1
col-xs-offset-2"
);
slider
.
setAttribute
(
"class"
,
"img-comp-slider col-lg-offset-
2 col-md-offset-2
col-xs-offset-2"
);
/*insert slider*/
img
.
parentElement
.
insertBefore
(
slider
,
img
);
/*position the slider in the middle:*/
...
...
@@ -266,9 +254,44 @@ function deleteComparisons(){
window
.
removeEventListener
(
"mousemove"
,
slideMove
);
window
.
removeEventListener
(
"touchmove"
,
slideMove
);
$
(
".img-comp-slider"
).
remove
();
$
(
"#showSecondImage"
).
hide
()
slider
=
false
;
}
//deleteComparisons();
//initComparisons();
function
selectImage1
(
date
,
element
)
{
$
(
"#imageListFirst li"
).
removeClass
(
"active"
);
element
.
classList
.
add
(
"active"
);
let
label
=
date
.
toString
();
label
=
label
.
slice
(
0
,
4
)
+
"/"
+
label
.
slice
(
4
,
6
)
+
"/"
+
label
.
slice
(
6
);
document
.
getElementById
(
"titleImageFirst"
).
innerHTML
=
label
;
document
.
getElementById
(
"satImageFirst"
).
src
=
"../../static/reports/tmpImages/repsat_test_dev/"
+
image_path
+
date
+
"_TCI_60m.jpg"
}
function
selectImage2
(
date
,
element
)
{
$
(
"#imageListSecond li"
).
removeClass
(
"active"
);
element
.
classList
.
add
(
"active"
);
let
label
=
date
.
toString
();
label
=
label
.
slice
(
0
,
4
)
+
"/"
+
label
.
slice
(
4
,
6
)
+
"/"
+
label
.
slice
(
6
);
document
.
getElementById
(
"titleImageSecond"
).
innerHTML
=
label
;
document
.
getElementById
(
"satImageSecond"
).
src
=
"../../static/reports/tmpImages/repsat_test_dev/"
+
image_path
+
date
+
"_TCI_60m.jpg"
}
$
(
'.nav-tabs a'
).
on
(
'shown.bs.tab'
,
function
(
evt
)
{
let
tab
=
$
(
evt
.
target
).
text
();
if
(
tab
==
"Comparison"
){
initComparisons
()
}
});
$
(
'.nav-tabs a'
).
on
(
'hide.bs.tab'
,
function
(
evt
)
{
let
tab
=
$
(
evt
.
target
).
text
();
if
(
tab
==
"Comparison"
)
{
deleteComparisons
();
}
if
(
tab
==
"Images"
)
{
stop
();
}
});
reports/templates/L2ASCL_data.html
View file @
f56c858f
This diff is collapsed.
Click to expand it.
reports/templates/aside.html
View file @
f56c858f
...
...
@@ -135,6 +135,15 @@
</span>
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"../../static/reports/tmpImages/repsat_test_dev/{{ request.user.email }}/{{ purchaseID }}/{{ zone }}.pdf"
id=
"downloadPdf"
>
<i
class=
"fa fa-file-pdf-o"
></i>
<span>
Export to PDF v2
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</a>
</li>
</ul>
</li>
<li>
...
...
reports/views.py
View file @
f56c858f
This diff is collapsed.
Click to expand it.
users/views.py
View file @
f56c858f
...
...
@@ -320,13 +320,13 @@ def to_if(name):
# -----------------------------------------------
def
best_unit_size
(
bytes_size
):
"""
Obtenga un tama
ño en bytes y convié
rtalo en el mejor prefijo IEC para facilitar la lectura.
Obtenga un tama
no en bytes y convie
rtalo en el mejor prefijo IEC para facilitar la lectura.
Devuelva un diccionario con tres pares de claves / valores:
"s" - (flotador) Tama
ño del camino convertido a la mejor unidad para una fá
cil lectura
"s" - (flotador) Tama
no del camino convertido a la mejor unidad para una fa
cil lectura
"u" - (str) El prefijo (IEC) para s (de bytes (2 ^ 0) a YiB (2 ^ 80))
"b" - (int / long) El tama
ñ
o original en bytes
"b" - (int / long) El tama
n
o original en bytes
"""
for
exp
in
range
(
0
,
90
,
10
):
...
...
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