From: lombardofr Date: Fri, 16 Nov 2018 08:44:36 +0000 (+0100) Subject: operation history fix X-Git-Tag: v5.0.0~14 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F93%2F6893%2F4;p=osm%2FLW-UI.git operation history fix Change-Id: I6d743f1a19558b3ad69293d8d055213a351b2796 Signed-off-by: lombardofr --- diff --git a/instancehandler/template/instance_list.html b/instancehandler/template/instance_list.html index 97eac57..4ba6fe0 100644 --- a/instancehandler/template/instance_list.html +++ b/instancehandler/template/instance_list.html @@ -164,7 +164,7 @@ ' Exec NS Primitive' + '
  • ' + ' ' + - ' Active operations
  • ' + + ' History of operations' + '
  • ' + '
  • ' + diff --git a/instancehandler/template/instance_operations_list.html b/instancehandler/template/instance_operations_list.html index 7e84658..c4b352f 100644 --- a/instancehandler/template/instance_operations_list.html +++ b/instancehandler/template/instance_operations_list.html @@ -28,7 +28,7 @@ {% block breadcrumb_body %} {{ block.super }}
  • Instances
  • -
  • Operations
  • +
  • History of Operations
  • {% endblock %} {% block content_body %} @@ -40,7 +40,7 @@
    -

    Active operations

    +

    History of operations

    @@ -139,13 +139,13 @@ }, { "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 }, diff --git a/static/TopologyComposer/js/model_graph_editor.js b/static/TopologyComposer/js/model_graph_editor.js index fd80822..4afc955 100644 --- a/static/TopologyComposer/js/model_graph_editor.js +++ b/static/TopologyComposer/js/model_graph_editor.js @@ -180,10 +180,12 @@ TCD3.ModelGraphEditor = (function () { * @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); }; @@ -195,7 +197,7 @@ TCD3.ModelGraphEditor = (function () { ModelGraphEditor.prototype.updateGraphParams = function (args, success, error) { var controller = new TCD3.OsmController(); controller.updateGraphParams(args, function(){ - + success && success(); }, error); }; diff --git a/static/src/descriptorhandler/composer.js b/static/src/descriptorhandler/composer.js index 175f46b..d56e22f 100644 --- a/static/src/descriptorhandler/composer.js +++ b/static/src/descriptorhandler/composer.js @@ -72,13 +72,18 @@ $(document).ready(function () { form_data.forEach(function (value, key) { formDataJson[key] = value; }); + var dialog = bootbox.dialog({ + message: '
    Updating...
    ', + 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 @@ -86,11 +91,12 @@ $(document).ready(function () { }) } 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