blob: a6da47ce6231db9f458dfc612e2138f5884dc80d [file] [log] [blame]
##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 -&gt; $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 -&gt; $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 -&gt; $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 -&gt; $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 -&gt; $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 -&gt; $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
<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>
#if ($consumer.providers && $consumer.providers.size() > 0)
<span class="ico_line">|</span>
<a href="../$consumer.id/notified"><img src="$rootContextPath.getURI("images/ico_renotify.png")" width="12"
height="12"/><span class="ico_font">#springMessageText("notified", "notified")
($consumer.providers.size())</span></a>
#end
</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("notify", "notify"):</th>
<td>
#if($consumer.providers && $consumer.providers.size() > 0)
<a href="../$consumer.id/notified">#springMessageText("notified", "notified")($consumer.providers.size())</a>
#else
<font color="red">#springMessageText("noProvider", "noProvider")</font>
#end
</td>
</tr>
<tr>
<th>#springMessageText("Route", "Route"):</th>
<td></td>
</tr>
</table>
<br/>
<table cellpadding="0" cellspacing="0" class="list list_dubbo" id="table_o">
<tr>
<th>#springMessageText("routeName", "routeName"): <input type="text" style="width: 100px;"
onkeyup="searchTable('table_o', 0, this.value);"
onclick="searchTable('table_o', 1, this.value);"/>&nbsp;<img
src="$rootContextPath.getURI("images/ico_search.png")" width="12" height="12"/></th>
<th>#springMessageText("routeRule", "routeRule"): <input type="text" style="width: 100px;"
onkeyup="searchTable('table_o', 0, this.value);"
onclick="searchTable('table_o', 1, this.value);"/>&nbsp;<img
src="$rootContextPath.getURI("images/ico_search.png")" width="12" height="12"/></th>
</tr>
#foreach($route in $routes)
<tr>
<td>$route.name</td>
<td>$route.matchRule => $route.filterRule</td>
</tr>
#end
</table>
<div class="page">#springMessageText("page.total", "page.total")$providers.size()#springMessageText("page.records", "page.records") </div>