Commit graph

42 commits

Author SHA1 Message Date
Gabriel Hernandez
eeb1704777
add readme for assets dir and cleanup directory (#33210)
add a readme to the assets directory stating its purpose. We also
untrack generated assets that were mistakenly commited.
2025-10-03 16:44:38 +01:00
Scott Gress
466d1382e7
remove feature flag from bitlocker (#31886)
# Details

Realized we left the feature flag in for BitLocker, so this PR removes
it. We also discussed during the last demo that "Advanced" should always
be visible, even when the "Turn on disk encryption" is not checked.

# Checklist for submitter

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

- [ ] 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.
n/a

## Testing

- [ ] Added/updated automated tests
- [ ] 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
2025-08-14 10:11:00 -05:00
Scott Gress
fcdd01d78d
Add "Require BitLocker PIN" checkbox to disk encryption page (#31132)
for #31064 

# Details

This PR adds a "Require BitLocker PIN" checkbox under a new "Advanced"
section on the Disk Encryption page. This UI will only be visible if:

* "Turn on disk encryption" is checked
* The front-end was compiled using the `SHOW_BITLOCKER_PIN_OPTION=true`
env var, e.g.:
```
SHOW_BITLOCKER_PIN_OPTION=true NODE_ENV=development yarn run webpack --progress --watch
```

See Figma for reference:
https://www.figma.com/design/XbhlPuEJxQtOgTZW9EOJZp/-28133-Enforce-BitLocker-PIN?node-id=5334-1026&t=NuPo1M5fJepyCCRy-0

With encryption off:
<img width="569" height="233" alt="image"
src="https://github.com/user-attachments/assets/558e74cc-ce3d-47e3-aa14-1391e1cb4146"
/>

With encryption on:
<img width="551" height="285" alt="image"
src="https://github.com/user-attachments/assets/adfe2ead-4c5c-43a0-a5aa-9566635aba5f"
/>

Expanded:
<img width="534" height="297" alt="image"
src="https://github.com/user-attachments/assets/ac0620a2-528f-4118-ae46-992a646c97d8"
/>

Tooltip:
<img width="579" height="317" alt="image"
src="https://github.com/user-attachments/assets/23d13820-9bcb-49fb-b32b-2b5c60e7e55c"
/>



# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
   - will add changelog when feature is complete
- [x] Manual QA for all new/changed functionality
2025-07-23 14:36:28 -05:00
Lucas Manuel Rodriguez
1c5700a8c4
Microsoft Compliance Partner backend changes (#29540)
For #27042.

Ready for review, just missing integration tests that I will be writing
today.

- [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/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)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [X] If database migrations are included, checked table schema to
confirm autoupdate
- For new Fleet configuration settings
- [X] Verified that the setting can be managed via GitOps, or confirmed
that the setting is explicitly being excluded from GitOps. If managing
via Gitops:
- [X] Verified that the setting is exported via `fleetctl
generate-gitops`
- [X] Added the setting to [the GitOps
documentation](https://github.com/fleetdm/fleet/blob/main/docs/Configuration/yaml-files.md#L485)
- [X] Verified that the setting is cleared on the server if it is not
supplied in a YAML file (or that it is documented as being optional)
- [x] Verified that any relevant UI is disabled when GitOps mode is
enabled
- For database migrations:
- [X] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [X] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [X] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Added/updated automated tests
- [X] Manual QA for all new/changed functionality

---------

Co-authored-by: jacobshandling <[email protected]>
Co-authored-by: Jacob Shandling <[email protected]>
2025-06-11 14:22:46 -03:00
Scott Gress
183d0d8150
Update SQL parser to handle more modern syntax (#28211)
For #26366

# 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.

# Details

This PR fixes an issue where the SQL parser in the UI doesn't recognize
window functions like `OVER()` and marks the SQL as having syntax
errors. The fix here is to update to a more modern parsing library. This
involved updating some AST-parsing code we have for determining which
tables are used in a query, for the purposes of feeding autocomplete and
determining query compatibility.

# Testing

I tested this with the query mentioned in #26366 in Chrome, Firefox and
Safari on MacOS. I also added new unit tests for our SQL helper
functions.

# Notes

During testing I discovered that we were bundling two versions of the
ACE editor into our frontend package. By upgrading one version by a
couple of patches to make the two dependencies equal, we chop out ~300k
from our bundle.
2025-04-16 10:10:52 -05:00
jacobshandling
f58519914b
UI: Conditional access - Microsoft Entra (#27982)
_Note - currently feature flagged. Build frontend with
`ALLOW_CONDITIONAL_ACCESS=true NODE_ENV=development yarn run webpack
--progress --watch` to enable this feature. Also, all of this
functionality depends on the new `config.license.managed_cloud` being
true, so you'll need to mock that data somehow. [This
branch](https://github.com/fleetdm/fleet/tree/27043-fake-data) has the
appropriate fake data for testing_

## For #27043, #27864

### Build front end for Fleet's integration with Microsoft Entra,
allowing conditional preventtion of single sign-on for hosts failing any
policies on a team

#### Trigger the integration

![trigger](https://github.com/user-attachments/assets/4578568a-f64a-4390-83d9-fbec751d4b14)

#### Triggered, but configuration still not verified
<img width="1348" alt="√ not-verified-return-to-prefilled-form"
src="https://github.com/user-attachments/assets/44d0c21f-2554-40a8-9158-d1107cff2d09"
/>

#### Verified, short and long tenant ids:

![ezgif-75f82492180d28](https://github.com/user-attachments/assets/015f3605-81e8-463a-be74-07bab99d9724)

#### Verified –> Deleted
![√ verified - delete -
deleted](https://github.com/user-attachments/assets/44b8ba70-49c9-43e7-be54-8474756a5b50)

#### Enable for policies of a team
![√
enable-for-team](https://github.com/user-attachments/assets/9454b0da-059d-4991-a3ff-14e74257a3a7)

#### Activities
<img width="886" alt="√ activities"
src="https://github.com/user-attachments/assets/d21e6185-c2f2-40b2-9c69-9b92fab58766"
/>

#### Unavailable for self-hosted Fleet instances:

![no-access-self-hosted](https://github.com/user-attachments/assets/56213522-b721-472f-9174-c8dac0df61f3)

#### Premium only
![√
premium-only](https://github.com/user-attachments/assets/97373960-6b38-458b-be37-4c3868469182)


- [x] Changes file added for user-visible changes in `changes/`
- [x] Added/updated automated tests
- [x] A detailed QA plan exists on the associated ticket (if it isn't
there, work with the product group's QA engineer to add it)
- [ ] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <[email protected]>
2025-04-15 13:55:07 -07:00
jacobshandling
b990b3c6d9
UI - GitOps Mode, 3/3 (#26537)
## For #26229 

- Remove feature flag
- Undo updates to 4 Policies automation modals to facilitate refactor
being implemented in parallel
- Remaining specs:

**Manage teams:**

![manage-teams](https://github.com/user-attachments/assets/af8d8d10-2add-4d8d-8961-61d0de44b067)

Empty:
<img width="1464" alt="Screenshot 2025-02-21 at 4 27 30 PM"
src="https://github.com/user-attachments/assets/17cf4fc2-cc4e-4f63-8276-3db79b44e9e1"
/>

**Team users:**

![team-users](https://github.com/user-attachments/assets/1bf106c1-bdf7-442c-a957-6c9eea6af14d)
Empty:
<img width="1464" alt="Screenshot 2025-02-21 at 4 29 01 PM"
src="https://github.com/user-attachments/assets/46dd0e44-2af3-4ca7-a0be-628e358a61d7"
/>

**Team agent options:**

![team-agent-options](https://github.com/user-attachments/assets/7d4ee8b6-03c7-48d2-8337-b2c33e50abe9)

**Team settings:**

![team-settings](https://github.com/user-attachments/assets/a67b45fc-a5ce-4267-b8fd-2f1e300d1fd8)


- [x] Changes file added for user-visible changes in `changes/`
- [x] Added/updated automated tests
- [ ] A detailed QA plan exists on the associated ticket (if it isn't
there, work with the product group's QA engineer to add it)
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <[email protected]>
2025-02-21 16:56:20 -08:00
jacobshandling
5d9026b7e5
UI - GitOps Mode: Core abstractions, first batch of applications (#26401)
## For #26229 – Part 1


![ezgif-6bbe6d60c12ed4](https://github.com/user-attachments/assets/37a04b64-abd7-4605-b4ac-9542836ff562)

- This PR contains the core abstractions, routes, API updates, and types
for GitOps mode in the UI. Since this work will touch essentially every
part of the Fleet UI, it is ripe for merge conflicts. To mitigate such
conflicts, I'll be merging this work in a number of iterative PRs. ~To
effectively gate any of this work from showing until it is all merged to
`main`, [this commit](feedbb2d4c) hides
the settings section that allows enabling/disabling this setting,
effectively feature flagging the entire thing. In the last of these
iterative PRs, that commit will be reverted to engage the entire
feature. For testing purposes, reviewers can `git revert
feedbb2d4c25ec2e304e1f18d409cee62f6752ed` locally~ The new settings
section for this feature is feature flagged until all PRs are merged -
to show the setting section while testing, run `ALLOW_GITOPS_MODE=true
NODE_ENV=development yarn run webpack --progress --watch` in place of
`make generate-dev`

- Changes file will be added and feature flag removed in the last PR

- [x] Settings page with routing, form, API integration (hidden until
last PR)
- [x] Activities
- [x] Navbar indicator
- Apply GOM conditional UI to:
    - [x] Manage enroll secret modal: .5
    -  Controls >
        - [x] Scripts:
        - Setup experience > 
            - [x] Install software > Select software modal
        - [x] OS Settings >
            - [x] Custom settings
            - [x] Disk encryption
        - [x] OS Updates
 
2/18/25, added to this PR:

   - [x] Controls > Setup experience > Run script
   - [x] Software >
        - [x] Manage automations modal
        - [x] Add software >
            - [x] App Store (VPP)
            - [x] Custom package
   - [x] Queries
        - [x] Manage
        - [x] Automations modal
        - [x] New
        - [x] Edit
   - [x] Policies
     - [x] Manage
     - [x] New
     - [x] Edit
     -  Manage automations
       - [x] Calendar events


- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <[email protected]>
2025-02-20 08:41:07 -08:00
Martin Angers
c1c5c77dfc
Fix download software installer path (#21255)
Co-authored-by: gillespi314 <[email protected]>
2024-08-13 11:45:03 -05:00
Roberto Dip
92e540aee5
add scripts to add/remove software (#18649)
for:

- https://github.com/fleetdm/fleet/issues/18314
- https://github.com/fleetdm/fleet/issues/18315
- https://github.com/fleetdm/fleet/issues/18317
- https://github.com/fleetdm/fleet/issues/18316

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-05-01 14:15:59 -03:00
Zach Wasserman
a14228dd11
Upgrade webpack to v5 (#11173)
Upgrades webpack and other JS dependencies. This was primarily motivated
by GitHub reporting a vulnerability in Webpack (which shouldn't actually
effect our use of Webpack) and wanting to clean up some tech debt.

Note that equivalent functionality for url-loader and file-loader is now
included in webpack itself.

# Checklist for submitter

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

- [x] Manual QA for all new/changed functionality
2023-04-14 07:58:54 -07:00
Zach Wasserman
515cdb918c
Replace import-glob-loader with node-sass-glob-importer (#10171)
import-glob-loader has a very old loader-utils dependency that triggers
security alerting. Hoping that replacing this will allow the
loader-utils version to be updated.

# Checklist for submitter

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

- [x] Manual QA for all new/changed functionality
2023-03-01 12:33:42 -08:00
Gabriel Hernandez
f61a17bd9b
add google analytics to sandbox instances (#6941)
* add google analytics to sandbox instances

* Add serverType variable to frontend handler

* update version of html-webpack-plugin

Co-authored-by: Lucas Rodriguez <[email protected]>
2022-08-01 11:27:12 +01:00
Luke Heath
48f85cfb17
Optimize webpack using esbuild-loader (#4586) 2022-03-15 09:45:34 -05:00
Zach Wasserman
1e78c0ffe2
Speed up CI build/test (#657)
- Use NODE_ENV=development for Webpack in CI.
- Add caching for Webpack modules in development.
- Remove time of day from dates in version string (helps with build caching).
- Use Go cache in CI.

This makes about a 20% savings on the total time for the CI run.
2021-04-16 16:14:56 -07:00
Gabe Hernandez
0b9d20329b
add ts to data table components (#364)
* chnage webpack to resolve typescript modules. convert TextCell to TS

* change headercell and statuscell to ts

* ignore casesensitve error, seems a bit buggy

* ignore camelcase error, we already use snakecase many places

* updated LinkCell and modules it depends on to typescript

* fix up some warnings from changes

* fix more types in textcell and hosttableconfig

* use alias imports

* add require button state interfcae
2021-03-03 16:51:39 +00:00
Gabe Hernandez
f41f6ba112
Add javascript source maps in development (#273) 2021-02-04 12:30:46 +00:00
Zachary Wasserman
adf87140a7
Add ability to prefix Fleet URLs (#2112)
- Add the server_url_prefix flag for configuring this functionality
- Add prefix handling to the server routes
- Refactor JS to use appropriate paths from modules
- Use JS template to get URL prefix into JS environment
- Update webpack config to support prefixing

Thanks to securityonion.net for sponsoring the development of this feature.

Closes #1661
2019-10-16 16:40:45 -07:00
Zachary Wasserman
7b1ecc0c28
Upgrade to Webpack 4 (#2079) 2019-07-29 09:40:16 -07:00
Zachary Wasserman
c8229cc0d6
Replace uses of the term "Kolide" with "Fleet" (#1999)
Almost two years ago, we began referring to the project as Fleet, but there are
many occurences of the term "Kolide" throughout the UI and documentation. This
PR attempts to clear up those uses where it is easily achievable.

The term "Kolide" is used throughout the code as well, but modifying this would
be more likely to introduce bugs.
2019-01-24 09:39:32 -08:00
Zachary Wasserman
759a69b5b7
Upgrade Bourbon to 5.1.0 and fix deprecation warnings (#1973)
- Replace uses of deprecated Bourbon helpers with raw CSS
- Add autoprefixer into the build chain to prefix the now removed helpers

This process was achieved by running through each of the deprecation warnings and using the following bash function to replace it in all files:

```
function bourbon-deprecate() {
    grep -rl "@include $1" ./frontend --exclude-dir=.git | xargs sed -i '' -E "s/@include $1[(](.*)[)]/$1: \1/g"
}
```

For some helpers, this did not result in valid CSS, so manual modifications were made.

Closes #1189 #1274
2019-01-03 12:46:55 -08:00
Kyle Knight
a64d88ff67 Update Webpack to v2 (#1393) 2017-03-13 15:13:33 -04:00
Jason Meller
77f32a3d4e Don't inject a duplicate script tag in react.tmpl (#1030) 2017-01-19 12:14:43 -05:00
Jason Meller
35c7fd6e03 Build assets for production (#1022) 2017-01-19 10:24:10 -05:00
Mike Arpaia
e4fa278f59 Removing unused webpack aliases (#734) 2016-12-31 01:41:01 -07:00
Zachary Wasserman
7f7bcd177d Suppress sqlite-parser warning in make generate (#609)
Closes #595
2016-12-13 10:35:46 -08:00
Mike Stone
01e7ac2b6c Create query (#382)
* API call to create queries

* Add queries to redux

* create query when query form is submitted

* Redirect to ShowQueryPage after creating query

* Removes theme dropdown and NewQuery component header

* Extract NewQueryPage component state to redux state

* Pass logic down to NewQuery component as props

* Changes NewQuery component name to QueryComposer

* Render NewQueryPage for /queries/:id route

* Update ReduxConfig for loading a single resource

* QueryPage tests

* Get query when the query page loads

* catch errors when query is invalid

* Renames UpdateQueryForm to QueryForm to re-usability

* Changes InputField to a controlled component

* Always render the Query Form on Query Pages
2016-11-07 11:42:39 -05:00
Kyle Knight
ca33d238d8 Converting JS/Radium styles to SCSS (#360) 2016-11-03 14:40:54 -05:00
Mike Stone
94106f87e4 Resolve import paths from the frontend directory (#396) 2016-11-02 11:54:43 -04:00
Mike Stone
cd7f925fdb Typescript (#355) 2016-10-31 17:02:06 -04:00
Kyle Knight
b0da10cd4d Allow SCSS to import globs (#332) 2016-10-21 11:57:33 -04:00
Mike Stone
23ffa5be62 Query side panel (#269)
* QuerySidePanel component

* Adds all osquery table names to ace editor mode

* kolide theme for strings

* Detect OS from browser

* Show utility and specs availability as 'All Platforms'

* Show column description as alt text
2016-10-11 11:32:39 -04:00
Mike Stone
facee9bd89 Target input select (#272)
* Adds react-select package

* Implement react-select for selecting query targets

* log all form data when a query is run
2016-10-04 18:11:52 -04:00
Jason Meller
55307de42d SCSS Pipeline and style fixes (#229)
* Add SCSS pipeline and fix login style issues

* Fix nav styles and make tests pass

* Fix nav header styles and animations

* Change font-size to 13px on nav

* Fix duplicate specificity of styles
2016-09-23 14:04:01 -04:00
Mike Stone
b638ae186d Login page form submission (#157)
* API client utility

* moves test helpers to the test directory

* Utility to namespace local storage keys

* LoginSuccessfulPage component

* Check icon

* adds auth to redux state

* successful form submission

* Allow tests to load dummy SVG static images & test fixes
2016-09-13 22:43:26 -07:00
Jason Meller
5e9f93d08a Add assets folder so we can serve images (#155) 2016-09-12 12:11:18 -04:00
Mike Stone
a0a035f2c4 Icon component setup & bg image (#133) 2016-09-08 08:50:44 -04:00
Mike Stone
906bf79526 Changes CSS styles to JS using Radium (#129) 2016-09-07 16:07:45 -04:00
Mike Stone
47e28d29aa Redux configuration (#122) 2016-09-06 20:04:02 -04:00
Mike Arpaia
6bdf3fba4b cleaning up some development files (#115) 2016-09-05 17:58:49 -04:00
Mike Arpaia
64d16b8a16 README and workflow updates (#62) 2016-08-10 08:31:27 -07:00
Mike Arpaia
3a9381c5b3 React Base (#61)
* Add sensible React base to the app for frontend

This PR attempts to "reactify" Kolide and provide a sane development environment
that a front-end engineer would probably expect.

This PR accomplishes by doing the following:

1. Reorganizes the app into a `server/` and `client/` folders to keep golang
logic separated from react logic.

2. Adds an "asset pipeline" via webpack which knows how to build a js
and css bundle.

3. Packages up all static assets in a go-bindata file so that the binary
remains portable without external file dependencies.

1. Add a Makefile with several targets that will be common in everyday
development. For example, we have `serve` target which spins up a nodejs
reverse proxy on port 8081 which then watches for changed files, automatically
rebuilds the app, and hot loads the new JS/CSS in.

 **Note:** Please use `make` to build the app, not `go build` as there are
now several things that need to be orchestrated beyond the go code to build the app.

* Create build if it doesn't exist, and use `go get`

* Improve README to reflect new dev workflow

* Document css vars and funcs and use alias paths

* makefile and structure modifications
2016-08-09 22:15:44 -07:00