HDFS-12661. Ozone: Support optional documentation link in KSM/SCM webui. Contributed by Elek, Marton.

This commit is contained in:
Anu Engineer 2017-10-14 15:31:26 -07:00 committed by Owen O'Malley
parent a467017068
commit 763484e596
2 changed files with 12 additions and 1 deletions

View File

@ -230,6 +230,16 @@
});
angular.module('ozone').component('commonTools', {
templateUrl: '/static/templates/tools.html'
templateUrl: '/static/templates/tools.html',
controller: function ($http) {
var ctrl = this;
ctrl.docs = false;
$http.head("/docs/index.html")
.then(function (result) {
ctrl.docs = true;
},function(){
ctrl.docs = false;
});
}
});
})();

View File

@ -34,5 +34,6 @@
aria-hidden="true"></a></li>
</ul>
</li>
<li ng-show="$ctrl.docs"><a href="/docs">Documentation</a></li>
</ul>
</div><!--/.nav-collapse -->