-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fcc2664
commit bd03244
Showing
12 changed files
with
228 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
extra.aaxt | ||
admin/test.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
$curr = 'dash'; | ||
include '../header.php'; | ||
|
||
?> | ||
<div style="display: none;"> | ||
<input type="text" name="ip" id="ip" value="<?php echo $_GET['ip']; ?>"> | ||
<input type="text" name="group" id="group" value="<?php echo $_GET['group']; ?>"> | ||
</div> | ||
<div class="container" style="margin-top: 5%;"> | ||
<a href="basicinfo.php?ip=<?php echo $_GET['ip']; ?>&group=<?php echo $_GET['group']; ?>#process" class="btn btn-dark" style="margin-left: 1.5%;">Back</a> | ||
<!-- <a onclick="window.history.back();" href="#" class="btn btn-dark">Back</a> --> | ||
<canvas id="myChart" width="15" height="15">Loading...</canvas> | ||
<div id="app" style="margin-bottom: 5%; margin-top: 5%;"></div> | ||
<script type="module" src="/valainet/js/components/issues/issues.js"></script> | ||
</div> | ||
<script> | ||
|
||
var ctx = document.getElementById('myChart'); | ||
data = { | ||
datasets: [{ | ||
data: [10,20], | ||
fill: false, | ||
borderColor: 'red', | ||
label: "Number of alerts" | ||
}], | ||
|
||
// These labels appear in the legend and in the tooltips when hovering different arcs | ||
|
||
|
||
|
||
}; | ||
|
||
var myPieChart = new Chart(ctx, { | ||
type: 'line', | ||
data: data, | ||
label: "Errors", | ||
options: { | ||
title: { | ||
display: true, | ||
text: 'Alerts for the last 5 days' | ||
}, | ||
scales: { | ||
yAxes: [{ | ||
ticks: { | ||
min: 0, | ||
} | ||
}] | ||
} | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { getObjID, renderHTML, renderText } from "../../avesengine/aves.js" | ||
// import { retSoft } from './retsoft.js'; | ||
import { retissues } from './retissues.js'; | ||
|
||
window.addEventListener('DOMContentLoaded', (event) => { | ||
// retequip(); | ||
|
||
retissues(); | ||
console.log('DOM fully loaded and parsed'); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { getObjID, renderHTML, renderText } from "../../avesengine/aves.js" | ||
function retissues(){ | ||
var ipaddr = getObjID('ip').value; | ||
var group = getObjID('group').value; | ||
const payload = { | ||
act: 'retissues', | ||
apikey: 'influx', | ||
ip: ipaddr, | ||
group: group | ||
}; | ||
function sayHello(){ | ||
return "alert('hello 1')"; | ||
} | ||
fetch('apivalai.php',{ | ||
method: 'post', | ||
body: JSON.stringify(payload), | ||
headers:{ | ||
'content-type': 'application/json' | ||
} | ||
}).then(function(response){ | ||
return response.json(); | ||
}).then(function(data){ | ||
function addData(chart, label, data) { | ||
chart.data.labels.push(label); | ||
chart.data.datasets.forEach((dataset) => { | ||
dataset.data.push(data); | ||
}); | ||
chart.update(0); | ||
} | ||
|
||
function removeData(chart) { | ||
chart.data.labels.pop(); | ||
chart.data.datasets.forEach((dataset) => { | ||
dataset.data.pop(); | ||
}); | ||
chart.update(0); | ||
} | ||
if(data.length >0){ | ||
console.log(data); | ||
var output = '<table class="table table-striped">'; | ||
output += `<tr class="bg-dark text-white"> | ||
<th>SL.NO</th> | ||
<th>Date</th> | ||
<th>Count</th> | ||
</tr> | ||
`; | ||
var count = 0; | ||
removeData(myPieChart); | ||
removeData(myPieChart); | ||
data.forEach(function(comp){ | ||
count += 1; | ||
addData(myPieChart, comp.date, comp.count); | ||
output += ` | ||
<tr><td>${count}</td> | ||
<td>${comp.date}</td> | ||
<td>${comp.count}</td> | ||
</tr> | ||
`; | ||
|
||
getObjID('app').innerHTML = output; | ||
}); | ||
}else{ | ||
var output = '<h4 class="text-center text-danger">No value to show</h4>'; | ||
getObjID('app').innerHTML = output; | ||
} | ||
}) | ||
console.log("final"); | ||
} | ||
export { retissues } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters