-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(HardwareDetails page): add CommitNavigationGraph to all tabs #610
Conversation
please update the httpie request file with a request with a different head commit so we can now how the payload is supposed to be |
3513234
to
a547893
Compare
dashboard/src/api/hardwareDetails.ts
Outdated
treeCommits: TTreeCommits, | ||
): Record<string, string> => { | ||
const selectedTrees: Record<string, string> = {}; | ||
|
||
selectedIndexes.forEach(idx => { | ||
const key = idx.toString(); | ||
const value = treeCommits | ||
? treeCommits[key] || TREE_SELECT_HEAD_VALUE | ||
: TREE_SELECT_HEAD_VALUE; | ||
|
||
selectedTrees[key] = value; | ||
}); | ||
|
||
return selectedTrees; |
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.
treeCommits: TTreeCommits, | |
): Record<string, string> => { | |
const selectedTrees: Record<string, string> = {}; | |
selectedIndexes.forEach(idx => { | |
const key = idx.toString(); | |
const value = treeCommits | |
? treeCommits[key] || TREE_SELECT_HEAD_VALUE | |
: TREE_SELECT_HEAD_VALUE; | |
selectedTrees[key] = value; | |
}); | |
return selectedTrees; | |
treeCommits: TTreeCommits = {}, | |
): Record<string, string> => { | |
const selectedTrees: Record<string, string> = {}; | |
selectedIndexes.forEach(idx => { | |
const key = idx.toString(); | |
const value = treeCommits[idx] || TREE_SELECT_HEAD_VALUE; | |
selectedTrees[key] = value; | |
}); | |
return selectedTrees; |
@@ -24,6 +23,8 @@ import MemoizedIssuesList from '@/components/Cards/IssuesList'; | |||
import MemoizedHardwareTested from '@/components/Cards/HardwareTested'; | |||
import type { TestsTableFilter } from '@/types/tree/TreeDetails'; | |||
|
|||
import TreeCommitNavigationGraph from '../TreeCommitNavigationGraph'; |
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.
relative import, we need the linter rule
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.
I thought we would use relative import when getting from the parent directory, I'll change it
@@ -26,6 +25,8 @@ import MemoizedIssuesList from '@/components/Cards/IssuesList'; | |||
|
|||
import { DesktopGrid, InnerMobileGrid, MobileGrid } from '../TabGrid'; | |||
|
|||
import TreeCommitNavigationGraph from '../TreeCommitNavigationGraph'; |
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.
relative import
@@ -27,6 +26,8 @@ import MemoizedHardwareTested from '@/components/Cards/HardwareTested'; | |||
|
|||
import { TestsTable } from '@/components/TestsTable/TestsTable'; | |||
|
|||
import TreeCommitNavigationGraph from '../TreeCommitNavigationGraph'; |
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.
relative import
@@ -35,9 +35,11 @@ import type { ArchCompilerStatus } from '@/types/general'; | |||
|
|||
import FilterLink from '../../HardwareDetailsFilterLink'; | |||
import { MemoizedSummaryItem } from '../Build/BuildTab'; | |||
import HardwareCommitNavigationGraph from '../HardwareCommitNavigationGraph'; |
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.
relative import
gitBranch={tree.gitRepositoryBranch || ''} | ||
gitUrl={tree.gitRepositoryUrl || ''} | ||
treeId={treeId || ''} | ||
headCommitHash={tree.headGitCommitHash || ''} |
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.
Don't give fake news to the component, let the component deal with the undefined
diffFilter: TFilter; | ||
gitUrl: string; | ||
gitBranch: string; | ||
headCommitHash: string; |
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.
Make things that can be undefined optional here
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.
nice
b6026fd
to
f990c39
Compare
commit_hashes = [tree["git_commit_hash"] for tree in trees] | ||
qFilter = Q(build__checkout__start_time__gte=start_datetime) | ||
qFilter &= Q(build__checkout__start_time__lte=end_datetime) | ||
qFilter |= Q(build__checkout__git_commit_hash__in=commit_hashes) |
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.
I don't know if this comment went trough because it disappeared, but I don't think we need to filter with timestamps here since we already have the commit hashes
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.
yes I notice that and I'm removing it right now
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.
pre approving it
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.
There are some trees which seem to not be defaulted to its head, such as here
dashboard/src/components/CommitNavigationGraph/CommitNavigationGraph.tsx
Outdated
Show resolved
Hide resolved
now we can select choose the threes and select a specif commit of the tree Part of #477
- The endpoint just need to use a limit time, there is no need to use a start time
0a07989
to
79af132
Compare
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.
Working well on my tests
Close #477
How To test: