Skip to content

Commit 46082b2

Browse files
authored
StatsHouse UI: add shard_nums in namespaces (#2018)
1 parent aca9806 commit 46082b2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

statshouse-ui/src/view/Settings/NamespacePage.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,15 @@ export function NamespacePage() {
182182
})
183183
);
184184
}, []);
185+
const onChangeShards = useCallback((value: string) => {
186+
setSelectMetricsNamespace(
187+
produce((g) => {
188+
if (g) {
189+
g.namespace.shard_nums = value;
190+
}
191+
})
192+
);
193+
}, []);
185194

186195
return (
187196
<div className="flex-grow-1 p-2">
@@ -268,6 +277,20 @@ export function NamespacePage() {
268277
</div>
269278
</div>
270279
</div>
280+
<div className="mb-3 row">
281+
<label htmlFor="metricsNamespaceShards" className="col-sm-2 col-form-label">
282+
Shards
283+
</label>
284+
<div className="col-sm-10">
285+
<InputText
286+
type="text"
287+
className="form-control"
288+
id="metricsNamespaceShards"
289+
defaultValue={selectMetricsNamespace.namespace.shard_nums}
290+
onChange={onChangeShards}
291+
/>
292+
</div>
293+
</div>
271294
<div className="mb-3 d-flex flex-row justify-content-end">
272295
<button
273296
type="submit"

0 commit comments

Comments
 (0)