Commit graph

22 commits

Author SHA1 Message Date
Matias Bordese
59f531e967
chore: update public API docs authentication and perms (#5349)
Related to https://github.com/grafana/oncall-private/issues/2826
2024-12-11 11:54:00 +00:00
maltelehmann
5bce7bf9da
docs: add templates.mobile_app entry to Integrations API docs (#5054)
# What this PR does

Related to
https://github.com/grafana/terraform-provider-grafana/issues/1665

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2024-09-24 10:47:43 -04:00
Joey Orlando
8dee2503e6
update public API docs subpage ordering (#4833)
# What this PR does

**Before**
![Screenshot 2024-08-15 at 13 55
40](https://github.com/user-attachments/assets/847afb34-d8d1-46f8-b6b4-fba2b6a469e0)

**After**
<img width="295" alt="Screenshot 2024-08-15 at 15 20 41"
src="https://github.com/user-attachments/assets/6cfef429-fde6-4b0d-81af-f59e97adaaaa">
2024-08-15 19:29:56 +00:00
Vadim Stepanov
f38eff9fcf
Public API docs: add note on pagination (#4795)
Fixes https://github.com/grafana/oncall-private/issues/2852
2024-08-09 14:24:24 +00:00
Jack Baldry
9ae442faa6
Replace docs/reference shortcode with ref URIs (#4301)
You can use `ref` URIs in admonitions (or any shortcodes) because they
are inline and not subject to the issues noted in the [`admonition`
shortcode](https://grafana.com/docs/writers-toolkit/write/shortcodes/#code-shortcode:~:text=to%20core%20understanding.-,WARNING,For%20more%20information%2C%20refer%20to%20Markdown%20Reference%20Links%20in%20Shortcodes.,-Examples).

The `ref` URIs perform the same pattern matching as `docs/reference` but
don't require the use of reference-style links and the destinations are
ordinary (full) URLs that can include version substitution. Unlike
`docs/reference`, the implementation doesn't use `relref` so you don't
have to be careful with omitting trailing slashes and the links will
follow redirects.

Documentation:
https://grafana.com/docs/writers-toolkit/write/links/#link-from-source-content-thats-used-in-multiple-projects

To check the links, refer to the deploy preview in
https://github.com/grafana/website/pull/19630.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2024-07-29 14:13:24 +00:00
Alyssa Wada
87dd4f90ad
refactor docs configuration section (#4646)
# What this PR does
Restructures OnCall documentation 'Configure' section 

## Which issue(s) this PR closes
Closes issue #4592
2024-07-25 15:22:39 +00:00
Joey Orlando
c5b76a5869
fix right-hand navigation in API docs (#4546)
# What this PR does

The right-hand side navigation in the OnCall API public docs
([example](https://grafana.com/docs/oncall/latest/oncall-api-reference/alertgroups/))
doesn’t render as expected vs. what we see in the Grafana API public
docs
([example](https://grafana.com/docs/grafana/latest/developers/http_api/folder/);
2nd screenshot). This PR fixes that ([convo on
Slack](https://raintank-corp.slack.com/archives/C045CTY1QEP/p1718388424649359)).


![Screenshot 2024-06-14 at 14 05
03](https://github.com/grafana/oncall/assets/9406895/0636d9d7-2f58-4c82-91b5-5b4af0dd3524)

![Screenshot 2024-06-14 at 14 06 36
(1)](https://github.com/grafana/oncall/assets/9406895/7a5bc2c8-ccb2-4b53-b982-d7d7596f90e2)
2024-06-17 11:31:35 -04:00
Alyssa Wada
80f932995c
oncall docs refactor (#3757)
# What this PR does

- Restructure the OnCall documentation to align with Grafana Labs
[documentation structure
guidance](https://grafana.com/docs/writers-toolkit/structure/).

- Updates documentation front matter to include all required fields.

## Which issue(s) this PR fixes
Related to issue #3700 

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2024-02-08 22:59:28 +00:00
Joey Orlando
767c5352fa
augment API response pagination attributes (#2471)
# What this PR does

This PR:
- adds a few attributes to paginated API responses
- removes channel filter "send demo alert" internal API endpoint + tests
(this endpoint was marked as deprecated + not consumed by the web UI)

With the new paginated API response schema, the web UI will no longer
need to:
- hardcode `ITEMS_PER_PAGE` for each table
- manually calculate total number of pages

(these two things ☝️ will be done in
https://github.com/grafana/oncall/issues/2476)

For `GET /api/internal/v1/alertgroups` the response will now look like
this:
```diff
{
    "next": <url> | None,
    "previous": <url> | None,
    "results": [],
++  "page_size": <int>
}
```

For all other paginated API responses, the response will now look like:
```diff
{
    "count": <int>,
    "next": <url> | None,
    "previous": <url> | None,
    "results": [],
++  "page_size": <int>,
++  "current_page_number": <int>,
++  "total_pages": <int>
}
```

## TODO
- [x] update public API docs to include these new attributes

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-07-14 11:19:40 -04:00
Jack Baldry
1735db4c3b
Update all links to use docs/reference style (#2456)
# What this PR does

The `docs/reference` shortcode supports contextual destinations and
version inference.

`<ONCALL VERSION>` is inferred to match the version of the documentation
set. For example, the inferred version for the page
/docs/grafana/oncall/latest/get-started/ is "latest". It can also be
overriden using front matter.
Given the same page, but with the additional front matter
`oncall_version: next`, the variable is substituted with "next" rather
than "latest".

Contextual destinations are achieved using repeated labels in the
shortcode inner text. The format is [<LABEL>]: "<PAGE PATH PREFIX> ->
<HUGO REFERENCE>".

- _`<LABEL>`_ matches the reference style link label used in the rest of
the text.
- _`<PAGE PATH PREFIX>`_ is matched against the page during the
production build. If the match is successful, the destination that is
used is _`<HUGO REFERENCE>`_. The first matching prefix is used, not the
longest matching prefix.

## Which issue(s) this PR fixes

- Broken links due to ambiguous relref resolution. Any relref parameter
that does not start with either `/`, `./`, or `../` can resolve
ambiguously and is resulting in broken link behavior on the current
site.
- Broken links in Grafana Cloud. We mount OnCall documentation in
Grafana Cloud. In https://github.com/grafana/website/pull/13872 the
location will become /docs/grafana-cloud/alerting-and-irm/oncall. This
PR is intended to be merged alongside that PR.

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-07-13 14:38:35 +00:00
Vadim Stepanov
3ec01c2855
Add inbound email address in integration API (#2113)
# What this PR does

Allows fetching inbound email address for an integration using public
API. There's a new field `inbound_email` that's only defined for inbound
email integration and `null` for any other integration types.

## Which issue(s) this PR fixes

https://github.com/grafana/oncall/issues/1989

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-06-06 13:08:54 +00:00
Jack Baldry
d3921a5386
Remove absolute aliases as it can cause unexpected redirects in future versions (#1793)
If a page is removed in a future version, the presence of a "latest"
absolute alias in a previous version can redirect that removed page.

**Notes for reviewer:**
I would like to make similar changes for older, previously published
versions.
I believe you are only publishing documentation on specific tag events
and are not maintaining long lived release branches for backporting
fixes into.
If my understanding is correct, I will make the changes in the website
repository
(https://github.com/grafana/website/tree/master/content/docs/oncall).

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-06-05 09:03:38 +00:00
Matvey Kukuy
e9ae4cc3e9
Docs restructure (#1703)
Restructured docs.

Based on: https://github.com/grafana/oncall-private/issues/1698
2023-05-24 14:11:21 +03:00
Innokentii Konstantinov
6a5e75e083
Fix of templates api behaviour for public and private api (#1408)
# What this PR does

This PR fixes templates behaviour for public and private api. It fix
"reset to default" for templates from messaging backends and some minor
bugs. Also added acknowledge signal and source link templates

## Checklist

- [x] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated
2023-03-01 16:32:15 +08:00
Joey Orlando
c08eeb72a3
add precommit rules for markdown/json files (#915)
* add markdownlint precommit steps + fix existing errors

* prettier json linting
2022-12-01 14:26:54 +01:00
Jack Baldry
87d0a50e03
Ensure canonical URLs match the new page locations
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-10-26 12:32:47 -04:00
Jack Baldry
7a22410bf6
Remove grafana-cloud absolute aliases
They will only redirect to oncall docs and not to grafana-cloud docs.
Relative aliases will correctly redirect within the grafana-cloud docs.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-10-26 12:21:59 -04:00
Jack Baldry
e5513d1275
Fix relref links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-10-18 14:41:22 -04:00
Jack Baldry
6cf190ce71
Fix more links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-06-14 14:01:03 +01:00
Eve Meelan
ba2cf5ee7b Add canonical url 2022-06-13 14:02:31 -07:00
Jack Baldry
95b6ad9f92
Convert front matter to YAML and add current aliases to all pages
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-06-09 10:08:07 +01:00
Michael Derynck
6b40f95033 World, meet OnCall!
Co-authored-by: Eve832 <eve.meelan@grafana.com>
    Co-authored-by: Francisco Montes de Oca <nevermind89x@gmail.com>
    Co-authored-by: Ildar Iskhakov <ildar.iskhakov@grafana.com>
    Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
    Co-authored-by: Julia <ferril.darkdiver@gmail.com>
    Co-authored-by: maskin25 <kengurek@gmail.com>
    Co-authored-by: Matias Bordese <mbordese@gmail.com>
    Co-authored-by: Matvey Kukuy <motakuk@gmail.com>
    Co-authored-by: Michael Derynck <michael.derynck@grafana.com>
    Co-authored-by: Richard Hartmann <richih@richih.org>
    Co-authored-by: Robby Milo <robbymilo@fastmail.com>
    Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
    Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
    Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2022-06-03 08:09:47 -06:00