' <i class="fa fa-magic"></i> Exec NS Primitive</a></li>' +
' <li>' +
' <a href="/instances/ns/' +row["_id"] +'/operation">' +
- ' <i class="fa fa-list"></i> Active operations</a></li>' +
+ ' <i class="fa fa-list"></i> History of operations</a></li>' +
' <li class="divider"></li>' +
' <li><a href="#"' +
' onclick="javascript:newAlarmNs(\''+ row["short-name"] +'\', \''+row["_id"]+'\')">' +
{% block breadcrumb_body %}
{{ block.super }}
<li><a href="{% url 'instances:list' type=type %}">Instances</a></li>
- <li><a href="#">Operations</a></li>
+ <li><a href="#">History of Operations</a></li>
{% endblock %}
{% block content_body %}
<div class="box">
<div class="box-header with-border">
- <h3 class="box-title">Active operations</h3>
+ <h3 class="box-title">History of operations</h3>
</div>
<div class="box-body">
},
{
"render": function (data, type, row) {
- return row["startTime"];
+ return moment.unix(row['startTime']).format('YYYY-MM-DD hh:mm:ss a')
},
"targets": 3
},
{
"render": function (data, type, row) {
- return row["statusEnteredTime"];
+ return moment.unix(row['statusEnteredTime']).format('YYYY-MM-DD hh:mm:ss a')
},
"targets": 4
},
* @returns {boolean}
*/
ModelGraphEditor.prototype.updateDataNode = function (node, args, success, error) {
- console.log(node)
+ console.log(node);
+ var self = this;
var controller = new TCD3.OsmController();
- controller.updateNode(this,node, args, function(){
-
+ controller.updateNode(this,node, args, function(result){
+ self.updateData(result);
+ success && success();
}, error);
};
ModelGraphEditor.prototype.updateGraphParams = function (args, success, error) {
var controller = new TCD3.OsmController();
controller.updateGraphParams(args, function(){
-
+ success && success();
}, error);
};
form_data.forEach(function (value, key) {
formDataJson[key] = value;
});
+ var dialog = bootbox.dialog({
+ message: '<div class="text-center"><i class="fa fa-spin fa-spinner"></i> Updating...</div>',
+ closeButton: true
+ });
if (graph_editor._selected_node) {
graph_editor.updateDataNode(graph_editor._selected_node, formDataJson, function () {
-
+ dialog.modal('hide');
}, function (result) {
var data = result.responseJSON;
var title = "Error " + (data && data.code ? data.code : 'unknown');
var message = data && data.detail ? data.detail : 'No detail available.';
+ dialog.modal('hide');
bootbox.alert({
title: title,
message: message
})
} else {
graph_editor.updateGraphParams(formDataJson, function () {
-
+ dialog.modal('hide');
}, function (result) {
var data = result.responseJSON;
var title = "Error " + (data && data.code ? data.code : 'unknown');
var message = data && data.detail ? data.detail : 'No detail available.';
+ dialog.modal('hide');
bootbox.alert({
title: title,
message: message