add link to VM. Warning: erase possibility to click on a element in a row

This commit is contained in:
Olivier Lambert
2013-11-15 17:30:22 +01:00
parent 5671ca1e47
commit 6351ed9413
3 changed files with 5 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ angular.module('xoWebApp', [
.when '/pools/:uuid',
templateUrl: 'views/pool.html'
controller: 'PoolCtrl'
.when '/vm',
.when '/vms/:uuid',
templateUrl: 'views/vm.html'
controller: 'VmCtrl'
.otherwise

View File

@@ -18,6 +18,9 @@ angular.module('xoWebApp')
$scope.goToSR = (uuid) ->
$location.path "/srs/#{uuid}"
$scope.goToVM = (uuid) ->
$location.path "/vms/#{uuid}"
$scope.pools = [
{
uuid: '9baa48dd-162d-4e24-aa8a-52e2b98cc101'

View File

@@ -223,7 +223,7 @@
<table ng-if="host.VMs" class="table table-hover table-condensed">
<!-- Contains a VM. -->
<tr ng-repeat="VM in host.VMs">
<tr ng-repeat="VM in host.VMs" ng-click="goToVM(VM.uuid)">
<!-- Handle used for drag & drop. -->
<td class="grab"></td>