Skip to content

Commit

Permalink
Merge d3ed46f into 5b422b4
Browse files Browse the repository at this point in the history
  • Loading branch information
azaroth42 committed Jun 30, 2020
2 parents 5b422b4 + d3ed46f commit b0706fb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arches/app/media/js/models/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ define([
self.filtered = ko.observable(false);
self.name = ko.observable('');
self.description = ko.observable(null);
self.slug = ko.observable(null);
self.nodeGroupId = ko.observable('');
var datatype = ko.observable('');
self.datatype = ko.computed({
Expand Down Expand Up @@ -175,6 +176,7 @@ define([
datatype: self.datatype,
nodegroup_id: self.nodeGroupId,
description: self.description,
slug: self.slug,
ontologyclass: self.ontologyclass,
parentproperty: self.parentproperty,
config: config,
Expand Down Expand Up @@ -251,6 +253,7 @@ define([
self.nodeGroupId(source.nodegroup_id);
self.datatype(source.datatype);
self.description(source.description);
self.slug(source.slug);
self.ontologyclass(source.ontologyclass);
self.parentproperty(source.parentproperty);
self.issearchable(source.issearchable);
Expand Down
2 changes: 2 additions & 0 deletions arches/app/models/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,8 @@ def append_branch(self, property, nodeid=None, graphid=None, skip_validation=Fal
if skip_validation or self.can_append(branch_graph, nodeToAppendTo):
branch_copy = branch_graph.copy()["copy"]
branch_copy.root.istopnode = False
# Copy the description of the branch to the new node
branch_copy.root.description = branch_graph.description

newEdge = models.Edge(domainnode=nodeToAppendTo, rangenode=branch_copy.root, ontologyproperty=property, graph=self)
branch_copy.add_edge(newEdge)
Expand Down
13 changes: 13 additions & 0 deletions arches/app/templates/views/graph/graph-designer/graph-settings.htm
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,19 @@
<textarea placeholder="{% trans "URI to a JSON-LD Context Object or a Raw Context Object or Array of Context Objects" %}" class="form-control input-md widget-input" data-bind="textInput:graph.jsonldcontext"></textarea>
</div>
</div>

<div class="row widget-container">
<div class="form-group">
<div class="relative">
<label class="col-xs-12 control-label widget-input-label"> {% trans "URI Slug for API Access" %} </label>
</div>

<div class="col-xs-12">
<input placeholder="{% trans "Slug" %}" class="form-control input-md widget-input" data-bind="value:graph.slug">
</div>
</div>
</div>

</div>
<!-- /ko -->
</form>
Expand Down
1 change: 1 addition & 0 deletions arches/app/views/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def post(self, request, graphid):
"isactive",
"color",
"jsonldcontext",
"slug",
"config",
"template_id",
]:
Expand Down

0 comments on commit b0706fb

Please sign in to comment.