swarm-ui: the review try-out page shows and changes the review classifier's settings
A classifier settings panel under the try-out form reads and saves the model, effort and how many requested reviews run at once through the settings route. A save replaces all three; a refused one shows the route's reason and leaves the form as typed. There is no API key field.
This commit is contained in:
parent
37c58e79dc
commit
baf282131f
1 changed files with 293 additions and 3 deletions
|
|
@ -13,10 +13,13 @@
|
|||
// **load the repo's rules** fills the rows from the rules on the repo's default
|
||||
// branch (`GET /api/review-classifier/rules`), to run as they are or to edit.
|
||||
//
|
||||
// Under the form, the classifier's own settings: its model, effort and review
|
||||
// concurrency (`ClassifierSettings`).
|
||||
//
|
||||
// The inputs stay as typed after a run, so the operator can edit and run
|
||||
// again. The page keeps nothing you typed and no result, and posts nothing to
|
||||
// the forge; the only thing the browser remembers is the result table's
|
||||
// column filters, as for every table in the UI.
|
||||
// again. Apart from the settings, the page keeps nothing you typed and no
|
||||
// result, and posts nothing to the forge; the only thing the browser remembers
|
||||
// is the result table's column filters, as for every table in the UI.
|
||||
import { useEffect, useState } from "preact/hooks";
|
||||
import { ApiErrorPanel } from "@hive/shared/api-error-panel.js";
|
||||
import { readApiError, type ProblemDetails } from "@hive/shared/api-error.js";
|
||||
|
|
@ -24,6 +27,7 @@ import { Button } from "../../ui/button/Button.js";
|
|||
import { ConfirmDialog } from "../../ui/confirm-dialog/ConfirmDialog.js";
|
||||
import { Panel } from "../../ui/panel/Panel.js";
|
||||
import { TextField } from "../../ui/text-field/TextField.js";
|
||||
import { ClassifierSettings } from "../review-settings/ClassifierSettings.js";
|
||||
import { ClassificationEditor } from "./ClassificationEditor.js";
|
||||
import { TryOutResult } from "./TryOutResult.js";
|
||||
import {
|
||||
|
|
@ -399,6 +403,7 @@ export function ReviewTryOutPage() {
|
|||
{result?.state === "done" ? <TryOutResult result={result} /> : null}
|
||||
</Panel>
|
||||
) : null}
|
||||
<ClassifierSettings />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue