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
c1c0a098
Commit
c1c0a098
authored
May 10, 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
db4f1e27
13b3b5aa
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
32 deletions
+57
-32
forms.py
catalog/forms.py
+1
-1
dataRetrieval.js
catalog/static/catalog/js/dataRetrieval.js
+6
-0
sidtMap.js
catalog/static/catalog/js/sidtMap.js
+5
-0
map.html
catalog/templates/map.html
+18
-4
views.py
users/views.py
+27
-27
No files found.
catalog/forms.py
View file @
c1c0a098
...
@@ -12,7 +12,7 @@ from .widgets import FengyuanChenDatePickerInput
...
@@ -12,7 +12,7 @@ from .widgets import FengyuanChenDatePickerInput
all_process
=
Process
.
objects
.
filter
(
status
=
True
)
all_process
=
Process
.
objects
.
filter
(
status
=
True
)
platforms
=
[
]
platforms
=
[]
for
each_process
in
all_process
:
for
each_process
in
all_process
:
platforms
.
append
((
each_process
.
platform_id
,
each_process
.
name
))
platforms
.
append
((
each_process
.
platform_id
,
each_process
.
name
))
...
...
catalog/static/catalog/js/dataRetrieval.js
View file @
c1c0a098
...
@@ -178,6 +178,12 @@ function drawPolygon(element) {
...
@@ -178,6 +178,12 @@ function drawPolygon(element) {
$
(
"#area_description"
).
val
(
polygon
.
description
)
$
(
"#area_description"
).
val
(
polygon
.
description
)
}
}
});
});
let
processTreeview
=
$
(
'li.processTreeview a'
);
let
parentClassList
=
processTreeview
[
0
].
parentElement
.
classList
;
if
(
!
parentClassList
.
contains
(
'menu-open'
)){
processTreeview
.
click
();
}
}
}
function
erase_input
()
{
function
erase_input
()
{
...
...
catalog/static/catalog/js/sidtMap.js
View file @
c1c0a098
...
@@ -121,6 +121,11 @@ sidtMap.prototype.addInteraction = function()
...
@@ -121,6 +121,11 @@ sidtMap.prototype.addInteraction = function()
this
.
interaction
.
on
(
"drawend"
,
function
(
e
){
this
.
interaction
.
on
(
"drawend"
,
function
(
e
){
self
.
showCoords
(
e
.
feature
.
getGeometry
());
self
.
showCoords
(
e
.
feature
.
getGeometry
());
let
processTreeview
=
$
(
'li.processTreeview a'
);
let
parentClassList
=
processTreeview
[
0
].
parentElement
.
classList
;
if
(
!
parentClassList
.
contains
(
'menu-open'
)){
processTreeview
.
click
();
}
});
});
this
.
interaction
.
on
(
"drawstart"
,
function
(
e
){
this
.
interaction
.
on
(
"drawstart"
,
function
(
e
){
...
...
catalog/templates/map.html
View file @
c1c0a098
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
<input
type=
"hidden"
id=
"search_name"
name=
"search_name"
value=
"Drawn Polygon"
>
<input
type=
"hidden"
id=
"search_name"
name=
"search_name"
value=
"Drawn Polygon"
>
<input
type=
"hidden"
id=
"area_description"
name=
"area_description"
value=
"Without Description"
>
<input
type=
"hidden"
id=
"area_description"
name=
"area_description"
value=
"Without Description"
>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<li
class=
"treeview"
id=
"searchProcess"
>
<li
class=
"
processTreeview
treeview"
id=
"searchProcess"
>
<a
href=
"#"
>
<a
href=
"#"
>
<i
class=
"fa fa-sync-alt"
></i>
<i
class=
"fa fa-sync-alt"
></i>
<span>
Process
</span>
<span>
Process
</span>
...
@@ -156,7 +156,7 @@
...
@@ -156,7 +156,7 @@
<li
class=
"col-xs-12"
>
{{ searchForm.platform }}
</li>
<li
class=
"col-xs-12"
>
{{ searchForm.platform }}
</li>
</ul>
</ul>
</li>
</li>
<li
class=
"treeview"
id=
"searchDate"
>
<li
class=
"
dateTreeview
treeview"
id=
"searchDate"
>
<a
href=
"#"
>
<a
href=
"#"
>
<i
class=
"fa fa-calendar-alt"
></i>
<i
class=
"fa fa-calendar-alt"
></i>
<span>
Date range
</span>
<span>
Date range
</span>
...
@@ -184,7 +184,7 @@
...
@@ -184,7 +184,7 @@
<li>
{{ searchForm.polygon }}
</li>
<li>
{{ searchForm.polygon }}
</li>
</ul>
</ul>
</li>
</li>
<li
class=
"
treeview
"
id=
"searchCloud"
>
<li
class=
"
cloudTreeview treeview
"
id=
"searchCloud"
>
<a
href=
"#"
>
<a
href=
"#"
>
<i
class=
"fa fa-cloud"
></i>
<i
class=
"fa fa-cloud"
></i>
<span>
Cloud percentage
</span>
<span>
Cloud percentage
</span>
...
@@ -267,7 +267,7 @@
...
@@ -267,7 +267,7 @@
</a>
</a>
</li>
</li>
</ul>
</ul>
<!--
Social buttons -->
Social buttons -->
</div>
</div>
<!-- Footer Elements -->
<!-- Footer Elements -->
...
@@ -369,4 +369,18 @@
...
@@ -369,4 +369,18 @@
var
purch_prod_url
=
"{% url 'purch-prod-rqst' %}"
;
var
purch_prod_url
=
"{% url 'purch-prod-rqst' %}"
;
var
del_prod_cartDB_url
=
"{% url 'del-cart-rqst' %}"
;
var
del_prod_cartDB_url
=
"{% url 'del-cart-rqst' %}"
;
</script>
</script>
<script>
$
(
'#id_platform'
).
click
(
function
()
{
let
dateTreeview
=
$
(
'li.dateTreeview a'
);
dateTreeview
.
click
();
});
$
(
'#id_end'
).
on
(
'hide.datepicker'
,
function
(
e
)
{
setTimeout
(
function
()
{
let
cloudTreeview
=
$
(
'li.cloudTreeview a'
);
cloudTreeview
.
click
();
},
500
);
});
</script>
{% endblock %}
{% endblock %}
users/views.py
View file @
c1c0a098
...
@@ -27,6 +27,19 @@ size_repsat = 0
...
@@ -27,6 +27,19 @@ size_repsat = 0
# -------------------------------------------
# -------------------------------------------
def
Users
(
request
):
def
Users
(
request
):
month_lst
=
[
{
'quantity'
:
0
,
'date'
:
'January'
},
{
'quantity'
:
0
,
'date'
:
'February'
},
{
'quantity'
:
0
,
'date'
:
'March'
},
{
'quantity'
:
0
,
'date'
:
'April'
},
{
'quantity'
:
0
,
'date'
:
'May'
},
{
'quantity'
:
0
,
'date'
:
'June'
},
{
'quantity'
:
0
,
'date'
:
'July'
},
{
'quantity'
:
0
,
'date'
:
'August'
},
{
'quantity'
:
0
,
'date'
:
'September'
},
{
'quantity'
:
0
,
'date'
:
'October'
},
{
'quantity'
:
0
,
'date'
:
'November'
},
{
'quantity'
:
0
,
'date'
:
'December'
}]
user_data
=
[]
user_data
=
[]
user_searches
=
[]
user_searches
=
[]
user
=
User
.
objects
.
get
(
pk
=
request
.
user
.
id
)
user
=
User
.
objects
.
get
(
pk
=
request
.
user
.
id
)
...
@@ -125,19 +138,6 @@ def Users(request):
...
@@ -125,19 +138,6 @@ def Users(request):
progress
=
0
progress
=
0
# lista de meses #
# lista de meses #
month_lst
=
[
{
'quantity'
:
0
,
'date'
:
'January'
},
{
'quantity'
:
0
,
'date'
:
'February'
},
{
'quantity'
:
0
,
'date'
:
'March'
},
{
'quantity'
:
0
,
'date'
:
'April'
},
{
'quantity'
:
0
,
'date'
:
'May'
},
{
'quantity'
:
0
,
'date'
:
'June'
},
{
'quantity'
:
0
,
'date'
:
'July'
},
{
'quantity'
:
0
,
'date'
:
'August'
},
{
'quantity'
:
0
,
'date'
:
'September'
},
{
'quantity'
:
0
,
'date'
:
'October'
},
{
'quantity'
:
0
,
'date'
:
'November'
},
{
'quantity'
:
0
,
'date'
:
'December'
}]
for
date
in
Purchase
.
objects
.
filter
(
purchased
=
True
,
user_id
=
user
.
id
)
.
extra
(
for
date
in
Purchase
.
objects
.
filter
(
purchased
=
True
,
user_id
=
user
.
id
)
.
extra
(
{
'month'
:
"Extract(month from aggreg_date)"
})
.
values_list
(
{
'month'
:
"Extract(month from aggreg_date)"
})
.
values_list
(
...
@@ -155,6 +155,20 @@ def Users(request):
...
@@ -155,6 +155,20 @@ def Users(request):
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
def
User_id
(
request
,
user_id
):
def
User_id
(
request
,
user_id
):
# lista de meses #
month_lst
=
[
{
'quantity'
:
0
,
'date'
:
'January'
},
{
'quantity'
:
0
,
'date'
:
'February'
},
{
'quantity'
:
0
,
'date'
:
'March'
},
{
'quantity'
:
0
,
'date'
:
'April'
},
{
'quantity'
:
0
,
'date'
:
'May'
},
{
'quantity'
:
0
,
'date'
:
'June'
},
{
'quantity'
:
0
,
'date'
:
'July'
},
{
'quantity'
:
0
,
'date'
:
'August'
},
{
'quantity'
:
0
,
'date'
:
'September'
},
{
'quantity'
:
0
,
'date'
:
'October'
},
{
'quantity'
:
0
,
'date'
:
'November'
},
{
'quantity'
:
0
,
'date'
:
'December'
}]
user_data
=
[]
user_data
=
[]
user_searches
=
[]
user_searches
=
[]
user
=
User
.
objects
.
get
(
pk
=
user_id
)
user
=
User
.
objects
.
get
(
pk
=
user_id
)
...
@@ -243,20 +257,6 @@ def User_id(request, user_id):
...
@@ -243,20 +257,6 @@ def User_id(request, user_id):
log_info
=
""
log_info
=
""
progress
=
0
progress
=
0
# lista de meses #
month_lst
=
[
{
'quantity'
:
0
,
'date'
:
'January'
},
{
'quantity'
:
0
,
'date'
:
'February'
},
{
'quantity'
:
0
,
'date'
:
'March'
},
{
'quantity'
:
0
,
'date'
:
'April'
},
{
'quantity'
:
0
,
'date'
:
'May'
},
{
'quantity'
:
0
,
'date'
:
'June'
},
{
'quantity'
:
0
,
'date'
:
'July'
},
{
'quantity'
:
0
,
'date'
:
'August'
},
{
'quantity'
:
0
,
'date'
:
'September'
},
{
'quantity'
:
0
,
'date'
:
'October'
},
{
'quantity'
:
0
,
'date'
:
'November'
},
{
'quantity'
:
0
,
'date'
:
'December'
}]
for
date
in
Purchase
.
objects
.
filter
(
purchased
=
True
,
user_id
=
user
.
id
)
.
extra
(
for
date
in
Purchase
.
objects
.
filter
(
purchased
=
True
,
user_id
=
user
.
id
)
.
extra
(
{
'month'
:
"Extract(month from aggreg_date)"
})
.
values_list
(
{
'month'
:
"Extract(month from aggreg_date)"
})
.
values_list
(
...
...
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