atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shweth...@apache.org
Subject incubator-atlas git commit: ATLAS-311 UI: Local storage for traits - caching [not cleared on refresh] To be cleared on time lapse for 1hr (Anilg via shwethags)
Date Wed, 20 Jan 2016 07:14:05 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master 64de52336 -> b93e9f356


ATLAS-311 UI: Local storage for traits - caching [not cleared on refresh] To be cleared on
time lapse for 1hr (Anilg via shwethags)


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

Branch: refs/heads/master
Commit: b93e9f3561c77449431c5d4243b37379c4dae626
Parents: 64de523
Author: Shwetha GS <sshivalingamurthy@hortonworks.com>
Authored: Wed Jan 20 12:44:00 2016 +0530
Committer: Shwetha GS <sshivalingamurthy@hortonworks.com>
Committed: Wed Jan 20 12:44:00 2016 +0530

----------------------------------------------------------------------
 dashboard/public/css/tags.css                   | 167 +++++++++----------
 .../modules/navigation/navigationController.js  |  15 +-
 .../modules/navigation/navigationResource.js    |   1 +
 .../modules/navigation/views/navigation.html    |  11 +-
 .../tags/definition/definitionTagsController.js |  12 +-
 .../modules/tags/definition/views/add.html      |  15 +-
 release-log.txt                                 |   1 +
 7 files changed, 126 insertions(+), 96 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/b93e9f35/dashboard/public/css/tags.css
----------------------------------------------------------------------
diff --git a/dashboard/public/css/tags.css b/dashboard/public/css/tags.css
index 69bfd52..f903b18 100644
--- a/dashboard/public/css/tags.css
+++ b/dashboard/public/css/tags.css
@@ -17,107 +17,106 @@
  */
 
 .add-tag {
-  margin-top: -50px;
-}
-.inputs input{
-	height: 50px;
-  border-radius: 0px;
-  border: 1px solid #e3e3e3;
-  color: #414141;
-  box-shadow: none;
-}
-.inputs .control-label{
-	padding: 15px;
-	padding-top: 15px !important;
-}
-.inputs button.addAttr, .inputs button.saveAttr{
-  height: 40px;
-  border-radius: 4px;
-  border: 1px solid #FFFFFF;
-  color: #fff;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  font-weight: bold;
-}
-.inputs button.addAttr{
-	background-color: #ff8e00;
-}
-.inputs pre{
-	border: 0;
-  border-top: 1px solid #ddd;
-  border-radius: 0;
-  margin-bottom: 0;
-  background-color: #dff0d8;
-  border-color: #d6e9c6;
-}
-.inputs button.remove{
-  position: absolute;
-  right: 28px;
-  bottom: 12px;
-  color: #FFFFFF;
-  border: 0;
-  border-radius: 4px;
-  background-color: #a94442;
-}
-.appForm .panel{
+    margin-top: -50px;
+}
+.inputs input {
+    height: 50px;
+    border-radius: 0px;
+    border: 1px solid #e3e3e3;
+    color: #414141;
+    box-shadow: none;
+}
+.inputs .control-label {
+    padding: 15px;
+    padding-top: 15px !important;
+}
+.inputs button.addAttr,
+.inputs button.saveAttr {
+    height: 40px;
+    border-radius: 4px;
+    border: 1px solid #FFFFFF;
+    color: #fff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    font-weight: bold;
+}
+.inputs button.addAttr {
+    background-color: #ff8e00;
+}
+.inputs pre {
+    border: 0;
+    border-top: 1px solid #ddd;
+    border-radius: 0;
+    margin-bottom: 0;
+    background-color: #dff0d8;
+    border-color: #d6e9c6;
+}
+.inputs button.remove {
+    position: absolute;
+    right: 28px;
+    bottom: 12px;
+    color: #FFFFFF;
+    border: 0;
+    border-radius: 4px;
+    background-color: #a94442;
+}
+.appForm .panel {
     border-radius: 0 !important;
 }
-.appForm .panel-footer{
+.appForm .panel-footer {
     margin-bottom: 0;
 }
-
-.appForm .panel-body{
+.appForm .panel-body {
     padding-bottom: 0;
 }
-
-.input-spacing{
-	padding-bottom: 10px!important;
+.input-spacing {
+    padding-bottom: 10px!important;
 }
-
-.create-tag-entity .modal-footer{
-	border-top: 0;
+.create-tag-entity .modal-footer {
+    border-top: 0;
 }
-
-.tag-list{
-	border:1px solid #ddd;
-	padding:10px;
-	background-color: #F5F5F5;
+.tag-list {
+    border: 1px solid #ddd;
+    padding: 10px;
+    background-color: #F5F5F5;
 }
-
-.tag-list ul{
-	padding-left: 0px;
+.tag-list ul {
+    padding-left: 0px;
 }
-
-.error{
-	color:red;
+.error {
+    color: red;
 }
-
-.tag-list ul li{
-	display: inline;
-	line-height: 30px;
-	border:none;
-	padding: 2px;
-	background-color: inherit;
-  padding-right: 20px !important;
+.tag-list ul li {
+    display: inline;
+    line-height: 30px;
+    border: none;
+    padding: 2px;
+    background-color: inherit;
+    padding-right: 20px !important;
 }
-.addTag{
-	text-align: center;
+.addTag {
+    text-align: center;
 }
-.addTag img{
-	cursor: pointer;
+.addTag img {
+    cursor: pointer;
 }
-.searchResults td{
-	border: 0;
+.searchResults td {
+    border: 0;
 }
-.tagalign{
-   margin-top: 14px;
+.tagalign {
+    margin-top: 14px;
 }
-.tagsAdded{
-  display: inline;
+.tagsAdded {
+    display: inline;
 }
-
 .noTags {
-  font-size: 24px;
-  font-weight: bold;
-  text-align: center;
+    font-size: 24px;
+    font-weight: bold;
+    text-align: center;
+}
+
+.mtop3 {
+    margin-top: 3px;
 }
+.mrt-8 {
+    margin-right: -8px;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/b93e9f35/dashboard/public/modules/navigation/navigationController.js
----------------------------------------------------------------------
diff --git a/dashboard/public/modules/navigation/navigationController.js b/dashboard/public/modules/navigation/navigationController.js
index 4602923..e21fd7e 100644
--- a/dashboard/public/modules/navigation/navigationController.js
+++ b/dashboard/public/modules/navigation/navigationController.js
@@ -17,8 +17,8 @@
  */
 'use strict';
 
-angular.module('dgc.navigation').controller('NavigationController', ['$scope', 'NavigationResource',
-    function($scope, NavigationResource) {
+angular.module('dgc.navigation').controller('NavigationController', ['$scope', 'NavigationResource',
'$cacheFactory',
+    function($scope, NavigationResource, $cacheFactory) {
 
         $scope.updateVar = function(event) {
             $scope.$$prevSibling.query = angular.element(event.target).text();
@@ -29,5 +29,16 @@ angular.module('dgc.navigation').controller('NavigationController', ['$scope',
'
             $scope.leftnav = NavigationResource.get();
         });
 
+        setTimeout(function() {
+         	var httpDefaultCache = $cacheFactory.get('$http');
+            httpDefaultCache.remove('/api/atlas/types?type=TRAIT');
+        }, 3600000);
+
+        $scope.refreshTags = function(){
+        	var httpDefaultCache = $cacheFactory.get('$http');
+        	httpDefaultCache.remove('/api/atlas/types?type=TRAIT');
+        	$scope.leftnav = NavigationResource.get();
+        }; 
+
     }
 ]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/b93e9f35/dashboard/public/modules/navigation/navigationResource.js
----------------------------------------------------------------------
diff --git a/dashboard/public/modules/navigation/navigationResource.js b/dashboard/public/modules/navigation/navigationResource.js
index 3d9797d..65fe150 100644
--- a/dashboard/public/modules/navigation/navigationResource.js
+++ b/dashboard/public/modules/navigation/navigationResource.js
@@ -24,6 +24,7 @@ angular.module('dgc.navigation').factory('NavigationResource', ['$resource',
fun
             'method': 'GET',
             'responseType': 'json',
             'isArray': true,
+            'cache' : true,
             'transformResponse': function(data) {
                 var results = [];
                 angular.forEach(data && data.results, function(val) {

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/b93e9f35/dashboard/public/modules/navigation/views/navigation.html
----------------------------------------------------------------------
diff --git a/dashboard/public/modules/navigation/views/navigation.html b/dashboard/public/modules/navigation/views/navigation.html
index 9b1a443..d882cf7 100644
--- a/dashboard/public/modules/navigation/views/navigation.html
+++ b/dashboard/public/modules/navigation/views/navigation.html
@@ -16,9 +16,14 @@
   ~ limitations under the License.
   -->
 
-<div data-ng-controller="NavigationController" class="mainTags leftNavigation">
-    <h4>Tags</h4>
+<div data-ng-controller="NavigationController" class="mainTags leftNavigation"> 
+    <div>
+       <h4 class="pull-left">Tags</h4>  
+       <a href ng-click="refreshTags()" class="pull-right"> <img src="../img/refresh.png"
style="margin: 5px;" title="Refresh Tags" ></a>
+    </div>
+    </br>
+    </br> 
     <div class="list-group">
-        <a ng-repeat="nav in leftnav" ui-sref="search({ query: nav })" class="list-group-item
limitSize" title="{{nav}}"><i class="fa fa-tag"></i> {{nav}} </a>
+       <a ng-repeat="nav in leftnav" ui-sref="search({ query: nav })" class="list-group-item
limitSize" title="{{nav}}"><i class="fa fa-tag"></i> {{nav}} </a>
     </div>
 </div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/b93e9f35/dashboard/public/modules/tags/definition/definitionTagsController.js
----------------------------------------------------------------------
diff --git a/dashboard/public/modules/tags/definition/definitionTagsController.js b/dashboard/public/modules/tags/definition/definitionTagsController.js
index 15a6b42..ba5f877 100755
--- a/dashboard/public/modules/tags/definition/definitionTagsController.js
+++ b/dashboard/public/modules/tags/definition/definitionTagsController.js
@@ -17,8 +17,8 @@
  */
 'use strict';
 
-angular.module('dgc.tags.definition').controller('DefinitionTagsController', ['$scope', '$resource',
'$state', '$stateParams', 'lodash', 'AttributeDefinition', 'TagClasses', 'TagsResource', 'NotificationService',
'NavigationResource',
-    function($scope, $resource, $state, $stateParams, _, AttributeDefinition, Categories,
TagsResource, NotificationService, NavigationResource) {
+angular.module('dgc.tags.definition').controller('DefinitionTagsController', ['$scope', '$resource',
'$state', '$stateParams', 'lodash', 'AttributeDefinition', 'TagClasses', 'TagsResource', 'NotificationService',
'NavigationResource', '$cacheFactory',
+    function($scope, $resource, $state, $stateParams, _, AttributeDefinition, Categories,
TagsResource, NotificationService, NavigationResource, $cacheFactory) {
         $scope.categoryList = Categories;
         $scope.category = 'TRAIT';
         $scope.tagModel = {
@@ -40,6 +40,12 @@ angular.module('dgc.tags.definition').controller('DefinitionTagsController',
['$
             $scope.categoryInst = Categories[$scope.category].clearTags();
         };
 
+        $scope.refreshTags = function(){
+            var httpDefaultCache = $cacheFactory.get('$http');
+            httpDefaultCache.remove('/api/atlas/types?type=TRAIT');
+            $scope.typesList = NavigationResource.get();
+        }; 
+
         $scope.save = function saveTag(form) {
             $scope.savedTag = null;
             if (form.$valid) {
@@ -53,6 +59,8 @@ angular.module('dgc.tags.definition').controller('DefinitionTagsController',
['$
                 TagsResource.save($scope.categoryInst.toJson()).$promise
                     .then(function TagCreateSuccess() {
                         NotificationService.info('"' + $scope.tagModel.typeName + '" has
been created', false);
+                        var httpDefaultCache = $cacheFactory.get('$http');
+                        httpDefaultCache.remove('/api/atlas/types?type=TRAIT');
                     }).catch(function TagCreateFailed(error) {
                         NotificationService.error(error.data.error, false);
                     }).finally(function() {

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/b93e9f35/dashboard/public/modules/tags/definition/views/add.html
----------------------------------------------------------------------
diff --git a/dashboard/public/modules/tags/definition/views/add.html b/dashboard/public/modules/tags/definition/views/add.html
index fdcc6d8..1e53f07 100755
--- a/dashboard/public/modules/tags/definition/views/add.html
+++ b/dashboard/public/modules/tags/definition/views/add.html
@@ -41,11 +41,16 @@
                   </div>
                   <div class="form-group">
                      <label class="control-label col-sm-2" for="ParentTag">Parent Tag</label>
-                      <div class="col-sm-4">
-                          <select ng-model="selectedParent" class="form-control h160"
id="ParentTag" name="ParentTag" multiple> 
-                              <option ng-repeat="data in typesList" title="{{data}}">{{data}}</option>
-                          </select>
-                      </div>
+                        <div class="col-sm-5 mrt-8"> 
+                               <select ng-model="selectedParent" class="form-control h160"
id="ParentTag" name="ParentTag" multiple> 
+                                   <option ng-repeat="data in typesList" title="{{data}}">{{data}}</option>
+                               </select>
+                        </div>
+                        <div class="mtop3"> 
+                           <a href ng-click="refreshTags()" class="pull-left"> 
+                               <img src="../img/refresh.png" title="Refreh parent tag
list">
+                           </a>
+                        </div>
                   </div>
                   <ng-form name="attributeForm">
                       <div class="form-group" data-ng-class="{'has-error': attributeForm.name.$invalid
&& attributeForm.name.$dirty}"

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/b93e9f35/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 52c0584..5f3fd06 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -7,6 +7,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset
 ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via
shwethags)
 
 ALL CHANGES:
+ATLAS-311 UI: Local storage for traits - caching [not cleared on refresh] To be cleared on
time lapse for 1hr (Anilg via shwethags)
 ATLAS-106 Store createTimestamp and modified timestamp separately for an entity (dkantor
via shwethags)
 ATLAS-433 Fix checkstyle issues for common and notification module (shwethags)
 ATLAS-183 Add a Hook in Storm to post the topology metadata (svenkat,yhemanth via shwethags)


Mime
View raw message