| ##Licensed to the Apache Software Foundation (ASF) under one or more |
| ##contributor license agreements. See the NOTICE file distributed with |
| ##this work for additional information regarding copyright ownership. |
| ##The ASF licenses this file to You under the Apache License, Version 2.0 |
| ##(the "License"); you may not use this file except in compliance with |
| ##the License. You may obtain a copy of the License at |
| ## |
| ##http://www.apache.org/licenses/LICENSE-2.0 |
| ## |
| ##Unless required by applicable law or agreed to in writing, software |
| ##distributed under the License is distributed on an "AS IS" BASIS, |
| ##WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ##See the License for the specific language governing permissions and |
| ##limitations under the License. |
| #set($layout = "/templates/governance/layout/default.vm") |
| <div class="ico_btn"> |
| <a href="../../consumers"><img src="$rootContextPath.getURI("images/ico_back.png")" width="12" height="12"/><span |
| class="ico_font">#springMessageText("back", "back")</span></a> |
| #set($mock=$tool.getConsumerMock($consumer)) |
| #if($currentUser.hasServicePrivilege($consumer.service)) |
| <span class="ico_line">|</span> |
| <a href="../$consumer.id/edit"><img src="$rootContextPath.getURI("images/ico_edit.png")" width="12" |
| height="12"/><span class="ico_font">#springMessageText("edit", "edit")</span></a> |
| <span class="ico_line">|</span> |
| #if($mock.equals("force%3Areturn+null")) |
| <a href="#" onclick="showConfirm('#springMessageText( |
| "confirm.cancel.mock","confirm.cancel.mock")', '$consumer.address -> $tool.getSimpleName($consumer.service)', '../$consumer.id/recover'); return false;"><img |
| src="$rootContextPath.getURI("images/ico_enable.png")" width="12" height="12"/><span |
| class="ico_font">#springMessageText("cancel.mock", "cancel.mock")</span></a> |
| <span class="ico_line">|</span> |
| <a href="#" onclick="showConfirm('#springMessageText( |
| "confirm.fail.mock","confirm.fail.mock")', '$consumer.address -> $tool.getSimpleName($consumer.service)', '../$consumer.id/tolerant'); return false;"><img |
| src="$rootContextPath.getURI("images/ico_run.png")" width="12" height="12"/><span |
| class="ico_font">#springMessageText("fail.mock", "fail.mock")</span></a> |
| #elseif ($mock.equals("fail%3Areturn+null")) |
| <a href="#" onclick="showConfirm('#springMessageText( |
| "confirm.force.mock","confirm.force.mock")', '$consumer.address -> $tool.getSimpleName($consumer.service)', '../$consumer.id/shield'); return false;"><img |
| src="$rootContextPath.getURI("images/ico_cancel.png")" width="12" height="12"/><span |
| class="ico_font">#springMessageText("force.mock", "force.mock")</span></a> |
| <span class="ico_line">|</span> |
| <a href="#" onclick="showConfirm('#springMessageText( |
| "confirm.cancel.mock","confirm.cancel.mock")', '$consumer.address -> $tool.getSimpleName($consumer.service)', '../$consumer.id/recover'); return false;"><img |
| src="$rootContextPath.getURI("images/ico_enable.png")" width="12" height="12"/><span |
| class="ico_font">#springMessageText("cancel.mock", "cancel.mock")</span></a> |
| #else |
| <a href="#" onclick="showConfirm('#springMessageText( |
| "confirm.force.mock","confirm.force.mock")', '$consumer.address -> $tool.getSimpleName($consumer.service)', '../$consumer.id/shield'); return false;"><img |
| src="$rootContextPath.getURI("images/ico_cancel.png")" width="12" height="12"/><span |
| class="ico_font">#springMessageText("force.mock", "force.mock")</span></a> |
| <span class="ico_line">|</span> |
| <a href="#" onclick="showConfirm('#springMessageText( |
| "confirm.fail.mock","confirm.fail.mock")', '$consumer.address -> $tool.getSimpleName($consumer.service)', '../$consumer.id/tolerant'); return false;"><img |
| src="$rootContextPath.getURI("images/ico_run.png")" width="12" height="12"/><span |
| class="ico_font">#springMessageText("fail.mock", "fail.mock")</span></a> |
| #end |
| #end |
| #if ($consumer.routes && $consumer.routes.size() > 0) |
| <span class="ico_line">|</span> |
| <a href="../$consumer.id/routed"><img src="$rootContextPath.getURI("images/ico_balance.png")" width="12" |
| height="12"/><span class="ico_font">#springMessageText("routed", "routed") |
| ($consumer.routes.size())</span></a> |
| #end |
| <span class="ico_line">|</span> |
| <a href="../$consumer.id"><img src="$rootContextPath.getURI("images/ico_show.png")" width="12" height="12"/><span |
| class="ico_font">#springMessageText("show", "show")</span></a> |
| </div> |
| <br/> |
| <table cellpadding="0" cellspacing="0" class="info"> |
| #if(! $service) |
| <tr> |
| <th style="width: 100px;">#springMessageText("service", "service"):</th> |
| <td>$!consumer.service</td> |
| </tr> |
| #end |
| <tr> |
| <th style="width: 100px;">#springMessageText("ConsumerAddress", "ConsumerAddress"):</th> |
| <td>consumer://$!consumer.address/$!consumer.service?$!consumer.parameters</td> |
| </tr> |
| <tr> |
| <th>#springMessageText("overrides", "overrides"):</th> |
| <td>$!consumer.override.params</td> |
| </tr> |
| <tr> |
| <th>#springMessageText("mock", "mock"):</th> |
| <td> |
| #if($mock.equals("force%3Areturn+null")) |
| <font color="red">#springMessageText("force.mocked", "force.mocked")</font> |
| #elseif ($mock.equals("fail%3Areturn+null")) |
| <font color="blue">#springMessageText("fail.mocked", "fail.mocked")</font> |
| #else |
| <font color="gray">#springMessageText("no.mocked", "no.mocked")</font> |
| #end |
| </td> |
| </tr> |
| <tr> |
| <th>#springMessageText("status", "status"):</th> |
| <td> |
| #if($tool.isInBlackList($consumer)) |
| <font color="red">#springMessageText("Forbidden", "Forbidden")</font> |
| #else |
| <font color="green">#springMessageText("Allowed", "Allowed")</font> |
| #end |
| </td> |
| </tr> |
| <tr> |
| <th>#springMessageText("Route", "Route"):</th> |
| <td> |
| #if($consumer.routes && $consumer.routes.size() > 0) |
| <a href="../$consumer.id/routed">#springMessageText("routed", "routed")($consumer.routes.size())</a> |
| #else |
| <font color="gray">#springMessageText("unrouted", "unrouted")</font> |
| #end |
| </td> |
| </tr> |
| <tr> |
| <th>#springMessageText("notify", "notify"):</th> |
| <td></td> |
| </tr> |
| </table> |
| <br/> |
| <table cellpadding="0" cellspacing="0" class="list list_dubbo" id="table_o"> |
| <tr> |
| <th>#springMessageText("url", "url"): <input type="text" style="width: 100px;" onkeyup="searchTable('table_o', 0, this.value);" |
| onclick="searchTable('table_o', 1, this.value);"/> <img |
| src="$rootContextPath.getURI("images/ico_search.png")" width="12" height="12"/></th> |
| </tr> |
| #foreach($provider in $providers) |
| <tr> |
| <td>$provider.url?$provider.parameters</td> |
| </tr> |
| #end |
| </table> |
| <div class="page">#springMessageText("page.total", "page.total")$providers.size()#springMessageText("page.records", "page.records") </div> |