[ui] Helios and Power Select upgrades (#22328)

* Helios and Power Select upgrades

* Renamed namespaced contextual components
This commit is contained in:
Phil Renaud
2024-05-29 17:00:56 -04:00
committed by GitHub
parent 8a9d58ae8f
commit e09b29113c
10 changed files with 1001 additions and 1085 deletions

View File

@@ -34,7 +34,7 @@
<A.Header @title="No actions in queue" />
<A.Body @text="Your actions have been manually cleared. To run more, head to a Job or Task page with actions in its Jobspec, and an Actions dropdown will automatically populate." />
<A.Footer @hasDivider={{true}} as |F|>
<F.Link::Standalone @icon="docs-link" @text="Learn more about Actions" @href="https://developer.hashicorp.com/nomad/docs/job-specification/action" @iconPosition="trailing" />
<F.LinkStandalone @icon="docs-link" @text="Learn more about Actions" @href="https://developer.hashicorp.com/nomad/docs/job-specification/action" @iconPosition="trailing" />
</A.Footer>
</Hds::ApplicationState>
{{/each}}

View File

@@ -53,27 +53,27 @@
<Hds::Form::Radio::Group @layout="horizontal" @name="method-demo1" {{on "change" this.updatePolicyEnforcementLevel}} as |G|>
<G.Legend>Enforcement Level</G.Legend>
<G.HelperText>See <Hds::Link::Inline @href="https://developer.hashicorp.com/nomad/tutorials/access-control/access-control-tokens#token-types">Sentinel Policy documentation</Hds::Link::Inline> for more information.</G.HelperText>
<G.Radio::Field
<G.RadioField
@id="advisory"
checked={{eq @policy.enforcementLevel "advisory"}}
data-test-token-type="client"
as |F|>
<F.Label>Advisory</F.Label>
</G.Radio::Field>
<G.Radio::Field
</G.RadioField>
<G.RadioField
@id="soft-mandatory"
checked={{eq @policy.enforcementLevel "soft-mandatory"}}
data-test-token-type="soft-mandatory"
as |F|>
<F.Label>Soft Mandatory</F.Label>
</G.Radio::Field>
<G.Radio::Field
</G.RadioField>
<G.RadioField
@id="hard-mandatory"
checked={{eq @policy.enforcementLevel "hard-mandatory"}}
data-test-token-type="hard-mandatory"
as |F|>
<F.Label>Hard Mandatory</F.Label>
</G.Radio::Field>
</G.RadioField>
</Hds::Form::Radio::Group>
</div>

View File

@@ -25,37 +25,37 @@
{{!-- Radio to select between 1, 4, 8, 24, or never --}}
<Hds::Form::Radio::Group @layout="horizontal" @name="expiration-time" {{on "change" this.updateTokenExpirationTTL}} as |G|>
<G.Radio::Field
<G.RadioField
@id="10m"
@value="10m"
as |F|>
<F.Label>10 minutes</F.Label>
</G.Radio::Field>
<G.Radio::Field
</G.RadioField>
<G.RadioField
@id="8h"
@value="8h"
as |F|>
<F.Label>8 hours</F.Label>
</G.Radio::Field>
<G.Radio::Field
</G.RadioField>
<G.RadioField
@id="24h"
@value="24h"
as |F|>
<F.Label>24 hours</F.Label>
</G.Radio::Field>
<G.Radio::Field
</G.RadioField>
<G.RadioField
@id="never"
@value="never"
checked={{eq @token.expirationTTL "never"}}
as |F|>
<F.Label>Never</F.Label>
</G.Radio::Field>
<G.Radio::Field
</G.RadioField>
<G.RadioField
@id="custom"
@value="custom"
as |F|>
<F.Label>Custom</F.Label>
</G.Radio::Field>
</G.RadioField>
</Hds::Form::Radio::Group>
{{#if @token.expirationTime}}
@@ -99,20 +99,20 @@
<Hds::Form::Radio::Group @layout="horizontal" @name="method-demo1" {{on "change" this.updateTokenType}} as |G|>
<G.Legend>Client or Management token?</G.Legend>
<G.HelperText>See <Hds::Link::Inline @href="https://developer.hashicorp.com/nomad/tutorials/access-control/access-control-tokens#token-types">Token types documentation</Hds::Link::Inline> for more information.</G.HelperText>
<G.Radio::Field
<G.RadioField
@id="client"
checked={{eq @token.type "client"}}
data-test-token-type="client"
as |F|>
<F.Label>Client</F.Label>
</G.Radio::Field>
<G.Radio::Field
</G.RadioField>
<G.RadioField
@id="management"
checked={{eq @token.type "management"}}
data-test-token-type="management"
as |F|>
<F.Label>Management</F.Label>
</G.Radio::Field>
</G.RadioField>
</Hds::Form::Radio::Group>
</div>
@@ -236,4 +236,4 @@
/>
{{/if}}
</footer>
</form>
</form>

View File

@@ -61,4 +61,4 @@
{{/if}}
</div>
</section>
{{outlet}}
{{outlet}}

View File

@@ -319,7 +319,7 @@
/>
{{/if}}
</A.Body>
<A.Footer @hasDivider={{true}}>
<A.Footer @hasDivider={{true}} as |F|>
<Hds::Button
@text="Reset Filters"
@color="tertiary"
@@ -328,10 +328,9 @@
{{on "click" (action this.resetFilters)}}
/>
{{!-- TODO: HDS4.0, convert to F.LinkStandalone --}}
<Hds::Link::Standalone @icon="docs" @text="Learn more about Filter Expressions" @href="https://developer.hashicorp.com/nomad/api-docs#creating-expressions" @iconPosition="trailing" />
<F.LinkStandalone @icon="docs" @text="Learn more about Filter Expressions" @href="https://developer.hashicorp.com/nomad/api-docs#creating-expressions" @iconPosition="trailing" />
<Hds::Link::Standalone @icon="plus" @text="Run a New Job" @route="jobs.run"
<F.LinkStandalone @icon="plus" @text="Run a New Job" @route="jobs.run"
@iconPosition="trailing" />
</A.Footer>
@@ -340,9 +339,8 @@
<A.Body
@text="No jobs found."
/>
<A.Footer @hasDivider={{true}}>
{{!-- TODO: HDS4.0, convert to F.LinkStandalone --}}
<Hds::Link::Standalone @icon="plus" @text="Run a New Job" @route="jobs.run"
<A.Footer @hasDivider={{true}} as |F|>
<F.LinkStandalone @icon="plus" @text="Run a New Job" @route="jobs.run"
@iconPosition="trailing" />
</A.Footer>
{{/if}}

View File

@@ -55,7 +55,7 @@
</li>
</ul>
</A.Description>
<A.Link::Standalone @color="secondary" @icon="arrow-right" @iconPosition="trailing" @text="Learn more about Nomad Variables" @href="https://developer.hashicorp.com/nomad/tutorials/variables" />
<A.LinkStandalone @color="secondary" @icon="arrow-right" @iconPosition="trailing" @text="Learn more about Nomad Variables" @href="https://developer.hashicorp.com/nomad/tutorials/variables" />
</Hds::Alert>
</header>

View File

@@ -11,7 +11,7 @@
<A.Generic>
<Hds::Separator/>
<Hds::Form::Toggle::Group as |G|>
<G.Toggle::Field
<G.ToggleField
name="word-wrap"
@id="word-wrap"
checked={{this.wordWrap}}
@@ -19,8 +19,8 @@
as |F|>
<F.Label>Word Wrap</F.Label>
<F.HelperText>Wrap lines of text in logs and exec terminals in the UI</F.HelperText>
</G.Toggle::Field>
<G.Toggle::Field
</G.ToggleField>
<G.ToggleField
name="jostle"
@id="jostle"
checked={{this.liveUpdateJobsIndex}}
@@ -28,7 +28,7 @@
as |F|>
<F.Label>Live Updates to <LinkTo @route="jobs.index">Jobs Index</LinkTo></F.Label>
<F.HelperText>When enabled, new or removed jobs will pop into and out of view on your jobs page. When disabled, you will be notified that changes are pending.</F.HelperText>
</G.Toggle::Field>
</G.ToggleField>
</Hds::Form::Toggle::Group>
</A.Generic>
</Hds::Alert>

View File

@@ -40,6 +40,8 @@ module.exports = function (defaults) {
precision: 4,
includePaths: [
'./node_modules/@hashicorp/design-system-tokens/dist/products/css',
'./node_modules/@hashicorp/ember-flight-icons/dist/styles',
'./node_modules/@hashicorp/design-system-components/dist/styles',
],
},
});

View File

@@ -103,7 +103,7 @@
"ember-on-resize-modifier": "^1.0.0",
"ember-overridable-computed": "^1.0.0",
"ember-page-title": "^7.0.0",
"ember-power-select": "^4.1.7",
"ember-power-select": "^7.2.0",
"ember-qunit": "^5.1.5",
"ember-render-helpers": "^0.2.0",
"ember-resolver": "^8.0.3",
@@ -168,8 +168,8 @@
},
"dependencies": {
"@babel/helper-string-parser": "^7.19.4",
"@hashicorp/design-system-components": "^3.6.0",
"@hashicorp/ember-flight-icons": "^4.0.4",
"@hashicorp/design-system-components": "^4.3.0",
"@hashicorp/ember-flight-icons": "^5.0.2",
"@percy/cli": "^1.6.1",
"@percy/ember": "^3.0.0",
"curved-arrows": "^0.1.0",
@@ -183,7 +183,6 @@
},
"resolutions": {
"ember-auto-import": "^2.4.0",
"ember-element-helper": "0.6.0",
"prop-types": "^15.8.1"
}
}

File diff suppressed because it is too large Load Diff