From 2fbc2108e153a2e7271d3a552f5619bf3879b2d6 Mon Sep 17 00:00:00 2001 From: valeriia-ruban Date: Wed, 24 Jan 2024 00:43:28 -0800 Subject: [PATCH] updated application template --- .../consul-ui/app/templates/application.hbs | 62 ++++++++++++------- 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/ui/packages/consul-ui/app/templates/application.hbs b/ui/packages/consul-ui/app/templates/application.hbs index 121996f8bdad..67862a4d98de 100644 --- a/ui/packages/consul-ui/app/templates/application.hbs +++ b/ui/packages/consul-ui/app/templates/application.hbs @@ -1,6 +1,6 @@ {{! -Copyright (c) HashiCorp, Inc. -SPDX-License-Identifier: BUSL-1.1 + Copyright (c) HashiCorp, Inc. + SPDX-License-Identifier: BUSL-1.1 }} @@ -19,10 +19,13 @@ SPDX-License-Identifier: BUSL-1.1 {{/if}} {{! Listen out for blocking query/client setting changes }} - + {{! Tell CSS about our theme }} - + {{#each-in source.data as |key value|}} {{#if (and value (includes key (array 'color-scheme' 'contrast')))}} {{document-attrs class=(concat "prefers-" key "-" value) }} @@ -32,7 +35,10 @@ SPDX-License-Identifier: BUSL-1.1 {{! If ACLs are enabled try get a token }} {{#if (can 'use acls')}} - + {{/if}} {{#if (not-eq route.currentName 'oauth-provider-debug')}} @@ -50,9 +56,10 @@ SPDX-License-Identifier: BUSL-1.1 {{else}} {{! If we are notfound, guess the params we need }} {{#if (eq route.currentName 'notfound')}} - + {{/if}} {{! Make sure we guess and default to the right params when not found }} @@ -68,7 +75,7 @@ SPDX-License-Identifier: BUSL-1.1 {{! Make sure we have enough to show the app chrome}} {{! Don't show anything until we have a list of DCs }} - + {{! Once we have a list of DCs make sure the DC we are asking for exists }} {{! If not use the DC that the UI is running in }} {{#let @@ -83,23 +90,36 @@ SPDX-License-Identifier: BUSL-1.1 {{#if (and (gt dc.Name.length 0) dcs)}} {{! figure out our current DC and convert it to a model }} - + {{#if dc.data}} - - {{hcpLink.data.isLinked}} - {{json-stringify hcpLink}} - + + {{#if error}} {{! If we got an error from anything, show an error page }} {{else}} {{! Otherwise show the rest of the app}} - + {{outlet}} @@ -108,7 +128,7 @@ SPDX-License-Identifier: BUSL-1.1 {{/if}} - + {{/if}} {{/if}} @@ -122,4 +142,4 @@ SPDX-License-Identifier: BUSL-1.1 {{outlet}} {{/if}} - \ No newline at end of file +