[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\nindent_style = space\nindent_size = 2\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[*.md]\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": ".eslintignore",
    "content": "generators/**/templates\ntravis\n"
  },
  {
    "path": ".eslintrc.json",
    "content": "{\n    \"env\": {\n        \"node\": true,\n        \"es6\": true\n    },\n    \"extends\": [\"airbnb-base\"],\n    \"rules\": {\n        \"indent\": [2, 2],\n        \"linebreak-style\": 0,\n        \"eol-last\": 2,\n        \"quotes\": [2, \"single\"],\n        \"semi\": [2, \"always\"],\n        \"eqeqeq\": [2, \"smart\"],\n        \"no-use-before-define\": [2, \"nofunc\"],\n        \"no-unused-vars\": [2, {\"vars\": \"local\", \"args\": \"none\"}],\n        \"no-multi-str\": 2,\n        \"no-irregular-whitespace\": 2,\n        \"comma-dangle\": \"off\",\n        \"max-len\": \"off\",\n        \"func-names\": \"off\",\n        \"class-methods-use-this\": \"off\",\n        \"no-underscore-dangle\": \"off\",\n        \"no-plusplus\": \"off\",\n\n        \"no-multi-assign\": \"off\",\n        \"no-param-reassign\": \"off\",\n        \"no-shadow\": \"off\"\n    }\n}\n"
  },
  {
    "path": ".gitattributes",
    "content": "* text=auto\n"
  },
  {
    "path": ".gitignore",
    "content": "node_modules\ncoverage\n.DS_Store\n.vscode/\n.idea\n*.iml\n*.ipr\n*.iws\natlassian-ide-plugin.xml\n/.project\ntest/temp/\n*debug.log*\n.vscode\nyarn.lock\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nnode_js:\n  - v6\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright 2016 Deepu KS <d4udts@gmail.com> (http://deepu105.github.io) <d4udts@gmail.com> (http://deepu105.github.io)\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "# DEPRECATED\n\nThis module is now integrated into `generator-jhipster` repository as React support is now planned in the core generator.\nWork is being done on https://github.com/jhipster/generator-jhipster/tree/jh-react\n\nSee [this issue](https://github.com/jhipster/generator-jhipster/issues/6044) for details\n\n# generator-jhipster-react [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]\n> A Jhipster based generator to create awesome react + spring boot applications\n\n<img src=\"https://raw.githubusercontent.com/hipster-labs/generator-jhipster-react/master/logo-jhipster-react.png\" height=\"200px\" alt=\"jhipster-react logo\" />\n\n## Installation\n\n\nTODO:\n\n- Migrate Account modules\n- Migrate Admin modules\n- support no i18n properly\n- support no-sass option\n- Add entity sub generator\n- Add import-jdl sub generator\n- Migrate protractor tests\n- Add generator tests\n- Add generator travis builds\n\nFirst, install [Yeoman](http://yeoman.io) and [JHipster](http://jhipster.github.io/), then install generator-jhipster-react using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).\n\n```bash\nnpm install -g yo\nnpm install -g generator-jhipster\n```\n\nClone [JHipster](https://github.com/jhipster/generator-jhipster) and run `npm link` inside it.\n\nClone this project and run `npm link` and `npm link generator-jhipster` inside it.\n\nNow all the projects are pointing to latest master versions\n\nNow generate your new awesome project:\n\n```bash\nyo jhipster-react\n```\n\nMake sure to run `npm link generator-jhipster-react` within the generated project if you are regenerating it again.\n\nAs this is a generator which runs on top of [JHipster](http://jhipster.github.io/), we expect you have [JHipster and its related tools already installed](http://jhipster.github.io/installation.html).\n\nThis generator requires Jhipster version 4.1 or greater in order to work\n\n## Development-mode\n\nFrontend is working through [webpack-dev-server](webpack-dev-server-url) proxy mode feature in order to have an ability to use both frontend & backend server simultaneously. All requests from frontend would be proxied to backend server.\n\nTo start frontend server please run the following command:\n\n```bash\nyarn start\n```\n\n## Contributing\n\nContributions are welcome.\nwe follow the same contribution guidelines as JHipster, [check it out here](https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md)\n\n## License\n\nApache-2.0 © [Deepu KS](http://deepu105.github.io)\n\n\n[webpack-dev-server-url]: https://webpack.github.io/docs/webpack-dev-server.html\n[npm-image]: https://badge.fury.io/js/generator-jhipster-react.svg\n[npm-url]: https://npmjs.org/package/generator-jhipster-react\n[travis-image]: https://travis-ci.org/deepu105/generator-jhipster-react.svg?branch=master\n[travis-url]: https://travis-ci.org/deepu105/generator-jhipster-react\n[daviddm-image]: https://david-dm.org/hipster-labs/generator-jhipster-react.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/hipster-labs/generator-jhipster-react\n"
  },
  {
    "path": "generators/app/index.js",
    "content": "const util = require('util');\nconst generator = require('yeoman-generator');\nconst chalk = require('chalk');\nconst BaseGenerator = require('generator-jhipster/generators/generator-base');\nconst cleanup = require('generator-jhipster/generators/cleanup');\nconst prompts = require('./prompts');\nconst packagejs = require('../../package.json');\nconst constants = require('generator-jhipster/generators/generator-constants');\n\nconst JhipsterGenerator = generator.extend({});\n\nutil.inherits(JhipsterGenerator, BaseGenerator);\n\nmodule.exports = JhipsterGenerator.extend({\n  constructor: function (...args) { // eslint-disable-line object-shorthand\n    generator.apply(this, args);\n\n    this.configOptions = {};\n\n    // This adds support for a `--skip-server` flag\n    this.option('skip-server', {\n      desc: 'Skip the server-side application generation',\n      type: Boolean,\n      defaults: false\n    });\n\n        // This adds support for a `--skip-user-management` flag\n    this.option('skip-user-management', {\n      desc: 'Skip the user management module during app generation',\n      type: Boolean,\n      defaults: false\n    });\n\n        // This adds support for a `--[no-]i18n` flag\n    this.option('i18n', {\n      desc: 'Disable or enable i18n when skipping client side generation, has no effect otherwise',\n      type: Boolean,\n      defaults: true\n    });\n\n        // This adds support for a `--with-entities` flag\n    this.option('with-entities', {\n      desc: 'Regenerate the existing entities if any',\n      type: Boolean,\n      defaults: false\n    });\n\n        // This adds support for a `--skip-checks` flag\n    this.option('skip-checks', {\n      desc: 'Check the status of the required tools',\n      type: Boolean,\n      defaults: false\n    });\n\n        // This adds support for a `--npm` flag\n    this.option('npm', {\n      desc: 'Use npm instead of yarn',\n      type: Boolean,\n      defaults: false\n    });\n\n    this.currentQuestion = 0;\n    this.totalQuestions = constants.QUESTIONS;\n    this.skipServer = this.configOptions.skipServer = this.options['skip-server'] || this.config.get('skipServer');\n    this.skipUserManagement = this.configOptions.skipUserManagement = this.options['skip-user-management'] || this.config.get('skipUserManagement');\n    this.jhiPrefix = this.configOptions.jhiPrefix || this.config.get('jhiPrefix') || this.options['jhi-prefix'];\n    this.withEntities = this.options['with-entities'];\n    this.skipChecks = this.options['skip-checks'];\n    this.useYarn = this.configOptions.useYarn = !this.options.npm;\n    this.isDebugEnabled = this.configOptions.isDebugEnabled = this.options.debug;\n  },\n\n  initializing: {\n    displayLogo() {\n      this.printJHipsterLogo();\n    },\n\n    checkJava() {\n      this.checkJava();\n    },\n\n    checkNode() {\n      this.checkNode();\n    },\n\n    checkGit() {\n      this.checkGit();\n    },\n\n    checkGitConnection() {\n      this.checkGitConnection();\n    },\n\n    checkYarn() {\n      this.checkYarn();\n    },\n\n    validate() {\n      if (this.skipServer && this.skipClient) {\n        this.error(chalk.red(`You can not pass both ${chalk.yellow('--skip-client')} and ${chalk.yellow('--skip-server')} together`));\n      }\n    },\n\n    setupconsts() {\n      this.applicationType = this.config.get('applicationType');\n      if (!this.applicationType) {\n        this.applicationType = 'monolith';\n      }\n      this.baseName = this.config.get('baseName');\n      this.jhipsterVersion = packagejs.version;\n      if (this.jhipsterVersion === undefined) {\n        this.jhipsterVersion = this.config.get('jhipsterVersion');\n      }\n      this.otherModules = this.config.get('otherModules');\n      this.testFrameworks = this.config.get('testFrameworks');\n      this.enableTranslation = this.config.get('enableTranslation');\n      this.nativeLanguage = this.config.get('nativeLanguage');\n      this.languages = this.config.get('languages');\n      const configFound = this.baseName !== undefined && this.applicationType !== undefined;\n      if (configFound) {\n        this.existingProject = true;\n                // If translation is not defined, it is enabled by default\n        if (this.enableTranslation === undefined) {\n          this.enableTranslation = true;\n        }\n      }\n      this.clientPackageManager = this.config.get('clientPackageManager');\n      if (!this.clientPackageManager) {\n        if (this.useYarn) {\n          this.clientPackageManager = 'yarn';\n        } else {\n          this.clientPackageManager = 'npm';\n        }\n      }\n    }\n  },\n\n  prompting: {\n    askForInsightOptIn: prompts.askForInsightOptIn,\n    askForApplicationType: prompts.askForApplicationType,\n    askForModuleName: prompts.askForModuleName,\n  },\n\n  configuring: {\n    setup() {\n      this.configOptions.skipI18nQuestion = true;\n      this.configOptions.baseName = this.baseName;\n      this.configOptions.logo = false;\n      this.configOptions.otherModules = this.otherModules;\n      this.configOptions.lastQuestion = this.currentQuestion;\n      this.generatorType = 'app';\n      if (this.applicationType === 'microservice') {\n        this.skipClient = true;\n        this.generatorType = 'server';\n        this.skipUserManagement = this.configOptions.skipUserManagement = true;\n      }\n      if (this.applicationType === 'uaa') {\n        this.skipClient = true;\n        this.generatorType = 'server';\n        this.skipUserManagement = this.configOptions.skipUserManagement = false;\n        this.authenticationType = this.configOptions.authenticationType = 'uaa';\n      }\n      if (this.skipClient) {\n                // defaults to use when skipping client\n        this.generatorType = 'server';\n        this.configOptions.enableTranslation = this.options.i18n;\n      }\n      if (this.skipServer) {\n        this.generatorType = 'client';\n                // defaults to use when skipping server\n      }\n      this.configOptions.clientPackageManager = this.clientPackageManager;\n    },\n\n    composeServer() {\n      if (this.skipServer) return;\n\n      this.composeWith(require.resolve('generator-jhipster/generators/server'), {\n        'client-hook': !this.skipClient,\n        configOptions: this.configOptions,\n        force: this.options.force\n      });\n    },\n\n    composeClient() {\n      if (this.skipClient) return;\n\n      this.composeWith(require.resolve('../client'), {\n        'skip-install': this.options['skip-install'],\n        configOptions: this.configOptions,\n        force: this.options.force\n      });\n    },\n\n    askFori18n: prompts.askFori18n\n  },\n\n  default: {\n\n    askForTestOpts: prompts.askForTestOpts,\n\n    setSharedConfigOptions() {\n      this.configOptions.lastQuestion = this.currentQuestion;\n      this.configOptions.totalQuestions = this.totalQuestions;\n      this.configOptions.testFrameworks = this.testFrameworks;\n      this.configOptions.enableTranslation = this.enableTranslation;\n      this.configOptions.nativeLanguage = this.nativeLanguage;\n      this.configOptions.languages = this.languages;\n      this.configOptions.clientPackageManager = this.clientPackageManager;\n    },\n\n/*    insight() {\n      const insight = this.insight();\n      insight.trackWithEvent('generator', 'app');\n      insight.track('app/applicationType', this.applicationType);\n      insight.track('app/testFrameworks', this.testFrameworks);\n      insight.track('app/otherModules', this.otherModules);\n      insight.track('app/clientPackageManager', this.clientPackageManager);\n    },*/\n\n    composeLanguages() {\n      if (this.skipI18n) return;\n      this.composeLanguagesSub(this, this.configOptions, this.generatorType);\n    },\n\n    saveConfig() {\n      this.config.set('jhipsterVersion', packagejs.version);\n      this.config.set('applicationType', this.applicationType);\n      this.config.set('baseName', this.baseName);\n      this.config.set('testFrameworks', this.testFrameworks);\n      this.config.set('jhiPrefix', this.jhiPrefix);\n      this.config.set('otherModules', this.otherModules);\n      if (this.skipClient) this.config.set('skipClient', true);\n      if (this.skipServer) this.config.set('skipServer', true);\n      if (this.skipUserManagement) this.config.set('skipUserManagement', true);\n      this.config.set('enableTranslation', this.enableTranslation);\n      if (this.enableTranslation) {\n        this.config.set('nativeLanguage', this.nativeLanguage);\n        this.config.set('languages', this.languages);\n      }\n      this.config.set('clientPackageManager', this.clientPackageManager);\n    }\n  },\n\n  writing: {\n    cleanup() {\n      cleanup.cleanupOldFiles(this, this.javaDir, this.testDir);\n    },\n\n    // regenerateEntities() {\n    //   if (this.withEntities) {\n    //     this.getExistingEntities().forEach((entity) => {\n    //       this.composeWith(require.resolve('../entity'), {\n    //         regenerate: true,\n    //         'skip-install': true,\n    //         force: this.options.force,\n    //         debug: this.isDebugEnabled,\n    //         arguments: [entity.name]\n    //       });\n    //     });\n    //   }\n    // }\n  },\n\n/*  end: {\n    localInstall() {\n      if (this.skipClient) {\n        if (this.otherModules === undefined) {\n          this.otherModules = [];\n        }\n        // Generate a package.json file containing the current version\n        // of the generator as dependency\n        this.template('_skipClientApp.package.json', 'package.json');\n\n        if (!this.options['skip-install']) {\n          if (this.clientPackageManager === 'yarn') {\n            this.log(chalk.bold(`\\nInstalling generator-jhipster@${this.jhipsterVersion} locally using yarn`));\n            this.spawnCommand('yarn', ['install']);\n          } else if (this.clientPackageManager === 'npm') {\n            this.log(chalk.bold(`\\nInstalling generator-jhipster@${this.jhipsterVersion} locally using npm`));\n            this.npmInstall();\n          }\n        }\n      }\n    }\n  }*/\n});\n"
  },
  {
    "path": "generators/app/prompts.js",
    "content": "const chalk = require('chalk');\n\nmodule.exports = {\n  askForInsightOptIn,\n  askForApplicationType,\n  askForModuleName,\n  askFori18n,\n  askForTestOpts\n};\n\nfunction askForInsightOptIn() {\n  if (this.existingProject) return;\n\n  // const done = this.async();\n  // const insight = this.insight();\n\n  // this.prompt({\n  //   when: () => insight.optOut === undefined,\n  //   type: 'confirm',\n  //   name: 'insight',\n  //   message: `May ${chalk.cyan('JHipster')} anonymously report usage statistics to improve the tool over time?`,\n  //   default: true\n  // }).then((prompt) => {\n  //   if (prompt.insight !== undefined) {\n  //     insight.optOut = !prompt.insight;\n  //   }\n  //   done();\n  // });\n}\n\nfunction askForApplicationType() {\n  if (this.existingProject) return;\n\n  const DEFAULT_APPTYPE = 'monolith';\n  if (this.skipServer) {\n    this.applicationType = this.configOptions.applicationType = DEFAULT_APPTYPE;\n    return;\n  }\n\n  const done = this.async();\n\n  this.prompt({\n    type: 'list',\n    name: 'applicationType',\n    message: response => this.getNumberedQuestion('Which *type* of application would you like to create?', true),\n    choices: [\n      {\n        value: DEFAULT_APPTYPE,\n        name: 'Monolithic application (recommended for simple projects)'\n      },\n      {\n        value: 'microservice',\n        name: 'Microservice application'\n      },\n      {\n        value: 'gateway',\n        name: 'Microservice gateway'\n      },\n      // {\n      //   value: 'uaa',\n      //   name: '[BETA] JHipster UAA server (for microservice OAuth2 authentication)'\n      // }\n    ],\n    default: DEFAULT_APPTYPE\n  }).then((prompt) => {\n    this.applicationType = this.configOptions.applicationType = prompt.applicationType;\n    done();\n  });\n}\n\nfunction askForModuleName() {\n  if (this.existingProject) return;\n\n  this.askModuleName(this);\n  this.configOptions.lastQuestion = this.currentQuestion;\n  this.configOptions.totalQuestions = this.totalQuestions;\n}\n\nfunction askFori18n() {\n  this.currentQuestion = this.configOptions.lastQuestion;\n  this.totalQuestions = this.configOptions.totalQuestions;\n  if (this.skipI18n || this.existingProject) return;\n  this.aski18n(this);\n}\n\nfunction askForTestOpts() {\n  if (this.existingProject) return;\n\n  const choices = [];\n  const defaultChoice = [];\n  if (!this.skipServer) {\n        // all server side test frameworks should be added here\n    choices.push(\n            { name: 'Gatling', value: 'gatling' },\n            { name: 'Cucumber', value: 'cucumber' }\n        );\n  }\n  if (!this.skipClient) {\n        // all client side test frameworks should be added here\n    choices.push(\n            { name: 'Protractor', value: 'protractor' }\n        );\n  }\n  const done = this.async();\n\n  this.prompt({\n    type: 'checkbox',\n    name: 'testFrameworks',\n    message: response => this.getNumberedQuestion('Besides JUnit and Karma, which testing frameworks would you like to use?', true),\n    choices,\n    default: defaultChoice\n  }).then((prompt) => {\n    this.testFrameworks = prompt.testFrameworks;\n    done();\n  });\n}\n"
  },
  {
    "path": "generators/client/USAGE",
    "content": "Description:\n    Creates a new JHipster React client side application based on the selected options\n\nExample:\n    yo jhipster-react:client\n\n    This will create an React client app\n"
  },
  {
    "path": "generators/client/files.js",
    "content": "const mkdirp = require('mkdirp');\nconst constants = require('generator-jhipster/generators/generator-constants');\n\n/* Constants use throughout */\nconst MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;\n// const TEST_SRC_DIR = constants.CLIENT_TEST_SRC_DIR;\nconst REACT_DIR = constants.ANGULAR_DIR;\n\n/**\n * The default is to use a file path string. It implies use of the template method.\n * For any other config an object { file:.., method:.., template:.. } can be used\n*/\nconst files = {\n  common: [\n    {\n      templates: [\n        '_package.json',\n        '_.eslintrc.json',\n        '_.babelrc',\n        '_.editorconfig',\n        'webpack/webpack.common.js',\n        'webpack/webpack.dev.js',\n        'webpack/webpack.prod.js'\n      ]\n    }\n  ],\n  sass: [\n    {\n      condition: generator => generator.useSass,\n      templates: [\n        { file: '_postcss.config.js', method: 'copy' }\n      ]\n    }\n  ],\n  image: [\n    {\n      path: MAIN_SRC_DIR,\n      templates: [\n        { file: 'static/images/logo-jhipster-react.svg', method: 'copy' }\n      ]\n    }\n  ],\n  swagger: [\n    {\n      path: MAIN_SRC_DIR,\n      templates: [\n        'swagger-ui/_index.html',\n        { file: 'swagger-ui/images/_throbber.gif', method: 'copy' }\n      ]\n    }\n  ],\n  commonWeb: [\n    {\n      path: MAIN_SRC_DIR,\n      templates: [\n        { file: 'favicon.ico', method: 'copy' },\n        'robots.txt',\n        '404.html',\n        'index.html'\n      ]\n    }\n  ],\n  reactApp: [\n    {\n      path: REACT_DIR,\n      templates: [\n        'app.js',\n        'index.js',\n        'routes.js',\n        'config/constants.js',\n        'config/theme.js',\n        'config/devtools.js',\n        'config/promise-middleware.js',\n        'config/store.js'\n      ]\n    },\n    {\n      condition: generator => generator.enableTranslation,\n      path: REACT_DIR,\n      templates: [\n        'config/translation.js'\n      ]\n    },\n    {\n      condition: generator => generator.useSass,\n      path: REACT_DIR,\n      templates: [\n        { file: 'app.scss', method: 'copy' }\n      ]\n    },\n    // {\n    //   condition: generator => generator.authenticationType === 'oauth2' || generator.authenticationType === 'jwt' || generator.authenticationType === 'uaa',\n    //   path: REACT_DIR,\n    //   templates: [\n    //     'blocks/interceptor/_auth.interceptor.js'\n    //   ]\n    // },\n    // {\n    //   condition: generator => !generator.skipServer,\n    //   path: REACT_DIR,\n    //   templates: [\n    //     'blocks/interceptor/_auth-expired.interceptor.js'\n    //   ]\n    // }\n  ],\n  reactMain: [\n    {\n      path: REACT_DIR,\n      templates: [\n        // home module\n        'modules/home/index.js',\n        { file: 'modules/home/home.js', method: 'processJsx' },\n        // login module\n        'modules/login/index.js',\n        { file: 'modules/login/login.js', method: 'processJsx' },\n        { file: 'modules/login/login-modal.js', method: 'processJsx' }\n      ]\n    },\n    {\n      condition: generator => generator.useSass,\n      path: REACT_DIR,\n      templates: [\n        'modules/home/home.scss',\n      ]\n    }\n  ],\n  reducers: [\n    {\n      path: REACT_DIR,\n      templates: [\n        // home module\n        'reducers/index.js',\n        'reducers/administration.js',\n        'reducers/authentication.js'\n      ]\n    },\n    {\n      condition: generator => generator.enableTranslation,\n      path: REACT_DIR,\n      templates: [\n        'reducers/locale.js'\n      ]\n    }\n  ],\n  // accountModule: [\n    // {\n    //   path: REACT_DIR,\n    //   templates: [\n    //     'account/_index.js',\n    //     { file: 'account/_account.route.js', method: 'processJsx' },\n    //     { file: 'account/activate/_activate.route.js', method: 'processJsx' },\n    //     { file: 'account/activate/_activate.component.js', method: 'processJsx' },\n    //     { file: 'account/password/_password.route.js', method: 'processJsx' },\n    //     { file: 'account/password/_password.component.js', method: 'processJsx' },\n    //     { file: 'account/register/_register.route.js', method: 'processJsx' },\n    //     { file: 'account/register/_register.component.js', method: 'processJsx' },\n    //     { file: 'account/password-reset/init/_password-reset-init.route.js', method: 'processJsx' },\n    //     { file: 'account/password-reset/init/_password-reset-init.component.js', method: 'processJsx' },\n    //     { file: 'account/password-reset/finish/_password-reset-finish.route.js', method: 'processJsx' },\n    //     { file: 'account/password-reset/finish/_password-reset-finish.component.js', method: 'processJsx' },\n    //     { file: 'account/settings/_settings.route.js', method: 'processJsx' },\n    //     { file: 'account/settings/_settings.component.js', method: 'processJsx' }\n    //   ]\n    // },\n    // {\n    //   condition: generator => generator.authenticationType === 'session',\n    //   path: REACT_DIR,\n    //   templates: [\n    //     { file: 'account/sessions/_sessions.route.js', method: 'processJsx' },\n    //     'account/sessions/_session.model.js',\n    //     { file: 'account/sessions/_sessions.component.js', method: 'processJsx' }\n    //   ]\n    // },\n    // {\n    //   condition: generator => generator.enableSocialSignIn,\n    //   path: REACT_DIR,\n    //   templates: [\n    //             { file: 'account/social/_social.route.js', method: 'processJsx' },\n    //             { file: 'account/social/_social-register.component.js', method: 'processJsx' },\n    //             { file: 'account/social/_social-register.component.html', method: 'processHtml' },\n    //             { file: 'shared/social/_social.component.js', method: 'processJsx' },\n    //             { file: 'shared/social/_social.component.html', method: 'processHtml' },\n    //     'shared/social/_social.service.js'\n    //   ]\n    // },\n    // {\n    //   condition: generator => generator.enableSocialSignIn && generator.authenticationType === 'jwt',\n    //   path: REACT_DIR,\n    //   templates: [\n    //             { file: 'account/social/_social-auth.component.js', method: 'processJsx' },\n    //   ]\n    // },\n    // {\n    //   condition: generator => generator.useSass,\n    //   path: REACT_DIR,\n    //   templates: [\n    //     'account/password/_password-strength-bar.scss'\n    //   ]\n    // },\n    // {\n    //   condition: generator => !generator.useSass,\n    //   path: REACT_DIR,\n    //   templates: [\n    //     'account/password/_password-strength-bar.css'\n    //   ]\n    // }\n  // ],\n  adminModule: [\n    {\n      path: REACT_DIR,\n      templates: [\n        // admin modules\n        { file: 'modules/administration/audits/audits.js', method: 'processJsx' },\n        { file: 'modules/administration/configuration/configuration.js', method: 'processJsx' },\n        { file: 'modules/administration/docs/docs.js', method: 'processJsx' },\n        { file: 'modules/administration/health/health.js', method: 'processJsx' },\n        { file: 'modules/administration/health/health-detail/health-detail.js', method: 'processJsx' },\n        { file: 'modules/administration/health/health-detail/health-modal.js', method: 'processJsx' },\n        { file: 'modules/administration/health/health-detail/index.js', method: 'processJsx' },\n        { file: 'modules/administration/logs/logs.js', method: 'processJsx' },\n        { file: 'modules/administration/metrics/metrics.js', method: 'processJsx' },\n        { file: 'modules/administration/metrics/metrics-detail/metrics-detail.js', method: 'processJsx' },\n        { file: 'modules/administration/metrics/metrics-detail/metrics-modal.js', method: 'processJsx' },\n        { file: 'modules/administration/metrics/metrics-detail/index.js', method: 'processJsx' },\n      ]\n    },\n    // {\n    //   condition: generator => generator.websocket === 'spring-websocket',\n    //   path: REACT_DIR,\n    //   templates: [\n    //     { file: 'modules/administration/tracker/Tracker.js', method: 'processJsx' }\n    //   ]\n    // },\n    {\n      condition: generator => !generator.skipUserManagement,\n      path: REACT_DIR,\n      templates: [\n        { file: 'modules/administration/user-management/user-management.js', method: 'processJsx' },\n        // { file: 'modules/administration/user-management/UserManagementDetail.js', method: 'processJsx' },\n        // { file: 'modules/administration/user-management/UserManagementDialog.js', method: 'processJsx' },\n        // { file: 'modules/administration/user-management/UserManagementDeleteDialog.js', method: 'processJsx' }\n      ]\n    },\n    {\n      condition: generator => generator.applicationType === 'gateway',\n      path: REACT_DIR,\n      templates: [\n        { file: 'modules/administration/gateway/gateway.js', method: 'processJsx' }\n      ]\n    }\n  ],\n  angularShared: [\n    {\n      path: REACT_DIR,\n      templates: [\n        // layouts\n        'shared/components/footer/footer.js',\n        'shared/components/header/header.js',\n        'shared/components/private-route/private-route.js',\n        // interceptors\n        'shared/interceptors/axios.js',\n        // util\n        'shared/util/global-style.js',\n        'shared/util/log-util.js'\n      ]\n    },\n    {\n      condition: generator => generator.useSass,\n      path: REACT_DIR,\n      templates: [\n        'shared/components/header/header.scss',\n        'shared/variables.scss'\n      ]\n    },\n    // {\n    //   condition: generator => generator.enableTranslation,\n    //   path: REACT_DIR,\n    //   templates: [\n    //     'shared/language/_language.pipe.js',\n    //     'shared/language/_language.constants.js',\n    //     'shared/language/_language.helper.js'\n    //   ]\n    // },\n    // {\n    //   condition: generator => !generator.skipUserManagement,\n    //   path: REACT_DIR,\n    //   templates: [\n    //     'shared/user/_user.model.js',\n    //     'shared/user/_user.service.js'\n    //   ]\n    // }\n  ],\n  // angularAuthService: [\n  //   {\n  //     path: REACT_DIR,\n  //     templates: [\n  //       'shared/auth/_auth.service.js',\n  //       'shared/auth/_csrf.service.js',\n  //       'shared/auth/_state-storage.service.js',\n  //       'shared/auth/_principal.service.js',\n  //       'shared/auth/_has-any-authority.directive.js',\n  //       'shared/auth/_account.service.js',\n  //       'shared/auth/_user-route-access-service.js'\n  //     ]\n  //   },\n  //   {\n  //     condition: generator => generator.authenticationType === 'oauth2',\n  //     path: REACT_DIR,\n  //     templates: [\n  //       'shared/auth/_auth-oauth2.service.js'\n  //     ]\n  //   },\n  //   {\n  //     condition: generator => generator.authenticationType === 'jwt' || generator.authenticationType === 'uaa',\n  //     path: REACT_DIR,\n  //     templates: [\n  //       'shared/auth/_auth-jwt.service.js'\n  //     ]\n  //   },\n  //   {\n  //     condition: generator => generator.authenticationType === 'session',\n  //     path: REACT_DIR,\n  //     templates: [\n  //       'shared/auth/_auth-session.service.js'\n  //     ]\n  //   }\n  // ],\n  // clientTestFw: [\n  //   {\n  //     path: TEST_SRC_DIR,\n  //     templates: [\n  //       '_karma.conf.js',\n  //       'spec/_entry.js',\n  //       'spec/_test.module.js',\n  //       'spec/app/account/activate/_activate.component.spec.js',\n  //       'spec/app/account/password/_password.component.spec.js',\n  //       'spec/app/account/password/_password-strength-bar.component.spec.js',\n  //       'spec/app/account/password-reset/init/_password-reset-init.component.spec.js',\n  //       'spec/app/account/password-reset/finish/_password-reset-finish.component.spec.js',\n  //       'spec/app/account/register/_register.component.spec.js',\n  //       'spec/app/account/settings/_settings.component.spec.js',\n  //       'spec/app/admin/health/_health.component.spec.js',\n  //       'spec/app/admin/audits/_audits.component.spec.js',\n  //       'spec/helpers/_spyobject.js',\n  //       'spec/helpers/_mock-account.service.js',\n  //       'spec/helpers/_mock-principal.service.js',\n  //       'spec/helpers/_mock-route.service.js'\n  //     ]\n  //   },\n  //   {\n  //     condition: generator => generator.authenticationType === 'session',\n  //     path: TEST_SRC_DIR,\n  //     templates: [\n  //       'spec/app/account/sessions/_sessions.component.spec.js',\n  //     ]\n  //   },\n  //   {\n  //     condition: generator => generator.enableTranslation,\n  //     path: TEST_SRC_DIR,\n  //     templates: [\n  //       'spec/helpers/_mock-language.service.js'\n  //     ]\n  //   },\n  //   {\n  //     condition: generator => generator.websocket === 'spring-websocket',\n  //     path: TEST_SRC_DIR,\n  //     templates: [\n  //       'spec/helpers/_mock-tracker.service.js'\n  //     ]\n  //   },\n  //   {\n  //     condition: generator => generator.protractorTests,\n  //     path: TEST_SRC_DIR,\n  //     templates: [\n  //       'e2e/account/_account.spec.js',\n  //       'e2e/admin/_administration.spec.js',\n  //       '_protractor.conf.js'\n  //     ]\n  //   }\n  // ]\n};\n\nmodule.exports = {\n  writeFiles,\n  files\n};\n\nfunction writeFiles() {\n  mkdirp(MAIN_SRC_DIR);\n  // write React files\n  this.writeFilesToDisk(files, this, false);\n}\n"
  },
  {
    "path": "generators/client/index.js",
    "content": "const util = require('util');\nconst generator = require('yeoman-generator');\nconst chalk = require('chalk');\nconst _ = require('lodash');\nconst BaseGenerator = require('generator-jhipster/generators/generator-base');\nconst constants = require('generator-jhipster/generators/generator-constants');\nconst prompts = require('./prompts');\nconst writeFiles = require('./files').writeFiles;\nconst packagejs = require('../../package.json');\n\nconst JhipsterClientGenerator = generator.extend({});\n\nutil.inherits(JhipsterClientGenerator, BaseGenerator);\n\n/* Constants used throughout */\nconst QUESTIONS = constants.CLIENT_QUESTIONS;\n\nmodule.exports = JhipsterClientGenerator.extend({\n  constructor: function (...args) { // eslint-disable-line object-shorthand\n    generator.apply(this, args);\n\n    this.configOptions = this.options.configOptions || {};\n\n    // This adds support for a `--protractor` flag\n    this.option('protractor', {\n      desc: 'Enable protractor tests',\n      type: Boolean,\n      defaults: false\n    });\n\n    // This adds support for a `--auth` flag\n    this.option('auth', {\n      desc: 'Provide authentication type for the application',\n      type: String\n    });\n\n    // This adds support for a `--build` flag\n    this.option('build', {\n      desc: 'Provide build tool for the application',\n      type: String\n    });\n\n    // This adds support for a `--websocket` flag\n    this.option('websocket', {\n      desc: 'Provide websocket option for the application',\n      type: String\n    });\n\n    // This adds support for a `--dev-db` flag\n    this.option('dev-db', {\n      desc: 'Provide development DB option for the application',\n      type: String\n    });\n\n    // This adds support for a `--db` flag\n    this.option('db', {\n      desc: 'Provide DB type for the application',\n      type: String\n    });\n\n    // This adds support for a `--social` flag\n    this.option('social', {\n      desc: 'Provide development DB option for the application',\n      type: Boolean,\n      default: false\n    });\n\n    // This adds support for a `--search-engine` flag\n    this.option('search-engine', {\n      desc: 'Provide development DB option for the application',\n      type: String\n    });\n\n    // This adds support for a `--search-engine` flag\n    this.option('hb-cache', {\n      desc: 'Provide hibernate cache option for the application',\n      type: String\n    });\n\n    // This adds support for a `--jhi-prefix` flag\n    this.option('jhi-prefix', {\n      desc: 'Add prefix before services, controllers and states name',\n      type: String,\n      defaults: 'jhi'\n    });\n\n    // This adds support for a `--skip-user-management` flag\n    this.option('skip-user-management', {\n      desc: 'Skip the user management module during app generation',\n      type: Boolean,\n      defaults: false\n    });\n\n    // This adds support for a `--npm` flag\n    this.option('npm', {\n      desc: 'Use npm instead of yarn',\n      type: Boolean,\n      defaults: false\n    });\n\n    this.skipServer = this.configOptions.skipServer || this.config.get('skipServer');\n    this.skipUserManagement = this.configOptions.skipUserManagement || this.options['skip-user-management'] || this.config.get('skipUserManagement');\n    this.authenticationType = this.options.auth;\n    this.buildTool = this.options.build;\n    this.websocket = this.options.websocket;\n    this.devDatabaseType = this.options['dev-db'];\n    this.databaseType = this.options.db;\n    this.enableSocialSignIn = this.options.social;\n    this.searchEngine = this.options['search-engine'];\n    this.hibernateCache = this.options['hb-cache'];\n    this.otherModules = this.configOptions.otherModules || [];\n    this.jhiPrefix = this.configOptions.jhiPrefix || this.config.get('jhiPrefix') || this.options['jhi-prefix'];\n    this.jhiPrefixCapitalized = _.upperFirst(this.jhiPrefix);\n    this.testFrameworks = [];\n\n    if (this.options.protractor) this.testFrameworks.push('protractor');\n\n    this.currentQuestion = this.configOptions.lastQuestion ? this.configOptions.lastQuestion : 0;\n    this.totalQuestions = this.configOptions.totalQuestions ? this.configOptions.totalQuestions : QUESTIONS;\n    this.baseName = this.configOptions.baseName;\n    this.logo = this.configOptions.logo;\n    this.useYarn = this.configOptions.useYarn = !this.options.npm;\n    this.clientPackageManager = this.configOptions.clientPackageManager;\n    this.isDebugEnabled = this.configOptions.isDebugEnabled || this.options.debug;\n\n    // TODO chnage to process JSX\n    this.processJsx = (source, dest, generator, opt, template) => {\n      this.copyTemplate(source, dest, 'stripJs', generator, opt, template);\n    };\n  },\n\n  initializing: {\n    displayLogo() {\n      if (this.logo) {\n        this.printJHipsterLogo();\n      }\n    },\n\n    setupClientconsts() {\n            // Make constants available in templates\n      this.MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;\n      this.TEST_SRC_DIR = constants.CLIENT_TEST_SRC_DIR;\n\n      this.serverPort = this.config.get('serverPort') || this.configOptions.serverPort || 8080;\n      this.applicationType = this.config.get('applicationType') || this.configOptions.applicationType;\n      if (!this.applicationType) {\n        this.applicationType = 'monolith';\n      }\n      this.clientFramework = this.config.get('clientFramework') || 'react';\n      this.useSass = this.config.get('useSass');\n      this.enableTranslation = this.config.get('enableTranslation'); // this is enabled by default to avoid conflicts for existing applications\n      this.nativeLanguage = this.config.get('nativeLanguage');\n      this.languages = this.config.get('languages');\n      this.messageBroker = this.config.get('messageBroker');\n      this.packagejs = packagejs;\n      const baseName = this.config.get('baseName');\n      if (baseName) {\n        this.baseName = baseName;\n      }\n\n      const clientConfigFound = this.useSass !== undefined;\n      if (clientConfigFound) {\n        // If translation is not defined, it is enabled by default\n        if (this.enableTranslation === undefined) {\n          this.enableTranslation = true;\n        }\n        if (this.nativeLanguage === undefined) {\n          this.nativeLanguage = 'en';\n        }\n        if (this.languages === undefined) {\n          this.languages = ['en', 'fr'];\n        }\n\n        this.existingProject = true;\n      }\n      if (!this.clientPackageManager) {\n        if (this.useYarn) {\n          this.clientPackageManager = 'yarn';\n        } else {\n          this.clientPackageManager = 'npm';\n        }\n      }\n    }\n  },\n\n  prompting: {\n\n    askForModuleName: prompts.askForModuleName,\n    askForClientSideOpts: prompts.askForClientSideOpts,\n    askFori18n: prompts.askFori18n,\n\n    setSharedConfigOptions() {\n      this.configOptions.lastQuestion = this.currentQuestion;\n      this.configOptions.totalQuestions = this.totalQuestions;\n      this.configOptions.clientFramework = 'angular2'; // Hack to get server side to generate webpack stuff accordingly\n      this.configOptions.useSass = this.useSass;\n    }\n\n  },\n\n  configuring: {\n    insight() {\n      const insight = this.insight();\n      insight.trackWithEvent('generator', 'client');\n      insight.track('app/clientFramework', this.clientFramework);\n      insight.track('app/useSass', this.useSass);\n      insight.track('app/enableTranslation', this.enableTranslation);\n      insight.track('app/nativeLanguage', this.nativeLanguage);\n      insight.track('app/languages', this.languages);\n    },\n\n    configureGlobal() {\n      // Application name modified, using each technology's conventions\n      this.camelizedBaseName = _.camelCase(this.baseName);\n      this.angularAppName = this.getAngularAppName();\n      this.angular2AppName = this.getAngular2AppName();\n      this.capitalizedBaseName = _.upperFirst(this.baseName);\n      this.dasherizedBaseName = _.kebabCase(this.baseName);\n      this.lowercaseBaseName = this.baseName.toLowerCase();\n      if (!this.nativeLanguage) {\n        // set to english when translation is set to false\n        this.nativeLanguage = 'en';\n      }\n    },\n\n    saveConfig() {\n      this.config.set('clientFramework', this.clientFramework);\n      this.config.set('useSass', this.useSass);\n      this.config.set('enableTranslation', this.enableTranslation);\n      if (this.enableTranslation && !this.configOptions.skipI18nQuestion) {\n        this.config.set('nativeLanguage', this.nativeLanguage);\n        this.config.set('languages', this.languages);\n      }\n      this.config.set('clientPackageManager', this.clientPackageManager);\n    }\n  },\n\n  default: {\n\n    getSharedConfigOptions() {\n      if (this.configOptions.hibernateCache) {\n        this.hibernateCache = this.configOptions.hibernateCache;\n      }\n      if (this.configOptions.websocket !== undefined) {\n        this.websocket = this.configOptions.websocket;\n      }\n      if (this.configOptions.databaseType) {\n        this.databaseType = this.configOptions.databaseType;\n      }\n      if (this.configOptions.devDatabaseType) {\n        this.devDatabaseType = this.configOptions.devDatabaseType;\n      }\n      if (this.configOptions.prodDatabaseType) {\n        this.prodDatabaseType = this.configOptions.prodDatabaseType;\n      }\n      if (this.configOptions.messageBroker !== undefined) {\n        this.messageBroker = this.configOptions.messageBroker;\n      }\n      if (this.configOptions.searchEngine !== undefined) {\n        this.searchEngine = this.configOptions.searchEngine;\n      }\n      if (this.configOptions.buildTool) {\n        this.buildTool = this.configOptions.buildTool;\n      }\n      if (this.configOptions.enableSocialSignIn !== undefined) {\n        this.enableSocialSignIn = this.configOptions.enableSocialSignIn;\n      }\n      if (this.configOptions.authenticationType) {\n        this.authenticationType = this.configOptions.authenticationType;\n      }\n      if (this.configOptions.testFrameworks) {\n        this.testFrameworks = this.configOptions.testFrameworks;\n      }\n      this.protractorTests = this.testFrameworks.indexOf('protractor') !== -1;\n\n      if (this.configOptions.enableTranslation !== undefined) {\n        this.enableTranslation = this.configOptions.enableTranslation;\n      }\n      if (this.configOptions.nativeLanguage !== undefined) {\n        this.nativeLanguage = this.configOptions.nativeLanguage;\n      }\n      if (this.configOptions.languages !== undefined) {\n        this.languages = this.configOptions.languages;\n      }\n\n      if (this.configOptions.uaaBaseName !== undefined) {\n        this.uaaBaseName = this.configOptions.uaaBaseName;\n      }\n\n      // Make dist dir available in templates\n      if (this.configOptions.buildTool === 'maven') {\n        this.BUILD_DIR = 'target/';\n      } else {\n        this.BUILD_DIR = 'build/';\n      }\n      this.DIST_DIR = this.BUILD_DIR + constants.CLIENT_DIST_DIR;\n    },\n\n    composeLanguages() {\n      if (this.configOptions.skipI18nQuestion) return;\n\n      this.composeLanguagesSub(this, this.configOptions, 'client');\n    }\n  },\n\n  writing() {\n    return writeFiles.call(this);\n  },\n\n  install() {\n    const logMsg =\n            `To install your dependencies manually, run: ${chalk.yellow.bold(`${this.clientPackageManager} install`)}`;\n\n    const injectDependenciesAndConstants = (err) => {\n      if (err) {\n        this.warning('Install of dependencies failed!');\n        this.log(logMsg);\n      }\n    };\n\n    const installConfig = {\n      bower: false,\n      npm: this.clientPackageManager !== 'yarn',\n      yarn: this.clientPackageManager === 'yarn',\n      callback: injectDependenciesAndConstants\n    };\n\n    if (this.options['skip-install']) {\n      this.log(logMsg);\n    } else {\n      this.installDependencies(installConfig);\n    }\n  },\n\n  end() {\n    this.log(chalk.green.bold('\\nClient application generated successfully.\\n'));\n\n    const logMsg =\n            `Start your Webpack development server with:\\n ${chalk.yellow.bold(`${this.clientPackageManager} start`)}\\n`;\n\n    this.log(chalk.green(logMsg));\n  }\n});\n"
  },
  {
    "path": "generators/client/prompts.js",
    "content": "\nmodule.exports = {\n  askForModuleName,\n  askForClientSideOpts,\n  askFori18n\n};\n\nfunction askForModuleName() {\n  if (this.baseName) return;\n\n  this.askModuleName(this);\n}\n\nfunction askForClientSideOpts() {\n  if (this.existingProject) return;\n\n  const done = this.async();\n  const prompts = [\n    {\n      type: 'confirm',\n      name: 'useSass',\n      message: response => this.getNumberedQuestion('Would you like to use the LibSass stylesheet preprocessor for your CSS?', true),\n      default: true\n    }\n  ];\n  this.prompt(prompts).then((props) => {\n    this.useSass = props.useSass;\n    done();\n  });\n}\n\nfunction askFori18n() {\n  if (this.existingProject || this.configOptions.skipI18nQuestion) return;\n\n  this.aski18n(this);\n}\n"
  },
  {
    "path": "generators/client/templates/_.babelrc",
    "content": "{\n  \"presets\": [\"react\", \"es2015\", \"stage-1\"],\n  \"plugins\": [\n    [\"babel-plugin-module-alias\", [\n      { \"src\": \"./src/main/webapp/i18n\", \"expose\": \"i18n\" }\n    ]]\n  ],\n  \"env\": {\n    \"dev-watch\": {\n      \"presets\": [\"react-hmre\"]\n    }\n  }\n}\n"
  },
  {
    "path": "generators/client/templates/_.editorconfig",
    "content": "# EditorConfig helps developers define and maintain consistent\n# coding styles between different editors and IDEs\n# editorconfig.org\n\nroot = true\n\n[*]\n\n# Change these settings to your own preference\nindent_style = space\nindent_size = 4\n\n# We recommend you to keep these unchanged\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[*.js]\nindent_style = space\nindent_size = 2\n\n[*.md]\ntrim_trailing_whitespace = false\n\n[{package,bower}.json]\nindent_style = space\nindent_size = 2\n"
  },
  {
    "path": "generators/client/templates/_.eslintrc.json",
    "content": "{\n  \"extends\": [\n    \"airbnb\",\n    \"plugin:ava/recommended\"\n  ],\n  \"parser\": \"babel-eslint\",\n  \"plugins\": [\n    \"ava\"\n  ],\n  \"env\": {\n    \"browser\": true,\n    \"node\": true,\n    \"mocha\": true\n  },\n  \"ecmaFeatures\": {\n    \"jsx\": true,\n    \"es6\": true,\n    \"classes\": true\n  },\n  \"rules\": {\n    \"comma-dangle\": [1, \"never\"],\n    \"no-underscore-dangle\" : \"off\",\n    \"react/jsx-filename-extension\": \"off\",\n    \"max-len\": [1, 180, 4],\n    \"jsx-a11y/no-marquee\" : \"off\",\n    \"jsx-a11y/no-static-element-interactions\" : \"off\",\n    \"no-plusplus\": \"off\",\n    // TODO to be removed after review\n    \"no-nested-ternary\": \"off\",\n    \"arrow-body-style\": \"off\",\n    \"no-named-as-default\": \"off\",\n    \"react/jsx-no-bind\": \"off\",\n    \"react/prefer-stateless-function\": \"off\",\n    \"react/forbid-prop-types\": \"off\",\n    \"react/no-array-index-key\": \"off\",\n    \"no-param-reassign\": \"off\",\n    \"no-unused-vars\": \"off\"\n  }\n}\n"
  },
  {
    "path": "generators/client/templates/_package.json",
    "content": "{\n  \"name\": \"react-client\",\n  \"version\": \"0.0.0\",\n  \"description\": \"React client app\",\n  \"private\": true,\n  \"cacheDirectories\": [\n    \"node_modules\"\n  ],\n  \"dependencies\": {\n    \"axios\": \"^0.15.3\",\n    \"counterpart\": \"^0.17.2\",\n    \"deep-equal\": \"^1.0.1\",\n    \"flexboxgrid\": \"^6.3.1\",\n    \"lodash.debounce\": \"4.0.8\",\n\t  \"material-ui\": \"^0.17.0\",\n    \"react\": \"^15.3.1\",\n    \"react-bootstrap\": \"^0.30.8\",\n    \"react-dom\": \"^15.3.1\",\n    \"react-interpolate-component\": \"^0.10.0\",\n    \"react-redux\": \"^5.0.2\",\n    \"react-router\": \"^3.0.2\",\n    \"react-router-bootstrap\": \"^0.23.1\",\n    \"react-router-redux\": \"^4.0.2\",\n    \"react-tap-event-plugin\": \"^2.0.1\",\n    \"react-translate-component\": \"^0.13.2\",\n    \"redux\": \"^3.5.2\",\n    \"swagger-ui\": \"2.2.10\"\n  },\n  \"devDependencies\": {\n    \"babel\": \"^6.5.2\",\n    \"babel-core\": \"^6.17.0\",\n    \"babel-eslint\": \"^7.1.1\",\n    \"babel-loader\": \"^6.2.5\",\n    \"babel-plugin-module-alias\": \"^1.2.0\",\n    \"babel-plugin-react-transform\": \"^2.0.2\",\n    \"babel-preset-es2015\": \"^6.6.0\",\n    \"babel-preset-react\": \"^6.5.0\",\n    \"babel-preset-react-hmre\": \"^1.1.1\",\n    \"babel-preset-stage-1\": \"^6.22.0\",\n    \"copy-webpack-plugin\": \"4.0.1\",\n    \"cross-env\": \"^3.1.4\",\n    \"css-loader\": \"^0.26.1\",\n    \"enzyme\": \"^2.2.0\",\n    \"eslint\": \"^3.1.1\",\n    \"eslint-config-airbnb\": \"^14.0.0\",\n    \"eslint-plugin-ava\": \"^4.0.1\",\n    \"eslint-plugin-import\": \"^2.2.0\",\n    \"eslint-plugin-jsx-a11y\": \"^4.0.0\",\n    \"eslint-plugin-react\": \"^6.9.0\",\n    \"expect\": \"^1.16.0\",\n    \"extract-text-webpack-plugin\": \"^2.0.0-rc.3\",\n    \"file-loader\": \"0.10.0\",\n    \"html-webpack-plugin\": \"^2.15.0\",\n    \"http-proxy-middleware\": \"^0.17.3\",\n    \"image-webpack-loader\": \"3.2.0\",\n    \"jsdom-global\": \"^2.1.1\",\n    \"json-loader\": \"^0.5.4\",\n    \"mocha\": \"^3.2.0\",\n    \"node-sass\": \"4.5.0\",\n    \"postcss-loader\": \"1.3.0\",\n    \"react-addons-test-utils\": \"^15.0.0\",\n    \"redux-devtools\": \"^3.2.0\",\n    \"redux-devtools-dock-monitor\": \"^1.1.1\",\n    \"redux-devtools-log-monitor\": \"^1.0.9\",\n    \"sass-loader\": \"6.0.0\",\n    \"stripcomment-loader\": \"^0.1.0\",\n    \"style-loader\": \"^0.13.1\",\n    \"webpack\": \"^2.2.1\",\n    \"webpack-dev-server\": \"2.3.0\",\n    \"webpack-merge\": \"2.6.1\"\n  },\n  \"engines\": {\n    \"node\": \">=6.9.0\"\n  },\n  \"scripts\": {\n    \"lint\": \"eslint src webpack\",\n    \"lint:fix\": \"eslint src webpack --fix\",\n    \"start\": \"<%= clientPackageManager %> run webpack:dev\",\n    \"webpack:dev\": \"cross-env NODE_ENV=dev-watch webpack-dev-server --config webpack/webpack.dev.js  --progress --inline --hot --profile --port=8000 --open\",\n    \"webpack:build\": \"<%= clientPackageManager %> run webpack:build:dev\",\n    \"webpack:build:dev\": \"webpack --config webpack/webpack.dev.js\",\n    \"webpack:prod\": \"cross-env NODE_ENV=production webpack --config webpack/webpack.prod.js\",\n    \"test\": \"cross-env NODE_ENV=test mocha\",\n    <%_ if (protractorTests) { _%>\n    \"e2e\": \"protractor <%= TEST_SRC_DIR %>protractor.conf.js\",\n    \"postinstall\": \"webdriver-manager update && <%= clientPackageManager %> run webpack:build\"\n    <%_ } else { _%>\n    \"postinstall\": \"<%= clientPackageManager %> run webpack:build\"\n    <%_ } _%>\n  }\n}\n"
  },
  {
    "path": "generators/client/templates/_postcss.config.js",
    "content": "module.exports = {\n  plugins: []\n};\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/404.html",
    "content": "<!doctype html>\n<html lang=\"<%= nativeLanguage %>\">\n<head>\n    <meta charset=\"utf-8\">\n    <title>Page Not Found</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <style>\n\n        * {\n            line-height: 1.2;\n            margin: 0;\n        }\n\n        html {\n            color: #888;\n            display: table;\n            font-family: sans-serif;\n            height: 100%;\n            text-align: center;\n            width: 100%;\n        }\n\n        body {\n            display: table-cell;\n            vertical-align: middle;\n            margin: 2em auto;\n        }\n\n        h1 {\n            color: #555;\n            font-size: 2em;\n            font-weight: 400;\n        }\n\n        p {\n            margin: 0 auto;\n            width: 280px;\n        }\n\n        @media only screen and (max-width: 280px) {\n\n            body, p {\n                width: 95%;\n            }\n\n            h1 {\n                font-size: 1.5em;\n                margin: 0 0 0.3em;\n            }\n\n        }\n\n    </style>\n</head>\n<body>\n    <h1>Page Not Found</h1>\n    <p>Sorry, but the page you were trying to view does not exist.</p>\n</body>\n</html>\n<!-- IE needs 512+ bytes: http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx -->\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/app.js",
    "content": "import 'flexboxgrid/dist/flexboxgrid.css';\nimport React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';\n\nimport { locales } from './config/translation';\nimport appTheme from './config/theme';\nimport { setLocale } from './reducers/locale';\nimport { getSession, logout } from './reducers/authentication';\nimport Header from './shared/components/header/header';\nimport Footer from './shared/components/footer/footer';\n\nimport './app.scss';\n\nexport class App extends Component {\n  static propTypes = {\n    isAuthenticated: PropTypes.bool,\n    currentLocale: PropTypes.string.isRequired,\n    getSession: PropTypes.func.isRequired,\n    setLocale: PropTypes.func.isRequired,\n    logout: PropTypes.func.isRequired,\n    children: PropTypes.node\n  };\n\n  static defaultProps = {\n    isAuthenticated: false,\n    children: null\n  };\n\n  constructor(props) {\n    super(props);\n    this.handleLogout = this.handleLogout.bind(this);\n  }\n\n  componentDidMount() {\n    this.props.getSession();\n  }\n\n  handleLogout() {\n    this.props.logout();\n  }\n\n  render() {\n    return (\n      <MuiThemeProvider muiTheme={appTheme}>\n        <div className=\"main-container\" id=\"main-container\">\n          <Header\n            currentLocale={this.props.currentLocale}\n            onLocaleChange={this.props.setLocale}\n            isAuthenticated={this.props.isAuthenticated}\n            handleLogout={this.handleLogout}\n            toggleSideBar={this.toggleSideBar}\n          />\n          <div className=\"container\">\n            {this.props.children}\n          </div>\n          <Footer />\n        </div>\n      </MuiThemeProvider>\n    );\n  }\n}\n\nexport default connect(\n  store => ({ isAuthenticated: store.authentication.isAuthenticated, currentLocale: store.locale.currentLocale }),\n  { getSession, setLocale, logout }\n)(App);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/app.scss",
    "content": "@import 'shared/variables';\n\nbody {\n  background: #fafafa;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  color: $text-color;\n  margin: 0;\n}\n\n* {\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  &:after, &::before {\n    -moz-box-sizing: border-box;\n    box-sizing: border-box;\n  }\n}\n\na {\n  text-decoration: none;\n  &:hover {\n    text-decoration: underline;\n  }\n}\n\n/* ==========================================================================\nBrowser Upgrade Prompt\n========================================================================== */\n.browserupgrade {\n  margin: 0.2em 0;\n  background: #ccc;\n  color: #000;\n  padding: 0.2em 0;\n}\n\n\n/* ==========================================================================\nGeneric styles\n========================================================================== */\n/* other generic styles */\n\n.vertical {\n  flex-direction: column;\n}\n\n.card {\n    padding: 1.5%;\n    margin-top: 20px;\n    border: none;\n}\n\n.error {\n    color: white;\n    background-color: red;\n}\n\n.pad {\n    padding: 10px;\n}\n\n.break {\n    white-space: normal;\n    word-break:break-all;\n}\n\n.voffset  { margin-top: 2px; }\n.voffset1 { margin-top: 5px; }\n.voffset2 { margin-top: 10px; }\n.voffset3 { margin-top: 15px; }\n.voffset4 { margin-top: 30px; }\n.voffset5 { margin-top: 40px; }\n.voffset6 { margin-top: 60px; }\n.voffset7 { margin-top: 80px; }\n.voffset8 { margin-top: 100px; }\n.voffset9 { margin-top: 150px; }\n\n.readonly {\n  background-color: #eee;\n  opacity: 1;\n}\n\n/* ==========================================================================\nmake sure browsers use the pointer cursor for anchors, even with no href\n========================================================================== */\na:hover {\n  cursor: pointer;\n}\n\n.hand {\n  cursor: pointer;\n}\n\nbutton.anchorBtn {\n  background: none;\n  border: none;\n  padding: 0;\n  align-items: initial;\n  text-align: initial;\n  width: 100%;\n}\n\na.anchorBtn:hover {\n  text-decoration: none;\n}\n\n/* ==========================================================================\nMetrics and Health styles\n========================================================================== */\n#threadDump .popover, #healthCheck .popover {\n  top: inherit;\n  display: block;\n  font-size: 10px;\n  max-width: 1024px;\n}\n\n#healthCheck .popover {\n  margin-left: -50px;\n}\n\n.health-details {\n  min-width: 400px;\n}\n\n/* ==========================================================================\nstart Password strength bar style\n========================================================================== */\nul#strengthBar {\n  display:inline;\n  list-style:none;\n  margin:0;\n  margin-left:15px;\n  padding:0;\n  vertical-align:2px;\n}\n\n.point:last {\n  margin:0 !important;\n}\n.point {\n  background:#DDD;\n  border-radius:2px;\n  display:inline-block;\n  height:5px;\n  margin-right:1px;\n  width:20px;\n}\n\n/* ==========================================================================\nentity tables helpers\n========================================================================== */\n/* Remove Bootstrap padding from the element\n   http://stackoverflow.com/questions/19562903/remove-padding-from-columns-in-bootstrap-3 */\n@mixin no-padding($side) {\n    @if $side == 'all' {\n        .no-padding {\n            padding: 0 !important;\n        }\n    } @else {\n        .no-padding-#{$side} {\n            padding-#{$side}: 0 !important;\n        }\n    }\n}\n@include no-padding(\"left\");\n@include no-padding(\"right\");\n@include no-padding(\"top\");\n@include no-padding(\"bottom\");\n@include no-padding(\"all\");\n\n/* bootstrap 3 input-group 100% width\n   http://stackoverflow.com/questions/23436430/bootstrap-3-input-group-100-width */\n.width-min { width: 1% !important; }\n\n/* Makes toolbar not wrap on smaller screens\n http://www.sketchingwithcss.com/samplechapter/cheatsheet.html#right */\n.flex-btn-group-container {\n  display: -webkit-flex;\n  display: flex;\n  -webkit-flex-direction: row;\n  flex-direction: row;\n  -webkit-justify-content: flex-end;\n  justify-content: flex-end;\n}\n\n.jh-table > {\n    tbody > tr > td {\n        /* Align text in td verifically (top aligned by Bootstrap) */\n        vertical-align: middle;\n    }\n    thead > tr > th > {\n        .glyphicon-sort, .glyphicon-sort-by-attributes, .glyphicon-sort-by-attributes-alt {\n            /* less visible sorting icons */\n            opacity: 0.5;\n            &:hover {\n                /* full visible sorting icons and pointer when mouse is over them */\n                opacity: 1;\n                cursor: pointer;\n            }\n        }\n    }\n}\n\n/* jhipster-needle-css-add-main JHipster will add new css style */\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/config/constants.js",
    "content": "const config = {\n  version: '0.0.1-SNAPSHOT'\n};\n\nexport default config;\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/config/devtools.js",
    "content": "import React from 'react';\n/* eslint-disable */\nimport { createDevTools } from 'redux-devtools';\nimport LogMonitor from 'redux-devtools-log-monitor';\nimport DockMonitor from 'redux-devtools-dock-monitor';\n/* eslint-enable */\n// You can toggle visibility of devTools with ctrl + H\n// and change their position with ctrl + Q\nexport default createDevTools(\n  <DockMonitor toggleVisibilityKey=\"ctrl-h\" changePositionKey=\"ctrl-q\" defaultIsVisible={false}>\n    <LogMonitor />\n  </DockMonitor>\n);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/config/promise-middleware.js",
    "content": "import axios from 'axios';\nimport { logError } from '../shared/util/log-util';\n\nexport default function promiseMiddleware({ dispatch, getState }) {\n  return next => (action) => {\n    if (typeof action === 'function') {\n      return action(dispatch, getState);\n    }\n    const { promise, types, afterSuccess, ...rest } = action;\n    if (!action.promise) {\n      return next(action);\n    }\n\n    const [REQUEST, SUCCESS, FAILURE] = types;\n    next({ ...rest, type: REQUEST });\n\n    const onFulfilled = (result) => {\n      next({ ...rest, result, type: SUCCESS });\n      if (afterSuccess) {\n        afterSuccess(dispatch, getState, result);\n      }\n    };\n    const onRejected = (error) => {\n      next({ ...rest, error, type: FAILURE });\n    };\n    return promise(axios)\n      .then(onFulfilled, onRejected)\n      .catch((error) => {\n        logError('MIDDLEWARE ERROR:', error);\n        onRejected(error);\n      });\n  };\n}\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/config/store.js",
    "content": "import { createStore, applyMiddleware, compose } from 'redux';\nimport reducer from '../reducers';\nimport DevTools from './devtools';\nimport promiseMiddleware from './promise-middleware';\n\nconst middlewares = process.env.NODE_ENV === 'development' ?\n  [applyMiddleware(promiseMiddleware), DevTools.instrument()] :\n  [applyMiddleware(promiseMiddleware)];\n\nconst initialize = (initialState = {}) => {\n  const store = createStore(reducer, initialState, compose(...middlewares));\n\n  if (module.hot) {\n    // Enable Webpack hot module replacement for reducers\n    // TODO : see if reducers can be moved to feature modules and still get HMR working\n    module.hot.accept('../reducers', () => {\n      /* eslint-disable */\n      const nextReducer = require('../reducers');\n      /* eslint-enable */\n      store.replaceReducer(nextReducer);\n    });\n  }\n  return store;\n};\n\nexport default initialize;\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/config/theme.js",
    "content": "import {\n  cyan500, cyan700,\n  pinkA200,\n  grey100, grey300, grey400, grey500,\n  white, darkBlack, fullBlack\n} from 'material-ui/styles/colors';\nimport getMuiTheme from 'material-ui/styles/getMuiTheme';\n\nexport default getMuiTheme({\n  palette: {\n    primary1Color: cyan500,\n    primary2Color: cyan700,\n    primary3Color: grey400,\n    accent1Color: pinkA200,\n    accent2Color: grey100,\n    accent3Color: grey500,\n    textColor: darkBlack,\n    alternateTextColor: white,\n    canvasColor: white,\n    borderColor: grey300,\n    pickerHeaderColor: cyan500,\n    shadowColor: fullBlack\n  }\n});\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/config/translation.js",
    "content": "import counterpart from 'counterpart';\nimport { setLocale } from '../reducers/locale';\n\nconst mergeTranslations = (requireContext) => {\n  const merged = {};\n  requireContext.keys().forEach((key) => {\n    Object.assign(merged, requireContext(key));\n  });\n  return merged;\n};\n\n/* eslint-disable */\nconst translations = {\n<%_ languages.forEach((lang, index) => { _%>\n  <%= lang %>: mergeTranslations(require.context('i18n/<%= lang %>', false, /.json$/))<%= index !== languages.length - 1 ? ',' : '' %>\n<%_ }); _%>\n};\n/* eslint-enable */\n\nlet currentLocale;\nconst savedLocale = localStorage.getItem('locale') || '<%= nativeLanguage %>';\n\nexport const locales = Object.keys(translations);\n\nexport const registerLocales = (store) => {\n  locales.forEach((key) => {\n    counterpart.registerTranslations(key, translations[key]);\n  });\n  store.subscribe(() => {\n    const previousLocale = currentLocale;\n    currentLocale = store.getState().locale.currentLocale;\n    if (previousLocale !== currentLocale) {\n      localStorage.setItem('locale', currentLocale);\n      counterpart.setLocale(currentLocale);\n    }\n  });\n  store.dispatch(setLocale(savedLocale));\n  return savedLocale;\n};\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/index.js",
    "content": "import React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { hashHistory, Router } from 'react-router';\nimport { syncHistoryWithStore } from 'react-router-redux';\nimport injectTapEventPlugin from 'react-tap-event-plugin';\n\nimport getRoutes from './routes';\nimport DevTools from './config/devtools';\nimport initStore from './config/store';\nimport { registerLocales } from './config/translation';\nimport setupAxiosInterceptors from './shared/interceptors/axios';\nimport { redirectToLoginWithMessage, clearAuthToken, logout } from './reducers/authentication';\n\n// Needed for onTouchTap\n// http://stackoverflow.com/a/34015469/988941\ninjectTapEventPlugin();\n\nconst devTools = process.env.NODE_ENV === 'development' ? <DevTools /> : null;\n\nconst store = initStore();\nconst history = syncHistoryWithStore(hashHistory, store);\nregisterLocales(store);\n\nconst actions = bindActionCreators({ redirectToLoginWithMessage, logout }, store.dispatch);\nsetupAxiosInterceptors(() => actions.redirectToLoginWithMessage('login.error.unauthorized'), clearAuthToken);\n\nrender(\n  <Provider store={store}>\n    <div>\n      {devTools}\n      <Router history={history} routes={getRoutes(actions.logout)} />\n    </div>\n  </Provider>,\n  document.getElementById('root')\n);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/account/password/password.js",
    "content": ""
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/account/settings/settings.js",
    "content": ""
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/audits/audits.js",
    "content": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport Translate from 'react-translate-component';\n\nimport { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';\n\nimport { getAudits } from '../../../reducers/administration';\n\nexport class AuditsPage extends Component {\n\n  constructor(props) {\n    super(props);\n    this.getAuditList = this.getAuditList.bind(this);\n  }\n\n  componentDidMount() {\n    this.props.getAudits();\n  }\n\n  getAuditList() {\n    if (!this.props.isFetching) {\n      this.props.getAudits();\n    }\n  }\n\n  render() {\n    const showCheckboxes = false;\n    const { audits, isFetching } = this.props;\n    return (\n      <div className=\"well\">\n        <div>\n          <h2 translate=\"audits.title\">Audits</h2>\n          FIX ME pagination and filter by date and sorting\n          <hr />\n          <div className=\"row\">\n            <div className=\"col-sm-12\">\n              <Table>\n                <TableHeader\n                  displaySelectAll={showCheckboxes}\n                  adjustForCheckbox={showCheckboxes}>\n                  <TableRow>\n                    <TableHeaderColumn>Timestamp</TableHeaderColumn>\n                    <TableHeaderColumn>Principal</TableHeaderColumn>\n                    <TableHeaderColumn>Address</TableHeaderColumn>\n                    <TableHeaderColumn>Type</TableHeaderColumn>\n                  </TableRow>\n                </TableHeader>\n                <TableBody displayRowCheckbox={showCheckboxes}>\n                  {audits.map((row, index) => (\n                    <TableRow key={index}>\n                      <TableRowColumn>{row.timestamp}</TableRowColumn>\n                      <TableRowColumn>{row.principal}</TableRowColumn>\n                      <TableRowColumn>{row.data.remoteAddress}</TableRowColumn>\n                      <TableRowColumn>{row.type}</TableRowColumn>\n                    </TableRow>\n                  ))}\n                </TableBody>\n              </Table>\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n\nexport default connect(\n  ({ administration }) => ({ audits: administration.audits, isFetching: administration.isFetching }),\n  { getAudits }\n)(AuditsPage);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/configuration/configuration.js",
    "content": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\nimport { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';\nimport TextField from 'material-ui/TextField';\n\nimport { getConfigurations, getEnv } from '../../../reducers/administration';\n\nexport class ConfigurationPage extends Component {\n\n  constructor(props) {\n    super(props);\n    this.getConfigurationList = this.getConfigurationList.bind(this);\n  }\n\n  componentDidMount() {\n    this.props.getConfigurations();\n    this.props.getEnv();\n  }\n\n  getConfigurationList() {\n    if (!this.props.isFetching) {\n      this.props.getConfigurations();\n      this.props.getEnv();\n    }\n  }\n\n  render() {\n    const showCheckboxes = false;\n    const { configuration, isFetching } = this.props;\n    const configProps = (configuration && configuration.configProps) ? configuration.configProps : {};\n    const env = (configuration && configuration.env) ? configuration.env : {};\n    return (\n      <div className=\"well\">\n        <div>\n          <h2 translate=\"configuration.title\">Configuration</h2>\n          FIX ME add search function\n          <TextField hintText=\"Search by Prefix\" fullWidth />\n          <hr />\n          <div className=\"row\">\n            <div className=\"col-sm-12\">\n              <Table>\n                <TableHeader\n                  displaySelectAll={showCheckboxes}\n                  adjustForCheckbox={showCheckboxes}\n                >\n                  <TableRow>\n                    <TableHeaderColumn>Prefix</TableHeaderColumn>\n                    <TableHeaderColumn>Properties</TableHeaderColumn>\n                  </TableRow>\n                </TableHeader>\n                <TableBody displayRowCheckbox={showCheckboxes}>\n                  {Object.keys(configProps).map((configPropKey, configPropIndex) => (\n                    <TableRow key={configPropIndex}>\n                      <TableRowColumn>{configProps[configPropKey].prefix}</TableRowColumn>\n                      <TableRowColumn>\n                        {Object.keys(configProps[configPropKey].properties).map((propKey, propIndex) => (\n                          <div>\n                            <p>\n                              <b> {propKey} </b>\n                              {JSON.stringify(configProps[configPropKey].properties[propKey])}\n                            </p>\n                          </div>\n                        ))}\n                      </TableRowColumn>\n                    </TableRow>\n                  ))}\n                </TableBody>\n              </Table>\n            </div>\n            <hr />\n            <div className=\"col-sm-12\">\n              {Object.keys(env).map((envKey, envIndex) => (\n                <div>\n                  <h4> {envKey} </h4>\n                  <Table>\n                    <TableHeader\n                      displaySelectAll={showCheckboxes}\n                      adjustForCheckbox={showCheckboxes}\n                    >\n                      <TableRow key={envIndex}>\n                        <TableHeaderColumn>Prefix</TableHeaderColumn>\n                        <TableHeaderColumn>Properties</TableHeaderColumn>\n                      </TableRow>\n                    </TableHeader>\n                    <TableBody displayRowCheckbox={showCheckboxes}>\n                      {env[envKey] ?\n                          typeof env[envKey] === 'object' ?\n                            Object.keys(env[envKey]).map((propKey, propIndex) => (\n                              <TableRow key={propIndex}>\n                                <TableRowColumn>{propKey} </TableRowColumn>\n                                <TableRowColumn>{JSON.stringify(env[envKey][propKey])}</TableRowColumn>\n                              </TableRow>\n                              ))\n                            : (<TableRow key={envKey}>\n                              {JSON.stringify(env[envKey])}\n                            </TableRow>)\n                      : ''}\n                    </TableBody>\n                  </Table>\n                </div>\n              ))}\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n\nexport default connect(\n  ({ administration }) => ({ configuration: administration.configuration, isFetching: administration.isFetching }),\n  { getConfigurations, getEnv }\n)(ConfigurationPage);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/docs/docs.js",
    "content": "import React, { Component } from 'react';\nimport Translate from 'react-translate-component';\n\nexport class DocsPage extends Component {\n\n  render() {\n    return (\n      <div>\n        <iframe\n          src=\"../swagger-ui/index.html\" width=\"100%\" height=\"800\"\n          target=\"_top\" title=\"Swagger UI\" seamless style={{ border: 'none' }}\n        />\n      </div>\n    );\n  }\n}\n\nexport default DocsPage;\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/gateway/gateway.js",
    "content": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport Translate from 'react-translate-component';\n\nimport { gatewayRoutes } from '../../../reducers/administration';\n\nexport class GatewayPage extends Component {\n\n  constructor(props) {\n    super(props);\n    this.getRoutes = this.getRoutes.bind(this);\n  }\n\n  componentDidMount() {\n    this.props.gatewayRoutes();\n  }\n\n  getRoutes() {\n    if (!this.props.isFetching) {\n      this.props.gatewayRoutes();\n    }\n  }\n\n  render() {\n    const { gateway, isFetching } = this.props;\n    const routes = gateway ? gateway.routes : [];\n    return (\n      <div className=\"well\">\n        <div>\n          <h2 data-translate=\"gateway.title\">Gateway</h2>\n\n          <h3 data-translate=\"gateway.routes.title\">Current routes</h3>\n          <p>\n            <button type=\"button\" onClick={() => this.getRoutes()} className={isFetching ? 'btn btn-danger' : 'btn btn-primary'} disabled={isFetching}>\n              <span className=\"glyphicon glyphicon-refresh glyphicon-\" />&nbsp;\n              <Translate component=\"span\" content=\"gateway.refresh.button\" />\n            </button>\n          </p>\n          <table className=\"table table-striped table-responsive\">\n            <thead>\n              <tr>\n                <th><Translate content=\"gateway.routes.url\" /></th>\n                <th><Translate content=\"gateway.routes.service\" /></th>\n                <th><Translate content=\"gateway.routes.servers\" /></th>\n              </tr>\n            </thead>\n\n            <tbody>\n              {\n              routes.map((route, i) =>\n                <tr key={`gateway-${i}`}>\n                  <td>{route.path}</td>\n                  <td>{route.serviceId}</td>\n                  <td>\n                    {\n                      (route.serviceInstances && route.serviceInstances.length > 1) ?\n                        (\n                          <div className=\"label label-danger\" aria-hidden=\"true\"><Translate content=\"gateway.routes.error\" /></div>\n                        )\n                        :\n                        (\n                          <table className=\"tabletable-responsive\">\n                            <tbody>\n                              {route.serviceInstances.map((serviceInstance, j) =>\n                                <tr key={`gateway-instance-${j}`}>\n                                  <td>{serviceInstance.uri}</td>\n                                  {\n                                  serviceInstance.instanceInfo.status === 'UP' ?\n                                    <td><div className=\"label label-success\">{serviceInstance.instanceInfo.status}</div></td>\n                                    : <td ng-hide=\"true\" aria-hidden=\"true\"><div className=\"label label-danger\">UP</div></td>\n                                }\n                                </tr>\n                            )}\n                            </tbody>\n                          </table>\n                        )\n                    }\n                  </td>\n                </tr>\n              )\n            }\n            </tbody>\n          </table>\n        </div>\n      </div>\n    );\n  }\n}\n\nexport default connect(\n  ({ administration }) => ({ gateway: administration.gateway, isFetching: administration.isFetching }),\n  { gatewayRoutes }\n)(GatewayPage);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/health/health-detail/health-detail.js",
    "content": "import React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { hashHistory } from 'react-router';\n\nimport HealthModal from './health-modal';\n\nexport class Health extends Component {\n\n  static propTypes = {\n    isAuthenticated: PropTypes.bool.isRequired\n  };\n\n  constructor(props) {\n    super(props);\n    this.state = {\n      showModal: false\n    };\n  }\n\n  componentWillMount() {\n    this.setState({\n      showModal: true\n    });\n  }\n\n  componentWillReceiveProps(nextProps) {\n    this.setState({\n      showModal: !nextProps.isAuthenticated\n    });\n  }\n\n  handleClose = () => {\n    this.setState({ showModal: false });\n    hashHistory.push('/admin/health');\n  };\n\n  render() {\n    return (\n      <HealthModal showModal={this.state.showModal} handleClose={this.handleClose} health={this.props.health} />\n    );\n  }\n}\n\nexport default connect(({ administration }) => ({ health: administration.health, isFetching: administration.isFetching }))(Health);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/health/health-detail/health-modal.js",
    "content": "import React, { Component, PropTypes } from 'react';\nimport Dialog from 'material-ui/Dialog';\nimport FlatButton from 'material-ui/FlatButton';\nimport Translate from 'react-translate-component';\n\nimport { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';\n\nclass HealthModal extends Component {\n\n  static propTypes = {\n    handleClose: PropTypes.func.isRequired,\n    showModal: PropTypes.bool.isRequired\n  };\n\n  constructor(props, context) {\n    super(props, context);\n  }\n\n  render() {\n    const { handleClose, health } = this.props;\n    const showCheckboxes = false;\n    const actions = [\n      <FlatButton\n        label={<Translate content=\"entity.action.cancel\" />}\n        onTouchTap={handleClose}\n      />\n    ];\n    return (\n      <Dialog\n        title={<h3><Translate content=\"health.title\" /></h3>}\n        actions={actions}\n        modal autoScrollBodyContent\n        open={this.props.showModal}\n        onRequestClose={handleClose}\n      >\n        <h4>{health.name}</h4>\n        <div className=\"row\">\n          <div className=\"col-md-12\">\n            <Table>\n              <TableHeader\n                displaySelectAll={showCheckboxes}\n                adjustForCheckbox={showCheckboxes}\n              >\n                <TableRow>\n                  <TableHeaderColumn>Name</TableHeaderColumn>\n                  <TableHeaderColumn>Value</TableHeaderColumn>\n                </TableRow>\n              </TableHeader>\n              <TableBody displayRowCheckbox={showCheckboxes}>\n                {Object.keys(health.details).map((key, index) => (\n                  <TableRow key={index}>\n                    <TableRowColumn>{key}</TableRowColumn>\n                    <TableRowColumn>{health.details[key]}</TableRowColumn>\n                  </TableRow>\n                ))}\n              </TableBody>\n            </Table>\n          </div>\n        </div>\n      </Dialog>\n    );\n  }\n}\n\nexport default HealthModal;\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/health/health-detail/index.js",
    "content": "export const HealthRoute = {\n  path: 'admin/health-detail',\n  getComponent(nextState, cb) {\n    require.ensure([], (require) => {\n      cb(null, require('./health-detail'));\n    });\n  }\n};\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/health/health.js",
    "content": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { Link, hashHistory } from 'react-router';\nimport Translate from 'react-translate-component';\nimport RaisedButton from 'material-ui/RaisedButton';\nimport FlatButton from 'material-ui/FlatButton';\nimport { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';\nimport { NavigationRefresh, ImageRemoveRedEye } from 'material-ui/svg-icons';\n\nimport { systemHealth, systemHealthInfo } from '../../../reducers/administration';\n\nexport class HealthPage extends Component {\n\n  constructor(props) {\n    super(props);\n    this.getSystemHealth = this.getSystemHealth.bind(this);\n    this.getSystemHealthInfo = this.getSystemHealthInfo.bind(this);\n    this.transformHealthData = this.transformHealthData.bind(this);\n  }\n\n  componentDidMount() {\n    this.props.systemHealth();\n  }\n\n  getSystemHealth() {\n    if (!this.props.isFetching) {\n      this.props.systemHealth();\n    }\n  }\n\n  getSystemHealthInfo(healthObject) {\n    this.props.systemHealthInfo(healthObject);\n    hashHistory.push('/admin/health-detail');\n  }\n\n  getModuleName(path, name) {\n    let result;\n    if (path && name) {\n      result = path + this.separator + name;\n    } else if (path) {\n      result = path;\n    } else if (name) {\n      result = name;\n    } else {\n      result = '';\n    }\n    return result;\n  }\n\n  addHealthObject(result, isLeaf, healthObject, name) {\n    let status;\n    let error;\n    const healthData = {\n      name,\n      error,\n      status\n    };\n    const details = {};\n    let hasDetails = false;\n\n    Object.keys(healthObject).forEach((key) => {\n      if (healthObject[key]) {\n        const value = healthObject[key];\n        if (key === 'status' || key === 'error') {\n          healthData[key] = value;\n        } else {\n          if (!this.isHealthObject(value)) {\n            details[key] = value;\n            hasDetails = true;\n          }\n        }\n      }\n    });\n    // Add the details\n    if (hasDetails) {\n      healthData.details = details;\n    }\n    // Only add nodes if they provide additional information\n    if (isLeaf || hasDetails || healthData.error) {\n      result.push(healthData);\n    }\n    return healthData;\n  }\n\n  flattenHealthData(result, path, data): any {\n    Object.keys(data).forEach((key) => {\n      if (data[key]) {\n        const value = data[key];\n        if (this.isHealthObject(value)) {\n          if (this.hasSubSystem(value)) {\n            this.addHealthObject(result, false, value, this.getModuleName(path, key));\n            this.flattenHealthData(result, this.getModuleName(path, key), value);\n          } else {\n            this.addHealthObject(result, true, value, this.getModuleName(path, key));\n          }\n        }\n      }\n    });\n    return result;\n  }\n\n  transformHealthData(data) {\n    const response = [];\n    this.flattenHealthData(response, null, data);\n    return response;\n  }\n\n  getBaseName(name) {\n    if (name) {\n      const split = name.split('.');\n      return split[0];\n    }\n    return '';\n  }\n\n  getSubSystemName() {\n    if (this.name) {\n      const split = this.name.split('.');\n      split.splice(0, 1);\n      const remainder = split.join('.');\n      return remainder ? ` - ${remainder}` : '';\n    }\n    return '';\n  }\n\n  hasSubSystem(healthObject) {\n    let result = false;\n    Object.keys(healthObject).forEach((key) => {\n      if (healthObject[key]) {\n        const value = healthObject[key];\n        if (value && value.status) {\n          result = true;\n        }\n      }\n    });\n    return result;\n  }\n\n  isHealthObject(healthObject) {\n    let result = false;\n    Object.keys(healthObject).forEach((key) => {\n      if (healthObject[key]) {\n        if (key === 'status') {\n          result = true;\n        }\n      }\n    });\n    return result;\n  }\n\n  render() {\n    const { health, isFetching } = this.props;\n    const showCheckboxes = false;\n    const data = this.transformHealthData(health) || {};\n    return (\n      <div className=\"well\">\n        <div>\n          <h2 translate=\"health.title\">Health Checks</h2>\n          <p>\n            <RaisedButton\n              label={<Translate content=\"health.refresh.button\" />}\n              onClick={() => this.getSystemHealth()} primary\n              disabled={isFetching} icon={<NavigationRefresh />}\n            />\n          </p>\n          <hr />\n          <div className=\"row\">\n            <div className=\"col-sm-12\">\n              <Table>\n                <TableHeader\n                  displaySelectAll={showCheckboxes}\n                  adjustForCheckbox={showCheckboxes}\n                >\n                  <TableRow>\n                    <TableHeaderColumn>ServiceName</TableHeaderColumn>\n                    <TableHeaderColumn>Status</TableHeaderColumn>\n                    <TableHeaderColumn>Details</TableHeaderColumn>\n                  </TableRow>\n                </TableHeader>\n                <TableBody displayRowCheckbox={showCheckboxes}>\n                  {data.map((row, index) => (\n                    <TableRow key={index}>\n                      <TableRowColumn>{row.name}</TableRowColumn>\n                      <TableRowColumn>\n                        <RaisedButton\n                          label={row.status}\n                          primary={row.status === 'UP'}\n                          secondary={row.status !== 'UP'}\n                        />\n                      </TableRowColumn>\n                      <TableRowColumn>\n                        <FlatButton\n                          icon={<ImageRemoveRedEye />}\n                          onClick={() => this.getSystemHealthInfo(row)}\n                        />\n                      </TableRowColumn>\n                    </TableRow>\n                  ))}\n                </TableBody>\n              </Table>\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n\nexport default connect(\n  ({ administration }) => ({ health: administration.health, isFetching: administration.isFetching }),\n  { systemHealth, systemHealthInfo }\n)(HealthPage);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/logs/logs.js",
    "content": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport Translate from 'react-translate-component';\n\nimport { getLoggers, changeLogLevel } from '../../../reducers/administration';\n\nexport class LogsPage extends Component {\n\n  constructor(props) {\n    super(props);\n    this.getLogs = this.getLogs.bind(this);\n    this.changeLevel = this.changeLevel.bind(this);\n  }\n\n  componentDidMount() {\n    this.props.getLoggers();\n  }\n\n  getLogs() {\n    if (!this.props.isFetching) {\n      this.props.getLoggers();\n    }\n  }\n\n  changeLevel(loggerName, level) {\n    this.props.changeLogLevel(loggerName, level);\n  }\n\n  render() {\n    const { logs, isFetching } = this.props;\n    const loggers = logs ? logs.loggers : {};\n    return (\n\n      <div className=\"well ng-scope\">\n        <div className=\"table-responsive\">\n          <h2>Logs</h2>\n          <p>There are { loggers.length } loggers.</p>\n\n          <span>Filter</span>\n          <input type=\"text\" className=\"form-control\" disabled={isFetching} />\n\n          <table className=\"table table-condensed table-striped table-bordered\" >\n            <thead>\n              <tr title=\"click to order\">\n                <th><span>Name</span></th>\n                <th><span>Level</span></th>\n              </tr>\n            </thead>\n            <tbody>\n              {\n              loggers.map((logger, i) =>\n                <tr>\n                  <td><small>{logger.name}</small></td>\n                  <td>\n                    <button disabled={isFetching} onClick={() => this.changeLevel(logger.name, 'TRACE')} className={`btn btn-default btn-xs ${(logger.level == 'TRACE') ? 'btn-danger' : 'btn-default'}`}>TRACE</button>\n                    <button disabled={isFetching} onClick={() => this.changeLevel(logger.name, 'DEBUG')} className={`btn btn-default btn-xs ${(logger.level == 'DEBUG') ? 'btn-warning' : 'btn-default'}`}>DEBUG</button>\n                    <button disabled={isFetching} onClick={() => this.changeLevel(logger.name, 'INFO')} className={`btn btn-default btn-xs ${(logger.level == 'INFO') ? 'btn-info' : 'btn-default'}`}>INFO</button>\n                    <button disabled={isFetching} onClick={() => this.changeLevel(logger.name, 'WARN')} className={`btn btn-default btn-xs ${(logger.level == 'WARN') ? 'btn-success' : 'btn-default'}`}>WARN</button>\n                    <button disabled={isFetching} onClick={() => this.changeLevel(logger.name, 'ERROR')} className={`btn btn-default btn-xs ${(logger.level == 'WARN') ? 'btn-primary' : 'btn-default'}`}>ERROR</button>\n                  </td>\n                </tr>\n              )\n            }\n            </tbody>\n          </table>\n        </div>\n      </div>\n    );\n  }\n}\n\nexport default connect(\n  ({ administration }) => ({ logs: administration.logs, isFetching: administration.isFetching }),\n  { getLoggers, changeLogLevel }\n)(LogsPage);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/metrics/metrics-detail/index.js",
    "content": "export const MetricsRoute = {\n  path: 'admin/metrics-detail',\n  getComponent(nextState, cb) {\n    require.ensure([], (require) => {\n      cb(null, require('./metrics-detail'));\n    });\n  }\n};\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/metrics/metrics-detail/metrics-detail.js",
    "content": "import React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { hashHistory } from 'react-router';\n\nimport MetricsModal from './metrics-modal';\n\nexport class Metrics extends Component {\n\n  static propTypes = {\n    isAuthenticated: PropTypes.bool.isRequired\n  };\n\n  constructor(props) {\n    super(props);\n    this.state = {\n      showModal: false\n    };\n  }\n\n  componentWillMount() {\n    this.setState({\n      showModal: true\n    });\n  }\n\n  componentWillReceiveProps(nextProps) {\n    this.setState({\n      showModal: !nextProps.isAuthenticated\n    });\n  }\n\n  handleClose = () => {\n    this.setState({ showModal: false });\n    hashHistory.push('/admin/metrics');\n  };\n\n  render() {\n    return (\n      <MetricsModal showModal={this.state.showModal} handleClose={this.handleClose} threadDump={this.props.threadDump} />\n    );\n  }\n}\n\nexport default connect(({ administration }) => ({ threadDump: administration.threadDump, isFetching: administration.isFetching }))(Metrics);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/metrics/metrics-detail/metrics-modal.js",
    "content": "import React, { Component, PropTypes } from 'react';\nimport Dialog from 'material-ui/Dialog';\nimport FlatButton from 'material-ui/FlatButton';\nimport Translate from 'react-translate-component';\n\nimport { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';\n\nclass MetricsModal extends Component {\n\n  static propTypes = {\n    handleClose: PropTypes.func.isRequired,\n    showModal: PropTypes.bool.isRequired\n  };\n\n  constructor(props, context) {\n    super(props, context);\n  }\n\n  render() {\n    const { handleClose, threadDump } = this.props;\n    const showCheckboxes = false;\n    // FIX show / hide stacktrace function & filter & Labels\n    const actions = [\n      <FlatButton\n        label={<Translate content=\"entity.action.cancel\" />}\n        onTouchTap={handleClose}\n      />\n    ];\n    return (\n      <Dialog\n        title={<h3><Translate content=\"metrics.title\" /></h3>}\n        actions={actions}\n        modal autoScrollBodyContent\n        open={this.props.showModal}\n        onRequestClose={handleClose}\n      >\n        <div className=\"container\">\n          {threadDump.map(threadDumpInfo => (\n            <div>\n              <h5>{threadDumpInfo.threadState} {threadDumpInfo.threadName} (ID {threadDumpInfo.threadId})</h5>\n              <FlatButton\n                label=\"Show StackTrace\"\n                onTouchTap={() => this.setState({ showStack: !this.state.showStack })}\n              />\n              <div className=\"row\" >\n                <div className=\"col-md-12\">\n                  {Object.keys(threadDumpInfo.stackTrace).map((stK, stV) => (\n                    <p>\n                      {threadDumpInfo.stackTrace[stK].className}.{threadDumpInfo.stackTrace[stK].methodName}\n                      ({threadDumpInfo.stackTrace[stK].fileName}:{threadDumpInfo.stackTrace[stK].lineNumber})\n                    </p>\n                  ))}\n                </div>\n              </div>\n              <div className=\"row\">\n                <div className=\"col-md-12\">\n                  <Table>\n                    <TableHeader\n                      displaySelectAll={showCheckboxes}\n                      adjustForCheckbox={showCheckboxes}\n                    >\n                      <TableRow>\n                        <TableHeaderColumn>Blocked Time</TableHeaderColumn>\n                        <TableHeaderColumn>Blocked Count</TableHeaderColumn>\n                        <TableHeaderColumn>Waited Time</TableHeaderColumn>\n                        <TableHeaderColumn>Waited Count</TableHeaderColumn>\n                        <TableHeaderColumn>Lock Name</TableHeaderColumn>\n                      </TableRow>\n                    </TableHeader>\n                    <TableBody displayRowCheckbox={showCheckboxes}>\n                      <TableRow key={threadDumpInfo}>\n                        <TableRowColumn>{threadDumpInfo.blockedTime}</TableRowColumn>\n                        <TableRowColumn>{threadDumpInfo.blockedCount}</TableRowColumn>\n                        <TableRowColumn>{threadDumpInfo.waitedTime}</TableRowColumn>\n                        <TableRowColumn>{threadDumpInfo.waitedCount}</TableRowColumn>\n                        <TableRowColumn>{threadDumpInfo.lockName}</TableRowColumn>\n                      </TableRow>\n                    </TableBody>\n                  </Table>\n                </div>\n              </div>\n            </div>\n          ))}\n        </div>\n      </Dialog>\n    );\n  }\n}\n\nexport default MetricsModal;\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/metrics/metrics.js",
    "content": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { hashHistory } from 'react-router';\nimport LinearProgress from 'material-ui/LinearProgress';\nimport RaisedButton from 'material-ui/RaisedButton';\nimport FlatButton from 'material-ui/FlatButton';\nimport { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';\nimport { NavigationRefresh, ImageRemoveRedEye } from 'material-ui/svg-icons';\nimport Translate from 'react-translate-component';\nimport { systemMetrics, systemThreadDump } from '../../../reducers/administration';\n\nexport class MetricsPage extends Component {\n\n  constructor(props) {\n    super(props);\n    this.getMetrics = this.getMetrics.bind(this);\n    this.getStats = this.getStats.bind(this);\n    this.getThreadDump = this.getThreadDump.bind(this);\n  }\n\n  componentDidMount() {\n    this.props.systemMetrics();\n  }\n\n  getMetrics() {\n    if (!this.props.isFetching) {\n      this.props.systemMetrics();\n    }\n  }\n\n  getThreadDump() {\n    this.props.systemThreadDump();\n    hashHistory.push('/admin/metrics-detail');\n  }\n\n  getStats(metrics) {\n    const stat = {\n      servicesStats: {},\n      cachesStats: {}\n    };\n    if (!this.props.isFetching && metrics) {\n      Object.keys(metrics.timers).forEach((key, indexNm) => {\n        if (key.indexOf('web.rest') !== -1 || key.indexOf('service') !== -1) {\n          stat.servicesStats[key] = metrics.timers[key];\n        }\n        if (key.indexOf('net.sf.ehcache.Cache') !== -1) {\n          // remove gets or puts\n          const index = key.lastIndexOf('.');\n          const newKey = key.substr(0, index);\n          // Keep the name of the domain\n          stat.cachesStats[newKey] = {\n            name: newKey,\n            value: metrics.timers[key]\n          };\n        }\n      });\n      return stat;\n    }\n  }\n\n  render() {\n    const showCheckboxes = false;\n    const { metrics, isFetching } = this.props;\n    const data = metrics || {};\n    const { servicesStats, cachesStats } = this.getStats(data);\n    return (\n      <div className=\"well\">\n        <div>\n          <h2 translate=\"metrics.title\">Application Metrics</h2>\n          <p>\n            <RaisedButton\n              label={<Translate content=\"metrics.refresh.button\" />}\n              onClick={() => this.getMetrics()} primary\n              disabled={isFetching} icon={<NavigationRefresh />}\n            />\n          </p>\n          FIX ME Coloring the progressbar\n          <hr />\n          <div className=\"row\">\n            <div className=\"col-sm-12\">\n              <h3>JVM Metrics</h3>\n              <div className=\"row\">\n                <div className=\"col-md-4\">\n                  <b>Memory</b>\n                  <p>\n                    <span>Total Memory</span>\n                    ({metrics.gauges['jvm.memory.total.used'].value / 1000000 || 0}M / {metrics.gauges['jvm.memory.total.max'].value / 1000000 || 0}M)\n                  </p>\n                  <LinearProgress\n                    mode=\"determinate\"\n                    value={metrics.gauges['jvm.memory.total.used'].value}\n                    min=\"0\"\n                    max={metrics.gauges['jvm.memory.total.max'].value}\n                  />\n                  <span>{((metrics.gauges['jvm.memory.total.used'].value * 100) / metrics.gauges['jvm.memory.total.max'].value) || 0}%</span>\n\n                  <p>\n                    <span>Heap Memory</span>\n                    ({metrics.gauges['jvm.memory.heap.used'].value / 1000000 || 0}M / {metrics.gauges['jvm.memory.heap.max'].value / 1000000 || 0}M)\n                  </p>\n                  <LinearProgress\n                    mode=\"determinate\"\n                    min=\"0\"\n                    max={metrics.gauges['jvm.memory.heap.max'].value}\n                    value={metrics.gauges['jvm.memory.heap.used'].value}\n                  />\n                  <span>{((metrics.gauges['jvm.memory.heap.used'].value * 100) / metrics.gauges['jvm.memory.heap.max'].value) || 0}%</span>\n\n                  <p>\n                    <span>Non-Heap Memory</span>\n                    ({metrics.gauges['jvm.memory.non-heap.used'].value / 1000000 || 0}M / {metrics.gauges['jvm.memory.non-heap.committed'].value / 1000000 || 0}M)\n                  </p>\n                  <LinearProgress\n                    mode=\"determinate\"\n                    min=\"0\"\n                    max={metrics.gauges['jvm.memory.non-heap.committed'].value}\n                    value={metrics.gauges['jvm.memory.non-heap.used'].value}\n                  />\n                  <span>{((metrics.gauges['jvm.memory.non-heap.used'].value * 100) / metrics.gauges['jvm.memory.non-heap.committed'].value) || 0}%</span>\n                </div>\n                <div className=\"col-md-4\">\n                  <b>Threads</b> (Total: {metrics.gauges['jvm.threads.count'].value})\n                  <FlatButton\n                    icon={<ImageRemoveRedEye />}\n                    onClick={() => this.getThreadDump()}\n                  />\n                  <p><span>Runnable</span> {metrics.gauges['jvm.threads.runnable.count'].value}</p>\n                  <LinearProgress mode=\"determinate\" min=\"0\" value={metrics.gauges['jvm.threads.runnable.count'].value} max={metrics.gauges['jvm.threads.count'].value} />\n                  <span>{((metrics.gauges['jvm.threads.runnable.count'].value * 100) / metrics.gauges['jvm.threads.count'].value) || 0}%</span>\n\n                  <p><span>Timed Waiting</span> ({metrics.gauges['jvm.threads.timed_waiting.count'].value})</p>\n                  <LinearProgress mode=\"determinate\" min=\"0\" value={metrics.gauges['jvm.threads.timed_waiting.count'].value} max={metrics.gauges['jvm.threads.count'].value} />\n                  <span>{((metrics.gauges['jvm.threads.timed_waiting.count'].value * 100) / metrics.gauges['jvm.threads.count'].value) || 0}%</span>\n\n                  <p><span>Waiting</span> ({metrics.gauges['jvm.threads.waiting.count'].value})</p>\n                  <LinearProgress mode=\"determinate\" min=\"0\" value={metrics.gauges['jvm.threads.waiting.count'].value} max={metrics.gauges['jvm.threads.count'].value} />\n                  <span>{((metrics.gauges['jvm.threads.waiting.count'].value * 100) / metrics.gauges['jvm.threads.count'].value) || 0}%</span>\n\n                  <p><span>Blocked</span> ({metrics.gauges['jvm.threads.blocked.count'].value})</p>\n                  <LinearProgress mode=\"determinate\" min=\"0\" value={metrics.gauges['jvm.threads.blocked.count'].value} max={metrics.gauges['jvm.threads.count'].value} />\n                  <span>{((metrics.gauges['jvm.threads.blocked.count'].value * 100) / metrics.gauges['jvm.threads.count'].value) || 0}%</span>\n                </div>\n                <div className=\"col-md-4\">\n                  <b>Garbage collections</b>\n                  <div className=\"row\">\n                    <div className=\"col-md-9\">Mark Sweep count</div>\n                    <div className=\"col-md-3 text-right\">{metrics.gauges['jvm.garbage.PS-MarkSweep.count'].value}</div>\n                  </div>\n                  <div className=\"row\">\n                    <div className=\"col-md-9\">Mark Sweep time</div>\n                    <div className=\"col-md-3 text-right\">{metrics.gauges['jvm.garbage.PS-MarkSweep.time'].value}ms</div>\n                  </div>\n                  <div className=\"row\">\n                    <div className=\"col-md-9\">Scavenge count</div>\n                    <div className=\"col-md-3 text-right\">{metrics.gauges['jvm.garbage.PS-Scavenge.count'].value}</div>\n                  </div>\n                  <div className=\"row\">\n                    <div className=\"col-md-9\">Scavenge time</div>\n                    <div className=\"col-md-3 text-right\">{metrics.gauges['jvm.garbage.PS-Scavenge.time'].value}ms</div>\n                  </div>\n                </div>\n              </div>\n              <div className=\"row\">\n                <div className=\"col-sm-12\">\n                  <h3>HTTP requests (events per second)</h3>\n                  <p>\n                    <span>Active requests</span>\n                    <b>{metrics.counters['com.codahale.metrics.servlet.InstrumentedFilter.activeRequests'].count || 0}</b> -\n                    <span>Total requests</span> <b>{metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count || 0}</b>\n                  </p>\n                  <Table>\n                    <TableHeader\n                      displaySelectAll={showCheckboxes}\n                      adjustForCheckbox={showCheckboxes}\n                    >\n                      <TableRow>\n                        <TableHeaderColumn>Code</TableHeaderColumn>\n                        <TableHeaderColumn>Count</TableHeaderColumn>\n                        <TableHeaderColumn>Mean</TableHeaderColumn>\n                        <TableHeaderColumn><span>Average</span> (1 min)</TableHeaderColumn>\n                        <TableHeaderColumn><span>Average</span> (5 min)</TableHeaderColumn>\n                        <TableHeaderColumn><span>Average</span> (15 min)</TableHeaderColumn>\n                      </TableRow>\n                    </TableHeader>\n                    <TableBody displayRowCheckbox={showCheckboxes}>\n                      <TableRow key={0}>\n                        <TableRowColumn>OK</TableRowColumn>\n                        <TableRowColumn>\n                          <LinearProgress\n                            mode=\"determinate\"\n                            min=\"0\"\n                            max={metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count}\n                            value={metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].count}\n                          />\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].mean_rate || 2}\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m1_rate || 2}\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m5_rate || 2}\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m15_rate || 2}\n                        </TableRowColumn>\n                      </TableRow>\n                      <TableRow key={1}>\n                        <TableRowColumn>Not Found</TableRowColumn>\n                        <TableRowColumn>\n                          <LinearProgress\n                            mode=\"determinate\"\n                            min=\"0\"\n                            max={metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count}\n                            value={metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].count}\n                          />\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].mean_rate || 2}\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m1_rate || 2}\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m5_rate || 2}\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m15_rate || 2}\n                        </TableRowColumn>\n                      </TableRow>\n                      <TableRow key={2}>\n                        <TableRowColumn>Server Error</TableRowColumn>\n                        <TableRowColumn>\n                          <LinearProgress\n                            mode=\"determinate\"\n                            min=\"0\"\n                            max={metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count}\n                            value={metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].count}\n                          />\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].mean_rate || 2}\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m1_rate || 2}\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m5_rate || 2}\n                        </TableRowColumn>\n                        <TableRowColumn>\n                          {metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m15_rate || 2}\n                        </TableRowColumn>\n                      </TableRow>\n                    </TableBody>\n                  </Table>\n                </div>\n              </div>\n\n              <div className=\"row\">\n                <div className=\"col-sm-12\">\n                  <h3>Services statistics (time in millisecond)</h3>\n                  <Table>\n                    <TableHeader\n                      displaySelectAll={showCheckboxes}\n                      adjustForCheckbox={showCheckboxes}\n                    >\n                      <TableRow>\n                        <TableHeaderColumn>Name</TableHeaderColumn>\n                        <TableHeaderColumn>Count</TableHeaderColumn>\n                        <TableHeaderColumn>Mean</TableHeaderColumn>\n                        <TableHeaderColumn>Min</TableHeaderColumn>\n                        <TableHeaderColumn>p50</TableHeaderColumn>\n                        <TableHeaderColumn>p75</TableHeaderColumn>\n                        <TableHeaderColumn>p95</TableHeaderColumn>\n                        <TableHeaderColumn>p99</TableHeaderColumn>\n                        <TableHeaderColumn>Max</TableHeaderColumn>\n                      </TableRow>\n                    </TableHeader>\n                    <TableBody displayRowCheckbox={showCheckboxes}>\n                      {Object.keys(servicesStats).map((key, index) => (\n                        <TableRow key={key}>\n                          <TableRowColumn>{key}</TableRowColumn>\n                          <TableRowColumn>{servicesStats[key].count}</TableRowColumn>\n                          <TableRowColumn>{servicesStats[key].mean * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{servicesStats[key].min * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{servicesStats[key].p50 * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{servicesStats[key].p75 * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{servicesStats[key].p95 * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{servicesStats[key].p99 * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{servicesStats[key].max * 1000 || 0}</TableRowColumn>\n                        </TableRow>\n                      ))}\n                    </TableBody>\n                  </Table>\n                </div>\n              </div>\n              <div className=\"row\">\n                <div className=\"col-sm-12\">\n                  <h3>Ehcache statistics</h3>\n                  <Table>\n                    <TableHeader\n                      displaySelectAll={showCheckboxes}\n                      adjustForCheckbox={showCheckboxes}\n                    >\n                      <TableRow>\n                        <TableHeaderColumn>Cache Name</TableHeaderColumn>\n                        <TableHeaderColumn>Object</TableHeaderColumn>\n                        <TableHeaderColumn>Misses</TableHeaderColumn>\n                        <TableHeaderColumn>Eviction Count</TableHeaderColumn>\n                      </TableRow>\n                    </TableHeader>\n                    <TableBody displayRowCheckbox={showCheckboxes}>\n                      {Object.keys(cachesStats).map((k, v) => (\n                        <TableRow key={k}>\n                          <TableRowColumn>{cachesStats.k.name}</TableRowColumn>\n                          <TableRowColumn>{metrics.gauges[`${k}.objects`].value}</TableRowColumn>\n                          <TableRowColumn>{metrics.gauges[`${k}.hits`].value}</TableRowColumn>\n                          <TableRowColumn>{metrics.gauges[`${k}.misses`].value}</TableRowColumn>\n                          <TableRowColumn>{metrics.gauges[`${k}.eviction-count`].value}</TableRowColumn>\n                        </TableRow>\n                      ))}\n                    </TableBody>\n                  </Table>\n                </div>\n              </div>\n              { metrics.gauges['HikariPool-1.pool.TotalConnections'].value > 0 ?\n                <div className=\"row\">\n                  <div className=\"col-sm-12\">\n                    <h3>DataSource statistics (time in millisecond)</h3>\n                    <Table>\n                      <TableHeader\n                        displaySelectAll={showCheckboxes}\n                        adjustForCheckbox={showCheckboxes}\n                      >\n                        <TableRow>\n                          <TableHeaderColumn>\n                            <span>Usage</span>\n                            ({metrics.gauges['HikariPool-1.pool.ActiveConnections'].value} / {metrics.gauges['HikariPool-1.pool.TotalConnections'].value})\n                          </TableHeaderColumn>\n                          <TableHeaderColumn>Count</TableHeaderColumn>\n                          <TableHeaderColumn>Mean</TableHeaderColumn>\n                          <TableHeaderColumn>Min</TableHeaderColumn>\n                          <TableHeaderColumn>p50</TableHeaderColumn>\n                          <TableHeaderColumn>p75</TableHeaderColumn>\n                          <TableHeaderColumn>p95</TableHeaderColumn>\n                          <TableHeaderColumn>p99</TableHeaderColumn>\n                          <TableHeaderColumn>Max</TableHeaderColumn>\n                        </TableRow>\n                      </TableHeader>\n                      <TableBody displayRowCheckbox={showCheckboxes}>\n                        <TableRow key=\"DB\">\n                          <TableRowColumn>\n                            <LinearProgress\n                              mode=\"determinate\"\n                              min=\"0\"\n                              max={metrics.gauges['HikariPool-1.pool.TotalConnections'].value}\n                              value={metrics.gauges['HikariPool-1.pool.ActiveConnections'].value}\n                            />\n                            <span>{((metrics.gauges['HikariPool-1.pool.ActiveConnections'].value * 100) / metrics.gauges['HikariPool-1.pool.TotalConnections'].value) || 0}%</span>\n                          </TableRowColumn>\n                          <TableRowColumn>{metrics.histograms['HikariPool-1.pool.Usage'].count}</TableRowColumn>\n                          <TableRowColumn>{metrics.histograms['HikariPool-1.pool.Usage'].mean * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{metrics.histograms['HikariPool-1.pool.Usage'].min * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{metrics.histograms['HikariPool-1.pool.Usage'].p50 * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{metrics.histograms['HikariPool-1.pool.Usage'].p75 * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{metrics.histograms['HikariPool-1.pool.Usage'].p95 * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{metrics.histograms['HikariPool-1.pool.Usage'].p99 * 1000 || 0}</TableRowColumn>\n                          <TableRowColumn>{metrics.histograms['HikariPool-1.pool.Usage'].max * 1000 || 0}</TableRowColumn>\n                        </TableRow>\n                      </TableBody>\n                    </Table>\n                  </div>\n                </div>\n              : null }\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n}\n\nexport default connect(\n  ({ administration }) => ({ metrics: administration.metrics, isFetching: administration.isFetching }),\n  { systemMetrics, systemThreadDump }\n)(MetricsPage);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/administration/user-management/user-management.js",
    "content": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\nimport Translate from 'react-translate-component';\nimport { getUsers } from '../../../reducers/administration';\n\nexport class UserManagement extends Component {\n\n  constructor(props) {\n    super(props);\n    this.getUserList = this.getUserList.bind(this);\n  }\n\n  componentDidMount() {\n    this.props.getUsers();\n  }\n\n  getUserList() {\n    if (!this.props.isFetching) {\n      this.props.getUsers();\n    }\n  }\n\n  render() {\n    const { userManagement, isFetching } = this.props;\n    const users = (userManagement && userManagement.users) ? userManagement.users : [];\n    return (\n      <div className=\"well\">\n        <div>\n          <h2 data-translate=\"gateway.title\">Users</h2>\n          FIX ME datatable pagination, activate/deactivate, action buttons\n          <p>\n            <button type=\"button\" onClick={() => this.getUserList()} className={isFetching ? 'btn btn-danger' : 'btn btn-primary'} disabled={isFetching}>\n              <span className=\"glyphicon glyphicon-refresh glyphicon-\" />&nbsp;\n              <Translate component=\"span\" content=\"gateway.refresh.button\" />\n            </button>\n          </p>\n        </div>\n        <div className=\"table-responsive\">\n          <table className=\"table table-striped\">\n            <thead>\n              <tr jh-sort=\"vm.predicate\" ascending=\"vm.reverse\" callback=\"vm.transition()\">\n                <th jh-sort-by=\"id\"><span translate=\"global.field.id\">ID</span><span className=\"glyphicon glyphicon-sort\" /></th>\n                <th jh-sort-by=\"login\"><span translate=\"userManagement.login\">Login</span> <span className=\"glyphicon glyphicon-sort\" /></th>\n                <th jh-sort-by=\"email\"><span translate=\"userManagement.email\">Email</span> <span className=\"glyphicon glyphicon-sort\" /></th>\n                <th />\n                <th jh-sort-by=\"langKey\"> <span translate=\"userManagement.langKey\">Lang Key</span> <span className=\"glyphicon glyphicon-sort\" /></th>                                    <th><span translate=\"userManagement.profiles\">Profiles</span></th>                                    <th jh-sort-by=\"createdDate\"><span translate=\"userManagement.createdDate\">Created Date</span> <span className=\"glyphicon glyphicon-sort\" /></th>\n                <th jh-sort-by=\"lastModifiedBy\"><span translate=\"userManagement.lastModifiedBy\">Last Modified By</span> <span className=\"glyphicon glyphicon-sort\" /></th>\n                <th jh-sort-by=\"lastModifiedDate\"><span translate=\"userManagement.lastModifiedDate\">Last Modified Date</span> <span className=\"glyphicon glyphicon-sort\" /></th>\n                <th />\n              </tr>\n            </thead>\n            <tbody>\n              {\n              users.map((user, i) => (\n                <tr key={`user-${i}`}>\n                  <td><a>{user.id}</a></td>\n                  <td>{user.login}</td>\n                  <td>{user.email}</td>\n                  <td>\n                    {\n                      user.activated ? (\n                        <span\n                          className=\"label label-success\" ng-click=\"vm.setActive(user, false)\" ng-show=\"user.activated\"\n                          translate=\"userManagement.activated\" style={{ cursor: 'pointer' }}\n                        >Activated</span>\n                      ) : (\n                        <span\n                          className=\"label label-danger\" ng-click=\"vm.setActive(user, true)\" ng-show=\"!user.activated\"\n                          translate=\"userManagement.deactivated\" style={{ cursor: 'pointer' }}\n                        >Deactivated</span>\n                      )\n                    }\n                  </td>\n                  <td>{user.langKey}</td>\n                  <td>\n                    {\n                      users.authorities ? (\n                      users.authorities.map((authority, i) => (\n                        <div>\n                          <span className=\"label label-info\">{authority}</span>\n                        </div>\n                      ))) : null\n                    }\n                  </td>\n                  <td>{user.createdDate}</td>\n                  <td>{user.lastModifiedBy}</td>\n                  <td>{user.lastModifiedDate}</td>\n                  <td className=\"text-right\">\n                    <div className=\"btn-group flex-btn-group-container\">\n                      <button\n                        type=\"submit\"\n                        className=\"btn btn-info btn-sm\"\n                      >\n                        <span className=\"glyphicon glyphicon-eye-open\" />\n                        <span className=\"hidden-xs hidden-sm\" ><Translate content=\"entity.action.view\" /></span>\n                      </button>\n                      <button\n                        type=\"submit\"\n                        className=\"btn btn-primary btn-sm\"\n                      >\n                        <span className=\"glyphicon glyphicon-pencil\" />\n                        <span className=\"hidden-xs hidden-sm\"><Translate content=\"entity.action.edit\" /></span>\n                      </button>\n                      <button\n                        type=\"submit\"\n                        className=\"btn btn-danger btn-sm\" disabled={this.props.account.login === user.login}\n                      >\n                        <span className=\"glyphicon glyphicon-remove-circle\" />\n                        <span className=\"hidden-xs hidden-sm\"><Translate content=\"entity.action.delete\" /></span>\n                      </button>\n                    </div>\n                  </td>\n                </tr>\n              ))\n            }\n            </tbody>\n          </table>\n        </div>\n      </div>\n    );\n  }\n}\n\nexport default connect(\n  (state => ({ userManagement: state.administration.userManagement, isFetching: state.administration.isFetching, account: state.authentication.account })),\n  { getUsers }\n)(UserManagement);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/home/home.js",
    "content": "import React, { Component } from 'react';\nimport { Link } from 'react-router';\nimport Translate from 'react-translate-component';\nimport { connect } from 'react-redux';\n\nimport { log } from '../../shared/util/log-util';\nimport { getSession } from '../../reducers/authentication';\n\nimport './home.scss';\n\nexport class Home extends Component {\n  static propTypes = {\n    account: React.PropTypes.object.isRequired,\n    getSession: React.PropTypes.func.isRequired\n  };\n\n  constructor(props) {\n    super(props);\n    this.state = {\n      currentUser: props.account\n    };\n  }\n\n  componentWillMount() {\n    this.props.getSession();\n  }\n\n  componentWillReceiveProps(nextProps) {\n    this.setState({\n      currentUser: nextProps.account\n    });\n  }\n\n  render() {\n    const { currentUser } = this.state;\n\n    return (\n      <div className=\"row\">\n        <div className=\"col-md-9\">\n          <h2><Translate content=\"home.title\">Welcome, Java Hipster!</Translate></h2>\n          <p className=\"lead\"><Translate content=\"home.subtitle\">This is your homepage</Translate></p>\n          {\n            (currentUser && currentUser.login) ? (\n              <div>\n                <div className=\"alert alert-success\">\n                  <Translate content=\"home.logged.message\">You are logged in as user </Translate> &quot;{ currentUser.login }&quot;\n                </div>\n              </div>\n            ) : (\n              <div>\n                <div className=\"alert alert-warning\">\n                  <Translate content=\"global.messages.info.authenticated.prefix\">If you want to </Translate>\n                  <Link to=\"/login\" className=\"alert-link\"><Translate content=\"global.messages.info.authenticated.link\">sign in</Translate></Link>\n                  <Translate content=\"global.messages.info.authenticated.suffix\">, you can try the default accounts:\n                  <br />- Administrator (login=&quot;admin&quot; and password=&quot;admin&quot;)\n                  <br />- User (login=&quot;user&quot; and password=&quot;user&quot;).</Translate>\n                </div>\n\n                <div className=\"alert alert-warning\">\n                  <Translate content=\"global.messages.info.register.noaccount\">You do not have an account yet?</Translate>&nbsp;\n                  <a className=\"alert-link\"><Translate content=\"global.messages.info.register.link\">Register a new account</Translate></a>\n                </div>\n              </div>\n            )\n          }\n          <p>\n            <Translate content=\"home.question\">If you have any question on JHipster:</Translate>\n          </p>\n\n          <ul>\n            <li>\n              <a href=\"http://jhipster.github.io/\" target=\"_blank\" rel=\"noopener noreferrer\">\n                <Translate content=\"home.link.homepage\">JHipster homepage</Translate>\n              </a>\n            </li>\n            <li>\n              <a href=\"http://stackoverflow.com/tags/jhipster/info\" target=\"_blank\" rel=\"noopener noreferrer\">\n                <Translate content=\"home.link.stackoverflow\">JHipster on Stack Overflow</Translate>\n              </a>\n            </li>\n            <li>\n              <a href=\"https://github.com/jhipster/generator-jhipster/issues?state=open\" target=\"_blank\" rel=\"noopener noreferrer\">\n                <Translate content=\"home.link.bugtracker\">JHipster bug tracker</Translate>\n              </a>\n            </li>\n            <li>\n              <a href=\"https://gitter.im/jhipster/generator-jhipster\" target=\"_blank\" rel=\"noopener noreferrer\">\n                <Translate content=\"home.link.chat\">JHipster public chat room</Translate>\n              </a>\n            </li>\n            <li>\n              <a href=\"https://twitter.com/java_hipster\" target=\"_blank\" rel=\"noopener noreferrer\">\n                <Translate content=\"home.link.follow\">follow @java_hipster on Twitter</Translate>\n              </a>\n            </li>\n          </ul>\n\n          <p>\n            <span>If you like JHipster React, do not forget to give us a star on </span>\n            <a href=\"https://github.com/jhipster/generator-jhipster-react\" target=\"_blank\" rel=\"noopener noreferrer\">Github</a>!\n          </p>\n        </div>\n        <div className=\"col-md-3 pad\">\n          <span className=\"hipster img-fluid img-rounded\" />\n        </div>\n      </div>\n    );\n  }\n}\n\nexport default connect(\n  store => ({\n    account: store.authentication.account,\n    isAuthenticated: store.authentication.isAuthenticated\n  }),\n  { getSession }\n)(Home);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/home/home.scss",
    "content": "\n/* ==========================================================================\nMain page styles\n========================================================================== */\n.img-fluid {\n    max-width: 100%;\n    height: auto;\n}\n\n.hipster {\n    display: inline-block;\n    width: 347px;\n    height: 497px;\n    background: url(\"../../../static/images/logo-jhipster-react.svg\") no-repeat center top;\n    background-size: contain;\n}\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/home/index.js",
    "content": "export default {\n  /* Path not specified as this is the index route */\n  getComponent(nextState, cb) {\n    require.ensure([], (require) => {\n      cb(null, require('./home').default);\n    });\n  }\n};\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/login/index.js",
    "content": "export const LoginRoute = {\n  path: 'login',\n  getComponent(nextState, cb) {\n    require.ensure([], (require) => {\n      cb(null, require('./login'));\n    });\n  }\n};\n\nexport const LogoutRoute = {\n  path: 'logout',\n  onEnter(onLogout) {\n    onLogout();\n  },\n  getComponent(nextState, cb) {\n    require.ensure([], (require) => {\n      cb(null, require('./login'));\n    });\n  }\n};\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/login/login-modal.js",
    "content": "import React, { Component, PropTypes } from 'react';\nimport Dialog from 'material-ui/Dialog';\nimport FlatButton from 'material-ui/FlatButton';\nimport TextField from 'material-ui/TextField';\nimport Translate from 'react-translate-component';\n\nclass LoginModal extends Component {\n\n  static propTypes = {\n    authenticationError: PropTypes.bool,\n    handleLogin: PropTypes.func.isRequired,\n    handleClose: PropTypes.func.isRequired,\n    handleForgottenPass: PropTypes.func.isRequired,\n    handleRegister: PropTypes.func.isRequired,\n    showModal: PropTypes.bool.isRequired\n  };\n\n  static defaultProps = {\n    authenticationError: false\n  };\n\n  constructor(props, context) {\n    super(props, context);\n    this.handleSubmit = this.handleSubmit.bind(this);\n    this.handleUsernameChange = this.handleUsernameChange.bind(this);\n    this.handlePasswordChange = this.handlePasswordChange.bind(this);\n    this.state = {\n      username: null,\n      password: null\n    };\n  }\n\n  handleSubmit() {\n    const { handleLogin } = this.props;\n    const { username, password } = this.state;\n    handleLogin(username, password, false);  // FIXME remember me value must be passed\n  }\n\n  handleUsernameChange(event) {\n    this.setState({ username: event.target.value });\n  }\n\n  handlePasswordChange(event) {\n    this.setState({ password: event.target.value });\n  }\n\n  render() {\n    const { authenticationError, handleClose } = this.props;\n    const actions = [\n      <FlatButton\n        label={<Translate content=\"entity.action.cancel\" />}\n        onTouchTap={handleClose}\n      />,\n      <FlatButton\n        label={<Translate content=\"login.form.button\" />}\n        primary\n        keyboardFocused\n        onTouchTap={this.handleSubmit}\n      />\n    ];\n    return (\n      <Dialog\n        title={<h3><Translate content=\"login.title\" /></h3>}\n        actions={actions}\n        modal autoScrollBodyContent\n        open={this.props.showModal}\n        onRequestClose={handleClose}\n      >\n        <div className=\"row\">\n          <div className=\"col-md-12\">\n            { authenticationError ?\n              <div className=\"alert alert-danger\">\n                <strong>Failed to sign in!</strong> <Translate content=\"login.messages.error.authentication\" />\n              </div>\n              : null\n            }\n          </div>\n          <div className=\"col-md-12\">\n            <TextField\n              id=\"username\" name=\"username\" fullWidth\n              hintText=\"Username\"\n              floatingLabelText={<Translate content=\"global.form.username\" />}\n              floatingLabelFixed\n              onChange={this.handleUsernameChange}\n            /><br />\n            <TextField\n              id=\"password\" name=\"password\" fullWidth type=\"password\"\n              hintText=\"Password\"\n              floatingLabelText={<Translate content=\"login.form.password\" />}\n              floatingLabelFixed\n              onChange={this.handlePasswordChange}\n            /><br />\n            <p />\n            <div className=\"alert alert-warning\">\n              <a className=\"alert-link\" onClick={() => this.props.handleForgottenPass}><Translate content=\"login.password.forgot\" /></a>\n            </div>\n            <div className=\"alert alert-warning\">\n              You do not have an account yet?\n              <a className=\"alert-link\" onClick={() => this.props.handleRegister}><Translate content=\"global.messages.info.register.link\" /></a>\n            </div>\n          </div>\n        </div>\n      </Dialog>\n    );\n  }\n}\n\nexport default LoginModal;\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/modules/login/login.js",
    "content": "import React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { browserHistory } from 'react-router';\n\nimport LoginModal from './login-modal';\nimport { login } from '../../reducers/authentication';\n\nexport class Login extends Component {\n\n  static propTypes = {\n    login: PropTypes.func.isRequired,\n    isAuthenticated: PropTypes.bool.isRequired\n  };\n\n  constructor(props) {\n    super(props);\n    this.handleLogin = this.handleLogin.bind(this);\n    this.state = {\n      showModal: false\n    };\n  }\n\n  componentWillMount() {\n    this.setState({\n      showModal: !this.props.isAuthenticated\n    });\n  }\n\n  componentWillReceiveProps(nextProps) {\n    this.setState({\n      showModal: !nextProps.isAuthenticated\n    });\n  }\n\n  handleLogin(username, password, rememberMe = false) {\n    this.props.login(username, password, rememberMe);\n  }\n\n  handleClose = () => {\n    this.setState({ showModal: false });\n  };\n\n  render() {\n    return (\n      <LoginModal showModal={this.state.showModal} handleLogin={this.handleLogin} handleClose={this.handleClose} />\n    );\n  }\n}\n\nexport default connect(\n  store => ({ account: store.authentication.account, isAuthenticated: store.authentication.isAuthenticated }),\n  { login }\n)(Login);\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/reducers/account.js",
    "content": ""
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/reducers/administration.js",
    "content": "const FETCH = 'administration/FETCH';\nconst FETCH_SUCCESS = 'administration/FETCH_SUCCESS';\nconst FETCH_FAIL = 'administration/FETCH_FAIL';\nconst FETCH_GATEWAY_ROUTE = 'administration/FETCH_GATEWAY_ROUTE';\nconst FETCH_LOGS = 'administration/FETCH_LOGS';\nconst FETCH_LOGS_CHANGE_LEVEL = 'administration/FETCH_LOGS_CHANGE_LEVEL';\nconst FETCH_HEALTH = 'administration/FETCH_HEALTH';\nconst FETCH_HEALTH_INFO = 'administration/FETCH_HEALTH_INFO';\nconst FETCH_METRICS = 'administration/FETCH_METRICS';\nconst FETCH_THREAD_DUMP = 'administration/FETCH_THREAD_DUMP';\nconst FETCH_USERS = 'administration/FETCH_USERS';\nconst FETCH_CONFIGURATIONS = 'administration/FETCH_CONFIGURATIONS';\nconst FETCH_ENV = 'administration/FETCH_ENV';\nconst FETCH_AUDITS = 'administration/FETCH_AUDITS';\nconst FETCH_API_DOCS = 'administration/FETCH_API_DOCS';\n\nconst initialState = {\n  loading: false,\n  gateway: {\n    routes: []\n  },\n  logs: {\n    loggers: []\n  },\n  health: {\n\n  },\n  metrics: {\n\n  },\n  userManagement: {\n    users: []\n  },\n  configuration: {\n    configProps: {},\n    env: {}\n  },\n  audits: [],\n  apiDocs: {\n\n  }\n};\n\n// Reducer\n\nexport default function reducer(state = initialState, action) {\n  switch (action.type) {\n    case FETCH:\n      return {\n        ...state,\n        loading: true\n      };\n    case FETCH_SUCCESS:\n      return {\n        ...state,\n        loading: false\n      };\n    case FETCH_GATEWAY_ROUTE:\n      return {\n        ...state,\n        gateway: {\n          routes: action.result.data\n        },\n        loading: false\n      };\n    case FETCH_METRICS:\n      return {\n        ...state,\n        metrics: action.result.data,\n        loading: false\n      };\n    case FETCH_THREAD_DUMP:\n      return {\n        ...state,\n        threadDump: action.result.data,\n        loading: false\n      };\n    case FETCH_LOGS:\n      return {\n        ...state,\n        logs: {\n          loggers: action.result.data\n        },\n        loading: false\n      };\n    case FETCH_USERS:\n      return {\n        ...state,\n        userManagement: {\n          users: action.result.data\n        },\n        loading: false\n      };\n    case FETCH_CONFIGURATIONS:\n      return {\n        ...state,\n        configuration: {\n          ...state.configuration,\n          configProps: action.result.data\n        },\n        loading: false\n      };\n    case FETCH_ENV:\n      return {\n        ...state,\n        configuration: {\n          ...state.configuration,\n          env: action.result.data\n        },\n        loading: false\n      };\n    case FETCH_AUDITS:\n      return {\n        ...state,\n        audits: action.result.data,\n        loading: false\n      };\n    case FETCH_HEALTH:\n      return {\n        ...state,\n        health: action.result.data,\n        loading: false\n      };\n    case FETCH_HEALTH_INFO:\n      return {\n        ...state,\n        health: action.result,\n        loading: false\n      };\n    case FETCH_API_DOCS:\n      return {\n        ...state,\n        apiDocs: action.result.data,\n        loading: false\n      };\n    default:\n      return state;\n  }\n}\n\n// Actions\n\nexport function gatewayRoutes() {\n  return {\n    types: [FETCH, FETCH_GATEWAY_ROUTE, FETCH_FAIL],\n    promise: client => client.get('/api/gateway/routes')\n  };\n}\n\n\nexport function getLoggers() {\n  return {\n    types: [FETCH, FETCH_LOGS, FETCH_FAIL],\n    promise: client => client.get('/management/logs')\n  };\n}\n\nexport function systemHealth() {\n  return {\n    types: [FETCH, FETCH_HEALTH, FETCH_FAIL],\n    promise: client => client.get('/management/health')\n  };\n}\n\nexport function systemHealthInfo(healthObj) {\n  return {\n    types: [FETCH, FETCH_HEALTH_INFO, FETCH_FAIL],\n    promise: () => Promise.resolve(healthObj)\n  };\n}\n\nexport function systemMetrics() {\n  return {\n    types: [FETCH, FETCH_METRICS, FETCH_FAIL],\n    promise: client => client.get('/management/jhipster/metrics')\n  };\n}\n\nexport function systemThreadDump() {\n  return {\n    types: [FETCH, FETCH_THREAD_DUMP, FETCH_FAIL],\n    promise: client => client.get('/management/dump')\n  };\n}\n\nexport function changeLogLevel(name, level) {\n  const body = {\n    level,\n    name\n  };\n  return {\n    types: [FETCH, FETCH_LOGS_CHANGE_LEVEL, FETCH_FAIL],\n    promise: client => client.put('/management/jhipster/logs', body),\n    afterSuccess: dispatch => dispatch(getLoggers())\n  };\n}\n\nexport function getUsers(page = 0, size = 10, sort = 'id, asc') {\n  return {\n    types: [FETCH, FETCH_USERS, FETCH_FAIL],\n    promise: client => client.get(`/api/users?cacheBuster=${new Date().getTime()}&page=${page}&size=${size}&sort=${sort}`)\n  };\n}\n\nexport function getConfigurations() {\n  return {\n    types: [FETCH, FETCH_CONFIGURATIONS, FETCH_FAIL],\n    promise: client => client.get('/management/configprops')\n  };\n}\n\nexport function getEnv() {\n  return {\n    types: [FETCH, FETCH_ENV, FETCH_FAIL],\n    promise: client => client.get('/management/env')\n  };\n}\n\nexport function getAudits(fromDate, toDate, page = 0, size = 20) {\n  let requestUrl = `/management/jhipster/audits?page=${page}&size=${size}`;\n  if (toDate) {\n    requestUrl += `&toDate=${toDate}`;\n  }\n  if (fromDate) {\n    requestUrl += `&fromDate=${fromDate}`;\n  }\n  return {\n    types: [FETCH, FETCH_AUDITS, FETCH_FAIL],\n    promise: client => client.get(requestUrl)\n  };\n}\n\nexport function getApiDocs() {\n  return {\n    types: [FETCH, FETCH_API_DOCS, FETCH_FAIL],\n    promise: client => client.get('/v2/api-docs')\n  };\n}\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/reducers/authentication.js",
    "content": "import { hashHistory } from 'react-router';\n\nconst LOGIN = 'authentication/LOGIN';\nconst LOGIN_SUCCESS = 'authentication/LOGIN_SUCCESS';\nconst LOGIN_FAIL = 'authentication/LOGIN_FAIL';\n\nconst GET_SESSION = 'authentication/GET_SESSION';\nconst GET_SESSION_SUCCESS = 'authentication/GET_SESSION_SUCCESS';\nconst GET_SESSION_FAIL = 'authentication/GET_SESSION_FAIL';\n\nconst LOGOUT = 'authentication/LOGOUT';\nconst LOGOUT_SUCCESS = 'authentication/LOGOUT_SUCCESS';\nconst LOGOUT_FAIL = 'authentication/LOGOUT_FAIL';\n\nconst ERROR_MESSAGE = 'authentication/ERROR_MESSAGE';\n\nconst initialState = {\n  loading: false,\n  isAuthenticated: false,\n  account: {},\n  errorMessage: null, // Errors returned from server side\n  redirectMessage: null,\n  showModalLogin: false\n};\n\n// Reducer\n\nexport default function reducer(state = initialState, action) {\n  let isAuthenticated = false;\n  switch (action.type) {\n    case LOGIN:\n      return {\n        ...initialState,\n        loading: true\n      };\n    case LOGIN_SUCCESS:\n      return {\n        ...initialState,\n        isAuthenticated: true\n      };\n    case LOGIN_FAIL:\n      return {\n        ...initialState,\n        errorMessage: action.error.data\n      };\n    case LOGOUT_SUCCESS:\n      return {\n        ...initialState\n      };\n    case GET_SESSION:\n      return {\n        ...state,\n        loading: true\n      };\n    case GET_SESSION_SUCCESS:\n      isAuthenticated = action.result.data ? action.result.data.activated : false;\n      return {\n        ...initialState,\n        isAuthenticated,\n        account: action.result.data\n      };\n    case GET_SESSION_FAIL:\n      return {\n        ...initialState,\n        errorMessage: action.error.data\n      };\n    case ERROR_MESSAGE:\n      return {\n        ...initialState,\n        redirectMessage: action.message\n      };\n    default:\n      return state;\n  }\n}\n\nexport function displayAuthError(message) {\n  return { type: ERROR_MESSAGE, message };\n}\n\nexport function getSession() {\n  return {\n    types: [GET_SESSION, GET_SESSION_SUCCESS, GET_SESSION_FAIL],\n    promise: client => client.get('/api/account')\n  };\n}\n\nexport function clearAuthToken() {\n  if (localStorage.getItem('jhi-authenticationToken')) {\n    localStorage.removeItem('jhi-authenticationToken');\n  }\n  if (sessionStorage.getItem('jhi-authenticationToken')) {\n    sessionStorage.removeItem('jhi-authenticationToken');\n  }\n}\n\n<%_ if (authenticationType === 'oauth2') { _%>\nexport function login(username, password, rememberMe = false) {\n  const data = `username=${encodeURIComponent(username)}&password=${\n      encodeURIComponent(password)}&grant_type=password&scope=read%20write&` +\n      'client_secret=my-secret-token-to-change-in-production&client_id=<%= baseName%>app';\n  const headers = {\n      'Content-Type': 'application/x-www-form-urlencoded',\n      'Accept': 'application/json',\n      'Authorization': 'Basic ' + this.base64.encode('<%= baseName%>app' + ':' + 'my-secret-token-to-change-in-production')\n  };\n\n  return {\n    types: [LOGIN, LOGIN_SUCCESS, LOGIN_FAIL],\n    promise: client => client.post('oauth/token', data, { headers: headers }),\n    afterSuccess: (dispatch, getState, response) => {\n      const expiredAt = new Date();\n      expiredAt.setSeconds(expiredAt.getSeconds() + response.expires_in);\n      response.expires_at = expiredAt.getTime();\n      localStorage.setItem('jhi-authenticationToken', response);\n      const routingState = getState().routing.locationBeforeTransitions.state || {};\n      hashHistory.push(routingState.nextPathname || '/');\n      dispatch(getSession());\n    }\n  };\n}\n\nexport function logout() {\n  return {\n    types: [LOGOUT, LOGOUT_SUCCESS, LOGOUT_FAIL],\n    promise: client => client.post('/api/logout', {}),\n    afterSuccess: () => {\n      clearAuthToken();\n      hashHistory.push('/');\n    }\n  };\n}\n<%_ } else if (authenticationType === 'jwt') { _%>\nexport function login(username, password, rememberMe = false) {\n  return {\n    types: [LOGIN, LOGIN_SUCCESS, LOGIN_FAIL],\n    promise: client => client.post('/api/authenticate', { username, password, rememberMe }),\n    afterSuccess: (dispatch, getState, response) => {\n      const bearerToken = response.headers.authorization;\n      if (bearerToken && bearerToken.slice(0, 7) === 'Bearer ') {\n        const jwt = bearerToken.slice(7, bearerToken.length);\n        if (rememberMe) {\n          localStorage.setItem('jhi-authenticationToken', jwt);\n        } else {\n          sessionStorage.setItem('jhi-authenticationToken', jwt);\n        }\n      }\n      const routingState = getState().routing.locationBeforeTransitions.state || {};\n      hashHistory.push(routingState.nextPathname || '/');\n      dispatch(getSession());\n    }\n  };\n}\n\nexport function logout() {\n  return {\n    types: [LOGOUT, LOGOUT_SUCCESS, LOGOUT_FAIL],\n    promise: client => client.get('/api/account'),\n    afterSuccess: () => {\n      clearAuthToken();\n      hashHistory.push('/');\n    }\n  };\n}\n<%_ } else if (authenticationType === 'session') { _%>\nexport function login(username, password, rememberMe = false) {\n  const data = `j_username=${encodeURIComponent(username)\n      }&j_password=${encodeURIComponent(password)\n      }&remember-me=${rememberMe}&submit=Login`;\n  const headers = {\n    'Content-Type': 'application/x-www-form-urlencoded'\n  };\n  return {\n    types: [LOGIN, LOGIN_SUCCESS, LOGIN_FAIL],\n    promise: client => client.post('/api/authentication', data, { headers }),\n    afterSuccess: (dispatch, getState, response) => {\n      const routingState = getState().routing.locationBeforeTransitions.state || {};\n      hashHistory.push(routingState.nextPathname || '/');\n      dispatch(getSession());\n    }\n  };\n}\n\nexport function logout() {\n  return {\n    types: [LOGOUT, LOGOUT_SUCCESS, LOGOUT_FAIL],\n    promise: client => client.post('/api/logout', {}),\n    afterSuccess: (dispatch, getState, response) => {\n      dispatch(getSession());\n      hashHistory.push('/');\n    }\n  };\n}\n<%_ } _%>\n\nexport function redirectToLoginWithMessage(messageKey) {\n  return (dispatch, getState) => {\n    dispatch(displayAuthError(messageKey));\n    let currentPath = getState().routing.locationBeforeTransitions.pathname;\n    if (currentPath === '/login') {\n      currentPath = getState().routing.locationBeforeTransitions.state.nextPathname || '/';\n    }\n    hashHistory.replace({\n      pathname: '/login',\n      state: { nextPathname: currentPath }\n    });\n  };\n}\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/reducers/index.js",
    "content": "import { combineReducers } from 'redux';\nimport { routerReducer as routing } from 'react-router-redux';\n\nimport locale from './locale';\nimport authentication from './authentication';\nimport administration from './administration';\n\nexport default combineReducers({\n  authentication,\n  locale,\n  routing,\n  administration\n});\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/reducers/locale.js",
    "content": "const SET_LOCALE = 'locale/SET_LOCALE';\n\nexport default function reducer(state = { locale: '<%= nativeLanguage %>' }, action) {\n  switch (action.type) {\n    case SET_LOCALE:\n      return {\n        currentLocale: action.locale\n      };\n    default:\n      return state;\n  }\n}\n\nexport function setLocale(locale) {\n  return {\n    type: SET_LOCALE,\n    locale\n  };\n}\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/routes.js",
    "content": "import React from 'react';\nimport { Route, IndexRoute } from 'react-router';\n\nimport AppComponent from './app';\nimport PrivateRoute from './shared/components/private-route/private-route';\n\nif (typeof require.ensure !== 'function') {\n  require.ensure = function requireModule(deps, callback) {\n    callback(require);\n  };\n}\n\nif (process.env.NODE_ENV !== 'production') {\n  /* eslint-disable */\n  // Require async routes only in development for react-hot-reloader to work.\n  require('./modules/home/home');\n  require('./modules/login/login');\n  // require('./modules/account/settings');\n  // require('./modules/account/password');\n  // require('./modules/administration/gateway/gateway');\n  require('./modules/administration/logs/logs');\n  require('./modules/administration/health/health');\n  require('./modules/administration/metrics/metrics');\n  // require('./modules/administration/user-management/user-management');\n  require('./modules/administration/configuration/configuration');\n  require('./modules/administration/audits/audits');\n  require('./modules/administration/docs/docs');\n  /* eslint-enable */\n}\n\n// react-router setup with code-splitting\n// More info: http://blog.mxstbr.com/2016/01/react-apps-with-pages/\nexport default (onLogout) => {\n  return (\n    <Route path=\"/\" component={AppComponent}>\n      <IndexRoute\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, require('./modules/home/home').default);\n          });\n        }}\n      />\n      <Route\n        path=\"/login\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, require('./modules/login/login').default);\n          });\n        }}\n      />\n      <Route\n        path=\"/logout\"\n        onEnter={onLogout}\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, require('./modules/login/login').default);\n          });\n        }}\n      />\n      {/*\n      <Route\n        path=\"/account/settings\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, PrivateRoute(require('./modules/account/settings/settings').default));\n          });\n        }}\n      />\n      <Route\n        path=\"/account/password\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, PrivateRoute(require('./modules/account/password/password').default));\n          });\n        }}\n      />\n      <Route\n        path=\"/admin/gateway\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, PrivateRoute(require('./modules/administration/gateway/gateway').default));\n          });\n        }}\n      />\n      <Route\n        path=\"/admin/user-management\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, PrivateRoute(require('./modules/administration/user-management/user-management').default));\n          });\n        }}\n      />\n      */}\n      <Route\n        path=\"/admin/metrics\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, PrivateRoute(require('./modules/administration/metrics/metrics').default));\n          });\n        }}\n      />\n      <Route\n        path=\"/admin/metrics-detail\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, require('./modules/administration/metrics/metrics-detail/metrics-detail').default);\n          });\n        }}\n      />\n      <Route\n        path=\"/admin/health\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, PrivateRoute(require('./modules/administration/health/health').default));\n          });\n        }}\n      />\n      <Route\n        path=\"/admin/health-detail\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, require('./modules/administration/health/health-detail/health-detail').default);\n          });\n        }}\n      />\n      <Route\n        path=\"/admin/configuration\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, PrivateRoute(require('./modules/administration/configuration/configuration').default));\n          });\n        }}\n      />\n      <Route\n        path=\"/admin/audits\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, PrivateRoute(require('./modules/administration/audits/audits').default));\n          });\n        }}\n      />\n      <Route\n        path=\"/admin/logs\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, PrivateRoute(require('./modules/administration/logs/logs').default));\n          });\n        }}\n      />\n      <Route\n        path=\"/admin/docs\"\n        getComponent={(nextState, cb) => {\n          require.ensure([], (require) => {\n            cb(null, PrivateRoute(require('./modules/administration/docs/docs').default));\n          });\n        }}\n      />\n    </Route>\n  );\n};\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/shared/components/footer/footer.js",
    "content": "import React, { Component } from 'react';\nimport Translate from 'react-translate-component';\n\nexport default class Footer extends Component {\n  render() {\n    return (\n      <div className=\"footer container\">\n        <div className=\"row\">\n          <p className=\"col-md-12\"><Translate content=\"footer\">My footer</Translate></p>\n        </div>\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/shared/components/header/header.js",
    "content": "import React, { Component, PropTypes } from 'react';\nimport Translate from 'react-translate-component';\nimport AppBar from 'material-ui/AppBar';\nimport Drawer from 'material-ui/Drawer';\nimport { List, ListItem } from 'material-ui/List';\nimport Subheader from 'material-ui/Subheader';\nimport MenuItem from 'material-ui/MenuItem';\nimport DropDownMenu from 'material-ui/DropDownMenu';\nimport {\n  ActionHome, ActionList, ActionVerifiedUser, DeviceAccessTime,\n  ActionSettings, ActionLock, ActionNoteAdd,\n  ActionExitToApp, CommunicationVpnKey,\n  SocialPersonAdd, SocialGroup, ActionAssessment,\n  ActionFavorite, ActionBuild, AlertAddAlert,\n  ActionAssignment, AvLibraryBooks\n} from 'material-ui/svg-icons';\nimport { Link } from 'react-router';\n\nimport { locales } from '../../../config/translation';\nimport appConfig from '../../../config/constants';\nimport { HEADER_COLOR } from '../../util/global-style';\n\nimport './header.scss';\n\nexport default class Header extends Component {\n  static propTypes = {\n    isAuthenticated: PropTypes.bool.isRequired,\n    currentLocale: PropTypes.string.isRequired,\n    handleLogout: PropTypes.func.isRequired,\n    onLocaleChange: PropTypes.func.isRequired\n  };\n\n  constructor(props) {\n    super(props);\n    this.state = {\n      sidebarOpen: false\n    };\n  }\n  <%_ if (enableTranslation) { _%>\n  handleChange = (event, index, language) => {\n    this.props.onLocaleChange(language);\n  };\n  <%_ } _%>\n\n  toggleSideBar = () => {\n    this.setState({\n      sidebarOpen: !this.state.sidebarOpen\n    });\n  }\n\n  render() {\n    const { currentLocale, isAuthenticated, handleLogout } = this.props;\n    const menuListStyle = { marginLeft: 18 };\n\n    let menuItemAccountLogin = (\n      <Link to=\"/login\">\n        <ListItem\n          key={2.1} innerDivStyle={menuListStyle}\n          primaryText={<Translate content=\"global.menu.account.login\" />}\n          leftIcon={<ActionLock />}\n        />\n      </Link>\n    );\n    let menuItemAccountRegister = (\n      <Link to=\"/register\">\n        <ListItem\n          key={2.2} innerDivStyle={menuListStyle}\n          primaryText={<Translate content=\"global.menu.account.register\" />}\n          leftIcon={<ActionNoteAdd />}\n        />\n      </Link>\n    );\n\n    let menuItemEntities = null;\n\n    let menuItemAccountSettings = null;\n    let menuItemAccountPassword = null;\n    let menuItemAccountSignOut = null;\n    let menuItemAdministration = null;\n\n    if (isAuthenticated) {\n      menuItemEntities = (\n        <ListItem\n          primaryText={<Translate content=\"global.menu.entities.main\" />}\n          leftIcon={<ActionList />}\n          initiallyOpen={false}\n          primaryTogglesNestedList\n          nestedItems={[\n          ]}\n        />\n      );\n\n      menuItemAccountLogin = null;\n      menuItemAccountRegister = null;\n      menuItemAccountSettings = (\n        <Link to=\"/account/settings\">\n          <ListItem\n            key={2.3} innerDivStyle={menuListStyle}\n            primaryText={<Translate content=\"global.menu.account.settings\" />}\n            leftIcon={<ActionSettings />}\n          />\n        </Link>\n      );\n      menuItemAccountPassword = (\n        <Link to=\"/account/password\">\n          <ListItem\n            key={2.4} innerDivStyle={menuListStyle}\n            primaryText={<Translate content=\"global.menu.account.password\" />}\n            leftIcon={<CommunicationVpnKey />}\n          />\n        </Link>\n      );\n      menuItemAccountSignOut = (\n        <ListItem\n          key={2.5} onClick={() => handleLogout()} innerDivStyle={menuListStyle}\n          primaryText={<Translate content=\"global.menu.account.logout\" />}\n          leftIcon={<ActionExitToApp />}\n        />\n      );\n\n      menuItemAdministration = (\n        <ListItem\n          key={4}\n          primaryText={<Translate content=\"global.menu.admin.main\" />}\n          leftIcon={<SocialPersonAdd />}\n          initiallyOpen={false}\n          primaryTogglesNestedList\n          nestedItems={[\n            <%_ if (applicationType === 'gateway') { _%>\n            <Link to=\"/admin/gateway\">\n              <ListItem\n                key={4.1} innerDivStyle={menuListStyle}\n                primaryText={<Translate content=\"global.menu.admin.gateway\" />}\n                leftIcon={<ActionHome />}\n              />\n            </Link>\n            <%_ } _%>\n            <Link to=\"/admin/user-management\">\n              <ListItem\n                key={4.2} innerDivStyle={menuListStyle}\n                leftIcon={<SocialGroup />}\n                primaryText={<Translate content=\"global.menu.admin.userManagement\" />}\n              />\n            </Link>,\n            <Link to=\"/admin/metrics\">\n              <ListItem\n                key={4.3} innerDivStyle={menuListStyle}\n                leftIcon={<ActionAssessment />}\n                primaryText={<Translate content=\"global.menu.admin.metrics\" />}\n              />\n            </Link>,\n            <Link to=\"/admin/health\">\n              <ListItem\n                key={4.4} innerDivStyle={menuListStyle}\n                leftIcon={<ActionFavorite />}\n                primaryText={<Translate content=\"global.menu.admin.health\" />}\n              />\n            </Link>,\n            <%_ if (websocket == 'spring-websocket') { _%>\n              // TODO\n            <%_ } _%>\n            <Link to=\"/admin/configuration\">\n              <ListItem\n                key={4.5} innerDivStyle={menuListStyle}\n                leftIcon={<ActionBuild />}\n                primaryText={<Translate content=\"global.menu.admin.configuration\" />}\n              />\n            </Link>,\n            <Link to=\"/admin/audits\">\n              <ListItem\n                key={4.6} innerDivStyle={menuListStyle}\n                leftIcon={<AlertAddAlert />}\n                primaryText={<Translate content=\"global.menu.admin.audits\" />}\n              />\n            </Link>,\n            <Link to=\"/admin/logs\">\n              <ListItem\n                key={4.7} innerDivStyle={menuListStyle}\n                leftIcon={<ActionAssignment />}\n                primaryText={<Translate content=\"global.menu.admin.logs\" />}\n              />\n            </Link>,\n            <Link to=\"/admin/docs\">\n              <ListItem\n                key={4.8} innerDivStyle={menuListStyle}\n                leftIcon={<AvLibraryBooks />}\n                primaryText={<Translate content=\"global.menu.admin.apidocs\" />}\n              />\n            </Link><% if (devDatabaseType === 'h2Disk' || devDatabaseType === 'h2Memory') { %>,\n            <a href=\"/h2-console\">\n              <ListItem\n                key={4.9} innerDivStyle={menuListStyle}\n                leftIcon={<AvLibraryBooks />}\n                primaryText={<Translate content=\"global.menu.admin.database\" />}\n              />\n            </a>\n            <%_ } _%>\n          ]}\n        />\n      );\n    }\n\n    return (\n      <div>\n        <div className=\"ribbon dev\"><a href=\"\"><Translate content=\"global.ribbon.dev\" /></a></div>\n        <AppBar\n          title={\n            <div>\n              <Link to=\"/\" className=\"brand-logo\">\n                <span className=\"brand-title\"><Translate content=\"global.title\"><%= capitalizedBaseName %></Translate></span>\n                <span className=\"navbar-version\">{appConfig.version}</span>\n              </Link>\n            </div>\n          }\n          onLeftIconButtonTouchTap={this.toggleSideBar}\n          <%_ if (enableTranslation) { _%>\n          iconElementRight={\n            <DropDownMenu value={currentLocale} onChange={this.handleChange} underlineStyle={{ borderTop: 'none' }} labelStyle={{ color: HEADER_COLOR }}>\n              {locales.map(lang => <MenuItem key={lang} value={lang} primaryText={lang.toUpperCase()} />)}\n            </DropDownMenu>\n          }\n          <%_ } _%>\n        />\n        <Drawer open={this.state.sidebarOpen} docked={false} onRequestChange={sidebarOpen => this.setState({ sidebarOpen })}>\n          <List>\n            <Subheader>Application Menu</Subheader>\n            <Link to=\"/\"><ListItem primaryText={<Translate content=\"global.menu.home\" />} leftIcon={<ActionHome />} /></Link>\n            {menuItemEntities}\n            {menuItemAdministration}\n            <ListItem\n              primaryText={<Translate content=\"global.menu.account.main\" />}\n              leftIcon={<ActionLock />}\n              initiallyOpen={false}\n              primaryTogglesNestedList key={2}\n              nestedItems={[\n                menuItemAccountLogin,\n                menuItemAccountRegister,\n                menuItemAccountSettings,\n                <%_ if (authenticationType == 'session') { _%>\n                  // TODO\n                <%_ } _%>\n                menuItemAccountPassword,\n                menuItemAccountSignOut\n              ]}\n            />\n          </List>\n        </Drawer>\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/shared/components/header/header.scss",
    "content": "@import '../../variables';\n\n/* ==========================================================================\nDevelopement Ribbon\n========================================================================== */\n.ribbon {\n    background-color: rgba(170, 0, 0, 0.5);\n    left: -3.5em;\n    -moz-transform: rotate(45deg);\n    -ms-transform: rotate(45deg);\n    -o-transform: rotate(45deg);\n    -webkit-transform: rotate(45deg);\n    transform: rotate(45deg);\n    overflow: hidden;\n    position: absolute;\n    bottom: 40px;\n    white-space: nowrap;\n    width: 15em;\n    z-index: 99999;\n    pointer-events: none;\n    opacity: 0.75;\n    a {\n        color: #fff;\n        display: block;\n        font-weight: 400;\n        margin: 1px 0;\n        padding: 10px 50px;\n        text-align: center;\n        text-decoration: none;\n        text-shadow: 0 0 5px #444;\n        pointer-events: none;\n    }\n}\n\n/* ==========================================================================\nNavbar styles\n========================================================================== */\n.navbar-version {\n  font-size: 10px;\n  color: $header-color-secondary;\n  padding: 0 0 0 10px;\n}\n\n.brand-logo:hover {\n  text-decoration: none;\n}\n\n.brand-title {\n  color: $header-color;\n  &:hover {\n    color: $header-color-hover;\n    text-decoration: none;\n  }\n}\n\n.logo .logo-img {\n  height: 45px;\n  display: inline-block;\n}\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/shared/components/private-route/private-route.js",
    "content": "import React, { PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router';\n\nimport { redirectToLoginWithMessage, getSession } from '../../../reducers/authentication';\n\nconst mapStoreToProps = store => ({\n  loading: store.authentication.loading,\n  isAuthenticated: store.authentication.isAuthenticated\n});\nconst mapDispatchToProps = {\n  redirectToLoginWithMessage,\n  getSession\n};\n\nconst privateRoute = Wrapped => connect(mapStoreToProps, mapDispatchToProps)(class extends React.Component {\n  static propTypes = {\n    getSession: PropTypes.func.isRequired,\n    redirectToLoginWithMessage: PropTypes.func.isRequired,\n    loading: PropTypes.bool.isRequired,\n    isAuthenticated: PropTypes.bool.isRequired\n  }\n\n  componentDidMount() {\n    this.props.getSession();\n    // this.redirectIfNotLogged(this.props);\n  }\n\n  componentWillReceiveProps(nextProps) {\n    // this.redirectIfNotLogged(nextProps);\n  }\n\n  // redirectIfNotLogged(props) {\n  //   const { loading, isAuthenticated } = props;\n  //   if (loading === false && !isAuthenticated) {\n  //     // TODO fix issue with authentication redirect\n  //     this.props.redirectToLoginWithMessage('login.messages.error.authentication');\n  //   }\n  // }\n\n  render() {\n    const { loading, isAuthenticated } = this.props;\n    if (loading && !isAuthenticated) {\n      return (\n        <div className=\"center loader\">\n          <div>Loading...</div>\n          <div>You are not authorized to view this page... <Link to=\"/login\" className=\"alert-link\">sign in</Link></div>\n        </div>\n      );\n    }\n\n    return <Wrapped {...this.props} />;\n  }\n});\n\nexport default privateRoute;\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/shared/interceptors/axios.js",
    "content": "import axios from 'axios';\nimport { logError } from '../util/log-util';\n\nconst TIMEOUT = 10000;\nconst setupAxiosInterceptors = (onUnauthenticated, clearAuthToken) => {\n  const onRequestSuccess = (config) => {\n    <%_ if (authenticationType === 'oauth2') { _%>\n    const token = localStorage.getItem('jhi-authenticationToken') || sessionStorage.getItem('jhi-authenticationToken');\n    if (token && token.expires_at && token.expires_at > new Date().getTime()) {\n      config.headers.Authorization = `Bearer ${token.access_token}`;\n    }\n    <%_ } else if (authenticationType === 'jwt' || authenticationType === 'uaa') { _%>\n    const token = localStorage.getItem('jhi-authenticationToken') || sessionStorage.getItem('jhi-authenticationToken');\n    if (token) {\n      config.headers.Authorization = `Bearer ${token}`;\n    }\n    <%_ } _%>\n    config.timeout = TIMEOUT;\n    return config;\n  };\n  const onResponseSuccess = response => response;\n  const onResponseError = (err) => {\n    logError(err);\n    const status = err.status || err.response.status;\n    if (status === 403 || status === 401) {\n      clearAuthToken();\n      onUnauthenticated();\n    }\n    return Promise.reject(err);\n  };\n  axios.interceptors.request.use(onRequestSuccess);\n  axios.interceptors.response.use(onResponseSuccess, onResponseError);\n};\n\nexport default setupAxiosInterceptors;\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/shared/util/global-style.js",
    "content": "export const HEADER_COLOR = '#FFFFFF';\nexport const HEADER_COLOR_SECONDARY = '#CCCCCC';\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/shared/util/log-util.js",
    "content": "const enableLog = true;\n\nexport const log = (msg, data = '') => {\n  if (enableLog) console.info(msg, data);\n};\n\nexport const logError = (msg, data = '') => {\n  if (enableLog) console.error(msg, data);\n};\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/app/shared/variables.scss",
    "content": "$header-color: #fafafa;\n$header-color-secondary: #635f5f;\n$header-color-hover: lighten( $header-color, 100% );\n$text-color: #333;\n\n$side-dock-size: 65px;\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/index.html",
    "content": "<!doctype html>\n<html class=\"no-js\">\n<head>\n    <base href=\"/\" />\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <title><%= baseName %></title>\n    <meta name=\"description\" content=\"\"><% if (enableTranslation) { %>\n    <meta name=\"google\" value=\"notranslate\"><% } %>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">\n    <link href=\"https://fonts.googleapis.com/icon?family=Material+Icons\" rel=\"stylesheet\">\n</head>\n<body>\n    <!--[if lt IE 9]>\n        <p class=\"browserupgrade\">You are using an <strong>outdated</strong> browser. Please <a href=\"http://browsehappy.com/\">upgrade your browser</a> to improve your experience.</p>\n    <![endif]-->\n    <div id=\"root\"></div>\n    <!-- Google Analytics: uncomment and change UA-XXXXX-X to be your site's ID.\n    <script>\n        (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=\n        function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;\n        e=o.createElement(i);r=o.getElementsByTagName(i)[0];\n        e.src='//www.google-analytics.com/analytics.js';\n        r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));\n        ga('create','UA-XXXXX-X');ga('send','pageview');\n    </script>-->\n</body>\n</html>\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/robots.txt",
    "content": "# robotstxt.org/\n\nUser-agent: *\nDisallow: /api/account\nDisallow: /api/account/change_password\nDisallow: /api/account/sessions\nDisallow: /api/audits/\nDisallow: /api/logs/\nDisallow: /api/users/\nDisallow: /management/\nDisallow: /v2/api-docs/\n"
  },
  {
    "path": "generators/client/templates/src/main/webapp/swagger-ui/_index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"UTF-8\">\n    <title>Swagger UI</title>\n    <link rel=\"icon\" type=\"image/png\" href=\"images/favicon-32x32.png\" sizes=\"32x32\" />\n    <link rel=\"icon\" type=\"image/png\" href=\"images/favicon-16x16.png\" sizes=\"16x16\" />\n    <link href='./dist/css/typography.css' media='screen' rel='stylesheet' type='text/css'/>\n    <link href='./dist/css/reset.css' media='screen' rel='stylesheet' type='text/css'/>\n    <link href='./dist/css/screen.css' media='screen' rel='stylesheet' type='text/css'/>\n    <link href='./dist/css/reset.css' media='print' rel='stylesheet' type='text/css'/>\n    <link href='./dist/css/print.css' media='print' rel='stylesheet' type='text/css'/>\n    <script src='./dist/lib/object-assign-pollyfill.js' type='text/javascript'></script>\n    <script src='./dist/lib/jquery-1.8.0.min.js' type='text/javascript'></script>\n    <script src='./dist/lib/jquery.slideto.min.js' type='text/javascript'></script>\n    <script src='./dist/lib/jquery.wiggle.min.js' type='text/javascript'></script>\n    <script src='./dist/lib/jquery.ba-bbq.min.js' type='text/javascript'></script>\n    <script src='./dist/lib/handlebars-4.0.5.js' type='text/javascript'></script>\n    <script src='./dist/lib/lodash.min.js' type='text/javascript'></script>\n    <script src='./dist/lib/backbone-min.js' type='text/javascript'></script>\n    <script src='./dist/swagger-ui.js' type='text/javascript'></script>\n    <script src='./dist/lib/highlight.9.1.0.pack.js' type='text/javascript'></script>\n    <script src='./dist/lib/highlight.9.1.0.pack.js' type='text/javascript'></script>\n    <script src='./dist/lib/jsoneditor.min.js' type='text/javascript'></script>\n    <script src='./dist/lib/marked.js' type='text/javascript'></script>\n    <script src='./dist/lib/swagger-oauth.js' type='text/javascript'></script>\n\n    <!-- Some basic translations -->\n    <!-- <script src='lang/translator.js' type='text/javascript'></script> -->\n    <!-- <script src='lang/ru.js' type='text/javascript'></script> -->\n    <!-- <script src='lang/en.js' type='text/javascript'></script> -->\n\n    <script type=\"text/javascript\">\n        $(function() {\n            var springfox = {\n                \"baseUrl\": function() {\n                    var urlMatches = /(.*)\\/swagger-ui\\/index.html.*/.exec(window.location.href);\n                    return urlMatches[1];\n                },\n                \"securityConfig\": function(cb) {\n                    $.getJSON(this.baseUrl() + \"/swagger-resources/configuration/security\", function(data) {\n                        cb(data);\n                    });\n                },\n                \"uiConfig\": function(cb) {\n                    $.getJSON(this.baseUrl() + \"/swagger-resources/configuration/ui\", function(data) {\n                        cb(data);\n                    });\n                }\n            };\n            window.springfox = springfox;\n            window.oAuthRedirectUrl = springfox.baseUrl() + './dist/o2c.html'\n\n            window.springfox.uiConfig(function(data) {\n                window.swaggerUi = new SwaggerUi({\n                    dom_id: \"swagger-ui-container\",\n                    validatorUrl: data.validatorUrl,\n                    supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],\n                    onComplete: function(swaggerApi, swaggerUi) {\n                        initializeSpringfox();\n                        if (window.SwaggerTranslator) {\n                            window.SwaggerTranslator.translate();\n                        }\n                        $('pre code').each(function(i, e) {\n                            hljs.highlightBlock(e)\n                        });\n                    },\n                    onFailure: function(data) {\n                        log(\"Unable to Load SwaggerUI\");\n                    },\n                    docExpansion: \"none\",\n                    apisSorter: \"alpha\",\n                    showRequestHeaders: false\n                });\n\n                initializeBaseUrl();\n\n                $('#select_baseUrl').change(function() {\n                    window.swaggerUi.headerView.trigger('update-swagger-ui', {\n                        url: $('#select_baseUrl').val()\n                    });\n                    addApiKeyAuthorization();\n                });\n\n                function addApiKeyAuthorization() {\n                <%_ if (authenticationType === 'session') { _%>\n                    var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization(\"X-XSRF-TOKEN\", getCSRF(), \"header\");\n                    window.swaggerUi.api.clientAuthorizations.add(\"key\", apiKeyAuth);\n                <%_ } else if (authenticationType === 'oauth2') { _%>\n                    var authToken = JSON.parse(localStorage.getItem(\"jhi-authenticationtoken\")).access_token;\n                    var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization(\"Authorization\",\n                            \"Bearer \" + authToken, \"header\");\n                    window.swaggerUi.api.clientAuthorizations.add(\"key\", apiKeyAuth);\n                <%_ } else if (authenticationType === 'jwt' || authenticationType === 'uaa') { _%>\n                    var authToken = JSON.parse(localStorage.getItem(\"jhi-authenticationtoken\") || sessionStorage.getItem(\"jhi-authenticationtoken\"));\n                    var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization(\"Authorization\", \"Bearer \" + authToken, \"header\");\n                    window.swaggerUi.api.clientAuthorizations.add(\"bearer\", apiKeyAuth);\n                <%_ } _%>\n                }\n\n                function getCSRF() {\n                    var name = \"XSRF-TOKEN=\";\n                    var ca = document.cookie.split(';');\n                    for(var i=0; i<ca.length; i++) {\n                        var c = ca[i];\n                        while (c.charAt(0)==' ') c = c.substring(1);\n                        if (c.indexOf(name) != -1) return c.substring(name.length,c.length);\n                    }\n                    return \"\";\n                }\n\n                function log() {\n                    if ('console' in window) {\n                        console.log.apply(console, arguments);\n                    }\n                }\n\n                function oAuthIsDefined(security) {\n                    return security.clientId\n                    && security.clientSecret\n                    && security.appName\n                    && security.realm;\n                }\n\n                function initializeSpringfox() {\n                    var security = {};\n                    window.springfox.securityConfig(function(data) {\n                        security = data;\n                        if (typeof initOAuth == \"function\" && oAuthIsDefined(security)) {\n                            initOAuth(security);\n                        }\n                    });\n                }\n            });\n\n            function maybePrefix(location, withRelativePath) {\n                var pat = /^https?:\\/\\//i;\n                if (pat.test(location)) {\n                    return location;\n                }\n                return withRelativePath + location;\n            }\n\n            function initializeBaseUrl() {\n                var relativeLocation = springfox.baseUrl();\n\n                $('#input_baseUrl').hide();\n\n                $.getJSON(relativeLocation + \"/swagger-resources\", function(data) {\n\n                    var $urlDropdown = $('#select_baseUrl');\n                    $urlDropdown.empty();\n                    $.each(data, function(i, resource) {\n                        var option = $('<option></option>')\n                        .attr(\"value\", maybePrefix(resource.location, relativeLocation))\n                        .text(resource.name + \" (\" + resource.location + \")\");\n                        $urlDropdown.append(option);\n                    });\n                    $urlDropdown.change();\n                });\n\n            }\n\n        });\n    </script>\n</head>\n\n\n<body class=\"swagger-section\">\n<div id='header'>\n    <div class=\"swagger-ui-wrap\">\n        <a id=\"logo\" href=\"http://swagger.io\">swagger</a>\n\n        <form id='api_selector'>\n            <div class='input'>\n                <select id=\"select_baseUrl\" name=\"select_baseUrl\"></select>\n            </div>\n            <div class='input'><input placeholder=\"http://example.com/api\" id=\"input_baseUrl\" name=\"baseUrl\" type=\"text\"/>\n            </div>\n        </form>\n    </div>\n</div>\n\n<div id=\"message-bar\" class=\"swagger-ui-wrap\" data-sw-translate>&nbsp;</div>\n<div id=\"swagger-ui-container\" class=\"swagger-ui-wrap\"></div>\n</body>\n</html>\n"
  },
  {
    "path": "generators/client/templates/webpack/webpack.common.js",
    "content": "/* eslint-disable */\nconst CopyWebpackPlugin = require('copy-webpack-plugin');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst path = require('path');\n/* eslint-enable */\nmodule.exports = () => {\n  return {\n    entry: ['./src/main/webapp/app/index'],\n    resolve: {\n      extensions: [\n        '.js', '.jsx'\n      ],\n      modules: ['node_modules']\n    },\n    module: {\n      rules: [\n        {\n          test: /\\.json/,\n          loaders: ['json-loader']\n        }, {\n          test: /\\.css$/,\n          loaders: ['style-loader', 'css-loader']\n        }, {\n          test: /\\.scss$/,\n          loaders: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader']\n        }, {\n          test: /\\.(jpe?g|png|gif|svg|woff|woff2|ttf|eot)$/i,\n          loaders: [\n            'file-loader?hash=sha512&digest=hex&name=[hash].[ext]', {\n              loader: 'image-webpack-loader',\n              query: {\n                gifsicle: {\n                  interlaced: false\n                },\n                optipng: {\n                  optimizationLevel: 7\n                }\n              }\n            }\n          ]\n        }\n      ]\n    },\n    plugins: [\n      new CopyWebpackPlugin([\n        {\n          from: './node_modules/swagger-ui/dist',\n          to: 'swagger-ui/dist'\n        }, {\n          from: './src/main/webapp/swagger-ui/',\n          to: 'swagger-ui'\n        }, {\n          from: './src/main/webapp/static/',\n          to: 'static'\n        }, {\n          from: './src/main/webapp/favicon.ico',\n          to: 'favicon.ico'\n        }, {\n          from: './src/main/webapp/robots.txt',\n          to: 'robots.txt'\n        }\n      ]),\n      new HtmlWebpackPlugin({\n        template: './src/main/webapp/index.html',\n        chunksSortMode: 'dependency',\n        inject: 'body'\n      }),\n      new ExtractTextPlugin('styles.css')\n    ]\n  };\n};\n"
  },
  {
    "path": "generators/client/templates/webpack/webpack.dev.js",
    "content": "/* eslint-disable */\nconst path = require('path');\nconst webpack = require('webpack');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst webpackMerge = require('webpack-merge');\nconst commonConfig = require('./webpack.common.js');\n/* eslint-enable */\n\nmodule.exports = webpackMerge(commonConfig(), {\n  devtool: 'inline-source-map',\n  output: {\n    path: path.resolve('./<%= BUILD_DIR %>www'),\n    filename: '[name].bundle.js',\n    chunkFilename: '[id].chunk.js'\n  },\n  plugins: [\n    new webpack.NoEmitOnErrorsPlugin(),\n    new webpack.DefinePlugin({\n      'process.env': {\n        NODE_ENV: JSON.stringify('development')\n      }\n    })\n  ],\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        loaders: ['babel-loader?cacheDirectory'],\n        include: path.resolve('./src/main/webapp/app')\n      }\n    ]\n  },\n  devServer: {\n    contentBase: './<%= BUILD_DIR %>www',\n    proxy: [\n      {\n        context: [\n          '/api', '/management', '/swagger-resources', '/v2/api-docs', '/h2-console'\n        ],\n        target: 'http://127.0.0.1:8080',\n        secure: false\n      }, {\n        context: ['/websocket'],\n        target: 'ws://127.0.0.1:8080',\n        ws: true\n      }\n    ]\n  }\n});\n"
  },
  {
    "path": "generators/client/templates/webpack/webpack.prod.js",
    "content": "/* eslint-disable */\nconst path = require('path');\nconst webpack = require('webpack');\n// const HtmlWebpackPlugin = require('html-webpack-plugin');\nconst webpackMerge = require('webpack-merge');\nconst commonConfig = require('./webpack.common.js');\n/* eslint-enable */\n\nmodule.exports = webpackMerge(commonConfig(), {\n  devtool: 'source-map',\n  output: {\n    path: path.resolve('./<%= BUILD_DIR %>www'),\n    filename: '[name].js'\n  },\n  plugins: [\n    new webpack.optimize.CommonsChunkPlugin({\n      name: 'vendors',\n      minChunks(module) {\n        return (module.resource && module.resource.indexOf(path.resolve('node_modules')) === 0);\n      }\n    }),\n    new webpack.DefinePlugin({\n      'process.env': {\n        NODE_ENV: JSON.stringify('production')\n      }\n    }),\n        // this conflicts with -p option\n    new webpack.optimize.UglifyJsPlugin({\n      compressor: {\n        warnings: false\n      }\n    })\n  ],\n  module: {\n    rules: [\n      {\n        enforce: 'pre',\n        test: /\\.css$/,\n        loader: 'stripcomment-loader'\n      },\n      {\n        test: /\\.js$/,\n        loaders: ['babel-loader'],\n        include: path.resolve('./src/main/webapp/app')\n      }\n    ]\n  }\n});\n"
  },
  {
    "path": "gulpfile.js",
    "content": "const gulp = require('gulp');\nconst bumper = require('gulp-bump');\nconst git = require('gulp-git');\nconst shell = require('gulp-shell');\nconst fs = require('fs');\nconst sequence = require('gulp-sequence');\nconst path = require('path');\nconst mocha = require('gulp-mocha');\nconst istanbul = require('gulp-istanbul');\nconst nsp = require('gulp-nsp');\nconst plumber = require('gulp-plumber');\n\ngulp.task('nsp', (cb) => {\n  nsp({ package: path.resolve('package.json') }, cb);\n});\n\ngulp.task('pre-test', () => gulp.src('generators/app/index.js')\n    .pipe(istanbul({\n      includeUntested: true\n    }))\n    .pipe(istanbul.hookRequire()));\n\ngulp.task('test', ['pre-test'], (cb) => {\n  let mochaErr;\n\n  gulp.src('test/*.js')\n    .pipe(plumber())\n    .pipe(mocha({ reporter: 'spec' }))\n    .on('error', (err) => {\n      mochaErr = err;\n    })\n    .pipe(istanbul.writeReports())\n    .on('end', () => {\n      cb(mochaErr);\n    });\n});\n\ngulp.task('bump-patch', bump('patch'));\ngulp.task('bump-minor', bump('minor'));\ngulp.task('bump-major', bump('major'));\n\ngulp.task('git-commit', () => {\n  const v = `update to version ${version()}`;\n  gulp.src(['./generators/**/*', './README.md', './package.json', './gulpfile.js', './.travis.yml', './travis/**/*'])\n    .pipe(git.add())\n    .pipe(git.commit(v));\n});\n\ngulp.task('git-push', (cb) => {\n  const v = version();\n  git.push('origin', 'master', (err) => {\n    if (err) return cb(err);\n    git.tag(v, v, (err) => {\n      if (err) return cb(err);\n      git.push('origin', 'master', {\n        args: '--tags'\n      }, cb);\n      return true;\n    });\n    return true;\n  });\n});\n\ngulp.task('npm', shell.task([\n  'npm publish'\n]));\n\nfunction bump(level) {\n  return function () {\n    return gulp.src(['./package.json'])\n      .pipe(bumper({\n        type: level\n      }))\n      .pipe(gulp.dest('./'));\n  };\n}\n\nfunction version() {\n  return JSON.parse(fs.readFileSync('package.json', 'utf8')).version;\n}\n\ngulp.task('prepublish', ['nsp']);\ngulp.task('default', ['static', 'test']);\ngulp.task('deploy-patch', sequence('test', 'bump-patch', 'git-commit', 'git-push', 'npm'));\ngulp.task('deploy-minor', sequence('test', 'bump-minor', 'git-commit', 'git-push', 'npm'));\ngulp.task('deploy-major', sequence('test', 'bump-major', 'git-commit', 'git-push', 'npm'));\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"generator-jhipster-react\",\n  \"version\": \"0.0.0\",\n  \"description\": \"A Jhipster based generator to create react + spring boot application\",\n  \"homepage\": \"https://github.com/hipster-labs/generator-jhipster-react\",\n  \"author\": {\n    \"name\": \"Deepu KS\",\n    \"email\": \"d4udts@gmail.com\",\n    \"url\": \"https://deepu105.github.io\"\n  },\n  \"contributors\": [\n    \"Deepu KS <d4udts@gmail.com> (https://deepu105.github.io)\",\n    \"Sendil Kumar N <sendilkumarn@live.com> (https://sendilkumarn.js.org)\",\n    \"Yuri <yuri.kushch@gmail.com> (http://ykushch.net)\",\n    \"gdoslu (https://github.com/gdoslu)\"\n  ],\n  \"files\": [\n    \"generators/app\",\n    \"generators/entity\"\n  ],\n  \"main\": \"generators/app/index.js\",\n  \"keywords\": [\n    \"yeoman-generator\",\n    \"jhipster-module\" ,\n    \"Jhipster-react\",\n    \"JHipster\",\n    \"Java\",\n    \"Spring\",\n    \"Spring Security\",\n    \"JPA\",\n    \"Hibernate\",\n    \"ReactJS\",\n    \"Material UI\",\n    \"Material\",\n    \"Paper\",\n    \"React\"\n  ],\n  \"dependencies\": {\n    \"chalk\": \"1.1.3\",\n    \"lodash\": \"4.17.4\",\n    \"mkdirp\": \"0.5.1\",\n    \"shelljs\": \"0.7.7\",\n    \"semver\": \"5.3.0\",\n    \"yeoman-generator\": \"1.1.1\",\n    \"generator-jhipster\": \"latest\",\n    \"underscore.string\": \"3.2.2\"\n  },\n  \"devDependencies\": {\n    \"gulp\": \"^3.6.0\",\n    \"gulp-bump\": \"^0.1.11\",\n    \"gulp-git\": \"^0.5.6\",\n    \"gulp-istanbul\": \"^0.9.0\",\n    \"gulp-mocha\": \"^2.0.0\",\n    \"gulp-nsp\": \"^2.1.0\",\n    \"gulp-plumber\": \"^1.0.0\",\n    \"gulp-rename\": \"^1.2.0\",\n    \"gulp-sequence\": \"^0.3.1\",\n    \"gulp-shell\": \"^0.2.11\",\n    \"eslint\": \"3.17.1\",\n    \"eslint-config-airbnb-base\": \"11.1.1\",\n    \"eslint-plugin-import\": \"2.2.0\",\n    \"fs-extra\": \"2.1.0\",\n    \"mocha\": \"3.2.0\",\n    \"yeoman-assert\": \"3.0.0\",\n    \"yeoman-test\": \"1.6.0\"\n  },\n  \"scripts\": {\n    \"pretest\": \"eslint .\",\n    \"lint\": \"eslint .\",\n    \"lint-fix\": \"eslint . --fix\",\n    \"test\": \"mocha --timeout 20000 --slow 0 --reporter spec\"\n  },\n  \"repository\": {\n      \"type\": \"git\",\n      \"url\": \"git+https://github.com/hipster-labs/generator-jhipster-react.git\"\n    },\n  \"engines\": {\n    \"node\": \">=6.9.0\",\n    \"npm\": \">=2.14.2\"\n  },\n  \"license\": \"Apache-2.0\",\n  \"bugs\": {\n    \"url\": \"https://github.com/hipster-labs/generator-jhipster-react/issues\"\n  }\n}\n"
  },
  {
    "path": "test/app.js",
    "content": "/* global describe, before, beforeEach, it*/\nconst path = require('path');\nconst assert = require('yeoman-assert');\nconst helpers = require('yeoman-generator').test;\n\ndescribe('generator-jhipster-react:app', () => {\n  before((done) => {\n    helpers.run(path.join(__dirname, '../generators/app'))\n      .withOptions({ someOption: true })\n      .withPrompts({ someAnswer: true })\n      .on('end', done);\n  });\n\n  it('creates files', () => {\n    assert.file([\n      'dummyfile.txt'\n    ]);\n  });\n});\n"
  }
]