Skip to content

Commit 6981d73

Browse files
author
Pavel Strashkin
committed
Allow to disable RAML Client Generator feature
1 parent 07a9fe7 commit 6981d73

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

dist/scripts/api-console.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,6 +1518,10 @@
15181518
$scope.disableThemeSwitcher = true;
15191519
}
15201520

1521+
if ($attrs.hasOwnProperty('disableRamlClientGenerator')) {
1522+
$scope.disableRamlClientGenerator = true;
1523+
}
1524+
15211525
if ($attrs.hasOwnProperty('disableTitle')) {
15221526
$scope.disableTitle = true;
15231527
}
@@ -5385,7 +5389,7 @@ angular.module('ramlConsoleApp').run(['$templateCache', function($templateCache)
53855389
" <div ng-if=\"loaded\">\n" +
53865390
" <div class=\"raml-console-meta-button-group\">\n" +
53875391
" <theme-switcher ng-if=\"!disableThemeSwitcher\"></theme-switcher>\n" +
5388-
" <raml-client-generator></raml-client-generator>\n" +
5392+
" <raml-client-generator ng-if=\"!disableRamlClientGenerator\"></raml-client-generator>\n" +
53895393
" </div>\n" +
53905394
"\n" +
53915395
" <h1 ng-if=\"!disableTitle\" class=\"raml-console-title\">{{raml.title}}</h1>\n" +

src/app/resources/resources.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
$scope.disableThemeSwitcher = true;
2323
}
2424

25+
if ($attrs.hasOwnProperty('disableRamlClientGenerator')) {
26+
$scope.disableRamlClientGenerator = true;
27+
}
28+
2529
if ($attrs.hasOwnProperty('disableTitle')) {
2630
$scope.disableTitle = true;
2731
}

src/app/resources/resources.tpl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<div ng-if="loaded">
1414
<div class="raml-console-meta-button-group">
1515
<theme-switcher ng-if="!disableThemeSwitcher"></theme-switcher>
16-
<raml-client-generator></raml-client-generator>
16+
<raml-client-generator ng-if="!disableRamlClientGenerator"></raml-client-generator>
1717
</div>
1818

1919
<h1 ng-if="!disableTitle" class="raml-console-title">{{raml.title}}</h1>

0 commit comments

Comments
 (0)