Files

175 lines
5.9 KiB
PHP
Raw Permalink Normal View History

2020-06-05 14:26:57 -05:00
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>@lang('install.title')</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2020-06-07 10:36:45 -05:00
<link href="{{ asset('css/bootstrap4.min.css') }}" rel="stylesheet" type="text/css"/>
2020-06-05 15:44:10 -05:00
<link href="{{ asset('css/font-awesome.min.css') }}" rel="stylesheet" type="text/css"/>
2020-06-05 14:26:57 -05:00
<script src="{{ asset('js/jquery.min.js') }}"></script>
2020-06-21 14:41:43 -05:00
<script src="{{ asset('js/popper.min.js') }}"></script>
2020-06-07 10:36:45 -05:00
<script src="{{ asset('js/bootstrap4.min.js') }}"></script>
2020-06-21 14:41:43 -05:00
<script src="{{ asset('js/clipboard.min.js') }}"></script>
2020-06-06 17:26:25 -05:00
<style type="text/css">
2020-06-13 15:41:11 -05:00
body {
background-color: #046C8B;
2020-06-06 17:26:25 -05:00
}
2020-06-13 15:41:11 -05:00
.primary-panel {
padding: 0;
2020-06-21 11:27:07 -05:00
border: 0;
2020-06-13 16:15:53 -05:00
box-shadow: 3px 3px 30px #222;
2020-06-13 15:41:11 -05:00
min-height: 540px;
2020-06-07 00:03:57 -05:00
}
2020-06-06 17:26:25 -05:00
.btn-circle {
2020-06-07 00:03:57 -05:00
width: 60px;
height: 60px;
padding: 8px 14px;
border-radius: 30px;
2020-06-06 17:26:25 -05:00
font-size: 24px;
2020-06-07 00:03:57 -05:00
line-height: 1.7;
box-shadow: 2px 2px 4px grey;
2020-06-06 17:26:25 -05:00
}
2020-06-13 15:41:11 -05:00
.card-img-top {
2020-06-13 16:15:53 -05:00
background-color: #EEEEEE;
2020-06-13 15:41:11 -05:00
}
2020-06-21 11:27:07 -05:00
2020-06-13 09:35:28 -05:00
#progress-icons {
2020-06-13 16:15:53 -05:00
background: linear-gradient(to bottom, #EEEEEE 50%, white 50%)
2020-06-13 15:41:11 -05:00
}
2020-06-15 21:30:39 -05:00
2020-06-13 16:15:53 -05:00
.btn-circle.disabled {
2020-06-13 15:41:11 -05:00
opacity: 1;
2020-06-15 21:30:39 -05:00
background-color: #62bcca;
border-color: #64c0ce;
2020-06-13 15:41:11 -05:00
}
2020-06-22 00:39:16 -05:00
.btn-circle.btn-outline-info:not(:hover) {
background-color: white;
}
.btn-circle.btn-primary-info:not(:hover) {
background-color: white;
}
2020-06-13 15:41:11 -05:00
2020-06-13 09:35:28 -05:00
.install-progress {
2020-06-13 16:15:53 -05:00
margin: auto -1px auto 0;
2020-06-13 15:41:11 -05:00
height: 14px;
2020-06-13 16:15:53 -05:00
display: inline-block;
2020-06-13 09:35:28 -05:00
width: 100%;
2020-06-13 15:41:11 -05:00
background-color: lightgray;
2020-06-21 11:27:07 -05:00
box-shadow: inset 0 6px 4px -5px black,
inset 0 -6px 4px -7px black;
2020-06-13 15:41:11 -05:00
}
2020-06-21 11:27:07 -05:00
2020-06-13 16:15:53 -05:00
.install-progress.loop {
2020-06-21 11:27:07 -05:00
box-shadow: inset 0 6px 4px -5px black,
inset 0 -6px 4px -7px black,
inset 8px 0 4px -6px grey; /* missing button shadow */
2020-06-13 16:15:53 -05:00
}
2020-06-21 11:27:07 -05:00
2020-06-13 15:41:11 -05:00
.install-progress.complete {
2020-06-13 16:15:53 -05:00
background-color: #db202e;
2020-06-13 15:41:11 -05:00
}
#step-title {
padding-bottom: 20px;
2020-06-13 09:35:28 -05:00
}
2020-06-18 00:41:03 -05:00
.rotate-if-collapsed {
transition: .4s transform ease-in-out;
}
2020-06-21 11:27:07 -05:00
2020-06-18 00:41:03 -05:00
[data-toggle="collapse"] {
cursor: pointer;
}
2020-06-21 11:27:07 -05:00
2020-06-18 00:41:03 -05:00
[data-toggle="collapse"][aria-expanded="true"] .rotate-if-collapsed {
transform: rotate(180deg);
}
2020-06-06 17:26:25 -05:00
</style>
2020-06-07 00:03:57 -05:00
@yield('style')
2020-06-05 14:26:57 -05:00
</head>
2020-06-07 00:03:57 -05:00
<body>
2020-06-05 14:26:57 -05:00
<div class="container">
2020-06-07 10:36:45 -05:00
<div class="card col-lg-8 offset-lg-2 col-md-10 offset-md-1 col-12 primary-panel">
2020-06-13 15:41:11 -05:00
<div class="card-img-top">
2020-06-13 16:15:53 -05:00
<img class="card-img-top p-4" src="{{ asset(\LibreNMS\Config::get('title_image', "images/librenms_logo_light.svg")) }}" alt="LibreNMS">
2020-06-13 09:35:28 -05:00
<div id="progress-icons" class="d-flex flex-row justify-content-around">
2020-06-13 15:41:11 -05:00
<div class="install-progress complete"></div>
2020-06-21 11:27:07 -05:00
@foreach($steps as $name => $controller)
2020-06-11 01:06:16 -05:00
<div>
2020-06-21 11:27:07 -05:00
<a href="{{ route('install.' . $name) }}"
id="install-step-{{ $name }}"
class="install-step btn btn-circle
@if($step === $name) btn-outline-info @else btn-info @endif
@if(!$controller->enabled()) disabled @endif"
title="@lang("install.$name.title")"
2020-06-11 01:06:16 -05:00
>
2020-06-15 00:45:40 -05:00
<i class="fa fa-lg {{ $controller->icon() }}"></i>
2020-06-11 01:06:16 -05:00
</a>
</div>
2020-06-21 11:41:07 -05:00
<div id="progress-{{ $name }}-bar" class="install-progress loop @if($controller->complete() || $step == 'finish') complete @endif"></div>
2020-06-11 01:06:16 -05:00
@endforeach
</div>
2020-06-13 15:41:11 -05:00
</div>
<div class="card-body">
<div class="row">
<div class="col-12 text-center">
2020-06-21 11:27:07 -05:00
<h2 id="step-title">@lang("install.$step.title")</h2>
2020-06-13 15:41:11 -05:00
</div>
</div>
2020-06-06 17:26:25 -05:00
<div class="row">
2020-06-07 10:36:45 -05:00
<div id="error-box" class="col-12">
2020-06-08 02:21:03 -05:00
@if(!empty($messages))
@foreach($messages as $message)
2020-06-21 11:27:07 -05:00
<div class="alert alert-danger">{{ $message }}</div>
2020-06-08 02:21:03 -05:00
@endforeach
2020-06-06 17:26:25 -05:00
@endif
2020-06-05 15:50:23 -05:00
</div>
2020-06-06 17:26:25 -05:00
</div>
2020-06-05 15:44:10 -05:00
@yield('content')
</div>
</div>
2020-06-05 14:26:57 -05:00
</div>
2020-06-11 01:58:42 -05:00
<script>
2020-06-21 11:27:07 -05:00
var step = '{{ $step }}';
2020-06-18 16:19:30 -05:00
function checkStepStatus(callback) {
2020-06-11 01:58:42 -05:00
$.ajax('{{ route('install.action.steps') }}')
2020-06-21 11:27:07 -05:00
.success(function (data) {
var primary;
Object.keys(data).forEach(function (key) {
var classes = 'btn btn-circle';
classes += (key === step ? ' btn-outline-info' : ' btn-info');
// mark buttons enabled
if (!data[key].enabled) {
classes += ' disabled';
} else if (!data[key].complete && !primary) {
// if this step is the first enabled, but not complete, mark it as primary
primary = key
}
$('#install-step-' + key).attr('class', classes);
});
if (primary) {
$('#install-step-' + primary)
.removeClass('btn-info')
.removeClass('btn-outline-info')
.addClass(primary === step ? 'btn-outline-primary' : 'btn-primary');
2020-06-11 01:58:42 -05:00
}
2020-06-18 16:19:30 -05:00
2020-06-21 11:27:07 -05:00
if (callback && typeof callback === "function") {
callback(data);
}
})
2020-06-11 01:58:42 -05:00
}
2020-06-21 11:27:07 -05:00
checkStepStatus();
2020-06-11 01:58:42 -05:00
</script>
2020-06-05 18:35:51 -05:00
@yield('scripts')
2020-06-05 14:26:57 -05:00
</body>
</html>