Skip to content
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

Patternfly vertical navigation and project bar #1932

Merged
merged 1 commit into from
Sep 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 33 additions & 11 deletions app/images/logo-origin-thin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 8 additions & 19 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html class="no-js layout-pf-alt layout-pf-alt-fixed">
<html class="no-js layout-pf layout-pf-fixed">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta charset="utf-8">
Expand Down Expand Up @@ -35,29 +35,18 @@
<link rel="stylesheet" type="text/css" href="styles/extensions.css">
<style type="text/css">


</style>
</head>
<body class="console-os">
<body class="console-os" ng-class="{ 'has-project-bar': view.hasProject }">
<!-- Add your site or application content here -->

<p ng-if="globalTechPreviewIndicator" ng-cloak class="tech-preview-banner">Technology preview is enabled</p>
<osc-header></osc-header>
<toast-notifications></toast-notifications>
<notification-drawer-wrapper></notification-drawer-wrapper>

<div ng-view>
<!-- Include default simple nav and shaded background as a placeholder until API discovery finishes -->
<nav class="navbar navbar-pf-alt top-header" role="navigation">
<div row>
<div class="navbar-header">
<a class="navbar-brand" id="openshift-logo" href="./">
<div id="header-logo"></div>
</a>
</div>
</div>
</nav>
<div class="wrap no-sidebar">
<div class="middle surface-shaded">
<div class="middle-section">
<div class="container-pf-nav-pf-vertical" ng-class="{ 'collapsed-nav': nav.collapsed }">
<div ng-view class="view">
<div class="middle">
<div class="middle-content">
<div class="empty-state-message">
<h2 class="text-center" id="temporary-loading-message" style="display: none;">Loading...</h2>
<!-- So that we don't get the Loading... message AND the noscript message -->
Expand Down
28 changes: 21 additions & 7 deletions app/scripts/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,16 @@ angular.extend(window.OPENSHIFT_CONSTANTS, {
label: "Deployments",
href: "/browse/deployments",
prefixes: [
"/add-config-volume",
"/attach-pvc",
"/browse/deployment/",
"/browse/dc/",
"/browse/rs/",
"/browse/rc/"
"/browse/rc/",
"/edit/autoscaler",
"/edit/dc/",
"/edit/health-checks",
"/set-limits"
]
},
{
Expand Down Expand Up @@ -247,7 +253,9 @@ angular.extend(window.OPENSHIFT_CONSTANTS, {
label: "Routes",
href: "/browse/routes",
prefixes: [
"/browse/routes/"
"/browse/routes/",
"/create-route",
"/edit/routes/"
]
}
]
Expand All @@ -265,14 +273,16 @@ angular.extend(window.OPENSHIFT_CONSTANTS, {
href: "/browse/builds",
prefixes: [
"/browse/builds/",
"/browse/builds-noconfig/"
"/browse/builds-noconfig/",
"/edit/builds/"
]
},
{
label: "Pipelines",
href: "/browse/pipelines",
prefixes: [
"/browse/pipelines/"
"/browse/pipelines/",
"/edit/pipelines/"
]
},
{
Expand Down Expand Up @@ -309,14 +319,17 @@ angular.extend(window.OPENSHIFT_CONSTANTS, {
label: "Config Maps",
href: "/browse/config-maps",
prefixes: [
"/browse/config-maps/"
"/browse/config-maps/",
"/create-config-map",
"/edit/config-maps/"
]
},
{
label: "Secrets",
href: "/browse/secrets",
prefixes: [
"/browse/secrets/"
"/browse/secrets/",
"/create-secret"
],
canI: {
resource: 'secrets',
Expand All @@ -336,7 +349,8 @@ angular.extend(window.OPENSHIFT_CONSTANTS, {
iconClass: "pficon pficon-container-node",
href: "/browse/storage",
prefixes: [
"/browse/storage/"
"/browse/storage/",
"/create-pvc"
]
},
{
Expand Down
6 changes: 2 additions & 4 deletions app/scripts/controllers/addConfigVolume.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ angular.module('openshiftConsole')
name: $routeParams.name,
kind: $routeParams.kind,
namespace: $routeParams.project,
subpage: 'Add Config Files',
includeProject: true
subpage: 'Add Config Files'
});

var humanizeKind = $filter('humanizeKind');
Expand Down Expand Up @@ -130,8 +129,7 @@ angular.module('openshiftConsole')
$scope.breadcrumbs = BreadcrumbsService.getBreadcrumbs({
object: object,
project: project,
subpage: 'Add Config Files',
includeProject: true
subpage: 'Add Config Files'
});
},
function(e) {
Expand Down
9 changes: 2 additions & 7 deletions app/scripts/controllers/attachPVC.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,14 @@ angular.module('openshiftConsole')
name: $routeParams.name,
kind: $routeParams.kind,
namespace: $routeParams.project,
subpage: 'Add Storage',
includeProject: true
subpage: 'Add Storage'
});

ProjectsService
.get($routeParams.project)
.then(_.spread(function(project, context) {
$scope.project = project;

// Update project breadcrumb with display name.
$scope.breadcrumbs[0].title = $filter('displayName')(project);

if (!AuthorizationService.canI(resourceGroupVersion, 'update', $routeParams.project)) {
Navigate.toErrorPage('You do not have authority to update ' +
humanizeKind($routeParams.kind) + ' ' + $routeParams.name + '.', 'access_denied');
Expand Down Expand Up @@ -126,8 +122,7 @@ angular.module('openshiftConsole')
$scope.breadcrumbs = BreadcrumbsService.getBreadcrumbs({
object: resource,
project: project,
subpage: 'Add Storage',
includeProject: true
subpage: 'Add Storage'
});
var podTemplate = _.get(resource, 'spec.template');
$scope.existingVolumeNames = StorageService.getVolumeNames(podTemplate);
Expand Down
6 changes: 0 additions & 6 deletions app/scripts/controllers/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ angular.module('openshiftConsole')
$scope.alerts = $scope.alerts || {};

$scope.breadcrumbs = [
{
title: $scope.projectName,
link: "project/" + $scope.projectName
},
{
title: "Add to Project"
}
Expand All @@ -41,8 +37,6 @@ angular.module('openshiftConsole')
.then(_.spread(function(project, context) {
$scope.project = project;
$scope.context = context;
// Update project breadcrumb with display name.
$scope.breadcrumbs[0].title = $filter('displayName')(project);

// List image streams and templates in the both the shared `openshift`
// namespace and the project namespace.
Expand Down
6 changes: 0 additions & 6 deletions app/scripts/controllers/create/browseCategory.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ angular.module('openshiftConsole')
$scope.alerts = $scope.alerts || {};

$scope.breadcrumbs = [
{
title: $scope.projectName,
link: "project/" + $scope.projectName
},
{
title: "Add to Project",
link: "project/" + $scope.projectName + "/create"
Expand All @@ -90,8 +86,6 @@ angular.module('openshiftConsole')
.then(_.spread(function(project, context) {
$scope.project = project;
$scope.context = context;
// Update project breadcrumb with display name.
$scope.breadcrumbs[0].title = $filter('displayName')(project);

// List image streams and templates in the both the shared `openshift`
// namespace and the project namespace.
Expand Down
Loading