From 4d1c4898c2bd13cc09e07a18b7fe7bc077174001 Mon Sep 17 00:00:00 2001 From: Hizni Salih Date: Mon, 3 Oct 2022 21:05:38 +0000 Subject: [PATCH 01/11] added title textbox --- .../src/components/shared/airlock/AirlockNewRequest.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx b/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx index 1a90ec91c7..64fbb931e4 100644 --- a/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx +++ b/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx @@ -118,6 +118,14 @@ export const AirlockNewRequest: React.FunctionComponent } else { title = `New airlock ${newRequest.requestType} request`; currentStep = + Date: Thu, 6 Oct 2022 11:09:41 +0000 Subject: [PATCH 02/11] modified airlock request models to add title --- ui/app/src/models/airlock.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/app/src/models/airlock.ts b/ui/app/src/models/airlock.ts index 3da1b94f44..6f87effa79 100644 --- a/ui/app/src/models/airlock.ts +++ b/ui/app/src/models/airlock.ts @@ -4,6 +4,7 @@ export interface AirlockRequest extends Resource { workspaceId: string; requestType: AirlockRequestType; files: Array; + requestTitle: string; businessJustification: string; errorMessage: null | string; status: AirlockRequestStatus; @@ -27,5 +28,6 @@ export enum AirlockRequestStatus { export interface NewAirlockRequest { requestType: AirlockRequestType; + requestTitle: string; businessJustification: string; } From f3fb71f30e69eefb5eea34712a4670d85a17631f Mon Sep 17 00:00:00 2001 From: Hizni Salih Date: Thu, 6 Oct 2022 11:12:02 +0000 Subject: [PATCH 03/11] added requestTitle to UI --- .../shared/airlock/AirlockNewRequest.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx b/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx index 64fbb931e4..f5667246a0 100644 --- a/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx +++ b/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx @@ -23,6 +23,18 @@ export const AirlockNewRequest: React.FunctionComponent const workspaceCtx = useContext(WorkspaceContext); const apiCall = useAuthApiCall(); + const onChangeRequestTitle = useCallback( + (event: React.FormEvent, newValue?: string) => { + setNewRequest(request => { + return { + ...request, + requestTitle: newValue || '' + } + }); + }, + [setNewRequest] + ); + const onChangeBusinessJustification = useCallback( (event: React.FormEvent, newValue?: string) => { setNewRequest(request => { @@ -121,8 +133,8 @@ export const AirlockNewRequest: React.FunctionComponent From 8888d5e478a7c9e1ed3b93cfa610e4a3f6ff907b Mon Sep 17 00:00:00 2001 From: Hizni Salih Date: Thu, 6 Oct 2022 11:45:40 +0000 Subject: [PATCH 04/11] modified airlock_request api model --- api_app/models/domain/airlock_request.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api_app/models/domain/airlock_request.py b/api_app/models/domain/airlock_request.py index a743e9e7d8..e04baef7e9 100644 --- a/api_app/models/domain/airlock_request.py +++ b/api_app/models/domain/airlock_request.py @@ -78,6 +78,7 @@ class AirlockRequest(AzureTREModel): workspaceId: str = Field("", title="Workspace ID", description="Service target Workspace id") requestType: AirlockRequestType = Field("", title="Airlock request type") files: List[AirlockFile] = Field([], title="Files of the request") + requestTitle: str = Field("RequestTitle", title="Brief title for the request") businessJustification: str = Field("Business Justifications", title="Explanation that will be provided to the request reviewer") status = AirlockRequestStatus.Draft creationTime: float = Field(None, title="Creation time of the request") From c4aa6779c2e612dc6d923d162ced5dac1aa6c45f Mon Sep 17 00:00:00 2001 From: Hizni Salih Date: Thu, 6 Oct 2022 13:14:58 +0000 Subject: [PATCH 05/11] additions for airlock import title task Co-authored-by: James Griffin --- api_app/models/schemas/airlock_request.py | 2 ++ ui/app/src/components/shared/airlock/AirlockNewRequest.tsx | 5 ++++- ui/app/src/components/shared/airlock/AirlockViewRequest.tsx | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/api_app/models/schemas/airlock_request.py b/api_app/models/schemas/airlock_request.py index 0ad9f5fcad..aa4a812253 100644 --- a/api_app/models/schemas/airlock_request.py +++ b/api_app/models/schemas/airlock_request.py @@ -72,6 +72,7 @@ class Config: class AirlockRequestInCreate(BaseModel): requestType: AirlockRequestType = Field("", title="Airlock request type", description="Specifies if this is an import or an export request") + requestTitle: str = Field("RequestTitle", title="Brief title for the request") businessJustification: str = Field("Business Justifications", title="Explanation that will be provided to the request reviewer") properties: dict = Field({}, title="Airlock request parameters", description="Values for the parameters required by the Airlock request specification") @@ -79,6 +80,7 @@ class Config: schema_extra = { "example": { "requestType": "import", + "requestTitle": "a request title", "businessJustification": "some business justification" } } diff --git a/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx b/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx index f5667246a0..734cc0af4b 100644 --- a/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx +++ b/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx @@ -48,7 +48,10 @@ export const AirlockNewRequest: React.FunctionComponent ); useEffect( - () => setRequestValid(newRequest.businessJustification?.length > 0), + () => setRequestValid( + newRequest.requestTitle.length > 0 && + newRequest.businessJustification?.length > 0 + ), [newRequest, setRequestValid] ); diff --git a/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx b/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx index daefda4229..33579a5344 100644 --- a/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx +++ b/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx @@ -154,7 +154,7 @@ export const AirlockViewRequest: React.FunctionComponent Date: Thu, 6 Oct 2022 13:43:36 +0000 Subject: [PATCH 06/11] added request title to db --- api_app/db/repositories/airlock_requests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api_app/db/repositories/airlock_requests.py b/api_app/db/repositories/airlock_requests.py index 770db85ec4..280862420b 100644 --- a/api_app/db/repositories/airlock_requests.py +++ b/api_app/db/repositories/airlock_requests.py @@ -92,6 +92,7 @@ def create_airlock_request_item(self, airlock_request_input: AirlockRequestInCre airlock_request = AirlockRequest( id=full_airlock_request_id, workspaceId=workspace_id, + requestTitle=airlock_request_input.requestTitle, businessJustification=airlock_request_input.businessJustification, requestType=airlock_request_input.requestType, creationTime=datetime.utcnow().timestamp(), From 127ff3bc6d192fefa4c7b441dddb4e16fe7014ad Mon Sep 17 00:00:00 2001 From: Hizni Salih <4255268+hizni@users.noreply.github.com> Date: Thu, 6 Oct 2022 14:49:53 +0000 Subject: [PATCH 07/11] added request title to sample airlock req --- api_app/models/schemas/airlock_request.py | 1 + ui/app/src/components/shared/airlock/AirlockNewRequest.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api_app/models/schemas/airlock_request.py b/api_app/models/schemas/airlock_request.py index aa4a812253..344ce6ccfa 100644 --- a/api_app/models/schemas/airlock_request.py +++ b/api_app/models/schemas/airlock_request.py @@ -20,6 +20,7 @@ def get_sample_airlock_request(workspace_id: str, airlock_request_id: str) -> di "status": "draft", "requestType": "import", "files": [], + "requestTitle": "a request title", "businessJustification": "some business justification", "creationTime": datetime.utcnow().timestamp(), "reviews": [ diff --git a/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx b/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx index 734cc0af4b..4c31578d15 100644 --- a/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx +++ b/ui/app/src/components/shared/airlock/AirlockNewRequest.tsx @@ -49,7 +49,7 @@ export const AirlockNewRequest: React.FunctionComponent useEffect( () => setRequestValid( - newRequest.requestTitle.length > 0 && + newRequest.requestTitle?.length > 0 && newRequest.businessJustification?.length > 0 ), [newRequest, setRequestValid] From 8fbbcce88e2b5058025af212abe4b92a13af71d5 Mon Sep 17 00:00:00 2001 From: jjgriff93 Date: Wed, 12 Oct 2022 15:21:35 +0000 Subject: [PATCH 08/11] Added title field to table --- api_app/models/domain/airlock_request.py | 2 +- api_app/models/schemas/airlock_request.py | 2 +- ui/app/package.json | 1 + ui/app/src/App.scss | 17 +++-- ui/app/src/App.tsx | 4 ++ .../src/components/shared/airlock/Airlock.tsx | 29 +++++++-- ui/app/src/models/airlock.ts | 2 +- ui/app/yarn.lock | 64 +++++++++++++++++++ 8 files changed, 106 insertions(+), 15 deletions(-) diff --git a/api_app/models/domain/airlock_request.py b/api_app/models/domain/airlock_request.py index 38690bf0c9..71953427be 100644 --- a/api_app/models/domain/airlock_request.py +++ b/api_app/models/domain/airlock_request.py @@ -78,7 +78,7 @@ class AirlockRequest(AzureTREModel): workspaceId: str = Field("", title="Workspace ID", description="Service target Workspace id") requestType: AirlockRequestType = Field("", title="Airlock request type") files: List[AirlockFile] = Field([], title="Files of the request") - requestTitle: str = Field("RequestTitle", title="Brief title for the request") + requestTitle: str = Field("Airlock Request", title="Brief title for the request") businessJustification: str = Field("Business Justifications", title="Explanation that will be provided to the request reviewer") status = AirlockRequestStatus.Draft creationTime: float = Field(None, title="Creation time of the request") diff --git a/api_app/models/schemas/airlock_request.py b/api_app/models/schemas/airlock_request.py index 344ce6ccfa..fe6c756067 100644 --- a/api_app/models/schemas/airlock_request.py +++ b/api_app/models/schemas/airlock_request.py @@ -73,7 +73,7 @@ class Config: class AirlockRequestInCreate(BaseModel): requestType: AirlockRequestType = Field("", title="Airlock request type", description="Specifies if this is an import or an export request") - requestTitle: str = Field("RequestTitle", title="Brief title for the request") + requestTitle: str = Field("Airlock Request", title="Brief title for the request") businessJustification: str = Field("Business Justifications", title="Explanation that will be provided to the request reviewer") properties: dict = Field({}, title="Airlock request parameters", description="Values for the parameters required by the Airlock request specification") diff --git a/ui/app/package.json b/ui/app/package.json index 984e4957d7..ec4cc3a6bc 100644 --- a/ui/app/package.json +++ b/ui/app/package.json @@ -6,6 +6,7 @@ "@azure/msal-browser": "^2.24.0", "@azure/msal-react": "^1.4.0", "@fluentui/react": "^8.68.2", + "@fluentui/react-file-type-icons": "^8.7.9", "@reduxjs/toolkit": "^1.8.6", "@rjsf/core": "^4.2.0", "@rjsf/fluent-ui": "^4.2.0", diff --git a/ui/app/src/App.scss b/ui/app/src/App.scss index 8955dcc73c..eb04e76b65 100644 --- a/ui/app/src/App.scss +++ b/ui/app/src/App.scss @@ -106,6 +106,17 @@ ul.tre-notifications-steps-list li { } } +.tre-table { + .ms-Persona-primaryText { + font-size: 12px; + color: rgb(108, 108, 108); + } + + .ms-DetailsRow-cell { + align-self: baseline; + } +} + .tre-hide-chevron i[data-icon-name=ChevronDown] { display: none; } @@ -158,12 +169,6 @@ ul.tre-notifications-steps-list li { background-color: #fff; } -.tre-table-rows-align-centre { - .ms-DetailsRow-cell { - align-self: baseline; - } -} - .ms-Pivot { margin-bottom: 10px; } diff --git a/ui/app/src/App.tsx b/ui/app/src/App.tsx index 80241f3f0b..917e158c7d 100644 --- a/ui/app/src/App.tsx +++ b/ui/app/src/App.tsx @@ -17,6 +17,7 @@ import { CreateUpdateResource } from './components/shared/create-update-resource import { CreateUpdateResourceContext } from './contexts/CreateUpdateResourceContext'; import { CreateFormResource, ResourceType } from './models/resourceType'; import { Footer } from './components/shared/Footer'; +import { initializeFileTypeIcons } from '@fluentui/react-file-type-icons'; export const App: React.FunctionComponent = () => { const [appRoles, setAppRoles] = useState([] as Array); @@ -38,6 +39,9 @@ export const App: React.FunctionComponent = () => { setAppRolesOnLoad(); }, [apiCall]); + // initiliase filetype icons + useEffect(() => initializeFileTypeIcons(), []); + return ( <> diff --git a/ui/app/src/components/shared/airlock/Airlock.tsx b/ui/app/src/components/shared/airlock/Airlock.tsx index c3d1fb1382..4c48754901 100644 --- a/ui/app/src/components/shared/airlock/Airlock.tsx +++ b/ui/app/src/components/shared/airlock/Airlock.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useContext, useEffect, useState } from 'react'; -import { ColumnActionsMode, CommandBar, CommandBarButton, ContextualMenu, DirectionalHint, getTheme, IColumn, ICommandBarItemProps, IContextualMenuItem, IContextualMenuProps, Label, Persona, PersonaSize, SelectionMode, ShimmeredDetailsList, Stack } from '@fluentui/react'; +import { ColumnActionsMode, CommandBar, CommandBarButton, ContextualMenu, DirectionalHint, getTheme, IColumn, ICommandBarItemProps, Icon, IContextualMenuItem, IContextualMenuProps, Label, Persona, PersonaSize, SelectionMode, ShimmeredDetailsList, Stack } from '@fluentui/react'; import { HttpMethod, useAuthApiCall } from '../../../hooks/useAuthApiCall'; import { ApiEndpoint } from '../../../models/apiEndpoints'; import { WorkspaceContext } from '../../../contexts/WorkspaceContext'; @@ -13,6 +13,7 @@ import { ExceptionLayout } from '../ExceptionLayout'; import { AirlockNewRequest } from './AirlockNewRequest'; import { WorkspaceRoleName } from '../../../models/roleNames'; import { useAccount, useMsal } from '@azure/msal-react'; +import { getFileTypeIconProps } from '@fluentui/react-file-type-icons'; export const Airlock: React.FunctionComponent = () => { const [airlockRequests, setAirlockRequests] = useState([] as AirlockRequest[]); @@ -151,15 +152,31 @@ export const Airlock: React.FunctionComponent = () => { const columns: IColumn[] = [ { - key: 'avatar', - name: '', + key: 'fileIcon', + name: 'fileIcon', minWidth: 16, maxWidth: 16, isIconOnly: true, onRender: (request: AirlockRequest) => { - return + if (request.status === AirlockRequestStatus.Draft) { + return + } else if (request.files?.length > 0 && request.files[0].name) { + const fileType = request.files[0].name.split('.').pop(); + return + } else { + return + } } }, + { + key: 'title', + name: 'Title', + ariaLabel: 'Title of the airlock request', + minWidth: 150, + maxWidth: 300, + isResizable: true, + fieldName: 'requestTitle' + }, { key: 'creator_user_id', name: 'Initiator', @@ -168,7 +185,7 @@ export const Airlock: React.FunctionComponent = () => { maxWidth: 200, isResizable: true, fieldName: 'initiator', - onRender: (request: AirlockRequest) => request.user?.name, + onRender: (request: AirlockRequest) => , isFiltered: filters.has('creator_user_id') }, { @@ -310,7 +327,7 @@ export const Airlock: React.FunctionComponent = () => { selectionMode={SelectionMode.none} getKey={(item) => item?.id} onItemInvoked={(item) => navigate(item.id)} - className="tre-table-rows-align-centre" + className="tre-table" enableShimmer={loadingState === LoadingState.Loading} /> { diff --git a/ui/app/src/models/airlock.ts b/ui/app/src/models/airlock.ts index b06c6fbbbf..f386c23458 100644 --- a/ui/app/src/models/airlock.ts +++ b/ui/app/src/models/airlock.ts @@ -4,7 +4,7 @@ import { User } from "./user"; export interface AirlockRequest extends Resource { workspaceId: string; requestType: AirlockRequestType; - files: Array; + files: Array<{name: string, size: number}>; requestTitle: string; businessJustification: string; statusMessage: null | string; diff --git a/ui/app/yarn.lock b/ui/app/yarn.lock index 4a1f1eaa7b..a771e17e92 100644 --- a/ui/app/yarn.lock +++ b/ui/app/yarn.lock @@ -1223,6 +1223,14 @@ "@fluentui/set-version" "^8.2.1" tslib "^2.1.0" +"@fluentui/dom-utilities@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@fluentui/dom-utilities/-/dom-utilities-2.2.2.tgz#9fffd59a1ceab7121bbb4355744d94cae5452780" + integrity sha512-puklLc6Jvg279OGagqkSfuHML6ckBhw3gJakdvIZHKeJiduh+34U4Finl3K24yBSXzG2WsN+LwLTd1Vcociy+g== + dependencies: + "@fluentui/set-version" "^8.2.2" + tslib "^2.1.0" + "@fluentui/font-icons-mdl2@^8.4.1": version "8.4.1" resolved "https://registry.yarnpkg.com/@fluentui/font-icons-mdl2/-/font-icons-mdl2-8.4.1.tgz#d40bf884752979643d4936c0bb55a90a243c37e5" @@ -1259,6 +1267,23 @@ "@fluentui/set-version" "^8.2.1" tslib "^2.1.0" +"@fluentui/merge-styles@^8.5.3": + version "8.5.3" + resolved "https://registry.yarnpkg.com/@fluentui/merge-styles/-/merge-styles-8.5.3.tgz#e9d9d08a4825e117913c417d99233736f570736a" + integrity sha512-bHWftN3zTp1bbBfmAEH8YK9UURWj2mffw7b7VaW2Og1qxwv3GMSza1cyv/d3EVqpMJ8AVwFv3mbi9p1ieMN9mw== + dependencies: + "@fluentui/set-version" "^8.2.2" + tslib "^2.1.0" + +"@fluentui/react-file-type-icons@^8.7.9": + version "8.7.9" + resolved "https://registry.yarnpkg.com/@fluentui/react-file-type-icons/-/react-file-type-icons-8.7.9.tgz#9992af91395474d25804b86cb6e44e6b1f3faf41" + integrity sha512-EOZnXBkkS6BJmrChCy1cVT1hkvi7JuesxbqLCrEsyxEk4jn9aha9XkAR2JV44h+bB7p2iFJUBzfZaWK95d0xJA== + dependencies: + "@fluentui/set-version" "^8.2.2" + "@fluentui/style-utilities" "^8.8.0" + tslib "^2.1.0" + "@fluentui/react-focus@^8.7.0": version "8.7.0" resolved "https://registry.yarnpkg.com/@fluentui/react-focus/-/react-focus-8.7.0.tgz#5319aff831fa40149e674d7e7a434b3d5d26f434" @@ -1323,6 +1348,13 @@ dependencies: tslib "^2.1.0" +"@fluentui/set-version@^8.2.2": + version "8.2.2" + resolved "https://registry.yarnpkg.com/@fluentui/set-version/-/set-version-8.2.2.tgz#37cffcda607cb2604a86b72e98aee94c2fb809d2" + integrity sha512-Vg20KZ0ufgWjxx6GFbqC5wiVxXZDUWgNT0r0By/Eyj4bUSb1jG6lmf5z1oY1dUX0YS6Cp5e6GnvbNdXg5E7orA== + dependencies: + tslib "^2.1.0" + "@fluentui/style-utilities@^8.7.0": version "8.7.0" resolved "https://registry.yarnpkg.com/@fluentui/style-utilities/-/style-utilities-8.7.0.tgz#bc5a0ff17ae0d4dadc9c5b4b7f58c2abdf799667" @@ -1335,6 +1367,28 @@ "@microsoft/load-themed-styles" "^1.10.26" tslib "^2.1.0" +"@fluentui/style-utilities@^8.8.0": + version "8.8.0" + resolved "https://registry.yarnpkg.com/@fluentui/style-utilities/-/style-utilities-8.8.0.tgz#7430d34774a87eb776a819dc36d0627e0957a795" + integrity sha512-wqntrpzOGvBNojAlnXVQB98hYQkS0g5ZckF/JxkNDWYRUcemu9bUTgBOg1hdiV9DM8nxyg34LE794oMxRIuLHA== + dependencies: + "@fluentui/merge-styles" "^8.5.3" + "@fluentui/set-version" "^8.2.2" + "@fluentui/theme" "^2.6.16" + "@fluentui/utilities" "^8.13.1" + "@microsoft/load-themed-styles" "^1.10.26" + tslib "^2.1.0" + +"@fluentui/theme@^2.6.16": + version "2.6.16" + resolved "https://registry.yarnpkg.com/@fluentui/theme/-/theme-2.6.16.tgz#a29c58bf16f765ba1b97a497e572fd1fdc469c44" + integrity sha512-Ml2oMVvoOxRYD9HPjEkGCWvnQnzDyrufa5k8bPYN8xjJbbEGtDjjswcfrSVfHx1fCR1CFgybHR8jj3pvXRTXUQ== + dependencies: + "@fluentui/merge-styles" "^8.5.3" + "@fluentui/set-version" "^8.2.2" + "@fluentui/utilities" "^8.13.1" + tslib "^2.1.0" + "@fluentui/theme@^2.6.6": version "2.6.6" resolved "https://registry.yarnpkg.com/@fluentui/theme/-/theme-2.6.6.tgz#282b6f1d4f564c43fc526f30aa1ae26b26b62f3f" @@ -1345,6 +1399,16 @@ "@fluentui/utilities" "^8.8.3" tslib "^2.1.0" +"@fluentui/utilities@^8.13.1": + version "8.13.1" + resolved "https://registry.yarnpkg.com/@fluentui/utilities/-/utilities-8.13.1.tgz#028fd2e93f68b5f386039970dce0ae642eb7e9da" + integrity sha512-BpLa0lSYnZ3YoTGB6T/pQ0vUVq0PEr6gF+daptyeiLUkEXVoy3HYgX6ZanA62wJ89ycIwI8A+1aUEbmtDMupYg== + dependencies: + "@fluentui/dom-utilities" "^2.2.2" + "@fluentui/merge-styles" "^8.5.3" + "@fluentui/set-version" "^8.2.2" + tslib "^2.1.0" + "@fluentui/utilities@^8.8.3": version "8.8.3" resolved "https://registry.yarnpkg.com/@fluentui/utilities/-/utilities-8.8.3.tgz#d41fd5f8ed96baa2b3d70853a0bf1ab6bfa1936d" From aa886789b8c19f9f1cf8017f871cf1b443cc8e4f Mon Sep 17 00:00:00 2001 From: jjgriff93 Date: Wed, 12 Oct 2022 15:24:09 +0000 Subject: [PATCH 09/11] Fix warnings --- ui/app/src/components/shared/airlock/Airlock.tsx | 4 ++-- ui/app/src/components/shared/airlock/AirlockViewRequest.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/app/src/components/shared/airlock/Airlock.tsx b/ui/app/src/components/shared/airlock/Airlock.tsx index 4c48754901..00e3b67c4a 100644 --- a/ui/app/src/components/shared/airlock/Airlock.tsx +++ b/ui/app/src/components/shared/airlock/Airlock.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useContext, useEffect, useState } from 'react'; -import { ColumnActionsMode, CommandBar, CommandBarButton, ContextualMenu, DirectionalHint, getTheme, IColumn, ICommandBarItemProps, Icon, IContextualMenuItem, IContextualMenuProps, Label, Persona, PersonaSize, SelectionMode, ShimmeredDetailsList, Stack } from '@fluentui/react'; +import { ColumnActionsMode, CommandBar, CommandBarButton, ContextualMenu, DirectionalHint, getTheme, IColumn, ICommandBarItemProps, Icon, IContextualMenuItem, IContextualMenuProps, Persona, PersonaSize, SelectionMode, ShimmeredDetailsList, Stack } from '@fluentui/react'; import { HttpMethod, useAuthApiCall } from '../../../hooks/useAuthApiCall'; import { ApiEndpoint } from '../../../models/apiEndpoints'; import { WorkspaceContext } from '../../../contexts/WorkspaceContext'; @@ -28,7 +28,7 @@ export const Airlock: React.FunctionComponent = () => { const apiCall = useAuthApiCall(); const theme = getTheme(); const navigate = useNavigate(); - const { instance, accounts } = useMsal(); + const { accounts } = useMsal(); const account = useAccount(accounts[0] || {}); // Get the airlock request data from API diff --git a/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx b/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx index 5a06d39efc..418c2d1749 100644 --- a/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx +++ b/ui/app/src/components/shared/airlock/AirlockViewRequest.tsx @@ -45,7 +45,7 @@ export const AirlockViewRequest: React.FunctionComponent { // Retrieve a link to view/edit the airlock files From 59922a38e76ae96d29132b86dc46be67402ab7b4 Mon Sep 17 00:00:00 2001 From: jjgriff93 Date: Wed, 12 Oct 2022 18:33:33 +0000 Subject: [PATCH 10/11] Amended tests --- api_app/tests_ma/test_api/test_routes/test_airlock.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api_app/tests_ma/test_api/test_routes/test_airlock.py b/api_app/tests_ma/test_api/test_routes/test_airlock.py index 96db275c17..b786b6fcaa 100644 --- a/api_app/tests_ma/test_api/test_routes/test_airlock.py +++ b/api_app/tests_ma/test_api/test_routes/test_airlock.py @@ -34,6 +34,7 @@ def sample_airlock_request_object(status=AirlockRequestStatus.Draft, airlock_req airlock_request = AirlockRequest( id=airlock_request_id, workspaceId=workspace_id, + requestTitle="test title", businessJustification="test business justification", requestType="import", status=status @@ -45,6 +46,7 @@ def sample_airlock_request_object_with_review(status=AirlockRequestStatus.Draft, airlock_request = AirlockRequest( id=airlock_request_id, workspaceId=workspace_id, + requestTitle="test title", businessJustification="test business justification", requestType="import", status=status, From 99c5ff00ebbea751cbfc156e3caa96ef8434e515 Mon Sep 17 00:00:00 2001 From: jjgriff93 Date: Wed, 12 Oct 2022 18:40:37 +0000 Subject: [PATCH 11/11] Update version & changelog --- CHANGELOG.md | 1 + api_app/_version.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e49cbc7e96..7526e4aafd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: * Added filtering and sorting to Airlock UI ([#2511](https://github.com/microsoft/AzureTRE/issues/2511)) +* Added title field to Airlock requests ([#2731](https://github.com/microsoft/AzureTRE/pull/2731)) ENHANCEMENTS: diff --git a/api_app/_version.py b/api_app/_version.py index cd3616b2fc..d5bca8e07d 100644 --- a/api_app/_version.py +++ b/api_app/_version.py @@ -1 +1 @@ -__version__ = "0.4.52" +__version__ = "0.4.53"