mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Make minor Almanac device modernization updates
Summary: Ref T13641. Provide minor modernizations before adding a "Disabled" state. Test Plan: Browsed devices, created a new device. Maniphest Tasks: T13641 Differential Revision: https://secure.phabricator.com/D21626
This commit is contained in:
parent
c3e6db6f0b
commit
9003a45369
1 changed files with 7 additions and 5 deletions
|
@ -49,8 +49,8 @@ final class AlmanacDevice
|
|||
) + parent::getConfiguration();
|
||||
}
|
||||
|
||||
public function generatePHID() {
|
||||
return PhabricatorPHID::generateNewPHID(AlmanacDevicePHIDType::TYPECONST);
|
||||
public function getPHIDType() {
|
||||
return AlmanacDevicePHIDType::TYPECONST;
|
||||
}
|
||||
|
||||
public function save() {
|
||||
|
@ -62,7 +62,9 @@ final class AlmanacDevice
|
|||
}
|
||||
|
||||
public function getURI() {
|
||||
return '/almanac/device/view/'.$this->getName().'/';
|
||||
return urisprintf(
|
||||
'/almanac/device/view/%s/',
|
||||
$this->getName());
|
||||
}
|
||||
|
||||
public function rebuildClusterBindingStatus() {
|
||||
|
@ -84,8 +86,8 @@ final class AlmanacDevice
|
|||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||
queryfx(
|
||||
$this->establishConnection('w'),
|
||||
'UPDATE %T SET isBoundToClusterService = %d WHERE id = %d',
|
||||
$this->getTableName(),
|
||||
'UPDATE %R SET isBoundToClusterService = %d WHERE id = %d',
|
||||
$this,
|
||||
$this->getIsBoundToClusterService(),
|
||||
$this->getID());
|
||||
unset($unguarded);
|
||||
|
|
Loading…
Reference in a new issue