[Project] Updated webapp archetype

This commit is contained in:
Robert von Burg 2020-08-06 13:00:56 +02:00
parent 1f87d03ca9
commit 4b139931eb
7 changed files with 235 additions and 180 deletions

View File

@ -46,142 +46,102 @@
* Compute functions * Compute functions
*/ */
hasMsg: function (value) { hasMsg: function (value) {
return Strolch.isNotEmptyString(value) && value != "-"; return Strolch.isNotEmptyString(value) && value !== "-";
}, },
isEqual: function (v1, v2) { isEqual: function (v1, v2) {
return v1 === v2; return Strolch.isEqual(v1, v2);
}, },
stringToArray: function (string) { stringToArray: function (string) {
if (string == null || string.length == 0) return Strolch.stringToArray(string);
return [];
var a = [];
var b = string.split(',');
for (var i = 0; i < b.length; i++) {
a.push(b[i].trim());
}
return a;
}, },
stringArrayLength: function (string) { stringArrayLength: function (string) {
if (string == null || string.length == 0) return Strolch.stringArrayLength(string);
return 0;
return string.split(',').length;
}, },
isDefined: function (arg0) { isDefined: function (arg0) {
return arg0 != undefined; return Strolch.isDefined(arg0);
}, },
isNull: function (arg0) { isNull: function (arg0) {
return arg0 == undefined || arg0 == null; return Strolch.isNull(arg0);
}, },
isNotNull: function (arg0) { isNotNull: function (arg0) {
return arg0 != undefined && arg0 != null; return Strolch.isNotNull(arg0);
}, },
isNaN: function (arg0) { isNaN: function (arg0) {
return this.stringEmpty(arg0) || isNaN(arg0); return Strolch.isNaN(arg0);
}, },
equal: function (arg0, arg1) { equal: function (arg0, arg1) {
return arg0 == arg1; return Strolch.equal(arg0, arg1);
}, },
notEqual: function (arg0, arg1) { notEqual: function (arg0, arg1) {
return arg0 != arg1; return Strolch.notEqual(arg0, arg1);
}, },
defined: function (arg0) { defined: function (arg0) {
return !!arg0; return Strolch.defined(arg0);
}, },
greater: function (arg0, arg1) { greater: function (arg0, arg1) {
return arg0 > arg1; return Strolch.greater(arg0, arg1);
}, },
greaterEqual: function (arg0, arg1) { greaterEqual: function (arg0, arg1) {
return arg0 >= arg1; return Strolch.greaterEqual(arg0, arg1);
}, },
lesser: function (arg0, arg1) { lesser: function (arg0, arg1) {
return arg0 < arg1; return Strolch.lesser(arg0, arg1);
}, },
lesserEqual: function (arg0, arg1) { lesserEqual: function (arg0, arg1) {
return arg0 <= arg1; return Strolch.lesserEqual(arg0, arg1);
}, },
and: function (arg0, arg1) { and: function (arg0, arg1) {
return !!(arg0 && arg1); return Strolch.and(arg0, arg1);
}, },
or: function (arg0, arg1) { or: function (arg0, arg1) {
return !!(arg0 || arg1); return Strolch.or(arg0, arg1);
}, },
arrayLength: function (array) { arrayLength: function (array) {
return (array && array.length) ? array.length : 0; return Strolch.arrayLength(array);
}, },
arrayFilled: function (array) { arrayFilled: function (array) {
return !!(array && array.length && array.length > 0); return Strolch.arrayFilled(array);
}, },
arraySizeLessThan: function (array, size) { arraySizeLessThan: function (array, size) {
return array != null && array.length < size; return Strolch.arraySizeLessThan(array, size);
}, },
arraySizeGreaterThanOrEq: function (array, size) { arraySizeGreaterThanOrEq: function (array, size) {
return array != null && array.length >= size; return Strolch.arraySizeGreaterThanOrEq(array, size);
}, },
arrayEquals: function (array1, array2) { arrayEquals: function (array1, array2) {
if (array1 == null && array2 == null) return Strolch.arrayEquals(array1, array2);
return true;
if (array1 == null && array2 != null)
return false;
if (array2 == null && array1 != null)
return false;
return (array1.length == array2.length) && array1.every(function (element, index) {
return element === array2[index];
});
}, },
add: function (arg0, arg1) { add: function (arg0, arg1) {
return Number(arg0) + Number(arg1); return Strolch.add(arg0, arg1);
}, },
sub: function (arg0, arg1) { sub: function (arg0, arg1) {
return Number(arg0) - Number(arg1); return Strolch.sub(arg0, arg1);
}, },
round: function (value) { round: function (value) {
return Math.round(value * 1000) / 1000; return Strolch.round(value);
}, },
stringEmpty: function () { stringEmpty: function () {
for (var i in arguments) { return Strolch.stringEmpty(arguments);
var arg = arguments[i];
if (!arg || arg.length == 0) return true;
}
return false;
}, },
isEmptyString: function (val) { isEmptyString: function (val) {
return typeof val == 'undefined' || val == null || val === ''; return Strolch.isEmptyString(val);
}, },
isNotEmptyString: function (val) { isNotEmptyString: function (val) {
return !this.isEmptyString(val); return Strolch.isNotEmptyString(val);
}, },
isChrome: function () { isChrome: function () {
var isChromium = window.chrome, // return Strolch.isChrome();
winNav = window.navigator, //
vendorName = winNav.vendor, //
isOpera = winNav.userAgent.indexOf("OPR") > -1, //
isIEedge = winNav.userAgent.indexOf("Edge") > -1, //
isIOSChrome = winNav.userAgent.match("CriOS");
if (isIOSChrome) {
return true;
} else if (isChromium !== null && //
typeof isChromium !== "undefined" && //
vendorName === "Google Inc." && //
isOpera === false && //
isIEedge === false) {
return true;
} else {
return false;
}
}, },
isFirefox: function () { isFirefox: function () {
return navigator.userAgent.toLowerCase().indexOf('firefox') > -1; return Strolch.isFirefox();
}, },
isIE: function () { isIE: function () {
var isIE = /*@cc_on!@*/false || !!document.documentMode; return Strolch.isIE();
return isIE;
}, },
isEdge: function () { isEdge: function () {
return !Susi.Compute.isIE() && !!window.StyleMedia; return Strolch.isEdge();
}, },
/* /*
@ -193,134 +153,68 @@
// gets the clock time as displayed in the UI // gets the clock time as displayed in the UI
getTimeString: function (datetime) { getTimeString: function (datetime) {
var hour = datetime.getHours().toString(); return Strolch.getTimeString(datetime);
var min = datetime.getMinutes().toString();
hour = hour.length < 2 ? "0" + hour : hour;
min = min.length < 2 ? "0" + min : min;
return hour + ":" + min;
}, },
// gets the calendar date as displayed in the UI // gets the calendar date as displayed in the UI
getDateString: function (datetime, addCentury) { getDateString: function (datetime, addCentury) {
if (typeof (datetime) == 'string') { return Strolch.getDateString(datetime, addCentury);
datetime = new Date(datetime);
}
var day = (datetime.getDate()).toString();
var month = (datetime.getMonth() + 1).toString();
var year = (datetime.getFullYear()).toString();
day = day.length < 2 ? "0" + day : day;
month = month.length < 2 ? "0" + month : month;
year = addCentury ? year : year.slice(-2);
return day + "." + month + "." + year;
}, },
// gets the date of a date string from getDateString() // gets the date of a date string from getDateString()
getDate: function (datetimeString) { getDate: function (datetimeString) {
var splitString = datetimeString.split("."); return Strolch.getDate(datetimeString);
if (splitString.length != 3) return null;
var year = Number(splitString[2]);
var month = Number(splitString[1]) - 1;
var day = Number(splitString[0]);
return new Date(year, month, day);
}, },
// gets the clock time of the current time // gets the clock time of the current time
getCurrentTimeString: function () { getCurrentTimeString: function () {
return Susi.Datetime.getTimeString(new Date()); return Strolch.getCurrentTimeString();
}, },
toDateTime: function (val) { toDateTimeNoDelim: function (val) {
return Strolch.toDateTimeNoDelim(val);
function pad10(i) {
if (i < 10) return '0' + i;
return i;
}
function pad100(i) {
if (i < 10) return '00' + i;
if (i < 100) return '0' + i;
return i;
}
if (Strolch.isEmptyString(val) || val == '-') return '-';
var date = new Date(val);
var y = date.getFullYear();
var m = pad10(date.getMonth() + 1);
var d = pad10(date.getDate());
var h = pad10(date.getHours());
var mi = pad10(date.getMinutes());
var s = pad10(date.getSeconds());
var mil = pad100(date.getMilliseconds());
return y + m + d + h + mi + s;
}, },
// gets the calendar date of the current time // gets the calendar date of the current time
getCurrentDateString: function () { getCurrentDateString: function () {
return Susi.Datetime.getDateString(new Date()); return Strolch.getDateString(new Date());
}, },
clearTime: function (date) { clearTime: function (date) {
date.setHours(0); return Strolch.clearTime(date);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0);
return date;
}, },
dateToJson: function (date) { dateToJson: function (date) {
date.setTime(date.getTime() - date.getTimezoneOffset() * 60 * 1000); return Strolch.dateToJson(date);
return date.toJSON();
}, },
// returns true if a datetime has past // returns true if a datetime has past
isPast: function (datetime) { isPast: function (datetime) {
return Date.now() > datetime.getTime(); return Strolch.isPast(datetime);
}, },
// returns true if a datetime is future // returns true if a datetime is future
isFuture: function (datetime) { isFuture: function (datetime) {
return Date.now() < datetime.getTime(); return Strolch.isFuture(datetime);
}, },
// turns hours into milliseconds // turns hours into milliseconds
hToMs: function (hour) { hToMs: function (hour) {
return hour * 3600000; return Strolch.hToMs(hour);
}, },
// turns milliseconds into hours // turns milliseconds into hours
msToH: function (milliseconds) { msToH: function (milliseconds) {
return milliseconds / 3600000; return Strolch.msToH(milliseconds);
}, },
getCookie: function (cname) { getCookie: function (cname) {
var name = cname + "="; return Strolch.getCookie(cname);
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return null;
}, },
setCookie: function (cname, cvalue, validDays) { setCookie: function (cname, cvalue, expiration) {
var d = new Date(); Strolch.setCookie(cname, cvalue, expiration);
d.setTime(d.getTime() + (validDays * 24 * 60 * 60 * 1000));
var expires = "expires=" + d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}, },
deleteCookie: function (cname) { deleteCookie: function (cname) {
document.cookie = cname + '=; Path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;'; Strolch.deleteCookie(cname);
}, },
// fires an event that will change the page of the app // fires an event that will change the page of the app
@ -337,15 +231,13 @@
// convenience function to get the error message from responses // convenience function to get the error message from responses
onRequestError: function (event) { onRequestError: function (event) {
var readyState = event.detail.request.xhr.readyState; var readyState = event.detail.request.xhr.readyState;
var response = event.detail.request.xhr.response;
var status = event.detail.request.xhr.status; var status = event.detail.request.xhr.status;
var isError = status && status >= 500;
if (readyState === 4 && status === 0) { if (readyState === 4 && status === 0) {
this.fire("cx-server-not-available", event); this.fire("cx-server-not-available", event);
} else if (status == 401) { } else if (status === 401) {
this.fire("cx-session-invalid", event); this.fire("cx-session-invalid", event);
} else if (status == 403) { } else if (status === 403) {
this.fire("cx-privilege-denied", event); this.fire("cx-privilege-denied", event);
} else { } else {
this.requestErrorToMsg(event); this.requestErrorToMsg(event);
@ -364,7 +256,7 @@
else else
response = event.detail.detail.error.message; response = event.detail.detail.error.message;
var msg = ""; var msg;
var isError = false; var isError = false;
if (response && response.state) { if (response && response.state) {
@ -384,8 +276,8 @@
if (response && response.msg) { if (response && response.msg) {
msg = response.msg; msg = response.msg;
} else if (typeof (response) == 'string') { } else if (typeof (response) === 'string') {
if (response.trim().charAt(0) == '{') { if (response.trim().charAt(0) === '{') {
var json = JSON.parse(response); var json = JSON.parse(response);
if (json && json.i18n) { if (json && json.i18n) {
@ -473,13 +365,13 @@
}, },
localizeJsonMsg: function (jsonMsg) { localizeJsonMsg: function (jsonMsg) {
if (jsonMsg == null) if (jsonMsg === null)
return jsonMsg; return jsonMsg;
this.localize.useKeyIfMissing = true; this.localize.useKeyIfMissing = true;
try { try {
if (jsonMsg.values == null || Object.keys(jsonMsg.values).length === 0) if (jsonMsg.values === null || Object.keys(jsonMsg.values).length === 0)
return this.localize(jsonMsg.key); return this.localize(jsonMsg.key);
var values = [jsonMsg.key]; var values = [jsonMsg.key];
@ -489,7 +381,7 @@
values.push(key); values.push(key);
values.push(jsonMsg.values[key]); values.push(jsonMsg.values[key]);
} }
return this.localize.apply(null, values); return this.localize.apply(this.localize, values);
} catch (e) { } catch (e) {
console.log(e); console.log(e);
return jsonMsg.key; return jsonMsg.key;

View File

@ -9,16 +9,21 @@
}, 3000); }, 3000);
this.checkForNewVersionInterval = setInterval(function () { this.checkForNewVersionInterval = setInterval(function () {
that.checkForNewVersion(); that.checkForNewVersion();
}, 10000); }, 120000);
}, },
reloadPage: function (pageName) { reloadPage: function (pageName) {
this.debounce('page-reload', function () { this.debounce('page-reload', function () {
this.selectedPage = pageName; this.selectedPage = pageName;
document.title = this.localize == null ? pageName : this.localize(pageName);
var page = this.$$('#' + pageName); var page = this.$$('#' + pageName);
if (page && page.reload) { if (page && page.reload) {
console.log('Reloading ' + pageName); console.log('Reloading ' + pageName);
page.reload(); page.reload();
if (page.viewOptions != null && page.viewOptions.hasSearchTerm) {
this.$$('#debouncedInput').focus();
}
} }
}, 100); }, 100);
}, },

View File

@ -72,12 +72,26 @@
<paper-menu id="menu" selected="{{page}}" attr-for-selected="id" on-tap="onMenuTap" hidden="[[sessionInvalid]]"> <paper-menu id="menu" selected="{{page}}" attr-for-selected="id" on-tap="onMenuTap" hidden="[[sessionInvalid]]">
<paper-item id="reports" class="menu-item">Reports</paper-item> <template is="dom-if" if="[[authTokenValid]]" restamp>
<template is="dom-if" if="[[hasPrivilege('li.strolch.report.ReportSearch')]]">
<paper-item id="reports" class="menu-item">[[localize('reports')]]</paper-item>
</template>
<template is="dom-if" if="[[hasPrivilege('I18n', 'Get')]]">
<paper-item id="i18n-editor" class="menu-item">[[localize('i18n-editor')]]</paper-item>
</template>
</template>
</paper-menu> </paper-menu>
<template is="dom-if" if="[[authTokenValid]]" restamp>
<template is="dom-if" if="[[hasRole('StrolchAdmin')]]">
<strolch-wc-inspector-menu selected-page="[[page]]" <strolch-wc-inspector-menu selected-page="[[page]]"
on-menu-tap="onInspectorMenuTap"></strolch-wc-inspector-menu> on-menu-tap="onInspectorMenuTap"></strolch-wc-inspector-menu>
</template>
</template>
<paper-menu on-tap="onMenuTap"> <paper-menu on-tap="onMenuTap">
<paper-item id="logout" class="menu-item">Logout</paper-item> <paper-item id="logout" class="menu-item">Logout</paper-item>
@ -94,6 +108,7 @@
<paper-listbox class="dropdown-content" selected="{{userLocale}}" attr-for-selected="data"> <paper-listbox class="dropdown-content" selected="{{userLocale}}" attr-for-selected="data">
<paper-item data="de">Deutsch</paper-item> <paper-item data="de">Deutsch</paper-item>
<paper-item data="en">English</paper-item> <paper-item data="en">English</paper-item>
<paper-item data="fr">Français</paper-item>
</paper-listbox> </paper-listbox>
</paper-dropdown-menu> </paper-dropdown-menu>
</paper-material> </paper-material>
@ -123,6 +138,9 @@
userLocale: { userLocale: {
type: String, type: String,
notify: true notify: true
},
authTokenValid: {
type: Boolean
} }
}, },

View File

@ -21,6 +21,7 @@
<link rel="import" href="../bower_components/paper-styles/typography.html"> <link rel="import" href="../bower_components/paper-styles/typography.html">
<link rel="import" href="../bower_components/strolch-wc-localize-behavior/strolch-wc-localize-behavior.html"> <link rel="import" href="../bower_components/strolch-wc-localize-behavior/strolch-wc-localize-behavior.html">
<link rel="import" href="../bower_components/strolch-wc-debounced-input/strolch-wc-debounced-input.html">
<link rel="import" href="../bower_components/strolch-wc-styles/strolch-wc-styles.html"> <link rel="import" href="../bower_components/strolch-wc-styles/strolch-wc-styles.html">
<link rel="import" href="../bower_components/strolch-wc-auth/strolch-wc-auth.html"> <link rel="import" href="../bower_components/strolch-wc-auth/strolch-wc-auth.html">
<link rel="import" href="../bower_components/strolch-wc-inspector/strolch-wc-inspector.html"> <link rel="import" href="../bower_components/strolch-wc-inspector/strolch-wc-inspector.html">
@ -82,6 +83,14 @@
max-width: 500px !important; max-width: 500px !important;
} }
strolch-wc-debounced-input {
max-width: 200px;
display: inline-flex;
--regular-color: var(--app-light-highlight-bg-color);
--focus-color: var(--app-regular-highlight-fg-color);
}
</style> </style>
<!-- Routing --> <!-- Routing -->
@ -104,6 +113,7 @@
version="[[appVersion]]" version="[[appVersion]]"
user-config="[[userConfig]]" user-config="[[userConfig]]"
user-locale="{{userLocale}}" user-locale="{{userLocale}}"
auth-token-valid="[[authTokenValid]]"
on-menu-tap="onMenuTap"></c-app-menu> on-menu-tap="onMenuTap"></c-app-menu>
</div> </div>
@ -120,6 +130,11 @@
<app-toolbar hidden="[[!authTokenValid]]"> <app-toolbar hidden="[[!authTokenValid]]">
<paper-icon-button icon="menu" drawer-toggle></paper-icon-button> <paper-icon-button icon="menu" drawer-toggle></paper-icon-button>
<div main-title>[[localize(page)]]</div> <div main-title>[[localize(page)]]</div>
<template is="dom-if" if="[[viewOptions.hasSearchTerm]]">
<strolch-wc-debounced-input id="debouncedInput"
class="g-pull-right"
debounced-input="{{searchTerm}}"></strolch-wc-debounced-input>
</template>
</app-toolbar> </app-toolbar>
</app-header> </app-header>
@ -132,6 +147,7 @@
<strolch-wc-auth id="login" <strolch-wc-auth id="login"
app-title="[[localize('appTitle')]]" app-title="[[localize('appTitle')]]"
view-options="{{viewOptions}}"
base-path="../" base-path="../"
show-version show-version
show-keep-alive show-keep-alive
@ -139,12 +155,14 @@
<template is="dom-if" if="[[equal(page, 'inspector')]]" restamp> <template is="dom-if" if="[[equal(page, 'inspector')]]" restamp>
<strolch-wc-inspector id="inspector" <strolch-wc-inspector id="inspector"
view-options="{{viewOptions}}"
base-path="../" base-path="../"
route="{{subroute}}"></strolch-wc-inspector> route="{{subroute}}"></strolch-wc-inspector>
</template> </template>
<template is="dom-if" if="[[equal(page, 'i18n-editor')]]" restamp> <template is="dom-if" if="[[equal(page, 'i18n-editor')]]" restamp>
<strolch-wc-i18n-editor id="i18n-editor" <strolch-wc-i18n-editor id="i18n-editor"
view-options="{{viewOptions}}"
base-path="../" base-path="../"
base-rest-path="[[baseRestPath]]" base-rest-path="[[baseRestPath]]"
route="{{subroute}}"></strolch-wc-i18n-editor> route="{{subroute}}"></strolch-wc-i18n-editor>
@ -152,16 +170,21 @@
<template is="dom-if" if="[[equal(page, 'operations-log')]]" restamp> <template is="dom-if" if="[[equal(page, 'operations-log')]]" restamp>
<strolch-wc-operations-log id="operations-log" <strolch-wc-operations-log id="operations-log"
view-options="{{viewOptions}}"
base-path="../" base-path="../"
route="{{subroute}}"></strolch-wc-operations-log> route="{{subroute}}"></strolch-wc-operations-log>
</template> </template>
<template is="dom-if" if="[[equal(page, 'jobs')]]" restamp> <template is="dom-if" if="[[equal(page, 'jobs')]]" restamp>
<strolch-wc-jobs id="jobs" base-path="../" route="{{subroute}}"></strolch-wc-jobs> <strolch-wc-jobs id="jobs"
view-options="{{viewOptions}}"
base-path="../"
route="{{subroute}}"></strolch-wc-jobs>
</template> </template>
<template is="dom-if" if="[[equal(page, 'reports')]]" restamp> <template is="dom-if" if="[[equal(page, 'reports')]]" restamp>
<strolch-wc-reports id="reports" <strolch-wc-reports id="reports"
view-options="{{viewOptions}}"
base-path="../" base-path="../"
base-rest-path="[[baseRestPath]]" base-rest-path="[[baseRestPath]]"
locales-path="../../../locales.json" locales-path="../../../locales.json"
@ -171,15 +194,22 @@
</template> </template>
<template is="dom-if" if="[[equal(page, 'users')]]" restamp> <template is="dom-if" if="[[equal(page, 'users')]]" restamp>
<strolch-wc-users id="users" base-path="../" route="{{subroute}}"></strolch-wc-users> <strolch-wc-users id="users"
view-options="{{viewOptions}}"
base-path="../"
route="{{subroute}}"></strolch-wc-users>
</template> </template>
<template is="dom-if" if="[[equal(page, 'roles')]]" restamp> <template is="dom-if" if="[[equal(page, 'roles')]]" restamp>
<strolch-wc-roles id="roles" base-path="../" route="{{subroute}}"></strolch-wc-roles> <strolch-wc-roles id="roles"
view-options="{{viewOptions}}"
base-path="../"
route="{{subroute}}"></strolch-wc-roles>
</template> </template>
<template is="dom-if" if="[[equal(page, 'sessions')]]" restamp> <template is="dom-if" if="[[equal(page, 'sessions')]]" restamp>
<strolch-wc-sessions id="sessions" <strolch-wc-sessions id="sessions"
view-options="{{viewOptions}}"
base-path="../" base-path="../"
route="{{subroute}}"></strolch-wc-sessions> route="{{subroute}}"></strolch-wc-sessions>
</template> </template>
@ -267,6 +297,9 @@
type: String, type: String,
value: '../../locales.json' value: '../../locales.json'
}, },
viewOptions: {
type: Object
},
page: { page: {
type: String, type: String,
observer: 'observePage' observer: 'observePage'
@ -352,6 +385,7 @@
var pageName = event.detail.page; var pageName = event.detail.page;
// set the next page // set the next page
document.title = this.localize == null ? pageName : this.localize(pageName);
this.$.appRouting.pushNextPage(pageName, event.detail.keepQueryParams); this.$.appRouting.pushNextPage(pageName, event.detail.keepQueryParams);
} else { } else {
console.log("received page change without new value"); console.log("received page change without new value");

View File

@ -73,6 +73,35 @@
--paper-toggle-button-checked-button-color: var(--app-primary-color); --paper-toggle-button-checked-button-color: var(--app-primary-color);
} }
paper-button {
background: var(--paper-grey-100);
color: var(--app-secondary-color);
height: 35px;
}
paper-checkbox {
padding: 8px;
}
paper-input.readonly {
--paper-input-container: {
padding: 4px 0;
};
--paper-input-container-underline: {
display: none;
};
--paper-input-container-underline-focus: {
display: none;
};
--paper-input-container-underline-disabled: {
display: none;
};
}
h3 {
margin-bottom: 0;
}
</style> </style>
</template> </template>
</dom-module> </dom-module>

View File

@ -19,7 +19,25 @@
<script> <script>
Polymer({ Polymer({
is: 'c-view404' is: 'c-view404',
behaviors: [
CustomComputeBehavior, StrolchLocalizeBehavior
],
properties: {
viewOptions: {
type: Object,
value: {hasSearchTerm: false},
notify: true
},
dataObj: {
type: Object
},
messages: {
type: Array
},
}
}); });
</script> </script>
</dom-module> </dom-module>

View File

@ -23,16 +23,42 @@
"sessionInvalid": "Sitzung ungültig", "sessionInvalid": "Sitzung ungültig",
"sessionInvalidConfirmNavToLogin": "Die Sitzung ist abgelaufen oder ungültig. Bitte neu anmelden.", "sessionInvalidConfirmNavToLogin": "Die Sitzung ist abgelaufen oder ungültig. Bitte neu anmelden.",
"sessionInvalidLoggingBackIn": "Die Sitzung ist ungültig oder abgelaufen, automatische Anmeldung wird ausgeführt...", "sessionInvalidLoggingBackIn": "Die Sitzung ist ungültig oder abgelaufen, automatische Anmeldung wird ausgeführt...",
"errorOccurred": "Ein Fehler ist aufgetreten" "errorOccurred": "Ein Fehler ist aufgetreten",
"login": "Login",
"i18n-editor": "Internationalisierungs Editor",
"user": "Benutzer",
"mode": "Modus",
"enable": "Aktivieren",
"disable": "Deaktivieren",
"status": "Status",
"id": "ID",
"deleted": "Gelöscht",
"date": "Datum",
"Created": "Erstellt",
"Planning": "In Planung",
"Planned": "Geplant",
"Execution": "In Ausführung",
"Warning": "Warnung",
"Error": "Fehler",
"Executed": "Ausgeführt",
"Closed": "Geschlossen",
"keepAlive": "Eingeloggt bleiben",
"systemAction.failed": "Systembefehl {action} fehlgeschlagen: {reason}",
"enabled": "Aktiv",
"severity": "Schweregrad",
"true": "Ja",
"false": "Nein",
"Info": "Information",
"Exception": "Ausnahme",
"clearInactiveMessages": "Inaktive Meldungen entfernen",
"clearInactiveMessagesConfirm": "Sollen alle inaktive Meldungen entfernt werden?",
"executionDate": "Ausführungsdatum",
"orderDate": "Auftragsdatum",
"info": "Information"
}, },
"en": { "en": {
"errorOccurred": "An error occurred", "info": "Information",
"sessionInvalid": "Session Invalid", "appTitle": "MFS",
"sessionInvalidConfirmNavToLogin": "The session has expired or is invalid. Please logon again.",
"sessionInvalidLoggingBackIn": "The session is invalid or has expired, automatic logon has commenced...",
"privilegeDenied": "Action denied",
"privilegeDeniedText": "The action has been denied",
"appTitle": "${appName}",
"language": "Language", "language": "Language",
"reports": "Reports", "reports": "Reports",
"operations-log": "Operation Logs", "operations-log": "Operation Logs",
@ -49,6 +75,39 @@
"ok": "Ok", "ok": "Ok",
"reconnect": "Reconnect", "reconnect": "Reconnect",
"serverNotAvailable": "Server not available", "serverNotAvailable": "Server not available",
"serverNotAvailableMsg": "The connection to the server is currently not available" "serverNotAvailableMsg": "The connection to the server is currently not available",
"privilegeDenied": "Action denied",
"privilegeDeniedText": "The action has been denied",
"sessionInvalid": "Session Invalid",
"sessionInvalidConfirmNavToLogin": "The session has expired or is invalid. Please logon again.",
"sessionInvalidLoggingBackIn": "The session is invalid or has expired, automatic logon has commenced...",
"enabled": "Active",
"severity": "Severity",
"true": "Yes",
"false": "No",
"Info": "Information",
"Exception": "Exception",
"clearInactiveMessages": "Remove inactive messages",
"clearInactiveMessagesConfirm": "Should all inactive messages be removed?",
"errorOccurred": "An error occurred",
"systemAction.failed": "SystemAction {action} failed: {reason}",
"Created": "Created",
"Planning": "Planning",
"Planned": "Planned",
"Execution": "Execution",
"Warning": "Warning",
"Error": "Error",
"Executed": "Executed",
"Closed": "Closed",
"date": "Date",
"deleted": "Deleted",
"id": "ID",
"status": "Status",
"enable": "Enable",
"disable": "Disable",
"mode": "Mode",
"user": "User",
"i18n-editor": "Internationalization editor",
"login": "Login"
} }
} }