From 47f4b7c5ce981e133508573424323fb2397c1943 Mon Sep 17 00:00:00 2001 From: Mael Thomas Date: Fri, 16 Dec 2016 17:09:21 +0100 Subject: [PATCH] =?UTF-8?q?Visualisation=20int=C3=A9reactive=20des=20r?= =?UTF-8?q?=C3=A8gles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 3 --- package.json | 1 + source/components/Rule.js | 6 ++++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 81fe8f0f4..9357d5f0c 100644 --- a/index.html +++ b/index.html @@ -10,8 +10,5 @@
lOl
- - - diff --git a/package.json b/package.json index 0e944c0de..01c8f8434 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "react": "^15.0.1", "react-dom": "^15.0.1", "react-hot-loader": "3.0.0-beta.2", + "react-json-tree": "^0.10.0", "react-redux": "^4.4.5", "react-router": "^2.6.1", "redux": "^3.5.2", diff --git a/source/components/Rule.js b/source/components/Rule.js index 03042b24b..f183c5532 100644 --- a/source/components/Rule.js +++ b/source/components/Rule.js @@ -1,15 +1,17 @@ import React, { Component } from 'react' import {findRuleByName} from '../model.js' -import {safeDump} from 'js-yaml' import './Rule.css' +import JSONTree from 'react-json-tree' export default class Rule extends Component { render() { + let json = findRuleByName(this.props.params.name)[2] + return (
 					
-						{safeDump(findRuleByName(this.props.params.name)[2])}
+						 true} data={json} />