-
Notifications
You must be signed in to change notification settings - Fork 64
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
Showing MSP admins present in wallet while updating MSP definition #525
Showing MSP admins present in wallet while updating MSP definition #525
Conversation
Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
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.
couple things
- using a
type: 'text'
field for this doesn't feel right, use atype: 'component'
, see screen shot - add a tooltip, see screen shot
- change label to
Known channel admins
- remove the
index < 1
if statement, always show the label - the big change, is you need to actually filter the wallet identities, right now the fields you added are identical to the
Identity
dropdown, which isn't helpful, it should be built off the channel's config block admin section and then compared to the identities in the dropdown. the list of identities should be the admin identities for this MSP on this channel. - change the local
onClose
function to some other name, it's someimtes confusing to have the same function name in two different scopes (that are right next to eachother) - lastly fix any linting errors, so far you have a missing semicolon
- oh also, edit the description of this PR, needs a better description, too vague
shoot to make this: (note I named my identities in this example admin
and tls-admin
)
Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
f129119
to
3b0141a
Compare
Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
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.
better! it's getting there, see comments
packages/apollo/src/components/UpdateChannelMspModal/UpdateChannelMspModal.js
Outdated
Show resolved
Hide resolved
packages/apollo/src/components/UpdateChannelMspModal/UpdateChannelMspModal.js
Show resolved
Hide resolved
packages/apollo/src/components/UpdateChannelMspModal/UpdateChannelMspModal.js
Outdated
Show resolved
Hide resolved
@@ -343,6 +371,20 @@ class UpdateChannelMspModal extends React.Component { | |||
return fields; | |||
} | |||
|
|||
populateMSPAdmins() |
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.
this is close, but not quite what i had in mind. instead of looking at the node ou in the certs in the wallet, look in the config block for this channel, and find the MSP section and its root certs, then compare these certs to the ones in the wallet, if they match, add the wallet identity's name to the list
you will need to reach back a bit because UpdateChannelMspModal
doesn't have this data (the config block), and it's parent ChannelMembers
doesn't have it either, but that guy's parent ChannelDetails
does. so just feed it down as arguments to each component until UpdateChannelMspModal
can see the data you need
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.
@selvaprakash92 this part has not been done
Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
@dshuffma-ibm , updated the style and label suggestions, regarding logic: Line 153 in 60c486d
on backtracking this, it is getting the results via
from:
Since it is returning all type of identities with that root cert, I am filtering it with |
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.
still needs logic changes to the match identities to the * channel's * config block msp section
the data you are currently using is just referencing local msp data with local wallet data, it is not referencing the channel's config block, which is what is needed
@@ -343,6 +371,20 @@ class UpdateChannelMspModal extends React.Component { | |||
return fields; | |||
} | |||
|
|||
populateMSPAdmins() |
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.
@selvaprakash92 this part has not been done
Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
@dshuffma-ibm , Updated the logic to fetch the msp from channel config. And match the root and intermediate certs of that to the wallet to show the identities |
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.
almost, the cert matching logic looks good, its comparing the orgs for the msp section of the config block with the local identities, however I don't like fetching the config block when we already have the block. see my earlier comment:
you will need to reach back a bit because UpdateChannelMspModal doesn't have this data (the config block), and it's parent ChannelMembers doesn't have it either, but that guy's parent ChannelDetails does. so just feed it down as arguments to each component until UpdateChannelMspModal can see the data you need
if you already attempted this ^^ but didn't get it to work, i'd like to know what happened
Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
@dshuffma-ibm , I have implemented the changes as per review comments, now I am getting the data from |
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.
looks good, thanks for all the changes
…yperledger-labs#525) * initial draft on showing admins * updated the logic to get msp from channel config --------- Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local> Co-authored-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
Type of change
Description
This PR shows/lists the identities from the local wallet that are also admins on the channel, so that the user can make a better informed choice when selecting the identity to use when changing the MSP definition.