mirror of
				https://github.com/r-smith/deceptifeed.git
				synced 2025-11-04 06:03:37 +00:00 
			
		
		
		
	Display message when feed/logs are empty
Adjust the html templates for web feed and log viewers to check if there's any data to display. If no data, a message is shown informing the user that there's no data.
This commit is contained in:
		@@ -140,23 +140,17 @@
 | 
				
			|||||||
        /* Content */
 | 
					        /* Content */
 | 
				
			||||||
        /* ======= */
 | 
					        /* ======= */
 | 
				
			||||||
        h1 {
 | 
					        h1 {
 | 
				
			||||||
            /* color: #f34; */
 | 
					 | 
				
			||||||
            color: #d34;
 | 
					            color: #d34;
 | 
				
			||||||
            font-size: 1.95rem;
 | 
					            font-size: 1.95rem;
 | 
				
			||||||
            margin: 0 0 1.5rem 0;
 | 
					            margin: 0 0 1.5rem 0;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        p {
 | 
					        p {
 | 
				
			||||||
            /* color: #7de; */
 | 
					 | 
				
			||||||
            color: #dde;
 | 
					            color: #dde;
 | 
				
			||||||
            font-family: 'Consolas', 'Menlo', 'Noto Sans Mono', 'Roboto Mono', 'Moncaco', 'DejaVu Sans Mono', 'Liberation Mono', 'Lucida Console', monospace;
 | 
					            font-family: 'Consolas', 'Menlo', 'Noto Sans Mono', 'Roboto Mono', 'Moncaco', 'DejaVu Sans Mono', 'Liberation Mono', 'Lucida Console', monospace;
 | 
				
			||||||
            font-size: 1.2rem;
 | 
					            font-size: 1.2rem;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        .white {
 | 
					 | 
				
			||||||
            color: #f0a;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        /* ============= */
 | 
					        /* ============= */
 | 
				
			||||||
        /* Media Queries */
 | 
					        /* Media Queries */
 | 
				
			||||||
        /* ============= */
 | 
					        /* ============= */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -231,6 +231,16 @@
 | 
				
			|||||||
            text-decoration: none;
 | 
					            text-decoration: none;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /* ======= */
 | 
				
			||||||
 | 
					        /* Content */
 | 
				
			||||||
 | 
					        /* ======= */
 | 
				
			||||||
 | 
					        p.no-results {
 | 
				
			||||||
 | 
					            color: #fb0;
 | 
				
			||||||
 | 
					            font-size: 1.2rem;
 | 
				
			||||||
 | 
					            padding-top: 1rem;
 | 
				
			||||||
 | 
					            text-align: center;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* ============= */
 | 
					        /* ============= */
 | 
				
			||||||
        /* Media Queries */
 | 
					        /* Media Queries */
 | 
				
			||||||
        /* ============= */
 | 
					        /* ============= */
 | 
				
			||||||
@@ -321,6 +331,7 @@
 | 
				
			|||||||
        </nav>
 | 
					        </nav>
 | 
				
			||||||
    </header>
 | 
					    </header>
 | 
				
			||||||
    <main>
 | 
					    <main>
 | 
				
			||||||
 | 
					        {{if .}}
 | 
				
			||||||
        <table>
 | 
					        <table>
 | 
				
			||||||
            <thead>
 | 
					            <thead>
 | 
				
			||||||
                <tr><th>Time<th>Source IP<th>Method<th>Path</tr>
 | 
					                <tr><th>Time<th>Source IP<th>Method<th>Path</tr>
 | 
				
			||||||
@@ -330,6 +341,9 @@
 | 
				
			|||||||
                {{end}}
 | 
					                {{end}}
 | 
				
			||||||
            </tbody>
 | 
					            </tbody>
 | 
				
			||||||
        </table>
 | 
					        </table>
 | 
				
			||||||
 | 
					        {{else}}
 | 
				
			||||||
 | 
					        <p class="no-results">No log data found</p>
 | 
				
			||||||
 | 
					        {{end}}
 | 
				
			||||||
    </main>
 | 
					    </main>
 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
@@ -229,6 +229,16 @@
 | 
				
			|||||||
            text-decoration: none;
 | 
					            text-decoration: none;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /* ======= */
 | 
				
			||||||
 | 
					        /* Content */
 | 
				
			||||||
 | 
					        /* ======= */
 | 
				
			||||||
 | 
					        p.no-results {
 | 
				
			||||||
 | 
					            color: #fb0;
 | 
				
			||||||
 | 
					            font-size: 1.2rem;
 | 
				
			||||||
 | 
					            padding-top: 1rem;
 | 
				
			||||||
 | 
					            text-align: center;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* ============= */
 | 
					        /* ============= */
 | 
				
			||||||
        /* Media Queries */
 | 
					        /* Media Queries */
 | 
				
			||||||
        /* ============= */
 | 
					        /* ============= */
 | 
				
			||||||
@@ -314,6 +324,7 @@
 | 
				
			|||||||
        </nav>
 | 
					        </nav>
 | 
				
			||||||
    </header>
 | 
					    </header>
 | 
				
			||||||
    <main>
 | 
					    <main>
 | 
				
			||||||
 | 
					        {{if .}}
 | 
				
			||||||
        <table>
 | 
					        <table>
 | 
				
			||||||
            <thead>
 | 
					            <thead>
 | 
				
			||||||
                <tr><th>Time<th>Source IP<th>Username<th>Password</tr>
 | 
					                <tr><th>Time<th>Source IP<th>Username<th>Password</tr>
 | 
				
			||||||
@@ -323,6 +334,9 @@
 | 
				
			|||||||
                {{end}}
 | 
					                {{end}}
 | 
				
			||||||
            </tbody>
 | 
					            </tbody>
 | 
				
			||||||
        </table>
 | 
					        </table>
 | 
				
			||||||
 | 
					        {{else}}
 | 
				
			||||||
 | 
					        <p class="no-results">No log data found</p>
 | 
				
			||||||
 | 
					        {{end}}
 | 
				
			||||||
    </main>
 | 
					    </main>
 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
@@ -228,6 +228,15 @@
 | 
				
			|||||||
            text-decoration: none;
 | 
					            text-decoration: none;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /* ======= */
 | 
				
			||||||
 | 
					        /* Content */
 | 
				
			||||||
 | 
					        /* ======= */
 | 
				
			||||||
 | 
					        p.no-results {
 | 
				
			||||||
 | 
					            color: #fb0;
 | 
				
			||||||
 | 
					            font-size: 1.2rem;
 | 
				
			||||||
 | 
					            text-align: center;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* ============= */
 | 
					        /* ============= */
 | 
				
			||||||
        /* Media Queries */
 | 
					        /* Media Queries */
 | 
				
			||||||
        /* ============= */
 | 
					        /* ============= */
 | 
				
			||||||
@@ -350,6 +359,7 @@
 | 
				
			|||||||
        </nav>
 | 
					        </nav>
 | 
				
			||||||
    </header>
 | 
					    </header>
 | 
				
			||||||
    <main>
 | 
					    <main>
 | 
				
			||||||
 | 
					        {{if .Data}}
 | 
				
			||||||
        <table>
 | 
					        <table>
 | 
				
			||||||
            <thead>
 | 
					            <thead>
 | 
				
			||||||
                <tr>
 | 
					                <tr>
 | 
				
			||||||
@@ -376,6 +386,9 @@
 | 
				
			|||||||
            {{end}}
 | 
					            {{end}}
 | 
				
			||||||
            </tbody>
 | 
					            </tbody>
 | 
				
			||||||
        </table>
 | 
					        </table>
 | 
				
			||||||
 | 
					        {{else}}
 | 
				
			||||||
 | 
					        <p class="no-results">The threat feed is currently empty</p>
 | 
				
			||||||
 | 
					        {{end}}
 | 
				
			||||||
    </main>
 | 
					    </main>
 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
		Reference in New Issue
	
	Block a user