-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paranoid GUI #378
Paranoid GUI #378
Changes from all commits
77b9f98
7924366
5cb0824
02843ed
7d65501
1e20917
36e93d2
25ce1ff
15387d2
a119ad0
439e9d1
faea01c
5fefd5e
9db0382
308794f
e957cbd
a4386fa
7374ba3
5410720
59977f8
135b48c
a600115
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,9 @@ _testmain.go | |
|
||
# TLS cert/key files | ||
*.pem | ||
|
||
node_modules/ | ||
|
||
**/bootstrap.min.css | ||
**/site.css | ||
**/jquery-2.2.2.min.js |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Paranoid GUI # | ||
|
||
## Preconditions ## | ||
You must have [Node Webkit](http://nwjs.io/) installed. | ||
|
||
You also must have [Nodejs](https://nodejs.org/en/) including npm installed | ||
|
||
paranoid-cli must be installed and within your $PATH | ||
|
||
|
||
## Build Instructions ## | ||
Navigate into this directory inside a terminal and run the following commands. | ||
``` | ||
npm install | ||
sh init.sh | ||
``` | ||
|
||
## Running the GUI ## | ||
After following the build instructions make sure you are still in the directory and run the following command: | ||
``` | ||
nw . | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
@import url("http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600"); | ||
|
||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
font-family: 'Open Sans'; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
} | ||
|
||
div#header { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IDs should not be used for styling. Applies to all cases further on in the file as well |
||
width: 100%; | ||
height: 50px; | ||
background-color: #2c3e50; | ||
margin: 0 auto; | ||
} | ||
|
||
.logo { | ||
float: left; | ||
margin-top: 8px; | ||
} | ||
|
||
.logo a{ | ||
font-size: 1.6em; | ||
color: #fff; | ||
margin-left: 10px; | ||
} | ||
|
||
.logo a span { | ||
font-weight: 300; | ||
} | ||
|
||
div#container { | ||
width: 100%; | ||
margin: 0 auto; | ||
} | ||
|
||
.sidebar { | ||
width: 250px; | ||
height: -webkit-calc(100% - 50px); /* Chrome, Safari */ | ||
background-color: #171717; | ||
float: left; | ||
} | ||
|
||
.content { | ||
width: auto; | ||
height: -webkit-calc(100% - 50px); /* Chrome, Safari */ | ||
background-color: #95a5a6; | ||
margin-left: 250px; | ||
padding: 15px; | ||
overflow-y: scroll; | ||
} | ||
|
||
.devs { | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.content p { | ||
color: #424242; | ||
font-size: 0.7em; | ||
} | ||
|
||
#badge { | ||
float: right; | ||
} | ||
|
||
#refreshButton { | ||
float: right; | ||
} | ||
|
||
ul#nav li{ | ||
list-style: none; | ||
} | ||
|
||
ul#nav li a{ | ||
color: #ccc; | ||
display: block; | ||
padding: 10px; | ||
font-size: 0.8em; | ||
border-bottom: 1px solid #0A0A0A; | ||
-webkit-transition: 0.2s; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just declaring it as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i know but i specifically want 0.2s |
||
} | ||
|
||
ul#nav li a:hover { | ||
background-color: #030303; | ||
color: #fff; | ||
padding-left: 20px; | ||
} | ||
|
||
ul#nav li a.selected { | ||
padding-left: 30px; | ||
font-weight: bold; | ||
} | ||
|
||
div#box { | ||
margin-top: 15px; | ||
} | ||
|
||
div#box .box-top { | ||
color: #fff; | ||
text-shadow: 0px 0px 1px #000; | ||
background-color: #2980b9; | ||
padding: 5px; | ||
padding-left: 15px; | ||
font-weight: 500; | ||
|
||
} | ||
|
||
div#box .box-panel { | ||
padding: 15px; | ||
background-color: #fff; | ||
} | ||
|
||
div#buttons { | ||
padding-top: 15px; | ||
display: flex; | ||
flex-direction: row; | ||
width: 100%; | ||
} | ||
|
||
div#buttons.btn { | ||
width: 33%; | ||
} | ||
|
||
#refresh_bt { | ||
padding: 100px; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<div id="fsHeader"> | ||
<h1 id="fsName">FileSystem</h1> | ||
<hr> | ||
</div> | ||
|
||
<div id="fsStatus"> | ||
<h3>Status <span class="label label-success" id="fsMountedLabel">Mounted</span> | ||
<button class="btn btn-normal" id="refreshButton" onClick="refreshButtonClicked()">refresh</button></h3> | ||
|
||
<div class="onlyForMountedSection"> | ||
<div class="mountpointSection"> | ||
<h5>Mountpoint</h5> | ||
<ul class="list-group"> | ||
<li class="list-group-item"><div id="mountpoint">Must be mounted to get mountpoint</div></li> | ||
</ul> | ||
<button class="btn btn-normal" id="openButton" onclick="openButtonPressed()">Open</button> | ||
</div> | ||
|
||
<div class="detailedStatus"> | ||
<h5>Detailed status</h5> | ||
<ul class="list-group"> | ||
<li class="list-group-item"><div id="clistatus">Must be mounted to get detailed status</div></li> | ||
</ul> | ||
</div> | ||
|
||
<div class="nodesDiv"> | ||
<h5>Nodes</h5> | ||
<ul class="list-group"> | ||
<li class="list-group-item"><div id="nodes">Must be mounted to get node list</div></li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<button class="btn btn-warning" id="mountUnmountButton" onClick="mountUnmountButtonClicked()">Mount</button> | ||
<button class="btn btn-normal" id="autoMountButton" onClick="automountButtonClicked()">Automount</button> | ||
<hr> | ||
</div> | ||
|
||
<div id="fsMountSection"> | ||
<h3>Mount your FileSystem</h3> | ||
<form id="fsMountForm"> | ||
<label for="location">Location</label> | ||
<input type="file" id="location" class='form-control' placeholder="Directory in which to mount your filesystem" required webkitdirectory directory multiple> | ||
<label for="interface">Interface</label> | ||
<input type="text" id="interface" class='form-control' placeholder="A network interface over which to make connections"> | ||
<label for="discovery">Discovery Server</label> | ||
<input type="text" id="discovery" class='form-control' placeholder="The address of the discovery server - ip:port"> | ||
<label for="password">Pool Password</label> | ||
<input type="text" id="password" class='form-control' placeholder="The pool password"> | ||
<button type="submit" class="btn btn-success">Mount</button> | ||
</form> | ||
<hr> | ||
</div> | ||
|
||
<div id="fsAttributes"> | ||
<h3>Attributes</h3> | ||
<ul class="list-group" id="fsAttributesList"> | ||
<li class="list-group-item" id="fsAttributeEncrypted">Encrypted<span class="label label-success" id="badge">YES</span></li> | ||
<li class="list-group-item" id="fsAttributeNetwork">Network<span class="label label-success" id="badge">YES</span></li> | ||
<li class="list-group-item" id="fsAttributeKeygen">Key Generated<span class="label label-success" id="badge">YES</span></li> | ||
<li class="list-group-item" id="fsAttributePool">Pool<span class="label label-primary" id="badge">strange_fox</span></li> | ||
<li class="list-group-item" id="fsAttributeUuid">UUID<span class="label label-primary" id="badge">e256a4ed-43c2-4011-a1c8-545bc73cc021</span></li> | ||
</ul> | ||
<hr> | ||
</div> | ||
|
||
<div id="fsDeleteSection"> | ||
<h3>Delete FileSystem</h3> | ||
<label for="nameCheck">Confirm Deletion</label> | ||
<input type="text" name="nameCheck" class='form-control' placeholder="Enter the filesystem name" id="nameCheckText"> | ||
<button type="submit" class="btn btn-danger" id="deleteButton">Delete</button> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<h1>PFSD Status</h1> | ||
<h3><span class="label label-success" id="runningLabel">running</span></h3> | ||
<hr> | ||
<button class="btn btn-primary" onclick="rowClicked(fileSystems.length)">Create New Filesystem</button> | ||
<hr> | ||
<h1>Credits</h1> | ||
<h2>Co-Ordinator</h2> | ||
<a style="text-decoration:none; color:inherit;" href="#" onclick='require("open")("https://github.com/smblott-github")'><img src="images/Stephen_Blott.jpg"/> Stehpen Blott</a> | ||
<br> | ||
<h2>Developers</h2> | ||
<div class="devs"> | ||
<a style="text-decoration:none; color:inherit;" href="#" onclick='require("open")("https://github.com/CanOpener")'><img src="images/Mladen_Kajic.jpg"/> Mladen Kajic</a> <br> | ||
<a style="text-decoration:none; color:inherit;" href="#" onclick='require("open")("https://github.com/GoldenBadger")'><img src="images/Terry_Bolt.jpg"/> Terry Bolt</a> <br> | ||
<a style="text-decoration:none; color:inherit;" href="#" onclick='require("open")("https://github.com/ConorGriffin37")'><img src="images/Conor_Griffin.jpg"/> Conor Griffin</a> <br> | ||
<a style="text-decoration:none; color:inherit;" href="#" onclick='require("open")("https://github.com/VoyTechnology")'><img src="images/Wojtek_Bednarzak.jpg"/> Wojtek Bednarzak</a> <br> | ||
<a style="text-decoration:none; color:inherit;" href="#" onclick='require("open")("https://github.com/SeanHealy33")'><img src="images/Sean_Healy.jpg"/> Sean Healy</a> | ||
</div> | ||
<br> | ||
<div>Icons made by <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<h1>Create a new filesystem</h1> | ||
|
||
<form id="newfsForm" action="#" type="submit" onsubmit="newfs(this);"> | ||
<label for="name">Name</label> | ||
<input type="text" name="name" class='form-control' placeholder="Name for your filesystem" required> | ||
<label for="cert">Cert</label> | ||
<input type="file" name="cert" class='form-control' placeholder="Path to existing cert file"> | ||
<label for="key">Key</label> | ||
<input type="file" name="key" class='form-control' placeholder="Path to existing key file"> | ||
<label for="pool">Pool</label> | ||
<input type="text" name="pool" class='form-control' placeholder="Pool name (opt)"><br> | ||
<label for="secure">Secure</label> | ||
<input type="checkbox" name="secure" checked><br> | ||
<label for="network">Use Network</label> | ||
<input type="checkbox" name="network" checked><br> | ||
<label for="encrypted">Encrypted</label> | ||
<input type="checkbox" name="encrypted" checked><br> | ||
|
||
<h3>Cert Generation (ignore if unsecured)</h3> | ||
<label for="numDays">Number of days cert is valid</label> | ||
<input type="number" name="numDays" class='form-control' placeholder="365"><br> | ||
|
||
<label for="organisation">Organisation name</label> | ||
<input type="text" name="organisation" class='form-control' placeholder="The name of your organisation (optional)"><br> | ||
|
||
<label for="hostnames">Hostnames or ips this cert validates (ignore if unsecured)</label> | ||
<input type="text" name="hostnames" class='form-control' placeholder="comma-separated list of hostnames and/or IP addresses this cert will validate (optional)"><br> | ||
|
||
<button type="submit" class="btn btn-success">Submit</button> | ||
</form> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<html> | ||
<head> | ||
<title>Paranoid Filesystems</title> | ||
<script src="scripts/jquery-2.2.2.min.js"></script> | ||
<script src="scripts/filesystems.js"></script> | ||
<script src="scripts/home.js"></script> | ||
<script type="text/javascript"> | ||
var fileSystems = getFilesystems(); | ||
$(document).ready(function () { | ||
loadSideBar(); | ||
setupHome(); | ||
}); | ||
$('a[target=_blank]').on('click', function(){ | ||
require('open')(this.href); | ||
return false; | ||
}); | ||
</script> | ||
<script src="scripts/nav.js"></script> | ||
<link rel="stylesheet" type="text/css" href="css/master.css"> | ||
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> | ||
<link rel="stylesheet" type="text/css" href="css/site.css"> | ||
</head> | ||
|
||
<body> | ||
<div id="header"> | ||
<div class="logo"> | ||
<a onclick="rowClicked(-1)">Paranoid<span>Filesystems</span></a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does -1 mean in this instance? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. -1 is the index of the home section |
||
</div> | ||
</div> | ||
|
||
<div id="container"> | ||
<div class="sidebar"> | ||
<ul id="nav"> | ||
</ul> | ||
</div> | ||
|
||
<div class="content"> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
echo "downloading bootstrap" | ||
wget --quiet -O ./css/bootstrap.min.css http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should probably package a make file with the project There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it really necessary? the shell script does the job |
||
|
||
echo "downloading bootflat" | ||
wget --quiet -O ./css/site.css http://bootflat.github.io/css/site.css | ||
|
||
echo "downloading jquery" | ||
wget --quiet -O ./scripts/jquery-2.2.2.min.js https://code.jquery.com/jquery-2.2.2.min.js | ||
|
||
echo "done." |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "paranoid-gui", | ||
"description": "Paranoid GUI", | ||
"version": "1.0.0", | ||
"main": "index.html", | ||
"window": { | ||
"toolbar": false, | ||
"width": 1000, | ||
"height": 700 | ||
}, | ||
"dependencies": { | ||
"open": "0.0.5" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fonts will not work when there is no internet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neither will any of the filesystems. But what solution do you propose? should i download the actual font file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would work locally.
Yes. Download the font and add it to gitignore, check #387