@endsection
@section('scripts')
@@ -90,5 +103,50 @@
},
});
});
+
+ function run_migrations() {
+ var output = document.getElementById("db-update");
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", "{{ route('install.action.migrate') }}", true);
+ xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
+ xhr.withCredentials = true;
+ xhr.onprogress = function (e) {
+ output.innerHTML = e.currentTarget.responseText;
+ output.scrollTop = output.scrollHeight - output.clientHeight; // scrolls the output area
+ if (output.innerHTML.indexOf('Error!') !== -1) {
+ // if error word in output, show the retry button
+ $("#retry-btn").css("display", "");
+ $('#error-box').append($('
@lang('install.migrate.error')
'))
+ }
+ };
+ xhr.timeout = 240000; // if no response for 4m, allow the user to retry
+ xhr.ontimeout = function (e) {
+ $("#retry-btn").css("display", "");
+ $('#error-box').append($('