@@ -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 || []} />;
|
||||
|
||||
+10
-2
@@ -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>[] = [
|
||||
{
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user