-
Notifications
You must be signed in to change notification settings - Fork 402
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
Frontend of iOS/iPadOS as platforms/labels #20157
Merged
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a6fb8ee
Fleet UI: Add iOS and iPadOS support, part 1
RachelElysia bef66df
Custom settings updates, including styling
RachelElysia 78e1840
Everything but add host / manage host and testing
RachelElysia 63b8237
Fix broken icon, 8 page pagination, commit includes test data
RachelElysia 025193b
Fix boolean like tabs to support 4 tabs
RachelElysia db3e776
Finish frontend (with mock data/code commented out)
RachelElysia 39673a9
Remove any mock data, remove code bypassing and logs
RachelElysia 1bb7844
Clean up interfaces, better responsive design
RachelElysia 5cc4c65
Fix platform typing
RachelElysia e5c27a4
Final updates to platform interfaces
RachelElysia a6f7ed5
Interface cleanup, casing bug, hook up os_versions API call, show os …
RachelElysia 0f7907a
Code review updates
RachelElysia 0ee31bd
Fix file extension downloader for ios/ipado
RachelElysia c955f02
Merge branch 'main' into 19962-ipados-ios-platforms
RachelElysia 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
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
8 changes: 4 additions & 4 deletions
8
frontend/components/TableContainer/DataTable/PlatformCell/PlatformCell.tsx
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import React from "react"; | ||
import React, { useCallback } from "react"; | ||
import PATHS from "router/paths"; | ||
|
||
import { PLATFORM_NAME_TO_LABEL_NAME } from "pages/DashboardPage/helpers"; | ||
|
@@ -45,10 +45,16 @@ const HostsSummary = ({ | |
opacity = isLoadingHostsSummary ? { opacity: 0.4 } : { opacity: 1 }; | ||
} | ||
|
||
const getBuiltinLabelId = useCallback( | ||
(platformName: keyof typeof PLATFORM_NAME_TO_LABEL_NAME) => | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🙌 |
||
builtInLabels?.find( | ||
(builtin) => builtin.name === PLATFORM_NAME_TO_LABEL_NAME[platformName] | ||
)?.id, | ||
[builtInLabels] | ||
); | ||
|
||
const renderMacCount = (teamId?: number) => { | ||
const macLabelId = builtInLabels?.find((builtin) => { | ||
return builtin.name === PLATFORM_NAME_TO_LABEL_NAME.darwin; | ||
})?.id; | ||
const macLabelId = getBuiltinLabelId("darwin"); | ||
|
||
if (isLoadingHostsSummary || macLabelId === undefined) { | ||
return <></>; | ||
|
@@ -69,9 +75,7 @@ const HostsSummary = ({ | |
}; | ||
|
||
const renderWindowsCount = (teamId?: number) => { | ||
const windowsLabelId = builtInLabels?.find( | ||
(builtin) => builtin.name === PLATFORM_NAME_TO_LABEL_NAME.windows | ||
)?.id; | ||
const windowsLabelId = getBuiltinLabelId("windows"); | ||
|
||
if (isLoadingHostsSummary || windowsLabelId === undefined) { | ||
return <></>; | ||
|
@@ -91,9 +95,7 @@ const HostsSummary = ({ | |
}; | ||
|
||
const renderLinuxCount = (teamId?: number) => { | ||
const linuxLabelId = builtInLabels?.find( | ||
(builtin) => builtin.name === PLATFORM_NAME_TO_LABEL_NAME.linux | ||
)?.id; | ||
const linuxLabelId = getBuiltinLabelId("linux"); | ||
|
||
if (isLoadingHostsSummary || linuxLabelId === undefined) { | ||
return <></>; | ||
|
@@ -113,9 +115,7 @@ const HostsSummary = ({ | |
}; | ||
|
||
const renderChromeCount = (teamId?: number) => { | ||
const chromeLabelId = builtInLabels?.find( | ||
(builtin) => builtin.name === PLATFORM_NAME_TO_LABEL_NAME.chrome | ||
)?.id; | ||
const chromeLabelId = getBuiltinLabelId("chrome"); | ||
|
||
if (isLoadingHostsSummary || chromeLabelId === undefined) { | ||
return <></>; | ||
|
@@ -136,9 +136,7 @@ const HostsSummary = ({ | |
}; | ||
|
||
const renderIosCount = (teamId?: number) => { | ||
const iosLabelId = builtInLabels?.find( | ||
(builtin) => builtin.name === PLATFORM_NAME_TO_LABEL_NAME.ios | ||
)?.id; | ||
const iosLabelId = getBuiltinLabelId("ios"); | ||
|
||
if (isLoadingHostsSummary || iosLabelId === undefined) { | ||
return <></>; | ||
|
@@ -159,9 +157,7 @@ const HostsSummary = ({ | |
}; | ||
|
||
const renderIpadosCount = (teamId?: number) => { | ||
const ipadosLabelId = builtInLabels?.find( | ||
(builtin) => builtin.name === PLATFORM_NAME_TO_LABEL_NAME.ipados | ||
)?.id; | ||
const ipadosLabelId = getBuiltinLabelId("ipados"); | ||
|
||
if (isLoadingHostsSummary || ipadosLabelId === undefined) { | ||
return <></>; | ||
|
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
File renamed without changes.
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
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.
For speed this can be on another iteration but can we still improve the typing on line 14?