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>
32 <div id="proxy-connectors-view-tabs-content" class="tab-content">
33 <div id="proxy-connectors-view" class="tab-pane active">
34 <table class="table table-striped table-bordered" id="proxyConnectorsTable"
35 data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko-proxy-connectors-grid',pageLinksId:'proxy-connectorsPagination'">
37 <div id="proxy-connectorsPagination"></div>
39 <div id="proxy-connectors-edit" class="tab-pane"></div>
44 <script id='ko-proxy-connectors-grid' type='text/x-jquery-tmpl'>
47 <th title="${$.i18n.prop('proxy-connectors.grid.managedrepo.title')}">
48 ${$.i18n.prop('proxy-connectors.grid.managedrepo.grid.header')}
50 <th title="${$.i18n.prop('proxy-connectors.grid.remoterepo.title')}">
51 ${$.i18n.prop('proxy-connectors.grid.remoterepo.grid.header')}
54 ${$.i18n.prop('edit')}
57 ${$.i18n.prop('delete')}
62 {{each(i, row) itemsOnCurrentPage()}}
64 <td>${row.sourceRepoId()}</td>
65 <td>${row.targetRepoId()}-${row.order()}</td>
67 <a data-original-title="${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}"
68 data-bind="event: { mouseover: function(){ showSettings(row)},},click: function(){ editProxyConnector(row)}"
69 id="proxy-connectors-grid-remoterepo-settings-edit-${row.sourceRepoId()}-${row.targetRepoId()}" href="#">
70 ${$.i18n.prop('edit')}
72 <div id="proxy-connectors-grid-remoterepo-settings-content-${row.sourceRepoId()}-${row.targetRepoId()}"
73 style="display:none"></div>
76 <a href="#" data-bind="click: function(){ deleteProxyConnector(row)}">
77 <img src="images/edit-cut.png" title="${$.i18n.prop('delete')}"/>
83 <div id="proxy-connectors-grid-remoterepo-settings-content-${val}-${targetRepoId}" style="display:none"></div>
86 <script id='proxy-connectors-remote-settings-popover-tmpl' type='text/x-jquery-tmpl'>
89 ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${proxyId}
91 ${$.i18n.prop('proxy-connectors.remoterepo.settings.networkproxy')}: ${$.i18n.prop('none')}
95 <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
98 {{each(i, entry) policiesEntries}}
100 <td>${entry.key}</td>
101 {{if $.isFunction( entry.value ) }}
102 <td>function=====${entry.value()}</td>
104 <td>${entry.value}</td>
113 <script id="proxy-connector-edit-form-tmpl" type='text/x-jquery-tmpl'>
115 <form id="proxy-connector-edit-form" class="form-horizontal">
116 <fieldset id="remote-repository-edit-fieldset">
117 <div class="control-group">
118 <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.network-proxy.id')}</label>
119 <div class="controls">
121 data-bind="options: proxyConnectorsViewModel.networkProxies, optionsText: 'id',optionsValue:'id',
122 value: proxyConnector.proxyId, optionsCaption: 'direct connection'"></select>
125 <div class="control-group">
126 <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.managed.repository.id')}</label>
127 <div class="controls">
128 <select id="sourceRepoId"
129 data-bind="options: proxyConnectorsViewModel.managedRepositories, optionsText: 'id',optionsValue:'id',
130 value: proxyConnector.sourceRepoId"></select>
133 <div class="control-group">
134 <label class="control-label" for="proxyId">${$.i18n.prop('proxy-connector.remote.repository.id')}</label>
135 <div class="controls">
136 <select id="targetRepoId"
137 data-bind="options: proxyConnectorsViewModel.remoteRepositories, optionsText: 'id',optionsValue:'id',
138 value: proxyConnector.targetRepoId"></select>
141 <div class="control-group span6">
142 <table class="table">
144 <th colspan="2">${$.i18n.prop('proxy-connector.policies')}</th>
146 <tbody data-bind="foreach: proxyConnectorsViewModel.policyInformations()">
148 <td data-bind="text: name"></td>
150 <select data-bind="options: getPolicyOptions(id()),value:getSelectedPolicyOption(id()),attr: { id: 'policy-'+id() }"></select>
156 <div class="control-group span6">
157 <h4>${$.i18n.prop('proxy-connector.properties')}</h4>
159 <table class="table">
161 <th><input type="text" id="property-key"/></th>
162 <th><input type="text" id="property-value"/></th>
163 <th><a href="#" data-bind="click: function(){ proxyConnector.addProperty() }">${$.i18n.prop('add')}</a></th>
165 <tbody data-bind="foreach: proxyConnector.propertiesEntries">
167 <td data-bind="text: key"></td>
168 <td data-bind="text: value"></td>
169 <td><a href="#" data-bind="click: function(){$data.deleteProperty(key)}">${$.i18n.prop('delete')}</a></td>
175 <div class="control-group span6">
176 <h4>${$.i18n.prop('proxy-connector.blacklist')}</h4>
177 <table class="table">
179 <th><input type="text" id="blacklist-value"/></th>
180 <th><a href="#" data-bind="click: function(){ addBlacklistPattern() }">${$.i18n.prop('add')}</a></th>
182 <tbody data-bind="foreach: proxyConnector.blackListPatterns">
184 <td data-bind="text: $data"></td>
185 <td><a href="#" data-bind="click: function(){removeBlacklistPattern($data)}">${$.i18n.prop('delete')}</a></td>
192 <div class="control-group span6">
193 <h4>${$.i18n.prop('proxy-connector.whitelist')}</h4>
194 <table class="table">
196 <th><input type="text" id="whitelist-value"/></th>
197 <th><a href="#" data-bind="click: function(){ addWhitelistPattern() }">${$.i18n.prop('add')}</a></th>
199 <tbody data-bind="foreach: proxyConnector.whiteListPatterns">
201 <td data-bind="text: $data"></td>
202 <td><a href="#" data-bind="click: function(){removeWhitelistPattern($data)}">${$.i18n.prop('delete')}</a></td>
210 <button id="proxy-connector-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
212 ${("#network-proxy-btn-save").button('reset')}
214 <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>