Skip to content
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
18 changes: 9 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ GEM
rubocop-rspec (~> 3.5)
ruby-progressbar (1.13.0)
securerandom (0.4.1)
servactory (2.16.0.rc1)
servactory (2.16.0.rc3)
activesupport (>= 5.1, < 8.1)
base64 (>= 0.2)
bigdecimal (>= 3.1)
Expand All @@ -279,14 +279,14 @@ GEM
rubocop-rake (>= 0.7)
rubocop-rspec (>= 3.5)
rubocop-rspec_rails (>= 2.31)
sqlite3 (2.7.1-aarch64-linux-gnu)
sqlite3 (2.7.1-aarch64-linux-musl)
sqlite3 (2.7.1-arm-linux-gnu)
sqlite3 (2.7.1-arm-linux-musl)
sqlite3 (2.7.1-arm64-darwin)
sqlite3 (2.7.1-x86_64-darwin)
sqlite3 (2.7.1-x86_64-linux-gnu)
sqlite3 (2.7.1-x86_64-linux-musl)
sqlite3 (2.7.2-aarch64-linux-gnu)
sqlite3 (2.7.2-aarch64-linux-musl)
sqlite3 (2.7.2-arm-linux-gnu)
sqlite3 (2.7.2-arm-linux-musl)
sqlite3 (2.7.2-arm64-darwin)
sqlite3 (2.7.2-x86_64-darwin)
sqlite3 (2.7.2-x86_64-linux-gnu)
sqlite3 (2.7.2-x86_64-linux-musl)
stringio (3.1.7)
thor (1.3.2)
timeout (0.4.3)
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/servactory/web/compiled.css

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions app/views/layouts/servactory/web/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="ru">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Servactory Web Interface">
<title>Servactory</title>
<script src="https://cdn.tailwindcss.com"></script>
<%= csrf_meta_tags %>
Expand All @@ -11,11 +12,9 @@
</head>
<body class="min-h-screen flex flex-col bg-white">
<%= render 'servactory/web/navbar' %>
<main class="flex-1 container mx-auto px-4 py-6">
<div class="max-w-5xl">
<%= yield %>
</div>
<main class="flex-1 container mx-auto px-4 py-6" role="main">
<%= yield %>
</main>
<%= render 'servactory/web/footer' %>
</body>
</html>
</html>
14 changes: 7 additions & 7 deletions app/views/servactory/web/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<footer class="border-t border-gray-200 bg-gray-50">
<footer class="border-t border-gray-200 bg-gray-50" role="contentinfo">
<div class="container mx-auto px-4 py-6">
<div class="flex items-center justify-between text-sm text-gray-600">
<div class="flex items-center gap-6">
<span>© 2025 Servactory</span>
<div class="h-4 w-px bg-gray-300"></div>
<a href="#" class="hover:text-gray-900 transition-colors">Documentation</a>
<a href="#" class="hover:text-gray-900 transition-colors">Support</a>
<span>© <%= Date.current.year %> Servactory</span>
<div class="h-4 w-px bg-gray-300" aria-hidden="true"></div>
<%= link_to "Documentation", Servactory::Web.configuration.documentation_url, class: "hover:text-gray-900 transition-colors", target: "_blank", rel: "nofollow", aria: { label: "Documentation" } %>
<%= link_to "GitHub", Servactory::Web.configuration.github_url, class: "hover:text-gray-900 transition-colors", target: "_blank", rel: "nofollow", aria: { label: "GitHub repository" } %>
</div>
<div class="flex items-center gap-2">
<span class="font-mono text-xs bg-gray-200 text-gray-800 px-3 py-1 rounded-full">Servactory <%= Servactory::VERSION::STRING %></span>
<%= link_to "Servactory #{Servactory::VERSION::STRING}", Servactory::Web.configuration.release_url_for(Servactory::VERSION::STRING), class: "font-mono text-xs bg-gray-200 text-gray-800 px-3 py-1 rounded-full", target: "_blank", rel: "nofollow", aria: { label: "Servactory release" } %>
</div>
</div>
</div>
</footer>
</footer>
14 changes: 7 additions & 7 deletions app/views/servactory/web/_navbar.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<header class="border-b border-gray-200 bg-white sticky top-0 z-50 shadow-sm">
<header class="border-b border-gray-200 bg-white sticky top-0 z-50 shadow-sm" role="banner">
<div class="container mx-auto px-4 h-16 flex items-center justify-between">
<div class="flex items-center gap-6">
<h1 class="text-2xl">
<%= link_to "Servactory", Servactory::Web::Engine.routes.url_helpers.services_path, class: "font-bold text-gray-900 hover:text-blue-600 transition-colors" %>
<%= link_to "Servactory", Servactory::Web::Engine.routes.url_helpers.services_path, class: "font-bold text-gray-900 hover:text-blue-600 transition-colors", aria: { label: "Home" } %>
</h1>

<% if Servactory::Web.configuration.app_name.present? %>
<div class="h-6 w-px bg-gray-300"></div>
<div class="h-6 w-px bg-gray-300" aria-hidden="true"></div>

<% if Servactory::Web.configuration.app_url.present? %>
<%= link_to Servactory::Web.configuration.app_name, Servactory::Web.configuration.app_url, target: "_blank", rel: "nofollow", class: "text-base font-medium text-gray-600 hover:text-gray-900 transition-colors" %>
<%= link_to Servactory::Web.configuration.app_name, Servactory::Web.configuration.app_url, target: "_blank", rel: "nofollow", class: "text-base font-medium text-gray-600 hover:text-gray-900 transition-colors", aria: { label: "Go to #{Servactory::Web.configuration.app_name}" } %>
<% else %>
<span class="text-base font-medium text-gray-600">
<%= Servactory::Web.configuration.app_name %>
Expand All @@ -18,9 +18,9 @@
<% end %>
</div>

<nav class="hidden md:flex items-center gap-8">
<%= link_to "Documentation", Servactory::Web.configuration.documentation_url, target: "_blank", rel: "nofollow", class: "text-sm font-medium text-gray-700 hover:text-gray-900 transition-colors" %>
<%= link_to "GitHub", Servactory::Web.configuration.github_url, target: "_blank", rel: "nofollow", class: "text-sm font-medium text-gray-700 hover:text-gray-900 transition-colors" %>
<nav class="hidden md:flex items-center gap-8" role="navigation" aria-label="Main navigation">
<%= link_to "Documentation", Servactory::Web.configuration.documentation_url, class: "text-sm font-medium text-gray-700 hover:text-gray-900 transition-colors", target: "_blank", rel: "nofollow", aria: { label: "Documentation" } %>
<%= link_to "GitHub", Servactory::Web.configuration.github_url, class: "text-sm font-medium text-gray-700 hover:text-gray-900 transition-colors", target: "_blank", rel: "nofollow", aria: { label: "GitHub repository" } %>
</nav>
</div>
</header>
18 changes: 7 additions & 11 deletions app/views/servactory/web/services/_service_node.html.erb
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
<% border_class = (level || 0) > 0 ? 'border-l border-dashed border-gray-300 pl-4' : '' %>
<% if node[:children].present? %>
<li class="mb-0.5">
<li class="mb-0.5" role="treeitem" aria-expanded="true">
<div class="<%= border_class %>">
<div class="flex items-center gap-2 mb-1 p-1.5 hover:bg-gray-50 rounded-md transition-colors">
<svg class="w-4 h-4 text-amber-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2H5a2 2 0 00-2-2z"></path>
</svg>
<%= render partial: 'servactory/web/shared/folder_icon' %>
<span class="text-sm font-semibold text-gray-800"><%= node[:name] %></span>
</div>
<ul>
<ul role="group">
<% node[:children].each do |child| %>
<%= render partial: 'servactory/web/services/service_node', locals: { node: child, level: (level || 0) + 1 } %>
<% end %>
</ul>
</div>
</li>
<% else %>
<li class="mb-0.5">
<li class="mb-0.5" role="treeitem">
<div class="<%= border_class %>">
<div class="flex items-center gap-2 p-1 hover:bg-gray-50 rounded-md transition-colors">
<svg class="w-3 h-3 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
</svg>
<%= link_to node[:name], Servactory::Web::Engine.routes.url_helpers.service_path(node[:path]), class: "text-sm text-gray-700 hover:text-blue-600 transition-colors" %>
<%= render partial: 'servactory/web/shared/file_icon' %>
<%= link_to node[:name], Servactory::Web::Engine.routes.url_helpers.service_path(node[:path]), class: "text-sm text-gray-700 hover:text-blue-600 transition-colors", aria: { label: "View service: #{node[:name]}" } %>
</div>
</div>
</li>
<% end %>
<% end %>
12 changes: 7 additions & 5 deletions app/views/servactory/web/services/_service_tree.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<ul class="list-none p-0 m-0">
<% services_tree.each do |node| %>
<%= render partial: 'servactory/web/services/service_node', locals: { node: node, level: 0 } %>
<% end %>
</ul>
<nav aria-label="Services navigation">
<ul class="list-none p-0 m-0" role="tree">
<% services_tree.each do |node| %>
<%= render partial: 'servactory/web/services/service_node', locals: { node: node, level: 0 } %>
<% end %>
</ul>
</nav>
14 changes: 6 additions & 8 deletions app/views/servactory/web/services/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<div class="max-w-5xl">
<div class="mb-6">
<h2 class="text-3xl font-bold mb-3 text-gray-900">Services</h2>
<p class="text-gray-600 text-base">List of all services written using Servactory in the project</p>
</div>
<div class="border border-gray-200 rounded-lg bg-white shadow-sm p-4">
<%= render partial: 'servactory/web/services/service_tree', locals: { services_tree: @services_tree } %>
</div>
<%= render partial: 'servactory/web/shared/page_header', locals: {
title: 'Services',
description: 'List of all services written using Servactory in the project'
} %>
<div class="border border-gray-200 rounded-lg bg-white shadow-sm p-4">
<%= render partial: 'servactory/web/services/service_tree', locals: { services_tree: @services_tree } %>
</div>
Loading