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

Refactor messages (#1705)

* refactor(frontend): reviewed alert messages

Message body didn't show up
parent f6423c1a
......@@ -151,6 +151,7 @@ our %CMD_SEND_MESSAGE = map { $_ => 1 }
expose remove_expose
rebase rebase_volumes
shutdown_node reboot_node start_node
compact purge
start_domain
);
......
......@@ -5,14 +5,17 @@ ng-cloak>
<div ng-transclude></div>
</script>
<div uib-alert ng-repeat="alert in alerts_ws"
ng-class="'alert-' + (alert.type || 'warning')"
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" ng-show="alert.message">
<small ng-bind-html="alert.message">{{alert.message}}</small>
</div>
</div>
</div>
......@@ -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