1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-10 15:47:32 +00:00

Merge branch 'remove-dashboards-feature-flag' into 'develop'

Remove dashboard feature flag

See merge request 
This commit is contained in:
Petr Stribny 2025-03-13 09:43:32 +00:00
commit f870926221
7 changed files with 96 additions and 104 deletions
backend/src/baserow
contrib/dashboard
core
changelog/entries/unreleased/feature
enterprise
backend/src/baserow_enterprise
web-frontend/modules/baserow_enterprise
web-frontend/modules
core/plugins
dashboard

View file

@ -1,7 +1,5 @@
from django.apps import AppConfig from django.apps import AppConfig
from baserow.core.feature_flags import FF_DASHBOARDS, feature_flag_is_enabled
class DashboardConfig(AppConfig): class DashboardConfig(AppConfig):
name = "baserow.contrib.dashboard" name = "baserow.contrib.dashboard"
@ -18,105 +16,102 @@ class DashboardConfig(AppConfig):
from .application_types import DashboardApplicationType from .application_types import DashboardApplicationType
if feature_flag_is_enabled(FF_DASHBOARDS): application_type_registry.register(DashboardApplicationType())
application_type_registry.register(DashboardApplicationType())
from baserow.contrib.dashboard.object_scopes import DashboardObjectScopeType from baserow.contrib.dashboard.object_scopes import DashboardObjectScopeType
object_scope_type_registry.register(DashboardObjectScopeType()) object_scope_type_registry.register(DashboardObjectScopeType())
from baserow.contrib.dashboard.data_sources.object_scopes import ( from baserow.contrib.dashboard.data_sources.object_scopes import (
DashboardDataSourceObjectScopeType, DashboardDataSourceObjectScopeType,
) )
object_scope_type_registry.register(DashboardDataSourceObjectScopeType()) object_scope_type_registry.register(DashboardDataSourceObjectScopeType())
from baserow.contrib.dashboard.widgets.object_scopes import ( from baserow.contrib.dashboard.widgets.object_scopes import (
WidgetObjectScopeType, WidgetObjectScopeType,
) )
object_scope_type_registry.register(WidgetObjectScopeType()) object_scope_type_registry.register(WidgetObjectScopeType())
from baserow.contrib.dashboard.widgets.operations import ( from baserow.contrib.dashboard.widgets.operations import (
CreateWidgetOperationType, CreateWidgetOperationType,
DeleteWidgetOperationType, DeleteWidgetOperationType,
ListWidgetsOperationType, ListWidgetsOperationType,
ReadWidgetOperationType, ReadWidgetOperationType,
RestoreWidgetOperationType, RestoreWidgetOperationType,
UpdateWidgetOperationType, UpdateWidgetOperationType,
) )
operation_type_registry.register(ListWidgetsOperationType()) operation_type_registry.register(ListWidgetsOperationType())
operation_type_registry.register(ReadWidgetOperationType()) operation_type_registry.register(ReadWidgetOperationType())
operation_type_registry.register(CreateWidgetOperationType()) operation_type_registry.register(CreateWidgetOperationType())
operation_type_registry.register(UpdateWidgetOperationType()) operation_type_registry.register(UpdateWidgetOperationType())
operation_type_registry.register(DeleteWidgetOperationType()) operation_type_registry.register(DeleteWidgetOperationType())
operation_type_registry.register(RestoreWidgetOperationType()) operation_type_registry.register(RestoreWidgetOperationType())
from baserow.contrib.dashboard.data_sources.operations import ( from baserow.contrib.dashboard.data_sources.operations import (
CreateDashboardDataSourceOperationType, CreateDashboardDataSourceOperationType,
DeleteDashboardDataSourceOperationType, DeleteDashboardDataSourceOperationType,
DispatchDashboardDataSourceOperationType, DispatchDashboardDataSourceOperationType,
ListDashboardDataSourcesOperationType, ListDashboardDataSourcesOperationType,
ReadDashboardDataSourceOperationType, ReadDashboardDataSourceOperationType,
UpdateDashboardDataSourceOperationType, UpdateDashboardDataSourceOperationType,
) )
operation_type_registry.register(ListDashboardDataSourcesOperationType()) operation_type_registry.register(ListDashboardDataSourcesOperationType())
operation_type_registry.register(CreateDashboardDataSourceOperationType()) operation_type_registry.register(CreateDashboardDataSourceOperationType())
operation_type_registry.register(DeleteDashboardDataSourceOperationType()) operation_type_registry.register(DeleteDashboardDataSourceOperationType())
operation_type_registry.register(UpdateDashboardDataSourceOperationType()) operation_type_registry.register(UpdateDashboardDataSourceOperationType())
operation_type_registry.register(ReadDashboardDataSourceOperationType()) operation_type_registry.register(ReadDashboardDataSourceOperationType())
operation_type_registry.register(DispatchDashboardDataSourceOperationType()) operation_type_registry.register(DispatchDashboardDataSourceOperationType())
from baserow.contrib.dashboard.widgets.registries import ( from baserow.contrib.dashboard.widgets.registries import widget_type_registry
widget_type_registry, from baserow.contrib.dashboard.widgets.widget_types import SummaryWidgetType
)
from baserow.contrib.dashboard.widgets.widget_types import SummaryWidgetType
widget_type_registry.register(SummaryWidgetType()) widget_type_registry.register(SummaryWidgetType())
from baserow.contrib.dashboard.widgets.trash_types import ( from baserow.contrib.dashboard.widgets.trash_types import (
WidgetTrashableItemType, WidgetTrashableItemType,
) )
trash_item_type_registry.register(WidgetTrashableItemType()) trash_item_type_registry.register(WidgetTrashableItemType())
from .ws.pages import DashboardPageType from .ws.pages import DashboardPageType
page_registry.register(DashboardPageType()) page_registry.register(DashboardPageType())
from baserow.core.registries import permission_manager_type_registry from baserow.core.registries import permission_manager_type_registry
from .permission_manager import AllowIfTemplatePermissionManagerType from .permission_manager import AllowIfTemplatePermissionManagerType
prev_manager = permission_manager_type_registry.get( prev_manager = permission_manager_type_registry.get(
AllowIfTemplatePermissionManagerType.type AllowIfTemplatePermissionManagerType.type
) )
permission_manager_type_registry.unregister( permission_manager_type_registry.unregister(
AllowIfTemplatePermissionManagerType.type AllowIfTemplatePermissionManagerType.type
) )
permission_manager_type_registry.register( permission_manager_type_registry.register(
AllowIfTemplatePermissionManagerType(prev_manager) AllowIfTemplatePermissionManagerType(prev_manager)
) )
from baserow.contrib.dashboard.data_sources.actions import ( from baserow.contrib.dashboard.data_sources.actions import (
UpdateDashboardDataSourceActionType, UpdateDashboardDataSourceActionType,
) )
from baserow.contrib.dashboard.widgets.actions import ( from baserow.contrib.dashboard.widgets.actions import (
CreateWidgetActionType, CreateWidgetActionType,
DeleteWidgetActionType, DeleteWidgetActionType,
UpdateWidgetActionType, UpdateWidgetActionType,
) )
from .ws.receivers import ( # noqa: F401 from .ws.receivers import ( # noqa: F401
dashboard_data_source_updated, dashboard_data_source_updated,
widget_created, widget_created,
widget_deleted, widget_deleted,
widget_updated, widget_updated,
) )
action_type_registry.register(CreateWidgetActionType()) action_type_registry.register(CreateWidgetActionType())
action_type_registry.register(UpdateWidgetActionType()) action_type_registry.register(UpdateWidgetActionType())
action_type_registry.register(DeleteWidgetActionType()) action_type_registry.register(DeleteWidgetActionType())
action_type_registry.register(UpdateDashboardDataSourceActionType()) action_type_registry.register(UpdateDashboardDataSourceActionType())

View file

@ -2,7 +2,6 @@ from django.conf import settings
from baserow.core.exceptions import FeatureDisabledException from baserow.core.exceptions import FeatureDisabledException
FF_DASHBOARDS = "dashboards"
FF_ENABLE_ALL = "*" FF_ENABLE_ALL = "*"

View file

@ -0,0 +1,8 @@
{
"type": "feature",
"message": "Introduce dashboards with summary and chart widgets",
"domain": "dashboard",
"issue_number": 2206,
"bullet_points": [],
"created_at": "2025-03-13"
}

View file

@ -3,8 +3,6 @@ from django.db.models.signals import post_migrate
from tqdm import tqdm from tqdm import tqdm
from baserow.core.feature_flags import FF_DASHBOARDS, feature_flag_is_enabled
class BaserowEnterpriseConfig(AppConfig): class BaserowEnterpriseConfig(AppConfig):
name = "baserow_enterprise" name = "baserow_enterprise"
@ -263,11 +261,10 @@ class BaserowEnterpriseConfig(AppConfig):
LocalBaserowGroupedAggregateRowsUserServiceType, LocalBaserowGroupedAggregateRowsUserServiceType,
) )
if feature_flag_is_enabled(FF_DASHBOARDS): service_type_registry.register(
service_type_registry.register( LocalBaserowGroupedAggregateRowsUserServiceType()
LocalBaserowGroupedAggregateRowsUserServiceType() )
) widget_type_registry.register(ChartWidgetType())
widget_type_registry.register(ChartWidgetType())
from baserow.contrib.builder.elements.registries import element_type_registry from baserow.contrib.builder.elements.registries import element_type_registry
from baserow_enterprise.builder.elements.element_types import ( from baserow_enterprise.builder.elements.element_types import (

View file

@ -85,7 +85,6 @@ import {
PhoneNumberFieldType, PhoneNumberFieldType,
AutonumberFieldType, AutonumberFieldType,
} from '@baserow/modules/database/fieldTypes' } from '@baserow/modules/database/fieldTypes'
import { FF_DASHBOARDS } from '@baserow/modules/core/plugins/featureFlags'
export default (context) => { export default (context) => {
const { app, isDev, store } = context const { app, isDev, store } = context
@ -302,11 +301,9 @@ export default (context) => {
new PeriodicIntervalFieldsConfigureDataSyncType(context) new PeriodicIntervalFieldsConfigureDataSyncType(context)
) )
if (app.$featureFlagIsEnabled(FF_DASHBOARDS)) { app.$registry.register('dashboardWidget', new ChartWidgetType(context))
app.$registry.register('dashboardWidget', new ChartWidgetType(context)) app.$registry.register(
app.$registry.register( 'chartFieldFormatting',
'chartFieldFormatting', new SingleSelectFormattingType(context)
new SingleSelectFormattingType(context) )
)
}
} }

View file

@ -1,5 +1,4 @@
const FF_ENABLE_ALL = '*' const FF_ENABLE_ALL = '*'
export const FF_DASHBOARDS = 'dashboards'
/** /**
* A comma separated list of feature flags used to enable in-progress or not ready * A comma separated list of feature flags used to enable in-progress or not ready

View file

@ -11,7 +11,6 @@ import { registerRealtimeEvents } from '@baserow/modules/dashboard/realtime'
import { DashboardApplicationType } from '@baserow/modules/dashboard/applicationTypes' import { DashboardApplicationType } from '@baserow/modules/dashboard/applicationTypes'
import { SummaryWidgetType } from '@baserow/modules/dashboard/widgetTypes' import { SummaryWidgetType } from '@baserow/modules/dashboard/widgetTypes'
import dashboardApplicationStore from '@baserow/modules/dashboard/store/dashboardApplication' import dashboardApplicationStore from '@baserow/modules/dashboard/store/dashboardApplication'
import { FF_DASHBOARDS } from '@baserow/modules/core/plugins/featureFlags'
export default (context) => { export default (context) => {
const { app, isDev, store } = context const { app, isDev, store } = context
@ -37,8 +36,6 @@ export default (context) => {
dashboardApplicationStore dashboardApplicationStore
) )
if (app.$featureFlagIsEnabled(FF_DASHBOARDS)) { app.$registry.register('application', new DashboardApplicationType(context))
app.$registry.register('application', new DashboardApplicationType(context)) app.$registry.register('dashboardWidget', new SummaryWidgetType(context))
app.$registry.register('dashboardWidget', new SummaryWidgetType(context))
}
} }