summaryrefslogtreecommitdiffstats
path: root/management-interface/views
diff options
context:
space:
mode:
authorNils Schwabe2014-05-20 13:35:07 +0200
committerNils Schwabe2014-05-20 13:35:07 +0200
commitf3364894c1a29431fcb93e7dcd004d50e52e4b47 (patch)
treee3ee7f63bb578728def1f108ec739be9254ec063 /management-interface/views
parentAdd login functionallity (diff)
downloadmasterserver-f3364894c1a29431fcb93e7dcd004d50e52e4b47.tar.gz
masterserver-f3364894c1a29431fcb93e7dcd004d50e52e4b47.tar.xz
masterserver-f3364894c1a29431fcb93e7dcd004d50e52e4b47.zip
Improve login
Add satellite list Add remove items for guests
Diffstat (limited to 'management-interface/views')
-rw-r--r--management-interface/views/home.htm6
-rw-r--r--management-interface/views/login.htm36
-rw-r--r--management-interface/views/menu.php11
-rw-r--r--management-interface/views/satellites.htm44
-rw-r--r--management-interface/views/users.htm38
5 files changed, 105 insertions, 30 deletions
diff --git a/management-interface/views/home.htm b/management-interface/views/home.htm
index 229e427..f2cadd0 100644
--- a/management-interface/views/home.htm
+++ b/management-interface/views/home.htm
@@ -1,8 +1,10 @@
<div class="container">
<div class="jumbotron">
- <h1>{{ strtoupper(@_module) }}</h1>
- <p>Hello {{ @username }}<p>
+ <p>Hello {{ @username }}!<p>
+ <check if="{{ @loggedin }}">
+ <p>Status of server is: <check if="{{ @serverstatus }}"><true><span class="bg-success">online</span></true><false><span class="bg-danger">offline</span></false></check></p>
+ </check>
</div>
</div> <!-- /container -->
diff --git a/management-interface/views/login.htm b/management-interface/views/login.htm
index f447cb8..d283f45 100644
--- a/management-interface/views/login.htm
+++ b/management-interface/views/login.htm
@@ -1,22 +1,20 @@
-<check if="{{ @loggedin }}">
-<true>
<div class="container">
<div class="jumbotron">
- <h1>Already logged in.</h1>
- </div>
+ <check if="{{ @loggedin }}">
+ <true>
+ <h1>Already logged in.</h1>
+ </true>
+ <false>
+ <form class="form-signin" action="{{ @hostname }}do/login" method="post">
+ <h2 class="form-signin-heading">Login</h2>
+ <input type="text" name="user" class="form-control" placeholder="Username" autofocus>
+ <input type="password" name="pass" class="form-control" placeholder="Password">
+ <label class="checkbox">
+ <input type="checkbox" name="remember" value="remember-me">Remember me</input>
+ </label>
+ <button class="btn btn-lg btn-primary btn-block" type="submit">Login</button>
+ </form>
+ </false>
+ </check>
+ </div>
</div>
-</true>
-<false>
-<div class="container">
- <form class="form-signin" action="{{ @hostname }}do/login" method="post">
- <h2 class="form-signin-heading">Login</h2>
- <input type="text" name="user" class="form-control" placeholder="Username" autofocus>
- <input type="password" name="pass" class="form-control" placeholder="Password">
- <label class="checkbox">
- <input type="checkbox" name="remember" value="remember-me">Remember me</input>
- </label>
- <button class="btn btn-lg btn-primary btn-block" type="submit">Login</button>
- </form>
-</div>
-</false>
-</check>
diff --git a/management-interface/views/menu.php b/management-interface/views/menu.php
index 9ef4068..d010119 100644
--- a/management-interface/views/menu.php
+++ b/management-interface/views/menu.php
@@ -8,17 +8,18 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a class="navbar-brand" href="#"><?= $_title ?></a>
+ <a class="navbar-brand" href="<?=$hostname ?>"><?= $_title ?></a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<?php
- foreach($item as $value) {
+ for ($i = 0; $i < sizeof($item); $i++) {
+ if ($intern[$i]) continue;
echo '<li';
- echo ($value === $_module)? ' class="active"':'';
+ echo ($item[$i] === $_module)? ' class="active"':'';
echo '>';
- echo '<a href="'.$hostname.$value.'">';
- echo Util::firstcap($value);
+ echo '<a href="'.$hostname.$item[$i].'">';
+ echo Util::firstcap($item[$i]);
echo '</a>';
echo '</li>';
}
diff --git a/management-interface/views/satellites.htm b/management-interface/views/satellites.htm
new file mode 100644
index 0000000..24adba1
--- /dev/null
+++ b/management-interface/views/satellites.htm
@@ -0,0 +1,44 @@
+ <div class="container">
+ <div class="jumbotron">
+ <check if="{{ @loggedin }}">
+ <true>
+ <h2>List of all satellite public keys</h2>
+ <table class="table">
+ <thead>
+ <tr>
+ <td>
+ <label>
+ <input type="checkbox">
+ </label>
+ </td>
+ <td>Organization</td>
+ <td>Address</td>
+ <td>Name</td>
+ <td>Prefix</td>
+ <td>Public key</td>
+ </tr>
+ </thead>
+ <tbody>
+ <repeat group="{{ @result }}" value="{{ @item }}">
+ <tr>
+ <td>
+ <label>
+ <input type="checkbox">
+ </label>
+ </td>
+ <td>{{ @item.organization }}</td>
+ <td>{{ @item.address }}</td>
+ <td>{{ @item.name }}</td>
+ <td>{{ @item.prefix}}</td>
+ <td><check if="{{ @item.publickey}} == ''"><true>no</true><false>yes</false></check></td>
+ </tr>
+ </repeat>
+ </tbody>
+ </table>
+ </true>
+ <false>
+ <p class="bg-danger">Please <a href="{{ $hostname }}login">login</a></p>
+ </false>
+ </check>
+ </div>
+ </div> <!-- /container -->
diff --git a/management-interface/views/users.htm b/management-interface/views/users.htm
index ed15306..c461072 100644
--- a/management-interface/views/users.htm
+++ b/management-interface/views/users.htm
@@ -1,8 +1,38 @@
<div class="container">
-
<div class="jumbotron">
- <h1>{{ strtoupper(@_module) }}</h1>
- <p></p>
+ <check if="{{ @loggedin }}">
+ <true>
+ <h2>List of all users</h2>
+ <table class="table">
+ <thead>
+ <tr>
+ <td>ID</td>
+ <td>Username</td>
+ <td>Organization</td>
+ <td>First name</td>
+ <td>Last name</td>
+ <td>Email</td>
+ <td>Last login</td>
+ </tr>
+</thead>
+ <tbody>
+ <repeat group="{{ @result }}" value="{{ @item }}">
+ <tr>
+ <td>{{ @item.userid }}</td>
+ <td>{{ @item.username }}</td>
+ <td>{{ @item.organization }}</td>
+ <td>{{ @item.firstname }}</td>
+ <td>{{ @item.lastname }}</td>
+ <td>{{ @item.email }}</td>
+ <td>{{ @item.lastlogin }}</td>
+ </tr>
+ </repeat>
+ </tbody>
+ </table>
+ </true>
+ <false>
+ <p class="bg-danger">Please <a href="{{ $hostname }}login">login</a></p>
+ </false>
+ </check>
</div>
-
</div> <!-- /container -->