Anilople / Sentinel

A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)
https://anilople.github.io/Sentinel/
Apache License 2.0
1 stars 9 forks source link

feat(dashboard): prompt user why export rule failed #9

Closed Anilople closed 3 years ago

Anilople commented 3 years ago

Describe what this PR does / why we need it

When export rule failed, prompt user why failed.

Does this pull request fix one issue?

None

Describe how you did it

When user import or export rules,

if projects does not exist in apollo, user will see message like

{
  "success": false,
  "code": 404,
  "msg": "those projects do not exist in apollo",
  "data": [
    "a bc",
    "s234",
    "sd2",
    "yys"
  ]
}

if projects cannot registry to sentinel dashboard, user will see message like

{
  "success": false,
  "code": 403,
  "msg": "cannot registry those projects to sentinel dashboard",
  "data": [
    "a",
    "abcd"
  ]
}

Describe how to verify it

Test it manually.