2 ~ Licensed to the Apache Software Foundation (ASF) under one
3 ~ or more contributor license agreements. See the NOTICE file
4 ~ distributed with this work for additional information
5 ~ regarding copyright ownership. The ASF licenses this file
6 ~ to you under the Apache License, Version 2.0 (the
7 ~ "License"); you may not use this file except in compliance
8 ~ with the License. You may obtain a copy of the License at
10 ~ http://www.apache.org/licenses/LICENSE-2.0
12 ~ Unless required by applicable law or agreed to in writing,
13 ~ software distributed under the License is distributed on an
14 ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 ~ KIND, either express or implied. See the License for the
16 ~ specific language governing permissions and limitations
19 <script id="proxyConnectorsMain" type="text/html">
20 <div class="page-header">
21 <h2><img src="images/preferences-system-network-proxy-32-32.png"/>${$.i18n.prop('proxy-connectors.list')}</h2>
24 <ul id="proxy-connectors-view-tabs" class="nav nav-tabs">
25 <li id="proxy-connectors-view-tabs-li-grid" class="active">
26 <a data-toggle="tab" href="#proxy-connectors-view" id="proxy-connectors-view-tabs-a-network-proxies-grid">${$.i18n.prop('proxy-connectors.grid.tab.title')}</a>
28 <li id="proxy-connectors-view-tabs-li-edit">
29 <a data-toggle="tab" href="#proxy-connectors-edit" id="proxy-connectors-view-tabs-a-edit">${$.i18n.prop('add')}</a>
31 <li id="proxy-connectors-view-tabs-li-edit-order">
32 <a data-toggle="tab" href="#proxy-connectors-edit-order" id="proxy-connectors-view-tabs-a-edit-order">${$.i18n.prop('proxy-connectors.grid.tab.edit.order')}</a>
35 <div id="proxy-connectors-view-tabs-content" class="tab-content">
36 <div id="proxy-connectors-view" class="tab-pane active">
37 <div id="proxy-connectors-bulk-save-btn" data-bind='template:{name:"proxy-connectors-bulk-save-tmpl"}'></div>
38 <table class="table table-striped table-bordered" id="proxyConnectorsTable"
39 data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko-proxy-connectors-grid',pageLinksId:'proxy-connectorsPagination'">
41 <div id="proxy-connectorsPagination"></div>
43 <div id="proxy-connectors-edit" class="tab-pane"></div>
44 <div id="proxy-connector-edit-order" class="tab-pane span8">
45 <div id="proxy-connector-edit-order-managed-repository-div" data-bind='template:{name:"proxy-connector-edit-order-managed-repository-tmpl"}'></div>
46 <div id="proxy-connector-edit-order-div"
47 data-bind="sortable: { template: 'proxy-connector-edit-order-tmpl', data: proxyConnectors,afterMove: proxyConnectorMoved}">
54 <script id='ko-proxy-connectors-grid' type='text/html'>
57 <th title="${$.i18n.prop('proxy-connectors.grid.managedrepo.title')}">
58 ${$.i18n.prop('proxy-connectors.grid.managedrepo.grid.header')}
60 <th title="${$.i18n.prop('proxy-connectors.grid.remoterepo.title')}">
61 ${$.i18n.prop('proxy-connectors.grid.remoterepo.grid.header')}
63 <th>${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}</th>
64 <th>${$.i18n.prop('edit')}</th>
65 <th>${$.i18n.prop('delete')}</th>
66 <th>${$.i18n.prop('save')}</th>
67 <th>${$.i18n.prop('proxy-connectors.grid.header.order')}</th>
71 {{each(i, row) itemsOnCurrentPage()}}
72 <tr data-bind="css:{ 'modified': row.modified()}">
73 <td>${row.sourceRepoId()}</td>
74 <td>${row.targetRepoId()}</td>
76 <img src="images/utilities-system-monitor-22-22.png" id="proxy-connectors-grid-remoterepo-settings-edit-${row.sourceRepoId()}-${row.targetRepoId()}"
77 data-original-title="${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}"
78 data-bind="event: { mouseover: function(){ showSettings(row)},}">
79 <div id="proxy-connectors-grid-remoterepo-settings-content-${row.sourceRepoId()}-${row.targetRepoId()}"
80 style="display:none"></div>
83 <a data-bind="click: function(){ editProxyConnector(row)}" href="#">
84 <img src="images/edit-find-22-22.png" title="${$.i18n.prop('edit')}">
88 <a href="#" data-bind="click: function(){ deleteProxyConnector(row)}">
89 <img src="images/edit-cut-22-22.png" title="${$.i18n.prop('delete')}"/>
94 <a href="#" class="btn btn-warning" data-bind="click: function(){ updateProxyConnector(row)}">
95 ${$.i18n.prop('save')}
100 {{if orderChangeAware(row)}}
101 <a href="#" class="btn btn-info" data-bind="click: function(){ displayOrderEdit(row)}">
102 ${$.i18n.prop('proxy-connectors.order.edit')}
104 <span class="badge badge-info">${row.order()}</span>
110 <div id="proxy-connectors-grid-remoterepo-settings-content-${val}-${targetRepoId}" style="display:none"></div>
113 <script id='proxy-connectors-remote-settings-popover-tmpl' type='text/html'>
116 ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${proxyConnector.proxyId}
118 ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${$.i18n.prop('none')}
120 <table class="table">
122 <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
125 {{each(i, entry) proxyConnector.policiesEntries}}
126 {{var name = proxyConnectorsViewModel.findPolicyInformationName(entry.key)}}
129 <td>${entry.value}</td>
137 <script id="proxy-connector-edit-form-tmpl" type='text/html'>
139 <form id="proxy-connector-edit-form" class="well form-horizontal">
140 <fieldset id="remote-repository-edit-fieldset">
141 <div class="control-group">
142 <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.network-proxy.id')}</label>
143 <div class="controls">
145 data-bind="options: proxyConnectorsViewModel.networkProxies, optionsText: 'id',optionsValue:'id',
146 value: proxyConnector.proxyId, optionsCaption: 'direct connection'"></select>
149 <div class="control-group">
150 <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.managed.repository.id')}</label>
151 <div class="controls">
152 <select id="sourceRepoId"
153 data-bind="options: proxyConnectorsViewModel.managedRepositories, optionsText: 'id',optionsValue:'id',
154 value: proxyConnector.sourceRepoId,attr: {disabled: isUpdate() }"></select>
157 <div class="control-group">
158 <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.remote.repository.id')}</label>
159 <div class="controls">
160 <select id="targetRepoId"
161 data-bind="options: proxyConnectorsViewModel.remoteRepositories, optionsText: 'id',optionsValue:'id',
162 value: proxyConnector.targetRepoId,attr: {disabled: isUpdate() }"></select>
166 <div class="control-group span6">
167 <table class="table">
169 <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
171 <tbody data-bind="foreach: proxyConnectorsViewModel.policyInformations()">
173 <td data-bind="text: name"></td>
176 data-bind="options: getPolicyOptions(id()),value:getSelectedPolicyOption(id()),
177 attr: { id: 'policy-'+id() },event: { change: function(){ changePolicyOption(id())},}"
186 <div class="control-group span6">
187 <h4>${$.i18n.prop('proxy-connector.properties')}</h4>
188 <table class="table">
190 <th><input type="text" id="property-key"/></th>
191 <th><input type="text" id="property-value"/></th>
192 <th><a href="#" data-bind="click: function(){ addProperty() }">${$.i18n.prop('add')}</a></th>
194 <tbody data-bind="foreach: proxyConnector.propertiesEntries">
196 <td data-bind="text: key"></td>
197 <td data-bind="text: value"></td>
198 <td><a href="#" data-bind="click: function(){ $parent.deleteProperty(key)}">${$.i18n.prop('delete')}</a></td>
205 <div class="control-group span6">
206 <h4>${$.i18n.prop('proxy-connector.blacklist')}</h4>
207 <table class="table">
209 <th><input type="text" id="blacklist-value"/></th>
210 <th><a href="#" data-bind="click: function(){ addBlacklistPattern() }">${$.i18n.prop('add')}</a></th>
212 <tbody data-bind="foreach: proxyConnector.blackListPatterns">
214 <td data-bind="text: $data"></td>
215 <td><a href="#" data-bind="click: function(){removeBlacklistPattern($data)}">${$.i18n.prop('delete')}</a></td>
222 <div class="control-group span6">
223 <h4>${$.i18n.prop('proxy-connector.whitelist')}</h4>
224 <table class="table">
226 <th><input type="text" id="whitelist-value"/></th>
227 <th><a href="#" data-bind="click: function(){ addWhitelistPattern() }">${$.i18n.prop('add')}</a></th>
229 <tbody data-bind="foreach: proxyConnector.whiteListPatterns">
231 <td data-bind="text: $data"></td>
232 <td><a href="#" data-bind="click: function(){removeWhitelistPattern($data)}">${$.i18n.prop('delete')}</a></td>
240 <button id="proxy-connector-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
242 ${("#network-proxy-btn-save").button('reset')}
244 <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
249 <script id="proxy-connectors-bulk-save-tmpl" type='text/html'>
251 <a data-bind="click: updateModifiedProxyConnectors" class="btn btn-danger" href="#">${$.i18n.prop('save.all')}</a>
255 <script id="proxy-connector-edit-order-tmpl" type='text/html'>
256 <div class="well draggable-item network-proxy-remote-item">
257 {{var remoteRepository=$parent.findRemoteRepository(targetRepoId)}}
258 <div class="row-fluid">
260 <img src="images/system-software-update-32-32.png"/>
262 <img src="images/utilities-system-monitor-22-22.png"
263 id="proxy-connectors-order-remoterepo-settings-edit-${sourceRepoId()}-${targetRepoId()}"
264 data-original-title="${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}"
265 data-bind="event: { mouseover: function(){ displaySettings(sourceRepoId(),targetRepoId())},}">
266 <div id="proxy-connectors-order-remoterepo-settings-content-${sourceRepoId()}-${targetRepoId()}"
267 style="display:none"></div>
269 <div class="span6 pull-left">
273 ${remoteRepository.name()} (<a href="${remoteRepository.url()}" target="_blank">${remoteRepository.url()}</a>)
277 <span class="badge badge-info">${order}</span>
283 <script id="proxy-connector-edit-order-managed-repository-tmpl" type="text/html">
284 <div class="well row-fluid">
286 <img src="images/applications-internet-32-32.png"/>
290 ${managedRepository.id}
292 ${managedRepository.name}
296 {{if proxyConnectorsViewModel.bulkSave()}}
298 <a data-bind="click: function(){updateModifiedProxyConnectors()}"
299 href="#" class="btn btn-warning">${$.i18n.prop('save.all')}</a></p>
305 <script id="proxy-connector-delete-warning-tmpl" type='text/html'>
307 <span class="label label-warning">${$.i18n.prop('warning.not.undone.operation')}</span>