mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
display svg icon
This commit is contained in:
parent
47de6d9684
commit
fb7a1471df
6 changed files with 20 additions and 9 deletions
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
angular.module('zeppelinWebApp').controller('HeliumCtrl', HeliumCtrl);
|
||||
|
||||
HeliumCtrl.$inject = ['$scope', '$rootScope', '$http', 'baseUrlSrv', 'ngToast'];
|
||||
HeliumCtrl.$inject = ['$scope', '$rootScope', '$http', '$sce', 'baseUrlSrv', 'ngToast'];
|
||||
|
||||
function HeliumCtrl($scope, $rootScope, $http, baseUrlSrv, ngToast) {
|
||||
function HeliumCtrl($scope, $rootScope, $http, $sce, baseUrlSrv, ngToast) {
|
||||
$scope.packageInfos = {};
|
||||
$scope.defaultVersions = {};
|
||||
|
||||
|
|
@ -27,7 +27,9 @@
|
|||
// show enabled version if any version of package is enabled
|
||||
for (var name in packageInfos) {
|
||||
var pkgs = packageInfos[name];
|
||||
for (var pkg in pkgs) {
|
||||
for (var pkgIdx in pkgs) {
|
||||
var pkg = pkgs[pkgIdx];
|
||||
pkg.pkg.icon = $sce.trustAsHtml(pkg.pkg.icon);
|
||||
if (pkg.enabled) {
|
||||
defaultVersions[name] = pkg;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ limitations under the License.
|
|||
style="margin-bottom:20px">
|
||||
<div class="col-md-12">
|
||||
<div style="height:25px">
|
||||
<div style="float:left;width:20px;height:20px"
|
||||
<div style="float:left;width:28px;height:22px;padding:2px;2px;2px;2px"
|
||||
ng-bind-html=pkgInfo.pkg.icon></div>
|
||||
<b style="float:left">{{pkgName}}</b>
|
||||
<div ng-show="!pkgInfo.enabled"
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import ScatterchartVisualization from '../../../visualization/builtins/visualiza
|
|||
'$http',
|
||||
'$q',
|
||||
'$templateRequest',
|
||||
'$sce',
|
||||
'websocketMsgSrv',
|
||||
'baseUrlSrv',
|
||||
'ngToast',
|
||||
|
|
@ -45,7 +46,7 @@ import ScatterchartVisualization from '../../../visualization/builtins/visualiza
|
|||
];
|
||||
|
||||
function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location,
|
||||
$timeout, $compile, $http, $q, $templateRequest, websocketMsgSrv,
|
||||
$timeout, $compile, $http, $q, $templateRequest, $sce, websocketMsgSrv,
|
||||
baseUrlSrv, ngToast, saveAsService, noteVarShareService, heliumService) {
|
||||
|
||||
/**
|
||||
|
|
@ -161,7 +162,7 @@ import ScatterchartVisualization from '../../../visualization/builtins/visualiza
|
|||
$scope.builtInTableDataVisualizationList.push({
|
||||
id: vis.id,
|
||||
name: vis.name,
|
||||
icon: vis.icon
|
||||
icon: $sce.trustAsHtml(vis.icon)
|
||||
});
|
||||
builtInVisualizations[vis.id] = {
|
||||
class: vis.class
|
||||
|
|
@ -435,7 +436,7 @@ import ScatterchartVisualization from '../../../visualization/builtins/visualiza
|
|||
builtInViz.instance.resize();
|
||||
});
|
||||
} catch (err) {
|
||||
console.log('Graph drawing error %o', err);
|
||||
console.error('Graph drawing error %o', err);
|
||||
}
|
||||
} else {
|
||||
$timeout(retryRenderer, 10);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@
|
|||
height: 30px;
|
||||
}
|
||||
|
||||
.result-chart-selector button svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.rotate90 {
|
||||
-webkit-transform: rotate(90deg);
|
||||
-moz-transform: rotate(90deg);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
if (response.substring(0, 'ERROR:'.length) !== 'ERROR:') {
|
||||
eval(response);
|
||||
} else {
|
||||
console.log(response);
|
||||
console.error(response);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,10 @@ public class HeliumVisualizationFactory {
|
|||
File tabledataModuleInstallPath = new File(workingDirectory,
|
||||
"node_modules/zeppelin-tabledata");
|
||||
if (tabledataModulePath != null && !tabledataModuleInstallPath.exists()) {
|
||||
FileUtils.copyDirectory(tabledataModulePath, tabledataModuleInstallPath, npmPackageCopyFilter);
|
||||
FileUtils.copyDirectory(
|
||||
tabledataModulePath,
|
||||
tabledataModuleInstallPath,
|
||||
npmPackageCopyFilter);
|
||||
}
|
||||
|
||||
// install visualization module
|
||||
|
|
|
|||
Loading…
Reference in a new issue