robocanic commented on code in PR #1325:
URL: https://github.com/apache/dubbo-admin/pull/1325#discussion_r2365906014
##########
pkg/core/store/index/service_consumer_metadata.go:
##########
@@ -15,11 +15,27 @@
* limitations under the License.
*/
-package v1alpha1
+package index
-func (x *Zone) IsEnabled() bool {
- if x.Enabled == nil {
- return true
+import (
+ meshresource
"github.com/apache/dubbo-admin/pkg/core/resource/apis/mesh/v1alpha1"
+ "k8s.io/client-go/tools/cache"
+)
+
+const (
+ ByServiceConsumerAppName = "idx_service_consumer_app_name"
+)
+
+func init() {
+ RegisterIndexers(meshresource.ServiceConsumerMetadataKind,
map[string]cache.IndexFunc{
+ ByServiceProviderAppName: byServiceConsumerAppName,
Review Comment:
fixed
##########
pkg/console/handler/condition_rule.go:
##########
@@ -54,13 +55,14 @@ func GetConditionRuleWithRuleName(cs consolectx.Context)
gin.HandlerFunc {
return func(c *gin.Context) {
var name string
ruleName := c.Param("ruleName")
+ mesh := c.Param("mesh")
if strings.HasSuffix(ruleName, consts.ConditionRuleSuffix) {
name =
ruleName[:len(ruleName)-len(consts.ConditionRuleSuffix)]
} else {
c.JSON(http.StatusBadRequest,
model.NewErrorResp(fmt.Sprintf("ruleName must end with %s",
consts.ConditionRuleSuffix)))
return
}
- if res, err := service.GetConditionRule(cs, name); err != nil {
+ if res, err := service.GetConditionRule(cs, mesh, name); err !=
nil {
Review Comment:
fixed
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]