IConfigurableWidget

Last Update: 9/26/2016

All widgets that need configuration should register a function that returns an object satisfying this contract.

Module path: TFS/Dashboards/WidgetContracts

Members

  • load: Function. This is the method that is called by the widget framework to load the widget. Parameter for this method is of type WidgetSettings. This will have the current saved settings of the widget and should be used by the load method to load the widget. It should return an object of type WidgetStatus wrapped in a Promise. Widgets can use the WidgetStatusHelper to return either Success or Failure.

  • reload: Function. This is the method that is called by the widget framework everytime the configuration is changed or saved. Parameter for this method is of type WidgetSettings. This parameter holds the widget settings derived from user input in the configuration pane and should be used by the reload method to reload the widget. It should return an object of type WidgetStatus wrapped in a Promise. Widgets can use the WidgetStatusHelper to return either Success or Failure.