diff --git a/ui/app/routes/access-control.js b/ui/app/routes/access-control.js index 43dc5f41de3..6fb80de67da 100644 --- a/ui/app/routes/access-control.js +++ b/ui/app/routes/access-control.js @@ -1,3 +1,12 @@ import Route from '@ember/routing/route'; -export default class AccessControlRoute extends Route {} +export default class AccessControlRoute extends Route { + // Load our tokens, roles, and policies + async model() { + return { + tokens: await this.store.findAll('token'), + roles: await this.store.findAll('role'), + policies: await this.store.findAll('policy'), + }; + } +} diff --git a/ui/app/styles/components.scss b/ui/app/styles/components.scss index aab1b61d9ee..12b90efdffd 100644 --- a/ui/app/styles/components.scss +++ b/ui/app/styles/components.scss @@ -59,3 +59,4 @@ @import './components/policies'; @import './components/metadata-editor'; @import './components/job-status-panel'; +@import './components/access-control'; diff --git a/ui/app/styles/components/access-control.scss b/ui/app/styles/components/access-control.scss new file mode 100644 index 00000000000..23777af174d --- /dev/null +++ b/ui/app/styles/components/access-control.scss @@ -0,0 +1,32 @@ +.access-control-overview { + .intro { + margin-bottom: 2rem; + p { + margin-bottom: 1rem; + } + footer { + display: flex; + gap: 1rem; + } + } + + .section-cards { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1rem; + & > div { + display: flex; + flex-direction: row; + & > a { + padding: 1rem; + text-decoration: none; + color: $black; + display: block; + + &:hover { + background-color: var(--token-color-surface-interactive-hover); + } + } + } + } +} diff --git a/ui/app/templates/access-control/index.hbs b/ui/app/templates/access-control/index.hbs index cf303da1e95..0421f2871c0 100644 --- a/ui/app/templates/access-control/index.hbs +++ b/ui/app/templates/access-control/index.hbs @@ -1,2 +1,37 @@ -{{page-title "Index"}} +
+

Access Control

+
+

Your Nomad cluster has Access Control enabled, which you can use to control access to data and APIs. Here, you can manage the Tokens, Policies, and Roles for your system.

+
+ + +
+
+
+ + +

{{this.model.tokens.length}} {{pluralize "Token" this.model.tokens.length}}

+

User access tokens are associated with one or more policies or roles to grant specific capabilities.

+
+
+ + +

{{this.model.policies.length}} {{pluralize "Policy" this.model.policies.length}}

+

Sets of rules defining the capabilities granted to adhering tokens.

+
+
+ + +

{{this.model.roles.length}} {{pluralize "Role" this.model.roles.length}}

+

Roles group one or more Policies into higher-level sets of permissions.

+
+
+
+
{{outlet}} \ No newline at end of file diff --git a/ui/app/templates/access-control/policies/policy.hbs b/ui/app/templates/access-control/policies/policy.hbs index 4b3f0d3e6eb..b19ab039115 100644 --- a/ui/app/templates/access-control/policies/policy.hbs +++ b/ui/app/templates/access-control/policies/policy.hbs @@ -3,7 +3,7 @@ SPDX-License-Identifier: BUSL-1.1 ~}} -{{!-- --}} + {{page-title "Policy"}}