New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIFI-8957 NiFi Registry - Possibility to set a description when creating a bucket #5271
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ function NfRegistryManageBucket(nfRegistryApi, nfRegistryService, tdDataTableSer | |
]; | ||
this.userPermsSearchTerms = []; | ||
this.bucketname = ''; | ||
this.description = ''; | ||
this.allowBundleRedeploy = false; | ||
this.allowPublicRead = false; | ||
this.bucketPolicies = []; | ||
|
@@ -108,6 +109,7 @@ NfRegistryManageBucket.prototype = { | |
var bucket = response[0]; | ||
self.nfRegistryService.bucket = bucket; | ||
self.bucketname = bucket.name; | ||
self.description = bucket.description; | ||
self.allowBundleRedeploy = bucket.allowBundleRedeploy; | ||
self.allowPublicRead = bucket.allowPublicRead; | ||
if (!self.nfRegistryService.currentUser.anonymous) { | ||
|
@@ -168,6 +170,7 @@ NfRegistryManageBucket.prototype = { | |
.subscribe(function (response) { | ||
self.nfRegistryService.bucket = response; | ||
self.bucketname = response.name; | ||
self.description = response.description; | ||
self.allowBundleRedeploy = response.allowBundleRedeploy; | ||
self.allowPublicRead = response.allowPublicRead; | ||
|
||
|
@@ -208,6 +211,7 @@ NfRegistryManageBucket.prototype = { | |
.subscribe(function (response) { | ||
self.nfRegistryService.bucket = response; | ||
self.bucketname = response.name; | ||
self.description = response.description; | ||
self.allowBundleRedeploy = response.allowBundleRedeploy; | ||
self.allowPublicRead = response.allowPublicRead; | ||
|
||
|
@@ -405,13 +409,15 @@ NfRegistryManageBucket.prototype = { | |
/** | ||
* Update bucket name. | ||
* | ||
* @param username | ||
* @param bucketname The new bucket name. Must be unique otherwise an error will be shown. | ||
* @param description The new bucket description | ||
*/ | ||
updateBucketName: function (bucketname) { | ||
updateBucketNameAndDescription: function (bucketname, description) { | ||
var self = this; | ||
this.nfRegistryApi.updateBucket({ | ||
'identifier': this.nfRegistryService.bucket.identifier, | ||
'name': bucketname, | ||
'description': description, | ||
'revision': this.nfRegistryService.bucket.revision | ||
}).subscribe(function (response) { | ||
if (!response.status || response.status === 200) { | ||
|
@@ -421,11 +427,12 @@ NfRegistryManageBucket.prototype = { | |
return self.nfRegistryService.bucket.identifier === bucket.identifier; | ||
}).forEach(function (bucket) { | ||
bucket.name = response.name; | ||
bucket.description = response.description; | ||
bucket.revision = response.revision; | ||
}); | ||
self.snackBarService.openCoaster({ | ||
title: 'Success', | ||
message: 'This bucket name has been updated.', | ||
message: 'This bucket name and description have been updated.', | ||
verticalPosition: 'bottom', | ||
horizontalPosition: 'right', | ||
icon: 'fa fa-check-circle-o', | ||
|
@@ -434,6 +441,7 @@ NfRegistryManageBucket.prototype = { | |
}); | ||
} else if (response.status === 409) { | ||
self.bucketname = self.nfRegistryService.bucket.name; | ||
self.description = self.nfRegistryService.bucket.description; | ||
self.allowBundleRedeploy = self.nfRegistryService.bucket.allowBundleRedeploy; | ||
self.allowPublicRead = self.nfRegistryService.bucket.allowPublicRead; | ||
|
||
|
@@ -462,6 +470,7 @@ NfRegistryManageBucket.prototype = { | |
if (!response.status || response.status === 200) { | ||
self.nfRegistryService.bucket = response; | ||
self.bucketname = self.nfRegistryService.bucket.name; | ||
self.description = self.nfRegistryService.bucket.description; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are similar code patters to this one at/about lines 530 and 589. Does "self.description" need to be added in these places as well? |
||
self.allowBundleRedeploy = self.nfRegistryService.bucket.allowBundleRedeploy; | ||
self.allowPublicRead = self.nfRegistryService.bucket.allowPublicRead; | ||
} else if (response.status === 404) { | ||
|
@@ -521,6 +530,7 @@ NfRegistryManageBucket.prototype = { | |
if (!response.status || response.status === 200) { | ||
self.nfRegistryService.bucket = response; | ||
self.bucketname = self.nfRegistryService.bucket.name; | ||
self.description = self.nfRegistryService.bucket.description; | ||
self.allowBundleRedeploy = self.nfRegistryService.bucket.allowBundleRedeploy; | ||
self.allowPublicRead = self.nfRegistryService.bucket.allowPublicRead; | ||
} else if (response.status === 404) { | ||
|
@@ -580,6 +590,7 @@ NfRegistryManageBucket.prototype = { | |
if (!response.status || response.status === 200) { | ||
self.nfRegistryService.bucket = response; | ||
self.bucketname = self.nfRegistryService.bucket.name; | ||
self.description = self.nfRegistryService.bucket.description; | ||
self.allowBundleRedeploy = self.nfRegistryService.bucket.allowBundleRedeploy; | ||
self.allowPublicRead = self.nfRegistryService.bucket.allowPublicRead; | ||
} else if (response.status === 404) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this was already here, but would you update the documentation
@param
?