Class ChartPopupResource

java.lang.Object
com.atlassian.jira.chartpopup.ChartPopupResource

@Path("/chart") @Produces("text/html") public class ChartPopupResource extends Object
REST endpoint to retrieve the URL to display a legacy portlet.
Since:
v4.0
  • Constructor Details

  • Method Details

    • getChartContents

      @GET @Path("/render") public javax.ws.rs.core.Response getChartContents(@QueryParam("id") Long gadgetId, @QueryParam("gadgetUri") String gadgetUri, @QueryParam("filterId") Long filterId, @QueryParam("jql") String jql, @Context javax.servlet.http.HttpServletRequest request)
      Renders the contents for a particular chart needed to display this chart in the issue navigator 'Charts' popup.
      Parameters:
      gadgetId - The id of the gadget being rendered. Really just a bogus identifier associated with the popup panel being displayed.
      gadgetUri - The gadget spec URI for the chart being displayed.
      filterId - The saved filter id to use for this chart. May be null if this is an anonymous filter
      jql - The query entered by the user. May be null if the user was using a saved filter
      request - The httpServletRequest
      Returns:
      html with the chart gadget iframe as well as the save gadget to dashboard form
    • getGadgetToDashboardForm

      @GET @Path("/add") public javax.ws.rs.core.Response getGadgetToDashboardForm(@QueryParam("filterId") Long filterId, @QueryParam("jql") String jql)
      Returns the save to dashboard form.
      Parameters:
      filterId - FilterId that was used to run the query
      jql - JQL that was used to run the query
      Returns:
      A blob of HTML that is the save chart to dashboard form.
    • addGadgetToDashboard

      @POST @Path("/add") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response addGadgetToDashboard(Gadget gadget)
      Saves the gadget specified as a parameter to a particular dashboard.
      Parameters:
      gadget - The gadget to add to a dashboard.
      Returns:
      200 ok response with the URL to view the dashboard or and error response otherwise