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