正在显示
5 个修改的文件
包含
219 行增加
和
236 行删除
| @@ -115,7 +115,7 @@ export const batchDeleteUser = params =>{return http.del(`${baseUrl}/user/batch_ | @@ -115,7 +115,7 @@ export const batchDeleteUser = params =>{return http.del(`${baseUrl}/user/batch_ | ||
| 115 | export const batchDeleteUserRelation = params =>{return http.del(`${baseUrl}/user/batch_deleteRelation`, params);}; | 115 | export const batchDeleteUserRelation = params =>{return http.del(`${baseUrl}/user/batch_deleteRelation`, params);}; |
| 116 | 116 | ||
| 117 | // 监控队列 | 117 | // 监控队列 |
| 118 | -export const selectQueueViewList = params =>{return http.get(`${baseUrl}/view/queue/list`, params);}; | 118 | +export const selectQueueViewList = params =>{return http.get(`${baseUrl}/queue/monitor`, params);}; |
| 119 | export const selectExchangeViewList = params =>{return http.get(`${baseUrl}/view/exchange/list`, params);}; | 119 | export const selectExchangeViewList = params =>{return http.get(`${baseUrl}/view/exchange/list`, params);}; |
| 120 | 120 | ||
| 121 | export const selectElasticSearchList = params =>{return http.get(`${baseUrl}/es/page`, params);}; | 121 | export const selectElasticSearchList = params =>{return http.get(`${baseUrl}/es/page`, params);}; |
| @@ -151,11 +151,11 @@ let routes = [ | @@ -151,11 +151,11 @@ let routes = [ | ||
| 151 | children: [ | 151 | children: [ |
| 152 | {path: '/userInfo', component: UserInfo, name: '用户关系管理'}, | 152 | {path: '/userInfo', component: UserInfo, name: '用户关系管理'}, |
| 153 | {path: '/server', component: Server, name: '服务器管理'}, | 153 | {path: '/server', component: Server, name: '服务器管理'}, |
| 154 | - {path: '/host', component: VirtualHost, name: '虚拟主机管理'}, | 154 | + // {path: '/host', component: VirtualHost, name: '虚拟主机管理'}, |
| 155 | {path: '/queue', component: Queue, name: '队列管理'}, | 155 | {path: '/queue', component: Queue, name: '队列管理'}, |
| 156 | - {path: '/exchange', component: Exchange, name: '交换机管理'}, | ||
| 157 | - {path: '/routing', component: RoutingKey, name: '路由键管理'}, | ||
| 158 | - {path: '/umb', component: UserMessageBinding, name: '配置管理'}, | 156 | + // {path: '/exchange', component: Exchange, name: '交换机管理'}, |
| 157 | + // {path: '/routing', component: RoutingKey, name: '路由键管理'}, | ||
| 158 | + {path: '/umb', component: UserMessageBinding, name: '路由配置管理'}, | ||
| 159 | {path: '/note', component: MessageNote, name: '消息记录管理'}, | 159 | {path: '/note', component: MessageNote, name: '消息记录管理'}, |
| 160 | {path: '/note_search', component: MessageNoteSearch, name: '消息记录搜索'}, | 160 | {path: '/note_search', component: MessageNoteSearch, name: '消息记录搜索'}, |
| 161 | {path: '/es', component: ElasticSearchInfo, name: 'ES信息管理'}, | 161 | {path: '/es', component: ElasticSearchInfo, name: 'ES信息管理'}, |
| @@ -169,7 +169,7 @@ let routes = [ | @@ -169,7 +169,7 @@ let routes = [ | ||
| 169 | iconCls: 'el-icon-view', | 169 | iconCls: 'el-icon-view', |
| 170 | children: [ | 170 | children: [ |
| 171 | {path: '/queueView', component: QueueView, name: '队列监控'}, | 171 | {path: '/queueView', component: QueueView, name: '队列监控'}, |
| 172 | - {path: '/exchangeView', component: ExchangeView, name: '交换机监控'}, | 172 | + // {path: '/exchangeView', component: ExchangeView, name: '交换机监控'}, |
| 173 | ] | 173 | ] |
| 174 | }, | 174 | }, |
| 175 | 175 |
| @@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
| 34 | </el-cascader> | 34 | </el-cascader> |
| 35 | </el-col> | 35 | </el-col> |
| 36 | <el-col :span="8"> | 36 | <el-col :span="8"> |
| 37 | - <el-button type="warning" style="width:150px" size="medium" icon="el-icon-search" @click="queue_getList"> | 37 | + <el-button type="warning" style="width:150px" size="medium" icon="el-icon-search" @click="queue_getListSub"> |
| 38 | 查询队列 | 38 | 查询队列 |
| 39 | </el-button> | 39 | </el-button> |
| 40 | <el-button type="primary" style="width:150px" size="medium" icon="el-icon-plus" @click="queue_toAddDialog"> | 40 | <el-button type="primary" style="width:150px" size="medium" icon="el-icon-plus" @click="queue_toAddDialog"> |
| @@ -56,20 +56,16 @@ | @@ -56,20 +56,16 @@ | ||
| 56 | width="220"></el-table-column> | 56 | width="220"></el-table-column> |
| 57 | <el-table-column label="所属用户" prop="username" align="center" | 57 | <el-table-column label="所属用户" prop="username" align="center" |
| 58 | width="220"></el-table-column> | 58 | width="220"></el-table-column> |
| 59 | - <el-table-column label="所属虚拟主机" prop="virtualHost.virtualHostName" align="center" | 59 | + <el-table-column label="分区数量" prop="partitionCount" align="center" |
| 60 | width="220"></el-table-column> | 60 | width="220"></el-table-column> |
| 61 | <el-table-column label="相关描述" prop="description" align="center" width="280"></el-table-column> | 61 | <el-table-column label="相关描述" prop="description" align="center" width="280"></el-table-column> |
| 62 | - <el-table-column label="是否持久化" prop="durability" align="center" width="145"> | ||
| 63 | - <template slot-scope="scope"> | ||
| 64 | - <span v-if="scope.row.durability ===false">否</span> | ||
| 65 | - <span v-if="scope.row.durability ===true">是</span> | ||
| 66 | - </template> | ||
| 67 | - </el-table-column> | ||
| 68 | - <el-table-column label="是否自动删除" prop="autoDelete" align="center" width="145"> | ||
| 69 | - <template slot-scope="scope"> | ||
| 70 | - <span v-if="scope.row.autoDelete ===false">否</span> | ||
| 71 | - <span v-if="scope.row.autoDelete ===true">是</span> | ||
| 72 | - </template> | 62 | +<!-- <el-table-column label="是否持久化" prop="durability" align="center" width="145">--> |
| 63 | +<!-- <template slot-scope="scope">--> | ||
| 64 | +<!-- <span v-if="scope.row.durability ===false">否</span>--> | ||
| 65 | +<!-- <span v-if="scope.row.durability ===true">是</span>--> | ||
| 66 | +<!-- </template>--> | ||
| 67 | +<!-- </el-table-column>--> | ||
| 68 | + <el-table-column label="创建时间" prop="gmtCreate" align="center" width="145"> | ||
| 73 | </el-table-column> | 69 | </el-table-column> |
| 74 | <!-- <el-table-column label="扩展参数" prop="arguments" align="center" width="200">--> | 70 | <!-- <el-table-column label="扩展参数" prop="arguments" align="center" width="200">--> |
| 75 | <!-- </el-table-column>--> | 71 | <!-- </el-table-column>--> |
| @@ -309,18 +305,18 @@ | @@ -309,18 +305,18 @@ | ||
| 309 | username: [ | 305 | username: [ |
| 310 | {required: true, message: '请输入用户名称', trigger: ['blur', 'change']}, | 306 | {required: true, message: '请输入用户名称', trigger: ['blur', 'change']}, |
| 311 | ], | 307 | ], |
| 312 | - // 所属虚拟机id | ||
| 313 | - virtualHostId: [ | ||
| 314 | - {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']}, | ||
| 315 | - ], | ||
| 316 | - // 是否持久化,默认 true | ||
| 317 | - durability: [ | ||
| 318 | - {required: true, message: '请选择是否持久化', trigger: ['blur', 'change']}, | ||
| 319 | - ], | ||
| 320 | - // 是否自动删除,默认 false | ||
| 321 | - autoDelete: [ | ||
| 322 | - {required: true, message: '请选择是否自动删除', trigger: ['blur', 'change']}, | ||
| 323 | - ], | 308 | + // // 所属虚拟机id |
| 309 | + // virtualHostId: [ | ||
| 310 | + // {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']}, | ||
| 311 | + // ], | ||
| 312 | + // // 是否持久化,默认 true | ||
| 313 | + // durability: [ | ||
| 314 | + // {required: true, message: '请选择是否持久化', trigger: ['blur', 'change']}, | ||
| 315 | + // ], | ||
| 316 | + // // 是否自动删除,默认 false | ||
| 317 | + // autoDelete: [ | ||
| 318 | + // {required: true, message: '请选择是否自动删除', trigger: ['blur', 'change']}, | ||
| 319 | + // ], | ||
| 324 | // // 扩展参数,以JSON格式存储 | 320 | // // 扩展参数,以JSON格式存储 |
| 325 | // arguments: [ | 321 | // arguments: [ |
| 326 | // {required: true, message: '扩展参数', trigger: ['blur', 'change']}, | 322 | // {required: true, message: '扩展参数', trigger: ['blur', 'change']}, |
| @@ -342,18 +338,18 @@ | @@ -342,18 +338,18 @@ | ||
| 342 | username: [ | 338 | username: [ |
| 343 | {required: true, message: '请输入用户名称', trigger: ['blur', 'change']}, | 339 | {required: true, message: '请输入用户名称', trigger: ['blur', 'change']}, |
| 344 | ], | 340 | ], |
| 345 | - // 所属虚拟机id | ||
| 346 | - virtualHostId: [ | ||
| 347 | - {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']}, | ||
| 348 | - ], | ||
| 349 | - // 是否持久化,默认 true | ||
| 350 | - durability: [ | ||
| 351 | - {required: true, message: '请选择是否持久化', trigger: ['blur', 'change']}, | ||
| 352 | - ], | ||
| 353 | - // 是否自动删除,默认 false | ||
| 354 | - autoDelete: [ | ||
| 355 | - {required: true, message: '请选择是否自动删除', trigger: ['blur', 'change']}, | ||
| 356 | - ], | 341 | + // // 所属虚拟机id |
| 342 | + // virtualHostId: [ | ||
| 343 | + // {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']}, | ||
| 344 | + // ], | ||
| 345 | + // // 是否持久化,默认 true | ||
| 346 | + // durability: [ | ||
| 347 | + // {required: true, message: '请选择是否持久化', trigger: ['blur', 'change']}, | ||
| 348 | + // ], | ||
| 349 | + // // 是否自动删除,默认 false | ||
| 350 | + // autoDelete: [ | ||
| 351 | + // {required: true, message: '请选择是否自动删除', trigger: ['blur', 'change']}, | ||
| 352 | + // ], | ||
| 357 | // // 扩展参数,以JSON格式存储 | 353 | // // 扩展参数,以JSON格式存储 |
| 358 | // arguments: [ | 354 | // arguments: [ |
| 359 | // {required: true, message: '扩展参数', trigger: ['blur', 'change']}, | 355 | // {required: true, message: '扩展参数', trigger: ['blur', 'change']}, |
| @@ -389,6 +385,8 @@ | @@ -389,6 +385,8 @@ | ||
| 389 | let user = userList.pop(); | 385 | let user = userList.pop(); |
| 390 | this.queue_addForm.username = user.username; | 386 | this.queue_addForm.username = user.username; |
| 391 | this.queue_addForm.queueName = user.username; | 387 | this.queue_addForm.queueName = user.username; |
| 388 | + this.queue_addForm.userId = user.userId; | ||
| 389 | + this.queue_addForm.consumerGroupName = user.username+"Group"; | ||
| 392 | } | 390 | } |
| 393 | }, | 391 | }, |
| 394 | /** | 392 | /** |
| @@ -407,6 +405,10 @@ | @@ -407,6 +405,10 @@ | ||
| 407 | //刷新列表 | 405 | //刷新列表 |
| 408 | this.queue_getList(); | 406 | this.queue_getList(); |
| 409 | }, | 407 | }, |
| 408 | + queue_getListSub(){ | ||
| 409 | + this.queue_queryInfo.pageNum= 1; | ||
| 410 | + this.queue_getList(); | ||
| 411 | + }, | ||
| 410 | /** | 412 | /** |
| 411 | * queue,分页查询 | 413 | * queue,分页查询 |
| 412 | */ | 414 | */ |
| @@ -437,6 +439,27 @@ | @@ -437,6 +439,27 @@ | ||
| 437 | * queue,添加对话框,打开事件 | 439 | * queue,添加对话框,打开事件 |
| 438 | */ | 440 | */ |
| 439 | queue_toAddDialog() { | 441 | queue_toAddDialog() { |
| 442 | + this.queue_addForm = { | ||
| 443 | + // 队列名称 | ||
| 444 | + queueName: '', | ||
| 445 | + consumerGroupName: '', | ||
| 446 | + partitionCount: 3, | ||
| 447 | + queueType: 1, | ||
| 448 | + // 用户名称 | ||
| 449 | + username: '', | ||
| 450 | + // 用户id(该字段抛弃) | ||
| 451 | + userId: '', | ||
| 452 | + // 所属虚拟机id | ||
| 453 | + virtualHostId: '', | ||
| 454 | + // 是否持久化,默认 true | ||
| 455 | + durability: '', | ||
| 456 | + // 是否自动删除,默认 false | ||
| 457 | + autoDelete: '', | ||
| 458 | + // 扩展参数,以JSON格式存储 | ||
| 459 | + arguments: '', | ||
| 460 | + // 相关描述 | ||
| 461 | + description: '', | ||
| 462 | + }; | ||
| 440 | this.dialogStatus= 'create'; | 463 | this.dialogStatus= 'create'; |
| 441 | this.queue_dialog.addDialog = true; | 464 | this.queue_dialog.addDialog = true; |
| 442 | }, | 465 | }, |
| @@ -51,18 +51,18 @@ | @@ -51,18 +51,18 @@ | ||
| 51 | <el-tag type="success">{{props.row.serverPort}}</el-tag> | 51 | <el-tag type="success">{{props.row.serverPort}}</el-tag> |
| 52 | </el-form-item> | 52 | </el-form-item> |
| 53 | </el-col> | 53 | </el-col> |
| 54 | - <el-col :span="6"> | ||
| 55 | - <el-form-item label="客户端端口号:"> | ||
| 56 | - <el-tag type="success">{{props.row.clientPort}}</el-tag> | ||
| 57 | - </el-form-item> | ||
| 58 | - </el-col> | ||
| 59 | - </el-row> | ||
| 60 | - <el-row> | ||
| 61 | - <el-col :span="6"> | ||
| 62 | - <el-form-item label="超级用户名称:"> | ||
| 63 | - <el-tag type="success">{{props.row.superUsername}}</el-tag> | ||
| 64 | - </el-form-item> | ||
| 65 | - </el-col> | 54 | +<!-- <el-col :span="6">--> |
| 55 | +<!-- <el-form-item label="客户端端口号:">--> | ||
| 56 | +<!-- <el-tag type="success">{{props.row.clientPort}}</el-tag>--> | ||
| 57 | +<!-- </el-form-item>--> | ||
| 58 | +<!-- </el-col>--> | ||
| 59 | +<!-- </el-row>--> | ||
| 60 | +<!-- <el-row>--> | ||
| 61 | +<!-- <el-col :span="6">--> | ||
| 62 | +<!-- <el-form-item label="超级用户名称:">--> | ||
| 63 | +<!-- <el-tag type="success">{{props.row.superUsername}}</el-tag>--> | ||
| 64 | +<!-- </el-form-item>--> | ||
| 65 | +<!-- </el-col>--> | ||
| 66 | <el-col :span="8"> | 66 | <el-col :span="8"> |
| 67 | <el-form-item label="相关描述:"> | 67 | <el-form-item label="相关描述:"> |
| 68 | <el-tag type="success">{{props.row.description}}</el-tag> | 68 | <el-tag type="success">{{props.row.description}}</el-tag> |
| @@ -75,17 +75,17 @@ | @@ -75,17 +75,17 @@ | ||
| 75 | <el-table-column label="服务器名称" prop="serverName" align="center" width="180"></el-table-column> | 75 | <el-table-column label="服务器名称" prop="serverName" align="center" width="180"></el-table-column> |
| 76 | <el-table-column label="服务器地址" prop="serverIp" align="center" width="200"></el-table-column> | 76 | <el-table-column label="服务器地址" prop="serverIp" align="center" width="200"></el-table-column> |
| 77 | <el-table-column label="服务器端口号" prop="serverPort" align="center" width="150"></el-table-column> | 77 | <el-table-column label="服务器端口号" prop="serverPort" align="center" width="150"></el-table-column> |
| 78 | - <el-table-column label="客户端端口号" prop="clientPort" align="center" width="150"></el-table-column> | 78 | +<!-- <el-table-column label="客户端端口号" prop="clientPort" align="center" width="150"></el-table-column>--> |
| 79 | <!-- <el-table-column label="超级用户名称" prop="superUsername" align="center" width="150"></el-table-column>--> | 79 | <!-- <el-table-column label="超级用户名称" prop="superUsername" align="center" width="150"></el-table-column>--> |
| 80 | -<!-- <el-table-column label="相关描述" prop="description" align="center" width="300"></el-table-column>--> | 80 | + <el-table-column label="相关描述" prop="description" align="center" width="300"></el-table-column> |
| 81 | <el-table-column label="操作" align="center"> | 81 | <el-table-column label="操作" align="center"> |
| 82 | <template slot-scope="scope"> | 82 | <template slot-scope="scope"> |
| 83 | - <!-- 虚拟主机 --> | ||
| 84 | - <el-tooltip effect="dark" content="虚拟主机" placement="top-start" :enterable="false"> | ||
| 85 | - <el-button type="warning" icon="el-icon-link" size="mini" | ||
| 86 | - @click="toVirtualHost(scope.$index,scope.row)">虚拟主机 | ||
| 87 | - </el-button> | ||
| 88 | - </el-tooltip> | 83 | +<!-- <!– 虚拟主机 –>--> |
| 84 | +<!-- <el-tooltip effect="dark" content="虚拟主机" placement="top-start" :enterable="false">--> | ||
| 85 | +<!-- <el-button type="warning" icon="el-icon-link" size="mini"--> | ||
| 86 | +<!-- @click="toVirtualHost(scope.$index,scope.row)">虚拟主机--> | ||
| 87 | +<!-- </el-button>--> | ||
| 88 | +<!-- </el-tooltip>--> | ||
| 89 | <!-- 编辑按钮 --> | 89 | <!-- 编辑按钮 --> |
| 90 | <el-tooltip effect="dark" content="编辑" placement="top-start" :enterable="false"> | 90 | <el-tooltip effect="dark" content="编辑" placement="top-start" :enterable="false"> |
| 91 | <el-button type="primary" icon="el-icon-edit" size="mini" | 91 | <el-button type="primary" icon="el-icon-edit" size="mini" |
| @@ -129,7 +129,7 @@ | @@ -129,7 +129,7 @@ | ||
| 129 | </el-card> | 129 | </el-card> |
| 130 | <!-- 对话框 —> 添加服务器信息 --> | 130 | <!-- 对话框 —> 添加服务器信息 --> |
| 131 | <div> | 131 | <div> |
| 132 | - <el-dialog title="添加服务器信息" | 132 | + <el-dialog :title="dialogMap[dialogStatus]" |
| 133 | :visible.sync="serverDialog.addDialog" | 133 | :visible.sync="serverDialog.addDialog" |
| 134 | style="margin-top: -50px" | 134 | style="margin-top: -50px" |
| 135 | width="60%" text-align="center" @close="serverAddDialogClosed"> | 135 | width="60%" text-align="center" @close="serverAddDialogClosed"> |
| @@ -153,30 +153,30 @@ | @@ -153,30 +153,30 @@ | ||
| 153 | <template slot="prepend" >服务器端口号</template> | 153 | <template slot="prepend" >服务器端口号</template> |
| 154 | </el-input> | 154 | </el-input> |
| 155 | </el-form-item> | 155 | </el-form-item> |
| 156 | - <el-form-item label="" prop="clientPort"> | ||
| 157 | - <el-input v-model="addServerForm.clientPort" style="width:300px" size="small" clearable | ||
| 158 | - placeholder="请输入客户端端口号"> | ||
| 159 | - <template slot="prepend" >客户端端口号</template> | ||
| 160 | - </el-input> | ||
| 161 | - </el-form-item> | ||
| 162 | - <el-form-item label="" prop="superUsername"> | ||
| 163 | - <el-input v-model="addServerForm.superUsername" style="width:300px" size="small" clearable | ||
| 164 | - placeholder="请输入超级用户名称"> | ||
| 165 | - <template slot="prepend" >超级用户名称</template> | ||
| 166 | - </el-input> | ||
| 167 | - </el-form-item> | ||
| 168 | - <el-form-item label="" prop="firstPassword"> | ||
| 169 | - <el-input type="password" v-model="addServerForm.firstPassword" style="width:300px" | ||
| 170 | - size="small" clearable show-password placeholder="请输入超级用户密码"> | ||
| 171 | - <template slot="prepend" >超级用户密码</template> | ||
| 172 | - </el-input> | ||
| 173 | - </el-form-item> | ||
| 174 | - <el-form-item label="" prop="superPassword"> | ||
| 175 | - <el-input type="password" v-model="addServerForm.superPassword" style="width:300px" | ||
| 176 | - size="small" clearable show-password placeholder="请重新输入密码"> | ||
| 177 | - <template slot="prepend" >重新输入密码</template> | ||
| 178 | - </el-input> | ||
| 179 | - </el-form-item> | 156 | +<!-- <el-form-item label="" prop="clientPort">--> |
| 157 | +<!-- <el-input v-model="addServerForm.clientPort" style="width:300px" size="small" clearable--> | ||
| 158 | +<!-- placeholder="请输入客户端端口号">--> | ||
| 159 | +<!-- <template slot="prepend" >客户端端口号</template>--> | ||
| 160 | +<!-- </el-input>--> | ||
| 161 | +<!-- </el-form-item>--> | ||
| 162 | +<!-- <el-form-item label="" prop="superUsername">--> | ||
| 163 | +<!-- <el-input v-model="addServerForm.superUsername" style="width:300px" size="small" clearable--> | ||
| 164 | +<!-- placeholder="请输入超级用户名称">--> | ||
| 165 | +<!-- <template slot="prepend" >超级用户名称</template>--> | ||
| 166 | +<!-- </el-input>--> | ||
| 167 | +<!-- </el-form-item>--> | ||
| 168 | +<!-- <el-form-item label="" prop="firstPassword">--> | ||
| 169 | +<!-- <el-input type="password" v-model="addServerForm.firstPassword" style="width:300px"--> | ||
| 170 | +<!-- size="small" clearable show-password placeholder="请输入超级用户密码">--> | ||
| 171 | +<!-- <template slot="prepend" >超级用户密码</template>--> | ||
| 172 | +<!-- </el-input>--> | ||
| 173 | +<!-- </el-form-item>--> | ||
| 174 | +<!-- <el-form-item label="" prop="superPassword">--> | ||
| 175 | +<!-- <el-input type="password" v-model="addServerForm.superPassword" style="width:300px"--> | ||
| 176 | +<!-- size="small" clearable show-password placeholder="请重新输入密码">--> | ||
| 177 | +<!-- <template slot="prepend" >重新输入密码</template>--> | ||
| 178 | +<!-- </el-input>--> | ||
| 179 | +<!-- </el-form-item>--> | ||
| 180 | <el-form-item label="" prop="description"> | 180 | <el-form-item label="" prop="description"> |
| 181 | <el-input v-model="addServerForm.description" placeholder="请输入相关描述" | 181 | <el-input v-model="addServerForm.description" placeholder="请输入相关描述" |
| 182 | style="width:300px" size="small" clearable | 182 | style="width:300px" size="small" clearable |
| @@ -190,73 +190,10 @@ | @@ -190,73 +190,10 @@ | ||
| 190 | <el-button type="info" @click="serverDialog.addDialog = false" size="medium" | 190 | <el-button type="info" @click="serverDialog.addDialog = false" size="medium" |
| 191 | style="width: 100px;background-color: #6F8294;color: #ffffff">取消 | 191 | style="width: 100px;background-color: #6F8294;color: #ffffff">取消 |
| 192 | </el-button> | 192 | </el-button> |
| 193 | - <el-button type="primary" @click="addServerInfo" :loading="server_loading.addLoading" | ||
| 194 | - size="medium" | ||
| 195 | - style="width: 100px"> | ||
| 196 | - 添加 | ||
| 197 | - </el-button> | ||
| 198 | - </div> | ||
| 199 | - </el-dialog> | ||
| 200 | - </div> | ||
| 201 | - <!-- 对话框 —> 编辑服务器信息 --> | ||
| 202 | - <div> | ||
| 203 | - <el-dialog title="编辑服务器信息" | ||
| 204 | - :visible.sync="serverDialog.editDialog" | ||
| 205 | - style="margin-top: -50px" | ||
| 206 | - width="50%" text-align="center" @close="serverEditDialogClosed"> | ||
| 207 | - <el-form :inline="true" :model="editServerForm" label-width="120px" status-icon | ||
| 208 | - :rules="editServerFormRules" ref="editServerFormRef" | ||
| 209 | - align="center"> | ||
| 210 | - <el-form-item label="" prop="serverName"> | ||
| 211 | - <el-input v-model="editServerForm.serverName" style="width:300px" size="small" clearable | ||
| 212 | - readonly disabled | ||
| 213 | - placeholder="请输入服务器名称"> | ||
| 214 | - <template slot="prepend" > 服务器名称 </template> | ||
| 215 | - </el-input> | ||
| 216 | - </el-form-item> | ||
| 217 | - <el-form-item label="" prop="serverIp"> | ||
| 218 | - <el-input v-model="editServerForm.serverIp" style="width:300px" size="small" clearable | ||
| 219 | - readonly disabled | ||
| 220 | - placeholder="请输入服务器IP地址"> | ||
| 221 | - <template slot="prepend" > IP地址 </template> | ||
| 222 | - </el-input> | ||
| 223 | - </el-form-item> | ||
| 224 | - <el-form-item label="" prop="serverPort"> | ||
| 225 | - <el-input v-model="editServerForm.serverPort" style="width:300px" size="small" clearable | ||
| 226 | - readonly disabled | ||
| 227 | - placeholder="请输入服务器端口号"> | ||
| 228 | - <template slot="prepend" >服务器端口号</template> | ||
| 229 | - </el-input> | ||
| 230 | - </el-form-item> | ||
| 231 | - <el-form-item label="" prop="clientPort"> | ||
| 232 | - <el-input v-model="editServerForm.clientPort" style="width:300px" size="small" clearable | ||
| 233 | - readonly disabled placeholder="请输入客户端端口号"> | ||
| 234 | - <template slot="prepend" >客户端端口号</template> | ||
| 235 | - </el-input> | ||
| 236 | - </el-form-item> | ||
| 237 | - | ||
| 238 | - <el-form-item label="" prop="superUsername"> | ||
| 239 | - <el-input v-model="editServerForm.superUsername" style="width:300px" size="small" clearable | ||
| 240 | - readonly disabled placeholder="请输入超级用户名称"> | ||
| 241 | - <template slot="prepend" >超级用户名称</template> | ||
| 242 | - </el-input> | ||
| 243 | - </el-form-item> | ||
| 244 | - | ||
| 245 | - <el-form-item label="" prop="description"> | ||
| 246 | - <el-input v-model="editServerForm.description" placeholder="请输入相关描述" | ||
| 247 | - style="width:300px" size="small" clearable | ||
| 248 | - type="textarea" autosize :rows="1"></el-input> | ||
| 249 | - </el-form-item> | ||
| 250 | - </el-form> | ||
| 251 | - | ||
| 252 | - <div slot="footer" class="dialog-footer" style="text-align: center"> | ||
| 253 | - <el-button type="info" @click="serverDialog.editDialog = false" size="medium" | ||
| 254 | - style="width: 100px;background-color: #6F8294;color: #ffffff">取消 | ||
| 255 | - </el-button> | ||
| 256 | - <el-button type="primary" @click="editServerInfo" :loading="server_loading.addLoading" | 193 | + <el-button type="primary" @click="dialogStatus==='create'?addServerInfo():editServerInfo()" :loading="server_loading.addLoading" |
| 257 | size="medium" | 194 | size="medium" |
| 258 | style="width: 100px"> | 195 | style="width: 100px"> |
| 259 | - 编辑 | 196 | + 提交 |
| 260 | </el-button> | 197 | </el-button> |
| 261 | </div> | 198 | </div> |
| 262 | </el-dialog> | 199 | </el-dialog> |
| @@ -298,6 +235,11 @@ | @@ -298,6 +235,11 @@ | ||
| 298 | callback(new Error('请输入合法的IP地址')); | 235 | callback(new Error('请输入合法的IP地址')); |
| 299 | }; | 236 | }; |
| 300 | return { | 237 | return { |
| 238 | + dialogMap: { | ||
| 239 | + update: '编辑服务器信息', | ||
| 240 | + create: '添加服务器信息', | ||
| 241 | + }, | ||
| 242 | + dialogStatus: 'create', | ||
| 301 | /** | 243 | /** |
| 302 | * 搜索参数 | 244 | * 搜索参数 |
| 303 | */ | 245 | */ |
| @@ -392,22 +334,22 @@ | @@ -392,22 +334,22 @@ | ||
| 392 | serverPort: [ | 334 | serverPort: [ |
| 393 | {required: true, message: '请输入服务器端口号', trigger: ['blur', 'change']}, | 335 | {required: true, message: '请输入服务器端口号', trigger: ['blur', 'change']}, |
| 394 | ], | 336 | ], |
| 395 | - description: [ | ||
| 396 | - {required: true, message: '请输入服务器相关描述', trigger: ['blur', 'change']}, | ||
| 397 | - ], | ||
| 398 | - clientPort: [ | ||
| 399 | - {required: true, message: '请输入客户端端口号', trigger: ['blur', 'change']}, | ||
| 400 | - ], | ||
| 401 | - superUsername: [ | ||
| 402 | - {required: true, message: '请输入超级用户名称', trigger: ['blur', 'change']}, | ||
| 403 | - ], | ||
| 404 | - firstPassword: [ | ||
| 405 | - {required: true, message: '请输入超级用户密码', trigger: ['blur', 'change']}, | ||
| 406 | - ], | ||
| 407 | - superPassword: [ | ||
| 408 | - {required: true, message: '请重新输入密码', trigger: ['blur', 'change']}, | ||
| 409 | - {validator: validatePassword, trigger: ['blur', 'change']} | ||
| 410 | - ], | 337 | + // description: [ |
| 338 | + // {required: true, message: '请输入服务器相关描述', trigger: ['blur', 'change']}, | ||
| 339 | + // ], | ||
| 340 | + // clientPort: [ | ||
| 341 | + // {required: true, message: '请输入客户端端口号', trigger: ['blur', 'change']}, | ||
| 342 | + // ], | ||
| 343 | + // superUsername: [ | ||
| 344 | + // {required: true, message: '请输入超级用户名称', trigger: ['blur', 'change']}, | ||
| 345 | + // ], | ||
| 346 | + // firstPassword: [ | ||
| 347 | + // {required: true, message: '请输入超级用户密码', trigger: ['blur', 'change']}, | ||
| 348 | + // ], | ||
| 349 | + // superPassword: [ | ||
| 350 | + // {required: true, message: '请重新输入密码', trigger: ['blur', 'change']}, | ||
| 351 | + // {validator: validatePassword, trigger: ['blur', 'change']} | ||
| 352 | + // ], | ||
| 411 | }, | 353 | }, |
| 412 | /** | 354 | /** |
| 413 | * 编辑服务器,表单的验证规则对象 | 355 | * 编辑服务器,表单的验证规则对象 |
| @@ -488,6 +430,25 @@ | @@ -488,6 +430,25 @@ | ||
| 488 | * 打开 添加服务器信息 对话框 | 430 | * 打开 添加服务器信息 对话框 |
| 489 | */ | 431 | */ |
| 490 | toAddDialog() { | 432 | toAddDialog() { |
| 433 | + this.addServerForm = { | ||
| 434 | + // 服务器名称 | ||
| 435 | + serverName: '', | ||
| 436 | + // 服务器IP | ||
| 437 | + serverIp: '', | ||
| 438 | + // 服务器端口号 | ||
| 439 | + serverPort: undefined, | ||
| 440 | + // 客户端端口号 | ||
| 441 | + clientPort: undefined, | ||
| 442 | + // 超级用户名称 | ||
| 443 | + superUsername: '', | ||
| 444 | + // 第一次输入密码 | ||
| 445 | + firstPassword: '', | ||
| 446 | + // 超级用户密码 | ||
| 447 | + superPassword: '', | ||
| 448 | + // 相关描述 | ||
| 449 | + description: '', | ||
| 450 | + }, | ||
| 451 | + this.dialogStatus= 'create'; | ||
| 491 | this.serverDialog.addDialog = true; | 452 | this.serverDialog.addDialog = true; |
| 492 | }, | 453 | }, |
| 493 | /** | 454 | /** |
| @@ -534,8 +495,9 @@ | @@ -534,8 +495,9 @@ | ||
| 534 | * 打开编辑服务器信息对话框 | 495 | * 打开编辑服务器信息对话框 |
| 535 | */ | 496 | */ |
| 536 | toEditDialog(index, row) { | 497 | toEditDialog(index, row) { |
| 537 | - this.editServerForm = Object.assign({}, row); | ||
| 538 | - this.serverDialog.editDialog = true; | 498 | + this.dialogStatus= 'update'; |
| 499 | + this.addServerForm = Object.assign({}, row); | ||
| 500 | + this.serverDialog.addDialog = true; | ||
| 539 | }, | 501 | }, |
| 540 | 502 | ||
| 541 | /** | 503 | /** |
| @@ -551,27 +513,27 @@ | @@ -551,27 +513,27 @@ | ||
| 551 | */ | 513 | */ |
| 552 | editServerInfo() { | 514 | editServerInfo() { |
| 553 | //进行表单的预验证 | 515 | //进行表单的预验证 |
| 554 | - this.$refs.editServerFormRef.validate(valid => { | 516 | + this.$refs.addServerFormRef.validate(valid => { |
| 555 | // 未通过,表单预校验 | 517 | // 未通过,表单预校验 |
| 556 | if (!valid) return; | 518 | if (!valid) return; |
| 557 | // 通过,表单预检验 | 519 | // 通过,表单预检验 |
| 558 | - this.server_loading.editLoading = true; | ||
| 559 | - updateBusServer(this.editServerForm).then((response) => { | 520 | + this.server_loading.addLoading = true; |
| 521 | + updateBusServer(this.addServerForm).then((response) => { | ||
| 560 | let res = response.data; | 522 | let res = response.data; |
| 561 | if (res.code !== '200') { | 523 | if (res.code !== '200') { |
| 562 | //关闭加载 | 524 | //关闭加载 |
| 563 | - this.server_loading.editLoading = false; | 525 | + this.server_loading.addLoading = false; |
| 564 | return this.$message.error(res.msg); | 526 | return this.$message.error(res.msg); |
| 565 | } | 527 | } |
| 566 | // 关闭加载 | 528 | // 关闭加载 |
| 567 | - this.server_loading.editLoading = false; | 529 | + this.server_loading.addLoading = false; |
| 568 | this.$message.success(res.msg); | 530 | this.$message.success(res.msg); |
| 569 | // 隐藏对话框 | 531 | // 隐藏对话框 |
| 570 | - this.serverDialog.editDialog = false; | 532 | + this.serverDialog.addDialog = false; |
| 571 | // 刷新列表 | 533 | // 刷新列表 |
| 572 | this.getServerList(); | 534 | this.getServerList(); |
| 573 | }).catch(error => { | 535 | }).catch(error => { |
| 574 | - this.server_loading.editLoading = false; | 536 | + this.server_loading.addLoading = false; |
| 575 | this.$message.error(error.toString()); | 537 | this.$message.error(error.toString()); |
| 576 | }); | 538 | }); |
| 577 | }) | 539 | }) |
| @@ -2,72 +2,56 @@ | @@ -2,72 +2,56 @@ | ||
| 2 | <el-container> | 2 | <el-container> |
| 3 | <el-main> | 3 | <el-main> |
| 4 | <el-card style="background-color: #F5F7FA"> | 4 | <el-card style="background-color: #F5F7FA"> |
| 5 | - <!-- 搜素区域 --> | 5 | +<!-- 搜素区域 --> |
| 6 | <div> | 6 | <div> |
| 7 | <el-row> | 7 | <el-row> |
| 8 | - <el-col :span="4"> | ||
| 9 | - <el-input v-model="queueView_queryInfo.serverName" prefix-icon="el-icon-search" size="medium" | ||
| 10 | - placeholder="服务器名称" clearable></el-input> | ||
| 11 | - </el-col> | ||
| 12 | - <el-col :span="4"> | ||
| 13 | - <el-input v-model="queueView_queryInfo.virtualHostName" prefix-icon="el-icon-search" size="medium" | ||
| 14 | - placeholder="虚拟主机名称" clearable></el-input> | ||
| 15 | - </el-col> | 8 | +<!-- <el-col :span="4">--> |
| 9 | +<!-- <el-input v-model="queueView_queryInfo.serverName" prefix-icon="el-icon-search" size="medium"--> | ||
| 10 | +<!-- placeholder="服务器名称" clearable></el-input>--> | ||
| 11 | +<!-- </el-col>--> | ||
| 12 | +<!-- <el-col :span="4">--> | ||
| 13 | +<!-- <el-input v-model="queueView_queryInfo.virtualHostName" prefix-icon="el-icon-search" size="medium"--> | ||
| 14 | +<!-- placeholder="虚拟主机名称" clearable></el-input>--> | ||
| 15 | +<!-- </el-col>--> | ||
| 16 | <el-col :span="8"> | 16 | <el-col :span="8"> |
| 17 | - <el-button type="success" style="width:150px" size="medium" @click="getQueueViewList"> | ||
| 18 | - 队列监控 | 17 | + <el-button type="success" style="width:150px" size="medium" @click="timerStatus==='start'?timerEnd():timerStart()"> |
| 18 | + {{timergMap[timerStatus]}} | ||
| 19 | </el-button> | 19 | </el-button> |
| 20 | </el-col> | 20 | </el-col> |
| 21 | </el-row> | 21 | </el-row> |
| 22 | </div> | 22 | </div> |
| 23 | - <!-- 列表区域 --> | 23 | +<!-- 列表区域 --> |
| 24 | <div style="margin-top: 20px;"> | 24 | <div style="margin-top: 20px;"> |
| 25 | <el-table :data="queueView_page.queueViewList" border size="small" | 25 | <el-table :data="queueView_page.queueViewList" border size="small" |
| 26 | + :default-sort = "{prop: 'lag', order: 'descending'}" | ||
| 26 | v-loading="queueView_loading.listLoading" element-loading-text="获取队列监控信息,拼命加载中"> | 27 | v-loading="queueView_loading.listLoading" element-loading-text="获取队列监控信息,拼命加载中"> |
| 27 | <el-table-column type="index" align="center"></el-table-column> | 28 | <el-table-column type="index" align="center"></el-table-column> |
| 28 | - <el-table-column label="服务器名称" prop="serverName" align="center" width="150"></el-table-column> | ||
| 29 | - <el-table-column label="虚拟主机名称" prop="queueInfo.vhost" align="center" width="150"></el-table-column> | ||
| 30 | - <el-table-column label="队列名称" prop="queueInfo.name" align="center" width="230"> | ||
| 31 | - </el-table-column> | ||
| 32 | - <el-table-column label="积压消息" prop="queueInfo.messages_ready" align="center" width="120"> | ||
| 33 | - <template slot-scope="scope"> | ||
| 34 | - <span v-if="scope.row.queueInfo.messages_ready !== null" style="color: #eb2f06"> | ||
| 35 | - {{scope.row.queueInfo.messages_ready}} | ||
| 36 | - </span> | ||
| 37 | - </template> | 29 | + <el-table-column label="消费组" prop="groupName" align="center" width="150"></el-table-column> |
| 30 | + <el-table-column label="TOPIC" prop="topic" align="center" width="150"></el-table-column> | ||
| 31 | + <el-table-column label="partition" prop="partition" align="center" width="230"> | ||
| 38 | </el-table-column> | 32 | </el-table-column> |
| 39 | - <el-table-column label="消息总数" prop="queueInfo.messages" align="center" width="120"></el-table-column> | ||
| 40 | - <el-table-column label="持久化" prop="queueInfo.durable" align="center" width="120"> | ||
| 41 | - <template slot-scope="scope"> | ||
| 42 | - <span v-if="scope.row.queueInfo.durable ===false">否</span> | ||
| 43 | - <span v-if="scope.row.queueInfo.durable ===true">是</span> | ||
| 44 | - </template> | ||
| 45 | - </el-table-column> | ||
| 46 | - <el-table-column label="自动删除" prop="queueInfo.auto_delete" align="center" width="120"> | ||
| 47 | - <template slot-scope="scope"> | ||
| 48 | - <span v-if="scope.row.queueInfo.auto_delete ===false">否</span> | ||
| 49 | - <span v-if="scope.row.queueInfo.auto_delete ===true">是</span> | ||
| 50 | - </template> | 33 | + <el-table-column label="积压消息" prop="lag" align="center" width="120" sortable> |
| 34 | +<!-- <template slot-scope="scope">--> | ||
| 35 | +<!-- <span v-if="scope.row.queueInfo.messages_ready !== null" style="color: #eb2f06">--> | ||
| 36 | +<!-- {{scope.row.queueInfo.messages_ready}}--> | ||
| 37 | +<!-- </span>--> | ||
| 38 | +<!-- </template>--> | ||
| 51 | </el-table-column> | 39 | </el-table-column> |
| 40 | + <el-table-column label="消息总数" prop="endoffset" align="center" width="120"></el-table-column> | ||
| 41 | +<!-- <el-table-column label="持久化" prop="queueInfo.durable" align="center" width="120">--> | ||
| 42 | +<!-- <template slot-scope="scope">--> | ||
| 43 | +<!-- <span v-if="scope.row.queueInfo.durable ===false">否</span>--> | ||
| 44 | +<!-- <span v-if="scope.row.queueInfo.durable ===true">是</span>--> | ||
| 45 | +<!-- </template>--> | ||
| 46 | +<!-- </el-table-column>--> | ||
| 47 | +<!-- <el-table-column label="自动删除" prop="queueInfo.auto_delete" align="center" width="120">--> | ||
| 48 | +<!-- <template slot-scope="scope">--> | ||
| 49 | +<!-- <span v-if="scope.row.queueInfo.auto_delete ===false">否</span>--> | ||
| 50 | +<!-- <span v-if="scope.row.queueInfo.auto_delete ===true">是</span>--> | ||
| 51 | +<!-- </template>--> | ||
| 52 | +<!-- </el-table-column>--> | ||
| 52 | </el-table> | 53 | </el-table> |
| 53 | </div> | 54 | </div> |
| 54 | - <!-- 分页区域 --> | ||
| 55 | - <div style="margin-top: 10px"> | ||
| 56 | - <el-row :gutter="24"> | ||
| 57 | - <el-col :span="6" style="margin-top: 5px"></el-col> | ||
| 58 | - <el-col :span="10" style="margin-top: 5px"> | ||
| 59 | - <el-pagination | ||
| 60 | - @size-change="queueView_handleSizeChange" | ||
| 61 | - @current-change="queueView_handleCurrentChange" | ||
| 62 | - :current-page="queueView_queryInfo.pageNum" | ||
| 63 | - :page-sizes="[10,50,100,500]" | ||
| 64 | - :page-size="queueView_queryInfo.pageSize" | ||
| 65 | - layout="total, sizes, prev, pager, next, jumper" | ||
| 66 | - :total="queueView_page.total"> | ||
| 67 | - </el-pagination> | ||
| 68 | - </el-col> | ||
| 69 | - </el-row> | ||
| 70 | - </div> | ||
| 71 | </el-card> | 55 | </el-card> |
| 72 | </el-main> | 56 | </el-main> |
| 73 | </el-container> | 57 | </el-container> |
| @@ -80,11 +64,17 @@ | @@ -80,11 +64,17 @@ | ||
| 80 | name: "QueueView", | 64 | name: "QueueView", |
| 81 | data() { | 65 | data() { |
| 82 | return { | 66 | return { |
| 67 | + timergMap: { | ||
| 68 | + start: '监控中', | ||
| 69 | + end: '已停止', | ||
| 70 | + }, | ||
| 71 | + timerStatus: "start", | ||
| 72 | + timer:{}, | ||
| 83 | queueView_queryInfo: { | 73 | queueView_queryInfo: { |
| 84 | - serverName: '', | ||
| 85 | - virtualHostName: '', | ||
| 86 | - pageNum: 1, | ||
| 87 | - pageSize: 10 | 74 | + GroupName: '', |
| 75 | + topic: '', | ||
| 76 | + partition: 1, | ||
| 77 | + Lag: 10 | ||
| 88 | }, | 78 | }, |
| 89 | queueView_page: { | 79 | queueView_page: { |
| 90 | queueViewList: [], | 80 | queueViewList: [], |
| @@ -116,7 +106,15 @@ | @@ -116,7 +106,15 @@ | ||
| 116 | this.queueView_queryInfo.pageSize = newSize; | 106 | this.queueView_queryInfo.pageSize = newSize; |
| 117 | this.getQueueViewList(); | 107 | this.getQueueViewList(); |
| 118 | }, | 108 | }, |
| 119 | - | 109 | + timerStart(){ |
| 110 | + this.timerStatus= "start"; | ||
| 111 | + this.getQueueViewList(); | ||
| 112 | + this.timer = setInterval(this.getQueueViewList, 10000); | ||
| 113 | + }, | ||
| 114 | + timerEnd(){ | ||
| 115 | + this.timerStatus= "end"; | ||
| 116 | + clearInterval(this.timer); | ||
| 117 | + }, | ||
| 120 | /** | 118 | /** |
| 121 | * 分页查询,监听 pageNum 改变的事件 | 119 | * 分页查询,监听 pageNum 改变的事件 |
| 122 | */ | 120 | */ |
| @@ -134,7 +132,7 @@ | @@ -134,7 +132,7 @@ | ||
| 134 | return this.$message.error(res.msg); | 132 | return this.$message.error(res.msg); |
| 135 | } | 133 | } |
| 136 | this.queueView_page.queueViewList = res.data; | 134 | this.queueView_page.queueViewList = res.data; |
| 137 | - this.queueView_page.total = res.total; | 135 | + // this.queueView_page.total = res.total; |
| 138 | this.queueView_loading.listLoading = false; | 136 | this.queueView_loading.listLoading = false; |
| 139 | }).catch(error => { | 137 | }).catch(error => { |
| 140 | this.queueView_loading.listLoading = false; | 138 | this.queueView_loading.listLoading = false; |
| @@ -145,7 +143,7 @@ | @@ -145,7 +143,7 @@ | ||
| 145 | created() { | 143 | created() { |
| 146 | }, | 144 | }, |
| 147 | mounted() { | 145 | mounted() { |
| 148 | - this.timer = setInterval(this.getQueueViewList, 5000); | 146 | + this.timerStart(); |
| 149 | }, | 147 | }, |
| 150 | beforeDestroy() { | 148 | beforeDestroy() { |
| 151 | clearInterval(this.timer); | 149 | clearInterval(this.timer); |
-
请 注册 或 登录 后发表评论