Skip to content

Commit

Permalink
Avoid printing notify object in lang selector on error (elastic#8960)
Browse files Browse the repository at this point in the history
Backports PR elastic#8639

**Commit 1:**
Avoid printing notify object in lang selector on error

When ES is unavailable and we can't get the list of enabled scripting
langs we display a notification to the user. We were also accidentally
returning that notification object from the service method and
displaying its toString representation in the language select drop down.
Now we simplay return an empty array so the dropdown is rendered without
options.

Fixes elastic#8636

* Original sha: 051c554
* Authored by Matthew Bargar <[email protected]> on 2016-10-12T15:25:15Z

Former-commit-id: 6ddafd2
  • Loading branch information
elastic-jasper authored and Matt Bargar committed Nov 3, 2016
1 parent 31d4e35 commit d2d46d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ui/public/field_editor/field_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ uiModules
return $http.get(chrome.addBasePath('/api/kibana/scripts/languages'))
.then((res) => res.data)
.catch(() => {
return notify.error('Error getting available scripting languages from Elasticsearch');
notify.error('Error getting available scripting languages from Elasticsearch');
return [];
});
}

Expand Down

0 comments on commit d2d46d4

Please sign in to comment.