-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: read only view for UI #1628
Conversation
Signed-off-by: veds-g <[email protected]>
How to enable/disable it? |
today, default behaviour - current UI(edit), package(read). We need to modify a boolean variable in |
Maybe do it with an approach similar to the |
Signed-off-by: veds-g <[email protected]>
cde838e
to
3adee1e
Compare
I tried doing it that way but I realised this approach won't work for the package. For |
Signed-off-by: veds-g <[email protected]>
Signed-off-by: veds-g <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Signed-off-by: veds-g <[email protected]>
@@ -69,6 +71,7 @@ func NewServerCommand() *cobra.Command { | |||
command.Flags().BoolVar(&namespaced, "namespaced", sharedutil.LookupEnvBoolOr("NUMAFLOW_SERVER_NAMESPACED", false), "Whether to run in namespaced scope, defaults to false.") | |||
command.Flags().StringVar(&managedNamespace, "managed-namespace", sharedutil.LookupEnvStringOr("NUMAFLOW_SERVER_MANAGED_NAMESPACE", sharedutil.LookupEnvStringOr("NAMESPACE", "numaflow-system")), "The namespace that the server watches when \"--namespaced\" is \"true\".") | |||
command.Flags().StringVar(&baseHref, "base-href", sharedutil.LookupEnvStringOr("NUMAFLOW_SERVER_BASE_HREF", "/"), "Base href for Numaflow server, defaults to '/'.") | |||
command.Flags().BoolVar(&readOnly, "readonly", sharedutil.LookupEnvBoolOr("NUMAFLOW_SERVER_READONLY", true), "Whether to enable read only view for the UX server, defaults to false.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means default is true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo, should be false
@@ -152,6 +156,7 @@ func UrlRewrite(r *gin.Engine) gin.HandlerFunc { | |||
func CreateAuthRouteMap(baseHref string) authz.RouteMap { | |||
return authz.RouteMap{ | |||
"GET:" + baseHref + "api/v1/sysinfo": authz.NewRouteInfo(authz.ObjectPipeline, false), | |||
"GET:" + baseHref + "api/v1/readonlyinfo": authz.NewRouteInfo(authz.ObjectEvents, false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to put it into sysinfo and use that API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be done, let me make that change
server.readonly
innumaflow-cmd-params-config
to toggle view/api/v1/readonlyinfo
to be used in the UI