Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-10081: Web UI (GenerateTrainingData ) for LTR plugin #154

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ parent.iml
/solr/example/solr/zoo_data
/solr/example/work/*
/solr/example/exampledocs/post.jar

/solr/example/techproducts/*
/solr/example/example-DIH/**/data
/solr/example/example-DIH/**/dataimport.properties
/solr/example/example-DIH/solr/mail/lib/*.jar
Expand All @@ -48,7 +48,7 @@ solr/contrib/dataimporthandler/test-lib/
solr/contrib/morphlines-core/test-lib/

solr/core/test-lib/

solr/server/solr/*
solr/server/logs/
solr/server/solr/zoo_data/
solr/server/solr-webapp
Expand Down
Binary file added solr/contrib/ltr/example/libsvm_formatter.pyc
Binary file not shown.
19 changes: 19 additions & 0 deletions solr/contrib/ltr/example/webui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# WebUI for Apache Solr LTR

## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:3000
npm run dev

# build for production with minification
npm run build
```
> Tip:
> Built files are meant to be served over an HTTP server.
> Opening index.html over file:// won't work.

For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
Binary file added solr/contrib/ltr/example/webui/imgs/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added solr/contrib/ltr/example/webui/imgs/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,432 changes: 1,432 additions & 0 deletions solr/contrib/ltr/example/webui/solrconfig/solrconfig.xml

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions solr/contrib/ltr/example/webui/web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# WebUI for Apache Solr LTR

## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:3000
npm run dev

# build for production with minification
npm run build
```
> Tip:
> Built files are meant to be served over an HTTP server.
> Opening index.html over file:// won't work.

For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
6 changes: 6 additions & 0 deletions solr/contrib/ltr/example/webui/web/config/dev.env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var merge = require('webpack-merge')
var prodEnv = require('./prod.env')

module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
32 changes: 32 additions & 0 deletions solr/contrib/ltr/example/webui/web/config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')

module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
productionSourceMap: true,
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css']
},
dev: {
env: require('./dev.env'),
port: 3000,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false
}
}
3 changes: 3 additions & 0 deletions solr/contrib/ltr/example/webui/web/config/prod.env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
NODE_ENV: '"production"'
}
21 changes: 21 additions & 0 deletions solr/contrib/ltr/example/webui/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GenTrainingDataSolr!</title>
<!-- Bootstrap CSS -->
<link rel="icon" href="http://qfdk.free.fr/favicon.ico" type="image/vnd.microsoft.icon">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
body {
padding: 70px 0 20px 0;
}
</style>
</head>
<body>
<div id="app">
</div>
</body>
</html>
57 changes: 57 additions & 0 deletions solr/contrib/ltr/example/webui/web/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "solr-ltr",
"version": "1.0.0",
"description": "webUI for Apache Solr LTR",
"author": "HAOZHI Li <[email protected]>",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"build": "node build/build.js"
},
"dependencies": {
"vue": "^2.1.0",
"vue-resource": "^1.0.3",
"vue-router": "^2.2.0",
"vue-strap": "git+https://github.com/wffranco/vue-strap.git",
"vue-tables-2": "^0.3.0"
},
"devDependencies": {
"autoprefixer": "^6.4.0",
"babel-core": "^6.0.0",
"babel-helper-vue-jsx-merge-props": "^2.0.2",
"babel-loader": "^6.0.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.0.0",
"babel-plugin-transform-vue-jsx": "^3.3.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
"babel-register": "^6.0.0",
"chalk": "^1.1.3",
"connect-history-api-fallback": "^1.1.0",
"css-loader": "^0.25.0",
"eventsource-polyfill": "^0.9.6",
"express": "^4.13.3",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"function-bind": "^1.0.2",
"html-webpack-plugin": "^2.8.1",
"http-proxy-middleware": "^0.17.2",
"json-loader": "^0.5.4",
"opn": "^4.0.2",
"ora": "^0.3.0",
"semver": "^5.3.0",
"shelljs": "^0.7.4",
"url-loader": "^0.5.7",
"vue-loader": "^10.0.0",
"vue-style-loader": "^1.0.0",
"vue-template-compiler": "^2.1.0",
"webpack": "^1.13.2",
"webpack-dev-middleware": "^1.8.3",
"webpack-hot-middleware": "^2.12.2",
"webpack-merge": "^0.14.1"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
}
}
28 changes: 28 additions & 0 deletions solr/contrib/ltr/example/webui/web/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="container" id="app">
<top></top>
<jumbotron/>
<bot></bot>
</div>
</template>

<script>
import top from './components/Header'
import jumbotron from './components/Jumbotron'
import index from './components/Index'
import bot from './components/Footer'

export default {
name: 'app',
components: {
top,
jumbotron,
index,
bot
}
}
</script>

<style>

</style>
24 changes: 24 additions & 0 deletions solr/contrib/ltr/example/webui/web/src/components/Clicklogs.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template lang="html">
<div class="clicklogs">
<jumbotron :isShow="false" msg="Click logs"></jumbotron>
<genclick></genclick>
</div>
</template>

<script>
import jumbotron from './Jumbotron'
import genclick from './Genclick'
export default {
name:'compare',
components: {
jumbotron,
genclick
},
data(){
return {
}
},
methods:{
}
}
</script>
24 changes: 24 additions & 0 deletions solr/contrib/ltr/example/webui/web/src/components/Compare.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template lang="html">
<div class="compare">
<jumbotron :isShow="false" msg="Compare"></jumbotron>
<gencompare></gencompare>
</div>
</template>

<script>
import jumbotron from './Jumbotron'
import gencompare from './Gencompare'
export default {
name:'compare',
components: {
jumbotron,
gencompare
},
data(){
return {
}
},
methods:{
}
}
</script>
22 changes: 22 additions & 0 deletions solr/contrib/ltr/example/webui/web/src/components/Footer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<template lang="html">
<div class="bot">
<hr>
<p>
<a href="#" target="_blank">About</a> &middot; Code licensed under <a
href="http://www.apache.org/licenses/LICENSE-2.0"
target="_blank">Apache
License v2.0</a>, documentation under <a href="http://creativecommons.org/licenses/by/4.0/" target="_blank">CC
BY 4.0</a>.
</p>

</div>
</template>

<script>
export default {
name:'footer'
}
</script>

<style lang="css">
</style>
Loading