Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
484ed29e
authored
Apr 03, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add initial Requests views with permission check
parent
46d06df9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
155 additions
and
102 deletions
+155
-102
.idea/workspace.xml
+133
-93
circle/circle/settings/base.py
+1
-0
circle/dashboard/templates/dashboard/index-vm.html
+1
-1
circle/request/views.py
+20
-8
No files found.
.idea/workspace.xml
View file @
484ed29e
...
...
@@ -2,11 +2,9 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"1fbec8af-5a7c-40f9-b994-83ac07d1ae1d"
name=
"Default"
comment=
""
>
<change
beforePath=
""
afterPath=
"$PROJECT_DIR$/circle/circle/middleware.py"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json"
afterPath=
"$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/circle/settings/base.py"
afterPath=
"$PROJECT_DIR$/circle/circle/settings/base.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/base.html"
afterPath=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/base.html"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vm.html"
afterPath=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vm.html"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/request/views.py"
afterPath=
"$PROJECT_DIR$/circle/request/views.py"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"TRACKING_ENABLED"
value=
"true"
/>
...
...
@@ -35,21 +33,33 @@
</component>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
leaf-file-name=
"
middleware
.py"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/middleware
.py"
>
<file
leaf-file-name=
"
urls
.py"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
request/urls
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
85
"
>
<caret
line=
"
5"
column=
"42"
lean-forward=
"false"
selection-start-line=
"5"
selection-start-column=
"42"
selection-end-line=
"5"
selection-end-column=
"42
"
/>
<state
relative-caret-position=
"
199
"
>
<caret
line=
"
29"
column=
"27"
lean-forward=
"false"
selection-start-line=
"29"
selection-start-column=
"27"
selection-end-line=
"29"
selection-end-column=
"27
"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"
circle_policy.json
"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/os_policies/circle_policy.json
"
>
<file
leaf-file-name=
"
views.py
"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
request/views.py
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"119"
>
<caret
line=
"7"
column=
"52"
lean-forward=
"false"
selection-start-line=
"7"
selection-start-column=
"52"
selection-end-line=
"7"
selection-end-column=
"52"
/>
<state
relative-caret-position=
"-2844"
>
<caret
line=
"157"
column=
"49"
lean-forward=
"false"
selection-start-line=
"157"
selection-start-column=
"49"
selection-end-line=
"157"
selection-end-column=
"49"
/>
<folding>
<element
signature=
"e#731#787#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"base.py"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/settings/base.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"221"
>
<caret
line=
"317"
column=
"55"
lean-forward=
"false"
selection-start-line=
"317"
selection-start-column=
"55"
selection-end-line=
"317"
selection-end-column=
"55"
/>
<folding
/>
</state>
</provider>
...
...
@@ -67,8 +77,6 @@
</component>
<component
name=
"FindInProjectRecents"
>
<findStrings>
<find>
TransferTemplateOwnershipConfirmView
</find>
<find>
template
</find>
<find>
TransferOwnershipConfirmView
</find>
<find>
template-transfer-ownership
</find>
<find>
TransferTemplateOwnershipView
</find>
...
...
@@ -97,12 +105,15 @@
<find>
contrib.auth
</find>
<find>
instanceactivity
</find>
<find>
middleware
</find>
<find>
request
</find>
<find>
SuperuserRequiredMixin
</find>
</findStrings>
<replaceStrings>
<replace>
'ACTIVE'
</replace>
<replace>
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
</replace>
<replace>
<
pk:slug
>
</replace>
<replace>
network/horizon/client_side/
</replace>
<replace>
RequestDecideRequiredMixin
</replace>
</replaceStrings>
<dirStrings>
<dir>
$PROJECT_DIR$/circle/dashboard/templates/dashboard
</dir>
...
...
@@ -116,7 +127,6 @@
<component
name=
"IdeDocumentHistory"
>
<option
name=
"CHANGED_PATHS"
>
<list>
<option
value=
"$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_modal.html"
/>
<option
value=
"$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_progress.html"
/>
<option
value=
"$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_table_row.html"
/>
<option
value=
"$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/templates.html"
/>
...
...
@@ -136,7 +146,6 @@
<option
value=
"$PROJECT_DIR$/circle/network/templates/network/vxlan-create.html"
/>
<option
value=
"$PROJECT_DIR$/circle/network/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/resources.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vm.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/home.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/console.html"
/>
...
...
@@ -163,10 +172,12 @@
<option
value=
"$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_auth/user.py"
/>
<option
value=
"$PROJECT_DIR$/circle/middleware.py"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/settings/base.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/base.html"
/>
<option
value=
"$PROJECT_DIR$/circle/request/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/middleware.py"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/settings/base.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vm.html"
/>
<option
value=
"$PROJECT_DIR$/circle/request/views.py"
/>
</list>
</option>
</component>
...
...
@@ -242,6 +253,26 @@
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"cloud"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"cloud"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"os_policies"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"cloud"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"cloud"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"settings"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"cloud"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"cloud"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"request"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</expand>
<select
/>
</subPane>
...
...
@@ -256,7 +287,7 @@
<property
name=
"settings.editor.selected.configurable"
value=
"watcher.settings"
/>
<property
name=
"NewWatcherDialog.advanced.open"
value=
"true"
/>
<property
name=
"DefaultHtmlFileTemplate"
value=
"HTML File"
/>
<property
name=
"SearchEverywhereHistoryKey"
value=
"index
.	FILE	file:///home/h3yduck/cloud/circle/dashboard/views/index.py index	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index.html bas	FILE	file:///home/h3yduck/cloud/circle/openstack_api/base.py save	null	null plainc	null	null vmdeta	null	null templatedet	null	null instancetemp	null	null instancetem	null	null url	FILE	file:///home/h3yduck/cloud/circle/dashboard/urls.py vmcreate	null	null base	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py opera	FILE	file:///home/h3yduck/cloud/circle/vm/operations.py operations	FILE	file:///home/h3yduck/cloud/circle/common/operations.py templat	null	null vmadd	null	null vmdetail	null	null addinterfa	null	null addin	null	null server	null	null Instance	null	null instance	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py operat	null	null ins	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py vmdetai	null	null operationvi	null	null ser	null	null server.	FILE	file:///home/h3yduck/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/v2/servers.py resources.	FILE	file:///home/h3yduck/cloud/circle/request/templates/request/initials/resources.html vm-de	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-detail.html vxla	null	null urls	FILE	file:///home/h3yduck/cloud/circle/dashboard/urls.py index-v	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans.html index-vm	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm
.html create	FILE	file:///home/h3yduck/cloud/circle/network/templates/network/vxlan-create.html vxl	null	null nov	FILE	file:///home/h3yduck/cloud/circle/openstack_api/nova.py nova.p	FILE	file:///home/h3yduck/cloud/circle/openstack_api/nova.py vmdetailv	null	null editor	null	null networktopo	FILE	file:///home/h3yduck/cloud/circle/network/static/js/horizon.networktopology.js bow	FILE	file:///home/h3yduck/cloud/circle/bower.json base.py	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py local	null	null vnc	null	null plain	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-plain-image-create.html forms	null	null vxlanform	null	null instanc	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py index-vxla	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans.html"
/>
<property
name=
"SearchEverywhereHistoryKey"
value=
"index
-vm	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html index.	FILE	file:///home/h3yduck/cloud/circle/dashboard/views/index.py index	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index.html bas	FILE	file:///home/h3yduck/cloud/circle/openstack_api/base.py save	null	null plainc	null	null vmdeta	null	null templatedet	null	null instancetemp	null	null instancetem	null	null url	FILE	file:///home/h3yduck/cloud/circle/dashboard/urls.py vmcreate	null	null base	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py opera	FILE	file:///home/h3yduck/cloud/circle/vm/operations.py operations	FILE	file:///home/h3yduck/cloud/circle/common/operations.py templat	null	null vmadd	null	null vmdetail	null	null addinterfa	null	null addin	null	null server	null	null Instance	null	null instance	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py operat	null	null ins	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py vmdetai	null	null operationvi	null	null ser	null	null server.	FILE	file:///home/h3yduck/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/v2/servers.py resources.	FILE	file:///home/h3yduck/cloud/circle/request/templates/request/initials/resources.html vm-de	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-detail.html vxla	null	null urls	FILE	file:///home/h3yduck/cloud/circle/dashboard/urls.py index-v	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans
.html create	FILE	file:///home/h3yduck/cloud/circle/network/templates/network/vxlan-create.html vxl	null	null nov	FILE	file:///home/h3yduck/cloud/circle/openstack_api/nova.py nova.p	FILE	file:///home/h3yduck/cloud/circle/openstack_api/nova.py vmdetailv	null	null editor	null	null networktopo	FILE	file:///home/h3yduck/cloud/circle/network/static/js/horizon.networktopology.js bow	FILE	file:///home/h3yduck/cloud/circle/bower.json base.py	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py local	null	null vnc	null	null plain	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-plain-image-create.html forms	null	null vxlanform	null	null instanc	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py index-vxla	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans.html"
/>
</component>
<component
name=
"RecentsManager"
>
<key
name=
"MoveFile.RECENT_KEYS"
>
...
...
@@ -385,10 +416,10 @@
<window_info
id=
"TODO"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32980973"
sideWeight=
"0.4978701"
order=
"6"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Messages"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"7"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Event Log"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.5972516"
sideWeight=
"0.49520767"
order=
"7"
side_tool=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Version Control"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"
true"
show_stripe_button=
"true"
weight=
"0.3255814"
sideWeight=
"0.514377
"
order=
"7"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Version Control"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"
false"
show_stripe_button=
"true"
weight=
"0.3255814"
sideWeight=
"0.50745475
"
order=
"7"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Python Console"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.43023255"
sideWeight=
"0.43610224"
order=
"7"
side_tool=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Run"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32769555"
sideWeight=
"0.49574015"
order=
"2"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Terminal"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.
5972516"
sideWeight=
"0.49520767
"
order=
"7"
side_tool=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Terminal"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.
3255814"
sideWeight=
"0.49254525
"
order=
"7"
side_tool=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Project"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.1682641"
sideWeight=
"0.5"
order=
"0"
side_tool=
"false"
content_ui=
"combo"
/>
<window_info
id=
"Docker"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"false"
weight=
"0.33"
sideWeight=
"0.5"
order=
"8"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Database"
active=
"false"
anchor=
"right"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"3"
side_tool=
"false"
content_ui=
"tabs"
/>
...
...
@@ -481,7 +512,7 @@
</properties>
</breakpoint>
</default-breakpoints>
<option
name=
"time"
value=
"2
59
"
/>
<option
name=
"time"
value=
"2
62
"
/>
</breakpoint-manager>
<watches-manager
/>
</component>
...
...
@@ -573,48 +604,6 @@
</expressions>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-templates.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"267"
>
<caret
line=
"24"
column=
"17"
lean-forward=
"false"
selection-start-line=
"24"
selection-start-column=
"17"
selection-end-line=
"24"
selection-end-column=
"17"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/vm/models/activity.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"233"
>
<caret
line=
"135"
column=
"15"
lean-forward=
"false"
selection-start-line=
"135"
selection-start-column=
"15"
selection-end-line=
"135"
selection-end-column=
"69"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/common/operations.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"429"
>
<caret
line=
"242"
column=
"0"
lean-forward=
"false"
selection-start-line=
"242"
selection-start-column=
"0"
selection-end-line=
"242"
selection-end-column=
"0"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/client.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"233"
>
<caret
line=
"82"
column=
"0"
lean-forward=
"false"
selection-start-line=
"82"
selection-start-column=
"0"
selection-end-line=
"82"
selection-end-column=
"0"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/templatetags/instance_tags.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"575"
>
<caret
line=
"36"
column=
"43"
lean-forward=
"false"
selection-start-line=
"36"
selection-start-column=
"43"
selection-end-line=
"36"
selection-end-column=
"43"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/vm/models/instance.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"293"
>
<caret
line=
"148"
column=
"15"
lean-forward=
"true"
selection-start-line=
"148"
selection-start-column=
"15"
selection-end-line=
"148"
selection-end-column=
"15"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/views/generic/edit.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"716"
>
...
...
@@ -631,14 +620,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/urls.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"221"
>
<caret
line=
"42"
column=
"43"
lean-forward=
"false"
selection-start-line=
"42"
selection-start-column=
"43"
selection-end-line=
"42"
selection-end-column=
"43"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/os_policies/nova_policy.json"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"216"
>
...
...
@@ -881,14 +862,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/urls.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"357"
>
<caret
line=
"28"
column=
"20"
lean-forward=
"true"
selection-start-line=
"28"
selection-start-column=
"20"
selection-end-line=
"28"
selection-end-column=
"20"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/index.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
...
...
@@ -929,20 +902,12 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/settings/base.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-136"
>
<caret
line=
"320"
column=
"48"
lean-forward=
"true"
selection-start-line=
"320"
selection-start-column=
"48"
selection-end-line=
"320"
selection-end-column=
"48"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/vm/operations.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"339"
>
<caret
line=
"65"
column=
"23"
lean-forward=
"false"
selection-start-line=
"65"
selection-start-column=
"23"
selection-end-line=
"65"
selection-end-column=
"23"
/>
<folding>
<element
signature=
"e#732#788#0"
expanded=
"
tru
e"
/>
<element
signature=
"e#732#788#0"
expanded=
"
fals
e"
/>
</folding>
</state>
</provider>
...
...
@@ -963,21 +928,95 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"119"
>
<caret
line=
"7"
column=
"52"
lean-forward=
"false"
selection-start-line=
"7"
selection-start-column=
"52"
selection-end-line=
"7"
selection-end-column=
"52"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/urls.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"289"
>
<caret
line=
"45"
column=
"25"
lean-forward=
"false"
selection-start-line=
"45"
selection-start-column=
"25"
selection-end-line=
"45"
selection-end-column=
"25"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/urls.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"204"
>
<caret
line=
"28"
column=
"20"
lean-forward=
"true"
selection-start-line=
"28"
selection-start-column=
"20"
selection-end-line=
"28"
selection-end-column=
"20"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/views/generic/base.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"306"
>
<caret
line=
"46"
column=
"8"
lean-forward=
"false"
selection-start-line=
"46"
selection-start-column=
"8"
selection-end-line=
"46"
selection-end-column=
"8"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/request/urls.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"199"
>
<caret
line=
"29"
column=
"27"
lean-forward=
"false"
selection-start-line=
"29"
selection-start-column=
"27"
selection-end-line=
"29"
selection-end-column=
"27"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django_tables2/views.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"306"
>
<caret
line=
"118"
column=
"6"
lean-forward=
"false"
selection-start-line=
"118"
selection-start-column=
"6"
selection-end-line=
"118"
selection-end-column=
"6"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/middleware.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
85
"
>
<caret
line=
"
5"
column=
"42"
lean-forward=
"false"
selection-start-line=
"5"
selection-start-column=
"42"
selection-end-line=
"5"
selection-end-column=
"42
"
/>
<state
relative-caret-position=
"
221
"
>
<caret
line=
"
13"
column=
"44"
lean-forward=
"false"
selection-start-line=
"13"
selection-start-column=
"30"
selection-end-line=
"13"
selection-end-column=
"44
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/os_policies/circle_policy.json
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/templates/dashboard/index-vm.html
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
119
"
>
<caret
line=
"
7"
column=
"52"
lean-forward=
"false"
selection-start-line=
"7"
selection-start-column=
"52"
selection-end-line=
"7"
selection-end-column=
"52
"
/>
<state
relative-caret-position=
"
408
"
>
<caret
line=
"
84"
column=
"121"
lean-forward=
"false"
selection-start-line=
"84"
selection-start-column=
"121"
selection-end-line=
"84"
selection-end-column=
"121
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/braces/views/_access.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"187"
>
<caret
line=
"24"
column=
"6"
lean-forward=
"false"
selection-start-line=
"24"
selection-start-column=
"6"
selection-end-line=
"24"
selection-end-column=
"6"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/settings/base.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"221"
>
<caret
line=
"317"
column=
"55"
lean-forward=
"false"
selection-start-line=
"317"
selection-start-column=
"55"
selection-end-line=
"317"
selection-end-column=
"55"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/request/views.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-2844"
>
<caret
line=
"157"
column=
"49"
lean-forward=
"false"
selection-start-line=
"157"
selection-start-column=
"49"
selection-end-line=
"157"
selection-end-column=
"49"
/>
<folding>
<element
signature=
"e#731#787#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
circle/circle/settings/base.py
View file @
484ed29e
...
...
@@ -315,6 +315,7 @@ TEMPLATES = [{
'django.template.context_processors.media'
,
'django.template.context_processors.static'
,
'django.template.context_processors.tz'
,
'django.template.context_processors.request'
,
'django.contrib.messages.context_processors.messages'
,
'dashboard.context_processors.notifications'
,
'dashboard.context_processors.extract_settings'
,
...
...
circle/dashboard/templates/dashboard/index-vm.html
View file @
484ed29e
...
...
@@ -89,7 +89,7 @@
</div>
<div
class=
"panel-body"
id=
"vm-graph-view"
style=
"display: none"
>
<p
class=
"pull-right"
>
<input
class=
"knob"
data-fgColor=
"chartreuse"
data-thickness=
".4"
data-max=
"
{{ request.user.profile.instance_limit }}
"
data-width=
"100"
data-height=
"100"
data-readOnly=
"true"
value=
"{{ instances|length|add:more_instances }}"
>
<input
class=
"knob"
data-fgColor=
"chartreuse"
data-thickness=
".4"
data-max=
"
#TODO
"
data-width=
"100"
data-height=
"100"
data-readOnly=
"true"
value=
"{{ instances|length|add:more_instances }}"
>
</p>
<span
class=
"bigbig"
>
{% blocktrans with count=running_vm_num %}
<span
class=
"big-tag"
>
{{ count }}
</span>
running{% endblocktrans %}
</span>
<ul
class=
"list-inline"
style=
"max-height: 95px; overflow: hidden;"
>
...
...
circle/request/views.py
View file @
484ed29e
...
...
@@ -16,6 +16,7 @@
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
from
__future__
import
unicode_literals
,
absolute_import
from
braces.views._access
import
AccessMixin
from
django.views.generic
import
(
UpdateView
,
TemplateView
,
DetailView
,
CreateView
,
FormView
,
DeleteView
,
)
...
...
@@ -45,7 +46,18 @@ from request.forms import (
)
class
RequestList
(
LoginRequiredMixin
,
SuperuserRequiredMixin
,
SingleTableView
):
class
RequestDecideRequiredMixin
(
AccessMixin
):
"""
Mixin allows you to require a user with `is_superuser` set to True.
"""
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
if
not
self
.
request
.
user
.
permissions
[
"request_decide"
]:
return
self
.
handle_no_permission
(
request
)
return
super
(
RequestDecideRequiredMixin
,
self
)
.
dispatch
(
request
,
*
args
,
**
kwargs
)
class
RequestList
(
LoginRequiredMixin
,
RequestDecideRequiredMixin
,
SingleTableView
):
model
=
Request
table_class
=
RequestTable
template_name
=
"request/list.html"
...
...
@@ -102,7 +114,7 @@ class RequestDetail(LoginRequiredMixin, DetailView):
return
context
class
TemplateAccessTypeDetail
(
LoginRequiredMixin
,
Superuser
RequiredMixin
,
class
TemplateAccessTypeDetail
(
LoginRequiredMixin
,
RequestDecide
RequiredMixin
,
SuccessMessageMixin
,
UpdateView
):
model
=
TemplateAccessType
template_name
=
"request/template-type-form.html"
...
...
@@ -110,7 +122,7 @@ class TemplateAccessTypeDetail(LoginRequiredMixin, SuperuserRequiredMixin,
success_message
=
_
(
"Template access type successfully updated."
)
class
TemplateAccessTypeCreate
(
LoginRequiredMixin
,
Superuser
RequiredMixin
,
class
TemplateAccessTypeCreate
(
LoginRequiredMixin
,
RequestDecide
RequiredMixin
,
SuccessMessageMixin
,
CreateView
):
model
=
TemplateAccessType
template_name
=
"request/template-type-form.html"
...
...
@@ -118,7 +130,7 @@ class TemplateAccessTypeCreate(LoginRequiredMixin, SuperuserRequiredMixin,
success_message
=
_
(
"New template access type successfully created."
)
class
TemplateAccessTypeDelete
(
LoginRequiredMixin
,
Superuser
RequiredMixin
,
class
TemplateAccessTypeDelete
(
LoginRequiredMixin
,
RequestDecide
RequiredMixin
,
DeleteView
):
model
=
TemplateAccessType
template_name
=
"dashboard/confirm/base-delete.html"
...
...
@@ -127,7 +139,7 @@ class TemplateAccessTypeDelete(LoginRequiredMixin, SuperuserRequiredMixin,
return
reverse
(
"request.views.type-list"
)
class
LeaseTypeDetail
(
LoginRequiredMixin
,
Superuser
RequiredMixin
,
class
LeaseTypeDetail
(
LoginRequiredMixin
,
RequestDecide
RequiredMixin
,
SuccessMessageMixin
,
UpdateView
):
model
=
LeaseType
template_name
=
"request/lease-type-form.html"
...
...
@@ -135,7 +147,7 @@ class LeaseTypeDetail(LoginRequiredMixin, SuperuserRequiredMixin,
success_message
=
_
(
"Lease type successfully updated."
)
class
LeaseTypeCreate
(
LoginRequiredMixin
,
Superuser
RequiredMixin
,
class
LeaseTypeCreate
(
LoginRequiredMixin
,
RequestDecide
RequiredMixin
,
SuccessMessageMixin
,
CreateView
):
model
=
LeaseType
template_name
=
"request/lease-type-form.html"
...
...
@@ -143,7 +155,7 @@ class LeaseTypeCreate(LoginRequiredMixin, SuperuserRequiredMixin,
success_message
=
_
(
"New lease type successfully created."
)
class
LeaseTypeDelete
(
LoginRequiredMixin
,
Superuser
RequiredMixin
,
DeleteView
):
class
LeaseTypeDelete
(
LoginRequiredMixin
,
RequestDecide
RequiredMixin
,
DeleteView
):
model
=
LeaseType
template_name
=
"dashboard/confirm/base-delete.html"
...
...
@@ -151,7 +163,7 @@ class LeaseTypeDelete(LoginRequiredMixin, SuperuserRequiredMixin, DeleteView):
return
reverse
(
"request.views.type-list"
)
class
RequestTypeList
(
LoginRequiredMixin
,
Superuser
RequiredMixin
,
class
RequestTypeList
(
LoginRequiredMixin
,
RequestDecide
RequiredMixin
,
TemplateView
):
template_name
=
"request/type-list.html"
...
...
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