Skip to content

Commit

Permalink
added frontend config for option dropdown initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
ErykKul committed Apr 20, 2023
1 parent b46797f commit f6d6c2f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 29 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ Having multiple instances for plugin types is useful when certain features, e.g.
- repoNameFieldPlaceholder: the placeholder for the repository selection field.
- repoNameFieldEditable: if set to ``true``, the user can paste or type repository name directly, without the use of the dropdown.
- repoNameFieldValues: suggested or possible repository names. When this is filled out, a dropdown will be presented to the user, otherwise a text field will be presented.
- repoNameFieldHasSearch: when the plugin implements ``Search`` function, this field can be set to ``true`` for searchable repository names.
- repoNameFieldHasSearch: when the plugin implements ``Search`` function, this field can be set to ``true`` for searchable repository names.
- repoNameFieldHasInit: when the plugin implements ``Search`` function, this field can be set to ``true`` for initial search without the search term (initializes the dropdown to the default values as implemented by the search function).
- parseSourceUrlField: when set to true, the repoName field can be left not configured and the repository name is parsed from the source URL field.
- tokenName: when set to a unique value, the credential needed for authentication is stored in the browser.
- tokenGetter: OAuth configuration for the repository instance containing the URL where authorizations should be redirected to, and the oauth_client_id from the OAuth application setting (e.g., GitHub application settings as described in this [guide](https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)). See also the backend configuration section on how to configure the needed client secrets.
Expand Down
29 changes: 1 addition & 28 deletions conf/frontend_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,9 @@
"storeDvToken": true,
"sendMails": true,
"plugins": [
{
"id": "mango",
"name": "ManGO (KU Leuven IRODS)",
"plugin": "irods",
"pluginName": "IRODS",
"optionFieldName": "Folder",
"optionFieldPlaceholder": "Select folder",
"optionFieldInteractive": true,
"tokenFieldName": "Token (IRODS password)",
"tokenFieldPlaceholder": "password",
"sourceUrlFieldValue": "PAM://ghum.irods.icts.kuleuven.be:1247",
"usernameFieldName": "Username",
"usernameFieldPlaceholder": "u-number",
"repoNameFieldName": "Zone",
"repoNameFieldPlaceholder": "zone",
"repoNameFieldEditable": true,
"repoNameFieldValues": [
"gbiomed",
"gbiomed_eximious",
"gbiomed_fbi",
"ghum",
"set"
],
"tokenGetter": {
"URL": "https://mango.kuleuven.be/data-platform/connection-info"
}
},
{
"id": "irods",
"name": "Other IRODS",
"name": "IRODS",
"plugin": "irods",
"pluginName": "IRODS",
"optionFieldName": "Folder",
Expand Down
1 change: 1 addition & 0 deletions image/app/config/frontend_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type RepoPlugin struct {
RepoNameFieldEditable bool `json:"repoNameFieldEditable,omitempty"`
RepoNameFieldValues []string `json:"repoNameFieldValues,omitempty"`
RepoNameFieldHasSearch bool `json:"repoNameFieldHasSearch"`
RepoNameFieldHasInit bool `json:"repoNameFieldHasInit"`
ParseSourceUrlField bool `json:"parseSourceUrlField"`
TokenName string `json:"tokenName,omitempty"`
TokenGetter TokenGetter `json:"tokenGetter,omitempty"`
Expand Down

0 comments on commit f6d6c2f

Please sign in to comment.