diff --git a/src/App.js b/src/App.js index d91c76e..c6452ad 100644 --- a/src/App.js +++ b/src/App.js @@ -13,6 +13,7 @@ import NavBar from "./ui/navBar"; import HeaderBar from "./ui/headerBar"; import MinedRulesComponent from "./ui/MiningRules/minedRulesComponent"; import {hashConst} from "./ui/uiConstants"; +import {featureConfig} from "./config"; class App extends Component { constructor(props) { @@ -79,10 +80,16 @@ class App extends Component {
- + {featureConfig.MiningRules ? ( + + ) : ( +
+ {"The Mining Rules feature is disabled in this version of the tool."} +
+ )}
@@ -98,12 +105,14 @@ class App extends Component { } renderLoading() { + const loadingTitle = featureConfig.MiningRules ? + "Loading Files and Rules and Preprocessing" : "Loading Files and Rules"; return (
-

{"Loading Rules and Preprocessing"}

+

{loadingTitle}

diff --git a/src/config.js b/src/config.js new file mode 100644 index 0000000..adc7c32 --- /dev/null +++ b/src/config.js @@ -0,0 +1,4 @@ +export const featureConfig = { + MiningRules: true, + ActiveLLM: false, +}; diff --git a/src/ui/navBar.js b/src/ui/navBar.js index 6faed35..8f38df6 100644 --- a/src/ui/navBar.js +++ b/src/ui/navBar.js @@ -12,6 +12,7 @@ import {clickedOnBack, clickedOnForward} from "../actions"; import {hashConst} from "./uiConstants"; import ConfigComponent from "../ui/activeLLM/configComponent"; +import {featureConfig} from "../config"; export class NavBar extends Component { render() { @@ -35,23 +36,25 @@ export class NavBar extends Component { - Table of Contents + {"Table of Contents"} - All Rules + {"All Rules"} - Violated Rules + {"Violated Rules"} - - Learn Design Rules + + {"Learn Design Rules"} {featureConfig.MiningRules? "": " (Disabled)"} {/* Opt-In to activeLLM button */} - - - + {featureConfig.ActiveLLM ? ( + + + + ) : null} ); }