Skip to content

Commit

Permalink
doc center complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Bosn committed Jan 23, 2014
1 parent c4232f9 commit 080fa87
Show file tree
Hide file tree
Showing 15 changed files with 1,794 additions and 98 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,4 @@ RAP.setBlackList(arr);
RAP.setWhiteList(arr);
```

其中arr可以包含匹配字符串,或正则对象,例:['test', /test/g]


其中arr可以包含匹配字符串,或正则对象,例:['test', /test/g]
2 changes: 1 addition & 1 deletion WebContent/WEB-INF/urlrewrite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<note>
mockjs plugin generator
</note>
<from>^/plugins/rap.plugin.js(.*)$</from>
<from>^/rap.plugin.js(.*)$</from>
<to type="redirect">/mock/createPluginScript.action$1</to>
</rule>
</urlrewrite>
7 changes: 1 addition & 6 deletions WebContent/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext.xml</param-value>
</context-param>

<filter>
<filter-name>ssoFilter</filter-name>
<filter-class>com.alibaba.buc.sso.client.filter.SSOFilter</filter-class>
Expand All @@ -34,10 +33,9 @@
</init-param>
<init-param>
<param-name>EXCLUSIONS</param-name>
<param-value>*/stat/*,*/favicon.ico,/t/*,/crossdomain.xml,/*.htm,/*.html</param-value>
<param-value>*/stat/*,*/favicon.ico,/t/*,/crossdomain.xml,/*.htm,/*.html,*.md</param-value>
</init-param>
</filter>

<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
Expand All @@ -58,8 +56,6 @@
<param-value>true</param-value>
</init-param>
</filter>


<filter>
<filter-name>authCheckFilter</filter-name>
<filter-class>com.taobao.rigel.rap.common.AuthCheckFilter</filter-class>
Expand All @@ -76,7 +72,6 @@
<param-value>utf-8</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>ssoFilter</filter-name>
<url-pattern>/*</url-pattern>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script src="jquery-2.0.3.min.js"></script>
<script src="http://g.tbcdn.cn/kissy/k/1.4.1/seed.js"></script>
<!-- 引入RAP开始 -->
<script type="text/javascript" src="http://etaoux-bj.taobao.ali.com:8080/plugins/rap.plugin.js?projectId=65"></script>
<script type="text/javascript" src="http://etaoux-bj.taobao.ali.com:8080/rap.plugin.js?projectId=65"></script>
<!-- 引入RAP结束 -->
</head>
<body>
Expand Down
File renamed without changes.
File renamed without changes.
28 changes: 3 additions & 25 deletions WebContent/mock/createPluginScript.vm

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions WebContent/platform/help.about.vm
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
在开发WEB应用时前后端会约定请求接口,包含请求链接、参数等细节。RAP提供了接口数据的共享平台,功能强大使用方便。同时利用这些数据自动化的生成伪造数据、提供后端开发工具包等,减少重复劳动并提升开发效率。


```bash
test.abc
```
41 changes: 7 additions & 34 deletions WebContent/platform/help.vm
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,20 @@
#includeNewRapStatic
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="${staticRoot}/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${staticRoot}/js/core/markdown.min.js"></script>
<style type="text/css">
</style>
</head>
<body>
#bodyNewStart
<div id="container">
<ul id="myTab" class="nav nav-tabs">
<li class="active"><a href="#about" data-toggle="tab">关于RAP</a></li>
<li><a href="#edit" data-toggle="tab">接口编辑</a></li>
<li><a href="#mock" data-toggle="tab">数据伪造</a></li>
<li><a href="#tagy" data-toggle="tab">格式标签</a></li>
<li><a href="#test" data-toggle="tab">智能测试</a></li>
<li><a href="#console" data-toggle="tab">控制台</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="about">
<p>#parse('/platform/help.about.vm')</p>
</div>
<div class="tab-pane fade" id="edit">
<p>#parse('/platform/help.edit.vm')</p>
</div>
<div class="tab-pane fade" id="mock">
<p>#parse('/platform/help.mock.vm')</p>
</div>
<div class="tab-pane fade" id="tagy">
<p>#parse('/platform/help.tagy.vm')</p>
</div>
<div class="tab-pane fade" id="test">
<p>#parse('/platform/help.test.vm')</p>
</div>
<div class="tab-pane fade" id="console">
<p>#parse('/platform/help.console.vm')</p>
</div>
</div>
</div>
<div id="container"><!--${text}--></div>
#bodyEnd
<script>
$('#myTab a').click(function (e) {
e.preventDefault();
$(this).tab('show');
})
var txt = $('#container').html();
txt = txt.replace(/<!--/g, "");
txt = txt.replace(/-->/g, "");
var html = markdown.toHTML(txt);
$('#container').html(html);
</script>
</body>
</html>
21 changes: 0 additions & 21 deletions WebContent/plugins/rap.plugin.js → WebContent/plugin/rap.mock.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
/**********************************************************************************************************
*
* 使用方法
* 1. 在kissy, jQuery后面引入rap plugin
* <script type="text/javascript" src="rap.plugin.js?projectId={{projectId}}&mode={{mode}}"></script>
* 其中{{projectId}}为RAP提供的项目ID
* {{mode}}为RAP路由的工作模式, 默认值为3
* 0 - 不拦截
* 1 - 拦截全部
* 2 - 黑名单中的项不拦截
* 3 - 仅拦截白名单中的项
* 2. 引入mock.js
* <script src="http://mockjs.com/dist/mock-min.js"></script>
* 3. 设置黑名单、白名单(可选)
* 设置黑名单
* RAP.setBlackList(arr);
* 设置白名单
* RAP.setWhiteList(arr);
* 其中arr可以包含匹配字符串,或正则对象,例:['test', /test/g]
*
********************************************************************************************************/
(function() {
var node = document.getElementById('rap');
var blackList = [];
Expand Down
Loading

0 comments on commit 080fa87

Please sign in to comment.