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

Making placement of actions menu consistent across pages #1130

Merged
merged 1 commit into from
Jan 17, 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
19 changes: 12 additions & 7 deletions app/styles/_typography.less
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@
}
}

h1 small.meta,
.build-config-summary .meta,
.deployment-config-summary .meta {
font-size: 12px;
@media (max-width: @screen-xs-min) {
display: block;
margin-top: 5px;
h1 {
&.contains-actions {
.word-break();
}
small.meta,
.build-config-summary .meta,
.deployment-config-summary .meta {
font-size: 12px;
@media (max-width: @screen-xs-min) {
display: block;
margin-top: 5px;
}
}
}

Expand Down
15 changes: 7 additions & 8 deletions app/views/browse/build-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@
<div class="container-fluid">
<breadcrumbs breadcrumbs="breadcrumbs"></breadcrumbs>
<alerts alerts="alerts"></alerts>
<h1>
{{buildConfigName}}
<span class="pficon pficon-warning-triangle-o"
ng-if="buildConfigPaused || buildConfigDeleted"
aria-hidden="true"
data-toggle="tooltip"
data-original-title="{{buildConfigDeleted ? 'This build configuration no longer exists' : 'Building from build configuration ' + buildConfig.metadata.name + ' has been paused.'}}">
</span>
<h1 class="contains-actions">
<div class="pull-right dropdown" ng-if="buildConfig" ng-hide="!('buildConfigs' | canIDoAny)">
<!-- Primary Actions -->
<button
Expand Down Expand Up @@ -64,6 +57,12 @@ <h1>
</li>
</ul>
</div>
{{buildConfigName}}
<span class="pficon pficon-warning-triangle-o"
aria-hidden="true"
data-toggle="tooltip"
data-original-title="{{buildConfigDeleted ? 'This build configuration no longer exists' : 'Building from build configuration ' + buildConfig.metadata.name + ' has been paused.'}}">
</span>
<small class="meta" ng-if="buildConfig">created <span am-time-ago="buildConfig.metadata.creationTimestamp"></span></small>
</h1>
<labels labels="buildConfig.metadata.labels" clickable="true" kind="builds" title-kind="build configs" project-name="{{buildConfig.metadata.namespace}}" limit="3"></labels>
Expand Down
18 changes: 9 additions & 9 deletions app/views/browse/build.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@
<alerts alerts="alerts"></alerts>
<div ng-if="!loaded" class="mar-top-xl">Loading...</div>
<div ng-if="build">
<h1>
{{build.metadata.name}}
<span class="pficon pficon-warning-triangle-o"
ng-if="buildConfigPaused || buildConfigDeleted"
aria-hidden="true"
data-toggle="tooltip"
data-original-title="{{buildConfigDeleted ? 'The build configuration for this build no longer exists.' : 'Building from build configuration ' + buildConfig.metadata.name + ' has been paused.'}}">
</span>
<small class="meta">created <span am-time-ago="build.metadata.creationTimestamp"></span></small>
<h1 class="contains-actions">
<div class="pull-right dropdown" ng-hide="!('builds' | canIDoAny)">
<!-- Primary Actions -->
<button class="btn btn-default hidden-xs"
Expand Down Expand Up @@ -78,6 +70,14 @@ <h1>
</li>
</ul>
</div>
{{build.metadata.name}}
<span class="pficon pficon-warning-triangle-o"
ng-if="buildConfigPaused || buildConfigDeleted"
aria-hidden="true"
data-toggle="tooltip"
data-original-title="{{buildConfigDeleted ? 'The build configuration for this build no longer exists.' : 'Building from build configuration ' + buildConfig.metadata.name + ' has been paused.'}}">
</span>
<small class="meta">created <span am-time-ago="build.metadata.creationTimestamp"></span></small>
</h1>
<labels ng-if="buildConfigName" labels="build.metadata.labels" clickable="true" kind="builds" title-kind="builds for build config {{buildConfigName}}" project-name="{{build.metadata.namespace}}" limit="3" navigate-url="project/{{build.metadata.namespace}}/browse/builds/{{buildConfigName}}"></labels>
<labels ng-if="!buildConfigName" labels="build.metadata.labels" limit="3"></labels>
Expand Down
2 changes: 1 addition & 1 deletion app/views/browse/config-map.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>The config map could not be loaded.</h2>
<p>{{error | getErrorDetails}}</p>
</div>
<div ng-if="loaded && !error">
<h1>
<h1 class="contains-actions">
<div class="pull-right dropdown" ng-if="'configmaps' | canIDoAny">
<button type="button" class="dropdown-toggle btn btn-default actions-dropdown-btn hidden-xs" data-toggle="dropdown">
Actions
Expand Down
5 changes: 2 additions & 3 deletions app/views/browse/deployment-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
<breadcrumbs breadcrumbs="breadcrumbs"></breadcrumbs>
<alerts alerts="alerts"></alerts>
<div>
<h1>
{{deploymentConfigName}}

<h1 class="contains-actions">
<div class="pull-right dropdown" ng-if="deploymentConfig" ng-hide="!('deploymentConfigs' | canIDoAny)">
<!-- Primary Actions -->
<button
Expand Down Expand Up @@ -84,6 +82,7 @@ <h1>
</li>
</ul>
</div>
{{deploymentConfigName}}
<!-- <span ng-if="deploymentConfig.status.details.message" class="pficon pficon-warning-triangle-o" style="cursor: help;" data-toggle="popover" data-trigger="hover" dynamic-content="{{deploymentConfig.status.details.message}}"></span> -->
<small class="meta" ng-if="deploymentConfig">created <span am-time-ago="deploymentConfig.metadata.creationTimestamp"></span></small>
</h1>
Expand Down
4 changes: 2 additions & 2 deletions app/views/browse/deployment.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
<breadcrumbs breadcrumbs="breadcrumbs"></breadcrumbs>
<alerts alerts="alerts"></alerts>
<div>
<h1>
{{name}}
<h1 class="contains-actions">
<div class="pull-right dropdown" ng-if="deployment" ng-hide="!('deployments' | canIDoAny)">
<button type="button" class="dropdown-toggle btn btn-default actions-dropdown-btn hidden-xs" data-toggle="dropdown">
Actions
Expand Down Expand Up @@ -64,6 +63,7 @@ <h1>
</li>
</ul>
</div>
{{name}}
<small class="meta" ng-if="deployment">created <span am-time-ago="deployment.metadata.creationTimestamp"></span></small>
</h1>
<labels labels="deployment.metadata.labels" clickable="true" kind="deployments" project-name="{{deployment.metadata.namespace}}" limit="3"></labels>
Expand Down
4 changes: 2 additions & 2 deletions app/views/browse/imagestream.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
<alerts alerts="alerts"></alerts>
<div ng-if="!imageStream" class="mar-top-xl">Loading...</div>
<div ng-if="imageStream">
<h1>
{{imageStream.metadata.name}}
<h1 class="contains-actions">
<div class="pull-right dropdown" ng-hide="!('imageStreams' | canIDoAny)">
<button type="button" class="dropdown-toggle btn btn-default actions-dropdown-btn hidden-xs" data-toggle="dropdown">
Actions
Expand All @@ -34,6 +33,7 @@ <h1>
</li>
</ul>
</div>
{{imageStream.metadata.name}}
<small class="meta">created <span am-time-ago="imageStream.metadata.creationTimestamp"></span></small>
</h1>
<labels labels="imageStream.metadata.labels" clickable="true" kind="images" project-name="{{imageStream.metadata.namespace}}" limit="3"></labels>
Expand Down
18 changes: 9 additions & 9 deletions app/views/browse/persistent-volume-claim.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@
<alerts alerts="alerts"></alerts>
<div ng-if="!loaded">Loading...</div>
<div ng-if="pvc">
<h1>
{{pvc.metadata.name}}
<small class="meta" ng-if="!pvc.spec.volumeName">
<span ng-if="pvc.spec.resources.requests['storage']">
waiting for {{pvc.spec.resources.requests['storage'] | usageWithUnits: 'storage'}} allocation,
</span>
<span ng-if="!pvc.spec.resources.requests['storage']">waiting for allocation,</span>
</small>
<small class="meta">created <span am-time-ago="pvc.metadata.creationTimestamp"></span></small>
<h1 class="contains-actions">
<div class="pull-right dropdown" ng-hide="!('persistentVolumeClaims' | canIDoAny)">
<button type="button" class="dropdown-toggle btn btn-default actions-dropdown-btn hidden-xs" data-toggle="dropdown">
Actions
Expand All @@ -42,6 +34,14 @@ <h1>
</li>
</ul>
</div>
{{pvc.metadata.name}}
<small class="meta" ng-if="!pvc.spec.volumeName">
<span ng-if="pvc.spec.resources.requests['storage']">
waiting for {{pvc.spec.resources.requests['storage'] | usageWithUnits: 'storage'}} allocation,
</span>
<span ng-if="!pvc.spec.resources.requests['storage']">waiting for allocation,</span>
</small>
<small class="meta">created <span am-time-ago="pvc.metadata.creationTimestamp"></span></small>
</h1>
<labels labels="pvc.metadata.labels" clickable="true" kind="storage" project-name="{{pvc.metadata.namespace}}" limit="3"></labels>
</div><!-- /deployment -->
Expand Down
5 changes: 2 additions & 3 deletions app/views/browse/pod.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<alerts alerts="alerts"></alerts>
<div ng-if="!loaded" class="mar-top-xl">Loading...</div>
<div ng-if="pod">
<h1>
{{pod.metadata.name}}

<h1 class="contains-actions">
<div class="pull-right dropdown" ng-hide="!('pods' | canIDoAny)">
<button type="button" class="dropdown-toggle actions-dropdown-btn btn btn-default hidden-xs" data-toggle="dropdown">
Actions
Expand All @@ -39,6 +37,7 @@ <h1>
</li>
</ul>
</div>
{{pod.metadata.name}}
<span ng-if="pod | isTroubledPod">
<pod-warnings pod="pod"></pod-warnings>
</span>
Expand Down
17 changes: 8 additions & 9 deletions app/views/browse/replica-set.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
<alerts alerts="alerts"></alerts>
<div ng-if="!loaded" class="mar-top-md">Loading...</div>
<div ng-if="replicaSet">
<h1>
<h1 class="contains-actions">
<!-- Actions -->
<ng-include ng-if="kind === 'ReplicaSet'"
src=" 'views/browse/_replica-set-actions.html' ">
</ng-include>
<ng-include ng-if="kind === 'ReplicationController'"
src=" 'views/browse/_replication-controller-actions.html' ">
</ng-include>
{{replicaSet.metadata.name}}
<span
ng-if="deploymentConfigMissing"
Expand All @@ -23,14 +30,6 @@ <h1>
</span>
<span ng-if="deploymentConfigMissing" class="sr-only">Warning: The deployment's deployment config is missing.</span>
<small class="meta">created <span am-time-ago="replicaSet.metadata.creationTimestamp"></span></small>

<!-- Actions -->
<ng-include ng-if="kind === 'ReplicaSet'"
src=" 'views/browse/_replica-set-actions.html' ">
</ng-include>
<ng-include ng-if="kind === 'ReplicationController'"
src=" 'views/browse/_replication-controller-actions.html' ">
</ng-include>
</h1>
<labels ng-if="deploymentConfigName" labels="replicaSet.metadata.labels" clickable="true" kind="deployments" title-kind="deployments for deployment config {{deploymentConfigName}}" project-name="{{replicaSet.metadata.namespace}}" limit="3" navigate-url="{{replicaSet | configURLForResource}}"></labels>
<labels ng-if="!deploymentConfigName" labels="replicaSet.metadata.labels" clickable="true" kind="deployments" project-name="{{replicaSet.metadata.namespace}}" limit="3"></labels>
Expand Down
14 changes: 7 additions & 7 deletions app/views/browse/route.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@
<alerts alerts="alerts"></alerts>
<div ng-if="!loaded" class="mar-top-xl">Loading...</div>
<div ng-if="route">
<h1>
{{route.metadata.name}}
<route-warnings ng-if="route.spec.to.kind !== 'Service' || services"
route="route"
service="services[route.spec.to.name]">
</route-warnings>
<small class="meta">created <span am-time-ago="route.metadata.creationTimestamp"></span></small>
<h1 class="contains-actions">
<div class="pull-right dropdown" ng-hide="!('routes' | canIDoAny)">
<button type="button" class="dropdown-toggle btn btn-default actions-dropdown-btn hidden-xs" data-toggle="dropdown">
Actions
Expand All @@ -42,6 +36,12 @@ <h1>
</li>
</ul>
</div>
{{route.metadata.name}}
<route-warnings ng-if="route.spec.to.kind !== 'Service' || services"
route="route"
service="services[route.spec.to.name]">
</route-warnings>
<small class="meta">created <span am-time-ago="route.metadata.creationTimestamp"></span></small>
</h1>
<labels labels="route.metadata.labels" clickable="true" kind="routes" project-name="{{route.metadata.namespace}}" limit="3"></labels>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/browse/secret.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<alerts alerts="alerts"></alerts>
<div ng-if="!loaded" class="mar-top-xl">Loading...</div>
<div ng-if="loaded">
<h1>
<h1 class="contains-actions">
<div class="pull-right dropdown" ng-hide="!('secrets' | canIDoAny)">
<button type="button" class="dropdown-toggle btn btn-default actions-dropdown-btn hidden-xs" data-toggle="dropdown">
Actions
Expand Down
4 changes: 2 additions & 2 deletions app/views/browse/service.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
<alerts alerts="alerts"></alerts>
<div ng-if="!loaded" class="mar-top-xl">Loading...</div>
<div ng-if="service">
<h1>
{{service.metadata.name}}
<h1 class="contains-actions">
<div class="pull-right dropdown" ng-hide="!('services' | canIDoAny)">
<button type="button" class="dropdown-toggle btn btn-default actions-dropdown-btn hidden-xs" data-toggle="dropdown">
Actions
Expand All @@ -38,6 +37,7 @@ <h1>
</li>
</ul>
</div>
{{service.metadata.name}}
<small class="meta">created <span am-time-ago="service.metadata.creationTimestamp"></span></small>
</h1>
<labels labels="service.metadata.labels" clickable="true" kind="services" project-name="{{service.metadata.namespace}}" limit="3"></labels>
Expand Down
4 changes: 2 additions & 2 deletions app/views/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<div class="container-fluid">
<breadcrumbs breadcrumbs="breadcrumbs"></breadcrumbs>
<alerts alerts="alerts"></alerts>
<h1>
Project Settings
<h1 class="contains-actions">
<div class="pull-right dropdown" ng-hide="!project || !('projects' | canIDoAny)">
<button type="button" class="dropdown-toggle btn btn-default actions-dropdown-btn hidden-xs" data-toggle="dropdown">
Actions
Expand Down Expand Up @@ -40,6 +39,7 @@ <h1>
</li>
</ul>
</div>
Project Settings
</h1>
</div>
</div><!-- /middle-header-->
Expand Down
Loading