Updated the dev docs and switched from sass to less for css
Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/fb1f8a31 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/fb1f8a31 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/fb1f8a31 Branch: refs/heads/apache-blur-0.2 Commit: fb1f8a3176c26188de62ed9361e90e42a8bdc22b Parents: ab850f9 Author: Chris Rohr <[email protected]> Authored: Thu Jul 3 14:08:50 2014 -0400 Committer: Chris Rohr <[email protected]> Committed: Thu Jul 3 14:08:50 2014 -0400 ---------------------------------------------------------------------- blur-console/README.md | 21 +- blur-console/src/main/webapp/Gruntfile.js | 29 +- blur-console/src/main/webapp/bower.json | 2 +- .../main/webapp/less/blurconsole.dashboard.less | 50 + .../src/main/webapp/less/blurconsole.less | 31 + .../main/webapp/less/blurconsole.queries.less | 22 + .../main/webapp/less/blurconsole.schema.less | 48 + .../main/webapp/less/blurconsole.search.less | 59 + .../src/main/webapp/less/blurconsole.shell.less | 77 + blur-console/src/main/webapp/less/colors.less | 41 + .../src/main/webapp/less/typeahead.less | 48 + blur-console/src/main/webapp/package.json | 2 +- ...console.018c8d880edbb816d45f576c8cf85eed.css | 6592 ----------------- .../src/main/webapp/public/css/blurconsole.css | 6593 +----------------- ...ole.css.0212975e50782bb2f0d4b89d196e90dc.map | 7 - .../main/webapp/public/css/blurconsole.css.map | 7 - ...console.e6a0e8ef14294aab8f3772f78a54938a.css | 1 + .../css/fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20335 bytes .../css/fonts/glyphicons-halflings-regular.svg | 229 + .../css/fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 41280 bytes .../css/fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23320 bytes .../public/css/glyphicons-halflings-regular.eot | Bin 20335 -> 0 bytes .../public/css/glyphicons-halflings-regular.svg | 229 - .../public/css/glyphicons-halflings-regular.ttf | Bin 41280 -> 0 bytes .../css/glyphicons-halflings-regular.woff | Bin 23320 -> 0 bytes blur-console/src/main/webapp/public/index.html | 2 +- blur-console/src/main/webapp/sass/_colors.scss | 25 - .../main/webapp/sass/blurconsole.dashboard.scss | 50 - .../main/webapp/sass/blurconsole.queries.scss | 22 - .../main/webapp/sass/blurconsole.schema.scss | 48 - .../src/main/webapp/sass/blurconsole.scss | 30 - .../main/webapp/sass/blurconsole.search.scss | 59 - .../src/main/webapp/sass/blurconsole.shell.scss | 77 - .../src/main/webapp/sass/typeahead.scss | 48 - 34 files changed, 641 insertions(+), 13808 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/README.md ---------------------------------------------------------------------- diff --git a/blur-console/README.md b/blur-console/README.md index 350923f..520701c 100644 --- a/blur-console/README.md +++ b/blur-console/README.md @@ -10,7 +10,6 @@ The development for this tool is done in two pieces the UI (Javascript) and the In order to contribute to the development of this component the following tools/languages will need to be available: * Java -* Ruby (1.9.x or higher) * Node (0.10.x or higher) - This will come with npm ### UI Development @@ -18,7 +17,7 @@ In order to contribute to the development of this component the following tools/ To turn on the development profile: export BLUR_CONSOLE_DEV=true -The UI code lives in the ui directory. This directory has been setup like a standard javascript based application would be. The goal of this is to allow for rapid development of the UI components while flushing out the service API. The UI portion has been built so that the system can be run with fake data to mock out the actual Apache Blur integration. +The UI code lives in the srce/main/webapp directory. This directory has been setup like a standard javascript based application would be. The goal of this is to allow for rapid development of the UI components while flushing out the service API. The UI portion has been built so that the system can be run with fake data to mock out the actual Apache Blur integration. To get up and running to work on the UI component you can follow these steps: @@ -30,32 +29,24 @@ To get up and running to work on the UI component you can follow these steps: npm install -g grunt-cli -3. Install compass (this will install sass a stylesheet compiler) - - gem install compass - -4. Install project build/test dependencies (from the ui directory) +4. Install project build/test dependencies (from the src/main/webapp directory) npm install -5. Install js dependencies (from the ui directory) +5. Install js dependencies (from the src/main/webapp directory) - bower install + grunt deps -Once the dependencies and build tools are installed the following commands can be used (from the ui directory): +Once the dependencies and build tools are installed the following commands can be used (from the src/main/webapp directory): * Run tests grunt test -* Start development server (server will be available on port 9000) +* Start development server (server will be available on port 3000) grunt serve ### Services Development The services code lives at the root of the console directory and is a basic maven project. - -## Packing for distribution - -TODO: Need to still figure this out http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/src/main/webapp/Gruntfile.js ---------------------------------------------------------------------- diff --git a/blur-console/src/main/webapp/Gruntfile.js b/blur-console/src/main/webapp/Gruntfile.js index 5a23d4d..27e1929 100644 --- a/blur-console/src/main/webapp/Gruntfile.js +++ b/blur-console/src/main/webapp/Gruntfile.js @@ -72,6 +72,27 @@ module.exports = function (grunt) { } }, + less: { + options: { + sourceMap: true, + dumpLineNumbers: true, + paths: ['libs'] + }, + development: { + files: { + 'public/css/blurconsole.css': 'less/blurconsole.less' + } + }, + production: { + files: { + 'public/css/blurconsole.css': 'less/blurconsole.less' + }, + options: { + compress: true + } + } + }, + // Compiles Sass to CSS and generates necessary files if requested sass: { options: { @@ -215,7 +236,7 @@ module.exports = function (grunt) { files: [ {expand: true, src: ['index.html','img/*','views/*'], dest: 'public/'}, {expand: true, flatten: true, src: ['libs/modernizr/modernizr.js'], dest: 'public/js'}, - {expand: true, flatten: true, src: ['libs/twbs-bootstrap-sass/vendor/assets/fonts/bootstrap/*'], dest: 'public/css'} + {expand: true, flatten: true, src: ['libs/bootstrap/fonts/*'], dest: 'public/css/fonts'} ] } } @@ -224,7 +245,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-bower-task'); grunt.loadNpmTasks('grunt-exec'); grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-contrib-sass'); + grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-notify'); @@ -246,8 +267,8 @@ module.exports = function (grunt) { grunt.registerTask('test:unit', 'Run JavaScript Unit Tests', ['karma']); grunt.registerTask('test:style', 'Run JavaScript CodeStyle reports', ['jshint:ci'/*, 'plato:ci' */]); grunt.registerTask('style:development', 'Run JavaScript CodeStyle reports', ['jshint:development']); - grunt.registerTask('development', 'Build for development', ['clean', 'sass:development', 'uglify:js', 'copy:main', 'version-assets']); - grunt.registerTask('production', 'Build for production', ['clean', 'sass:production', 'uglify:js', 'copy:main', 'version-assets']); + grunt.registerTask('development', 'Build for development', ['clean', 'less:development', 'uglify:js', 'copy:main', 'version-assets']); + grunt.registerTask('production', 'Build for production', ['clean', 'less:production', 'uglify:js', 'copy:main', 'version-assets']); grunt.registerTask('serve', 'Run development server', ['clean','development', 'connect:livereload','watch']); grunt.registerTask('default', ['clean', 'style:development', 'development', 'watch']); grunt.registerTask('version-assets-css-map', function() { http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/src/main/webapp/bower.json ---------------------------------------------------------------------- diff --git a/blur-console/src/main/webapp/bower.json b/blur-console/src/main/webapp/bower.json index 6c54da7..8901049 100644 --- a/blur-console/src/main/webapp/bower.json +++ b/blur-console/src/main/webapp/bower.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "dependencies": { - "twbs-bootstrap-sass": "3.1.1", + "bootstrap": "3.2.0", "modernizr": "2.7.1", "jquery": "1.11.0", "flot":"0.8.2", http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/src/main/webapp/less/blurconsole.dashboard.less ---------------------------------------------------------------------- diff --git a/blur-console/src/main/webapp/less/blurconsole.dashboard.less b/blur-console/src/main/webapp/less/blurconsole.dashboard.less new file mode 100644 index 0000000..1b583ec --- /dev/null +++ b/blur-console/src/main/webapp/less/blurconsole.dashboard.less @@ -0,0 +1,50 @@ +/* + +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. + */ +.simple-chart { + min-height : 200px; + min-width : 200px; + max-height : 300px; + max-width : 300px; + margin-left : auto; + margin-right : auto; +} + +.wide-chart { + min-height : 100px; + min-width : 200px; + max-height : 200px; + max-width : 1000px; + margin-left : auto; + margin-right : auto; +} + +.swapper-trigger { + cursor : pointer; +} + +.swapper-info { + min-height : 200px; + min-width : 200px; + max-height : 300px; + max-width : 300px; + margin-left : auto; + margin-right : auto; + overflow: auto; +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/src/main/webapp/less/blurconsole.less ---------------------------------------------------------------------- diff --git a/blur-console/src/main/webapp/less/blurconsole.less b/blur-console/src/main/webapp/less/blurconsole.less new file mode 100644 index 0000000..d739f06 --- /dev/null +++ b/blur-console/src/main/webapp/less/blurconsole.less @@ -0,0 +1,31 @@ +/* + +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. + */ + +@import 'bootstrap/less/bootstrap'; + +@icon-font-path: "fonts/"; + +@import 'colors'; +@import 'blurconsole.shell.less'; +@import 'blurconsole.dashboard.less'; +@import 'blurconsole.schema.less'; +@import 'blurconsole.queries.less'; +@import 'blurconsole.search.less'; +@import 'typeahead'; http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/src/main/webapp/less/blurconsole.queries.less ---------------------------------------------------------------------- diff --git a/blur-console/src/main/webapp/less/blurconsole.queries.less b/blur-console/src/main/webapp/less/blurconsole.queries.less new file mode 100644 index 0000000..e473517 --- /dev/null +++ b/blur-console/src/main/webapp/less/blurconsole.queries.less @@ -0,0 +1,22 @@ +/* +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. +*/ + +#filterOptions { + margin-bottom: 5px; +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/src/main/webapp/less/blurconsole.schema.less ---------------------------------------------------------------------- diff --git a/blur-console/src/main/webapp/less/blurconsole.schema.less b/blur-console/src/main/webapp/less/blurconsole.schema.less new file mode 100644 index 0000000..072d5d3 --- /dev/null +++ b/blur-console/src/main/webapp/less/blurconsole.schema.less @@ -0,0 +1,48 @@ +/* +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. +*/ +.modal { + .schemaColumnDef { + display: none; + &.in { + display: block; + } + strong { + width: 140px; + display: inline-block; + } + } + + .schemaColumn { + cursor: pointer; + } + + .schemaColumnTerms { + display: none; + .termList { + margin-top: 5px; + .searchTrigger { + cursor: pointer; + } + } + } + + .schemaList .panel-heading { + cursor: pointer; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/src/main/webapp/less/blurconsole.search.less ---------------------------------------------------------------------- diff --git a/blur-console/src/main/webapp/less/blurconsole.search.less b/blur-console/src/main/webapp/less/blurconsole.search.less new file mode 100644 index 0000000..3eaa3b2 --- /dev/null +++ b/blur-console/src/main/webapp/less/blurconsole.search.less @@ -0,0 +1,59 @@ +/* + +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. + */ + +#results { + .panel { + display:inline-block; + margin-right: 10px; + min-width: 100%; + } + .panel-heading { + cursor: pointer; + } + .panel-collapse { + padding: 5px; + } +} + +#resultCount { + padding-left: 30px; + font-style: italic; +} + +#resultInfo { + margin-top: 3px; +} + +tr.row-separator { + th { + background-color: @search-row-background; + } + &:hover th { + background-color: @search-row-background !important; + } +} + +.input-group .twitter-typeahead { + float: left; + width: 100%; + .form-control { + border-radius: 4px 0px 0px 4px; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/src/main/webapp/less/blurconsole.shell.less ---------------------------------------------------------------------- diff --git a/blur-console/src/main/webapp/less/blurconsole.shell.less b/blur-console/src/main/webapp/less/blurconsole.shell.less new file mode 100644 index 0000000..fb1ac92 --- /dev/null +++ b/blur-console/src/main/webapp/less/blurconsole.shell.less @@ -0,0 +1,77 @@ +/* + +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. + */ + +.input-group-btn > .btn { + height: @input-height-base; +} + +/* Space out content a bit */ +body { + padding: 70px 10px 20px 50px; +} + +/* Top Navigation */ +nav.navbar-fixed-top { + background-color: @navbar-background; + .navbar-brand { + color: @navbar-color; + } + .pull-right button.btn { + margin-right: 20px; + margin-top: 14px; + } +} + +/* Side Navigation */ +.side-nav { + ul { + position: fixed !important; + width: 40px; + overflow-y: hidden; + white-space: nowrap; + background-color: @sidebar-background; + height: 100%; + top: 50px; + left: 0; + list-style: none; + padding-left: 0; + li { + position: relative; + display: block; + a { + padding: 10px; + color: @sidebar-color; + margin-right: 0; + font-size: 20px; + position: relative; + display: block; + &.active { + background-color: @sidebar-background-hover; + color: @sidebar-color-hover; + } + } + } + } +} + +#error_log_modal .modal-body { + height: 400px; + overflow: auto; +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/src/main/webapp/less/colors.less ---------------------------------------------------------------------- diff --git a/blur-console/src/main/webapp/less/colors.less b/blur-console/src/main/webapp/less/colors.less new file mode 100644 index 0000000..9e11784 --- /dev/null +++ b/blur-console/src/main/webapp/less/colors.less @@ -0,0 +1,41 @@ +/* + +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. + */ + +@silver: #CCC; +@black: #000; +@san-marino: #4c66a4; +@white: #FFF; +@dusty-gray: #999; +@ebony-clay: #232937; +@silver-chalice: #AAA; +@pacific-blue: #0097cf; + +@navbar-background: @san-marino; +@navbar-color: @white; +@sidebar-background: @ebony-clay; +@sidebar-color: @silver; +@sidebar-background-hover: @white; +@sidebar-color-hover: @black; +@search-row-background: @dusty-gray; +@typeahead-tint: @silver-chalice; +@typeahead-background: @white; +@typeahead-border: @silver; +@typeahead-highlight-color: @white; +@typeahead-highlight-background: @pacific-blue; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/src/main/webapp/less/typeahead.less ---------------------------------------------------------------------- diff --git a/blur-console/src/main/webapp/less/typeahead.less b/blur-console/src/main/webapp/less/typeahead.less new file mode 100644 index 0000000..eed3bcd --- /dev/null +++ b/blur-console/src/main/webapp/less/typeahead.less @@ -0,0 +1,48 @@ +/* + +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. + */ + +.twitter-typeahead { + .tt-hint { + color: @typeahead-tint; + } + + .tt-dropdown-menu { + width: 422px; + padding: 8px 0; + background-color: @typeahead-background; + border: 1px solid @typeahead-border; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 8px; + box-shadow: 0 5px 10px rgba(0,0,0,.2); + } + + .tt-suggestion { + padding: 3px 10px; + } + + .tt-suggestion.tt-cursor { + color: @typeahead-highlight-color; + background-color: @typeahead-highlight-background; + } + + .tt-suggestion p { + margin: 0; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/fb1f8a31/blur-console/src/main/webapp/package.json ---------------------------------------------------------------------- diff --git a/blur-console/src/main/webapp/package.json b/blur-console/src/main/webapp/package.json index 651fb36..6bccd17 100644 --- a/blur-console/src/main/webapp/package.json +++ b/blur-console/src/main/webapp/package.json @@ -13,7 +13,7 @@ "grunt-bower-task": "~0.3.4", "grunt-contrib-clean": "~0.5.0", "grunt-contrib-jshint": "~0.8.0", - "grunt-contrib-sass": "~0.4.0", + "grunt-contrib-less": "~0.11.3", "grunt-contrib-watch": "~0.6.1", "grunt-contrib-concat": "~0.4.0", "grunt-contrib-uglify": "~0.5.0",
