Commit 5e7b0dbc authored by Francesc Guasch's avatar Francesc Guasch
Browse files

refactor(frontend): reviewed alert messages

Message body didn't show up
parent 23aada5a
......@@ -151,6 +151,7 @@ our %CMD_SEND_MESSAGE = map { $_ => 1 }
expose remove_expose
rebase rebase_volumes
shutdown_node reboot_node start_node
compact purge
);
our %CMD_NO_DUPLICATE = map { $_ => 1 }
......
......@@ -4,15 +4,19 @@ ng-cloak>
<script type="text/ng-template" id="alert.html">
<div ng-transclude></div>
</script>
<div uib-alert ng-repeat="alert in alerts_ws"
ng-class="'alert-' + (alert.type || 'warning')"
<div ng-repeat="alert in alerts_ws"
class="row"
ng-class="'alert-' + (alert.type || 'success')"
ng-click="closeAlert($index)"
ng-mouseover="alert.showMessage = false"
ng-mouseleave="alert.showMessage = true"
ng-bind-html="alert.subject">
>
<div ng-bind-html="alert.subject">
{{alert.subject}}
<div ng-if="alert.message" ng-init="alert.showMessage = true" ng-hide="alert.showMessage" ng-bind-html="alert.message">
{{alert.message}}
</div>
<div class="alert-info">
<small ng-bind-html="alert.message">{{alert.message}}</small>
</div>
</div>
</div>
</div>
......@@ -24,7 +24,7 @@
</h2>
% }
</div>
<div class="card-body">
<div class="card-body" ng-cloak="1">
<div class="row">
<div class="col-2">
%= include 'main/settings_machine_tabs_head'
......@@ -34,7 +34,7 @@
</div>
</div>
</div>
<div class="alert alert-danger" ng-show="error">{{error}}</div>
<div ng-cloak="1" class="alert alert-danger" ng-show="error">{{error}}</div>
</div><!-- del panel default-->
</div><!-- del page-header -->
</div> <!-- del page-wrapper -->
......
......@@ -114,7 +114,3 @@
</div>
</div>
<div ng-show="pending_request">
%= include "/main/pending_request"
</div>
......@@ -13,6 +13,9 @@
</div>
</div>
<div ng-show="!showmachine || (pending_request && pending_request.status != 'done')"><i class="fas fa-sync-alt fa-spin"></i>
</div>
<div ng-hide="!showmachine || (pending_request && pending_request.status != 'done')">
%= include "/main/vm_rebase"
......@@ -25,10 +28,6 @@
</div>
<div ng-show="pending_request">
%= include "/main/pending_request"
</div>
<div ng-show="showmachine.is_base && !nodes">
Loading nodes <i class="fas fa-sync-alt fa-spin"></i>
</div>
......
......@@ -40,8 +40,4 @@
><%=l 'Yes, shutwdown all the clones' %></a>
</div>
<div class="row" ng-show="pending_request">
%= include "/main/pending_request"
</div>
</div>
......@@ -57,11 +57,6 @@
</div>
</div>
% }
<div ng-show="copy_request" class="alert alert-warning">
Copy {{showmachine.name}} {{copy_request.status}}.
<br/>
{{copy_request.error}}
</div>
<div ng-hide="copy_request && copy_request.status !== 'done'">
<button type="reset" class="btn btn-outline-secondary mr-2"><%=l 'Cancel' %></button>
......
......@@ -133,5 +133,4 @@
%= include 'main/manage_machine_new_disk'
%= include 'main/manage_machine_new_display'
%= include "/main/pending_request"
</div>
......@@ -214,11 +214,4 @@
</div><!-- of form-group -->
</form>
<div ng-show="pending_request"
class="alert alert-warning">
{{pending_request.command_text}} {{showmachine.name}} {{pending_request.status}}.
<br/>
{{pending_request.error}}
</div>
</div><!-- of card-body options -->
......@@ -68,6 +68,5 @@
ng-click="request('refresh_machine_ports',{ id_domain: showmachine.id , retry: 10 } )"
>Refresh ports</button>
<br/>
%= include "/main/pending_request"
</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