Skip to content
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
4 changes: 2 additions & 2 deletions redisinsight/ui/src/packages/redisgraph/src/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function Graph(props: { graphKey: string, data: any[] }) {
let edgeIds = new Set(parsedResponse.edges.map(e => e.id))

if (nodeIds.size === 0 && parsedResponse.nodeIds.length === 0) {
return <div className="responseFail">No data to visualize. Switch to Text view to see raw information.</div>
return <div className="responseInfo">No data to visualize. Switch to Text view to see raw information.</div>
}

let data = {
Expand Down Expand Up @@ -155,7 +155,7 @@ export default function Graph(props: { graphKey: string, data: any[] }) {
graphData: graphData,
infoPanel: true,
// nodeRadius: 25,
onLabelNode: (node) => node.properties?.name || node.properties?.title || (node.labels ? node.labels[0] : ''),
onLabelNode: (node) => node.properties?.name || node.properties?.title || node.id || (node.labels ? node.labels[0] : ''),
onNodeClick: (nodeSvg, node, event) => {
if (d3.select(nodeSvg).attr('class').indexOf('selected') > 0) {
d3.select(nodeSvg)
Expand Down
4 changes: 2 additions & 2 deletions redisinsight/ui/src/packages/redisgraph/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ function responseParser(data: any) {
let edges: IEdge[] = []
let types: {[key: string]: number} = {}
let labels: {[key: string]: number} = {}
if (data.length === 0) return {
if (data.length < 2) return {
nodes, edges, types, labels, headers, nodeIds, edgeIds,
}

const entries = data[1].map((entry: any) => {
/* entry -> has headers number of items */
entry.map((item: any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,9 @@
padding: 12px !important;
font-family: monospace !important;
}

.responseInfo {
color: var(--info-color);
padding: 12px !important;
font-family: monospace !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const LazyInternalPage = ({ onClose, title, path, sourcePath }: Props) => {
const dispatch = useDispatch()
const fetchService = IS_ABSOLUTE_PATH.test(path) ? axios : resourcesService

const getRelatedPages = useCallback((sourcePath: string): IEnablementAreaItem[] => {
const getRelatedPages = (sourcePath: string): IEnablementAreaItem[] => {
const pageInfo = getFileInfo(path)

switch (sourcePath) {
Expand All @@ -57,7 +57,7 @@ const LazyInternalPage = ({ onClose, title, path, sourcePath }: Props) => {
default:
return []
}
}, [sourcePath, guides, tutorials])
}

const loadContent = async () => {
setLoading(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
}

.areaContentWrapper {
height: 100% !important;

&.minimized {
width: 0;
visibility: hidden;
Expand Down