Refactor Docker setup and add mock data support
- Updated .dockerignore and .gitignore for better file management. - Introduced .env.example for environment variable configuration. - Added docker-compose.dev.yml for development with mock data and live reload. - Enhanced Dockerfile to include necessary dependencies and entrypoint script. - Created mock_data.py to provide sample data for testing without OpenStack/Prometheus. - Added unit tests for template filters in dashboard. - Cleaned up various files for consistency and improved readability.
This commit is contained in:
@@ -1,39 +1,39 @@
|
||||
@import "tailwindcss";
|
||||
@plugin "daisyui";
|
||||
|
||||
@plugin "daisyui/theme" {
|
||||
name: "light";
|
||||
default: true;
|
||||
prefersdark: false;
|
||||
color-scheme: "light";
|
||||
--color-base-100: oklch(100% 0 0);
|
||||
--color-base-200: oklch(98% 0 0);
|
||||
--color-base-300: oklch(95% 0 0);
|
||||
--color-base-content: oklch(21% 0.006 285.885);
|
||||
--color-primary: #09418E;
|
||||
--color-primary-content: oklch(93% 0.034 272.788);
|
||||
--color-secondary: #428BCA;
|
||||
--color-secondary-content: oklch(100% 0 0);
|
||||
--color-accent: #A492FF;
|
||||
--color-accent-content: oklch(21% 0.006 285.885);
|
||||
--color-neutral: #333333;
|
||||
--color-neutral-content: oklch(92% 0.004 286.32);
|
||||
--color-info: oklch(74% 0.16 232.661);
|
||||
--color-info-content: oklch(29% 0.066 243.157);
|
||||
--color-success: oklch(76% 0.177 163.223);
|
||||
--color-success-content: oklch(37% 0.077 168.94);
|
||||
--color-warning: oklch(82% 0.189 84.429);
|
||||
--color-warning-content: oklch(41% 0.112 45.904);
|
||||
--color-error: oklch(71% 0.194 13.428);
|
||||
--color-error-content: oklch(27% 0.105 12.094);
|
||||
--radius-selector: 0.5rem;
|
||||
--radius-field: 0.25rem;
|
||||
--radius-box: 0.5rem;
|
||||
--size-selector: 0.25rem;
|
||||
--size-field: 0.25rem;
|
||||
--border: 1px;
|
||||
--depth: 1;
|
||||
--noise: 0;
|
||||
}
|
||||
|
||||
@import "tailwindcss";
|
||||
@plugin "daisyui";
|
||||
|
||||
@plugin "daisyui/theme" {
|
||||
name: "light";
|
||||
default: true;
|
||||
prefersdark: false;
|
||||
color-scheme: "light";
|
||||
--color-base-100: oklch(100% 0 0);
|
||||
--color-base-200: oklch(98% 0 0);
|
||||
--color-base-300: oklch(95% 0 0);
|
||||
--color-base-content: oklch(21% 0.006 285.885);
|
||||
--color-primary: #0A2896;
|
||||
--color-primary-content: oklch(93% 0.034 272.788);
|
||||
--color-secondary: #428BCA;
|
||||
--color-secondary-content: oklch(100% 0 0);
|
||||
--color-accent: #A492FF;
|
||||
--color-accent-content: oklch(21% 0.006 285.885);
|
||||
--color-neutral: #333333;
|
||||
--color-neutral-content: oklch(92% 0.004 286.32);
|
||||
--color-info: oklch(74% 0.16 232.661);
|
||||
--color-info-content: oklch(29% 0.066 243.157);
|
||||
--color-success: oklch(76% 0.177 163.223);
|
||||
--color-success-content: oklch(37% 0.077 168.94);
|
||||
--color-warning: oklch(82% 0.189 84.429);
|
||||
--color-warning-content: oklch(41% 0.112 45.904);
|
||||
--color-error: oklch(71% 0.194 13.428);
|
||||
--color-error-content: oklch(27% 0.105 12.094);
|
||||
--radius-selector: 0.5rem;
|
||||
--radius-field: 0.25rem;
|
||||
--radius-box: 0.5rem;
|
||||
--size-selector: 0.25rem;
|
||||
--size-field: 0.25rem;
|
||||
--border: 1px;
|
||||
--depth: 1;
|
||||
--noise: 0;
|
||||
}
|
||||
|
||||
@source "../../templates";
|
||||
File diff suppressed because one or more lines are too long
14
static/js/chartjs-plugin-annotation.min.js
vendored
14
static/js/chartjs-plugin-annotation.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,26 +1,26 @@
|
||||
// Color utilities
|
||||
const getCSSVar = (varName) => {
|
||||
return getComputedStyle(document.documentElement).getPropertyValue(varName).trim();
|
||||
}
|
||||
function getColorWithOpacity(className) {
|
||||
const element = document.createElement('div');
|
||||
element.className = className;
|
||||
element.style.opacity = '1'; // Force opacity
|
||||
element.textContent = '.';
|
||||
|
||||
document.body.appendChild(element);
|
||||
const computedColor = window.getComputedStyle(element).color;
|
||||
document.body.removeChild(element);
|
||||
|
||||
return computedColor;
|
||||
}
|
||||
// Utility function to calculate mean and standard deviation
|
||||
function calculateStats(data) {
|
||||
if (!data || data.length === 0) return { mean: 0, std: 0 };
|
||||
|
||||
const mean = data.reduce((a, b) => a + b, 0) / data.length;
|
||||
const variance = data.reduce((a, b) => a + Math.pow(b - mean, 2), 0) / data.length;
|
||||
const std = Math.sqrt(variance);
|
||||
|
||||
return { mean, std };
|
||||
// Color utilities
|
||||
const getCSSVar = (varName) => {
|
||||
return getComputedStyle(document.documentElement).getPropertyValue(varName).trim();
|
||||
}
|
||||
function getColorWithOpacity(className) {
|
||||
const element = document.createElement('div');
|
||||
element.className = className;
|
||||
element.style.opacity = '1'; // Force opacity
|
||||
element.textContent = '.';
|
||||
|
||||
document.body.appendChild(element);
|
||||
const computedColor = window.getComputedStyle(element).color;
|
||||
document.body.removeChild(element);
|
||||
|
||||
return computedColor;
|
||||
}
|
||||
// Utility function to calculate mean and standard deviation
|
||||
function calculateStats(data) {
|
||||
if (!data || data.length === 0) return { mean: 0, std: 0 };
|
||||
|
||||
const mean = data.reduce((a, b) => a + b, 0) / data.length;
|
||||
const variance = data.reduce((a, b) => a + Math.pow(b - mean, 2), 0) / data.length;
|
||||
const std = Math.sqrt(variance);
|
||||
|
||||
return { mean, std };
|
||||
}
|
||||
Reference in New Issue
Block a user