fleet/.vscode/launch.json
Scott Gress e247a3b871
Update policies page empty state (#25726)
for #23312 

# Checklist for submitter

- [X] 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/Committing-Changes.md#changes-files)
for more information.

This PR updates the verbiage on the Policies page when no policies are
present for the selected team (or All Teams). It also does a little bit
of code cleanup. Existing test was updated and a new test added. I've
also added VSCode test runners to easily run Jest tests from the IDE.

The [original request](https://github.com/fleetdm/fleet/issues/23073)
mentioned removing the button from the page if All Teams is selected,
but I don't think we should do that -- you can add All Teams policies
with it.

## Screenshots

Empty state for "All teams" (admin):
<img width="658" alt="image"
src="https://github.com/user-attachments/assets/3db674ef-b83e-4a4f-9ba9-adaf0ff17d3d"
/>

Empty state for a team (admin):
<img width="699" alt="image"
src="https://github.com/user-attachments/assets/49b966ff-f335-43c6-b1ed-b6f11b167c68"
/>

Empty state for "All teams" (non-admin):
<img width="663" alt="image"
src="https://github.com/user-attachments/assets/b9685b40-3b42-43f0-a0ff-09602b9d532a"
/>

Empty state for a team (non-admin):
<img width="643" alt="image"
src="https://github.com/user-attachments/assets/034566d2-7c1b-42c8-8655-99447193d099"
/>
2025-01-29 11:12:28 -06:00

131 lines
No EOL
3.9 KiB
JSON

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Test package",
"type": "go",
"request": "launch",
"mode": "test",
"cwd": "${fileDirname}",
"env": {
"MYSQL_TEST": 1,
"REDIS_TEST": 1,
"NETWORK_TEST": 1
},
"buildFlags": "-tags='full,fts5'",
"program": "${fileDirname}"
},
{
"name": "Test file",
"type": "go",
"request": "launch",
"mode": "test",
"cwd": "${fileDirname}",
"env": {
"MYSQL_TEST": 1,
"REDIS_TEST": 1,
"NETWORK_TEST": 1
},
"buildFlags": "-tags='full,fts5'",
"program": "${file}"
},
{
"name": "Fleet serve",
"type": "go",
"request": "launch",
"mode": "auto",
"buildFlags": "-tags='full,fts5'",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/cmd/fleet",
"args": [
"serve",
"--dev",
"--logging_debug"
]
},
{
"name": "Fleet serve (licensed)",
"type": "go",
"request": "launch",
"mode": "auto",
"buildFlags": "-tags='full,fts5'",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/cmd/fleet",
"args": [
"serve",
"--dev",
"--logging_debug",
"--dev_license"
]
},
{
"name": "Fleet vuln_processing (licensed)",
"type": "go",
"request": "launch",
"mode": "auto",
"buildFlags": "-tags='full,fts5'",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/cmd/fleet",
"args": [
"vuln_processing",
"--dev",
"--logging_debug",
"--dev_license",
]
},
{
"name": "Attach to a running Fleet server",
"type": "go",
"request": "attach",
"mode": "remote",
"port": 61179,
"host": "127.0.0.1",
},
{
"type": "pwa-chrome",
"name": "Fleet UI (Chrome)",
"request": "launch",
"url": "https://localhost:8080"
},
{
"type": "firefox",
"name": "Fleet UI (Firefox)",
"request": "launch",
"url": "https://localhost:8080",
"pathMappings": [
{
"url": "webpack:///frontend",
"path": "${workspaceFolder}/frontend"
}
]
},
{
"name": "Jest: test current file",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"args": [
"--config",
"./frontend/test/jest.config.ts",
"${relativeFile}"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"name": "Jest: run all tests",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"args": [
"--config",
"./frontend/test/jest.config.ts"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}