<rdoc:include file="head.htm" />

<!-- BEGIN PAGE CONTENT-->
<div class="row">
	<div class="col-md-12">
	<div class="portlet box default">
			<div class="portlet-title">
				<div class="caption">
					<i class="fa fa-bug"></i>{$sys_component_name}测试
				</div>
				<div class="actions">
					<div class="btn-group">
			        	
			        </div>
			    </div>
			</div>
			<div class="portlet-body">

				 	<table class="table table-striped table-bordered table-hover">
				            <thead>
				            <tr>
					            <th width="80"> ID </th>
					            <th >名称 </th>
					            <th >描述 </th>
					            <th width="100">操作 </th>
				            </tr>
				            </thead>
							
							<tbody>
							
							<!--# foreach($tdb as $key=>$v) { #-->
							<tr>
							    <td>$v[id]</td>
							    <td>$v[name]</td>
							    <td>$v[description]</td>
								<td>
								    <a href="#" class='tabpage autotest' data-id="$v[name]" > 测试 </a>
								    <a href="#" class='tabpage autoclean' data-id="$v[name]" > 清理 </a>
								</td>
                            </tr>
                            <!--# } #-->
                            
							</tbody>
						</table>


			</div>

		</div>
		
	</div>
</div>
<script language='javascript'>
jQuery(document).ready(function() {
	$(".autotest").on("click", function() {
			var id = $(this).attr('data-id');
    		showWaiting("请稍后...");
 			$.getJSON("$_base/test/?name="+id, function(res) {
 			    if ( res.status == 0) {
                   rui.showTSuccess('操作成功.'); 
                } else {
                     rui.showStatus(res);
                }
            }).fail(function(res) {           
                 rui.showStatus(res);
            }).always(function() {
                 closeWaiting();
            });

        });


        $(".autoclean").on("click", function() {
            var id = $(this).attr('data-id');
            showWaiting("请稍后...");
            $.getJSON("$_base/clean?name=" + id, function(res) {
                if (res.status == 0) {
                    rui.showTSuccess('操作成功.');
                } else {
                    rui.showStatus(res);
                }
            }).fail(function(res) {
                rui.showStatus(res);
            }).always(function() {
                 closeWaiting();
            });

        });
});
 </script>

<rdoc:include file="foot.htm" />			