Skip to content

Commit

Permalink
#3862 Widget menu should not be available on public dashboards (#3863)
Browse files Browse the repository at this point in the history
  • Loading branch information
kravets-levko authored and arikfr committed Jun 2, 2019
1 parent 6f290dd commit 10b3b50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/app/components/dashboards/DashboardGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const MULTI = 'multi-column';
class DashboardGrid extends React.Component {
static propTypes = {
isEditing: PropTypes.bool.isRequired,
isPublic: PropTypes.bool,
dashboard: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
widgets: PropTypes.arrayOf(WidgetType).isRequired,
filters: FiltersType,
Expand All @@ -45,6 +46,7 @@ class DashboardGrid extends React.Component {
};

static defaultProps = {
isPublic: false,
filters: [],
onRemoveWidget: () => {},
onLayoutChange: () => {},
Expand Down Expand Up @@ -197,6 +199,7 @@ class DashboardGrid extends React.Component {
dashboard={dashboard}
filters={this.props.filters}
deleted={() => onRemoveWidget(widget.id)}
public={this.props.isPublic}
/>
</div>
))}
Expand Down
1 change: 1 addition & 0 deletions client/app/pages/dashboards/public-dashboard-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
widgets="$ctrl.dashboard.widgets"
filters="$ctrl.filters"
is-editing="false"
is-public="true"
/>
</div>
</div>
Expand Down

0 comments on commit 10b3b50

Please sign in to comment.