-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into namespace-bug
- Loading branch information
Showing
15 changed files
with
190 additions
and
42 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
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
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
File renamed without changes.
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,23 @@ | ||
<!--THIS FILE IS AUTO GENERATED. This file is generated from JSDoc comments in app/components/http-requests-bar-chart-simple.js. To make changes, first edit that file and run "yarn gen-story-md http-requests-bar-chart-simple" to re-generate the content.--> | ||
|
||
## HttpRequestsBarChartSimple | ||
The HttpRequestsBarChartSimple is a simplified version of the HttpRequestsBarChart component. | ||
|
||
**Params** | ||
|
||
| Param | Type | Default | Description | | ||
| --- | --- | --- | --- | | ||
| counters | <code>Array</code> | <code></code> | A list of objects containing the total number of HTTP Requests for each month. `counters` should be the response from the `/internal/counters/requests`. The response is then filtered showing only the 12 most recent months of data. This property is called filteredHttpsRequests. | | ||
|
||
**Example** | ||
|
||
```js | ||
<HttpRequestsBarChartSimple @counters={counters}/> | ||
``` | ||
|
||
**See** | ||
|
||
- [Uses of HttpRequestsBarChartSimple](https://github.com/hashicorp/vault/search?l=Handlebars&q=HttpRequestsBarChartSimple+OR+http-requests-bar-chart-simple) | ||
- [HttpRequestsBarChartSimple Source Code](https://github.com/hashicorp/vault/blob/master/ui/app/components/http-requests-bar-chart-simple.js) | ||
|
||
--- |
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,28 @@ | ||
import hbs from 'htmlbars-inline-precompile'; | ||
import { storiesOf } from '@storybook/ember'; | ||
import { withKnobs, object } from '@storybook/addon-knobs'; | ||
import notes from './http-requests-bar-chart-simple.md'; | ||
|
||
const COUNTERS = [ | ||
{ start_time: '2018-11-01T00:00:00Z', total: 5500 }, | ||
{ start_time: '2018-12-01T00:00:00Z', total: 4500 }, | ||
{ start_time: '2019-01-01T00:00:00Z', total: 5000 }, | ||
{ start_time: '2019-02-01T00:00:00Z', total: 5000 }, | ||
]; | ||
|
||
storiesOf('HttpRequests/BarChart/Simple', module) | ||
.addParameters({ options: { showPanel: true } }) | ||
.addDecorator(withKnobs()) | ||
.add( | ||
`HttpRequestsBarChartSimple`, | ||
() => ({ | ||
template: hbs` | ||
<h5 class="title is-5">Http Requests Bar Chart Simple</h5> | ||
<HttpRequestsBarChartSimple @counters={{counters}}/> | ||
`, | ||
context: { | ||
counters: object('counters', COUNTERS), | ||
}, | ||
}), | ||
{ notes } | ||
); |
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,24 @@ | ||
<!--THIS FILE IS AUTO GENERATED. This file is generated from JSDoc comments in app/components/selectable-card-container.js. To make changes, first edit that file and run "yarn gen-story-md selectable-card-container" to re-generate the content.--> | ||
|
||
## SelectableCardContainer | ||
SelectableCardContainer components are used to hold SelectableCard components. They act as a CSS grid container, and change grid configurations based on the boolean of @gridContainer. | ||
|
||
**Params** | ||
|
||
| Param | Type | Default | Description | | ||
| --- | --- | --- | --- | | ||
| counters | <code>Object</code> | <code></code> | Counters is an object that returns total entities, tokens, and an array of objects with the total https request per month. | | ||
| gridContainer | <code>Boolean</code> | <code>false</code> | gridContainer is optional. If true, it's telling the container it will have a nested CSS grid. | | ||
|
||
**Example** | ||
|
||
```js | ||
<SelectableCardContainer @counters={{model}} @gridContainer="true" /> | ||
``` | ||
|
||
**See** | ||
|
||
- [Uses of SelectableCardContainer](https://github.com/hashicorp/vault/search?l=Handlebars&q=SelectableCardContainer+OR+selectable-card-container) | ||
- [SelectableCardContainer Source Code](https://github.com/hashicorp/vault/blob/master/ui/app/components/selectable-card-container.js) | ||
|
||
--- |
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,34 @@ | ||
import hbs from 'htmlbars-inline-precompile'; | ||
import { storiesOf } from '@storybook/ember'; | ||
import { withKnobs, boolean, object } from '@storybook/addon-knobs'; | ||
import notes from './selectable-card-container.md'; | ||
|
||
const MODEL = { | ||
totalEntities: 0, | ||
httpsRequests: [ | ||
{ start_time: '2018-12-01T00:00:00Z', total: 5500 }, | ||
{ start_time: '2019-01-01T00:00:00Z', total: 4500 }, | ||
{ start_time: '2019-02-01T00:00:00Z', total: 5000 }, | ||
{ start_time: '2019-03-01T00:00:00Z', total: 5000 }, | ||
], | ||
totalTokens: 1, | ||
}; | ||
const GRID_CONTAINER = true; | ||
|
||
storiesOf('SelectableCard/SelectableCardContainer', module) | ||
.addParameters({ options: { showPanel: true } }) | ||
.addDecorator(withKnobs()) | ||
.add( | ||
`SelectableCardContainer`, | ||
() => ({ | ||
template: hbs` | ||
<SelectableCardContainer @counters={{model}} @gridContainer={{gridContainer}} /> | ||
`, | ||
context: { | ||
model: object('model', MODEL), | ||
gridContainer: boolean('gridContainer', GRID_CONTAINER), | ||
}, | ||
}), | ||
{ notes } | ||
); |
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,26 @@ | ||
<!--THIS FILE IS AUTO GENERATED. This file is generated from JSDoc comments in app/components/selectable-card.js. To make changes, first edit that file and run "yarn gen-story-md selectable-card" to re-generate the content.--> | ||
|
||
## SelectableCard | ||
SelectableCard components are card-like components that display a title, total, subtotal, and anything after the yield. | ||
They are designed to be used in containers that act as flexbox or css grid containers. | ||
|
||
**Params** | ||
|
||
| Param | Type | Default | Description | | ||
| --- | --- | --- | --- | | ||
| cardTitle | <code>String</code> | <code></code> | cardTitle displays the card title | | ||
| total | <code>Number</code> | <code>0</code> | the Total number displays like a title, it's the largest text in the component | | ||
| subText | <code>String</code> | <code></code> | subText describes the total | | ||
|
||
**Example** | ||
|
||
```js | ||
<SelectableCard @cardTitle="Tokens" @total={{totalHttpRequests}} @subText="Total"/> | ||
``` | ||
|
||
**See** | ||
|
||
- [Uses of SelectableCard](https://github.com/hashicorp/vault/search?l=Handlebars&q=SelectableCard+OR+selectable-card) | ||
- [SelectableCard Source Code](https://github.com/hashicorp/vault/blob/master/ui/app/components/selectable-card.js) | ||
|
||
--- |
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,27 @@ | ||
import hbs from 'htmlbars-inline-precompile'; | ||
import { storiesOf } from '@storybook/ember'; | ||
import { withKnobs, boolean, number, text } from '@storybook/addon-knobs'; | ||
import notes from './selectable-card.md'; | ||
|
||
const CARD_TITLE = 'Tokens'; | ||
const SUB_TEXT = 'Total'; | ||
const TOTAL_HTTP_REQUESTS = 100; | ||
|
||
storiesOf('SelectableCard/SelectableCard', module) | ||
.addParameters({ options: { showPanel: true } }) | ||
.addDecorator(withKnobs()) | ||
.add( | ||
`SelectableCard`, | ||
() => ({ | ||
template: hbs` | ||
<h5 class="title is-5">Selectable Card</h5> | ||
<SelectableCard @cardTitle={{cardTitle}} @total={{totalHttpRequests}} @subText={{subText}} /> | ||
`, | ||
context: { | ||
cardTitle: text('cardTitle', CARD_TITLE), | ||
totalHttpRequests: number('totalHttpRequests', TOTAL_HTTP_REQUESTS), | ||
subText: text('subText', SUB_TEXT), | ||
}, | ||
}), | ||
{ notes } | ||
); |
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