Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79290170
HarbormasterBuildLogSearchEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Aug 25, 16:17
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Aug 27, 16:17 (2 d)
Engine
blob
Format
Raw Data
Handle
20169485
Attached To
rPH Phabricator
HarbormasterBuildLogSearchEngine.php
View Options
<?php
final
class
HarbormasterBuildLogSearchEngine
extends
PhabricatorApplicationSearchEngine
{
public
function
getResultTypeDescription
()
{
return
pht
(
'Harbormaster Build Logs'
);
}
public
function
getApplicationClassName
()
{
return
'PhabricatorHarbormasterApplication'
;
}
public
function
newQuery
()
{
return
new
HarbormasterBuildLogQuery
();
}
protected
function
buildCustomSearchFields
()
{
return
array
(
id
(
new
PhabricatorPHIDsSearchField
())
->
setLabel
(
pht
(
'Build Targets'
))
->
setKey
(
'buildTargetPHIDs'
)
->
setAliases
(
array
(
'buildTargetPHID'
,
'buildTargets'
,
'buildTarget'
,
'targetPHIDs'
,
'targetPHID'
,
'targets'
,
'target'
,
))
->
setDescription
(
pht
(
'Search for logs that belong to a particular build target.'
)),
);
}
protected
function
buildQueryFromParameters
(
array
$map
)
{
$query
=
$this
->
newQuery
();
if
(
$map
[
'buildTargetPHIDs'
])
{
$query
->
withBuildTargetPHIDs
(
$map
[
'buildTargetPHIDs'
]);
}
return
$query
;
}
protected
function
getURI
(
$path
)
{
return
'/harbormaster/log/'
.
$path
;
}
protected
function
getBuiltinQueryNames
()
{
return
array
(
'all'
=>
pht
(
'All Builds'
),
);
}
public
function
buildSavedQueryFromBuiltin
(
$query_key
)
{
$query
=
$this
->
newSavedQuery
();
$query
->
setQueryKey
(
$query_key
);
switch
(
$query_key
)
{
case
'all'
:
return
$query
;
}
return
parent
::
buildSavedQueryFromBuiltin
(
$query_key
);
}
protected
function
renderResultList
(
array
$builds
,
PhabricatorSavedQuery
$query
,
array
$handles
)
{
// For now, this SearchEngine is only for driving the API.
throw
new
PhutilMethodNotImplementedException
();
}
}
Event Timeline
Log In to Comment