OLD | NEW |
---|---|
1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> |
3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> |
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html"> |
5 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm l"> | 5 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm l"> |
6 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _behavior.html"> | 6 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _behavior.html"> |
7 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _indicator.html"> | 7 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _indicator.html"> |
8 <link rel="import" href="internet_shared_css.html"> | |
8 <link rel="import" href="network_property_list.html"> | 9 <link rel="import" href="network_property_list.html"> |
9 <link rel="import" href="network_proxy_input.html"> | 10 <link rel="import" href="network_proxy_input.html"> |
10 <link rel="import" href="network_proxy_exclusions.html"> | 11 <link rel="import" href="network_proxy_exclusions.html"> |
11 | 12 |
12 <dom-module id="network-proxy"> | 13 <dom-module id="network-proxy"> |
13 <template> | 14 <template> |
14 <style> | 15 <style include="internet-shared"> |
15 :host { | 16 cr-policy-network-indicator { |
16 display: inline-block; | 17 -webkit-margin-end: 10px; |
17 } | 18 } |
18 | 19 |
19 #selectTypeDiv { | 20 #proxyDiv paper-checkbox { |
21 padding: 10px 0; | |
22 } | |
23 | |
24 #exceptionsDiv { | |
25 padding: 10px 0; | |
26 } | |
27 | |
28 #exceptionsDiv network-proxy-exclusions { | |
20 margin: 10px 0; | 29 margin: 10px 0; |
21 } | 30 } |
22 | |
23 select { | |
24 padding: 5px; | |
25 } | |
26 | |
27 span { | |
28 margin: 5px; | |
29 } | |
30 | |
31 cr-policy-network-indicator { | |
32 -webkit-margin-end: 10px; | |
33 mwrgin-bottom: 5px; | |
34 } | |
35 | |
36 paper-checkbox { | |
37 margin-bottom: 10px; | |
38 } | |
39 | |
40 paper-input { | |
41 margin: -9px 5px 0; | |
42 } | |
43 </style> | 31 </style> |
44 <div id="outer" class="layout vertical flex"> | 32 <!-- Policy indicator --> |
45 <!-- TODO(stevenjb): Use cr-dropdown-menu once available. --> | 33 <div class="settings-box first single-column" |
46 <div class="layout horizontal center" hidden$= | 34 hidden$="[[!isNetworkPolicyControlled( |
47 "[[!isNetworkPolicyControlled(networkProperties.ProxySettings.Type)]]" > | 35 networkProperties.ProxySettings.Type)]]"> |
36 <div class="layout horizontal center"> | |
48 <cr-policy-network-indicator | 37 <cr-policy-network-indicator |
49 property="[[networkProperties.ProxySettings.Type]]"> | 38 property="[[networkProperties.ProxySettings.Type]]"> |
50 </cr-policy-network-indicator> | 39 </cr-policy-network-indicator> |
51 <span>This proxy is enforced by your administrator.</span> | 40 <div>This proxy is enforced by your administrator.</div> |
41 </div> | |
42 </div> | |
43 | |
44 <!-- Proxy type dropdown --> | |
45 <div class="settings-box continuation"> | |
46 <div class="start">Connection type</div> | |
47 <paper-dropdown-menu vertical-align="auto" no-label-float> | |
48 <paper-listbox class="dropdown-content" on-iron-activate="onTypeChange_" | |
49 selected="[[proxy.Type]]" attr-for-selected="value"> | |
50 <template is="dom-repeat" items="[[proxyTypes_]]"> | |
51 <button class="dropdown-item" role="option" value="[[item]]"> | |
52 [[proxyTypeDesc_(item)]] | |
53 </button> | |
54 </template> | |
55 </paper-listbox> | |
56 </paper-dropdown-menu> | |
57 </div> | |
58 | |
59 <!-- Autoconfiguration (PAC) --> | |
60 <div class="settings-box continuation indented" | |
61 hidden$="[[!matches_(proxy.Type, ProxySettingsType.PAC)]]"> | |
62 <div class="start">Autoconfiguration URL:</div> | |
63 <paper-input no-label-float class="flex" value="{{proxy.PAC}}" | |
64 disabled="[[isNetworkPolicyEnforced( | |
65 networkProperties.ProxySettings.PAC)]]" | |
66 on-blur="onProxyInputChange_"> | |
67 </paper-input> | |
68 </div> | |
69 | |
70 <!-- Web Proxy Auto Discovery (WPAD) --> | |
71 <div class="settings-box continuation indented" | |
72 hidden$="[[!matches_(proxy.Type, ProxySettingsType.WPAD)]]"> | |
73 <div class="start">Web Proxy Auto Discovery URL:</div> | |
74 <div>[[WPAD]]</div> | |
75 </div> | |
76 | |
77 <!-- Manual --> | |
78 <div id="proxyDiv" class="settings-box continuation single-column indented" | |
79 hidden$="[[!matches_(proxy.Type, ProxySettingsType.MANUAL)]]"> | |
80 <paper-checkbox checked="{{useSameProxy}}"> | |
81 Use the same proxy for all protocols | |
82 </paper-checkbox> | |
83 <div hidden$="[[!useSameProxy]]" class="layout vertical"> | |
84 <network-proxy-input on-proxy-change="onProxyInputChange_" | |
85 editable="[[isPropertyEditable_(editable, networkProperties, | |
86 'ProxySettings.Manual.HTTPProxy')]]" | |
87 value="{{proxy.Manual.HTTPProxy}}" label="Proxy"> | |
88 </network-proxy-input> | |
89 </div> | |
90 <div hidden$="[[useSameProxy]]" class="layout vertical"> | |
91 <network-proxy-input on-proxy-change="onProxyInputChange_" | |
92 editable="[[isPropertyEditable_(editable, networkProperties, | |
93 'ProxySettings.Manual.HTTPProxy)')]]" | |
94 value="{{proxy.Manual.HTTPProxy}}" label="HTTP Proxy"> | |
95 </network-proxy-input> | |
96 <network-proxy-input | |
97 editable="[[isPropertyEditable_(editable, networkProperties, | |
98 'ProxySettings.Manual.SecureHTTPProxy)')]]" | |
99 value="{{proxy.Manual.SecureHTTPProxy}}" | |
100 label="Secure HTTP Proxy" on-proxy-change="onProxyInputChange_"> | |
101 </network-proxy-input> | |
102 <network-proxy-input on-proxy-change="onProxyInputChange_" | |
103 editable="[[isPropertyEditable_(editable, networkProperties, | |
104 'ProxySettings.Manual.FTPProxy)')]]" | |
105 value="{{proxy.Manual.FTPProxy}}" label="FTP Proxy"> | |
106 </network-proxy-input> | |
107 <network-proxy-input on-proxy-change="onProxyInputChange_" | |
108 editable="[[isPropertyEditable_(editable, networkProperties, | |
109 'ProxySettings.Manual.SOCKS)')]]" | |
110 value="{{proxy.Manual.SOCKS}}" label="SOCKS host"> | |
111 </network-proxy-input> | |
52 </div> | 112 </div> |
53 | 113 |
54 <div id="selectTypeDiv"> | 114 <div id="exceptionsDiv"> |
55 <select id="selectType" on-change="onTypeChange_" | 115 <div>Do not use the proxy settings for these hosts and domains:</div> |
56 disabled$="[[isNetworkPolicyEnforced(networkProperties.ProxySettings .Type)]]"> | 116 <network-proxy-exclusions on-proxy-change="onProxyExclusionsChange_" |
57 <template is="dom-repeat" items="[[proxyTypes_]]"> | 117 exclusions="{{proxy.ExcludeDomains}}"> |
58 <option value="[[item]]">[[proxyTypeDesc_(item)]]</option> | |
59 </template> | |
60 </select> | |
61 </div> | |
62 | |
63 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.PAC)]]" | |
64 class="layout horizontal"> | |
65 <span>Autoconfiguration URL:</span> | |
66 <paper-input no-label-float class="flex" value="{{proxy.PAC}}" | |
67 disabled="[[isNetworkPolicyEnforced(networkProperties.ProxySettings. PAC)]]"> | |
68 on-blur="onProxyInputChange_"> | |
69 </paper-input> | |
70 </div> | |
71 | |
72 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.WPAD)]]" | |
73 class="layout horizontal"> | |
74 <span>Web Proxy Auto Discovery URL:</span><span>[[WPAD]]</span> | |
75 </div> | |
76 | |
77 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.MANUAL)]]" | |
78 class="layout vertical"> | |
79 <paper-checkbox id="useUrl" checked="{{useSameProxy}}"> | |
80 Use the same proxy for all protocols | |
81 </paper-checkbox> | |
82 <div hidden$="[[!useSameProxy]]" class="layout vertical"> | |
83 <network-proxy-input | |
84 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox ySettings.Manual.HTTPProxy')]]" | |
85 value="{{proxy.Manual.HTTPProxy}}" | |
86 label="Proxy" on-proxy-change="onProxyInputChange_"> | |
87 </network-proxy-input> | |
88 </div> | |
89 <div hidden$="[[useSameProxy]]" class="layout vertical"> | |
90 <network-proxy-input | |
91 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox ySettings.Manual.HTTPProxy)')]]" | |
92 value="{{proxy.Manual.HTTPProxy}}" | |
93 label="HTTP Proxy" on-proxy-change="onProxyInputChange_"> | |
94 </network-proxy-input> | |
95 <network-proxy-input | |
96 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox ySettings.Manual.SecureHTTPProxy)')]]" | |
97 value="{{proxy.Manual.SecureHTTPProxy}}" | |
98 label="Secure HTTP Proxy" on-proxy-change="onProxyInputChange_"> | |
99 </network-proxy-input> | |
100 <network-proxy-input | |
101 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox ySettings.Manual.FTPProxy)')]]" | |
102 value="{{proxy.Manual.FTPProxy}}" | |
103 label="FTP Proxy" on-proxy-change="onProxyInputChange_"> | |
104 </network-proxy-input> | |
105 <network-proxy-input | |
106 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox ySettings.Manual.SOCKS)')]]" | |
107 value="{{proxy.Manual.SOCKS}}" | |
108 label="SOCKS host" on-proxy-change="onProxyInputChange_"> | |
109 </network-proxy-input> | |
110 </div> | |
111 | |
112 <span>Do not use the proxy settings for these hosts and domains:</span> | |
113 <network-proxy-exclusions exclusions="{{proxy.ExcludeDomains}}" | |
114 on-proxy-change="onProxyExclusionsChange_"> | |
115 </network-proxy-exclusions> | 118 </network-proxy-exclusions> |
116 <div class="layout horizontal baseline"> | 119 <div class="layout horizontal"> |
117 <paper-input id="proxyExclusion" class="flex" no-label-float> | 120 <paper-input-container no-label-float class="flex"> |
118 </paper-input> | 121 <input id="proxyExclusion" is="iron-input"> |
122 </paper-input-container> | |
119 <paper-button on-tap="onAddProxyExclusionTap_"> | 123 <paper-button on-tap="onAddProxyExclusionTap_"> |
120 Add Exception | 124 Add Exception |
121 </paper-button> | 125 </paper-button> |
122 </div> | 126 </div> |
123 </div> | 127 </div> |
124 </div> | 128 </div> |
129 | |
dschuyler
2016/07/29 02:07:22
nit: remove blank line.
stevenjb
2016/07/29 17:35:18
Done.
| |
125 </template> | 130 </template> |
126 <script src="network_proxy.js"></script> | 131 <script src="network_proxy.js"></script> |
127 </dom-module> | 132 </dom-module> |
OLD | NEW |