Skip to content

Commit

Permalink
Graph Manager: Add Graph Switcher RE: 3553
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Munowitch committed Jun 21, 2018
1 parent 8ea0acb commit a39d5ca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arches/app/media/js/views/graph-designer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ define([
ontologyClasses: ko.observable(data['ontologyClasses']),
}

viewModel.graphid.subscribe(function (graphid) {
var re = /\b[a-f\d-]{36}\b/
var newPath = window.location.pathname.replace(re, graphid);
viewModel.navigate(newPath);
});

viewModel.graphModel = new GraphModel({
data: data.graph,
datatypes: data.datatypes,
Expand Down
4 changes: 4 additions & 0 deletions arches/app/templates/views/graph-designer.htm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ <h1 class="page-header text-overflow ep-graph-title">
<div class="ep-form-toolbar">

<h4 class="ep-form-toolbar-title">
<!-- Menu Item -->
<div class="graph-selector" data-bind="" style="margin-right: 10px;">
<select data-placeholder="{% trans "Select a graph..." %}" class="design" style="width:100px;" data-bind="value: graphid, options: allGraphs, optionsText: 'name', optionsValue: 'graphid', chosen: {'width': '100%'}"></select>

<!-- Layer Filter -->
<div class="list-filter" data-bind="" style="margin-right: 10px;">
<input type="text" class="form-control" style="width: 250px;" placeholder="{% trans 'Find a node, datatype, card...' %}" data-bind="textInput: graphTree.filter">
Expand Down

0 comments on commit a39d5ca

Please sign in to comment.