зеркало из https://github.com/mozilla/treeherder.git
Code cleanup
Removed several vestigial Angular services and $injector from some classes Added a missing event unlistener to JobView Removed a few unnecessary usages of JQuery
This commit is contained in:
Родитель
6101c7f3f6
Коммит
8d5972d01d
|
@ -2,7 +2,6 @@ import React from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
|
||||
import { thBugSuggestionLimit } from '../../../../js/constants';
|
||||
|
||||
import BugListItem from './BugListItem';
|
||||
|
||||
export default class SuggestionsListItem extends React.Component {
|
||||
|
|
|
@ -188,8 +188,7 @@ export default class SecondaryNavBar extends React.Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
updateButtonClick, serverChanged, $injector, setCurrentRepoTreeStatus,
|
||||
repos,
|
||||
updateButtonClick, serverChanged, setCurrentRepoTreeStatus, repos,
|
||||
} = this.props;
|
||||
const {
|
||||
watchedRepoNames, groupsExpanded, showDuplicateJobs, searchQueryStr,
|
||||
|
@ -219,7 +218,6 @@ export default class SecondaryNavBar extends React.Component {
|
|||
<WatchedRepo
|
||||
repo={watchedRepo}
|
||||
repoName={repoName}
|
||||
$injector={$injector}
|
||||
unwatchRepo={this.unwatchRepo}
|
||||
setCurrentRepoTreeStatus={setCurrentRepoTreeStatus}
|
||||
/>
|
||||
|
|
|
@ -43,9 +43,6 @@ export default class WatchedRepo extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
const { $injector } = this.props;
|
||||
this.$rootScope = $injector.get('$rootScope');
|
||||
|
||||
this.state = {
|
||||
status: 'not retrieved yet',
|
||||
reason: '',
|
||||
|
@ -186,7 +183,6 @@ export default class WatchedRepo extends React.Component {
|
|||
}
|
||||
|
||||
WatchedRepo.propTypes = {
|
||||
$injector: PropTypes.object.isRequired,
|
||||
repoName: PropTypes.string.isRequired,
|
||||
unwatchRepo: PropTypes.func.isRequired,
|
||||
repo: PropTypes.object.isRequired,
|
||||
|
|
|
@ -6,10 +6,6 @@ import { getUrlParam } from '../../helpers/location';
|
|||
export default class JobButtonComponent extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
const { $injector } = this.props;
|
||||
|
||||
this.$rootScope = $injector.get('$rootScope');
|
||||
this.ThResultSetStore = $injector.get('ThResultSetStore');
|
||||
|
||||
this.state = {
|
||||
isSelected: false,
|
||||
|
@ -128,7 +124,6 @@ export default class JobButtonComponent extends React.Component {
|
|||
|
||||
JobButtonComponent.propTypes = {
|
||||
job: PropTypes.object.isRequired,
|
||||
$injector: PropTypes.object.isRequired,
|
||||
filterModel: PropTypes.object.isRequired,
|
||||
repoName: PropTypes.string.isRequired,
|
||||
visible: PropTypes.bool.isRequired,
|
||||
|
|
|
@ -15,7 +15,6 @@ export default class PushActionMenu extends React.PureComponent {
|
|||
this.$rootScope = $injector.get('$rootScope');
|
||||
this.thNotify = $injector.get('thNotify');
|
||||
this.ThResultSetStore = $injector.get('ThResultSetStore');
|
||||
this.$uibModal = $injector.get('$uibModal');
|
||||
|
||||
this.revision = this.props.revision;
|
||||
this.pushId = this.props.pushId;
|
||||
|
|
|
@ -105,6 +105,7 @@ export default class PushJobs extends React.Component {
|
|||
|
||||
onMouseDown(ev) {
|
||||
const jobElem = ev.target.attributes.getNamedItem('data-job-id');
|
||||
|
||||
if (jobElem) {
|
||||
const jobId = jobElem.value;
|
||||
const job = this.getJobFromId(jobId);
|
||||
|
|
|
@ -3,18 +3,16 @@ import React from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
|
||||
import Push from './Push';
|
||||
import { thDefaultRepo, thEvents, thMaxPushFetchSize } from '../../js/constants';
|
||||
import { reloadOnChangeParameters } from '../../helpers/filter';
|
||||
import {
|
||||
findInstance,
|
||||
findSelectedInstance,
|
||||
findJobInstance,
|
||||
scrollToElement,
|
||||
} from '../../helpers/job';
|
||||
import PushLoadErrors from './PushLoadErrors';
|
||||
import { thDefaultRepo, thEvents, thMaxPushFetchSize } from '../../js/constants';
|
||||
import JobModel from '../../models/job';
|
||||
import PushModel from '../../models/push';
|
||||
import ErrorBoundary from '../../shared/ErrorBoundary';
|
||||
import {
|
||||
getAllUrlParams,
|
||||
getQueryString,
|
||||
|
@ -23,10 +21,11 @@ import {
|
|||
setUrlParam,
|
||||
} from '../../helpers/location';
|
||||
import { parseQueryParams } from '../../helpers/url';
|
||||
import { reloadOnChangeParameters } from '../../helpers/filter';
|
||||
import ErrorBoundary from '../../shared/ErrorBoundary';
|
||||
import Push from './Push';
|
||||
import PushLoadErrors from './PushLoadErrors';
|
||||
|
||||
export default class PushList extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
const { $injector, repoName } = this.props;
|
||||
|
|
Загрузка…
Ссылка в новой задаче