mirror of
https://github.com/juanfont/headscale.git
synced 2026-02-27 09:57:41 +01:00
Compare commits
5 Commits
remove-nod
...
topic/pret
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1b18b36dd | ||
|
|
68503581a0 | ||
|
|
e2afd30b1c | ||
|
|
c906aaf927 | ||
|
|
580f96ce83 |
27
.github/workflows/docs-test.yml
vendored
Normal file
27
.github/workflows/docs-test.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: Test documentation build
|
||||||
|
|
||||||
|
on: [pull_request]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Install python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- name: Setup cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
key: ${{ github.ref }}
|
||||||
|
path: .cache
|
||||||
|
- name: Setup dependencies
|
||||||
|
run: pip install -r docs/requirements.txt
|
||||||
|
- name: Build docs
|
||||||
|
run: mkdocs build --strict
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
cairosvg~=2.7.1
|
cairosvg~=2.7.1
|
||||||
mkdocs-material~=9.4.14
|
mkdocs-material~=9.5.18
|
||||||
mkdocs-minify-plugin~=0.7.1
|
mkdocs-minify-plugin~=0.7.1
|
||||||
pillow~=10.1.0
|
pillow~=10.1.0
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
This page contains community contributions. The projects listed here are not
|
This page contains community contributions. The projects listed here are not
|
||||||
maintained by the Headscale authors and are written by community members.
|
maintained by the Headscale authors and are written by community members.
|
||||||
|
|
||||||
| Name | Repository Link | Description | Status |
|
| Name | Repository Link | Description | Status |
|
||||||
| --------------- | ------------------------------------------------------- | ------------------------------------------------------------------------- | ------ |
|
| --------------- | ------------------------------------------------------- | --------------------------------------------------------------------------- | ------ |
|
||||||
| headscale-webui | [Github](https://github.com/ifargle/headscale-webui) | A simple Headscale web UI for small-scale deployments. | Alpha |
|
| headscale-webui | [Github](https://github.com/ifargle/headscale-webui) | A simple Headscale web UI for small-scale deployments. | Alpha |
|
||||||
| headscale-ui | [Github](https://github.com/gurucomputing/headscale-ui) | A web frontend for the headscale Tailscale-compatible coordination server | Alpha |
|
| headscale-ui | [Github](https://github.com/gurucomputing/headscale-ui) | A web frontend for the headscale Tailscale-compatible coordination server | Alpha |
|
||||||
| HeadscaleUi | [GitHub](https://github.com/simcu/headscale-ui) | A static headscale admin ui, no backend enviroment required | Alpha |
|
| HeadscaleUi | [GitHub](https://github.com/simcu/headscale-ui) | A static headscale admin ui, no backend enviroment required | Alpha |
|
||||||
|
| headscale-admin | [Github](https://github.com/GoodiesHQ/headscale-admin) | Headscale-Admin is meant to be a simple, modern web interface for Headscale | Beta |
|
||||||
|
|
||||||
You can ask for support on our dedicated [Discord channel](https://discord.com/channels/896711691637780480/1105842846386356294).
|
You can ask for support on our dedicated [Discord channel](https://discord.com/channels/896711691637780480/1105842846386356294).
|
||||||
|
|||||||
@@ -206,6 +206,11 @@ func SetTags(
|
|||||||
tags []string,
|
tags []string,
|
||||||
) error {
|
) error {
|
||||||
if len(tags) == 0 {
|
if len(tags) == 0 {
|
||||||
|
// if no tags are provided, we remove all forced tags
|
||||||
|
if err := tx.Model(&types.Node{}).Where("id = ?", nodeID).Update("forced_tags", types.StringList{}).Error; err != nil {
|
||||||
|
return fmt.Errorf("failed to remove tags for node in the database: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -386,6 +386,13 @@ func (s *Suite) TestSetTags(c *check.C) {
|
|||||||
check.DeepEquals,
|
check.DeepEquals,
|
||||||
types.StringList([]string{"tag:bar", "tag:test", "tag:unknown"}),
|
types.StringList([]string{"tag:bar", "tag:test", "tag:unknown"}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// test removing tags
|
||||||
|
err = db.SetTags(node.ID, []string{})
|
||||||
|
c.Assert(err, check.IsNil)
|
||||||
|
node, err = db.getNode("test", "testnode")
|
||||||
|
c.Assert(err, check.IsNil)
|
||||||
|
c.Assert(node.ForcedTags, check.DeepEquals, types.StringList([]string{}))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestHeadscale_generateGivenName(t *testing.T) {
|
func TestHeadscale_generateGivenName(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user