Skip to content

Commit

Permalink
完成前端router的界面改动
Browse files Browse the repository at this point in the history
  • Loading branch information
shimine committed Nov 2, 2017
1 parent b7e17ce commit d765f7b
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 118 deletions.
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# interface test with python
用python实现的web IDE,可以导入&编辑脚本工程,对接口&网页进行测试
也可以对测试日志进行查询和统计
##arbiter是什么
- python实现的web IDE,可以导入&编辑脚本工程,对接口&网页进行测试
- 可以对测试日志进行查询和统计


需要
mysql存储用户信息
redis保证实时websocket
monogodb保存日志
##依赖环境
- mysql存储用户信息
- redis保证实时websocket
- monogodb保存日志
![Image text](https://github.com/shimine/cua-arbiter/blob/master/doc/import.gif)

部署步骤:

1.clone code
2.进入到 arbiter-web/ cd arbiter-web
3.安装依赖文件 pip install -r requirements.txt
4.安装好mysql redis,在setting.py中修改成相对应的配置属性
5.修改运行时选项,设置 manage.py路径,脚本命令为runserver
6.或直接使用 python manage.py runserver
##部署步骤:
1. clone code
2. 进入到 arbiter-web/ cd arbiter-web
3. 安装依赖文件 pip install -r requirements.txt
4. 安装好mysql redis,在setting.py中修改成相对应的配置属性
5. 修改运行时选项,设置 manage.py路径,脚本命令为runserver
6. 或直接使用 python manage.py runserver
29 changes: 9 additions & 20 deletions arbiter-web/arbiter/core/templates/case/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@
<div>
<div id="root">
<router-view name="paper"></router-view>
<!-- <case-paper></case-paper>-->

<arbiter-slide :model-list="modelList"></arbiter-slide>
<div id="root-case" style="display: block;">
<div id="code">
<router-view name="casefab"></router-view>
<case-float-btn></case-float-btn>
<!-- <code-float-btn><</code-float-btn>-->
<!-- <pre id="code-content"></pre> -->
</div>
Expand Down Expand Up @@ -129,14 +127,14 @@ <h2 slot="left">用例管理</h2>
<div id="case-paper">
<div v-for="(value, key) in caseMap">
<div>
<div class="flex-between"><b class="grey-text paper-pyname" @click="showcode(key,value)">{{ key }}</b>
<div class="flex-between"><b title="查看/编辑" class="grey-text paper-pyname" @click="showcode(key,value)">{{ key }}</b>
<mu-icon-button icon="delete" icon-class="red-icon"></mu-icon-button>
</div>
</div>
<div v-if="pyname===key">
<mu-paper class="code-paper" :z-depth="2" :key="key" >
<code-paper :pypath="value"></code-paper>
<div id="codecontent" ref="mybox+"></div>
<mu-paper class="long-large-paper" :z-depth="2" :key="key" >
<code-paper :pypathx="value"></code-paper>
<code-float-btn :casemodel="casemodel" :pypath="value"></code-float-btn>
</mu-paper>
</div>
<div v-else v-for="(v, k) in value">
Expand All @@ -162,19 +160,10 @@ <h2 slot="left">用例管理</h2>
</template>
<template id="codeFloatBtn">
{% verbatim %}
<div id="code-float-btn" v-if="modalShow">
<div style="z-index: 1;position: fixed; bottom: 45px; right: 24px;"
<div id="code-float-btn" v-if="modalShow" >
<div style=" position: relative;z-index: 1; float: right;bottom: 110px;right: 60px;"
@mouseover="onMouseEnterCodeFAB()" @mouseout="onMouseleaveCodeFAB()">
<mu-float-button id="edit" @click="edit()" :icon="editIcon" secondary mini
class="demo-float-button" v-show="seen"
style="bottom: 6px; right: 3px;"></mu-float-button>
<mu-float-button id="run" @click="run()" icon="play_arrow" secondary mini
class="demo-float-button" v-show="seen"
style="bottom: 6px; right: 3px;"></mu-float-button>
<mu-float-button id="log" @click="log()" icon="message" secondary mini
class="demo-float-button" v-show="seen"
style="bottom: 6px; right: 3px;"></mu-float-button>
<mu-float-button id="edit" icon="add" class="demo-float-button"></mu-float-button>
<mu-float-button style="background-color:#bf360c" @click="edit()" :icon="editIcon" class="demo-float-button"></mu-float-button>
</div>
<div>
<mu-dialog :open="saveDialog" title="保存中">
Expand All @@ -197,7 +186,7 @@ <h2 slot="left">用例管理</h2>
</template>
<template id="caseFloatBtn">
{% verbatim %}
<div id="code-float-btn" v-if="modalShow">
<div id="case-float-btn" v-if="modalShow">
<div style="z-index: 1;position: fixed; bottom: 45px; right: 24px;"
@mouseover="onMouseEnterCodeFAB()" @mouseout="onMouseleaveCodeFAB()">
<mu-float-button id="log" @click="log()" icon="message" secondary mini
Expand Down
2 changes: 1 addition & 1 deletion arbiter-web/arbiter/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
'JWT_VERIFY': True,
'JWT_VERIFY_EXPIRATION': True,
'JWT_LEEWAY': 0,
'JWT_EXPIRATION_DELTA': datetime.timedelta(seconds=300),
'JWT_EXPIRATION_DELTA': datetime.timedelta(seconds=3000),
'JWT_AUDIENCE': None,
'JWT_ISSUER': None,

Expand Down
13 changes: 8 additions & 5 deletions arbiter-web/arbiter/static/arbiter/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ body {
display: none;
}

#codecontent {
#code-paper {
top: 0;

height: 600px;
bottom: 0;


}

#case-paper {
Expand All @@ -52,6 +50,7 @@ body {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;

}

Expand All @@ -69,6 +68,7 @@ body {

.paper-pyname {
margin-left: 30px;
cursor:pointer;
}

.red-icon {
Expand All @@ -79,12 +79,15 @@ body {
.green-icon {
color:#8bc34a;
}
.long-large-paper
{margin-right: 80px;
margin-left: 20px;}


.long-little-paper {
height: 45px;
margin-bottom: 20px;
margin-right: 80px;
margin-right: 130px;
margin-left: 30px;
position: relative;
}
Loading

0 comments on commit d765f7b

Please sign in to comment.