hashi-ui icon indicating copy to clipboard operation
hashi-ui copied to clipboard

Blank value in client Meta Properties causes key/value mismatch

Open toadstule opened this issue 4 years ago • 2 comments

In my client nomad config, I have:

  "client": {
    "enabled": true,
    "max_kill_timeout": "10m",
    "meta": {
      "key_a": "value_a",
      "key_b": "value_b",
      "key_c": "",
      "key_d": "value_d",
      "key_e": "value_e"
    },

This results in the UI client page displaying:

Meta Properties
key_a: value_a
key_b: value_b
key_c: value_d
key_d: value_e
key_e: 

toadstule avatar Aug 08 '19 21:08 toadstule

Possibly a regression from when this line was removed/changed:

https://github.com/jippi/hashi-ui/blame/aba2f405802a6ea0df0b427162ae6f64b78c65fd/frontend/src/components/MetaPayload/MetaPayload.js#L33

toadstule avatar Aug 08 '19 21:08 toadstule

The following html snippet illustrates what happens:

<html>
    <head>
        <style>
            dt::after { content: " : " }
            dt
            {
                float: left;
                clear: left;
            }
        </style>
    </head>
    <body>
        <dl>
            <dt>A1</dt><dd>B1</dd>
            <dt>A2</dt><dd></dd>
            <dt>A3</dt><dd>B3</dd>
        </dl>
    </body>
</html>

I am not an html expert so cannot suggest a fix.

kshpytsya avatar Mar 20 '20 14:03 kshpytsya