├── .idea ├── EasyPost.iml ├── inspectionProfiles │ ├── Project_Default.xml │ └── profiles_settings.xml ├── misc.xml ├── modules.xml ├── vcs.xml └── workspace.xml ├── README.md ├── docker-compose.yml ├── unit-backend ├── .idea │ ├── backend.iml │ ├── encodings.xml │ ├── inspectionProfiles │ │ ├── Project_Default.xml │ │ └── profiles_settings.xml │ ├── misc.xml │ ├── modules.xml │ ├── shelf │ │ ├── Uncommitted_changes_before_Checkout_at_2024_1_22_18_24_[Changes] │ │ │ └── shelved.patch │ │ └── Uncommitted_changes_before_Checkout_at_2024_1_22_18_24__Changes_.xml │ ├── vcs.xml │ └── workspace.xml ├── api │ ├── __init__.py │ ├── dao │ │ ├── __init__.py │ │ ├── dashboard.py │ │ ├── https.py │ │ ├── plan.py │ │ ├── project.py │ │ ├── report.py │ │ ├── setting.py │ │ └── user.py │ ├── emus │ │ ├── ApiParametersEnum.py │ │ ├── CaseBaseEnum.py │ │ ├── CaseParametersEnum.py │ │ ├── CertEnum.py │ │ ├── HttpEnum.py │ │ ├── MessageEnum.py │ │ ├── NoticeEnum.py │ │ ├── PlanEnum.py │ │ ├── ProjectEnum.py │ │ ├── RouterConfigEnum.py │ │ ├── __init__.py │ │ ├── base.py │ │ ├── eventsEvents.py │ │ └── treesEnum.py │ ├── events │ │ ├── __init__.py │ │ ├── event.py │ │ ├── event_manager.py │ │ └── registry.py │ ├── exception │ │ ├── __init__.py │ │ ├── events.py │ │ └── exception_handler.py │ ├── filters │ │ ├── __init__.py │ │ ├── http.py │ │ ├── plan.py │ │ ├── project.py │ │ ├── report.py │ │ └── setting.py │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ ├── __init__.py │ │ │ ├── backup.py │ │ │ ├── clear_cache.py │ │ │ ├── init_superuser.py │ │ │ ├── initmenus.py │ │ │ └── runserver.py │ ├── media │ │ └── avatar │ │ │ ├── default.png │ │ │ └── failed.png │ ├── middleware │ │ ├── __init__.py │ │ ├── log_middleware.py │ │ └── whitelist_middleware.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_case_djangoadminaccessipwhitelist_project_and_more.py │ │ ├── 0003_alter_plan_options.py │ │ ├── 0004_detail_main_detailstep_detail_case.py │ │ ├── 0005_rename_case_detail_report_and_more.py │ │ ├── 0006_alter_detailstep_detail.py │ │ ├── 0007_detailstep_sort.py │ │ ├── 0008_datasource.py │ │ ├── 0009_datasource_database_alter_datasource_port_and_more.py │ │ ├── 0010_remove_datasource_name_alter_datasource_database.py │ │ ├── 0011_functions.py │ │ ├── 0012_alter_functions_options.py │ │ ├── 0013_address_headers_address_variables.py │ │ ├── 0014_tasklog.py │ │ ├── 0015_alter_project_avatar.py │ │ ├── 0016_alter_api_method.py │ │ ├── 0017_alter_api_method_alter_api_name.py │ │ ├── 0018_api_source.py │ │ ├── 0019_user_last_login_time.py │ │ ├── 0020_user_ip_address_alter_user_last_login_time.py │ │ ├── 0021_rename_desc_testenvironment_remarks_datasource_env_and_more.py │ │ ├── 0022_alter_datasource_env.py │ │ ├── 0023_remove_testenvironment_headers.py │ │ ├── 0024_remove_datasource_env_binddatasource.py │ │ ├── 0025_alter_binddatasource_create_time_and_more.py │ │ ├── 0026_remove_testenvironment_host_testenvironment_server.py │ │ ├── 0027_notice.py │ │ ├── 0028_remove_notice_project_notice_trigger_events.py │ │ ├── 0029_datastructure.py │ │ ├── 0030_alter_datastructure_type_menu.py │ │ ├── 0031_alter_menu_hidden.py │ │ ├── 0032_alter_projectrole_options.py │ │ ├── 0033_alter_api_priority_alter_api_status_and_more.py │ │ ├── 0034_remove_user_role_userrole.py │ │ ├── 0035_alter_userrole_user.py │ │ ├── 0036_delete_tasklog.py │ │ ├── 0037_apschedulerjobs.py │ │ ├── 0038_alter_apschedulerjobs_options.py │ │ ├── 0039_alter_apschedulerjobs_table.py │ │ ├── 0040_alter_datastructure_options_project_test_type.py │ │ ├── 0041_closedtasks.py │ │ ├── 0042_remove_closedtasks_project.py │ │ ├── 0043_remove_project_test_type_closedtasks_test_type.py │ │ ├── 0044_alter_closedtasks_test_type.py │ │ ├── 0045_alter_closedtasks_test_type.py │ │ ├── 0046_remove_closedtasks_detail_closedtasksdetail.py │ │ ├── 0047_alter_closedtasksdetail_err_type.py │ │ ├── 0048_alter_closedtasksdetail_err_type.py │ │ ├── 0049_closedtasksdetail_err_msg.py │ │ ├── 0050_remove_closedtasksdetail_err_msg.py │ │ ├── 0051_closedtasksdetail_err_msg_closedtasksdetail_err_png.py │ │ ├── 0052_alter_closedtasksdetail_id.py │ │ ├── 0053_remove_api_source.py │ │ ├── 0054_step_priority_step_status_alter_project_avatar.py │ │ ├── 0055_alter_plan_state.py │ │ ├── 0056_remove_notice_trigger_events.py │ │ └── __init__.py │ ├── mixins │ │ ├── __init__.py │ │ ├── async_generics.py │ │ ├── async_mixins.py │ │ └── magic.py │ ├── models │ │ ├── __init__.py │ │ ├── configuration.py │ │ ├── https.py │ │ ├── plan.py │ │ ├── project.py │ │ ├── report.py │ │ ├── setting.py │ │ └── user.py │ ├── response │ │ ├── __init__.py │ │ └── fatcory.py │ ├── routers │ │ ├── __init__.py │ │ ├── case.py │ │ ├── database.py │ │ ├── datastructure.py │ │ ├── env.py │ │ ├── function.py │ │ ├── http.py │ │ ├── notice.py │ │ ├── plan.py │ │ ├── project.py │ │ ├── report.py │ │ ├── statistics.py │ │ ├── system.py │ │ ├── tree.py │ │ ├── user.py │ │ └── websocket.py │ ├── scheduler │ │ ├── __init__.py │ │ ├── base.py │ │ ├── config.py │ │ ├── scheduler.py │ │ └── sqlalchemy_store.py │ ├── schema │ │ ├── __init__.py │ │ ├── https.py │ │ ├── plan.py │ │ ├── project.py │ │ ├── report.py │ │ ├── setting.py │ │ └── user.py │ ├── services │ │ ├── __init__.py │ │ ├── executor.py │ │ └── protos │ │ │ ├── __init__.py │ │ │ ├── executor.proto │ │ │ ├── executor_pb2.py │ │ │ └── executor_pb2_grpc.py │ ├── templates │ │ └── media │ │ │ ├── 7103cc2ba6d529b8c501294_l3EQBZZ.jpg │ │ │ ├── avatar │ │ │ └── default.png │ │ │ └── berserk.jpg │ ├── tests │ │ ├── __init__.py │ │ ├── atomic.py │ │ ├── engine.py │ │ ├── test_custom_token.py │ │ ├── test_project_destory.py │ │ ├── test_user_list.py │ │ └── websocket.py │ └── views │ │ ├── __init__.py │ │ ├── consumers.py │ │ ├── dashboard.py │ │ ├── https.py │ │ ├── plan.py │ │ ├── project.py │ │ ├── report.py │ │ ├── setting.py │ │ ├── system.py │ │ └── user.py ├── celery_work │ ├── __init__.py │ ├── configs.py │ ├── tasks │ │ ├── __init__.py │ │ └── h.py │ └── worker.py ├── common │ ├── __init__.py │ ├── attach │ │ ├── __init__.py │ │ ├── decorator.py │ │ └── time.py │ ├── builitin │ │ ├── __init__.py │ │ └── functions.py │ ├── database │ │ ├── DBClient.py │ │ └── __init__.py │ ├── exceptions.py │ ├── message │ │ ├── __init__.py │ │ ├── dingtalk.py │ │ ├── feishu.py │ │ ├── webhook.py │ │ └── weixin.py │ └── process │ │ ├── __init__.py │ │ ├── parser.py │ │ ├── recursion.py │ │ ├── render_template_obj.py │ │ └── trees.py ├── config │ ├── __init__.py │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── logs │ ├── EasyPost.log │ └── EasyPost_collect.log ├── manage.py ├── pyproject.toml ├── unitrunner │ └── engine │ │ └── log.py └── utils │ ├── __init__.py │ ├── api_migrate.py │ ├── async_pool.py │ ├── celery_tracer.py │ ├── encoder.py │ ├── logger.py │ ├── mochawesome.json │ ├── single.py │ ├── snowflake.py │ ├── t.py │ └── tracer.py ├── unit-executor ├── .idea │ ├── .gitignore │ ├── UNIT-EXECUTOR.iml │ ├── encodings.xml │ ├── inspectionProfiles │ │ ├── Project_Default.xml │ │ └── profiles_settings.xml │ ├── misc.xml │ ├── modules.xml │ └── vcs.xml ├── emus │ ├── CaseBaseEnum.py │ ├── CaseParametersEnum.py │ └── __init__.py ├── logs │ └── Unit-Executor.log ├── main.py ├── models │ └── __init__.py ├── protos │ ├── __init__.py │ ├── executor.proto │ ├── executor_pb2.py │ └── executor_pb2_grpc.py ├── register │ ├── __init__.py │ └── consul.py ├── requirements.txt ├── services │ ├── __init__.py │ ├── executor.py │ └── interceptors.py ├── settings │ └── __init__.py ├── unitrunner │ ├── __init__.py │ ├── builitin │ │ ├── __init__.py │ │ ├── compares.py │ │ └── functions.py │ ├── constructor │ ├── database │ │ ├── DBClient.py │ │ └── __init__.py │ ├── engine │ │ ├── __init__.py │ │ ├── base.py │ │ ├── bomb.py │ │ ├── env.py │ │ ├── extract.py │ │ ├── log.py │ │ ├── paramster.py │ │ └── runner.py │ ├── exceptions.py │ ├── models │ │ ├── __init__.py │ │ ├── report.py │ │ └── step.py │ ├── msg │ │ ├── __init__.py │ │ ├── dingtalk.py │ │ ├── feishu.py │ │ ├── webhook.py │ │ └── weixin.py │ ├── request │ │ ├── __init__.py │ │ └── http.py │ └── test │ │ ├── __init__.py │ │ └── base.py └── utils │ ├── __init__.py │ ├── logger.py │ ├── parser.py │ ├── registry.py │ └── time.py └── unit-web ├── .env ├── .env.development ├── .env.production ├── .env.test ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .prettierignore ├── AxiosRequestConfig.md ├── commitlint.config.js ├── index.html ├── package-lock.json ├── package.json ├── prettier.config.js ├── public ├── favicon.ico ├── index.html └── static │ ├── face │ ├── NO.png │ ├── OK.png │ ├── emoji-after.png │ ├── emoji-before.png │ ├── 乒乓.png │ ├── 乱舞.png │ ├── 亲亲.png │ ├── 便便.png │ ├── 偷笑.png │ ├── 傲慢.png │ ├── 再见.png │ ├── 冷汗.png │ ├── 凋谢.png │ ├── 刀.png │ ├── 勾引.png │ ├── 发呆.png │ ├── 发怒.png │ ├── 发抖.png │ ├── 可怜.png │ ├── 右哼哼.png │ ├── 右太极.png │ ├── 吐.png │ ├── 吓.png │ ├── 呲牙.png │ ├── 咒骂.png │ ├── 咖啡.png │ ├── 哈欠.png │ ├── 啤酒.png │ ├── 嘘.png │ ├── 嘴唇.png │ ├── 嘿哈.png │ ├── 回头.png │ ├── 困.png │ ├── 坏笑.png │ ├── 大哭.png │ ├── 太阳.png │ ├── 奋斗.png │ ├── 奸笑.png │ ├── 委屈.png │ ├── 害羞.png │ ├── 尴尬.png │ ├── 左哼哼.png │ ├── 左太极.png │ ├── 差劲.png │ ├── 弱.png │ ├── 强.png │ ├── 得意.png │ ├── 微笑.png │ ├── 心碎.png │ ├── 快哭了.png │ ├── 怄火.png │ ├── 悠闲.png │ ├── 惊恐.png │ ├── 惊讶.png │ ├── 愉快.png │ ├── 憨笑.png │ ├── 抓狂.png │ ├── 投降.png │ ├── 抠鼻.png │ ├── 抱拳.png │ ├── 拥抱.png │ ├── 拳头.png │ ├── 捂脸.png │ ├── 握手.png │ ├── 撇嘴.png │ ├── 擦汗.png │ ├── 敲打.png │ ├── 晕.png │ ├── 月亮.png │ ├── 机智.png │ ├── 流汗.png │ ├── 流泪.png │ ├── 激动.png │ ├── 炸弹.png │ ├── 爱你.png │ ├── 爱心.png │ ├── 爱情.png │ ├── 猪头.png │ ├── 献吻.png │ ├── 玫瑰.png │ ├── 瓢虫.png │ ├── 疑问.png │ ├── 疯了.png │ ├── 白眼.png │ ├── 皱眉.png │ ├── 睡.png │ ├── 磕头.png │ ├── 礼物.png │ ├── 篮球.png │ ├── 糗大了.png │ ├── 红包.png │ ├── 耶.png │ ├── 胜利.png │ ├── 色.png │ ├── 菜刀.png │ ├── 蛋糕.png │ ├── 衰.png │ ├── 西瓜.png │ ├── 调皮.png │ ├── 足球.png │ ├── 跳绳.png │ ├── 跳跳.png │ ├── 转圈.png │ ├── 鄙视.png │ ├── 酷.png │ ├── 闪电.png │ ├── 闭嘴.png │ ├── 阴险.png │ ├── 难过.png │ ├── 飞吻.png │ ├── 饥饿.png │ ├── 饭.png │ ├── 骷髅.png │ ├── 鸡.png │ └── 鼓掌.png │ └── screen │ ├── bg.jpg │ ├── bg.png │ ├── footer2.png │ ├── header-bg.png │ └── server-bg.png ├── src ├── App.vue ├── api │ ├── errorCodeType.ts │ ├── http.ts │ ├── project.ts │ ├── record.ts │ ├── request.ts │ ├── setting.ts │ ├── system.ts │ └── user.ts ├── assets │ ├── 403_images │ │ ├── 403.png │ │ └── 403_cloud.png │ ├── 404_images │ │ ├── 404.png │ │ ├── 404_bg.png │ │ └── 404_cloud.png │ ├── iconfont │ │ ├── iconfont.css │ │ ├── iconfont.js │ │ ├── iconfont.json │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ └── image │ │ ├── allow.png │ │ ├── avatar.png │ │ ├── berserk.jpg │ │ ├── center-inner1.png │ │ ├── charts │ │ └── 1-1-bg.png │ │ ├── circle-bg.png │ │ ├── cro-avatar.jpg │ │ ├── login │ │ ├── qrcode-icon.png │ │ └── side-logo.jpg │ │ ├── logo.png │ │ ├── none-response.jpg │ │ ├── openapi.png │ │ ├── postman.png │ │ └── we.png ├── components │ ├── AvatarCropper │ │ └── index.vue │ ├── CardHeader │ │ └── index.vue │ ├── MirrorCode │ │ ├── index.vue │ │ ├── registerCompletion.ts │ │ └── worker.ts │ ├── PageWrapLayout │ │ ├── index.scss │ │ └── index.vue │ ├── SvgIcon │ │ └── index.vue │ ├── SwitchDark │ │ └── index.vue │ ├── Table │ │ ├── EditableProTable │ │ │ └── index.vue │ │ └── PropTable │ │ │ └── index.vue │ ├── Theme │ │ └── index.vue │ ├── no-cron │ │ ├── index.vue │ │ └── language │ │ │ ├── cn.js │ │ │ ├── en.js │ │ │ ├── index.js │ │ │ └── pt.js │ └── u-container-layout │ │ └── index.vue ├── config │ └── index.ts ├── hooks │ ├── useFullscreen.ts │ ├── useResizeHandler.ts │ └── useWrapComponents.ts ├── icons │ ├── index.js │ ├── svg │ │ ├── arrowdown.svg │ │ ├── arrowup.svg │ │ ├── borrow.svg │ │ ├── compass.svg │ │ ├── dashboard.svg │ │ ├── dingding.svg │ │ ├── entrust.svg │ │ ├── example.svg │ │ ├── exit-fullscreen.svg │ │ ├── eye-open.svg │ │ ├── eye.svg │ │ ├── feishu.svg │ │ ├── form.svg │ │ ├── fullscreen.svg │ │ ├── go-out.svg │ │ ├── home.svg │ │ ├── horn.svg │ │ ├── inquiry.svg │ │ ├── link.svg │ │ ├── mistake.svg │ │ ├── nested.svg │ │ ├── notice.svg │ │ ├── password.svg │ │ ├── put-in.svg │ │ ├── qiyeweixin.svg │ │ ├── report-form.svg │ │ ├── right.svg │ │ ├── settings.svg │ │ ├── size.svg │ │ ├── synchronous.svg │ │ ├── table.svg │ │ ├── take-over.svg │ │ ├── task.svg │ │ ├── todo.svg │ │ ├── tree.svg │ │ ├── update.svg │ │ ├── user.svg │ │ └── webhook.svg │ └── svgo.yml ├── layout │ ├── LayoutColumns │ │ └── index.vue │ ├── LayoutHorizontal │ │ ├── HeaderHorizontal │ │ │ ├── index.scss │ │ │ └── index.vue │ │ └── index.vue │ ├── LayoutVertical │ │ ├── HeaderVertical │ │ │ ├── index.scss │ │ │ └── index.vue │ │ └── index.vue │ ├── components │ │ ├── Footer │ │ │ └── index.vue │ │ ├── Header │ │ │ ├── ToolLeft.vue │ │ │ ├── ToolRight.vue │ │ │ └── components │ │ │ │ ├── Avatar.vue │ │ │ │ ├── CollapseIcon.vue │ │ │ │ ├── Hamburger.vue │ │ │ │ ├── Height.vue │ │ │ │ ├── PersonalDialog.vue │ │ │ │ ├── Remind.vue │ │ │ │ ├── ScreenFull.vue │ │ │ │ ├── Setting.vue │ │ │ │ ├── SwitchEnvList.vue │ │ │ │ └── globalComSize.vue │ │ ├── Main │ │ │ └── index.vue │ │ ├── Mobile │ │ │ └── index.vue │ │ ├── Sidebar │ │ │ ├── components │ │ │ │ └── Logo.vue │ │ │ └── index.vue │ │ ├── SubMenu │ │ │ ├── Link.vue │ │ │ ├── MenuItem.vue │ │ │ ├── SubItem.vue │ │ │ └── SubMenu.vue │ │ └── TagsView │ │ │ ├── components │ │ │ └── MoreButton.vue │ │ │ └── index.vue │ └── index.vue ├── main.ts ├── mock │ └── system.ts ├── permission.ts ├── plugins │ └── ElIcons.ts ├── routers │ ├── index.ts │ └── modules │ │ ├── other.ts │ │ └── tools.ts ├── store │ ├── index.ts │ └── modules │ │ ├── permission.ts │ │ ├── setting.ts │ │ ├── socket.ts │ │ ├── tagsView.ts │ │ └── user.ts ├── styles │ ├── common.scss │ ├── element-dark.scss │ ├── element.scss │ ├── index.scss │ ├── sidebar.scss │ ├── transition.scss │ └── variables.scss ├── utils │ ├── Print.js │ ├── auth.ts │ ├── clipboard.ts │ ├── commonFunction.js │ ├── element.ts │ ├── emojis.ts │ ├── formatTime.js │ ├── heartCheck.js │ ├── index.ts │ ├── jsonPath.js │ ├── mitt.js │ ├── requestAnimationFrameThrottle.js │ ├── resize.js │ ├── routers.ts │ ├── socket.ts │ └── validate.ts ├── views │ ├── closed │ │ └── loop │ │ │ ├── components │ │ │ ├── closedTasksDetail.vue │ │ │ └── step.vue │ │ │ └── index.vue │ ├── errorPages │ │ ├── 403.vue │ │ └── 404.vue │ ├── home │ │ ├── index.scss │ │ └── index.vue │ ├── https │ │ ├── api │ │ │ ├── components │ │ │ │ ├── Side.vue │ │ │ │ ├── Table.vue │ │ │ │ ├── apiScript.vue │ │ │ │ ├── detail.vue │ │ │ │ ├── extract.vue │ │ │ │ ├── groupDialog.vue │ │ │ │ ├── importDialog.vue │ │ │ │ ├── requestHeaders.vue │ │ │ │ ├── requestQuery.vue │ │ │ │ ├── requestRaw.vue │ │ │ │ ├── responseReport.vue │ │ │ │ └── validator.vue │ │ │ ├── index.scss │ │ │ └── index.vue │ │ ├── case │ │ │ ├── components │ │ │ │ ├── Side.vue │ │ │ │ ├── Table.vue │ │ │ │ ├── apiInfoController.vue │ │ │ │ ├── detail.vue │ │ │ │ ├── groupDialog.vue │ │ │ │ ├── selectApi.vue │ │ │ │ └── step.vue │ │ │ ├── index.scss │ │ │ └── index.vue │ │ └── plan │ │ │ ├── components │ │ │ ├── detail.vue │ │ │ ├── selectCase.vue │ │ │ └── step.vue │ │ │ └── index.vue │ ├── login │ │ ├── components │ │ │ ├── LoginForm.vue │ │ │ └── LoginQrcode.vue │ │ ├── index.scss │ │ └── index.vue │ ├── other │ │ └── clipboard │ │ │ └── index.vue │ ├── project │ │ ├── components │ │ │ ├── addDialog.vue │ │ │ └── editProject.vue │ │ └── index.vue │ ├── record │ │ ├── build │ │ │ ├── components │ │ │ │ ├── ReportStatistics.vue │ │ │ │ ├── caseStepDetail.vue │ │ │ │ └── detail.vue │ │ │ └── index.vue │ │ └── history │ │ │ └── index.vue │ ├── system │ │ ├── database │ │ │ ├── components │ │ │ │ └── databaseDialog.vue │ │ │ └── index.vue │ │ ├── datastructure │ │ │ ├── components │ │ │ │ └── databaseDialog.vue │ │ │ └── index.vue │ │ ├── dept │ │ │ ├── components │ │ │ │ └── deptDialog.vue │ │ │ ├── index.scss │ │ │ └── index.vue │ │ ├── dictionary │ │ │ ├── components │ │ │ │ ├── Side.vue │ │ │ │ ├── Table.vue │ │ │ │ ├── dictionaryEntryDialog.vue │ │ │ │ └── dictsortDialog.vue │ │ │ ├── index.scss │ │ │ └── index.vue │ │ ├── env │ │ │ ├── components │ │ │ │ ├── DatabseSetting.vue │ │ │ │ ├── VariablePool.vue │ │ │ │ ├── addressSetting.vue │ │ │ │ ├── dbConfig.vue │ │ │ │ ├── detail.vue │ │ │ │ └── selectDatabase.vue │ │ │ └── index.vue │ │ ├── function │ │ │ ├── components │ │ │ │ └── detail.vue │ │ │ └── index.vue │ │ ├── menu │ │ │ ├── components │ │ │ │ └── MenuDrawer.vue │ │ │ └── index.vue │ │ ├── notice │ │ │ ├── components │ │ │ │ └── databaseDialog.vue │ │ │ └── index.vue │ │ ├── role │ │ │ ├── components │ │ │ │ └── roleDrawer.vue │ │ │ └── index.vue │ │ └── user │ │ │ ├── components │ │ │ ├── userDialog.vue │ │ │ ├── userSide.vue │ │ │ └── userTable.vue │ │ │ ├── index.scss │ │ │ └── index.vue │ └── tools │ │ └── websocket │ │ ├── components │ │ └── responseDetail.vue │ │ └── index.vue └── vite-env.d.ts ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts /.idea/EasyPost.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/docker-compose.yml -------------------------------------------------------------------------------- /unit-backend/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /unit-backend/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | -------------------------------------------------------------------------------- /unit-backend/.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /unit-backend/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /unit-backend/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /unit-backend/.idea/shelf/Uncommitted_changes_before_Checkout_at_2024_1_22_18_24_[Changes]/shelved.patch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/.idea/shelf/Uncommitted_changes_before_Checkout_at_2024_1_22_18_24_[Changes]/shelved.patch -------------------------------------------------------------------------------- /unit-backend/.idea/shelf/Uncommitted_changes_before_Checkout_at_2024_1_22_18_24__Changes_.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /unit-backend/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /unit-backend/api/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/dao/__init__.py: -------------------------------------------------------------------------------- 1 | from api.services.executor import ExecutorServiceClient 2 | 3 | executor_service_client = ExecutorServiceClient() 4 | -------------------------------------------------------------------------------- /unit-backend/api/emus/ApiParametersEnum.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | class HttpMethodEnum: 4 | 5 | GET_UPPER = "GET" 6 | GET_LOWER = "get" 7 | POST_UPPER = "POST" 8 | POST_LOWER = "post" 9 | PUT_UPPER = "PUT" 10 | PUT_LOWER = "put" 11 | PATCH_UPPER = "PATCH" 12 | PATCH_LOWER = "patch" 13 | DELETE_UPPER = "DELETE" 14 | DELETE_LOWER = "delete" 15 | HEAD_UPPER = "HEAD" 16 | HEAD_LOWER = "head" 17 | 18 | 19 | class ApiHeadersEnum: 20 | 21 | JSON = "application/json" 22 | FORM_DATA = "multipart/form-data" 23 | X_WWW_FORM_URLENCODED = "x_www_form_urlencoded" 24 | 25 | 26 | class ApiModeEnum: 27 | 28 | RAW = "raw" 29 | FORM_DATA = "formdata" 30 | X_WWW_FORM_URLENCODED = "x_www_form_urlencoded" 31 | -------------------------------------------------------------------------------- /unit-backend/api/emus/CaseBaseEnum.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | class RunningTstCasesEnum: 4 | 5 | MODE = "normal" 6 | ENV_LITTLE = "env" 7 | ENV_BIG = "ENV" 8 | EXTRACT_JSON_PATH = "jsonpath" 9 | EXTRACT_RE = "re" 10 | 11 | 12 | class CaseStatusEnum: 13 | 14 | ERROR = "error" 15 | FAIL = "fail" 16 | SUCCESS = "success" 17 | 18 | 19 | class CaseStatusMessageEnum: 20 | 21 | SUCCESS = "成功" 22 | FAIL = "失败" 23 | ERROR = "错误" 24 | SKIP = "跳过" 25 | -------------------------------------------------------------------------------- /unit-backend/api/emus/CaseParametersEnum.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | class CaseParametersEnum: 4 | 5 | JSON = "json" 6 | FORM_DATA = "form_data" 7 | X_WWW_FORM_URLENCODED = "x-www-form-urlencoded" 8 | SETUP_SCRIPT = "setup_script" 9 | TEARDOWN_SCRIPT = "teardown_script" 10 | -------------------------------------------------------------------------------- /unit-backend/api/emus/CertEnum.py: -------------------------------------------------------------------------------- 1 | from enum import IntEnum 2 | 3 | 4 | class CertType(IntEnum): 5 | windows = 0 6 | linux = 1 7 | macos = 2 8 | ios = 3 9 | android = 4 10 | 11 | def get_suffix(self): 12 | if self == CertType.windows: 13 | return "p12" 14 | if self in (CertType.linux, CertType.macos, CertType.ios): 15 | return "pem" 16 | if self == CertType.android: 17 | return "cer" 18 | raise Exception("unsupported cert type") 19 | -------------------------------------------------------------------------------- /unit-backend/api/emus/HttpEnum.py: -------------------------------------------------------------------------------- 1 | from enum import IntEnum 2 | 3 | 4 | class ApiSnapshotEnum(IntEnum): 5 | 6 | numbers = 100 7 | 8 | 9 | class TreeEnum(IntEnum): 10 | 11 | current = 1 12 | previous = 2 13 | -------------------------------------------------------------------------------- /unit-backend/api/emus/MessageEnum.py: -------------------------------------------------------------------------------- 1 | from enum import IntEnum 2 | 3 | 4 | class WebSocketMessageEnum(IntEnum): 5 | # 消息数量 6 | COUNT = 0 7 | # 桌面通知 8 | DESKTOP = 1 9 | # 录制数据 10 | RECORD = 2 11 | 12 | 13 | class MessageStateEnum(IntEnum): 14 | """ 15 | 消息状态枚举类 16 | """ 17 | unread = 1 # 未读 18 | read = 2 # 已读 19 | 20 | 21 | class MessageTypeEnum(IntEnum): 22 | """ 23 | 消息类型枚举类 24 | """ 25 | all = 0 # 全部消息 26 | broadcast = 1 # 广播消息 27 | others = 2 # 其他消息 28 | -------------------------------------------------------------------------------- /unit-backend/api/emus/NoticeEnum.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | class NoticeType: 4 | 5 | WEBHOOK = "WEBHOOK" 6 | DINGDING = "DINGDING" 7 | WEIXIN = "WEIXIN" 8 | FEISHU = "FEISHU" 9 | 10 | 11 | class NoticeEvents: 12 | 13 | COMPLETED = "TEST_CASE_COMPLETED" 14 | COMPLETED_WITH_FAILURE = "TEST_CASE_COMPLETED_WITH_FAILURE" 15 | -------------------------------------------------------------------------------- /unit-backend/api/emus/PlanEnum.py: -------------------------------------------------------------------------------- 1 | from enum import IntEnum 2 | 3 | 4 | class PlanType(IntEnum): 5 | 6 | START = 1 7 | STOP = 0 8 | 9 | -------------------------------------------------------------------------------- /unit-backend/api/emus/ProjectEnum.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | class ProjectRoleEnum: 4 | 5 | DEL_PERMISSION = "删除角色失败, 你无改项目权限❌" 6 | ADD_PERMISSION = "新增角色失败, 你无改项目权限!❌" 7 | HAS_PERMISSION = "当前角色已填权限!✅" 8 | CREATE_RANGE = 2 9 | -------------------------------------------------------------------------------- /unit-backend/api/emus/RouterConfigEnum.py: -------------------------------------------------------------------------------- 1 | class RouterConfigEnum: 2 | 3 | CASE = "case" 4 | DATABASE = "database" 5 | ENV = "env" 6 | FUNCTION = "function" 7 | HTTP = "http" 8 | NOTICE = "notice" 9 | PLAN = "plan" 10 | PROJECT = "project" 11 | REPORT = "report" 12 | STATISTICS = "statistics" 13 | TREE = "tree" 14 | USER = "user" 15 | DataStructure = "datastructure" 16 | -------------------------------------------------------------------------------- /unit-backend/api/emus/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/emus/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/emus/eventsEvents.py: -------------------------------------------------------------------------------- 1 | from enum import Enum 2 | 3 | 4 | class EventTypeEum(Enum): 5 | 6 | SCHEDULED_START = 1, "调度程序启动✅" 7 | SCHEDULED_SHUTDOWN = 2, "调度程序关闭❌" 8 | SCHEDULED_PAUSE = 4, "调度程序中任务处理暂停⏯️" 9 | SCHEDULED_RENEW = 8, "调度程序中任务处理恢复✅" 10 | SCHEDULED_ADD = 16, "将执行器添加到调度程序中✅" 11 | SCHEDULED_DEL = 32, "执行器从调度程序中删除❌" 12 | SCHEDULED_STORE_ADD = 64, "将任务存储添加到调度程序中✅" 13 | SCHEDULED_STORE_DEL = 128, "任务存储从调度程序中删除✅" 14 | SCHEDULED_TASK_STORE_DEL = 256, "所有任务从所有任务存储中删除或从一个特定的任务存储中删除❌" 15 | SCHEDULED_ADD_NEW_TASK = 512, "添加新的定时任务✅" 16 | SCHEDULED_STORE_DEL_TASK = 1024, "从任务存储中删除了任务❌" 17 | SCHEDULED_UPDATE_TASK = 2048, "从调度程序外部修改了任务✅" 18 | SCHEDULED_EXECUTE_SUCCESS = 4096, "任务执行成功✅" 19 | SCHEDULED_EXECUTE_ERROR = 8192, "任务在执行期间引发异常⚠️" 20 | SCHEDULED_EXECUTE_WRONG = 16384, "错误了任务执行🚫" 21 | SCHEDULED_EXECUTED = 32768, "任务已经提交到执行器中执行✅" 22 | SCHEDULED_EXECUTE_MAXIMUM = 65536, "任务因为达到最大并发执行时,触发的事件⬆️" 23 | 24 | def __new__(cls, value, msg): 25 | obj = object.__new__(cls) 26 | obj._value_ = value 27 | obj.msg = msg 28 | return obj 29 | 30 | def __str__(self): 31 | return f"{self.name}: {self.msg}" 32 | -------------------------------------------------------------------------------- /unit-backend/api/emus/treesEnum.py: -------------------------------------------------------------------------------- 1 | from enum import IntEnum 2 | 3 | 4 | class TreeType(IntEnum): 5 | 6 | API = 0 7 | CASE = 1 8 | -------------------------------------------------------------------------------- /unit-backend/api/events/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/events/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/events/event.py: -------------------------------------------------------------------------------- 1 | from abc import ABC 2 | 3 | 4 | class Cancelable(ABC): 5 | _is_canceled: bool 6 | 7 | def __init__(self, is_canceled: bool = False): 8 | self._is_canceled = is_canceled 9 | 10 | def is_canceled(self): 11 | """ 12 | :return: 该事件是否被取消 13 | """ 14 | return self._is_canceled 15 | 16 | def cancel(self): 17 | """ 18 | 取消该事件 19 | """ 20 | self._is_canceled = True 21 | 22 | 23 | class Event(ABC): 24 | ... 25 | -------------------------------------------------------------------------------- /unit-backend/api/exception/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/exception/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/exception/events.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | class UnsupportedFunctionException(Exception): 4 | msg: str 5 | 6 | def __init__(self, msg: str): 7 | self.msg = msg 8 | 9 | def __str__(self): 10 | return self.msg 11 | 12 | 13 | class IllegalEventException(Exception): 14 | def __str__(self): 15 | return 'Event handle type not match.' 16 | -------------------------------------------------------------------------------- /unit-backend/api/filters/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/filters/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/filters/http.py: -------------------------------------------------------------------------------- 1 | import django_filters.rest_framework as filters 2 | from api.models.https import ClosedTasks 3 | 4 | 5 | class ClosedTasksFilter(filters.FilterSet): 6 | 7 | name = filters.CharFilter(field_name='name', help_text='闭环任务模糊查询', lookup_expr='icontains') 8 | 9 | class Meta: 10 | model = ClosedTasks 11 | fields = ["name"] 12 | -------------------------------------------------------------------------------- /unit-backend/api/filters/plan.py: -------------------------------------------------------------------------------- 1 | import django_filters.rest_framework as filters 2 | from api.models.plan import ( 3 | Plan, 4 | ApschedulerJobs 5 | ) 6 | 7 | 8 | class PlanFilter(filters.FilterSet): 9 | 10 | name = filters.CharFilter(field_name='name', help_text='按计划名模糊查询', lookup_expr='icontains') 11 | 12 | class Meta: 13 | model = Plan 14 | fields = ["name"] 15 | 16 | 17 | class ApschedulerJobsFilter(filters.FilterSet): 18 | 19 | id = filters.CharFilter(field_name='id', help_text='按JobID模糊查询', lookup_expr='icontains') 20 | 21 | class Meta: 22 | model = ApschedulerJobs 23 | fields = ["id"] 24 | -------------------------------------------------------------------------------- /unit-backend/api/filters/project.py: -------------------------------------------------------------------------------- 1 | import django_filters.rest_framework as filters 2 | from api.models.project import Project 3 | 4 | 5 | class ProjectFilter(filters.FilterSet): 6 | 7 | id = filters.CharFilter(field_name='id', help_text='按项目ID查询', lookup_expr='exact') 8 | name = filters.CharFilter(field_name='name', help_text='按项目名模糊查询', lookup_expr='icontains') 9 | created_gt = filters.DateTimeFilter(field_name='create_time', help_text='按创建时间gt查询', lookup_expr='gt') 10 | created_lt = filters.DateTimeFilter(field_name='create_time', help_text='按创建时间lt查询', lookup_expr='lt') 11 | 12 | class Meta: 13 | model = Project 14 | fields = ["id", "name", "created_gt", "created_lt"] 15 | -------------------------------------------------------------------------------- /unit-backend/api/filters/report.py: -------------------------------------------------------------------------------- 1 | import django_filters.rest_framework as filters 2 | from api.models.report import ( 3 | Main, 4 | Detail 5 | ) 6 | 7 | 8 | class ReportFilter(filters.FilterSet): 9 | 10 | name = filters.CharFilter(field_name='name', help_text='按报告名模糊查询', lookup_expr='icontains') 11 | 12 | class Meta: 13 | model = Main 14 | fields = ["name"] 15 | 16 | 17 | class ReportDetailFilter(filters.FilterSet): 18 | 19 | name = filters.CharFilter(field_name='name', help_text='按用例名模糊查询', lookup_expr='icontains') 20 | 21 | class Meta: 22 | model = Detail 23 | fields = ["name"] 24 | -------------------------------------------------------------------------------- /unit-backend/api/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/management/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/management/commands/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/management/commands/clear_cache.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import BaseCommand 2 | from django.conf import settings 3 | from django.core.cache import caches 4 | from utils.logger import logger as logging 5 | 6 | 7 | class Command(BaseCommand): 8 | 9 | help = '⚠️Clears cache_id' 10 | 11 | def add_arguments(self, parser): 12 | parser.add_argument('cache_name', nargs='?', type=str, default='default') 13 | 14 | def handle(self, *args, **options): 15 | cache_name = options['cache_name'] 16 | try: 17 | assert settings.CACHES 18 | caches[cache_name].clear() 19 | self.stdout.write(self.style.SUCCESS(f'Successfully cleared "{cache_name}" cache ✅')) 20 | except Exception as err: 21 | self.stderr.write(self.style.ERROR(f'Failed to clear cache: {err} ❌')) 22 | 23 | logging.info(f""" 24 | 25 | Clearing the application cache succeeded: 26 | 27 | CacheName: {cache_name} 28 | 29 | """) 30 | -------------------------------------------------------------------------------- /unit-backend/api/media/avatar/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/media/avatar/default.png -------------------------------------------------------------------------------- /unit-backend/api/media/avatar/failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/media/avatar/failed.png -------------------------------------------------------------------------------- /unit-backend/api/middleware/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/middleware/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/migrations/0003_alter_plan_options.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-02-06 03:00 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0002_case_djangoadminaccessipwhitelist_project_and_more"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name="plan", 15 | options={"verbose_name": "Plan", "verbose_name_plural": "Plan"}, 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0005_rename_case_detail_report_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-02-06 05:33 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0004_detail_main_detailstep_detail_case"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name="detail", 15 | old_name="case", 16 | new_name="report", 17 | ), 18 | migrations.RenameField( 19 | model_name="detailstep", 20 | old_name="case", 21 | new_name="detail", 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0006_alter_detailstep_detail.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-02-07 02:12 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ("api", "0005_rename_case_detail_report_and_more"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="detailstep", 16 | name="detail", 17 | field=models.ForeignKey( 18 | null=True, 19 | on_delete=django.db.models.deletion.SET_NULL, 20 | related_name="steps", 21 | to="api.detail", 22 | verbose_name="DetailStep Step", 23 | ), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0007_detailstep_sort.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-02-08 03:38 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0006_alter_detailstep_detail"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="detailstep", 15 | name="sort", 16 | field=models.CharField( 17 | blank=True, max_length=200, null=True, verbose_name="DetailStep sort" 18 | ), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0009_datasource_database_alter_datasource_port_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-02 03:03 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0008_datasource"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="datasource", 15 | name="database", 16 | field=models.CharField( 17 | blank=True, 18 | max_length=100, 19 | null=True, 20 | verbose_name="DataSource Database", 21 | ), 22 | ), 23 | migrations.AlterField( 24 | model_name="datasource", 25 | name="port", 26 | field=models.CharField( 27 | blank=True, max_length=100, null=True, verbose_name="DataSource Port" 28 | ), 29 | ), 30 | migrations.AlterField( 31 | model_name="datasource", 32 | name="user", 33 | field=models.CharField( 34 | blank=True, max_length=100, null=True, verbose_name="DataSource User" 35 | ), 36 | ), 37 | ] 38 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0010_remove_datasource_name_alter_datasource_database.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-02 03:06 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0009_datasource_database_alter_datasource_port_and_more"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="datasource", 15 | name="name", 16 | ), 17 | migrations.AlterField( 18 | model_name="datasource", 19 | name="database", 20 | field=models.CharField( 21 | blank=True, max_length=50, null=True, verbose_name="DataSource Name" 22 | ), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0012_alter_functions_options.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-02 06:23 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0011_functions"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name="functions", 15 | options={ 16 | "ordering": ("-create_time",), 17 | "verbose_name": "Functions", 18 | "verbose_name_plural": "Functions", 19 | }, 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0013_address_headers_address_variables.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-03 09:08 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0012_alter_functions_options"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="address", 15 | name="headers", 16 | field=models.TextField( 17 | blank=True, null=True, verbose_name="Address Headers" 18 | ), 19 | ), 20 | migrations.AddField( 21 | model_name="address", 22 | name="variables", 23 | field=models.TextField( 24 | blank=True, null=True, verbose_name="Address Variables" 25 | ), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0015_alter_project_avatar.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-09 09:59 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0014_tasklog"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="project", 15 | name="avatar", 16 | field=models.ImageField( 17 | blank=True, 18 | default="C:\\Users\\86135\\Desktop\\EasyPost\\unit-backend\\api\\templates\\media\\default.png", 19 | null=True, 20 | upload_to="C:\\Users\\86135\\Desktop\\EasyPost\\unit-backend\\api\\templates\\media", 21 | verbose_name="Project Avatar", 22 | ), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0016_alter_api_method.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-10 05:59 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0015_alter_project_avatar"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="api", 15 | name="method", 16 | field=models.CharField( 17 | blank=True, max_length=250, null=True, verbose_name="Api Method" 18 | ), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0017_alter_api_method_alter_api_name.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-10 06:02 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0016_alter_api_method"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="api", 15 | name="method", 16 | field=models.CharField( 17 | blank=True, max_length=50, null=True, verbose_name="Api Method" 18 | ), 19 | ), 20 | migrations.AlterField( 21 | model_name="api", 22 | name="name", 23 | field=models.CharField( 24 | blank=True, max_length=250, null=True, verbose_name="Api Name" 25 | ), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0018_api_source.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-10 07:48 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0017_alter_api_method_alter_api_name"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="api", 15 | name="source", 16 | field=models.TextField(default=None, verbose_name="Api Source"), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0019_user_last_login_time.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-12 08:21 2 | 3 | from django.db import migrations, models 4 | import django.utils.timezone 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ("api", "0018_api_source"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name="user", 16 | name="last_login_time", 17 | field=models.DateTimeField( 18 | default=django.utils.timezone.now, verbose_name="VerifyCode AddTime" 19 | ), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0020_user_ip_address_alter_user_last_login_time.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-12 08:29 2 | 3 | from django.db import migrations, models 4 | import django.utils.timezone 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ("api", "0019_user_last_login_time"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name="user", 16 | name="ip_address", 17 | field=models.CharField( 18 | max_length=125, null=True, verbose_name="User IpAddress" 19 | ), 20 | ), 21 | migrations.AlterField( 22 | model_name="user", 23 | name="last_login_time", 24 | field=models.DateTimeField( 25 | default=django.utils.timezone.now, verbose_name="User LastLoginTime" 26 | ), 27 | ), 28 | ] 29 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0022_alter_datasource_env.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-17 05:57 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ("api", "0021_rename_desc_testenvironment_remarks_datasource_env_and_more"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="datasource", 16 | name="env", 17 | field=models.ForeignKey( 18 | null=True, 19 | on_delete=django.db.models.deletion.SET_NULL, 20 | related_name="data_source", 21 | to="api.testenvironment", 22 | verbose_name="DataSource env", 23 | ), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0023_remove_testenvironment_headers.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-17 05:59 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0022_alter_datasource_env"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="testenvironment", 15 | name="headers", 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0026_remove_testenvironment_host_testenvironment_server.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-18 06:37 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0025_alter_binddatasource_create_time_and_more"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="testenvironment", 15 | name="host", 16 | ), 17 | migrations.AddField( 18 | model_name="testenvironment", 19 | name="server", 20 | field=models.TextField( 21 | blank=True, null=True, verbose_name="TestEnvironment Server" 22 | ), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0028_remove_notice_project_notice_trigger_events.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2 on 2024-04-22 06:46 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0027_notice"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="notice", 15 | name="project", 16 | ), 17 | migrations.AddField( 18 | model_name="notice", 19 | name="trigger_events", 20 | field=models.TextField( 21 | blank=True, null=True, verbose_name="Notice TriggerEvent" 22 | ), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0031_alter_menu_hidden.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-05-08 06:37 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0030_alter_datastructure_type_menu"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="menu", 15 | name="hidden", 16 | field=models.BooleanField( 17 | blank=True, default=False, null=True, verbose_name="Menu Hidden" 18 | ), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0032_alter_projectrole_options.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-05-16 08:56 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0031_alter_menu_hidden"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name="projectrole", 15 | options={ 16 | "verbose_name": "ProjectRole", 17 | "verbose_name_plural": "ProjectRole", 18 | }, 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0035_alter_userrole_user.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-05-17 07:29 2 | 3 | import django.db.models.deletion 4 | from django.conf import settings 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ("api", "0034_remove_user_role_userrole"), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name="userrole", 17 | name="user", 18 | field=models.ForeignKey( 19 | null=True, 20 | on_delete=django.db.models.deletion.SET_NULL, 21 | related_name="roles", 22 | to=settings.AUTH_USER_MODEL, 23 | verbose_name="User", 24 | ), 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0036_delete_tasklog.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-05-20 07:58 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0035_alter_userrole_user"), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name="TaskLog", 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0038_alter_apschedulerjobs_options.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-05-20 09:04 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0037_apschedulerjobs"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name="apschedulerjobs", 15 | options={"managed": False}, 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0039_alter_apschedulerjobs_table.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-05-20 09:07 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0038_alter_apschedulerjobs_options"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelTable( 14 | name="apschedulerjobs", 15 | table="apscheduler_jobs", 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0040_alter_datastructure_options_project_test_type.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-06-20 02:48 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0039_alter_apschedulerjobs_table"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name="datastructure", 15 | options={ 16 | "verbose_name": "DataStructure", 17 | "verbose_name_plural": "DataStructure", 18 | }, 19 | ), 20 | migrations.AddField( 21 | model_name="project", 22 | name="test_type", 23 | field=models.CharField( 24 | choices=[("UI", "Ui"), ("API", "Api")], 25 | default="API", 26 | max_length=50, 27 | verbose_name="Project TestType", 28 | ), 29 | ), 30 | ] 31 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0042_remove_closedtasks_project.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-06-20 03:30 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0041_closedtasks"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="closedtasks", 15 | name="project", 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0043_remove_project_test_type_closedtasks_test_type.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-06-21 05:46 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0042_remove_closedtasks_project"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="project", 15 | name="test_type", 16 | ), 17 | migrations.AddField( 18 | model_name="closedtasks", 19 | name="test_type", 20 | field=models.CharField( 21 | choices=[("UI", "Ui"), ("API", "Api")], 22 | default="API", 23 | max_length=50, 24 | verbose_name="ClosedTasks TestType", 25 | ), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0044_alter_closedtasks_test_type.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-06-21 08:11 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0043_remove_project_test_type_closedtasks_test_type"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="closedtasks", 15 | name="test_type", 16 | field=models.CharField( 17 | choices=[("UI自动化", "Ui"), ("API自动化", "Api")], 18 | default="API自动化", 19 | max_length=50, 20 | verbose_name="ClosedTasks TestType", 21 | ), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0045_alter_closedtasks_test_type.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-06-21 08:12 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0044_alter_closedtasks_test_type"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="closedtasks", 15 | name="test_type", 16 | field=models.CharField( 17 | choices=[("UI", "Ui"), ("API", "Api")], 18 | default="API", 19 | max_length=50, 20 | verbose_name="ClosedTasks TestType", 21 | ), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0047_alter_closedtasksdetail_err_type.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-06-21 10:15 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0046_remove_closedtasks_detail_closedtasksdetail"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="closedtasksdetail", 15 | name="err_type", 16 | field=models.CharField( 17 | choices=[ 18 | ("系统异常", "System Err"), 19 | ("用例修正", "Case Err"), 20 | ("环境异常", "Environ Err"), 21 | ("断言错误", "Assert Err"), 22 | ], 23 | max_length=50, 24 | null=True, 25 | verbose_name="ClosedTasksDetail ErrType", 26 | ), 27 | ), 28 | ] 29 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0048_alter_closedtasksdetail_err_type.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-06-21 10:29 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0047_alter_closedtasksdetail_err_type"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="closedtasksdetail", 15 | name="err_type", 16 | field=models.CharField( 17 | choices=[ 18 | ("系统异常", "System Err"), 19 | ("用例错误", "Case Err"), 20 | ("环境异常", "Environ Err"), 21 | ("断言错误", "Assert Err"), 22 | ], 23 | max_length=50, 24 | null=True, 25 | verbose_name="ClosedTasksDetail ErrType", 26 | ), 27 | ), 28 | ] 29 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0049_closedtasksdetail_err_msg.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-06-24 06:43 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0048_alter_closedtasksdetail_err_type"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="closedtasksdetail", 15 | name="err_msg", 16 | field=models.TextField(default="", verbose_name="ClosedTasksDetail ErrMsg"), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0050_remove_closedtasksdetail_err_msg.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-06-24 06:58 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0049_closedtasksdetail_err_msg"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="closedtasksdetail", 15 | name="err_msg", 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0051_closedtasksdetail_err_msg_closedtasksdetail_err_png.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-06-24 07:15 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0050_remove_closedtasksdetail_err_msg"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="closedtasksdetail", 15 | name="err_msg", 16 | field=models.TextField(default="", verbose_name="ClosedTasksDetail ErrMsg"), 17 | ), 18 | migrations.AddField( 19 | model_name="closedtasksdetail", 20 | name="err_png", 21 | field=models.CharField( 22 | blank=True, 23 | max_length=250, 24 | null=True, 25 | verbose_name="ClosedTasksDetail ErrPng", 26 | ), 27 | ), 28 | ] 29 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0052_alter_closedtasksdetail_id.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-07-31 06:06 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0051_closedtasksdetail_err_msg_closedtasksdetail_err_png"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="closedtasksdetail", 15 | name="id", 16 | field=models.AutoField(primary_key=True, serialize=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0053_remove_api_source.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-09-25 05:43 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0052_alter_closedtasksdetail_id"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="api", 15 | name="source", 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0055_alter_plan_state.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-11-04 08:20 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0054_step_priority_step_status_alter_project_avatar"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="plan", 15 | name="state", 16 | field=models.CharField( 17 | choices=[(0, "Stop"), (1, "Running")], 18 | default=1, 19 | max_length=50, 20 | verbose_name="Plan State", 21 | ), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/0056_remove_notice_trigger_events.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.4 on 2024-11-05 06:22 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("api", "0055_alter_plan_state"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="notice", 15 | name="trigger_events", 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /unit-backend/api/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/migrations/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/mixins/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/mixins/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/models/__init__.py: -------------------------------------------------------------------------------- 1 | from api.models import user 2 | from api.models import project 3 | from api.models import setting 4 | from api.models import configuration 5 | from api.models import plan 6 | from api.models import https 7 | from api.models import report 8 | -------------------------------------------------------------------------------- /unit-backend/api/response/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/response/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/routers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/routers/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/routers/case.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.https import ( 5 | SaveOrUpdateCaseView, 6 | DelCaseView, 7 | CaseDetailView, 8 | CaseListView, 9 | RunCaseView, 10 | CaseStepDetailView, 11 | SaveOrUpdateStepView 12 | ) 13 | 14 | 15 | router = DefaultRouter() 16 | 17 | app_urls = [ 18 | path("SaveOrUpdate/", SaveOrUpdateCaseView.as_view()), 19 | path('run', RunCaseView.as_view()), 20 | path('delete/', DelCaseView.as_view()), 21 | path('detail/', CaseDetailView.as_view()), 22 | path("list", CaseListView.as_view({'get': 'list'})), 23 | path('step/detail/', CaseStepDetailView.as_view()), 24 | path('step/saveOrUpdate/', SaveOrUpdateStepView.as_view()) 25 | ] 26 | 27 | 28 | app_name = RouterConfigEnum.CASE 29 | urlpatterns = app_urls + router.urls 30 | -------------------------------------------------------------------------------- /unit-backend/api/routers/database.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.setting import ( 5 | DataSourceListViewSet, 6 | DataSourceDestroyViewSet, 7 | DataSourceUpdateViewSet, 8 | DataSourceCreateViewSet, 9 | DatabaseIsConnectView 10 | ) 11 | 12 | 13 | router = DefaultRouter() 14 | 15 | app_urls = [ 16 | path("list", DataSourceListViewSet.as_view()), 17 | path("delete/", DataSourceDestroyViewSet.as_view()), 18 | path("update/", DataSourceUpdateViewSet.as_view()), 19 | path("create", DataSourceCreateViewSet.as_view()), 20 | path("isConnect", DatabaseIsConnectView.as_view()), 21 | ] 22 | 23 | 24 | app_name = RouterConfigEnum.DATABASE 25 | urlpatterns = app_urls + router.urls 26 | -------------------------------------------------------------------------------- /unit-backend/api/routers/datastructure.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.setting import ( 5 | DataStructureListViewSet, 6 | NoticeDestroyViewSet, 7 | DataSourceUpdateViewSet, 8 | DataSourceCreateViewSet 9 | ) 10 | 11 | 12 | router = DefaultRouter() 13 | 14 | app_urls = [ 15 | path("list", DataStructureListViewSet.as_view()), 16 | path("delete/", NoticeDestroyViewSet.as_view()), 17 | path("update/", DataSourceUpdateViewSet.as_view()), 18 | path("create", DataSourceCreateViewSet.as_view()) 19 | ] 20 | 21 | 22 | app_name = RouterConfigEnum.DataStructure 23 | urlpatterns = app_urls + router.urls 24 | -------------------------------------------------------------------------------- /unit-backend/api/routers/env.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.setting import ( 5 | TestEnvironmentListViewSet, 6 | TestEnvironmentDestroyViewSet, 7 | EnvironmentSaveOrUpdateApiView, 8 | EnvironmentDetailView 9 | ) 10 | 11 | 12 | router = DefaultRouter() 13 | 14 | app_urls = [ 15 | path("list", TestEnvironmentListViewSet.as_view()), 16 | path("delete/", TestEnvironmentDestroyViewSet.as_view()), 17 | path("saveOrUpdate/", EnvironmentSaveOrUpdateApiView.as_view()), 18 | path("detail/", EnvironmentDetailView.as_view()) 19 | ] 20 | 21 | 22 | app_name = RouterConfigEnum.ENV 23 | urlpatterns = app_urls + router.urls 24 | -------------------------------------------------------------------------------- /unit-backend/api/routers/function.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.setting import ( 5 | FunctionsListViewSet, 6 | DebugFunctionApiView, 7 | GetFunctionListApiView, 8 | FunctionSaveOrUpdateApiView 9 | ) 10 | 11 | 12 | router = DefaultRouter() 13 | 14 | app_urls = [ 15 | path("saveOrUpdate/", FunctionSaveOrUpdateApiView.as_view()), 16 | path("detailList", GetFunctionListApiView.as_view()), 17 | path("debug/", DebugFunctionApiView.as_view()), 18 | path("list", FunctionsListViewSet.as_view()), 19 | ] 20 | 21 | 22 | app_name = RouterConfigEnum.FUNCTION 23 | urlpatterns = app_urls + router.urls 24 | -------------------------------------------------------------------------------- /unit-backend/api/routers/http.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.https import ( 5 | DelApiView, 6 | ApiDetailView, 7 | SaveOrUpdateApiView, 8 | ApiSnapshotView, 9 | ApiTestListView, 10 | ImportApiView, 11 | RunApiView, 12 | ClosedTasksViewSet, 13 | ClosedTasksRetrieveApi 14 | ) 15 | 16 | 17 | router = DefaultRouter() 18 | 19 | app_urls = [ 20 | path("delete/", DelApiView.as_view()), 21 | path("detail/", ApiDetailView.as_view()), 22 | path("saveOrUpdate/", SaveOrUpdateApiView.as_view()), 23 | path('snapshot', ApiSnapshotView.as_view()), 24 | path("list", ApiTestListView.as_view({'get': 'list'})), 25 | path("importApi/", ImportApiView.as_view()), 26 | path('run', RunApiView.as_view()), 27 | path("closedTasks", ClosedTasksViewSet.as_view()), 28 | path("closedTasks/detail/", ClosedTasksRetrieveApi.as_view()) 29 | ] 30 | 31 | 32 | app_name = RouterConfigEnum.HTTP 33 | urlpatterns = app_urls + router.urls 34 | -------------------------------------------------------------------------------- /unit-backend/api/routers/notice.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.setting import ( 5 | NoticeListViewSet, 6 | NoticeDestroyViewSet, 7 | NoticeDetailView, 8 | NoticeSaveOrUpdateApiView 9 | ) 10 | 11 | 12 | router = DefaultRouter() 13 | 14 | app_urls = [ 15 | path("list", NoticeListViewSet.as_view()), 16 | path("delete/", NoticeDestroyViewSet.as_view()), 17 | path("detail/", NoticeDetailView.as_view()), 18 | path("saveOrUpdate/", NoticeSaveOrUpdateApiView.as_view()), 19 | ] 20 | 21 | 22 | app_name = RouterConfigEnum.NOTICE 23 | urlpatterns = app_urls + router.urls 24 | -------------------------------------------------------------------------------- /unit-backend/api/routers/plan.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.plan import ( 5 | SaveOrUpdatePlanView, 6 | UpdatePlanStateView, 7 | RunPlanView, 8 | DelPlanView, 9 | PlanDetailView, 10 | PlanListViewSet, 11 | ApschedulerJobsListViewSet 12 | ) 13 | 14 | 15 | router = DefaultRouter() 16 | 17 | app_urls = [ 18 | path("SaveOrUpdate/", SaveOrUpdatePlanView.as_view()), 19 | path("UpdatePlanState//", UpdatePlanStateView.as_view()), 20 | path("run", RunPlanView.as_view()), 21 | path('delete/', DelPlanView.as_view()), 22 | path('detail/', PlanDetailView.as_view()), 23 | path("list", PlanListViewSet.as_view()), 24 | path("record/list", ApschedulerJobsListViewSet.as_view()) 25 | ] 26 | 27 | 28 | app_name = RouterConfigEnum.PLAN 29 | urlpatterns = app_urls + router.urls 30 | -------------------------------------------------------------------------------- /unit-backend/api/routers/project.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.project import ( 5 | ProjectListViewSet, 6 | ProjectDestroyViewSet, 7 | ProjectUpdateViewSet, 8 | ProjectCreateViewSet, 9 | ProjectRetrieveApi, 10 | ProjectRoleDestroyViewSet, 11 | ProjectRoleUpdateViewSet 12 | ) 13 | 14 | 15 | router = DefaultRouter() 16 | 17 | app_urls = [ 18 | path("list", ProjectListViewSet.as_view()), 19 | path("delete/", ProjectDestroyViewSet.as_view()), 20 | path("update/", ProjectUpdateViewSet.as_view()), 21 | path("create", ProjectCreateViewSet.as_view()), 22 | path("detail/", ProjectRetrieveApi.as_view()), 23 | path("role/delete", ProjectRoleDestroyViewSet.as_view()), 24 | path("role/add", ProjectRoleUpdateViewSet.as_view()), 25 | ] 26 | 27 | 28 | app_name = RouterConfigEnum.PROJECT 29 | urlpatterns = app_urls + router.urls 30 | -------------------------------------------------------------------------------- /unit-backend/api/routers/report.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.report import ( 5 | ReportDetailView, 6 | ReportListViewSet 7 | ) 8 | 9 | 10 | router = DefaultRouter() 11 | 12 | app_urls = [ 13 | path("detail", ReportDetailView.as_view({'get': 'list'})), 14 | path("list", ReportListViewSet.as_view()) 15 | ] 16 | 17 | 18 | app_name = RouterConfigEnum.REPORT 19 | urlpatterns = app_urls + router.urls 20 | -------------------------------------------------------------------------------- /unit-backend/api/routers/statistics.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.dashboard import StatisticsView 5 | 6 | 7 | router = DefaultRouter() 8 | 9 | app_urls = [ 10 | path("summay", StatisticsView.as_view()), 11 | ] 12 | 13 | 14 | app_name = RouterConfigEnum.STATISTICS 15 | urlpatterns = app_urls + router.urls 16 | -------------------------------------------------------------------------------- /unit-backend/api/routers/system.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.system import MenuView 5 | 6 | 7 | router = DefaultRouter() 8 | 9 | app_urls = [ 10 | path("menu", MenuView.as_view()), 11 | ] 12 | 13 | 14 | app_name = RouterConfigEnum.NOTICE 15 | urlpatterns = app_urls + router.urls 16 | -------------------------------------------------------------------------------- /unit-backend/api/routers/tree.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.https import ( 5 | TreeView 6 | ) 7 | 8 | 9 | router = DefaultRouter() 10 | 11 | app_urls = [ 12 | path("&", TreeView.as_view()), 13 | ] 14 | 15 | 16 | app_name = RouterConfigEnum.TREE 17 | urlpatterns = app_urls + router.urls 18 | -------------------------------------------------------------------------------- /unit-backend/api/routers/user.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from rest_framework.routers import DefaultRouter 3 | from api.emus.RouterConfigEnum import RouterConfigEnum 4 | from api.views.user import ( 5 | CustomJsonWebToken, 6 | UserListViewSet, 7 | UserRetrieveApi 8 | ) 9 | 10 | 11 | router = DefaultRouter() 12 | 13 | app_urls = [ 14 | path("login/", CustomJsonWebToken.as_view()), 15 | path("list", UserListViewSet.as_view()), 16 | path("info", UserRetrieveApi.as_view()) 17 | ] 18 | 19 | 20 | app_name = RouterConfigEnum.USER 21 | urlpatterns = app_urls + router.urls 22 | -------------------------------------------------------------------------------- /unit-backend/api/routers/websocket.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from api.views import consumers 3 | 4 | 5 | socket_urlpatterns = [ 6 | path('websocket/test', consumers.WebSocketConsumer.as_asgi()), 7 | # path('performance/', consumers.PerformanceConsumer.as_asgi()) 8 | ] 9 | -------------------------------------------------------------------------------- /unit-backend/api/scheduler/__init__.py: -------------------------------------------------------------------------------- 1 | from api.scheduler.scheduler import Scheduler 2 | 3 | 4 | Scheduler.start() 5 | -------------------------------------------------------------------------------- /unit-backend/api/scheduler/config.py: -------------------------------------------------------------------------------- 1 | from api.scheduler.sqlalchemy_store import SQLAlchemyJobStore 2 | from config.settings import DATABASES as DB 3 | 4 | 5 | config = { 6 | 'apscheduler.jobstores': { 7 | 'default': SQLAlchemyJobStore( 8 | url=f'mysql://{DB["default"]["USER"]}:' 9 | f'{DB["default"]["PASSWORD"]}@' 10 | f'{DB["default"]["HOST"]}:' 11 | f'{DB["default"]["PORT"]}/' 12 | f'{DB["default"]["NAME"]}?charset=utf8' 13 | )}, 14 | # 执行器配置 使用线程池执行器,最大10个线程 15 | 'apscheduler.executors.default': { 16 | 'class': 'apscheduler.executors.pool:ThreadPoolExecutor', 17 | 'max_workers': '10' 18 | }, 19 | # Job配置,为新任务关闭合并模式 20 | 'apscheduler.job_defaults.coalesce': 'false', 21 | # Job配置,同一个任务同一时间最多只能有3个实例在运行 22 | 'apscheduler.job_defaults.max_instances': '3', 23 | 'apscheduler.timezone': 'Asia/Shanghai', 24 | } 25 | -------------------------------------------------------------------------------- /unit-backend/api/schema/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/schema/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/schema/plan.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers # noqa 2 | from api.models.plan import ( 3 | Plan, 4 | ApschedulerJobs 5 | ) 6 | from api.schema.user import UserSimpleSerializers 7 | 8 | 9 | class PlanSerializers(serializers.ModelSerializer): 10 | 11 | id = serializers.IntegerField(read_only=True) 12 | user = UserSimpleSerializers(required=False, default=serializers.CurrentUserDefault()) 13 | create_time = serializers.DateTimeField(read_only=True) 14 | update_time = serializers.DateTimeField(read_only=True) 15 | 16 | class Meta: 17 | model = Plan 18 | fields = "__all__" 19 | 20 | 21 | class ApschedulerJobsSerializers(serializers.ModelSerializer): 22 | 23 | class Meta: 24 | model = ApschedulerJobs 25 | fields = "__all__" 26 | -------------------------------------------------------------------------------- /unit-backend/api/schema/report.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | from api.models.report import ( 3 | Main, 4 | Detail, 5 | DetailStep 6 | ) 7 | 8 | 9 | class ReportMainSerializer(serializers.ModelSerializer): 10 | id = serializers.IntegerField(read_only=True) 11 | 12 | class Meta: 13 | model = Main 14 | fields = '__all__' 15 | read_only_fields = ('name', 'state', 'all', 'success', 'error', 16 | 'fail', 'runtime', 'begin_time', 'argtime', 17 | 'pass_rate', 'tester', 'detail') 18 | 19 | 20 | class ReportDetailStepSerializer(serializers.ModelSerializer): 21 | 22 | class Meta: 23 | model = DetailStep 24 | fields = '__all__' 25 | 26 | 27 | class ReportDetailSerializers(serializers.ModelSerializer): 28 | 29 | steps = ReportDetailStepSerializer(many=True, read_only=True) 30 | 31 | class Meta: 32 | model = Detail 33 | fields = '__all__' 34 | -------------------------------------------------------------------------------- /unit-backend/api/schema/user.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | from api.models.user import ( 3 | User, 4 | UserRole 5 | ) 6 | 7 | 8 | class UserSimpleSerializers(serializers.ModelSerializer): 9 | class Meta: 10 | model = User 11 | fields = ( 12 | 'id', 13 | 'username', 14 | 'nickname', 15 | 'avatar' 16 | ) 17 | 18 | 19 | class UserRoleSerializers(serializers.ModelSerializer): 20 | 21 | user = UserSimpleSerializers(read_only=True) 22 | 23 | class Meta: 24 | model = UserRole 25 | fields = "__all__" 26 | 27 | 28 | class UserSerializers(serializers.ModelSerializer): 29 | 30 | id = serializers.IntegerField(read_only=True) 31 | roles = UserRoleSerializers(many=True, read_only=True) 32 | 33 | class Meta: 34 | model = User 35 | fields = "__all__" 36 | -------------------------------------------------------------------------------- /unit-backend/api/services/protos/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/services/protos/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/templates/media/7103cc2ba6d529b8c501294_l3EQBZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/templates/media/7103cc2ba6d529b8c501294_l3EQBZZ.jpg -------------------------------------------------------------------------------- /unit-backend/api/templates/media/avatar/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/templates/media/avatar/default.png -------------------------------------------------------------------------------- /unit-backend/api/templates/media/berserk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/templates/media/berserk.jpg -------------------------------------------------------------------------------- /unit-backend/api/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/tests/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/tests/test_project_destory.py: -------------------------------------------------------------------------------- 1 | from rest_framework import status 2 | from rest_framework.test import ( 3 | APITestCase, 4 | APIClient 5 | ) 6 | from api.models.project import Project 7 | 8 | 9 | class ProjectDestroyViewSetTests(APITestCase): 10 | def setUp(self): 11 | self.project = Project.objects.create(name="Test Project") 12 | self.client = APIClient() 13 | self.url = f'/api/project/delete/{self.project.pk}' 14 | self.token = ("JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9." 15 | "eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNz" 16 | "ExNjc4MjQ0LCJqdGkiOiIwZTZiZTFjODc3YzE0YmRh" 17 | "YjQ5MTNmYjRhNGVkYTIzMiIsInVzZXJfaWQiOjF9.R" 18 | "ICMkSeaSsSheMS7foduBEMUOLKcTlpctWxv_bQH7yE") 19 | 20 | def test_destroy_project_authenticated_user(self): 21 | response = self.client.delete(self.url, **{'HTTP_AUTHORIZATION': f'Bearer {self.token}'}) 22 | self.assertEqual(response.status_code, status.HTTP_200_OK) 23 | -------------------------------------------------------------------------------- /unit-backend/api/views/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/api/views/__init__.py -------------------------------------------------------------------------------- /unit-backend/api/views/dashboard.py: -------------------------------------------------------------------------------- 1 | from rest_framework.permissions import IsAuthenticated 2 | from rest_framework.response import Response 3 | from rest_framework.views import APIView 4 | from api.dao.dashboard import DashboardDao 5 | from api.response.fatcory import ResponseStandard 6 | 7 | 8 | class StatisticsView(APIView): 9 | permission_classes = [IsAuthenticated] 10 | 11 | @staticmethod 12 | def post(request, **kwargs): 13 | 14 | try: 15 | dashboard = DashboardDao() 16 | ret = dashboard.summary(request) 17 | return Response(ResponseStandard.success( 18 | data={"summary": ret} 19 | )) 20 | except Exception as err: 21 | return Response(ResponseStandard.failed(msg=str(err))) 22 | -------------------------------------------------------------------------------- /unit-backend/api/views/system.py: -------------------------------------------------------------------------------- 1 | from rest_framework.permissions import IsAuthenticated 2 | from rest_framework.response import Response 3 | from rest_framework.views import APIView 4 | from api.dao.setting import SettingDao 5 | from api.response.fatcory import ResponseStandard 6 | 7 | 8 | class MenuView(APIView): 9 | 10 | permission_classes = [IsAuthenticated] 11 | 12 | @staticmethod 13 | def post(request, **kwargs): 14 | 15 | try: 16 | response = SettingDao.all_menu_nesting() 17 | return Response(ResponseStandard.success(data=response)) 18 | except Exception as err: 19 | return Response(ResponseStandard.failed(msg=str(err))) 20 | -------------------------------------------------------------------------------- /unit-backend/celery_work/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/celery_work/__init__.py -------------------------------------------------------------------------------- /unit-backend/celery_work/configs.py: -------------------------------------------------------------------------------- 1 | import os 2 | from django.conf import settings 3 | 4 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') 5 | redis_broker_db = settings.REDIS_DATABASE['CELERY_BROKER'] 6 | redis_backend_db = settings.REDIS_DATABASE['CELERY_BACKEND'] 7 | broker_url = f'redis://:@{redis_broker_db["HOST"]}:{redis_broker_db["POST"]}/{redis_broker_db["DB"]}' 8 | backend = f'redis://:@{redis_backend_db["HOST"]}:{redis_backend_db["POST"]}/{redis_backend_db["DB"]}' 9 | broker_connection_retry_on_startup = True 10 | -------------------------------------------------------------------------------- /unit-backend/celery_work/tasks/__init__.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | 3 | from atomic_bomb_engine import atomic_bomb_engine 4 | 5 | 6 | async def batch_async(): 7 | runner = atomic_bomb_engine.BatchRunner() 8 | runner.run( 9 | test_duration_secs=30, 10 | concurrent_requests=30, 11 | step_option=atomic_bomb_engine.step_option(increase_step=3, increase_interval=3), 12 | timeout_secs=0, 13 | cookie_store_enable=True, 14 | verbose=False, 15 | api_endpoints=[ 16 | atomic_bomb_engine.endpoint( 17 | name="test-1", 18 | url="https://www.baidu.com/", 19 | method="POST", 20 | json={"name": "test-1", "number": 1}, 21 | weight=100, 22 | assert_options=[ 23 | atomic_bomb_engine.assert_option(jsonpath="$.message", reference_object="操作成功"), 24 | ], 25 | ), 26 | ]) 27 | return runner 28 | 29 | 30 | async def main(): 31 | results = await batch_async() 32 | for res in results: 33 | print(res) 34 | 35 | if __name__ == '__main__': 36 | asyncio.run(main()) -------------------------------------------------------------------------------- /unit-backend/celery_work/tasks/h.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | from celery_work.worker import celery 3 | 4 | 5 | @celery.task 6 | async def send(a, b): 7 | # 具体要执行的任务 8 | print("开始") 9 | print(a, b) 10 | await asyncio.sleep(4) 11 | print("结束") 12 | return 1 13 | -------------------------------------------------------------------------------- /unit-backend/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/common/__init__.py -------------------------------------------------------------------------------- /unit-backend/common/attach/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/common/attach/__init__.py -------------------------------------------------------------------------------- /unit-backend/common/builitin/__init__.py: -------------------------------------------------------------------------------- 1 | from common.builitin.functions import * 2 | -------------------------------------------------------------------------------- /unit-backend/common/database/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/common/database/__init__.py -------------------------------------------------------------------------------- /unit-backend/common/exceptions.py: -------------------------------------------------------------------------------- 1 | """ failure type exceptions 2 | these exceptions will mark test as failure 3 | """ 4 | 5 | 6 | class BaseError(Exception): 7 | 8 | pass 9 | 10 | 11 | class SendMessageException(BaseError): 12 | 13 | pass 14 | 15 | 16 | class MysqlConnectionException(BaseError): 17 | 18 | pass 19 | 20 | 21 | class MysqlConfigError(BaseError): 22 | 23 | pass 24 | 25 | 26 | class GetTimestampException(BaseError): 27 | 28 | pass 29 | -------------------------------------------------------------------------------- /unit-backend/common/message/__init__.py: -------------------------------------------------------------------------------- 1 | from api.events.registry import registry 2 | from common.message.dingtalk import DingTalk 3 | from common.message.feishu import FeiShu 4 | from common.message.webhook import Webhook 5 | from common.message.weixin import WeiXin 6 | from utils.logger import logger 7 | 8 | 9 | def message_runner(msg_type, url, data): 10 | """ 11 | Sends a message based on the specified message type. 12 | 13 | Args: 14 | msg_type: The type of message to send (e.g., NoticeType.WEBHOOK). 15 | url: The URL to send the message to. 16 | data: The data to be sent with the message. 17 | """ 18 | 19 | message_class = registry.get(msg_type, None) 20 | if message_class: 21 | message_object = message_class(url, data) 22 | message_object.send_info() 23 | else: 24 | logger.warning(f"Invalid message type: {msg_type}") 25 | -------------------------------------------------------------------------------- /unit-backend/common/process/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/common/process/__init__.py -------------------------------------------------------------------------------- /unit-backend/common/process/render_template_obj.py: -------------------------------------------------------------------------------- 1 | import typing as t 2 | from jinja2 import Template 3 | 4 | 5 | def render_template_context(raw: t.Any, *args: t.Any, **kwargs: t.Any) -> str: 6 | try: 7 | template = Template(raw, variable_start_string='${{', variable_end_string='}}') 8 | ctx = template.render(*args, **kwargs) 9 | return ctx 10 | except Exception as err: 11 | raise PermissionError(f'expression:<{raw}>, error: {err}') 12 | 13 | 14 | if __name__ == '__main__': 15 | 16 | raw = { 17 | "name": "hello", 18 | "username": "" 19 | } 20 | ext = {"username": "xxxx"} 21 | r = render_template_context(f'''{raw}''', **ext) 22 | print(r) -------------------------------------------------------------------------------- /unit-backend/config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/config/__init__.py -------------------------------------------------------------------------------- /unit-backend/config/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for config project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ 8 | """ 9 | import os 10 | from channels.routing import ProtocolTypeRouter, URLRouter 11 | from django.core.asgi import get_asgi_application 12 | from api.routers.websocket import socket_urlpatterns 13 | 14 | 15 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') 16 | 17 | application = ProtocolTypeRouter({ 18 | # 当存在http请求时,路由走这里 19 | "http": get_asgi_application(), 20 | # 当存在websocket请求时,将请求交给指定应用中的路由模块处理 21 | "websocket": URLRouter(socket_urlpatterns) 22 | }) 23 | -------------------------------------------------------------------------------- /unit-backend/config/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for config project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | from django.core.wsgi import get_wsgi_application 12 | 13 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') 14 | 15 | application = get_wsgi_application() 16 | -------------------------------------------------------------------------------- /unit-backend/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') 9 | try: 10 | from django.core.management import execute_from_command_line 11 | except ImportError as exc: 12 | raise ImportError( 13 | "Couldn't import Django. Are you sure it's installed and " 14 | "available on your PYTHONPATH environment variable? Did you " 15 | "forget to activate a virtual environment?" 16 | ) from exc 17 | execute_from_command_line(sys.argv) 18 | 19 | 20 | if __name__ == '__main__': 21 | main() 22 | -------------------------------------------------------------------------------- /unit-backend/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "unitrunner" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["xiaoxialulu <546464268@qq.com>"] 6 | package-mode = false 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.11" 10 | anyio = "3.6.2" 11 | APScheduler = "3.10.4" 12 | asgiref = "3.7.2" 13 | atomic_bomb_engine = "0.41.2" 14 | billiard = "3.6.4.0" 15 | celery = "5.2.7" 16 | channels = "4.1.0" 17 | daphne = "4.1.2" 18 | Django = "5.0.4" 19 | djangorestframework = "3.15.2" 20 | djangorestframework_simplejwt = "5.3.1" 21 | django-filter = "24.1" 22 | django-cors-headers = "3.11.0" 23 | django-log-request-id = "2.1.0" 24 | drf_yasg = "1.21.7" 25 | Faker = "8.11.0" 26 | fastapi = "0.111.0" 27 | Jinja2 = "3.1.4" 28 | jmespath = "1.0.1" 29 | jsonpath = "0.82" 30 | loguru = "0.6.0" 31 | pydantic = "2.7.3" 32 | pytest = "7.4.0" 33 | python_dateutil = "2.8.2" 34 | PyYAML = "6.0.1" 35 | redis = "5.0.4" 36 | redlock = "1.2.0" 37 | Requests = "2.32.3" 38 | mysqlclient = "2.2.4" 39 | requests_toolbelt = "1.0.0" 40 | rsa = "4.7.2" 41 | simplejson = "3.17.0" 42 | SQLAlchemy = "2.0.21" 43 | urllib3 = "2.2.2" 44 | uvicorn = "0.30.1" 45 | websockets = "11.0.3" 46 | numpy = "1.24.2" 47 | django-redis = "5.2.0" 48 | Pillow= "10.3.0" 49 | 50 | [build-system] 51 | requires = ["poetry-core"] 52 | build-backend = "poetry.core.masonry.api" 53 | -------------------------------------------------------------------------------- /unit-backend/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-backend/utils/__init__.py -------------------------------------------------------------------------------- /unit-backend/utils/single.py: -------------------------------------------------------------------------------- 1 | from threading import Lock 2 | 3 | 4 | class SingletonMeta(type): 5 | """ 6 | This is a thread-safe implementation of Singleton. 7 | """ 8 | _instances = {} 9 | _lock: Lock = Lock() 10 | 11 | def __call__(cls, *args, **kwargs): 12 | with cls._lock: 13 | if cls not in cls._instances: 14 | instance = super().__call__(*args, **kwargs) 15 | cls._instances[cls] = instance 16 | return cls._instances[cls] 17 | -------------------------------------------------------------------------------- /unit-executor/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /unit-executor/.idea/UNIT-EXECUTOR.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /unit-executor/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /unit-executor/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | -------------------------------------------------------------------------------- /unit-executor/.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /unit-executor/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /unit-executor/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /unit-executor/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /unit-executor/emus/CaseBaseEnum.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | class RunningTstCasesEnum: 4 | 5 | MODE = "normal" 6 | ENV_LITTLE = "env" 7 | ENV_BIG = "ENV" 8 | EXTRACT_JSON_PATH = "jsonpath" 9 | EXTRACT_RE = "re" 10 | 11 | 12 | class CaseStatusEnum: 13 | 14 | ERROR = "error" 15 | FAIL = "fail" 16 | SUCCESS = "success" 17 | 18 | 19 | class CaseStatusMessageEnum: 20 | 21 | SUCCESS = "成功" 22 | FAIL = "失败" 23 | ERROR = "错误" 24 | SKIP = "跳过" 25 | -------------------------------------------------------------------------------- /unit-executor/emus/CaseParametersEnum.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | class CaseParametersEnum: 4 | 5 | JSON = "json" 6 | FORM_DATA = "form_data" 7 | X_WWW_FORM_URLENCODED = "x-www-form-urlencoded" 8 | SETUP_SCRIPT = "setup_script" 9 | TEARDOWN_SCRIPT = "teardown_script" 10 | -------------------------------------------------------------------------------- /unit-executor/emus/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-executor/emus/__init__.py -------------------------------------------------------------------------------- /unit-executor/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-executor/models/__init__.py -------------------------------------------------------------------------------- /unit-executor/protos/__init__.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import matplotlib.pyplot as plt 3 | -------------------------------------------------------------------------------- /unit-executor/register/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-executor/register/__init__.py -------------------------------------------------------------------------------- /unit-executor/register/consul.py: -------------------------------------------------------------------------------- 1 | import consul 2 | 3 | 4 | class ConsulRegister(object): 5 | def __init__(self, host, port): 6 | self.host = host 7 | self.port = port 8 | self.consul = consul.Consul(host=host, port=port) 9 | 10 | def register_consul( 11 | self, 12 | name, 13 | service_id, 14 | address, 15 | port, 16 | tags 17 | ): 18 | 19 | register = self.consul.agent.service.register( 20 | name=name, 21 | service_id=service_id, 22 | address=address, 23 | port=port, 24 | tags=tags, 25 | check=consul.Check.tcp(host=address, port=port, interval='10s') 26 | ) 27 | return register 28 | 29 | def deregister(self, service_id): 30 | return self.consul.agent.service.deregister(service_id) 31 | -------------------------------------------------------------------------------- /unit-executor/requirements.txt: -------------------------------------------------------------------------------- 1 | atomic_bomb_engine~=0.41.0 2 | Faker==8.11.0 3 | grpcio==1.64.1 4 | jmespath==1.0.1 5 | jsonpath==0.82 6 | loguru==0.6.0 7 | MySQL-python==1.2.5 8 | numpy==1.24.2 9 | protobuf==5.28.0 10 | pydantic~=2.7.2 11 | python_dateutil==2.8.2 12 | Requests==2.32.3 13 | requests_toolbelt==1.0.0 14 | rsa==4.7.2 15 | simplejson==3.17.0 16 | urllib3~=2.2.1 17 | typing~=3.7.4.3 18 | python-dateutil~=2.8.2 19 | asyncio~=3.4.3 20 | mysqlclient~=2.1.1 -------------------------------------------------------------------------------- /unit-executor/services/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-executor/services/__init__.py -------------------------------------------------------------------------------- /unit-executor/services/interceptors.py: -------------------------------------------------------------------------------- 1 | from grpc_interceptor.server import AsyncServerInterceptor 2 | import grpc 3 | from typing import ( 4 | Any, 5 | Callable 6 | ) 7 | from grpc_interceptor.exceptions import GrpcException 8 | 9 | 10 | class ExecutorInterceptor(AsyncServerInterceptor): 11 | async def intercept( 12 | self, 13 | method: Callable, 14 | request_or_iterator: Any, 15 | context: grpc.ServicerContext, 16 | method_name: str, 17 | ) -> Any: 18 | try: 19 | response = await method(request_or_iterator, context) 20 | return response 21 | except GrpcException as e: 22 | await context.set_code(e.status_code) 23 | await context.set_details(e.details) 24 | -------------------------------------------------------------------------------- /unit-executor/settings/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 4 | 5 | BASE_LOG_DIR = os.path.join(BASE_DIR, "logs") 6 | 7 | # consul配置 8 | CONSUL_HOST = "127.0.0.1" 9 | CONSUL_PORT = "8500" 10 | SERVICE_NAME = "unit_executor" 11 | SERVICE_TAGS = ['unit_executor', 'grpc'] 12 | -------------------------------------------------------------------------------- /unit-executor/unitrunner/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-executor/unitrunner/__init__.py -------------------------------------------------------------------------------- /unit-executor/unitrunner/builitin/__init__.py: -------------------------------------------------------------------------------- 1 | from unitrunner.builitin.compares import * 2 | from unitrunner.builitin.functions import * 3 | -------------------------------------------------------------------------------- /unit-executor/unitrunner/constructor/__init__.py: -------------------------------------------------------------------------------- 1 | # 定义一个装饰器函数 2 | def my_decorator(func): 3 | def wrapper(*args, **kwargs): 4 | print("执行装饰器") 5 | return func(*args, **kwargs) 6 | return wrapper 7 | 8 | # 使用type()函数动态创建一个类,并将装饰器函数作为类的属性 9 | MyClass = type("MyClass", (object,), {"my_method": my_decorator(lambda self: "Hello, World!")}) 10 | 11 | # 创建类的实例并调用方法 12 | obj = MyClass() 13 | print(obj.my_method()) 14 | -------------------------------------------------------------------------------- /unit-executor/unitrunner/database/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-executor/unitrunner/database/__init__.py -------------------------------------------------------------------------------- /unit-executor/unitrunner/engine/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-executor/unitrunner/engine/__init__.py -------------------------------------------------------------------------------- /unit-executor/unitrunner/engine/env.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from unitrunner.database.DBClient import DBClient 3 | 4 | 5 | class BaseEnv(dict): 6 | def __init__(self, **kwargs): 7 | super().__init__(**kwargs) 8 | 9 | def __setattr__(self, key, value): 10 | super().__setitem__(key, value) 11 | 12 | def __getattr__(self, item): 13 | return super().__getitem__(item) 14 | 15 | 16 | ENV = BaseEnv() 17 | db = DBClient() 18 | DEBUG = True 19 | session = requests.Session() 20 | -------------------------------------------------------------------------------- /unit-executor/unitrunner/engine/extract.py: -------------------------------------------------------------------------------- 1 | from typing import Any 2 | import jmespath 3 | import jsonpath 4 | from unitrunner import exceptions 5 | 6 | 7 | def extract_by_object(response: Any, extract_expression: str) -> Any: 8 | """ 9 | This function extracts data from the response object based on the provided extraction expression. 10 | 11 | Parameters: 12 | response (Any): The response object from which data is to be extracted. 13 | extract_expression (str): The extraction expression used to extract data from the response. 14 | 15 | Returns: 16 | Any: The extracted data. 17 | """ 18 | 19 | if extract_expression.startswith("$."): 20 | try: 21 | extract_value = jsonpath.jsonpath(response, extract_expression) 22 | return extract_value 23 | except exceptions.ExtractException as err: 24 | raise PermissionError(f'❌expression:<{extract_expression}>, error: {err}') 25 | else: 26 | try: 27 | extract_value = jmespath.search(response, extract_expression) 28 | return extract_value 29 | except exceptions.ExtractException as err: 30 | raise PermissionError(f'❌expression:<{extract_expression}>, error: {err}') 31 | -------------------------------------------------------------------------------- /unit-executor/unitrunner/models/__init__.py: -------------------------------------------------------------------------------- 1 | import typing 2 | from enum import Enum 3 | 4 | Name = str 5 | Url = str 6 | Headers = typing.Dict[str, str] 7 | 8 | 9 | class MethodEnum(str, Enum): 10 | """请求方法枚举""" 11 | GET = "GET" 12 | POST = "POST" 13 | PUT = "PUT" 14 | DELETE = "DELETE" 15 | HEAD = "HEAD" 16 | OPTIONS = "OPTIONS" 17 | PATCH = "PATCH" 18 | NA = "N/A" 19 | -------------------------------------------------------------------------------- /unit-executor/unitrunner/models/report.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | from pydantic.fields import Field 3 | 4 | 5 | class TestCaseResult(BaseModel): 6 | 7 | all: int = Field(0, description="用例总数") 8 | success: int = Field(0, description="用例成功数") 9 | fail: int = Field(0, description="用例失败数") 10 | error: int = Field(0, description="用例错误数") 11 | cases: list = Field([], description="具体步骤") 12 | name: str = Field("", description="用例名称") 13 | state: str = Field("", description="用例状态") 14 | 15 | 16 | class TestReport(BaseModel): 17 | 18 | class_list: list = Field([], description="测试场景") 19 | all: int = Field(0, description="场景总数") 20 | success: int = Field(0, description="场景成功数") 21 | error: int = Field(0, description="用例错误数") 22 | fail: int = Field(0, description="用例失败数") 23 | runtime: str = Field("", description="运行时间") 24 | argtime: str = Field("", description="平均时间") 25 | begin_time: str = Field("", description="开始时间") 26 | pass_rate: str = Field("0", description="通过率") 27 | state: str = Field("", description="场景状态") 28 | tester: str = Field("", description="测试人员") 29 | -------------------------------------------------------------------------------- /unit-executor/unitrunner/msg/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-executor/unitrunner/msg/__init__.py -------------------------------------------------------------------------------- /unit-executor/unitrunner/request/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-executor/unitrunner/request/__init__.py -------------------------------------------------------------------------------- /unit-executor/unitrunner/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-executor/unitrunner/test/__init__.py -------------------------------------------------------------------------------- /unit-executor/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-executor/utils/__init__.py -------------------------------------------------------------------------------- /unit-web/.env: -------------------------------------------------------------------------------- 1 | NODE_ENV = 'dev' 2 | 3 | # port 4 | VITE_PORT = 8100 5 | 6 | VITE_APP_BASE_API = 'http://127.0.0.1:8000' 7 | -------------------------------------------------------------------------------- /unit-web/.env.development: -------------------------------------------------------------------------------- 1 | # 本地环境 2 | NODE_ENV = 'development' 3 | 4 | # 本地环境接口地址 5 | VUE_APP_BASE_API = 'http://127.0.0.1:8000' 6 | -------------------------------------------------------------------------------- /unit-web/.env.production: -------------------------------------------------------------------------------- 1 | # 线上环境 2 | NODE_ENV = "production" 3 | 4 | # 线上环境接口地址 5 | VUE_APP_BASE_API = '/api' 6 | -------------------------------------------------------------------------------- /unit-web/.env.test: -------------------------------------------------------------------------------- 1 | # 测试环境 2 | NODE_ENV = "test" 3 | 4 | 5 | # 测试环境接口地址 6 | VUE_APP_BASE_API = '/api' 7 | -------------------------------------------------------------------------------- /unit-web/.eslintignore: -------------------------------------------------------------------------------- 1 | 2 | *.sh 3 | node_modules 4 | *.md 5 | *.woff 6 | *.ttf 7 | .vscode 8 | .idea 9 | dist 10 | /public 11 | /docs 12 | .husky 13 | .local 14 | /bin 15 | Dockerfile 16 | -------------------------------------------------------------------------------- /unit-web/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "env": { 3 | "browser": true, 4 | "es2021": true, 5 | "node":true 6 | }, 7 | "extends": [ 8 | "eslint:recommended", 9 | "plugin:vue/vue3-essential", 10 | "plugin:@typescript-eslint/recommended", 11 | 'plugin:prettier/recommended' 12 | ], 13 | "parser": "vue-eslint-parser", 14 | "parserOptions": { 15 | "ecmaVersion": "latest", 16 | "parser": "@typescript-eslint/parser", 17 | "sourceType": "module" 18 | }, 19 | "plugins": [ 20 | "vue", 21 | "@typescript-eslint" 22 | ], 23 | "rules": { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /unit-web/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist-ssr 12 | dist 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /unit-web/.prettierignore: -------------------------------------------------------------------------------- 1 | /dist/* 2 | .local 3 | .output.js 4 | /node_modules/** 5 | 6 | **/*.svg 7 | **/*.sh 8 | 9 | /public/* 10 | -------------------------------------------------------------------------------- /unit-web/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // 一行的字符数,如果超过会进行换行,默认为80 3 | printWidth: 100, 4 | // 行位是否使用分号,默认为true 5 | semi: false, 6 | vueIndentScriptAndStyle: true, 7 | // 字符串是否使用单引号,默认为false,使用双引号 8 | singleQuote: true, 9 | // 是否使用尾逗号,有三个可选值"" 10 | trailingComma: 'all', 11 | proseWrap: 'never', 12 | htmlWhitespaceSensitivity: 'strict', 13 | endOfLine: 'auto', 14 | }; 15 | -------------------------------------------------------------------------------- /unit-web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/favicon.ico -------------------------------------------------------------------------------- /unit-web/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /unit-web/public/static/face/NO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/NO.png -------------------------------------------------------------------------------- /unit-web/public/static/face/OK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/OK.png -------------------------------------------------------------------------------- /unit-web/public/static/face/emoji-after.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/emoji-after.png -------------------------------------------------------------------------------- /unit-web/public/static/face/emoji-before.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/emoji-before.png -------------------------------------------------------------------------------- /unit-web/public/static/face/乒乓.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/乒乓.png -------------------------------------------------------------------------------- /unit-web/public/static/face/乱舞.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/乱舞.png -------------------------------------------------------------------------------- /unit-web/public/static/face/亲亲.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/亲亲.png -------------------------------------------------------------------------------- /unit-web/public/static/face/便便.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/便便.png -------------------------------------------------------------------------------- /unit-web/public/static/face/偷笑.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/偷笑.png -------------------------------------------------------------------------------- /unit-web/public/static/face/傲慢.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/傲慢.png -------------------------------------------------------------------------------- /unit-web/public/static/face/再见.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/再见.png -------------------------------------------------------------------------------- /unit-web/public/static/face/冷汗.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/冷汗.png -------------------------------------------------------------------------------- /unit-web/public/static/face/凋谢.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/凋谢.png -------------------------------------------------------------------------------- /unit-web/public/static/face/刀.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/刀.png -------------------------------------------------------------------------------- /unit-web/public/static/face/勾引.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/勾引.png -------------------------------------------------------------------------------- /unit-web/public/static/face/发呆.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/发呆.png -------------------------------------------------------------------------------- /unit-web/public/static/face/发怒.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/发怒.png -------------------------------------------------------------------------------- /unit-web/public/static/face/发抖.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/发抖.png -------------------------------------------------------------------------------- /unit-web/public/static/face/可怜.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/可怜.png -------------------------------------------------------------------------------- /unit-web/public/static/face/右哼哼.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/右哼哼.png -------------------------------------------------------------------------------- /unit-web/public/static/face/右太极.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/右太极.png -------------------------------------------------------------------------------- /unit-web/public/static/face/吐.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/吐.png -------------------------------------------------------------------------------- /unit-web/public/static/face/吓.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/吓.png -------------------------------------------------------------------------------- /unit-web/public/static/face/呲牙.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/呲牙.png -------------------------------------------------------------------------------- /unit-web/public/static/face/咒骂.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/咒骂.png -------------------------------------------------------------------------------- /unit-web/public/static/face/咖啡.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/咖啡.png -------------------------------------------------------------------------------- /unit-web/public/static/face/哈欠.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/哈欠.png -------------------------------------------------------------------------------- /unit-web/public/static/face/啤酒.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/啤酒.png -------------------------------------------------------------------------------- /unit-web/public/static/face/嘘.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/嘘.png -------------------------------------------------------------------------------- /unit-web/public/static/face/嘴唇.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/嘴唇.png -------------------------------------------------------------------------------- /unit-web/public/static/face/嘿哈.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/嘿哈.png -------------------------------------------------------------------------------- /unit-web/public/static/face/回头.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/回头.png -------------------------------------------------------------------------------- /unit-web/public/static/face/困.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/困.png -------------------------------------------------------------------------------- /unit-web/public/static/face/坏笑.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/坏笑.png -------------------------------------------------------------------------------- /unit-web/public/static/face/大哭.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/大哭.png -------------------------------------------------------------------------------- /unit-web/public/static/face/太阳.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/太阳.png -------------------------------------------------------------------------------- /unit-web/public/static/face/奋斗.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/奋斗.png -------------------------------------------------------------------------------- /unit-web/public/static/face/奸笑.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/奸笑.png -------------------------------------------------------------------------------- /unit-web/public/static/face/委屈.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/委屈.png -------------------------------------------------------------------------------- /unit-web/public/static/face/害羞.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/害羞.png -------------------------------------------------------------------------------- /unit-web/public/static/face/尴尬.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/尴尬.png -------------------------------------------------------------------------------- /unit-web/public/static/face/左哼哼.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/左哼哼.png -------------------------------------------------------------------------------- /unit-web/public/static/face/左太极.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/左太极.png -------------------------------------------------------------------------------- /unit-web/public/static/face/差劲.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/差劲.png -------------------------------------------------------------------------------- /unit-web/public/static/face/弱.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/弱.png -------------------------------------------------------------------------------- /unit-web/public/static/face/强.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/强.png -------------------------------------------------------------------------------- /unit-web/public/static/face/得意.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/得意.png -------------------------------------------------------------------------------- /unit-web/public/static/face/微笑.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/微笑.png -------------------------------------------------------------------------------- /unit-web/public/static/face/心碎.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/心碎.png -------------------------------------------------------------------------------- /unit-web/public/static/face/快哭了.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/快哭了.png -------------------------------------------------------------------------------- /unit-web/public/static/face/怄火.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/怄火.png -------------------------------------------------------------------------------- /unit-web/public/static/face/悠闲.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/悠闲.png -------------------------------------------------------------------------------- /unit-web/public/static/face/惊恐.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/惊恐.png -------------------------------------------------------------------------------- /unit-web/public/static/face/惊讶.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/惊讶.png -------------------------------------------------------------------------------- /unit-web/public/static/face/愉快.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/愉快.png -------------------------------------------------------------------------------- /unit-web/public/static/face/憨笑.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/憨笑.png -------------------------------------------------------------------------------- /unit-web/public/static/face/抓狂.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/抓狂.png -------------------------------------------------------------------------------- /unit-web/public/static/face/投降.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/投降.png -------------------------------------------------------------------------------- /unit-web/public/static/face/抠鼻.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/抠鼻.png -------------------------------------------------------------------------------- /unit-web/public/static/face/抱拳.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/抱拳.png -------------------------------------------------------------------------------- /unit-web/public/static/face/拥抱.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/拥抱.png -------------------------------------------------------------------------------- /unit-web/public/static/face/拳头.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/拳头.png -------------------------------------------------------------------------------- /unit-web/public/static/face/捂脸.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/捂脸.png -------------------------------------------------------------------------------- /unit-web/public/static/face/握手.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/握手.png -------------------------------------------------------------------------------- /unit-web/public/static/face/撇嘴.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/撇嘴.png -------------------------------------------------------------------------------- /unit-web/public/static/face/擦汗.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/擦汗.png -------------------------------------------------------------------------------- /unit-web/public/static/face/敲打.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/敲打.png -------------------------------------------------------------------------------- /unit-web/public/static/face/晕.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/晕.png -------------------------------------------------------------------------------- /unit-web/public/static/face/月亮.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/月亮.png -------------------------------------------------------------------------------- /unit-web/public/static/face/机智.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/机智.png -------------------------------------------------------------------------------- /unit-web/public/static/face/流汗.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/流汗.png -------------------------------------------------------------------------------- /unit-web/public/static/face/流泪.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/流泪.png -------------------------------------------------------------------------------- /unit-web/public/static/face/激动.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/激动.png -------------------------------------------------------------------------------- /unit-web/public/static/face/炸弹.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/炸弹.png -------------------------------------------------------------------------------- /unit-web/public/static/face/爱你.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/爱你.png -------------------------------------------------------------------------------- /unit-web/public/static/face/爱心.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/爱心.png -------------------------------------------------------------------------------- /unit-web/public/static/face/爱情.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/爱情.png -------------------------------------------------------------------------------- /unit-web/public/static/face/猪头.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/猪头.png -------------------------------------------------------------------------------- /unit-web/public/static/face/献吻.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/献吻.png -------------------------------------------------------------------------------- /unit-web/public/static/face/玫瑰.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/玫瑰.png -------------------------------------------------------------------------------- /unit-web/public/static/face/瓢虫.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/瓢虫.png -------------------------------------------------------------------------------- /unit-web/public/static/face/疑问.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/疑问.png -------------------------------------------------------------------------------- /unit-web/public/static/face/疯了.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/疯了.png -------------------------------------------------------------------------------- /unit-web/public/static/face/白眼.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/白眼.png -------------------------------------------------------------------------------- /unit-web/public/static/face/皱眉.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/皱眉.png -------------------------------------------------------------------------------- /unit-web/public/static/face/睡.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/睡.png -------------------------------------------------------------------------------- /unit-web/public/static/face/磕头.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/磕头.png -------------------------------------------------------------------------------- /unit-web/public/static/face/礼物.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/礼物.png -------------------------------------------------------------------------------- /unit-web/public/static/face/篮球.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/篮球.png -------------------------------------------------------------------------------- /unit-web/public/static/face/糗大了.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/糗大了.png -------------------------------------------------------------------------------- /unit-web/public/static/face/红包.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/红包.png -------------------------------------------------------------------------------- /unit-web/public/static/face/耶.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/耶.png -------------------------------------------------------------------------------- /unit-web/public/static/face/胜利.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/胜利.png -------------------------------------------------------------------------------- /unit-web/public/static/face/色.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/色.png -------------------------------------------------------------------------------- /unit-web/public/static/face/菜刀.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/菜刀.png -------------------------------------------------------------------------------- /unit-web/public/static/face/蛋糕.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/蛋糕.png -------------------------------------------------------------------------------- /unit-web/public/static/face/衰.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/衰.png -------------------------------------------------------------------------------- /unit-web/public/static/face/西瓜.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/西瓜.png -------------------------------------------------------------------------------- /unit-web/public/static/face/调皮.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/调皮.png -------------------------------------------------------------------------------- /unit-web/public/static/face/足球.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/足球.png -------------------------------------------------------------------------------- /unit-web/public/static/face/跳绳.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/跳绳.png -------------------------------------------------------------------------------- /unit-web/public/static/face/跳跳.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/跳跳.png -------------------------------------------------------------------------------- /unit-web/public/static/face/转圈.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/转圈.png -------------------------------------------------------------------------------- /unit-web/public/static/face/鄙视.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/鄙视.png -------------------------------------------------------------------------------- /unit-web/public/static/face/酷.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/酷.png -------------------------------------------------------------------------------- /unit-web/public/static/face/闪电.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/闪电.png -------------------------------------------------------------------------------- /unit-web/public/static/face/闭嘴.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/闭嘴.png -------------------------------------------------------------------------------- /unit-web/public/static/face/阴险.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/阴险.png -------------------------------------------------------------------------------- /unit-web/public/static/face/难过.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/难过.png -------------------------------------------------------------------------------- /unit-web/public/static/face/飞吻.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/飞吻.png -------------------------------------------------------------------------------- /unit-web/public/static/face/饥饿.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/饥饿.png -------------------------------------------------------------------------------- /unit-web/public/static/face/饭.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/饭.png -------------------------------------------------------------------------------- /unit-web/public/static/face/骷髅.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/骷髅.png -------------------------------------------------------------------------------- /unit-web/public/static/face/鸡.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/鸡.png -------------------------------------------------------------------------------- /unit-web/public/static/face/鼓掌.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/face/鼓掌.png -------------------------------------------------------------------------------- /unit-web/public/static/screen/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/screen/bg.jpg -------------------------------------------------------------------------------- /unit-web/public/static/screen/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/screen/bg.png -------------------------------------------------------------------------------- /unit-web/public/static/screen/footer2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/screen/footer2.png -------------------------------------------------------------------------------- /unit-web/public/static/screen/header-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/screen/header-bg.png -------------------------------------------------------------------------------- /unit-web/public/static/screen/server-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/public/static/screen/server-bg.png -------------------------------------------------------------------------------- /unit-web/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | 18 | 38 | -------------------------------------------------------------------------------- /unit-web/src/api/errorCodeType.ts: -------------------------------------------------------------------------------- 1 | export const errorCodeType = function (code: string): string { 2 | let errMessage: string = "未知错误" 3 | switch (code) { 4 | case '400': 5 | errMessage = '请求失败!请您稍后重试' 6 | break 7 | case '401': 8 | errMessage = '未授权,请重新登录' 9 | break 10 | case '403': 11 | errMessage = '当前账号无权限访问!' 12 | break 13 | case '404': 14 | errMessage = '你所访问的资源不存在!' 15 | break 16 | case '405': 17 | errMessage = '请求方式错误!请您稍后重试' 18 | break 19 | case '408': 20 | errMessage = '请求超时!请您稍后重试' 21 | break 22 | case '500': 23 | errMessage = '服务器端出错' 24 | break 25 | case '501': 26 | errMessage = '网络未实现' 27 | break 28 | case '502': 29 | errMessage = '网络错误' 30 | break 31 | case '503': 32 | errMessage = '服务不可用' 33 | break 34 | case '504': 35 | errMessage = '网络超时' 36 | break 37 | case '505': 38 | errMessage = 'http版本不支持该请求' 39 | break 40 | default: 41 | errMessage = `其他连接错误 --${code}` 42 | } 43 | return errMessage 44 | } 45 | -------------------------------------------------------------------------------- /unit-web/src/api/record.ts: -------------------------------------------------------------------------------- 1 | import request from './request' 2 | 3 | export function recordList(params: any) { 4 | return request({ 5 | url: `/api/report/list`, 6 | method: 'get', 7 | params 8 | }) 9 | } 10 | 11 | export function recordDetail(params: any) { 12 | return request({ 13 | url: `/api/report/detail`, 14 | method: 'get', 15 | params 16 | }) 17 | } 18 | 19 | 20 | export function taskRecordList(params: any) { 21 | return request({ 22 | url: `/api/plan/record/list`, 23 | method: 'get', 24 | params 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /unit-web/src/api/system.ts: -------------------------------------------------------------------------------- 1 | import request from './request' 2 | 3 | export function menuList() { 4 | return request({ 5 | url: '/api/system/menu', 6 | method: 'post' 7 | }) 8 | } -------------------------------------------------------------------------------- /unit-web/src/api/user.ts: -------------------------------------------------------------------------------- 1 | import request from './request' 2 | 3 | export function login(data: any) { 4 | return request({ 5 | url: '/api/user/login/', 6 | method: 'post', 7 | data 8 | }) 9 | } 10 | 11 | export function userList(data: any) { 12 | return request({ 13 | url: '/api/user/list', 14 | method: 'get', 15 | data 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /unit-web/src/assets/403_images/403.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/403_images/403.png -------------------------------------------------------------------------------- /unit-web/src/assets/403_images/403_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/403_images/403_cloud.png -------------------------------------------------------------------------------- /unit-web/src/assets/404_images/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/404_images/404.png -------------------------------------------------------------------------------- /unit-web/src/assets/404_images/404_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/404_images/404_bg.png -------------------------------------------------------------------------------- /unit-web/src/assets/404_images/404_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/404_images/404_cloud.png -------------------------------------------------------------------------------- /unit-web/src/assets/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/iconfont/iconfont.woff -------------------------------------------------------------------------------- /unit-web/src/assets/iconfont/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/iconfont/iconfont.woff2 -------------------------------------------------------------------------------- /unit-web/src/assets/image/allow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/allow.png -------------------------------------------------------------------------------- /unit-web/src/assets/image/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/avatar.png -------------------------------------------------------------------------------- /unit-web/src/assets/image/berserk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/berserk.jpg -------------------------------------------------------------------------------- /unit-web/src/assets/image/center-inner1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/center-inner1.png -------------------------------------------------------------------------------- /unit-web/src/assets/image/charts/1-1-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/charts/1-1-bg.png -------------------------------------------------------------------------------- /unit-web/src/assets/image/circle-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/circle-bg.png -------------------------------------------------------------------------------- /unit-web/src/assets/image/cro-avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/cro-avatar.jpg -------------------------------------------------------------------------------- /unit-web/src/assets/image/login/qrcode-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/login/qrcode-icon.png -------------------------------------------------------------------------------- /unit-web/src/assets/image/login/side-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/login/side-logo.jpg -------------------------------------------------------------------------------- /unit-web/src/assets/image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/logo.png -------------------------------------------------------------------------------- /unit-web/src/assets/image/none-response.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/none-response.jpg -------------------------------------------------------------------------------- /unit-web/src/assets/image/openapi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/openapi.png -------------------------------------------------------------------------------- /unit-web/src/assets/image/postman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/postman.png -------------------------------------------------------------------------------- /unit-web/src/assets/image/we.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoxiaolulu/EasyPost/284307cf6c4c796601263bdff4879e987d5e4d39/unit-web/src/assets/image/we.png -------------------------------------------------------------------------------- /unit-web/src/components/MirrorCode/registerCompletion.ts: -------------------------------------------------------------------------------- 1 | import * as monaco from "monaco-editor" 2 | 3 | export const OPTIONS_BASE: monaco.editor.IStandaloneEditorConstructionOptions = { 4 | value: '', // 初始显示文字 5 | lineNumbers: 'on', // 是否展示行号 'off' | 'on 6 | automaticLayout: true, //自动布局 7 | minimap: { 8 | enabled: true, 9 | }, 10 | tabSize: 2, 11 | fontSize: 16, 12 | roundedSelection: false, 13 | cursorStyle: 'line', //光标样式 14 | glyphMargin: true, //字形边缘 15 | useTabStops: false, 16 | quickSuggestionsDelay: 100, //代码提示延时 17 | selectOnLineNumbers: true, // 显示行号 18 | } 19 | -------------------------------------------------------------------------------- /unit-web/src/components/MirrorCode/worker.ts: -------------------------------------------------------------------------------- 1 | import * as monaco from 'monaco-editor'; 2 | import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker' 3 | import jsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker' 4 | import cssWorker from 'monaco-editor/esm/vs/language/css/css.worker?worker' 5 | import htmlWorker from 'monaco-editor/esm/vs/language/html/html.worker?worker' 6 | import tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker' 7 | 8 | self.MonacoEnvironment = { 9 | getWorker(_, label) { 10 | if (label === 'json') { 11 | return new jsonWorker() 12 | } 13 | if (label === 'css' || label === 'scss' || label === 'less') { 14 | return new cssWorker() 15 | } 16 | if (label === 'html' || label === 'handlebars' || label === 'razor') { 17 | return new htmlWorker() 18 | } 19 | if (label === 'typescript' || label === 'javascript') { 20 | return new tsWorker() 21 | } 22 | return new editorWorker() 23 | } 24 | } 25 | monaco.languages.typescript.typescriptDefaults.setEagerModelSync(true); 26 | -------------------------------------------------------------------------------- /unit-web/src/components/PageWrapLayout/index.scss: -------------------------------------------------------------------------------- 1 | .m-container-layout { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | padding: 10px 12px; 6 | box-sizing: border-box; 7 | .m-container-layout-inner { 8 | flex: 1; 9 | display: flex; 10 | flex-direction: column; 11 | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); 12 | background: white; 13 | padding: 20px; 14 | width: 100%; 15 | height: 100%; 16 | box-sizing: border-box; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /unit-web/src/components/PageWrapLayout/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /unit-web/src/components/SvgIcon/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 26 | 27 | 36 | -------------------------------------------------------------------------------- /unit-web/src/components/SwitchDark/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 27 | -------------------------------------------------------------------------------- /unit-web/src/components/no-cron/language/index.js: -------------------------------------------------------------------------------- 1 | import en from './en' 2 | import cn from './cn' 3 | import pt from './pt' 4 | 5 | export default { 6 | en, 7 | cn, 8 | pt 9 | } -------------------------------------------------------------------------------- /unit-web/src/components/u-container-layout/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 31 | -------------------------------------------------------------------------------- /unit-web/src/config/index.ts: -------------------------------------------------------------------------------- 1 | // * 默认主题颜色 2 | export const PRIMARY_COLOR: string = "#409eff"; 3 | -------------------------------------------------------------------------------- /unit-web/src/hooks/useWrapComponents.ts: -------------------------------------------------------------------------------- 1 | // 自定义name的壳的集合 2 | import {h} from "vue"; 3 | 4 | const wrapperMap = new Map() 5 | 6 | export const useWrapComponents = (Component,route)=>{ 7 | let wrapper 8 | if (Component) { 9 | const wrapperName = route.name 10 | if (wrapperMap.has(wrapperName)) { 11 | wrapper = wrapperMap.get(wrapperName) 12 | } else { 13 | wrapper = { 14 | name: wrapperName, 15 | render() { 16 | return h("div", {className: "app-main-inner"}, Component) 17 | }, 18 | } 19 | wrapperMap.set(wrapperName, wrapper) 20 | } 21 | return h(wrapper) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /unit-web/src/icons/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import SvgIcon from '@/components/SvgIcon' // svg component 3 | 4 | 5 | // const req = require.context('./svg', false, /\.svg$/) 6 | const req = import.meta.globEager('./svg/*.svg') 7 | 8 | const requireAll = (requireContext) => requireContext.keys().map(requireContext) 9 | requireAll(req) 10 | 11 | export default SvgIcon 12 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/arrowdown.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/arrowup.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/compass.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/entrust.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/example.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/eye-open.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/eye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/fullscreen.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/horn.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/mistake.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/nested.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/password.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/report-form.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/size.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/table.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/task.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/todo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svg/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /unit-web/src/icons/svgo.yml: -------------------------------------------------------------------------------- 1 | # replace default config 2 | 3 | # multipass: true 4 | # full: true 5 | 6 | plugins: 7 | 8 | # - name 9 | # 10 | # or: 11 | # - name: false 12 | # - name: true 13 | # 14 | # or: 15 | # - name: 16 | # param1: 1 17 | # param2: 2 18 | 19 | - removeAttrs: 20 | attrs: 21 | - 'fill' 22 | - 'fill-rule' 23 | -------------------------------------------------------------------------------- /unit-web/src/layout/LayoutHorizontal/HeaderHorizontal/index.scss: -------------------------------------------------------------------------------- 1 | .m-layout-header { 2 | width: 100%; 3 | transition: width 0.28s; 4 | flex-shrink: 0; 5 | box-sizing: border-box; 6 | box-shadow: 0 1px 4px rgb(0 21 41 / 8%); 7 | .header-inner { 8 | height: 50px; 9 | width: 100%; 10 | border-bottom: 1px solid #eee; 11 | display: flex; 12 | background-color:$menuBg; 13 | align-items: center; 14 | padding: 0 10px 0 0; 15 | box-sizing: border-box; 16 | justify-content: space-between; 17 | } 18 | } 19 | .fixed-header{ 20 | position: fixed; 21 | top: 0; 22 | right: 0; 23 | z-index: 9; 24 | } 25 | 26 | .menu-horizontal{ 27 | flex: 1; 28 | overflow: hidden; 29 | height: 100%; 30 | 31 | :deep(.el-menu-item){ 32 | height: 100%; 33 | } 34 | } 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /unit-web/src/layout/LayoutHorizontal/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 15 | 16 | 25 | -------------------------------------------------------------------------------- /unit-web/src/layout/LayoutVertical/HeaderVertical/index.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 35 | 36 | 39 | 40 | -------------------------------------------------------------------------------- /unit-web/src/layout/LayoutVertical/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | 18 | 47 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/Footer/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 20 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/Header/ToolLeft.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 13 | 20 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/Header/ToolRight.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 20 | 21 | 30 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/Header/components/CollapseIcon.vue: -------------------------------------------------------------------------------- 1 | 7 | 16 | 31 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/Header/components/Hamburger.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 34 | 35 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/Header/components/Height.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/Header/components/ScreenFull.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 26 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/Header/components/Setting.vue: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 | 46 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/Main/index.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 23 | 24 | 40 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/Mobile/index.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 21 | 22 | 25 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/SubMenu/Link.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 44 | 45 | 50 | -------------------------------------------------------------------------------- /unit-web/src/layout/components/SubMenu/MenuItem.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 36 | -------------------------------------------------------------------------------- /unit-web/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './routers' 4 | import pinia from "./store"; 5 | 6 | import {registerElIcons} from "@/plugins/ElIcons" 7 | // 引入全局组件布局 8 | import PageWrapLayout from '@/components/PageWrapLayout/index.vue' 9 | // 权限路由 10 | import './permission' 11 | // svg-icons注册导入 12 | import 'virtual:svg-icons-register' 13 | import SvgIcon from '@/components/SvgIcon/index.vue'// svg component 14 | // UI框架 element-plus 15 | import ElementPlus from 'element-plus' 16 | import 'element-plus/dist/index.css' 17 | // 引入暗黑模式 element-plus 2.2 内置暗黑模式 18 | import 'element-plus/theme-chalk/dark/css-vars.css' 19 | // 自定义暗黑模式 20 | import "@/styles/element-dark.scss"; 21 | // 引入阿里图标库 22 | import "@/assets/iconfont/iconfont.css"; 23 | import "@/assets/iconfont/iconfont.js"; 24 | import VueApexCharts from "vue3-apexcharts"; 25 | 26 | const app = createApp(App) 27 | registerElIcons(app) 28 | 29 | app.component('svg-icon',SvgIcon) 30 | app.component('PageWrapLayout',PageWrapLayout) 31 | 32 | 33 | // @ts-ignore 34 | app.use(pinia) 35 | app.use(router) 36 | app.use(VueApexCharts); 37 | app.use(ElementPlus).mount('#app') 38 | -------------------------------------------------------------------------------- /unit-web/src/plugins/ElIcons.ts: -------------------------------------------------------------------------------- 1 | 2 | // 注册icon组件 3 | import * as ElIconsModules from '@element-plus/icons-vue' 4 | 5 | 6 | export const registerElIcons = (app)=>{ 7 | // 全局注册element-plus icon图标组件 8 | Object.keys(ElIconsModules).forEach((key) => {//循环遍历组件名称 9 | if ("Menu" !== key) {//如果不是图标组件不是Menu,就跳过,否则加上ICon的后缀 10 | app.component(key, ElIconsModules[key]); 11 | } else { 12 | app.component(key + "Icon", ElIconsModules[key]); 13 | } 14 | }); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /unit-web/src/routers/modules/other.ts: -------------------------------------------------------------------------------- 1 | /** When your routing table is too long, you can split it into small modules**/ 2 | 3 | import Layout from '@/layout/index.vue' 4 | 5 | const othersRouter = [{ 6 | path: '/other', 7 | component: Layout, 8 | redirect: '/other/clipboard', 9 | name: 'other', 10 | meta: { 11 | title: '常用组件', 12 | icon: 'management', 13 | roles:['other'] 14 | }, 15 | children: [ 16 | { 17 | path: '/other/clipboard', 18 | component: "/other/clipboard/index.vue", 19 | name: 'clipboard', 20 | meta: { title: '剪贴板', roles:['other'] ,icon: 'MenuIcon',} 21 | }, 22 | // { 23 | // path: '/other/iconfont', 24 | // component: () => import('@/views/other/iconfont/index.vue'), 25 | // name: 'iconfont', 26 | // meta: { title: '阿里图标库', icon: 'MenuIcon' } 27 | // }, 28 | ] 29 | }] 30 | 31 | export default othersRouter 32 | -------------------------------------------------------------------------------- /unit-web/src/routers/modules/tools.ts: -------------------------------------------------------------------------------- 1 | /** When your routing table is too long, you can split it into small modules**/ 2 | 3 | import Layout from '@/layout/index.vue' 4 | 5 | const toolsRouter = [{ 6 | path: '/tools', 7 | component: Layout, 8 | redirect: '/tools/404', 9 | name: 'tools', 10 | meta: { 11 | title: '测试工具', 12 | icon: 'ElementPlus' 13 | }, 14 | children: [ 15 | { 16 | path: '/tools/websocket', 17 | component: () => import('@/views/tools/websocket/index.vue'), 18 | name: 'websocket', 19 | meta: { title: 'websocket', icon: 'Lightning' } 20 | } 21 | ] 22 | }] 23 | 24 | export default toolsRouter 25 | -------------------------------------------------------------------------------- /unit-web/src/store/index.ts: -------------------------------------------------------------------------------- 1 | import {defineStore, createPinia} from 'pinia' 2 | // 引入持久化插件 3 | import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' 4 | 5 | export const Store = defineStore({ 6 | // id: 必须的,在所有 Store 中唯一 7 | id:'globalState', 8 | // state: 返回对象的函数 9 | state: ()=>({ 10 | 11 | }), 12 | getters: {}, 13 | actions:{}, 14 | persist: { 15 | // 本地存储的名称 16 | key: "globalState", 17 | //保存的位置 18 | storage: window.sessionStorage,//localstorage 19 | }, 20 | }) 21 | 22 | 23 | const pinia = createPinia(); 24 | //pinia使用 25 | pinia.use(piniaPluginPersistedstate); 26 | export default pinia 27 | -------------------------------------------------------------------------------- /unit-web/src/styles/element.scss: -------------------------------------------------------------------------------- 1 | .el-table__header th { 2 | font-weight: bold; 3 | color: #252525; 4 | background: #fafafa; 5 | } 6 | 7 | //.el-table .el-table__header th { 8 | // background: var(--el-fill-color-light)!important; 9 | //} 10 | 11 | /* Drawer 抽屉 12 | ------------------------------- */ 13 | .el-drawer { 14 | --el-drawer-padding-primary: unset !important; 15 | 16 | .el-drawer__header { 17 | padding: 0 15px !important; 18 | height: 50px; 19 | display: flex; 20 | align-items: center; 21 | margin-bottom: 0 !important; 22 | border-bottom: 1px solid var(--el-border-color); 23 | color: var(--el-text-color-primary); 24 | } 25 | 26 | .el-drawer__body { 27 | width: 100%; 28 | height: 100%; 29 | overflow: auto; 30 | } 31 | } -------------------------------------------------------------------------------- /unit-web/src/styles/index.scss: -------------------------------------------------------------------------------- 1 | @import './variables.scss'; 2 | @import './sidebar.scss'; 3 | @import './transition.scss'; 4 | @import "./common.scss"; 5 | @import "./element.scss"; 6 | 7 | 8 | -------------------------------------------------------------------------------- /unit-web/src/styles/transition.scss: -------------------------------------------------------------------------------- 1 | // global transition css 2 | 3 | /* fade */ 4 | .fade-enter-active, 5 | .fade-leave-active { 6 | transition: opacity 0.28s; 7 | } 8 | 9 | .fade-enter, 10 | .fade-leave-active { 11 | opacity: 0; 12 | } 13 | 14 | /* 路由 */ 15 | .fade-slide-leave-active, 16 | .fade-slide-enter-active { 17 | transition: all 0.3s; 18 | } 19 | 20 | .fade-slide-enter-from { 21 | opacity: 0; 22 | transform: translateX(-30px); 23 | } 24 | 25 | .fade-slide-leave-to { 26 | opacity: 0; 27 | transform: translateX(30px); 28 | } 29 | 30 | // logo动画 31 | .sidebarLogoFade-enter-active { 32 | transition: opacity 1.5s; 33 | } 34 | .sidebarLogoFade-enter-from{ 35 | opacity: 0; 36 | } 37 | .sidebarLogoFade-leave-to { 38 | opacity: 0; 39 | } 40 | 41 | 42 | 43 | // 面包屑动画 方案1 44 | .breadcrumb-enter-active { 45 | transition: all 0.25s; 46 | } 47 | .breadcrumb-enter-from, 48 | .breadcrumb-leave-active { 49 | opacity: 0; 50 | transform: translateX(10px) skewX(-10deg); 51 | } 52 | -------------------------------------------------------------------------------- /unit-web/src/styles/variables.scss: -------------------------------------------------------------------------------- 1 | // base color 2 | $blue: #324157; 3 | $light-blue: #3a71a8; 4 | $red: #c03639; 5 | $pink: #e65d6e; 6 | $green: #30b08f; 7 | $tiffany: #4ab7bd; 8 | $yellow: #fec171; 9 | $panGreen: #30b08f; 10 | 11 | /* 全局 css 变量 */ 12 | $primaryColor: var(--el-color-primary); 13 | 14 | // sidebar 15 | $menuText: #bfcbd9; 16 | $menuActiveText: #409eff; 17 | $subMenuActiveText: #f4f4f5; 18 | 19 | $menuBg: #304156; 20 | $menuHover: #263445; 21 | 22 | $subMenuBg: #1f2d3d; 23 | $subMenuHover: #001528; 24 | 25 | $sideBarWidth: 210px; 26 | 27 | :export { 28 | menuText: $menuText; 29 | menuActiveText: $menuActiveText; 30 | subMenuActiveText: $subMenuActiveText; 31 | menuBg: $menuBg; 32 | menuHover: $menuHover; 33 | subMenuBg: $subMenuBg; 34 | subMenuHover: $subMenuHover; 35 | sideBarWidth: $sideBarWidth; 36 | primaryColor: $primaryColor; 37 | } 38 | -------------------------------------------------------------------------------- /unit-web/src/utils/auth.ts: -------------------------------------------------------------------------------- 1 | const TokenKey = 'zb-token' 2 | 3 | export function getToken() { 4 | return localStorage.TokenKey 5 | } 6 | 7 | export function setToken(token) { 8 | return (localStorage.TokenKey = token) 9 | } 10 | 11 | export function removeToken() { 12 | return (localStorage.TokenKey = '') 13 | } 14 | -------------------------------------------------------------------------------- /unit-web/src/utils/clipboard.ts: -------------------------------------------------------------------------------- 1 | import Clipboard from 'clipboard' 2 | import { ElMessage } from 'element-plus' 3 | 4 | 5 | function clipboardSuccess() { 6 | ElMessage({ 7 | message: '复制成功', 8 | type: 'success', 9 | duration: 1500 10 | }) 11 | } 12 | 13 | function clipboardError() { 14 | ElMessage({ 15 | message: '复制失败', 16 | type: 'error' 17 | }) 18 | } 19 | 20 | export default function handleClipboard(text, event) { 21 | const clipboard:any = new Clipboard(event.target, { 22 | text: () => text 23 | }) 24 | clipboard.on('success', () => { 25 | clipboardSuccess() 26 | clipboard.destroy() 27 | }) 28 | clipboard.on('error', () => { 29 | clipboardError() 30 | clipboard.destroy() 31 | }) 32 | clipboard.onClick(event) 33 | } 34 | -------------------------------------------------------------------------------- /unit-web/src/utils/element.ts: -------------------------------------------------------------------------------- 1 | import { ElLoading, ElMessage } from 'element-plus' 2 | import { 3 | Loading 4 | } from '@element-plus/icons-vue' 5 | let loading = null 6 | 7 | export const openLoading = (options:any ={})=>{ 8 | const text = options.text||'加载中' 9 | loading = ElLoading.service({ 10 | lock: true, 11 | text: text, 12 | }) 13 | } 14 | export const closeLoading = () => { 15 | loading&&loading.close() 16 | } 17 | 18 | /** 19 | * @description 显示错误消息 20 | * opt 传入参数 21 | * err 错误信息 22 | * type 消息类型 23 | * duration 消息持续时间 24 | */ 25 | export const showErrMessage = (code:string, msg:string) => { 26 | switch (code) { 27 | case "0": 28 | showMessage(msg, "success") 29 | break 30 | case "110": 31 | showMessage(msg, "error") 32 | break 33 | case "403": 34 | showMessage(msg, "waining") 35 | break 36 | } 37 | } 38 | 39 | export const showMessage = (msg:string, type:any= 'error') =>{ 40 | ElMessage({ 41 | message: msg, 42 | type:type, 43 | }) 44 | } 45 | -------------------------------------------------------------------------------- /unit-web/src/utils/emojis.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | imgs: [ 3 | '爱你', 4 | '爱情', 5 | '爱心', 6 | '傲慢', 7 | '白眼', 8 | '抱拳', 9 | '鄙视', 10 | '闭嘴', 11 | '便便', 12 | '擦汗', 13 | '菜刀', 14 | '差劲', 15 | '呲牙', 16 | '大哭', 17 | '蛋糕', 18 | '刀', 19 | '得意', 20 | '凋谢', 21 | '发呆', 22 | 'NO', 23 | 'OK', 24 | '发抖', 25 | '发怒', 26 | '饭', 27 | '飞吻', 28 | '奋斗', 29 | '疯了', 30 | '尴尬', 31 | '勾引', 32 | '鼓掌', 33 | '哈欠', 34 | ], 35 | } 36 | -------------------------------------------------------------------------------- /unit-web/src/utils/heartCheck.js: -------------------------------------------------------------------------------- 1 | //心跳检测 2 | export default { 3 | timeout: 1000 * 6, //6秒 4 | timeoutObj: null, 5 | serverTimeoutObj: null, 6 | reset: function () { 7 | this.timeoutObj && clearTimeout(this.timeoutObj); 8 | this.serverTimeoutObj && clearTimeout(this.serverTimeoutObj); 9 | return this; 10 | }, 11 | start: function (socket) { 12 | var self = this; 13 | this.timeoutObj = setTimeout(function () { 14 | //这里发送一个心跳,后端收到后,返回一个心跳消息, 15 | //onmessage拿到返回的心跳就说明连接正常 16 | // socket.send("ping"); 17 | //如果超过一定时间还没重置,说明后端主动断开了 18 | self.serverTimeoutObj = setTimeout(function () { 19 | //如果onclose会执行reconnect,我们执行ws.close()就行了. 20 | //如果直接执行reconnect 会触发onclose导致重连两次 21 | socket.close(); 22 | }, self.timeout); 23 | }, this.timeout); 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /unit-web/src/utils/mitt.js: -------------------------------------------------------------------------------- 1 | import mitt from 'mitt'; 2 | 3 | export const emitter = mitt(); -------------------------------------------------------------------------------- /unit-web/src/utils/requestAnimationFrameThrottle.js: -------------------------------------------------------------------------------- 1 | import raf from "raf"; 2 | 3 | /** 4 | * requestAnimationFrame 节流 5 | * scroll 和 touchmove 等事件触发很频繁,比屏幕刷新频率更快,将导致无效的渲染和重绘 6 | * 这里使用 requestAnimationFrame 来优化滚动处理,在一帧中只进行一次有效重绘 7 | */ 8 | export default function requestAnimationFrameThrottle(callback) { 9 | let id; 10 | 11 | const factory = args => () => { 12 | id = null; 13 | callback(...args); 14 | }; 15 | 16 | const throttled = (...args) => { 17 | if (id == null) { 18 | id = raf(factory(args)); 19 | } 20 | }; 21 | 22 | throttled.cancel = () => raf.cancel(id); 23 | 24 | return throttled; 25 | }; 26 | -------------------------------------------------------------------------------- /unit-web/src/views/https/case/components/apiInfoController.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 34 | 35 | -------------------------------------------------------------------------------- /unit-web/src/views/https/case/components/selectApi.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 52 | 53 | -------------------------------------------------------------------------------- /unit-web/src/views/https/case/components/step.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 32 | 33 | -------------------------------------------------------------------------------- /unit-web/src/views/https/plan/components/selectCase.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 52 | 53 | -------------------------------------------------------------------------------- /unit-web/src/views/https/plan/components/step.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 32 | 33 | -------------------------------------------------------------------------------- /unit-web/src/views/login/components/LoginQrcode.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 12 | 13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /unit-web/src/views/login/index.scss: -------------------------------------------------------------------------------- 1 | $dark_gray: #889aa4; 2 | .login-btn{ 3 | margin-top: 20px; 4 | width: 100%; 5 | } 6 | .show-pwd { 7 | position: absolute; 8 | right: 10px; 9 | top: 7px; 10 | font-size: 16px; 11 | color: $dark_gray; 12 | cursor: pointer; 13 | user-select: none; 14 | ::v-deep(.svg-icon){ 15 | vertical-align: 0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /unit-web/src/views/other/clipboard/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 28 | -------------------------------------------------------------------------------- /unit-web/src/views/system/dept/index.scss: -------------------------------------------------------------------------------- 1 | .header{ 2 | display: flex; 3 | padding: 16px 16px 0px 16px; 4 | margin-bottom: 16px; 5 | border-radius: 4px; 6 | background: white; 7 | box-shadow: 0 0 12px rgb(0 0 0 / 5%); 8 | } 9 | .footer{ 10 | flex: 1; 11 | display: flex; 12 | padding: 16px; 13 | flex-direction: column; 14 | border-radius: 4px; 15 | overflow: hidden; 16 | background: white; 17 | box-shadow: 0 0 12px rgb(0 0 0 / 5%); 18 | position: relative; 19 | box-sizing: border-box; 20 | .util{ 21 | margin-bottom: 15px; 22 | display: flex; 23 | justify-content: flex-end; 24 | flex-shrink: 0; 25 | } 26 | .table-inner{ 27 | flex: 1; 28 | position: relative; 29 | } 30 | .table{ 31 | position: absolute; 32 | left: 0; 33 | top: 0; 34 | width: 100%; 35 | height: 100% 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /unit-web/src/views/system/dictionary/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /unit-web/src/views/system/env/components/dbConfig.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 28 | 29 | -------------------------------------------------------------------------------- /unit-web/src/views/system/env/components/selectDatabase.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 51 | 52 | -------------------------------------------------------------------------------- /unit-web/src/views/system/user/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /unit-web/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import type { DefineComponent } from 'vue' 5 | const component: DefineComponent<{}, {}, any> 6 | export default component 7 | } 8 | -------------------------------------------------------------------------------- /unit-web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "moduleResolution": "Node", 7 | "strict": false, 8 | "jsx": "preserve", 9 | "sourceMap": true, 10 | "resolveJsonModule": true, 11 | "isolatedModules": true, 12 | "esModuleInterop": true, 13 | "lib": ["ESNext", "DOM"], 14 | // 跳过库检查,解决打包失败 15 | "skipLibCheck": true, 16 | // 解析非相对模块名的基准目录 17 | "baseUrl": "./", 18 | // 模块名到基于 baseUrl 的路径映射的列表。 19 | "paths": { 20 | "@": ["src"], 21 | "@/*": ["src/*"] 22 | } 23 | }, 24 | "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], 25 | "references": [ 26 | { "path": "./tsconfig.node.json" } 27 | ], 28 | "exclude": ["node_modules","dist","**/*.js"] 29 | } 30 | -------------------------------------------------------------------------------- /unit-web/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": ["vite.config.ts"] 9 | } 10 | --------------------------------------------------------------------------------