You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/07/07 12:05:26 UTC

[GitHub] [apisix-dashboard] tokers commented on a change in pull request #1968: feat: When Dashboard and APISIX version do not match, make the prompt information clearer (#1944)

tokers commented on a change in pull request #1968:
URL: https://github.com/apache/apisix-dashboard/pull/1968#discussion_r665306494



##########
File path: api/internal/handler/tool/tool.go
##########
@@ -101,9 +102,11 @@ func (h *Handler) VersionMatch(c droplet.Context) (interface{}, error) {
 	} else {
 		// TODO: move this to utils
 		return &data.SpecCodeResponse{StatusCode: http.StatusOK, Response: data.Response{
-			Data:    &output,
-			Code:    2000001,
-			Message: "The manager-api and apache apisix are mismatched.",
+			Data: &output,
+			Code: 2000001,
+			Message: fmt.Sprintf("The Dashboard and Apache APISIX are mismatched. "+
+				"The version of Dashboard is %s and should be used with APISIX %s",

Review comment:
       ```suggestion
   				"The version of Dashboard is %s and should be used with Apache APISIX %s",
   ```

##########
File path: api/test/e2enew/version/version_test.go
##########
@@ -43,9 +43,11 @@ var _ = ginkgo.Describe("Version", func() {
 			Path:         "/apisix/admin/tool/version_match",
 			Headers:      map[string]string{"Authorization": base.GetToken()},
 			ExpectStatus: http.StatusOK,
-			ExpectBody: []string{"\"code\":2000001",
-				"\"message\":\"The manager-api and apache apisix are mismatched.\"",
-				"\"matched\":false", "apisix_server1", "apisix_server2"},
+			ExpectBody: []string{`"code":2000001`,
+				`The manager-api and apache apisix are mismatched`,
+				`The version of Dashboard is`,
+				`and should be used with APISIX`,

Review comment:
       ```suggestion
   				`and should be used with Apache APISIX`,
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org