Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
82851d6d
Commit
82851d6d
authored
Oct 11, 2014
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
suppress "Something went wrong, sorry." when the management daemon's api key has changed
parent
2f952a79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
index.html
management/templates/index.html
+7
-2
No files found.
management/templates/index.html
View file @
82851d6d
...
...
@@ -277,7 +277,7 @@ function ajax(options) {
if
(
!
old_error
)
show_modal_error
(
"
Error
"
,
"
Something went wrong, sorry.
"
)
else
old_error
(
jqxhr
.
responseText
);
old_error
(
jqxhr
.
responseText
,
jqxhr
);
};
is_ajax_loading
=
true
;
$
.
ajax
(
options
);
...
...
@@ -312,6 +312,11 @@ function api(url, method, data, callback, callback_error) {
return
output
;
}
function
default_error
(
text
,
xhr
)
{
if
(
xhr
.
status
!=
403
)
// else handled below
show_modal_error
(
"
Error
"
,
"
Something went wrong, sorry.
"
)
}
ajax
({
url
:
"
/admin
"
+
url
,
method
:
method
,
...
...
@@ -325,7 +330,7 @@ function api(url, method, data, callback, callback_error) {
'
Basic
'
+
base64encode
(
api_credentials
[
0
]
+
'
:
'
+
api_credentials
[
1
]));
},
success
:
callback
,
error
:
callback_error
,
error
:
callback_error
||
default_error
,
statusCode
:
{
403
:
function
(
xhr
)
{
// Credentials are no longer valid. Try to login again.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment