Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15432020
D19341.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D19341.id.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 25, 3:52 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7661364
Default Alt Text
D19341.id.diff (2 KB)
Attached To
Mode
D19341: Allow Almanac Bindings to be enabled/disabled via API and support the "properties" attachment
Attached
Detach File
Event Timeline
Log In to Comment