liuyang211 edited a comment on issue #1456: URL: https://github.com/apache/apisix-dashboard/issues/1456#issuecomment-780277256
> @liuyang211 > > The detailed steps are as follows: > > 1. Configure the prefix in yaml: > https://github.com/apache/apisix-dashboard/blob/master/api/conf/conf.yaml#L24-L31 > 2. Read configuration > https://github.com/apache/apisix-dashboard/blob/master/api/internal/conf/conf.go#L135-L158 > https://github.com/apache/apisix-dashboard/blob/master/api/internal/conf/conf.go#L222-L234 > 3. Use configuration > `BasePath: "/apisix/consumers"`, `BasePath: "/apisix/routes"` is the prefix of various resources > https://github.com/apache/apisix-dashboard/blob/master/api/internal/core/store/storehub.go#L83-L181 > > you could have a try : ) Thank you, I've done it. But I modified this, is that OK? 2. Read configuration https://github.com/apache/apisix-dashboard/blob/master/api/internal/conf/conf.go#L66-L71 https://github.com/apache/apisix-dashboard/blob/master/api/internal/conf/conf.go#L228-L233 And use the global variable conf ```go err := InitStore(HubKeyConsumer, GenericStoreOption{ BasePath: conf.ETCDConfig.Prefix + "/consumers", ObjType: reflect.TypeOf(entity.Consumer{}), KeyFunc: func(obj interface{}) string { r := obj.(*entity.Consumer) return r.Username }, }) ``` BTW, it seems that one dashboard can only manage one apisix cluster if /web remains the same. I think it would be better, if dashboard can manage multiple apisix clusters. The prefix is passed as a parameter to api by web. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
