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?
|
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??)
|
(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
|
todo: OPEN OBJECT HANDLER
|
||||||
Update it to check if a child type and if so then it calls get ancestor at server search route
|
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
|
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)
|
//If a form instance was provided (vue instance)
|
||||||
//then put the error into it
|
//and it can display and error then put the error into it
|
||||||
if (vm) {
|
if (!vm || vm.formState == undefined) {
|
||||||
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 {
|
|
||||||
//popup if no place to display it elsewise
|
//popup if no place to display it elsewise
|
||||||
window.$gz.eventBus.$emit("notify-error", msg);
|
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 {
|
export default {
|
||||||
handleGeneralError(message, source, lineno, colno, error) {
|
handleGeneralError(message, source, lineno, colno, error) {
|
||||||
|
|||||||
@@ -565,7 +565,9 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
throw res.error;
|
// throw res.error;
|
||||||
|
vm.formState.serverError = res.error;
|
||||||
|
window.$gz.form.setErrorBoxErrors(vm);
|
||||||
} else {
|
} else {
|
||||||
//Save a copy of the server columns data for handling button clicks etc later
|
//Save a copy of the server columns data for handling button clicks etc later
|
||||||
vm.serverColumns = res.columns;
|
vm.serverColumns = res.columns;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ import chartBarHorizontalControl from "./components/chart-bar-horizontal-control
|
|||||||
//DEVELOPMENT MODE
|
//DEVELOPMENT MODE
|
||||||
//THIS SHOULD BE FALSE IN RELEASE
|
//THIS SHOULD BE FALSE IN RELEASE
|
||||||
//************************************************************
|
//************************************************************
|
||||||
const DEV_MODE = true;
|
const DEV_MODE = false;
|
||||||
//************************************************************
|
//************************************************************
|
||||||
//**************************************************************
|
//**************************************************************
|
||||||
//**************************************************************
|
//**************************************************************
|
||||||
|
|||||||
@@ -1,21 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-card class="mx-auto" v-if="formState.ready">
|
<div>
|
||||||
<v-list subheader>
|
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||||
<v-subheader>{{ $ay.t("UserInterfaceSettings") }}</v-subheader>
|
<v-card class="mx-auto" v-if="formState.ready">
|
||||||
<v-list-item
|
<v-list subheader>
|
||||||
link
|
<v-subheader>{{ $ay.t("UserInterfaceSettings") }}</v-subheader>
|
||||||
to="adm-global-select-templates"
|
<v-list-item
|
||||||
:data-cy="!!$ay.dev ? 'picklisttemplates' : false"
|
link
|
||||||
>
|
to="adm-global-select-templates"
|
||||||
<v-list-item-title>{{ $ay.t("PickListTemplates") }}</v-list-item-title>
|
:data-cy="!!$ay.dev ? 'picklisttemplates' : false"
|
||||||
</v-list-item>
|
>
|
||||||
|
<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>
|
||||||
<v-list-item-title>{{ $ay.t("Notifications") }}</v-list-item-title>
|
<v-list-item-title>{{ $ay.t("Notifications") }}</v-list-item-title>
|
||||||
</v-list-item> -->
|
</v-list-item> -->
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -28,6 +33,13 @@ export default {
|
|||||||
helpUrl: "form-adm-global-settings",
|
helpUrl: "form-adm-global-settings",
|
||||||
formData: {
|
formData: {
|
||||||
ayaType: window.$gz.type.Global
|
ayaType: window.$gz.type.Global
|
||||||
|
},
|
||||||
|
formState: {
|
||||||
|
ready: false,
|
||||||
|
loading: true,
|
||||||
|
errorBoxMessage: null,
|
||||||
|
appError: null,
|
||||||
|
serverError: {}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||||
<v-data-table
|
<v-data-table
|
||||||
v-model="selected"
|
v-model="selected"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||||
<v-data-table
|
<v-data-table
|
||||||
v-model="selected"
|
v-model="selected"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export default {
|
|||||||
selectLists: {
|
selectLists: {
|
||||||
trialUsers: [
|
trialUsers: [
|
||||||
{
|
{
|
||||||
name: "AyaNova administrator - all",
|
name: "AyaNova SuperUser - all",
|
||||||
l: "superuser",
|
l: "superuser",
|
||||||
p: "l3tm3in"
|
p: "l3tm3in"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user