[6.x] [uiApp] remove unused templateName config option (#17484) (#17543)

This commit is contained in:
Spencer 2018-04-04 07:30:53 -07:00 committed by GitHub
parent 1950b62ff8
commit e12343b4e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 18 deletions

View file

@ -18,7 +18,6 @@ function createStubUiAppSpec(extraParams) {
linkToLastSubUrl: true,
hidden: false,
listed: false,
templateName: 'ui_app_test',
uses: [
'visTypes',
'chromeNavControls',
@ -73,10 +72,6 @@ describe('ui apps / UiApp', () => {
expect(app.getPluginId()).to.be(undefined);
});
it('has a default template name of ui_app', () => {
expect(app.getTemplateName()).to.be('ui_app');
});
it('is not hidden', () => {
expect(app.isHidden()).to.be(false);
});
@ -126,10 +121,6 @@ describe('ui apps / UiApp', () => {
expect(app.getPluginId()).to.be(undefined);
});
it('uses the specs template', () => {
expect(app.getTemplateName()).to.be(spec.templateName);
});
it('is not hidden', () => {
expect(app.isHidden()).to.be(false);
});

View file

@ -13,7 +13,6 @@ export class UiApp {
hidden,
linkToLastSubUrl,
listed,
templateName = 'ui_app',
injectVars,
url = `/app/${id}`,
uses = []
@ -32,7 +31,6 @@ export class UiApp {
this._linkToLastSubUrl = linkToLastSubUrl;
this._hidden = hidden;
this._listed = listed;
this._templateName = templateName;
this._url = url;
this._injectedVarsProvider = injectVars;
this._pluginId = pluginId;
@ -79,10 +77,6 @@ export class UiApp {
return plugin ? plugin.id : undefined;
}
getTemplateName() {
return this._templateName;
}
isHidden() {
return !!this._hidden;
}

View file

@ -15,7 +15,6 @@ function applySpecDefaults(spec, type, pluginSpec) {
hidden = false,
linkToLastSubUrl = true,
listed = !hidden,
templateName = 'ui_app',
injectVars = noop,
url = `/app/${id}`,
uses = [],
@ -32,7 +31,6 @@ function applySpecDefaults(spec, type, pluginSpec) {
hidden,
linkToLastSubUrl,
listed,
templateName,
injectVars,
url,
uses: uniq([

View file

@ -120,7 +120,7 @@ export function uiRenderMixin(kbnServer, server, config) {
const request = reply.request;
const translations = await request.getUiTranslations();
return reply.view(app.getTemplateName(), {
return reply.view('ui_app', {
app,
kibanaPayload: await getKibanaPayload({
app,