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

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

* tests added for plugins sorting
pull/49438/head
Sriram 3 years ago committed by GitHub
parent 9a59ccd644
commit f9d1d8370f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      public/app/features/datasources/state/buildCategories.test.ts
  2. 4
      public/app/features/datasources/state/buildCategories.ts

@ -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',

Loading…
Cancel
Save