-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add catalog to web console #1389
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,32 @@ | ||
'use strict'; | ||
|
||
angular.module('openshiftConsole') | ||
.controller('LandingPageController', | ||
function($scope, | ||
AuthService, | ||
Constants, | ||
DataService, | ||
Navigate) { | ||
$scope.saasOfferings = Constants.SAAS_OFFERINGS; | ||
|
||
$scope.navToProject = function(project) { | ||
Navigate.toProjectOverview(project.metadata.name); | ||
}; | ||
|
||
$scope.navToProjectList = function() { | ||
Navigate.toProjectList(); | ||
}; | ||
|
||
AuthService.withUser().then(function() { | ||
DataService.list({ | ||
group: 'servicecatalog.k8s.io', | ||
resource: 'serviceclasses' | ||
}, $scope).then(function(resp) { | ||
$scope.serviceClasses = resp.by('metadata.name'); | ||
}); | ||
|
||
DataService.list('imagestreams', { namespace: 'openshift' }).then(function(resp) { | ||
$scope.imageStreams = resp.by('metadata.name'); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
|
@@ -70,6 +70,10 @@ angular.module("openshiftConsole") | |
return "project/" + encodeURIComponent(projectName) + "/overview"; | ||
}, | ||
|
||
toProjectList: function(){ | ||
$location.path('projects'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should always work whether catalog is turned on or not, maybe we should add a redirect from projects to / when the landing page isn't enabled There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
}, | ||
|
||
quotaURL: function(projectName) { | ||
return "project/" + encodeURIComponent(projectName) + "/quota"; | ||
}, | ||
|
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,29 @@ | ||
@landing-side-bar-top-offset: @navbar-os-header-height-desktop; | ||
@landing-side-bar-width-lg: 425px; | ||
@landing-side-bar-width-md: 375px; | ||
@landing-side-bar-width-sm: 325px; | ||
|
||
.console-os .wrap.no-sidebar .middle.landing-page { | ||
background: @panel-shaded; | ||
flex: none; | ||
h1, .nav-tabs { | ||
margin-bottom: 0; | ||
} | ||
@media(min-width: @screen-sm-min){ | ||
overflow-y: auto; | ||
width: calc(100% ~"-" @landing-side-bar-width-sm); | ||
} | ||
@media(min-width: @screen-md-min) { | ||
width: calc(100% ~"-" @landing-side-bar-width-md); | ||
} | ||
|
||
@media(min-width: @screen-lg-min) { | ||
width: calc(100% ~"-" @landing-side-bar-width-lg); | ||
} | ||
} | ||
|
||
@media(min-width: @screen-sm-min) { | ||
.landing-side-bar { | ||
top: @landing-side-bar-top-offset; | ||
} | ||
} |
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,28 @@ | ||
<default-header class="top-header"></default-header> | ||
<div class="wrap no-sidebar"> | ||
<div class="sidebar-left collapse navbar-collapse navbar-collapse-2"> | ||
<navbar-utility-mobile></navbar-utility-mobile> | ||
</div> | ||
<div class="middle landing-page"> | ||
<!-- Middle section --> | ||
<div class="middle-section"> | ||
<div class="middle-container"> | ||
<div class="middle-content"> | ||
<landing-page service-classes="serviceClasses" image-streams="imageStreams"> | ||
<landingheader> | ||
<div class="build-applications-view"> | ||
<saas-list saas-offerings="saasOfferings"></saas-list> | ||
</div> | ||
</landingheader> | ||
<landingbody> | ||
<services-view base-project-url="project" service-classes="serviceClasses" image-streams="imageStreams"></services-view> | ||
</landingbody> | ||
<landingside> | ||
<projects-summary base-project-url="project" projects-url="projects"></projects-summary> | ||
</landingside> | ||
</landing-page> | ||
</div><!-- /middle-content --> | ||
</div><!-- /middle-container --> | ||
</div><!-- /middle-section --> | ||
</div><!-- /middle --> | ||
</div><!-- /wrap --> |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Might want to use home.html rather than landing-page.html just for the look of the URL to users.
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.
The url should just be
/console
. Although maybe I shouldn't name the controller the same as the componentThere 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.
sorry, read it wrong.
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.
users should never see this URL, our templates are embedded into $templateCache at build time