This commit is contained in:
cutemeli
2025-12-22 10:35:30 +00:00
parent 0bfc6c8425
commit 5ce7ca2c5d
38927 changed files with 0 additions and 4594700 deletions

View File

@@ -1,9 +0,0 @@
<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<div id="<?= $this->params['moduleId'] ?>"></div>
<script>
require(['<?= $this->params['baseUrl'] ?>build/main.js'], function (main) {
main.default(<?= json_encode($this->params) ?>);
});
</script>

View File

@@ -1,4 +0,0 @@
<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<?php echo $this->form; ?>

View File

@@ -1,23 +0,0 @@
<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<div id='<?php echo $this->element->getId(); ?>-form-row' class='form-row'>
<div class="field-name">
<label for="<?php echo $this->element->getId(); ?>">
<?php echo $this->element->getLabel(); ?>
<?php if (!$this->readOnly && $this->element->isRequired()): ?>
<span class="required">*</span>
<?php endif; ?>
</label>
</div>
<div class='field-value'>
<span>
<img src="<?php echo $this->skinUrl('/icons/16/plesk/website.png'); ?>"/>
/
<?php echo $this->elementPart($this->element)->content(); ?>
<?php echo $this->elementPart($this->element)->description(); ?>
</span>
<span class="field-errors" style="display: none;"></span>
</div>
</div>

View File

@@ -1,16 +0,0 @@
<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<div id="git-deployment-settings"></div>
<script type="text/javascript" src="/modules/git/javascript/git.js" ></script>
<script type="text/javascript">
//<![CDATA[
Jsw.onReady(function (){
var instance = new PleskExt.Git.DeploymentSettings(
$('git-deployment-settings'),
<?php echo json_encode($this->data) ?>
);
instance.render();
});
</script>

View File

@@ -1,175 +0,0 @@
<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<script>
//<![CDATA[
Jsw.onReady(function() {
// lookup relation
var gitSshKeyElement = $('git-sshKey'),
gitSubFormIsHidden,
showGitSubForm,
hideGitSubForm,
domainComponent = Jsw.getComponent(<?php echo $this->jsHtml($this->domainElementId) ?>),
emptyValue = <?php echo $this->jsHtml($this->emptyValue) ?>;
if (gitSshKeyElement && domainComponent) {
var defaultKey = gitSshKeyElement.value;
var onSshKeyChange = function () {
if (domainComponent.getValue() == emptyValue) {
gitSshKeyElement.value = defaultKey;
} else {
new Ajax.Request(Jsw.prepareUrl(<?php echo $this->jsHtml($this->getSshUrl) ?>), {
method: 'get',
parameters: {
id: domainComponent.getValue()
},
onSuccess: function(transport) {
var response = transport.responseText.evalJSON();
if ('error' == response.status || !response.data) {
gitSshKeyElement.value = defaultKey;
return;
}
gitSshKeyElement.value = response.data;
}
});
}
};
domainComponent.addEventObserver('component:change', onSshKeyChange);
onSshKeyChange();
}
// hosting type relation
var domainGitSubForm = $('git');
if (domainGitSubForm) {
var hostingTypes = $$('select[name="hostingType[hosting]"]'),
currentType = false;
gitSubFormIsHidden = $('git-isHidden');
hideGitSubForm = function() {
gitSubFormIsHidden.value = 1;
domainGitSubForm.hide();
};
showGitSubForm = function() {
gitSubFormIsHidden.value = 0;
domainGitSubForm.show();
};
if (hostingTypes && (currentType = hostingTypes.first())) {
var hostingChange = function () {
var hostingType = currentType;
if (!hostingType) {
return;
}
if (domainGitSubForm && 'hosting' === hostingType.value) {
showGitSubForm();
} else {
hideGitSubForm();
}
};
currentType.observe('change', hostingChange);
hostingChange();
}
// git domain permission
if (domainComponent) {
var gitDomainPermissionChange = function () {
if (domainComponent.getValue() == emptyValue) {
showGitSubForm();
} else {
new Ajax.Request(Jsw.prepareUrl(<?php echo $this->jsHtml($this->getDomainPermissionUrl) ?>), {
method: 'get',
parameters: {
id: domainComponent.getValue()
},
onSuccess: function (transport) {
var response = transport.responseText.evalJSON();
if ('error' == response.status || !response.data) {
return;
}
if (response.data.permission && response.data.hosting) {
showGitSubForm();
} else {
hideGitSubForm();
}
}
});
}
};
domainComponent.addEventObserver('component:change', gitDomainPermissionChange);
gitDomainPermissionChange();
}
}
// git plan permission (manage-git)
var planSelector = $('subscription-subscriptionInfo-servicePlan');
var subscriptionGitSubForm = $('subscription-git');
if (subscriptionGitSubForm) {
gitSubFormIsHidden = $('subscription-git-isHidden');
hideGitSubForm = function() {
gitSubFormIsHidden.value = 1;
subscriptionGitSubForm.hide();
};
showGitSubForm = function() {
gitSubFormIsHidden.value = 0;
subscriptionGitSubForm.show();
};
if (planSelector) {
var planChange = function () {
new Ajax.Request(Jsw.prepareUrl(<?php echo $this->jsHtml($this->getPlanPermissionUrl) ?>), {
method: 'get',
parameters: {
id: planSelector.getValue()
},
onSuccess: function (transport) {
var response = transport.responseText.evalJSON();
if ('error' == response.status || !response.data) {
return;
}
if (response.data.permission) {
showGitSubForm();
} else {
hideGitSubForm();
}
}
});
};
planSelector.observe('change', planChange);
planChange();
}
// customer with subscription
var createSubscriptionCheckbox = $('subscription-domainInfo-createSubscription');
if (createSubscriptionCheckbox) {
var createSubscriptionChange = function () {
if (createSubscriptionCheckbox.getValue()) {
showGitSubForm();
} else {
hideGitSubForm();
}
};
createSubscriptionCheckbox.observe('change', createSubscriptionChange);
createSubscriptionChange();
}
}
// pre-filling deploymentPath
var hostingSettingsSubForm = $('hostingSettings');
var documentRootElement = $('hostingSettings-root');
var deploymentPathElement = $('git-deploymentPath');
if (hostingSettingsSubForm && documentRootElement && deploymentPathElement) {
var changeDeploymentPath = function (event){
if (hostingSettingsSubForm.visible() && '' !== event.element().value) {
deploymentPathElement.value = event.element().value;
}
};
$w('change keyup value:change').each(function (eventName) {
documentRootElement.observe(eventName, changeDeploymentPath);
});
var disableDocumentRootObserver = function() {
$w('change keyup value:change').each(function (event) {
documentRootElement.stopObserving(event, changeDeploymentPath);
});
};
$w('change keyup').each(function (eventName) {
deploymentPathElement.observe(eventName, function () {
disableDocumentRootObserver();
})
});
}
});
//]]>
</script>

View File

@@ -1,26 +0,0 @@
<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<div class="form-row"<?php if (isset($this->formId)):?> id="<?php echo $this->formId;?>"<?php endif;?>>
<div class="field-name"></div>
<div class="field-value">
<div class="form-flow">
<?php foreach ($this->items as $item): ?>
<div class="form-flow-item" id="form-flow-item-<?php echo $item['form']->getId(); ?>">
<div class="form-flow-item-image">
<?php if (isset($item['image'])): ?>
<img src="<?php echo $item['image']; ?>" alt="">
<?php endif; ?>
</div>
<div class="form-flow-item-name"><?php echo isset($item['name']) ? $item['name'] : ''; ?></div>
<div class="form-flow-item-content">
<?php if (isset($item['description'])): ?>
<p><?php echo $item['description']; ?></p>
<?php endif; ?>
<?php echo $item['form']->render(); ?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>

View File

@@ -1,38 +0,0 @@
<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<div class="form-row" id="<?php echo $this->id ? $this->id : $this->element->getId() . '-form-row'; ?>">
<div class="field-name"><label for="<?php echo $this->element->getId(); ?>">
<?php echo $this->element->getLabel(); ?>
<?php if ($this->element->isRequired()): ?>
<span class="required">*</span>
<?php endif; ?></label></div>
<div class="field-value">
<div class="<?php echo $this->cssPrefix; ?>mode-selector">
<?php foreach ($this->element->getMultiOptions() as $optionName => $optionTitle): ?>
<div class="<?php echo $this->cssPrefix; ?>mode-selector-item">
<label class="<?php echo $this->cssPrefix; ?>mode-selector-radio <?php echo ($optionName == $this->element->getValue()) ? 'checked' : ''; ?>">
<input type="radio" id="<?php echo $this->element->getId() . "-$optionName"; ?>" name="<?php
echo $this->element->getBelongsTo()
? $this->element->getBelongsTo() . '[' . $this->element->getName() . ']'
: $this->element->getName();
?>" class="<?php echo $this->cssPrefix; ?>mode-selector-radio-input" <?php echo ($optionName == $this->element->getValue()) ? 'checked="checked"' : ''; ?> <?php echo ($this->element->disable === true
|| (is_array($this->element->disable) && in_array($optionName, $this->element->disable)))
? 'disabled="disabled"' : ''; ?> value="<?php echo $optionName; ?>">
<span class="<?php echo $this->cssPrefix; ?>mode-selector-radio-label"><i class="<?php echo $this->cssPrefix . $this->classes[$optionName]; ?>"></i><?php echo false === $this->element->escape ? $optionTitle : $this->escape($optionTitle); ?></span>
</label>
</div>
<?php endforeach;?>
</div>
</div>
</div>
<script type="text/javascript">
Jsw.onReady(function() {
$$('.<?php echo $this->cssPrefix; ?>mode-selector-radio input').invoke('observe', 'change', function(e) {
$$('.<?php echo $this->cssPrefix; ?>mode-selector-radio').invoke('removeClassName', 'checked');
e.target.up('.<?php echo $this->cssPrefix; ?>mode-selector-radio').addClassName('checked');
});
});
</script>

View File

@@ -1,79 +0,0 @@
<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<script type="text/javascript">
Jsw.onReady(function() {
var urlElement = $(<?php echo $this->jsHtml($this->element->getElement('url')->getId()); ?>);
var nameElement = $(<?php echo $this->jsHtml($this->element->getElement('name')->getId()); ?>);
var typeId = <?php echo $this->jsHtml($this->element->getElement('type')->getId()); ?>;
var typePush = <?php echo $this->jsHtml(PleskExt\Git\Db\Repository::TYPE_PUSH); ?>;
var typePull = <?php echo $this->jsHtml(PleskExt\Git\Db\Repository::TYPE_PULL); ?>;
var sshKeyElements = [$(<?=$this->jsHtml($this->element->getElement('sshKey')->getId())?>).up('.form-row')];
<?php if ($this->element->getElement('sshKeyNotice')) :?>
sshKeyElements.push($(<?=$this->jsHtml($this->element->getElement('sshKeyNotice')->getId())?>).up('.form-row'));
<?php endif; ?>
var deploymentEnabled = null;
<?php if ($this->element->getElement('deploymentEnabled')) :?>
deploymentEnabled = $(<?=$this->jsHtml($this->element->getElement('deploymentEnabled')->getId())?>);
<?php endif; ?>
var isDeploymentEnabled = function() {
return !deploymentEnabled || deploymentEnabled.checked;
};
var isSshUrl = function(value) {
var url = value.trim();
if (url.match(/^(https?|git|file):\/\//)) {
return false;
}
return url.match(/^ssh:\/\//) || url.match(/^.+@.+:/);
};
var defaultName = nameElement.value;
var isUserChangeName = false;
var setName = function() {
if (isUserChangeName) {
return;
}
var url = urlElement.value;
var match = url.match(/([^/]+)?\/?$/);
if (match.length != 2 || typeof match[1] == "undefined") {
nameElement.value = '';
} else {
nameElement.value = match[1].replace(/\.git$/, '');
}
};
var showSshKey = function() {
if (isDeploymentEnabled() && isSshUrl(urlElement.value)) {
sshKeyElements.invoke('show');
} else {
sshKeyElements.invoke('hide');
}
};
urlElement.observe('input', setName).observe('input', showSshKey);
$(typeId + '-' + typePush).observe('change', function (e){
sshKeyElements.invoke('hide');
});
$(typeId + '-' + typePull).observe('change', function (e){
showSshKey();
});
$$('[name=' + typeId + ']').invoke('on', 'change', function(e) {
if (e.target.value == typePush && !isUserChangeName) {
nameElement.value = defaultName;
} else if (e.target.value == typePull) {
setName();
}
});
nameElement.observe('input', function() {
isUserChangeName = true;
});
deploymentEnabled && deploymentEnabled.observe('click', showSshKey);
showSshKey();
});
</script>

View File

@@ -1,13 +0,0 @@
<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<b><?php echo pm_Locale::lmsg('forms.index.statisticTitle');?></b><br>
<?php echo pm_Locale::lmsg('forms.index.commonRepositories');?>: <?php echo $this->result['total'];?><br>
<?php echo pm_Locale::lmsg('forms.index.remoteRepositories');?>: <?php echo $this->result['pull'] . PHP_EOL;?><br>
<?php echo pm_Locale::lmsg('forms.index.localRepositories');?>: <?php echo $this->result['push'] . PHP_EOL;?><br>
<?php echo pm_Locale::lmsg('forms.index.repositoriesWithSmbUsers');?>: <?php echo $this->result['withSmbUsers'] . PHP_EOL;?><br>
<?php echo pm_Locale::lmsg('forms.index.smbUsersTotal');?>: <?php echo $this->result['smbUsersTotal'] . PHP_EOL;?><br>
<?php echo pm_Locale::lmsg('forms.index.autoDeployRepositories');?>: <?php echo $this->result['active'] . PHP_EOL;?><br>
<?php echo pm_Locale::lmsg('forms.index.manualDeployRepositories');?>: <?php echo $this->result['manual'] . PHP_EOL;?><br>
<?php echo pm_Locale::lmsg('forms.index.noDeployRepositories');?>: <?php echo $this->result['disabled'] . PHP_EOL;?><br>
<?php echo pm_Locale::lmsg('forms.index.deploymentsTotal');?>: <?php echo $this->result['deployments'] . PHP_EOL;?><br>