Skip to content

Commit

Permalink
fix:修复用例步骤字段缺失问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiaolulu committed Sep 30, 2024
1 parent d8b23c6 commit b49cec2
Show file tree
Hide file tree
Showing 8 changed files with 223 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Generated by Django 5.0.4 on 2024-09-30 02:53

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("api", "0053_remove_api_source"),
]

operations = [
migrations.AddField(
model_name="step",
name="priority",
field=models.CharField(
choices=[(0, "P0"), (1, "P1"), (2, "P2"), (3, "P3"), (4, "P4")],
default=0,
max_length=50,
verbose_name="Step Priority",
),
),
migrations.AddField(
model_name="step",
name="status",
field=models.CharField(
choices=[(0, "Debugging"), (1, "Obsoleted"), (2, "Normal")],
default=0,
max_length=50,
verbose_name="Step Status",
),
),
migrations.AlterField(
model_name="project",
name="avatar",
field=models.ImageField(
blank=True,
default="avatar/default.png",
null=True,
upload_to="C:\\Users\\86135\\Desktop\\EasyPost\\unit-backend\\api\\templates\\media",
verbose_name="Project Avatar",
),
),
]
4 changes: 4 additions & 0 deletions unit-backend/api/models/https.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ class Step(Model):
name = CharField(max_length=50, null=True, blank=True, verbose_name=_('Step Name'))
method = CharField(max_length=50, null=True, blank=True, verbose_name=_('Step Method'))
url = TextField(verbose_name=_('Step Url'), null=False, default=None)
priority = CharField(max_length=50, verbose_name=_('Step Priority'), choices=ApiPriorityChoices,
default=ApiPriorityChoices.P0)
status = CharField(max_length=50, verbose_name=_('Step Status'), choices=ApiStatusChoices,
default=ApiStatusChoices.DEBUGGING)
desc = TextField(null=True, blank=True, verbose_name=_('Step Desc'))
headers = TextField(verbose_name=_('Step Headers'), null=False, default=None)
params = TextField(verbose_name=_('Step Params'), null=False, default=None)
Expand Down
163 changes: 163 additions & 0 deletions unit-backend/logs/EasyPost.log

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions unit-backend/logs/EasyPost_collect.log
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,5 @@ Traceback (most recent call last):
django.core.exceptions.SuspiciousFileOperation: The joined path (C:\Users\86135\Desktop\EasyPost\backend\api\templates\media\default.png) is located outside of the base path component (C:\Users\86135\Desktop\EasyPost\unit-backend\api\templates\media)
WARNING [2024-09-29 15:21:09,690] [bb7df0740a0e4edcb213e12285c041bd] django.request: Not Found: /media/C:/Users/86135/Desktop/EasyPost/unit-backend/api/templates/media/default.png
WARNING [2024-09-29 15:21:09,702] [ab57d2e8b2084a0ea66dd99d4d2d853a] django.request: Bad Request: /media/C:/Users/86135/Desktop/EasyPost/backend/api/templates/media/default.png
INFO [2024-09-30 10:53:47,869] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\unit-backend\api\models\https.py changed, reloading.
INFO [2024-09-30 10:53:49,728] [none] django.utils.autoreload: Watching for file changes with StatReloader
8 changes: 8 additions & 0 deletions web/src/api/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ export function getCaseDetail(data: any) {
})
}

export function getCaseStepDetail(data: any) {
return request({
url: `/api/case/step/detail/${data.id}`,
method: 'get',
data
})
}

export function planList(params: any) {
return request({
url: `/api/plan/list`,
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/https/api/components/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const editHandler = (row) => {
if (row) {
router.push({
name: "httpDetail",
query: {editType: 'update', id: row.id}
query: {editType: 'update', httpId: row.id}
});
} else {
ElMessage.error("编辑接口异常请重试!");
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/https/case/components/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const editHandler = (row) => {
if (row) {
router.push({
name: "caseDetail",
query: {editType: 'update', id: row.id}
query: {editType: 'update', caseId: row.id}
});
} else {
ElMessage.error("编辑用例异常请重试!");
Expand Down
1 change: 0 additions & 1 deletion web/src/views/https/case/components/apiInfoController.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</template>
<ApiDetail :isView="true" :api_id="state.data.id"></ApiDetail>
</el-drawer>

</template>

<script setup name="apiInfoController">
Expand Down

0 comments on commit b49cec2

Please sign in to comment.