Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugs by qa #1178

Merged
merged 4 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions gui/pages/Content/APM/ApmDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,25 +250,19 @@ export default function ApmDashboard() {
<thead>
<tr style={{borderTop: 'none'}}>
<th className="table_header w_20">Agent Name</th>
<th className="table_header text_align_right w_10">Model <img width={14} height={14} src="/images/arrow_downward.svg"
alt="arrow_down"/>
<th className="table_header text_align_right w_10">Model
</th>
<th className="table_header text_align_right w_12">Tokens Consumed <img width={14} height={14} src="/images/arrow_downward.svg"
alt="arrow_down"/>
<th className="table_header text_align_right w_12">Tokens Consumed
</th>
<th className="table_header text_align_right w_6">Runs <img width={14} height={14} src="/images/arrow_downward.svg"
alt="arrow_down"/>
<th className="table_header text_align_right w_6">Runs
</th>
<th className="table_header text_align_right w_12">Avg tokens per run <img
width={14} height={14} src="/images/arrow_downward.svg" alt="arrow_down"/></th>
<th className="table_header text_align_right w_20">Tools <img width={14} height={14} src="/images/arrow_downward.svg"
alt="arrow_down"/>
<th className="table_header text_align_right w_12">Avg tokens per run
</th>
<th className="table_header text_align_right w_10">Calls <img width={14} height={14} src="/images/arrow_downward.svg"
alt="arrow_down"/>
<th className="table_header text_align_right w_20">Tools
</th>
<th className="table_header text_align_right w_10">Avg Run Time <img width={14} height={14} src="/images/arrow_downward.svg"
alt="arrow_down"/>
<th className="table_header text_align_right w_10">Calls
</th>
<th className="table_header text_align_right w_10">Avg Run Time
</th>
</tr>
</thead>
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Content/Agents/AgentCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@ export default function AgentCreate({
<div style={{marginTop: '15px'}}>
<label className={styles.form_label}>Agent Workflow</label><br/>
<div className="dropdown_container_search" style={{width: '100%'}}>
<div className="custom_select_container" onClick={() => setAgentDropdown(!agentDropdown)}
<div className={`${"custom_select_container"} ${edit ? 'cursor_not_allowed' : ''}`} onClick={() => {setAgentDropdown(!edit ? !agentDropdown : false)}}
style={{width: '100%'}}>
{agentWorkflow}<Image width={20} height={21}
src={!agentDropdown ? '/images/dropdown_down.svg' : '/images/dropdown_up.svg'}
Expand Down
14 changes: 7 additions & 7 deletions gui/pages/Content/Agents/Details.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,18 @@ export default function Details({agentDetails1, runCount, agentScheduleDetails,
style={{display: 'flex', marginBottom: '5px', alignItems: 'center', justifyContent: 'flex-start', gap: '7.5%'}}>
<div>
<div className={styles.agent_info_box}>
<div><Image width={12} height={12} src="/images/calls_made.svg" alt="calls-icon"/></div>
<div style={info_text_secondary}>Total Calls</div>
<div><Image width={12} height={12} src="/images/runs_made.svg" alt="runs-icon"/></div>
<div style={info_text_secondary}>Total Runs</div>
</div>
<div className={styles.feed_title}
style={{fontSize: '20px', marginLeft: '0'}}>{formatNumber(agentDetails?.calls || 0)}</div>
<div className={styles.feed_title} style={{fontSize: '20px', marginLeft: '0'}}>{runCount || 0}</div>
</div>
<div>
<div className={styles.agent_info_box}>
<div><Image width={12} height={12} src="/images/runs_made.svg" alt="runs-icon"/></div>
<div style={info_text_secondary}>Total Runs</div>
<div><Image width={12} height={12} src="/images/calls_made.svg" alt="calls-icon"/></div>
<div style={info_text_secondary}>Total Calls</div>
</div>
<div className={styles.feed_title} style={{fontSize: '20px', marginLeft: '0'}}>{runCount || 0}</div>
<div className={styles.feed_title}
style={{fontSize: '20px', marginLeft: '0'}}>{formatNumber(agentDetails?.calls || 0)}</div>
</div>
<div>
<div className={styles.agent_info_box}>
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Content/Knowledge/KnowledgeDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function KnowledgeDetails({internalId, knowledgeId}) {
</div>}
</div>
</div>
<div className="horizontal_container mb_10 border_bottom_grey pd_bottom">
<div className="horizontal_container mb_10 border_bottom_grey pd_bottom_5">
<div className={activeTab === 'metrics' ? 'tab_button_small_selected' : 'tab_button_small'}
onClick={() => setActiveTab('metrics')}>
<div className="text_12 color_white padding_8">Metrics</div>
Expand Down
9 changes: 7 additions & 2 deletions gui/pages/Content/Knowledge/KnowledgeForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,13 @@ export default function KnowledgeForm({
}

const handleIndexSelect = (index) => {
setLocalStorageArray("knowledge_index_" + String(internalId), index, setSelectedIndex);
setIndexDropdown(false);
if(index.is_valid_state) {
setLocalStorageArray("knowledge_index_" + String(internalId), index, setSelectedIndex);
setIndexDropdown(false);
}
else{
toast.error('Select valid index', {autoClose: 1800})
}
}

const checkIndexValidity = (validState) => {
Expand Down
22 changes: 13 additions & 9 deletions gui/pages/Content/Marketplace/KnowledgeTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,16 @@ export default function KnowledgeTemplate({template, env}) {
}
}, []);

const handleInstallClick = (indexId) => {
const handleInstallClick = (index) => {
const indexId = index.id
if(index.is_valid_state){
toast.error("Select valid index", {autoClose : 1800})
return
}
if (template && template.is_installed) {
toast.error("Template is already installed", {autoClose: 1800});
return;
}
setInstalled("Installing");

if (window.location.href.toLowerCase().includes('marketplace')) {
Expand All @@ -103,11 +112,6 @@ export default function KnowledgeTemplate({template, env}) {
return;
}

if (template && template.is_installed) {
toast.error("Template is already installed", {autoClose: 1800});
return;
}

setIndexDropdown(false);

installKnowledgeTemplate(template.name, indexId)
Expand Down Expand Up @@ -201,7 +205,7 @@ export default function KnowledgeTemplate({template, env}) {
<div className={styles3.knowledge_db} style={{maxWidth: '100%'}}>
<div className={styles3.knowledge_db_name}>Pinecone</div>
{pinconeIndices.map((index) => (<div key={index.id} className="custom_select_option"
onClick={() => handleInstallClick(index.id)} style={{
onClick={() => handleInstallClick(index)} style={{
padding: '12px 14px',
maxWidth: '100%',
display: 'flex',
Expand All @@ -223,7 +227,7 @@ export default function KnowledgeTemplate({template, env}) {
<div className={styles3.knowledge_db} style={{maxWidth: '100%'}}>
<div className={styles3.knowledge_db_name}>Qdrant</div>
{qdrantIndices.map((index) => (<div key={index.id} className="custom_select_option"
onClick={() => handleInstallClick(index.id)} style={{
onClick={() => handleInstallClick(index)} style={{
padding: '12px 14px',
maxWidth: '100%',
display: 'flex',
Expand All @@ -245,7 +249,7 @@ export default function KnowledgeTemplate({template, env}) {
<div className={styles3.knowledge_db} style={{maxWidth: '100%'}}>
<div className={styles3.knowledge_db_name}>Weaviate</div>
{weaviateIndices.map((index) => (<div key={index.id} className="custom_select_option"
onClick={() => handleInstallClick(index.id)} style={{
onClick={() => handleInstallClick(index)} style={{
padding: '12px 14px',
maxWidth: '100%',
display: 'flex',
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Content/Toolkits/Metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default function Metrics({toolName, knowledgeName}) {
</div>
<div className="display_column_container mt_5">
<span className="text_14">Call Logs</span>
{callLogs.length > 0 ? <div className="scrollable_container table_container bg_none">
{callLogs.length > 0 ? <div className="scrollable_container pd_bottom_5 border_radius_8 bg_none">
<table className="w_100 margin_0 padding_0">
<thead>
<tr className="border_top_none text_align_left border_bottom_none">
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Content/Toolkits/ToolkitWorkspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default function ToolkitWorkspace({env, toolkitDetails, internalId}) {
</div>
</div>
</div>
<div className="horizontal_container mb_10 border_bottom_grey pd_bottom">
<div className="horizontal_container mb_10 border_bottom_grey pd_bottom_5">
<div className="w_50 display_flex_container">
<div className={activeTab === 'metrics' ? 'tab_button_small_selected' : 'tab_button_small'}
onClick={() => setLocalStorageValue('toolkit_tab_' + String(internalId), 'metrics', setActiveTab)}>
Expand Down
2 changes: 1 addition & 1 deletion gui/pages/Dashboard/Settings/Webhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function Webhooks() {
.then((response) => {
setIsEdtiting(false)
fetchWebhooks()
toast.success("Webhook deleted successfully", {autoClose: 1800});
toast.success("Webhook edited successfully", {autoClose: 1800});
})
.catch((error) => {
console.error('Error fetching webhook', error);
Expand Down
3 changes: 2 additions & 1 deletion gui/pages/_app.css
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,7 @@ p {

.cursor_pointer{cursor: pointer}
.cursor_default{cursor: default}
.cursor_not_allowed{cursor: not-allowed}

.overflow_auto{overflow: auto}
.overflowY_scroll{overflow-y: scroll}
Expand Down Expand Up @@ -1158,7 +1159,7 @@ p {
.padding_12_14{padding: 12px 14px;}
.padding_0_15{padding: 0px 15px;}

.pd_bottom{padding-bottom: 5px}
.pd_bottom_5{padding-bottom: 5px}

.flex_1{flex: 1}
.flex_wrap{flex-wrap: wrap;}
Expand Down
4 changes: 2 additions & 2 deletions gui/public/images/twitter_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.