Commit f96c84ff authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Added label for credentials

parent 39d056ce
Pipeline #136 passed with stage
in 11 seconds
......@@ -69,6 +69,7 @@ public class CredentialsEditing implements Serializable {
private List<String> tapSchemaVersions;
private List<String> obscoreVersions;
private String label;
private boolean separateCredentials;
private Credentials sourceCredentials;
private Credentials tapSchemaCredentials;
......@@ -188,6 +189,7 @@ public class CredentialsEditing implements Serializable {
editedCredentials = new JoinedCredentials(sourceCredentials);
}
editedCredentials.setLabel(label);
editedCredentials.setTapSchemaName(tapSchemaName);
editedCredentials.setTapSchemaVersion(tapSchemaVersion);
editedCredentials.setHasObscore(hasObscore);
......@@ -211,6 +213,14 @@ public class CredentialsEditing implements Serializable {
return obscoreVersions;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public boolean isSeparateCredentials() {
return separateCredentials;
}
......
......@@ -33,6 +33,7 @@ public abstract class TapCredentials implements Serializable {
private static final long serialVersionUID = -3736612935129057338L;
private String label;
private String tapSchemaName;
private String tapSchemaVersion;
private boolean hasObscore;
......@@ -51,6 +52,15 @@ public abstract class TapCredentials implements Serializable {
this.ivoaSchemaName = tapCredentials.getIvoaSchemaName();
}
@XmlElement(name = "label")
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
@XmlElement(name = "tap_schema_name")
public String getTapSchemaName() {
return tapSchemaName;
......
......@@ -57,13 +57,18 @@
</h:commandLink>
</td>
<td>
<h:panelGroup rendered="#{c.class.simpleName eq 'JoinedCredentials'}">
<tsm_components:print_credentials credentials="#{c.credentials}" />
<h:panelGroup rendered="#{c.label ne null and c.label ne ''}">
#{c.label}
</h:panelGroup>
<h:panelGroup rendered="#{c.class.simpleName eq 'SeparatedCredentials'}">
<tsm_components:print_credentials credentials="#{c.sourceCredentials}" />
<span class="glyphicon glyphicon-arrow-right"></span>
<tsm_components:print_credentials credentials="#{c.tapSchemaCredentials}" />
<h:panelGroup rendered="#{c.label eq null or c.label eq ''}">
<h:panelGroup rendered="#{c.class.simpleName eq 'JoinedCredentials'}">
<tsm_components:print_credentials credentials="#{c.credentials}" />
</h:panelGroup>
<h:panelGroup rendered="#{c.class.simpleName eq 'SeparatedCredentials'}">
<tsm_components:print_credentials credentials="#{c.sourceCredentials}" />
<span class="glyphicon glyphicon-arrow-right"></span>
<tsm_components:print_credentials credentials="#{c.tapSchemaCredentials}" />
</h:panelGroup>
</h:panelGroup>
</td>
<td>#{c.tapSchemaName}</td>
......@@ -105,6 +110,17 @@
<h:panelGroup id="credentials-modal-body" layout="block" class="modal-body">
<h:panelGroup class="row" layout="block" id="credentials_panels_wrapper">
<div class="col-xs-12">
<div class="form-horizontal">
<div class="form-group">
<h:outputLabel for="credentials_label" class="control-label col-xs-4">Credentials label</h:outputLabel>
<div class="col-xs-7">
<h:inputText value="#{credentialsInsertion.label}" id="credentials_label" class="form-control" />
<h:message for="credentials_label" class="text-danger" />
</div>
</div>
</div>
</div>
<div class="#{credentialsInsertion.separateCredentials ? 'col-xs-6':'col-xs-12'}">
<div class="panel panel-primary">
<div class="panel-heading#{credentialsInsertion.separateCredentials ? '' : ' hide'}">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment