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 { ...@@ -69,6 +69,7 @@ public class CredentialsEditing implements Serializable {
private List<String> tapSchemaVersions; private List<String> tapSchemaVersions;
private List<String> obscoreVersions; private List<String> obscoreVersions;
private String label;
private boolean separateCredentials; private boolean separateCredentials;
private Credentials sourceCredentials; private Credentials sourceCredentials;
private Credentials tapSchemaCredentials; private Credentials tapSchemaCredentials;
...@@ -188,6 +189,7 @@ public class CredentialsEditing implements Serializable { ...@@ -188,6 +189,7 @@ public class CredentialsEditing implements Serializable {
editedCredentials = new JoinedCredentials(sourceCredentials); editedCredentials = new JoinedCredentials(sourceCredentials);
} }
editedCredentials.setLabel(label);
editedCredentials.setTapSchemaName(tapSchemaName); editedCredentials.setTapSchemaName(tapSchemaName);
editedCredentials.setTapSchemaVersion(tapSchemaVersion); editedCredentials.setTapSchemaVersion(tapSchemaVersion);
editedCredentials.setHasObscore(hasObscore); editedCredentials.setHasObscore(hasObscore);
...@@ -211,6 +213,14 @@ public class CredentialsEditing implements Serializable { ...@@ -211,6 +213,14 @@ public class CredentialsEditing implements Serializable {
return obscoreVersions; return obscoreVersions;
} }
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public boolean isSeparateCredentials() { public boolean isSeparateCredentials() {
return separateCredentials; return separateCredentials;
} }
......
...@@ -33,6 +33,7 @@ public abstract class TapCredentials implements Serializable { ...@@ -33,6 +33,7 @@ public abstract class TapCredentials implements Serializable {
private static final long serialVersionUID = -3736612935129057338L; private static final long serialVersionUID = -3736612935129057338L;
private String label;
private String tapSchemaName; private String tapSchemaName;
private String tapSchemaVersion; private String tapSchemaVersion;
private boolean hasObscore; private boolean hasObscore;
...@@ -51,6 +52,15 @@ public abstract class TapCredentials implements Serializable { ...@@ -51,6 +52,15 @@ public abstract class TapCredentials implements Serializable {
this.ivoaSchemaName = tapCredentials.getIvoaSchemaName(); 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") @XmlElement(name = "tap_schema_name")
public String getTapSchemaName() { public String getTapSchemaName() {
return tapSchemaName; return tapSchemaName;
......
...@@ -57,13 +57,18 @@ ...@@ -57,13 +57,18 @@
</h:commandLink> </h:commandLink>
</td> </td>
<td> <td>
<h:panelGroup rendered="#{c.class.simpleName eq 'JoinedCredentials'}"> <h:panelGroup rendered="#{c.label ne null and c.label ne ''}">
<tsm_components:print_credentials credentials="#{c.credentials}" /> #{c.label}
</h:panelGroup> </h:panelGroup>
<h:panelGroup rendered="#{c.class.simpleName eq 'SeparatedCredentials'}"> <h:panelGroup rendered="#{c.label eq null or c.label eq ''}">
<tsm_components:print_credentials credentials="#{c.sourceCredentials}" /> <h:panelGroup rendered="#{c.class.simpleName eq 'JoinedCredentials'}">
<span class="glyphicon glyphicon-arrow-right"></span> <tsm_components:print_credentials credentials="#{c.credentials}" />
<tsm_components:print_credentials credentials="#{c.tapSchemaCredentials}" /> </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> </h:panelGroup>
</td> </td>
<td>#{c.tapSchemaName}</td> <td>#{c.tapSchemaName}</td>
...@@ -105,6 +110,17 @@ ...@@ -105,6 +110,17 @@
<h:panelGroup id="credentials-modal-body" layout="block" class="modal-body"> <h:panelGroup id="credentials-modal-body" layout="block" class="modal-body">
<h:panelGroup class="row" layout="block" id="credentials_panels_wrapper"> <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="#{credentialsInsertion.separateCredentials ? 'col-xs-6':'col-xs-12'}">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading#{credentialsInsertion.separateCredentials ? '' : ' hide'}"> <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