Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ecommerce-ui
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ecommerce-ui
Commits
4498d7c3
Commit
4498d7c3
authored
Feb 24, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to erp5 storage
parent
2ea8b22d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
108 deletions
+105
-108
data/network_overview.json
data/network_overview.json
+9
-0
data/software_overview.json
data/software_overview.json
+1
-1
js/erp5_loader.js
js/erp5_loader.js
+93
-106
lang/en-EN/dict.json
lang/en-EN/dict.json
+2
-1
No files found.
data/network_overview.json
View file @
4498d7c3
...
...
@@ -18,6 +18,15 @@
"text"
:
"Created Networks"
,
"text_i18n"
:
"portal_type_dict.network_dict.text_dict.created_networks"
},
"pagination"
:
{
"slot"
:
4
,
"option_list"
:
[
{
"value"
:
"8"
,
"text"
:
"8"
,
"text_i18n"
:
"portal_type_dict.network_dict.text_dict.8"
},
{
"value"
:
"16"
,
"text"
:
"16"
,
"text_i18n"
:
"portal_type_dict.network_dict.text_dict.16"
},
{
"value"
:
"32"
,
"text"
:
"32"
,
"text_i18n"
:
"portal_type_dict.network_dict.text_dict.32"
},
{
"value"
:
"64"
,
"text"
:
"64"
,
"text_i18n"
:
"portal_type_dict.network_dict.text_dict.64"
}
]
},
"no_items"
:
{
"message"
:
"No networks found."
,
"message_i18n"
:
"portal_type_dict.network_dict.text_dict.nonet"
...
...
data/software_overview.json
View file @
4498d7c3
...
...
@@ -8,7 +8,7 @@
"view"
:
"web_view"
,
"property_dict"
:
{
"link"
:
true
,
"link_identifier"
:
"_
relative_url
"
,
"link_identifier"
:
"_
id
"
,
"dynamic_children"
:
[
0
]
},
"scheme"
:
[
...
...
js/erp5_loader.js
View file @
4498d7c3
...
...
@@ -2887,69 +2887,6 @@
return
(
reply
);
},
/**
* @method ticketing
* @param {object} reply Object received from previous chain element
* @param {object} response Object object passed on to next element
**/
"
ticketing
"
:
function
(
reply
)
{
var
config
,
property
,
query
,
href
,
i
,
reply
,
pass
=
reply
.
pass
;
if
(
storage
)
{
config
=
{
"
url
"
:
storage
.
items
.
dict
.
url
,
"
type
"
:
"
GET
"
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
};
// access storage
return
jIO
.
util
.
ajax
(
config
)
.
then
(
function
(
response
)
{
var
parsed
=
util
.
parse
(
response
.
target
.
responseText
),
me
=
parsed
.
me
,
flux
=
flux
||
{};
if
(
!
me
)
{
return
{
"
pass
"
:
pass
};
}
else
{
return
jIO
.
util
.
ajax
({
"
url
"
:
me
.
href
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
});
}
}).
then
(
function
(
answer
)
{
if
(
answer
.
pass
)
{
flux
.
not_logged_in
=
true
;
return
{
"
pass
"
:
pass
};
}
else
{
reply
=
util
.
parse
(
answer
.
target
.
responseText
).
_links
.
slapos_jump
;
for
(
i
=
0
;
i
<
reply
.
length
;
i
+=
1
)
{
if
(
reply
[
i
].
name
===
"
current_ticket
"
)
{
query
=
reply
[
i
].
_query
;
}
}
if
(
query
===
undefined
)
{
query
=
reply
.
href
;
}
if
(
pass
.
config
.
initial_query
===
undefined
)
{
pass
.
config
.
initial_query
=
{};
}
pass
.
config
.
initial_query
.
skip_type
=
true
;
pass
.
config
.
initial_query
.
query
=
query
;
// pass hacked query back into chain
return
{
"
response
"
:
util
.
parse
(
reply
.
response
),
"
pass
"
:
pass
};
}
}).
fail
(
util
.
error
);
}
return
(
reply
);
},
/**
* @method ticket_status
* @param {object} reply Object received from previous chain element
...
...
@@ -2991,13 +2928,15 @@
return
(
reply
);
},
/**
* @method subscriptions
* @param {object} reply Object received from previous chain element
* @param {object} response Object object passed on to next element
**/
"
servers
"
:
function
(
reply
)
{
var
config
,
property
,
query
,
href
,
i
,
reply
,
pass
=
reply
.
pass
;
var
config
,
property
,
query
,
href
,
i
,
reply
,
uri
,
pass
=
reply
.
pass
;
if
(
storage
)
{
config
=
{
...
...
@@ -3012,24 +2951,22 @@
return
jIO
.
util
.
ajax
(
config
)
.
then
(
function
(
response
)
{
var
parsed
=
util
.
parse
(
response
.
target
.
responseText
),
me
=
parsed
.
me
,
me
=
parsed
.
_links
.
me
,
flux
=
flux
||
{};
if
(
!
me
)
{
flux
.
not_logged_in
=
true
;
return
{
"
pass
"
:
pass
};
}
else
{
return
jIO
.
util
.
ajax
({
"
url
"
:
me
.
href
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
});
uri
=
new
URI
(
me
.
href
)
return
storage
.
items
.
get
({
"
_id
"
:
uri
.
segment
(
2
)});
}
}).
then
(
function
(
answer
)
{
if
(
answer
.
pass
)
{
flux
.
not_logged_in
=
true
;
return
{
"
pass
"
:
pass
};
}
else
{
reply
=
util
.
parse
(
answer
.
target
.
responseText
).
_links
.
slapos_jump
;
reply
=
util
.
parse
(
answer
.
data
).
_links
.
slapos_jump
;
for
(
i
=
0
;
i
<
reply
.
length
;
i
+=
1
)
{
if
(
reply
[
i
].
name
===
"
current_computer
"
)
{
query
=
reply
[
i
].
_query
;
...
...
@@ -3059,7 +2996,7 @@
* @param {object} response Object object passed on to next element
**/
"
invoices
"
:
function
(
reply
)
{
var
config
,
property
,
query
,
href
,
i
,
reply
,
pass
=
reply
.
pass
;
var
config
,
property
,
query
,
href
,
i
,
reply
,
uri
,
pass
=
reply
.
pass
;
if
(
storage
)
{
config
=
{
...
...
@@ -3074,25 +3011,22 @@
return
jIO
.
util
.
ajax
(
config
)
.
then
(
function
(
response
)
{
var
parsed
=
util
.
parse
(
response
.
target
.
responseText
),
me
=
parsed
.
me
,
me
=
parsed
.
_links
.
me
,
flux
=
flux
||
{};
if
(
!
me
)
{
flux
.
not_logged_in
=
true
;
return
{
"
pass
"
:
pass
};
}
else
{
return
jIO
.
util
.
ajax
({
"
url
"
:
me
.
href
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
});
uri
=
new
URI
(
me
.
href
)
return
storage
.
items
.
get
({
"
_id
"
:
uri
.
segment
(
2
)});
}
}).
then
(
function
(
answer
)
{
if
(
answer
.
pass
)
{
flux
.
not_logged_in
=
true
;
return
{
"
pass
"
:
pass
};
}
else
{
reply
=
util
.
parse
(
answer
.
target
.
responseText
).
_links
.
slapos_jump
;
reply
=
util
.
parse
(
answer
.
data
).
_links
.
slapos_jump
;
for
(
i
=
0
;
i
<
reply
.
length
;
i
+=
1
)
{
if
(
reply
[
i
].
name
===
"
current_invoice
"
)
{
query
=
reply
[
i
].
_query
;
...
...
@@ -3122,7 +3056,7 @@
* @param {object} response Object object passed on to next element
**/
"
networks
"
:
function
(
reply
)
{
var
config
,
property
,
query
,
href
,
i
,
reply
,
pass
=
reply
.
pass
;
var
config
,
property
,
query
,
href
,
i
,
reply
,
uri
,
pass
=
reply
.
pass
;
if
(
storage
)
{
config
=
{
...
...
@@ -3137,26 +3071,22 @@
return
jIO
.
util
.
ajax
(
config
)
.
then
(
function
(
response
)
{
var
parsed
=
util
.
parse
(
response
.
target
.
responseText
),
me
=
parsed
.
me
,
me
=
parsed
.
_links
.
me
,
flux
=
flux
||
{};
if
(
!
me
)
{
return
{
"
pass
"
:
pass
}
flux
.
not_logged_in
=
true
;
return
{
"
pass
"
:
pass
};
}
else
{
return
jIO
.
util
.
ajax
({
"
url
"
:
me
.
href
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
});
uri
=
new
URI
(
me
.
href
)
return
storage
.
items
.
get
({
"
_id
"
:
uri
.
segment
(
2
)});
}
}).
then
(
function
(
answer
)
{
if
(
answer
.
pass
)
{
flux
.
not_logged_in
=
true
;
return
{
"
pass
"
:
pass
};
}
else
{
reply
=
util
.
parse
(
answer
.
target
.
responseText
).
_links
.
slapos_jump
;
reply
=
util
.
parse
(
answer
.
data
).
_links
.
slapos_jump
;
for
(
i
=
0
;
i
<
reply
.
length
;
i
+=
1
)
{
if
(
reply
[
i
].
name
===
"
current_network
"
)
{
query
=
reply
[
i
].
_query
;
...
...
@@ -3187,7 +3117,7 @@
**/
// TODO: should be renamed to overview
"
subscriptions
"
:
function
(
reply
)
{
var
config
,
property
,
query
,
href
,
i
,
reply
,
pass
=
reply
.
pass
;
var
config
,
property
,
query
,
href
,
i
,
reply
,
uri
,
pass
=
reply
.
pass
;
if
(
storage
)
{
config
=
{
...
...
@@ -3202,26 +3132,84 @@
return
jIO
.
util
.
ajax
(
config
)
.
then
(
function
(
response
)
{
var
parsed
=
util
.
parse
(
response
.
target
.
responseText
),
me
=
parsed
.
me
,
me
=
parsed
.
_links
.
me
,
flux
=
flux
||
{};
if
(
!
me
)
{
flux
.
not_logged_in
=
true
;
return
{
"
pass
"
:
pass
};
}
else
{
return
jIO
.
util
.
ajax
({
"
url
"
:
me
.
href
,
uri
=
new
URI
(
me
.
href
)
return
storage
.
items
.
get
({
"
_id
"
:
uri
.
segment
(
2
)});
}
}).
then
(
function
(
answer
)
{
if
(
answer
.
pass
)
{
flux
.
not_logged_in
=
true
;
return
{
"
pass
"
:
pass
};
}
else
{
reply
=
util
.
parse
(
answer
.
data
).
_links
.
slapos_jump
;
for
(
i
=
0
;
i
<
reply
.
length
;
i
+=
1
)
{
if
(
reply
[
i
].
name
===
"
current_hosting_subscription
"
)
{
query
=
reply
[
i
].
_query
;
}
}
if
(
query
===
undefined
)
{
query
=
reply
.
href
;
}
if
(
pass
.
config
.
initial_query
===
undefined
)
{
pass
.
config
.
initial_query
=
{};
}
pass
.
config
.
initial_query
.
query
=
query
;
// pass hacked query back into chain
return
{
"
response
"
:
util
.
parse
(
reply
.
response
),
"
pass
"
:
pass
};
}
}).
fail
(
util
.
error
);
}
return
(
reply
);
},
/**
* @method ticketing
* @param {object} reply Object received from previous chain element
* @param {object} response Object object passed on to next element
**/
"
ticketing
"
:
function
(
reply
)
{
var
config
,
property
,
query
,
href
,
i
,
reply
,
uri
,
pass
=
reply
.
pass
;
if
(
storage
)
{
config
=
{
"
url
"
:
storage
.
items
.
dict
.
url
,
"
type
"
:
"
GET
"
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
});
};
// access storage
return
jIO
.
util
.
ajax
(
config
)
.
then
(
function
(
response
)
{
var
parsed
=
util
.
parse
(
response
.
target
.
responseText
),
me
=
parsed
.
_links
.
me
,
flux
=
flux
||
{};
if
(
!
me
)
{
flux
.
not_logged_in
=
true
;
return
{
"
pass
"
:
pass
};
}
else
{
uri
=
new
URI
(
me
.
href
)
return
storage
.
items
.
get
({
"
_id
"
:
uri
.
segment
(
2
)});
}
}).
then
(
function
(
answer
)
{
if
(
answer
.
pass
)
{
flux
.
not_logged_in
=
true
;
return
{
"
pass
"
:
pass
};
}
else
{
reply
=
util
.
parse
(
answer
.
target
.
responseText
).
_links
.
slapos_jump
;
reply
=
util
.
parse
(
answer
.
data
).
_links
.
slapos_jump
;
for
(
i
=
0
;
i
<
reply
.
length
;
i
+=
1
)
{
if
(
reply
[
i
].
name
===
"
current_
hosting_subscription
"
)
{
if
(
reply
[
i
].
name
===
"
current_
ticket
"
)
{
query
=
reply
[
i
].
_query
;
}
}
...
...
@@ -3231,6 +3219,7 @@
if
(
pass
.
config
.
initial_query
===
undefined
)
{
pass
.
config
.
initial_query
=
{};
}
pass
.
config
.
initial_query
.
skip_type
=
true
;
pass
.
config
.
initial_query
.
query
=
query
;
// pass hacked query back into chain
return
{
...
...
@@ -4164,7 +4153,6 @@
// loop data (!)
for
(
k
=
0
;
k
<
items
.
length
;
k
+=
1
)
{
item
=
items
[
k
].
doc
;
if
(
item
===
undefined
)
{
util
.
error
(
"
mapTableRows: Missing include_docs/data-set
"
);
...
...
@@ -4179,7 +4167,6 @@
// set id so it can be retrieved for radio/checkbox
// TODO: remove this! don't set on every cell...
cell
.
id
=
item
.
id
||
items
[
k
][
"
_id
"
];
if
(
props
.
link
)
{
cell
.
href
=
item
[
props
.
link_source
]
||
(
"
#
"
+
core
+
"
/
"
+
window
.
encodeURIComponent
(
item
[
props
.
link_identifier
||
"
id
"
]));
...
...
@@ -4191,10 +4178,10 @@
// action menu
if
(
props
.
action_menu
&&
cell
.
action_list
)
{
// HACK to add correct HREF and reference
if
(
item
.
_
relative_url
)
{
if
(
item
.
_
id
)
{
for
(
o
=
0
;
o
<
cell
.
action_list
.
length
;
o
+=
1
)
{
cell
.
action_list
[
o
].
reference
=
spec
.
set_id
;
cell
.
action_list
[
o
].
href
=
window
.
encodeURIComponent
(
item
.
_
relative_url
);
cell
.
action_list
[
o
].
href
=
window
.
encodeURIComponent
(
item
.
_
id
);
}
}
cell
.
action_list
=
cell
.
action_list
||
[];
...
...
lang/en-EN/dict.json
View file @
4498d7c3
...
...
@@ -73,7 +73,8 @@
"stopping"
:
"Shutting Down..."
,
"success"
:
"Ok"
,
"created"
:
"Created"
,
"destroying"
:
"Destroying"
"destroying"
:
"Destroying"
,
"internal_error"
:
"Internal Error"
},
"validation_dict"
:
{
"general"
:
"Please correct the highlighted fields."
,
...
...
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