mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add deploy-in-action spinner
This commit is contained in:
parent
d97e23947d
commit
ed9ce1bb3c
@ -68,7 +68,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<a id="btn-deploy" class="btn action-deploy disabled" href="#"><i class="icon-upload"></i> Deploy</a>
|
||||
<a id="btn-deploy" class="btn action-deploy disabled" href="#"><i id="btn-icn-deploy" class="icon-upload"></i> Deploy</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -75,12 +75,17 @@ var RED = function() {
|
||||
}
|
||||
}
|
||||
var nns = RED.nodes.createCompleteNodeSet();
|
||||
|
||||
|
||||
$("#btn-icn-deploy").removeClass('icon-upload');
|
||||
$("#btn-icn-deploy").addClass('spinner');
|
||||
RED.view.dirty(false);
|
||||
|
||||
d3.xhr("flows").header("Content-type", "application/json")
|
||||
.post(JSON.stringify(nns),function(err,resp) {
|
||||
$("#btn-icn-deploy").removeClass('spinner');
|
||||
$("#btn-icn-deploy").addClass('icon-upload');
|
||||
if (resp && resp.status == 204) {
|
||||
RED.notify("Successfully deployed","success");
|
||||
RED.view.dirty(false);
|
||||
RED.nodes.eachNode(function(node) {
|
||||
if (node.changed) {
|
||||
node.dirty = true;
|
||||
@ -91,6 +96,7 @@ var RED = function() {
|
||||
RED.history.markAllDirty();
|
||||
RED.view.redraw();
|
||||
} else {
|
||||
RED.view.dirty(true);
|
||||
if (resp) {
|
||||
RED.notify("<strong>Error</strong>: "+resp,"error");
|
||||
} else {
|
||||
|
@ -815,3 +815,15 @@ div.tab-config-list-users {
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
i.spinner {
|
||||
display: inline-block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
line-height: 14px;
|
||||
vertical-align: text-top;
|
||||
margin-top: 0px;
|
||||
background: url(spin.gif) no-repeat 50% 50%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user