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

catalog fix #2

Merged
merged 3 commits into from
Dec 16, 2017
Merged

catalog fix #2

merged 3 commits into from
Dec 16, 2017

Conversation

StrongMonkey
Copy link
Contributor

No description provided.

@@ -31,6 +31,7 @@ func Schemas(ctx context.Context, management *config.ManagementContext, schemas
Templates(schemas)
ClusterRegistrationTokens(schemas)
addUserAction(schemas)
addCatalogRefreshAction(schemas)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer these two methods to be Users(schemas) and Catalogs(schemas) to match the style above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

catalogName := strings.Split(resource.ID, "-")[0]
// idk why current returns a url start with http:/ instead of http://
// but this link is hacky
resource.Links["catalog"] = strings.Replace(path.Join(path.Dir(apiContext.URLBuilder.Current()), "catalogs", catalogName), "http:/", "http://", 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My eyes.... my poor eyes are bleeding. Add a method to URLBuilder for ResourceLinkByID(schema *Schema, id string)

Daishan Peng added 2 commits December 16, 2017 01:19
Fixed link to catalog, versionLinks, category, refreshAction and hiding versions from templates
@StrongMonkey
Copy link
Contributor Author

rancher/norman#20
rancher/types#72
rancher/catalog-controller#1
related pr. Don't merge until dep PRs are merged.

@StrongMonkey StrongMonkey changed the title wip: catalog fix catalog fix Dec 16, 2017
@ibuildthecloud ibuildthecloud merged commit 6cc50b2 into rancher:master Dec 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants