From 4a065239047275c59c9f92c85703fbb42103e661 Mon Sep 17 00:00:00 2001 From: Miguel Fernandes Date: Sat, 22 Apr 2017 12:39:48 +0200 Subject: [PATCH 1/4] Upgrade to 1.6.4 and general upgrade of modules --- marble-core/bower.json | 42 ++++++++----------- marble-core/src/main/resources/web/index.html | 5 +-- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/marble-core/bower.json b/marble-core/bower.json index b1a8214..bb436c2 100644 --- a/marble-core/bower.json +++ b/marble-core/bower.json @@ -21,44 +21,38 @@ ], "dependencies": { "rdash-ui": "1.0.*", - "font-awesome": "~4.5.0", + "font-awesome": "4.7.0", "bootstrap": "~3.3.5", "angular-bootstrap-datetimepicker": "~0.4", - "metisMenu": "1.1.3", - "angular-ui-grid": "3.0.7", + "angular-ui-grid": "4.0.3", "open-sans-fontface": "1.4.2", + "metisMenu": "2.7.0", - "jquery": "3.1.0", - "datatables": "1.10.7", - "datatables-plugins": "1.10.7", - "angular-datatables": "0.5.0", + "jquery": "2.2.4", "angular-loading-bar": "0.8.0", "angular-toggle-switch": "1.3.0", - "angularjs": "1.4.7", - "angular-ui-router": "0.2.15", - "angular-ui-router-title": "0.0.4", + "angularjs": "1.6.4", + "angular-ui-router": "0.4.2", + "angular-ui-router-title": "0.1.1", "json3": "3.3.2", - "oclazyload": "1.0.5", + "oclazyload": "1.1.0", "angular-bootstrap": "0.14.3", - "es5-shim": "4.1.13", - "angular-resource": "1.4.7", - "angular-cookies": "1.4.6", - "angular-sanitize": "1.4.7", - "angular-animate": "1.4.7", - "angular-touch": "1.4.7", - "angular-route": "1.4.7", - "angular-chart.js": "0.8.5", - "ng-file-upload": "9.0.13", - "chartist": "0.9.4", - "angular-chartist.js": "3.3.9" - + "es5-shim": "4.5.9", + "angular-resource": "1.6.4", + "angular-cookies": "1.6.4", + "angular-sanitize": "1.6.4", + "angular-animate": "1.6.4", + "angular-touch": "1.6.4", + "angular-route": "1.6.4", + "angular-chart.js": "1.1.0", + "ng-file-upload": "12.2.13" }, "repository": { "type": "git", "url": "https://github.com/rdash/rdash-angular" }, "resolutions": { - "angular": "~1.4.7" + "angular": "1.6.4" } } diff --git a/marble-core/src/main/resources/web/index.html b/marble-core/src/main/resources/web/index.html index 09452f2..23ca94d 100644 --- a/marble-core/src/main/resources/web/index.html +++ b/marble-core/src/main/resources/web/index.html @@ -20,9 +20,7 @@ - - - @@ -59,7 +56,7 @@ --> - From 35383b4eb08180e2ede275568a93ea23c8df35dc Mon Sep 17 00:00:00 2001 From: Miguel Fernandes Date: Sun, 23 Apr 2017 10:10:31 +0200 Subject: [PATCH 2/4] Adaptable table and ui-sref instead of ngclick this allows to middle click and open in new window/tab. --- .../controllers/chart/chartListController.js | 18 ++++-------------- .../js/controllers/job/jobListController.js | 18 ++++-------------- .../js/controllers/login/loginController.js | 2 +- .../js/controllers/post/postListController.js | 18 ++++-------------- .../generalPropertyListController.js | 10 +++------- .../twitterApiKeyListController.js | 10 +++------- .../controllers/topic/topicListController.js | 10 +++------- .../src/main/resources/web/sass/styles.sass | 14 ++++++++++++++ 8 files changed, 36 insertions(+), 64 deletions(-) diff --git a/marble-core/src/main/resources/web/js/controllers/chart/chartListController.js b/marble-core/src/main/resources/web/js/controllers/chart/chartListController.js index e07bb7c..0a13e4e 100644 --- a/marble-core/src/main/resources/web/js/controllers/chart/chartListController.js +++ b/marble-core/src/main/resources/web/js/controllers/chart/chartListController.js @@ -11,18 +11,6 @@ angular $scope.tableState.page = "0"; $scope.tableState.sort = ""; - $scope.view = function(chartId) { - $state.go('dashboard.chart.view', { - 'chartId' : chartId - }); - }; - - $scope.viewTopic = function(topicName) { - $state.go('dashboard.topic.view', { - 'topicName' : topicName - }); - }; - $scope.gridOptions = { data : 'gridData', rowHeight : 40, @@ -36,7 +24,7 @@ angular { field : 'topicName', displayName : 'Topic', - cellTemplate : '' + cellTemplate : '' }, { field : 'name', @@ -61,7 +49,7 @@ angular name : 'actions', displayName : 'Actions', enableFiltering : false, - cellTemplate : '' + cellTemplate : '' } ], onRegisterApi : function(gridApi) { $scope.gridApi = gridApi; @@ -90,6 +78,8 @@ angular $scope.gridApi.pagination.on.paginationChanged($scope, function(newPage, pageSize) { $scope.tableState.size = pageSize; $scope.tableState.page = newPage - 1; + $scope.gridOptions.minRowsToShow = pageSize; + $scope.gridOptions.virtualizationThreshold = pageSize; updateTable($scope); }); } diff --git a/marble-core/src/main/resources/web/js/controllers/job/jobListController.js b/marble-core/src/main/resources/web/js/controllers/job/jobListController.js index 12d84d9..bb56c83 100644 --- a/marble-core/src/main/resources/web/js/controllers/job/jobListController.js +++ b/marble-core/src/main/resources/web/js/controllers/job/jobListController.js @@ -9,18 +9,6 @@ function ($scope, $compile, $state, JobsSearchByTopicNameFactory) { $scope.tableState.page = "0"; $scope.tableState.sort = ""; - $scope.view = function(jobId) { - $state.go('dashboard.job.view', { - 'jobId' : jobId - }); - }; - - $scope.viewTopic = function(topicName) { - $state.go('dashboard.topic.view', { - 'topicName' : topicName - }); - }; - $scope.gridOptions = { data : 'gridData', rowHeight : 40, @@ -34,7 +22,7 @@ function ($scope, $compile, $state, JobsSearchByTopicNameFactory) { { field : 'topicName', displayName : 'Topic', - cellTemplate : '' + cellTemplate : '' }, { field : 'type', @@ -57,7 +45,7 @@ function ($scope, $compile, $state, JobsSearchByTopicNameFactory) { name : 'actions', displayName : 'Actions', enableFiltering : false, - cellTemplate : '' + cellTemplate : '' } ], onRegisterApi : function(gridApi) { $scope.gridApi = gridApi; @@ -87,6 +75,8 @@ function ($scope, $compile, $state, JobsSearchByTopicNameFactory) { newPage, pageSize) { $scope.tableState.size = pageSize; $scope.tableState.page = newPage - 1; + $scope.gridOptions.minRowsToShow = pageSize; + $scope.gridOptions.virtualizationThreshold = pageSize; updateTable($scope); }); } diff --git a/marble-core/src/main/resources/web/js/controllers/login/loginController.js b/marble-core/src/main/resources/web/js/controllers/login/loginController.js index 4994aa7..1408bf0 100644 --- a/marble-core/src/main/resources/web/js/controllers/login/loginController.js +++ b/marble-core/src/main/resources/web/js/controllers/login/loginController.js @@ -31,7 +31,7 @@ angular.module('marbleCoreApp').constant('AuthLevels', { $scope.logout = function() { Auth.logout(); this.currentUser = {}; - $state.go('home', {}, { reload: true }); + $state.go('dashboard.home', {}, { reload: true }); } $scope.auth = function(credentials) { diff --git a/marble-core/src/main/resources/web/js/controllers/post/postListController.js b/marble-core/src/main/resources/web/js/controllers/post/postListController.js index 37e5e12..4b36a63 100644 --- a/marble-core/src/main/resources/web/js/controllers/post/postListController.js +++ b/marble-core/src/main/resources/web/js/controllers/post/postListController.js @@ -9,18 +9,6 @@ function ($scope, $compile, $state, PostsSearchByTopicNameFactory) { $scope.tableState.page = "0"; $scope.tableState.sort = ""; - $scope.view = function(postId) { - $state.go('dashboard.post.view', { - 'postId' : postId - }); - }; - - $scope.viewTopic = function(topicName) { - $state.go('dashboard.topic.view', { - 'topicName' : topicName - }); - }; - $scope.gridOptions = { data : 'gridData', rowHeight : 40, @@ -34,7 +22,7 @@ function ($scope, $compile, $state, PostsSearchByTopicNameFactory) { { field : 'topicName', displayName : 'Topic', - cellTemplate : '' + cellTemplate : '' }, { field : 'text', @@ -52,7 +40,7 @@ function ($scope, $compile, $state, PostsSearchByTopicNameFactory) { name : 'actions', displayName : 'Actions', enableFiltering : false, - cellTemplate : '' + cellTemplate : '' } ], onRegisterApi : function(gridApi) { $scope.gridApi = gridApi; @@ -82,6 +70,8 @@ function ($scope, $compile, $state, PostsSearchByTopicNameFactory) { newPage, pageSize) { $scope.tableState.size = pageSize; $scope.tableState.page = newPage - 1; + $scope.gridOptions.minRowsToShow = pageSize; + $scope.gridOptions.virtualizationThreshold = pageSize; updateTable($scope); }); } diff --git a/marble-core/src/main/resources/web/js/controllers/settings/generalProperty/generalPropertyListController.js b/marble-core/src/main/resources/web/js/controllers/settings/generalProperty/generalPropertyListController.js index fbde1a5..f0dbc9e 100644 --- a/marble-core/src/main/resources/web/js/controllers/settings/generalProperty/generalPropertyListController.js +++ b/marble-core/src/main/resources/web/js/controllers/settings/generalProperty/generalPropertyListController.js @@ -9,12 +9,6 @@ function ($scope, $compile, $state, $timeout, GeneralPropertiesSearchByNameFacto $scope.tableState.page = "0"; $scope.tableState.sort = ""; - $scope.edit = function(generalPropertyName) { - $state.go('dashboard.settings.generalProperty.view', { - 'generalPropertyName' : generalPropertyName - }); - }; - $scope.create = function() { $state.go('dashboard.settings.generalProperty.create'); }; @@ -42,7 +36,7 @@ function ($scope, $compile, $state, $timeout, GeneralPropertiesSearchByNameFacto name : 'actions', displayName : 'Actions', enableFiltering : false, - cellTemplate : '' + cellTemplate : '' } ], onRegisterApi : function(gridApi) { $scope.gridApi = gridApi; @@ -71,6 +65,8 @@ function ($scope, $compile, $state, $timeout, GeneralPropertiesSearchByNameFacto newPage, pageSize) { $scope.tableState.size = pageSize; $scope.tableState.page = newPage - 1; + $scope.gridOptions.minRowsToShow = pageSize; + $scope.gridOptions.virtualizationThreshold = pageSize; updateTable($scope); }); } diff --git a/marble-core/src/main/resources/web/js/controllers/settings/twitterApiKey/twitterApiKeyListController.js b/marble-core/src/main/resources/web/js/controllers/settings/twitterApiKey/twitterApiKeyListController.js index 820090f..16a0c1a 100644 --- a/marble-core/src/main/resources/web/js/controllers/settings/twitterApiKey/twitterApiKeyListController.js +++ b/marble-core/src/main/resources/web/js/controllers/settings/twitterApiKey/twitterApiKeyListController.js @@ -8,12 +8,6 @@ function ($scope, $compile, $state, TwitterApiKeysFactory) { $scope.tableState.page = "0"; $scope.tableState.sort = ""; - $scope.edit = function(twitterApiKeyName) { - $state.go('dashboard.settings.twitterApiKey.view', { - 'twitterApiKeyName' : twitterApiKeyName - }); - }; - $scope.create = function() { $state.go('dashboard.settings.twitterApiKey.create'); }; @@ -37,7 +31,7 @@ function ($scope, $compile, $state, TwitterApiKeysFactory) { { name : 'actions', displayName : 'Actions', - cellTemplate : '' + cellTemplate : '' } ], onRegisterApi : function(gridApi) { $scope.gridApi = gridApi; @@ -56,6 +50,8 @@ function ($scope, $compile, $state, TwitterApiKeysFactory) { newPage, pageSize) { $scope.tableState.size = pageSize; $scope.tableState.page = newPage - 1; + $scope.gridOptions.minRowsToShow = pageSize; + $scope.gridOptions.virtualizationThreshold = pageSize; updateTable($scope); }); } diff --git a/marble-core/src/main/resources/web/js/controllers/topic/topicListController.js b/marble-core/src/main/resources/web/js/controllers/topic/topicListController.js index 00d1acc..1f57452 100644 --- a/marble-core/src/main/resources/web/js/controllers/topic/topicListController.js +++ b/marble-core/src/main/resources/web/js/controllers/topic/topicListController.js @@ -9,12 +9,6 @@ function ($scope, $compile, $state, TopicsFactory, TopicsSearchByNameFactory) { $scope.tableState.page = "0"; $scope.tableState.sort = ""; - $scope.edit = function(topicName) { - $state.go('dashboard.topic.view', { - 'topicName' : topicName - }); - }; - $scope.create = function() { $state.go('dashboard.topic.create'); }; @@ -42,7 +36,7 @@ function ($scope, $compile, $state, TopicsFactory, TopicsSearchByNameFactory) { name : 'actions', displayName : 'Actions', enableFiltering : false, - cellTemplate : '' + cellTemplate : '' } ], onRegisterApi : function(gridApi) { $scope.gridApi = gridApi; @@ -72,6 +66,8 @@ function ($scope, $compile, $state, TopicsFactory, TopicsSearchByNameFactory) { newPage, pageSize) { $scope.tableState.size = pageSize; $scope.tableState.page = newPage - 1; + $scope.gridOptions.minRowsToShow = pageSize; + $scope.gridOptions.virtualizationThreshold = pageSize; updateTable($scope); }); } diff --git a/marble-core/src/main/resources/web/sass/styles.sass b/marble-core/src/main/resources/web/sass/styles.sass index 8b0e179..7f1c093 100644 --- a/marble-core/src/main/resources/web/sass/styles.sass +++ b/marble-core/src/main/resources/web/sass/styles.sass @@ -342,10 +342,24 @@ body .ui-grid border: 1px solid #D4D4D4 border-radius: 2px + height: auto !important + +.ui-grid-viewport + //height: auto !important .ui-grid-cell-contents padding: 8px +.ui-grid-pager-panel + position: relative + left: 0 + bottom: 0 + width: 100% + padding-top: 13px + padding-bottom: 3px + box-sizing: content-box + display: inline-block + /* Custom Navbar .navbar-default From 2965847113ed464f2464c3f48c81a675aac2c736 Mon Sep 17 00:00:00 2001 From: Miguel Fernandes Date: Sun, 23 Apr 2017 10:22:55 +0200 Subject: [PATCH 3/4] Added Topic Name to Job view --- .../src/main/resources/web/templates/views/job/view.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/marble-core/src/main/resources/web/templates/views/job/view.html b/marble-core/src/main/resources/web/templates/views/job/view.html index 20bc921..5477554 100644 --- a/marble-core/src/main/resources/web/templates/views/job/view.html +++ b/marble-core/src/main/resources/web/templates/views/job/view.html @@ -66,6 +66,10 @@

Type {{job.type}} + + Topic + {{job.topicName}} + Created At From 42e0a62b650e91cfaafb87ffbe4b75060323aece Mon Sep 17 00:00:00 2001 From: Miguel Fernandes Date: Sun, 23 Apr 2017 12:13:45 +0200 Subject: [PATCH 4/4] Fixed visualized limits in topics. --- .../src/main/java/org/marble/model/domain/model/Topic.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/marble-model/src/main/java/org/marble/model/domain/model/Topic.java b/marble-model/src/main/java/org/marble/model/domain/model/Topic.java index d620297..3cb2509 100644 --- a/marble-model/src/main/java/org/marble/model/domain/model/Topic.java +++ b/marble-model/src/main/java/org/marble/model/domain/model/Topic.java @@ -11,10 +11,12 @@ import org.hibernate.validator.constraints.NotEmpty; import org.marble.model.model.JobParameters; +import org.marble.util.LongSerializer; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; @Document(collection = "topics") @JsonIgnoreProperties({ "changeSet", "executions" }) @@ -32,9 +34,11 @@ public class Topic implements Serializable { private String keywords; @Digits(fraction = 0, integer = 24) + @JsonSerialize(using = LongSerializer.class) private Long upperLimit; @Digits(fraction = 0, integer = 24) + @JsonSerialize(using = LongSerializer.class) private Long lowerLimit; @Pattern(regexp = "[a-zA-Z]{2}|")