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/x-jquery-tmpl">
20 <div class="page-header">
21 <h2>${$.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">
45 <ul id="proxy-connector-edit-order-div"
46 data-bind="sortable: { template: 'proxy-connector-edit-order-tmpl', data: proxyConnectors,afterMove: proxyConnectorMoved}">
53 <script id='ko-proxy-connectors-grid' type='text/x-jquery-tmpl'>
56 <th title="${$.i18n.prop('proxy-connectors.grid.managedrepo.title')}">
57 ${$.i18n.prop('proxy-connectors.grid.managedrepo.grid.header')}
59 <th title="${$.i18n.prop('proxy-connectors.grid.remoterepo.title')}">
60 ${$.i18n.prop('proxy-connectors.grid.remoterepo.grid.header')}
62 <th>${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}</th>
63 <th>${$.i18n.prop('edit')}</th>
64 <th>${$.i18n.prop('delete')}</th>
65 <th>${$.i18n.prop('save')}</th>
66 <th>${$.i18n.prop('proxy-connectors.grid.header.order')}</th>
70 {{each(i, row) itemsOnCurrentPage()}}
71 <tr data-bind="css:{ 'modified': row.modified()}">
72 <td>${row.sourceRepoId()}</td>
73 <td>${row.targetRepoId()}</td>
74 <td><img src="images/utilities-system-monitor.png" id="proxy-connectors-grid-remoterepo-settings-edit-${row.sourceRepoId()}-${row.targetRepoId()}"
75 data-original-title="${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}"
76 data-bind="event: { mouseover: function(){ showSettings(row)},}"></td>
78 <a data-bind="click: function(){ editProxyConnector(row)}" href="#">
79 ${$.i18n.prop('edit')}
81 <div id="proxy-connectors-grid-remoterepo-settings-content-${row.sourceRepoId()}-${row.targetRepoId()}"
82 style="display:none"></div>
85 <a href="#" data-bind="click: function(){ deleteProxyConnector(row)}">
86 <img src="images/edit-cut.png" title="${$.i18n.prop('delete')}"/>
91 <a href="#" class="btn btn-warning" data-bind="click: function(){ updateProxyConnector(row)}">
92 ${$.i18n.prop('save')}
97 {{if orderChangeAware(row)}}
98 <a href="#" class="btn btn-warning" data-bind="click: function(){ displayOrderEdit(row)}">
99 ${$.i18n.prop('proxy-connectors.order.edit')}
106 <div id="proxy-connectors-grid-remoterepo-settings-content-${val}-${targetRepoId}" style="display:none"></div>
109 <script id='proxy-connectors-remote-settings-popover-tmpl' type='text/x-jquery-tmpl'>
112 ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${proxyConnector.proxyId}
114 ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${$.i18n.prop('none')}
116 <table class="table">
118 <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
121 {{each(i, entry) proxyConnector.policiesEntries}}
122 {{var name = proxyConnectorsViewModel.findPolicyInformationName(entry.key)}}
125 <td>${entry.value}</td>
133 <script id="proxy-connector-edit-form-tmpl" type='text/x-jquery-tmpl'>
135 <form id="proxy-connector-edit-form" class="form-horizontal">
136 <fieldset id="remote-repository-edit-fieldset">
137 <div class="control-group">
138 <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.network-proxy.id')}</label>
139 <div class="controls">
141 data-bind="options: proxyConnectorsViewModel.networkProxies, optionsText: 'id',optionsValue:'id',
142 value: proxyConnector.proxyId, optionsCaption: 'direct connection'"></select>
145 <div class="control-group">
146 <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.managed.repository.id')}</label>
147 <div class="controls">
148 <select id="sourceRepoId"
149 data-bind="options: proxyConnectorsViewModel.managedRepositories, optionsText: 'id',optionsValue:'id',
150 value: proxyConnector.sourceRepoId,attr: {disabled: isUpdate() }"></select>
153 <div class="control-group">
154 <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.remote.repository.id')}</label>
155 <div class="controls">
156 <select id="targetRepoId"
157 data-bind="options: proxyConnectorsViewModel.remoteRepositories, optionsText: 'id',optionsValue:'id',
158 value: proxyConnector.targetRepoId,attr: {disabled: isUpdate() }"></select>
161 <div class="control-group span6">
162 <table class="table">
164 <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
166 <tbody data-bind="foreach: proxyConnectorsViewModel.policyInformations()">
168 <td data-bind="text: name"></td>
171 data-bind="options: getPolicyOptions(id()),value:getSelectedPolicyOption(id()),
172 attr: { id: 'policy-'+id() },event: { change: function(){ changePolicyOption(id())},}"
179 <div class="control-group span6">
180 <h4>${$.i18n.prop('proxy-connector.properties')}</h4>
182 <table class="table">
184 <th><input type="text" id="property-key"/></th>
185 <th><input type="text" id="property-value"/></th>
186 <th><a href="#" data-bind="click: function(){ addProperty() }">${$.i18n.prop('add')}</a></th>
188 <tbody data-bind="foreach: proxyConnector.propertiesEntries">
190 <td data-bind="text: key"></td>
191 <td data-bind="text: value"></td>
192 <td><a href="#" data-bind="click: function(){ $parent.deleteProperty(key)}">${$.i18n.prop('delete')}</a></td>
198 <div class="control-group span6">
199 <h4>${$.i18n.prop('proxy-connector.blacklist')}</h4>
200 <table class="table">
202 <th><input type="text" id="blacklist-value"/></th>
203 <th><a href="#" data-bind="click: function(){ addBlacklistPattern() }">${$.i18n.prop('add')}</a></th>
205 <tbody data-bind="foreach: proxyConnector.blackListPatterns">
207 <td data-bind="text: $data"></td>
208 <td><a href="#" data-bind="click: function(){removeBlacklistPattern($data)}">${$.i18n.prop('delete')}</a></td>
215 <div class="control-group span6">
216 <h4>${$.i18n.prop('proxy-connector.whitelist')}</h4>
217 <table class="table">
219 <th><input type="text" id="whitelist-value"/></th>
220 <th><a href="#" data-bind="click: function(){ addWhitelistPattern() }">${$.i18n.prop('add')}</a></th>
222 <tbody data-bind="foreach: proxyConnector.whiteListPatterns">
224 <td data-bind="text: $data"></td>
225 <td><a href="#" data-bind="click: function(){removeWhitelistPattern($data)}">${$.i18n.prop('delete')}</a></td>
233 <button id="proxy-connector-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
235 ${("#network-proxy-btn-save").button('reset')}
237 <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
242 <script id="proxy-connectors-bulk-save-tmpl" type='text/x-jquery-tmpl'>
244 <a data-bind="click: updateModifiedProxyConnectors" class="btn btn-danger" href="#">${$.i18n.prop('save.all')}</a>
248 <script id="proxy-connector-edit-order-tmpl" type='text/html'>
251 ${sourceRepoId}-${targetRepoId}-${order}