in nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.js [47:389]
function NfRegistryService(nfRegistryApi, nfStorage, tdDataTableService, router, fdsDialogService, fdsSnackBarService, matDialog) {
var self = this;
this.registry = {
name: 'NiFi Registry',
// Config is updated later by calling the /config API.
config: {}
};
this.documentation = {
link: '../nifi-registry-docs/documentation'
};
this.redirectUrl = 'explorer/grid-list';
// Services
this.router = router;
this.api = nfRegistryApi;
this.nfStorage = nfStorage;
this.dialogService = fdsDialogService;
this.snackBarService = fdsSnackBarService;
this.dataTableService = tdDataTableService;
this.matDialog = matDialog;
// data table column definitions
this.userColumns = [
{
name: 'identity',
label: 'Display Name',
sortable: true,
tooltip: 'User name.',
width: 100
}
];
this.userGroupsColumns = [
{
name: 'identity',
label: 'Display Name',
sortable: true,
tooltip: 'Group name.',
width: 100
}
];
this.dropletColumns = [
{
name: 'name',
label: 'Name',
sortable: true,
active: true
},
{
name: 'modifiedTimestamp',
label: 'Updated',
sortable: true
},
{
name: 'type',
label: 'Type',
sortable: true
}
];
this.bucketColumns = [
{
name: 'name',
label: 'Bucket Name',
sortable: true,
tooltip: 'Sort Buckets by name.',
width: '40%'
},
{
name: 'description',
label: 'Description',
sortable: false,
width: '50%'
}
];
// data table available row action definitions
this.disableMultiBucketDeleteAction = false;
this.bucketActions = [
{
name: 'manage',
icon: 'fa fa-pencil',
tooltip: 'Manage Bucket',
type: 'sidenav',
disabled: function () {
return false;
}
}, {
name: 'Delete',
icon: 'fa fa-trash',
tooltip: 'Delete Bucket',
disabled: function (row) {
return (!row.permissions.canDelete);
}
}
];
this.bucketPoliciesActions = [
{
name: 'manage',
icon: 'fa fa-pencil',
tooltip: 'Manage Policy',
type: 'dialog'
}, {
name: 'Delete',
icon: 'fa fa-trash',
tooltip: 'Delete Policy'
}
];
this.dropletFlowActions = [
{
name: 'Import new flow version',
icon: 'fa fa-upload',
tooltip: 'Import new flow version',
disabled: function (droplet) {
return !droplet.permissions.canWrite;
}
},
{
name: 'Export flow version',
icon: 'fa fa-download',
tooltip: 'Export flow version',
disabled: function (droplet) {
return !droplet.permissions.canRead;
}
},
{
name: 'Delete flow',
icon: 'fa fa-trash',
tooltip: 'Delete flow',
disabled: function (droplet) {
return !droplet.permissions.canDelete;
}
}
];
this.dropletBundleActions = [
{
name: 'Download bundle version',
icon: 'fa fa-download',
tooltip: 'Download bundle version',
disabled: function (droplet) {
return !droplet.permissions.canRead;
}
},
{
name: 'Delete bundle version',
icon: 'fa fa-trash',
tooltip: 'Delete bundle version',
disabled: function (droplet) {
return !droplet.permissions.canDelete;
}
},
{
name: 'Delete bundle',
icon: 'fa fa-trash',
tooltip: 'Delete bundle',
disabled: function (droplet) {
return !droplet.permissions.canDelete;
}
}
];
this.disableMultiDeleteAction = false;
this.usersActions = [
{
name: 'manage',
icon: 'fa fa-pencil',
type: 'sidenav',
tooltip: 'Manage User',
disabled: function () {
return false;
}
}, {
name: 'delete',
icon: 'fa fa-trash',
tooltip: 'Delete User',
disabled: function (row) {
return (!self.currentUser.resourcePermissions.tenants.canWrite || !row.configurable);
}
}
];
this.userGroupsActions = [
{
name: 'manage',
icon: 'fa fa-pencil',
tooltip: 'Manage User Group Policies',
type: 'sidenav',
disabled: function () {
return false;
}
}, {
name: 'delete',
icon: 'fa fa-trash',
tooltip: 'Delete User Group',
disabled: function (row) {
return (!self.currentUser.resourcePermissions.tenants.canWrite || !row.configurable);
}
}
];
// model for buckets privileges
this.BUCKETS_PRIVS = {
'/buckets': ['read', 'write', 'delete']
};
// model for tenants privileges
this.TENANTS_PRIVS = {
'/tenants': ['read', 'write', 'delete']
};
// model for policies privileges
this.POLICIES_PRIVS = {
'/policies': ['read', 'write', 'delete']
};
// model for proxy privileges
this.PROXY_PRIVS = {
'/proxy': ['read', 'write', 'delete']
};
//<editor-fold desc="application state objects">
// General
this.alerts = [];
this.inProgress = false;
this.perspective = '';
this.breadCrumbState = 'out';
this.explorerViewType = '';
this.currentUser = {
loginSupported: false,
oidcloginSupported: false,
resourcePermissions: {
anyTopLevelResource: {
canRead: false,
canWrite: false,
canDelete: false
},
buckets: {
canRead: false,
canWrite: false,
canDelete: false
},
tenants: {
canRead: false,
canWrite: false,
canDelete: false
},
policies: {
canRead: false,
canWrite: false,
canDelete: false
},
proxy: {
canRead: false,
canWrite: false,
canDelete: false
}
}
};
this.bucket = {};
this.buckets = [];
this.droplet = {};
this.droplets = [];
this.user = {
resourcePermissions: {
anyTopLevelResource: {
canRead: false,
canWrite: false,
canDelete: false
},
buckets: {
canRead: false,
canWrite: false,
canDelete: false
},
tenants: {
canRead: false,
canWrite: false,
canDelete: false
},
policies: {
canRead: false,
canWrite: false,
canDelete: false
},
proxy: {
canRead: false,
canWrite: false,
canDelete: false
}
}
};
this.users = [];
this.group = {
resourcePermissions: {
anyTopLevelResource: {
canRead: false,
canWrite: false,
canDelete: false
},
buckets: {
canRead: false,
canWrite: false,
canDelete: false
},
tenants: {
canRead: false,
canWrite: false,
canDelete: false
},
policies: {
canRead: false,
canWrite: false,
canDelete: false
},
proxy: {
canRead: false,
canWrite: false,
canDelete: false
}
}
};
this.groups = [];
// Droplets
this.filteredDroplets = [];
this.activeDropletColumn = this.dropletColumns[0];
this.autoCompleteDroplets = [];
this.dropletsSearchTerms = [];
// Buckets
this.filteredBuckets = [];
this.allBucketsSelected = false;
this.autoCompleteBuckets = [];
this.bucketsSearchTerms = [];
this.isMultiBucketActionsDisabled = true;
// Users and Groups
this.filteredUsers = [];
this.filteredUserGroups = [];
this.allUsersAndGroupsSelected = false;
this.autoCompleteUsersAndGroups = [];
this.usersSearchTerms = [];
//</editor-fold>
}