[ 
https://issues.apache.org/jira/browse/KYLIN-4511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17114114#comment-17114114
 ] 

ASF GitHub Bot commented on KYLIN-4511:
---------------------------------------

shaofengshi commented on a change in pull request #1225:
URL: https://github.com/apache/kylin/pull/1225#discussion_r429290527



##########
File path: webapp/app/js/controllers/sourceMeta.js
##########
@@ -131,6 +131,39 @@ KylinApp
       });
     };
 
+    $scope.calCardinality = function (tableName) {
+      SweetAlert.swal({
+        title: "",
+        text: "Are you sure to recalculate column cardinality?",
+        showCancelButton: true,
+        confirmButtonColor: '#DD6B55',
+        confirmButtonText: "Yes",
+        cancelButtonText: "No",
+        closeOnConfirm: true
+      }, function (isConfirm) {
+        if (isConfirm) {
+          if (!$scope.projectModel.selectedProject) {
+            SweetAlert.swal('', 'Please choose your project first!.', 'info');
+            return;
+          }
+          loadingRequest.show();
+          TableService.genCardinality({tableName: tableName, pro: 
$scope.projectModel.selectedProject}, {}, function () {
+            loadingRequest.hide();
+            MessageBox.successNotify('Cardinality job was calculated 
successfully. Please wait a moment...');

Review comment:
       Some suggestions on the sentence: 'Cardinality job has been submitted 
successfully. Please wait a while to get the numbers.'

##########
File path: webapp/app/js/controllers/sourceMeta.js
##########
@@ -131,6 +131,39 @@ KylinApp
       });
     };
 
+    $scope.calCardinality = function (tableName) {
+      SweetAlert.swal({
+        title: "",
+        text: "Are you sure to recalculate column cardinality?",
+        showCancelButton: true,
+        confirmButtonColor: '#DD6B55',
+        confirmButtonText: "Yes",
+        cancelButtonText: "No",
+        closeOnConfirm: true
+      }, function (isConfirm) {
+        if (isConfirm) {
+          if (!$scope.projectModel.selectedProject) {
+            SweetAlert.swal('', 'Please choose your project first!.', 'info');

Review comment:
       The message should be consistent with other parts in below: "Please 
select a project." And, please avoid using "!" in the sentence as its mood is 
too strong. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> Support project admin user to calculate column cardinality by web
> -----------------------------------------------------------------
>
>                 Key: KYLIN-4511
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4511
>             Project: Kylin
>          Issue Type: Improvement
>          Components: Web 
>            Reporter: Guangxu Cheng
>            Assignee: Guangxu Cheng
>            Priority: Major
>         Attachments: image-2020-05-21-13-56-19-962.png, 
> image-2020-05-21-13-57-29-350.png
>
>
> Now only the administrator of kylin can recalculate the cardinality of the 
> hive table through the admin web, but the project administrator cannot.
> Add an entry to calculate cardinality on the table detail web
>  # add calculate cardinality button 
> !image-2020-05-21-13-56-19-962.png|width=902,height=303!
>  # confirm !image-2020-05-21-13-57-29-350.png|width=901,height=280!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to