[
https://issues.apache.org/jira/browse/KYLIN-3528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16618849#comment-16618849
]
ASF GitHub Bot commented on KYLIN-3528:
---------------------------------------
luguosheng1314 closed pull request #236: KYLIN-3528 Add details page for hybrid
URL: https://github.com/apache/kylin/pull/236
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/webapp/app/js/controllers/hybridInstance.js
b/webapp/app/js/controllers/hybridInstance.js
index cdf1e40ca7..236eefc14c 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 cb59fab4ff..7a0ca18b8c 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 0000000000..72e77a7fc6
--- /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 d2064a29de..c0645251fd 100644
--- a/webapp/app/partials/models/models_tree.html
+++ b/webapp/app/partials/models/models_tree.html
@@ -90,7 +90,7 @@ <h3 class="text-info">Hybrids
({{hybridInstanceManager.hybridInstances.length}})
</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 @@ <h3 class="text-info">Hybrids
({{hybridInstanceManager.hybridInstances.length}})
</div>
<div ng-include="'partials/models/model_detail.html'"></div>
+<div ng-include="'partials/cubes/hybrid_detail.html'"></div>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> No details page for hybrid
> --------------------------
>
> Key: KYLIN-3528
> URL: https://issues.apache.org/jira/browse/KYLIN-3528
> Project: Kylin
> Issue Type: Improvement
> Components: Web
> Reporter: Na Zhai
> Assignee: Roger
> Priority: Minor
> Fix For: v2.6.0
>
>
> When I click hybrid name, there is no detail page for that hybrid.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)