-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
button to restart upstream services from status menu (#689)
* button to restart upstream services from status menu
- Loading branch information
1 parent
e7fd76c
commit 5f21920
Showing
11 changed files
with
132 additions
and
40 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
FROM ghcr.io/samvera/hyku/base:d6ef0431 as hyku-base | ||
FROM ghcr.io/samvera/hyku/base:d6ef0431 AS hyku-base | ||
# The bunder and asset build are ONBUILD commands in the base. they still get run | ||
# as if they were included right after the from line. See https://docs.docker.com/engine/reference/builder/#onbuild | ||
RUN sed -i '/require .enumerator./d' /usr/local/bundle/gems/sass-3.7.4/lib/sass/util.rb | ||
RUN ln -sf /app/samvera/branding /app/samvera/hyrax-webapp/public/branding | ||
# Set environment variables for kubectl installation | ||
ENV KUBECTL_VERSION=v1.27.3 | ||
USER root | ||
# Determine the architecture and set the download URL accordingly | ||
RUN ARCH=$(uname -m) && \ | ||
if [ "$ARCH" = "x86_64" ]; then \ | ||
ARCH="amd64"; \ | ||
elif [ "$ARCH" = "aarch64" ]; then \ | ||
ARCH="arm64"; \ | ||
elif [ "$ARCH" = "armv7l" ]; then \ | ||
ARCH="arm"; \ | ||
else \ | ||
echo "Unsupported architecture: $ARCH"; exit 1; \ | ||
fi && \ | ||
curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl" && \ | ||
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \ | ||
rm kubectl | ||
USER app | ||
|
||
FROM hyku-base as hyku-worker | ||
FROM hyku-base AS hyku-worker | ||
CMD ./bin/worker |
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 |
---|---|---|
@@ -1 +1,20 @@ | ||
<li class="list-group-item list-group-item-<%= status ? 'success' : 'danger' %>"><%= name %> <span class="badge"><%= status ? t(:'.ok') : t(:'.down') %></span></li> | ||
<li class="list-group-item list-group-item-<%= status ? 'success' : 'danger' %>"> | ||
<div class="row"> | ||
<div class="col-xs-10"> | ||
<%= name %> | ||
</div> | ||
<div class="col-xs-1 text-right"> | ||
<span class="badge"> | ||
<%= status ? t(:'.ok') : t(:'.down') %> | ||
</span> | ||
</div> | ||
<div class="col-xs-1 text-right"> | ||
<% if endpoint && endpoint.restart_command.present? %> | ||
<% disabled = endpoint.last_restart > 5.minutes.ago %> | ||
<%= button_to t('.restart'), status_path(id: endpoint.id), disabled: disabled, method: :patch, class: 'btn btn-danger btn-xs', title: disabled ? t('.five_minutes') : t('.restart_label') %> | ||
<% else %> | ||
<%= button_to t('.restart'), '/', disabled: true, class: 'btn btn-danger btn-xs', title: t('.no_command') %> | ||
<% end %> | ||
</div> | ||
</div> | ||
</li> |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
<% content_for :page_header do %> | ||
<h1><span class="fa fa-flag"></span> <%= t(:'hyrax.admin.sidebar.system_status') %></h1> | ||
<% end %> | ||
|
||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h3 class="panel-title"><%= t(:'.services') %></h3> | ||
</div> | ||
<div class="panel-body"> | ||
<ul class="list-group"> | ||
<%= render partial: 'service', locals: { name: 'Fedora', status: current_account.fcrepo_endpoint.ping, endpoint: current_account.fcrepo_endpoint } %> | ||
<%= render partial: 'service', locals: { name: 'Solr', status: current_account.solr_endpoint.ping, endpoint: current_account.solr_endpoint } %> | ||
<%= render partial: 'service', locals: { name: 'Redis', status: current_account.redis_endpoint.ping, endpoint: current_account.redis_endpoint } %> | ||
<%= render partial: 'service', locals: { name: 'Database', status: ActiveRecord::Base.connection.active?, endpoint: nil } %> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
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,6 @@ | ||
class RestartForEndpoints < ActiveRecord::Migration[5.2] | ||
def change | ||
add_column :endpoints, :restart_command, :text | ||
add_column :endpoints, :last_restart, :datetime, default: Time.now | ||
end | ||
end |
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