Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This app is a front end client for Apache LENS server.
- It lets you fire queries.
- Discover cubes, its measures and dimensions.
- add your LENS Server address in package.json under
scriptsstart and dev tolensserverargument, this is the value oflens.server.base.urlproperty of your LENS installation - default port is 8082, if you'd like to change it please change the port argument in package.json under
scriptsstart or dev - doing
npm run devstarts the UI in dev mode, with the JavaScript assets in a non-minified way which help in debugging, also it'll be watching to the changes in the source and would generate the new assets automatically. - doing
npm run startwill minify and uglifiy the assets.
cd lens-ui
npm run start- point chrome to http://localhost:8082
cd lens-ui
npm install
node_modules/webpack/bin/webpack- you now have built assets in
assetsdirectory - add LENS server address (lens.server.base.url) in
config.jsonfile inbaseURL - run your server, e.g python
python -m SimpleHTTPServer- this will serve the
index.htmlpresent at the root. - this will cause your browser to make cross domain requests and if you don't have CORS enabled on your server, the app won't be able to get any data from LENS server.
- to get around till you enable CORS on server side, open chrome in disabled web security mode.
- first, quit chrome completely, then see the following steps to run browsers in disabled security mode
- start chrome in disabled security mode
- All JavaScript is in app directory.
- The app can be configured to show either INMEMORY or PERSISTENT results.
- The setting can be done by altering a boolean variable present in
config.jsonisPersistent: true // results will be available as downloadable filesisPersistent: false // results will be shown in table format
- Any custom headers you wish to add can be added in
config.jsonas a property"headers": { "Some-Header": "SomeValue", "Another-Header": "AnotherValue" }
Built using:-
- React
- Facebook's Flux implementation
- Reqwest for making ajax calls wrapped with JavaScript promises.