kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaofeng...@apache.org
Subject [01/31] incubator-kylin git commit: KYLIN-1101 add date format field for partition column
Date Thu, 05 Nov 2015 01:54:15 GMT
Repository: incubator-kylin
Updated Branches:
  refs/heads/KYLIN-1112 6ab480ce7 -> 4f468d33c


KYLIN-1101 add date format field for partition column


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

Branch: refs/heads/KYLIN-1112
Commit: 51495704e556858883fbc4a333da35e281ebb351
Parents: 25a210d
Author: jiazhong <jiazhong@ebay.com>
Authored: Thu Oct 29 17:22:58 2015 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Thu Nov 5 09:53:15 2015 +0800

----------------------------------------------------------------------
 webapp/app/js/model/cubeConfig.js                |  6 +++++-
 webapp/app/js/model/metaModel.js                 |  3 ++-
 .../modelDesigner/conditions_settings.html       | 19 +++++++++++++++++++
 3 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/51495704/webapp/app/js/model/cubeConfig.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/cubeConfig.js b/webapp/app/js/model/cubeConfig.js
index 3d80c7f..c7e1b44 100644
--- a/webapp/app/js/model/cubeConfig.js
+++ b/webapp/app/js/model/cubeConfig.js
@@ -71,5 +71,9 @@ KylinApp.constant('cubeConfig', {
     {attr: 'owner', name: 'Owner'},
     {attr: 'create_time', name: 'Create Time'}
   ],
-  streamingAutoGenerateMeasure:['year_start_ts','month_start_ts','day_start_ts','hour_start_ts','min_start_ts']
+  streamingAutoGenerateMeasure:['year_start_ts','month_start_ts','day_start_ts','hour_start_ts','min_start_ts'],
+  partitionDateFormatOpt:[
+    'yyyy-MM-dd',
+    'yyyyMMdd'
+  ]
 });

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/51495704/webapp/app/js/model/metaModel.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/model/metaModel.js b/webapp/app/js/model/metaModel.js
index 3c70822..e2d93b2 100644
--- a/webapp/app/js/model/metaModel.js
+++ b/webapp/app/js/model/metaModel.js
@@ -87,7 +87,8 @@ KylinApp.service('MetaModel',function(){
             "partition_desc" : {
                 "partition_date_column" : null,
                 "partition_date_start" : null,
-                "partition_type" : 'APPEND'
+                "partition_type" : 'APPEND',
+                "partition_date_format":'yyyy-MM-dd'
             },
             last_modified:0
         };

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/51495704/webapp/app/partials/modelDesigner/conditions_settings.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/modelDesigner/conditions_settings.html b/webapp/app/partials/modelDesigner/conditions_settings.html
index 6e836ee..6ee805c 100644
--- a/webapp/app/partials/modelDesigner/conditions_settings.html
+++ b/webapp/app/partials/modelDesigner/conditions_settings.html
@@ -73,6 +73,25 @@
             </div>
         </div>
 
+
+        <!--Date Format-->
+        <div class="form-group">
+          <div class="row">
+            <label class="control-label col-xs-12 col-sm-3 no-padding-right font-color-default"><b>Date
Format</b></label>
+            <div class="col-xs-12 col-sm-6">
+              <select style="width: 100%" chosen
+                      ng-required="modelsManager.selectedModel.partition_desc.partition_date_format"
+                      ng-model="modelsManager.selectedModel.partition_desc.partition_date_format"
+                      ng-if="state.mode=='edit'"
+                      data-placement=""
+                      ng-options="ddt as ddt for ddt in cubeConfig.partitionDateFormatOpt">
+                <option value="">--Select Date Format--</option>
+              </select>
+              <span ng-if="state.mode=='view'&&modelsManager.selectedModel.partition_desc.partition_date_column">{{(modelsManager.selectedModel.partition_desc.partition_date_format)}}</span>
+            </div>
+          </div>
+        </div>
+
           <div class="form-group" ng-show="userService.hasRole('ROLE_ADMIN')">
               <div class="row">
                   <label class="control-label col-xs-12 col-sm-3 no-padding-right font-color-default"><b>Cube
Size</b></label>


Mime
View raw message