Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Fine-tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
gregone committed Jan 12, 2022
1 parent f256492 commit e6b2d60
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
20 changes: 10 additions & 10 deletions ui/app/components/resources-table-extended.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@

<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Age</th>
<th>Status</th>
<th>Provisioned by</th>
<th>{{t "page.resources.table.headings.name"}}</th>
<th>{{t "page.resources.table.headings.type"}}</th>
<th>{{t "page.resources.table.headings.age"}}</th>
<th>{{t "page.resources.table.headings.status"}}</th>
<th>{{t "page.resources.table.headings.provisioned-by"}}</th>
</tr>
</thead>

<tbody>
{{#each @resources key="id" as |resourceObject|}}
{{#with resourceObject.resource as |resource|}}
{{#each @resources key="resource.id" as |resourceObject|}}
{{#let resourceObject.resource as |resource|}}
<tr>
<th scope="row">
<LinkTo
Expand All @@ -44,7 +44,7 @@
@route="workspace.projects.project.app.deployment.deployment-seq"
@models={{array resourceObject.source.sequence}}
>
Deployment <b class="badge badge--version">v{{resourceObject.source.sequence}}</b>
{{t "page.resources.table.deployment"}} <b class="badge badge--version">v{{resourceObject.source.sequence}}</b>
</LinkTo>
{{/if}}
{{#if (eq resourceObject.type 'release')}}
Expand All @@ -53,12 +53,12 @@
@route="workspace.projects.project.app.release-id"
@models={{array resourceObject.source.sequence}}
>
Release <b class="badge badge--version">v{{resourceObject.source.sequence}}</b>
{{t "page.resources.table.release"}}<b class="badge badge--version">v{{resourceObject.source.sequence}}</b>
</LinkTo>
{{/if}}
</td>
</tr>
{{/with}}
{{/let}}
{{/each}}
</tbody>
</Table>
8 changes: 4 additions & 4 deletions ui/app/components/resources-table.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Age</th>
<th>Status</th>
<th>{{t "page.resources.table.headings.name"}}</th>
<th>{{t "page.resources.table.headings.type"}}</th>
<th>{{t "page.resources.table.headings.age"}}</th>
<th>{{t "page.resources.table.headings.status"}}</th>
</tr>
</thead>

Expand Down
2 changes: 1 addition & 1 deletion ui/app/routes/workspace/projects/project/app/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Model as AppRouteModel } from '../app';
import Route from '@ember/routing/route';
import { StatusReport } from 'waypoint-pb';

type Model = AppRouteModel['deployments'];
type Model = ResourceMap[];

interface ResourceMap {
resource: StatusReport.Resource.AsObject;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{#if @model.length}}
<ResourcesTableExtended
@resources={{@model}}
>
</ResourcesTableExtended>
/>
{{else}}
<EmptyState>
<p>{{t 'page.resources.table.empty-state.line-1'}}</p>
Expand Down
9 changes: 8 additions & 1 deletion ui/translations/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,18 @@ page:
line-3: 'from the CLI'
resources:
table:
headings:
name: 'Name'
type: 'Type'
age: 'Age'
status: 'Status'
provisioned-by: 'Provisioned by'
empty-state:
line-1: 'There are no resources to display for this app yet'
line-2: 'To create your first release, you can run'
line-3: 'from the CLI'
release:
release: 'Release'
deployment: 'Deployment'
title: 'Release'
resources:
heading: Resources
Expand Down

0 comments on commit e6b2d60

Please sign in to comment.