Merge pull request #4359 from cachethq/frontend-fixes

Frontend fixes
This commit is contained in:
James Brooks 2023-10-27 13:26:37 +01:00 committed by GitHub
commit 7b07983d54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 8649 additions and 7633 deletions

View File

@ -55,7 +55,7 @@
"nexmo/client": "^1.5",
"pragmarx/google2fa": "^5.0",
"predis/predis": "^1.1",
"twig/twig": "^3.0"
"twig/twig": "^2.13"
},
"require-dev": {
"ext-sqlite3": "*",
@ -113,7 +113,10 @@
},
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
"optimize-autoloader": true,
"allow-plugins": {
"kylekatarnls/update-helper": true
}
},
"extra": {
"branch-alias": {

1529
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,14 +7,13 @@
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"postinstall": "opencollective-postinstall || true"
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"animate-sass": "^0.8.2",
"axios": "^0.19",
"bootstrap-sass": "^3.4.1",
"chart.js": "^2.9.3",
"bootstrap-sass": "^3.4.3",
"chart.js": "^2.9.4",
"cross-env": "^5.1",
"es5-shim": "^4.5.14",
"flatpickr": "^4.5.7",
@ -24,24 +23,19 @@
"jquery-minicolors": "^2.1.10",
"jquery-serializeobject": "^1.0.0",
"jquery-sparkline": "^2.4.0",
"laravel-mix": "^2.1",
"laravel-mix-purgecss": "^3.0.0",
"laravel-mix": "^5.0.9",
"laravel-mix-purgecss": "^4.2.0",
"livestamp": "git+https://github.com/mattbradley/livestampjs.git#develop",
"lodash": "^4.17.13",
"messenger": "git+https://github.com/HubSpot/messenger.git",
"moment": "^2.24.0",
"promise": "^7.3.1",
"sass": "^1.69.5",
"sass-loader": "^8.0.2",
"sortablejs": "^1.8.4",
"sweetalert2": "^6.8.0",
"vue": "^2.6.10",
"vue-template-compiler": "^2.6.10"
"vue": "^2.7.15",
"vue-template-compiler": "^2.7.15"
},
"private": true,
"dependencies": {
"opencollective-postinstall": "^2.0.2"
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/Cachet"
}
"private": true
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

29
public/dist/js/all.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
!function(r){var n=window.webpackJsonp;window.webpackJsonp=function(e,u,c){for(var f,i,p,a=0,l=[];a<e.length;a++)i=e[a],o[i]&&l.push(o[i][0]),o[i]=0;for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(r[f]=u[f]);for(n&&n(e,u,c);l.length;)l.shift()();if(c)for(a=0;a<c.length;a++)p=t(t.s=c[a]);return p};var e={},o={2:0};function t(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=r,t.c=e,t.d=function(r,n,e){t.o(r,n)||Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:e})},t.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,"a",n),n},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.p="/",t.oe=function(r){throw console.error(r),r}}([]);
!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],c=0,s=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var f=window.webpackJsonp=window.webpackJsonp||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var p=i;t()}([]);

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
{
"/dist/js/vendor.js": "/dist/js/vendor.js?id=e330d11061bb920e9441",
"/dist/js/app.js": "/dist/js/app.js?id=85f4e87f2c37c96e623d",
"/dist/css/dashboard/dashboard.css": "/dist/css/dashboard/dashboard.css?id=b6a9327dd3b9b7c7ed2d",
"/dist/css/app.css": "/dist/css/app.css?id=c7bf7628a7a22dfec2ed",
"/dist/js/manifest.js": "/dist/js/manifest.js?id=40dcfff9d09d402daf38",
"/dist/js/all.js": "/dist/js/all.js?id=bbc128edf91b2898cdf0"
"/dist/js/app.js": "/dist/js/app.js?id=077e70541c0df5adf687",
"/dist/css/dashboard/dashboard.css": "/dist/css/dashboard/dashboard.css?id=7e9267fcdd1150802d64",
"/dist/css/app.css": "/dist/css/app.css?id=1de6dbcedf7e30bc18d0",
"/dist/js/manifest.js": "/dist/js/manifest.js?id=3c768977c2574a34506e",
"/dist/js/vendor.js": "/dist/js/vendor.js?id=669b7556d754809958ea",
"/dist/js/all.js": "/dist/js/all.js?id=8ccdfb9fa27b19a16205"
}

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: {

View File

@ -24,7 +24,7 @@
</div>
<div class="row">
<div class="col-xs-12">
<canvas :id="metricId" height="160" width="600"></canvas>
<canvas :id="metricId" height="200" width="900"></canvas>
</div>
</div>
</div>
@ -32,20 +32,14 @@
<script>
const Chart = require('chart.js')
const _ = require('lodash')
// Configure Chart.js
Chart.defaults.global.elements.point.hitRadius = 10
Chart.defaults.global.responsiveAnimationDuration = 1000
Chart.defaults.global.legend.display = false
module.exports = {
props: [
'metric',
'theme',
'theme-light',
'theme-dark'
],
export default {
props: {
metric: Object,
theme: String,
themeLight: String,
themeDark: String,
},
data () {
return {
canvas: null,
@ -77,15 +71,15 @@ module.exports = {
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)
this.context.fillStyle = "#666"
this.context.font = '44px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
this.context.font = '20px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
const textString = "Loading data",
textWidth = this.context.measureText(textString).width
const textString = "Loading metrics..."
const textWidth = this.context.measureText(textString).width
this.canvas.textBaseline = 'middle'
this.canvas.textAlign = "center"
this.context.fillText(textString , (this.canvas.width / 2) - (textWidth / 2), 100)
this.context.fillText(textString, (this.canvas.width / 2) - (textWidth / 2), 100)
}
},
methods: {
@ -134,6 +128,7 @@ module.exports = {
data_keys[i] = data_keys[i].substr(11);
}
}
this.chart = new Chart(this.context, {
type: 'line',
data: {
@ -149,6 +144,14 @@ module.exports = {
}]
},
options: {
elements: {
point: {
hitRadius: 5
}
},
legend: {
display: false
},
scales: {
yAxes: [{
ticks: {

View File

@ -36,6 +36,7 @@ body.status-page {
}
.tooltip {
background-color: black;
.tooltip-inner {
padding: 8px 12px;
font-size: 14px;
@ -226,6 +227,8 @@ body.status-page {
}
.panel-heading {
padding-top: 1em;
padding-bottom: 1.4em;
strong {
font-size: 1.1em;
}

View File

@ -4,7 +4,7 @@
<ul class="list-group">
@foreach($metrics as $metric)
<li class="list-group-item metric" data-metric-id="{{ $metric->id }}">
<metric-chart :metric="{{ $metric->toJson() }}" :theme-light="{{ json_encode($themeMetrics) }}" :theme="{{ json_encode(color_darken($themeMetrics, -0.1)) }}" :theme-dark="{{ json_encode(color_darken($themeMetrics, -0.2)) }}"></metric-chart>
<metric-chart :metric="{{ $metric->toJson() }}" theme-light="{{ $themeMetrics }}" theme="{{ color_darken($themeMetrics, -0.1) }}" theme-dark="{{ color_darken($themeMetrics, -0.2) }}"></metric-chart>
</li>
@endforeach
</ul>

View File

@ -13,14 +13,10 @@ require('laravel-mix-purgecss')
|
*/
const sassOptions = {
includePaths: ['node_modules'],
};
mix
.copyDirectory('node_modules/ionicons/fonts', 'public/fonts')
.sass('resources/assets/sass/dashboard.scss', 'public/dist/css/dashboard', sassOptions)
.sass('resources/assets/sass/app.scss', 'public/dist/css', sassOptions)
.sass('resources/assets/sass/dashboard.scss', 'public/dist/css/dashboard')
.sass('resources/assets/sass/app.scss', 'public/dist/css')
.purgeCss()
.options({
processCssUrls: false

14564
yarn.lock

File diff suppressed because it is too large Load Diff