mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-09 22:51:22 +00:00
GUAC-932: Move connection editor to own page.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div ng-click="context.editConnection(item.wrappedItem)">
|
||||
<a ng-href="#/manage/connections/{{item.identifier}}">
|
||||
<!--
|
||||
Copyright (C) 2014 Glyptodon LLC
|
||||
|
||||
@@ -32,4 +32,4 @@
|
||||
<span class="name">{{item.name}}</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
@@ -1,117 +0,0 @@
|
||||
<!--
|
||||
Copyright 2014 Glyptodon LLC.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
|
||||
|
||||
<!-- Dialog container for the modal -->
|
||||
<div class="dialog-container">
|
||||
<div class="dialog edit">
|
||||
|
||||
<!-- Connection name -->
|
||||
<div class="header">
|
||||
<h2>{{connection.name}}</h2>
|
||||
</div>
|
||||
|
||||
<!-- Main connection edit section -->
|
||||
<div class="body">
|
||||
<div class="form">
|
||||
<div class="settings section">
|
||||
<dl>
|
||||
<dd>
|
||||
<table class="fields section">
|
||||
|
||||
<!-- Edit connection name -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.name' | translate}}</th>
|
||||
|
||||
<td><input type="text" ng-model="connection.name"/></td>
|
||||
</tr>
|
||||
|
||||
<!-- Edit connection location -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.location' | translate}}</th>
|
||||
|
||||
<td>
|
||||
<location-chooser value="connection.parentIdentifier" root-group="rootGroup"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Edit connection protocol -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.protocol' | translate}}</th>
|
||||
<td>
|
||||
<select ng-model="connection.protocol" ng-options="name as 'protocol.' + protocol.name + '.label' | translate for (name, protocol) in protocols | orderBy: name"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</dd>
|
||||
|
||||
<!-- Connection parameters -->
|
||||
<dt>{{'manage.edit.connection.parameters' | translate}}</dt>
|
||||
|
||||
<dd ng-class="{loading: !connection.parameters}">
|
||||
<table class="fields section">
|
||||
|
||||
<!-- All the different possible editable field types -->
|
||||
<tr ng-repeat="parameter in protocols[connection.protocol].parameters">
|
||||
<th>{{'protocol.' + connection.protocol + '.parameters.' + parameter.name + '.label' | translate}}:</th>
|
||||
<td>
|
||||
<guac-connection-parameter protocol="protocols[connection.protocol]" name="parameter.name" parameters="connection.parameters"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</dd>
|
||||
|
||||
<!-- History connection area -->
|
||||
<dt>{{'manage.edit.connection.history.usageHistory' | translate}}</dt>
|
||||
|
||||
<!-- History connection list -->
|
||||
<dd ng-class="{loading: !historyEntryWrappers}">
|
||||
<p ng-hide="historyEntryWrappers.length">{{'manage.edit.connection.history.connectionNotUsed' | translate}}</p>
|
||||
<table class="history section" ng-show="historyEntryWrappers.length">
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.history.username' | translate}}</th>
|
||||
<th>{{'manage.edit.connection.history.startTime' | translate}}</th>
|
||||
<th>{{'manage.edit.connection.history.duration' | translate}}</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr ng-repeat="wrapper in historyEntryWrappers">
|
||||
<td class="username">{{wrapper.entry.username}}</td>
|
||||
<td class="start">{{wrapper.entry.startDate | date:'short'}}</td>
|
||||
<td class="duration">{{wrapper.durationText | translate:"{VALUE: wrapper.duration.value, UNIT: wrapper.duration.unit}"}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Control buttons -->
|
||||
<div class="footer">
|
||||
<button ng-click="save()">{{'manage.edit.connection.save' | translate}}</button>
|
||||
<button ng-click="close()">{{'manage.edit.connection.cancel' | translate}}</button>
|
||||
<button ng-click="delete()" class="danger">{{'manage.edit.connection.delete' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -1,4 +1,4 @@
|
||||
<div>
|
||||
<div class="location-chooser">
|
||||
<!--
|
||||
Copyright 2014 Glyptodon LLC.
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Open the dropdown -->
|
||||
<!-- Chosen group name -->
|
||||
<div ng-click="toggleMenu()" class="location">{{chosenConnectionGroupName}}</div>
|
||||
|
||||
|
||||
<!-- Dropdown hierarchical menu of groups -->
|
||||
<div ng-show="menuOpen" class="dropdown">
|
||||
<guac-group-list
|
||||
context="groupListContext"
|
||||
@@ -32,4 +32,5 @@
|
||||
connection-group="rootGroup"
|
||||
connection-group-template="'app/manage/templates/locationChooserConnectionGroup.html'"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@@ -57,7 +57,7 @@ THE SOFTWARE.
|
||||
|
||||
<!-- Control to create a new connection or group -->
|
||||
<div class="connection-add-form">
|
||||
<button ng-click="newConnection()" class="add-connection">{{'manage.newConnection' | translate}}</button>
|
||||
<a class="add-connection button" href="#/manage/connections/">{{'manage.newConnection' | translate}}</a>
|
||||
<button ng-click="newConnectionGroup()" class="add-connection-group">{{'manage.newGroup' | translate}}</button>
|
||||
</div>
|
||||
|
||||
|
@@ -0,0 +1,107 @@
|
||||
<!--
|
||||
Copyright 2014 Glyptodon LLC.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<div class="logout-panel">
|
||||
<a class="back button" href="#/manage/">{{'manage.back' | translate}}</a>
|
||||
<a class="logout button" ng-click="logout()">{{'home.logout' | translate}}</a>
|
||||
</div>
|
||||
|
||||
<!-- Connection name -->
|
||||
<h2>{{'manage.edit.connection.title' | translate}}</h2>
|
||||
|
||||
<!-- Main connection edit section -->
|
||||
<div class="info">
|
||||
<table>
|
||||
|
||||
<!-- Edit connection name -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.name' | translate}}</th>
|
||||
|
||||
<td><input type="text" ng-model="connection.name"/></td>
|
||||
</tr>
|
||||
|
||||
<!-- Edit connection location -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.location' | translate}}</th>
|
||||
|
||||
<td>
|
||||
<location-chooser value="connection.parentIdentifier" root-group="rootGroup"></location-chooser>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Edit connection protocol -->
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.protocol' | translate}}</th>
|
||||
<td>
|
||||
<select ng-model="connection.protocol" ng-options="name as 'protocol.' + protocol.name + '.label' | translate for (name, protocol) in protocols | orderBy: name"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Connection parameters -->
|
||||
<h2>{{'manage.edit.connection.parameters' | translate}}</h2>
|
||||
|
||||
<div class="parameters" ng-class="{loading: !parameters}">
|
||||
<table class="fields">
|
||||
|
||||
<!-- All the different possible editable field types -->
|
||||
<tr ng-repeat="parameter in protocols[connection.protocol].parameters">
|
||||
<th>{{'protocol.' + connection.protocol + '.parameters.' + parameter.name + '.label' | translate}}:</th>
|
||||
<td>
|
||||
<guac-connection-parameter protocol="protocols[connection.protocol]" name="parameter.name" parameters="parameters"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Form action buttons -->
|
||||
<div class="action-buttons">
|
||||
<button ng-click="save()">{{'manage.edit.connection.save' | translate}}</button>
|
||||
<button ng-click="close()">{{'manage.edit.connection.cancel' | translate}}</button>
|
||||
<button ng-click="delete()" class="danger">{{'manage.edit.connection.delete' | translate}}</button>
|
||||
</div>
|
||||
|
||||
<!-- History connection area -->
|
||||
<h2>{{'manage.edit.connection.history.usageHistory' | translate}}</h2>
|
||||
|
||||
<!-- History connection list -->
|
||||
<div class="history" ng-class="{loading: !historyEntryWrappers}">
|
||||
<p ng-hide="historyEntryWrappers.length">{{'manage.edit.connection.history.connectionNotUsed' | translate}}</p>
|
||||
<table ng-show="historyEntryWrappers.length">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{'manage.edit.connection.history.username' | translate}}</th>
|
||||
<th>{{'manage.edit.connection.history.startTime' | translate}}</th>
|
||||
<th>{{'manage.edit.connection.history.duration' | translate}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="wrapper in historyEntryWrappers">
|
||||
<td class="username">{{wrapper.entry.username}}</td>
|
||||
<td class="start">{{wrapper.entry.startDate | date:'short'}}</td>
|
||||
<td class="duration">{{wrapper.durationText | translate:"{VALUE: wrapper.duration.value, UNIT: wrapper.duration.unit}"}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
Reference in New Issue
Block a user