This commit is contained in:
@@ -11,6 +11,18 @@ todo: when server is in ops only mode the client needs a way to prevent people f
|
||||
I know the server will send a 404 or something but maybe that needs tweaking to show a proper message at the client or just not show those options or something?
|
||||
(part of long polling maybe??)
|
||||
|
||||
Widget list get this:
|
||||
Unexpected error: {"code":"2001","message":"The server is closed for maintenance\r\ntest"}
|
||||
|
||||
Users list get the users list no error, go to open one and get the error, inconsistent as hell
|
||||
Customer users same thing
|
||||
|
||||
What I'm seeing is some pages don't properly show error notice, i.e. translations just shows no data but in console you can see there was a 503
|
||||
|
||||
Main forms need the error control to be added and formstate and if you view a user record it *correctly*
|
||||
displays the error message without linefeed characters so that needs to be replicated
|
||||
|
||||
|
||||
todo: OPEN OBJECT HANDLER
|
||||
Update it to check if a child type and if so then it calls get ancestor at server search route
|
||||
Search controller route: ancestor(ayatype, ayaid) returns type and id
|
||||
|
||||
@@ -35,24 +35,26 @@ function dealWithError(msg, vm) {
|
||||
}
|
||||
|
||||
//If a form instance was provided (vue instance)
|
||||
//then put the error into it
|
||||
if (vm) {
|
||||
if (vm.$ay.dev) {
|
||||
//make sure formState.appError is defined on data
|
||||
if (!window.$gz._.has(vm, "formState.appError")) {
|
||||
throw "DEV ERROR errorHandler::dealWithError -> formState.appError seems to be missing from form's vue data object";
|
||||
}
|
||||
}
|
||||
vm.formState.appError = msg;
|
||||
|
||||
//TODO: What is this doing exactly?
|
||||
//it's related to server errors but I'm setting appError above
|
||||
//why two error properties?
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
//and it can display and error then put the error into it
|
||||
if (!vm || vm.formState == undefined) {
|
||||
//popup if no place to display it elsewise
|
||||
window.$gz.eventBus.$emit("notify-error", msg);
|
||||
return;
|
||||
}
|
||||
|
||||
//should be able to display in form...
|
||||
if (vm.$ay.dev) {
|
||||
//make sure formState.appError is defined on data
|
||||
if (!window.$gz._.has(vm, "formState.appError")) {
|
||||
throw "DEV ERROR errorHandler::dealWithError -> formState.appError seems to be missing from form's vue data object";
|
||||
}
|
||||
}
|
||||
vm.formState.appError = msg;
|
||||
|
||||
//TODO: What is this doing exactly?
|
||||
//it's related to server errors but I'm setting appError above
|
||||
//why two error properties?
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
}
|
||||
export default {
|
||||
handleGeneralError(message, source, lineno, colno, error) {
|
||||
|
||||
@@ -565,7 +565,9 @@ export default {
|
||||
});
|
||||
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
// throw res.error;
|
||||
vm.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
//Save a copy of the server columns data for handling button clicks etc later
|
||||
vm.serverColumns = res.columns;
|
||||
|
||||
@@ -63,7 +63,7 @@ import chartBarHorizontalControl from "./components/chart-bar-horizontal-control
|
||||
//DEVELOPMENT MODE
|
||||
//THIS SHOULD BE FALSE IN RELEASE
|
||||
//************************************************************
|
||||
const DEV_MODE = true;
|
||||
const DEV_MODE = false;
|
||||
//************************************************************
|
||||
//**************************************************************
|
||||
//**************************************************************
|
||||
|
||||
@@ -1,21 +1,26 @@
|
||||
<template>
|
||||
<v-card class="mx-auto" v-if="formState.ready">
|
||||
<v-list subheader>
|
||||
<v-subheader>{{ $ay.t("UserInterfaceSettings") }}</v-subheader>
|
||||
<v-list-item
|
||||
link
|
||||
to="adm-global-select-templates"
|
||||
:data-cy="!!$ay.dev ? 'picklisttemplates' : false"
|
||||
>
|
||||
<v-list-item-title>{{ $ay.t("PickListTemplates") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<div>
|
||||
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||
<v-card class="mx-auto" v-if="formState.ready">
|
||||
<v-list subheader>
|
||||
<v-subheader>{{ $ay.t("UserInterfaceSettings") }}</v-subheader>
|
||||
<v-list-item
|
||||
link
|
||||
to="adm-global-select-templates"
|
||||
:data-cy="!!$ay.dev ? 'picklisttemplates' : false"
|
||||
>
|
||||
<v-list-item-title>{{
|
||||
$ay.t("PickListTemplates")
|
||||
}}</v-list-item-title>
|
||||
</v-list-item>
|
||||
|
||||
<!-- <v-subheader>{{ $ay.t("Server") }}</v-subheader>
|
||||
<!-- <v-subheader>{{ $ay.t("Server") }}</v-subheader>
|
||||
<v-list-item>
|
||||
<v-list-item-title>{{ $ay.t("Notifications") }}</v-list-item-title>
|
||||
</v-list-item> -->
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -28,6 +33,13 @@ export default {
|
||||
helpUrl: "form-adm-global-settings",
|
||||
formData: {
|
||||
ayaType: window.$gz.type.Global
|
||||
},
|
||||
formState: {
|
||||
ready: false,
|
||||
loading: true,
|
||||
errorBoxMessage: null,
|
||||
appError: null,
|
||||
serverError: {}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||
<v-data-table
|
||||
v-model="selected"
|
||||
:headers="headers"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||
<v-data-table
|
||||
v-model="selected"
|
||||
:headers="headers"
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
selectLists: {
|
||||
trialUsers: [
|
||||
{
|
||||
name: "AyaNova administrator - all",
|
||||
name: "AyaNova SuperUser - all",
|
||||
l: "superuser",
|
||||
p: "l3tm3in"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user