Commit 8c0dce64 authored by joansp's avatar joansp
Browse files

[#68] Issue solved with ng-src and ng-href

parent 0b1f1e75
...@@ -79,10 +79,6 @@ ...@@ -79,10 +79,6 @@
$scope.list_machines= response.data; $scope.list_machines= response.data;
}); });
request.get(function( res ) {
$scope.res = res;
});
$http.get('/pingbackend.json').then(function(response) { $http.get('/pingbackend.json').then(function(response) {
$scope.pingbe_fail = !response.data; $scope.pingbe_fail = !response.data;
...@@ -136,10 +132,6 @@ ...@@ -136,10 +132,6 @@
$scope.list_bases= response.data; $scope.list_bases= response.data;
}); });
request.get(function( res ) {
$scope.res = res;
});
$http.get('/pingbackend.json').then(function(response) { $http.get('/pingbackend.json').then(function(response) {
$scope.pingbe_fail = !response.data; $scope.pingbe_fail = !response.data;
...@@ -256,10 +248,6 @@ ...@@ -256,10 +248,6 @@
$scope.list_message= response.data; $scope.list_message= response.data;
}); });
request.get(function( res ) {
$scope.res = res;
});
$scope.asRead = function(messId){ $scope.asRead = function(messId){
var toGet = '/messages/read/'+messId+'.json'; var toGet = '/messages/read/'+messId+'.json';
$http.get(toGet); $http.get(toGet);
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
<td> <td>
<a class="btn btn-primary btn-sm" href="/machine/view/{{machine.id}}.html"><i class="fa fa-desktop" aria-hidden="true"></i>&nbsp View</a> <a class="btn btn-primary btn-sm" ng-href="/machine/view/{{machine.id}}.html"><i class="fa fa-desktop" aria-hidden="true"></i>&nbsp View</a>
<a ng-show="{{machine.is_base}}" class="btn btn-primary btn-sm" href="/machine/clone/{{machine.id}}.html"><i class="fa fa-files-o" aria-hidden="true"></i>&nbsp Clone</a> <a ng-show="{{machine.is_base}}" class="btn btn-primary btn-sm" ng-href="/machine/clone/{{machine.id}}.html"><i class="fa fa-files-o" aria-hidden="true"></i>&nbsp Clone</a>
<button type="button" ng-click="screenshot(machine.id)" ng-show="{{machine.is_active}}" class="btn btn-primary btn-sm"><i class="fa fa-camera" aria-hidden="true"></i>&nbspScreenshot</button> <button type="button" ng-click="screenshot(machine.id)" ng-show="{{machine.is_active}}" class="btn btn-primary btn-sm"><i class="fa fa-camera" aria-hidden="true"></i>&nbspScreenshot</button>
...@@ -47,6 +47,10 @@ ...@@ -47,6 +47,10 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div ng-repeat="machine in list_machines"> <div ng-repeat="machine in list_machines">
<div id="modal{{machine.id}}" class="modal fade" role="dialog"> <div id="modal{{machine.id}}" class="modal fade" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
...@@ -61,11 +65,11 @@ ...@@ -61,11 +65,11 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div style="width:100%; margin-bottom:10px;"> <div style="width:100%; margin-bottom:10px;">
<img src="/img/screenshots/{{machine.id}}.png" width="400" alt="No screenshot available for this machine"> <img ng-src="/img/screenshots/{{machine.id}}.png" width="400" alt="No screenshot available for this machine">
</div> </div>
<div style="width:100%; margin-bottom:10px;"> <div style="width:100%; margin-bottom:10px;">
<a class="btn btn-primary btn-sm" href="/machine/view/{{machine.id}}.html"><i class="fa fa-desktop" aria-hidden="true"></i>&nbsp View</a> <a class="btn btn-primary btn-sm" ng-href="/machine/view/{{machine.id}}.html"><i class="fa fa-desktop" aria-hidden="true"></i>&nbsp View</a>
<button type="button" ng-click="start(machine.id)" ng-hide="{{machine.is_active}}" class="btn btn-success btn-sm"><i class="fa fa-play" aria-hidden="true"></i>&nbsp Start</button> <button type="button" ng-click="start(machine.id)" ng-hide="{{machine.is_active}}" class="btn btn-success btn-sm"><i class="fa fa-play" aria-hidden="true"></i>&nbsp Start</button>
...@@ -75,7 +79,7 @@ ...@@ -75,7 +79,7 @@
</div> </div>
<div style="width:100%; margin-bottom:10px;"> <div style="width:100%; margin-bottom:10px;">
<a ng-show="{{machine.is_base}}" class="btn btn-primary btn-sm" href="/machine/clone/{{machine.id}}.html"><i class="fa fa-files-o" aria-hidden="true"></i>&nbsp Clone</a> <a ng-show="{{machine.is_base}}" class="btn btn-primary btn-sm" ng-href="/machine/clone/{{machine.id}}.html"><i class="fa fa-files-o" aria-hidden="true"></i>&nbsp Clone</a>
<button type="button" ng-click="prepare(machine.id)" class="btn btn-primary btn-sm"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp Prepare Base</button> <button type="button" ng-click="prepare(machine.id)" class="btn btn-primary btn-sm"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp Prepare Base</button>
...@@ -84,7 +88,7 @@ ...@@ -84,7 +88,7 @@
<button type="button" ng-click="shutdown(machine.id)" ng-show="{{machine.is_active}}" class="btn btn-warning btn-sm"></strong><i class="fa fa-power-off" aria-hidden="true"></i> &nbsp ShutDown</button> <button type="button" ng-click="shutdown(machine.id)" ng-show="{{machine.is_active}}" class="btn btn-warning btn-sm"></strong><i class="fa fa-power-off" aria-hidden="true"></i> &nbsp ShutDown</button>
<button type="button" ng-click="removeb(machine.id)" ng-show="{{machine.is_base&&machine.has_clones==0}}" class="btn btn-warning btn-sm":q:q <button type="button" ng-click="removeb(machine.id)" ng-show="{{machine.is_base&&machine.has_clones==0}}" class="btn btn-warning btn-sm":q:q
><i class="fa fa-trash-o" aria-hidden="true"></i>&nbsp Remove Base</button> ><i class="fa fa-trash-o" aria-hidden="true"></i>&nbsp Remove Base</button>
<a class="btn btn-danger btn-sm" href="/machine/remove/{{machine.id}}.html" ng-hide="{{machine.has_clones!=0}}"><strong>&nbsp;<i class="fa fa-trash-o" aria-hidden="true"></i></strong> Delete</a> <a class="btn btn-danger btn-sm" ng-href="/machine/remove/{{machine.id}}.html" ng-hide="{{machine.has_clones!=0}}"><strong>&nbsp;<i class="fa fa-trash-o" aria-hidden="true"></i></strong> Delete</a>
<h4><span ng-show="{{machine.has_clones!=0}}" class="label label-danger">Can't Remove Base and Delete. Machine has {{machine.has_clones}} Clone/s</span></h4> <h4><span ng-show="{{machine.has_clones!=0}}" class="label label-danger">Can't Remove Base and Delete. Machine has {{machine.has_clones}} Clone/s</span></h4>
</div> </div>
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<div ng-show="{{message.date_read != null}}">{{message.date_send}}</div></td> <div ng-show="{{message.date_read != null}}">{{message.date_send}}</div></td>
<td> <td>
<a ng-show="{{message.date_read == null}}" href="/messages/read/{{message.id}}.html" class="btn btn-success">Mark as Read</a> <a ng-show="{{message.date_read == null}}" ng-href="/messages/read/{{message.id}}.html" class="btn btn-success">Mark as Read</a>
<a ng-show="{{message.date_read != null}}" href="/messages/unread/{{message.id}}.html" class="btn btn-warning">Mark as UnRead</a> <a ng-show="{{message.date_read != null}}" ng-href="/messages/unread/{{message.id}}.html" class="btn btn-warning">Mark as UnRead</a>
<button type="button" class="btn btn-info" ng-click="asRead(message.id)" data-toggle="modal" data-target="#modal{{message.id}}">View</button> <button type="button" class="btn btn-info" ng-click="asRead(message.id)" data-toggle="modal" data-target="#modal{{message.id}}">View</button>
</td> </td>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</p> </p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a ng-show="{{message.date_read != null}}" href="/messages/unread/{{message.id}}.html" class="btn btn-warning">Mark as UnRead</a> <a ng-show="{{message.date_read != null}}" ng-href="/messages/unread/{{message.id}}.html" class="btn btn-warning">Mark as UnRead</a>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div> </div>
</div> </div>
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title">{{machine.name}}</h3><br> <h3 class="panel-title">{{machine.name}}</h3><br>
<img id="screensh" src="/img/screenshots/{{machine.id}}.png"> <img id="screensh" ng-src="/img/screenshots/{{machine.id}}.png">
</div> </div>
<div class="panel-body machine-card"> <div class="panel-body machine-card">
<a type="button" class="btn btn-success" href="/machine/clone/{{machine.id}}.html"><strong>&nbsp;<i class="fa fa-play" aria-hidden="true"></i>&nbsp;Start</strong></a> <a type="button" class="btn btn-success" ng-href="/machine/clone/{{machine.id}}.html"><strong>&nbsp;<i class="fa fa-play" aria-hidden="true"></i>&nbsp;Start</strong></a>
</div> </div>
</div> </div>
</div> </div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment