1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-04 21:25:24 +00:00

Remove dashboard feature flag

This commit is contained in:
Petr Stribny 2025-03-13 09:43:31 +00:00
parent 18372b18dd
commit 38182ed539
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 baserow.core.feature_flags import FF_DASHBOARDS, feature_flag_is_enabled
class DashboardConfig(AppConfig):
name = "baserow.contrib.dashboard"
@ -18,105 +16,102 @@ class DashboardConfig(AppConfig):
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 (
DashboardDataSourceObjectScopeType,
)
from baserow.contrib.dashboard.data_sources.object_scopes import (
DashboardDataSourceObjectScopeType,
)
object_scope_type_registry.register(DashboardDataSourceObjectScopeType())
object_scope_type_registry.register(DashboardDataSourceObjectScopeType())
from baserow.contrib.dashboard.widgets.object_scopes import (
WidgetObjectScopeType,
)
from baserow.contrib.dashboard.widgets.object_scopes import (
WidgetObjectScopeType,
)
object_scope_type_registry.register(WidgetObjectScopeType())
object_scope_type_registry.register(WidgetObjectScopeType())
from baserow.contrib.dashboard.widgets.operations import (
CreateWidgetOperationType,
DeleteWidgetOperationType,
ListWidgetsOperationType,
ReadWidgetOperationType,
RestoreWidgetOperationType,
UpdateWidgetOperationType,
)
from baserow.contrib.dashboard.widgets.operations import (
CreateWidgetOperationType,
DeleteWidgetOperationType,
ListWidgetsOperationType,
ReadWidgetOperationType,
RestoreWidgetOperationType,
UpdateWidgetOperationType,
)
operation_type_registry.register(ListWidgetsOperationType())
operation_type_registry.register(ReadWidgetOperationType())
operation_type_registry.register(CreateWidgetOperationType())
operation_type_registry.register(UpdateWidgetOperationType())
operation_type_registry.register(DeleteWidgetOperationType())
operation_type_registry.register(RestoreWidgetOperationType())
operation_type_registry.register(ListWidgetsOperationType())
operation_type_registry.register(ReadWidgetOperationType())
operation_type_registry.register(CreateWidgetOperationType())
operation_type_registry.register(UpdateWidgetOperationType())
operation_type_registry.register(DeleteWidgetOperationType())
operation_type_registry.register(RestoreWidgetOperationType())
from baserow.contrib.dashboard.data_sources.operations import (
CreateDashboardDataSourceOperationType,
DeleteDashboardDataSourceOperationType,
DispatchDashboardDataSourceOperationType,
ListDashboardDataSourcesOperationType,
ReadDashboardDataSourceOperationType,
UpdateDashboardDataSourceOperationType,
)
from baserow.contrib.dashboard.data_sources.operations import (
CreateDashboardDataSourceOperationType,
DeleteDashboardDataSourceOperationType,
DispatchDashboardDataSourceOperationType,
ListDashboardDataSourcesOperationType,
ReadDashboardDataSourceOperationType,
UpdateDashboardDataSourceOperationType,
)
operation_type_registry.register(ListDashboardDataSourcesOperationType())
operation_type_registry.register(CreateDashboardDataSourceOperationType())
operation_type_registry.register(DeleteDashboardDataSourceOperationType())
operation_type_registry.register(UpdateDashboardDataSourceOperationType())
operation_type_registry.register(ReadDashboardDataSourceOperationType())
operation_type_registry.register(DispatchDashboardDataSourceOperationType())
operation_type_registry.register(ListDashboardDataSourcesOperationType())
operation_type_registry.register(CreateDashboardDataSourceOperationType())
operation_type_registry.register(DeleteDashboardDataSourceOperationType())
operation_type_registry.register(UpdateDashboardDataSourceOperationType())
operation_type_registry.register(ReadDashboardDataSourceOperationType())
operation_type_registry.register(DispatchDashboardDataSourceOperationType())
from baserow.contrib.dashboard.widgets.registries import (
widget_type_registry,
)
from baserow.contrib.dashboard.widgets.widget_types import SummaryWidgetType
from baserow.contrib.dashboard.widgets.registries import widget_type_registry
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 (
WidgetTrashableItemType,
)
from baserow.contrib.dashboard.widgets.trash_types import (
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(
AllowIfTemplatePermissionManagerType.type
)
permission_manager_type_registry.unregister(
AllowIfTemplatePermissionManagerType.type
)
permission_manager_type_registry.register(
AllowIfTemplatePermissionManagerType(prev_manager)
)
prev_manager = permission_manager_type_registry.get(
AllowIfTemplatePermissionManagerType.type
)
permission_manager_type_registry.unregister(
AllowIfTemplatePermissionManagerType.type
)
permission_manager_type_registry.register(
AllowIfTemplatePermissionManagerType(prev_manager)
)
from baserow.contrib.dashboard.data_sources.actions import (
UpdateDashboardDataSourceActionType,
)
from baserow.contrib.dashboard.widgets.actions import (
CreateWidgetActionType,
DeleteWidgetActionType,
UpdateWidgetActionType,
)
from baserow.contrib.dashboard.data_sources.actions import (
UpdateDashboardDataSourceActionType,
)
from baserow.contrib.dashboard.widgets.actions import (
CreateWidgetActionType,
DeleteWidgetActionType,
UpdateWidgetActionType,
)
from .ws.receivers import ( # noqa: F401
dashboard_data_source_updated,
widget_created,
widget_deleted,
widget_updated,
)
from .ws.receivers import ( # noqa: F401
dashboard_data_source_updated,
widget_created,
widget_deleted,
widget_updated,
)
action_type_registry.register(CreateWidgetActionType())
action_type_registry.register(UpdateWidgetActionType())
action_type_registry.register(DeleteWidgetActionType())
action_type_registry.register(UpdateDashboardDataSourceActionType())
action_type_registry.register(CreateWidgetActionType())
action_type_registry.register(UpdateWidgetActionType())
action_type_registry.register(DeleteWidgetActionType())
action_type_registry.register(UpdateDashboardDataSourceActionType())

View file

@ -2,7 +2,6 @@ from django.conf import settings
from baserow.core.exceptions import FeatureDisabledException
FF_DASHBOARDS = "dashboards"
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 baserow.core.feature_flags import FF_DASHBOARDS, feature_flag_is_enabled
class BaserowEnterpriseConfig(AppConfig):
name = "baserow_enterprise"
@ -263,11 +261,10 @@ class BaserowEnterpriseConfig(AppConfig):
LocalBaserowGroupedAggregateRowsUserServiceType,
)
if feature_flag_is_enabled(FF_DASHBOARDS):
service_type_registry.register(
LocalBaserowGroupedAggregateRowsUserServiceType()
)
widget_type_registry.register(ChartWidgetType())
service_type_registry.register(
LocalBaserowGroupedAggregateRowsUserServiceType()
)
widget_type_registry.register(ChartWidgetType())
from baserow.contrib.builder.elements.registries import element_type_registry
from baserow_enterprise.builder.elements.element_types import (

View file

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

View file

@ -1,5 +1,4 @@
const FF_ENABLE_ALL = '*'
export const FF_DASHBOARDS = 'dashboards'
/**
* 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 { SummaryWidgetType } from '@baserow/modules/dashboard/widgetTypes'
import dashboardApplicationStore from '@baserow/modules/dashboard/store/dashboardApplication'
import { FF_DASHBOARDS } from '@baserow/modules/core/plugins/featureFlags'
export default (context) => {
const { app, isDev, store } = context
@ -37,8 +36,6 @@ export default (context) => {
dashboardApplicationStore
)
if (app.$featureFlagIsEnabled(FF_DASHBOARDS)) {
app.$registry.register('application', new DashboardApplicationType(context))
app.$registry.register('dashboardWidget', new SummaryWidgetType(context))
}
app.$registry.register('application', new DashboardApplicationType(context))
app.$registry.register('dashboardWidget', new SummaryWidgetType(context))
}