File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
ui/packages/consul-ui/app/templates Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ ```release-note:improvement
2
+ ui: Adds a copyable token accessor/secret on the settings page when signed in
3
+ ```
Original file line number Diff line number Diff line change @@ -35,6 +35,34 @@ as |item|}}
35
35
<A .Title>Local Storage</A .Title>
36
36
<A .Description>These settings are immediately saved to local storage and persisted through browser usage.</A .Description>
37
37
</Hds::Alert >
38
+
39
+ <DataSource
40
+ @src ={{ uri " settings://consul:token" }}
41
+ @onchange ={{ action (mut token ) value =" data" }}
42
+ @onerror ={{ action (mut error ) value =" error" }}
43
+ />
44
+ {{ #if error }}
45
+ <Hds::Alert @type =" inline" @color =" highlight" class =" mb-3 mt-2" @icon =" token" as |A|>
46
+ <A .Title>Error loading token</A .Title>
47
+ <A .Description>
48
+ {{ error.message }}
49
+ </A .Description>
50
+ </Hds::Alert >
51
+ {{ /if }}
52
+ {{ #if token }}
53
+ <Hds::Alert @type =" inline" @color =" highlight" class =" mb-3 mt-2" @icon =" token" as |A|>
54
+ <A .Title>Your Access Token</A .Title>
55
+ <A .Description>
56
+ <Hds::Form::MaskedInput::Field readonly @isContentMasked ={{ false }} @hasCopyButton ={{ true }} @value ={{ token.AccessorID }} as |F|>
57
+ <F .Label>Accessor ID</F .Label>
58
+ </Hds::Form::MaskedInput::Field >
59
+ <Hds::Form::MaskedInput::Field readonly @hasCopyButton ={{ true }} @value ={{ token.SecretID }} as |F|>
60
+ <F .Label>Secret ID</F .Label>
61
+ </Hds::Form::MaskedInput::Field >
62
+ </A .Description>
63
+ </Hds::Alert >
64
+ {{ /if }}
65
+
38
66
<form >
39
67
{{ #if (not (env ' CONSUL_UI_DISABLE_REALTIME' ))}}
40
68
<Disclosure as |disclosure|>
You can’t perform that action at this time.
0 commit comments