File tree Expand file tree Collapse file tree 4 files changed +36
-6
lines changed Expand file tree Collapse file tree 4 files changed +36
-6
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ export default Ember.Controller.extend({
29
29
this . get ( 'graph' ) . setGraph ( contents ) ;
30
30
this . set ( 'showUploadModal' , false ) ;
31
31
} ) ;
32
+ } ,
33
+
34
+ clearData ( ) {
35
+ this . get ( 'graph' ) . clearGraph ( ) ;
32
36
}
33
37
}
34
38
} )
Original file line number Diff line number Diff line change @@ -41,6 +41,11 @@ export default Ember.Service.extend({
41
41
this . set ( 'graph' , graph ) ;
42
42
} ,
43
43
44
+ clearGraph ( ) {
45
+ this . set ( 'data' , null ) ;
46
+ this . set ( 'graph' , null ) ;
47
+ } ,
48
+
44
49
selectNode ( node ) {
45
50
sessionStorage . setItem ( SELECTED_NODE_STORAGE_KEY , node . id ) ;
46
51
Original file line number Diff line number Diff line change
1
+ body {
2
+ margin-top : 3.5rem ;
3
+ }
4
+
5
+ .global-nav {
6
+ position : fixed;
7
+ top : 0 ;
8
+ width : 100% ;
9
+ z-index : 1 ;
10
+ }
11
+
1
12
.node text {
2
13
font : 10px sans-serif;
3
14
}
17
28
vertical-align : top;
18
29
overflow : hidden;
19
30
}
31
+
20
32
.svg-content {
21
33
display : inline-block;
22
34
position : absolute;
Original file line number Diff line number Diff line change 1
- <section class =" hero is-light" >
1
+ <section class =" global-nav hero is-light" >
2
2
<nav class =" nav" >
3
3
<div class =" nav-left" >
4
- {{ link-to ' Home' ' index' class =" nav-item is-tab" activeClass =" is-active" }}
5
- {{ link-to ' Slow Nodes' ' slow-nodes' class =" nav-item is-tab" activeClass =" is-active" }}
6
- <a class =" nav-item" {{ action (action (mut showUploadModal ) true )}} >
7
- Select Data
8
- </a >
4
+ {{ link-to ' Graph' ' index' class =" nav-item is-tab" activeClass =" is-active" }}
5
+ {{ link-to ' Nodes' ' slow-nodes' class =" nav-item is-tab" activeClass =" is-active" }}
9
6
</div >
7
+
10
8
<div class =" nav-center" >
11
9
<p class =" nav-item title" >
12
10
Heimdall Visualizer
13
11
</p >
14
12
</div >
13
+
15
14
<div class =" nav-right" >
15
+ {{ #if (not graph.data )}}
16
+ <a href =" #" class =" nav-item" {{ action (action (mut showUploadModal ) true )}} >
17
+ Upload Data
18
+ </a >
19
+ {{ else }}
20
+ <a href =" #" class =" nav-item" {{ action ' clearData' }} >
21
+ Clear Data
22
+ </a >
23
+ {{ /if }}
24
+
16
25
<a class =" nav-item" href =" https://github.com/rwjblue/heimdalljs-visualizer" >
17
26
<span class =" icon" >
18
27
<i class =" fa fa-github" ></i >
You can’t perform that action at this time.
0 commit comments