Signed-off-by: Andrew Johnson <ajohnson@gocardless.com>
This commit is contained in:
Andrew Johnson
2021-03-30 17:58:54 +01:00
parent d4ae83a79d
commit 0b1179685b
4 changed files with 20 additions and 11 deletions
@@ -24,7 +24,7 @@ import {
OAuthApi,
} from '@backstage/core';
import { msw } from '@backstage/test-utils'
import { msw } from '@backstage/test-utils';
import { GithubDeploymentsApiClient, githubDeploymentsApiRef } from '../api';
import { githubDeploymentsPlugin } from '../plugin';
import { GithubDeploymentsCard } from './GithubDeploymentsCard';
@@ -14,7 +14,13 @@
* limitations under the License.
*/
import React from 'react';
import { InfoCard, MissingAnnotationEmptyState, Progress, ResponseErrorPanel, useApi } from '@backstage/core';
import {
InfoCard,
MissingAnnotationEmptyState,
Progress,
ResponseErrorPanel,
useApi,
} from '@backstage/core';
import { useAsync } from 'react-use';
import { githubDeploymentsApiRef } from '../api';
import { useEntity } from '@backstage/plugin-catalog-react';
@@ -46,9 +52,7 @@ const GithubDeploymentsComponent = ({
);
}
if (error) {
return (
<ResponseErrorPanel error={error} />
);
return <ResponseErrorPanel error={error} />;
}
return <GithubDeploymentsTable deployments={value || []} />;
@@ -14,7 +14,15 @@
* limitations under the License.
*/
import React from 'react';
import { StatusPending, StatusRunning, StatusOK, Table, TableColumn, StatusAborted, StatusError } from '@backstage/core';
import {
StatusPending,
StatusRunning,
StatusOK,
Table,
TableColumn,
StatusAborted,
StatusError,
} from '@backstage/core';
import { GithubDeployment } from '../../api';
import { DateTime } from 'luxon';
import { Box, Typography, Link, makeStyles } from '@material-ui/core';
@@ -41,7 +49,7 @@ const statusIndicator = (value: string): React.ReactNode => {
default:
return <StatusAborted />;
}
}
};
const columns: TableColumn<GithubDeployment>[] = [
{
+1 -4
View File
@@ -13,8 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {
githubDeploymentsPlugin,
EntityGithubDeploymentsCard,
} from './plugin';
export { githubDeploymentsPlugin, EntityGithubDeploymentsCard } from './plugin';
export { isGithubDeploymentsAvailable } from './Router';