atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject [5/5] incubator-atlas git commit: ATLAS-1894: Search using entity/tag attribute filters
Date Fri, 30 Jun 2017 09:00:04 GMT
ATLAS-1894: Search using entity/tag attribute filters

Signed-off-by: Madhan Neethiraj <madhan@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/9a4ed469
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/9a4ed469
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/9a4ed469

Branch: refs/heads/master
Commit: 9a4ed469cc64cf107b98fba1851525017fec2024
Parents: 7c262b4
Author: kevalbhatt <kbhatt@apache.org>
Authored: Thu Jun 22 18:45:36 2017 +0530
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Fri Jun 30 01:49:15 2017 -0700

----------------------------------------------------------------------
 3party-licenses/bootstrap-datepicker-LICENSE    |   21 -
 .../bootstrap-daterangepicker-LICENSE           |    9 +
 3party-licenses/jQuery-QueryBuilder-LICENSE     |   21 +
 LICENSE                                         |    9 +-
 dashboardv2/gruntfile.js                        |  114 +-
 dashboardv2/package.json                        |    5 +
 dashboardv2/public/css/scss/form.scss           |    4 +
 dashboardv2/public/css/scss/override.scss       |   21 +
 dashboardv2/public/css/scss/search.scss         |   17 +
 dashboardv2/public/index.html                   |    3 +-
 dashboardv2/public/js/collection/VSearchList.js |   11 +
 dashboardv2/public/js/collection/VTagList.js    |    2 +-
 .../datetimepicker/bootstrap-datetimepicker.js  | 2444 ------------------
 .../bootstrap-datetimepicker.min.css            |    5 -
 dashboardv2/public/js/main.js                   |   28 +-
 dashboardv2/public/js/models/VSearch.js         |    2 +-
 dashboardv2/public/js/models/VTag.js            |    6 +-
 dashboardv2/public/js/router/Router.js          |   65 +-
 .../js/templates/search/QueryBuilder_tmpl.html  |   17 +
 .../templates/search/SearchLayoutView_tmpl.html |   22 +-
 .../js/templates/search/SearchQuery_tmpl.html   |   21 +
 .../search/SearchResultLayoutView_tmpl.html     |   15 +
 .../templates/tag/AddTagAttributeView_tmpl.html |    2 +-
 .../templates/tag/createTagLayoutView_tmpl.html |    2 +-
 dashboardv2/public/js/utils/Overrides.js        |    5 +-
 dashboardv2/public/js/utils/UrlLinks.js         |   38 +-
 dashboardv2/public/js/utils/Utils.js            |   68 +-
 .../views/business_catalog/SideNavLayoutView.js |   10 +-
 .../js/views/entity/CreateEntityLayoutView.js   |   29 +-
 .../public/js/views/search/QueryBuilderView.js  |  181 ++
 .../js/views/search/SearchDetailLayoutView.js   |    3 +-
 .../public/js/views/search/SearchLayoutView.js  |  181 +-
 .../public/js/views/search/SearchQueryView.js   |  113 +
 .../js/views/search/SearchResultLayoutView.js   |  113 +-
 .../public/js/views/tag/TagDetailLayoutView.js  |    3 +-
 .../public/js/views/tag/TagLayoutView.js        |    6 +-
 36 files changed, 975 insertions(+), 2641 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/3party-licenses/bootstrap-datepicker-LICENSE
----------------------------------------------------------------------
diff --git a/3party-licenses/bootstrap-datepicker-LICENSE b/3party-licenses/bootstrap-datepicker-LICENSE
deleted file mode 100644
index 3fd94fa..0000000
--- a/3party-licenses/bootstrap-datepicker-LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Jonathan Peterson (@Eonasdan)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/3party-licenses/bootstrap-daterangepicker-LICENSE
----------------------------------------------------------------------
diff --git a/3party-licenses/bootstrap-daterangepicker-LICENSE b/3party-licenses/bootstrap-daterangepicker-LICENSE
new file mode 100644
index 0000000..aacee25
--- /dev/null
+++ b/3party-licenses/bootstrap-daterangepicker-LICENSE
@@ -0,0 +1,9 @@
+The MIT License (MIT)
+
+Copyright (c) 2012-2017 Dan Grossman
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/3party-licenses/jQuery-QueryBuilder-LICENSE
----------------------------------------------------------------------
diff --git a/3party-licenses/jQuery-QueryBuilder-LICENSE b/3party-licenses/jQuery-QueryBuilder-LICENSE
new file mode 100644
index 0000000..99070e3
--- /dev/null
+++ b/3party-licenses/jQuery-QueryBuilder-LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2015 Damien Sorel
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 9722907..435e340 100755
--- a/LICENSE
+++ b/LICENSE
@@ -248,9 +248,12 @@ MIT License. For details, see 3party-licenses/es5-shim-LICENSE
 This product bundles Respond, which is available under
 MIT License. For details, see 3party-licenses/Respond-LICENSE
 
-This product bundles bootstrap-datepicker 4.14.30, which is available under
-MIT License.  For details, see 3party-licenses/bootstrap-datepicker-LICENSE
-
 This product bundles Google Fonts, which are available under
 Open Font License.  For details, see 3party-licenses/google-fonts-LICENSE
+
+This product bundles bootstrap-daterangepicker 2.1.25, which is available under
+MIT License.  For details, see 3party-licenses/bootstrap-daterangepicker-LICENSE
+
+This product bundles jQuery QueryBuilder 2.4.3, which is available under
+MIT License.  For details, see 3party-licenses/jQuery-QueryBuilder-LICENSE
 =======================================================================

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/dashboardv2/gruntfile.js
----------------------------------------------------------------------
diff --git a/dashboardv2/gruntfile.js b/dashboardv2/gruntfile.js
index cf076b6..c0e315f 100644
--- a/dashboardv2/gruntfile.js
+++ b/dashboardv2/gruntfile.js
@@ -32,9 +32,6 @@ module.exports = function(grunt) {
         modulesPath = '../public/'
     }
 
-    var proxySnippet = require('grunt-connect-proxy/lib/utils').proxyRequest;
-
-
     grunt.initConfig({
         watch: {
             js: {
@@ -130,7 +127,9 @@ module.exports = function(grunt) {
                     'backgrid-select-all': 'backgrid-select-all/backgrid-select-all.min.js',
                     'moment/js': 'moment/min/moment.min.js',
                     'jquery-placeholder/js': 'jquery-placeholder/jquery.placeholder.js',
-                    'platform': 'platform/platform.js'
+                    'platform': 'platform/platform.js',
+                    'jQueryQueryBuilder/js': 'jQuery-QueryBuilder/dist/js/query-builder.standalone.min.js',
+                    'bootstrap-daterangepicker/js': 'bootstrap-daterangepicker/daterangepicker.js'
                 }
             },
             css: {
@@ -149,7 +148,9 @@ module.exports = function(grunt) {
                     'select2/css': 'select2/dist/css/select2.min.css',
                     'backgrid-select-all': 'backgrid-select-all/backgrid-select-all.min.css',
                     'font-awesome/css': 'font-awesome/css/font-awesome.min.css',
-                    'font-awesome/fonts': 'font-awesome/fonts'
+                    'font-awesome/fonts': 'font-awesome/fonts',
+                    'jQueryQueryBuilder/css': 'jQuery-QueryBuilder/dist/css/query-builder.default.min.css',
+                    'bootstrap-daterangepicker/css': 'bootstrap-daterangepicker/daterangepicker.css'
                 }
 
             },
@@ -177,13 +178,19 @@ module.exports = function(grunt) {
                     'dagre-d3': 'dagre-d3/LICENSE',
                     'backgrid-select-all': 'backgrid-select-all/LICENSE-MIT',
                     'jquery-placeholder': 'jquery-placeholder/LICENSE.txt',
-                    'platform/': 'platform/LICENSE'
+                    'platform/': 'platform/LICENSE',
+                    'jQueryQueryBuilder/': 'jQuery-QueryBuilder/LICENSE'
                 }
             }
         },
         sass: {
             dist: {
                 files: {
+                    'dist/css/style.css': 'public/css/scss/style.scss'
+                }
+            },
+            build: {
+                files: {
                     'dist/css/style.css': 'dist/css/scss/style.scss'
                 }
             }
@@ -192,7 +199,13 @@ module.exports = function(grunt) {
             dist: {
                 expand: true,
                 cwd: modulesPath,
-                src: ['**', '!**/*.sass'],
+                src: ['**', '!**/scss/**'],
+                dest: distPath
+            },
+            build: {
+                expand: true,
+                cwd: modulesPath,
+                src: ['**'],
                 dest: distPath
             }
         },
@@ -201,6 +214,41 @@ module.exports = function(grunt) {
             options: {
                 force: true
             }
+        },
+        uglify: {
+            build: {
+                files: [{
+                    expand: true,
+                    cwd: 'dist/js',
+                    src: '**/*.js',
+                    dest: 'dist/js'
+                }]
+            }
+        },
+        cssmin: {
+            build: {
+                files: [{
+                    expand: true,
+                    cwd: 'dist/css',
+                    src: '*.css',
+                    dest: 'dist/css'
+                }]
+            }
+
+        },
+        htmlmin: {
+            build: {
+                options: {
+                    removeComments: true,
+                    collapseWhitespace: true
+                },
+                files: [{
+                    expand: true,
+                    cwd: 'dist/js/templates',
+                    src: '**/*.html',
+                    dest: 'dist/js/templates'
+                }]
+            }
         }
     });
 
@@ -208,7 +256,9 @@ module.exports = function(grunt) {
     grunt.loadNpmTasks('grunt-contrib-connect');
     grunt.loadNpmTasks('grunt-contrib-watch');
     grunt.loadNpmTasks('grunt-npmcopy');
-
+    grunt.loadNpmTasks('grunt-contrib-uglify');
+    grunt.loadNpmTasks('grunt-contrib-cssmin');
+    grunt.loadNpmTasks('grunt-contrib-htmlmin');
 
     require('load-grunt-tasks')(grunt);
 
@@ -226,33 +276,45 @@ module.exports = function(grunt) {
         'npmcopy:css',
         'npmcopy:license',
         'copy:dist',
-        'sass',
+        'sass:dist',
         'configureProxies:server',
         'connect:server',
-        /* 'concurrent',*/
-        'watch',
-        /*'connect:livereload'*/
+        'watch'
     ]);
 
     grunt.registerTask('build', [
+        'clean',
+        'npmcopy:js',
+        'npmcopy:css',
+        'npmcopy:license',
+        'copy:build',
+        'sass:build'
+    ]);
+
+    grunt.registerTask('dev-minify', [
+        'clean',
         'npmcopy:js',
         'npmcopy:css',
         'npmcopy:license',
         'copy:dist',
-        'sass'
+        'sass:dist',
+        'uglify:build',
+        'cssmin:build',
+        'htmlmin:build',
+        'configureProxies:server',
+        'connect:server',
+        'watch'
     ]);
 
-    grunt.registerTask('minify', 'Minify the all js', function() {
-        var done = this.async();
-        grunt.task.run(['shell:min']);
-        done();
-    });
-    grunt.registerTask('release', 'Create release package', function() {
-        var done = this.async();
-        git.short(function(str) {
-            gitHash = str;
-            grunt.task.run(['minify', 'compress:release']);
-            done();
-        });
-    });
+    grunt.registerTask('build-minify', [
+        'clean',
+        'npmcopy:js',
+        'npmcopy:css',
+        'npmcopy:license',
+        'copy:build',
+        'sass:build',
+        'uglify:build',
+        'cssmin:build',
+        'htmlmin:build'
+    ]);
 };

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/dashboardv2/package.json
----------------------------------------------------------------------
diff --git a/dashboardv2/package.json b/dashboardv2/package.json
index 8924f71..59889d3 100644
--- a/dashboardv2/package.json
+++ b/dashboardv2/package.json
@@ -28,10 +28,12 @@
     "backgrid-select-all": "^0.3.5",
     "backgrid-sizeable-columns": "^0.1.1",
     "bootstrap": "^3.3.5",
+    "bootstrap-daterangepicker": "^2.1.25",
     "d3": "^3.5.16",
     "d3-tip": "^0.6.7",
     "dagre-d3": "^0.4.17",
     "font-awesome": "^4.6.3",
+    "jQuery-QueryBuilder": "^2.4.3",
     "jquery": "^2.2.2",
     "jquery-asBreadcrumbs": "^0.2.1",
     "jquery-placeholder": "^2.3.1",
@@ -55,7 +57,10 @@
     "grunt-contrib-compress": "^0.13.0",
     "grunt-contrib-connect": "^1.0.0",
     "grunt-contrib-copy": "~0.8.0",
+    "grunt-contrib-cssmin": "^2.0.0",
+    "grunt-contrib-htmlmin": "^2.2.0",
     "grunt-contrib-jshint": "^0.11.0",
+    "grunt-contrib-uglify": "^2.1.0",
     "grunt-contrib-watch": "^0.6.1",
     "grunt-dev-update": "^1.0.2",
     "grunt-jsbeautifier": "^0.2.6",

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/dashboardv2/public/css/scss/form.scss
----------------------------------------------------------------------
diff --git a/dashboardv2/public/css/scss/form.scss b/dashboardv2/public/css/scss/form.scss
index 3ee94f5..9989e7c 100644
--- a/dashboardv2/public/css/scss/form.scss
+++ b/dashboardv2/public/css/scss/form.scss
@@ -166,6 +166,10 @@ button:focus {
     margin-bottom: 10px;
     border-radius: 4px;
     padding: 5px 10px;
+    &.active {
+        background-color: $color_keppel_approx;
+        color: $white;
+    }
     &:hover {
         background-color: $color_keppel_approx;
         color: $white;

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/dashboardv2/public/css/scss/override.scss
----------------------------------------------------------------------
diff --git a/dashboardv2/public/css/scss/override.scss b/dashboardv2/public/css/scss/override.scss
index 2852f80..6821d77 100644
--- a/dashboardv2/public/css/scss/override.scss
+++ b/dashboardv2/public/css/scss/override.scss
@@ -46,6 +46,7 @@
     position: relative;
     padding: 15px;
     max-height: 400px;
+    min-height: 70px;
     overflow: auto;
 }
 
@@ -265,3 +266,23 @@
     margin-left: 5px;
     cursor: pointer;
 }
+
+.query-builder .rule-container .rule-value-container {
+    display: inline-block !important;
+}
+
+.rules-group-header .btn-group.pull-right.group-actions {
+    float: left !important;
+}
+
+.query-builder .rules-list>:first-child::before {
+    top: -8px;
+}
+
+.query-builder .rules-group-header .btn-group.group-conditions label {
+    display: none;
+}
+
+.query-builder .rule-value-container input {
+    padding: 6px 12px !important;
+}

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/dashboardv2/public/css/scss/search.scss
----------------------------------------------------------------------
diff --git a/dashboardv2/public/css/scss/search.scss b/dashboardv2/public/css/scss/search.scss
index 8c3dbec..2bce210 100644
--- a/dashboardv2/public/css/scss/search.scss
+++ b/dashboardv2/public/css/scss/search.scss
@@ -114,3 +114,20 @@ $switchTransition: .4s ease-out;
         color: $gray
     }
 }
+
+.filterQuery {
+    word-break: break-all;
+    span {
+        font-size: 15px;
+        font-weight: bold;
+    }
+    .key {
+        color: $color_jungle_green_approx;
+    }
+    .operator {
+        color: $action_gray;
+    }
+    .value {
+        color: $tag_color;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/dashboardv2/public/index.html
----------------------------------------------------------------------
diff --git a/dashboardv2/public/index.html b/dashboardv2/public/index.html
index 5fff304..b460686 100644
--- a/dashboardv2/public/index.html
+++ b/dashboardv2/public/index.html
@@ -45,12 +45,13 @@
     <link rel="stylesheet" href="js/libs/select2/css/select2.min.css">
     <link rel="stylesheet" href="js/libs/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="js/libs/jquery-asBreadcrumbs/css/asBreadcrumbs.min.css">
-    <link rel="stylesheet" href="js/external_lib/datetimepicker/bootstrap-datetimepicker.min.css">
     <link rel="stylesheet" href="css/googlefonts.css" type='text/css'>
     <link rel="stylesheet" type="text/css" href="js/external_lib/jquery-ui/jquery-ui.min.css">
     <link href="css/bootstrap-sidebar.css" rel="stylesheet">
     <link href="js/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet">
     <link href="js/external_lib/pnotify/pnotify.custom.min.css" rel="stylesheet">
+    <link href="js/libs/jQueryQueryBuilder/css/query-builder.default.min.css" rel="stylesheet">
+    <link href="js/libs/bootstrap-daterangepicker/css/daterangepicker.css" rel="stylesheet">
     <link href="css/style.css" rel="stylesheet">
 </head>
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/dashboardv2/public/js/collection/VSearchList.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/collection/VSearchList.js b/dashboardv2/public/js/collection/VSearchList.js
index 6a84943..6291838 100644
--- a/dashboardv2/public/js/collection/VSearchList.js
+++ b/dashboardv2/public/js/collection/VSearchList.js
@@ -39,6 +39,17 @@ define(['require',
                 this.queryText = resp.queryText;
                 return resp.entities ? resp.entities : [];
             },
+            getBasicRearchResult: function(options) {
+                var url = UrlLinks.searchApiUrl('basic');
+
+                options = _.extend({
+                    contentType: 'application/json',
+                    dataType: 'json',
+                }, options);
+                options.data = JSON.stringify(options.data);
+
+                return this.constructor.nonCrudOperation.call(this, url, 'POST', options);
+            }
         },
         //Static Class Members
         {

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/9a4ed469/dashboardv2/public/js/collection/VTagList.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/collection/VTagList.js b/dashboardv2/public/js/collection/VTagList.js
index 9304858..146fd10 100644
--- a/dashboardv2/public/js/collection/VTagList.js
+++ b/dashboardv2/public/js/collection/VTagList.js
@@ -26,7 +26,7 @@ define(['require',
     var VTagList = BaseCollection.extend(
         //Prototypal attributes
         {
-            url: UrlLinks.typesClassicationApiUrl(),
+            url: UrlLinks.classificationDefApiUrl(),
             model: VTag,
             initialize: function() {
                 this.modelName = 'VTag';


Mime
View raw message