Skip to content

Commit

Permalink
Fix broken link on Watcher (#24317) (#24319)
Browse files Browse the repository at this point in the history
  • Loading branch information
maryia-lapata authored Oct 21, 2018
1 parent da13a58 commit b22a1ba
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,22 @@
</form>

<div class="kuiFormSection">
<label
class="kuiFormLabel"
i18n-id="xpack.watcher.sections.watchEdit.detail.watchJSONLabel"
i18n-default-message="Watch JSON({syntax})"
i18n-values="{ syntax: '<a href=\'{{ watchEditDetail.documentationLinks.watcher.putWatchApi }}\' target=\'_blank\' rel=\'noopener noreferrer\' data-test-subj=\'lnkPutWatchApiDoc\'>' + watchEditDetail.syntaxLinkLabel + '</a>'}"
></label>
<label class="kuiFormLabel">
<span
i18n-id="xpack.watcher.sections.watchEdit.detail.watchJSONLabel"
i18n-default-message="Watch JSON"
></span>
(
<a
href="{{ watchEditDetail.documentationLinks.watcher.putWatchApi }}"
target="_blank"
rel="noopener noreferrer"
data-test-subj="lnkPutWatchApiDoc"
i18n-id="xpack.watcher.sections.watchEdit.detail.syntaxLinkLabel"
i18n-default-message="Syntax"
></a>
)
</label>
<json-editor
json="watchEditDetail.watch.watch"
on-change="watchEditDetail.onJsonChange"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { documentationLinks } from 'plugins/watcher/lib/documentation_links';

const app = uiModules.get('xpack/watcher');

app.directive('watchEditDetail', function (i18n) {
app.directive('watchEditDetail', function () {
return {
restrict: 'E',
template: template,
Expand All @@ -36,7 +36,7 @@ app.directive('watchEditDetail', function (i18n) {
$scope.$watch('watchEditDetail.form.$valid', () => {
this.updateIsValid();
});
this.syntaxLinkLabel = i18n('xpack.watcher.sections.watchEdit.detail.syntaxLinkLabel', { defaultMessage: 'Syntax' });

this.documentationLinks = documentationLinks;
}

Expand Down

0 comments on commit b22a1ba

Please sign in to comment.