You could add a new sidebar like this:
app/assets/javascripts/app/controllers/ticket_zoom/sidebar_custom.coffee
class SidebarCustom extends App.Controller
sidebarItem: =>
@item = {
name: 'Custom'
badgeIcon: 'templates'
sidebarHead: __('Custom')
sidebarCallback: @showCustom
}
@item
shown: ->
@showCustom(undefined, true)
showCustom: (el, load = false) =>
@elSidebar = el if el
@startLoading()
return if !load
console.log('sidebar data', @ticket)
@ajax(
id: "Custom_#{@ticket.id}"
type: 'GET'
url: "#{@apiPath}/tickets/#{@ticket.id}"
processData: true
success: (data, status, xhr) =>
console.log('endpoint data ', data)
@stopLoading()
@elSidebar.html('<p>Custom information for customer id ' + @ticket.customer_id + '</p>')
)
App.Config.set('310-Custom', SidebarCustom, 'TicketZoomSidebar')
You might get problems when you requesting remote urls because of the CSP I guess.
not sure how to edit it properly atm. You could also think about to add a new controller and proxy your data through that alternatively.
For packages there are some small tutorials here