Commit a884e528 by Szabolcs Gelencser

Add initial template list

parent 8f13987f
......@@ -2,7 +2,8 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="1fbec8af-5a7c-40f9-b994-83ac07d1ae1d" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/circle/dashboard/views/template.py" afterPath="$PROJECT_DIR$/circle/dashboard/views/template.py" />
<change beforePath="$PROJECT_DIR$/circle/network/tables.py" afterPath="$PROJECT_DIR$/circle/network/tables.py" />
<change beforePath="$PROJECT_DIR$/circle/network/views.py" afterPath="$PROJECT_DIR$/circle/network/views.py" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
......@@ -32,56 +33,22 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="vxlan-edit.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/vxlan-edit.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="431">
<caret line="54" column="29" lean-forward="false" selection-start-line="54" selection-start-column="29" selection-end-line="54" selection-end-column="29" />
<folding>
<element signature="n#style#0;n#tr#0;n#table#0;n#div#1;n#div#3;n#!!top" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="template.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/template.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="212" column="28" lean-forward="false" selection-start-line="212" selection-start-column="28" selection-end-line="212" selection-end-column="28" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="template-list.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-list.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125">
<caret line="16" column="18" lean-forward="true" selection-start-line="16" selection-start-column="18" selection-end-line="16" selection-end-column="18" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="views.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/network/views.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="1040" column="28" lean-forward="false" selection-start-line="1040" selection-start-column="28" selection-end-line="1040" selection-end-column="28" />
<state relative-caret-position="35">
<caret line="972" column="25" lean-forward="false" selection-start-line="972" selection-start-column="25" selection-end-line="972" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="operations.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/network/operations.py">
<file leaf-file-name="tables.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/circle/network/tables.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="448">
<caret line="57" column="15" lean-forward="false" selection-start-line="57" selection-start-column="15" selection-end-line="57" selection-end-column="47" />
<folding>
<element signature="e#0#20#0" expanded="true" />
</folding>
<state relative-caret-position="304">
<caret line="243" column="18" lean-forward="false" selection-start-line="243" selection-start-column="18" selection-end-line="243" selection-end-column="18" />
<folding />
</state>
</provider>
</entry>
......@@ -149,7 +116,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/index.html" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-templates.html" />
<option value="$PROJECT_DIR$/circle/dashboard/templatetags/instance_tags.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-edit.html" />
......@@ -197,9 +163,10 @@
<option value="$PROJECT_DIR$/circle/openstack_api/neutron.py" />
<option value="$PROJECT_DIR$/circle/network/forms.py" />
<option value="$PROJECT_DIR$/circle/network/operations.py" />
<option value="$PROJECT_DIR$/circle/network/views.py" />
<option value="$PROJECT_DIR$/circle/network/templates/network/vxlan-edit.html" />
<option value="$PROJECT_DIR$/circle/dashboard/views/template.py" />
<option value="$PROJECT_DIR$/circle/network/views.py" />
<option value="$PROJECT_DIR$/circle/network/tables.py" />
</list>
</option>
</component>
......@@ -650,21 +617,6 @@ certifi.where()</expression-string>
</expressions>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/circle/common/management/commands/compileless.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</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="516">
<caret line="196" column="31" lean-forward="false" selection-start-line="196" selection-start-column="31" selection-end-line="196" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/admin.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="482">
......@@ -1000,28 +952,26 @@ certifi.where()</expression-string>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/views.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/util.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="1040" column="28" lean-forward="false" selection-start-line="1040" selection-start-column="28" selection-end-line="1040" selection-end-column="28" />
<state relative-caret-position="44">
<caret line="107" column="41" lean-forward="false" selection-start-line="107" selection-start-column="27" selection-end-line="107" selection-end-column="41" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/operations.py">
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/views/generic/list.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="448">
<caret line="57" column="15" lean-forward="false" selection-start-line="57" selection-start-column="15" selection-end-line="57" selection-end-column="47" />
<folding>
<element signature="e#0#20#0" expanded="true" />
</folding>
<state relative-caret-position="358">
<caret line="159" column="0" lean-forward="false" selection-start-line="159" selection-start-column="0" selection-end-line="159" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/util.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/template.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="44">
<caret line="107" column="41" lean-forward="false" selection-start-line="107" selection-start-column="27" selection-end-line="107" selection-end-column="41" />
<state relative-caret-position="85">
<caret line="199" column="51" lean-forward="false" selection-start-line="199" selection-start-column="51" selection-end-line="199" selection-end-column="51" />
<folding />
</state>
</provider>
......@@ -1036,26 +986,44 @@ certifi.where()</expression-string>
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/views/generic/list.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-list.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="358">
<caret line="159" column="0" lean-forward="false" selection-start-line="159" selection-start-column="0" selection-end-line="159" selection-end-column="0" />
<state relative-caret-position="125">
<caret line="16" column="18" lean-forward="true" selection-start-line="16" selection-start-column="18" selection-end-line="16" selection-end-column="18" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-list.html">
<entry file="file://$PROJECT_DIR$/circle/network/operations.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125">
<caret line="16" column="18" lean-forward="true" selection-start-line="16" selection-start-column="18" selection-end-line="16" selection-end-column="18" />
<state relative-caret-position="448">
<caret line="57" column="15" lean-forward="false" selection-start-line="57" selection-start-column="15" selection-end-line="57" selection-end-column="47" />
<folding>
<element signature="e#0#20#0" expanded="true" />
</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="202">
<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/dashboard/views/template.py">
<entry file="file://$PROJECT_DIR$/circle/network/views.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="212" column="28" lean-forward="false" selection-start-line="212" selection-start-column="28" selection-end-line="212" selection-end-column="28" />
<state relative-caret-position="35">
<caret line="972" column="25" lean-forward="false" selection-start-line="972" selection-start-column="25" selection-end-line="972" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/tables.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="304">
<caret line="243" column="18" lean-forward="false" selection-start-line="243" selection-start-column="18" selection-end-line="243" selection-end-column="18" />
<folding />
</state>
</provider>
......
......@@ -236,13 +236,13 @@ class VlanGroupTable(Table):
class VxlanTable(Table):
name = LinkColumn('network.vxlan', args=[A('vni')])
name = LinkColumn('network.vxlan', args=[A('id')])
class Meta:
model = Vxlan
attrs = {'class': 'table table-striped table-condensed'}
fields = ('vni', 'name', )
order_by = 'vni'
fields = ('name', )
order_by = 'name'
class HostRecordsTable(Table):
......
......@@ -969,7 +969,7 @@ class VlanGroupDelete(LoginRequiredMixin, SuperuserRequiredMixin, DeleteView):
class VxlanList(LoginRequiredMixin, SingleTableView):
model = Vxlan
model = Network
table_class = VxlanTable
table_pagination = False
......@@ -980,7 +980,7 @@ class VxlanList(LoginRequiredMixin, SingleTableView):
return ["network/vxlan-list.html"]
def get_queryset(self):
return Vxlan.get_objects_with_level('user', self.request.user)
return openstack_api.neutron.network_list(self.request)
def get(self, *args, **kwargs):
if self.request.is_ajax():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment