Commit 5c94d18
Feat: Enhance service method retrieval and invocation features (#1429)
* feat: add endpoint to retrieve service method names and corresponding request model
* feat: add endpoint and logic to retrieve service method details
* feat: trim whitespace from service name, mesh, group, version, and provider app name in ServiceMethodsReq
* feat: enhance service method handling with overload support and signature retrieval
* feat: add generic service invocation support
* feat: refactor triple RPC instance selection to use a dedicated target struct
* feat: remove obsolete service methods test file
* feat: improve error handling in generic service invocation and add parameter count validation
* feat: remove unnecessary variable and directly call service.InvokeServiceGeneric in ServiceGenericInvoke
* feat: improve query validation by using strutil for blank checks and enhance service provider metadata indexing
* feat: add endpoint to retrieve service provider instances and enhance request validation
* feat: update service provider instance handling and improve request validation
* feat: enhance generic service invocation with protocol and serialization support
* feat: add normalization functions for JSON values in generic service invocation
* feat: add normalization functions for JSON values in generic service invocation
* feat: refine retry logic for service invocation failures
* feat(ui-vue3): 添加 mock 数据支持,优化请求配置
- 添加环境变量 `VITE_MOCK_ENABLED` 用于启用 mock 数据模式
- 更新 `package.json` 脚本以添加 `dev:mock` 用于 mock 数据开发环境
- 新增 `mockLogin.ts` 文件,提供 mock 登录和登出接口
- 修改 `request.ts`,根据环境变量切换请求的 `baseURL`
- 优化 `main.ts`,根据 mock 模式自动导入 mock API 并更新认证状态
* feat(ui-vue3): 新增 Axios 依赖和 mock 数据接口
- 新增 axios 作为 HTTP 客户端依赖
- 优化 mock 数据接口,包括应用指标、流量权重、灰度配置等
- 更新 package.json 文件以添加 axios 依赖
- 修改多个 mock 接口以适应新的架构和数据结构
* feat(api): 新增 mock 服务方法列表、详情及泛化调用接口
* feat(api): add front func
* feat(ui-vue3): improve func empty description
* feat(ui-vue3): code format
* feat(api): update mock interface
* feat(ui-vue3): add elapsed time display for service debug invoke
* refactor: replace mockjs with MSW for API mocking
Migrate from mockjs to Mock Service Worker (MSW) for a more realistic
mock setup that intercepts at the network level. This eliminates the
need for a separate mock baseURL and simplifies the mock architecture.
- Remove mockjs dependency and all src/api/mock/* files
- Add msw with browser worker and handler-based mock definitions
- Move mock data to src/mocks/ with per-domain handler organization
- Add shared API type definitions in src/types/api.ts
- Simplify request.ts baseURL (always /api/v1, MSW handles interception)
- Update main.ts mock initialization to use MSW worker
* feat(api): refactor service request handling to use BaseServiceReq
* feat(api): simplify service provider metadata lookup logic
* feat(api): streamline service method resolution and metadata handling
* feat(api): enhance ServiceGenericInvokeReq structure and streamline metadata handling
* style(debug): format icon imports for improved readability
* refactor(api): simplify splitGenericArrayType function by removing redundant checks
* chore(deps): downgrade msw and related dependencies to version 2.11.6
* style(debug): improve debug tab UI with typography components and refined styles
* style(debug): refine button and typography styles for improved consistency
---------
Co-authored-by: 劳资蜀道山 <1493170339@qq.com>1 parent 9de1ee0 commit 5c94d18
52 files changed
Lines changed: 5781 additions & 1923 deletions
File tree
- pkg
- console
- handler
- model
- router
- service
- core/store/index
- governor/zk
- ui-vue3
- public
- src
- api
- mock
- service
- base/http
- components/editor
- mocks
- handlers
- router
- types
- utils
- views/resources/services
- slots
- tabs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | | - | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
101 | 106 | | |
| 107 | + | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| 111 | + | |
105 | 112 | | |
106 | 113 | | |
107 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
108 | 118 | | |
109 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
110 | 125 | | |
111 | 126 | | |
| 127 | + | |
112 | 128 | | |
113 | 129 | | |
114 | 130 | | |
115 | 131 | | |
| 132 | + | |
| 133 | + | |
116 | 134 | | |
117 | 135 | | |
118 | 136 | | |
119 | 137 | | |
120 | 138 | | |
121 | 139 | | |
| 140 | + | |
| 141 | + | |
122 | 142 | | |
123 | 143 | | |
124 | 144 | | |
125 | 145 | | |
| 146 | + | |
126 | 147 | | |
127 | 148 | | |
128 | 149 | | |
129 | 150 | | |
130 | 151 | | |
131 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
132 | 160 | | |
| 161 | + | |
133 | 162 | | |
134 | 163 | | |
135 | 164 | | |
| |||
138 | 167 | | |
139 | 168 | | |
140 | 169 | | |
| 170 | + | |
| 171 | + | |
141 | 172 | | |
| 173 | + | |
142 | 174 | | |
| 175 | + | |
| 176 | + | |
143 | 177 | | |
| 178 | + | |
144 | 179 | | |
145 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
146 | 185 | | |
147 | 186 | | |
| 187 | + | |
148 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
149 | 193 | | |
| 194 | + | |
150 | 195 | | |
151 | 196 | | |
| 197 | + | |
| 198 | + | |
152 | 199 | | |
153 | 200 | | |
154 | 201 | | |
155 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
156 | 211 | | |
| 212 | + | |
157 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
158 | 217 | | |
| 218 | + | |
| 219 | + | |
159 | 220 | | |
160 | 221 | | |
| 222 | + | |
161 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
162 | 242 | | |
163 | 243 | | |
164 | 244 | | |
165 | 245 | | |
166 | 246 | | |
| 247 | + | |
167 | 248 | | |
168 | 249 | | |
169 | 250 | | |
170 | 251 | | |
171 | 252 | | |
172 | 253 | | |
173 | 254 | | |
| 255 | + | |
174 | 256 | | |
175 | 257 | | |
176 | 258 | | |
| 259 | + | |
177 | 260 | | |
178 | 261 | | |
179 | 262 | | |
| |||
0 commit comments