Small fixes

This commit is contained in:
James Brooks
2023-10-27 13:23:27 +01:00
parent 6cedf238f5
commit 2de54f9fcf
4 changed files with 11 additions and 24 deletions

View File

@@ -25,6 +25,10 @@ window.axios.defaults.headers.common = {
*/
const Flatpickr = require('flatpickr');
import Metric from './components/status-page/Metric.vue';
import Dashboard from './components/dashboard/Dashboard.vue';
import Setup from './components/Setup.vue';
((win, doc) => {
/**
* Next, we will create a fresh Vue application instance and attach it to
@@ -56,9 +60,9 @@ const Flatpickr = require('flatpickr');
});
},
components: {
'setup': require('./components/Setup'),
'dashboard': require('./components/dashboard/Dashboard'),
'metric-chart': require('./components/status-page/Metric'),
'setup': Setup,
'dashboard': Dashboard,
'metric-chart': Metric,
}
});
})()

View File

@@ -1,4 +1,4 @@
$(function () {
(function () {
// Ajax Setup
$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
var token;
@@ -310,22 +310,6 @@ $(function () {
sparkLine();
}
function goToStep(current, next) {
// validation was ok. We can go on next step.
$('.block-' + current)
.removeClass('show')
.addClass('hidden');
$('.block-' + next)
.removeClass('hidden')
.addClass('show');
$('.steps .step')
.removeClass("active")
.filter(":lt(" + (next) + ")")
.addClass("active");
}
// Check for updates.
if ($('#update-alert').length > 0) {
$.ajax({
@@ -357,4 +341,4 @@ $(function () {
if (_.isFunction(cancelCallback)) cancelCallback();
});
}
});
}());

View File

@@ -1,6 +1,5 @@
<script>
module.exports = {
props: [],
export default {
data () {
return {
env: {