From dd37c0dd3349b6103d64f9e8fc9599a8ebd2deba Mon Sep 17 00:00:00 2001 From: Nikita Nek Dudnik Date: Thu, 4 Jun 2020 14:11:09 +0200 Subject: [PATCH] fix: get rid of obsolete and duplicated code --- .../src/database/DatabaseManager.ts | 7 +------ .../src/components/CatalogTable/CatalogTable.tsx | 14 +------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/plugins/catalog-backend/src/database/DatabaseManager.ts b/plugins/catalog-backend/src/database/DatabaseManager.ts index f466040c3f..8ba1292549 100644 --- a/plugins/catalog-backend/src/database/DatabaseManager.ts +++ b/plugins/catalog-backend/src/database/DatabaseManager.ts @@ -43,11 +43,6 @@ export class DatabaseManager { knex.client.pool.on('createSuccess', (_eventId: any, resource: any) => { resource.run('PRAGMA foreign_keys = ON', () => {}); }); - - await knex.migrate.latest({ - directory: path.resolve(__dirname, 'migrations'), - loadExtensions: ['.js'], - }); - return new CommonDatabase(knex, logger); + return DatabaseManager.createDatabase(knex, logger); } } diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index 35bc6c7d7c..f5fa45dc7e 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -17,7 +17,6 @@ import React, { FC } from 'react'; import { Component } from '../../data/component'; import { InfoCard, Progress, Table, TableColumn } from '@backstage/core'; import { Typography, Link } from '@material-ui/core'; -import EditIcon from '@material-ui/icons/Edit'; const columns: TableColumn[] = [ { @@ -67,18 +66,7 @@ const CatalogTable: FC = ({ columns={columns} options={{ paging: false }} title={`${titlePreamble} (${(components && components.length) || 0})`} - data={components.map(({ kind, name, description }) => ({ - kind, - name, - description: ( -
- {description} - - - -
- ), - }))} + data={components} /> ); };