Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the experiment's resource reference in the listJobs request #105

Merged
merged 2 commits into from
Nov 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion frontend/src/pages/ExperimentDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import RunList from '../pages/RunList';
import Toolbar, { ToolbarActionConfig, ToolbarProps } from '../components/Toolbar';
import Tooltip from '@material-ui/core/Tooltip';
import { ApiExperiment } from '../apis/experiment';
import { ApiResourceType } from '../apis/job';
import { Apis } from '../lib/Apis';
import { Page } from './Page';
import { RoutePage, RouteParams } from '../components/Router';
Expand Down Expand Up @@ -268,7 +269,13 @@ class ExperimentDetails extends Page<{}, ExperimentDetailsState> {
});

// TODO: get ALL jobs in the experiment
const recurringRuns = await Apis.jobServiceApi.listJobs(undefined, 100);
const recurringRuns = await Apis.jobServiceApi.listJobs(
undefined,
100,
'',
ApiResourceType.EXPERIMENT.toString(),
experimentId,
);
const activeRecurringRunsCount =
(recurringRuns.jobs || []).filter(j => j.enabled === true).length;
this.setState(
Expand Down