mirror of
https://github.com/TakeusV1/flask_ipam.git
synced 2026-10-14 01:15:33 +02:00
V1.0
This commit is contained in:
1 parent
0980efcd24
commit
f11aa2d6c6
22 files changed
+491
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- BASE -->
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>IPAM - {% block styles %}{{ title }}{% endblock %}</title>
|
||||
<meta name="author" content="Takeus">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<!-- LINKS -->
|
||||
<link rel="icon" type="image/png" href="{{ url_for('static',filename='img/logo.png') }}" />
|
||||
<link rel="stylesheet" href="{{ url_for('static',filename='css/custom.css') }}"/>
|
||||
<link rel="stylesheet" href="{{ url_for('static',filename='css/bootstrap.min.css') }}"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||
</head>
|
||||
<body class=" d-flex flex-column">
|
||||
<style>
|
||||
body {
|
||||
background: linear-gradient(to right, #87CEEB, #4682B4);
|
||||
background-size: 100% 300%;
|
||||
animation: gradientAnimation 5s ease infinite;
|
||||
}
|
||||
@keyframes gradientAnimation {
|
||||
0% {background-position: 0% 50%;}
|
||||
50% {background-position: 100% 50%;}
|
||||
100% {background-position: 0% 50%;}
|
||||
}
|
||||
</style>
|
||||
{% block content %}{% endblock %}
|
||||
<!-- JAVASCRIPT -->
|
||||
<script src="{{ url_for('static',filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<!-- Flash message -->
|
||||
{% with errors = get_flashed_messages(with_categories=true,category_filter=["success","warning","danger","error"]) %}
|
||||
{% if errors %}
|
||||
{% for category, message in errors %}
|
||||
<div class="alert alert-dismissible alert-{{ category }} m-0" style="position:fixed;top:5%;left:38%;z-index:10;min-width:25%;">
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
<p class="mb-0"><b>{{ message }}</b></a></p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<!-- END|Flash message -->
|
||||
@@ -0,0 +1,36 @@
|
||||
{% extends 'auth/_base.html' %}
|
||||
{% block content %}
|
||||
{% include "auth/_flash.html" %}
|
||||
<div class="container d-flex justify-content-center align-items-center vh-100">
|
||||
<div class="card p-4 shadow-lg rounded-3">
|
||||
<h2 class="text-center mb-4">Login Page</h2>
|
||||
<form method="POST">
|
||||
{{ form.csrf_token }}
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Username</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="bi bi-person"></i></span>
|
||||
{% if bad_password %}
|
||||
{{ form.username(class="form-control is-invalid", placeholder="username") }}
|
||||
{% else %}
|
||||
{{ form.username(class="form-control", placeholder="username") }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Password</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="bi bi-lock"></i></span>
|
||||
{% if bad_password %}
|
||||
{{ form.password(class="form-control is-invalid", placeholder="password") }}
|
||||
{% else %}
|
||||
{{ form.password(class="form-control", placeholder="password") }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- BASE -->
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>IPAM - {% block styles %}{{ title }}{% endblock %}</title>
|
||||
<meta name="author" content="Takeus">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<!-- LINKS -->
|
||||
<link rel="icon" type="image/png" href="{{ url_for('static',filename='img/logo.png') }}" />
|
||||
<link rel="stylesheet" href="{{ url_for('static',filename='css/custom.css') }}"/>
|
||||
<link rel="stylesheet" href="{{ url_for('static',filename='css/bootstrap.min.css') }}"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}{% endblock %}
|
||||
<!-- JAVASCRIPT -->
|
||||
<script src="{{ url_for('static',filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,40 @@
|
||||
<nav class="navbar navbar-expand-lg bg-dark bg-body-tertiary" data-bs-theme="dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#">Flask IPAM</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if is_dash %}active{% endif %}" href="{{ url_for('base.dashboard') }}">Dashboard</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">Network</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Subnets</a></li>
|
||||
<li><a class="dropdown-item" href="#">Attributions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-archive-fill"></i> Inventory</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#"><i class="bi bi-pc-display"></i> Computers</a></li>
|
||||
<li><a class="dropdown-item" href="#"><i class="bi bi-server"></i> Servers</a></li>
|
||||
<li><a class="dropdown-item" href="#"><i class="bi bi-server"></i> Virtual Machines</a></li>
|
||||
<li><a class="dropdown-item" href="#"><i class="bi bi-ethernet"></i> Networks Devices</a></li>
|
||||
<li><a class="dropdown-item" href="#"><i class="bi bi-collection"></i> Others</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% if current_user.admin %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="">Admin</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<form class="d-flex" role="search">
|
||||
<a class="btn btn-outline-warning" type="submit" href="{{ url_for('auth.logout') }}">logout</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -0,0 +1,5 @@
|
||||
{% extends 'panel/_base.html' %}
|
||||
{% block content %}
|
||||
{% include 'panel/_nav.html' %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<!-- BASE -->
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Takeus - {{HTTP_ERROR[0]}} Error</title>
|
||||
<meta name="author" content="Takeus">
|
||||
<meta name="copyright" content="Takeus 2024">
|
||||
<!-- CSS/LINKS -->
|
||||
<link rel="icon" type="image/png" href="{{ url_for('static',filename='/img/logo.png') }}" />
|
||||
<link rel="stylesheet" href="https://bootswatch.com/5/zephyr/bootstrap.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="px-4 pt-5 my-5 text-center">
|
||||
<h1 class="display-4 fw-bold">{{HTTP_ERROR[0]}} <u>{{HTTP_ERROR[1]}}</u></h1>
|
||||
<div class="col-lg-6 mx-auto">
|
||||
<p class="lead mb-4">{{HTTP_ERROR[2]}}</p>
|
||||
{% if HTTP_ERROR[0] != "503" %}
|
||||
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center mb-5">
|
||||
<a type="button" class="btn btn-primary btn-lg px-4 me-sm-3" href="/">Home</a>
|
||||
<button type="button" class="btn btn-outline-secondary btn-lg px-4" onclick="location.reload();">Reload</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="container px-5">
|
||||
<img src="{{HTTP_ERROR[3]}}" class="img-fluid" alt="403" loading="lazy" width="300">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user