{% block breadcrumb_body %}
{{ block.super }}
- <li><a href="{% url 'projects:instances:list' type=type %}">{{ type|upper }} Instances</a></li>
+ <li><a href="{% url 'instances:list' type=type %}">{{ type|upper }} Instances</a></li>
{% endblock %}
{% block content_body %}
<button type="button" class="btn btn-default" data-container="body"
data-toggle="tooltip" data-placement="top" title="Instantiate NS"
- onclick="javascript:openModalCreateNS({ 'project_id':'{{ project_id }}','vim_list_url': '{% url "projects:vims:list" %}', 'nsd_list_url': '{% url "projects:list_descriptors" descriptor_type='nsd' %}'})">
+ onclick="javascript:openModalCreateNS({ 'project_id':'{{ project_id }}','vim_list_url': '{% url "vims:list" %}', 'nsd_list_url': '{% url "projects:list_descriptors" descriptor_type='nsd' %}'})">
<i class="fa fa-paper-plane"></i> <span> New NS</span></button>
</div>
<td>
<div class="btn-group">
<button type="button" class="btn btn-default"
- onclick="javascript:showInstanceDetails('{% url 'projects:instances:show' instance_id=i|get:'_id' type=type %}')"
+ onclick="javascript:showInstanceDetails('{% url 'instances:show' instance_id=i|get:'_id' type=type %}')"
data-toggle="tooltip" data-placement="top" data-container="body" title="Show Info">
<i class="fa fa-info"></i>
</button>
<!--
<button type="button" class="btn btn-default"
- onclick="javascript:showInstanceTopology('{% url 'projects:instances:show_topology' instance_id=i|get:'_id' type=type %}')"
+ onclick="javascript:showInstanceTopology('{% url 'instances:show_topology' instance_id=i|get:'_id' type=type %}')"
data-toggle="tooltip" data-placement="top" data-container="body" title="Show Topology">
<i class="fa fa-sitemap"></i>
</button>
-->
<button type="button" class="btn btn-default"
- onclick="javascript:deleteNs('{% url 'projects:instances:delete' instance_id=i|get:'_id' type=type %}')"
+ onclick="javascript:deleteNs('{% url 'instances:delete' instance_id=i|get:'_id' type=type %}')"
data-toggle="tooltip" data-placement="top" data-container="body" title="Delete"><i
class="far fa-trash-alt"></i></button>
<span class="fa fa-caret-down"></span></button>
<ul class="dropdown-menu">
<li><a href="#"
- onclick="javascript:performAction('{% url 'projects:instances:action' instance_id=i|get:'_id' type=type %}')">
+ onclick="javascript:performAction('{% url 'instances:action' instance_id=i|get:'_id' type=type %}')">
<i class="fa fa-magic"></i> Exec NS Primitive</a></li>
<li>
- <a href="{% url 'projects:instances:ns_operations' type=type instance_id=i|get:'_id' %}">
+ <a href="{% url 'instances:ns_operations' type=type instance_id=i|get:'_id' %}">
<i class="fa fa-list"></i> Active operations</a></li>
<li class="divider"></li>
<li><a href="#"
- onclick="javascript:newAlarmNs('{% url 'projects:instances:ns_create_alarm' instance_id=i|get:'_id' type=type %}')">
+ onclick="javascript:newAlarmNs('{% url 'instances:ns_create_alarm' instance_id=i|get:'_id' type=type %}')">
<i class="far fa-bell"></i> New Alarm</a></li>
<li><a href="#"
- onclick="javascript:exportMetricNs('{% url 'projects:instances:ns_export_metric' instance_id=i|get:'_id' type=type %}')">
+ onclick="javascript:exportMetricNs('{% url 'instances:ns_export_metric' instance_id=i|get:'_id' type=type %}')">
<i class="far fa-chart-bar"></i> Export metric</a></li>
<li class="divider"></li>
<li>
- <a href="javascript:deleteNs('{% url 'projects:instances:delete' instance_id=i|get:'_id' type=type %}', true)">
+ <a href="javascript:deleteNs('{% url 'instances:delete' instance_id=i|get:'_id' type=type %}', true)">
<i class="far fa-trash-alt" style="color:red" ></i> Force delete</a></li>
</ul>
<td>
<div class="btn-group">
<button type="button" class="btn btn-default"
- onclick="javascript:showInstanceDetails('{% url 'projects:instances:show' instance_id=i|get:'_id' type=type %}')"
+ onclick="javascript:showInstanceDetails('{% url 'instances:show' instance_id=i|get:'_id' type=type %}')"
data-toggle="tooltip" data-placement="top" data-container="body" title="Show Info">
<i class="fa fa-info"></i>
</button>
{% block breadcrumb_body %}
{{ block.super }}
- <li><a href="{% url 'projects:instances:list' type=type %}">Instances</a></li>
+ <li><a href="{% url 'instances:list' type=type %}">Instances</a></li>
{% endblock %}
{% block content_body %}
<td>
<div class="btn-group">
<button type="button" class="btn btn-default"
- onclick="javascript:showOperationDetails('{% url 'projects:instances:ns_operation' op_id=i|get:'_id' instance_id=i|get:'nsInstanceId' type=type %}')"
+ onclick="javascript:showOperationDetails('{% url 'instances:ns_operation' op_id=i|get:'_id' instance_id=i|get:'nsInstanceId' type=type %}')"
data-toggle="tooltip" data-placement="top" data-container="body" title="More Info"><i
class="fa fa-info"></i>
</button>
{% block breadcrumb_body %}
{{ block.super }}
- <li><a href="{% url 'projects:instances:list' type=type %}">{{ type|upper }} Instances</a></li>
+ <li><a href="{% url 'instances:list' type=type %}">{{ type|upper }} Instances</a></li>
<li><a href="#"><i class="fa fa-sitemap"></i> {{ type|upper }} Topology</a></li>
{% endblock %}
<span aria-hidden="true">×</span></button>
<h4 class="modal-title">New Instance</h4>
</div>
- <form id="formCreateNS" action='{% url "projects:instances:create" %}'
+ <form id="formCreateNS" action='{% url "instances:create" %}'
class="form-horizontal"
method="post" enctype="multipart/form-data">
{% csrf_token %}
user = osmutils.get_user(request)
client = Client()
result = client.ns_create(user.get_token(), ns_data)
- return __response_handler(request, result, 'projects:instances:list', to_redirect=True, type='ns',
+ return __response_handler(request, result, 'instances:list', to_redirect=True, type='ns',
)
client = Client()
result = client.ns_delete(user.get_token(), instance_id, force)
print result
- return __response_handler(request, result, 'projects:instances:list', to_redirect=True, type='ns',
+ return __response_handler(request, result, 'instances:list', to_redirect=True, type='ns',
)
{% if descriptor_type == "nsd" %}
<button type="button" class="btn btn-default" data-container="body"
data-toggle="tooltip" data-placement="top" title="Instantiate NS"
- onclick="javascript:openModalCreateNS({ 'project_id':'{{ project_id }}', 'descriptor_type': '{{ descriptor_type }}', 'descriptor_name':'{{ k|get:"name" }}', 'descriptor_id':'{{ k|get:"_id" }}','vim_list_url': '{% url "projects:vims:list" %}', 'nsd_list_url': '{% url "projects:list_descriptors" descriptor_type=descriptor_type %}' })">
+ onclick="javascript:openModalCreateNS({ 'project_id':'{{ project_id }}', 'descriptor_type': '{{ descriptor_type }}', 'descriptor_name':'{{ k|get:"name" }}', 'descriptor_id':'{{ k|get:"_id" }}','vim_list_url': '{% url "vims:list" %}', 'nsd_list_url': '{% url "projects:list_descriptors" descriptor_type=descriptor_type %}' })">
<i class="fa fa-paper-plane"></i></button>
{% endif %}
<button type="button" class="btn btn-default" data-container="body"
<div class="inner"><h3>{{ project_overview.ns }}</h3>
<p>NS Instances</p></div>
<div class="icon"><i class="fa fa-sitemap fa-fw"></i></div>
- <a href='{% url "projects:instances:list" type="ns" %}' class="small-box-footer">Open list <i
+ <a href='{% url "instances:list" type="ns" %}' class="small-box-footer">Open list <i
class="fa fa-arrow-circle-right"></i></a></div>
</div>
<div class="inner"><h3>{{ project_overview.vnf }}</h3>
<p>VNF Instances</p></div>
<div class="icon"><i class="far fa-hdd fa-fw"></i></div>
- <a href='{% url "projects:instances:list" type="vnf" %}' class="small-box-footer">Open list <i
+ <a href='{% url "instances:list" type="vnf" %}' class="small-box-footer">Open list <i
class="fa fa-arrow-circle-right"></i></a></div>
</div>
</ul>
</li>
- {% url "projects:instances:list" type='ns' as instance_ns_list_url %}
- {% url "projects:instances:list" type='vnf' as instance_vnf_list_url %}
+ {% url "instances:list" type='ns' as instance_ns_list_url %}
+ {% url "instances:list" type='vnf' as instance_vnf_list_url %}
<li {% if request.get_full_path == instance_ns_list_url or request.get_full_path == instance_vnf_list_url %}
class="active treeview menu-open" {% else %} class="treeview menu-open" {% endif %} >
<a href="#">
</span>
</a>
<ul class="treeview-menu" style="display: block;">
- {% url "projects:instances:list" type='ns' as instance_ns_list_url %}
+ {% url "instances:list" type='ns' as instance_ns_list_url %}
<li {% if request.get_full_path == instance_ns_list_url %} class="active" {% endif %} >
- <a href='{% url "projects:instances:list" type="ns" %}'>
+ <a href='{% url "instances:list" type="ns" %}'>
<i class="fa fa-sitemap fa-fw"></i> <span>NS Instances</span>
</a>
</li>
- {% url "projects:instances:list" type='vnf' as instance_vnf_list_url %}
+ {% url "instances:list" type='vnf' as instance_vnf_list_url %}
<li {% if request.get_full_path == instance_vnf_list_url %} class="active" {% endif %} >
- <a href='{% url "projects:instances:list" type="vnf" %}'>
+ <a href='{% url "instances:list" type="vnf" %}'>
<i class="far fa-hdd fa-fw"></i> <span>VNF Instances</span>
</a>
</li>
</ul>
</li>
- {% url "projects:sdns:list" as sdn_list_url %}
+ {% url "sdns:list" as sdn_list_url %}
<li {% if request.get_full_path == sdn_list_url %} class="active" {% endif %}>
- <a href='{% url "projects:sdns:list" %}'>
+ <a href='{% url "sdns:list" %}'>
<i class="fas fa-globe fa-fw"></i> <span>SDN Controllers</span>
</a>
</li>
- {% url "projects:vims:list" as vim_list_url %}
+ {% url "vims:list" as vim_list_url %}
<li {% if request.get_full_path == vim_list_url %} class="active" {% endif %}>
- <a href='{% url "projects:vims:list" %}'>
+ <a href='{% url "vims:list" %}'>
<i class="fa fa-server fa-fw"></i> <span>VIM Accounts</span>
</a>
</li>
name='new_descriptor'),
url(r'^composer$', views.open_composer, name='open_composer'),
url(r'^availablenodes', views.get_available_nodes, name='get_available_nodes'),
- url(r'^sdn/', include('sdnctrlhandler.urls', namespace='sdns'), name='sdns_base'),
- url(r'^vims/', include('vimhandler.urls', namespace='vims'), name='vims_base'),
- url(r'^instances/', include('instancehandler.urls', namespace='instances'), name='instances_base'),
+
]
\ No newline at end of file
{% block breadcrumb_body %}
{{ block.super }}
- <li><a href="{% url 'projects:sdns:list' %}">SDN Controllers</a></li>
+ <li><a href="{% url 'sdns:list' %}">SDN Controllers</a></li>
{% endblock %}
{% block content_body %}
<div class="row">
<div class="col-md-12">
- <form action='{% url 'projects:sdns:create' %}' method="post">
+ <form action='{% url 'sdns:create' %}' method="post">
{% csrf_token %}
<div class="box">
<div class="box-header with-border">
</div>
<div class="box-footer">
- <button onclick="location.href='{% url 'projects:sdns:list' %}'"
+ <button onclick="location.href='{% url 'sdns:list' %}'"
class="btn btn-default pull-left">Back to
SDN Controllers
</button>
{% block breadcrumb_body %}
{{ block.super }}
- <li><a href="{% url 'projects:sdns:list' %}">SDN Controllers</a></li>
+ <li><a href="{% url 'sdns:list' %}">SDN Controllers</a></li>
{% endblock %}
{% block content_body %}
<div class="box-header with-border">
<h3 class="box-title">Registered SDN Controllers</h3>
<div class="box-tools">
- <a href='{% url "projects:sdns:create" %}' class="btn btn-block btn-primary btn-sm"><i
+ <a href='{% url "sdns:create" %}' class="btn btn-block btn-primary btn-sm"><i
class="fa fa-plus"></i><span> New SDN Controller</span></a>
</div>
</div>
result = client.sdn_create(user.get_token(), sdn_data)
- return __response_handler(request, result, 'projects:sdns:list', to_redirect=True, )
+ return __response_handler(request, result, 'sdns:list', to_redirect=True, )
@login_required
del_res = client.sdn_delete(user.get_token(), sdn_id)
except Exception as e:
log.exception(e)
- return __response_handler(request, {}, 'projects:sdns:list', to_redirect=True, )
+ return __response_handler(request, {}, 'sdns:list', to_redirect=True, )
@login_required
app_name = 'base'
urlpatterns = [
- #url(r'^admin/', admin.site.urls),
- url(r'^auth/$', user_views.user_login, name='auth_user'),
- #url(r'^register', user_views.register_view, name='register_user'),
- url(r'^projects/', include('projecthandler.urls.project', namespace='projects'), name='projects_base'),
- url(r'^users/', include('userhandler.urls', namespace='users'), name='users_base'),
-
url(r'^$', views.home, name='home'),
url(r'^home', views.home, name='home'),
+ url(r'^auth/$', user_views.user_login, name='auth_user'),
+ url(r'^projects/', include('projecthandler.urls.project', namespace='projects'), name='projects_base'),
+ url(r'^sdn/', include('sdnctrlhandler.urls', namespace='sdns'), name='sdns_base'),
+ url(r'^vims/', include('vimhandler.urls', namespace='vims'), name='vims_base'),
+ url(r'^instances/', include('instancehandler.urls', namespace='instances'), name='instances_base'),
+ url(r'^admin/users/', include('userhandler.urls', namespace='users'), name='users_base'),
url(r'^forbidden', views.forbidden, name='forbidden'),
]
function deleteSDN(sdn_uuid) {
bootbox.confirm("Are you sure want to delete?", function (result) {
if (result) {
- location.href = '/projects/sdn/' + sdn_uuid + '/delete'
+ location.href = '/sdn/' + sdn_uuid + '/delete'
}
})
}
});
$.ajax({
- url: '/projects/sdn/' + sdn_uuid ,
+ url: '/sdn/' + sdn_uuid ,
//url: '/sdn/' + sdn_uuid,
type: 'GET',
dataType: "json",
}
});
-
-
$('#modal_new_user').modal('show');
}
{% block breadcrumb_body %}
{{ block.super }}
- <li><a href="{% url 'projects:vims:list' %}">VIMS</a></li>
+ <li><a href="{% url 'vims:list' %}">VIMS</a></li>
{% endblock %}
{% block content_body %}
<div class="row">
<div class="col-md-12">
- <form action='{% url "projects:vims:create" %}' method="post">
+ <form action='{% url "vims:create" %}' method="post">
{% csrf_token %}
<div class="box">
<div class="box-header with-border">
</div>
<div class="box-footer">
- <button onclick="location.href='{% url 'projects:vims:list' %}'" class="btn btn-default pull-left">Back to
+ <button onclick="location.href='{% url 'vims:list' %}'" class="btn btn-default pull-left">Back to
VIM Accounts
</button>
<button class="btn btn-primary pull-right">Create</button>
{% block breadcrumb_body %}
{{ block.super }}
- <li><a href="{% url "projects:vims:list" %}">VIMS</a></li>
+ <li><a href="{% url "vims:list" %}">VIMS</a></li>
{% endblock %}
{% block content_body %}
<div class="box-header with-border">
<h3 class="box-title">Registered VIM</h3>
<div class="box-tools">
- <a href='{% url "projects:vims:create" %}' class="btn btn-block btn-primary btn-sm"><i
+ <a href='{% url "vims:create" %}' class="btn btn-block btn-primary btn-sm"><i
class="fa fa-plus"></i><span> New VIM</span></a>
</div>
</div>
<td>
<div class="btn-group">
<button type="button" class="btn btn-default"
- onclick="location.href='{% url "projects:vims:show" vim_id=p|get:"_id" %}'" data-toggle="tooltip" data-placement="top" data-container="body" title="Show Info"><i
+ onclick="location.href='{% url "vims:show" vim_id=p|get:"_id" %}'" data-toggle="tooltip" data-placement="top" data-container="body" title="Show Info"><i
class="fa fa-info"></i></button>
<button type="button" class="btn btn-default"
- onclick="javascript:deleteVim('{% url "projects:vims:delete" vim_id=p|get:"_id" %}')" data-toggle="tooltip" data-placement="top" data-container="body" title="Delete"><i
+ onclick="javascript:deleteVim('{% url "vims:delete" vim_id=p|get:"_id" %}')" data-toggle="tooltip" data-placement="top" data-container="body" title="Delete"><i
class="far fa-trash-alt" ></i></button>
</div>
</td>
{% block breadcrumb_body %}
{{ block.super }}
- <li><a href="{% url 'projects:vims:list' %}">VIMS</a></li>
+ <li><a href="{% url 'vims:list' %}">VIMS</a></li>
{% endblock %}
{% block content_body %}
</div>
<div class="box-footer">
<div class="">
- <button onclick="location.href='{% url 'projects:vims:list' %}'" class="btn btn-primary">Back to VIM Accounts</button>
+ <button onclick="location.href='{% url 'vims:list' %}'" class="btn btn-primary">Back to VIM Accounts</button>
</div>
</div>
</div>
print e
result = client.vim_create(user.get_token(), vim_data)
# TODO 'vim:show', to_redirect=True, vim_id=vim_id
- return __response_handler(request, result, 'projects:vims:list', to_redirect=True, )
+ return __response_handler(request, result, 'vims:list', to_redirect=True, )
@login_required
def delete(request, vim_id=None):
del_res = client.vim_delete(user.get_token(), vim_id)
except Exception as e:
log.exception(e)
- return __response_handler(request, {}, 'projects:vims:list', to_redirect=True, )
+ return __response_handler(request, {}, 'vims:list', to_redirect=True, )
@login_required
def show(request, vim_id=None):