Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions cli/cmd/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func StartCmd(ch *cmdutil.Helper) *cobra.Command {
var grpcPort int
var verbose bool
var debug bool
var readonly bool
var reset bool
var pullEnv bool
var noUI bool
Expand Down Expand Up @@ -152,7 +151,6 @@ func StartCmd(ch *cmdutil.Helper) *cobra.Command {
GRPCPort: grpcPort,
EnableUI: !noUI,
OpenBrowser: !noOpen,
Readonly: readonly,
PreviewMode: previewMode,
UserID: userID,
TLSCertPath: tlsCertPath,
Expand All @@ -173,7 +171,6 @@ func StartCmd(ch *cmdutil.Helper) *cobra.Command {
startCmd.Flags().BoolVar(&pullEnv, "pull-env", true, "Pull environment variables from Rill Cloud before starting the project")
startCmd.Flags().BoolVar(&noOpen, "no-open", false, "Do not open browser")
startCmd.Flags().BoolVar(&verbose, "verbose", false, "Sets the log level to debug")
startCmd.Flags().BoolVar(&readonly, "readonly", false, "Deprecated: use --preview instead")
startCmd.Flags().BoolVar(&previewMode, "preview", false, "Start in dashboard-only view (no code editor)")
startCmd.Flags().IntVar(&httpPort, "port", 9009, "Port for HTTP")
startCmd.Flags().IntVar(&grpcPort, "port-grpc", 49009, "Port for gRPC (internal)")
Expand All @@ -190,11 +187,6 @@ func StartCmd(ch *cmdutil.Helper) *cobra.Command {
panic(err)
}

// Deprecated support for "--readonly". Projects should be shared via Rill Cloud.
if err := startCmd.Flags().MarkHidden("readonly"); err != nil {
panic(err)
}

return startCmd
}

Expand Down
2 changes: 0 additions & 2 deletions cli/pkg/local/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ type ServeOptions struct {
GRPCPort int
EnableUI bool
OpenBrowser bool
Readonly bool
PreviewMode bool
UserID string
TLSCertPath string
Expand All @@ -405,7 +404,6 @@ func (a *App) Serve(opts ServeOptions) error {
BuildTime: a.ch.Version.Timestamp,
IsDev: a.ch.Version.IsDev(),
AnalyticsEnabled: enabled,
Readonly: opts.Readonly,
PreviewMode: opts.PreviewMode,
}

Expand Down
2 changes: 0 additions & 2 deletions cli/pkg/local/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ func (s *Server) GetMetadata(ctx context.Context, r *connect.Request[localv1.Get
BuildTime: s.metadata.BuildTime,
IsDev: s.metadata.IsDev,
AnalyticsEnabled: s.metadata.AnalyticsEnabled,
Readonly: s.metadata.Readonly,
GrpcPort: int32(s.metadata.GRPCPort),
LoginUrl: s.app.localURL + "/auth",
AdminUrl: s.app.ch.AdminURL(),
Expand Down Expand Up @@ -959,7 +958,6 @@ type localMetadata struct {
BuildTime string `json:"build_time"`
IsDev bool `json:"is_dev"`
AnalyticsEnabled bool `json:"analytics_enabled"`
Readonly bool `json:"readonly"`
PreviewMode bool `json:"preview_mode"`
GRPCPort int `json:"grpc_port"`
}
Expand Down
600 changes: 295 additions & 305 deletions proto/gen/rill/local/v1/api.pb.go

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions proto/gen/rill/local/v1/api.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/rill/local/v1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ message GetMetadataResponse {
string build_time = 7;
bool is_dev = 8;
bool analytics_enabled = 9;
bool readonly = 10;
reserved 10;
int32 grpc_port = 11;
string login_url = 12;
string admin_url = 13;
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/metrics/service/MetricsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class MetricsService
project_id: MD5(projectPathParts[projectPathParts.length - 1]).toString(),
user_id: localConfig.userId,
analytics_enabled: localConfig.analyticsEnabled,
mode: localConfig.readonly ? "read-only" : "edit",
mode: "edit",
};
}

Expand Down
6 changes: 0 additions & 6 deletions web-common/src/proto/gen/rill/local/v1/api_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,6 @@ export class GetMetadataResponse extends Message<GetMetadataResponse> {
*/
analyticsEnabled = false;

/**
* @generated from field: bool readonly = 10;
*/
readonly = false;

/**
* @generated from field: int32 grpc_port = 11;
*/
Expand Down Expand Up @@ -197,7 +192,6 @@ export class GetMetadataResponse extends Message<GetMetadataResponse> {
{ no: 7, name: "build_time", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 8, name: "is_dev", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 9, name: "analytics_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 10, name: "readonly", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 11, name: "grpc_port", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
{ no: 12, name: "login_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 13, name: "admin_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
Expand Down
2 changes: 1 addition & 1 deletion web-local/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
}

featureFlags.set(false, "adminServer");
featureFlags.set(config.readonly || data.previewMode, "readOnly");
featureFlags.set(data.previewMode, "readOnly");
});

/**
Expand Down
Loading