@backstage-community/plugin-azure-devops 0.13.2 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/alpha/plugin.esm.js +6 -6
  3. package/dist/alpha/plugin.esm.js.map +1 -1
  4. package/dist/alpha.d.ts +13 -12
  5. package/dist/components/AzureGitTagsIcon/AzureGitTagsIcon.esm.js +2 -2
  6. package/dist/components/AzureGitTagsIcon/AzureGitTagsIcon.esm.js.map +1 -1
  7. package/dist/components/AzurePipelinesIcon/AzurePipelinesIcon.esm.js +25 -22
  8. package/dist/components/AzurePipelinesIcon/AzurePipelinesIcon.esm.js.map +1 -1
  9. package/dist/components/AzurePullRequestsIcon/AzurePullRequestsIcon.esm.js +64 -58
  10. package/dist/components/AzurePullRequestsIcon/AzurePullRequestsIcon.esm.js.map +1 -1
  11. package/dist/components/BuildTable/BuildTable.esm.js +83 -43
  12. package/dist/components/BuildTable/BuildTable.esm.js.map +1 -1
  13. package/dist/components/BuildTable/lib/BuildLogDrawer/BuildLogDrawer.esm.js +21 -5
  14. package/dist/components/BuildTable/lib/BuildLogDrawer/BuildLogDrawer.esm.js.map +1 -1
  15. package/dist/components/EntityPageAzureGitTags/EntityPageAzureGitTags.esm.js +5 -5
  16. package/dist/components/EntityPageAzureGitTags/EntityPageAzureGitTags.esm.js.map +1 -1
  17. package/dist/components/EntityPageAzurePipelines/EntityPageAzurePipelines.esm.js +6 -5
  18. package/dist/components/EntityPageAzurePipelines/EntityPageAzurePipelines.esm.js.map +1 -1
  19. package/dist/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.esm.js +5 -5
  20. package/dist/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.esm.js.map +1 -1
  21. package/dist/components/GitTagTable/GitTagTable.esm.js +12 -6
  22. package/dist/components/GitTagTable/GitTagTable.esm.js.map +1 -1
  23. package/dist/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.esm.js +30 -26
  24. package/dist/components/PullRequestStatusButtonGroup/PullRequestStatusButtonGroup.esm.js.map +1 -1
  25. package/dist/components/PullRequestTable/PullRequestTable.esm.js +30 -19
  26. package/dist/components/PullRequestTable/PullRequestTable.esm.js.map +1 -1
  27. package/dist/components/PullRequestsPage/PullRequestsPage.esm.js +20 -16
  28. package/dist/components/PullRequestsPage/PullRequestsPage.esm.js.map +1 -1
  29. package/dist/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.esm.js +2 -2
  30. package/dist/components/PullRequestsPage/lib/AutoCompleteIcon/AutoCompleteIcon.esm.js.map +1 -1
  31. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.esm.js +37 -28
  32. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCard.esm.js.map +1 -1
  33. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.esm.js +2 -2
  34. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicies.esm.js.map +1 -1
  35. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.esm.js +11 -7
  36. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardPolicy.esm.js.map +1 -1
  37. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.esm.js +2 -2
  38. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewer.esm.js.map +1 -1
  39. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.esm.js +2 -2
  40. package/dist/components/PullRequestsPage/lib/PullRequestCard/PullRequestCardReviewers.esm.js.map +1 -1
  41. package/dist/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.esm.js +5 -5
  42. package/dist/components/PullRequestsPage/lib/PullRequestGrid/PullRequestGrid.esm.js.map +1 -1
  43. package/dist/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.esm.js +10 -7
  44. package/dist/components/PullRequestsPage/lib/PullRequestGridColumn/PullRequestGridColumn.esm.js.map +1 -1
  45. package/dist/components/ReadmeCard/ReadmeCard.esm.js +14 -13
  46. package/dist/components/ReadmeCard/ReadmeCard.esm.js.map +1 -1
  47. package/dist/index.d.ts +7 -9
  48. package/package.json +14 -14
@@ -1,4 +1,5 @@
1
- import React, { useState } from 'react';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import { useState } from 'react';
2
3
  import Box from '@material-ui/core/Box';
3
4
  import Button from '@material-ui/core/Button';
4
5
  import Typography from '@material-ui/core/Typography';
@@ -12,33 +13,63 @@ import { BuildLogDrawer } from './lib/BuildLogDrawer/BuildLogDrawer.esm.js';
12
13
  const getBuildResultComponent = (result) => {
13
14
  switch (result) {
14
15
  case BuildResult.Succeeded:
15
- return /* @__PURE__ */ React.createElement(Typography, { component: "span" }, /* @__PURE__ */ React.createElement(StatusOK, null), " Succeeded");
16
+ return /* @__PURE__ */ jsxs(Typography, { component: "span", children: [
17
+ /* @__PURE__ */ jsx(StatusOK, {}),
18
+ " Succeeded"
19
+ ] });
16
20
  case BuildResult.PartiallySucceeded:
17
- return /* @__PURE__ */ React.createElement(Typography, { component: "span" }, /* @__PURE__ */ React.createElement(StatusWarning, null), " Partially Succeeded");
21
+ return /* @__PURE__ */ jsxs(Typography, { component: "span", children: [
22
+ /* @__PURE__ */ jsx(StatusWarning, {}),
23
+ " Partially Succeeded"
24
+ ] });
18
25
  case BuildResult.Failed:
19
- return /* @__PURE__ */ React.createElement(Typography, { component: "span" }, /* @__PURE__ */ React.createElement(StatusError, null), " Failed");
26
+ return /* @__PURE__ */ jsxs(Typography, { component: "span", children: [
27
+ /* @__PURE__ */ jsx(StatusError, {}),
28
+ " Failed"
29
+ ] });
20
30
  case BuildResult.Canceled:
21
- return /* @__PURE__ */ React.createElement(Typography, { component: "span" }, /* @__PURE__ */ React.createElement(StatusAborted, null), " Canceled");
31
+ return /* @__PURE__ */ jsxs(Typography, { component: "span", children: [
32
+ /* @__PURE__ */ jsx(StatusAborted, {}),
33
+ " Canceled"
34
+ ] });
22
35
  case BuildResult.None:
23
36
  default:
24
- return /* @__PURE__ */ React.createElement(Typography, { component: "span" }, /* @__PURE__ */ React.createElement(StatusWarning, null), " Unknown");
37
+ return /* @__PURE__ */ jsxs(Typography, { component: "span", children: [
38
+ /* @__PURE__ */ jsx(StatusWarning, {}),
39
+ " Unknown"
40
+ ] });
25
41
  }
26
42
  };
27
43
  const getBuildStateComponent = (status, result) => {
28
44
  switch (status) {
29
45
  case BuildStatus.InProgress:
30
- return /* @__PURE__ */ React.createElement(Typography, { component: "span" }, /* @__PURE__ */ React.createElement(StatusRunning, null), " In Progress");
46
+ return /* @__PURE__ */ jsxs(Typography, { component: "span", children: [
47
+ /* @__PURE__ */ jsx(StatusRunning, {}),
48
+ " In Progress"
49
+ ] });
31
50
  case BuildStatus.Completed:
32
51
  return getBuildResultComponent(result);
33
52
  case BuildStatus.Cancelling:
34
- return /* @__PURE__ */ React.createElement(Typography, { component: "span" }, /* @__PURE__ */ React.createElement(StatusAborted, null), " Cancelling");
53
+ return /* @__PURE__ */ jsxs(Typography, { component: "span", children: [
54
+ /* @__PURE__ */ jsx(StatusAborted, {}),
55
+ " Cancelling"
56
+ ] });
35
57
  case BuildStatus.Postponed:
36
- return /* @__PURE__ */ React.createElement(Typography, { component: "span" }, /* @__PURE__ */ React.createElement(StatusPending, null), " Postponed");
58
+ return /* @__PURE__ */ jsxs(Typography, { component: "span", children: [
59
+ /* @__PURE__ */ jsx(StatusPending, {}),
60
+ " Postponed"
61
+ ] });
37
62
  case BuildStatus.NotStarted:
38
- return /* @__PURE__ */ React.createElement(Typography, { component: "span" }, /* @__PURE__ */ React.createElement(StatusAborted, null), " Not Started");
63
+ return /* @__PURE__ */ jsxs(Typography, { component: "span", children: [
64
+ /* @__PURE__ */ jsx(StatusAborted, {}),
65
+ " Not Started"
66
+ ] });
39
67
  case BuildStatus.None:
40
68
  default:
41
- return /* @__PURE__ */ React.createElement(Typography, { component: "span" }, /* @__PURE__ */ React.createElement(StatusWarning, null), " Unknown");
69
+ return /* @__PURE__ */ jsxs(Typography, { component: "span", children: [
70
+ /* @__PURE__ */ jsx(StatusWarning, {}),
71
+ " Unknown"
72
+ ] });
42
73
  }
43
74
  };
44
75
  const BuildTable = ({ items, loading, error }) => {
@@ -61,7 +92,7 @@ const BuildTable = ({ items, loading, error }) => {
61
92
  }));
62
93
  };
63
94
  if (error) {
64
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error }));
95
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ResponseErrorPanel, { error }) });
65
96
  }
66
97
  const columns = [
67
98
  {
@@ -74,7 +105,7 @@ const BuildTable = ({ items, loading, error }) => {
74
105
  title: "Build",
75
106
  field: "title",
76
107
  width: "auto",
77
- render: (row) => /* @__PURE__ */ React.createElement(Link, { to: row.link || "" }, row.title)
108
+ render: (row) => /* @__PURE__ */ jsx(Link, { to: row.link || "", children: row.title })
78
109
  },
79
110
  {
80
111
  title: "Source",
@@ -84,13 +115,13 @@ const BuildTable = ({ items, loading, error }) => {
84
115
  {
85
116
  title: "State",
86
117
  width: "auto",
87
- render: (row) => /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(Typography, { variant: "button" }, getBuildStateComponent(row.status, row.result)))
118
+ render: (row) => /* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", children: /* @__PURE__ */ jsx(Typography, { variant: "button", children: getBuildStateComponent(row.status, row.result) }) })
88
119
  },
89
120
  {
90
121
  title: "Duration",
91
122
  field: "queueTime",
92
123
  width: "auto",
93
- render: (row) => /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(Typography, null, getDurationFromDates(row.startTime, row.finishTime)))
124
+ render: (row) => /* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", children: /* @__PURE__ */ jsx(Typography, { children: getDurationFromDates(row.startTime, row.finishTime) }) })
94
125
  },
95
126
  {
96
127
  title: "Age",
@@ -101,43 +132,52 @@ const BuildTable = ({ items, loading, error }) => {
101
132
  {
102
133
  title: "Logs",
103
134
  width: "auto",
104
- render: (row) => /* @__PURE__ */ React.createElement(
135
+ render: (row) => /* @__PURE__ */ jsx(
105
136
  Button,
106
137
  {
107
138
  variant: "contained",
108
139
  color: "primary",
109
140
  size: "small",
110
141
  onClick: () => handleOpenDrawer(row.id),
111
- disabled: !row.id
112
- },
113
- "View Logs"
142
+ disabled: !row.id,
143
+ children: "View Logs"
144
+ }
114
145
  )
115
146
  }
116
147
  ];
117
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
118
- Table,
119
- {
120
- isLoading: loading,
121
- columns,
122
- options: {
123
- search: true,
124
- paging: true,
125
- pageSize: 5,
126
- showEmptyDataSourceMessage: !loading
127
- },
128
- title: /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(AzurePipelinesIcon, { style: { fontSize: 30 } }), /* @__PURE__ */ React.createElement(Box, { mr: 1 }), "Azure Pipelines - Builds (", items ? items.length : 0, ")"),
129
- data: items ?? []
130
- }
131
- ), /* @__PURE__ */ React.createElement(
132
- BuildLogDrawer,
133
- {
134
- buildId: selectedBuildId,
135
- open: isDrawerOpen,
136
- onClose: handleCloseDrawer,
137
- logsCache,
138
- updateCache: updateLogsCache
139
- }
140
- ));
148
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
149
+ /* @__PURE__ */ jsx(
150
+ Table,
151
+ {
152
+ isLoading: loading,
153
+ columns,
154
+ options: {
155
+ search: true,
156
+ paging: true,
157
+ pageSize: 5,
158
+ showEmptyDataSourceMessage: !loading
159
+ },
160
+ title: /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", children: [
161
+ /* @__PURE__ */ jsx(AzurePipelinesIcon, { style: { fontSize: 30 } }),
162
+ /* @__PURE__ */ jsx(Box, { mr: 1 }),
163
+ "Azure Pipelines - Builds (",
164
+ items ? items.length : 0,
165
+ ")"
166
+ ] }),
167
+ data: items ?? []
168
+ }
169
+ ),
170
+ /* @__PURE__ */ jsx(
171
+ BuildLogDrawer,
172
+ {
173
+ buildId: selectedBuildId,
174
+ open: isDrawerOpen,
175
+ onClose: handleCloseDrawer,
176
+ logsCache,
177
+ updateCache: updateLogsCache
178
+ }
179
+ )
180
+ ] });
141
181
  };
142
182
 
143
183
  export { BuildTable, getBuildResultComponent, getBuildStateComponent };
@@ -1 +1 @@
1
- {"version":3,"file":"BuildTable.esm.js","sources":["../../../src/components/BuildTable/BuildTable.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState } from 'react';\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport {\n BuildResult,\n BuildRun,\n BuildStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport {\n Link,\n ResponseErrorPanel,\n StatusAborted,\n StatusError,\n StatusOK,\n StatusPending,\n StatusRunning,\n StatusWarning,\n Table,\n TableColumn,\n} from '@backstage/core-components';\n\nimport { AzurePipelinesIcon } from '../AzurePipelinesIcon';\nimport { DateTime } from 'luxon';\nimport React from 'react';\nimport { getDurationFromDates } from '../../utils/getDurationFromDates';\nimport { BuildLogDrawer } from './lib/BuildLogDrawer';\n\nexport const getBuildResultComponent = (result: number | undefined) => {\n switch (result) {\n case BuildResult.Succeeded:\n return (\n <Typography component=\"span\">\n <StatusOK /> Succeeded\n </Typography>\n );\n case BuildResult.PartiallySucceeded:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Partially Succeeded\n </Typography>\n );\n case BuildResult.Failed:\n return (\n <Typography component=\"span\">\n <StatusError /> Failed\n </Typography>\n );\n case BuildResult.Canceled:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Canceled\n </Typography>\n );\n case BuildResult.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nexport const getBuildStateComponent = (\n status: number | undefined,\n result: number | undefined,\n) => {\n switch (status) {\n case BuildStatus.InProgress:\n return (\n <Typography component=\"span\">\n <StatusRunning /> In Progress\n </Typography>\n );\n case BuildStatus.Completed:\n return getBuildResultComponent(result);\n case BuildStatus.Cancelling:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Cancelling\n </Typography>\n );\n case BuildStatus.Postponed:\n return (\n <Typography component=\"span\">\n <StatusPending /> Postponed\n </Typography>\n );\n case BuildStatus.NotStarted:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Not Started\n </Typography>\n );\n case BuildStatus.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\ntype BuildTableProps = {\n items?: BuildRun[];\n loading: boolean;\n error?: Error;\n};\n\nexport const BuildTable = ({ items, loading, error }: BuildTableProps) => {\n // State for log drawer\n const [selectedBuildId, setSelectedBuildId] = useState<number | undefined>(\n undefined,\n );\n const [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\n const handleOpenDrawer = (buildId?: number) => {\n setSelectedBuildId(buildId);\n setIsDrawerOpen(true);\n };\n\n const handleCloseDrawer = () => {\n setIsDrawerOpen(false);\n };\n\n // Cache build logs\n const [logsCache, setLogsCache] = useState<Record<number, string[]>>({});\n\n const updateLogsCache = (buildId: number, logs: string[]) => {\n setLogsCache(prev => ({\n ...prev,\n [buildId]: logs,\n }));\n };\n\n if (error) {\n return (\n <div>\n <ResponseErrorPanel error={error} />\n </div>\n );\n }\n\n const columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'id',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Build',\n field: 'title',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Link to={row.link || ''}>{row.title}</Link>\n ),\n },\n {\n title: 'Source',\n field: 'source',\n width: 'auto',\n },\n {\n title: 'State',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography variant=\"button\">\n {getBuildStateComponent(row.status, row.result)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Duration',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography>\n {getDurationFromDates(row.startTime, row.finishTime)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Age',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) =>\n (row.queueTime\n ? DateTime.fromISO(row.queueTime)\n : DateTime.now()\n ).toRelative(),\n },\n {\n title: 'Logs',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Button\n variant=\"contained\"\n color=\"primary\"\n size=\"small\"\n onClick={() => handleOpenDrawer(row.id)}\n disabled={!row.id}\n >\n View Logs\n </Button>\n ),\n },\n ];\n\n return (\n <>\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePipelinesIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Pipelines - Builds ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n\n <BuildLogDrawer\n buildId={selectedBuildId}\n open={isDrawerOpen}\n onClose={handleCloseDrawer}\n logsCache={logsCache}\n updateCache={updateLogsCache}\n />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AA2Ca,MAAA,uB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KAAA,CAAA,aAAA,CAAC,kBAAmB,EAAA,EAAA,KAAA,EAAO,EAAE,QAAA,EAAU,IAAM,EAAA,CAAA,kBAC5C,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,CAAA,EAAG,CAAE,EAAA,4BAAA,EACa,KAAQ,GAAA,KAAA,CAAM,MAAS,GAAA,CAAA,EAAE,GACtD,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS;AAAC;AAAA,GAGlB,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,OAAS,EAAA,eAAA;AAAA,MACT,IAAM,EAAA,YAAA;AAAA,MACN,OAAS,EAAA,iBAAA;AAAA,MACT,SAAA;AAAA,MACA,WAAa,EAAA;AAAA;AAAA,GAEjB,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"BuildTable.esm.js","sources":["../../../src/components/BuildTable/BuildTable.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState } from 'react';\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport {\n BuildResult,\n BuildRun,\n BuildStatus,\n} from '@backstage-community/plugin-azure-devops-common';\nimport {\n Link,\n ResponseErrorPanel,\n StatusAborted,\n StatusError,\n StatusOK,\n StatusPending,\n StatusRunning,\n StatusWarning,\n Table,\n TableColumn,\n} from '@backstage/core-components';\n\nimport { AzurePipelinesIcon } from '../AzurePipelinesIcon';\nimport { DateTime } from 'luxon';\nimport { getDurationFromDates } from '../../utils/getDurationFromDates';\nimport { BuildLogDrawer } from './lib/BuildLogDrawer';\n\nexport const getBuildResultComponent = (result: number | undefined) => {\n switch (result) {\n case BuildResult.Succeeded:\n return (\n <Typography component=\"span\">\n <StatusOK /> Succeeded\n </Typography>\n );\n case BuildResult.PartiallySucceeded:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Partially Succeeded\n </Typography>\n );\n case BuildResult.Failed:\n return (\n <Typography component=\"span\">\n <StatusError /> Failed\n </Typography>\n );\n case BuildResult.Canceled:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Canceled\n </Typography>\n );\n case BuildResult.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\nexport const getBuildStateComponent = (\n status: number | undefined,\n result: number | undefined,\n) => {\n switch (status) {\n case BuildStatus.InProgress:\n return (\n <Typography component=\"span\">\n <StatusRunning /> In Progress\n </Typography>\n );\n case BuildStatus.Completed:\n return getBuildResultComponent(result);\n case BuildStatus.Cancelling:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Cancelling\n </Typography>\n );\n case BuildStatus.Postponed:\n return (\n <Typography component=\"span\">\n <StatusPending /> Postponed\n </Typography>\n );\n case BuildStatus.NotStarted:\n return (\n <Typography component=\"span\">\n <StatusAborted /> Not Started\n </Typography>\n );\n case BuildStatus.None:\n default:\n return (\n <Typography component=\"span\">\n <StatusWarning /> Unknown\n </Typography>\n );\n }\n};\n\ntype BuildTableProps = {\n items?: BuildRun[];\n loading: boolean;\n error?: Error;\n};\n\nexport const BuildTable = ({ items, loading, error }: BuildTableProps) => {\n // State for log drawer\n const [selectedBuildId, setSelectedBuildId] = useState<number | undefined>(\n undefined,\n );\n const [isDrawerOpen, setIsDrawerOpen] = useState(false);\n\n const handleOpenDrawer = (buildId?: number) => {\n setSelectedBuildId(buildId);\n setIsDrawerOpen(true);\n };\n\n const handleCloseDrawer = () => {\n setIsDrawerOpen(false);\n };\n\n // Cache build logs\n const [logsCache, setLogsCache] = useState<Record<number, string[]>>({});\n\n const updateLogsCache = (buildId: number, logs: string[]) => {\n setLogsCache(prev => ({\n ...prev,\n [buildId]: logs,\n }));\n };\n\n if (error) {\n return (\n <div>\n <ResponseErrorPanel error={error} />\n </div>\n );\n }\n\n const columns: TableColumn[] = [\n {\n title: 'ID',\n field: 'id',\n highlight: false,\n width: 'auto',\n },\n {\n title: 'Build',\n field: 'title',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Link to={row.link || ''}>{row.title}</Link>\n ),\n },\n {\n title: 'Source',\n field: 'source',\n width: 'auto',\n },\n {\n title: 'State',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography variant=\"button\">\n {getBuildStateComponent(row.status, row.result)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Duration',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Typography>\n {getDurationFromDates(row.startTime, row.finishTime)}\n </Typography>\n </Box>\n ),\n },\n {\n title: 'Age',\n field: 'queueTime',\n width: 'auto',\n render: (row: Partial<BuildRun>) =>\n (row.queueTime\n ? DateTime.fromISO(row.queueTime)\n : DateTime.now()\n ).toRelative(),\n },\n {\n title: 'Logs',\n width: 'auto',\n render: (row: Partial<BuildRun>) => (\n <Button\n variant=\"contained\"\n color=\"primary\"\n size=\"small\"\n onClick={() => handleOpenDrawer(row.id)}\n disabled={!row.id}\n >\n View Logs\n </Button>\n ),\n },\n ];\n\n return (\n <>\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzurePipelinesIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Pipelines - Builds ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n\n <BuildLogDrawer\n buildId={selectedB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useEffect } from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useState, useCallback, useEffect } from 'react';
2
3
  import Drawer from '@material-ui/core/Drawer';
3
4
  import Typography from '@material-ui/core/Typography';
4
5
  import LinearProgress from '@material-ui/core/LinearProgress';
@@ -92,7 +93,7 @@ const BuildLogDrawer = ({
92
93
  }
93
94
  }
94
95
  }, [buildId, open, fetchLogs, logsCache]);
95
- return /* @__PURE__ */ React.createElement(
96
+ return /* @__PURE__ */ jsx(
96
97
  Drawer,
97
98
  {
98
99
  anchor: "right",
@@ -100,9 +101,24 @@ const BuildLogDrawer = ({
100
101
  onClose,
101
102
  classes: {
102
103
  paper: classes.logDrawer
103
- }
104
- },
105
- /* @__PURE__ */ React.createElement("div", { className: classes.content }, /* @__PURE__ */ React.createElement("div", { className: classes.header }, /* @__PURE__ */ React.createElement(Typography, { variant: "h6" }, "Build Logs ", buildId ? `(Build #${buildId})` : ""), /* @__PURE__ */ React.createElement(IconButton, { onClick: onClose, "aria-label": "close" }, /* @__PURE__ */ React.createElement(CloseIcon, null))), loading && /* @__PURE__ */ React.createElement(LinearProgress, null), error && /* @__PURE__ */ React.createElement(Typography, { color: "error" }, "Error loading logs: ", error.message), !loading && !error && logs.length === 0 && /* @__PURE__ */ React.createElement(Typography, null, "No logs available"), !loading && !error && logs.length > 0 && /* @__PURE__ */ React.createElement(Box, { component: "pre", className: classes.logContainer }, logs.join("\n")))
104
+ },
105
+ children: /* @__PURE__ */ jsxs("div", { className: classes.content, children: [
106
+ /* @__PURE__ */ jsxs("div", { className: classes.header, children: [
107
+ /* @__PURE__ */ jsxs(Typography, { variant: "h6", children: [
108
+ "Build Logs ",
109
+ buildId ? `(Build #${buildId})` : ""
110
+ ] }),
111
+ /* @__PURE__ */ jsx(IconButton, { onClick: onClose, "aria-label": "close", children: /* @__PURE__ */ jsx(CloseIcon, {}) })
112
+ ] }),
113
+ loading && /* @__PURE__ */ jsx(LinearProgress, {}),
114
+ error && /* @__PURE__ */ jsxs(Typography, { color: "error", children: [
115
+ "Error loading logs: ",
116
+ error.message
117
+ ] }),
118
+ !loading && !error && logs.length === 0 && /* @__PURE__ */ jsx(Typography, { children: "No logs available" }),
119
+ !loading && !error && logs.length > 0 && /* @__PURE__ */ jsx(Box, { component: "pre", className: classes.logContainer, children: logs.join("\n") })
120
+ ] })
121
+ }
106
122
  );
107
123
  };
108
124
 
@@ -1 +1 @@
1
- {"version":3,"file":"BuildLogDrawer.esm.js","sources":["../../../../../src/components/BuildTable/lib/BuildLogDrawer/BuildLogDrawer.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React, { useState, useEffect, useCallback } from 'react';\nimport Drawer from '@material-ui/core/Drawer';\nimport Typography from '@material-ui/core/Typography';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport Box from '@material-ui/core/Box';\nimport IconButton from '@material-ui/core/IconButton';\nimport { makeStyles } from '@material-ui/core/styles';\nimport CloseIcon from '@material-ui/icons/Close';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { azureDevOpsApiRef } from '../../../../api';\nimport { getAnnotationValuesFromEntity } from '../../../../utils';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nconst useDrawerStyles = makeStyles(theme => ({\n logDrawer: {\n width: '40%',\n minWidth: '500px',\n padding: theme.spacing(2),\n },\n header: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginBottom: theme.spacing(2),\n borderBottom: `1px solid ${theme.palette.divider}`,\n paddingBottom: theme.spacing(1),\n },\n content: {\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n },\n logContainer: {\n flexGrow: 1,\n overflow: 'auto',\n backgroundColor: theme.palette.background.default,\n padding: theme.spacing(2),\n borderRadius: theme.shape.borderRadius,\n marginTop: theme.spacing(2),\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.fontSize,\n },\n}));\n\ntype BuildLogDrawerProps = {\n buildId?: number;\n open: boolean;\n onClose: () => void;\n logsCache: Record<number, string[]>;\n updateCache: (buildId: number, logs: string[]) => void;\n};\n\nexport const BuildLogDrawer = ({\n buildId,\n open,\n onClose,\n logsCache,\n updateCache,\n}: BuildLogDrawerProps) => {\n const [loading, setLoading] = useState(false);\n const [logs, setLogs] = useState<string[]>([]);\n const [error, setError] = useState<Error | undefined>();\n const { entity } = useEntity();\n const azureApi = useApi(azureDevOpsApiRef);\n const classes = useDrawerStyles();\n\n const fetchLogs = useCallback(async () => {\n if (!buildId) {\n setError(new Error('Missing ID for build'));\n return;\n }\n\n setLoading(true);\n setError(undefined);\n setLogs([]);\n\n try {\n const { project, host, org } = getAnnotationValuesFromEntity(entity);\n const response = await azureApi.getBuildRunLog(\n project,\n stringifyEntityRef(entity),\n buildId,\n host,\n org,\n );\n\n setLogs(response.log);\n updateCache(buildId, response.log);\n } catch (err) {\n setError(err as Error);\n } finally {\n setLoading(false);\n }\n }, [buildId, entity, azureApi, updateCache]);\n\n // Reset logs when a different build is selected\n useEffect(() => {\n if (buildId && open) {\n // Check logs in cache first\n if (logsCache[buildId]) {\n setLogs(logsCache[buildId]);\n } else {\n fetchLogs();\n }\n }\n }, [buildId, open, fetchLogs, logsCache]);\n\n return (\n <Drawer\n anchor=\"right\"\n open={open}\n onClose={onClose}\n classes={{\n paper: classes.logDrawer,\n }}\n >\n <div className={classes.content}>\n <div className={classes.header}>\n <Typography variant=\"h6\">\n Build Logs {buildId ? `(Build #${buildId})` : ''}\n </Typography>\n <IconButton onClick={onClose} aria-label=\"close\">\n <CloseIcon />\n </IconButton>\n </div>\n\n {loading && <LinearProgress />}\n\n {error && (\n <Typography color=\"error\">\n Error loading logs: {error.message}\n </Typography>\n )}\n\n {!loading && !error && logs.length === 0 && (\n <Typography>No logs available</Typography>\n )}\n\n {!loading && !error && logs.length > 0 && (\n <Box component=\"pre\" className={classes.logContainer}>\n {logs.join('\\n')}\n </Box>\n )}\n </div>\n </Drawer>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA6BA,MAAM,eAAA,GAAkB,WAAW,CAAU,KAAA,MAAA;AAAA,EAC3C,SAAW,EAAA;AAAA,IACT,KAAO,EAAA,KAAA;AAAA,IACP,QAAU,EAAA,OAAA;AAAA,IACV,OAAA,EAAS,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA,GAC1B;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,OAAS,EAAA,MAAA;AAAA,IACT,cAAgB,EAAA,eAAA;AAAA,IAChB,UAAY,EAAA,QAAA;AAAA,IACZ,YAAA,EAAc,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IAC7B,YAAc,EAAA,CAAA,UAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,OAAO,CAAA,CAAA;AAAA,IAChD,aAAA,EAAe,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA,GAChC;AAAA,EACA,OAAS,EAAA;AAAA,IACP,MAAQ,EAAA,MAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,aAAe,EAAA;AAAA,GACjB;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,QAAU,EAAA,CAAA;AAAA,IACV,QAAU,EAAA,MAAA;AAAA,IACV,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,UAAW,CAAA,OAAA;AAAA,IAC1C,OAAA,EAAS,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IACxB,YAAA,EAAc,MAAM,KAAM,CAAA,YAAA;AAAA,IAC1B,SAAA,EAAW,KAAM,CAAA,OAA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,CAAC,oBAAe,CAE3B,EAAA,KAAA,oBACE,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,KAAM,EAAA,OAAA,EAAA,EAAQ,sBACH,EAAA,KAAA,CAAM,OAC7B,CAGD,EAAA,CAAC,OAAW,IAAA,CAAC,SAAS,IAAK,CAAA,MAAA,KAAW,CACrC,oBAAA,KAAA,CAAA,aAAA,CAAC,kBAAW,mBAAiB,CAAA,EAG9B,CAAC,OAAA,IAAW,CAAC,KAAS,IAAA,IAAA,CAAK,MAAS,GAAA,CAAA,wCAClC,GAAI,EAAA,EAAA,SAAA,EAAU,KAAM,EAAA,SAAA,EAAW,QAAQ,YACrC,EAAA,EAAA,IAAA,CAAK,IAAK,CAAA,IAAI,CACjB,CAEJ;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"BuildLogDrawer.esm.js","sources":["../../../../../src/components/BuildTable/lib/BuildLogDrawer/BuildLogDrawer.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState, useEffect, useCallback } from 'react';\nimport Drawer from '@material-ui/core/Drawer';\nimport Typography from '@material-ui/core/Typography';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport Box from '@material-ui/core/Box';\nimport IconButton from '@material-ui/core/IconButton';\nimport { makeStyles } from '@material-ui/core/styles';\nimport CloseIcon from '@material-ui/icons/Close';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { azureDevOpsApiRef } from '../../../../api';\nimport { getAnnotationValuesFromEntity } from '../../../../utils';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nconst useDrawerStyles = makeStyles(theme => ({\n logDrawer: {\n width: '40%',\n minWidth: '500px',\n padding: theme.spacing(2),\n },\n header: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginBottom: theme.spacing(2),\n borderBottom: `1px solid ${theme.palette.divider}`,\n paddingBottom: theme.spacing(1),\n },\n content: {\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n },\n logContainer: {\n flexGrow: 1,\n overflow: 'auto',\n backgroundColor: theme.palette.background.default,\n padding: theme.spacing(2),\n borderRadius: theme.shape.borderRadius,\n marginTop: theme.spacing(2),\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.fontSize,\n },\n}));\n\ntype BuildLogDrawerProps = {\n buildId?: number;\n open: boolean;\n onClose: () => void;\n logsCache: Record<number, string[]>;\n updateCache: (buildId: number, logs: string[]) => void;\n};\n\nexport const BuildLogDrawer = ({\n buildId,\n open,\n onClose,\n logsCache,\n updateCache,\n}: BuildLogDrawerProps) => {\n const [loading, setLoading] = useState(false);\n const [logs, setLogs] = useState<string[]>([]);\n const [error, setError] = useState<Error | undefined>();\n const { entity } = useEntity();\n const azureApi = useApi(azureDevOpsApiRef);\n const classes = useDrawerStyles();\n\n const fetchLogs = useCallback(async () => {\n if (!buildId) {\n setError(new Error('Missing ID for build'));\n return;\n }\n\n setLoading(true);\n setError(undefined);\n setLogs([]);\n\n try {\n const { project, host, org } = getAnnotationValuesFromEntity(entity);\n const response = await azureApi.getBuildRunLog(\n project,\n stringifyEntityRef(entity),\n buildId,\n host,\n org,\n );\n\n setLogs(response.log);\n updateCache(buildId, response.log);\n } catch (err) {\n setError(err as Error);\n } finally {\n setLoading(false);\n }\n }, [buildId, entity, azureApi, updateCache]);\n\n // Reset logs when a different build is selected\n useEffect(() => {\n if (buildId && open) {\n // Check logs in cache first\n if (logsCache[buildId]) {\n setLogs(logsCache[buildId]);\n } else {\n fetchLogs();\n }\n }\n }, [buildId, open, fetchLogs, logsCache]);\n\n return (\n <Drawer\n anchor=\"right\"\n open={open}\n onClose={onClose}\n classes={{\n paper: classes.logDrawer,\n }}\n >\n <div className={classes.content}>\n <div className={classes.header}>\n <Typography variant=\"h6\">\n Build Logs {buildId ? `(Build #${buildId})` : ''}\n </Typography>\n <IconButton onClick={onClose} aria-label=\"close\">\n <CloseIcon />\n </IconButton>\n </div>\n\n {loading && <LinearProgress />}\n\n {error && (\n <Typography color=\"error\">\n Error loading logs: {error.message}\n </Typography>\n )}\n\n {!loading && !error && logs.length === 0 && (\n <Typography>No logs available</Typography>\n )}\n\n {!loading && !error && logs.length > 0 && (\n <Box component=\"pre\" className={classes.logContainer}>\n {logs.join('\\n')}\n </Box>\n )}\n </div>\n </Drawer>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,MAAM,eAAA,GAAkB,WAAW,CAAU,KAAA,MAAA;AAAA,EAC3C,SAAW,EAAA;AAAA,IACT,KAAO,EAAA,KAAA;AAAA,IACP,QAAU,EAAA,OAAA;AAAA,IACV,OAAA,EAAS,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA,GAC1B;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,OAAS,EAAA,MAAA;AAAA,IACT,cAAgB,EAAA,eAAA;AAAA,IAChB,UAAY,EAAA,QAAA;AAAA,IACZ,YAAA,EAAc,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IAC7B,YAAc,EAAA,CAAA,UAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,OAAO,CAAA,CAAA;AAAA,IAChD,aAAA,EAAe,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA,GAChC;AAAA,EACA,OAAS,EAAA;AAAA,IACP,MAAQ,EAAA,MAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,aAAe,EAAA;AAAA,GACjB;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,QAAU,EAAA,CAAA;AAAA,IACV,Q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AA;AAAA,YACX,OAAA,GAAU,CAAW,QAAA,EAAA,OAAO,CAAM,CAAA,CAAA,GAAA;AAAA,WAChD,EAAA,CAAA;AAAA,0BACA,GAAA,CAAC,cAAW,OAAS,EAAA,OAAA,EAAS,cAAW,OACvC,EAAA,QAAA,kBAAA,GAAA,CAAC,aAAU,CACb,EAAA;AAAA,SACF,EAAA,CAAA;AAAA,QAEC,OAAA,wBAAY,cAAe,EAAA,EAAA,CAAA;AAAA,QAE3B,KACC,oBAAA,IAAA,CAAC,UAAW,EAAA,EAAA,KAAA,EAAM,OAAQ,EAAA,QAAA,EAAA;AAAA,UAAA,sBAAA;AAAA,UACH,KAAM,CAAA;AAAA,SAC7B,EAAA,CAAA;AAAA,QAGD,CAAC,WAAW,CAAC,KAAA,IAAS,KAAK,MAAW,KAAA,CAAA,oBACpC,GAAA,CAAA,UAAA,EAAA,EAAW,QAAiB,EAAA,mBAAA,EAAA,CAAA;AAAA,QAG9B,CAAC,OAAW,IAAA,CAAC,KAAS,IAAA,IAAA,CAAK,SAAS,CACnC,oBAAA,GAAA,CAAC,GAAI,EAAA,EAAA,SAAA,EAAU,OAAM,SAAW,EAAA,OAAA,CAAQ,cACrC,QAAK,EAAA,IAAA,CAAA,IAAA,CAAK,IAAI,CACjB,EAAA;AAAA,OAEJ,EAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -1,20 +1,20 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { azureDevOpsGitTagReadPermission } from '@backstage-community/plugin-azure-devops-common';
2
3
  import { GitTagTable } from '../GitTagTable/GitTagTable.esm.js';
3
- import React from 'react';
4
4
  import { stringifyEntityRef } from '@backstage/catalog-model';
5
5
  import { useEntity } from '@backstage/plugin-catalog-react';
6
6
  import { RequirePermission } from '@backstage/plugin-permission-react';
7
7
 
8
8
  const EntityPageAzureGitTags = () => {
9
9
  const { entity } = useEntity();
10
- return /* @__PURE__ */ React.createElement(
10
+ return /* @__PURE__ */ jsx(
11
11
  RequirePermission,
12
12
  {
13
13
  permission: azureDevOpsGitTagReadPermission,
14
14
  resourceRef: stringifyEntityRef(entity),
15
- errorPage: null
16
- },
17
- /* @__PURE__ */ React.createElement(GitTagTable, null)
15
+ errorPage: null,
16
+ children: /* @__PURE__ */ jsx(GitTagTable, {})
17
+ }
18
18
  );
19
19
  };
20
20
 
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageAzureGitTags.esm.js","sources":["../../../src/components/EntityPageAzureGitTags/EntityPageAzureGitTags.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { azureDevOpsGitTagReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { GitTagTable } from '../GitTagTable/GitTagTable';\nimport React from 'react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzureGitTags = () => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsGitTagReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <GitTagTable />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAuBO,MAAM,yBAAyB,MAAM;AAC1C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,+BAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA;AAAA,KAAA;AAAA,wCAEV,WAAY,EAAA,IAAA;AAAA,GACf;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityPageAzureGitTags.esm.js","sources":["../../../src/components/EntityPageAzureGitTags/EntityPageAzureGitTags.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { azureDevOpsGitTagReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { GitTagTable } from '../GitTagTable/GitTagTable';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzureGitTags = () => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsGitTagReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <GitTagTable />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAsBO,MAAM,yBAAyB,MAAM;AAC1C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EACE,uBAAA,GAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,+BAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA,IAAA;AAAA,MAEX,8BAAC,WAAY,EAAA,EAAA;AAAA;AAAA,GACf;AAEJ;;;;"}
@@ -1,11 +1,12 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { BuildTable } from '../BuildTable/BuildTable.esm.js';
2
- import React from 'react';
3
3
  import '../../api/AzureDevOpsApi.esm.js';
4
4
  import '@backstage/errors';
5
5
  import '@backstage/core-plugin-api';
6
6
  import 'react-use/esm/useAsync';
7
7
  import 'react-use/esm/useAsyncRetry';
8
8
  import 'react-use/esm/useInterval';
9
+ import 'react';
9
10
  import { azureDevOpsPipelineReadPermission } from '@backstage-community/plugin-azure-devops-common';
10
11
  import { stringifyEntityRef } from '@backstage/catalog-model';
11
12
  import 'luxon';
@@ -17,14 +18,14 @@ import { RequirePermission } from '@backstage/plugin-permission-react';
17
18
  const EntityPageAzurePipelines = (props) => {
18
19
  const { entity } = useEntity();
19
20
  const { items, loading, error } = useBuildRuns(entity, props.defaultLimit);
20
- return /* @__PURE__ */ React.createElement(
21
+ return /* @__PURE__ */ jsx(
21
22
  RequirePermission,
22
23
  {
23
24
  permission: azureDevOpsPipelineReadPermission,
24
25
  resourceRef: stringifyEntityRef(entity),
25
- errorPage: null
26
- },
27
- /* @__PURE__ */ React.createElement(BuildTable, { items, loading, error })
26
+ errorPage: null,
27
+ children: /* @__PURE__ */ jsx(BuildTable, { items, loading, error })
28
+ }
28
29
  );
29
30
  };
30
31
 
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageAzurePipelines.esm.js","sources":["../../../src/components/EntityPageAzurePipelines/EntityPageAzurePipelines.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BuildTable } from '../BuildTable/BuildTable';\nimport React from 'react';\nimport { useBuildRuns } from '../../hooks';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { azureDevOpsPipelineReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzurePipelines = (props: { defaultLimit?: number }) => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useBuildRuns(entity, props.defaultLimit);\n\n return (\n <RequirePermission\n permission={azureDevOpsPipelineReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <BuildTable items={items} loading={loading} error={error} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBa,MAAA,wBAAA,GAA2B,CAAC,KAAqC,KAAA;AAC5E,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAE7B,EAAM,MAAA,EAAE,OAAO,OAAS,EAAA,KAAA,KAAU,YAAa,CAAA,MAAA,EAAQ,MAAM,YAAY,CAAA;AAEzE,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,iCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,KAAc,EAAA,OAAA,EAAkB,KAAc,EAAA;AAAA,GAC5D;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityPageAzurePipelines.esm.js","sources":["../../../src/components/EntityPageAzurePipelines/EntityPageAzurePipelines.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BuildTable } from '../BuildTable/BuildTable';\nimport { useBuildRuns } from '../../hooks';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { azureDevOpsPipelineReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nexport const EntityPageAzurePipelines = (props: { defaultLimit?: number }) => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useBuildRuns(entity, props.defaultLimit);\n\n return (\n <RequirePermission\n permission={azureDevOpsPipelineReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <BuildTable items={items} loading={loading} error={error} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuBa,MAAA,wBAAA,GAA2B,CAAC,KAAqC,KAAA;AAC5E,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAE7B,EAAM,MAAA,EAAE,OAAO,OAAS,EAAA,KAAA,KAAU,YAAa,CAAA,MAAA,EAAQ,MAAM,YAAY,CAAA;AAEzE,EACE,uBAAA,GAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,iCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA,IAAA;AAAA,MAEX,QAAC,kBAAA,GAAA,CAAA,UAAA,EAAA,EAAW,KAAc,EAAA,OAAA,EAAkB,KAAc,EAAA;AAAA;AAAA,GAC5D;AAEJ;;;;"}
@@ -1,20 +1,20 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { azureDevOpsPullRequestReadPermission } from '@backstage-community/plugin-azure-devops-common';
2
3
  import { PullRequestTable } from '../PullRequestTable/PullRequestTable.esm.js';
3
- import React from 'react';
4
4
  import { RequirePermission } from '@backstage/plugin-permission-react';
5
5
  import { useEntity } from '@backstage/plugin-catalog-react';
6
6
  import { stringifyEntityRef } from '@backstage/catalog-model';
7
7
 
8
8
  const EntityPageAzurePullRequests = (props) => {
9
9
  const { entity } = useEntity();
10
- return /* @__PURE__ */ React.createElement(
10
+ return /* @__PURE__ */ jsx(
11
11
  RequirePermission,
12
12
  {
13
13
  permission: azureDevOpsPullRequestReadPermission,
14
14
  resourceRef: stringifyEntityRef(entity),
15
- errorPage: null
16
- },
17
- /* @__PURE__ */ React.createElement(PullRequestTable, { defaultLimit: props.defaultLimit })
15
+ errorPage: null,
16
+ children: /* @__PURE__ */ jsx(PullRequestTable, { defaultLimit: props.defaultLimit })
17
+ }
18
18
  );
19
19
  };
20
20
 
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageAzurePullRequests.esm.js","sources":["../../../src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { azureDevOpsPullRequestReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestTable } from '../PullRequestTable/PullRequestTable';\nimport React from 'react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\n\nexport const EntityPageAzurePullRequests = (props: {\n defaultLimit?: number;\n}) => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsPullRequestReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <PullRequestTable defaultLimit={props.defaultLimit} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAuBa,MAAA,2BAAA,GAA8B,CAAC,KAEtC,KAAA;AACJ,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,oCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA;AAAA,KAAA;AAAA,oBAEV,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,EAAiB,YAAc,EAAA,KAAA,CAAM,YAAc,EAAA;AAAA,GACtD;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityPageAzurePullRequests.esm.js","sources":["../../../src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { azureDevOpsPullRequestReadPermission } from '@backstage-community/plugin-azure-devops-common';\nimport { PullRequestTable } from '../PullRequestTable/PullRequestTable';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\n\nexport const EntityPageAzurePullRequests = (props: {\n defaultLimit?: number;\n}) => {\n const { entity } = useEntity();\n return (\n <RequirePermission\n permission={azureDevOpsPullRequestReadPermission}\n resourceRef={stringifyEntityRef(entity)}\n errorPage={null}\n >\n <PullRequestTable defaultLimit={props.defaultLimit} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAsBa,MAAA,2BAAA,GAA8B,CAAC,KAEtC,KAAA;AACJ,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EACE,uBAAA,GAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,oCAAA;AAAA,MACZ,WAAA,EAAa,mBAAmB,MAAM,CAAA;AAAA,MACtC,SAAW,EAAA,IAAA;AAAA,MAEX,QAAC,kBAAA,GAAA,CAAA,gBAAA,EAAA,EAAiB,YAAc,EAAA,KAAA,CAAM,YAAc,EAAA;AAAA;AAAA,GACtD;AAEJ;;;;"}
@@ -1,6 +1,6 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
1
2
  import Box from '@material-ui/core/Box';
2
3
  import { ResponseErrorPanel, Table, Link } from '@backstage/core-components';
3
- import React from 'react';
4
4
  import { AzureGitTagsIcon } from '../AzureGitTagsIcon/AzureGitTagsIcon.esm.js';
5
5
  import { useEntity } from '@backstage/plugin-catalog-react';
6
6
  import { useGitTags } from '../../hooks/useGitTags.esm.js';
@@ -12,13 +12,13 @@ const columns = [
12
12
  highlight: false,
13
13
  defaultSort: "desc",
14
14
  width: "auto",
15
- render: (row) => /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(Link, { to: row.link ?? "" }, row.name))
15
+ render: (row) => /* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", children: /* @__PURE__ */ jsx(Link, { to: row.link ?? "", children: row.name }) })
16
16
  },
17
17
  {
18
18
  title: "Commit",
19
19
  field: "peeledObjectId",
20
20
  width: "auto",
21
- render: (row) => /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(Link, { to: row.commitLink ?? "" }, row.peeledObjectId))
21
+ render: (row) => /* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", children: /* @__PURE__ */ jsx(Link, { to: row.commitLink ?? "", children: row.peeledObjectId }) })
22
22
  },
23
23
  {
24
24
  title: "Created By",
@@ -30,9 +30,9 @@ const GitTagTable = () => {
30
30
  const { entity } = useEntity();
31
31
  const { items, loading, error } = useGitTags(entity);
32
32
  if (error) {
33
- return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error });
33
+ return /* @__PURE__ */ jsx(ResponseErrorPanel, { error });
34
34
  }
35
- return /* @__PURE__ */ React.createElement(
35
+ return /* @__PURE__ */ jsx(
36
36
  Table,
37
37
  {
38
38
  isLoading: loading,
@@ -43,7 +43,13 @@ const GitTagTable = () => {
43
43
  pageSize: 5,
44
44
  showEmptyDataSourceMessage: !loading
45
45
  },
46
- title: /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(AzureGitTagsIcon, { style: { fontSize: 30 } }), /* @__PURE__ */ React.createElement(Box, { mr: 1 }), "Azure Repos - Git Tags (", items ? items.length : 0, ")"),
46
+ title: /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", children: [
47
+ /* @__PURE__ */ jsx(AzureGitTagsIcon, { style: { fontSize: 30 } }),
48
+ /* @__PURE__ */ jsx(Box, { mr: 1 }),
49
+ "Azure Repos - Git Tags (",
50
+ items ? items.length : 0,
51
+ ")"
52
+ ] }),
47
53
  data: items ?? []
48
54
  }
49
55
  );
@@ -1 +1 @@
1
- {"version":3,"file":"GitTagTable.esm.js","sources":["../../../src/components/GitTagTable/GitTagTable.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport { GitTag } from '@backstage-community/plugin-azure-devops-common';\nimport React from 'react';\n\nimport { AzureGitTagsIcon } from '../AzureGitTagsIcon';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useGitTags } from '../../hooks/useGitTags';\n\nconst columns: TableColumn[] = [\n {\n title: 'Tag',\n field: 'name',\n highlight: false,\n defaultSort: 'desc',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.name}</Link>\n </Box>\n ),\n },\n {\n title: 'Commit',\n field: 'peeledObjectId',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.commitLink ?? ''}>{row.peeledObjectId}</Link>\n </Box>\n ),\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n];\n\nexport const GitTagTable = () => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useGitTags(entity);\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzureGitTagsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Git Tags ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8BA,MAAM,OAAyB,GAAA;AAAA,EAC7B;AAAA,IACE,KAAO,EAAA,KAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,SAAW,EAAA,KAAA;AAAA,IACX,WAAa,EAAA,MAAA;AAAA,IACb,KAAO,EAAA,MAAA;AAAA,IACP,QAAQ,CAAC,GAAA,qBACN,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,SAAQ,MAAO,EA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AAW,QAC7B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,gBAAiB,EAAA,EAAA,KAAA,EAAO,EAAE,QAAA,EAAU,IAAM,EAAA,CAAA,kBAC1C,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,CAAA,EAAG,CAAE,EAAA,0BAAA,EACW,KAAQ,GAAA,KAAA,CAAM,MAAS,GAAA,CAAA,EAAE,GACpD,CAAA;AAAA,MAEF,IAAA,EAAM,SAAS;AAAC;AAAA,GAClB;AAEJ;;;;"}
1
+ {"version":3,"file":"GitTagTable.esm.js","sources":["../../../src/components/GitTagTable/GitTagTable.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport {\n Link,\n ResponseErrorPanel,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport { GitTag } from '@backstage-community/plugin-azure-devops-common';\n\nimport { AzureGitTagsIcon } from '../AzureGitTagsIcon';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useGitTags } from '../../hooks/useGitTags';\n\nconst columns: TableColumn[] = [\n {\n title: 'Tag',\n field: 'name',\n highlight: false,\n defaultSort: 'desc',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.link ?? ''}>{row.name}</Link>\n </Box>\n ),\n },\n {\n title: 'Commit',\n field: 'peeledObjectId',\n width: 'auto',\n render: (row: Partial<GitTag>) => (\n <Box display=\"flex\" alignItems=\"center\">\n <Link to={row.commitLink ?? ''}>{row.peeledObjectId}</Link>\n </Box>\n ),\n },\n {\n title: 'Created By',\n field: 'createdBy',\n width: 'auto',\n },\n];\n\nexport const GitTagTable = () => {\n const { entity } = useEntity();\n\n const { items, loading, error } = useGitTags(entity);\n\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Table\n isLoading={loading}\n columns={columns}\n options={{\n search: true,\n paging: true,\n pageSize: 5,\n showEmptyDataSourceMessage: !loading,\n }}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <AzureGitTagsIcon style={{ fontSize: 30 }} />\n <Box mr={1} />\n Azure Repos - Git Tags ({items ? items.length : 0})\n </Box>\n }\n data={items ?? []}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;AA6BA,MAAM,OAAyB,GAAA;AAAA,EAC7B;AAAA,IACE,KAAO,EAAA,KAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,SAAW,EAAA,KAAA;AAAA,IACX,WAAa,EAAA,MAAA;AAAA,IACb,KAAO,EAAA,MAAA;AAAA,IACP,QAAQ,CAAC,GAAA,qBACN,GAAA,CAAA,GAAA,EAAA,EAAI,SAAQ,MAAO,EAAA,UAAA,EAAW,QAC7B,EAAA,QAAA,kBAAA,GAAA,CAAC,QAAK,EAAI,EAAA,GAAA,CAAI,QAAQ,EAAK,EAAA,QAAA,EAAA,GAAA,CAAI,MAAK,CACtC,EAAA;AAAA,GAEJ;AAAA,EACA;AAAA,IACE,KAAO,EAAA,QAAA;AAAA,IACP,KAAO,EAAA,gBAAA;AAAA,IACP,KAAO,EAAA,MAAA;AAAA,IACP,QAAQ,CAAC,GAAA,qBACN,GAAA,CAAA,GAAA,EAAA,EAAI,SAAQ,MAAO,EAAA,UAAA,EAAW,QAC7B,EAAA,QAAA,kBAAA,GAAA,CAAC,QAAK,EAAI,EAAA,GAAA,CAAI,cAAc,EAAK,EAAA,QAAA,EAAA,GAAA,CAAI,gBAAe,CACtD,EAAA;AAAA,GAEJ;AAAA,EACA;AAAA,IACE,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