diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-03 09:07:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-03 09:07:33 +0000 |
commit | c0d8f9f3f962df6bfcc70440432da55d67307189 (patch) | |
tree | 457666705fbbd4f517d201680113406163829fcc /app/views/projects/environments | |
parent | 2cfa1fc75dd4bd6d1f70d5fee1a824410694f297 (diff) | |
download | gitlab-ce-c0d8f9f3f962df6bfcc70440432da55d67307189.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects/environments')
-rw-r--r-- | app/views/projects/environments/_pin_button.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/environments/show.html.haml | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/app/views/projects/environments/_pin_button.html.haml b/app/views/projects/environments/_pin_button.html.haml new file mode 100644 index 00000000000..5c7bfc2b17b --- /dev/null +++ b/app/views/projects/environments/_pin_button.html.haml @@ -0,0 +1,3 @@ +- if environment.auto_stop_at? && environment.available? + = button_to cancel_auto_stop_project_environment_path(environment.project, environment), class: 'btn btn-secondary has-tooltip', title: _('Prevent environment from auto-stopping') do + = sprite_icon('thumbtack') diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml index 62b1c140794..ff78abfddf4 100644 --- a/app/views/projects/environments/show.html.haml +++ b/app/views/projects/environments/show.html.haml @@ -32,9 +32,14 @@ = button_to stop_project_environment_path(@project, @environment), class: 'btn btn-danger has-tooltip', method: :post do = s_('Environments|Stop environment') -.top-area - %h3.page-title= @environment.name - .nav-controls.ml-auto.my-2 +.top-area.justify-content-between + .d-flex + %h3.page-title= @environment.name + - if @environment.auto_stop_at? + %p.align-self-end.prepend-left-8 + = s_('Environments|Auto stops %{auto_stop_time}').html_safe % {auto_stop_time: time_ago_with_tooltip(@environment.auto_stop_at)} + .nav-controls.my-2 + = render 'projects/environments/pin_button', environment: @environment = render 'projects/environments/terminal_button', environment: @environment = render 'projects/environments/external_url', environment: @environment = render 'projects/environments/metrics_button', environment: @environment |