Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/almanac/servicetype/AlmanacClusterRepositoryServiceType.php b/src/applications/almanac/servicetype/AlmanacClusterRepositoryServiceType.php
index fffe94997a..ae3dff9995 100644
--- a/src/applications/almanac/servicetype/AlmanacClusterRepositoryServiceType.php
+++ b/src/applications/almanac/servicetype/AlmanacClusterRepositoryServiceType.php
@@ -1,59 +1,63 @@
<?php
final class AlmanacClusterRepositoryServiceType
extends AlmanacClusterServiceType {
const SERVICETYPE = 'cluster.repository';
public function getServiceTypeShortName() {
return pht('Cluster Repository');
}
public function getServiceTypeName() {
return pht('Phabricator Cluster: Repository');
}
public function getServiceTypeDescription() {
return pht(
'Defines a repository service for use in a Phabricator cluster.');
}
public function getFieldSpecifications() {
return array(
- 'closed' => id(new PhabricatorTextEditField()),
+ 'closed' => id(new PhabricatorBoolEditField())
+ ->setOptions(
+ pht('Allow New Repositories'),
+ pht('Prevent New Repositories'))
+ ->setValue(false),
);
}
public function getBindingFieldSpecifications(AlmanacBinding $binding) {
$protocols = array(
array(
'value' => 'http',
'port' => 80,
),
array(
'value' => 'https',
'port' => 443,
),
array(
'value' => 'ssh',
'port' => 22,
),
);
$default_value = 'http';
if ($binding->hasInterface()) {
$interface = $binding->getInterface();
$port = $interface->getPort();
$default_ports = ipull($protocols, 'value', 'port');
$default_value = idx($default_ports, $port, $default_value);
}
return array(
'protocol' => id(new PhabricatorSelectEditField())
->setOptions(ipull($protocols, 'value', 'value'))
->setValue($default_value),
);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, Jul 27, 11:36 AM (6 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
185667
Default Alt Text
(1 KB)

Event Timeline