Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mukul
jio
Commits
1e8e41f5
Commit
1e8e41f5
authored
Oct 30, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jio.js updated
parent
6f7c661d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
15 deletions
+23
-15
jio.js
jio.js
+23
-15
No files found.
jio.js
View file @
1e8e41f5
...
@@ -2171,16 +2171,18 @@ function restCommandRejecter(param, args) {
...
@@ -2171,16 +2171,18 @@ function restCommandRejecter(param, args) {
"
message
"
:
"
Command failed
"
,
"
message
"
:
"
Command failed
"
,
"
reason
"
:
"
unknown
"
"
reason
"
:
"
unknown
"
},
},
// 2 - status, reason, message p
arameter
s
// 2 - status, reason, message p
ropertie
s
{},
{},
// 3 - never change
// 3 - status, reason, message parameters
{},
// 4 - never change
{
"
result
"
:
"
error
"
,
"
method
"
:
param
.
method
}
{
"
result
"
:
"
error
"
,
"
method
"
:
param
.
method
}
];
];
args
=
Array
.
prototype
.
slice
.
call
(
args
);
args
=
Array
.
prototype
.
slice
.
call
(
args
);
arg
=
args
.
shift
();
arg
=
args
.
shift
();
// priority
3
- never change
// priority
4
- never change
current_priority
=
priority
[
3
];
current_priority
=
priority
[
4
];
if
(
param
.
kwargs
.
_id
)
{
if
(
param
.
kwargs
.
_id
)
{
current_priority
.
id
=
param
.
kwargs
.
_id
;
current_priority
.
id
=
param
.
kwargs
.
_id
;
}
}
...
@@ -2188,8 +2190,8 @@ function restCommandRejecter(param, args) {
...
@@ -2188,8 +2190,8 @@ function restCommandRejecter(param, args) {
current_priority
.
attachment
=
param
.
kwargs
.
_attachment
;
current_priority
.
attachment
=
param
.
kwargs
.
_attachment
;
}
}
// priority
2
- status, reason, message parameters
// priority
3
- status, reason, message parameters
current_priority
=
priority
[
2
];
current_priority
=
priority
[
3
];
// parsing first parameter if is not an object
// parsing first parameter if is not an object
if
(
typeof
arg
!==
'
object
'
||
arg
===
null
||
Array
.
isArray
(
arg
))
{
if
(
typeof
arg
!==
'
object
'
||
arg
===
null
||
Array
.
isArray
(
arg
))
{
// first parameter is mandatory
// first parameter is mandatory
...
@@ -2211,11 +2213,12 @@ function restCommandRejecter(param, args) {
...
@@ -2211,11 +2213,12 @@ function restCommandRejecter(param, args) {
arg
=
args
.
shift
();
arg
=
args
.
shift
();
}
}
// priority 0 - custom values
current_priority
=
priority
[
0
];
// parsing fourth parameter if is an object
// parsing fourth parameter if is an object
if
(
typeof
arg
===
'
object
'
&&
arg
!==
null
&&
!
Array
.
isArray
(
arg
))
{
if
(
typeof
arg
===
'
object
'
&&
arg
!==
null
&&
!
Array
.
isArray
(
arg
))
{
dictUpdate
(
current_priority
,
arg
);
// priority 0 - custom values
dictUpdate
(
priority
[
0
],
arg
);
// priority 2 - status, reason, message properties
current_priority
=
priority
[
2
];
if
(
arg
.
hasOwnProperty
(
'
reason
'
))
{
if
(
arg
.
hasOwnProperty
(
'
reason
'
))
{
current_priority
.
reason
=
arg
.
reason
;
current_priority
.
reason
=
arg
.
reason
;
}
}
...
@@ -2273,9 +2276,11 @@ function restCommandResolver(param, args) {
...
@@ -2273,9 +2276,11 @@ function restCommandResolver(param, args) {
{},
{},
// 1 - default values
// 1 - default values
{},
{},
// 2 - status parameter
// 2 - status property
{},
// 3 - status parameter
{},
{},
//
3
- never change
//
4
- never change
{
"
result
"
:
"
success
"
,
"
method
"
:
param
.
method
}
{
"
result
"
:
"
success
"
,
"
method
"
:
param
.
method
}
];
];
args
=
Array
.
prototype
.
slice
.
call
(
args
);
args
=
Array
.
prototype
.
slice
.
call
(
args
);
...
@@ -2304,8 +2309,8 @@ function restCommandResolver(param, args) {
...
@@ -2304,8 +2309,8 @@ function restCommandResolver(param, args) {
current_priority
.
statusText
=
constants
.
http_status_text
.
ok
;
current_priority
.
statusText
=
constants
.
http_status_text
.
ok
;
}
}
// priority
2
- status parameter
// priority
3
- status parameter
current_priority
=
priority
[
2
];
current_priority
=
priority
[
3
];
// parsing first parameter if is not an object
// parsing first parameter if is not an object
if
(
typeof
arg
!==
'
object
'
||
arg
===
null
||
Array
.
isArray
(
arg
))
{
if
(
typeof
arg
!==
'
object
'
||
arg
===
null
||
Array
.
isArray
(
arg
))
{
if
(
arg
!==
undefined
)
{
if
(
arg
!==
undefined
)
{
...
@@ -2314,11 +2319,14 @@ function restCommandResolver(param, args) {
...
@@ -2314,11 +2319,14 @@ function restCommandResolver(param, args) {
arg
=
args
.
shift
();
arg
=
args
.
shift
();
}
}
// priority 0 - custom values
current_priority
=
priority
[
0
];
// parsing second parameter if is an object
// parsing second parameter if is an object
if
(
typeof
arg
===
'
object
'
&&
arg
!==
null
&&
!
Array
.
isArray
(
arg
))
{
if
(
typeof
arg
===
'
object
'
&&
arg
!==
null
&&
!
Array
.
isArray
(
arg
))
{
// priority 0 - custom values
dictUpdate
(
current_priority
,
arg
);
dictUpdate
(
current_priority
,
arg
);
// priority 2 - status property
if
(
arg
.
hasOwnProperty
(
"
status
"
)
||
arg
.
hasOwnProperty
(
"
statusText
"
))
{
priority
[
2
].
status
=
arg
.
statusText
||
arg
.
status
;
}
}
}
// merge priority dicts
// merge priority dicts
...
...
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