Files
Jordan MontgomeryandCopilot Autofix powered by AI 087ce7ab56 Add UI for assets (#49071)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #48571 

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

No changes file as this is a subtask
- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements), JS
inline code is prevented especially for url redirects, and untrusted
data interpolated into shell scripts/commands is validated against shell
metacharacters.
- [x] Timeouts are implemented and retries are limited to avoid infinite
loops
- [x] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

## Testing

- [x] Added/updated automated tests
- [x] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)
- [x] QA'd all new/changed functionality manually

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added a Premium-only **Assets** tab to Configuration Profiles, with
JSON asset list, upload, download, copy, and delete (delete limited for
technician views).
* Added a Premium-only **Assets** entry to the command palette
configuration controls.
* Introduced a new **file-json** graphic type and enhanced user-scoped
profile indicators (with iOS/iPad-specific behavior).
* **Bug Fixes**
* Updated navigation so the **Assets** view opens consistently from
settings and the command palette.
* Improved visual alignment of tooltip/icon elements in asset and scope
displays.
* **Tests**
* Added coverage for Assets, upload/download/delete behaviors, and
related UI components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-10 16:29:35 +02:00

69 lines
1.7 KiB
TypeScript

import React from "react";
import { uniqueId } from "lodash";
const FileJson = () => {
const clipPathId = uniqueId("clip-path-");
return (
<svg xmlns="http://www.w3.org/2000/svg" width="34" height="40" fill="none">
<g clipPath={`url(#${clipPathId})`}>
<path
fill="#fff"
stroke="#192147"
strokeWidth={0.5}
d="M29.333 39.75H4.667a2.417 2.417 0 0 1-2.417-2.416V2.667A2.417 2.417 0 0 1 4.667.25h19.562c.64 0 1.255.255 1.709.708l5.104 5.105c.453.453.708 1.068.708 1.709v29.562a2.417 2.417 0 0 1-2.417 2.416Z"
/>
<path
fill="#C5C7D1"
d="M23.5.5h.834l.5 6.5 6.666.5v1h-6a2 2 0 0 1-2-2v-6Z"
/>
<path
stroke="#192147"
strokeWidth={0.5}
d="M24.5.334v5.667c0 .736.597 1.333 1.333 1.333h6"
/>
<path
fill="#C5C7D1"
d="M2.5 20h25a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2h-25V20Z"
/>
<rect
width={27.7}
height={16.35}
x={0.25}
y={18.25}
fill="#515774"
rx={1.75}
/>
<text
x={14.1}
y={26.7}
fill="#fff"
fontFamily="Inter, sans-serif"
fontSize={7.5}
fontWeight={700}
textAnchor="middle"
>
json
</text>
<rect
width={27.7}
height={16.35}
x={0.25}
y={18.25}
stroke="#192147"
strokeWidth={0.5}
rx={1.75}
/>
</g>
<defs>
<clipPath id={clipPathId}>
<path fill="#fff" d="M0 0h34v40H0z" />
</clipPath>
</defs>
</svg>
);
};
export default FileJson;