You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by bo...@apache.org on 2018/09/18 10:16:16 UTC
[kylin] branch master updated: KYLIN-3528 Add details page for
hybrid
This is an automated email from the ASF dual-hosted git repository.
boblu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push:
new 51fa4d0 KYLIN-3528 Add details page for hybrid
51fa4d0 is described below
commit 51fa4d059a7c90f448af58fa261396647e1e1bb6
Author: Emiya0306 <wo...@qq.com>
AuthorDate: Tue Sep 18 18:13:44 2018 +0800
KYLIN-3528 Add details page for hybrid
---
webapp/app/js/controllers/hybridInstance.js | 26 +++++++++-
webapp/app/less/app.less | 11 ++++-
webapp/app/partials/cubes/hybrid_detail.html | 71 ++++++++++++++++++++++++++++
webapp/app/partials/models/models_tree.html | 3 +-
4 files changed, 107 insertions(+), 4 deletions(-)
diff --git a/webapp/app/js/controllers/hybridInstance.js b/webapp/app/js/controllers/hybridInstance.js
index cdf1e40..236eefc 100644
--- a/webapp/app/js/controllers/hybridInstance.js
+++ b/webapp/app/js/controllers/hybridInstance.js
@@ -19,7 +19,7 @@
'use strict';
KylinApp.controller('HybridInstanceCtrl', function (
- $scope, $q, $location,
+ $scope, $q, $location, $modal,
ProjectModel, hybridInstanceManager, SweetAlert, HybridInstanceService, loadingRequest, MessageBox
) {
$scope.projectModel = ProjectModel;
@@ -52,6 +52,30 @@ KylinApp.controller('HybridInstanceCtrl', function (
$scope.list();
});
+ var HybridDetailModalCtrl = function ($scope, $modalInstance, hybrid) {
+ $scope.hybrid = hybrid;
+ $scope.hybridModels = [{
+ name: hybrid.model
+ }];
+
+ $scope.cancel = function () {
+ $modalInstance.dismiss('cancel');
+ };
+ };
+
+ $scope.openHybridDetailModal = function (hybrid) {
+ $modal.open({
+ templateUrl: 'hybridDetail.html',
+ controller: HybridDetailModalCtrl,
+ resolve: {
+ hybrid: function () {
+ return hybrid;
+ }
+ },
+ windowClass: 'hybrid-detail'
+ });
+ };
+
$scope.editHybridInstance = function(hybridInstance){
// check for empty project of header, break the operation.
if (ProjectModel.selectedProject === null) {
diff --git a/webapp/app/less/app.less b/webapp/app/less/app.less
index cb59fab..7a0ca18 100644
--- a/webapp/app/less/app.less
+++ b/webapp/app/less/app.less
@@ -963,7 +963,8 @@ div[ng-controller="ModelConditionsSettingsCtrl"] {
min-height: 100vh;
}
-div[ng-controller="HybridInstanceSchema"] {
+div[ng-controller="HybridInstanceSchema"],
+div.hybrid-detail {
.form-title {
margin-bottom: 43px;
}
@@ -1056,4 +1057,10 @@ div[ng-controller="HybridInstanceSchema"] {
.text-info {
font-size: 18px;
color: #263238;
-}
\ No newline at end of file
+}
+
+div.hybrid-detail {
+ .modal-dialog {
+ width: 600px;
+ }
+}
diff --git a/webapp/app/partials/cubes/hybrid_detail.html b/webapp/app/partials/cubes/hybrid_detail.html
new file mode 100644
index 0000000..72e77a7
--- /dev/null
+++ b/webapp/app/partials/cubes/hybrid_detail.html
@@ -0,0 +1,71 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
+<script type="text/ng-template" id="hybridDetail.html">
+ <div class="modal-header">
+ <h4>Hybrid Detail</h4>
+ </div>
+
+ <div class="modal-body">
+ <div class="form-group row">
+ <label class="col-xs-4 control-label no-padding-right font-color-default">Hybrid Name</label>
+ <div class="col-xs-8">
+ <input type="text" class="form-control" placeholder="Hybrid Name" ng-disabled="true" ng-model="hybrid.name">
+ </div>
+ </div>
+
+ <div class="split-line"></div>
+
+ <div class="row edit-operator">
+ <div class="col-xs-12">
+ <div class="dataTables_wrapper no-footer">
+ <div class="row table-header">
+ <label class="col-xs-4 control-label no-padding-right font-color-default" for="modelName">Model</label>
+ <div class="col-xs-8">
+ <div>
+ <select width="'100%'" chosen ng-options="model.name as model.name for model in hybridModels" ng-model="hybrid.model" ng-disabled="true"></select>
+ </div>
+ </div>
+ </div>
+ <div class="row fix-height-table">
+ <table class="table table-striped table-bordered table-hover dataTable no-footer ng-scope" ng-if="hybrid.realizations.length">
+ <thead>
+ <tr>
+ <th>Name</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="realization in hybrid.realizations">
+ <td>{{ realization.realization }}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div class="data-empty" ng-if="!hybrid.realizations.length">
+ Empty
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="modal-footer">
+ <button class="btn btn-warning" ng-click="cancel()">Close</button>
+ </div>
+</script>
\ No newline at end of file
diff --git a/webapp/app/partials/models/models_tree.html b/webapp/app/partials/models/models_tree.html
index d2064a2..c064525 100644
--- a/webapp/app/partials/models/models_tree.html
+++ b/webapp/app/partials/models/models_tree.html
@@ -90,7 +90,7 @@
</ul>
</div>
</div>
- <span class="strong"><a style="cursor: pointer;word-break:break-all;" ng-click="openHybridInstance(hybridInstance)">{{hybridInstance.name}}</a></span>
+ <span class="strong"><a style="cursor: pointer;word-break:break-all;" ng-click="openHybridDetailModal(hybridInstance)">{{hybridInstance.name}}</a></span>
</li>
</ul>
<div ng-if="hybridInstanceManager.loading === true"><i class="fa fa-2x fa-spinner fa-spin"></i> Loading..</div>
@@ -100,3 +100,4 @@
</div>
<div ng-include="'partials/models/model_detail.html'"></div>
+<div ng-include="'partials/cubes/hybrid_detail.html'"></div>