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
bb35fe54
Commit
bb35fe54
authored
Mar 28, 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 dev
parents
e5be4d17
242d42f3
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
348 additions
and
110 deletions
+348
-110
crossrange.css
catalog/static/catalog/css/crossrange.css
+91
-0
dataRetrieval.js
catalog/static/catalog/js/dataRetrieval.js
+14
-5
map.html
catalog/templates/map.html
+20
-1
aside.html
reports/templates/aside.html
+0
-11
sclData.html
reports/templates/sclData.html
+2
-3
views.py
reports/views.py
+221
-90
No files found.
catalog/static/catalog/css/crossrange.css
0 → 100644
View file @
bb35fe54
.cross-range
{
-webkit-appearance
:
none
;
width
:
100%
;
margin
:
4.05px
0
;
}
.cross-range
:focus
{
outline
:
none
;
}
.cross-range
::-webkit-slider-runnable-track
{
width
:
100%
;
height
:
7.9px
;
cursor
:
pointer
;
box-shadow
:
1px
1px
1px
#000000
,
0px
0px
1px
#0d0d0d
;
background
:
#dc7828
;
border-radius
:
25px
;
border
:
1px
solid
#dc7828
;
}
.cross-range
::-webkit-slider-thumb
{
box-shadow
:
1px
1px
1px
#000000
,
0px
0px
1px
#0d0d0d
;
border
:
1px
solid
#000000
;
height
:
16px
;
width
:
16px
;
border-radius
:
50px
;
background
:
#ffffff
;
cursor
:
pointer
;
-webkit-appearance
:
none
;
margin-top
:
-5.05px
;
}
.cross-range
:focus::-webkit-slider-runnable-track
{
background
:
#e0863e
;
}
.cross-range
::-moz-range-track
{
width
:
100%
;
height
:
7.9px
;
cursor
:
pointer
;
box-shadow
:
1px
1px
1px
#000000
,
0px
0px
1px
#0d0d0d
;
background
:
#dc7828
;
border-radius
:
25px
;
border
:
1px
solid
#dc7828
;
}
.cross-range
::-moz-range-thumb
{
box-shadow
:
1px
1px
1px
#000000
,
0px
0px
1px
#0d0d0d
;
border
:
1px
solid
#000000
;
height
:
16px
;
width
:
16px
;
border-radius
:
50px
;
background
:
#ffffff
;
cursor
:
pointer
;
}
.cross-range
::-ms-track
{
width
:
100%
;
height
:
7.9px
;
cursor
:
pointer
;
background
:
transparent
;
border-color
:
transparent
;
color
:
transparent
;
}
.cross-range
::-ms-fill-lower
{
background
:
#ca6c21
;
border
:
1px
solid
#dc7828
;
border-radius
:
50px
;
box-shadow
:
1px
1px
1px
#000000
,
0px
0px
1px
#0d0d0d
;
}
.cross-range
::-ms-fill-upper
{
background
:
#dc7828
;
border
:
1px
solid
#dc7828
;
border-radius
:
50px
;
box-shadow
:
1px
1px
1px
#000000
,
0px
0px
1px
#0d0d0d
;
}
.cross-range
::-ms-thumb
{
box-shadow
:
1px
1px
1px
#000000
,
0px
0px
1px
#0d0d0d
;
border
:
1px
solid
#000000
;
height
:
16px
;
width
:
16px
;
border-radius
:
50px
;
background
:
#ffffff
;
cursor
:
pointer
;
height
:
7.9px
;
}
.cross-range
:focus::-ms-fill-lower
{
background
:
#dc7828
;
}
.cross-range
:focus::-ms-fill-upper
{
background
:
#e0863e
;
}
#opacitySlide
{
background
:
transparent
;
padding-left
:
10px
;
padding-right
:
10px
;
}
catalog/static/catalog/js/dataRetrieval.js
View file @
bb35fe54
...
@@ -237,11 +237,15 @@ function drawApiResponse(element) {
...
@@ -237,11 +237,15 @@ function drawApiResponse(element) {
if
(
data
.
uuid
===
element
.
id
.
replace
(
"-li"
,
''
))
{
if
(
data
.
uuid
===
element
.
id
.
replace
(
"-li"
,
''
))
{
console
.
log
(
"footprint:
\n
"
,
data
.
product
.
footprint
);
console
.
log
(
"footprint:
\n
"
,
data
.
product
.
footprint
);
if
(
!
prevfeature
.
has
(
data
.
uuid
)){
if
(
!
prevfeature
.
has
(
data
.
uuid
)){
element
.
style
.
textDecoration
=
'underline'
;
//element.style.textDecoration = 'underline';
let
divh4
=
element
.
children
[
0
].
children
[
1
].
children
[
0
];
divh4
.
innerHTML
=
divh4
.
textContent
+
' <i class="fa fa-eye" style="color:green"> </i>'
;
prevfeature
.
set
(
data
.
uuid
,
osmap
.
addfootprint
(
data
.
product
.
footprint
,
prevfeature
));
prevfeature
.
set
(
data
.
uuid
,
osmap
.
addfootprint
(
data
.
product
.
footprint
,
prevfeature
));
}
else
{
}
else
{
if
(
prevfeature
.
length
!=
0
){
if
(
prevfeature
.
length
!=
0
){
element
.
style
.
textDecoration
=
'none'
;
//element.style.textDecoration = 'none';
let
divh4
=
element
.
children
[
0
].
children
[
1
].
children
[
0
]
divh4
.
innerHTML
=
divh4
.
textContent
+
' <i class="fa fa-eye-slash" style="color: #dd4b39"> </i>'
;
osmap
.
deletefootprint
(
prevfeature
.
get
(
data
.
uuid
));
osmap
.
deletefootprint
(
prevfeature
.
get
(
data
.
uuid
));
prevfeature
.
delete
(
data
.
uuid
);
prevfeature
.
delete
(
data
.
uuid
);
}
}
...
@@ -452,14 +456,13 @@ $(document).ready(function () {
...
@@ -452,14 +456,13 @@ $(document).ready(function () {
success
:
function
(
res
)
{
success
:
function
(
res
)
{
data
.
img
=
res
.
img
;
data
.
img
=
res
.
img
;
var
temp
=
document
.
querySelector
(
'#product_list_template'
);
var
temp
=
document
.
querySelector
(
'#product_list_template'
);
// filling template
// filling template
temp
.
content
.
querySelector
(
'.single-product-input'
).
id
=
data
.
uuid
+
"-div"
;
temp
.
content
.
querySelector
(
'.single-product-input'
).
id
=
data
.
uuid
+
"-div"
;
temp
.
content
.
querySelector
(
'input'
).
value
=
data
.
uuid
;
temp
.
content
.
querySelector
(
'input'
).
value
=
data
.
uuid
;
temp
.
content
.
querySelector
(
'li'
).
id
=
data
.
uuid
+
"-li"
;
temp
.
content
.
querySelector
(
'li'
).
id
=
data
.
uuid
+
"-li"
;
temp
.
content
.
querySelector
(
'h4'
).
id
=
data
.
uuid
+
"-h4"
;
temp
.
content
.
querySelector
(
'h4'
).
id
=
data
.
uuid
+
"-h4"
;
temp
.
content
.
querySelector
(
'
h4'
).
textContent
=
data
.
product
.
producttype
+
"_"
+
data
.
product
.
tileid
;
temp
.
content
.
querySelector
(
'
p'
).
textContent
=
data
.
product
.
producttype
+
"_"
+
data
.
product
.
tileid
;
temp
.
content
.
querySelector
(
'
p'
).
textContent
=
data
.
product
.
beginposition
;
temp
.
content
.
querySelector
(
'
h4'
).
innerHTML
=
parserDate
(
data
.
product
.
beginposition
)
+
' <i class="fa fa-eye-slash" style="color: #dd4b39"> </i>'
;
temp
.
content
.
querySelector
(
'img'
).
src
=
"data:image/jpeg;base64, "
+
data
.
img
;
temp
.
content
.
querySelector
(
'img'
).
src
=
"data:image/jpeg;base64, "
+
data
.
img
;
temp
.
content
.
querySelectorAll
(
'span'
)[
1
].
textContent
=
data
.
product
.
identifier
;
temp
.
content
.
querySelectorAll
(
'span'
)[
1
].
textContent
=
data
.
product
.
identifier
;
temp
.
content
.
querySelectorAll
(
'span'
)[
2
].
textContent
=
data
.
product
.
size
;
temp
.
content
.
querySelectorAll
(
'span'
)[
2
].
textContent
=
data
.
product
.
size
;
...
@@ -496,6 +499,12 @@ $(document).ready(function () {
...
@@ -496,6 +499,12 @@ $(document).ready(function () {
});
});
});
});
function
parserDate
(
parsedate
){
let
fullDate
=
parsedate
.
split
(
'T'
);
let
date
=
fullDate
[
0
].
split
(
'-'
);
date
=
date
[
1
]
+
"/"
+
date
[
2
]
+
"/"
+
date
[
0
];
return
date
+
" "
+
fullDate
[
1
].
split
(
'.'
)[
0
];
}
// adds product to cart
// adds product to cart
$
(
'#product-to-cart-form'
).
submit
(
function
(
event
)
{
$
(
'#product-to-cart-form'
).
submit
(
function
(
event
)
{
...
...
catalog/templates/map.html
View file @
bb35fe54
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/map.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/map.css' %}"
type=
"text/css"
>
<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 'catalog/css/modal1.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/modal1.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/crossrange.css' %}"
type=
"text/css"
>
<!-- <link rel="stylesheet" href="https://openlayers.org/en/v4.6.4/css/ol.css" type="text/css">-->
<!-- <link rel="stylesheet" href="https://openlayers.org/en/v4.6.4/css/ol.css" type="text/css">-->
<link
rel=
"stylesheet"
href=
"https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/css/ol.css"
>
<link
rel=
"stylesheet"
href=
"https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/css/ol.css"
>
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/waitingModal.css' %}"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/waitingModal.css' %}"
type=
"text/css"
>
...
@@ -190,7 +191,8 @@
...
@@ -190,7 +191,8 @@
</a>
</a>
<ul
class=
"treeview-menu sidebar-form"
>
<ul
class=
"treeview-menu sidebar-form"
>
<li>
<li>
<input
class=
"form-control"
type=
"number"
value=
"100"
name=
"cloudPercentage"
>
<input
class=
"form-text"
id=
"clouds"
value=
"5"
oninput=
"setCloudPercentageSlider(this.value)"
name=
"cloudPercentage"
disabled
>
<input
class=
"cross-range"
type=
"range"
min=
"0"
max=
"100"
step=
"1"
value=
"5"
oninput=
"setCloudPercentage(this.value)"
id=
"cloudPercentageSelector"
name=
cloudPercentage
>
</li>
</li>
</ul>
</ul>
</li>
</li>
...
@@ -322,6 +324,23 @@
...
@@ -322,6 +324,23 @@
</script>
</script>
<script>
<script>
function
setCloudPercentage
(
clouds
)
{
//console.log(clouds)
document
.
getElementById
(
"clouds"
).
value
=
clouds
;
}
function
setCloudPercentageSlider
(
clouds
)
{
//console.log(clouds)
//TODO
document
.
getElementById
(
"cloudPercentageSelector"
).
value
=
clouds
;
if
(
parseInt
(
clouds
)
>
100
){
document
.
getElementById
(
"cloudPercentageSelector"
).
value
=
100
;
}
if
(
parseInt
(
clouds
)
<
0
){
document
.
getElementById
(
"cloudPercentageSelector"
).
value
=
0
;
}
}
//var osmap = new OpenStreetMapsClass("map", -99.145556,19.419444, 10);
//var osmap = new OpenStreetMapsClass("map", -99.145556,19.419444, 10);
var
osmap
=
new
sidtMap
(
"map"
,
-
89.63873079999999
,
21.0404457
,
7
);
var
osmap
=
new
sidtMap
(
"map"
,
-
89.63873079999999
,
21.0404457
,
7
);
osmap
.
geolocation
();
osmap
.
geolocation
();
...
...
reports/templates/aside.html
View file @
bb35fe54
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<br>
<br>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
{% if request.user.is_authenticated %}
<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>
{% endif %}
{% if folders %}
{% if folders %}
<li
class=
"treeview"
>
<li
class=
"treeview"
>
<a
href=
"#"
>
<a
href=
"#"
>
...
...
reports/templates/sclData.html
View file @
bb35fe54
...
@@ -119,12 +119,11 @@
...
@@ -119,12 +119,11 @@
<!-- Main content -->
<!-- Main content -->
<div
class=
"container floating-panel"
style=
"position:absolute; bottom: 40px; left: 12%; width: 500px; z-index: 1000"
>
<div
class=
"container floating-panel"
style=
"position:absolute; bottom: 40px; left: 12%; width: 500px; z-index: 1000"
>
<div
class=
"range-control"
id=
"rangecontrol"
>
<div
class=
"range-control"
id=
"rangecontrol"
>
<span
id=
"tooltiptext"
>
No Data
</span>
<span
id=
"tooltiptext"
>
{{ labels|first|slice:"6:8" }}/{{ labels|first|slice:"4:6" }}/{{ labels|first|slice:"0:4" }}
</span>
<input
class=
"cross-range"
id=
"inputRange"
type=
"range"
min=
"
0"
max=
"{{ labels|length }}"
step=
"1"
value=
"0
"
data-thumbwidth=
"20"
style=
"background: transparent;"
>
<input
class=
"cross-range"
id=
"inputRange"
type=
"range"
min=
"
1"
max=
"{{ labels|length }}"
step=
"1"
value=
"1
"
data-thumbwidth=
"20"
style=
"background: transparent;"
>
<datalist
class=
"range__list"
id=
"number"
>
<datalist
class=
"range__list"
id=
"number"
>
<option>
No Data
</option>
{% for label in labels %}
{% for label in labels %}
<option
class=
"range__opt"
value=
"{{ label }}"
>
{{ label|slice:"6:8" }}/{{ label|slice:"4:6" }}/{{label|slice:"0:4" }}
</option>
<option
class=
"range__opt"
value=
"{{ label }}"
>
{{ label|slice:"6:8" }}/{{ label|slice:"4:6" }}/{{label|slice:"0:4" }}
</option>
{% endfor %}
{% endfor %}
...
...
reports/views.py
View file @
bb35fe54
This diff is collapsed.
Click to expand it.
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