Skip to content

Commit a47bd1c

Browse files
committed
Add external files in local (for disconnected admin nework)
1 parent bacb1b3 commit a47bd1c

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

app.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'rack'
44
require 'docker'
55

6-
Rack::File.new(File.dirname(__FILE__))
6+
static = Rack::File.new(File.dirname(__FILE__) + '/public')
77

88
App = lambda do |env|
99
if Faye::WebSocket.websocket?(env)
@@ -68,6 +68,8 @@
6868

6969
ws.rack_response
7070
else
71-
[200, { 'Content-Type' => 'text/html' }, [File.read('public/index.html')]]
71+
req = Rack::Request.new(env)
72+
req.path_info += 'index.html' if req.path_info == '/'
73+
static.call(env)
7274
end
7375
end

public/assets/icon/favicon.ico

15.9 KB
Binary file not shown.

public/assets/img/docker-logo.svg

+1
Loading

public/assets/js/lib/jquery/jquery-3.1.0.min.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
<title>Docker Swarm GUI - By Julien Breux</title>
88

9-
<link rel="shortcut icon" href="https://hub.docker.com/favicon.ico" type="image/x-icon">
10-
<link rel="icon" href="https://hub.docker.com/favicon.ico" type="image/x-icon">
9+
<link rel="shortcut icon" href="assets/icon/favicon.ico" type="image/x-icon">
10+
<link rel="icon" href="assets/icon/favicon.ico" type="image/x-icon">
1111

1212
<style media="screen">
1313
@keyframes swim { 0% { transform: rotate(0deg); } 25% { transform: rotate(25deg); } 50% { transform: rotate(-10deg); } 75% { transform: rotate(0deg); } 100% { transform: rotate(0deg); } }
@@ -42,7 +42,7 @@
4242
<body>
4343
<header class="main-header">
4444
<h1>
45-
<img src="https://hub.docker.com/public/images/logos/mini-logo.svg" alt="Docker">
45+
<img src="assets/img/docker-logo.svg" alt="Docker">
4646
</h1>
4747
</header>
4848
<section class="nodes-wrapper" id="viewport">
@@ -53,7 +53,7 @@ <h1>
5353
With <span class="love"></span> by <a href="https://github.com/JulienBreux" class="avatar">Julien Breux</a>
5454
</p>
5555
</footer>
56-
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script>
56+
<script src="assets/js/lib/jquery/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script>
5757
<script>
5858
function buildService(data, viewport) {
5959
var $html = $('<article class="service-wrapper service-' + data.status + '">' +

0 commit comments

Comments
 (0)