zeppelin button in inspector page

This commit is contained in:
Michele Artini 2021-11-02 11:50:17 +01:00
parent dd4c634295
commit a7f8f8f061
1 changed files with 18 additions and 1 deletions

View File

@ -62,6 +62,14 @@
<div class="col">
<h1>Metadata Inspector</h1>
<br />
<div class="btn-group">
<button class="btn btn-sm btn-warning dropdown-toggle" data-toggle="dropdown">zeppelin <span class="caret"></span></button>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item small" href="./zeppelin/{{mdId}}/{{t}}" target="_blank" ng-repeat="t in zeppelinTemplates">{{t}}</a>
</div>
</div>
<br />
<br />
<table class="table table-condensed table-sm small">
@ -184,6 +192,7 @@
$scope.records = [];
$scope.versionId = versionId();
$scope.limit = limit();
$scope.zeppelinTemplates = [];
$scope.reload = function() {
showSpinner();
@ -199,9 +208,17 @@
alert('ERROR: ' + res.data.message);
});
};
$scope.obtainZeppelinTemplates = function() {
$http.get('../../zeppelin/templates?' + $.now()).then(function successCallback(res) {
$scope.zeppelinTemplates = res.data;
}, function errorCallback(res) {
alert('ERROR: ' + res.data.message);
});
};
$scope.reload();
$scope.obtainZeppelinTemplates();
});
</script>