Skip to content

Commit

Permalink
Merge branch 'AxisCommunications:main' into pluginImprovements
Browse files Browse the repository at this point in the history
  • Loading branch information
SaachiNayyer authored Apr 18, 2024
2 parents 8a2f014 + 3276a1a commit 8ab684d
Show file tree
Hide file tree
Showing 28 changed files with 176 additions and 61 deletions.
19 changes: 0 additions & 19 deletions .changeset/famous-readers-wonder.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sharp-apricots-do.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/soft-readers-relax.md

This file was deleted.

25 changes: 25 additions & 0 deletions packages/app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# app

## 0.4.13

### Patch Changes

- Updated dependencies [371f5fd]
- @axis-backstage/plugin-readme@0.7.0

## 0.4.12

### Patch Changes

- Updated dependencies [12f407b]
- @axis-backstage/plugin-jira-dashboard@1.0.1

## 0.4.11

### Patch Changes

- Updated dependencies [517c68a]
- Updated dependencies [603304b]
- Updated dependencies [5457a70]
- @axis-backstage/plugin-jira-dashboard-common@1.0.0
- @axis-backstage/plugin-jira-dashboard@1.0.0
- @axis-backstage/plugin-readme@0.6.0

## 0.4.10

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app",
"version": "0.4.10",
"version": "0.4.13",
"private": true,
"bundled": true,
"backstage": {
Expand Down
16 changes: 16 additions & 0 deletions packages/backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# backend

## 0.3.10

### Patch Changes

- Updated dependencies [371f5fd]
- @axis-backstage/plugin-readme-backend@0.5.0
- [email protected]

## 0.3.9

### Patch Changes

- Updated dependencies [9456530]
- @axis-backstage/plugin-jira-dashboard-backend@1.0.0
- [email protected]

## 0.3.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backend",
"version": "0.3.8",
"version": "0.3.10",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"private": true,
Expand Down
25 changes: 25 additions & 0 deletions plugins/jira-dashboard-backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# @axis-backstage/plugin-jira-dashboard-backend

## 1.0.0

### Major Changes

- 9456530: Updated the getIssuesByFilter function to accept an array of components,
enabling the construction of more flexible JQL queries.
Introduced a new variable named componentQuery to represent the portion of the JQL query related to components.

Enhanced the getIssuesFromFilters function to include support for filtering by components.
Now, along with project keys and filters, the function also accepts an array of components.
This change allows for more comprehensive filtering options when retrieving issues from Jira.

Modified the router implementation to pass the array of components to the getIssuesFromFilters function.
By including components in the request, users can now specify additional criteria for filtering Jira issues,
resulting in more refined search results.

The introduced changes provide users with greater flexibility and control when retrieving Jira issues,
allowing for more precise filtering based on project keys, components, and filter criteria.
This enhancement improves the overall usability and effectiveness of the Jira integration functionality.

### Patch Changes

- Updated dependencies [517c68a]
- @axis-backstage/plugin-jira-dashboard-common@1.0.0

## 0.7.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion plugins/jira-dashboard-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axis-backstage/plugin-jira-dashboard-backend",
"version": "0.7.4",
"version": "1.0.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
Expand Down
6 changes: 6 additions & 0 deletions plugins/jira-dashboard-common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @axis-backstage/plugin-jira-dashboard-common

## 1.0.0

### Major Changes

- 517c68a: Update default project lead name from 'key' to 'displayName' for clarity and consistency Additionally, this commit introduces provisions for displaying the image of the assignee, enhancing the user interface and providing visual context alongside the assignee's display name.

## 0.4.0

### Minor Changes
Expand Down
4 changes: 4 additions & 0 deletions plugins/jira-dashboard-common/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export type Issue = {
name: string;
self: string;
key: string;
displayName: string;
avatarUrls: {
'48x48': string;
};
};
issuetype: {
name: string;
Expand Down
2 changes: 1 addition & 1 deletion plugins/jira-dashboard-common/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@axis-backstage/plugin-jira-dashboard-common",
"description": "Common functionalities for the jira-dashboard plugin",
"version": "0.4.0",
"version": "1.0.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
Expand Down
2 changes: 2 additions & 0 deletions plugins/jira-dashboard-common/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export type Issue = {
name: string;
self: string;
key: string;
displayName: string;
avatarUrls: { '48x48': string };
};
issuetype: {
name: string;
Expand Down
18 changes: 18 additions & 0 deletions plugins/jira-dashboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @axis-backstage/plugin-jira-dashboard

## 1.0.1

### Patch Changes

- 12f407b: Changed assignee font size in JiraTable to 14px so it would match the other text in the component.

## 1.0.0

### Major Changes

- 517c68a: Update default project lead name from 'key' to 'displayName' for clarity and consistency Additionally, this commit introduces provisions for displaying the image of the assignee, enhancing the user interface and providing visual context alongside the assignee's display name.

### Patch Changes

- 5457a70: Added the url pathname as part of the base URL for all links to Jira. This because Jira Server have additional path in the Jira base URl and links were broken.
- Updated dependencies [517c68a]
- @axis-backstage/plugin-jira-dashboard-common@1.0.0

## 0.7.4

### Patch Changes
Expand Down
2 changes: 2 additions & 0 deletions plugins/jira-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,5 @@ metadata:
The issue overview is located under the tab "Jira Dashboard" on the entity page. The overview displays information about the specific Jira project, and then renders one table for each type of issue view. In each view you can see the priority, assignee and status for that issue.
![overview](https://github.com/AxisCommunications/backstage-plugins/blob/main/plugins/jira-dashboard/media/overview.png)
![quickview](https://github.com/AxisCommunications/backstage-plugins/blob/main/plugins/jira-dashboard/media/quick-view.png)
Binary file added plugins/jira-dashboard/media/quick-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion plugins/jira-dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axis-backstage/plugin-jira-dashboard",
"version": "0.7.4",
"version": "1.0.1",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ export const JiraProjectCard = ({ project }: JiraProjectCardProps) => {
{project.description && (
<ProjectInfoLabel label="Description" value={project.description} />
)}
{project.lead?.key ||
(project?.lead?.displayName && (
<ProjectInfoLabel
label="Project lead"
value={project?.lead?.displayName || project?.lead?.key}
/>
))}
{(project?.lead?.key || project?.lead?.displayName) && (
<ProjectInfoLabel
label="Project lead"
value={project?.lead?.displayName || project?.lead?.key}
/>
)}
</Stack>
<LinkButton
color="primary"
Expand Down
42 changes: 31 additions & 11 deletions plugins/jira-dashboard/src/components/JiraTable/columns.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import React from 'react';
import { Link, TableColumn } from '@backstage/core-components';
import { Avatar, Link, TableColumn } from '@backstage/core-components';
import { Issue } from '@axis-backstage/plugin-jira-dashboard-common';
import Typography from '@mui/material/Typography';
import { getIssueUrl } from '../../lib';
import Stack from '@mui/material/Stack';

export const columns: TableColumn[] = [
{
title: 'Key',
field: 'key',
highlight: true,
type: 'string',
width: '30%',
width: '15%',

render: (issue: Partial<Issue>) => {
if (!issue.self || !issue.key) {
Expand All @@ -36,7 +37,7 @@ export const columns: TableColumn[] = [
field: 'fields.summary',
highlight: true,
type: 'string',
width: '50%',
width: '40%',
render: (issue: Partial<Issue>) => {
if (!issue.self || !issue.key) {
return null;
Expand All @@ -57,7 +58,7 @@ export const columns: TableColumn[] = [
field: 'fields.status.name',
highlight: true,
type: 'string',
width: '30%',
width: '15%',

render: (issue: Partial<Issue>) => {
if (!issue.self || !issue.key) {
Expand All @@ -75,24 +76,43 @@ export const columns: TableColumn[] = [
},
{
title: 'Assignee',
field: 'fields.assignee.name',
field: 'fields.assignee.displayName',
highlight: true,
type: 'string',
width: '10%',
width: '20%',

render: (issue: Partial<Issue>) => {
if (issue.fields?.assignee?.name) {
if (issue.fields?.assignee?.displayName) {
return (
<Typography>{issue.fields.assignee.name.split('@')[0]}</Typography>
<Stack direction="row" gap={1} alignItems="center" mb={1}>
<Avatar
picture={issue.fields?.assignee?.avatarUrls['48x48'] || ''}
customStyles={{
width: 35,
height: 35,
}}
/>
<Typography variant="body2">
{issue.fields.assignee.displayName}
</Typography>
</Stack>
);
} else if (issue.fields?.assignee?.name) {
return (
<Typography variant="body2">
{issue.fields.assignee.name.split('@')[0]}
</Typography>
);
} else if (issue.fields?.assignee?.key) {
return (
<Typography variant="body2">{issue.fields.assignee.key}</Typography>
);
}
if (issue.fields?.assignee?.key) {
return <Typography>{issue.fields.assignee.key}</Typography>;
}
return (
<Typography
sx={{ color: theme => theme.palette.text.disabled }}
color="divider"
variant="body2"
>
Unassigned
</Typography>
Expand Down
6 changes: 6 additions & 0 deletions plugins/readme-backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @axis-backstage/plugin-readme-backend

## 0.5.0

### Minor Changes

- 371f5fd: Readme backend APIs adjusted to consume entityRef as /:kind/:namespace/:name. Fixes a 404 routing issue where a proxy like oauth2Proxy could decode the URI encoded path parameter /:entityRef known to contain the reserved path delimiter '/'.

## 0.4.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion plugins/readme-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axis-backstage/plugin-readme-backend",
"version": "0.4.0",
"version": "0.5.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
Expand Down
10 changes: 7 additions & 3 deletions plugins/readme-backend/src/service/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import express from 'express';
import Router from 'express-promise-router';
import { Logger } from 'winston';
import { ScmIntegrations } from '@backstage/integration';
import { getEntitySourceLocation } from '@backstage/catalog-model';
import {
getEntitySourceLocation,
stringifyEntityRef,
} from '@backstage/catalog-model';
import { CatalogClient } from '@backstage/catalog-client';
import { DiscoveryApi } from '@backstage/plugin-permission-common';
import { isSymLink } from '../lib';
Expand Down Expand Up @@ -86,8 +89,9 @@ export async function createRouter(
response.json({ status: 'ok' });
});

router.get('/:entityRef', async (request, response) => {
const { entityRef } = request.params;
router.get('/:kind/:namespace/:name', async (request, response) => {
const { kind, namespace, name } = request.params;
const entityRef = stringifyEntityRef({ kind, namespace, name });
const cacheDoc = (await cache.get(entityRef)) as ReadmeFile | undefined;

if (cacheDoc) {
Expand Down
12 changes: 12 additions & 0 deletions plugins/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @axis-backstage/plugin-readme

## 0.7.0

### Minor Changes

- 371f5fd: Readme backend APIs adjusted to consume entityRef as /:kind/:namespace/:name. Fixes a 404 routing issue where a proxy like oauth2Proxy could decode the URI encoded path parameter /:entityRef known to contain the reserved path delimiter '/'.

## 0.6.0

### Minor Changes

- 603304b: Updated the max height in case of variant `fullHeight` to be `none` by default. That is needed to really occupy the full height of the container.

## 0.5.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion plugins/readme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axis-backstage/plugin-readme",
"version": "0.5.4",
"version": "0.7.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
Expand Down
Loading

0 comments on commit 8ab684d

Please sign in to comment.