Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
feae17a6
authored
Apr 17, 2016
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: small grant works in storage views
parent
f068881e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
circle/dashboard/forms.py
+1
-0
circle/dashboard/views/storage.py
+4
-4
No files found.
circle/dashboard/forms.py
View file @
feae17a6
...
...
@@ -1643,6 +1643,7 @@ class DataStoreForm(ModelForm):
class
Meta
:
model
=
DataStore
fields
=
(
"type"
,
"name"
,
"path"
,
"hostname"
,
)
widgets
=
{
"type"
:
HiddenInput
()}
class
CephDataStoreForm
(
DataStoreForm
):
...
...
circle/dashboard/views/storage.py
View file @
feae17a6
...
...
@@ -29,7 +29,7 @@ from django_tables2 import SingleTableView
from
django.http
import
Http404
,
HttpResponse
from
django.core.exceptions
import
PermissionDenied
from
braces.views
import
SuperuserRequiredMixin
,
LoginRequiredMixin
from
braces.views
import
SuperuserRequiredMixin
from
sizefield.utils
import
filesizeformat
from
common.models
import
WorkerNotFound
...
...
@@ -46,7 +46,7 @@ from celery.exceptions import TimeoutError
logger
=
logging
.
getLogger
(
__name__
)
class
StorageChoose
(
Login
RequiredMixin
,
TemplateView
):
class
StorageChoose
(
Superuser
RequiredMixin
,
TemplateView
):
def
get_template_names
(
self
):
if
self
.
request
.
is_ajax
():
...
...
@@ -139,7 +139,7 @@ class StorageCreate(SuccessMessageMixin, CreateView):
return
fc
class
StorageList
(
Login
RequiredMixin
,
FilterMixin
,
SingleTableView
):
class
StorageList
(
Superuser
RequiredMixin
,
FilterMixin
,
SingleTableView
):
template_name
=
"dashboard/storage-list.html"
model
=
DataStore
table_class
=
StorageListTable
...
...
@@ -342,4 +342,4 @@ class DataStoreHostCreate(SuccessMessageMixin, CreateView):
return
error_str
def
get_success_url
(
self
):
return
reverse_lazy
(
"dashboard.views.storage-list"
)
# TODO
return
reverse_lazy
(
"dashboard.views.storage-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