Plugins: Fix Azure Devops plugin link and plugins list order (#49394) (#49432)

* Plugins: Fix Azure Devops plugin link and plugins list order

* tests added for plugins sorting

(cherry picked from commit f9d1d8370f)

Co-authored-by: Sriram <yesoreyeram@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2022-05-23 19:18:00 +02:00
committed by GitHub
co-authored by Sriram
parent 4ed9a00909
commit 19cd446f05
2 changed files with 7 additions and 4 deletions
@@ -52,7 +52,10 @@ describe('buildCategories', () => {
});
it('should add enterprise phantom plugins', () => {
expect(categories[3].title).toBe('Enterprise plugins');
expect(categories[3].plugins.length).toBe(17);
const enterprisePluginsCategory = categories[3];
expect(enterprisePluginsCategory.title).toBe('Enterprise plugins');
expect(enterprisePluginsCategory.plugins.length).toBe(17);
expect(enterprisePluginsCategory.plugins[0].name).toBe('AppDynamics');
expect(enterprisePluginsCategory.plugins[enterprisePluginsCategory.plugins.length - 1].name).toBe('Wavefront');
});
});
@@ -88,7 +88,7 @@ function sortPlugins(plugins: DataSourcePluginMeta[]) {
return 1;
}
return a.name > b.name ? -1 : 1;
return a.name > b.name ? 1 : -1;
});
}
@@ -191,7 +191,7 @@ function getEnterprisePhantomPlugins(): DataSourcePluginMeta[] {
imgUrl: 'public/img/plugins/signalfx-logo.svg',
}),
getPhantomPlugin({
id: 'grafana-azure-devops-datasource',
id: 'grafana-azuredevops-datasource',
description: 'Azure Devops datasource',
name: 'Azure Devops',
imgUrl: 'public/img/plugins/azure-devops.png',