-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.html
145 lines (121 loc) · 5.01 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<html ng-app="VNCapp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap-theme.min.css">
<script type="text/javascript" src="bower_components/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="//localhost:35729/livereload.js"></script>
<style media="screen">
body {
padding-top: 70px;
padding-bottom: 30px;
}
</style>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">angular-noVNC</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="https://github.com/rootStar-lock/angular-noVNC.git">Home</a></li>
<li><a href="https://github.com/rootStar-lock/angular-noVNC/blob/master/README.md">Docs</a></li>
</ul>
</div>
</div>
</div>
<div class="container" data:ng-controller="VNCController">
<div class="page-header">
<h1>Connections</h1>
</div>
<div class="row">
<div class="col-sm-4 col-md-6" data:ng-repeat="connection in connections">
<div class="thumbnail">
<button type="button" class="close" data-dismiss="alert" data:ng-click="removeConnection($index)"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<vnc
data:ng-init = "display = { width: 500, fitTo: 'width' }; viewOnly = false; trueColor = true; states=[]; path='websockify'"
data:style = "{ margin: '5px 20px' }"
data:view-only = "viewOnly"
data:true-color = "trueColor"
data:display = "display"
data:host = "{{host}}"
data:port = "{{port}}"
data:path = "{{path}}"
data:is-connected="connected"
data:states="states"
></vnc>
<div class="caption">
<form role="form">
<div class="form-group">
<label for="host">Host</label>
<input type="text" id="host" class="form-control" placeholder="host" data:ng-model="host">
</div>
<div class="form-group">
<label for="path">Path</label>
<input type="text" id="path" class="form-control" placeholder="path" data:ng-model="path">
</div>
<div class="form-group">
<label for="port">Port</label>
<input type="text" id="port" class="form-control" placeholder="port" data:ng-model="port">
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="text" id="password" class="form-control" placeholder="password" data:ng-model="password">
</div>
<div class="form-group" data:ng-init="connected=false">
<button type="button" class="btn btn-sm btn-primary" data:ng-hide="connected" data:ng-click="connected=true">Connect</button>
<button type="button" class="btn btn-sm btn-danger" data:ng-hide="!connected" data:ng-click="connected=false">Disconnect</button>
<button type="button" class="btn btn-sm btn-default" data:ng-click="display.fullScreen=true">Full screen</button>
<div class="checkbox">
<label>
<input type="checkbox" data:ng-model="viewOnly"> View only
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data:ng-model="trueColor"> True color
</label>
</div>
<details>
<summary>states</summary>
<div data:ng-repeat="state in states">
<strong>{{state.status}}</strong>:<span>{{state.msg}}</span>
</div>
</details>
</div>
</form>
</div>
</div>
</div>
</div>
<button class="btn btn-lg btn-success" ng-click="addConnection()">Add connection</button>
</div>
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="dist/angular-noVNC.js"></script>
<script type="text/javascript">
var app = angular.module('VNCapp', ['noVNC']);
app.controller('VNCController', ['$scope',
function($scope) {
$scope.connections = [];
$scope.addConnection = function () {
$scope.connections.push({});
}
$scope.removeConnection = function (index) {
$scope.connections.splice(index, 1);
}
}
]);
</script>
</body>
</html>