Merge pull request #4341 from backstage/rugvip/toptools
plugins: port user-settings, api-docs, and gcp-projects to new composability API
This commit is contained in:
@@ -13,5 +13,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { plugin } from './plugin';
|
||||
|
||||
export {
|
||||
userSettingsPlugin,
|
||||
userSettingsPlugin as plugin,
|
||||
UserSettingsPage,
|
||||
} from './plugin';
|
||||
export * from './components/';
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { plugin } from './plugin';
|
||||
import { userSettingsPlugin } from './plugin';
|
||||
|
||||
describe('user-settings', () => {
|
||||
it('should export plugin', () => {
|
||||
expect(plugin).toBeDefined();
|
||||
expect(userSettingsPlugin).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -13,13 +13,28 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { createPlugin, createRouteRef } from '@backstage/core';
|
||||
|
||||
import {
|
||||
createPlugin,
|
||||
createRoutableExtension,
|
||||
createRouteRef,
|
||||
} from '@backstage/core';
|
||||
|
||||
export const settingsRouteRef = createRouteRef({
|
||||
path: '/settings',
|
||||
title: 'Settings',
|
||||
});
|
||||
|
||||
export const plugin = createPlugin({
|
||||
export const userSettingsPlugin = createPlugin({
|
||||
id: 'user-settings',
|
||||
routes: {
|
||||
settingsPage: settingsRouteRef,
|
||||
},
|
||||
});
|
||||
|
||||
export const UserSettingsPage = userSettingsPlugin.provide(
|
||||
createRoutableExtension({
|
||||
component: () =>
|
||||
import('./components/SettingsPage').then(m => m.SettingsPage),
|
||||
mountPoint: settingsRouteRef,
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user