Merge pull request #35 from wmantly/gui

Gui
This commit is contained in:
William Mantly 2020-04-11 23:11:02 -04:00 committed by GitHub
commit 768141d246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4608 additions and 4 deletions

4602
nodejs/public/js/moment.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,8 +2,8 @@
<script id="rowTemplate" type="text/html">
<tr action="api" class="<<fresh>>">
<input type="hidden" name="host" value="<< host >>" />
<td><a target="_blank" href="http://<<host>>"><<host>></a></td>
<td><<ip>></td>
<td><a target="_blank" href="<<forcessl>><<host>>"><<forcessl>><<host>></a></td>
<td><< targetssl >><< ip >>:<< targetPort >></td>
<td class="hidden-xs"><<updated_on>></td>
<td>
<button type="button" data-host="<< host >>" onclick="editHost(this);" class="btn btn-sm btn-default">Edit</button>
@ -47,6 +47,9 @@
if(err) return app.util.actionMessage(err, {type: 'danger'});
if(data){
$.each(data, function( key, value ) {
value['updated_on'] = moment(value['updated_on'], "x").fromNow();
value['targetssl'] = value['targetssl'] ? "https://" : "http://";
value['forcessl'] = value['forcessl'] ? "https://" : "http://";
host_row = ich.rowTemplate(value);
$('#tableAJAX').append(host_row);
});
@ -150,8 +153,6 @@
<input type="text" name="host" class="form-control" placeholder="ex: proxy.cloud-ops.net" validate=":3" >
</div>
<hr />
<div class="form-group">
<label class="control-label">Target IP or Host Name</label>
<input type="text" name="ip" class="form-control" placeholder="ex: 10.10.10.10" validate=":3" />

View File

@ -15,6 +15,7 @@
<script type="text/javascript" src='/static/js/ICanHaz.js'></script>
<script type="text/javascript" src="/static/js/app.js"></script>
<script type="text/javascript" src="/static/js/val.js"></script>
<script type="text/javascript" src="/static/js/moment.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->