{% block content_body %}
{{ block.super }}
{% include 'modal/nst_details.html' %}
+{% include 'modal/instance_create_nsi.html' %}
{% csrf_token %}
<div class="row">
<div class="col-md-12">
<script src="/static/src/drop_zone.js"></script>
<script src="/static/src/netslicehandler/onboard_template.js"></script>
<script src="/static/src/netslicehandler/templates_list.js"></script>
+<script src="/static/src/instancehandler/instance_create.js"></script>
<script>
var csrf_token = '{{csrf_token}}';
var table;
{
"render": function (data, type, row) {
return '<div class="btn-group">' +
+ ' <button type="button" class="btn btn-default" data-container="body"\n' +
+ 'data-toggle="tooltip" data-placement="top" title="Instantiate NS"\n' +
+ 'onclick="javascript:openModalCreateNSI({\'template_name\':\''+row["name"]+'\', \'template_id\':\''+row["_id"]+'\', \'project_id\':\'{{ project_id }}\',\'vim_list_url\': \'{% url "vims:list" %}\', \'nst_list_url\': \'{% url "netslices:list_templates" %}\'})">\n' +
+ '<i class="fa fa-paper-plane"></i></button>\n'+
' <button type="button" class="btn btn-default"' +
' onclick="javascript:showNstDetails(\'' + row["_id"] + '\')"' +
' data-toggle="tooltip" data-placement="top" data-container="body" title="Open">' +
}
}
});
-
- if (args.descriptor_id) {
+ if (args.template_id) {
// Set the value, creating a new option if necessary
- if ($('#nstId').find("option[value='" + args.descriptor_id + "']").length) {
- $('#nstId').val(args.descriptor_id).trigger('change');
+ if ($('#nstId').find("option[value='" + args.template_id + "']").length) {
+ $('#nstId').val(args.template_id).trigger('change');
} else {
// Create a DOM Option and pre-select by default
- var newOption = new Option(args.descriptor_name, args.descriptor_id, true, true);
+ var newOption = new Option(args.template_name, args.template_id, true, true);
// Append it to the select
$('#nstId').append(newOption).trigger('change');
}