Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inquiry not displaying line breaks as <br> #739

Open
guzzijones opened this issue Sep 23, 2019 · 3 comments
Open

Inquiry not displaying line breaks as <br> #739

guzzijones opened this issue Sep 23, 2019 · 3 comments
Labels
Milestone

Comments

@guzzijones
Copy link
Contributor

The inquiry front end should display line breaks in the description of an input property correctly.
st2 get inquiry [id] will display embedded line feeds via the cli

action code:

version: 1.0
tasks:

  # [877, 193]
  domain:
    action: core.echo
    input:
      message: "{{ctx().indicators.domain|join(\", \")}}"
    next:
      # #fecb2f
      - do:
          - IPv4
        publish:
          - IPv4: "{{ctx().indicators.domain|join(\", \")}}"
  # [864, 311]
  IPv4:
    action: core.echo
    input:
      message: "{{ctx().indicators.IPv4|join(\", \")}}"
    next:
      - do:
          - get_approval

  # [874, 428]
  get_approval:
    action: core.ask
    input:
      ttl: 60
      schema:
        type: object
        properties:
          approved:
            type: boolean
            description: |
                         block all?
                         {% for x in ctx().indicators.domain %}
                         {{x}}
                         {% endfor %}
                         another option to display
                         {{ctx().indicators.domain|join(",  ")}}
            required: True
          color:
            type: string
            description: "what color"
            enum:
              - "blue"
              - "red"

    next:
      - when: <% succeeded() %>
        do: finish
      - when: <% failed() %>
        do: stop

  finish:
    action: core.echo message="Automation completed."

  stop:
    action: core.echo message="Automation stopped."

input:
  - indicators
vars:
  - IPv4: null
  - domain: null
@arm4b arm4b added the bug label Sep 24, 2019
@blag
Copy link
Contributor

blag commented Nov 22, 2019

@guzzijones Can you clarify this for me? Are you talking about how the the st2 command (CLI) renders the descriptions, or how the web interface renders the descriptions?

If you're talking about the CLI, the best place to report that would be the main st2 repository.

If you are indeed talking about how it is rendered in the ST2 web UI, this is the right place to report it. However, can you post a screenshot or something of how it is being (incorrectly) rendered and include which web browser/s you are using? Are newlines being escaped too much (example: \\n)? Are newlines duplicated when they shouldn't be? Are they not even being rendered (example: first_linesecond_line)? Are they being rendered as spaces (example: first_line second_line)? We need more information to investigate this further.

@guzzijones
Copy link
Contributor Author

newlines are not being rendered. Adding white-space: pre-wrap to the css class solves the issue.

@guzzijones
Copy link
Contributor Author

Yes it is the gui.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants