Skip to content

Commit

Permalink
removed sourceUrlFieldValueMap filed from frontend configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ErykKul committed Apr 18, 2023
1 parent cf0510f commit b46797f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 31 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ Having multiple instances for plugin types is useful when certain features, e.g.
- sourceUrlFieldName: when configured, the UI will show the source URL field, where the user can enter the URL of the repository to connect to.
- sourceUrlFieldPlaceholder: the placeholder for the source URL field.
- sourceUrlFieldValue: when configured, it contains the default value for the source URL field. When this value is always the same for a given plugin, e.g., ``https://github.com``, then the sourceUrlFieldName can be left empty, and the field will not be shown (but will always contain the configured default value).
- sourceUrlFieldValueMap: the same as sourceUrlFieldValue, but it contains mapping between a repository name and a URL. This can be used when, e.g., different IRODS zones use different URLs.
- usernameFieldName: when the user needs to authenticate with a username to the given repository (e.g., OAuth is not configured for this repository instance), this field should be set to the name of this field, e.g., "Username"
- usernameFieldPlaceholder: the placeholder for the username field.
- repoNameFieldName: repository selection field name.
Expand Down
7 changes: 0 additions & 7 deletions conf/frontend_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@
"tokenFieldName": "Token (IRODS password)",
"tokenFieldPlaceholder": "password",
"sourceUrlFieldValue": "PAM://ghum.irods.icts.kuleuven.be:1247",
"sourceUrlFieldValueMap": {
"gbiomed": "PAM://gbiomed.irods.icts.kuleuven.be:1247",
"gbiomed_eximious": "PAM://gbiomed.irods.icts.kuleuven.be:1247",
"gbiomed_fbi": "PAM://gbiomed.irods.icts.kuleuven.be:1247",
"ghum": "PAM://ghum.irods.icts.kuleuven.be:1247",
"set": "PAM://set.irods.icts.kuleuven.be:1247"
},
"usernameFieldName": "Username",
"usernameFieldPlaceholder": "u-number",
"repoNameFieldName": "Zone",
Expand Down
45 changes: 22 additions & 23 deletions image/app/config/frontend_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@
package config

type RepoPlugin struct {
Id string `json:"id"`
Name string `json:"name"`
Plugin string `json:"plugin"`
PluginName string `json:"pluginName"`
OptionFieldName string `json:"optionFieldName,omitempty"`
OptionPlaceholder string `json:"optionFieldPlaceholder,omitempty"`
OptionFieldInteractive bool `json:"optionFieldInteractive,omitempty"`
TokenFieldName string `json:"tokenFieldName,omitempty"`
TokenFieldPlaceholder string `json:"tokenFieldPlaceholder,omitempty"`
SourceUrlFieldName string `json:"sourceUrlFieldName,omitempty"`
SourceUrlFieldPlaceholder string `json:"sourceUrlFieldPlaceholder,omitempty"`
SourceUrlFieldValue string `json:"sourceUrlFieldValue,omitempty"`
SourceUrlFieldValueMap map[string]string `json:"sourceUrlFieldValueMap,omitempty"`
UsernameFieldName string `json:"usernameFieldName,omitempty"`
UsernameFieldPlaceholder string `json:"usernameFieldPlaceholder,omitempty"`
RepoNameFieldName string `json:"repoNameFieldName,omitempty"`
RepoNameFieldPlaceholder string `json:"repoNameFieldPlaceholder,omitempty"`
RepoNameFieldEditable bool `json:"repoNameFieldEditable,omitempty"`
RepoNameFieldValues []string `json:"repoNameFieldValues,omitempty"`
RepoNameFieldHasSearch bool `json:"repoNameFieldHasSearch"`
ParseSourceUrlField bool `json:"parseSourceUrlField"`
TokenName string `json:"tokenName,omitempty"`
TokenGetter TokenGetter `json:"tokenGetter,omitempty"`
Id string `json:"id"`
Name string `json:"name"`
Plugin string `json:"plugin"`
PluginName string `json:"pluginName"`
OptionFieldName string `json:"optionFieldName,omitempty"`
OptionPlaceholder string `json:"optionFieldPlaceholder,omitempty"`
OptionFieldInteractive bool `json:"optionFieldInteractive,omitempty"`
TokenFieldName string `json:"tokenFieldName,omitempty"`
TokenFieldPlaceholder string `json:"tokenFieldPlaceholder,omitempty"`
SourceUrlFieldName string `json:"sourceUrlFieldName,omitempty"`
SourceUrlFieldPlaceholder string `json:"sourceUrlFieldPlaceholder,omitempty"`
SourceUrlFieldValue string `json:"sourceUrlFieldValue,omitempty"`
UsernameFieldName string `json:"usernameFieldName,omitempty"`
UsernameFieldPlaceholder string `json:"usernameFieldPlaceholder,omitempty"`
RepoNameFieldName string `json:"repoNameFieldName,omitempty"`
RepoNameFieldPlaceholder string `json:"repoNameFieldPlaceholder,omitempty"`
RepoNameFieldEditable bool `json:"repoNameFieldEditable,omitempty"`
RepoNameFieldValues []string `json:"repoNameFieldValues,omitempty"`
RepoNameFieldHasSearch bool `json:"repoNameFieldHasSearch"`
ParseSourceUrlField bool `json:"parseSourceUrlField"`
TokenName string `json:"tokenName,omitempty"`
TokenGetter TokenGetter `json:"tokenGetter,omitempty"`
}

type TokenGetter struct {
Expand Down

0 comments on commit b46797f

Please sign in to comment.