several changes on auth flow
Change-Id: I49ddbb074a9bc018b9e5becafbe5956fa5860333
Signed-off-by: lombardofr <lombardo@everyup.it>
diff --git a/static/topology3D/js/graph_editor.js b/static/topology3D/js/graph_editor.js
index 36e7c8e..8343f05 100755
--- a/static/topology3D/js/graph_editor.js
+++ b/static/topology3D/js/graph_editor.js
@@ -184,7 +184,7 @@
this.container = chart.parent();
$(window).on("resize", function() {
- var palette_width = $("#palette").width()
+ var palette_width = ($("#palette").length > 0) ? $("#palette").width() : 0;
var working_width = self.container.width() - palette_width;
self.width = (working_width < 0) ? 0 : working_width;
self.height = self.container.height();
@@ -197,7 +197,7 @@
GraphEditor.prototype.get_d3_symbol =
function (myString) {
- log(myString)
+
switch (myString) {
case "circle":
return d3.symbolCircle;
@@ -227,7 +227,6 @@
GraphEditor.prototype.get_name_from_d3_symbol =
function (mySymbol) {
- //log(myString)
switch (mySymbol) {
case d3.symbolCircle:
return "circle";
@@ -372,7 +371,7 @@
* @returns {boolean}
*/
GraphEditor.prototype.addLink = function (link) {
- console.log(JSON.stringify(link))
+ console.log("addLink" + JSON.stringify(link))
if (link.source && link.target) {
this.force.stop();
this.cleanAll();
@@ -741,6 +740,7 @@
return 80
})
.type(function (d) {
+ console.log("popiup")
return (self.get_d3_symbol());
})
)
@@ -948,7 +948,7 @@
if (self.lastKeyDown == SHIFT_BUTTON && self._selected_node != undefined) {
var source_id = self._selected_node.id;
var target_id = d.id;
- log(JSON.stringify(self.filter_parameters.link.view));
+ log("--" + JSON.stringify(self.filter_parameters.link.view));
var new_link = {
source: source_id,
target: target_id,
@@ -1036,7 +1036,7 @@
*/
GraphEditor.prototype.resizeSvg = function (width, height) {
log("resizeSvg");
- log(event);
+ //log(event);
this.width = width || this.width;
this.height = height || this.height;
this.svg.attr('width', width);
diff --git a/static/topology3D/js/model_graph_editor.js b/static/topology3D/js/model_graph_editor.js
index 3c275dd..be092a4 100644
--- a/static/topology3D/js/model_graph_editor.js
+++ b/static/topology3D/js/model_graph_editor.js
@@ -56,6 +56,7 @@
this._edit_mode = (args.edit_mode != undefined) ? args.edit_mode : this._edit_mode;
Object.keys(args.gui_properties["nodes"]).forEach(function (key, index) {
+ console.log(key + " ####")
this.type_property[key] = args.gui_properties["nodes"][key];
if ( this.type_property[key]['property'] != undefined){
for(var c_prop in this.type_property[key]){
@@ -69,6 +70,7 @@
}
}
else{
+
this.type_property[key]["shape"] = this.parent.get_d3_symbol(this.type_property[key]["shape"]);
if (this.type_property[key]["image"] != undefined) {
this.type_property[key]["image"] = IMAGE_PATH + this.type_property[key]["image"];
@@ -331,7 +333,7 @@
ModelGraphEditor.prototype.savePositions = function (data) {
var vertices = {}
this.node.each(function (d) {
- vertices[d.id] = {}
+ vertices[d.id] = {};
vertices[d.id]['x'] = d.x;
vertices[d.id]['y'] = d.y;
});
@@ -339,7 +341,7 @@
'vertices': vertices
});
- }
+ };
/**
* Internal functions
@@ -376,7 +378,7 @@
self.removeNode(d, null, showAlert);
},
edit_mode: true
- },
+ }
];
if(this.customBehavioursOnEvents){