Skip to content

Commit

Permalink
Changed project name and logo, updated err_msg and err_png fields in …
Browse files Browse the repository at this point in the history
…ClosedTasksDetail model, added ellipsis utility, and modified related UI components.
  • Loading branch information
xiaoxiaolulu committed Jun 24, 2024
1 parent 0c718b7 commit ee75449
Show file tree
Hide file tree
Showing 16 changed files with 1,827 additions and 152 deletions.
208 changes: 107 additions & 101 deletions backend/.idea/workspace.xml

Large diffs are not rendered by default.

Binary file added backend/api/media/avatar/failed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed backend/api/media/default.png
Binary file not shown.
18 changes: 18 additions & 0 deletions backend/api/migrations/0049_closedtasksdetail_err_msg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0.4 on 2024-06-24 06:43

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("api", "0048_alter_closedtasksdetail_err_type"),
]

operations = [
migrations.AddField(
model_name="closedtasksdetail",
name="err_msg",
field=models.TextField(default="", verbose_name="ClosedTasksDetail ErrMsg"),
),
]
17 changes: 17 additions & 0 deletions backend/api/migrations/0050_remove_closedtasksdetail_err_msg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 5.0.4 on 2024-06-24 06:58

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("api", "0049_closedtasksdetail_err_msg"),
]

operations = [
migrations.RemoveField(
model_name="closedtasksdetail",
name="err_msg",
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 5.0.4 on 2024-06-24 07:15

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("api", "0050_remove_closedtasksdetail_err_msg"),
]

operations = [
migrations.AddField(
model_name="closedtasksdetail",
name="err_msg",
field=models.TextField(default="", verbose_name="ClosedTasksDetail ErrMsg"),
),
migrations.AddField(
model_name="closedtasksdetail",
name="err_png",
field=models.CharField(
blank=True,
max_length=250,
null=True,
verbose_name="ClosedTasksDetail ErrPng",
),
),
]
2 changes: 2 additions & 0 deletions backend/api/models/https.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ class ClosedTasksDetail(Model):
err_step = TextField(verbose_name=_('ClosedTasksDetail ErrStep'), null=False, default="")
err_type = CharField(max_length=50, verbose_name=_('ClosedTasksDetail ErrType'), choices=AnomalousCauseChoices,
null=True)
err_msg = TextField(verbose_name=_('ClosedTasksDetail ErrMsg'), null=False, default="")
err_png = CharField(max_length=250, null=True, blank=True, verbose_name=_('ClosedTasksDetail ErrPng'))
handler = CharField(max_length=250, null=True, blank=True, verbose_name=_('ClosedTasksDetail Handler'))
cause = TextField(verbose_name=_('ClosedTasksDetail cause'), null=False, default="")
steps = TextField(verbose_name=_('ClosedTasksDetail steps'), null=False, default=[])
Expand Down
Binary file removed backend/api/templates/media/default.png
Binary file not shown.
1,318 changes: 1,318 additions & 0 deletions backend/logs/EasyPost.log

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions backend/logs/EasyPost_collect.log
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,42 @@ INFO [2024-06-24 10:18:45,829] [none] django.utils.autoreload: Watching for
WARNING [2024-06-24 10:18:47,345] [ee7381e2ab474a7cbed2cd774918b350] django.request: Not Found: /media/avatar/default.png
INFO [2024-06-24 10:19:29,674] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\config\urls.py changed, reloading.
INFO [2024-06-24 10:19:31,738] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 14:31:17,458] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 14:31:19,033] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 14:32:17,172] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 14:32:18,351] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 14:33:33,319] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 14:33:34,526] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 14:33:51,324] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 14:33:52,498] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 14:39:01,972] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 14:39:03,082] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 14:39:29,711] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 14:39:30,812] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 14:40:09,650] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 14:40:10,805] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 14:43:08,181] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\models\https.py changed, reloading.
INFO [2024-06-24 14:43:09,266] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 14:58:02,021] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\models\https.py changed, reloading.
INFO [2024-06-24 14:58:03,627] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 15:00:05,064] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 15:00:06,149] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 15:00:41,638] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 15:00:42,744] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 15:01:48,449] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 15:01:49,694] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 15:02:41,773] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 15:02:42,934] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 15:06:34,949] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 15:06:36,019] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 15:14:15,463] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\__init__.py changed, reloading.
INFO [2024-06-24 15:14:16,555] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-06-24 15:15:04,394] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\models\https.py changed, reloading.
INFO [2024-06-24 15:15:05,474] [none] django.utils.autoreload: Watching for file changes with StatReloader
WARNING [2024-06-24 15:34:01,190] [8b3983b8c253460d9f35863566e787d0] django.request: Not Found: /media/avatar/fail.png
WARNING [2024-06-24 15:34:02,812] [a0742aac51414d41a572e35d90b5a581] django.request: Not Found: /media/avatar/fail.png
WARNING [2024-06-24 15:35:30,654] [8f6e8bed7637412d8fd0a4c0fb36da6e] django.request: Not Found: /media/avatar/fail.png
WARNING [2024-06-24 15:35:33,600] [095f511adbcf42bc98bd2b1bd6f109ef] django.request: Not Found: /media/avatar/fail.png
WARNING [2024-06-24 15:35:33,789] [f7dc3fb06c87485f85c8904bd8ce31d2] django.request: Not Found: /media/avatar/fail.png
WARNING [2024-06-24 15:35:38,439] [9891ff1de40b4c318d01db6290bbc0ea] django.request: Not Found: /media/avatar/failed.png
WARNING [2024-06-24 15:35:39,854] [0a6f402203b84eecbfc9cdddce467382] django.request: Not Found: /media/avatar/failed.png
Binary file modified web/src/assets/image/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions web/src/layout/components/Sidebar/components/Logo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img src="@/assets/image/logo.png" class="sidebar-logo">
<h1 class="sidebar-title">EasyPost</h1>
<h1 class="sidebar-title">UnitRunner</h1>
</router-link>
</transition>
</div>
Expand Down Expand Up @@ -41,7 +41,6 @@ defineProps<{ isCollapse: boolean }>();
width: 32px;
height: 32px;
vertical-align: middle;
}
& .sidebar-title {
display: inline-block;
Expand Down
6 changes: 3 additions & 3 deletions web/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,13 @@ export function getTimeStateStr() {
if (hours >= 0 && hours <= 6) return `凌晨好`;
}

export function ellipsis(value: string) {
export function ellipsis(value: string, length: number, step: number) {
console.log(value.length)
if (!value) {
return "";
}
if (value.length > 15) {
return value.slice(0, 35) + "...";
if (value.length > length) {
return value.slice(0, step) + "...";
} else {
return value;
}
Expand Down
90 changes: 45 additions & 45 deletions web/src/views/closed/loop/components/closedTasksDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,42 @@
border
>
<el-table-column prop="id" label="序号" width="55" />
<el-table-column prop="func_name" label="功能名称"/>
<el-table-column prop="scene_name" label="场景名称"/>
<el-table-column prop="err_step" label="异常步骤"/>
<el-table-column prop="err_type" label="异常类型">
<el-table-column prop="func_name" label="功能名称">
<template #default="scope">
{{ellipsis(scope.row.func_name, 15, 20)}}
</template>
</el-table-column>
<el-table-column prop="scene_name" label="场景名称">
<template #default="scope">
{{ellipsis(scope.row.scene_name, 15, 20)}}
</template>
</el-table-column>
<el-table-column prop="err_step" label="异常步骤" width="290">
<template #default="scope">
<span style="display: inline-block">
<el-icon style="color: red; margin-right: 5px">
<WarningFilled />
</el-icon>
{{ellipsis(scope.row.err_step, 15, 30)}}
</span>
</template>
</el-table-column>
<el-table-column prop="err_type" label="异常类型" width="100">
<template #default="scope">
<el-tag type="danger">
{{ scope.row.err_type }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="handler" label="异常原因"/>
<el-table-column prop="cause" label="处理人"/>
<el-table-column prop="cause" label="异常原因"/>
<el-table-column prop="handler" label="处理人" width="100"/>
<el-table-column label="操作" width="150px" align="center">
<template #default="scope">
<el-button type="primary" link>查看详情</el-button>
<el-button type="primary" link @click="handle(scope.row)">查看详情</el-button>
</template>
</el-table-column>
</el-table>
<step ref="stepRef" v-model="isShow" @onChangeDialog="onChangeDialog"/>
</div>
</div>
</template>
Expand All @@ -51,15 +69,22 @@ import {useRoute, useRouter} from "vue-router";
import {ElMessage, FormInstance} from "element-plus";
import type {UploadInstance} from 'element-plus'
import CardHeader from '@/components/CardHeader/index.vue'
import { ellipsis } from "@/utils";
import Step from "@/views/closed/loop/components/step.vue";
const tableData = reactive([])
const stepRef = ref()
const loading = ref(false)
const router = useRouter()
const route = useRoute()
const rowData = ref({})
const queryList = () => {
const pk = router.currentRoute.value.query.id
getClosedTasksDetail({id: pk}).then((response) => {
Expand All @@ -75,6 +100,19 @@ const goBack = () => {
router.push({name: 'projectList'})
}
const isShow = ref(false);
const handle = (row: any) => {
rowData.value = row
isShow.value = true;
stepRef.value.setData(row)
};
const onChangeDialog = (val: any) => {
isShow.value = false;
queryList()
};
</script>

<style lang="scss">
Expand All @@ -91,42 +129,4 @@ const goBack = () => {
.card-description {
float: left;
}
.project-avatar-image {
background: transparent;
width: 96px !important;
height: 96px !important;
line-height: 48px;
font-size: 18px;
img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
}
.avatar {
margin: 0;
padding: 0;
color: rgba(0, 0, 0, .85);
font-size: 13px;
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
font-feature-settings: "tnum", "tnum";
position: relative;
display: inline-block;
overflow: hidden;
color: #fff;
white-space: nowrap;
text-align: center;
vertical-align: middle;
background: #ccc;
width: 32px;
height: 32px;
line-height: 32px;
border-radius: 50%
}
</style>
Loading

0 comments on commit ee75449

Please sign in to comment.