Comments (2)
Hey @nemccarthy! I'm here to help you with any bugs or questions you have regarding Superset. Let's squash those bugs together!
I found a similar unsolved discussion that might be relevant to your issue: Embedded dashboard: hide edit chart title link, which was last updated on 2024-09-04 [1].
To hide the username and last modified timestamp in the dashboard header for the embedded use case in Superset version 4.1.0rc2, you need to modify the titlePanelAdditionalItems
array in the render
method of the Header
component. Specifically, you should remove the MetadataBar
component from this array.
Here is the relevant part of the code with the MetadataBar
component removed:
return (
<div
css={headerContainerStyle}
data-test="dashboard-header-container"
data-test-id={dashboardInfo.id}
className="dashboard-header-container"
>
<PageHeaderWithActions
editableTitleProps={{
title: dashboardTitle,
canEdit: userCanEdit && editMode,
onSave: this.handleChangeText,
placeholder: t('Add the name of the dashboard'),
label: t('Dashboard title'),
showTooltip: false,
}}
certificatiedBadgeProps={{
certifiedBy: dashboardInfo.certified_by,
details: dashboardInfo.certification_details,
}}
faveStarProps={{
itemId: dashboardInfo.id,
fetchFaveStar: this.props.fetchFaveStar,
saveFaveStar: this.props.saveFaveStar,
isStarred: this.props.isStarred,
showTooltip: true,
}}
titlePanelAdditionalItems={[
!editMode && (
<PublishedStatus
dashboardId={dashboardInfo.id}
isPublished={isPublished}
savePublished={this.props.savePublished}
canEdit={userCanEdit}
canSave={userCanSaveAs}
visible={!editMode}
/>
),
// Remove the MetadataBar component to hide username and last modified timestamp
]}
rightPanelAdditionalItems={
<div className="button-container">
{userCanSaveAs && (
<div
className="button-container"
data-test="dashboard-edit-actions"
>
{editMode && (
<div css={actionButtonsStyle}>
<div className="undoRedo">
<Tooltip
id="dashboard-undo-tooltip"
title={t('Undo the action')}
>
<StyledUndoRedoButton
type="text"
disabled={undoLength < 1}
onClick={undoLength && onUndo}
>
<Icons.Undo
css={[
undoRedoStyle,
this.state.emphasizeUndo && undoRedoEmphasized,
undoLength < 1 && undoRedoDisabled,
]}
data-test="undo-action"
iconSize="xl"
/>
</StyledUndoRedoButton>
</Tooltip>
<Tooltip
id="dashboard-redo-tooltip"
title={t('Redo the action')}
>
<StyledUndoRedoButton
type="text"
disabled={redoLength < 1}
onClick={redoLength && onRedo}
>
<Icons.Redo
css={[
undoRedoStyle,
this.state.emphasizeRedo && undoRedoEmphasized,
redoLength < 1 && undoRedoDisabled,
]}
data-test="redo-action"
iconSize="xl"
/>
</StyledUndoRedoButton>
</Tooltip>
</div>
<Button
css={discardBtnStyle}
buttonSize="small"
onClick={this.constructor.discardChanges}
buttonStyle="default"
data-test="discard-changes-button"
aria-label={t('Discard')}
>
{t('Discard')}
</Button>
<Button
css={saveBtnStyle}
buttonSize="small"
disabled={!hasUnsavedChanges}
buttonStyle="primary"
onClick={this.overwriteDashboard}
data-test="header-save-button"
aria-label={t('Save')}
>
{t('Save')}
</Button>
</div>
)}
</div>
)}
{editMode ? (
<UndoRedoKeyListeners
onUndo={this.handleCtrlZ}
onRedo={this.handleCtrlY}
/>
) : (
<div css={actionButtonsStyle}>
{NavExtension && <NavExtension />}
{userCanEdit && (
<Button
buttonStyle="secondary"
onClick={this.toggleEditMode}
data-test="edit-dashboard-button"
className="action-button"
css={editButtonStyle}
aria-label={t('Edit dashboard')}
>
{t('Edit dashboard')}
</Button>
)}
</div>
)}
</div>
}
menuDropdownProps={{
getPopupContainer: triggerNode =>
triggerNode.closest('.header-with-actions'),
visible: this.state.isDropdownVisible,
onVisibleChange: this.setIsDropdownVisible,
}}
additionalActionsMenu={
<ConnectedHeaderActionsDropdown
addSuccessToast={this.props.addSuccessToast}
addDangerToast={this.props.addDangerToast}
dashboardId={dashboardInfo.id}
dashboardTitle={dashboardTitle}
dashboardInfo={dashboardInfo}
dataMask={dataMask}
layout={layout}
expandedSlices={expandedSlices}
customCss={customCss}
colorNamespace={colorNamespace}
colorScheme={colorScheme}
onSave={onSave}
onChange={onChange}
forceRefreshAllCharts={this.forceRefresh}
startPeriodicRender={this.startPeriodicRender}
refreshFrequency={refreshFrequency}
shouldPersistRefreshFrequency={shouldPersistRefreshFrequency}
setRefreshFrequency={setRefreshFrequency}
updateCss={updateCss}
editMode={editMode}
hasUnsavedChanges={hasUnsavedChanges}
userCanEdit={userCanEdit}
userCanShare={userCanShare}
userCanSave={userCanSaveAs}
userCanCurate={userCanCurate}
isLoading={isLoading}
showPropertiesModal={this.showPropertiesModal}
manageEmbedded={this.showEmbedModal}
refreshLimit={refreshLimit}
refreshWarning={refreshWarning}
lastModifiedTime={lastModifiedTime}
isDropdownVisible={this.state.isDropdownVisible}
setIsDropdownVisible={this.setIsDropdownVisible}
logEvent={logEvent}
/>
}
showFaveStar={user?.userId && dashboardInfo?.id}
showTitlePanelItems
/>
{this.state.showingPropertiesModal && (
<PropertiesModal
dashboardId={dashboardInfo.id}
dashboardInfo={dashboardInfo}
dashboardTitle={dashboardTitle}
show={this.state.showingPropertiesModal}
onHide={this.hidePropertiesModal}
colorScheme={this.props.colorScheme}
onSubmit={handleOnPropertiesChange}
onlyApply
/>
)}
{userCanCurate && (
<DashboardEmbedModal
show={this.state.showingEmbedModal}
onHide={this.hideEmbedModal}
dashboardId={dashboardInfo.id}
/>
)}
<Global
styles={css`
.ant-menu-vertical {
border-right: none;
}
`}
/>
</div>
);
By removing the MetadataBar
component, the username and last modified timestamp will no longer be displayed in the dashboard header [2].
To continue talking to Dosu, mention @dosu.
from superset.
Looks like npm run lint-fix
might solve a lot of the CI problems :)
from superset.
Related Issues (20)
- SuperSet Database connection is successfully established but not able to get the tables under a specific schema HOT 6
- Annotation formula on chart does not work for values above 1*10^15 (peta) HOT 1
- I'm getting ERROR:flask_migrate:Error while upgrading. HOT 6
- [4.1.0rc2] sqlalchemy InvalidRequestError: This nested transaction is inactive when trying to activate embedding on a dashboard HOT 1
- Superset 4.1 with Pinot not aggregating epoch_ms timestamps correctly HOT 1
- Bangladesh is missing in country map dropdown selection for Country Map Chart HOT 2
- Server Pagination Sort Only Sorts Loaded Rows - Table HOT 1
- Drill-by alert "Failed to load dimensions for drill by" using Gamma role HOT 2
- The end date on the filter panel of the dashboard is failing to capture the current data. HOT 1
- Data Zoom should be fixed scrolling on the dashboard HOT 1
- Bar Chart sorting does not appear to work HOT 2
- DB ERROR HOT 1
- Failed to resolve entry for package @superset-ui/switchboard HOT 5
- Pagination is not reset on charts after updating an applied filter HOT 2
- Sql lab + shillelagh does not return column values โโgreater than 64. HOT 2
- Temporary failure resolving 'deb.debian.org' HOT 2
- Superset collapses on inititalization of dashboard HOT 2
- [SIP] Save SQL lab query result and create sharable link HOT 1
- Dashboard owners is not updating correctly in the metadata tooltip
- Uploads are enabled even with Allow file uploads to database disabled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superset.