mirror of
https://github.com/apache/nifi.git
synced 2025-02-06 10:08:42 +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;
|
||||
|
||||
import org.apache.nifi.authorization.resource.Authorizable;
|
||||
import org.apache.nifi.authorization.resource.ComponentAuthorizable;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface ParameterContext extends ParameterLookup, Authorizable {
|
||||
public interface ParameterContext extends ParameterLookup, ComponentAuthorizable {
|
||||
|
||||
/**
|
||||
* @return the UUID for this Parameter Context
|
||||
|
@ -67,6 +67,11 @@ public class StandardParameterContext implements ParameterContext {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProcessGroupIdentifier() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
readLock.lock();
|
||||
try {
|
||||
|
@ -33,9 +33,10 @@
|
||||
'nf.Birdseye',
|
||||
'nf.ContextMenu',
|
||||
'nf.Actions',
|
||||
'nf.ProcessGroup'],
|
||||
function ($, d3, nfCommon, nfDialog, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup) {
|
||||
return (nf.Canvas = factory($, d3, nfCommon, nfDialog, nfGraph, nfShell, nfNgBridge, nfClusterSummary, nfErrorHandler, nfStorage, nfCanvasUtils, nfBirdseye, nfContextMenu, nfActions, nfProcessGroup));
|
||||
'nf.ProcessGroup',
|
||||
'nf.ParameterContexts'],
|
||||
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') {
|
||||
module.exports = (nf.Canvas =
|
||||
@ -53,7 +54,8 @@
|
||||
require('nf.Birdseye'),
|
||||
require('nf.ContextMenu'),
|
||||
require('nf.Actions'),
|
||||
require('nf.ProcessGroup')));
|
||||
require('nf.ProcessGroup'),
|
||||
require('nf.ParameterContexts')));
|
||||
} else {
|
||||
nf.Canvas = factory(root.$,
|
||||
root.d3,
|
||||
@ -69,9 +71,10 @@
|
||||
root.nf.Birdseye,
|
||||
root.nf.ContextMenu,
|
||||
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';
|
||||
|
||||
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
|
||||
var throttledCanvasReload = nfCommon.throttle(nfActions.reload, 1000);
|
||||
|
||||
|
@ -606,6 +606,8 @@
|
||||
policyLabel += 'reporting task ';
|
||||
} else if (resource.startsWith('/templates')) {
|
||||
policyLabel += 'template ';
|
||||
} else if (resource.startsWith('/parameter-contexts')) {
|
||||
policyLabel += 'parameter context '
|
||||
}
|
||||
|
||||
if (dataContext.component.componentReference.permissions.canRead === true) {
|
||||
@ -658,6 +660,8 @@
|
||||
//TODO: implement go to for RT
|
||||
} else if (dataContext.component.resource.indexOf('/templates') >= 0) {
|
||||
//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
|
||||
});
|
||||
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";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProcessGroupIdentifier() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "NiFi Stateless Parameter Context";
|
||||
|
Loading…
x
Reference in New Issue
Block a user