-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make package lists of origin/name/version work
* Set the `depotUrl` in habitat.conf.js to "http://52.37.151.35:9632" * Go to http://localhost:3000/#/pkgs/chef/discourse * A list of discourse packages in the chef origin should show up * Clicking on the breadcrumbs should work as expected
- Loading branch information
Nathan L Smith
committed
Mar 31, 2016
1 parent
65133b0
commit 2186ffa
Showing
4 changed files
with
69 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import {Component} from "angular2/core"; | ||
import {RouterLink} from "angular2/router"; | ||
|
||
@Component({ | ||
directives: [RouterLink], | ||
inputs: ["ident", "params"], | ||
selector: "package-breadcrumbs", | ||
template: ` | ||
<span class="hab-package-breadcrumbs"> | ||
<span *ngIf="showAll">All Packages</span> | ||
<span *ngIf="params.filter === 'mine'">My Packages</span> | ||
<a *ngIf="!ident.origin && !params.filter && !showAll" [routerLink]="['Packages']">*</a> | ||
<a [routerLink]="['PackagesForOrigin', | ||
{ origin: ident.origin }]"> | ||
{{ident.origin}} | ||
</a> | ||
<span *ngIf="ident.name">/</span> | ||
<a [routerLink]="['PackagesForOriginAndName', | ||
{ origin: ident.origin, | ||
name: ident.name }]"> | ||
{{ident.name}} | ||
</a> | ||
<span *ngIf="ident.version">/</span> | ||
<a [routerLink]="['PackagesForOriginAndNameAndVersion', | ||
{ origin: ident.origin, name: ident.name, | ||
version: ident.version }]"> | ||
{{ident.version}} | ||
</a> | ||
<span *ngIf="ident.release">/</span> | ||
<a [routerLink]="['Package', | ||
{ origin: ident.origin, name: ident.name, | ||
version: ident.version, release: ident.release }]"> | ||
{{ident.release}} | ||
</a> | ||
</span>` | ||
}) | ||
|
||
export class PackageBreadcrumbsComponent { | ||
private ident; | ||
private params; | ||
|
||
constructor() { | ||
this.params = this.params || {}; | ||
} | ||
|
||
get showAll() { | ||
return Object.keys(this.ident).length === 0; | ||
} | ||
} |
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
2186ffa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delivery Status: