mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Add default msg to show when each package size is 0
This commit is contained in:
parent
899e8fa8eb
commit
d5ae4e2f04
2 changed files with 15 additions and 0 deletions
|
|
@ -277,4 +277,12 @@ function HeliumCtrl($scope, $rootScope, $sce, baseUrlSrv, ngToast, heliumService
|
|||
return (pkg.type === HeliumType.APPLICATION || pkg.type === HeliumType.INTERPRETER) &&
|
||||
!$scope.isLocalPackage(pkgSearchResult);
|
||||
};
|
||||
|
||||
$scope.getPackageSize = function(pkgSearchResult, targetPkgType) {
|
||||
var result = []
|
||||
_.map(pkgSearchResult, function (pkg) {
|
||||
result.push(_.find(pkg, {type: targetPkgType}))
|
||||
})
|
||||
return _.compact(result).length
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,13 @@ limitations under the License.
|
|||
</div>
|
||||
|
||||
<div class="box width-full heliumPackageContainer">
|
||||
<div class="row"
|
||||
style="padding-bottom: 15px"
|
||||
ng-if="getPackageSize(defaultVersions, pkgListByType) === 0">
|
||||
<div class="col-md-12 gray40-message">
|
||||
<em>Currently there is no available package to be listed</em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row heliumPackageList"
|
||||
ng-repeat="(pkgName, pkgInfo) in defaultVersions"
|
||||
ng-show="$parent.pkgListByType == pkgInfo.pkg.type">
|
||||
|
|
|
|||
Loading…
Reference in a new issue