-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6d5fad
commit 4e4c859
Showing
5 changed files
with
80 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'), | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,37 @@ | ||
{{page-title "Index"}} | ||
<section class="section access-control-overview"> | ||
<h1 class="title">Access Control</h1> | ||
<section class="intro"> | ||
<p>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.</p> | ||
<footer> | ||
<Hds::Link::Standalone @icon="docs-link" @text="ACL System Fundamentals" @iconPosition="trailing" @href="https://developer.hashicorp.com/nomad/tutorials/access-control/access-control" /> | ||
<Hds::Link::Standalone @icon="docs-link" @text="ACL Policy Concepts" @iconPosition="trailing" @href="https://developer.hashicorp.com/nomad/tutorials/access-control/access-control-policies" /> | ||
</footer> | ||
</section> | ||
<div class="section-cards"> | ||
<Hds::Card::Container @level="mid" @hasBorder={{true}}> | ||
<LinkTo | ||
@route="access-control.tokens" | ||
> | ||
<h2 class="title">{{this.model.tokens.length}} {{pluralize "Token" this.model.tokens.length}}</h2> | ||
<p>User access tokens are associated with one or more policies or roles to grant specific capabilities.</p> | ||
</LinkTo> | ||
</Hds::Card::Container> | ||
<Hds::Card::Container @level="mid" @hasBorder={{true}}> | ||
<LinkTo | ||
@route="access-control.policies" | ||
> | ||
<h2 class="title">{{this.model.policies.length}} {{pluralize "Policy" this.model.policies.length}}</h2> | ||
<p>Sets of rules defining the capabilities granted to adhering tokens.</p> | ||
</LinkTo> | ||
</Hds::Card::Container> | ||
<Hds::Card::Container @level="mid" @hasBorder={{true}}> | ||
<LinkTo | ||
@route="access-control.roles" | ||
> | ||
<h2 class="title">{{this.model.roles.length}} {{pluralize "Role" this.model.roles.length}}</h2> | ||
<p>Roles group one or more Policies into higher-level sets of permissions.</p> | ||
</LinkTo> | ||
</Hds::Card::Container> | ||
</div> | ||
</section> | ||
{{outlet}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters