Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
52b9dbf4
authored
Jul 24, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add progress bar for quota
parent
bfa29ab1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
1 deletions
+41
-1
circle/dashboard/static/dashboard/dashboard.css
+18
-0
circle/dashboard/templates/dashboard/store/list.html
+20
-0
circle/dashboard/views.py
+3
-1
No files found.
circle/dashboard/static/dashboard/dashboard.css
View file @
52b9dbf4
...
...
@@ -831,3 +831,21 @@ textarea[name="list-new-namelist"] {
.store-action-button
{
margin-left
:
5px
;
}
.progress-bar
{
border-top-left-radius
:
4px
;
border-bottom-left-radius
:
4px
;
}
#progress-marker-hard
{
border-top-right-radius
:
4px
;
border-bottom-right-radius
:
4px
;
right
:
0
;
background
:
red
;
}
.progress-marker
{
width
:
6px
;
height
:
20px
;
position
:
absolute
;
}
circle/dashboard/templates/dashboard/store/list.html
View file @
52b9dbf4
...
...
@@ -12,6 +12,26 @@
</div>
</div>
<div
class=
"progress"
style=
"position: relative; overflow: visible;"
>
<div
class=
"progress-bar"
role=
"progressbar"
aria-valuenow=
"{{ quota.Used }}"
aria-valuemin=
"0"
aria-valuemax=
"{{ quota.Hard }}"
style=
"width:
{% if quota.Used > quota.Hard %}100{% else %}{% widthratio quota.Used quota.Hard 100 %}%{% endif %}%"
>
<div
style=
"padding-top: 2px;"
>
{% blocktrans with used=quota.readable_used %}
{{ used }} used
{% endblocktrans %}
</div>
</div>
<div
class=
"progress-marker"
id=
"progress-marker-hard"
data-placement=
"left"
title=
"{% trans "
Hard
limit
"
%}
:
{{
quota
.
readable_hard
}}"
>
</div>
<div
class=
"progress-marker"
id=
"progress-marker-soft"
style=
"background: orange;
left: {% widthratio quota.Soft quota.Hard 100 %}%"
title=
"{% trans "
Soft
limit
"
%}
:
{{
quota
.
readable_soft
}}"
data-placement=
"left"
>
</div>
</div>
{% endblock %}
{% block extra_js %}
...
...
circle/dashboard/views.py
View file @
52b9dbf4
...
...
@@ -3100,7 +3100,9 @@ class StoreList(LoginRequiredMixin, TemplateView):
directory
=
self
.
request
.
GET
.
get
(
"directory"
,
"/"
)
directory
=
"/"
if
not
len
(
directory
)
else
directory
context
[
'root'
]
=
Store
(
self
.
request
.
user
)
.
list
(
directory
)
store
=
Store
(
self
.
request
.
user
)
context
[
'root'
]
=
store
.
list
(
directory
)
context
[
'quota'
]
=
store
.
get_quota
()
context
[
'up_url'
]
=
self
.
create_up_directory
(
directory
)
context
[
'current'
]
=
directory
context
[
'next_url'
]
=
"
%
s
%
s?directory=
%
s"
%
(
...
...
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