Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
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
pve-manager
Commits
c4616bac
Commit
c4616bac
authored
Nov 04, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve upload error messages
parent
b60844dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
ContentView.js
www/manager/storage/ContentView.js
+5
-6
No files found.
www/manager/storage/ContentView.js
View file @
c4616bac
...
@@ -19,7 +19,7 @@ Ext.define('PVE.storage.Upload', {
...
@@ -19,7 +19,7 @@ Ext.define('PVE.storage.Upload', {
throw
"
no storage ID specified
"
;
throw
"
no storage ID specified
"
;
}
}
var
url
=
"
/api2/htmljs
/nodes/
"
+
me
.
nodename
+
"
/storage/
"
+
me
.
storage
+
"
/upload
"
;
var
baseurl
=
"
/nodes/
"
+
me
.
nodename
+
"
/storage/
"
+
me
.
storage
+
"
/upload
"
;
var
pbar
=
Ext
.
create
(
'
Ext.ProgressBar
'
,
{
var
pbar
=
Ext
.
create
(
'
Ext.ProgressBar
'
,
{
text
:
'
Ready
'
,
text
:
'
Ready
'
,
...
@@ -27,7 +27,6 @@ Ext.define('PVE.storage.Upload', {
...
@@ -27,7 +27,6 @@ Ext.define('PVE.storage.Upload', {
});
});
me
.
formPanel
=
Ext
.
create
(
'
Ext.form.Panel
'
,
{
me
.
formPanel
=
Ext
.
create
(
'
Ext.form.Panel
'
,
{
url
:
url
,
method
:
'
POST
'
,
method
:
'
POST
'
,
waitMsgTarget
:
true
,
waitMsgTarget
:
true
,
bodyPadding
:
10
,
bodyPadding
:
10
,
...
@@ -64,7 +63,7 @@ Ext.define('PVE.storage.Upload', {
...
@@ -64,7 +63,7 @@ Ext.define('PVE.storage.Upload', {
var
doStandardSubmit
=
function
()
{
var
doStandardSubmit
=
function
()
{
form
.
submit
({
form
.
submit
({
url
:
me
.
url
,
url
:
"
/api2/htmljs
"
+
base
url
,
waitMsg
:
'
Uploading file...
'
,
waitMsg
:
'
Uploading file...
'
,
success
:
function
(
f
,
action
)
{
success
:
function
(
f
,
action
)
{
me
.
close
();
me
.
close
();
...
@@ -124,7 +123,7 @@ Ext.define('PVE.storage.Upload', {
...
@@ -124,7 +123,7 @@ Ext.define('PVE.storage.Upload', {
if
(
xhr
.
status
==
200
)
{
if
(
xhr
.
status
==
200
)
{
me
.
close
();
me
.
close
();
}
else
{
}
else
{
var
msg
=
"
Error
"
+
xhr
.
status
+
"
occurred uploading your file.
"
;
var
msg
=
"
Error
"
+
xhr
.
status
+
"
:
"
+
Ext
.
htmlEncode
(
xhr
.
statusText
);
Ext
.
Msg
.
alert
(
'
Upload failed
'
,
msg
,
function
(
btn
)
{
Ext
.
Msg
.
alert
(
'
Upload failed
'
,
msg
,
function
(
btn
)
{
me
.
close
();
me
.
close
();
});
});
...
@@ -146,7 +145,7 @@ Ext.define('PVE.storage.Upload', {
...
@@ -146,7 +145,7 @@ Ext.define('PVE.storage.Upload', {
}
}
},
false
);
},
false
);
xhr
.
open
(
"
POST
"
,
url
);
xhr
.
open
(
"
POST
"
,
"
/api2/json
"
+
baseurl
,
true
);
xhr
.
send
(
fd
);
xhr
.
send
(
fd
);
}
}
});
});
...
...
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