Manta Developers
GitHub
Menu

Plan detail

Read one action plan and render its detail view.

useActionPlanDetail reads a single plan. ActionPlanDetailView renders it.

What it is

Pass the plan’s graph IRI. null skips the read. The view shows the plan name, status, optional slots for rules, changes and the graph, and the run history tab.

@manta-eu/react/ldo-ui also exports a useActionPlanDetail. That one takes an object, planGraphIri, optional limit and enabled, and returns data, isLoading and error. Import the hooks one below for this detail.

Import

import { useActionPlanDetail } from "@manta-eu/react/hooks/useActionPlanDetail";
import { ActionPlanDetailView } from "@manta-eu/react/components/planning/ActionPlanDetailView";

Example

const { plan, isLoading, error } = useActionPlanDetail(planGraphIri);

return plan ? <ActionPlanDetailView plan={plan} isLoading={isLoading} error={error} /> : null;

Request

The hook takes planGraphIri: string | null.

ActionPlanDetailView takes:

  • plan, isLoading, and error
  • execution, with isExecuting, isComplete, isFailed, progress, and activities (id, typeName, entityName, operation, status of pending, in_progress, or completed)
  • graphSlot, rulesSlot, changesSlot, topBarActions, and leadingAction
  • issueCount (default 0), isValidating (default false), isDryRun (default false)
  • hideTopBar, hideChanges, and fitContent (each default false)
  • viewMode: overview (default), visual, or history, and onViewModeChange
  • onExecute, onCancel, onRerun, and onModify, each called with the plan IRI
  • onRunClick, called with an activity IRI

plan has iri, hasCurrentFacts, hasExecutionHistory, description, duration, state, primaryIntegration, createdBy, and optional estimatedCost, estimatedReturn, estimatedROI, and potentialProfit.

Response

The hook returns plan (or null), graphDocument (the plan graph, or null), isLoading, and error (a string or null).

plan has iri, hasCurrentFacts, hasExecutionHistory, description, duration, state, primaryIntegration, createdBy (reason and confidenceScore), and optional estimatedCost, estimatedReturn, estimatedROI, and potentialProfit.