3 <div class=
"box-header with-border">
4 <h3 class=
"box-title">{{ type|upper }} Instances
</h3>
6 <div class=
"box-tools">
8 <button type=
"button" class=
"btn btn-default" data-container=
"body"
9 data-toggle=
"tooltip" data-placement=
"top" title=
"Instantiate NS"
10 onclick=
"javascript:openModalCreateNS({ 'project_id':'{{ project_id }}','vim_list_url': '{% url "vims:list
" %}', 'nsd_list_url': '{% url "projects:list_descriptors
" descriptor_type='nsd' %}'})">
11 <i class=
"fa fa-paper-plane"></i> <span> New NS
</span></button>
16 <div class=
"box-body">
18 <div class=
"alert alert-danger alert-dismissible fade in">
19 <button type=
"button" class=
"close" data-dismiss=
"alert" aria-hidden=
"true">×
</button>
20 <h4><i class=
"icon fa fa-ban"></i> Error
</h4>
24 <table id=
"instances_table" class=
"table table-bordered table-striped">
30 <th style=
"width:5%">Operational Status
</th>
31 <th style=
"width:5%">Config Status
</th>
32 <th>Detailed Status
</th>
37 {% for i in instances %}
39 <td>{{ i|get:
"short-name" }}
</td>
40 <td>{{ i|get:
"_id" }}
</td>
42 <td>{{ i|get:
"nsd-name-ref" }}
</td>
44 {% if i|get:
"operational-status" == 'failed' %}
45 <td><span class=
"label label-danger">{{ i|get:
"operational-status" }}
</span></td>
46 {% elif i|get:
"operational-status" == 'init' %}
47 <td><span class=
"label label-warning">{{ i|get:
"operational-status" }}
</span></td>
48 {% elif i|get:
"operational-status" == 'running' %}
49 <td><span class=
"label label-success">{{ i|get:
"operational-status" }}
</span></td>
51 <td>{{ i|get:
"operational-status" }}
</td>
53 {% if i|get:
"config-status" == 'failed' %}
54 <td><span class=
"label label-danger">{{ i|get:
"config-status" }}
</span></td>
55 {% elif i|get:
"config-status" == 'init' %}
56 <td><span class=
"label label-warning">{{ i|get:
"config-status" }}
</span></td>
57 {% elif i|get:
"config-status" == 'running' %}
58 <td><span class=
"label label-success">{{ i|get:
"config-status" }}
</span></td>
59 {% elif i|get:
"config-status" == 'configured' %}
60 <td><span class=
"label label-success">{{ i|get:
"config-status" }}
</span></td>
62 <td>{{ i|get:
"config-status" }}
</td>
64 <td class=
"ellipsis" data-text=
"{{ i|get:"detailed-status
" }}">{{ i|get:
"detailed-status" }}
</td>
66 <div class=
"btn-group">
67 <button type=
"button" class=
"btn btn-default"
68 onclick=
"javascript:showInstanceDetails('{% url 'instances:show' instance_id=i|get:'_id' type=type %}')"
69 data-toggle=
"tooltip" data-placement=
"top" data-container=
"body" title=
"Show Info">
70 <i class=
"fa fa-info"></i>
73 <button type="button" class="btn btn-default"
74 onclick="javascript:showInstanceTopology('{% url 'instances:show_topology' instance_id=i|get:'_id' type=type %}')"
75 data-toggle="tooltip" data-placement="top" data-container="body" title="Show Topology">
76 <i class="fa fa-sitemap"></i>
80 <button type=
"button" class=
"btn btn-default"
81 onclick=
"javascript:deleteNs('{% url 'instances:delete' instance_id=i|get:'_id' type=type %}')"
82 data-toggle=
"tooltip" data-placement=
"top" data-container=
"body" title=
"Delete"><i
83 class=
"far fa-trash-alt"></i></button>
85 <button type=
"button" class=
"btn btn-default dropdown-toggle"
86 data-toggle=
"dropdown" aria-expanded=
"false">Actions
87 <span class=
"fa fa-caret-down"></span></button>
88 <ul class=
"dropdown-menu">
90 onclick=
"javascript:performAction('{% url 'instances:action' instance_id=i|get:'_id' type=type %}')">
91 <i class=
"fa fa-magic"></i> Exec NS Primitive
</a></li>
93 <a href=
"{% url 'instances:ns_operations' type=type instance_id=i|get:'_id' %}">
94 <i class=
"fa fa-list"></i> Active operations
</a></li>
95 <li class=
"divider"></li>
97 onclick=
"javascript:newAlarmNs('{% url 'instances:ns_create_alarm' instance_id=i|get:'_id' type=type %}')">
98 <i class=
"far fa-bell"></i> New Alarm
</a></li>
100 onclick=
"javascript:exportMetricNs('{% url 'instances:ns_export_metric' instance_id=i|get:'_id' type=type %}')">
101 <i class=
"far fa-chart-bar"></i> Export metric
</a></li>
102 <li class=
"divider"></li>
104 <a href=
"javascript:deleteNs('{% url 'instances:delete' instance_id=i|get:'_id' type=type %}', true)">
105 <i class=
"far fa-trash-alt" style=
"color:red" ></i> Force delete
</a></li>