Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions docs/command/atlas-projects-settings-describe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ If the command succeeds, the CLI returns output similar to the following sample.

.. code-block::

COLLECT DATABASE SPECIFICS STATISTICS ENABLED DATA EXPLORER ENABLED PERFORMANCE ADVISOR ENABLED REALTIME PERFORMANCE PANEL ENABLED SCHEMA ADVISOR ENABLED
<IsCollectDatabaseSpecificsStatisticsEnabled> <IsDataExplorerEnabled> <IsPerformanceAdvisorEnabled> <IsRealtimePerformancePanelEnabled> <IsSchemaAdvisorEnabled>
COLLECT DATABASE SPECIFICS STATISTICS ENABLED DATA EXPLORER ENABLED DATA EXPLORER GEN AI FEATURES ENABLED DATA EXPLORER GEN AI SAMPLE DOCUMENT PASSING ENABLED PERFORMANCE ADVISOR ENABLED REALTIME PERFORMANCE PANEL ENABLED SCHEMA ADVISOR ENABLED
<IsCollectDatabaseSpecificsStatisticsEnabled> <IsDataExplorerEnabled> <IsDataExplorerGenAIFeaturesEnabled> <IsDataExplorerGenAISampleDocumentPassingEnabled> <IsPerformanceAdvisorEnabled> <IsRealtimePerformancePanelEnabled> <IsSchemaAdvisorEnabled>


Examples
Expand Down
24 changes: 24 additions & 0 deletions docs/command/atlas-projects-settings-update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ Options
- Flag that disables the Data Explorer project setting.

Mutually exclusive with --enableDataExplorer.
* - --disableDataExplorerGenAIFeatures
-
- false
- Flag that disables the Data Explorer GenAI Features project setting.

Mutually exclusive with --enableDataExplorerGenAIFeatures.
* - --disableDataExplorerGenAISampleDocumentPassing
-
- false
- Flag that disables the Data Explorer GenAI Sample Document Passing project setting.

Mutually exclusive with --enableDataExplorerGenAISampleDocumentPassing.
* - --disablePerformanceAdvisor
-
- false
Expand Down Expand Up @@ -77,6 +89,18 @@ Options
- Flag that enables the Data Explorer project setting.

Mutually exclusive with --disableDataExplorer.
* - --enableDataExplorerGenAIFeatures
-
- false
- Flag that enables the Data Explorer GenAI Features project setting.

Mutually exclusive with --disableDataExplorerGenAIFeatures.
* - --enableDataExplorerGenAISampleDocumentPassing
-
- false
- Flag that enables the Data Explorer GenAI Features project setting.

Mutually exclusive with --disableDataExplorerGenAISampleDocumentPassing.
* - --enablePerformanceAdvisor
-
- false
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/projects/settings/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func (opts *DescribeOpts) initStore(ctx context.Context) func() error {
}
}

var describeTemplate = `COLLECT DATABASE SPECIFICS STATISTICS ENABLED DATA EXPLORER ENABLED PERFORMANCE ADVISOR ENABLED REALTIME PERFORMANCE PANEL ENABLED SCHEMA ADVISOR ENABLED
{{.IsCollectDatabaseSpecificsStatisticsEnabled}} {{.IsDataExplorerEnabled}} {{.IsPerformanceAdvisorEnabled}} {{.IsRealtimePerformancePanelEnabled}} {{.IsSchemaAdvisorEnabled}}
var describeTemplate = `COLLECT DATABASE SPECIFICS STATISTICS ENABLED DATA EXPLORER ENABLED DATA EXPLORER GEN AI FEATURES ENABLED DATA EXPLORER GEN AI SAMPLE DOCUMENT PASSING ENABLED PERFORMANCE ADVISOR ENABLED REALTIME PERFORMANCE PANEL ENABLED SCHEMA ADVISOR ENABLED
{{.IsCollectDatabaseSpecificsStatisticsEnabled}} {{.IsDataExplorerEnabled}} {{.IsDataExplorerGenAIFeaturesEnabled}} {{.IsDataExplorerGenAISampleDocumentPassingEnabled}} {{.IsPerformanceAdvisorEnabled}} {{.IsRealtimePerformancePanelEnabled}} {{.IsSchemaAdvisorEnabled}}
`

func (opts *DescribeOpts) Run() error {
Expand Down
46 changes: 30 additions & 16 deletions internal/cli/projects/settings/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,21 @@ const updateTemplate = "Project settings updated.\n"
type UpdateOpts struct {
cli.ProjectOpts
cli.OutputOpts
store store.ProjectSettingsUpdater
enableCollectDatabaseSpecificsStatistics bool
disableCollectDatabaseSpecificsStatistics bool
enableDataExplorer bool
disableDataExplorer bool
enablePerformanceAdvisor bool
disablePerformanceAdvisor bool
enableSchemaAdvisor bool
disableSchemaAdvisor bool
enableRealtimePerformancePanel bool
disableRealtimePerformancePanel bool
store store.ProjectSettingsUpdater
enableCollectDatabaseSpecificsStatistics bool
disableCollectDatabaseSpecificsStatistics bool
enableDataExplorer bool
disableDataExplorer bool
enableDataExplorerGenAIFeatures bool
disableDataExplorerGenAIFeatures bool
enableDataExplorerGenAISampleDocumentPassing bool
disableDataExplorerGenAISampleDocumentPassing bool
enablePerformanceAdvisor bool
disablePerformanceAdvisor bool
enableSchemaAdvisor bool
disableSchemaAdvisor bool
enableRealtimePerformancePanel bool
disableRealtimePerformancePanel bool
}

func (opts *UpdateOpts) initStore(ctx context.Context) func() error {
Expand All @@ -63,11 +67,13 @@ func (opts *UpdateOpts) Run() error {

func (opts *UpdateOpts) newProjectSettings() *atlasv2.GroupSettings {
return &atlasv2.GroupSettings{
IsCollectDatabaseSpecificsStatisticsEnabled: cli.ReturnValueForSetting(opts.enableCollectDatabaseSpecificsStatistics, opts.disableCollectDatabaseSpecificsStatistics),
IsDataExplorerEnabled: cli.ReturnValueForSetting(opts.enableDataExplorer, opts.disableDataExplorer),
IsPerformanceAdvisorEnabled: cli.ReturnValueForSetting(opts.enablePerformanceAdvisor, opts.disablePerformanceAdvisor),
IsRealtimePerformancePanelEnabled: cli.ReturnValueForSetting(opts.enableRealtimePerformancePanel, opts.disableRealtimePerformancePanel),
IsSchemaAdvisorEnabled: cli.ReturnValueForSetting(opts.enableSchemaAdvisor, opts.disableSchemaAdvisor),
IsCollectDatabaseSpecificsStatisticsEnabled: cli.ReturnValueForSetting(opts.enableCollectDatabaseSpecificsStatistics, opts.disableCollectDatabaseSpecificsStatistics),
IsDataExplorerEnabled: cli.ReturnValueForSetting(opts.enableDataExplorer, opts.disableDataExplorer),
IsDataExplorerGenAIFeaturesEnabled: cli.ReturnValueForSetting(opts.enableDataExplorerGenAIFeatures, opts.disableDataExplorerGenAIFeatures),
IsDataExplorerGenAISampleDocumentPassingEnabled: cli.ReturnValueForSetting(opts.enableDataExplorerGenAISampleDocumentPassing, opts.disableDataExplorerGenAISampleDocumentPassing),
IsPerformanceAdvisorEnabled: cli.ReturnValueForSetting(opts.enablePerformanceAdvisor, opts.disablePerformanceAdvisor),
IsRealtimePerformancePanelEnabled: cli.ReturnValueForSetting(opts.enableRealtimePerformancePanel, opts.disableRealtimePerformancePanel),
IsSchemaAdvisorEnabled: cli.ReturnValueForSetting(opts.enableSchemaAdvisor, opts.disableSchemaAdvisor),
}
}

Expand Down Expand Up @@ -107,6 +113,14 @@ func UpdateBuilder() *cobra.Command {
cmd.Flags().BoolVarP(&opts.disableDataExplorer, flag.DisableDataExplorer, "", false, usage.DisableDataExplorer)
cmd.MarkFlagsMutuallyExclusive(flag.EnableDataExplorer, flag.DisableDataExplorer)

cmd.Flags().BoolVarP(&opts.enableDataExplorerGenAIFeatures, flag.EnableDataExplorerGenAIFeatures, "", false, usage.EnableDataExplorerGenAIFeatures)
cmd.Flags().BoolVarP(&opts.disableDataExplorerGenAIFeatures, flag.DisableDataExplorerGenAIFeatures, "", false, usage.DisableDataExplorerGenAIFeatures)
cmd.MarkFlagsMutuallyExclusive(flag.EnableDataExplorerGenAIFeatures, flag.DisableDataExplorerGenAIFeatures)

cmd.Flags().BoolVarP(&opts.enableDataExplorerGenAISampleDocumentPassing, flag.EnableDataExplorerGenAISampleDocumentPassing, "", false, usage.EnableDataExplorerGenAISampleDocumentPassing)
cmd.Flags().BoolVarP(&opts.disableDataExplorerGenAISampleDocumentPassing, flag.DisableDataExplorerGenAISampleDocumentPassing, "", false, usage.DisableDataExplorerGenAISampleDocumentPassing)
cmd.MarkFlagsMutuallyExclusive(flag.EnableDataExplorerGenAISampleDocumentPassing, flag.DisableDataExplorerGenAISampleDocumentPassing)

cmd.Flags().BoolVarP(&opts.enablePerformanceAdvisor, flag.EnablePerformanceAdvisor, "", false, usage.EnablePerformanceAdvisor)
cmd.Flags().BoolVarP(&opts.disablePerformanceAdvisor, flag.DisablePerformanceAdvisor, "", false, usage.DisablePerformanceAdvisor)
cmd.MarkFlagsMutuallyExclusive(flag.EnablePerformanceAdvisor, flag.DisablePerformanceAdvisor)
Expand Down
Loading