-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
N21-1494 Contextual info outdated CTL #4572
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
1454fda
N21-1494 WIP
mrikallab b28bdd0
N21-1494 remove import
mrikallab 1021f15
Merge branch 'main' into N21-1494-info-outdated-ctl-tools
mrikallab 6659d21
N21-1494 move toolConfiguration status
mrikallab 988deaf
N21-1494 fix tests
mrikallab 43fbf92
N21-1494 fix tests
mrikallab df3f704
Merge branch 'main' into N21-1494-info-outdated-ctl-tools
mrikallab 3926f0f
N21-1494 review changes
mrikallab d6d9125
N21-1494 remove unused imports
mrikallab 562068d
Merge branch 'main' into N21-1494-info-outdated-ctl-tools
mrikallab 0e82ad6
N21-1494 review changes
mrikallab 3d55b0f
Merge branch 'main' into N21-1494-info-outdated-ctl-tools
mrikallab 3f57ec9
N21-1494 fix test
mrikallab 607875f
Merge branch 'main' into N21-1494-info-outdated-ctl-tools
mrikallab 4028fea
N21-1494 cypress test data
mrikallab 96b047a
N21-1494 review changes
mrikallab 6312b9e
N21-1494 refactoring
mrikallab 7135aed
N21-1494 fix import
mrikallab 6fa175f
Merge branch 'main' into N21-1494-info-outdated-ctl-tools
mrikallab 08caca4
N21-1494 fix import
mrikallab 17cd004
N21-1494 fix cy data
mrikallab 22797b8
Merge branch 'main' into N21-1494-info-outdated-ctl-tools
mrikallab 682d1d1
Merge branch 'main' into N21-1494-info-outdated-ctl-tools
mrikallab 169ee50
N21-1494 review changes
mrikallab bce9afe
N21-1494 imports
mrikallab 381810e
Merge branch 'main' into N21-1494-info-outdated-ctl-tools
mrikallab df4ccb5
N21-1494 cy seed data
mrikallab 29da5c2
N21-1494 fix deprecated code
mrikallab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...modules/tool/common/controller/dto/context-external-tool-configuration-status.response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
|
||
export class ContextExternalToolConfigurationStatusResponse { | ||
@ApiProperty({ | ||
type: Boolean, | ||
description: | ||
'Is the tool outdated on school scope, because of non matching versions or required parameter changes on ExternalTool?', | ||
}) | ||
isOutdatedOnScopeSchool: boolean; | ||
|
||
@ApiProperty({ | ||
type: Boolean, | ||
description: | ||
'Is the tool outdated on context scope, because of non matching versions or required parameter changes on SchoolExternalTool?', | ||
}) | ||
isOutdatedOnScopeContext: boolean; | ||
|
||
constructor(props: ContextExternalToolConfigurationStatusResponse) { | ||
this.isOutdatedOnScopeSchool = props.isOutdatedOnScopeSchool; | ||
this.isOutdatedOnScopeContext = props.isOutdatedOnScopeContext; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { ContextExternalToolCountPerContextResponse } from './context-external-tool-count-per-context.response'; | ||
export { ContextExternalToolConfigurationStatusResponse } from './context-external-tool-configuration-status.response'; |
10 changes: 10 additions & 0 deletions
10
apps/server/src/modules/tool/common/domain/context-external-tool-configuration-status.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export class ContextExternalToolConfigurationStatus { | ||
isOutdatedOnScopeSchool: boolean; | ||
|
||
isOutdatedOnScopeContext: boolean; | ||
|
||
constructor(props: ContextExternalToolConfigurationStatus) { | ||
this.isOutdatedOnScopeSchool = props.isOutdatedOnScopeSchool; | ||
this.isOutdatedOnScopeContext = props.isOutdatedOnScopeContext; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from './custom-parameter.do'; | ||
export * from './custom-parameter-entry.do'; | ||
export * from '../enum/tool-configuration-status'; | ||
export * from './context-external-tool-configuration-status'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
apps/server/src/modules/tool/common/enum/tool-configuration-status.ts
This file was deleted.
Oops, something went wrong.
20 changes: 10 additions & 10 deletions
20
apps/server/src/modules/tool/common/mapper/tool-status-response.mapper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { ToolConfigurationStatusResponse } from '../../context-external-tool/controller/dto'; | ||
import { ToolConfigurationStatus } from '../enum'; | ||
|
||
export const statusMapping: Record<ToolConfigurationStatus, ToolConfigurationStatusResponse> = { | ||
[ToolConfigurationStatus.LATEST]: ToolConfigurationStatusResponse.LATEST, | ||
[ToolConfigurationStatus.OUTDATED]: ToolConfigurationStatusResponse.OUTDATED, | ||
[ToolConfigurationStatus.UNKNOWN]: ToolConfigurationStatusResponse.UNKNOWN, | ||
}; | ||
import { ContextExternalToolConfigurationStatusResponse } from '../controller/dto'; | ||
import { ContextExternalToolConfigurationStatus } from '../domain'; | ||
|
||
export class ToolStatusResponseMapper { | ||
static mapToResponse(status: ToolConfigurationStatus): ToolConfigurationStatusResponse { | ||
return statusMapping[status]; | ||
static mapToResponse(status: ContextExternalToolConfigurationStatus): ContextExternalToolConfigurationStatusResponse { | ||
const configurationStatus: ContextExternalToolConfigurationStatusResponse = | ||
new ContextExternalToolConfigurationStatusResponse({ | ||
isOutdatedOnScopeSchool: status.isOutdatedOnScopeSchool, | ||
isOutdatedOnScopeContext: status.isOutdatedOnScopeContext, | ||
}); | ||
|
||
return configurationStatus; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
...c/modules/tool/context-external-tool/controller/dto/tool-configuration-status.response.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain, why this could not be correct? I added also required, because we could need these Informations