Skip to content
Snippets Groups Projects
  • Alexander Lesnenko's avatar
    9393a03b
    Subscriptions and alerts audit (#17765) · 9393a03b
    Alexander Lesnenko authored
    
    * subscriptions and alerts audit
    
    * Add tables
    
    * Add tables
    
    * Extract to lib
    
    * Extract to lib
    
    * Add modal
    
    * Add modal
    
    * Add modal
    
    * Fix modals
    
    * Fix modals
    
    * Add children for displaying modals
    
    * Add children for displaying modals
    
    * Add children for displaying modals
    
    * Add children for displaying modals
    
    * Add edit dialogs
    
    * Add edit dialogs
    
    * Add edit dialogs
    
    * Add edit dialogs
    
    * Remove deletion
    
    * Remove deletion
    
    * Add users
    
    * Add users
    
    * Fix selection issues
    
    * Add placeholder
    
    * Add placeholder
    
    * Add delete button
    
    * Fix wrapping issues
    
    * F
    
    * Small fixes
    
    * Add reloading
    
    * fixes
    
    * cypress specs
    
    * fixes
    
    * post rebase fixes
    
    * rebase fixes
    
    * review fixes
    
    Co-authored-by: default avatarAlexander Polyankin <alexander.polyankin@metabase.com>
    Subscriptions and alerts audit (#17765)
    Alexander Lesnenko authored
    
    * subscriptions and alerts audit
    
    * Add tables
    
    * Add tables
    
    * Extract to lib
    
    * Extract to lib
    
    * Add modal
    
    * Add modal
    
    * Add modal
    
    * Fix modals
    
    * Fix modals
    
    * Add children for displaying modals
    
    * Add children for displaying modals
    
    * Add children for displaying modals
    
    * Add children for displaying modals
    
    * Add edit dialogs
    
    * Add edit dialogs
    
    * Add edit dialogs
    
    * Add edit dialogs
    
    * Remove deletion
    
    * Remove deletion
    
    * Add users
    
    * Add users
    
    * Fix selection issues
    
    * Add placeholder
    
    * Add placeholder
    
    * Add delete button
    
    * Fix wrapping issues
    
    * F
    
    * Small fixes
    
    * Add reloading
    
    * fixes
    
    * cypress specs
    
    * fixes
    
    * post rebase fixes
    
    * rebase fixes
    
    * review fixes
    
    Co-authored-by: default avatarAlexander Polyankin <alexander.polyankin@metabase.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
AuditAlertEditModal.jsx 798 B
import { connect } from "react-redux";
import { push } from "react-router-redux";
import _ from "underscore";
import Alerts from "metabase/entities/alerts";
import Users from "metabase/entities/users";
import AuditNotificationEditModal from "../../components/AuditNotificationEditModal";

const mapStateToProps = (state, { alert }) => ({
  item: alert,
  type: "alert",
});

const mapDispatchToProps = {
  onUpdate: (alert, channels) => Alerts.actions.setChannels(alert, channels),
  onDelete: alert =>
    push(`/admin/audit/subscriptions/alerts/${alert.id}/delete`),
};

export default _.compose(
  Alerts.load({
    id: (state, props) => Number.parseInt(props.params.alertId),
  }),
  Users.loadList(),
  connect(
    mapStateToProps,
    mapDispatchToProps,
  ),
)(AuditNotificationEditModal);