mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 01:00:46 +03:00
Merge branch 'main' into FEATURE/conversation-starters
# Conflicts: # packages/ui/src/views/chatmessage/ChatMessage.js
This commit is contained in:
@@ -106,6 +106,32 @@ const NodeInfoDialog = ({ show, dialogProps, onCancel }) => {
|
||||
<span style={{ color: '#606c38', fontSize: '0.825rem' }}>version {dialogProps.data.version}</span>
|
||||
</div>
|
||||
)}
|
||||
{dialogProps.data.badge && (
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
width: 'max-content',
|
||||
borderRadius: 15,
|
||||
background: dialogProps.data.badge === 'DEPRECATING' ? '#ffe57f' : '#52b69a',
|
||||
padding: 5,
|
||||
paddingLeft: 10,
|
||||
paddingRight: 10,
|
||||
marginTop: 5,
|
||||
marginLeft: 10,
|
||||
marginBottom: 5
|
||||
}}
|
||||
>
|
||||
<span
|
||||
style={{
|
||||
color: dialogProps.data.badge !== 'DEPRECATING' ? 'white' : 'inherit',
|
||||
fontSize: '0.825rem'
|
||||
}}
|
||||
>
|
||||
{dialogProps.data.badge}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,7 +149,14 @@ const NodeInfoDialog = ({ show, dialogProps, onCancel }) => {
|
||||
</div>
|
||||
)}
|
||||
{getNodeConfigApi.data && getNodeConfigApi.data.length > 0 && (
|
||||
<TableViewOnly rows={getNodeConfigApi.data} columns={Object.keys(getNodeConfigApi.data[0]).slice(-3)} />
|
||||
<TableViewOnly
|
||||
rows={getNodeConfigApi.data.map((obj) => {
|
||||
// eslint-disable-next-line
|
||||
const { node, nodeId, ...rest } = obj
|
||||
return rest
|
||||
})}
|
||||
columns={Object.keys(getNodeConfigApi.data[0]).slice(-3)}
|
||||
/>
|
||||
)}
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import { TableContainer, Table, TableHead, TableCell, TableRow, TableBody, Paper } from '@mui/material'
|
||||
|
||||
export const TableViewOnly = ({ columns, rows }) => {
|
||||
export const TableViewOnly = ({ columns, rows, sx }) => {
|
||||
return (
|
||||
<>
|
||||
<TableContainer component={Paper}>
|
||||
<Table sx={{ minWidth: 650 }} aria-label='simple table'>
|
||||
<Table sx={{ minWidth: 650, ...sx }} aria-label='simple table'>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
{columns.map((col, index) => (
|
||||
@@ -16,11 +16,9 @@ export const TableViewOnly = ({ columns, rows }) => {
|
||||
<TableBody>
|
||||
{rows.map((row, index) => (
|
||||
<TableRow key={index} sx={{ '&:last-child td, &:last-child th': { border: 0 } }}>
|
||||
{Object.keys(row)
|
||||
.slice(-3)
|
||||
.map((key, index) => (
|
||||
<TableCell key={index}>{row[key]}</TableCell>
|
||||
))}
|
||||
{Object.keys(row).map((key, index) => (
|
||||
<TableCell key={index}>{row[key]}</TableCell>
|
||||
))}
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
@@ -32,5 +30,6 @@ export const TableViewOnly = ({ columns, rows }) => {
|
||||
|
||||
TableViewOnly.propTypes = {
|
||||
rows: PropTypes.array,
|
||||
columns: PropTypes.array
|
||||
columns: PropTypes.array,
|
||||
sx: PropTypes.object
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user