mirror of
				https://github.com/h44z/wg-portal.git
				synced 2025-11-03 23:56:18 +00:00 
			
		
		
		
	* api - add OperationID helps when using pyswagger and is visible via http://localhost:8123/swagger/index.html?displayOperationId=true gin-swagger can not set displayOperationId yet * api - match paramters to their property equivalents pascalcase & sometimes replacing the name (e.g. device -> DeviceName) * api - use ShouldBindJSON instead of BindJSON BindJSON sets the content-type text/plain * api - we renamed, we regenerated * device - allow - in DeviceName wg-example0.conf etc * api - more pascalcase & argument renames * api - marshal DeletedAt as string gorm.DeletedAt is of type sql.NullTime NullTime declares Time & Valid as properties DeletedAt marshals as time.Time swaggertype allows only basic types -> string * Peer - export UID/DeviceType in json UID/DeviceType is required, skipping in json, skips it in marshalling, next unmarshalling fails * assets - name forms for use with mechanize * api - match error message * add python3/pyswagger based unittesting - initializes a clean install by configuration via web service - tests the rest api * tests - test address exhaustion * tests - test network expansion Co-authored-by: Markus Koetter <koetter@cispa.de>
		
			
				
	
	
		
			66 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			66 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<!DOCTYPE html>
 | 
						|
<html>
 | 
						|
 | 
						|
<head>
 | 
						|
    <meta charset="utf-8">
 | 
						|
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
 | 
						|
    <title>{{ .static.WebsiteTitle }} - Login</title>
 | 
						|
    <meta name="description" content="{{ .static.WebsiteTitle }}">
 | 
						|
    <link rel="stylesheet" href="/css/bootstrap.min.css">
 | 
						|
    <link rel="stylesheet" href="/fonts/fontawesome-all.min.css">
 | 
						|
    <link rel="stylesheet" href="/fonts/font-awesome.min.css">
 | 
						|
    <link rel="stylesheet" href="/fonts/fontawesome5-overrides.min.css">
 | 
						|
    <link rel="stylesheet" href="/css/signin.css">
 | 
						|
</head>
 | 
						|
 | 
						|
<body id="page-top" class="d-flex flex-column min-vh-100">
 | 
						|
    <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
 | 
						|
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#topNavbar" aria-controls="topNavbar" aria-expanded="false" aria-label="Toggle navigation">
 | 
						|
            <span class="navbar-toggler-icon"></span>
 | 
						|
        </button>
 | 
						|
 | 
						|
        <a class="navbar-brand" href="/"><img src="{{$.static.WebsiteLogo}}" alt="{{$.static.CompanyName}}"/></a>
 | 
						|
        <div id="topNavbar" class="navbar-collapse collapse">
 | 
						|
        </div><!--/.navbar-collapse -->
 | 
						|
    </nav>
 | 
						|
    <div class="container mt-1">
 | 
						|
        <div class="card mt-5">
 | 
						|
            <div class="card-header">Please sign in</div>
 | 
						|
            <div class="card-body">
 | 
						|
                <form class="form-signin" method="post" name="login">
 | 
						|
                    <input type="hidden" name="_csrf" value="{{.Csrf}}">
 | 
						|
                    <div class="form-group">
 | 
						|
                        <label for="inputUsername">Username</label>
 | 
						|
                        <input type="text" name="username" class="form-control" id="inputUsername" aria-describedby="usernameHelp" placeholder="Enter username or email">
 | 
						|
                    </div>
 | 
						|
                    <div class="form-group">
 | 
						|
                        <label for="inputPassword">Password</label>
 | 
						|
                        <input type="password" name="password" class="form-control" id="inputPassword" placeholder="Password">
 | 
						|
                    </div>
 | 
						|
                    <button class="btn btn-lg btn-primary btn-block mt-5" type="submit">Sign in</button>
 | 
						|
 | 
						|
                    {{ if eq .error true }}
 | 
						|
                        <div class="alert alert-danger mt-3" role="alert">
 | 
						|
                            {{.message}}
 | 
						|
                        </div>
 | 
						|
                    {{end}}
 | 
						|
                </form>
 | 
						|
 | 
						|
                <div class="card o-hidden border-0 my-5">
 | 
						|
                    <div class="card-body p-0">
 | 
						|
                        <a href="/" class="btn btn-white btn-block text-primary btn-user">Go Home</a>
 | 
						|
                    </div>
 | 
						|
                </div>
 | 
						|
            </div>
 | 
						|
        </div>
 | 
						|
        {{template "prt_flashes.html" .}}
 | 
						|
    </div>
 | 
						|
    <script src="/js/jquery.min.js"></script>
 | 
						|
    <script src="/js/jquery.easing.js"></script>
 | 
						|
    <script src="/js/popper.min.js"></script>
 | 
						|
    <script src="/js/bootstrap.bundle.min.js"></script>
 | 
						|
    <script src="/js/bootstrap-confirmation.min.js"></script>
 | 
						|
    <script src="/js/custom.js"></script>
 | 
						|
</body>
 | 
						|
 | 
						|
</html> |