Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
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
Xiaohe Cao
jio
Commits
31f0324f
Commit
31f0324f
authored
Aug 26, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
function moved
parent
8f2f3f21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
26 deletions
+26
-26
src/jio/core/globals.js
src/jio/core/globals.js
+1
-26
src/jio/core/util.js
src/jio/core/util.js
+25
-0
No files found.
src/jio/core/globals.js
View file @
31f0324f
/*jslint indent: 2, maxlen: 80, sloppy: true, nomen: true */
/*jslint indent: 2, maxlen: 80, sloppy: true, nomen: true */
/*global uniqueJSONStringify */
/*global uniqueJSONStringify
, methodType
*/
var
defaults
=
{},
constants
=
{};
var
defaults
=
{},
constants
=
{};
...
@@ -357,31 +357,6 @@ defaults.job_rule_conditions = {};
...
@@ -357,31 +357,6 @@ defaults.job_rule_conditions = {};
uniqueJSONStringify
(
b
.
storage_spec
);
uniqueJSONStringify
(
b
.
storage_spec
);
}
}
/**
* Guess if the method is a writer or a reader.
*
* @param {String} method The method name
* @return {String} "writer", "reader" or "unknown"
*/
function
methodType
(
method
)
{
switch
(
method
)
{
case
"
post
"
:
case
"
put
"
:
case
"
putAttachment
"
:
case
"
remove
"
:
case
"
removeAttachment
"
:
case
"
repair
"
:
return
'
writer
'
;
case
"
get
"
:
case
"
getAttachment
"
:
case
"
allDocs
"
:
case
"
check
"
:
return
'
reader
'
;
default
:
return
'
unknown
'
;
}
}
/**
/**
* Compare two jobs and test if they are writers
* Compare two jobs and test if they are writers
*
*
...
...
src/jio/core/util.js
View file @
31f0324f
...
@@ -373,3 +373,28 @@ function arrayInsert(array, position) { // args*
...
@@ -373,3 +373,28 @@ function arrayInsert(array, position) { // args*
return
arrayExtend
(
array
,
array_part
);
return
arrayExtend
(
array
,
array_part
);
}
}
exports
.
util
.
arrayInsert
=
arrayInsert
;
exports
.
util
.
arrayInsert
=
arrayInsert
;
/**
* Guess if the method is a writer or a reader.
*
* @param {String} method The method name
* @return {String} "writer", "reader" or "unknown"
*/
function
methodType
(
method
)
{
switch
(
method
)
{
case
"
post
"
:
case
"
put
"
:
case
"
putAttachment
"
:
case
"
remove
"
:
case
"
removeAttachment
"
:
case
"
repair
"
:
return
'
writer
'
;
case
"
get
"
:
case
"
getAttachment
"
:
case
"
allDocs
"
:
case
"
check
"
:
return
'
reader
'
;
default
:
return
'
unknown
'
;
}
}
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