Display groupUUID on AccountGroupInfoScreen

It is possible to change the access rights for a project by directly
editing the 'project.config' file in the 'refs/meta/config' branch and
pushing the changes to Gerrit. If a project owner wants to assign a
privilege to a new group by editing the 'project.config' file, he also
needs to add the new group to the 'groups' file in the
'refs/meta/config' branch. To add the group to the 'groups' file the
UUID of the group must be known. Currently from the UI it is not
possible to find the UUID of a group. With this change the group UUID
is now displayed on the AccountGroupInfoScreen.

Change-Id: I4017a9e7e06029aaf2c3c9c1c83b64215f2a04f4
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2011-07-07 08:28:27 +02:00
parent fb1963070d
commit f36d4ed114
5 changed files with 23 additions and 0 deletions

View File

@@ -114,6 +114,7 @@ public interface GerritCss extends CssResource {
String gerritTopMenu(); String gerritTopMenu();
String gerritBody(); String gerritBody();
String groupName(); String groupName();
String groupUUIDPanel();
String header(); String header();
String hyperlink(); String hyperlink();
String iconCell(); String iconCell();

View File

@@ -40,6 +40,7 @@ import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.SuggestBox; import com.google.gwt.user.client.ui.SuggestBox;
import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwtexpui.clippy.client.CopyableLabel;
import com.google.gwtexpui.globalkey.client.NpTextArea; import com.google.gwtexpui.globalkey.client.NpTextArea;
import com.google.gwtexpui.globalkey.client.NpTextBox; import com.google.gwtexpui.globalkey.client.NpTextBox;
import com.google.gwtjsonrpc.client.VoidResult; import com.google.gwtjsonrpc.client.VoidResult;
@@ -47,6 +48,8 @@ import com.google.gwtjsonrpc.client.VoidResult;
import java.util.List; import java.util.List;
public class AccountGroupInfoScreen extends AccountGroupScreen { public class AccountGroupInfoScreen extends AccountGroupScreen {
private CopyableLabel groupUUIDLabel;
private NpTextBox groupNameTxt; private NpTextBox groupNameTxt;
private Button saveName; private Button saveName;
@@ -79,6 +82,7 @@ public class AccountGroupInfoScreen extends AccountGroupScreen {
@Override @Override
protected void onInitUI() { protected void onInitUI() {
super.onInitUI(); super.onInitUI();
initUUID();
initName(); initName();
initOwner(); initOwner();
initDescription(); initDescription();
@@ -99,6 +103,15 @@ public class AccountGroupInfoScreen extends AccountGroupScreen {
emailOnlyAuthors.setEnabled(canModify); emailOnlyAuthors.setEnabled(canModify);
} }
private void initUUID() {
final VerticalPanel groupUUIDPanel = new VerticalPanel();
groupUUIDPanel.setStyleName(Gerrit.RESOURCES.css().groupUUIDPanel());
groupUUIDPanel.add(new SmallHeading(Util.C.headingGroupUUID()));
groupUUIDLabel = new CopyableLabel("");
groupUUIDPanel.add(groupUUIDLabel);
add(groupUUIDPanel);
}
private void initName() { private void initName() {
final VerticalPanel groupNamePanel = new VerticalPanel(); final VerticalPanel groupNamePanel = new VerticalPanel();
groupNameTxt = new NpTextBox(); groupNameTxt = new NpTextBox();
@@ -424,6 +437,7 @@ public class AccountGroupInfoScreen extends AccountGroupScreen {
@Override @Override
protected void display(final GroupDetail groupDetail) { protected void display(final GroupDetail groupDetail) {
final AccountGroup group = groupDetail.group; final AccountGroup group = groupDetail.group;
groupUUIDLabel.setText(group.getGroupUUID().get());
groupNameTxt.setText(group.getName()); groupNameTxt.setText(group.getName());
if (groupDetail.ownerGroup != null) { if (groupDetail.ownerGroup != null) {
ownerTxt.setText(groupDetail.ownerGroup.getName()); ownerTxt.setText(groupDetail.ownerGroup.getName());

View File

@@ -45,6 +45,7 @@ public interface AdminConstants extends Constants {
String descriptionNotifications(); String descriptionNotifications();
String buttonSaveGroupOptions(); String buttonSaveGroupOptions();
String headingGroupUUID();
String headingOwner(); String headingOwner();
String headingDescription(); String headingDescription();
String headingProjectOptions(); String headingProjectOptions();

View File

@@ -25,6 +25,7 @@ buttonSaveGroupOptions = Save Group Options
emailOnlyAuthors = Authors emailOnlyAuthors = Authors
descriptionNotifications = Send email notifications about comments and actions by users in this group only to: descriptionNotifications = Send email notifications about comments and actions by users in this group only to:
headingGroupUUID = Group UUID
headingOwner = Owners headingOwner = Owners
headingDescription = Description headingDescription = Description
headingProjectOptions = Project Options headingProjectOptions = Project Options

View File

@@ -1301,3 +1301,9 @@ a:hover.downloadLink {
margin: 4px; margin: 4px;
opacity: 0.90; opacity: 0.90;
} }
/** AccountGroupInfoScreen **/
.groupUUIDPanel {
margin-bottom: 10px;
}