pulumi/pkg/backend/display
Pat Gavlin 1e45aa6ddc [cli] Reflow the interactive display as needed.
The interactive display currently has the unfortunate property that as
the width of the tree table grows, more and more content is lost off of
the right side of the screen. These changes add support for reflowing
the contents of the table as needed. Content is reflowed when the width
of the first N-1 columns of the N-column wide table exceed the width of
the terminal. We do not include the last column in the measurement
because the width of its contents vary wildly, whereas the width of the
other columns is essentially constant (or only increases).

When the terminal is wide enough, each node is layed out into a single
row of the form:

    op | indent + type | name | status | info

If the terminal is too narrow for the content of the first four columns,
each node is layed out into multiple rows:

    op | indent + type | status
       | name
       | info

Concrete examples are given below.

Wide display
------------

     Type                      Name                  Status            Info
     pulumi:pulumi:Stack       aws-ts-webserver-dev
     ├─ aws:ec2:SecurityGroup  web-secgrp
 +-  └─ aws:ec2:Instance       web-server-www        replaced (0.01s)  [diff: ~userData]

Outputs:
  ~ publicHostName: "ec2-34-211-56-110.us-west-2.compute.amazonaws.com" => undefined
  ~ publicIp      : "34.211.56.110" => undefined

Resources:
    +-1 replaced
    2 unchanged

Duration: 12s

Narrow display
--------------

     Type                      Status
     pulumi:pulumi:Stack
     aws-ts-webserver-dev
     ├─ aws:ec2:SecurityGroup
     │  web-secgrp
 +-  └─ aws:ec2:Instance       replaced (0.01s)
        web-server-www
        [diff: ~userData]

Outputs:
  ~ publicHostName: "ec2-34-211-56-110.us-west-2.compute.amazonaws.com" => undefined
  ~ publicIp      : "34.211.56.110" => undefined

Resources:
    +-1 replaced
    2 unchanged

Duration: 12s
2023-03-15 09:42:47 -07:00
..
internal/terminal [cli] Add an "open in browser" keybinding 2023-03-09 15:52:13 -08:00
testdata display: Switch "Open in Browser" to "View in Browser" 2023-03-10 10:52:43 -07:00
diff.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
diff_test.go all: Drop //nolint:goconst 2023-03-09 11:15:21 -08:00
display.go display: Switch "Open in Browser" to "View in Browser" 2023-03-10 10:52:43 -07:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
events.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
events_test.go This commit colorizes nodejs stack traces to respect the default 2023-02-16 14:20:42 -08:00
json.go Add DeletedWith resource option 2022-10-31 12:03:18 +02:00
jsonmessage.go [cli] Reflow the interactive display as needed. 2023-03-15 09:42:47 -07:00
object_diff.go [cli/diff] Tighten the YAML value heuristic 2023-03-09 17:21:35 -08:00
object_diff_test.go [cli/diff] Tighten the YAML value heuristic 2023-03-09 17:21:35 -08:00
options.go [cli] Abstract out terminal interactions 2022-11-08 17:13:56 -08:00
progress.go [cli] Reflow the interactive display as needed. 2023-03-15 09:42:47 -07:00
progress_test.go [cli] Add an "open in browser" keybinding 2023-03-09 15:52:13 -08:00
query.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
rows.go getDiffInfo: Fix slice length check 2023-01-11 21:53:05 -08:00
sigint_unix.go [cli] Reimplement the interactive renderer 2022-11-07 22:02:44 -08:00
sigint_windows.go [cli] Reimplement the interactive renderer 2022-11-07 22:02:44 -08:00
tableutil.go [cli] Reflow the interactive display as needed. 2023-03-15 09:42:47 -07:00
tree.go [cli] Reflow the interactive display as needed. 2023-03-15 09:42:47 -07:00
watch.go [cli] Add a replay-events debug command. (#9271) 2022-04-07 09:03:19 -07:00