job_harbor 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8886fa57253d6ca9b9d65e8a7e969b7758505a73b7edc2590b1c39efbd5e7c06
|
|
4
|
+
data.tar.gz: 7d11c049a0e8ca9131601a6c88cb818e3724b4c4854bb2450d36686cb6a34cc4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 68200679eacafc5f57e61ffaf5d13897ac4017b95f8422db7ced82f3be29077325c384be39c16d1a0abb75f2ec690e5f36f3bc398bd8f34bdf76b0ff557796ce
|
|
7
|
+
data.tar.gz: 4af20afe1df6d6b8ee22f99ab85cdbaead13d083fc2a4c46cdd7569d98d023f125e6ea52df97daaea1f7316509dee5e8d83d5f77920b3b68800acb0e496071b2
|
|
@@ -8,7 +8,7 @@ module JobHarbor
|
|
|
8
8
|
|
|
9
9
|
layout "job_harbor/application"
|
|
10
10
|
|
|
11
|
-
helper_method :sq_config, :nav_counts
|
|
11
|
+
helper_method :sq_config, :nav_counts, :return_to_app_path, :return_to_app_label
|
|
12
12
|
|
|
13
13
|
private
|
|
14
14
|
|
|
@@ -40,5 +40,19 @@ module JobHarbor
|
|
|
40
40
|
rescue
|
|
41
41
|
0
|
|
42
42
|
end
|
|
43
|
+
|
|
44
|
+
def return_to_app_path
|
|
45
|
+
configured = sq_config.return_to_app_path
|
|
46
|
+
return configured if configured.is_a?(String)
|
|
47
|
+
return instance_exec(&configured) if configured.respond_to?(:call)
|
|
48
|
+
|
|
49
|
+
main_app.root_path
|
|
50
|
+
rescue
|
|
51
|
+
"/"
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def return_to_app_label
|
|
55
|
+
sq_config.return_to_app_label
|
|
56
|
+
end
|
|
43
57
|
end
|
|
44
58
|
end
|
|
@@ -174,6 +174,33 @@
|
|
|
174
174
|
border-top: 1px solid var(--sqd-border);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
.sqd-back-to-app {
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
gap: var(--sqd-space-2);
|
|
181
|
+
padding: var(--sqd-space-2) var(--sqd-space-3);
|
|
182
|
+
margin-bottom: var(--sqd-space-3);
|
|
183
|
+
color: var(--sqd-text-secondary);
|
|
184
|
+
text-decoration: none;
|
|
185
|
+
border-radius: var(--sqd-radius-sm);
|
|
186
|
+
transition: all 0.15s ease;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.sqd-back-to-app:hover {
|
|
190
|
+
background-color: var(--sqd-bg-tertiary);
|
|
191
|
+
color: var(--sqd-text-primary);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.sqd-back-icon {
|
|
195
|
+
width: 16px;
|
|
196
|
+
height: 16px;
|
|
197
|
+
flex-shrink: 0;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.sqd-back-label {
|
|
201
|
+
font-size: 13px;
|
|
202
|
+
}
|
|
203
|
+
|
|
177
204
|
.sqd-sidebar-footer-row {
|
|
178
205
|
display: flex;
|
|
179
206
|
align-items: center;
|
|
@@ -1023,7 +1050,8 @@ a.sqd-stat-value:hover {
|
|
|
1023
1050
|
}
|
|
1024
1051
|
|
|
1025
1052
|
.sqd-logo-text,
|
|
1026
|
-
.sqd-nav-label
|
|
1053
|
+
.sqd-nav-label,
|
|
1054
|
+
.sqd-back-label {
|
|
1027
1055
|
display: none;
|
|
1028
1056
|
}
|
|
1029
1057
|
|
|
@@ -1036,6 +1064,10 @@ a.sqd-stat-value:hover {
|
|
|
1036
1064
|
padding: var(--sqd-space-3);
|
|
1037
1065
|
}
|
|
1038
1066
|
|
|
1067
|
+
.sqd-back-to-app {
|
|
1068
|
+
justify-content: center;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1039
1071
|
.sqd-header {
|
|
1040
1072
|
flex-direction: column;
|
|
1041
1073
|
align-items: flex-start;
|
|
@@ -1111,6 +1143,12 @@ a.sqd-stat-value:hover {
|
|
|
1111
1143
|
</nav>
|
|
1112
1144
|
|
|
1113
1145
|
<div class="sqd-sidebar-footer">
|
|
1146
|
+
<a href="<%= return_to_app_path %>" class="sqd-back-to-app">
|
|
1147
|
+
<svg class="sqd-back-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
1148
|
+
<path d="M19 12H5M12 19l-7-7 7-7"/>
|
|
1149
|
+
</svg>
|
|
1150
|
+
<span class="sqd-back-label"><%= return_to_app_label %></span>
|
|
1151
|
+
</a>
|
|
1114
1152
|
<div class="sqd-sidebar-footer-row">
|
|
1115
1153
|
<%= render JobHarbor::ThemeToggleComponent.new %>
|
|
1116
1154
|
<span class="sqd-version">v<%= JobHarbor::VERSION %></span>
|
|
@@ -9,7 +9,9 @@ module JobHarbor
|
|
|
9
9
|
:poll_interval,
|
|
10
10
|
:enable_failure_stats,
|
|
11
11
|
:enable_charts,
|
|
12
|
-
:default_chart_range
|
|
12
|
+
:default_chart_range,
|
|
13
|
+
:return_to_app_path,
|
|
14
|
+
:return_to_app_label
|
|
13
15
|
|
|
14
16
|
def initialize
|
|
15
17
|
@authorize_with = -> { true }
|
|
@@ -22,6 +24,8 @@ module JobHarbor
|
|
|
22
24
|
@enable_failure_stats = true
|
|
23
25
|
@enable_charts = true
|
|
24
26
|
@default_chart_range = "24h"
|
|
27
|
+
@return_to_app_path = nil
|
|
28
|
+
@return_to_app_label = "Back to App"
|
|
25
29
|
end
|
|
26
30
|
|
|
27
31
|
def authorize(controller)
|
data/lib/job_harbor/version.rb
CHANGED