-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add frontend for working with storage #18
Conversation
Please, remove the How icons you added are licensed and who is their author? Whether |
50932d4
to
f5dd55c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thank you for the patch. I recommend you use the "flake8" tool to check your code. And read the "PEP8".
See some comments bellow:
+1 |
Yet few comments / thoughts:
|
I think we should use something like this one. |
8c02ca2
to
5c4f4ae
Compare
I used icons from https://icons.getbootstrap.com/ and added the license. |
Done.
???
Done. |
Why do you ignore comments: |
For example (no legal) we only want to display files with ".deb and .rpm" extensions. |
ba481dd
to
7ba17de
Compare
Let's do it as a separate issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From @Totktonada:
- CSS is uploaded every time (needs to be cached)
- CSS has a path with two slashes
- All fields must be left aligned
- The date field must be large enough to contain the date
added SEND_FILE_MAX_AGE_DEFAULT.
Fixed.
Done. In css file.
Now it contains. |
7ba17de
to
c572c4d
Compare
Why don't you use one row for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I will reopen PR.
c572c4d
to
19bcf99
Compare
Drop it, because it will be implemented in the s3view. Part of #10
ce9e0c0
to
e3c5877
Compare
I guess the reason is here: table {
<...>
max-width: 700px;
<...>
} |
e3c5877
to
b708369
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are already close to the finish
s3repo/model.py
Outdated
def get_file(self, path): | ||
"""Download a file from S3.""" | ||
NotImplementedError("get_file hasn't been implemented yet.") | ||
"""Get a file from S3 as a boto3 get_object() object.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
s3repo/view.py
Outdated
return readable_size | ||
size /= 1024.0 | ||
|
||
return readable_size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be best to return something like "%3.1f B" % (size)
.
static/common/css/fileindex.css
Outdated
margin-top: 2em; | ||
min-width: 400px; | ||
text-align: center; | ||
width: 100%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second. Fixed.
b708369
to
d189ccd
Compare
d189ccd
to
a48282a
Compare
@romanhabibov I suggest making several fixups if you are ok, please, squash them in to your commits. |
Implement GET method as the two S3AsyncModel class methods for gettiing directory and file. These method will be used by view to display directories and send files to user. Part of #10
Implement view class and web frontend for working with model. This class includes GET method for displaying direcories and sending files. Closes #10
a48282a
to
3224d20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Implement GET method and simple html frontend. Now, it is possible
to work with the storage using a browser.
Closes #10