Skip to content

Commit

Permalink
Merge pull request #29 from midays/kai_performance_visualizer
Browse files Browse the repository at this point in the history
🌱 KAI evaluated data Visualizer
  • Loading branch information
sshveta authored Nov 13, 2024
2 parents cc220c8 + 4a95227 commit 001ec2c
Show file tree
Hide file tree
Showing 3 changed files with 680 additions and 0 deletions.
120 changes: 120 additions & 0 deletions kai-client-ci/report/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
canvas:hover {
cursor: crosshair;
}

#history-performance {
padding: 20px;
border: solid #b7b7b7 1px;
border-radius: 20px;
max-height: 1000px;
display: flex;
flex-direction: column;
justify-content: center;
}

.box-shadow-hover:hover {
box-shadow: #00000080 0px 0px 30px -10px;
transition: cubic-bezier(0.46, 0.03, 0.52, 0.96) 0.3s
}

body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 0;
background-color: #ffffff;
}

#navbar {
position: sticky;
top: 0;
background-color: #333;
color: #fff;
text-align: left;
z-index: 1000;
width: 100%;
}

#navbar>h1 {
margin: 10px;
color: white;
font-weight: lighter;
}

#dashboard {
width: 85%;
padding: 10px;
margin-top: 10px;
min-height: 1350px;
display: flex;
flex-direction: column;
justify-content: space-around;
color: #6e6e6e;
}

#date-selector {
padding: 5px 10px 5px 10px;
border-radius: 10px;
}

.utils {
border-bottom: solid #cbcaca 1px;
padding-bottom: 10px;
margin-bottom: 10px;
}

#date-range-pick {
padding: 10px;
min-width: 300px;
min-height: 50px;
display: inline-block;
}

.flatpickr-calendar {
z-index: 9999 !important;
display: block !important;
}

#single-performance {
padding: 20px;
border: solid #b7b7b7 1px;
border-radius: 20px;
margin-top: 10px;
z-index: 5;
}

#single-performace-charts {
display: flex;
flex-direction: row;
min-width: 30%;
max-height: 400px;
justify-content: center;
}

#average-ranges-chart {
width: 70%;
}

input[type="date"],
input[type="text"] {
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 1em;
}

#date-range-input {
width: 100%;
}

#footer {
width: 100%;
min-height: 200px;
}

#kai-performance-chart {
width: auto;
max-height: 500px;
}
47 changes: 47 additions & 0 deletions kai-client-ci/report/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dynamic Chart from JSON Data</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
<script src="./visualizer.js" defer></script>
</head>

<body>
<div id="navbar">
<h1>KAI Performance Visualizer</h1>
<!-- TODO: Implement a dark/ light theme toggle button -->
<!-- <button id="theme-toggle">Toggle Theme</button> -->
</div>
<div id="dashboard">
<div id="history-performance" class="box-shadow-hover">
<h2>KAI Nightly Performance History Report</h2>
<div class="utils">
<label>Select Date Range</label>
<div id="date-range-pick">
<input id="date-range-input" type="text" placeholder="Select date range" />
</div>
</div>
<canvas id="kai-performance-chart"></canvas>
</div>
<div id="single-performance" class="box-shadow-hover">
<h2>Single Nightly Run Performance</h2>
<div class="utils">
<label>Select Date</label>
<input type="date" id="date-picker" />
</div>
<div id="single-performace-charts">
<canvas id="pies-chart"></canvas>
<canvas id="average-ranges-chart"></canvas>
</div>
</div>
</div>
<div id="footer"></div>
</body>

</html>
Loading

0 comments on commit 001ec2c

Please sign in to comment.