Unverified Commit f49bd21e authored by Francesc Guasch's avatar Francesc Guasch Committed by GitHub
Browse files

Fix base form (#1386)

fix(frontend): fixed base forms

issue #1384
parent 64c29840
Execute
yarn config set -- --modules-folder <path>
......@@ -657,7 +657,6 @@
$http.get('/list_bases.json')
.then(function(response) {
$scope.bases=response.data;
if(typeof($scope.new_base) == 'undefined') {
for (var i = 0; i < $scope.bases.length; i++) {
if ($scope.bases[i].id == $scope.showmachine.id_base) {
$scope.new_base = $scope.bases[i];
......@@ -666,7 +665,6 @@
$scope.new_base = $scope.bases[i];
}
}
}
});
};
list_users= function() {
......
......@@ -21,7 +21,7 @@
<a class="nav-link" id="v-pills-graphics-tab" ng-click="refresh_machine()" href="#v-pills-graphics" data-toggle="pill" role="tab" aria-controls="v-pills-graphics" aria-selected="false"><%=l 'Graphics' %></a>
% }
% if ($USER->is_admin) {
<a class="nav-link" id="v-pills-base-tab" ng-click="refresh_machine()" href="#v-pills-base" data-toggle="pill" role="tab" aria-controls="v-pills-base" aria-selected="false">Base</a>
<a class="nav-link" id="v-pills-base-tab" href="#v-pills-base" data-toggle="pill" role="tab" aria-controls="v-pills-base" aria-selected="false">Base</a>
% }
% if ($USER->is_admin || $USER->can_clone_all ){
<a class="nav-link" id="v-pills-copy-tab" ng-click="refresh_machine()" href="#v-pills-copy" data-toggle="pill" role="tab" aria-controls="v-pills-copy" aria-selected="false"><%=l 'Copy' %></a>
......
......@@ -6,11 +6,11 @@
<%=l 'This base can\'t be removed because the domain has clones.' %>
</div>
<div ng-hide="showmachine && nodes">
<div ng-hide="showmachine">
... Loading ...
</div>
<div ng-hide="!showmachine || !nodes || (pending_request && pending_request.status != 'done')">
<div ng-hide="!showmachine || (pending_request && pending_request.status != 'done')">
%= include "/main/vm_rebase"
......
<div ng-hide="showmachine.is_base || new_base.id != showmachine.id_base" class="row">
<div ng-hide="showmachine.is_base || new_base.id != showmachine.id_base || confirm_prepare_base" class="row">
<div class="col-sm-3">
<button ng-click="confirm_prepare_base=true"
ng-hide="confirm_prepare_base"
><%= l 'Prepare Base' %></button>
</div>
<div class="col-sm-8">
......
<div ng-show="(showmachine.is_base && showmachine.has_clones>0 ) || showmachine.id_base">
<div ng-show="!bases"> ... Loading ... </div>
<div ng-show="bases" class="row">
<div class="col-md-1">
<label>Base</label>
......
......@@ -6,7 +6,7 @@
ng-hide="confirm_remove_base"
><%= l 'Remove Base' %></button>
</div>
<div class="col-sm-8">
<div class="col-sm-8" ng-hide="confirm_remove_base">
<p><%=l 'Remove the base prepared from this machine' %></p>
</div>
</div>
......
<div ng-show="showmachine.id_base && new_base.id == showmachine.id_base" class="row">
<div class="col-sm-3">
<div class="col-sm-3" ng-hide="confirm_spinoff">
<button ng-click="confirm_spinoff=true"
ng-hide="confirm_spinoff"
><%= l 'Spinoff clone' %></button>
</div>
<div class="col-sm-8">
<div class="col-sm-8" ng-hide="confirm_spinoff">
<p>
Spinoff this clone from its base.
</p>
......
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