8000 fixed a routing bug in the ui (#7067) · sita1999/arangodb@83785de · GitHub
[go: up one dir, main page]

Skip to content

Commit 83785de

Browse files
hkernbachmchacki
authored andcommitted
fixed a routing bug in the ui (arangodb#7067)
* fixed a routing bug in backbone js ui * use of navigate * changelog * fixes same issue in another view, too
1 parent 55b0ad7 commit 83785de

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
devel
22
-----
33

4+
* fixes a routing issue within the web ui after the use of views
45

56
* fixes some graph data parsing issues in the ui, e.g. cleaning up duplicate
67
edges inside the graph viewer.

js/apps/system/_admin/aardvark/APP/frontend/js/views/graphManagementView.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@
7272

7373
redirectToGraphViewer: function (e) {
7474
var name = $(e.currentTarget).attr('id');
75-
name = name.substr(0, name.length - 5);
76-
window.location.hash = window.location.hash.substr(0, window.location.hash.length - 1) + '/' + encodeURIComponent(name);
75+
if (name) {
76+
name = name.substr(0, name.length - 5);
77+
window.App.navigate('graph/' + encodeURIComponent(name), {trigger: true});
78+
}
7779
},
7880

7981
loadGraphViewer: function (graphName, refetch) {

js/apps/system/_admin/aardvark/APP/frontend/js/views/viewsView.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
events: {
3131
'click #createView': 'createView',
3232
'click #viewsToggle': 'toggleSettingsDropdown',
33-
'click .tile': 'gotoView',
33+
'click .tile-view': 'gotoView',
3434
'keyup #viewsSearchInput': 'search',
3535
'click #viewsSearchSubmit': 'search',
3636
'click #viewsSortDesc': 'sorting'
@@ -151,7 +151,8 @@
151151
gotoView: function (e) {
152152
var name = $(e.currentTarget).attr('id');
153153
if (name) {
154-
window.location.hash = window.location.hash.substr(0, window.location.hash.length - 1) + '/' + encodeURIComponent(name);
154+
var url = 'view/' + encodeURIComponent(name);
155+
window.App.navigate(url, {trigger: true});
155156
}
156157
},
157158

0 commit comments

Comments
 (0)
0