* Fixed a bug in 'home' not displaying the 'offline' message when it was waiting for a reconfig.

* Cleaned up 'button' CSS class links and submit CSS to match.
* Re-enabled reboot at the end of a tools/anvil-configure-striker run.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 7 years ago
parent 66928edb06
commit a6a5df2496
  1. 16
      cgi-bin/home
  2. 38
      html/skins/alteeve/main.css
  3. 11
      html/skins/alteeve/main.html
  4. 2
      tools/anvil-configure-striker

@ -69,18 +69,18 @@ my $header = $anvil->Template->get({file => "main.html", name => "header", varia
my $body = ""; my $body = "";
# If any jobs are pending/running, show the "unavailable" option. # If any jobs are pending/running, show the "unavailable" option.
my $available = check_availability($anvil); my $available = check_availability($anvil);
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { available => $available }}); my $configured = check_if_configured($anvil);
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
available => $available,
configured => $configured,
}});
if (not $available) if (not $available)
{ {
# Set the body to 'say::maintenance'. # Set the body to 'say::maintenance'.
$body = $anvil->data->{say}{maintenance}; $body = $anvil->data->{say}{maintenance};
} }
elsif (not $configured)
# If there is no user account yet, then the system is new and needs to be reconfigured.
my $configured = check_if_configured($anvil);
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { configured => $configured }});
if (not $configured)
{ {
$body = configure_striker($anvil); $body = configure_striker($anvil);
} }
@ -241,7 +241,7 @@ sub check_availability
title => "#!string!striker_0046!#", title => "#!string!striker_0046!#",
description => $anvil->Words->string({key => "striker_0047", variables => { percent => $percent, timestamp => $timestamp, seconds_ago => $seconds_ago }}), description => $anvil->Words->string({key => "striker_0047", variables => { percent => $percent, timestamp => $timestamp, seconds_ago => $seconds_ago }}),
}}); }});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { 'say::maintenance' => $anvil->data->{say}{maintenance} }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { 'say::maintenance' => $anvil->data->{say}{maintenance} }});
} }
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { available => $available }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { available => $available }});

@ -10,6 +10,40 @@ Colours;
- Footer text: #515151 - Footer text: #515151
*/ */
input[type=submit]:hover {
border: 1px solid #f7f7f7;
}
input[type=submit] {
padding: 3px 10px;
background: #f7f7f7;
border: 1px solid #343434;
cursor: pointer;
-webkit-border-radius: 2px;
border-radius: 3px;
font-family: 'Dejavu Sans', Arial, Helvetica, Verdana, Sans-Serif;
text-decoration: none;
color: #343434;
font-size: 1.0em;
}
.button:hover {
border: 1px solid #f7f7f7;
}
.button {
padding: 3px 10px;
background: #f7f7f7;
border: 1px solid #343434;
cursor: pointer;
-webkit-border-radius: 2px;
border-radius: 3px;
font-family: 'Dejavu Sans', Arial, Helvetica, Verdana, Sans-Serif;
text-decoration: none;
color: #343434;
font-size: 1.0em;
}
.error_message { .error_message {
border-left: 3px solid #d02724; border-left: 3px solid #d02724;
border-right: 3px solid #d02724; border-right: 3px solid #d02724;
@ -55,8 +89,8 @@ select {
} }
body { body {
font-family: 'Dejavu Sans', Arial, Helvetica, Verdana, Sans-Serif; font-family: 'Dejavu Sans', Arial, Helvetica, Verdana, Sans-Serif;
background-image: url("/skins/alteeve/images/Texture.jpg"); background-image: url("/skins/alteeve/images/Texture.jpg");
background-repeat: repeat; background-repeat: repeat;
color: #f2f2f2; color: #f2f2f2;
} }

@ -306,6 +306,9 @@
<td> <td>
<span name="#!variable!title_id!#" id="#!variable!title_id!#" class="config_header1">#!variable!title!#</span><br /> <span name="#!variable!title_id!#" id="#!variable!title_id!#" class="config_header1">#!variable!title!#</span><br />
<span name="#!variable!message_id!#" id="#!variable!message_id!#" class="config_header2">#!variable!description!#</span> <span name="#!variable!message_id!#" id="#!variable!message_id!#" class="config_header2">#!variable!description!#</span>
<br />
<hr>
<a href="/" class="button">Reload</a>
</td> </td>
</tr> </tr>
</div> </div>
@ -319,11 +322,9 @@
<td> <td>
<span name="#!variable!title_id!#" id="#!variable!title_id!#" class="config_header1">#!variable!title!#</span><br /> <span name="#!variable!title_id!#" id="#!variable!title_id!#" class="config_header1">#!variable!title!#</span><br />
<span name="#!variable!message_id!#" id="#!variable!message_id!#" class="config_header2">#!variable!description!#</span> <span name="#!variable!message_id!#" id="#!variable!message_id!#" class="config_header2">#!variable!description!#</span>
</td> <br />
</tr> <hr>
<tr> <a href="/" class="button">Reload</a>
<td>
<a href="/">Reload</a>
</td> </td>
</tr> </tr>
</div> </div>

@ -88,7 +88,7 @@ $anvil->Database->insert_or_update_variables({
variable_source_table => "hosts", variable_source_table => "hosts",
}); });
#$anvil->System->call({shell_call => $anvil->data->{path}{exe}{'shutdown'}." --reboot now"}); $anvil->System->call({shell_call => $anvil->data->{path}{exe}{'shutdown'}." --reboot now"});
$anvil->nice_exit({code => 0}); $anvil->nice_exit({code => 0});

Loading…
Cancel
Save