title case only for default label
This commit is contained in:
parent
508effe16a
commit
d1ef183f8d
@ -95,10 +95,10 @@ export class DashboardUtilsService {
|
|||||||
}
|
}
|
||||||
if (isUndefined(dashboard.configuration.states)) {
|
if (isUndefined(dashboard.configuration.states)) {
|
||||||
dashboard.configuration.states = {
|
dashboard.configuration.states = {
|
||||||
Default: this.createDefaultState(dashboard.title, true)
|
default: this.createDefaultState(dashboard.title, true)
|
||||||
};
|
};
|
||||||
|
|
||||||
const mainLayout = dashboard.configuration.states.Default.layouts.main;
|
const mainLayout = dashboard.configuration.states.default.layouts.main;
|
||||||
for (const id of Object.keys(dashboard.configuration.widgets)) {
|
for (const id of Object.keys(dashboard.configuration.widgets)) {
|
||||||
const widget = dashboard.configuration.widgets[id];
|
const widget = dashboard.configuration.widgets[id];
|
||||||
mainLayout.widgets[id] = {
|
mainLayout.widgets[id] = {
|
||||||
|
|||||||
@ -187,7 +187,8 @@ export class DefaultStateControllerComponent extends StateControllerComponent im
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getStateName(id: string, state: DashboardState): string {
|
public getStateName(id: string, state: DashboardState): string {
|
||||||
return this.utils.customTranslation(state.name, id);
|
const name = this.utils.customTranslation(state.name, id);
|
||||||
|
return name === this.stateControllerId() ? name.charAt(0).toUpperCase() + name.slice(1) : name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCurrentStateName(): string {
|
public getCurrentStateName(): string {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user