1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Add edit methods for Almanac services and devices

Summary: See T12414. This just gets started; we still need edit endpoints for network interfaces and bindings.

Test Plan: Created some devices/services from the conduit UI.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18605
This commit is contained in:
Austin McKinley 2017-09-14 13:18:40 -07:00
parent 939008e64c
commit c71cb944a4
3 changed files with 42 additions and 0 deletions

View file

@ -9,6 +9,7 @@
phutil_register_library_map(array(
'__library_version__' => 2,
'class' => array(
'AlamancServiceEditConduitAPIMethod' => 'applications/almanac/conduit/AlamancServiceEditConduitAPIMethod.php',
'AlmanacAddress' => 'applications/almanac/util/AlmanacAddress.php',
'AlmanacBinding' => 'applications/almanac/storage/AlmanacBinding.php',
'AlmanacBindingDisableController' => 'applications/almanac/controller/AlmanacBindingDisableController.php',
@ -36,6 +37,7 @@ phutil_register_library_map(array(
'AlmanacDAO' => 'applications/almanac/storage/AlmanacDAO.php',
'AlmanacDevice' => 'applications/almanac/storage/AlmanacDevice.php',
'AlmanacDeviceController' => 'applications/almanac/controller/AlmanacDeviceController.php',
'AlmanacDeviceEditConduitAPIMethod' => 'applications/almanac/conduit/AlmanacDeviceEditConduitAPIMethod.php',
'AlmanacDeviceEditController' => 'applications/almanac/controller/AlmanacDeviceEditController.php',
'AlmanacDeviceEditEngine' => 'applications/almanac/editor/AlmanacDeviceEditEngine.php',
'AlmanacDeviceEditor' => 'applications/almanac/editor/AlmanacDeviceEditor.php',
@ -4930,6 +4932,7 @@ phutil_register_library_map(array(
'require_celerity_resource' => 'applications/celerity/api.php',
),
'xmap' => array(
'AlamancServiceEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
'AlmanacAddress' => 'Phobject',
'AlmanacBinding' => array(
'AlmanacDAO',
@ -4975,6 +4978,7 @@ phutil_register_library_map(array(
'PhabricatorExtendedPolicyInterface',
),
'AlmanacDeviceController' => 'AlmanacController',
'AlmanacDeviceEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
'AlmanacDeviceEditController' => 'AlmanacDeviceController',
'AlmanacDeviceEditEngine' => 'PhabricatorEditEngine',
'AlmanacDeviceEditor' => 'AlmanacEditor',

View file

@ -0,0 +1,19 @@
<?php
final class AlamancServiceEditConduitAPIMethod
extends PhabricatorEditEngineAPIMethod {
public function getAPIMethodName() {
return 'almanac.service.edit';
}
public function newEditEngine() {
return new AlmanacServiceEditEngine();
}
public function getMethodSummary() {
return pht(
'Apply transactions to create a new service or edit an existing one.');
}
}

View file

@ -0,0 +1,19 @@
<?php
final class AlmanacDeviceEditConduitAPIMethod
extends PhabricatorEditEngineAPIMethod {
public function getAPIMethodName() {
return 'almanac.device.edit';
}
public function newEditEngine() {
return new AlmanacDeviceEditEngine();
}
public function getMethodSummary() {
return pht(
'Apply transactions to create a new device or edit an existing one.');
}
}