UNPKG

request-src

Version:

A lightweight server-side middleware for real-time monitoring and storage of HTTP requests.

313 lines (267 loc) 5.97 kB
body { font-family: Arial, sans-serif; padding: 0; margin: 0; width: 100%; height: 100dvh; } .containerBox { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 0; margin: 0; text-align: center; background-image: url('./bg.jpg'); background-repeat: repeat-y; background-position: center; background-size: cover; width: 100%; min-height: 100vh; } #header { display: flex; justify-content: space-around; align-items: center; width: 90%; /* Table mode width */ background-color: #3e92cc; border-radius: 10px 10px 0 0; margin-top: 10px; transition: width 0.3s ease-in-out, background-color 0.3s; } /* Ensure the refresh icon stays in place */ .refresh-icon { display: inline-block; width: 1.5em; /* Fixed width to prevent movement */ text-align: center; transition: opacity 0.2s ease-in-out; } /* Rotation animation when refreshing */ .refresh-icon.refreshing { animation: spin 1s linear infinite; color:white; } /* Keyframe Animation for Spinning */ @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* Header expands to full-width in graph mode */ .graph-mode #header { width: 100%; border-radius: 0; /* No rounding when in graph mode */ background-color: #d8315b; /* Change color */ } /* Graph styling */ #logChart { display: block; background-color: #f7f6fe; border-radius: 12px; width: 90%; max-width: 1500px; max-height: 800px !important; min-height: 300px; box-sizing: border-box; padding: 10px; margin-top:20px; } .title { color: #ddd; margin: 0; font-size: 0.9em; } h2 { font-size: 1em; color: white; text-align: center; } select { border-radius: 10px; font-size: 10px; } label { font-size: 10px; } .req-badge { display: inline-block; padding: 3px 8px; font-size: 0.85em; font-weight: bold; border-radius: 12px; text-align: center; white-space: nowrap; opacity: 0.8; } #settings { display: flex; justify-content: space-around; align-items: center; background: #3e92cc; padding: 0; color: white } #graphOptions { display: none; margin: 0; } .graphFilter { text-align: left; margin: 0 5px; } table { max-width: 90%; margin: 0; border-collapse: collapse; background: white; } th, td { font-size: 0.7em; padding: 5px; border: 0px; } th { background: #3e92cc; background-color: #f7f6fe; padding: 5px 3px; } #logTable, #logChart, #pageButtons { transition: opacity 0.5s ease-in-out; width: 100%; } button { padding: 10px 20px; margin: 10px; cursor: pointer; background: #007BFF; color: white; border: none; border-radius: 5px; } button:hover { background: #0056b3; } /* toggle anonymize logic */ /* Style the container */ #container { display: flex; position: relative; padding-left: 50px; cursor: pointer; user-select: none; font-size: 0.85em; } /* Hide the default checkbox */ #container input { position: absolute; opacity: 0; cursor: pointer; } /* Custom checkmark (toggle switch) */ .checkmark { position: absolute; top: 0; left: 0; height: 20px; width: 40px; background-color: #ccc; border-radius: 12px; transition: 0.4s; } /* Create the toggle circle */ .checkmark:after { content: ""; position: absolute; width: 18px; height: 15px; left: 3px; top: 3px; background-color: white; border-radius: 50%; transition: 0.4s; } /* Toggle on state */ #container input:checked~.checkmark { background-color: #d8315b; } /* Move toggle circle when checked */ #container input:checked~.checkmark:after { transform: translateX(16px); } /* toggle logic table graph */ /* Skewed toggle switch container */ .checkbox_item.citem_3 { text-align: center; } /* Label wrapper for checkbox */ .checkbox_item .checkbox_wrap { position: relative; display: block; cursor: pointer; width: 80px; margin: 0 auto 0px; padding-top: 10px; } /* Hide the default checkbox */ .checkbox_item .checkbox_wrap .checkbox_inp { position: absolute; top: 0; left: 0; opacity: 0; z-index: 1; } /* Toggle switch appearance */ .checkbox_item .checkbox_wrap .checkbox_mark { width: 70px; height: 30px; padding: 2px; border-radius: 0; overflow: hidden; position: relative; display: inline-block; } /* Table view text (default) */ .checkbox_item .checkbox_wrap .checkbox_mark:before, .checkbox_item .checkbox_wrap .checkbox_mark:after { content: ""; position: absolute; transition: all 0.5s ease; top: 0; left: 0; width: 100%; height: 30px; text-align: center; line-height: 30px; font-size: 12px; } /* Default view: Table */ .checkbox_item .checkbox_wrap .checkbox_mark:before { content: "►Graph"; color: #d8315b; background: #ffffff; border-radius: 0 20px 20px 0; } /* Active view: Graph */ .checkbox_item .checkbox_wrap .checkbox_mark:after { content: "◄Table"; color: #ffff; left: -100px; background: #3e92cc; border-radius: 20px 0 0 20px; } /* Toggle ON state (Graph view) */ .checkbox_item .checkbox_wrap .checkbox_inp:checked~.checkbox_mark:after { left: 0; } /* Hide Table text when switched to Graph */ .checkbox_item .checkbox_wrap .checkbox_inp:checked~.checkbox_mark:before { left: 100px; }