mirror of
https://github.com/apache/nifi.git
synced 2025-02-11 12:35:20 +00:00
NIFI-6756:
- Fixing issue opening a users policy listing when there is a policy for a specific parameter context. This closes #3805. Signed-off-by: Joe Witt <joewitt@apache.org>
This commit is contained in:
parent
99e9010b32
commit
4e8dd6557f
@ -16,12 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
package org.apache.nifi.parameter;
|
package org.apache.nifi.parameter;
|
||||||
|
|
||||||
import org.apache.nifi.authorization.resource.Authorizable;
|
import org.apache.nifi.authorization.resource.ComponentAuthorizable;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
public interface ParameterContext extends ParameterLookup, Authorizable {
|
public interface ParameterContext extends ParameterLookup, ComponentAuthorizable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the UUID for this Parameter Context
|
* @return the UUID for this Parameter Context
|
||||||
|
@ -67,6 +67,11 @@ public class StandardParameterContext implements ParameterContext {
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getProcessGroupIdentifier() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
readLock.lock();
|
readLock.lock();
|
||||||
try {
|
try {
|
||||||
|
@ -33,9 +33,10 @@
|
|||||||
'nf.Birdseye',
|
'nf.Birdseye',
|
||||||
'nf.ContextMenu',
|
'nf.ContextMenu',
|
||||||
'nf.Actions',
|
'nf.Actions',
|
||||||
'nf.ProcessGroup'],
|
'nf.ProcessGroup',
|
||||||
function ($, d3, nfCommon, nfDialog, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup) {
|
'nf.ParameterContexts'],
|
||||||
return (nf.Canvas = factory($, d3, nfCommon, nfDialog, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup));
|
function ($, d3, nfCommon, nfDialog, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup, nfParameterContexts) {
|
||||||
|
return (nf.Canvas = factory($, d3, nfCommon, nfDialog, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup, nfParameterContexts));
|
||||||
});
|
});
|
||||||
} else if (typeof exports === 'object' && typeof module === 'object') {
|
} else if (typeof exports === 'object' && typeof module === 'object') {
|
||||||
module.exports = (nf.Canvas =
|
module.exports = (nf.Canvas =
|
||||||
@ -53,7 +54,8 @@
|
|||||||
require('nf.Birdseye'),
|
require('nf.Birdseye'),
|
||||||
require('nf.ContextMenu'),
|
require('nf.ContextMenu'),
|
||||||
require('nf.Actions'),
|
require('nf.Actions'),
|
||||||
require('nf.ProcessGroup')));
|
require('nf.ProcessGroup'),
|
||||||
|
require('nf.ParameterContexts')));
|
||||||
} else {
|
} else {
|
||||||
nf.Canvas = factory(root.$,
|
nf.Canvas = factory(root.$,
|
||||||
root.d3,
|
root.d3,
|
||||||
@ -69,9 +71,10 @@
|
|||||||
root.nf.Birdseye,
|
root.nf.Birdseye,
|
||||||
root.nf.ContextMenu,
|
root.nf.ContextMenu,
|
||||||
root.nf.Actions,
|
root.nf.Actions,
|
||||||
root.nf.ProcessGroup);
|
root.nf.ProcessGroup,
|
||||||
|
root.nf.ParameterContexts);
|
||||||
}
|
}
|
||||||
}(this, function ($, d3, nfCommon, nfDialog, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup) {
|
}(this, function ($, d3, nfCommon, nfDialog, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup, nfParameterContexts) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var SCALE = 1;
|
var SCALE = 1;
|
||||||
@ -689,6 +692,11 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// listen for events to go to parameter contexts
|
||||||
|
$('body').on('GoTo:ParameterContext', function (e, item) {
|
||||||
|
nfParameterContexts.showParameterContexts(item.id);
|
||||||
|
});
|
||||||
|
|
||||||
// don't let the reload action get called more than once every second
|
// don't let the reload action get called more than once every second
|
||||||
var throttledCanvasReload = nfCommon.throttle(nfActions.reload, 1000);
|
var throttledCanvasReload = nfCommon.throttle(nfActions.reload, 1000);
|
||||||
|
|
||||||
|
@ -606,6 +606,8 @@
|
|||||||
policyLabel += 'reporting task ';
|
policyLabel += 'reporting task ';
|
||||||
} else if (resource.startsWith('/templates')) {
|
} else if (resource.startsWith('/templates')) {
|
||||||
policyLabel += 'template ';
|
policyLabel += 'template ';
|
||||||
|
} else if (resource.startsWith('/parameter-contexts')) {
|
||||||
|
policyLabel += 'parameter context '
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dataContext.component.componentReference.permissions.canRead === true) {
|
if (dataContext.component.componentReference.permissions.canRead === true) {
|
||||||
@ -658,6 +660,8 @@
|
|||||||
//TODO: implement go to for RT
|
//TODO: implement go to for RT
|
||||||
} else if (dataContext.component.resource.indexOf('/templates') >= 0) {
|
} else if (dataContext.component.resource.indexOf('/templates') >= 0) {
|
||||||
//TODO: implement go to for Templates
|
//TODO: implement go to for Templates
|
||||||
|
} else if (dataContext.component.resource.indexOf('/parameter-contexts') >= 0) {
|
||||||
|
markup += '<div title="Go To" class="pointer go-to-parameter-context fa fa-long-arrow-right" style="float: left;"></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -759,6 +763,11 @@
|
|||||||
id: item.component.componentReference.id
|
id: item.component.componentReference.id
|
||||||
});
|
});
|
||||||
parent.$('#shell-close-button').click();
|
parent.$('#shell-close-button').click();
|
||||||
|
} else if (target.hasClass('go-to-parameter-context')) {
|
||||||
|
parent.$('body').trigger('GoTo:ParameterContext', {
|
||||||
|
id: item.component.componentReference.id
|
||||||
|
});
|
||||||
|
parent.$('#shell-close-button').click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -42,6 +42,11 @@ public class StatelessParameterContext implements ParameterContext {
|
|||||||
return "NiFi Stateless Parameter Context";
|
return "NiFi Stateless Parameter Context";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getProcessGroupIdentifier() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "NiFi Stateless Parameter Context";
|
return "NiFi Stateless Parameter Context";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user