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
2a7c34a3
Commit
2a7c34a3
authored
Feb 27, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replaced custom hack with pointer and handler in erp5storage
parent
90542791
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
287 deletions
+15
-287
data/computer_overview.json
data/computer_overview.json
+3
-0
data/invoice_overview.json
data/invoice_overview.json
+3
-0
data/network_overview.json
data/network_overview.json
+3
-0
data/service_overview.json
data/service_overview.json
+3
-0
data/ticket_overview.json
data/ticket_overview.json
+3
-0
js/erp5_loader.js
js/erp5_loader.js
+0
-287
No files found.
data/computer_overview.json
View file @
2a7c34a3
...
@@ -28,6 +28,9 @@
...
@@ -28,6 +28,9 @@
{
"value"
:
"32"
,
"text"
:
"32"
,
"text_i18n"
:
"portal_type_dict.computer_dict.text_dict.32"
},
{
"value"
:
"32"
,
"text"
:
"32"
,
"text_i18n"
:
"portal_type_dict.computer_dict.text_dict.32"
},
{
"value"
:
"64"
,
"text"
:
"64"
,
"text_i18n"
:
"portal_type_dict.computer_dict.text_dict.64"
}
{
"value"
:
"64"
,
"text"
:
"64"
,
"text_i18n"
:
"portal_type_dict.computer_dict.text_dict.64"
}
]
]
},
"url_pointer"
:
{
"jump"
:
"current_computer"
}
}
},
},
"scheme"
:
[
"scheme"
:
[
...
...
data/invoice_overview.json
View file @
2a7c34a3
...
@@ -29,6 +29,9 @@
...
@@ -29,6 +29,9 @@
{
"value"
:
"32"
,
"text"
:
"32"
,
"text_i18n"
:
"portal_type_dict.invoice_dict.text_dict.32"
},
{
"value"
:
"32"
,
"text"
:
"32"
,
"text_i18n"
:
"portal_type_dict.invoice_dict.text_dict.32"
},
{
"value"
:
"64"
,
"text"
:
"64"
,
"text_i18n"
:
"portal_type_dict.invoice_dict.text_dict.64"
}
{
"value"
:
"64"
,
"text"
:
"64"
,
"text_i18n"
:
"portal_type_dict.invoice_dict.text_dict.64"
}
]
]
},
"url_pointer"
:
{
"jump"
:
"current_invoices"
}
}
},
},
"scheme"
:
[
"scheme"
:
[
...
...
data/network_overview.json
View file @
2a7c34a3
...
@@ -20,6 +20,9 @@
...
@@ -20,6 +20,9 @@
"no_items"
:
{
"no_items"
:
{
"message"
:
"No networks found."
,
"message"
:
"No networks found."
,
"message_i18n"
:
"portal_type_dict.network_dict.text_dict.nonet"
"message_i18n"
:
"portal_type_dict.network_dict.text_dict.nonet"
},
"url_pointer"
:
{
"jump"
:
"current_network"
}
}
},
},
"scheme"
:
[
"scheme"
:
[
...
...
data/service_overview.json
View file @
2a7c34a3
...
@@ -24,6 +24,9 @@
...
@@ -24,6 +24,9 @@
{
"value"
:
"32"
,
"text"
:
"32"
,
"text_i18n"
:
"portal_type_dict.service_dict.text_dict.32"
},
{
"value"
:
"32"
,
"text"
:
"32"
,
"text_i18n"
:
"portal_type_dict.service_dict.text_dict.32"
},
{
"value"
:
"64"
,
"text"
:
"64"
,
"text_i18n"
:
"portal_type_dict.service_dict.text_dict.64"
}
{
"value"
:
"64"
,
"text"
:
"64"
,
"text_i18n"
:
"portal_type_dict.service_dict.text_dict.64"
}
]
]
},
"url_pointer"
:
{
"jump"
:
"current_hosting_subscriptions"
}
}
},
},
"scheme"
:
[
"scheme"
:
[
...
...
data/ticket_overview.json
View file @
2a7c34a3
...
@@ -28,6 +28,9 @@
...
@@ -28,6 +28,9 @@
{
"value"
:
"32"
,
"text"
:
"32"
,
"text_i18n"
:
"portal_type_dict.ticket_dict.text_dict.32"
},
{
"value"
:
"32"
,
"text"
:
"32"
,
"text_i18n"
:
"portal_type_dict.ticket_dict.text_dict.32"
},
{
"value"
:
"64"
,
"text"
:
"64"
,
"text_i18n"
:
"portal_type_dict.ticket_dict.text_dict.64"
}
{
"value"
:
"64"
,
"text"
:
"64"
,
"text_i18n"
:
"portal_type_dict.ticket_dict.text_dict.64"
}
]
]
},
"url_pointer"
:
{
"jump"
:
"current_ticket"
}
}
},
},
"scheme"
:
[
"scheme"
:
[
...
...
js/erp5_loader.js
View file @
2a7c34a3
...
@@ -718,64 +718,6 @@
...
@@ -718,64 +718,6 @@
return
(
reply
);
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
,
store
,
pass
=
reply
.
pass
;
store
=
app
.
storage_dict
;
if
(
store
.
property_dict
.
storage
)
{
config
=
{
"
url
"
:
app
.
storage_dict
.
property_dict
.
items
.
storage_list
[
0
].
url
,
"
type
"
:
"
GET
"
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
};
// access storage
return
jIO
.
util
.
ajax
(
config
)
.
then
(
function
(
response
)
{
return
jIO
.
util
.
ajax
({
"
url
"
:
util
.
parse
(
response
.
target
.
responseText
).
_links
.
me
.
href
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
});
}).
then
(
function
(
answer
)
{
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
if
(
reply
.
response
)
{
return
{
"
response
"
:
util
.
parse
(
reply
.
response
),
"
pass
"
:
pass
};
}
return
{
"
pass
"
:
pass
}
}).
fail
(
util
.
error
);
}
return
(
reply
);
},
/**
/**
* @method ticket_status
* @method ticket_status
* @param {object} reply Object received from previous chain element
* @param {object} reply Object received from previous chain element
...
@@ -818,235 +760,6 @@
...
@@ -818,235 +760,6 @@
}
}
return
(
reply
);
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
,
store
,
reply
,
pass
=
reply
.
pass
;
store
=
app
.
storage_dict
;
if
(
store
.
property_dict
)
{
config
=
{
"
url
"
:
app
.
storage_dict
.
property_dict
.
items
.
storage_list
[
0
].
url
,
"
type
"
:
"
GET
"
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
};
// access storage
return
jIO
.
util
.
ajax
(
config
)
.
then
(
function
(
response
)
{
return
jIO
.
util
.
ajax
({
"
url
"
:
util
.
parse
(
response
.
target
.
responseText
).
_links
.
me
.
href
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
});
}).
then
(
function
(
answer
)
{
reply
=
util
.
parse
(
answer
.
target
.
responseText
).
_links
.
slapos_jump
;
for
(
i
=
0
;
i
<
reply
.
length
;
i
+=
1
)
{
if
(
reply
[
i
].
name
===
"
current_computer
"
)
{
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
if
(
reply
.
response
)
{
return
{
"
response
"
:
util
.
parse
(
reply
.
response
),
"
pass
"
:
pass
};
}
return
{
"
pass
"
:
pass
}
}).
fail
(
util
.
error
);
}
return
(
reply
);
},
/**
* @method subscriptions
* @param {object} reply Object received from previous chain element
* @param {object} response Object object passed on to next element
**/
"
invoices
"
:
function
(
reply
)
{
var
config
,
property
,
query
,
href
,
i
,
reply
,
store
,
pass
=
reply
.
pass
;
store
=
app
.
storage_dict
;
if
(
store
.
property_dict
.
storage
)
{
config
=
{
"
url
"
:
app
.
storage_dict
.
property_dict
.
items
.
storage_list
[
0
].
url
,
"
type
"
:
"
GET
"
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
};
// access storage
return
jIO
.
util
.
ajax
(
config
)
.
then
(
function
(
response
)
{
return
jIO
.
util
.
ajax
({
"
url
"
:
util
.
parse
(
response
.
target
.
responseText
).
_links
.
me
.
href
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
});
}).
then
(
function
(
answer
)
{
reply
=
util
.
parse
(
answer
.
target
.
responseText
).
_links
.
slapos_jump
;
for
(
i
=
0
;
i
<
reply
.
length
;
i
+=
1
)
{
if
(
reply
[
i
].
name
===
"
current_invoice
"
)
{
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
if
(
reply
.
response
)
{
return
{
"
response
"
:
util
.
parse
(
reply
.
response
),
"
pass
"
:
pass
};
}
return
{
"
pass
"
:
pass
}
}).
fail
(
util
.
error
);
}
return
(
reply
);
},
/**
* @method subscriptions
* @param {object} reply Object received from previous chain element
* @param {object} response Object object passed on to next element
**/
"
networks
"
:
function
(
reply
)
{
var
config
,
property
,
query
,
href
,
i
,
reply
,
store
,
pass
=
reply
.
pass
;
store
=
app
.
storage_dict
;
if
(
store
.
property_dict
.
storage
)
{
config
=
{
"
url
"
:
app
.
storage_dict
.
property_dict
.
items
.
storage_list
[
0
].
url
,
"
type
"
:
"
GET
"
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
};
// access storage
return
jIO
.
util
.
ajax
(
config
)
.
then
(
function
(
response
)
{
return
jIO
.
util
.
ajax
({
"
url
"
:
util
.
parse
(
response
.
target
.
responseText
).
_links
.
me
.
href
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
});
}).
then
(
function
(
answer
)
{
reply
=
util
.
parse
(
answer
.
target
.
responseText
).
_links
.
slapos_jump
;
for
(
i
=
0
;
i
<
reply
.
length
;
i
+=
1
)
{
if
(
reply
[
i
].
name
===
"
current_network
"
)
{
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
if
(
reply
.
response
)
{
return
{
"
response
"
:
util
.
parse
(
reply
.
response
),
"
pass
"
:
pass
};
}
return
{
"
pass
"
:
pass
}
}).
fail
(
util
.
error
);
}
return
(
reply
);
},
/**
* @method subscriptions
* @param {object} reply Object received from previous chain element
* @param {object} response Object object passed on to next element
**/
// TODO: should be renamed to overview
"
subscriptions
"
:
function
(
reply
)
{
var
config
,
property
,
query
,
href
,
i
,
reply
,
store
,
pass
=
reply
.
pass
;
store
=
app
.
storage_dict
;
if
(
store
.
property_dict
.
storage
)
{
config
=
{
"
url
"
:
app
.
storage_dict
.
property_dict
.
items
.
storage_list
[
0
].
url
,
"
type
"
:
"
GET
"
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
};
// access storage
return
jIO
.
util
.
ajax
(
config
)
.
then
(
function
(
response
)
{
return
jIO
.
util
.
ajax
({
"
url
"
:
util
.
parse
(
response
.
target
.
responseText
).
_links
.
me
.
href
,
"
xhrFields
"
:
{
"
withCredentials
"
:
true
}
});
}).
then
(
function
(
answer
)
{
reply
=
util
.
parse
(
answer
.
target
.
responseText
).
_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
if
(
reply
.
response
)
{
return
{
"
response
"
:
util
.
parse
(
reply
.
response
),
"
pass
"
:
pass
};
}
return
{
"
pass
"
:
pass
}
}).
fail
(
util
.
error
);
}
return
(
reply
);
}
};
};
/**
/**
...
...
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