Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability for collaborators #139

Open
wants to merge 4 commits into
base: v2.2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description:
text: WordPress Standalone with built-in kit for choosing optimal application servers and a set of advanced features for running websites and blogs. WordPress CMS deployed as a lightweight standalone container with minimal allocated resources for cost efficiency.
short: WordPress Standalone with built-in kit for choosing optimal application servers and a set of advanced features for running websites and blogs

baseUrl: https://raw.githubusercontent.com/jelastic-jps/wordpress/v2.2.0
baseUrl: https://raw.githubusercontent.com/sych74/wordpress/JE-61517

onBeforeInit: /scripts/beforeInit.js?_r=${fn.random}
onBeforeInstall: /scripts/beforeInstall.js?_r=${fn.random}
Expand All @@ -20,6 +20,7 @@ nodes: definedInOnBeforeInstall
skipNodeEmails: true

settings:
onBeforeInit: return settings;
fields:
- caption: Advanced Features
type: displayfield
Expand Down
16 changes: 15 additions & 1 deletion scripts/beforeInit.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,21 @@ var extIP = "environment.externalip.enabled",
extIPperNode = "environment.externalip.maxcount.per.node",
markup = "", cur = null, text = "used", LE = true;

var quotas = jelastic.billing.account.GetQuotas(extIP + ";"+extIPperEnv+";" + extIPperNode ).array;
var hasCollaboration = (parseInt('${fn.compareEngine(7.0)}', 10) >= 0),
quotas = [], group;

if (hasCollaboration) {
quotas = [
{ quota : { name: extIP }, value: parseInt('${quota.environment.externalip.enabled}', 10) },
{ quota : { name: extIPperEnv }, value: parseInt('${quota.environment.externalip.maxcount}', 10) },
{ quota : { name: extIPperNode }, value: parseInt('${quota.environment.externalip.maxcount.per.node}', 10) }
];
group = { groupType: '${account.groupType}' };
} else {
quotas = jelastic.billing.account.GetQuotas(extIP + ";"+extIPperEnv+";" + extIPperNode).array;
group = jelastic.billing.account.GetAccount(appid, session);
}

for (var i = 0; i < quotas.length; i++){
var q = quotas[i], n = toNative(q.quota.name);

Expand Down