Porting Jira cloud plugin to Jira server

We have a Jira Cloud Addon “At a Glance” DevOps Dashboard

We have been asked to add a version for Jira Server.

Did you have to recreate the plugin from scratch or are there easier options to port to the server API?

Any help will be greatly appreciated

Sean