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
809214d6
Commit
809214d6
authored
Nov 13, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slider de reportes
parent
9ae0f876
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
151 additions
and
68 deletions
+151
-68
scldata.css
reports/static/reports/css/scldata.css
+31
-1
sclData.html
reports/templates/sclData.html
+92
-62
views.py
reports/views.py
+28
-5
No files found.
reports/static/reports/css/scldata.css
View file @
809214d6
...
...
@@ -318,4 +318,34 @@ select::-ms-expand {
border-top-color
:
#ffa74f
;
border-width
:
11px
;
margin-left
:
-11px
;
}
\ No newline at end of file
}
/*progress bar effect*/
/*left and right arrows for slider with font-awesome*/
.fas.fa-chevron-left
{
position
:
absolute
;
left
:
0
;
top
:
40%
;
margin-left
:
5px
;
color
:
rgba
(
11
,
15
,
192
,
0.5
);
font-size
:
60px
;
z-index
:
100
;
}
.fas.fa-chevron-right
{
position
:
absolute
;
right
:
0
;
top
:
40%
;
margin-right
:
5px
;
color
:
rgba
(
11
,
15
,
192
,
0.5
);
font-size
:
60px
;
z-index
:
100
;
}
\ No newline at end of file
reports/templates/sclData.html
View file @
809214d6
This diff is collapsed.
Click to expand it.
reports/views.py
View file @
809214d6
...
...
@@ -47,6 +47,7 @@ def report_L2ASCL(request, purchase_id):
template
=
"sclData.html"
reporteDir
=
'mask'
folders
=
""
productList
=
[]
purchase
=
Purchase
.
objects
.
values
(
'user__email'
,
'is_public'
,
'name'
,
'search__search_name'
,
'search__process_id__name'
,
'description'
,
'aggreg_date'
)
.
get
(
pk
=
purchase_id
)
email
=
purchase
[
'user__email'
]
...
...
@@ -90,13 +91,34 @@ def report_L2ASCL(request, purchase_id):
#PDFGenerator(request, path, reporteDir, datasets,searchInfo)
pass
if
request
.
user
.
is_authenticated
:
product_list
=
Purchase
.
objects
.
values
(
'id'
)
.
filter
(
user_id__in
=
[
request
.
user
.
id
],
purchased
=
1
,
is_public
=
True
,
progress
=
100
)
else
:
product_list
=
Purchase
.
objects
.
values
(
'id'
)
.
filter
(
is_public
=
True
,
progress
=
100
,
user__email
=
email
)
for
producto
in
product_list
:
productList
.
append
(
producto
[
'id'
],
)
print
(
product_list
)
return
render
(
request
,
template
,
{
"graphData"
:
json
.
dumps
(
graphData
),
"searchInfo"
:
searchInfo
,
"IMAGE_PATH"
:
image_path
,
"SCL_PATH"
:
SCL_path
,
'dafaultLabel'
:
defaultLabel
,
'defaultDataSet'
:
defaultDataset
,
"folders"
:
folders
,
"zone"
:
reporteDir
,
"purchaseID"
:
purchase_id
,
"labels"
:
graphData
[
'data'
][
'labels'
],
"email"
:
email
})
"email"
:
email
,
"lista"
:
productList
})
# -------------------------------------------------------------------------------def Reports(request):
...
...
@@ -145,10 +167,11 @@ def Reports(request):
progress
=
60
if
'Finalizing...'
in
open
(
log_info
)
.
read
():
progress
=
100
# item = Purchase.objects.filter(pk=producto['id'])
# item = Purchase.objects.get(pk=producto['id'])
# item.progress = progress
# item.save()
#item = Purchase.objects.filter(pk=producto['id'])
item
=
Purchase
.
objects
.
get
(
pk
=
producto
[
'id'
])
item
.
progress
=
progress
item
.
save
()
with
open
(
log_info
,
'r'
)
as
myfile
:
log
=
myfile
.
read
()
.
replace
(
'
\n
'
,
''
)
...
...
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