Skip to content

Commit f26634a

Browse files
Fix/UI fix no data message (#93)
* fix in showing no data messages in LLMs, VectorDBs, Embeddings, Text extractor and prompt studio * changed add New tool button name to New project in prompt studio --------- Co-authored-by: Neha <115609453+nehabagdia@users.noreply.github.com>
1 parent d8f6a6d commit f26634a

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

frontend/src/components/custom-tools/list-of-tools/ListOfTools.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@
4444
overflow-y: auto;
4545
display: flex;
4646
justify-content: center;
47+
height: 100%;
4748
}

frontend/src/components/custom-tools/list-of-tools/ListOfTools.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function ListOfTools() {
171171
icon={<PlusOutlined />}
172172
onClick={showAddTool}
173173
>
174-
New Tool
174+
New Project
175175
</CustomButton>
176176
);
177177
};
@@ -200,6 +200,7 @@ function ListOfTools() {
200200
descriptionProp="description"
201201
iconProp="icon"
202202
idProp="tool_id"
203+
type="New Project"
203204
/>
204205
</div>
205206
</div>

frontend/src/components/custom-tools/view-tools/ViewTools.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,23 @@ function ViewTools({
1919
idProp,
2020
centered,
2121
isClickable = true,
22+
type,
2223
}) {
2324
if (isLoading) {
2425
return <SpinnerLoader />;
2526
}
2627

2728
if (isEmpty) {
29+
let text = "No tools available";
30+
let btnText = "New Tool";
31+
if (type) {
32+
text = `No ${type.split("New ")[1].toLowerCase()} available`;
33+
btnText = type;
34+
}
2835
return (
2936
<EmptyState
30-
text="No tools available"
31-
btnText="New Tool"
37+
text={text}
38+
btnText={btnText}
3239
handleClick={() => setOpenAddTool(true)}
3340
/>
3441
);
@@ -72,6 +79,7 @@ ViewTools.propTypes = {
7279
idProp: PropTypes.string.isRequired,
7380
centered: PropTypes.bool,
7481
isClickable: PropTypes.bool,
82+
type: PropTypes.string,
7583
};
7684

7785
export { ViewTools };

frontend/src/components/tool-settings/tool-settings/ToolSettings.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ function ToolSettings({ type }) {
140140
isEmpty={!tableRows?.length}
141141
centered
142142
isClickable={false}
143+
type={btnText[type]}
143144
/>
144145
</div>
145146
</div>

0 commit comments

Comments
 (0)