Page MenuHomePhabricator

D14682.id35512.diff
No OneTemporary

D14682.id35512.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -399,7 +399,7 @@
'rsrc/js/application/drydock/drydock-live-operation-status.js' => '901935ef',
'rsrc/js/application/files/behavior-icon-composer.js' => '8ef9ab58',
'rsrc/js/application/files/behavior-launch-icon-composer.js' => '48086888',
- 'rsrc/js/application/herald/HeraldRuleEditor.js' => '91a6031b',
+ 'rsrc/js/application/herald/HeraldRuleEditor.js' => '5bd8f385',
'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec',
'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3',
'rsrc/js/application/maniphest/behavior-batch-editor.js' => '782ab6e7',
@@ -554,7 +554,7 @@
'global-drag-and-drop-css' => '697324ad',
'harbormaster-css' => 'b0758ca5',
'herald-css' => '826075fa',
- 'herald-rule-editor' => '91a6031b',
+ 'herald-rule-editor' => '5bd8f385',
'herald-test-css' => 'a52e323e',
'inline-comment-summary-css' => '51efda3a',
'javelin-aphlict' => '5359e785',
@@ -1225,6 +1225,15 @@
'javelin-uri',
'javelin-routable',
),
+ '5bd8f385' => array(
+ 'multirow-row-manager',
+ 'javelin-install',
+ 'javelin-util',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-json',
+ 'phabricator-prefab',
+ ),
'5c54cbf3' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -1533,15 +1542,6 @@
'javelin-dom',
'javelin-request',
),
- '91a6031b' => array(
- 'multirow-row-manager',
- 'javelin-install',
- 'javelin-util',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-json',
- 'phabricator-prefab',
- ),
'93d0c9e3' => array(
'javelin-behavior',
'javelin-stratcom',
diff --git a/src/applications/herald/action/HeraldAction.php b/src/applications/herald/action/HeraldAction.php
--- a/src/applications/herald/action/HeraldAction.php
+++ b/src/applications/herald/action/HeraldAction.php
@@ -95,9 +95,13 @@
switch ($type) {
case self::STANDARD_PHID_LIST:
- $handles = $viewer->loadHandles($target);
- $handles = iterator_to_array($handles);
- return mpull($handles, 'getName', 'getPHID');
+ $datasource = $this->getDatasource();
+
+ if (!$datasource) {
+ return array();
+ }
+
+ return $datasource->getWireTokens($target);
}
return $target;
diff --git a/src/applications/herald/value/HeraldTokenizerFieldValue.php b/src/applications/herald/value/HeraldTokenizerFieldValue.php
--- a/src/applications/herald/value/HeraldTokenizerFieldValue.php
+++ b/src/applications/herald/value/HeraldTokenizerFieldValue.php
@@ -80,24 +80,10 @@
$viewer = $this->getViewer();
$value = (array)$value;
- // TODO: This should eventually render properly through the datasource
- // to get icons and colors.
+ $datasource = $this->getDatasource()
+ ->setViewer($viewer);
- if ($this->valueMap !== null) {
- $map = array();
- foreach ($value as $v) {
- $map[$v] = idx($this->valueMap, $v, $v);
- }
- return $map;
- }
-
- $handles = $viewer->loadHandles($value);
-
- $map = array();
- foreach ($value as $v) {
- $map[$v] = $handles[$v]->getName();
- }
- return $map;
+ return $datasource->getWireTokens($value);
}
}
diff --git a/webroot/rsrc/js/application/herald/HeraldRuleEditor.js b/webroot/rsrc/js/application/herald/HeraldRuleEditor.js
--- a/webroot/rsrc/js/application/herald/HeraldRuleEditor.js
+++ b/webroot/rsrc/js/application/herald/HeraldRuleEditor.js
@@ -293,7 +293,8 @@
},
function(map) {
for (var k in map) {
- build.tokenizer.addToken(k, map[k]);
+ var v = JX.Prefab.transformDatasourceResults(map[k]);
+ build.tokenizer.addToken(k, v);
}
}];
},

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 16, 3:35 AM (1 w, 20 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705511
Default Alt Text
D14682.id35512.diff (3 KB)

Event Timeline