1 function deleteSDN(sdn_uuid
) {
2 bootbox
.confirm("Are you sure want to delete?", function (result
) {
4 location
.href
= '/sdn/' + sdn_uuid
+ '/delete'
9 function showSDN(sdn_uuid
) {
10 var dialog
= bootbox
.dialog({
11 message
: '<div class="text-center"><i class="fa fa-spin fa-spinner"></i> Loading...</div>',
16 url
: '/sdn/' + sdn_uuid
,
17 //url: '/sdn/' + sdn_uuid,
20 contentType
: "application/json;charset=utf-8",
21 success: function (result
) {
22 //$('#modal_show_vim_body').empty();
25 $('#modal_show_sdn_body').find('span').text('-');
27 $('#' + k
).text(sdn
[k
])
30 for (var i
in sdn
['_admin']) {
31 if (i
=== 'modified' || i
=== 'created') {
32 //$('#' + i).text(new Date(sdn['_admin'][i]* 1000).toUTCString());
33 $('#' + i
).text(moment(sdn
['_admin'][i
] * 1000).format('DD/MM/YY hh:mm:ss'));
35 else if (i
=== 'deployed') {
36 $('#' + i
).text(JSON
.stringify(sdn
['_admin'][i
]))
39 $('#' + i
).text(sdn
['_admin'][i
])
43 $('#modal_show_sdn').modal('show');
47 bootbox
.alert("An error occurred while retrieving the SDN controller info.");
51 error: function (result
) {
53 bootbox
.alert("An error occurred while retrieving the SDN controller info.");