Bug 1419965 - Remove the estimated job time remaining UI (#2977)

This just removes the UI of this mostly broken feature, to see what
response we get, before we remove the API/data ingestion/DB parts.
This commit is contained in:
Ed Morley 2017-11-27 16:50:20 +00:00 коммит произвёл GitHub
Родитель 16b37a92fd
Коммит 1eec0c81b8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 2 добавлений и 30 удалений

Просмотреть файл

@ -11,18 +11,6 @@ treeherder.factory('ThJobModel', [
angular.extend(this, data);
};
ThJobModel.prototype.running_time_remaining = function () {
var timestampNow = new Date().getTime()/1000;
var current_duration = timestampNow - parseInt(this.start_timestamp);
return Math.round((parseInt(this.running_eta) - current_duration) / 60);
};
ThJobModel.prototype.get_average_duration = function () {
return Math.round(
parseInt(this.running_eta) /60
);
};
ThJobModel.prototype.get_title = function () {
// we want to join the group and type information together
// so we can search for it as one token (useful when

Просмотреть файл

@ -141,11 +141,6 @@ treeherder.controller('PluginCtrl', [
//the first result comes from the job promise
$scope.job = results[0];
if ($scope.job.state === 'running') {
$scope.eta = $scope.job.running_time_remaining();
$scope.eta_abs = Math.abs($scope.eta);
}
$scope.average_duration = $scope.job.get_average_duration();
$scope.resultsetId = ThResultSetStore.getSelectedJob($scope.repoName).job.result_set_id;
$scope.jobRevision = ThResultSetStore.getResultSet($scope.repoName, $scope.resultsetId).revision;

Просмотреть файл

@ -49,14 +49,6 @@ const JobStatusPane = props => (
<label>State:</label>
<span> {props.job.state}</span>
</div>
{props.job.state === 'running' && <div>
{props.eta > 0 && <span>Time remaining: ~{props.eta} minutes</span>}
{props.eta < 0 && <span>{Math.abs(props.eta)} mins overdue, typically takes ~{props.averageDuration} mins</span>}
{props.eta === 0 && <span>Due any minute now, typically takes ~{props.averageDuration} mins</span>}
</div>}
{props.job.state === 'pending' && <div>
<span>Typically takes ~{props.averageDuration} mins once started</span>
</div>}
</li>
</ul>
);
@ -215,8 +207,7 @@ class JobDetailsPane extends React.Component {
classificationTypes={this.props.classificationTypes}
repoName={this.props.repoName} />}
<JobStatusPane job={this.props.job} eta={this.props.eta} averageDuration={this.props.averageDuration}
resultStatusShading={this.props.resultStatusShading}/>
<JobStatusPane job={this.props.job} resultStatusShading={this.props.resultStatusShading}/>
<JobDetailsList
job={this.props.job}
@ -243,8 +234,6 @@ JobDetailsPane.propTypes = {
getBugUrl: PropTypes.func,
job: PropTypes.object,
getSlaveHealthUrl: PropTypes.func,
eta: PropTypes.number,
averageDuration: PropTypes.number,
resultStatusShading: PropTypes.string,
$injector: PropTypes.object,
jobSearchSignatureHref: PropTypes.string,

Просмотреть файл

@ -141,7 +141,7 @@
getSlaveHealthUrl="getSlaveHealthUrl" jobSearchSignature="jobSearchSignature"
filterByJobSearchStr="filterByJobSearchStr" jobSearchStrHref="jobSearchStrHref"
jobSearchStr="jobSearchStr" visibleTimeFields="visibleTimeFields"
jobLogUrls="job_log_urls" averageDuration="average_duration" eta="eta"
jobLogUrls="job_log_urls"
getInspectTaskUrl="getInspectTaskUrl" visibleFields="visibleFields"
classificationTypes="classificationTypes" jobDetailLoading="job_detail_loading"
repoName="repoName"></job-details-pane>