Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions incident/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,41 +31,43 @@
"dependencies": {
"@backstage/backend-tasks": "^0.5.11",
"@backstage/catalog-model": "^1.4.3",
"@backstage/core-components": "^0.13.6",
"@backstage/core-plugin-api": "^1.7.0",
"@backstage/errors": "^1.2.3",
"@backstage/plugin-catalog-react": "^1.8.5",
"@backstage/core-components": "^0.18.1",
"@backstage/core-plugin-api": "^1.11.0",
"@backstage/errors": "^1.2.7",
"@backstage/plugin-catalog-react": "^1.21.1",
"@backstage/plugin-home-react": "^0.1.4",
"@backstage/plugin-search-react": "^1.7.1",
"@backstage/theme": "^0.4.3",
"@backstage/theme": "^0.6.8",
"@material-ui/core": "^4.9.13",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.60",
"luxon": "^3.3.0",
"moment": "^2.29.4",
"qs": "^6.11.2",
"react-use": "^17.2.4"
"react-use": "^17.6.0"
},
"peerDependencies": {
"react": "^16.13.1 || ^17.0.0",
"react-dom": "^16.13.1 || ^17.0.0",
"@types/react": "^17.0.0 || ^18.0.0",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
"react-router": "^6.0.0",
"react-router-dom": "^6.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.23.1",
"@backstage/cli": "^0.34.3",
"@backstage/core-app-api": "^1.11.0",
"@backstage/dev-utils": "^1.0.22",
"@backstage/test-utils": "^1.4.4",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^12.1.3",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.0.0",
"@types/node": "*",
"@types/react": "^17.0.0 || ^18.0.0",
"cross-fetch": "^3.1.5",
"msw": "^1.0.0",
"prettier": "3.2.5",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"msw": "^2.11.3",
"prettier": "3.6.2",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
"react-router-dom": "^6.0.0"
},
"files": [
Expand All @@ -77,5 +79,8 @@
"type": "git",
"url": "https://github.com/incident-io/backstage-plugins.git",
"directory": "incident"
},
"resolutions": {
"sha.js": "^2.4.12"
}
}
2 changes: 1 addition & 1 deletion incident/src/components/EntityIncidentCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import CachedIcon from "@material-ui/icons/Cached";
import HistoryIcon from "@material-ui/icons/History";
import WhatshotIcon from "@material-ui/icons/Whatshot";
import { Alert } from "@material-ui/lab";
import React, { useState } from "react";
import { useState } from "react";
import { useIncidentList, useIdentity } from "../../hooks/useIncidentRequest";
import { IncidentListItem } from "../IncidentListItem";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { TestApiProvider, renderInTestApp } from "@backstage/test-utils";
import React from "react";
import { IncidentApi, IncidentApiRef } from "../../api/client";
import { HomePageIncidentCardContent } from "./Content";

Expand Down
1 change: 0 additions & 1 deletion incident/src/components/HomePageIncidentCard/Content.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Progress } from "@backstage/core-components";
import Link from "@material-ui/core/Link";
import { Alert } from "@material-ui/lab";
import React from "react";
import { useIncidentList } from "../../hooks/useIncidentRequest";
import { Typography, List } from "@material-ui/core";
import { IncidentListItem } from "../IncidentListItem";
Expand Down
46 changes: 26 additions & 20 deletions incident/src/components/IncidentListItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/
import { DateTime, Duration } from "luxon";
import { BackstageTheme } from "@backstage/theme";
import {
Chip,
IconButton,
Expand All @@ -24,31 +23,38 @@ import {
Tooltip,
Typography,
makeStyles,
Theme,
} from "@material-ui/core";
import { BackstagePaletteAdditions } from "@backstage/theme";
import OpenInBrowserIcon from "@material-ui/icons/OpenInBrowser";
import React from "react";
import { definitions } from "../../api/types";

const useStyles = makeStyles<BackstageTheme>((theme) => ({
listItemPrimary: {
display: "flex", // vertically align with chip
fontWeight: "bold",
},
warning: {
borderColor: theme.palette.status.warning,
color: theme.palette.status.warning,
"& *": {
color: theme.palette.status.warning,
const useStyles = makeStyles<Theme>((theme) => {
const backstagePalette = theme.palette as typeof theme.palette &
BackstagePaletteAdditions;

return {
listItemPrimary: {
display: "flex", // vertically align with chip
fontWeight: "bold",
},
warning: {
borderColor:
backstagePalette.status?.warning || theme.palette.warning.main,
color: backstagePalette.status?.warning || theme.palette.warning.main,
"& *": {
color: backstagePalette.status?.warning || theme.palette.warning.main,
},
},
},
error: {
borderColor: theme.palette.status.error,
color: theme.palette.status.error,
"& *": {
color: theme.palette.status.error,
error: {
borderColor: backstagePalette.status?.error || theme.palette.error.main,
color: backstagePalette.status?.error || theme.palette.error.main,
"& *": {
color: backstagePalette.status?.error || theme.palette.error.main,
},
},
},
}));
};
});

// Single item in the list of on-going incidents.
export const IncidentListItem = ({
Expand Down
1 change: 1 addition & 0 deletions incident/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "@backstage/cli/config/tsconfig.json",
"include": ["src", "dev"],
"compilerOptions": {
"jsx": "react-jsx",
"outDir": "dist-types",
"declaration": true,
"incremental": false
Expand Down
Loading