summaryrefslogtreecommitdiff
path: root/src/manager/templates
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2008-02-07 13:56:17 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2008-02-07 13:56:17 +0000
commitbcc8f7ca7fd8e8ff6e8a4d579251458313133598 (patch)
treea86b42b486c954937b32ffeaaa725804cb1458ec /src/manager/templates
parent49104abddf3d71d5abf5cf75dc7f95fa6c55fa63 (diff)
downloadvyos-strongswan-bcc8f7ca7fd8e8ff6e8a4d579251458313133598.tar.gz
vyos-strongswan-bcc8f7ca7fd8e8ff6e8a4d579251458313133598.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.1.10)
Diffstat (limited to 'src/manager/templates')
-rw-r--r--src/manager/templates/config/list.cs104
-rw-r--r--src/manager/templates/control/result.cs14
-rw-r--r--src/manager/templates/header.cs4
-rw-r--r--src/manager/templates/ikesa/list.cs (renamed from src/manager/templates/status/ikesalist.cs)26
-rw-r--r--src/manager/templates/static/close.pngbin0 -> 825 bytes
-rw-r--r--src/manager/templates/static/initiate.pngbin0 -> 601 bytes
-rw-r--r--src/manager/templates/static/pipe-thin-green.pngbin0 -> 372 bytes
-rw-r--r--src/manager/templates/static/pipe-thin-left-green.pngbin0 -> 449 bytes
-rw-r--r--src/manager/templates/static/pipe-thin-right-green.pngbin0 -> 460 bytes
-rw-r--r--src/manager/templates/static/script.js5
-rw-r--r--src/manager/templates/static/style.css11
11 files changed, 152 insertions, 12 deletions
diff --git a/src/manager/templates/config/list.cs b/src/manager/templates/config/list.cs
new file mode 100644
index 000000000..e71830d4d
--- /dev/null
+++ b/src/manager/templates/config/list.cs
@@ -0,0 +1,104 @@
+<?cs include:"templates/header.cs" ?>
+<?cs each:peercfg = peercfgs ?>
+ <div class="expand" id="peercfg-<?cs name:peercfg ?>">
+ <h1><?cs name:peercfg ?>:
+ <span><?cs var:peercfg.local ?></span> &lt;-&gt;
+ <span><?cs var:peercfg.remote ?></span>
+ </h1>
+ <div class="controls">
+ <?cs if:peercfg.remote != "%any" ?>
+ <a title="initiate SA" href="<?cs var:base ?>/control/initiateike/<?cs name:peercfg ?>">
+ <img src="<?cs var:base ?>/static/initiate.png"/>
+ </a>
+ <?cs else ?>
+ &nbsp;
+ <?cs /if ?>
+ </div>
+ <div class="expander">
+ <hr/>
+ <table class="drawing">
+ <tr>
+ <td class="left" colspan="3">
+ <?cs var:peercfg.local ?>
+ </td>
+ <td>
+ </td>
+ <td class="right" colspan="3">
+ <?cs var:peercfg.remote ?>
+ </td>
+ </tr>
+ <tr class="images">
+ <td>
+ <?cs if:peercfg.remote != "%any" ?>
+ <img title="Local host can be the initiator" src="<?cs var:base ?>/static/client-left.png"></img>
+ <?cs else ?>
+ <img title="Local host must be the responder" src="<?cs var:base ?>/static/gateway-left.png"></img>
+ <?cs /if ?>
+ </td>
+ <td style="background-image:url(<?cs var:base ?>/static/pipe.png)">
+ <font color="#e5bf5e">0123456789abdcef</font><br/><br/><br/>
+ <?cs var:peercfg.ikecfg.local ?>
+ </td>
+ <td>
+ <img src="<?cs var:base ?>/static/pipe.png"></img>
+ </td>
+ <td>
+ <img title="IKE connection is down" src="<?cs var:base ?>/static/pipe.png"></img>
+ </td>
+ <td>
+ <img src="<?cs var:base ?>/static/pipe.png"></img>
+ </td>
+ <td class="right" style="background-image:url(<?cs var:base ?>/static/pipe.png)">
+ <font color="#e5bf5e">0123456789abcdef</font><br/><br/><br/>
+ <?cs var:peercfg.ikecfg.remote ?>
+ </td>
+ <td>
+ <?cs if:peercfg.remote == "%any" ?>
+ <img title="Remote host must be the initiator" src="<?cs var:base ?>/static/client-right.png"></img>
+ <?cs else ?>
+ <img title="Remote host can be the responder" src="<?cs var:base ?>/static/gateway-right.png"></img>
+ <?cs /if ?>
+ </td>
+ </tr>
+ <?cs each:childcfg = peercfg.childcfgs ?>
+ <tr>
+ <td colspan="6" class="expand">
+ <h1><?cs name:childcfg ?>:</h1>
+ </td>
+ <td class="controls">
+ <?cs if:peercfg.remote != "%any" ?>
+ <a title="initiate SA" href="<?cs var:base ?>/control/initiatechild/<?cs name:childcfg ?>">
+ <img src="<?cs var:base ?>/static/initiate.png"/>
+ </a>
+ <?cs /if ?>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="7"><hr/></td>
+ </tr>
+ <tr class="images">
+ <td colspan="2">
+ <?cs each:net = childcfg.local.networks ?>
+ <p><?cs var:net ?></p>
+ <?cs /each ?>
+ </td>
+ <td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left.png)">
+ <br/><br/><br/>
+ </td>
+ <td style="background-image:url(<?cs var:base ?>/static/pipe-thin.png)">
+ </td>
+ <td class="right" style="background-image:url(<?cs var:base ?>/static/pipe-thin-right.png)">
+ <br/><br/><br/>
+ </td>
+ <td class="right" colspan="2">
+ <?cs each:net = childcfg.remote.networks ?>
+ <p><?cs var:net ?></p>
+ <?cs /each ?>
+ </td>
+ </tr>
+ <?cs /each ?>
+ </table>
+ </div>
+ </div>
+<?cs /each ?>
+<?cs include:"templates/footer.cs" ?>
diff --git a/src/manager/templates/control/result.cs b/src/manager/templates/control/result.cs
new file mode 100644
index 000000000..1d59df65f
--- /dev/null
+++ b/src/manager/templates/control/result.cs
@@ -0,0 +1,14 @@
+<?cs include:"templates/header.cs" ?>
+<div class="expand">
+ <h1><?cs var:result ?></h1>
+ <div class="controls">&nbsp;</div>
+ <div class="expander">
+ <hr/>
+ <ul>
+ <?cs each:item = log ?>
+ <li><?cs var:item ?></li>
+ <?cs /each ?>
+ </ul>
+ </div>
+</div>
+<?cs include:"templates/footer.cs" ?>
diff --git a/src/manager/templates/header.cs b/src/manager/templates/header.cs
index 64a859a9a..bacd833e0 100644
--- a/src/manager/templates/header.cs
+++ b/src/manager/templates/header.cs
@@ -9,13 +9,15 @@
</head>
<body>
<div class="fleft">
- <a href="<?cs var:base ?>/status/ikesalist">
+ <a href="<?cs var:base ?>/ikesa/list">
<img class="fleft" src="<?cs var:base ?>/static/strongswan.png"/>
</a>
<h1>strongSwan Manager</h1>
<h2><?cs var:title ?></h2>
</div>
<div class="menu">
+ | <a href="<?cs var:base ?>/ikesa/list">IKE SAs</a>
+ | <a href="<?cs var:base ?>/config/list">Config</a>
| <a href="<?cs var:base ?>/gateway/list">Select Gateway</a>
| <a href="<?cs var:base ?>/auth/logout">Logout</a>
</div>
diff --git a/src/manager/templates/status/ikesalist.cs b/src/manager/templates/ikesa/list.cs
index 2238aafd3..f9a8e5c68 100644
--- a/src/manager/templates/status/ikesalist.cs
+++ b/src/manager/templates/ikesa/list.cs
@@ -2,11 +2,16 @@
<?cs each:ikesa = ikesas ?>
<div class="expand" id="ikesa-<?cs name:ikesa ?>">
<h1>
- IKE #<?cs name:ikesa ?> [<?cs var:ikesa.peerconfig ?>]:
+ <?cs var:ikesa.peerconfig ?> [IKE #<?cs name:ikesa ?>]:
<span><?cs var:ikesa.local.identification ?></span> &lt;-&gt;
<span><?cs var:ikesa.remote.identification ?></span>
- </h1>
- <div>
+ </h1>
+ <div class="controls">
+ <a title="close IKE_SA" href="<?cs var:base ?>/control/terminateike/<?cs name:ikesa ?>">
+ <img src="<?cs var:base ?>/static/close.png"/>
+ </a>
+ </div>
+ <div class="expander">
<hr/>
<table class="drawing">
<tr>
@@ -66,8 +71,13 @@
</tr>
<?cs each:childsa = ikesa.childsas ?>
<tr>
- <td colspan="7" class="expand">
- <h1>IPsec #<?cs name:childsa ?> [<?cs var:childsa.childconfig ?>]:</h1>
+ <td colspan="6" class="expand">
+ <h1><?cs var:childsa.childconfig ?> [IPsec #<?cs name:childsa ?>]:</h1>
+ </td>
+ <td class="controls">
+ <a title="close CHILD_SA" href="<?cs var:base ?>/control/terminatechild/<?cs name:childsa ?>">
+ <img src="<?cs var:base ?>/static/close.png"/>
+ </a>
</td>
</tr>
<tr>
@@ -79,12 +89,12 @@
<p><?cs var:net ?></p>
<?cs /each ?>
</td>
- <td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left.png)">
+ <td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left-green.png)">
<?cs var:childsa.local.spi ?> &lt;-<br/><br/><br/>
</td>
- <td style="background-image:url(<?cs var:base ?>/static/pipe-thin.png)">
+ <td style="background-image:url(<?cs var:base ?>/static/pipe-thin-green.png)">
</td>
- <td class="right" style="background-image:url(<?cs var:base ?>/static/pipe-thin-right.png)">
+ <td class="right" style="background-image:url(<?cs var:base ?>/static/pipe-thin-right-green.png)">
-&gt; <?cs var:childsa.remote.spi ?><br/><br/><br/>
</td>
<td class="right" colspan="2">
diff --git a/src/manager/templates/static/close.png b/src/manager/templates/static/close.png
new file mode 100644
index 000000000..7cb058d69
--- /dev/null
+++ b/src/manager/templates/static/close.png
Binary files differ
diff --git a/src/manager/templates/static/initiate.png b/src/manager/templates/static/initiate.png
new file mode 100644
index 000000000..4463e3b7a
--- /dev/null
+++ b/src/manager/templates/static/initiate.png
Binary files differ
diff --git a/src/manager/templates/static/pipe-thin-green.png b/src/manager/templates/static/pipe-thin-green.png
new file mode 100644
index 000000000..df3026ec5
--- /dev/null
+++ b/src/manager/templates/static/pipe-thin-green.png
Binary files differ
diff --git a/src/manager/templates/static/pipe-thin-left-green.png b/src/manager/templates/static/pipe-thin-left-green.png
new file mode 100644
index 000000000..b76432a94
--- /dev/null
+++ b/src/manager/templates/static/pipe-thin-left-green.png
Binary files differ
diff --git a/src/manager/templates/static/pipe-thin-right-green.png b/src/manager/templates/static/pipe-thin-right-green.png
new file mode 100644
index 000000000..f193af9cc
--- /dev/null
+++ b/src/manager/templates/static/pipe-thin-right-green.png
Binary files differ
diff --git a/src/manager/templates/static/script.js b/src/manager/templates/static/script.js
index 7b2a5823c..c9105c372 100644
--- a/src/manager/templates/static/script.js
+++ b/src/manager/templates/static/script.js
@@ -1,8 +1,7 @@
$(function(){
- $(".expand > div").hide();
$(".expand > h1").toggle(
- function(){$(this).parent(".expand").find("div").slideDown('fast');},
- function(){$(this).parent(".expand").find("div").slideUp('fast');}
+ function(){$(this).parent(".expand").find(".expander").slideUp('fast');},
+ function(){$(this).parent(".expand").find(".expander").slideDown('fast');}
);
});
diff --git a/src/manager/templates/static/style.css b/src/manager/templates/static/style.css
index 8a7f4960d..9550b8291 100644
--- a/src/manager/templates/static/style.css
+++ b/src/manager/templates/static/style.css
@@ -57,6 +57,8 @@ a img {
font-size: 1em;
cursor: pointer;
margin: 0;
+ float: left;
+ padding-top: 3px;
}
.expand h1 span {
@@ -64,6 +66,15 @@ a img {
margin-right: 2em;
}
+.expander {
+ clear:left;
+}
+
+.controls {
+ margin-top: 3px;
+ text-align: right;
+}
+
.center {
text-align: center;
}