Revision 24565655
b/ui/static/snf/js/ui/web/ui_main_view.js | ||
---|---|---|
645 | 645 |
}, |
646 | 646 |
|
647 | 647 |
show_vm_details: function(vm) { |
648 |
snf.ui.main.show_view("single") |
|
649 |
snf.ui.main.current_view.show_vm(vm); |
|
648 |
this.router.vm_details_view(vm.id); |
|
650 | 649 |
}, |
651 | 650 |
|
652 | 651 |
set_vm_view_handlers: function() { |
b/ui/static/snf/js/ui/web/ui_router.js | ||
---|---|---|
28 | 28 |
"machines/list/": "vms_list_view", |
29 | 29 |
"machines/single/details/:vm": "vm_details_view", |
30 | 30 |
"machines/single/": "vms_single_view", |
31 |
"machines/create/": "vms_create_view", |
|
32 |
"machines/create/:step": "vms_create_view", |
|
33 | 31 |
|
34 | 32 |
// network views |
35 |
"machines/single/": "vms_single_view",
|
|
33 |
"networks/": "networks_view",
|
|
36 | 34 |
}, |
37 | 35 |
|
38 | 36 |
show_welcome: function() { |
... | ... | |
81 | 79 |
if (step) { |
82 | 80 |
ui.main.create_vm_view.show_step(parseInt(step)); |
83 | 81 |
} |
84 |
this.navigate("machines/create/"); |
|
85 | 82 |
}, |
86 | 83 |
|
87 | 84 |
vm_details_view: function(vm) { |
88 | 85 |
this.navigate("machines/single/details/" + vm); |
89 | 86 |
ui.main.show_view("single"); |
90 | 87 |
ui.main.current_view.show_vm(snf.storage.vms.get(parseInt(vm))); |
91 |
} |
|
88 |
}, |
|
89 |
|
|
90 |
networks_view: function() { |
|
91 |
this.navigate("networks/"); |
|
92 |
ui.main.show_view("networks"); |
|
93 |
} |
|
94 |
|
|
92 | 95 |
}); |
93 | 96 |
|
94 | 97 |
snf.router = new WebAppRouter(); |
b/ui/static/snf/js/views.js | ||
---|---|---|
77 | 77 |
oneInstance: true, |
78 | 78 |
fixed: false, |
79 | 79 |
|
80 |
|
|
81 | 80 |
initialize: function(options, selector) { |
82 | 81 |
this.defaults = { |
83 | 82 |
load: false, |
Also available in: Unified diff