aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--graphgraph-fe/src/graph_settings.css22
-rw-r--r--graphgraph-fe/src/graph_settings.js70
-rw-r--r--graphgraph-fe/src/graph_settings_menu.css3
-rw-r--r--graphgraph-fe/src/popup_settings.css6
-rw-r--r--src/main/java/org/onap/aai/graphgraph/ModelExporter.java2
-rw-r--r--src/main/resources/model_export.vm2
6 files changed, 59 insertions, 46 deletions
diff --git a/graphgraph-fe/src/graph_settings.css b/graphgraph-fe/src/graph_settings.css
index c30cda9..2cb08e5 100644
--- a/graphgraph-fe/src/graph_settings.css
+++ b/graphgraph-fe/src/graph_settings.css
@@ -6,31 +6,31 @@
}
.schemas-dropdown{
- width: 100px;
+ width: 60px;
}
-.node-dropdown{
+.node-dropdown {
width: 200px;
}
-.source-dropdown-div{
- margin-left: 20px;
- margin-right: 20px;
+.source-dropdown-div {
+ margin-left: 10px;
+ margin-right: 10px;
+ margin-bottom: 3px;
}
-.startendnode-dropdown{
+.startendnode-dropdown {
display: flex;
}
-.graph-menu
-{
+.graph-menu {
display: flex;
width: 80px !important;
}
-.modal-button
-{
+.modal-button {
padding-top: 20px;
- margin: 0;
+ margin-left: 5px;
+ margin-right: 5px;
}
diff --git a/graphgraph-fe/src/graph_settings.js b/graphgraph-fe/src/graph_settings.js
index c8f03f1..5311582 100644
--- a/graphgraph-fe/src/graph_settings.js
+++ b/graphgraph-fe/src/graph_settings.js
@@ -216,39 +216,47 @@ class GraphSettings extends React.Component {
<MenuItem key='Parents' eventKey='Parents'>Parent-child (OXM structure)</MenuItem>,
];
return (
- <div>
+ <div>
<div className="graph-menu">
- <div className="startendnode-dropdown">
- <div>
- <Label>Schemas</Label>
- <DropdownButton className="schemas-dropdown" onSelect={this.selectSchema} id="schemas" title={this.state.selectedSchema}>{schemas}</DropdownButton>
- </div>
- <div className="source-dropdown-div">
- <Label>Source Node</Label>
- <DropdownButton className="node-dropdown" onSelect={this.onChangeStartNode} id="namesFrom" title={this.state.fromNode}>{fromItems}</DropdownButton>
- </div>
- <div>
- <Label>Destination Node</Label>
- <DropdownButton disabled={!this.state.enableDestinationNode} className="node-dropdown" onSelect={this.onChangeToNode} id="namesTo" title={this.state.toNode}>{items}</DropdownButton>
- </div>
- <div className="source-dropdown-div">
- <Label>Edge filter</Label>
- <DropdownButton className="node-dropdown" onSelect={this.changeEdgeFilter} id="filterEdge" title={this.state.edgeFilter}>{edgeFilterItems}</DropdownButton>
- </div>
- <div className="source-dropdown-div">
- <Label>Selected Node</Label>
- <DropdownButton className="node-dropdown" onSelect={this.onSelectNode} id="selectedNode" title={this.props.selectedNode}>{currentNodeNames}</DropdownButton>
- </div>
- <Popup isDisabled={!this.state.showHops} edgeFilter={this.state.edgeFilter} parentHops={this.state.hops.parents} childHops={this.state.hops.child} cousinHops={this.state.hops.cousin} updateHops={this.updateHops}/>
- <div className="modal-button">
- <ValidationModal schemaProblems={this.state.schemaProblems}/>
- </div>
- <div className="modal-button">
- <DownloadExport schemaVersion={this.state.selectedSchema}/>
- </div>
- </div>
- </div>
+ <div className="startendnode-dropdown">
+ <div>
+ <Label>Schemas</Label>
+ <DropdownButton className="schemas-dropdown" onSelect={this.selectSchema} id="schemas"
+ title={this.state.selectedSchema}>{schemas}</DropdownButton>
+ </div>
+ <div className="source-dropdown-div">
+ <Label>Source Node</Label>
+ <DropdownButton className="node-dropdown" onSelect={this.onChangeStartNode} id="namesFrom"
+ title={this.state.fromNode}>{fromItems}</DropdownButton>
+ </div>
+ <div>
+ <Label>Destination Node</Label>
+ <DropdownButton disabled={!this.state.enableDestinationNode} className="node-dropdown"
+ onSelect={this.onChangeToNode} id="namesTo"
+ title={this.state.toNode}>{items}</DropdownButton>
+ </div>
+ <div className="source-dropdown-div">
+ <Label>Edge filter</Label>
+ <DropdownButton className="node-dropdown" onSelect={this.changeEdgeFilter} id="filterEdge"
+ title={this.state.edgeFilter}>{edgeFilterItems}</DropdownButton>
+ </div>
+ <div>
+ <Label>Selected Node</Label>
+ <DropdownButton className="node-dropdown" onSelect={this.onSelectNode} id="selectedNode"
+ title={this.props.selectedNode}>{currentNodeNames}</DropdownButton>
+ </div>
+ <Popup isDisabled={!this.state.showHops} edgeFilter={this.state.edgeFilter}
+ parentHops={this.state.hops.parents} childHops={this.state.hops.child}
+ cousinHops={this.state.hops.cousin} updateHops={this.updateHops}/>
+ <div className="modal-button">
+ <ValidationModal schemaProblems={this.state.schemaProblems}/>
+ </div>
+ <div className="modal-button">
+ <DownloadExport schemaVersion={this.state.selectedSchema}/>
+ </div>
+ </div>
</div>
+ </div>
);
}
}
diff --git a/graphgraph-fe/src/graph_settings_menu.css b/graphgraph-fe/src/graph_settings_menu.css
index 718dfa0..5ade64e 100644
--- a/graphgraph-fe/src/graph_settings_menu.css
+++ b/graphgraph-fe/src/graph_settings_menu.css
@@ -7,5 +7,6 @@
}
.navbar-adjust .container .navbar-header {
- margin-right: 250px;
+ margin-right: 80px;
+ margin-top: 3px;
}
diff --git a/graphgraph-fe/src/popup_settings.css b/graphgraph-fe/src/popup_settings.css
index 2a548af..c37c750 100644
--- a/graphgraph-fe/src/popup_settings.css
+++ b/graphgraph-fe/src/popup_settings.css
@@ -1,6 +1,8 @@
.settings-button {
- margin-top: 18px;
- margin-left: 15px;
+ margin-top: 20px;
+ margin-left: 25px;
+ margin-right: 5px;
+ margin-bottom: 3px;
}
.close.link-button {
diff --git a/src/main/java/org/onap/aai/graphgraph/ModelExporter.java b/src/main/java/org/onap/aai/graphgraph/ModelExporter.java
index 474e7de..6064665 100644
--- a/src/main/java/org/onap/aai/graphgraph/ModelExporter.java
+++ b/src/main/java/org/onap/aai/graphgraph/ModelExporter.java
@@ -40,6 +40,7 @@ import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.runtime.RuntimeConstants;
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
+import org.apache.velocity.tools.generic.EscapeTool;
import org.eclipse.jetty.util.StringUtil;
import org.onap.aai.edges.EdgeRule;
import org.onap.aai.edges.enums.DirectionNotation;
@@ -140,6 +141,7 @@ public class ModelExporter {
updateEntities(entityList, associationsList, allObjects);
context.put("entityList", entityList);
context.put("associationList", associationsList);
+ context.put("esc", new EscapeTool());
return context;
}
diff --git a/src/main/resources/model_export.vm b/src/main/resources/model_export.vm
index ae92fab..a8992c2 100644
--- a/src/main/resources/model_export.vm
+++ b/src/main/resources/model_export.vm
@@ -51,7 +51,7 @@
#foreach($entity in $entityList)
<packagedElement xmi:type="uml:Class" xmi:id="$entity.id" name="$entity.name">
<ownedComment xmi:type="uml:Comment" xmi:id="$entity.randomId" annotatedElement="$entity.id">
- <body>$entity.description</body>
+ <body>$esc.xml($entity.description)</body>
</ownedComment>
#foreach($association in $entity.neighbours)
#if( $association.isComposition)