@@ -31,17 +31,21 @@ const updateTemplate = "Project settings updated.\n"
3131type UpdateOpts struct {
3232 cli.ProjectOpts
3333 cli.OutputOpts
34- store store.ProjectSettingsUpdater
35- enableCollectDatabaseSpecificsStatistics bool
36- disableCollectDatabaseSpecificsStatistics bool
37- enableDataExplorer bool
38- disableDataExplorer bool
39- enablePerformanceAdvisor bool
40- disablePerformanceAdvisor bool
41- enableSchemaAdvisor bool
42- disableSchemaAdvisor bool
43- enableRealtimePerformancePanel bool
44- disableRealtimePerformancePanel bool
34+ store store.ProjectSettingsUpdater
35+ enableCollectDatabaseSpecificsStatistics bool
36+ disableCollectDatabaseSpecificsStatistics bool
37+ enableDataExplorer bool
38+ disableDataExplorer bool
39+ enableDataExplorerGenAIFeatures bool
40+ disableDataExplorerGenAIFeatures bool
41+ enableDataExplorerGenAISampleDocumentPassing bool
42+ disableDataExplorerGenAISampleDocumentPassing bool
43+ enablePerformanceAdvisor bool
44+ disablePerformanceAdvisor bool
45+ enableSchemaAdvisor bool
46+ disableSchemaAdvisor bool
47+ enableRealtimePerformancePanel bool
48+ disableRealtimePerformancePanel bool
4549}
4650
4751func (opts * UpdateOpts ) initStore (ctx context.Context ) func () error {
@@ -63,11 +67,13 @@ func (opts *UpdateOpts) Run() error {
6367
6468func (opts * UpdateOpts ) newProjectSettings () * atlasv2.GroupSettings {
6569 return & atlasv2.GroupSettings {
66- IsCollectDatabaseSpecificsStatisticsEnabled : cli .ReturnValueForSetting (opts .enableCollectDatabaseSpecificsStatistics , opts .disableCollectDatabaseSpecificsStatistics ),
67- IsDataExplorerEnabled : cli .ReturnValueForSetting (opts .enableDataExplorer , opts .disableDataExplorer ),
68- IsPerformanceAdvisorEnabled : cli .ReturnValueForSetting (opts .enablePerformanceAdvisor , opts .disablePerformanceAdvisor ),
69- IsRealtimePerformancePanelEnabled : cli .ReturnValueForSetting (opts .enableRealtimePerformancePanel , opts .disableRealtimePerformancePanel ),
70- IsSchemaAdvisorEnabled : cli .ReturnValueForSetting (opts .enableSchemaAdvisor , opts .disableSchemaAdvisor ),
70+ IsCollectDatabaseSpecificsStatisticsEnabled : cli .ReturnValueForSetting (opts .enableCollectDatabaseSpecificsStatistics , opts .disableCollectDatabaseSpecificsStatistics ),
71+ IsDataExplorerEnabled : cli .ReturnValueForSetting (opts .enableDataExplorer , opts .disableDataExplorer ),
72+ IsDataExplorerGenAIFeaturesEnabled : cli .ReturnValueForSetting (opts .enableDataExplorerGenAIFeatures , opts .disableDataExplorerGenAIFeatures ),
73+ IsDataExplorerGenAISampleDocumentPassingEnabled : cli .ReturnValueForSetting (opts .enableDataExplorerGenAISampleDocumentPassing , opts .disableDataExplorerGenAISampleDocumentPassing ),
74+ IsPerformanceAdvisorEnabled : cli .ReturnValueForSetting (opts .enablePerformanceAdvisor , opts .disablePerformanceAdvisor ),
75+ IsRealtimePerformancePanelEnabled : cli .ReturnValueForSetting (opts .enableRealtimePerformancePanel , opts .disableRealtimePerformancePanel ),
76+ IsSchemaAdvisorEnabled : cli .ReturnValueForSetting (opts .enableSchemaAdvisor , opts .disableSchemaAdvisor ),
7177 }
7278}
7379
@@ -107,6 +113,14 @@ func UpdateBuilder() *cobra.Command {
107113 cmd .Flags ().BoolVarP (& opts .disableDataExplorer , flag .DisableDataExplorer , "" , false , usage .DisableDataExplorer )
108114 cmd .MarkFlagsMutuallyExclusive (flag .EnableDataExplorer , flag .DisableDataExplorer )
109115
116+ cmd .Flags ().BoolVarP (& opts .enableDataExplorerGenAIFeatures , flag .EnableDataExplorerGenAIFeatures , "" , false , usage .EnableDataExplorerGenAIFeatures )
117+ cmd .Flags ().BoolVarP (& opts .disableDataExplorerGenAIFeatures , flag .DisableDataExplorerGenAIFeatures , "" , false , usage .DisableDataExplorerGenAIFeatures )
118+ cmd .MarkFlagsMutuallyExclusive (flag .EnableDataExplorerGenAIFeatures , flag .DisableDataExplorerGenAIFeatures )
119+
120+ cmd .Flags ().BoolVarP (& opts .enableDataExplorerGenAISampleDocumentPassing , flag .EnableDataExplorerGenAISampleDocumentPassing , "" , false , usage .EnableDataExplorerGenAISampleDocumentPassing )
121+ cmd .Flags ().BoolVarP (& opts .disableDataExplorerGenAISampleDocumentPassing , flag .DisableDataExplorerGenAISampleDocumentPassing , "" , false , usage .DisableDataExplorerGenAISampleDocumentPassing )
122+ cmd .MarkFlagsMutuallyExclusive (flag .EnableDataExplorerGenAISampleDocumentPassing , flag .DisableDataExplorerGenAISampleDocumentPassing )
123+
110124 cmd .Flags ().BoolVarP (& opts .enablePerformanceAdvisor , flag .EnablePerformanceAdvisor , "" , false , usage .EnablePerformanceAdvisor )
111125 cmd .Flags ().BoolVarP (& opts .disablePerformanceAdvisor , flag .DisablePerformanceAdvisor , "" , false , usage .DisablePerformanceAdvisor )
112126 cmd .MarkFlagsMutuallyExclusive (flag .EnablePerformanceAdvisor , flag .DisablePerformanceAdvisor )
0 commit comments