OLD | NEW |
1 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> | 1 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/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/polymer/v1_0/paper-styles/paper-styl
es.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/paper-styl
es.html"> |
6 <link rel="import" href="chrome://resources/cr_elements/v1_0/network/cr_onc_type
s.html"> | 6 <link rel="import" href="chrome://resources/cr_elements/v1_0/network/cr_onc_type
s.html"> |
| 7 <link rel="import" href="chrome://resources/cr_elements/v1_0/policy/cr_policy_ne
twork_behavior.html"> |
| 8 <link rel="import" href="chrome://resources/cr_elements/v1_0/policy/cr_policy_ne
twork_indicator.html"> |
7 <link rel="import" href="network_property_list.html"> | 9 <link rel="import" href="network_property_list.html"> |
8 <link rel="import" href="network_proxy_input.html"> | 10 <link rel="import" href="network_proxy_input.html"> |
9 <link rel="import" href="network_proxy_exclusions.html"> | 11 <link rel="import" href="network_proxy_exclusions.html"> |
10 | 12 |
11 <dom-module id="network-proxy"> | 13 <dom-module id="network-proxy"> |
12 <link rel="import" type="css" href="network_proxy.css"> | 14 <link rel="import" type="css" href="network_proxy.css"> |
13 <template> | 15 <template> |
14 <div id="outer" class="layout vertical flex"> | 16 <div id="outer" class="layout vertical flex"> |
15 <!-- TODO(stevenjb): Use cr-dropdown-menu once available. --> | 17 <!-- TODO(stevenjb): Use cr-dropdown-menu once available. --> |
| 18 <div class="layout horizontal center" hidden$= |
| 19 "[[!isNetworkPolicyControlled(networkProperties.ProxySettings.Type)]]"
> |
| 20 <cr-policy-network-indicator |
| 21 property="[[networkProperties.ProxySettings.Type]]"> |
| 22 </cr-policy-network-indicator> |
| 23 <span>This proxy is enforced by your administrator.</span> |
| 24 </div> |
| 25 |
16 <div> | 26 <div> |
17 <select id="selectType" on-change="onTypeChange_"> | 27 <select id="selectType" on-change="onTypeChange_" |
| 28 disabled$="[[isNetworkPolicyEnforced(networkProperties.ProxySettings
.Type)]]"> |
18 <template is="dom-repeat" items="[[proxyTypes_]]"> | 29 <template is="dom-repeat" items="[[proxyTypes_]]"> |
19 <option value="[[item]]">[[proxyTypeDesc_(item)]]</option> | 30 <option value="[[item]]">[[proxyTypeDesc_(item)]]</option> |
20 </template> | 31 </template> |
21 </select> | 32 </select> |
22 </div> | 33 </div> |
23 | 34 |
24 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.PAC)]]" | 35 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.PAC)]]" |
25 class="layout horizontal"> | 36 class="layout horizontal"> |
26 <span>Autoconfiguration URL:</span> | 37 <span>Autoconfiguration URL:</span> |
27 <paper-input no-label-float class="flex" value="{{proxy.PAC}}" | 38 <paper-input no-label-float class="flex" value="{{proxy.PAC}}" |
| 39 disabled="[[isNetworkPolicyEnforced(networkProperties.ProxySettings.
PAC)]]"> |
28 on-blur="onProxyInputChange_"> | 40 on-blur="onProxyInputChange_"> |
29 </paper-input> | 41 </paper-input> |
30 </div> | 42 </div> |
31 | 43 |
32 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.WPAD)]]" | 44 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.WPAD)]]" |
33 class="layout horizontal"> | 45 class="layout horizontal"> |
34 <span>Web Proxy Auto Discovery URL:</span><span>[[WPAD]]</span> | 46 <span>Web Proxy Auto Discovery URL:</span><span>[[WPAD]]</span> |
35 </div> | 47 </div> |
36 | 48 |
37 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.MANUAL)]]" | 49 <div hidden$="[[!matches_(proxy.Type, ProxySettingsType.MANUAL)]]" |
38 class="layout vertical"> | 50 class="layout vertical"> |
39 <paper-checkbox id="useUrl" checked="{{useSameProxy}}"> | 51 <paper-checkbox id="useUrl" checked="{{useSameProxy}}"> |
40 Use the same proxy for all protocols | 52 Use the same proxy for all protocols |
41 </paper-checkbox> | 53 </paper-checkbox> |
42 <div hidden$="[[!useSameProxy]]" class="layout vertical"> | 54 <div hidden$="[[!useSameProxy]]" class="layout vertical"> |
43 <network-proxy-input editable="[[editable]]" | 55 <network-proxy-input |
| 56 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox
ySettings.Manual.HTTPProxy')]]" |
44 value="{{proxy.Manual.HTTPProxy}}" | 57 value="{{proxy.Manual.HTTPProxy}}" |
45 label="Proxy" on-proxy-change="onProxyInputChange_"> | 58 label="Proxy" on-proxy-change="onProxyInputChange_"> |
46 </network-proxy-input> | 59 </network-proxy-input> |
47 </div> | 60 </div> |
48 <div hidden$="[[useSameProxy]]" class="layout vertical"> | 61 <div hidden$="[[useSameProxy]]" class="layout vertical"> |
49 <network-proxy-input editable="[[editable]]" | 62 <network-proxy-input |
| 63 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox
ySettings.Manual.HTTPProxy)')]]" |
50 value="{{proxy.Manual.HTTPProxy}}" | 64 value="{{proxy.Manual.HTTPProxy}}" |
51 label="HTTP Proxy" on-proxy-change="onProxyInputChange_"> | 65 label="HTTP Proxy" on-proxy-change="onProxyInputChange_"> |
52 </network-proxy-input> | 66 </network-proxy-input> |
53 <network-proxy-input editable="[[editable]]" | 67 <network-proxy-input |
| 68 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox
ySettings.Manual.SecureHTTPProxy)')]]" |
54 value="{{proxy.Manual.SecureHTTPProxy}}" | 69 value="{{proxy.Manual.SecureHTTPProxy}}" |
55 label="Secure HTTP Proxy" on-proxy-change="onProxyInputChange_"> | 70 label="Secure HTTP Proxy" on-proxy-change="onProxyInputChange_"> |
56 </network-proxy-input> | 71 </network-proxy-input> |
57 <network-proxy-input editable="[[editable]]" | 72 <network-proxy-input |
| 73 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox
ySettings.Manual.FTPProxy)')]]" |
58 value="{{proxy.Manual.FTPProxy}}" | 74 value="{{proxy.Manual.FTPProxy}}" |
59 label="FTP Proxy" on-proxy-change="onProxyInputChange_"> | 75 label="FTP Proxy" on-proxy-change="onProxyInputChange_"> |
60 </network-proxy-input> | 76 </network-proxy-input> |
61 <network-proxy-input editable="[[editable]]" | 77 <network-proxy-input |
| 78 editable="[[isPropertyEditable_(editable, networkProperties, 'Prox
ySettings.Manual.SOCKS)')]]" |
62 value="{{proxy.Manual.SOCKS}}" | 79 value="{{proxy.Manual.SOCKS}}" |
63 label="SOCKS host" on-proxy-change="onProxyInputChange_"> | 80 label="SOCKS host" on-proxy-change="onProxyInputChange_"> |
64 </network-proxy-input> | 81 </network-proxy-input> |
65 </div> | 82 </div> |
66 | 83 |
67 <span>Do not use the proxy settings for these hosts and domains:</span> | 84 <span>Do not use the proxy settings for these hosts and domains:</span> |
68 <network-proxy-exclusions exclusions="{{proxy.ExcludeDomains}}" | 85 <network-proxy-exclusions exclusions="{{proxy.ExcludeDomains}}" |
69 on-proxy-change="onProxyExclusionsChange_"> | 86 on-proxy-change="onProxyExclusionsChange_"> |
70 </network-proxy-exclusions> | 87 </network-proxy-exclusions> |
71 <div class="layout horizontal baseline"> | 88 <div class="layout horizontal baseline"> |
72 <paper-input id="proxyExclusion" class="flex" no-label-float> | 89 <paper-input id="proxyExclusion" class="flex" no-label-float> |
73 </paper-input> | 90 </paper-input> |
74 <paper-button on-tap="onAddProxyExclusion_"> | 91 <paper-button on-tap="onAddProxyExclusion_"> |
75 Add Exception | 92 Add Exception |
76 </paper-button> | 93 </paper-button> |
77 </div> | 94 </div> |
78 </div> | 95 </div> |
79 </div> | 96 </div> |
80 </template> | 97 </template> |
81 <script src="network_proxy.js"></script> | 98 <script src="network_proxy.js"></script> |
82 </dom-module> | 99 </dom-module> |
OLD | NEW |