mirror of https://github.com/apache/nifi.git
NIFI-1383: - Ensuring appropriate access and state prior to attempting an action with hot keys. - Fixing contrib-check issue.
This commit is contained in:
parent
561f5b740a
commit
53322c99ac
|
@ -3467,8 +3467,8 @@ public class WebClusterManager implements HttpClusterManager, ProtocolHandler, C
|
|||
final boolean allNodesFailed = problematicNodeResponses.size() == nodeResponses.size();
|
||||
|
||||
// some nodes had a problematic response because of a missing counter, ensure the are not disconnected
|
||||
final boolean someNodesFailedMissingCounter = !problematicNodeResponses.isEmpty() &&
|
||||
problematicNodeResponses.size() < nodeResponses.size() && isMissingCounter(problematicNodeResponses, uri);
|
||||
final boolean someNodesFailedMissingCounter = !problematicNodeResponses.isEmpty()
|
||||
&& problematicNodeResponses.size() < nodeResponses.size() && isMissingCounter(problematicNodeResponses, uri);
|
||||
|
||||
// ensure nodes stay connected in certain scenarios
|
||||
if (allNodesFailed || someNodesFailedMissingCounter) {
|
||||
|
|
|
@ -626,6 +626,9 @@ nf.Canvas = (function () {
|
|||
return;
|
||||
}
|
||||
|
||||
// get the current selection
|
||||
var selection = nf.CanvasUtils.getSelection();
|
||||
|
||||
// handle shortcuts
|
||||
if (isCtrl) {
|
||||
if (evt.keyCode === 82) {
|
||||
|
@ -640,22 +643,28 @@ nf.Canvas = (function () {
|
|||
|
||||
evt.preventDefault();
|
||||
} else if (evt.keyCode === 67) {
|
||||
// ctrl-c
|
||||
nf.Actions.copy(nf.CanvasUtils.getSelection());
|
||||
if (nf.Common.isDFM() && nf.CanvasUtils.isCopyable(selection)) {
|
||||
// ctrl-c
|
||||
nf.Actions.copy(selection);
|
||||
|
||||
evt.preventDefault();
|
||||
evt.preventDefault();
|
||||
}
|
||||
} else if (evt.keyCode === 86) {
|
||||
// ctrl-p
|
||||
nf.Actions.paste();
|
||||
if (nf.Common.isDFM() && nf.CanvasUtils.isPastable()) {
|
||||
// ctrl-p
|
||||
nf.Actions.paste(selection);
|
||||
|
||||
evt.preventDefault();
|
||||
evt.preventDefault();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (evt.keyCode === 46) {
|
||||
// delete
|
||||
nf.Actions['delete'](nf.CanvasUtils.getSelection());
|
||||
if (nf.Common.isDFM() && nf.CanvasUtils.isDeletable(selection)) {
|
||||
// delete
|
||||
nf.Actions['delete'](selection);
|
||||
|
||||
evt.preventDefault();
|
||||
evt.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue