Remove description-item component
This commit is contained in:
parent
a2309bb624
commit
4572270442
3 changed files with 19 additions and 55 deletions
|
|
@ -1,10 +0,0 @@
|
|||
<div class='py-5 sm:grid sm:grid-cols-3 sm:gap-4'>
|
||||
<dt>{{@title}}</dt>
|
||||
<dd class='sm:col-span-2'>
|
||||
{{#if (has-block)}}
|
||||
{{yield}}
|
||||
{{else}}
|
||||
{{@value}}
|
||||
{{/if}}
|
||||
</dd>
|
||||
</div>
|
||||
|
|
@ -1,21 +1,21 @@
|
|||
<Headers::H2 @title='Info' />
|
||||
|
||||
<dl>
|
||||
<DescriptionItem
|
||||
@title='Number of documents'
|
||||
@value={{@model.stats.numberOfDocuments}}
|
||||
/>
|
||||
<DescriptionItem @title='Is indexing' @value={{@model.stats.isIndexing}} />
|
||||
<DescriptionItem @title='Field distribution'>
|
||||
<RoyalTable
|
||||
@data={{obj-to-array @model.stats.fieldDistribution}}
|
||||
class='w-full'
|
||||
as |Row|
|
||||
>
|
||||
<Row as |Column|>
|
||||
<Column @name='Field' @prop='key' />
|
||||
<Column @name='Count' @prop='value' />
|
||||
</Row>
|
||||
</RoyalTable>
|
||||
</DescriptionItem>
|
||||
</dl>
|
||||
<Form::Element
|
||||
@label='Number of documents'
|
||||
@value={{@model.stats.numberOfDocuments}}
|
||||
/>
|
||||
|
||||
<Form::Element @label='Is indexing' @value={{@model.stats.isIndexing}} />
|
||||
|
||||
<Form::Element @label='Field distribution'>
|
||||
<RoyalTable
|
||||
@data={{obj-to-array @model.stats.fieldDistribution}}
|
||||
class='w-full'
|
||||
as |Row|
|
||||
>
|
||||
<Row as |Column|>
|
||||
<Column @name='Field' @prop='key' />
|
||||
<Column @name='Count' @prop='value' />
|
||||
</Row>
|
||||
</RoyalTable>
|
||||
</Form::Element>
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'meiliadmin/tests/helpers';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | description-item', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
|
||||
await render(hbs`<DescriptionItem />`);
|
||||
|
||||
assert.dom(this.element).hasText('');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<DescriptionItem>
|
||||
template block text
|
||||
</DescriptionItem>
|
||||
`);
|
||||
|
||||
assert.dom(this.element).hasText('template block text');
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue