Skip to content

Commit

Permalink
<EmberTable> (#1046)
Browse files Browse the repository at this point in the history
  • Loading branch information
nummi authored and RobbieTheWagner committed Oct 2, 2019
1 parent 1044293 commit da9dd1e
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 73 deletions.
29 changes: 16 additions & 13 deletions app/templates/container-type.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{{#ember-table as |t|}}
{{t.head columns=columns enableReorder=false}}
{{#t.body
rows=rows
<EmberTable as |t|>
<t.head
@columns={{columns}}
@enableReorder={{false}}
/>
<t.body
@rows={{rows}}
as |b|
}}
{{#b.row
class=(concat "js-container-instance-list-item" (if (mod b.rowMeta.index 2) " striped"))
>
<b.row
class={{concat "js-container-instance-list-item" (if (mod b.rowMeta.index 2) " striped")}}
as |r|
}}
{{#r.cell as |value|}}
>
<r.cell as |value|>
{{#if value.inspectable}}
<div
class="is-link js-instance-name"
Expand All @@ -19,7 +22,7 @@
{{else}}
<span class="js-instance-name">{{value.name}}</span>
{{/if}}
{{/r.cell}}
{{/b.row}}
{{/t.body}}
{{/ember-table}}
</r.cell>
</b.row>
</t.body>
</EmberTable>
35 changes: 16 additions & 19 deletions app/templates/libraries.hbs
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
{{#ember-table as |t|}}
{{t.head
columns=(schema-for "info-list")
enableReorder=false
}}
<EmberTable as |t|>
<t.head
@columns={{schema-for "info-list"}}
@enableReorder={{false}}
/>

{{#t.body
rows=rows
as |b|
}}
{{#b.row
class=(concat "js-library-row" (if (mod b.rowMeta.index 2) " striped"))
<t.body @rows={{rows}} as |b|>
<b.row
class={{concat "js-library-row" (if (mod b.rowMeta.index 2) " striped")}}
as |r|
}}
{{#r.cell
class=(concat "js-lib-" r.columnValue.valuePath)
>
<r.cell
class={{concat "js-lib-" r.columnValue.valuePath}}
as |value|
}}
>
{{value}}
{{/r.cell}}
{{/b.row}}
{{/t.body}}
{{/ember-table}}
</r.cell>
</b.row>
</t.body>
</EmberTable>
48 changes: 24 additions & 24 deletions app/templates/records.hbs
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{{#ember-table as |t|}}
{{#t.head
columns=this.columns
sorts=sorts
onUpdateSorts=(action (mut sorts))
<EmberTable as |t|>
<t.head
@columns={{this.columns}}
@sorts={{sorts}}
@onUpdateSorts={{action (mut sorts)}}
as |h|
}}
{{#h.row as |r|}}
{{r.cell data-test-table-header-column=""}}
{{/h.row}}
{{/t.head}}
{{#t.body
rows=this.filteredRecords
checkboxSelectionMode="none"
selection=this.selection
onSelect=this.inspectModel
>
<h.row as |r|>
<r.cell data-test-table-header-column="" />
</h.row>
</t.head>
<t.body
@rows={{this.filteredRecords}}
@checkboxSelectionMode="none"
@selection={{this.selection}}
@onSelect={{this.inspectModel}}
as |b|
}}
{{#b.row
class=(if (mod b.rowMeta.index 2) "striped")
>
<b.row
class={{if (mod b.rowMeta.index 2) "striped"}}
data-test-table-row=""
as |r|
}}
{{#r.cell data-test-table-cell="" as |value column row|}}
>
<r.cell data-test-table-cell="" as |value column row|>
<span class={{row.color}}>
{{value}}
</span>
{{/r.cell}}
{{/b.row}}
{{/t.body}}
{{/ember-table}}
</r.cell>
</b.row>
</t.body>
</EmberTable>
34 changes: 17 additions & 17 deletions app/templates/route-tree.hbs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{{#ember-table as |t|}}
{{t.head
columns=(schema-for "route-tree")
enableReorder=false
}}
<EmberTable as |t|>
<t.head
@columns={{schema-for "route-tree"}}
@enableReorder={{false}}
/>

{{#t.body
rows=this.rows
checkboxSelectionMode="none"
<t.body
@rows={{this.rows}}
@checkboxSelectionMode="none"
as |b|
}}
{{#b.row
class=(concat "list__row js-route-tree-item" (if (mod b.rowMeta.index 2) " striped"))
>
<b.row
class={{concat "list__row js-route-tree-item" (if (mod b.rowMeta.index 2) " striped")}}
as |r|
}}
{{#r.cell as |route|}}
>
<r.cell as |route|>
{{#let (component (concat "route-cell-" r.columnValue.valuePath)) as |Cell|}}
<Cell
@route={{route}}
Expand All @@ -24,7 +24,7 @@
@sendRouteHandlerToConsole={{this.sendRouteHandlerToConsole}}
/>
{{/let}}
{{/r.cell}}
{{/b.row}}
{{/t.body}}
{{/ember-table}}
</r.cell>
</b.row>
</t.body>
</EmberTable>

0 comments on commit da9dd1e

Please sign in to comment.