Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support ui 2.0 add logs viewer #5357

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
69dbf48
feat: datePicker
mlhiter Jan 7, 2025
73d5946
feat: header ui
mlhiter Jan 7, 2025
644bb44
fix: DatePicker input status bug
mlhiter Jan 8, 2025
559c3aa
feat: header ui
mlhiter Jan 8, 2025
20d5b04
feat: log number ui
mlhiter Jan 8, 2025
136f183
feat: LogCount ui
mlhiter Jan 8, 2025
9875f32
add layout
zjy365 Jan 8, 2025
c03b8f1
update layouts
zjy365 Jan 8, 2025
c6919f2
add AdvancedInfo
zjy365 Jan 8, 2025
67ab251
chore: move file to page/log
mlhiter Jan 8, 2025
a9259ee
chore: move log component to log/component
mlhiter Jan 8, 2025
550ee31
fix: add contains and not contains operator
mlhiter Jan 8, 2025
c6aea29
feat: log list header ui
mlhiter Jan 8, 2025
94914e7
update index
zjy365 Jan 8, 2025
57941f8
feat: log table ui
mlhiter Jan 8, 2025
8f30a5e
chore: i18n adjust
mlhiter Jan 9, 2025
402ec88
fix: pod and container
mlhiter Jan 9, 2025
a0576a5
update style
zjy365 Jan 10, 2025
7ee3512
update monitor
zjy365 Jan 10, 2025
d674900
update pages
zjy365 Jan 13, 2025
70fe2f1
chore: adjust logs components position
mlhiter Jan 13, 2025
91d0b23
fix: select placeholder
mlhiter Jan 13, 2025
4a6ac06
add api
zjy365 Jan 15, 2025
433da22
update logs
zjy365 Jan 20, 2025
74a847e
add logs & filter & logCounts
zjy365 Jan 21, 2025
944095a
update logs
zjy365 Jan 21, 2025
afc1ff8
update
zjy365 Jan 22, 2025
661e5ca
update MonitorChart
zjy365 Jan 22, 2025
22104c8
add prevFieldList
zjy365 Jan 22, 2025
a59d88d
update api
zjy365 Jan 22, 2025
d182043
delete table
zjy365 Jan 22, 2025
33b1c52
update log api
zjy365 Jan 23, 2025
aa72365
update scroll
zjy365 Jan 23, 2025
8e25668
update common.json
zjy365 Jan 23, 2025
4b4f073
update defaultRecentDate
zjy365 Jan 23, 2025
ee3b77f
fix
zjy365 Jan 23, 2025
e263253
update keys
zjy365 Jan 24, 2025
02f95f2
update timerange
zjy365 Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions frontend/providers/applaunchpad/data/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ launchpad:
url: http://launchpad-monitor.sealos.svc.cluster.local:8428
billing:
url: "http://account-service.account-system.svc:2333"
log:
url: "http://service-vlogs.sealos.svc.cluster.local:8428"
appResourceFormSliderConfig:
default:
cpu: [100, 200, 500, 1000, 2000, 3000, 4000, 8000]
Expand Down
3 changes: 3 additions & 0 deletions frontend/providers/applaunchpad/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
"@sealos/driver": "workspace:^",
"@sealos/ui": "workspace:^",
"@tanstack/react-query": "^4.35.3",
"@tanstack/react-table": "^8.10.7",
"ansi_up": "^5.2.1",
"axios": "^1.5.1",
"base64-stream": "^1.0.0",
"date-fns": "^2.30.0",
"dayjs": "^1.11.10",
"decimal.js": "^10.4.3",
"dns": "^0.2.2",
Expand All @@ -45,6 +47,7 @@
"nprogress": "^0.2.0",
"prettier": "^2.8.8",
"react": "18.2.0",
"react-day-picker": "^8.8.2",
"react-dom": "18.2.0",
"react-hook-form": "^7.46.2",
"react-i18next": "^14.1.2",
Expand Down
51 changes: 45 additions & 6 deletions frontend/providers/applaunchpad/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"ConfigMap Path Conflict": "ConfigMap Path Conflict",
"ConfigMap Tip": "ConfigMap",
"Configurable number of instances or automatic horizontal scaling": "Configurable replica count and auto horizontal scaling",
"Configuration File": "Configmap",
"Confirm": "Yes",
"Configuration File": "Configmaps",
"Confirm": "Confirm",
"Confirm deletion": "Yes",
"Confirm Deploy Application?": "Are you sure you want to deploy the application?",
"Confirm to restart this application?": "Are you sure you want to update the application?",
Expand Down Expand Up @@ -86,7 +86,7 @@
"Edit Env Variable": "Edit Environment Variables",
"Edit Environment Variables": "Edit Environment Variables",
"Env Placeholder": "one per line, key and value separated by colon or equals sign, e.g.:\nmongoUrl=127.0.0.1:8000\nredisUrl:127.0.0.0:8001\n-env1 =test",
"Environment Variables": "Environment",
"Environment Variables": "Environment Variables",
"Export": "Export",
"Export Domain": "Assigned Domain",
"file": "File",
Expand Down Expand Up @@ -197,7 +197,7 @@
"Stateless": "Stateless",
"Status": "Status",
"storage": "Storage",
"Storage": "Storage",
"Storage": "Mounted Volumes",
"Storage path can not empty": "Storage mount path is required",
"Storage Range": "Storage Range",
"Storage Value can not empty": "Storage size is required",
Expand Down Expand Up @@ -257,7 +257,7 @@
"total_price_tip": "The estimated cost does not include port fees and traffic fees, and is subject to actual usage.",
"nodeports": "NodePorts",
"streaming_logs": "Streaming logs",
"within_5_minutes": "Within 5 minutes",
"within_5_minute": "Within 5 minute",
"within_1_hour": "Within 1 hour",
"within_1_day": "Within 1 day",
"terminated_logs": "Terminated logs",
Expand All @@ -277,5 +277,44 @@
"storage_path_placeholder": "For Example: /data"
},
"guide_deploy_button": "Complete creation",
"shared": "Shared"
"filter": "Filter",
"start": "Start",
"end": "End",
"time_zone": "Time Zone",
"recently": "Last",
"minute": "minutes",
"day": "days",
"hour": "hours",
"time": "Range",
"log_number": "Log Number",
"close": "Off",
"normal_filter": "Normal",
"advanced_filter": "Advance",
"json_mode": "JSON Mode",
"only_stderr": "Stderr Only",
"keyword": "Keywords",
"search": "Search",
"equal": "equal",
"greater_than": "Greater than",
"less_than": "Less than",
"field_name": "Select Field",
"value": "Enter Value",
"logNumber": "Log Counts",
"overview": "Overview",
"monitor": "Monitors",
"logs": "Logs",
"application_source": "Source",
"contains": "contains",
"not_contains": "not contains",
"visible": "Visable",
"hidden": "Hidden",
"export_log": "Export",
"no_data_available": "No data available",
"all": "All",
"hour-singular": "hour",
"not_equal": "not",
"field_settings": "Field Setting",
"selected": "Selected",
"please_select": "Please Select",
"refetching_success": "Refresh Successful"
}
44 changes: 41 additions & 3 deletions frontend/providers/applaunchpad/public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"Auto scaling": "弹性伸缩",
"Balance": "余额",
"Basic Config": "基础配置",
"Basic Information": "基本信息",
"Basic Information": "基础信息",
"Can help you deploy any Docker image": "丰富的镜像仓库,支持任意 Docker 镜像",
"Can not change storage path": "不允许修改挂载路径",
"Cancel": "取消",
Expand Down Expand Up @@ -257,7 +257,7 @@
"total_price_tip": "预估费用不包括端口费用和流量费用,以实际使用为准",
"nodeports": "外网端口",
"streaming_logs": "实时日志",
"within_5_minutes": "五分钟内",
"within_5_minute": "五分钟内",
"within_1_hour": "一小时内",
"within_1_day": "一天内",
"terminated_logs": "中断前",
Expand All @@ -278,5 +278,43 @@
"storage_path_placeholder": "如:/data"
},
"guide_deploy_button": "完成创建",
"shared": "共享"
"filter": "筛选",
"start": "开始",
"end": "结束",
"time_zone": "时区",
"recently": "最近",
"minute": "分钟",
"hour": "小时",
"day": "天",
"time": "时间",
"log_number": "日志数",
"close": "关闭",
"normal_filter": "普通筛选",
"advanced_filter": "高级筛选",
"json_mode": "JSON模式",
"only_stderr": "只看 Stderr",
"keyword": "关键词",
"search": "查询",
"field_name": "字段名",
"equal": "等于",
"value": "值",
"logNumber": "日志数量",
"overview": "概览",
"monitor": "监控",
"logs": "日志",
"application_source": "来源",
"contains": "包含",
"not_contains": "不包含",
"visible": "可见",
"hidden": "隐藏",
"piece": "个",
"export_log": "导出日志",
"no_data_available": "暂无数据",
"all": "全部",
"hour-singular": "小时",
"not_equal": "不等于",
"field_settings": "字段设置",
"selected": "已选中",
"please_select": "请选择",
"refetching_success": "刷新成功"
}
5 changes: 5 additions & 0 deletions frontend/providers/applaunchpad/src/api/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from '@/utils/adapt';
import type { AppPatchPropsType, PodDetailType } from '@/types/app';
import { MonitorDataResult, MonitorQueryKey } from '@/types/monitor';
import { LogQueryPayload } from '@/pages/api/log/queryLogs';

export const postDeployApp = (yamlList: string[]) => POST('/api/applyApp', { yamlList });

Expand Down Expand Up @@ -58,4 +59,8 @@ export const getAppMonitorData = (payload: {
queryName: string;
queryKey: keyof MonitorQueryKey;
step: string;
start?: number;
end?: number;
}) => GET<MonitorDataResult[]>(`/api/monitor/getMonitorData`, payload);

export const getAppLogs = (payload: LogQueryPayload) => POST<string>('/api/log/queryLogs', payload);
Loading
Loading