Page MenuHomePhabricator

D19341.id46279.diff
No OneTemporary

D19341.id46279.diff

diff --git a/src/applications/almanac/editor/AlmanacBindingEditEngine.php b/src/applications/almanac/editor/AlmanacBindingEditEngine.php
--- a/src/applications/almanac/editor/AlmanacBindingEditEngine.php
+++ b/src/applications/almanac/editor/AlmanacBindingEditEngine.php
@@ -152,6 +152,19 @@
->setConduitDescription(pht('Set the interface to bind.'))
->setConduitTypeDescription(pht('Interface PHID.'))
->setValue($object->getInterfacePHID()),
+ id(new PhabricatorBoolEditField())
+ ->setKey('disabled')
+ ->setLabel(pht('Disabled'))
+ ->setIsConduitOnly(true)
+ ->setTransactionType(
+ AlmanacBindingDisableTransaction::TRANSACTIONTYPE)
+ ->setDescription(pht('Disable or enable the binding.'))
+ ->setConduitDescription(pht('Disable or enable the binding.'))
+ ->setConduitTypeDescription(pht('True to disable the binding.'))
+ ->setValue($object->getIsDisabled())
+ ->setOptions(
+ pht('Enable Binding'),
+ pht('Disable Binding')),
);
}
diff --git a/src/applications/almanac/storage/AlmanacBinding.php b/src/applications/almanac/storage/AlmanacBinding.php
--- a/src/applications/almanac/storage/AlmanacBinding.php
+++ b/src/applications/almanac/storage/AlmanacBinding.php
@@ -244,6 +244,10 @@
->setKey('interfacePHID')
->setType('phid')
->setDescription(pht('The interface the service is bound to.')),
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('disabled')
+ ->setType('bool')
+ ->setDescription(pht('Interface status.')),
);
}
@@ -252,11 +256,15 @@
'servicePHID' => $this->getServicePHID(),
'devicePHID' => $this->getDevicePHID(),
'interfacePHID' => $this->getInterfacePHID(),
+ 'disabled' => (bool)$this->getIsDisabled(),
);
}
public function getConduitSearchAttachments() {
- return array();
+ return array(
+ id(new AlmanacPropertiesSearchEngineAttachment())
+ ->setAttachmentKey('properties'),
+ );
}
}

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 14, 4:02 PM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7661364
Default Alt Text
D19341.id46279.diff (2 KB)

Event Timeline