Unverified Commit 64883365 authored by Tamika Tannis's avatar Tamika Tannis Committed by GitHub

Remove unused constructors (#448)

parent 821f393c
...@@ -25,10 +25,6 @@ export interface DispatchFromProps { ...@@ -25,10 +25,6 @@ export interface DispatchFromProps {
export type AnnouncementPageProps = StateFromProps & DispatchFromProps; export type AnnouncementPageProps = StateFromProps & DispatchFromProps;
export class AnnouncementPage extends React.Component<AnnouncementPageProps> { export class AnnouncementPage extends React.Component<AnnouncementPageProps> {
constructor(props) {
super(props);
}
componentDidMount() { componentDidMount() {
this.props.announcementsGet(); this.props.announcementsGet();
} }
......
...@@ -7,10 +7,6 @@ export interface ChartListProps { ...@@ -7,10 +7,6 @@ export interface ChartListProps {
} }
class ChartList extends React.Component<ChartListProps> { class ChartList extends React.Component<ChartListProps> {
constructor(props) {
super(props);
}
render() { render() {
const charts = this.props.charts; const charts = this.props.charts;
if (charts.length === 0) { if (charts.length === 0) {
......
...@@ -7,10 +7,6 @@ export interface QueryListProps { ...@@ -7,10 +7,6 @@ export interface QueryListProps {
} }
class QueryList extends React.Component<QueryListProps> { class QueryList extends React.Component<QueryListProps> {
constructor(props) {
super(props);
}
render() { render() {
const queries = this.props.queries; const queries = this.props.queries;
if (queries.length === 0) { if (queries.length === 0) {
......
...@@ -18,10 +18,6 @@ import { ...@@ -18,10 +18,6 @@ import {
} from '../../constants'; } from '../../constants';
export class BugReportFeedbackForm extends AbstractFeedbackForm { export class BugReportFeedbackForm extends AbstractFeedbackForm {
constructor(props) {
super(props);
}
renderCustom() { renderCustom() {
return ( return (
<form id={AbstractFeedbackForm.FORM_ID} onSubmit={ this.submitForm }> <form id={AbstractFeedbackForm.FORM_ID} onSubmit={ this.submitForm }>
......
...@@ -16,10 +16,6 @@ import { ...@@ -16,10 +16,6 @@ import {
} from '../../constants'; } from '../../constants';
export class RatingFeedbackForm extends AbstractFeedbackForm { export class RatingFeedbackForm extends AbstractFeedbackForm {
constructor(props) {
super(props);
}
renderCustom() { renderCustom() {
const ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; const ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const radioButtonSet = ratings.map(rating => ( const radioButtonSet = ratings.map(rating => (
......
...@@ -18,10 +18,6 @@ import { ...@@ -18,10 +18,6 @@ import {
} from '../../constants'; } from '../../constants';
export class RequestFeedbackForm extends AbstractFeedbackForm { export class RequestFeedbackForm extends AbstractFeedbackForm {
constructor(props) {
super(props);
}
renderCustom() { renderCustom() {
return ( return (
<form id={AbstractFeedbackForm.FORM_ID} onSubmit={ this.submitForm }> <form id={AbstractFeedbackForm.FORM_ID} onSubmit={ this.submitForm }>
......
...@@ -28,10 +28,6 @@ abstract class AbstractFeedbackForm extends React.Component<FeedbackFormProps> { ...@@ -28,10 +28,6 @@ abstract class AbstractFeedbackForm extends React.Component<FeedbackFormProps> {
static FORM_ID = "feedback-form"; static FORM_ID = "feedback-form";
protected constructor(props) {
super(props);
}
submitForm = (event) => { submitForm = (event) => {
event.preventDefault(); event.preventDefault();
const form = document.getElementById(AbstractFeedbackForm.FORM_ID) as HTMLFormElement; const form = document.getElementById(AbstractFeedbackForm.FORM_ID) as HTMLFormElement;
......
...@@ -21,10 +21,6 @@ interface DispatchFromProps { ...@@ -21,10 +21,6 @@ interface DispatchFromProps {
export type FooterProps = StateFromProps & DispatchFromProps; export type FooterProps = StateFromProps & DispatchFromProps;
export class Footer extends React.Component<FooterProps> { export class Footer extends React.Component<FooterProps> {
constructor(props) {
super(props);
}
componentDidMount() { componentDidMount() {
this.props.getLastIndexed(); this.props.getLastIndexed();
} }
......
...@@ -23,10 +23,6 @@ export interface DispatchFromProps { ...@@ -23,10 +23,6 @@ export interface DispatchFromProps {
export type HomePageProps = DispatchFromProps & RouteComponentProps<any>; export type HomePageProps = DispatchFromProps & RouteComponentProps<any>;
export class HomePage extends React.Component<HomePageProps> { export class HomePage extends React.Component<HomePageProps> {
constructor(props) {
super(props);
}
componentDidMount() { componentDidMount() {
this.props.searchReset(); this.props.searchReset();
} }
......
...@@ -27,10 +27,6 @@ interface StateFromProps { ...@@ -27,10 +27,6 @@ interface StateFromProps {
export type NavBarProps = StateFromProps & RouteComponentProps<{}>; export type NavBarProps = StateFromProps & RouteComponentProps<{}>;
export class NavBar extends React.Component<NavBarProps> { export class NavBar extends React.Component<NavBarProps> {
constructor(props) {
super(props);
}
generateNavLinks(navLinks: LinkConfig[]) { generateNavLinks(navLinks: LinkConfig[]) {
return navLinks.map((link, index) => { return navLinks.map((link, index) => {
if (link.use_router) { if (link.use_router) {
......
...@@ -11,15 +11,11 @@ export type PreferenceGroupProps = { ...@@ -11,15 +11,11 @@ export type PreferenceGroupProps = {
} }
export class PreferenceGroup extends React.Component<PreferenceGroupProps> { export class PreferenceGroup extends React.Component<PreferenceGroupProps> {
public static defaultProps: Partial<PreferenceGroupProps> = { public static defaultProps: Partial<PreferenceGroupProps> = {
selected: false, selected: false,
title: '', title: '',
subtitle: '', subtitle: '',
}; };
constructor(props) {
super(props);
}
onClick = () => { onClick = () => {
this.props.onClick(this.props.preferenceValue) this.props.onClick(this.props.preferenceValue)
......
...@@ -35,10 +35,6 @@ interface ResourceOptionConfig { ...@@ -35,10 +35,6 @@ interface ResourceOptionConfig {
} }
export class ResourceSelector extends React.Component<ResourceSelectorProps > { export class ResourceSelector extends React.Component<ResourceSelectorProps > {
constructor(props) {
super(props);
}
onChange = (event) => { onChange = (event) => {
this.props.setResource(event.target.value); this.props.setResource(event.target.value);
}; };
......
...@@ -28,10 +28,6 @@ interface DispatchFromProps { ...@@ -28,10 +28,6 @@ interface DispatchFromProps {
export type CheckBoxFilterProps = OwnProps & DispatchFromProps & StateFromProps; export type CheckBoxFilterProps = OwnProps & DispatchFromProps & StateFromProps;
export class CheckBoxFilter extends React.Component<CheckBoxFilterProps> { export class CheckBoxFilter extends React.Component<CheckBoxFilterProps> {
constructor(props) {
super(props);
}
createCheckBoxItem = (categoryId: string, key: string, item: CheckboxFilterProperties) => { createCheckBoxItem = (categoryId: string, key: string, item: CheckboxFilterProperties) => {
const { label, value } = item; const { label, value } = item;
return ( return (
......
...@@ -34,10 +34,6 @@ export interface DispatchFromProps { ...@@ -34,10 +34,6 @@ export interface DispatchFromProps {
export type FilterSectionProps = OwnProps & DispatchFromProps & StateFromProps; export type FilterSectionProps = OwnProps & DispatchFromProps & StateFromProps;
export class FilterSection extends React.Component<FilterSectionProps> { export class FilterSection extends React.Component<FilterSectionProps> {
constructor(props) {
super(props);
}
onClearFilter = () => { onClearFilter = () => {
this.props.clearFilter(this.props.categoryId); this.props.clearFilter(this.props.categoryId);
} }
......
...@@ -30,10 +30,6 @@ export interface StateFromProps { ...@@ -30,10 +30,6 @@ export interface StateFromProps {
export type SearchFilterProps = StateFromProps; export type SearchFilterProps = StateFromProps;
export class SearchFilter extends React.Component<SearchFilterProps> { export class SearchFilter extends React.Component<SearchFilterProps> {
constructor(props) {
super(props);
}
createFilterSection = (key: string, section: FilterSection | CheckboxFilterSection) => { createFilterSection = (key: string, section: FilterSection | CheckboxFilterSection) => {
const { categoryId, helpText, title, type } = section; const { categoryId, helpText, title, type } = section;
const options = (section as CheckboxFilterSection).options ? (section as CheckboxFilterSection).options : undefined; const options = (section as CheckboxFilterSection).options ? (section as CheckboxFilterSection).options : undefined;
......
...@@ -60,10 +60,6 @@ export type SearchPageProps = StateFromProps & DispatchFromProps & RouteComponen ...@@ -60,10 +60,6 @@ export type SearchPageProps = StateFromProps & DispatchFromProps & RouteComponen
export class SearchPage extends React.Component<SearchPageProps> { export class SearchPage extends React.Component<SearchPageProps> {
public static defaultProps: Partial<SearchPageProps> = {}; public static defaultProps: Partial<SearchPageProps> = {};
constructor(props) {
super(props);
}
componentDidMount() { componentDidMount() {
this.props.urlDidUpdate(this.props.location.search); this.props.urlDidUpdate(this.props.location.search);
} }
......
...@@ -10,10 +10,6 @@ export interface ColumnStatsProps { ...@@ -10,10 +10,6 @@ export interface ColumnStatsProps {
} }
export class ColumnStats extends React.Component<ColumnStatsProps> { export class ColumnStats extends React.Component<ColumnStatsProps> {
constructor(props) {
super(props);
}
getStatsInfoText = (startEpoch: number, endEpoch: number) => { getStatsInfoText = (startEpoch: number, endEpoch: number) => {
const startDate = startEpoch ? formatDate({ epochTimestamp: startEpoch }) : null; const startDate = startEpoch ? formatDate({ epochTimestamp: startEpoch }) : null;
const endDate = endEpoch ? formatDate({ epochTimestamp: endEpoch }) : null; const endDate = endEpoch ? formatDate({ epochTimestamp: endEpoch }) : null;
......
...@@ -9,10 +9,6 @@ export interface ExploreButtonProps { ...@@ -9,10 +9,6 @@ export interface ExploreButtonProps {
} }
class ExploreButton extends React.Component<ExploreButtonProps> { class ExploreButton extends React.Component<ExploreButtonProps> {
constructor(props) {
super(props);
}
render() { render() {
const url = generateExploreUrl(this.props.tableData); const url = generateExploreUrl(this.props.tableData);
if (!url || !exploreEnabled()) { if (!url || !exploreEnabled()) {
......
...@@ -21,10 +21,6 @@ interface RequestDescriptionTextState {} ...@@ -21,10 +21,6 @@ interface RequestDescriptionTextState {}
export class RequestDescriptionText extends React.Component<RequestDescriptionTextProps, RequestDescriptionTextState> { export class RequestDescriptionText extends React.Component<RequestDescriptionTextProps, RequestDescriptionTextState> {
public static defaultProps: Partial<RequestDescriptionTextProps> = {}; public static defaultProps: Partial<RequestDescriptionTextProps> = {};
constructor(props) {
super(props);
}
openRequest = () => { openRequest = () => {
this.props.openRequestDescriptionDialog(RequestMetadataType.TABLE_DESCRIPTION); this.props.openRequestDescriptionDialog(RequestMetadataType.TABLE_DESCRIPTION);
} }
......
...@@ -57,10 +57,6 @@ interface RequestMetadataState {} ...@@ -57,10 +57,6 @@ interface RequestMetadataState {}
export class RequestMetadataForm extends React.Component<RequestMetadataProps, RequestMetadataState> { export class RequestMetadataForm extends React.Component<RequestMetadataProps, RequestMetadataState> {
public static defaultProps: Partial<RequestMetadataProps> = {}; public static defaultProps: Partial<RequestMetadataProps> = {};
constructor(props) {
super(props);
}
componentWillUnmount = () => { componentWillUnmount = () => {
this.props.closeRequestDescriptionDialog(); this.props.closeRequestDescriptionDialog();
} }
......
...@@ -31,10 +31,6 @@ export interface ComponentProps { ...@@ -31,10 +31,6 @@ export interface ComponentProps {
export type TableIssueProps = StateFromProps & DispatchFromProps & ComponentProps; export type TableIssueProps = StateFromProps & DispatchFromProps & ComponentProps;
export class TableIssues extends React.Component<TableIssueProps> { export class TableIssues extends React.Component<TableIssueProps> {
constructor(props) {
super(props);
}
componentDidMount() { componentDidMount() {
this.props.getIssues(this.props.tableKey); this.props.getIssues(this.props.tableKey);
} }
......
...@@ -15,10 +15,6 @@ export interface WatermarkLabelProps { ...@@ -15,10 +15,6 @@ export interface WatermarkLabelProps {
} }
class WatermarkLabel extends React.Component<WatermarkLabelProps> { class WatermarkLabel extends React.Component<WatermarkLabelProps> {
constructor(props) {
super(props);
}
formatWatermarkDate = (dateString: string) => { formatWatermarkDate = (dateString: string) => {
return formatDate({ return formatDate({
dateString, dateString,
......
...@@ -66,10 +66,6 @@ class TableDetail extends React.Component<TableDetailProps & RouteComponentProps ...@@ -66,10 +66,6 @@ class TableDetail extends React.Component<TableDetailProps & RouteComponentProps
private key: string; private key: string;
private didComponentMount: boolean = false; private didComponentMount: boolean = false;
constructor(props) {
super(props);
}
componentDidMount() { componentDidMount() {
const { index, source } = getLoggingParams(this.props.location.search); const { index, source } = getLoggingParams(this.props.location.search);
......
...@@ -26,10 +26,6 @@ export class TagInfo extends React.Component<TagInfoProps> { ...@@ -26,10 +26,6 @@ export class TagInfo extends React.Component<TagInfoProps> {
compact: true compact: true
}; };
constructor(props) {
super(props);
}
onClick = (e) => { onClick = (e) => {
const name = this.props.data.tag_name; const name = this.props.data.tag_name;
logClick(e, { logClick(e, {
......
...@@ -33,10 +33,6 @@ export class BookmarkIcon extends React.Component<BookmarkIconProps> { ...@@ -33,10 +33,6 @@ export class BookmarkIcon extends React.Component<BookmarkIconProps> {
large: false, large: false,
}; };
constructor(props) {
super(props);
}
handleClick = (event: React.MouseEvent<HTMLElement>) => { handleClick = (event: React.MouseEvent<HTMLElement>) => {
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
......
...@@ -22,10 +22,6 @@ interface StateFromProps { ...@@ -22,10 +22,6 @@ interface StateFromProps {
export type MyBookmarksProps = StateFromProps; export type MyBookmarksProps = StateFromProps;
export class MyBookmarks extends React.Component<MyBookmarksProps> { export class MyBookmarks extends React.Component<MyBookmarksProps> {
constructor(props) {
super(props);
}
generateTabContent = (resource: ResourceType) => { generateTabContent = (resource: ResourceType) => {
const bookmarks = this.props.myBookmarks[resource]; const bookmarks = this.props.myBookmarks[resource];
if (!bookmarks) { if (!bookmarks) {
......
...@@ -31,10 +31,6 @@ export interface DispatchFromProps { ...@@ -31,10 +31,6 @@ export interface DispatchFromProps {
export type PopularTablesProps = StateFromProps & DispatchFromProps; export type PopularTablesProps = StateFromProps & DispatchFromProps;
export class PopularTables extends React.Component<PopularTablesProps> { export class PopularTables extends React.Component<PopularTablesProps> {
constructor(props) {
super(props);
}
componentDidMount() { componentDidMount() {
this.props.getPopularTables(); this.props.getPopularTables();
} }
......
...@@ -16,10 +16,6 @@ interface DispatchFromProps { ...@@ -16,10 +16,6 @@ interface DispatchFromProps {
export type PreloaderProps = DispatchFromProps; export type PreloaderProps = DispatchFromProps;
export class Preloader extends React.Component<PreloaderProps>{ export class Preloader extends React.Component<PreloaderProps>{
constructor(props) {
super(props)
}
componentDidMount() { componentDidMount() {
this.props.getLoggedInUser(); this.props.getLoggedInUser();
this.props.getBookmarks(); this.props.getBookmarks();
......
...@@ -20,10 +20,6 @@ export interface DashboardListItemProps { ...@@ -20,10 +20,6 @@ export interface DashboardListItemProps {
} }
class DashboardListItem extends React.Component<DashboardListItemProps, {}> { class DashboardListItem extends React.Component<DashboardListItemProps, {}> {
constructor(props) {
super(props);
}
getLink = () => { getLink = () => {
const { dashboard, logging } = this.props; const { dashboard, logging } = this.props;
return `/dashboard?uri=${dashboard.uri}&index=${logging.index}&source=${logging.source}`; return `/dashboard?uri=${dashboard.uri}&index=${logging.index}&source=${logging.source}`;
......
...@@ -17,10 +17,6 @@ export interface TableListItemProps { ...@@ -17,10 +17,6 @@ export interface TableListItemProps {
} }
class TableListItem extends React.Component<TableListItemProps, {}> { class TableListItem extends React.Component<TableListItemProps, {}> {
constructor(props) {
super(props);
}
getLink = () => { getLink = () => {
const { table, logging } = this.props; const { table, logging } = this.props;
return `/table_detail/${table.cluster}/${table.database}/${table.schema}/${table.name}` return `/table_detail/${table.cluster}/${table.database}/${table.schema}/${table.name}`
......
...@@ -13,10 +13,6 @@ export interface UserListItemProps { ...@@ -13,10 +13,6 @@ export interface UserListItemProps {
} }
class UserListItem extends React.Component<UserListItemProps, {}> { class UserListItem extends React.Component<UserListItemProps, {}> {
constructor(props) {
super(props);
}
getLink = () => { getLink = () => {
const { user, logging } = this.props; const { user, logging } = this.props;
return `/user/${user.user_id}?index=${logging.index}&source=${logging.source}`; return `/user/${user.user_id}?index=${logging.index}&source=${logging.source}`;
......
...@@ -15,10 +15,6 @@ export interface ListItemProps { ...@@ -15,10 +15,6 @@ export interface ListItemProps {
} }
export default class ResourceListItem extends React.Component<ListItemProps> { export default class ResourceListItem extends React.Component<ListItemProps> {
constructor(props) {
super(props);
}
render() { render() {
switch(this.props.item.type) { switch(this.props.item.type) {
case ResourceType.dashboard: case ResourceType.dashboard:
......
...@@ -18,10 +18,6 @@ export interface ResultItemListProps { ...@@ -18,10 +18,6 @@ export interface ResultItemListProps {
} }
class ResultItemList extends React.Component<ResultItemListProps, {}> { class ResultItemList extends React.Component<ResultItemListProps, {}> {
constructor(props) {
super(props);
}
generateFooterLinkText = () => { generateFooterLinkText = () => {
const { totalResults, title } = this.props; const { totalResults, title } = this.props;
return `${RESULT_LIST_FOOTER_PREFIX} ${totalResults} ${title} ${RESULT_LIST_FOOTER_SUFFIX}`; return `${RESULT_LIST_FOOTER_PREFIX} ${totalResults} ${title} ${RESULT_LIST_FOOTER_SUFFIX}`;
......
...@@ -26,10 +26,6 @@ export interface OwnProps { ...@@ -26,10 +26,6 @@ export interface OwnProps {
export type SearchItemProps = StateFromProps & OwnProps; export type SearchItemProps = StateFromProps & OwnProps;
export class SearchItem extends React.Component<SearchItemProps, {}> { export class SearchItem extends React.Component<SearchItemProps, {}> {
constructor(props) {
super(props);
}
onViewAllResults = (e) => { onViewAllResults = (e) => {
logClick(e); logClick(e);
this.props.onItemSelect(this.props.resourceType, true); this.props.onItemSelect(this.props.resourceType, true);
......
...@@ -14,10 +14,6 @@ export interface SearchItemListProps { ...@@ -14,10 +14,6 @@ export interface SearchItemListProps {
} }
class SearchItemList extends React.Component<SearchItemListProps, {}> { class SearchItemList extends React.Component<SearchItemListProps, {}> {
constructor(props) {
super(props);
}
getListItemText = (resourceType: ResourceType): string => { getListItemText = (resourceType: ResourceType): string => {
switch (resourceType) { switch (resourceType) {
case ResourceType.dashboard: case ResourceType.dashboard:
......
...@@ -39,10 +39,6 @@ export interface SuggestedResult { ...@@ -39,10 +39,6 @@ export interface SuggestedResult {
} }
export class InlineSearchResults extends React.Component<InlineSearchResultsProps, {}> { export class InlineSearchResults extends React.Component<InlineSearchResultsProps, {}> {
constructor(props) {
super(props);
}
getTitleForResource = (resourceType: ResourceType): string => { getTitleForResource = (resourceType: ResourceType): string => {
switch (resourceType) { switch (resourceType) {
case ResourceType.dashboard: case ResourceType.dashboard:
......
...@@ -26,10 +26,6 @@ export interface DispatchFromProps { ...@@ -26,10 +26,6 @@ export interface DispatchFromProps {
export type TagsListProps = StateFromProps & DispatchFromProps; export type TagsListProps = StateFromProps & DispatchFromProps;
export class TagsList extends React.Component<TagsListProps> { export class TagsList extends React.Component<TagsListProps> {
constructor(props) {
super(props);
}
componentDidMount() { componentDidMount() {
this.props.getAllTags(); this.props.getAllTags();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment