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
e67415d8
Commit
e67415d8
authored
Mar 29, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descripcion reportes
parent
9339bc16
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
dataRetrieval.js
catalog/static/catalog/js/dataRetrieval.js
+1
-5
map.html
catalog/templates/map.html
+1
-1
views.py
catalog/views.py
+8
-2
No files found.
catalog/static/catalog/js/dataRetrieval.js
View file @
e67415d8
...
...
@@ -404,11 +404,7 @@ $(document).ready(function () {
// function for making POST request to productList in view.py
$
(
'#product-form'
).
submit
(
function
(
event
)
{
if
(
$
(
'#ajax-input'
).
val
().
length
<=
0
)
{
$
(
'#search_name'
).
val
(
"Drawn Polygon"
);
$
(
'#area_description'
).
val
(
""
);
}
event
.
preventDefault
();
erase_product_list_globe
();
var
submit_data
=
$
(
'#product-form'
).
serialize
();
...
...
catalog/templates/map.html
View file @
e67415d8
...
...
@@ -141,7 +141,7 @@
{% csrf_token %}
<input
type=
"hidden"
id=
"user_name"
name=
"user_name"
value=
{{user.get_username}}
>
<input
type=
"hidden"
id=
"search_name"
name=
"search_name"
value=
"Drawn Polygon"
>
<input
type=
"hidden"
id=
"area_description"
name=
"area_description"
value=
""
>
<input
type=
"hidden"
id=
"area_description"
name=
"area_description"
value=
"
Without Description
"
>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<li
class=
"treeview"
>
<a
href=
"#"
>
...
...
catalog/views.py
View file @
e67415d8
...
...
@@ -90,6 +90,8 @@ def productList(request):
end_date
=
req
[
'end'
][
0
][:
10
]
clouds
=
req
[
'cloudPercentage'
][
0
]
search_name
=
req
[
'search_name'
][
0
]
print
(
search_name
)
description
=
req
[
'area_description'
][
0
]
print
(
search_name
)
...
...
@@ -155,6 +157,8 @@ def productList(request):
description
=
description
,
)
print
(
"---------------------------"
)
print
(
search_name
)
listSearch
.
save
()
return
JsonResponse
({
'catalog'
:
catalog
});
...
...
@@ -526,7 +530,7 @@ def Pay(request):
product_list
=
[]
product_list
=
Purchase
.
objects
.
values
(
'id'
,
'search__area'
,
'user'
,
'user__username'
,
'user__email'
,
'search_id'
,
'search__clouds'
,
'search__startDate'
,
'search__endDate'
,
'search__process_id__name'
,
'search__process_id__productLevel'
,
'search__process_id__platform__name'
)
.
filter
(
user
=
user
,
purchased
=
0
)
'search__process_id__productLevel'
,
'search__process_id__platform__name'
,
'search__description'
,
'search__search_name'
)
.
filter
(
user
=
user
,
purchased
=
0
)
for
product
in
product_list
:
...
...
@@ -569,6 +573,8 @@ def Pay(request):
data
[
'projectDir'
]
=
projectDir
data
[
'username'
]
=
API_SENTINEL_USER
data
[
'password'
]
=
API_SENTINEL_PASS
data
[
'description'
]
=
product
[
'search__description'
]
data
[
'name'
]
=
product
[
'search__search_name'
]
# json_data = json.dumps(data, indent=4,sort_keys=True)
# formatea el json
...
...
@@ -602,7 +608,7 @@ def Pay(request):
# -------------------------------------
Purchase
.
objects
.
filter
(
user_id
=
request
.
user
.
id
,
purchased
=
0
)
.
update
(
purchased
=
True
)
Purchase
.
objects
.
filter
(
user_id
=
request
.
user
.
id
,
purchased
=
0
)
.
update
(
purchased
=
True
,
description
=
data
[
'description'
],
name
=
data
[
"name"
]
)
return
redirect
(
'../../reports'
)
...
...
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