mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-08-23 21:46:21 +00:00
fix
This commit is contained in:
+2
-1
@@ -264,7 +264,6 @@ experiments:
|
||||
</textarea>
|
||||
</div>
|
||||
</form>
|
||||
<div id="chaosJobLogsDiv" style="margin-top: 2%; overflow-y: scroll; height:100px;"></div>
|
||||
</div>
|
||||
<div class="col" style="margin-top: 4%; overflow-y: scroll; height:900px;">
|
||||
<div id="chaosProgramFlow">
|
||||
@@ -351,6 +350,7 @@ experiments:
|
||||
<script src="./js/popper.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function changeRandomFactor() {
|
||||
randomFactor = $("#randomFactorInput").val();
|
||||
$("#currentRandomFactor").text(randomFactor);
|
||||
@@ -503,6 +503,7 @@ experiments:
|
||||
$('textarea').on('input', function() {
|
||||
$('#alert_placeholder2').text('');
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -182,15 +182,11 @@ function getChaosJobsLogs() {
|
||||
var oReq = new XMLHttpRequest();
|
||||
oReq.onreadystatechange = function () {
|
||||
if (this.readyState === XMLHttpRequest.DONE && this.status === 200) {
|
||||
if (programming_mode_switch) {
|
||||
document.getElementById("chaosJobLogsDiv").innerHTML = "";
|
||||
document.getElementById("chaosJobLogsDiv").innerHTML = this.responseText;
|
||||
}
|
||||
if (log_tail_switch) {
|
||||
document.getElementById("logTailDiv").innerHTML = "";
|
||||
document.getElementById("logTailDiv").innerHTML = this.responseText;
|
||||
}
|
||||
}
|
||||
if (log_tail_switch) {
|
||||
document.getElementById("logTailDiv").innerHTML = "";
|
||||
document.getElementById("logTailDiv").innerHTML = this.responseText;
|
||||
}
|
||||
}
|
||||
};;
|
||||
oReq.open("GET", "https://" + clu_endpoint + "/chaoslogs-" + random_code + ".html");
|
||||
oReq.send();
|
||||
|
||||
@@ -26,11 +26,6 @@ def compute_line(api_response_line, api_instance, container):
|
||||
#store = False
|
||||
sha256log = sha256(logrow.encode('utf-8')).hexdigest()
|
||||
|
||||
#if r.exists(f"log:{logid}:{pod.metadata.name}:{sha256log}"):
|
||||
# current_row = r.get(f"log:{logid}:{pod.metadata.name}:{sha256log}")
|
||||
# if current_row != logrow:
|
||||
# store = True
|
||||
|
||||
if not r.exists(f"log:{logid}:{pod.metadata.name}:{sha256log}"):
|
||||
logging.info(f"[logid:{logid}] The key log:{logid}:{pod.metadata.name}:{sha256log} does not exists. Preparing to store log content")
|
||||
file = pathlib.Path('/var/www/html')
|
||||
@@ -75,7 +70,9 @@ def line_prepender(filename, line, logid):
|
||||
logging.info(f"[logid:{logid}] Some i/o problem occurred in function line_prepender")
|
||||
|
||||
# create logger
|
||||
logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO"))
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
#logging.basicConfig(filename='/tmp/example.log', encoding='utf-8', level=os.environ.get("LOGLEVEL", "INFO"))
|
||||
|
||||
logging.info('Starting script for KubeInvaders taking logs from pods...')
|
||||
|
||||
file = pathlib.Path('/tmp/redis.sock')
|
||||
|
||||
Reference in New Issue
Block a user