Skip to content

Commit 3b18fb3

Browse files
Merge branch 'main' into RDSC-3619-remapping-the-output
2 parents 3eaee5f + 2816f49 commit 3b18fb3

File tree

1,554 files changed

+41031
-42940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,554 files changed

+41031
-42940
lines changed

assets/css/index.css

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,67 @@ input[type="radio"] {
739739
appearance: none;
740740
}
741741

742+
/* Generic GitHub-style tabs */
743+
.generic-tabs {
744+
@apply w-full mb-6;
745+
}
746+
747+
.generic-tabs .tab-nav {
748+
@apply flex bg-redis-neutral-200 rounded-t-md border-x border-t border-b-0 border-redis-pen-300;
749+
}
750+
751+
.generic-tabs .tab-radio {
752+
@apply sr-only;
753+
}
754+
755+
.generic-tabs .tab-label {
756+
@apply px-4 py-3 cursor-pointer text-sm font-medium text-redis-pen-600
757+
bg-redis-neutral-200 border-r border-redis-pen-300
758+
hover:bg-white hover:text-redis-ink-900
759+
transition-colors duration-150 ease-in-out
760+
focus:outline-none focus:ring-0
761+
select-none;
762+
}
763+
764+
.generic-tabs .tab-label:first-child {
765+
@apply rounded-tl-md;
766+
}
767+
768+
.generic-tabs .tab-radio:checked + .tab-label {
769+
@apply bg-white text-redis-ink-900 border-x border-t border-redis-pen-300 border-b-white z-10;
770+
}
771+
772+
.generic-tabs .tab-radio:checked:first-of-type + .tab-label {
773+
@apply rounded-tl-md;
774+
}
775+
776+
.generic-tabs .tab-radio:focus {
777+
@apply ring-0 outline-none;
778+
}
779+
780+
.generic-tabs .tab-radio:focus + .tab-label {
781+
@apply border-x border-t border-redis-pen-300 border-b-white focus:outline-none focus:ring-2 focus:ring-redis-pen-300 focus:ring-inset;
782+
}
783+
784+
.generic-tabs .tab-content {
785+
@apply hidden px-6 pb-6 pt-3 bg-white border border-redis-pen-300 rounded-b-md shadow-sm;
786+
/* Unified border (including top) to align with tab borders */
787+
}
788+
789+
.generic-tabs .tab-content.active {
790+
@apply block;
791+
}
792+
793+
/* Ensure proper stacking and borders */
794+
.generic-tabs .tab-content-container {
795+
@apply relative -mt-px;
796+
}
797+
798+
/* Single content box styling (when no explicit tabs are provided) */
799+
.generic-tabs-single .tab-content-single {
800+
@apply prose prose-lg max-w-none;
801+
}
802+
742803
.stack-logo-inline {
743804
display: inline;
744805
max-height: 1em;

build/components/component.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,12 @@ def _get_misc(self) -> None:
205205
self._checkout(branch, repo, misc)
206206
Component._dump_payload(repo, self._root._content, payload, misc.get('git_uri'), branch)
207207
return
208-
208+
209209
def _repo_env_dir(self) -> str:
210210
if os.getenv(f'REPO_DIR'):
211211
return os.getenv(f'REPO_DIR')
212212
return ''
213-
213+
214214
def _repo_uri(self) -> str:
215215
if(os.getenv('REPOSITORY_URL')):
216216
return os.getenv('REPOSITORY_URL')
@@ -225,7 +225,7 @@ def _skip_checkout(self, obj) -> bool:
225225
if obj.get('git_uri') == self._repo_uri() and self._preview_mode():
226226
return True
227227
return False
228-
228+
229229
def _checkout(self, ref, dest, obj):
230230
if not self._skip_checkout(obj):
231231
run(f'git checkout {ref}', cwd=dest)
@@ -303,15 +303,10 @@ def _make_repos(self) -> None:
303303
def _process_commands(self) -> None:
304304
logging.info(f'Processing {self._id} commands')
305305
for name in self._commands:
306-
path = f'{self._content}/commands/{command_filename(name)}'
307-
mkdir_p(path)
308-
run(f'mv {path}.md {path}/index.md')
309-
md = Markdown(f'{path}/index.md')
306+
path = f'{self._content}/commands/{command_filename(name)}.md'
307+
md = Markdown(path)
310308
md.process_command(name, self._commands)
311-
c = Command(name, self._commands.get(name))
312-
d = c.diagram()
313-
with open(f'{path}/syntax.svg', 'w+') as f:
314-
f.write(d)
309+
# Note: SVG generation removed as part of directory structure simplification
315310

316311
def _process_docs(self) -> None:
317312
logging.info(f'Processing {self._id} docs')
@@ -500,7 +495,7 @@ def _get_example_id_from_file(self, path):
500495

501496
def _copy_examples(self):
502497
if ex := self.get('examples'):
503-
repo = self._git_clone(ex)
498+
repo = self._git_clone(ex)
504499
dev_branch = ex.get('dev_branch')
505500
self._checkout(dev_branch, repo, ex)
506501
path = ex.get('path', '')

build/update_cmds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
v = j.get(k)
1313
c = Command(k, v)
1414
sf = c.syntax()
15-
path = f'content/commands/{k.lower().replace(" ", "-")}/'
16-
md = Markdown(f'{path}index.md')
15+
path = f'content/commands/{k.lower().replace(" ", "-")}.md'
16+
md = Markdown(path)
1717
md.fm_data |= v
1818
md.fm_data.update({
1919
'syntax_str': str(c),

config.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ rdi_current_version = "1.10.0"
8383

8484
# Everything below this are Site Params
8585

86+
# Add markdown output
87+
[outputFormats]
88+
[outputFormats.markdown]
89+
name = "markdown"
90+
baseName = "index.html"
91+
mediaType = "text/markdown"
92+
isPlainText = true
93+
8694
# Comment out if you don't want the "print entire section" link enabled.
8795
[outputs]
88-
section = ["HTML", "RSS"] # print
96+
section = ["HTML", "RSS", "Markdown"] # print
97+
page = ["HTML", "Markdown"]

content/commands/acl-cat.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
acl_categories:
3+
- '@slow'
4+
arguments:
5+
- display_text: category
6+
name: category
7+
optional: true
8+
type: string
9+
arity: -2
10+
categories:
11+
- docs
12+
- develop
13+
- stack
14+
- oss
15+
- rs
16+
- rc
17+
- oss
18+
- kubernetes
19+
- clients
20+
command_flags:
21+
- noscript
22+
- loading
23+
- stale
24+
complexity: O(1) since the categories and commands are a fixed set.
25+
description: Lists the ACL categories, or the commands inside a category.
26+
group: server
27+
hidden: false
28+
linkTitle: ACL CAT
29+
since: 6.0.0
30+
summary: Lists the ACL categories, or the commands inside a category.
31+
syntax_fmt: ACL CAT [category]
32+
syntax_str: ''
33+
title: ACL CAT
34+
---
35+
The command shows the available ACL categories if called without arguments.
36+
If a category name is given, the command shows all the Redis commands in
37+
the specified category.
38+
39+
ACL categories are very useful in order to create ACL rules that include or
40+
exclude a large set of commands at once, without specifying every single
41+
command. For instance, the following rule will let the user `karin` perform
42+
everything but the most dangerous operations that may affect the server
43+
stability:
44+
45+
ACL SETUSER karin on +@all -@dangerous
46+
47+
We first add all the commands to the set of commands that `karin` is able
48+
to execute, but then we remove all the dangerous commands.
49+
50+
Checking for all the available categories is as simple as:
51+
52+
```
53+
> ACL CAT
54+
1) "keyspace"
55+
2) "read"
56+
3) "write"
57+
4) "set"
58+
5) "sortedset"
59+
6) "list"
60+
7) "hash"
61+
8) "string"
62+
9) "bitmap"
63+
10) "hyperloglog"
64+
11) "geo"
65+
12) "stream"
66+
13) "pubsub"
67+
14) "admin"
68+
15) "fast"
69+
16) "slow"
70+
17) "blocking"
71+
18) "dangerous"
72+
19) "connection"
73+
20) "transaction"
74+
21) "scripting"
75+
22) "json"
76+
23) "search"
77+
24) "tdigest"
78+
25) "cms"
79+
26) "bloom"
80+
27) "cuckoo"
81+
28) "topk"
82+
29) "timeseries"
83+
```
84+
85+
Then we may want to know what commands are part of a given category:
86+
87+
```
88+
> ACL CAT dangerous
89+
1) "flushdb"
90+
2) "acl"
91+
3) "slowlog"
92+
4) "debug"
93+
5) "role"
94+
6) "keys"
95+
7) "pfselftest"
96+
8) "client"
97+
9) "bgrewriteaof"
98+
10) "replicaof"
99+
11) "monitor"
100+
12) "restore-asking"
101+
13) "latency"
102+
14) "replconf"
103+
15) "pfdebug"
104+
16) "bgsave"
105+
17) "sync"
106+
18) "config"
107+
19) "flushall"
108+
20) "cluster"
109+
21) "info"
110+
22) "lastsave"
111+
23) "slaveof"
112+
24) "swapdb"
113+
25) "module"
114+
26) "restore"
115+
27) "migrate"
116+
28) "save"
117+
29) "shutdown"
118+
30) "psync"
119+
31) "sort"
120+
```
121+
122+
## Return information
123+
124+
{{< multitabs id="acl-cat-return-info"
125+
tab1="RESP2"
126+
tab2="RESP3" >}}
127+
128+
One of the following:
129+
* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category.
130+
* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given.
131+
132+
-tab-sep-
133+
134+
One of the following:
135+
* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category.
136+
* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given.
137+
138+
{{< /multitabs >}}

0 commit comments

Comments
 (0)