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
98118b72
authored
Apr 03, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add instance quotas to dashboard
parent
484ed29e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
104 deletions
+68
-104
.idea/workspace.xml
+64
-102
circle/dashboard/templates/dashboard/index-vm.html
+1
-1
circle/dashboard/views/index.py
+3
-1
No files found.
.idea/workspace.xml
View file @
98118b72
...
...
@@ -2,9 +2,9 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"1fbec8af-5a7c-40f9-b994-83ac07d1ae1d"
name=
"Default"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/
circle/circle/settings/base.py"
afterPath=
"$PROJECT_DIR$/circle/circle/settings/base.py
"
/>
<change
beforePath=
"$PROJECT_DIR$/
.idea/workspace.xml"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml
"
/>
<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"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/
dashboard/views/index.py"
afterPath=
"$PROJECT_DIR$/circle/dashboard/views/index
.py"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"TRACKING_ENABLED"
value=
"true"
/>
...
...
@@ -33,33 +33,21 @@
</component>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
leaf-file-name=
"
urls.py"
pinned=
"false"
current-in-tab=
"fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
request/urls.py
"
>
<file
leaf-file-name=
"
index-vm.html"
pinned=
"false"
current-in-tab=
"tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/templates/dashboard/index-vm.html
"
>
<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
"
/>
<state
relative-caret-position=
"
617
"
>
<caret
line=
"
91"
column=
"96"
lean-forward=
"false"
selection-start-line=
"91"
selection-start-column=
"96"
selection-end-line=
"91"
selection-end-column=
"96
"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"
views.py"
pinned=
"false"
current-in-tab=
"tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
request/views
.py"
>
<file
leaf-file-name=
"
index.py"
pinned=
"false"
current-in-tab=
"fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/views/index
.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>
</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"
/>
<state
relative-caret-position=
"136"
>
<caret
line=
"49"
column=
"26"
lean-forward=
"false"
selection-start-line=
"49"
selection-start-column=
"13"
selection-end-line=
"49"
selection-end-column=
"26"
/>
<folding
/>
</state>
</provider>
...
...
@@ -77,7 +65,6 @@
</component>
<component
name=
"FindInProjectRecents"
>
<findStrings>
<find>
TransferOwnershipConfirmView
</find>
<find>
template-transfer-ownership
</find>
<find>
TransferTemplateOwnershipView
</find>
<find>
TransferOwnershipView
</find>
...
...
@@ -107,6 +94,7 @@
<find>
middleware
</find>
<find>
request
</find>
<find>
SuperuserRequiredMixin
</find>
<find>
#TODO
</find>
</findStrings>
<replaceStrings>
<replace>
'ACTIVE'
</replace>
...
...
@@ -167,17 +155,17 @@
<option
value=
"$PROJECT_DIR$/circle/circle/os_policies/keystone_policy.json"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/urls.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_auth/plugin/password.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/index.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_auth/policy.py"
/>
<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/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"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/middleware.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/index.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vm.html"
/>
</list>
</option>
</component>
...
...
@@ -247,32 +235,6 @@
<item
name=
"cloud"
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"
/>
</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>
...
...
@@ -287,7 +249,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
-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
"
/>
<property
name=
"SearchEverywhereHistoryKey"
value=
"index
v	null	null 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
"
/>
</component>
<component
name=
"RecentsManager"
>
<key
name=
"MoveFile.RECENT_KEYS"
>
...
...
@@ -512,7 +474,7 @@
</properties>
</breakpoint>
</default-breakpoints>
<option
name=
"time"
value=
"26
2
"
/>
<option
name=
"time"
value=
"26
6
"
/>
</breakpoint-manager>
<watches-manager
/>
</component>
...
...
@@ -557,48 +519,48 @@
</expressions>
<expressions
id=
"evaluateExpression"
>
<expression>
<expression-string>
view.request.user.permissions
</expression-string>
<language-id>
HTML
</language-id>
<expression-string>
quotas.get(
"
instances
"
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
view.request.user.permissions['can_decide_request']
</expression-string>
<language-id>
HTML
</language-id>
<expression-string>
openstack_api.nova.tenant_quota_get(self.request, user.project_id)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
view.request.user.permissions.can_decide_request
</expression-string>
<language-id>
HTML
</language-id>
<expression-string>
openstack_api.nova.tenant_quota_get(self.request, user.project_id).instances
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
id(view.request.user)
</expression-string>
<language-id>
HTML
</language-id>
<expression-string>
openstack_api.nova.tenant_quota_get(self.request, user.project_id)[
"
instances
"
]
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
view.request.user
</expression-string>
<language-id>
HTML
</language-id>
<expression-string>
max_instances
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
id(user.permissions
)
</expression-string>
<expression-string>
openstack_api.nova.tenant_quota_get(self.request, self.
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
id(user
)
</expression-string>
<expression-string>
openstack_api.nova.tenant_quota_get(self.request
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
user
</expression-string>
<language-id>
Python
</language-id>
<expression-string>
view.request.user.permissions
</expression-string>
<language-id>
HTML
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
&
user
</expression-string>
<language-id>
Python
</language-id>
<expression-string>
view.request.user.permissions['can_decide_request']
</expression-string>
<language-id>
HTML
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
</expressions>
...
...
@@ -836,14 +798,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/index.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"323"
>
<caret
line=
"69"
column=
"10"
lean-forward=
"false"
selection-start-line=
"69"
selection-start-column=
"10"
selection-end-line=
"69"
selection-end-column=
"10"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/network/models.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"244"
>
...
...
@@ -960,14 +914,6 @@
</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"
>
...
...
@@ -976,26 +922,28 @@
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/circle/circle/middleware
.py"
>
<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=
"
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
"
/>
<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/
dashboard/templates/dashboard/index-vm.html
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
request/views.py
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<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
relative-caret-position=
"250"
>
<caret
line=
"339"
column=
"43"
lean-forward=
"true"
selection-start-line=
"339"
selection-start-column=
"43"
selection-end-line=
"339"
selection-end-column=
"43"
/>
<folding>
<element
signature=
"e#731#787#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/braces/views/_acces
s.py"
>
<entry
file=
"file://$
PROJECT_DIR$/circle/request/url
s.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
87
"
>
<caret
line=
"2
4"
column=
"6"
lean-forward=
"false"
selection-start-line=
"24"
selection-start-column=
"6"
selection-end-line=
"24"
selection-end-column=
"6
"
/>
<state
relative-caret-position=
"1
99
"
>
<caret
line=
"2
9"
column=
"27"
lean-forward=
"false"
selection-start-line=
"29"
selection-start-column=
"27"
selection-end-line=
"29"
selection-end-column=
"27
"
/>
<folding
/>
</state>
</provider>
...
...
@@ -1008,13 +956,27 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
request/views
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/middleware
.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
relative-caret-position=
"221"
>
<caret
line=
"13"
column=
"72"
lean-forward=
"true"
selection-start-line=
"13"
selection-start-column=
"72"
selection-end-line=
"13"
selection-end-column=
"72"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/index.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"136"
>
<caret
line=
"49"
column=
"26"
lean-forward=
"false"
selection-start-line=
"49"
selection-start-column=
"13"
selection-end-line=
"49"
selection-end-column=
"26"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vm.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"617"
>
<caret
line=
"91"
column=
"96"
lean-forward=
"false"
selection-start-line=
"91"
selection-start-column=
"96"
selection-end-line=
"91"
selection-end-column=
"96"
/>
<folding
/>
</state>
</provider>
</entry>
...
...
circle/dashboard/templates/dashboard/index-vm.html
View file @
98118b72
...
...
@@ -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=
"
#TODO
"
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=
"
{{ max_instances }}
"
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/dashboard/views/index.py
View file @
98118b72
...
...
@@ -42,10 +42,12 @@ class IndexView(LoginRequiredMixin, TemplateView):
context
=
super
(
IndexView
,
self
)
.
get_context_data
(
**
kwargs
)
instances
=
openstack_api
.
nova
.
server_list
(
self
.
request
)[
0
]
#TODO: flatten?
quotas
=
openstack_api
.
nova
.
tenant_quota_get
(
self
.
request
,
user
.
project_id
)
context
.
update
({
'instances'
:
instances
[:
5
],
'more_instances'
:
len
(
instances
)
-
len
(
instances
[:
5
])
'more_instances'
:
len
(
instances
)
-
len
(
instances
[:
5
]),
'max_instances'
:
quotas
.
get
(
"instances"
)
.
limit
})
# instances
...
...
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