Skip to content

Commit 3054a68

Browse files
Merge pull request #446 from RedisInsight/main
a new 2.0.5 release
2 parents 7420136 + 3cc397d commit 3054a68

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

redisinsight/ui/src/packages/redisgraph/src/Graph.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function Graph(props: { graphKey: string, data: any[] }) {
4545
let edgeIds = new Set(parsedResponse.edges.map(e => e.id))
4646

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

5151
let data = {
@@ -155,7 +155,7 @@ export default function Graph(props: { graphKey: string, data: any[] }) {
155155
graphData: graphData,
156156
infoPanel: true,
157157
// nodeRadius: 25,
158-
onLabelNode: (node) => node.properties?.name || node.properties?.title || (node.labels ? node.labels[0] : ''),
158+
onLabelNode: (node) => node.properties?.name || node.properties?.title || node.id || (node.labels ? node.labels[0] : ''),
159159
onNodeClick: (nodeSvg, node, event) => {
160160
if (d3.select(nodeSvg).attr('class').indexOf('selected') > 0) {
161161
d3.select(nodeSvg)

redisinsight/ui/src/packages/redisgraph/src/parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ function responseParser(data: any) {
4242
let edges: IEdge[] = []
4343
let types: {[key: string]: number} = {}
4444
let labels: {[key: string]: number} = {}
45-
if (data.length === 0) return {
45+
if (data.length < 2) return {
4646
nodes, edges, types, labels, headers, nodeIds, edgeIds,
4747
}
48-
48+
4949
const entries = data[1].map((entry: any) => {
5050
/* entry -> has headers number of items */
5151
entry.map((item: any) => {

redisinsight/ui/src/packages/redisgraph/src/styles/styles.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,9 @@
243243
padding: 12px !important;
244244
font-family: monospace !important;
245245
}
246+
247+
.responseInfo {
248+
color: var(--info-color);
249+
padding: 12px !important;
250+
font-family: monospace !important;
251+
}

redisinsight/ui/src/pages/workbench/components/enablement-area/EnablementArea/components/LazyInternalPage/LazyInternalPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const LazyInternalPage = ({ onClose, title, path, sourcePath }: Props) => {
4646
const dispatch = useDispatch()
4747
const fetchService = IS_ABSOLUTE_PATH.test(path) ? axios : resourcesService
4848

49-
const getRelatedPages = useCallback((sourcePath: string): IEnablementAreaItem[] => {
49+
const getRelatedPages = (sourcePath: string): IEnablementAreaItem[] => {
5050
const pageInfo = getFileInfo(path)
5151

5252
switch (sourcePath) {
@@ -57,7 +57,7 @@ const LazyInternalPage = ({ onClose, title, path, sourcePath }: Props) => {
5757
default:
5858
return []
5959
}
60-
}, [sourcePath, guides, tutorials])
60+
}
6161

6262
const loadContent = async () => {
6363
setLoading(true)

redisinsight/ui/src/pages/workbench/components/enablement-area/styles.module.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
}
2828

2929
.areaContentWrapper {
30+
height: 100% !important;
31+
3032
&.minimized {
3133
width: 0;
3234
visibility: hidden;

0 commit comments

Comments
 (0)