Uploaded image for project: 'Airavata'
  1. Airavata
  2. AIRAVATA-3345

Custom input editor: textarea with autocompletions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Django Portal
    • None

    Description

      Support custom autocompletions in a textarea.  The use case is to improve the user experience of users typing out input files that need to have specific values in specific formats.

      Immediate use case is https://models.earth.indiana.edu/supcrtbl2.php

      The source of autocompletions for SUPCRTBL2 is a database query. If possible, it would be nice to be able to use configuration to specify the query to execute to get completion options. The database password could be added to the Django settings file so it isn't exposed in the input metadata.

      So the idea is that configuring such an editor would involve input metadata something like:

      {
          "editor": {
              "ui-component-id": "autocomplete-textarea-input-editor",
              "config": {
                  "completions": {
                    "source": {
                      "type": "sql-query",
                      "query": "select text as completion from completions_table where text like :substring",
                      "database-type": "mysql",
                      "database-hostname": "...",
                      "database-port": "...",
                      "database-name": "...",
                      "database-username": "...",
                      "database-password": "settings:MY_DB_PASSWORD",
                    }
                  }
              }
          }
      }
      

      Implementation ideas:

      Attachments

        Activity

          People

            marcuschristie Marcus Christie
            marcuschristie Marcus Christie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: