HDFS-12661. Ozone: Support optional documentation link in KSM/SCM webui. Contributed by Elek, Marton.
This commit is contained in:
parent
a467017068
commit
763484e596
|
@ -230,6 +230,16 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
angular.module('ozone').component('commonTools', {
|
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;
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -34,5 +34,6 @@
|
||||||
aria-hidden="true"></a></li>
|
aria-hidden="true"></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li ng-show="$ctrl.docs"><a href="/docs">Documentation</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!--/.nav-collapse -->
|
</div><!--/.nav-collapse -->
|
||||||
|
|
Loading…
Reference in New Issue