mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 09:42:41 +01:00
(stable) Promote 2016 Week 36
This commit is contained in:
commit
cc7aef4cd6
119 changed files with 1679 additions and 1048 deletions
|
@ -0,0 +1,3 @@
|
||||||
|
/* Allow this column to be nullable (null means we'll try to autodetect) */
|
||||||
|
ALTER TABLE {$NAMESPACE}_pastebin.pastebin_paste MODIFY language VARCHAR(64)
|
||||||
|
COLLATE {$COLLATE_TEXT};
|
|
@ -0,0 +1,2 @@
|
||||||
|
UPDATE {$NAMESPACE}_pastebin.pastebin_paste SET language = NULL
|
||||||
|
WHERE language = '';
|
|
@ -656,6 +656,7 @@ phutil_register_library_map(array(
|
||||||
'DiffusionExternalSymbolsSource' => 'applications/diffusion/symbol/DiffusionExternalSymbolsSource.php',
|
'DiffusionExternalSymbolsSource' => 'applications/diffusion/symbol/DiffusionExternalSymbolsSource.php',
|
||||||
'DiffusionFileContentQuery' => 'applications/diffusion/query/filecontent/DiffusionFileContentQuery.php',
|
'DiffusionFileContentQuery' => 'applications/diffusion/query/filecontent/DiffusionFileContentQuery.php',
|
||||||
'DiffusionFileContentQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionFileContentQueryConduitAPIMethod.php',
|
'DiffusionFileContentQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionFileContentQueryConduitAPIMethod.php',
|
||||||
|
'DiffusionFileFutureQuery' => 'applications/diffusion/query/DiffusionFileFutureQuery.php',
|
||||||
'DiffusionFindSymbolsConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionFindSymbolsConduitAPIMethod.php',
|
'DiffusionFindSymbolsConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionFindSymbolsConduitAPIMethod.php',
|
||||||
'DiffusionGetLintMessagesConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php',
|
'DiffusionGetLintMessagesConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php',
|
||||||
'DiffusionGetRecentCommitsByPathConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionGetRecentCommitsByPathConduitAPIMethod.php',
|
'DiffusionGetRecentCommitsByPathConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionGetRecentCommitsByPathConduitAPIMethod.php',
|
||||||
|
@ -1189,6 +1190,7 @@ phutil_register_library_map(array(
|
||||||
'HarbormasterLintPropertyView' => 'applications/harbormaster/view/HarbormasterLintPropertyView.php',
|
'HarbormasterLintPropertyView' => 'applications/harbormaster/view/HarbormasterLintPropertyView.php',
|
||||||
'HarbormasterManagementArchiveLogsWorkflow' => 'applications/harbormaster/management/HarbormasterManagementArchiveLogsWorkflow.php',
|
'HarbormasterManagementArchiveLogsWorkflow' => 'applications/harbormaster/management/HarbormasterManagementArchiveLogsWorkflow.php',
|
||||||
'HarbormasterManagementBuildWorkflow' => 'applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php',
|
'HarbormasterManagementBuildWorkflow' => 'applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php',
|
||||||
|
'HarbormasterManagementRestartWorkflow' => 'applications/harbormaster/management/HarbormasterManagementRestartWorkflow.php',
|
||||||
'HarbormasterManagementUpdateWorkflow' => 'applications/harbormaster/management/HarbormasterManagementUpdateWorkflow.php',
|
'HarbormasterManagementUpdateWorkflow' => 'applications/harbormaster/management/HarbormasterManagementUpdateWorkflow.php',
|
||||||
'HarbormasterManagementWorkflow' => 'applications/harbormaster/management/HarbormasterManagementWorkflow.php',
|
'HarbormasterManagementWorkflow' => 'applications/harbormaster/management/HarbormasterManagementWorkflow.php',
|
||||||
'HarbormasterMessageType' => 'applications/harbormaster/engine/HarbormasterMessageType.php',
|
'HarbormasterMessageType' => 'applications/harbormaster/engine/HarbormasterMessageType.php',
|
||||||
|
@ -1731,6 +1733,7 @@ phutil_register_library_map(array(
|
||||||
'PasteEditConduitAPIMethod' => 'applications/paste/conduit/PasteEditConduitAPIMethod.php',
|
'PasteEditConduitAPIMethod' => 'applications/paste/conduit/PasteEditConduitAPIMethod.php',
|
||||||
'PasteEmbedView' => 'applications/paste/view/PasteEmbedView.php',
|
'PasteEmbedView' => 'applications/paste/view/PasteEmbedView.php',
|
||||||
'PasteInfoConduitAPIMethod' => 'applications/paste/conduit/PasteInfoConduitAPIMethod.php',
|
'PasteInfoConduitAPIMethod' => 'applications/paste/conduit/PasteInfoConduitAPIMethod.php',
|
||||||
|
'PasteLanguageSelectDatasource' => 'applications/paste/typeahead/PasteLanguageSelectDatasource.php',
|
||||||
'PasteMailReceiver' => 'applications/paste/mail/PasteMailReceiver.php',
|
'PasteMailReceiver' => 'applications/paste/mail/PasteMailReceiver.php',
|
||||||
'PasteQueryConduitAPIMethod' => 'applications/paste/conduit/PasteQueryConduitAPIMethod.php',
|
'PasteQueryConduitAPIMethod' => 'applications/paste/conduit/PasteQueryConduitAPIMethod.php',
|
||||||
'PasteReplyHandler' => 'applications/paste/mail/PasteReplyHandler.php',
|
'PasteReplyHandler' => 'applications/paste/mail/PasteReplyHandler.php',
|
||||||
|
@ -2148,6 +2151,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorConfigCollectorsModule' => 'applications/config/module/PhabricatorConfigCollectorsModule.php',
|
'PhabricatorConfigCollectorsModule' => 'applications/config/module/PhabricatorConfigCollectorsModule.php',
|
||||||
'PhabricatorConfigColumnSchema' => 'applications/config/schema/PhabricatorConfigColumnSchema.php',
|
'PhabricatorConfigColumnSchema' => 'applications/config/schema/PhabricatorConfigColumnSchema.php',
|
||||||
'PhabricatorConfigConfigPHIDType' => 'applications/config/phid/PhabricatorConfigConfigPHIDType.php',
|
'PhabricatorConfigConfigPHIDType' => 'applications/config/phid/PhabricatorConfigConfigPHIDType.php',
|
||||||
|
'PhabricatorConfigConstants' => 'applications/config/constants/PhabricatorConfigConstants.php',
|
||||||
'PhabricatorConfigController' => 'applications/config/controller/PhabricatorConfigController.php',
|
'PhabricatorConfigController' => 'applications/config/controller/PhabricatorConfigController.php',
|
||||||
'PhabricatorConfigCoreSchemaSpec' => 'applications/config/schema/PhabricatorConfigCoreSchemaSpec.php',
|
'PhabricatorConfigCoreSchemaSpec' => 'applications/config/schema/PhabricatorConfigCoreSchemaSpec.php',
|
||||||
'PhabricatorConfigDatabaseController' => 'applications/config/controller/PhabricatorConfigDatabaseController.php',
|
'PhabricatorConfigDatabaseController' => 'applications/config/controller/PhabricatorConfigDatabaseController.php',
|
||||||
|
@ -2164,11 +2168,13 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorConfigEntryDAO' => 'applications/config/storage/PhabricatorConfigEntryDAO.php',
|
'PhabricatorConfigEntryDAO' => 'applications/config/storage/PhabricatorConfigEntryDAO.php',
|
||||||
'PhabricatorConfigEntryQuery' => 'applications/config/query/PhabricatorConfigEntryQuery.php',
|
'PhabricatorConfigEntryQuery' => 'applications/config/query/PhabricatorConfigEntryQuery.php',
|
||||||
'PhabricatorConfigFileSource' => 'infrastructure/env/PhabricatorConfigFileSource.php',
|
'PhabricatorConfigFileSource' => 'infrastructure/env/PhabricatorConfigFileSource.php',
|
||||||
|
'PhabricatorConfigGroupConstants' => 'applications/config/constants/PhabricatorConfigGroupConstants.php',
|
||||||
'PhabricatorConfigGroupController' => 'applications/config/controller/PhabricatorConfigGroupController.php',
|
'PhabricatorConfigGroupController' => 'applications/config/controller/PhabricatorConfigGroupController.php',
|
||||||
'PhabricatorConfigHTTPParameterTypesModule' => 'applications/config/module/PhabricatorConfigHTTPParameterTypesModule.php',
|
'PhabricatorConfigHTTPParameterTypesModule' => 'applications/config/module/PhabricatorConfigHTTPParameterTypesModule.php',
|
||||||
'PhabricatorConfigHistoryController' => 'applications/config/controller/PhabricatorConfigHistoryController.php',
|
'PhabricatorConfigHistoryController' => 'applications/config/controller/PhabricatorConfigHistoryController.php',
|
||||||
'PhabricatorConfigIgnoreController' => 'applications/config/controller/PhabricatorConfigIgnoreController.php',
|
'PhabricatorConfigIgnoreController' => 'applications/config/controller/PhabricatorConfigIgnoreController.php',
|
||||||
'PhabricatorConfigIssueListController' => 'applications/config/controller/PhabricatorConfigIssueListController.php',
|
'PhabricatorConfigIssueListController' => 'applications/config/controller/PhabricatorConfigIssueListController.php',
|
||||||
|
'PhabricatorConfigIssuePanelController' => 'applications/config/controller/PhabricatorConfigIssuePanelController.php',
|
||||||
'PhabricatorConfigIssueViewController' => 'applications/config/controller/PhabricatorConfigIssueViewController.php',
|
'PhabricatorConfigIssueViewController' => 'applications/config/controller/PhabricatorConfigIssueViewController.php',
|
||||||
'PhabricatorConfigJSON' => 'applications/config/json/PhabricatorConfigJSON.php',
|
'PhabricatorConfigJSON' => 'applications/config/json/PhabricatorConfigJSON.php',
|
||||||
'PhabricatorConfigJSONOptionType' => 'applications/config/custom/PhabricatorConfigJSONOptionType.php',
|
'PhabricatorConfigJSONOptionType' => 'applications/config/custom/PhabricatorConfigJSONOptionType.php',
|
||||||
|
@ -2186,6 +2192,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorConfigOption' => 'applications/config/option/PhabricatorConfigOption.php',
|
'PhabricatorConfigOption' => 'applications/config/option/PhabricatorConfigOption.php',
|
||||||
'PhabricatorConfigOptionType' => 'applications/config/custom/PhabricatorConfigOptionType.php',
|
'PhabricatorConfigOptionType' => 'applications/config/custom/PhabricatorConfigOptionType.php',
|
||||||
'PhabricatorConfigPHIDModule' => 'applications/config/module/PhabricatorConfigPHIDModule.php',
|
'PhabricatorConfigPHIDModule' => 'applications/config/module/PhabricatorConfigPHIDModule.php',
|
||||||
|
'PhabricatorConfigPageView' => 'applications/config/view/PhabricatorConfigPageView.php',
|
||||||
'PhabricatorConfigProxySource' => 'infrastructure/env/PhabricatorConfigProxySource.php',
|
'PhabricatorConfigProxySource' => 'infrastructure/env/PhabricatorConfigProxySource.php',
|
||||||
'PhabricatorConfigPurgeCacheController' => 'applications/config/controller/PhabricatorConfigPurgeCacheController.php',
|
'PhabricatorConfigPurgeCacheController' => 'applications/config/controller/PhabricatorConfigPurgeCacheController.php',
|
||||||
'PhabricatorConfigRequestExceptionHandlerModule' => 'applications/config/module/PhabricatorConfigRequestExceptionHandlerModule.php',
|
'PhabricatorConfigRequestExceptionHandlerModule' => 'applications/config/module/PhabricatorConfigRequestExceptionHandlerModule.php',
|
||||||
|
@ -2633,11 +2640,13 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorGoogleAuthProvider' => 'applications/auth/provider/PhabricatorGoogleAuthProvider.php',
|
'PhabricatorGoogleAuthProvider' => 'applications/auth/provider/PhabricatorGoogleAuthProvider.php',
|
||||||
'PhabricatorGuideApplication' => 'applications/guides/application/PhabricatorGuideApplication.php',
|
'PhabricatorGuideApplication' => 'applications/guides/application/PhabricatorGuideApplication.php',
|
||||||
'PhabricatorGuideController' => 'applications/guides/controller/PhabricatorGuideController.php',
|
'PhabricatorGuideController' => 'applications/guides/controller/PhabricatorGuideController.php',
|
||||||
'PhabricatorGuideInstallController' => 'applications/guides/controller/PhabricatorGuideInstallController.php',
|
'PhabricatorGuideInstallModule' => 'applications/guides/module/PhabricatorGuideInstallModule.php',
|
||||||
'PhabricatorGuideItemView' => 'applications/guides/view/PhabricatorGuideItemView.php',
|
'PhabricatorGuideItemView' => 'applications/guides/view/PhabricatorGuideItemView.php',
|
||||||
'PhabricatorGuideListView' => 'applications/guides/view/PhabricatorGuideListView.php',
|
'PhabricatorGuideListView' => 'applications/guides/view/PhabricatorGuideListView.php',
|
||||||
'PhabricatorGuideQuickStartController' => 'applications/guides/controller/PhabricatorGuideQuickStartController.php',
|
'PhabricatorGuideModule' => 'applications/guides/module/PhabricatorGuideModule.php',
|
||||||
'PhabricatorGuideWelcomeController' => 'applications/guides/controller/PhabricatorGuideWelcomeController.php',
|
'PhabricatorGuideModuleController' => 'applications/guides/controller/PhabricatorGuideModuleController.php',
|
||||||
|
'PhabricatorGuideQuickStartModule' => 'applications/guides/module/PhabricatorGuideQuickStartModule.php',
|
||||||
|
'PhabricatorGuideWelcomeModule' => 'applications/guides/module/PhabricatorGuideWelcomeModule.php',
|
||||||
'PhabricatorHTTPParameterTypeTableView' => 'applications/config/view/PhabricatorHTTPParameterTypeTableView.php',
|
'PhabricatorHTTPParameterTypeTableView' => 'applications/config/view/PhabricatorHTTPParameterTypeTableView.php',
|
||||||
'PhabricatorHandleList' => 'applications/phid/handle/pool/PhabricatorHandleList.php',
|
'PhabricatorHandleList' => 'applications/phid/handle/pool/PhabricatorHandleList.php',
|
||||||
'PhabricatorHandleObjectSelectorDataView' => 'applications/phid/handle/view/PhabricatorHandleObjectSelectorDataView.php',
|
'PhabricatorHandleObjectSelectorDataView' => 'applications/phid/handle/view/PhabricatorHandleObjectSelectorDataView.php',
|
||||||
|
@ -2647,7 +2656,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorHandleRemarkupRule' => 'applications/phid/remarkup/PhabricatorHandleRemarkupRule.php',
|
'PhabricatorHandleRemarkupRule' => 'applications/phid/remarkup/PhabricatorHandleRemarkupRule.php',
|
||||||
'PhabricatorHandlesEditField' => 'applications/transactions/editfield/PhabricatorHandlesEditField.php',
|
'PhabricatorHandlesEditField' => 'applications/transactions/editfield/PhabricatorHandlesEditField.php',
|
||||||
'PhabricatorHarbormasterApplication' => 'applications/harbormaster/application/PhabricatorHarbormasterApplication.php',
|
'PhabricatorHarbormasterApplication' => 'applications/harbormaster/application/PhabricatorHarbormasterApplication.php',
|
||||||
'PhabricatorHarbormasterConfigOptions' => 'applications/harbormaster/config/PhabricatorHarbormasterConfigOptions.php',
|
|
||||||
'PhabricatorHash' => 'infrastructure/util/PhabricatorHash.php',
|
'PhabricatorHash' => 'infrastructure/util/PhabricatorHash.php',
|
||||||
'PhabricatorHashTestCase' => 'infrastructure/util/__tests__/PhabricatorHashTestCase.php',
|
'PhabricatorHashTestCase' => 'infrastructure/util/__tests__/PhabricatorHashTestCase.php',
|
||||||
'PhabricatorHelpApplication' => 'applications/help/application/PhabricatorHelpApplication.php',
|
'PhabricatorHelpApplication' => 'applications/help/application/PhabricatorHelpApplication.php',
|
||||||
|
@ -3156,7 +3164,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorPhortuneManagementWorkflow' => 'applications/phortune/management/PhabricatorPhortuneManagementWorkflow.php',
|
'PhabricatorPhortuneManagementWorkflow' => 'applications/phortune/management/PhabricatorPhortuneManagementWorkflow.php',
|
||||||
'PhabricatorPhragmentApplication' => 'applications/phragment/application/PhabricatorPhragmentApplication.php',
|
'PhabricatorPhragmentApplication' => 'applications/phragment/application/PhabricatorPhragmentApplication.php',
|
||||||
'PhabricatorPhrequentApplication' => 'applications/phrequent/application/PhabricatorPhrequentApplication.php',
|
'PhabricatorPhrequentApplication' => 'applications/phrequent/application/PhabricatorPhrequentApplication.php',
|
||||||
'PhabricatorPhrequentConfigOptions' => 'applications/phrequent/config/PhabricatorPhrequentConfigOptions.php',
|
|
||||||
'PhabricatorPhrictionApplication' => 'applications/phriction/application/PhabricatorPhrictionApplication.php',
|
'PhabricatorPhrictionApplication' => 'applications/phriction/application/PhabricatorPhrictionApplication.php',
|
||||||
'PhabricatorPhrictionConfigOptions' => 'applications/phriction/config/PhabricatorPhrictionConfigOptions.php',
|
'PhabricatorPhrictionConfigOptions' => 'applications/phriction/config/PhabricatorPhrictionConfigOptions.php',
|
||||||
'PhabricatorPhurlApplication' => 'applications/phurl/application/PhabricatorPhurlApplication.php',
|
'PhabricatorPhurlApplication' => 'applications/phurl/application/PhabricatorPhurlApplication.php',
|
||||||
|
@ -5149,8 +5156,9 @@ phutil_register_library_map(array(
|
||||||
'DiffusionExternalController' => 'DiffusionController',
|
'DiffusionExternalController' => 'DiffusionController',
|
||||||
'DiffusionExternalSymbolQuery' => 'Phobject',
|
'DiffusionExternalSymbolQuery' => 'Phobject',
|
||||||
'DiffusionExternalSymbolsSource' => 'Phobject',
|
'DiffusionExternalSymbolsSource' => 'Phobject',
|
||||||
'DiffusionFileContentQuery' => 'DiffusionQuery',
|
'DiffusionFileContentQuery' => 'DiffusionFileFutureQuery',
|
||||||
'DiffusionFileContentQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
'DiffusionFileContentQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
||||||
|
'DiffusionFileFutureQuery' => 'DiffusionQuery',
|
||||||
'DiffusionFindSymbolsConduitAPIMethod' => 'DiffusionConduitAPIMethod',
|
'DiffusionFindSymbolsConduitAPIMethod' => 'DiffusionConduitAPIMethod',
|
||||||
'DiffusionGetLintMessagesConduitAPIMethod' => 'DiffusionConduitAPIMethod',
|
'DiffusionGetLintMessagesConduitAPIMethod' => 'DiffusionConduitAPIMethod',
|
||||||
'DiffusionGetRecentCommitsByPathConduitAPIMethod' => 'DiffusionConduitAPIMethod',
|
'DiffusionGetRecentCommitsByPathConduitAPIMethod' => 'DiffusionConduitAPIMethod',
|
||||||
|
@ -5258,7 +5266,7 @@ phutil_register_library_map(array(
|
||||||
'DiffusionQueryCommitsConduitAPIMethod' => 'DiffusionConduitAPIMethod',
|
'DiffusionQueryCommitsConduitAPIMethod' => 'DiffusionConduitAPIMethod',
|
||||||
'DiffusionQueryConduitAPIMethod' => 'DiffusionConduitAPIMethod',
|
'DiffusionQueryConduitAPIMethod' => 'DiffusionConduitAPIMethod',
|
||||||
'DiffusionQueryPathsConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
'DiffusionQueryPathsConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
||||||
'DiffusionRawDiffQuery' => 'DiffusionQuery',
|
'DiffusionRawDiffQuery' => 'DiffusionFileFutureQuery',
|
||||||
'DiffusionRawDiffQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
'DiffusionRawDiffQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
||||||
'DiffusionReadmeView' => 'DiffusionView',
|
'DiffusionReadmeView' => 'DiffusionView',
|
||||||
'DiffusionRefDatasource' => 'PhabricatorTypeaheadDatasource',
|
'DiffusionRefDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||||
|
@ -5778,6 +5786,7 @@ phutil_register_library_map(array(
|
||||||
'HarbormasterLintPropertyView' => 'AphrontView',
|
'HarbormasterLintPropertyView' => 'AphrontView',
|
||||||
'HarbormasterManagementArchiveLogsWorkflow' => 'HarbormasterManagementWorkflow',
|
'HarbormasterManagementArchiveLogsWorkflow' => 'HarbormasterManagementWorkflow',
|
||||||
'HarbormasterManagementBuildWorkflow' => 'HarbormasterManagementWorkflow',
|
'HarbormasterManagementBuildWorkflow' => 'HarbormasterManagementWorkflow',
|
||||||
|
'HarbormasterManagementRestartWorkflow' => 'HarbormasterManagementWorkflow',
|
||||||
'HarbormasterManagementUpdateWorkflow' => 'HarbormasterManagementWorkflow',
|
'HarbormasterManagementUpdateWorkflow' => 'HarbormasterManagementWorkflow',
|
||||||
'HarbormasterManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
'HarbormasterManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
||||||
'HarbormasterMessageType' => 'Phobject',
|
'HarbormasterMessageType' => 'Phobject',
|
||||||
|
@ -6397,6 +6406,7 @@ phutil_register_library_map(array(
|
||||||
'PasteEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
'PasteEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
||||||
'PasteEmbedView' => 'AphrontView',
|
'PasteEmbedView' => 'AphrontView',
|
||||||
'PasteInfoConduitAPIMethod' => 'PasteConduitAPIMethod',
|
'PasteInfoConduitAPIMethod' => 'PasteConduitAPIMethod',
|
||||||
|
'PasteLanguageSelectDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||||
'PasteMailReceiver' => 'PhabricatorObjectMailReceiver',
|
'PasteMailReceiver' => 'PhabricatorObjectMailReceiver',
|
||||||
'PasteQueryConduitAPIMethod' => 'PasteConduitAPIMethod',
|
'PasteQueryConduitAPIMethod' => 'PasteConduitAPIMethod',
|
||||||
'PasteReplyHandler' => 'PhabricatorApplicationTransactionReplyHandler',
|
'PasteReplyHandler' => 'PhabricatorApplicationTransactionReplyHandler',
|
||||||
|
@ -6888,6 +6898,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorConfigCollectorsModule' => 'PhabricatorConfigModule',
|
'PhabricatorConfigCollectorsModule' => 'PhabricatorConfigModule',
|
||||||
'PhabricatorConfigColumnSchema' => 'PhabricatorConfigStorageSchema',
|
'PhabricatorConfigColumnSchema' => 'PhabricatorConfigStorageSchema',
|
||||||
'PhabricatorConfigConfigPHIDType' => 'PhabricatorPHIDType',
|
'PhabricatorConfigConfigPHIDType' => 'PhabricatorPHIDType',
|
||||||
|
'PhabricatorConfigConstants' => 'Phobject',
|
||||||
'PhabricatorConfigController' => 'PhabricatorController',
|
'PhabricatorConfigController' => 'PhabricatorController',
|
||||||
'PhabricatorConfigCoreSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
'PhabricatorConfigCoreSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorConfigDatabaseController' => 'PhabricatorConfigController',
|
'PhabricatorConfigDatabaseController' => 'PhabricatorConfigController',
|
||||||
|
@ -6908,11 +6919,13 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorConfigEntryDAO' => 'PhabricatorLiskDAO',
|
'PhabricatorConfigEntryDAO' => 'PhabricatorLiskDAO',
|
||||||
'PhabricatorConfigEntryQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhabricatorConfigEntryQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
'PhabricatorConfigFileSource' => 'PhabricatorConfigProxySource',
|
'PhabricatorConfigFileSource' => 'PhabricatorConfigProxySource',
|
||||||
|
'PhabricatorConfigGroupConstants' => 'PhabricatorConfigConstants',
|
||||||
'PhabricatorConfigGroupController' => 'PhabricatorConfigController',
|
'PhabricatorConfigGroupController' => 'PhabricatorConfigController',
|
||||||
'PhabricatorConfigHTTPParameterTypesModule' => 'PhabricatorConfigModule',
|
'PhabricatorConfigHTTPParameterTypesModule' => 'PhabricatorConfigModule',
|
||||||
'PhabricatorConfigHistoryController' => 'PhabricatorConfigController',
|
'PhabricatorConfigHistoryController' => 'PhabricatorConfigController',
|
||||||
'PhabricatorConfigIgnoreController' => 'PhabricatorConfigController',
|
'PhabricatorConfigIgnoreController' => 'PhabricatorConfigController',
|
||||||
'PhabricatorConfigIssueListController' => 'PhabricatorConfigController',
|
'PhabricatorConfigIssueListController' => 'PhabricatorConfigController',
|
||||||
|
'PhabricatorConfigIssuePanelController' => 'PhabricatorConfigController',
|
||||||
'PhabricatorConfigIssueViewController' => 'PhabricatorConfigController',
|
'PhabricatorConfigIssueViewController' => 'PhabricatorConfigController',
|
||||||
'PhabricatorConfigJSON' => 'Phobject',
|
'PhabricatorConfigJSON' => 'Phobject',
|
||||||
'PhabricatorConfigJSONOptionType' => 'PhabricatorConfigOptionType',
|
'PhabricatorConfigJSONOptionType' => 'PhabricatorConfigOptionType',
|
||||||
|
@ -6933,6 +6946,7 @@ phutil_register_library_map(array(
|
||||||
),
|
),
|
||||||
'PhabricatorConfigOptionType' => 'Phobject',
|
'PhabricatorConfigOptionType' => 'Phobject',
|
||||||
'PhabricatorConfigPHIDModule' => 'PhabricatorConfigModule',
|
'PhabricatorConfigPHIDModule' => 'PhabricatorConfigModule',
|
||||||
|
'PhabricatorConfigPageView' => 'AphrontTagView',
|
||||||
'PhabricatorConfigProxySource' => 'PhabricatorConfigSource',
|
'PhabricatorConfigProxySource' => 'PhabricatorConfigSource',
|
||||||
'PhabricatorConfigPurgeCacheController' => 'PhabricatorConfigController',
|
'PhabricatorConfigPurgeCacheController' => 'PhabricatorConfigController',
|
||||||
'PhabricatorConfigRequestExceptionHandlerModule' => 'PhabricatorConfigModule',
|
'PhabricatorConfigRequestExceptionHandlerModule' => 'PhabricatorConfigModule',
|
||||||
|
@ -7444,11 +7458,13 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorGoogleAuthProvider' => 'PhabricatorOAuth2AuthProvider',
|
'PhabricatorGoogleAuthProvider' => 'PhabricatorOAuth2AuthProvider',
|
||||||
'PhabricatorGuideApplication' => 'PhabricatorApplication',
|
'PhabricatorGuideApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorGuideController' => 'PhabricatorController',
|
'PhabricatorGuideController' => 'PhabricatorController',
|
||||||
'PhabricatorGuideInstallController' => 'PhabricatorGuideController',
|
'PhabricatorGuideInstallModule' => 'PhabricatorGuideModule',
|
||||||
'PhabricatorGuideItemView' => 'Phobject',
|
'PhabricatorGuideItemView' => 'Phobject',
|
||||||
'PhabricatorGuideListView' => 'AphrontView',
|
'PhabricatorGuideListView' => 'AphrontView',
|
||||||
'PhabricatorGuideQuickStartController' => 'PhabricatorGuideController',
|
'PhabricatorGuideModule' => 'Phobject',
|
||||||
'PhabricatorGuideWelcomeController' => 'PhabricatorGuideController',
|
'PhabricatorGuideModuleController' => 'PhabricatorGuideController',
|
||||||
|
'PhabricatorGuideQuickStartModule' => 'PhabricatorGuideModule',
|
||||||
|
'PhabricatorGuideWelcomeModule' => 'PhabricatorGuideModule',
|
||||||
'PhabricatorHTTPParameterTypeTableView' => 'AphrontView',
|
'PhabricatorHTTPParameterTypeTableView' => 'AphrontView',
|
||||||
'PhabricatorHandleList' => array(
|
'PhabricatorHandleList' => array(
|
||||||
'Phobject',
|
'Phobject',
|
||||||
|
@ -7463,7 +7479,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorHandleRemarkupRule' => 'PhutilRemarkupRule',
|
'PhabricatorHandleRemarkupRule' => 'PhutilRemarkupRule',
|
||||||
'PhabricatorHandlesEditField' => 'PhabricatorPHIDListEditField',
|
'PhabricatorHandlesEditField' => 'PhabricatorPHIDListEditField',
|
||||||
'PhabricatorHarbormasterApplication' => 'PhabricatorApplication',
|
'PhabricatorHarbormasterApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorHarbormasterConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
|
||||||
'PhabricatorHash' => 'Phobject',
|
'PhabricatorHash' => 'Phobject',
|
||||||
'PhabricatorHashTestCase' => 'PhabricatorTestCase',
|
'PhabricatorHashTestCase' => 'PhabricatorTestCase',
|
||||||
'PhabricatorHelpApplication' => 'PhabricatorApplication',
|
'PhabricatorHelpApplication' => 'PhabricatorApplication',
|
||||||
|
@ -8046,7 +8061,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorPhortuneManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
'PhabricatorPhortuneManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
||||||
'PhabricatorPhragmentApplication' => 'PhabricatorApplication',
|
'PhabricatorPhragmentApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorPhrequentApplication' => 'PhabricatorApplication',
|
'PhabricatorPhrequentApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorPhrequentConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
|
||||||
'PhabricatorPhrictionApplication' => 'PhabricatorApplication',
|
'PhabricatorPhrictionApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorPhrictionConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
'PhabricatorPhrictionConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||||
'PhabricatorPhurlApplication' => 'PhabricatorApplication',
|
'PhabricatorPhurlApplication' => 'PhabricatorApplication',
|
||||||
|
@ -9211,6 +9225,7 @@ phutil_register_library_map(array(
|
||||||
'PhortunePaymentProviderConfig' => array(
|
'PhortunePaymentProviderConfig' => array(
|
||||||
'PhortuneDAO',
|
'PhortuneDAO',
|
||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
|
'PhabricatorApplicationTransactionInterface',
|
||||||
),
|
),
|
||||||
'PhortunePaymentProviderConfigEditor' => 'PhabricatorApplicationTransactionEditor',
|
'PhortunePaymentProviderConfigEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
'PhortunePaymentProviderConfigQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhortunePaymentProviderConfigQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
|
|
|
@ -25,7 +25,7 @@ final class PhabricatorAuthSessionEngineExtensionModule
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setNoDataString(
|
->setNoDataString(
|
||||||
pht('There are no registered session engine extensions.'))
|
pht('There are no registered session engine extensions.'))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
|
@ -41,10 +41,6 @@ final class PhabricatorAuthSessionEngineExtensionModule
|
||||||
'wide pri',
|
'wide pri',
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('SessionEngine Extensions'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ final class PhabricatorAuthTemporaryTokenTypeModule
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getModuleName() {
|
public function getModuleName() {
|
||||||
return pht('Temporary Tokens');
|
return pht('Temporary Token Types');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderModuleStatus(AphrontRequest $request) {
|
public function renderModuleStatus(AphrontRequest $request) {
|
||||||
|
@ -25,7 +25,7 @@ final class PhabricatorAuthTemporaryTokenTypeModule
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Class'),
|
pht('Class'),
|
||||||
|
@ -39,10 +39,6 @@ final class PhabricatorAuthTemporaryTokenTypeModule
|
||||||
'wide pri',
|
'wide pri',
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('Temporary Token Types'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,10 +151,6 @@ abstract class PhabricatorApplication
|
||||||
return $this->getBaseURI().ltrim($path, '/');
|
return $this->getBaseURI().ltrim($path, '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getIconURI() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getIcon() {
|
public function getIcon() {
|
||||||
return 'fa-puzzle-piece';
|
return 'fa-puzzle-piece';
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ final class PhabricatorCalendarEventAllDayTransaction
|
||||||
$this->renderAuthor());
|
$this->renderAuthor());
|
||||||
} else {
|
} else {
|
||||||
return pht(
|
return pht(
|
||||||
'%s conveted this from an all day event.',
|
'%s converted this from an all day event.',
|
||||||
$this->renderAuthor());
|
$this->renderAuthor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,4 +39,15 @@ final class PhabricatorCalendarEventDescriptionTransaction
|
||||||
->setNewText($this->getNewValue());
|
->setNewText($this->getNewValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function newRemarkupChanges() {
|
||||||
|
$changes = array();
|
||||||
|
|
||||||
|
$changes[] = $this->newRemarkupChange()
|
||||||
|
->setOldValue($this->getOldValue())
|
||||||
|
->setNewValue($this->getNewValue());
|
||||||
|
|
||||||
|
return $changes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@ final class PhabricatorConfigApplication extends PhabricatorApplication {
|
||||||
=> 'PhabricatorConfigIgnoreController',
|
=> 'PhabricatorConfigIgnoreController',
|
||||||
'issue/' => array(
|
'issue/' => array(
|
||||||
'' => 'PhabricatorConfigIssueListController',
|
'' => 'PhabricatorConfigIssueListController',
|
||||||
|
'panel/' => 'PhabricatorConfigIssuePanelController',
|
||||||
'(?P<key>[^/]+)/' => 'PhabricatorConfigIssueViewController',
|
'(?P<key>[^/]+)/' => 'PhabricatorConfigIssueViewController',
|
||||||
),
|
),
|
||||||
'cache/' => array(
|
'cache/' => array(
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
final class PhabricatorCacheSetupCheck extends PhabricatorSetupCheck {
|
final class PhabricatorCacheSetupCheck extends PhabricatorSetupCheck {
|
||||||
|
|
||||||
public function getDefaultGroup() {
|
public function getDefaultGroup() {
|
||||||
return self::GROUP_OTHER;
|
return self::GROUP_PHP;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function executeChecks() {
|
protected function executeChecks() {
|
||||||
|
|
|
@ -34,11 +34,9 @@ final class PhabricatorMySQLSetupCheck extends PhabricatorSetupCheck {
|
||||||
if ($max_allowed_packet < $recommended_minimum) {
|
if ($max_allowed_packet < $recommended_minimum) {
|
||||||
$message = pht(
|
$message = pht(
|
||||||
"MySQL is configured with a small '%s' (%d), ".
|
"MySQL is configured with a small '%s' (%d), ".
|
||||||
"which may cause some large writes to fail. Strongly consider raising ".
|
"which may cause some large writes to fail.",
|
||||||
"this to at least %d in your MySQL configuration.",
|
|
||||||
'max_allowed_packet',
|
'max_allowed_packet',
|
||||||
$max_allowed_packet,
|
$max_allowed_packet);
|
||||||
$recommended_minimum);
|
|
||||||
|
|
||||||
$this->newIssue('mysql.max_allowed_packet')
|
$this->newIssue('mysql.max_allowed_packet')
|
||||||
->setName(pht('Small MySQL "%s"', 'max_allowed_packet'))
|
->setName(pht('Small MySQL "%s"', 'max_allowed_packet'))
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
abstract class PhabricatorConfigConstants extends Phobject {}
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
abstract class PhabricatorConfigGroupConstants
|
||||||
|
extends PhabricatorConfigConstants {
|
||||||
|
|
||||||
|
const GROUP_CORE = 'core';
|
||||||
|
const GROUP_APPLICATION = 'apps';
|
||||||
|
const GROUP_DEVELOPER = 'developer';
|
||||||
|
|
||||||
|
public static function getGroupName($group) {
|
||||||
|
$map = array(
|
||||||
|
self::GROUP_CORE => pht('Core Settings'),
|
||||||
|
self::GROUP_APPLICATION => pht('Application Settings'),
|
||||||
|
self::GROUP_DEVELOPER => pht('Developer Settings'),
|
||||||
|
);
|
||||||
|
return idx($map, $group, pht('Unknown'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getGroupShortName($group) {
|
||||||
|
$map = array(
|
||||||
|
self::GROUP_CORE => pht('Core'),
|
||||||
|
self::GROUP_APPLICATION => pht('Application'),
|
||||||
|
self::GROUP_DEVELOPER => pht('Developer'),
|
||||||
|
);
|
||||||
|
return idx($map, $group, pht('Unknown'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getGroupURI($group) {
|
||||||
|
$map = array(
|
||||||
|
self::GROUP_CORE => '/',
|
||||||
|
self::GROUP_APPLICATION => pht('application/'),
|
||||||
|
self::GROUP_DEVELOPER => pht('developer/'),
|
||||||
|
);
|
||||||
|
return idx($map, $group, '#');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -52,27 +52,26 @@ final class PhabricatorConfigAllController
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs()
|
->buildApplicationCrumbs()
|
||||||
->addTextCrumb(pht('Configuration'), $this->getApplicationURI())
|
->addTextCrumb($title)
|
||||||
->addTextCrumb($title);
|
->setBorder(true);
|
||||||
|
|
||||||
$panel = id(new PHUIObjectBoxView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeaderText(pht('Current Settings'))
|
->setHeader($title)
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
->setProfileHeader(true);
|
||||||
->setTable($table);
|
|
||||||
|
|
||||||
$nav = $this->buildSideNavView();
|
$nav = $this->buildSideNavView();
|
||||||
$nav->selectFilter('all/');
|
$nav->selectFilter('all/');
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$content = id(new PhabricatorConfigPageView())
|
||||||
->setNavigation($nav)
|
->setHeader($header)
|
||||||
->setMainColumn(array(
|
->setContent($table);
|
||||||
$panel,
|
|
||||||
));
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,42 +12,45 @@ final class PhabricatorConfigApplicationController
|
||||||
$groups = PhabricatorApplicationConfigOptions::loadAll();
|
$groups = PhabricatorApplicationConfigOptions::loadAll();
|
||||||
$apps_list = $this->buildConfigOptionsList($groups, 'apps');
|
$apps_list = $this->buildConfigOptionsList($groups, 'apps');
|
||||||
|
|
||||||
$title = pht('Application Configuration');
|
$title = pht('Application Settings');
|
||||||
|
|
||||||
$apps = id(new PHUIObjectBoxView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeaderText($title)
|
->setHeader($title)
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
->setProfileHeader(true);
|
||||||
->setObjectList($apps_list);
|
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs()
|
->buildApplicationCrumbs()
|
||||||
->addTextCrumb(pht('Configuration'), $this->getApplicationURI())
|
->addTextCrumb(pht('Applications'))
|
||||||
->addTextCrumb(pht('Applications'));
|
->setBorder(true);
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$content = id(new PhabricatorConfigPageView())
|
||||||
->setNavigation($nav)
|
->setHeader($header)
|
||||||
->setMainColumn(array(
|
->setContent($apps_list);
|
||||||
$apps,
|
|
||||||
));
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildConfigOptionsList(array $groups, $type) {
|
private function buildConfigOptionsList(array $groups, $type) {
|
||||||
assert_instances_of($groups, 'PhabricatorApplicationConfigOptions');
|
assert_instances_of($groups, 'PhabricatorApplicationConfigOptions');
|
||||||
|
|
||||||
$list = new PHUIObjectItemListView();
|
$list = new PHUIObjectItemListView();
|
||||||
|
$list->setBig(true);
|
||||||
$groups = msort($groups, 'getName');
|
$groups = msort($groups, 'getName');
|
||||||
foreach ($groups as $group) {
|
foreach ($groups as $group) {
|
||||||
if ($group->getGroup() == $type) {
|
if ($group->getGroup() == $type) {
|
||||||
|
$icon = id(new PHUIIconView())
|
||||||
|
->setIcon($group->getIcon())
|
||||||
|
->setBackground('bg-violet');
|
||||||
$item = id(new PHUIObjectItemView())
|
$item = id(new PHUIObjectItemView())
|
||||||
->setHeader($group->getName())
|
->setHeader($group->getName())
|
||||||
->setHref('/config/group/'.$group->getKey().'/')
|
->setHref('/config/group/'.$group->getKey().'/')
|
||||||
->addAttribute($group->getDescription())
|
->addAttribute($group->getDescription())
|
||||||
->setImageIcon($group->getIcon());
|
->setImageIcon($icon);
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,24 +11,33 @@ final class PhabricatorConfigCacheController
|
||||||
|
|
||||||
$title = pht('Cache Status');
|
$title = pht('Cache Status');
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($title)
|
||||||
|
->setProfileHeader(true);
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs()
|
->buildApplicationCrumbs()
|
||||||
->addTextCrumb(pht('Cache Status'));
|
->addTextCrumb(pht('Cache Status'))
|
||||||
|
->setBorder(true);
|
||||||
|
|
||||||
$code_box = $this->renderCodeBox();
|
$code_box = $this->renderCodeBox();
|
||||||
$data_box = $this->renderDataBox();
|
$data_box = $this->renderDataBox();
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$page = array(
|
||||||
->setNavigation($nav)
|
|
||||||
->setMainColumn(array(
|
|
||||||
$code_box,
|
$code_box,
|
||||||
$data_box,
|
$data_box,
|
||||||
));
|
);
|
||||||
|
|
||||||
|
$content = id(new PhabricatorConfigPageView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setContent($page);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderCodeBox() {
|
private function renderCodeBox() {
|
||||||
|
|
|
@ -7,22 +7,36 @@ final class PhabricatorConfigClusterDatabasesController
|
||||||
$nav = $this->buildSideNavView();
|
$nav = $this->buildSideNavView();
|
||||||
$nav->selectFilter('cluster/databases/');
|
$nav->selectFilter('cluster/databases/');
|
||||||
|
|
||||||
$title = pht('Database Servers');
|
$title = pht('Cluster Database Status');
|
||||||
|
$doc_href = PhabricatorEnv::getDoclink('Cluster: Databases');
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($title)
|
||||||
|
->setProfileHeader(true)
|
||||||
|
->addActionLink(
|
||||||
|
id(new PHUIButtonView())
|
||||||
|
->setIcon('fa-book')
|
||||||
|
->setHref($doc_href)
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Documentation')));
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs($nav)
|
->buildApplicationCrumbs($nav)
|
||||||
->addTextCrumb(pht('Database Servers'));
|
->addTextCrumb($title)
|
||||||
|
->setBorder(true);
|
||||||
|
|
||||||
$database_status = $this->buildClusterDatabaseStatus();
|
$database_status = $this->buildClusterDatabaseStatus();
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$content = id(new PhabricatorConfigPageView())
|
||||||
->setNavigation($nav)
|
->setHeader($header)
|
||||||
->setMainColumn($database_status);
|
->setContent($database_status);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildClusterDatabaseStatus() {
|
private function buildClusterDatabaseStatus() {
|
||||||
|
@ -194,21 +208,7 @@ final class PhabricatorConfigClusterDatabasesController
|
||||||
'wide',
|
'wide',
|
||||||
));
|
));
|
||||||
|
|
||||||
$doc_href = PhabricatorEnv::getDoclink('Cluster: Databases');
|
return $table;
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
|
||||||
->setHeader(pht('Cluster Database Status'))
|
|
||||||
->addActionLink(
|
|
||||||
id(new PHUIButtonView())
|
|
||||||
->setIcon('fa-book')
|
|
||||||
->setHref($doc_href)
|
|
||||||
->setTag('a')
|
|
||||||
->setText(pht('Documentation')));
|
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeader($header)
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,21 +8,35 @@ final class PhabricatorConfigClusterNotificationsController
|
||||||
$nav->selectFilter('cluster/notifications/');
|
$nav->selectFilter('cluster/notifications/');
|
||||||
|
|
||||||
$title = pht('Cluster Notifications');
|
$title = pht('Cluster Notifications');
|
||||||
|
$doc_href = PhabricatorEnv::getDoclink('Cluster: Notifications');
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($title)
|
||||||
|
->setProfileHeader(true)
|
||||||
|
->addActionLink(
|
||||||
|
id(new PHUIButtonView())
|
||||||
|
->setIcon('fa-book')
|
||||||
|
->setHref($doc_href)
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Documentation')));
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs($nav)
|
->buildApplicationCrumbs($nav)
|
||||||
->addTextCrumb(pht('Cluster Notifications'));
|
->addTextCrumb($title)
|
||||||
|
->setBorder(true);
|
||||||
|
|
||||||
$notification_status = $this->buildClusterNotificationStatus();
|
$notification_status = $this->buildClusterNotificationStatus();
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$content = id(new PhabricatorConfigPageView())
|
||||||
->setNavigation($nav)
|
->setHeader($header)
|
||||||
->setMainColumn($notification_status);
|
->setContent($notification_status);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildClusterNotificationStatus() {
|
private function buildClusterNotificationStatus() {
|
||||||
|
@ -144,21 +158,7 @@ final class PhabricatorConfigClusterNotificationsController
|
||||||
'wide',
|
'wide',
|
||||||
));
|
));
|
||||||
|
|
||||||
$doc_href = PhabricatorEnv::getDoclink('Cluster: Notifications');
|
return $table;
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
|
||||||
->setHeader(pht('Cluster Notification Status'))
|
|
||||||
->addActionLink(
|
|
||||||
id(new PHUIButtonView())
|
|
||||||
->setIcon('fa-book')
|
|
||||||
->setHref($doc_href)
|
|
||||||
->setTag('a')
|
|
||||||
->setText(pht('Documentation')));
|
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeader($header)
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,22 +7,42 @@ final class PhabricatorConfigClusterRepositoriesController
|
||||||
$nav = $this->buildSideNavView();
|
$nav = $this->buildSideNavView();
|
||||||
$nav->selectFilter('cluster/repositories/');
|
$nav->selectFilter('cluster/repositories/');
|
||||||
|
|
||||||
$title = pht('Repository Servers');
|
$title = pht('Cluster Repository Status');
|
||||||
|
|
||||||
|
$doc_href = PhabricatorEnv::getDoclink('Cluster: Repositories');
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($title)
|
||||||
|
->setProfileHeader(true)
|
||||||
|
->addActionLink(
|
||||||
|
id(new PHUIButtonView())
|
||||||
|
->setIcon('fa-book')
|
||||||
|
->setHref($doc_href)
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Documentation')));
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs($nav)
|
->buildApplicationCrumbs($nav)
|
||||||
->addTextCrumb(pht('Repository Servers'));
|
->addTextCrumb(pht('Repository Servers'))
|
||||||
|
->setBorder(true);
|
||||||
|
|
||||||
$repository_status = $this->buildClusterRepositoryStatus();
|
$repository_status = $this->buildClusterRepositoryStatus();
|
||||||
|
$repository_errors = $this->buildClusterRepositoryErrors();
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$content = id(new PhabricatorConfigPageView())
|
||||||
->setNavigation($nav)
|
->setHeader($header)
|
||||||
->setMainColumn($repository_status);
|
->setContent(
|
||||||
|
array(
|
||||||
|
$repository_status,
|
||||||
|
$repository_errors,
|
||||||
|
));
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildClusterRepositoryStatus() {
|
private function buildClusterRepositoryStatus() {
|
||||||
|
@ -217,8 +237,7 @@ final class PhabricatorConfigClusterRepositoriesController
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return id(new AphrontTableView($rows))
|
||||||
$table = id(new AphrontTableView($rows))
|
|
||||||
->setNoDataString(
|
->setNoDataString(
|
||||||
pht('No repository cluster services are configured.'))
|
pht('No repository cluster services are configured.'))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
|
@ -239,22 +258,6 @@ final class PhabricatorConfigClusterRepositoriesController
|
||||||
null,
|
null,
|
||||||
'wide',
|
'wide',
|
||||||
));
|
));
|
||||||
|
|
||||||
$doc_href = PhabricatorEnv::getDoclink('Cluster: Repositories');
|
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
|
||||||
->setHeader(pht('Cluster Repository Status'))
|
|
||||||
->addActionLink(
|
|
||||||
id(new PHUIButtonView())
|
|
||||||
->setIcon('fa-book')
|
|
||||||
->setHref($doc_href)
|
|
||||||
->setTag('a')
|
|
||||||
->setText(pht('Documentation')));
|
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeader($header)
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDevices(
|
private function getDevices(
|
||||||
|
@ -340,4 +343,70 @@ final class PhabricatorConfigClusterRepositoriesController
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function buildClusterRepositoryErrors() {
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
|
||||||
|
$messages = id(new PhabricatorRepositoryStatusMessage())->loadAllWhere(
|
||||||
|
'statusCode IN (%Ls)',
|
||||||
|
array(
|
||||||
|
PhabricatorRepositoryStatusMessage::CODE_ERROR,
|
||||||
|
));
|
||||||
|
|
||||||
|
$repository_ids = mpull($messages, 'getRepositoryID');
|
||||||
|
if ($repository_ids) {
|
||||||
|
// NOTE: We're bypassing policies when loading repositories because we
|
||||||
|
// want to show errors exist even if the viewer can't see the repository.
|
||||||
|
// We use handles to describe the repository below, so the viewer won't
|
||||||
|
// actually be able to see any particulars if they can't see the
|
||||||
|
// repository.
|
||||||
|
$repositories = id(new PhabricatorRepositoryQuery())
|
||||||
|
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||||
|
->withIDs($repository_ids)
|
||||||
|
->execute();
|
||||||
|
$repositories = mpull($repositories, null, 'getID');
|
||||||
|
}
|
||||||
|
|
||||||
|
$rows = array();
|
||||||
|
foreach ($messages as $message) {
|
||||||
|
$repository = idx($repositories, $message->getRepositoryID());
|
||||||
|
if (!$repository) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$repository->isTracked()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$icon = id(new PHUIIconView())
|
||||||
|
->setIcon('fa-exclamation-triangle red');
|
||||||
|
|
||||||
|
$rows[] = array(
|
||||||
|
$icon,
|
||||||
|
$viewer->renderHandle($repository->getPHID()),
|
||||||
|
phutil_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => $repository->getPathURI('manage/status/'),
|
||||||
|
),
|
||||||
|
$message->getStatusTypeName()),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return id(new AphrontTableView($rows))
|
||||||
|
->setNoDataString(
|
||||||
|
pht('No active repositories have outstanding errors.'))
|
||||||
|
->setHeaders(
|
||||||
|
array(
|
||||||
|
null,
|
||||||
|
pht('Repository'),
|
||||||
|
pht('Error'),
|
||||||
|
))
|
||||||
|
->setColumnClasses(
|
||||||
|
array(
|
||||||
|
null,
|
||||||
|
'pri',
|
||||||
|
'wide',
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,18 +60,4 @@ abstract class PhabricatorConfigDatabaseController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function buildHeaderWithDocumentationLink($title) {
|
|
||||||
|
|
||||||
$doc_link = PhabricatorEnv::getDoclink('Managing Storage Adjustments');
|
|
||||||
|
|
||||||
return id(new PHUIHeaderView())
|
|
||||||
->setHeader($title)
|
|
||||||
->addActionLink(
|
|
||||||
id(new PHUIButtonView())
|
|
||||||
->setTag('a')
|
|
||||||
->setIcon('fa-book')
|
|
||||||
->setHref($doc_link)
|
|
||||||
->setText(pht('Learn More')));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ final class PhabricatorConfigDatabaseIssueController
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb(pht('Database Issues'));
|
$crumbs->addTextCrumb(pht('Database Issues'));
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
// Collect all open issues.
|
// Collect all open issues.
|
||||||
$issues = array();
|
$issues = array();
|
||||||
|
@ -111,6 +112,8 @@ final class PhabricatorConfigDatabaseIssueController
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
$table = id(new AphrontTableView($rows))
|
||||||
|
->setNoDataString(
|
||||||
|
pht('No databases have any issues.'))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
null,
|
null,
|
||||||
|
@ -146,25 +149,23 @@ final class PhabricatorConfigDatabaseIssueController
|
||||||
|
|
||||||
$title = pht('Database Issues');
|
$title = pht('Database Issues');
|
||||||
|
|
||||||
$table_box = id(new PHUIObjectBoxView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeader($this->buildHeaderWithDocumentationLink($title))
|
->setHeader($title)
|
||||||
->setFormErrors($errors)
|
->setProfileHeader(true);
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
|
|
||||||
$nav = $this->buildSideNavView();
|
$nav = $this->buildSideNavView();
|
||||||
$nav->selectFilter('dbissue/');
|
$nav->selectFilter('dbissue/');
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$content = id(new PhabricatorConfigPageView())
|
||||||
->setNavigation($nav)
|
->setHeader($header)
|
||||||
->setMainColumn(array(
|
->setContent($table);
|
||||||
$table_box,
|
|
||||||
));
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,12 @@ final class PhabricatorConfigDatabaseStatusController
|
||||||
$nav = $this->buildSideNavView();
|
$nav = $this->buildSideNavView();
|
||||||
$nav->selectFilter('database/');
|
$nav->selectFilter('database/');
|
||||||
|
|
||||||
|
if (!$title) {
|
||||||
|
$title = pht('Database Status');
|
||||||
|
}
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
$crumbs->setBorder(true);
|
||||||
if ($this->database) {
|
if ($this->database) {
|
||||||
$crumbs->addTextCrumb(
|
$crumbs->addTextCrumb(
|
||||||
pht('Database Status'),
|
pht('Database Status'),
|
||||||
|
@ -91,16 +96,28 @@ final class PhabricatorConfigDatabaseStatusController
|
||||||
$crumbs->addTextCrumb(pht('Database Status'));
|
$crumbs->addTextCrumb(pht('Database Status'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$doc_link = PhabricatorEnv::getDoclink('Managing Storage Adjustments');
|
||||||
->setNavigation($nav)
|
|
||||||
->setMainColumn(array(
|
$header = id(new PHUIHeaderView())
|
||||||
$body,
|
->setHeader($title)
|
||||||
));
|
->setProfileHeader(true)
|
||||||
|
->addActionLink(
|
||||||
|
id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setIcon('fa-book')
|
||||||
|
->setHref($doc_link)
|
||||||
|
->setText(pht('Learn More')));
|
||||||
|
|
||||||
|
$content = id(new PhabricatorConfigPageView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setContent($body);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -163,17 +180,7 @@ final class PhabricatorConfigDatabaseStatusController
|
||||||
),
|
),
|
||||||
$comp->getIssues());
|
$comp->getIssues());
|
||||||
|
|
||||||
$prop_box = id(new PHUIObjectBoxView())
|
return $this->buildResponse($title, array($properties, $table));
|
||||||
->setHeader($this->buildHeaderWithDocumentationLink($title))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->addPropertyList($properties);
|
|
||||||
|
|
||||||
$table_box = id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('Databases'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
|
|
||||||
return $this->buildResponse($title, array($prop_box, $table_box));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderDatabase(
|
private function renderDatabase(
|
||||||
|
@ -263,17 +270,7 @@ final class PhabricatorConfigDatabaseStatusController
|
||||||
),
|
),
|
||||||
$database->getIssues());
|
$database->getIssues());
|
||||||
|
|
||||||
$prop_box = id(new PHUIObjectBoxView())
|
return $this->buildResponse($title, array($properties, $table));
|
||||||
->setHeader($this->buildHeaderWithDocumentationLink($title))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->addPropertyList($properties);
|
|
||||||
|
|
||||||
$table_box = id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('Database Status'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
|
|
||||||
return $this->buildResponse($title, array($prop_box, $table_box));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderTable(
|
private function renderTable(
|
||||||
|
@ -478,22 +475,8 @@ final class PhabricatorConfigDatabaseStatusController
|
||||||
),
|
),
|
||||||
$table->getIssues());
|
$table->getIssues());
|
||||||
|
|
||||||
$prop_box = id(new PHUIObjectBoxView())
|
return $this->buildResponse(
|
||||||
->setHeader($this->buildHeaderWithDocumentationLink($title))
|
$title, array($properties, $table_view, $keys_view));
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->addPropertyList($properties);
|
|
||||||
|
|
||||||
$table_box = id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('Database'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table_view);
|
|
||||||
|
|
||||||
$key_box = id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('Keys'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($keys_view);
|
|
||||||
|
|
||||||
return $this->buildResponse($title, array($prop_box, $table_box, $key_box));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderColumn(
|
private function renderColumn(
|
||||||
|
@ -625,12 +608,7 @@ final class PhabricatorConfigDatabaseStatusController
|
||||||
),
|
),
|
||||||
$column->getIssues());
|
$column->getIssues());
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
return $this->buildResponse($title, $properties);
|
||||||
->setHeader($this->buildHeaderWithDocumentationLink($title))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->addPropertyList($properties);
|
|
||||||
|
|
||||||
return $this->buildResponse($title, $box);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderKey(
|
private function renderKey(
|
||||||
|
@ -719,12 +697,7 @@ final class PhabricatorConfigDatabaseStatusController
|
||||||
),
|
),
|
||||||
$key->getIssues());
|
$key->getIssues());
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
return $this->buildResponse($title, $properties);
|
||||||
->setHeader($this->buildHeaderWithDocumentationLink($title))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->addPropertyList($properties);
|
|
||||||
|
|
||||||
return $this->buildResponse($title, $box);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildProperties(array $properties, array $issues) {
|
private function buildProperties(array $properties, array $issues) {
|
||||||
|
@ -769,7 +742,7 @@ final class PhabricatorConfigDatabaseStatusController
|
||||||
}
|
}
|
||||||
$view->addProperty(pht('Schema Status'), $status_view);
|
$view->addProperty(pht('Schema Status'), $status_view);
|
||||||
|
|
||||||
return $view;
|
return phutil_tag_div('config-page-property', $view);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,31 +13,37 @@ final class PhabricatorConfigGroupController
|
||||||
return new Aphront404Response();
|
return new Aphront404Response();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$group_uri = PhabricatorConfigGroupConstants::getGroupURI(
|
||||||
|
$options->getGroup());
|
||||||
|
$group_name = PhabricatorConfigGroupConstants::getGroupShortName(
|
||||||
|
$options->getGroup());
|
||||||
|
|
||||||
|
$nav = $this->buildSideNavView();
|
||||||
|
$nav->selectFilter($group_uri);
|
||||||
|
|
||||||
$title = pht('%s Configuration', $options->getName());
|
$title = pht('%s Configuration', $options->getName());
|
||||||
$list = $this->buildOptionList($options->getOptions());
|
$list = $this->buildOptionList($options->getOptions());
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setObjectList($list);
|
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs()
|
->buildApplicationCrumbs()
|
||||||
->addTextCrumb(pht('Config'), $this->getApplicationURI())
|
->addTextCrumb($group_name, $this->getApplicationURI($group_uri))
|
||||||
->addTextCrumb($options->getName(), $this->getApplicationURI())
|
->addTextCrumb($options->getName())
|
||||||
->setBorder(true);
|
->setBorder(true);
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeader($title)
|
->setHeader($title)
|
||||||
->setHeaderIcon('fa-sliders');
|
->setProfileHeader(true);
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$content = id(new PhabricatorConfigPageView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setFooter($box);
|
->setContent($list);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildOptionList(array $options) {
|
private function buildOptionList(array $options) {
|
||||||
|
@ -62,6 +68,7 @@ final class PhabricatorConfigGroupController
|
||||||
$engine->process();
|
$engine->process();
|
||||||
|
|
||||||
$list = new PHUIObjectItemListView();
|
$list = new PHUIObjectItemListView();
|
||||||
|
$list->setBig(true);
|
||||||
foreach ($options as $option) {
|
foreach ($options as $option) {
|
||||||
$summary = $engine->getOutput($option, 'summary');
|
$summary = $engine->getOutput($option, 'summary');
|
||||||
|
|
||||||
|
@ -70,6 +77,24 @@ final class PhabricatorConfigGroupController
|
||||||
->setHref('/config/edit/'.$option->getKey().'/')
|
->setHref('/config/edit/'.$option->getKey().'/')
|
||||||
->addAttribute($summary);
|
->addAttribute($summary);
|
||||||
|
|
||||||
|
$label = pht('Current Value:');
|
||||||
|
$color = null;
|
||||||
|
$db_value = idx($db_values, $option->getKey());
|
||||||
|
if ($db_value && !$db_value->getIsDeleted()) {
|
||||||
|
$item->setEffect('visited');
|
||||||
|
$color = 'violet';
|
||||||
|
$label = pht('Customized Value:');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($option->getHidden()) {
|
||||||
|
$item->setStatusIcon('fa-eye-slash grey', pht('Hidden'));
|
||||||
|
$item->setDisabled(true);
|
||||||
|
} else if ($option->getLocked()) {
|
||||||
|
$item->setStatusIcon('fa-lock '.$color, pht('Locked'));
|
||||||
|
} else {
|
||||||
|
$item->setStatusIcon('fa-pencil-square-o '.$color, pht('Editable'));
|
||||||
|
}
|
||||||
|
|
||||||
if (!$option->getHidden()) {
|
if (!$option->getHidden()) {
|
||||||
$current_value = PhabricatorEnv::getEnvConfig($option->getKey());
|
$current_value = PhabricatorEnv::getEnvConfig($option->getKey());
|
||||||
$current_value = PhabricatorConfigJSON::prettyPrintJSON(
|
$current_value = PhabricatorConfigJSON::prettyPrintJSON(
|
||||||
|
@ -80,24 +105,13 @@ final class PhabricatorConfigGroupController
|
||||||
'class' => 'config-options-current-value',
|
'class' => 'config-options-current-value',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
phutil_tag('span', array(), pht('Current Value:')),
|
phutil_tag('span', array(), $label),
|
||||||
' '.$current_value,
|
' '.$current_value,
|
||||||
));
|
));
|
||||||
|
|
||||||
$item->appendChild($current_value);
|
$item->appendChild($current_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db_value = idx($db_values, $option->getKey());
|
|
||||||
if ($db_value && !$db_value->getIsDeleted()) {
|
|
||||||
$item->addIcon('edit', pht('Customized'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($option->getHidden()) {
|
|
||||||
$item->addIcon('unpublish', pht('Hidden'));
|
|
||||||
} else if ($option->getLocked()) {
|
|
||||||
$item->addIcon('lock', pht('Locked'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,22 +31,26 @@ final class PhabricatorConfigHistoryController
|
||||||
$title = pht('Settings History');
|
$title = pht('Settings History');
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb('Configuration', $this->getApplicationURI());
|
$crumbs->addTextCrumb($title);
|
||||||
$crumbs->addTextCrumb($title, '/config/history/');
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$nav = $this->buildSideNavView();
|
$nav = $this->buildSideNavView();
|
||||||
$nav->selectFilter('history/');
|
$nav->selectFilter('history/');
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setNavigation($nav)
|
->setHeader($title)
|
||||||
->setMainColumn(array(
|
->setProfileHeader(true);
|
||||||
$timeline,
|
|
||||||
));
|
$content = id(new PhabricatorConfigPageView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setContent($timeline);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,45 +15,25 @@ final class PhabricatorConfigIssueListController
|
||||||
$update_database = true);
|
$update_database = true);
|
||||||
|
|
||||||
$important = $this->buildIssueList(
|
$important = $this->buildIssueList(
|
||||||
$issues, PhabricatorSetupCheck::GROUP_IMPORTANT);
|
$issues,
|
||||||
|
PhabricatorSetupCheck::GROUP_IMPORTANT,
|
||||||
|
'fa-warning');
|
||||||
$php = $this->buildIssueList(
|
$php = $this->buildIssueList(
|
||||||
$issues, PhabricatorSetupCheck::GROUP_PHP);
|
$issues,
|
||||||
|
PhabricatorSetupCheck::GROUP_PHP,
|
||||||
|
'fa-code');
|
||||||
$mysql = $this->buildIssueList(
|
$mysql = $this->buildIssueList(
|
||||||
$issues, PhabricatorSetupCheck::GROUP_MYSQL);
|
$issues,
|
||||||
|
PhabricatorSetupCheck::GROUP_MYSQL,
|
||||||
|
'fa-database');
|
||||||
$other = $this->buildIssueList(
|
$other = $this->buildIssueList(
|
||||||
$issues, PhabricatorSetupCheck::GROUP_OTHER);
|
$issues,
|
||||||
|
PhabricatorSetupCheck::GROUP_OTHER,
|
||||||
|
'fa-question-circle');
|
||||||
|
|
||||||
$setup_issues = array();
|
$no_issues = null;
|
||||||
if ($important) {
|
if (empty($issues)) {
|
||||||
$setup_issues[] = id(new PHUIObjectBoxView())
|
$no_issues = id(new PHUIInfoView())
|
||||||
->setHeaderText(pht('Important Setup Issues'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setObjectList($important);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($php) {
|
|
||||||
$setup_issues[] = id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('PHP Setup Issues'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setObjectList($php);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($mysql) {
|
|
||||||
$setup_issues[] = id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('MySQL Setup Issues'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setObjectList($mysql);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($other) {
|
|
||||||
$setup_issues[] = id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('Other Setup Issues'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setObjectList($other);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($setup_issues)) {
|
|
||||||
$setup_issues[] = id(new PHUIInfoView())
|
|
||||||
->setTitle(pht('No Issues'))
|
->setTitle(pht('No Issues'))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
pht('Your install has no current setup issues to resolve.'))
|
pht('Your install has no current setup issues to resolve.'))
|
||||||
|
@ -62,25 +42,39 @@ final class PhabricatorConfigIssueListController
|
||||||
|
|
||||||
$title = pht('Setup Issues');
|
$title = pht('Setup Issues');
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($title)
|
||||||
|
->setProfileHeader(true);
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs($nav)
|
->buildApplicationCrumbs($nav)
|
||||||
->addTextCrumb(pht('Setup'), $this->getApplicationURI('issue/'));
|
->addTextCrumb(pht('Setup Issues'))
|
||||||
|
->setBorder(true);
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$page = array(
|
||||||
->setNavigation($nav)
|
$no_issues,
|
||||||
->setMainColumn(array(
|
$important,
|
||||||
$setup_issues,
|
$php,
|
||||||
));
|
$mysql,
|
||||||
|
$other,
|
||||||
|
);
|
||||||
|
|
||||||
|
$content = id(new PhabricatorConfigPageView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setContent($page);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildIssueList(array $issues, $group) {
|
private function buildIssueList(array $issues, $group, $fonticon) {
|
||||||
assert_instances_of($issues, 'PhabricatorSetupIssue');
|
assert_instances_of($issues, 'PhabricatorSetupIssue');
|
||||||
$list = new PHUIObjectItemListView();
|
$list = new PHUIObjectItemListView();
|
||||||
|
$list->setBig(true);
|
||||||
$ignored_items = array();
|
$ignored_items = array();
|
||||||
$items = 0;
|
$items = 0;
|
||||||
|
|
||||||
|
@ -93,12 +87,17 @@ final class PhabricatorConfigIssueListController
|
||||||
->setHref($href)
|
->setHref($href)
|
||||||
->addAttribute($issue->getSummary());
|
->addAttribute($issue->getSummary());
|
||||||
if (!$issue->getIsIgnored()) {
|
if (!$issue->getIsIgnored()) {
|
||||||
$item->setStatusIcon('fa-warning yellow');
|
$icon = id(new PHUIIconView())
|
||||||
|
->setIcon($fonticon)
|
||||||
|
->setBackground('bg-sky');
|
||||||
|
$item->setImageIcon($icon);
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
} else {
|
} else {
|
||||||
$item->addIcon('fa-eye-slash', pht('Ignored'));
|
$icon = id(new PHUIIconView())
|
||||||
|
->setIcon('fa-eye-slash')
|
||||||
|
->setBackground('bg-grey');
|
||||||
$item->setDisabled(true);
|
$item->setDisabled(true);
|
||||||
$item->setStatusIcon('fa-warning grey');
|
$item->setImageIcon($icon);
|
||||||
$ignored_items[] = $item;
|
$ignored_items[] = $item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorConfigIssuePanelController
|
||||||
|
extends PhabricatorConfigController {
|
||||||
|
|
||||||
|
public function handleRequest(AphrontRequest $request) {
|
||||||
|
$viewer = $request->getViewer();
|
||||||
|
$open_items = PhabricatorSetupCheck::getOpenSetupIssueKeys();
|
||||||
|
$issues = PhabricatorSetupCheck::runAllChecks();
|
||||||
|
PhabricatorSetupCheck::setOpenSetupIssueKeys(
|
||||||
|
PhabricatorSetupCheck::getUnignoredIssueKeys($issues),
|
||||||
|
$update_database = true);
|
||||||
|
|
||||||
|
if ($issues) {
|
||||||
|
require_celerity_resource('phabricator-notification-menu-css');
|
||||||
|
|
||||||
|
$items = array();
|
||||||
|
foreach ($issues as $issue) {
|
||||||
|
$classes = array();
|
||||||
|
$classes[] = 'phabricator-notification';
|
||||||
|
if ($issue->getIsIgnored()) {
|
||||||
|
$classes[] = 'phabricator-notification-read';
|
||||||
|
} else {
|
||||||
|
$classes[] = 'phabricator-notification-unread';
|
||||||
|
}
|
||||||
|
$uri = '/config/issue/'.$issue->getIssueKey().'/';
|
||||||
|
$title = $issue->getName();
|
||||||
|
$summary = $issue->getSummary();
|
||||||
|
$items[] = javelin_tag(
|
||||||
|
'div',
|
||||||
|
array(
|
||||||
|
'class' => implode(' ', $classes),
|
||||||
|
'sigil' => 'notification',
|
||||||
|
'meta' => array(
|
||||||
|
'href' => $uri,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
$title);
|
||||||
|
}
|
||||||
|
$content = phutil_tag_div('setup-issue-menu', $items);
|
||||||
|
} else {
|
||||||
|
$content = phutil_tag_div(
|
||||||
|
'phabricator-notification no-notifications',
|
||||||
|
pht('You have no unresolved setup issues.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = hsprintf(
|
||||||
|
'<div class="phabricator-notification-header">%s</div>'.
|
||||||
|
'%s',
|
||||||
|
phutil_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => '/config/issue/',
|
||||||
|
),
|
||||||
|
pht('Unresolved Setup Issues')),
|
||||||
|
$content);
|
||||||
|
|
||||||
|
$unresolved_count = count($open_items);
|
||||||
|
|
||||||
|
$json = array(
|
||||||
|
'content' => $content,
|
||||||
|
'number' => (int)$unresolved_count,
|
||||||
|
);
|
||||||
|
|
||||||
|
return id(new AphrontAjaxResponse())->setContent($json);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -12,6 +12,9 @@ final class PhabricatorConfigIssueViewController
|
||||||
PhabricatorSetupCheck::getUnignoredIssueKeys($issues),
|
PhabricatorSetupCheck::getUnignoredIssueKeys($issues),
|
||||||
$update_database = true);
|
$update_database = true);
|
||||||
|
|
||||||
|
$nav = $this->buildSideNavView();
|
||||||
|
$nav->selectFilter('issue/');
|
||||||
|
|
||||||
if (empty($issues[$issue_key])) {
|
if (empty($issues[$issue_key])) {
|
||||||
$content = id(new PHUIInfoView())
|
$content = id(new PHUIInfoView())
|
||||||
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
|
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
|
||||||
|
@ -35,12 +38,15 @@ final class PhabricatorConfigIssueViewController
|
||||||
->buildApplicationCrumbs()
|
->buildApplicationCrumbs()
|
||||||
->setBorder(true)
|
->setBorder(true)
|
||||||
->addTextCrumb(pht('Setup Issues'), $this->getApplicationURI('issue/'))
|
->addTextCrumb(pht('Setup Issues'), $this->getApplicationURI('issue/'))
|
||||||
->addTextCrumb($title, $request->getRequestURI());
|
->addTextCrumb($title, $request->getRequestURI())
|
||||||
|
->setBorder(true);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($content);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderIssue(PhabricatorSetupIssue $issue) {
|
private function renderIssue(PhabricatorSetupIssue $issue) {
|
||||||
|
|
|
@ -12,42 +12,45 @@ final class PhabricatorConfigListController
|
||||||
$groups = PhabricatorApplicationConfigOptions::loadAll();
|
$groups = PhabricatorApplicationConfigOptions::loadAll();
|
||||||
$core_list = $this->buildConfigOptionsList($groups, 'core');
|
$core_list = $this->buildConfigOptionsList($groups, 'core');
|
||||||
|
|
||||||
$title = pht('Core Configuration');
|
$title = pht('Core Settings');
|
||||||
|
|
||||||
$core = id(new PHUIObjectBoxView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeaderText($title)
|
->setHeader($title)
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
->setProfileHeader(true);
|
||||||
->setObjectList($core_list);
|
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs()
|
->buildApplicationCrumbs()
|
||||||
->addTextCrumb(pht('Configuration'), $this->getApplicationURI())
|
->addTextCrumb(pht('Core'))
|
||||||
->addTextCrumb($title);
|
->setBorder(true);
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$content = id(new PhabricatorConfigPageView())
|
||||||
->setNavigation($nav)
|
->setHeader($header)
|
||||||
->setMainColumn(array(
|
->setContent($core_list);
|
||||||
$core,
|
|
||||||
));
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildConfigOptionsList(array $groups, $type) {
|
private function buildConfigOptionsList(array $groups, $type) {
|
||||||
assert_instances_of($groups, 'PhabricatorApplicationConfigOptions');
|
assert_instances_of($groups, 'PhabricatorApplicationConfigOptions');
|
||||||
|
|
||||||
$list = new PHUIObjectItemListView();
|
$list = new PHUIObjectItemListView();
|
||||||
|
$list->setBig(true);
|
||||||
$groups = msort($groups, 'getName');
|
$groups = msort($groups, 'getName');
|
||||||
foreach ($groups as $group) {
|
foreach ($groups as $group) {
|
||||||
if ($group->getGroup() == $type) {
|
if ($group->getGroup() == $type) {
|
||||||
|
$icon = id(new PHUIIconView())
|
||||||
|
->setIcon($group->getIcon())
|
||||||
|
->setBackground('bg-blue');
|
||||||
$item = id(new PHUIObjectItemView())
|
$item = id(new PHUIObjectItemView())
|
||||||
->setHeader($group->getName())
|
->setHeader($group->getName())
|
||||||
->setHref('/config/group/'.$group->getKey().'/')
|
->setHref('/config/group/'.$group->getKey().'/')
|
||||||
->addAttribute($group->getDescription())
|
->addAttribute($group->getDescription())
|
||||||
->setImageIcon($group->getIcon());
|
->setImageIcon($icon);
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,20 +18,25 @@ final class PhabricatorConfigModuleController
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb($title);
|
$crumbs->addTextCrumb($title);
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$nav = $this->buildSideNavView();
|
$nav = $this->buildSideNavView();
|
||||||
$nav->selectFilter('module/'.$key.'/');
|
$nav->selectFilter('module/'.$key.'/');
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setNavigation($nav)
|
->setHeader($title)
|
||||||
->setMainColumn(array(
|
->setProfileHeader(true);
|
||||||
$content,
|
|
||||||
));
|
$content = id(new PhabricatorConfigPageView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setContent($content);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,24 +10,28 @@ final class PhabricatorConfigVersionController
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs()
|
->buildApplicationCrumbs()
|
||||||
->addTextCrumb(pht('Configuration'), $this->getApplicationURI())
|
->addTextCrumb($title)
|
||||||
->addTextCrumb($title);
|
->setBorder(true);
|
||||||
|
|
||||||
$versions = $this->renderModuleStatus($viewer);
|
$versions = $this->renderModuleStatus($viewer);
|
||||||
|
|
||||||
$nav = $this->buildSideNavView();
|
$nav = $this->buildSideNavView();
|
||||||
$nav->selectFilter('version/');
|
$nav->selectFilter('version/');
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setNavigation($nav)
|
->setHeader($title)
|
||||||
->setMainColumn(array(
|
->setProfileHeader(true);
|
||||||
$versions,
|
|
||||||
));
|
$content = id(new PhabricatorConfigPageView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setContent($versions);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,11 +43,6 @@ final class PhabricatorConfigVersionController
|
||||||
$version_property_list->addProperty($name, $version);
|
$version_property_list->addProperty($name, $version);
|
||||||
}
|
}
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('Version Information'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->addPropertyList($version_property_list);
|
|
||||||
|
|
||||||
$phabricator_root = dirname(phutil_get_library_root('phabricator'));
|
$phabricator_root = dirname(phutil_get_library_root('phabricator'));
|
||||||
$version_path = $phabricator_root.'/conf/local/VERSION';
|
$version_path = $phabricator_root.'/conf/local/VERSION';
|
||||||
if (Filesystem::pathExists($version_path)) {
|
if (Filesystem::pathExists($version_path)) {
|
||||||
|
@ -53,7 +52,7 @@ final class PhabricatorConfigVersionController
|
||||||
$version_from_file);
|
$version_from_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $object_box;
|
return $version_property_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function loadVersions(PhabricatorUser $viewer) {
|
private function loadVersions(PhabricatorUser $viewer) {
|
||||||
|
|
|
@ -11,20 +11,25 @@ final class PhabricatorConfigWelcomeController
|
||||||
|
|
||||||
$title = pht('Installation Guide');
|
$title = pht('Installation Guide');
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($title)
|
||||||
|
->setProfileHeader(true);
|
||||||
|
|
||||||
$crumbs = $this
|
$crumbs = $this
|
||||||
->buildApplicationCrumbs()
|
->buildApplicationCrumbs()
|
||||||
->addTextCrumb($title);
|
->addTextCrumb($title)
|
||||||
|
->setBorder(true);
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$content = id(new PhabricatorConfigPageView())
|
||||||
->setNavigation($nav)
|
->setHeader($header)
|
||||||
->setMainColumn(array(
|
->setContent($this->buildWelcomeScreen($request));
|
||||||
$this->buildWelcomeScreen($request),
|
|
||||||
));
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild($view);
|
->setNavigation($nav)
|
||||||
|
->appendChild($content)
|
||||||
|
->addClass('white-background');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildWelcomeScreen(AphrontRequest $request) {
|
public function buildWelcomeScreen(AphrontRequest $request) {
|
||||||
|
@ -312,7 +317,7 @@ final class PhabricatorConfigWelcomeController
|
||||||
$pholio_all_uri));
|
$pholio_all_uri));
|
||||||
|
|
||||||
|
|
||||||
$diffusion_uri = PhabricatorEnv::getURI('/diffusion/');
|
$diffusion_uri = PhabricatorEnv::getURI('/diffusion/edit/');
|
||||||
$diffusion_create_uri = PhabricatorEnv::getURI('/diffusion/create/');
|
$diffusion_create_uri = PhabricatorEnv::getURI('/diffusion/create/');
|
||||||
$diffusion_all_uri = PhabricatorEnv::getURI('/diffusion/query/all/');
|
$diffusion_all_uri = PhabricatorEnv::getURI('/diffusion/query/all/');
|
||||||
|
|
||||||
|
@ -346,9 +351,6 @@ final class PhabricatorConfigWelcomeController
|
||||||
$diffusion_user_guide,
|
$diffusion_user_guide,
|
||||||
$diffusion_setup_guide));
|
$diffusion_setup_guide));
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
|
||||||
->setHeader(pht('Welcome to Phabricator'));
|
|
||||||
|
|
||||||
$setup_header = new PHUIRemarkupView(
|
$setup_header = new PHUIRemarkupView(
|
||||||
$viewer, pht('=Setup and Configuration'));
|
$viewer, pht('=Setup and Configuration'));
|
||||||
|
|
||||||
|
@ -359,7 +361,6 @@ final class PhabricatorConfigWelcomeController
|
||||||
$viewer, pht('=Quick Start Guide'));
|
$viewer, pht('=Quick Start Guide'));
|
||||||
|
|
||||||
$document = id(new PHUIDocumentViewPro())
|
$document = id(new PHUIDocumentViewPro())
|
||||||
->setHeader($header)
|
|
||||||
->setFluid(true)
|
->setFluid(true)
|
||||||
->appendChild($setup_header)
|
->appendChild($setup_header)
|
||||||
->appendChild($setup)
|
->appendChild($setup)
|
||||||
|
@ -369,9 +370,7 @@ final class PhabricatorConfigWelcomeController
|
||||||
->appendChild($quick);
|
->appendChild($quick);
|
||||||
|
|
||||||
return id(new PHUIBoxView())
|
return id(new PHUIBoxView())
|
||||||
->setBorder(true)
|
->appendChild($document);
|
||||||
->appendChild($document)
|
|
||||||
->addClass('mlb');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function newItem(AphrontRequest $request, $icon, $content) {
|
private function newItem(AphrontRequest $request, $icon, $content) {
|
||||||
|
|
|
@ -48,7 +48,15 @@ final class PhabricatorConfigCollectorsModule extends PhabricatorConfigModule {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$info = id(new PHUIInfoView())
|
||||||
|
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
|
||||||
|
->appendChild(pht(
|
||||||
|
'Collectors with custom policies are highlighted. Use '.
|
||||||
|
'%s to change retention policies.',
|
||||||
|
phutil_tag('tt', array(), 'bin/garbage set-policy')));
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
$table = id(new AphrontTableView($rows))
|
||||||
|
->setNotice($info)
|
||||||
->setRowClasses($rowc)
|
->setRowClasses($rowc)
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
|
@ -63,18 +71,7 @@ final class PhabricatorConfigCollectorsModule extends PhabricatorConfigModule {
|
||||||
null,
|
null,
|
||||||
));
|
));
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
return $table;
|
||||||
->setHeader(pht('Garbage Collectors'))
|
|
||||||
->setSubheader(
|
|
||||||
pht(
|
|
||||||
'Collectors with custom policies are highlighted. Use '.
|
|
||||||
'%s to change retention policies.',
|
|
||||||
phutil_tag('tt', array(), 'bin/garbage set-policy')));
|
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeader($header)
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ final class PhabricatorConfigEdgeModule extends PhabricatorConfigModule {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Constant'),
|
pht('Constant'),
|
||||||
|
@ -38,11 +38,6 @@ final class PhabricatorConfigEdgeModule extends PhabricatorConfigModule {
|
||||||
null,
|
null,
|
||||||
'pri wide',
|
'pri wide',
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('Edge Types'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,13 +16,8 @@ final class PhabricatorConfigHTTPParameterTypesModule
|
||||||
|
|
||||||
$types = AphrontHTTPParameterType::getAllTypes();
|
$types = AphrontHTTPParameterType::getAllTypes();
|
||||||
|
|
||||||
$table = id(new PhabricatorHTTPParameterTypeTableView())
|
return id(new PhabricatorHTTPParameterTypeTableView())
|
||||||
->setHTTPParameterTypes($types);
|
->setHTTPParameterTypes($types);
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('HTTP Parameter Types'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ final class PhabricatorConfigPHIDModule extends PhabricatorConfigModule {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Constant'),
|
pht('Constant'),
|
||||||
|
@ -70,11 +70,6 @@ final class PhabricatorConfigPHIDModule extends PhabricatorConfigModule {
|
||||||
'icon',
|
'icon',
|
||||||
'wide',
|
'wide',
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('PHID Types'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ final class PhabricatorConfigRequestExceptionHandlerModule
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Priority'),
|
pht('Priority'),
|
||||||
|
@ -38,11 +38,6 @@ final class PhabricatorConfigRequestExceptionHandlerModule
|
||||||
'pri',
|
'pri',
|
||||||
'wide',
|
'wide',
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('Exception Handlers'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ final class PhabricatorConfigSiteModule extends PhabricatorConfigModule {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Priority'),
|
pht('Priority'),
|
||||||
|
@ -37,11 +37,6 @@ final class PhabricatorConfigSiteModule extends PhabricatorConfigModule {
|
||||||
'pri',
|
'pri',
|
||||||
'wide',
|
'wide',
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('Sites'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
60
src/applications/config/view/PhabricatorConfigPageView.php
Normal file
60
src/applications/config/view/PhabricatorConfigPageView.php
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorConfigPageView extends AphrontTagView {
|
||||||
|
|
||||||
|
private $header;
|
||||||
|
private $content;
|
||||||
|
private $footer;
|
||||||
|
|
||||||
|
public function setHeader(PHUIHeaderView $header) {
|
||||||
|
$this->header = $header;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setContent($content) {
|
||||||
|
$this->content = $content;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFooter($footer) {
|
||||||
|
$this->footer = $footer;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getTagName() {
|
||||||
|
return 'div';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getTagAttributes() {
|
||||||
|
require_celerity_resource('config-page-css');
|
||||||
|
|
||||||
|
$classes = array();
|
||||||
|
$classes[] = 'config-page';
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'class' => implode(' ', $classes),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getTagContent() {
|
||||||
|
|
||||||
|
$header = null;
|
||||||
|
if ($this->header) {
|
||||||
|
$header = phutil_tag_div('config-page-header', $this->header);
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = null;
|
||||||
|
if ($this->content) {
|
||||||
|
$content = phutil_tag_div('config-page-content', $this->content);
|
||||||
|
}
|
||||||
|
|
||||||
|
$footer = null;
|
||||||
|
if ($this->footer) {
|
||||||
|
$footer = phutil_tag_div('config-page-footer', $this->footer);
|
||||||
|
}
|
||||||
|
|
||||||
|
return array($header, $content, $footer);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -292,9 +292,12 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
'/differential/comment/inline/edit/'.$revision->getID().'/');
|
'/differential/comment/inline/edit/'.$revision->getID().'/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$broken_diffs = $this->loadHistoryDiffStatus($diffs);
|
||||||
|
|
||||||
$history = id(new DifferentialRevisionUpdateHistoryView())
|
$history = id(new DifferentialRevisionUpdateHistoryView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setDiffs($diffs)
|
->setDiffs($diffs)
|
||||||
|
->setDiffUnitStatuses($broken_diffs)
|
||||||
->setSelectedVersusDiffID($diff_vs)
|
->setSelectedVersusDiffID($diff_vs)
|
||||||
->setSelectedDiffID($target->getID())
|
->setSelectedDiffID($target->getID())
|
||||||
->setSelectedWhitespace($whitespace)
|
->setSelectedWhitespace($whitespace)
|
||||||
|
@ -776,6 +779,45 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
return $actions_dict;
|
return $actions_dict;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function loadHistoryDiffStatus(array $diffs) {
|
||||||
|
assert_instances_of($diffs, 'DifferentialDiff');
|
||||||
|
|
||||||
|
$diff_phids = mpull($diffs, 'getPHID');
|
||||||
|
$bad_unit_status = array(
|
||||||
|
ArcanistUnitTestResult::RESULT_FAIL,
|
||||||
|
ArcanistUnitTestResult::RESULT_BROKEN,
|
||||||
|
);
|
||||||
|
|
||||||
|
$message = new HarbormasterBuildUnitMessage();
|
||||||
|
$target = new HarbormasterBuildTarget();
|
||||||
|
$build = new HarbormasterBuild();
|
||||||
|
$buildable = new HarbormasterBuildable();
|
||||||
|
|
||||||
|
$broken_diffs = queryfx_all(
|
||||||
|
$message->establishConnection('r'),
|
||||||
|
'SELECT distinct a.buildablePHID
|
||||||
|
FROM %T m
|
||||||
|
JOIN %T t ON m.buildTargetPHID = t.phid
|
||||||
|
JOIN %T b ON t.buildPHID = b.phid
|
||||||
|
JOIN %T a ON b.buildablePHID = a.phid
|
||||||
|
WHERE a.buildablePHID IN (%Ls)
|
||||||
|
AND m.result in (%Ls)',
|
||||||
|
$message->getTableName(),
|
||||||
|
$target->getTableName(),
|
||||||
|
$build->getTableName(),
|
||||||
|
$buildable->getTableName(),
|
||||||
|
$diff_phids,
|
||||||
|
$bad_unit_status);
|
||||||
|
|
||||||
|
$unit_status = array();
|
||||||
|
foreach ($broken_diffs as $broken) {
|
||||||
|
$phid = $broken['buildablePHID'];
|
||||||
|
$unit_status[$phid] = DifferentialUnitStatus::UNIT_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $unit_status;
|
||||||
|
}
|
||||||
|
|
||||||
private function loadChangesetsAndVsMap(
|
private function loadChangesetsAndVsMap(
|
||||||
DifferentialDiff $target,
|
DifferentialDiff $target,
|
||||||
DifferentialDiff $diff_vs = null,
|
DifferentialDiff $diff_vs = null,
|
||||||
|
|
|
@ -61,7 +61,8 @@ final class DifferentialUnitField
|
||||||
);
|
);
|
||||||
$icon_color = idx($colors, $diff->getUnitStatus(), 'grey');
|
$icon_color = idx($colors, $diff->getUnitStatus(), 'grey');
|
||||||
|
|
||||||
$message = DifferentialRevisionUpdateHistoryView::getDiffUnitMessage($diff);
|
$message = DifferentialRevisionUpdateHistoryView::getDiffUnitMessage(
|
||||||
|
$diff->getUnitStatus());
|
||||||
|
|
||||||
$status = id(new PHUIStatusListView())
|
$status = id(new PHUIStatusListView())
|
||||||
->addItem(
|
->addItem(
|
||||||
|
|
|
@ -36,7 +36,7 @@ final class DifferentialDiffExtractionEngine extends Phobject {
|
||||||
'repository' => $repository,
|
'repository' => $repository,
|
||||||
));
|
));
|
||||||
|
|
||||||
$raw_diff = DiffusionQuery::callConduitWithDiffusionRequest(
|
$diff_info = DiffusionQuery::callConduitWithDiffusionRequest(
|
||||||
$viewer,
|
$viewer,
|
||||||
$drequest,
|
$drequest,
|
||||||
'diffusion.rawdiffquery',
|
'diffusion.rawdiffquery',
|
||||||
|
@ -44,6 +44,21 @@ final class DifferentialDiffExtractionEngine extends Phobject {
|
||||||
'commit' => $identifier,
|
'commit' => $identifier,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$file_phid = $diff_info['filePHID'];
|
||||||
|
$diff_file = id(new PhabricatorFileQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withPHIDs(array($file_phid))
|
||||||
|
->executeOne();
|
||||||
|
if (!$diff_file) {
|
||||||
|
throw new Exception(
|
||||||
|
pht(
|
||||||
|
'Failed to load file ("%s") returned by "%s".',
|
||||||
|
$file_phid,
|
||||||
|
'diffusion.rawdiffquery'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$raw_diff = $diff_file->loadFileData();
|
||||||
|
|
||||||
// TODO: Support adds, deletes and moves under SVN.
|
// TODO: Support adds, deletes and moves under SVN.
|
||||||
if (strlen($raw_diff)) {
|
if (strlen($raw_diff)) {
|
||||||
$changes = id(new ArcanistDiffParser())->parseDiff($raw_diff);
|
$changes = id(new ArcanistDiffParser())->parseDiff($raw_diff);
|
||||||
|
|
|
@ -7,6 +7,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||||
private $selectedDiffID;
|
private $selectedDiffID;
|
||||||
private $selectedWhitespace;
|
private $selectedWhitespace;
|
||||||
private $commitsForLinks = array();
|
private $commitsForLinks = array();
|
||||||
|
private $unitStatus = array();
|
||||||
|
|
||||||
public function setDiffs(array $diffs) {
|
public function setDiffs(array $diffs) {
|
||||||
assert_instances_of($diffs, 'DifferentialDiff');
|
assert_instances_of($diffs, 'DifferentialDiff');
|
||||||
|
@ -35,6 +36,11 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setDiffUnitStatuses(array $unit_status) {
|
||||||
|
$this->unitStatus = $unit_status;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
$this->requireResource('differential-core-view-css');
|
$this->requireResource('differential-core-view-css');
|
||||||
$this->requireResource('differential-revision-history-css');
|
$this->requireResource('differential-revision-history-css');
|
||||||
|
@ -139,6 +145,11 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($diff) {
|
if ($diff) {
|
||||||
|
$unit_status = idx(
|
||||||
|
$this->unitStatus,
|
||||||
|
$diff->getPHID(),
|
||||||
|
$diff->getUnitStatus());
|
||||||
|
|
||||||
$lint = self::renderDiffLintStar($row['obj']);
|
$lint = self::renderDiffLintStar($row['obj']);
|
||||||
$lint = phutil_tag(
|
$lint = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
|
@ -148,12 +159,12 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||||
),
|
),
|
||||||
$lint);
|
$lint);
|
||||||
|
|
||||||
$unit = self::renderDiffUnitStar($row['obj']);
|
$unit = self::renderDiffUnitStar($unit_status);
|
||||||
$unit = phutil_tag(
|
$unit = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'lintunit-star',
|
'class' => 'lintunit-star',
|
||||||
'title' => self::getDiffUnitMessage($diff),
|
'title' => self::getDiffUnitMessage($unit_status),
|
||||||
),
|
),
|
||||||
$unit);
|
$unit);
|
||||||
|
|
||||||
|
@ -312,7 +323,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||||
const STAR_FAIL = 'fail';
|
const STAR_FAIL = 'fail';
|
||||||
const STAR_SKIP = 'skip';
|
const STAR_SKIP = 'skip';
|
||||||
|
|
||||||
public static function renderDiffLintStar(DifferentialDiff $diff) {
|
private static function renderDiffLintStar(DifferentialDiff $diff) {
|
||||||
static $map = array(
|
static $map = array(
|
||||||
DifferentialLintStatus::LINT_NONE => self::STAR_NONE,
|
DifferentialLintStatus::LINT_NONE => self::STAR_NONE,
|
||||||
DifferentialLintStatus::LINT_OKAY => self::STAR_OKAY,
|
DifferentialLintStatus::LINT_OKAY => self::STAR_OKAY,
|
||||||
|
@ -327,7 +338,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||||
return self::renderDiffStar($star);
|
return self::renderDiffStar($star);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function renderDiffUnitStar(DifferentialDiff $diff) {
|
private static function renderDiffUnitStar($unit_status) {
|
||||||
static $map = array(
|
static $map = array(
|
||||||
DifferentialUnitStatus::UNIT_NONE => self::STAR_NONE,
|
DifferentialUnitStatus::UNIT_NONE => self::STAR_NONE,
|
||||||
DifferentialUnitStatus::UNIT_OKAY => self::STAR_OKAY,
|
DifferentialUnitStatus::UNIT_OKAY => self::STAR_OKAY,
|
||||||
|
@ -336,8 +347,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||||
DifferentialUnitStatus::UNIT_SKIP => self::STAR_SKIP,
|
DifferentialUnitStatus::UNIT_SKIP => self::STAR_SKIP,
|
||||||
DifferentialUnitStatus::UNIT_AUTO_SKIP => self::STAR_SKIP,
|
DifferentialUnitStatus::UNIT_AUTO_SKIP => self::STAR_SKIP,
|
||||||
);
|
);
|
||||||
|
$star = idx($map, $unit_status, self::STAR_FAIL);
|
||||||
$star = idx($map, $diff->getUnitStatus(), self::STAR_FAIL);
|
|
||||||
|
|
||||||
return self::renderDiffStar($star);
|
return self::renderDiffStar($star);
|
||||||
}
|
}
|
||||||
|
@ -360,8 +370,8 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
||||||
return pht('Unknown');
|
return pht('Unknown');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getDiffUnitMessage(DifferentialDiff $diff) {
|
public static function getDiffUnitMessage($unit_status) {
|
||||||
switch ($diff->getUnitStatus()) {
|
switch ($unit_status) {
|
||||||
case DifferentialUnitStatus::UNIT_NONE:
|
case DifferentialUnitStatus::UNIT_NONE:
|
||||||
return pht('No Unit Test Coverage');
|
return pht('No Unit Test Coverage');
|
||||||
case DifferentialUnitStatus::UNIT_OKAY:
|
case DifferentialUnitStatus::UNIT_OKAY:
|
||||||
|
|
|
@ -262,7 +262,7 @@ final class DiffusionLintSaveRunner extends Phobject {
|
||||||
|
|
||||||
$query = DiffusionFileContentQuery::newFromDiffusionRequest($drequest);
|
$query = DiffusionFileContentQuery::newFromDiffusionRequest($drequest);
|
||||||
$queries[$path] = $query;
|
$queries[$path] = $query;
|
||||||
$futures[$path] = $query->getFileContentFuture();
|
$futures[$path] = new ImmediateFuture($query->executeInline());
|
||||||
}
|
}
|
||||||
|
|
||||||
$authors = array();
|
$authors = array();
|
||||||
|
|
|
@ -207,7 +207,7 @@ final class DiffusionDiffQueryConduitAPIMethod
|
||||||
$raw_query = DiffusionRawDiffQuery::newFromDiffusionRequest($drequest)
|
$raw_query = DiffusionRawDiffQuery::newFromDiffusionRequest($drequest)
|
||||||
->setAnchorCommit($effective_commit);
|
->setAnchorCommit($effective_commit);
|
||||||
|
|
||||||
$raw_diff = $raw_query->loadRawDiff();
|
$raw_diff = $raw_query->executeInline();
|
||||||
if (!$raw_diff) {
|
if (!$raw_diff) {
|
||||||
return $this->getEmptyResult(2);
|
return $this->getEmptyResult(2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,48 +19,14 @@ final class DiffusionFileContentQueryConduitAPIMethod
|
||||||
return array(
|
return array(
|
||||||
'path' => 'required string',
|
'path' => 'required string',
|
||||||
'commit' => 'required string',
|
'commit' => 'required string',
|
||||||
'timeout' => 'optional int',
|
) + DiffusionFileFutureQuery::getConduitParameters();
|
||||||
'byteLimit' => 'optional int',
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getResult(ConduitAPIRequest $request) {
|
protected function getResult(ConduitAPIRequest $request) {
|
||||||
$drequest = $this->getDiffusionRequest();
|
$drequest = $this->getDiffusionRequest();
|
||||||
|
|
||||||
$file_query = DiffusionFileContentQuery::newFromDiffusionRequest($drequest);
|
return DiffusionFileContentQuery::newFromDiffusionRequest($drequest)
|
||||||
|
->respondToConduitRequest($request);
|
||||||
$timeout = $request->getValue('timeout');
|
|
||||||
if ($timeout) {
|
|
||||||
$file_query->setTimeout($timeout);
|
|
||||||
}
|
|
||||||
|
|
||||||
$byte_limit = $request->getValue('byteLimit');
|
|
||||||
if ($byte_limit) {
|
|
||||||
$file_query->setByteLimit($byte_limit);
|
|
||||||
}
|
|
||||||
|
|
||||||
$file = $file_query->execute();
|
|
||||||
|
|
||||||
$too_slow = (bool)$file_query->getExceededTimeLimit();
|
|
||||||
$too_huge = (bool)$file_query->getExceededByteLimit();
|
|
||||||
|
|
||||||
$file_phid = null;
|
|
||||||
if (!$too_slow && !$too_huge) {
|
|
||||||
$repository = $drequest->getRepository();
|
|
||||||
$repository_phid = $repository->getPHID();
|
|
||||||
|
|
||||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
|
||||||
$file->attachToObject($repository_phid);
|
|
||||||
unset($unguarded);
|
|
||||||
|
|
||||||
$file_phid = $file->getPHID();
|
|
||||||
}
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'tooSlow' => $too_slow,
|
|
||||||
'tooHuge' => $too_huge,
|
|
||||||
'filePHID' => $file_phid,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,39 +21,27 @@ final class DiffusionRawDiffQueryConduitAPIMethod
|
||||||
return array(
|
return array(
|
||||||
'commit' => 'required string',
|
'commit' => 'required string',
|
||||||
'path' => 'optional string',
|
'path' => 'optional string',
|
||||||
'timeout' => 'optional int',
|
|
||||||
'byteLimit' => 'optional int',
|
|
||||||
'linesOfContext' => 'optional int',
|
'linesOfContext' => 'optional int',
|
||||||
'againstCommit' => 'optional string',
|
'againstCommit' => 'optional string',
|
||||||
);
|
) + DiffusionFileFutureQuery::getConduitParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getResult(ConduitAPIRequest $request) {
|
protected function getResult(ConduitAPIRequest $request) {
|
||||||
$drequest = $this->getDiffusionRequest();
|
$drequest = $this->getDiffusionRequest();
|
||||||
|
|
||||||
$raw_query = DiffusionRawDiffQuery::newFromDiffusionRequest($drequest);
|
$query = DiffusionRawDiffQuery::newFromDiffusionRequest($drequest);
|
||||||
|
|
||||||
$timeout = $request->getValue('timeout');
|
|
||||||
if ($timeout !== null) {
|
|
||||||
$raw_query->setTimeout($timeout);
|
|
||||||
}
|
|
||||||
|
|
||||||
$lines_of_context = $request->getValue('linesOfContext');
|
$lines_of_context = $request->getValue('linesOfContext');
|
||||||
if ($lines_of_context !== null) {
|
if ($lines_of_context !== null) {
|
||||||
$raw_query->setLinesOfContext($lines_of_context);
|
$query->setLinesOfContext($lines_of_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
$against_commit = $request->getValue('againstCommit');
|
$against_commit = $request->getValue('againstCommit');
|
||||||
if ($against_commit !== null) {
|
if ($against_commit !== null) {
|
||||||
$raw_query->setAgainstCommit($against_commit);
|
$query->setAgainstCommit($against_commit);
|
||||||
}
|
}
|
||||||
|
|
||||||
$byte_limit = $request->getValue('byteLimit');
|
return $query->respondToConduitRequest($request);
|
||||||
if ($byte_limit !== null) {
|
|
||||||
$raw_query->setByteLimit($byte_limit);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $raw_query->loadRawDiff();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1527,19 +1527,36 @@ final class DiffusionBrowseController extends DiffusionController {
|
||||||
|
|
||||||
private function getBeforeLineNumber($target_commit) {
|
private function getBeforeLineNumber($target_commit) {
|
||||||
$drequest = $this->getDiffusionRequest();
|
$drequest = $this->getDiffusionRequest();
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
|
||||||
$line = $drequest->getLine();
|
$line = $drequest->getLine();
|
||||||
if (!$line) {
|
if (!$line) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$raw_diff = $this->callConduitWithDiffusionRequest(
|
$diff_info = $this->callConduitWithDiffusionRequest(
|
||||||
'diffusion.rawdiffquery',
|
'diffusion.rawdiffquery',
|
||||||
array(
|
array(
|
||||||
'commit' => $drequest->getCommit(),
|
'commit' => $drequest->getCommit(),
|
||||||
'path' => $drequest->getPath(),
|
'path' => $drequest->getPath(),
|
||||||
'againstCommit' => $target_commit,
|
'againstCommit' => $target_commit,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$file_phid = $diff_info['filePHID'];
|
||||||
|
$file = id(new PhabricatorFileQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withPHIDs(array($file_phid))
|
||||||
|
->executeOne();
|
||||||
|
if (!$file) {
|
||||||
|
throw new Exception(
|
||||||
|
pht(
|
||||||
|
'Failed to load file ("%s") returned by "%s".',
|
||||||
|
$file_phid,
|
||||||
|
'diffusion.rawdiffquery.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$raw_diff = $file->loadFileData();
|
||||||
|
|
||||||
$old_line = 0;
|
$old_line = 0;
|
||||||
$new_line = 0;
|
$new_line = 0;
|
||||||
|
|
||||||
|
|
|
@ -1027,24 +1027,26 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildRawDiffResponse(DiffusionRequest $drequest) {
|
private function buildRawDiffResponse(DiffusionRequest $drequest) {
|
||||||
$raw_diff = $this->callConduitWithDiffusionRequest(
|
$diff_info = $this->callConduitWithDiffusionRequest(
|
||||||
'diffusion.rawdiffquery',
|
'diffusion.rawdiffquery',
|
||||||
array(
|
array(
|
||||||
'commit' => $drequest->getCommit(),
|
'commit' => $drequest->getCommit(),
|
||||||
'path' => $drequest->getPath(),
|
'path' => $drequest->getPath(),
|
||||||
));
|
));
|
||||||
|
|
||||||
$file = PhabricatorFile::buildFromFileDataOrHash(
|
$file_phid = $diff_info['filePHID'];
|
||||||
$raw_diff,
|
|
||||||
array(
|
|
||||||
'name' => $drequest->getCommit().'.diff',
|
|
||||||
'ttl' => (60 * 60 * 24),
|
|
||||||
'viewPolicy' => PhabricatorPolicies::POLICY_NOONE,
|
|
||||||
));
|
|
||||||
|
|
||||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
$file = id(new PhabricatorFileQuery())
|
||||||
$file->attachToObject($drequest->getRepository()->getPHID());
|
->setViewer($this->getViewer())
|
||||||
unset($unguarded);
|
->withPHIDs(array($file_phid))
|
||||||
|
->executeOne();
|
||||||
|
if (!$file) {
|
||||||
|
throw new Exception(
|
||||||
|
pht(
|
||||||
|
'Failed to load file ("%s") returned by "%s".',
|
||||||
|
$file_phid,
|
||||||
|
'diffusion.rawdiffquery'));
|
||||||
|
}
|
||||||
|
|
||||||
return $file->getRedirectResponse();
|
return $file->getRedirectResponse();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1095,7 +1095,7 @@ final class DiffusionCommitHookEngine extends Phobject {
|
||||||
->setTimeout($time_limit)
|
->setTimeout($time_limit)
|
||||||
->setByteLimit($byte_limit)
|
->setByteLimit($byte_limit)
|
||||||
->setLinesOfContext(0)
|
->setLinesOfContext(0)
|
||||||
->loadRawDiff();
|
->executeInline();
|
||||||
break;
|
break;
|
||||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
||||||
// TODO: This diff has 3 lines of context, which produces slightly
|
// TODO: This diff has 3 lines of context, which produces slightly
|
||||||
|
|
|
@ -204,25 +204,50 @@ final class HeraldCommitAdapter
|
||||||
}
|
}
|
||||||
|
|
||||||
private function loadCommitDiff() {
|
private function loadCommitDiff() {
|
||||||
$byte_limit = self::getEnormousByteLimit();
|
$viewer = PhabricatorUser::getOmnipotentUser();
|
||||||
|
|
||||||
$raw = $this->callConduit(
|
$byte_limit = self::getEnormousByteLimit();
|
||||||
|
$time_limit = self::getEnormousTimeLimit();
|
||||||
|
|
||||||
|
$diff_info = $this->callConduit(
|
||||||
'diffusion.rawdiffquery',
|
'diffusion.rawdiffquery',
|
||||||
array(
|
array(
|
||||||
'commit' => $this->commit->getCommitIdentifier(),
|
'commit' => $this->commit->getCommitIdentifier(),
|
||||||
'timeout' => self::getEnormousTimeLimit(),
|
'timeout' => $time_limit,
|
||||||
'byteLimit' => $byte_limit,
|
'byteLimit' => $byte_limit,
|
||||||
'linesOfContext' => 0,
|
'linesOfContext' => 0,
|
||||||
));
|
));
|
||||||
|
|
||||||
if (strlen($raw) >= $byte_limit) {
|
if ($diff_info['tooHuge']) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
pht(
|
pht(
|
||||||
'The raw text of this change is enormous (larger than %d bytes). '.
|
'The raw text of this change is enormous (larger than %s byte(s)). '.
|
||||||
'Herald can not process it.',
|
'Herald can not process it.',
|
||||||
$byte_limit));
|
new PhutilNumber($byte_limit)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($diff_info['tooSlow']) {
|
||||||
|
throw new Exception(
|
||||||
|
pht(
|
||||||
|
'The raw text of this change took too long to process (longer '.
|
||||||
|
'than %s second(s)). Herald can not process it.',
|
||||||
|
new PhutilNumber($time_limit)));
|
||||||
|
}
|
||||||
|
|
||||||
|
$file_phid = $diff_info['filePHID'];
|
||||||
|
$diff_file = id(new PhabricatorFileQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withPHIDs(array($file_phid))
|
||||||
|
->executeOne();
|
||||||
|
if (!$diff_file) {
|
||||||
|
throw new Exception(
|
||||||
|
pht(
|
||||||
|
'Failed to load diff ("%s") for this change.',
|
||||||
|
$file_phid));
|
||||||
|
}
|
||||||
|
|
||||||
|
$raw = $diff_file->loadFileData();
|
||||||
|
|
||||||
$parser = new ArcanistDiffParser();
|
$parser = new ArcanistDiffParser();
|
||||||
$changes = $parser->parseDiff($raw);
|
$changes = $parser->parseDiff($raw);
|
||||||
|
|
||||||
|
|
152
src/applications/diffusion/query/DiffusionFileFutureQuery.php
Normal file
152
src/applications/diffusion/query/DiffusionFileFutureQuery.php
Normal file
|
@ -0,0 +1,152 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
abstract class DiffusionFileFutureQuery
|
||||||
|
extends DiffusionQuery {
|
||||||
|
|
||||||
|
private $timeout;
|
||||||
|
private $byteLimit;
|
||||||
|
|
||||||
|
private $didHitByteLimit = false;
|
||||||
|
private $didHitTimeLimit = false;
|
||||||
|
|
||||||
|
public static function getConduitParameters() {
|
||||||
|
return array(
|
||||||
|
'timeout' => 'optional int',
|
||||||
|
'byteLimit' => 'optional int',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTimeout($timeout) {
|
||||||
|
$this->timeout = $timeout;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTimeout() {
|
||||||
|
return $this->timeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setByteLimit($byte_limit) {
|
||||||
|
$this->byteLimit = $byte_limit;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getByteLimit() {
|
||||||
|
return $this->byteLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
final public function getExceededByteLimit() {
|
||||||
|
return $this->didHitByteLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
final public function getExceededTimeLimit() {
|
||||||
|
return $this->didHitTimeLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract protected function newQueryFuture();
|
||||||
|
|
||||||
|
final public function respondToConduitRequest(ConduitAPIRequest $request) {
|
||||||
|
$drequest = $this->getRequest();
|
||||||
|
|
||||||
|
$timeout = $request->getValue('timeout');
|
||||||
|
if ($timeout) {
|
||||||
|
$this->setTimeout($timeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
$byte_limit = $request->getValue('byteLimit');
|
||||||
|
if ($byte_limit) {
|
||||||
|
$this->setByteLimit($byte_limit);
|
||||||
|
}
|
||||||
|
|
||||||
|
$file = $this->execute();
|
||||||
|
|
||||||
|
$too_slow = (bool)$this->getExceededTimeLimit();
|
||||||
|
$too_huge = (bool)$this->getExceededByteLimit();
|
||||||
|
|
||||||
|
$file_phid = null;
|
||||||
|
if (!$too_slow && !$too_huge) {
|
||||||
|
$repository = $drequest->getRepository();
|
||||||
|
$repository_phid = $repository->getPHID();
|
||||||
|
|
||||||
|
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||||
|
$file->attachToObject($repository_phid);
|
||||||
|
unset($unguarded);
|
||||||
|
|
||||||
|
$file_phid = $file->getPHID();
|
||||||
|
}
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'tooSlow' => $too_slow,
|
||||||
|
'tooHuge' => $too_huge,
|
||||||
|
'filePHID' => $file_phid,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
final public function executeInline() {
|
||||||
|
$future = $this->newConfiguredQueryFuture();
|
||||||
|
list($stdout) = $future->resolvex();
|
||||||
|
return $stdout;
|
||||||
|
}
|
||||||
|
|
||||||
|
final protected function executeQuery() {
|
||||||
|
$future = $this->newQueryFuture();
|
||||||
|
|
||||||
|
$drequest = $this->getRequest();
|
||||||
|
|
||||||
|
$name = basename($drequest->getPath());
|
||||||
|
$ttl = PhabricatorTime::getNow() + phutil_units('48 hours in seconds');
|
||||||
|
|
||||||
|
try {
|
||||||
|
$threshold = PhabricatorFileStorageEngine::getChunkThreshold();
|
||||||
|
$future->setReadBufferSize($threshold);
|
||||||
|
|
||||||
|
$source = id(new PhabricatorExecFutureFileUploadSource())
|
||||||
|
->setName($name)
|
||||||
|
->setTTL($ttl)
|
||||||
|
->setViewPolicy(PhabricatorPolicies::POLICY_NOONE)
|
||||||
|
->setExecFuture($future);
|
||||||
|
|
||||||
|
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||||
|
$file = $source->uploadFile();
|
||||||
|
unset($unguarded);
|
||||||
|
|
||||||
|
} catch (CommandException $ex) {
|
||||||
|
if (!$future->getWasKilledByTimeout()) {
|
||||||
|
throw $ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->didHitTimeLimit = true;
|
||||||
|
$file = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$byte_limit = $this->getByteLimit();
|
||||||
|
|
||||||
|
if ($byte_limit && ($file->getByteSize() > $byte_limit)) {
|
||||||
|
$this->didHitByteLimit = true;
|
||||||
|
|
||||||
|
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||||
|
id(new PhabricatorDestructionEngine())
|
||||||
|
->destroyObject($file);
|
||||||
|
unset($unguarded);
|
||||||
|
|
||||||
|
$file = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $file;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function newConfiguredQueryFuture() {
|
||||||
|
$future = $this->newQueryFuture();
|
||||||
|
|
||||||
|
if ($this->getTimeout()) {
|
||||||
|
$future->setTimeout($this->getTimeout());
|
||||||
|
}
|
||||||
|
|
||||||
|
$byte_limit = $this->getByteLimit();
|
||||||
|
if ($byte_limit) {
|
||||||
|
$future->setStdoutSizeLimit($byte_limit + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $future;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,99 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
abstract class DiffusionFileContentQuery extends DiffusionQuery {
|
abstract class DiffusionFileContentQuery
|
||||||
|
extends DiffusionFileFutureQuery {
|
||||||
private $timeout;
|
|
||||||
private $byteLimit;
|
|
||||||
|
|
||||||
private $didHitByteLimit = false;
|
|
||||||
private $didHitTimeLimit = false;
|
|
||||||
|
|
||||||
public function setTimeout($timeout) {
|
|
||||||
$this->timeout = $timeout;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTimeout() {
|
|
||||||
return $this->timeout;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setByteLimit($byte_limit) {
|
|
||||||
$this->byteLimit = $byte_limit;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getByteLimit() {
|
|
||||||
return $this->byteLimit;
|
|
||||||
}
|
|
||||||
|
|
||||||
final public static function newFromDiffusionRequest(
|
final public static function newFromDiffusionRequest(
|
||||||
DiffusionRequest $request) {
|
DiffusionRequest $request) {
|
||||||
return parent::newQueryObject(__CLASS__, $request);
|
return parent::newQueryObject(__CLASS__, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
final public function getExceededByteLimit() {
|
|
||||||
return $this->didHitByteLimit;
|
|
||||||
}
|
|
||||||
|
|
||||||
final public function getExceededTimeLimit() {
|
|
||||||
return $this->didHitTimeLimit;
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract protected function getFileContentFuture();
|
|
||||||
abstract protected function resolveFileContentFuture(Future $future);
|
|
||||||
|
|
||||||
final protected function executeQuery() {
|
|
||||||
$future = $this->getFileContentFuture();
|
|
||||||
|
|
||||||
if ($this->getTimeout()) {
|
|
||||||
$future->setTimeout($this->getTimeout());
|
|
||||||
}
|
|
||||||
|
|
||||||
$byte_limit = $this->getByteLimit();
|
|
||||||
if ($byte_limit) {
|
|
||||||
$future->setStdoutSizeLimit($byte_limit + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$drequest = $this->getRequest();
|
|
||||||
|
|
||||||
$name = basename($drequest->getPath());
|
|
||||||
$ttl = PhabricatorTime::getNow() + phutil_units('48 hours in seconds');
|
|
||||||
|
|
||||||
try {
|
|
||||||
$threshold = PhabricatorFileStorageEngine::getChunkThreshold();
|
|
||||||
$future->setReadBufferSize($threshold);
|
|
||||||
|
|
||||||
$source = id(new PhabricatorExecFutureFileUploadSource())
|
|
||||||
->setName($name)
|
|
||||||
->setTTL($ttl)
|
|
||||||
->setViewPolicy(PhabricatorPolicies::POLICY_NOONE)
|
|
||||||
->setExecFuture($future);
|
|
||||||
|
|
||||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
|
||||||
$file = $source->uploadFile();
|
|
||||||
unset($unguarded);
|
|
||||||
|
|
||||||
} catch (CommandException $ex) {
|
|
||||||
if (!$future->getWasKilledByTimeout()) {
|
|
||||||
throw $ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->didHitTimeLimit = true;
|
|
||||||
$file = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($byte_limit && ($file->getByteSize() > $byte_limit)) {
|
|
||||||
$this->didHitByteLimit = true;
|
|
||||||
|
|
||||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
|
||||||
id(new PhabricatorDestructionEngine())
|
|
||||||
->destroyObject($file);
|
|
||||||
unset($unguarded);
|
|
||||||
|
|
||||||
$file = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $file;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
final class DiffusionGitFileContentQuery extends DiffusionFileContentQuery {
|
final class DiffusionGitFileContentQuery extends DiffusionFileContentQuery {
|
||||||
|
|
||||||
protected function getFileContentFuture() {
|
protected function newQueryFuture() {
|
||||||
$drequest = $this->getRequest();
|
$drequest = $this->getRequest();
|
||||||
|
|
||||||
$repository = $drequest->getRepository();
|
$repository = $drequest->getRepository();
|
||||||
|
@ -15,9 +15,4 @@ final class DiffusionGitFileContentQuery extends DiffusionFileContentQuery {
|
||||||
$path);
|
$path);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function resolveFileContentFuture(Future $future) {
|
|
||||||
list($corpus) = $future->resolvex();
|
|
||||||
return $corpus;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
final class DiffusionMercurialFileContentQuery
|
final class DiffusionMercurialFileContentQuery
|
||||||
extends DiffusionFileContentQuery {
|
extends DiffusionFileContentQuery {
|
||||||
|
|
||||||
protected function getFileContentFuture() {
|
protected function newQueryFuture() {
|
||||||
$drequest = $this->getRequest();
|
$drequest = $this->getRequest();
|
||||||
|
|
||||||
$repository = $drequest->getRepository();
|
$repository = $drequest->getRepository();
|
||||||
|
@ -16,9 +16,4 @@ final class DiffusionMercurialFileContentQuery
|
||||||
$path);
|
$path);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function resolveFileContentFuture(Future $future) {
|
|
||||||
list($corpus) = $future->resolvex();
|
|
||||||
return $corpus;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
final class DiffusionSvnFileContentQuery extends DiffusionFileContentQuery {
|
final class DiffusionSvnFileContentQuery extends DiffusionFileContentQuery {
|
||||||
|
|
||||||
protected function getFileContentFuture() {
|
protected function newQueryFuture() {
|
||||||
$drequest = $this->getRequest();
|
$drequest = $this->getRequest();
|
||||||
|
|
||||||
$repository = $drequest->getRepository();
|
$repository = $drequest->getRepository();
|
||||||
|
@ -14,9 +14,4 @@ final class DiffusionSvnFileContentQuery extends DiffusionFileContentQuery {
|
||||||
$repository->getSubversionPathURI($path, $commit));
|
$repository->getSubversionPathURI($path, $commit));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function resolveFileContentFuture(Future $future) {
|
|
||||||
list($corpus) = $future->resolvex();
|
|
||||||
return $corpus;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
final class DiffusionGitRawDiffQuery extends DiffusionRawDiffQuery {
|
final class DiffusionGitRawDiffQuery extends DiffusionRawDiffQuery {
|
||||||
|
|
||||||
protected function executeQuery() {
|
protected function newQueryFuture() {
|
||||||
$drequest = $this->getRequest();
|
$drequest = $this->getRequest();
|
||||||
$repository = $drequest->getRepository();
|
$repository = $drequest->getRepository();
|
||||||
|
|
||||||
|
@ -17,54 +17,34 @@ final class DiffusionGitRawDiffQuery extends DiffusionRawDiffQuery {
|
||||||
'--dst-prefix=b/',
|
'--dst-prefix=b/',
|
||||||
'-U'.(int)$this->getLinesOfContext(),
|
'-U'.(int)$this->getLinesOfContext(),
|
||||||
);
|
);
|
||||||
$options = implode(' ', $options);
|
|
||||||
|
|
||||||
$against = $this->getAgainstCommit();
|
$against = $this->getAgainstCommit();
|
||||||
if ($against === null) {
|
if ($against === null) {
|
||||||
|
// Check if this is the root commit by seeing if it has parents, since
|
||||||
|
// `git diff X^ X` does not work if "X" is the initial commit.
|
||||||
|
list($parents) = $repository->execxLocalCommand(
|
||||||
|
'log --format=%s %s --',
|
||||||
|
'%P',
|
||||||
|
$commit);
|
||||||
|
|
||||||
|
if (strlen(trim($parents))) {
|
||||||
$against = $commit.'^';
|
$against = $commit.'^';
|
||||||
|
} else {
|
||||||
|
$against = ArcanistGitAPI::GIT_MAGIC_ROOT_COMMIT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there's no path, get the entire raw diff.
|
$path = $drequest->getPath();
|
||||||
$path = nonempty($drequest->getPath(), '.');
|
if (!strlen($path)) {
|
||||||
|
$path = '.';
|
||||||
|
}
|
||||||
|
|
||||||
$future = $repository->getLocalCommandFuture(
|
return $repository->getLocalCommandFuture(
|
||||||
'diff %C %s %s -- %s',
|
'diff %Ls %s %s -- %s',
|
||||||
$options,
|
$options,
|
||||||
$against,
|
$against,
|
||||||
$commit,
|
$commit,
|
||||||
$path);
|
$path);
|
||||||
|
|
||||||
$this->configureFuture($future);
|
|
||||||
|
|
||||||
try {
|
|
||||||
list($raw_diff) = $future->resolvex();
|
|
||||||
} catch (CommandException $ex) {
|
|
||||||
// Check if this is the root commit by seeing if it has parents.
|
|
||||||
list($parents) = $repository->execxLocalCommand(
|
|
||||||
'log --format=%s %s --',
|
|
||||||
'%P', // "parents"
|
|
||||||
$commit);
|
|
||||||
|
|
||||||
if (strlen(trim($parents))) {
|
|
||||||
throw $ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
// No parents means we're looking at the root revision. Diff against
|
|
||||||
// the empty tree hash instead, since there is no parent so "^" does
|
|
||||||
// not work. See ArcanistGitAPI for more discussion.
|
|
||||||
$future = $repository->getLocalCommandFuture(
|
|
||||||
'diff %C %s %s -- %s',
|
|
||||||
$options,
|
|
||||||
ArcanistGitAPI::GIT_MAGIC_ROOT_COMMIT,
|
|
||||||
$commit,
|
|
||||||
$drequest->getPath());
|
|
||||||
|
|
||||||
$this->configureFuture($future);
|
|
||||||
|
|
||||||
list($raw_diff) = $future->resolvex();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $raw_diff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,7 @@
|
||||||
|
|
||||||
final class DiffusionMercurialRawDiffQuery extends DiffusionRawDiffQuery {
|
final class DiffusionMercurialRawDiffQuery extends DiffusionRawDiffQuery {
|
||||||
|
|
||||||
protected function executeQuery() {
|
protected function newQueryFuture() {
|
||||||
return $this->executeRawDiffCommand();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function executeRawDiffCommand() {
|
|
||||||
$drequest = $this->getRequest();
|
$drequest = $this->getRequest();
|
||||||
$repository = $drequest->getRepository();
|
$repository = $drequest->getRepository();
|
||||||
|
|
||||||
|
@ -30,11 +26,7 @@ final class DiffusionMercurialRawDiffQuery extends DiffusionRawDiffQuery {
|
||||||
$commit,
|
$commit,
|
||||||
$path);
|
$path);
|
||||||
|
|
||||||
$this->configureFuture($future);
|
return $future;
|
||||||
|
|
||||||
list($raw_diff) = $future->resolvex();
|
|
||||||
|
|
||||||
return $raw_diff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,40 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
abstract class DiffusionRawDiffQuery extends DiffusionQuery {
|
abstract class DiffusionRawDiffQuery
|
||||||
|
extends DiffusionFileFutureQuery {
|
||||||
|
|
||||||
private $timeout;
|
|
||||||
private $linesOfContext = 65535;
|
private $linesOfContext = 65535;
|
||||||
private $anchorCommit;
|
private $anchorCommit;
|
||||||
private $againstCommit;
|
private $againstCommit;
|
||||||
private $byteLimit;
|
|
||||||
|
|
||||||
final public static function newFromDiffusionRequest(
|
final public static function newFromDiffusionRequest(
|
||||||
DiffusionRequest $request) {
|
DiffusionRequest $request) {
|
||||||
return parent::newQueryObject(__CLASS__, $request);
|
return parent::newQueryObject(__CLASS__, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
final public function loadRawDiff() {
|
|
||||||
return $this->executeQuery();
|
|
||||||
}
|
|
||||||
|
|
||||||
final public function setTimeout($timeout) {
|
|
||||||
$this->timeout = $timeout;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
final public function getTimeout() {
|
|
||||||
return $this->timeout;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setByteLimit($byte_limit) {
|
|
||||||
$this->byteLimit = $byte_limit;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getByteLimit() {
|
|
||||||
return $this->byteLimit;
|
|
||||||
}
|
|
||||||
|
|
||||||
final public function setLinesOfContext($lines_of_context) {
|
final public function setLinesOfContext($lines_of_context) {
|
||||||
$this->linesOfContext = $lines_of_context;
|
$this->linesOfContext = $lines_of_context;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -66,15 +43,4 @@ abstract class DiffusionRawDiffQuery extends DiffusionQuery {
|
||||||
return $this->getRequest()->getStableCommit();
|
return $this->getRequest()->getStableCommit();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function configureFuture(ExecFuture $future) {
|
|
||||||
if ($this->getTimeout()) {
|
|
||||||
$future->setTimeout($this->getTimeout());
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->getByteLimit()) {
|
|
||||||
$future->setStdoutSizeLimit($this->getByteLimit());
|
|
||||||
$future->setStderrSizeLimit($this->getByteLimit());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
final class DiffusionSvnRawDiffQuery extends DiffusionRawDiffQuery {
|
final class DiffusionSvnRawDiffQuery extends DiffusionRawDiffQuery {
|
||||||
|
|
||||||
protected function executeQuery() {
|
protected function newQueryFuture() {
|
||||||
$drequest = $this->getRequest();
|
$drequest = $this->getRequest();
|
||||||
$repository = $drequest->getRepository();
|
$repository = $drequest->getRepository();
|
||||||
|
|
||||||
|
@ -22,10 +22,7 @@ final class DiffusionSvnRawDiffQuery extends DiffusionRawDiffQuery {
|
||||||
$commit,
|
$commit,
|
||||||
$repository->getSubversionPathURI($drequest->getPath()));
|
$repository->getSubversionPathURI($drequest->getPath()));
|
||||||
|
|
||||||
$this->configureFuture($future);
|
return $future;
|
||||||
|
|
||||||
list($raw_diff) = $future->resolvex();
|
|
||||||
return $raw_diff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ final class DivinerPHPAtomizer extends DivinerAtomizer {
|
||||||
|
|
||||||
$docs = idx($metadata, 'param');
|
$docs = idx($metadata, 'param');
|
||||||
if ($docs) {
|
if ($docs) {
|
||||||
$docs = explode("\n", $docs);
|
$docs = (array)$docs;
|
||||||
$docs = array_filter($docs);
|
$docs = array_filter($docs);
|
||||||
} else {
|
} else {
|
||||||
$docs = array();
|
$docs = array();
|
||||||
|
@ -283,6 +283,15 @@ final class DivinerPHPAtomizer extends DivinerAtomizer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$return = (array)$return;
|
||||||
|
if (count($return) > 1) {
|
||||||
|
$atom->addWarning(
|
||||||
|
pht(
|
||||||
|
'Documentation specifies `%s` multiple times.',
|
||||||
|
'@return'));
|
||||||
|
}
|
||||||
|
$return = head($return);
|
||||||
|
|
||||||
if ($atom->getName() == '__construct' && $atom->getType() == 'method') {
|
if ($atom->getName() == '__construct' && $atom->getType() == 'method') {
|
||||||
$return_spec = array(
|
$return_spec = array(
|
||||||
'doctype' => 'this',
|
'doctype' => 'this',
|
||||||
|
|
|
@ -29,11 +29,8 @@ final class PhabricatorGuideApplication extends PhabricatorApplication {
|
||||||
public function getRoutes() {
|
public function getRoutes() {
|
||||||
return array(
|
return array(
|
||||||
'/guides/' => array(
|
'/guides/' => array(
|
||||||
'' => 'PhabricatorGuideWelcomeController',
|
'' => 'PhabricatorGuideModuleController',
|
||||||
'install/'
|
'(?P<module>[^/]+)/' => 'PhabricatorGuideModuleController',
|
||||||
=> 'PhabricatorGuideInstallController',
|
|
||||||
'quickstart/'
|
|
||||||
=> 'PhabricatorGuideQuickStartController',
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,11 @@ abstract class PhabricatorGuideController extends PhabricatorController {
|
||||||
$nav = new AphrontSideNavFilterView();
|
$nav = new AphrontSideNavFilterView();
|
||||||
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
||||||
$nav->addLabel(pht('Guides'));
|
$nav->addLabel(pht('Guides'));
|
||||||
$nav->addFilter('/', pht('Welcome'));
|
|
||||||
$nav->addFilter('install/', pht('Installation Guide'));
|
$modules = PhabricatorGuideModule::getAllModules();
|
||||||
$nav->addFilter('quickstart/', pht('Quick Start Guide'));
|
foreach ($modules as $key => $module) {
|
||||||
|
$nav->addFilter($key.'/', $module->getModuleName());
|
||||||
|
}
|
||||||
|
|
||||||
return $nav;
|
return $nav;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorGuideModuleController
|
||||||
|
extends PhabricatorGuideController {
|
||||||
|
|
||||||
|
public function handleRequest(AphrontRequest $request) {
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
$key = $request->getURIData('module');
|
||||||
|
|
||||||
|
if (!$key) {
|
||||||
|
$key = 'welcome';
|
||||||
|
}
|
||||||
|
$all_modules = PhabricatorGuideModule::getAllModules();
|
||||||
|
|
||||||
|
$nav = $this->buildSideNavView();
|
||||||
|
$nav->selectFilter($key.'/');
|
||||||
|
|
||||||
|
$module = $all_modules[$key];
|
||||||
|
$content = $module->renderModuleStatus($request);
|
||||||
|
$title = $module->getModuleName();
|
||||||
|
|
||||||
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
$crumbs->addTextCrumb($title);
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($title)
|
||||||
|
->setProfileHeader(true);
|
||||||
|
|
||||||
|
$view = id(new PHUICMSView())
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->setNavigation($nav)
|
||||||
|
->setHeader($header)
|
||||||
|
->setContent($content);
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->addClass('phui-cms-body')
|
||||||
|
->appendChild($view);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,53 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
final class PhabricatorGuideWelcomeController
|
|
||||||
extends PhabricatorGuideController {
|
|
||||||
|
|
||||||
public function shouldAllowPublic() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function handleRequest(AphrontRequest $request) {
|
|
||||||
require_celerity_resource('guides-app-css');
|
|
||||||
$viewer = $request->getViewer();
|
|
||||||
|
|
||||||
$title = pht('Welcome to Phabricator');
|
|
||||||
|
|
||||||
$nav = $this->buildSideNavView();
|
|
||||||
$nav->selectFilter('/');
|
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
|
||||||
->setHeader($title)
|
|
||||||
->setProfileHeader(true);
|
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs()
|
|
||||||
->addTextCrumb(pht('Welcome'));
|
|
||||||
|
|
||||||
$content = id(new PHUIDocumentViewPro())
|
|
||||||
->appendChild($this->getGuideContent($viewer));
|
|
||||||
|
|
||||||
$view = id(new PHUICMSView())
|
|
||||||
->setCrumbs($crumbs)
|
|
||||||
->setNavigation($nav)
|
|
||||||
->setHeader($header)
|
|
||||||
->setContent($content);
|
|
||||||
|
|
||||||
return $this->newPage()
|
|
||||||
->setTitle($title)
|
|
||||||
->addClass('phui-cms-body')
|
|
||||||
->appendChild($view);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getGuideContent($viewer) {
|
|
||||||
|
|
||||||
$content = pht(
|
|
||||||
'You have successfully installed Phabricator. These next guides will '.
|
|
||||||
'take you through configuration and new user orientation. '.
|
|
||||||
'These steps are optional, and you can go through them in any order. '.
|
|
||||||
'If you want to get back to this guide later on, you can find it in '.
|
|
||||||
'the **Config** application under **Welcome Guide**.');
|
|
||||||
|
|
||||||
return new PHUIRemarkupView($viewer, $content);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,44 +1,22 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PhabricatorGuideInstallController
|
final class PhabricatorGuideInstallModule extends PhabricatorGuideModule {
|
||||||
extends PhabricatorGuideController {
|
|
||||||
|
|
||||||
public function shouldAllowPublic() {
|
public function getModuleKey() {
|
||||||
return false;
|
return 'install';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleRequest(AphrontRequest $request) {
|
public function getModuleName() {
|
||||||
require_celerity_resource('guides-app-css');
|
return pht('Install Phabricator');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getModulePosition() {
|
||||||
|
return 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function renderModuleStatus(AphrontRequest $request) {
|
||||||
$viewer = $request->getViewer();
|
$viewer = $request->getViewer();
|
||||||
|
|
||||||
$title = pht('Installation Guide');
|
|
||||||
|
|
||||||
$nav = $this->buildSideNavView();
|
|
||||||
$nav->selectFilter('install/');
|
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
|
||||||
->setHeader($title)
|
|
||||||
->setProfileHeader(true);
|
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs()
|
|
||||||
->addTextCrumb(pht('Installation'));
|
|
||||||
|
|
||||||
$content = $this->getGuideContent($viewer);
|
|
||||||
|
|
||||||
$view = id(new PHUICMSView())
|
|
||||||
->setCrumbs($crumbs)
|
|
||||||
->setNavigation($nav)
|
|
||||||
->setHeader($header)
|
|
||||||
->setContent($content);
|
|
||||||
|
|
||||||
return $this->newPage()
|
|
||||||
->setTitle($title)
|
|
||||||
->addClass('phui-cms-body')
|
|
||||||
->appendChild($view);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getGuideContent($viewer) {
|
|
||||||
$guide_items = new PhabricatorGuideListView();
|
$guide_items = new PhabricatorGuideListView();
|
||||||
|
|
||||||
$title = pht('Resolve Setup Issues');
|
$title = pht('Resolve Setup Issues');
|
||||||
|
@ -192,5 +170,7 @@ final class PhabricatorGuideInstallController
|
||||||
$guide_items->addItem($item);
|
$guide_items->addItem($item);
|
||||||
|
|
||||||
return $guide_items;
|
return $guide_items;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
18
src/applications/guides/module/PhabricatorGuideModule.php
Normal file
18
src/applications/guides/module/PhabricatorGuideModule.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
abstract class PhabricatorGuideModule extends Phobject {
|
||||||
|
|
||||||
|
abstract public function getModuleKey();
|
||||||
|
abstract public function getModuleName();
|
||||||
|
abstract public function getModulePosition();
|
||||||
|
abstract public function renderModuleStatus(AphrontRequest $request);
|
||||||
|
|
||||||
|
final public static function getAllModules() {
|
||||||
|
return id(new PhutilClassMapQuery())
|
||||||
|
->setAncestorClass(__CLASS__)
|
||||||
|
->setUniqueMethod('getModuleKey')
|
||||||
|
->setSortMethod('getModulePosition')
|
||||||
|
->execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,44 +1,22 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PhabricatorGuideQuickStartController
|
final class PhabricatorGuideQuickStartModule extends PhabricatorGuideModule {
|
||||||
extends PhabricatorGuideController {
|
|
||||||
|
|
||||||
public function shouldAllowPublic() {
|
public function getModuleKey() {
|
||||||
return false;
|
return 'quickstart';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleRequest(AphrontRequest $request) {
|
public function getModuleName() {
|
||||||
require_celerity_resource('guides-app-css');
|
return pht('Quick Start');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getModulePosition() {
|
||||||
|
return 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function renderModuleStatus(AphrontRequest $request) {
|
||||||
$viewer = $request->getViewer();
|
$viewer = $request->getViewer();
|
||||||
|
|
||||||
$title = pht('Quick Start Guide');
|
|
||||||
|
|
||||||
$nav = $this->buildSideNavView();
|
|
||||||
$nav->selectFilter('quickstart/');
|
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
|
||||||
->setHeader($title)
|
|
||||||
->setProfileHeader(true);
|
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs()
|
|
||||||
->addTextCrumb(pht('Quick Start'));
|
|
||||||
|
|
||||||
$content = $this->getGuideContent($viewer);
|
|
||||||
|
|
||||||
$view = id(new PHUICMSView())
|
|
||||||
->setCrumbs($crumbs)
|
|
||||||
->setNavigation($nav)
|
|
||||||
->setHeader($header)
|
|
||||||
->setContent($content);
|
|
||||||
|
|
||||||
return $this->newPage()
|
|
||||||
->setTitle($title)
|
|
||||||
->addClass('phui-cms-body')
|
|
||||||
->appendChild($view);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getGuideContent($viewer) {
|
|
||||||
$guide_items = new PhabricatorGuideListView();
|
$guide_items = new PhabricatorGuideListView();
|
||||||
|
|
||||||
$title = pht('Configure Applications');
|
$title = pht('Configure Applications');
|
||||||
|
@ -206,5 +184,7 @@ final class PhabricatorGuideQuickStartController
|
||||||
$guide_items->addItem($item);
|
$guide_items->addItem($item);
|
||||||
|
|
||||||
return $guide_items;
|
return $guide_items;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorGuideWelcomeModule extends PhabricatorGuideModule {
|
||||||
|
|
||||||
|
public function getModuleKey() {
|
||||||
|
return 'welcome';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getModuleName() {
|
||||||
|
return pht('Welcome');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getModulePosition() {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function renderModuleStatus(AphrontRequest $request) {
|
||||||
|
$viewer = $request->getViewer();
|
||||||
|
|
||||||
|
$content = pht(
|
||||||
|
'You have successfully installed Phabricator. These next guides will '.
|
||||||
|
'take you through configuration and new user orientation. '.
|
||||||
|
'These steps are optional, and you can go through them in any order. '.
|
||||||
|
'If you want to get back to this guide later on, you can find it in '.
|
||||||
|
'the **Config** application under **Welcome Guide**.');
|
||||||
|
|
||||||
|
$content = new PHUIRemarkupView($viewer, $content);
|
||||||
|
|
||||||
|
return id(new PHUIDocumentViewPro())
|
||||||
|
->appendChild($content);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -10,10 +10,8 @@ final class PhabricatorGuideListView extends AphrontView {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
require_celerity_resource('guides-app-css');
|
|
||||||
|
|
||||||
$list = id(new PHUIObjectItemListView())
|
$list = id(new PHUIObjectItemListView())
|
||||||
->addClass('guides-app');
|
->setBig(true);
|
||||||
|
|
||||||
foreach ($this->items as $item) {
|
foreach ($this->items as $item) {
|
||||||
$icon = id(new PHUIIconView())
|
$icon = id(new PHUIIconView())
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
final class PhabricatorHarbormasterConfigOptions
|
|
||||||
extends PhabricatorApplicationConfigOptions {
|
|
||||||
|
|
||||||
public function getName() {
|
|
||||||
return pht('Harbormaster');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getDescription() {
|
|
||||||
return pht('Configure Harbormaster build engine.');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getIcon() {
|
|
||||||
return 'fa-ship';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getGroup() {
|
|
||||||
return 'apps';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getOptions() {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -446,11 +446,14 @@ final class HarbormasterBuildEngine extends Phobject {
|
||||||
if ($build->getBuildStatus() != HarbormasterBuildStatus::STATUS_PASSED) {
|
if ($build->getBuildStatus() != HarbormasterBuildStatus::STATUS_PASSED) {
|
||||||
$all_pass = false;
|
$all_pass = false;
|
||||||
}
|
}
|
||||||
$any_fail = in_array($build->getBuildStatus(), array(
|
if (in_array($build->getBuildStatus(), array(
|
||||||
HarbormasterBuildStatus::STATUS_FAILED,
|
HarbormasterBuildStatus::STATUS_FAILED,
|
||||||
HarbormasterBuildStatus::STATUS_ERROR,
|
HarbormasterBuildStatus::STATUS_ERROR,
|
||||||
HarbormasterBuildStatus::STATUS_DEADLOCKED,
|
HarbormasterBuildStatus::STATUS_DEADLOCKED,
|
||||||
));
|
))) {
|
||||||
|
|
||||||
|
$any_fail = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($any_fail) {
|
if ($any_fail) {
|
||||||
|
|
|
@ -0,0 +1,100 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class HarbormasterManagementRestartWorkflow
|
||||||
|
extends HarbormasterManagementWorkflow {
|
||||||
|
|
||||||
|
protected function didConstruct() {
|
||||||
|
$this
|
||||||
|
->setName('restart')
|
||||||
|
->setExamples(
|
||||||
|
"**restart** --active\n".
|
||||||
|
'**restart** --id id')
|
||||||
|
->setSynopsis(pht('Restart Harbormaster builds.'))
|
||||||
|
->setArguments(
|
||||||
|
array(
|
||||||
|
array(
|
||||||
|
'name' => 'id',
|
||||||
|
'param' => 'id',
|
||||||
|
'repeat' => true,
|
||||||
|
'help' => pht('Select one or more builds by ID.'),
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'active',
|
||||||
|
'help' => pht('Select all active builds.'),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function execute(PhutilArgumentParser $args) {
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
$ids = $args->getArg('id');
|
||||||
|
$active = $args->getArg('active');
|
||||||
|
|
||||||
|
if (!$ids && !$active) {
|
||||||
|
throw new PhutilArgumentUsageException(
|
||||||
|
pht('Use --id or --active to select builds.'));
|
||||||
|
} if ($ids && $active) {
|
||||||
|
throw new PhutilArgumentUsageException(
|
||||||
|
pht('Use one of --id or --active to select builds, but not both.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = id(new HarbormasterBuildQuery())
|
||||||
|
->setViewer($viewer);
|
||||||
|
if ($ids) {
|
||||||
|
$query->withIDs($ids);
|
||||||
|
} else {
|
||||||
|
$query->withBuildStatuses(
|
||||||
|
HarbormasterBuildStatus::getActiveStatusConstants());
|
||||||
|
}
|
||||||
|
$builds = $query->execute();
|
||||||
|
|
||||||
|
$console = PhutilConsole::getConsole();
|
||||||
|
$count = count($builds);
|
||||||
|
if (!$count) {
|
||||||
|
$console->writeOut("%s\n", pht('No builds to restart.'));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
$prompt = pht('Restart %s build(s)?', new PhutilNumber($count));
|
||||||
|
if (!phutil_console_confirm($prompt)) {
|
||||||
|
$console->writeOut("%s\n", pht('Cancelled.'));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$app_phid = id(new PhabricatorHarbormasterApplication())->getPHID();
|
||||||
|
$editor = id(new HarbormasterBuildTransactionEditor())
|
||||||
|
->setActor($viewer)
|
||||||
|
->setActingAsPHID($app_phid)
|
||||||
|
->setContentSource($this->newContentSource());
|
||||||
|
foreach ($builds as $build) {
|
||||||
|
$console->writeOut(
|
||||||
|
"<bg:blue> %s </bg> %s\n",
|
||||||
|
pht('RESTARTING'),
|
||||||
|
pht('Build %d: %s', $build->getID(), $build->getName()));
|
||||||
|
if (!$build->canRestartBuild()) {
|
||||||
|
$console->writeOut(
|
||||||
|
"<bg:yellow> %s </bg> %s\n",
|
||||||
|
pht('INVALID'),
|
||||||
|
pht('Cannot be restarted.'));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$xactions = array();
|
||||||
|
$xactions[] = id(new HarbormasterBuildTransaction())
|
||||||
|
->setTransactionType(HarbormasterBuildTransaction::TYPE_COMMAND)
|
||||||
|
->setNewValue(HarbormasterBuildCommand::COMMAND_RESTART);
|
||||||
|
try {
|
||||||
|
$editor->applyTransactions($build, $xactions);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$message = phutil_console_wrap($e->getMessage(), 2);
|
||||||
|
$console->writeOut(
|
||||||
|
"<bg:red> %s </bg>\n%s\n",
|
||||||
|
pht('FAILED'),
|
||||||
|
$message);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$console->writeOut("<bg:green> %s </bg>\n", pht('SUCCESS'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -202,6 +202,35 @@ final class PhabricatorHomeMainController extends PhabricatorHomeController {
|
||||||
$pager->setPageSize(40);
|
$pager->setPageSize(40);
|
||||||
$results = $engine->executeQuery($query, $pager);
|
$results = $engine->executeQuery($query, $pager);
|
||||||
$view = $engine->renderResults($results, $saved);
|
$view = $engine->renderResults($results, $saved);
|
||||||
|
// Low tech NUX.
|
||||||
|
if (!$results && ($viewer->getIsAdmin() == 1)) {
|
||||||
|
$instance = PhabricatorEnv::getEnvConfig('cluster.instance');
|
||||||
|
if (!$instance) {
|
||||||
|
$content = pht(<<<EOT
|
||||||
|
Welcome to Phabricator, here are some links to get you started:
|
||||||
|
- [[ /config/ | Configure Phabricator ]]
|
||||||
|
- [[ /config/welcome/ | Quick Start Guide ]]
|
||||||
|
- [[ /diffusion/ | Create a Repository ]]
|
||||||
|
- [[ /people/invite/send/ | Invite People ]]
|
||||||
|
- [[ https://twitter.com/phabricator/ | Follow us on Twitter ]]
|
||||||
|
EOT
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$content = pht(<<<EOT
|
||||||
|
Welcome to Phabricator, here are some links to get you started:
|
||||||
|
- [[ /config/welcome/ | Quick Start Guide ]]
|
||||||
|
- [[ /diffusion/ | Create a Repository ]]
|
||||||
|
- [[ https://twitter.com/phabricator/ | Follow us on Twitter ]]
|
||||||
|
EOT
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$welcome = new PHUIRemarkupView($viewer, $content);
|
||||||
|
|
||||||
|
$list = new PHUIObjectItemListView();
|
||||||
|
$view = new PhabricatorApplicationSearchResultView();
|
||||||
|
$view->setObjectList($list);
|
||||||
|
$view->setNoDataString($welcome);
|
||||||
|
}
|
||||||
|
|
||||||
$title = pht('Recent Activity');
|
$title = pht('Recent Activity');
|
||||||
$href = '/feed/';
|
$href = '/feed/';
|
||||||
|
|
|
@ -36,7 +36,6 @@ final class PhabricatorApplicationDatasource
|
||||||
->setPriorityString($application->getName())
|
->setPriorityString($application->getName())
|
||||||
->setDisplayName($application->getName())
|
->setDisplayName($application->getName())
|
||||||
->setDisplayType($application->getShortDescription())
|
->setDisplayType($application->getShortDescription())
|
||||||
->setImageuRI($application->getIconURI())
|
|
||||||
->setPriorityType('apps')
|
->setPriorityType('apps')
|
||||||
->setImageSprite('phabricator-search-icon '.$img)
|
->setImageSprite('phabricator-search-icon '.$img)
|
||||||
->setIcon($application->getIcon())
|
->setIcon($application->getIcon())
|
||||||
|
|
|
@ -109,14 +109,9 @@ final class PhabricatorApplicationLaunchView extends AphrontTagView {
|
||||||
$classes = array();
|
$classes = array();
|
||||||
$classes[] = 'phabricator-application-launch-icon';
|
$classes[] = 'phabricator-application-launch-icon';
|
||||||
$styles = array();
|
$styles = array();
|
||||||
|
|
||||||
if ($application->getIconURI()) {
|
|
||||||
$styles[] = 'background-image: url('.$application->getIconURI().')';
|
|
||||||
} else {
|
|
||||||
$classes[] = $application->getIcon();
|
$classes[] = $application->getIcon();
|
||||||
$classes[] = 'phui-icon-view';
|
$classes[] = 'phui-icon-view';
|
||||||
$classes[] = 'phui-font-fa';
|
$classes[] = 'phui-font-fa';
|
||||||
}
|
|
||||||
|
|
||||||
$icon = phutil_tag(
|
$icon = phutil_tag(
|
||||||
'span',
|
'span',
|
||||||
|
|
|
@ -16,21 +16,21 @@ final class NuanceConsoleController extends NuanceController {
|
||||||
id(new PHUIObjectItemView())
|
id(new PHUIObjectItemView())
|
||||||
->setHeader(pht('Queues'))
|
->setHeader(pht('Queues'))
|
||||||
->setHref($this->getApplicationURI('queue/'))
|
->setHref($this->getApplicationURI('queue/'))
|
||||||
->setIcon('fa-align-left')
|
->setImageIcon('fa-align-left')
|
||||||
->addAttribute(pht('Manage Nuance queues.')));
|
->addAttribute(pht('Manage Nuance queues.')));
|
||||||
|
|
||||||
$menu->addItem(
|
$menu->addItem(
|
||||||
id(new PHUIObjectItemView())
|
id(new PHUIObjectItemView())
|
||||||
->setHeader(pht('Sources'))
|
->setHeader(pht('Sources'))
|
||||||
->setHref($this->getApplicationURI('source/'))
|
->setHref($this->getApplicationURI('source/'))
|
||||||
->setIcon('fa-filter')
|
->setImageIcon('fa-filter')
|
||||||
->addAttribute(pht('Manage Nuance sources.')));
|
->addAttribute(pht('Manage Nuance sources.')));
|
||||||
|
|
||||||
$menu->addItem(
|
$menu->addItem(
|
||||||
id(new PHUIObjectItemView())
|
id(new PHUIObjectItemView())
|
||||||
->setHeader(pht('Items'))
|
->setHeader(pht('Items'))
|
||||||
->setHref($this->getApplicationURI('item/'))
|
->setHref($this->getApplicationURI('item/'))
|
||||||
->setIcon('fa-clone')
|
->setImageIcon('fa-clone')
|
||||||
->addAttribute(pht('Manage Nuance items.')));
|
->addAttribute(pht('Manage Nuance items.')));
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
|
|
@ -88,7 +88,7 @@ final class PhabricatorOwnersPath extends PhabricatorOwnersDAO {
|
||||||
$self_count = count($self_fragments);
|
$self_count = count($self_fragments);
|
||||||
$path_count = count($path_fragments);
|
$path_count = count($path_fragments);
|
||||||
if ($self_count > $path_count) {
|
if ($self_count > $path_count) {
|
||||||
// If this path is longer (and therefor more specific) than the target
|
// If this path is longer (and therefore more specific) than the target
|
||||||
// path, we don't match it at all.
|
// path, we don't match it at all.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,10 +63,6 @@ final class PhabricatorPasteEditEngine
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function buildCustomEditFields($object) {
|
protected function buildCustomEditFields($object) {
|
||||||
$langs = array(
|
|
||||||
'' => pht('(Detect From Filename in Title)'),
|
|
||||||
) + PhabricatorEnv::getEnvConfig('pygments.dropdown-choices');
|
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
id(new PhabricatorTextEditField())
|
id(new PhabricatorTextEditField())
|
||||||
->setKey('title')
|
->setKey('title')
|
||||||
|
@ -76,14 +72,14 @@ final class PhabricatorPasteEditEngine
|
||||||
->setConduitDescription(pht('Retitle the paste.'))
|
->setConduitDescription(pht('Retitle the paste.'))
|
||||||
->setConduitTypeDescription(pht('New paste title.'))
|
->setConduitTypeDescription(pht('New paste title.'))
|
||||||
->setValue($object->getTitle()),
|
->setValue($object->getTitle()),
|
||||||
id(new PhabricatorSelectEditField())
|
id(new PhabricatorDatasourceEditField())
|
||||||
->setKey('language')
|
->setKey('language')
|
||||||
->setLabel(pht('Language'))
|
->setLabel(pht('Language'))
|
||||||
->setTransactionType(
|
->setTransactionType(
|
||||||
PhabricatorPasteLanguageTransaction::TRANSACTIONTYPE)
|
PhabricatorPasteLanguageTransaction::TRANSACTIONTYPE)
|
||||||
->setAliases(array('lang'))
|
->setAliases(array('lang'))
|
||||||
->setIsCopyable(true)
|
->setIsCopyable(true)
|
||||||
->setOptions($langs)
|
->setDatasource(new PasteLanguageSelectDatasource())
|
||||||
->setDescription(
|
->setDescription(
|
||||||
pht(
|
pht(
|
||||||
'Language used for syntax highlighting. By default, inferred '.
|
'Language used for syntax highlighting. By default, inferred '.
|
||||||
|
@ -91,7 +87,7 @@ final class PhabricatorPasteEditEngine
|
||||||
->setConduitDescription(
|
->setConduitDescription(
|
||||||
pht('Change language used for syntax highlighting.'))
|
pht('Change language used for syntax highlighting.'))
|
||||||
->setConduitTypeDescription(pht('New highlighting language.'))
|
->setConduitTypeDescription(pht('New highlighting language.'))
|
||||||
->setValue($object->getLanguage()),
|
->setSingleValue($object->getLanguage()),
|
||||||
id(new PhabricatorTextAreaEditField())
|
id(new PhabricatorTextAreaEditField())
|
||||||
->setKey('text')
|
->setKey('text')
|
||||||
->setLabel(pht('Text'))
|
->setLabel(pht('Text'))
|
||||||
|
|
|
@ -173,6 +173,7 @@ final class PhabricatorPasteQuery
|
||||||
'P'.$paste->getID(),
|
'P'.$paste->getID(),
|
||||||
$paste->getFilePHID(),
|
$paste->getFilePHID(),
|
||||||
$paste->getLanguage(),
|
$paste->getLanguage(),
|
||||||
|
PhabricatorHash::digestForIndex($paste->getTitle()),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,6 +185,7 @@ final class PhabricatorPasteQuery
|
||||||
$paste->getFilePHID(),
|
$paste->getFilePHID(),
|
||||||
$paste->getLanguage(),
|
$paste->getLanguage(),
|
||||||
'snippet',
|
'snippet',
|
||||||
|
PhabricatorHash::digestForIndex($paste->getTitle()),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ final class PhabricatorPaste extends PhabricatorPasteDAO
|
||||||
|
|
||||||
return id(new PhabricatorPaste())
|
return id(new PhabricatorPaste())
|
||||||
->setTitle('')
|
->setTitle('')
|
||||||
->setLanguage('')
|
|
||||||
->setStatus(self::STATUS_ACTIVE)
|
->setStatus(self::STATUS_ACTIVE)
|
||||||
->setAuthorPHID($actor->getPHID())
|
->setAuthorPHID($actor->getPHID())
|
||||||
->setViewPolicy($view_policy)
|
->setViewPolicy($view_policy)
|
||||||
|
@ -72,7 +71,7 @@ final class PhabricatorPaste extends PhabricatorPasteDAO
|
||||||
self::CONFIG_COLUMN_SCHEMA => array(
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
'status' => 'text32',
|
'status' => 'text32',
|
||||||
'title' => 'text255',
|
'title' => 'text255',
|
||||||
'language' => 'text64',
|
'language' => 'text64?',
|
||||||
'mailKey' => 'bytes20',
|
'mailKey' => 'bytes20',
|
||||||
'parentPHID' => 'phid?',
|
'parentPHID' => 'phid?',
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PasteLanguageSelectDatasource
|
||||||
|
extends PhabricatorTypeaheadDatasource {
|
||||||
|
|
||||||
|
public function getBrowseTitle() {
|
||||||
|
return pht('Browse Languages');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPlaceholderText() {
|
||||||
|
return pht('Type a language name or leave blank to auto-detect...');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDatasourceApplicationClass() {
|
||||||
|
return 'PhabricatorPasteApplication';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function loadResults() {
|
||||||
|
$results = $this->buildResults();
|
||||||
|
return $this->filterResultsAgainstTokens($results);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected function renderSpecialTokens(array $values) {
|
||||||
|
return $this->renderTokensFromResults($this->buildResults(), $values);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function buildResults() {
|
||||||
|
$results = array();
|
||||||
|
$languages = PhabricatorEnv::getEnvConfig('pygments.dropdown-choices');
|
||||||
|
|
||||||
|
foreach ($languages as $value => $name) {
|
||||||
|
$result = id(new PhabricatorTypeaheadResult())
|
||||||
|
->setPHID($value)
|
||||||
|
->setName($name);
|
||||||
|
|
||||||
|
$results[$value] = $result;
|
||||||
|
}
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -13,12 +13,20 @@ final class PhabricatorPasteLanguageTransaction
|
||||||
$object->setLanguage($value);
|
$object->setLanguage($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function renderLanguageValue($value) {
|
||||||
|
if (!strlen($value)) {
|
||||||
|
return $this->renderValue(pht('autodetect'));
|
||||||
|
} else {
|
||||||
|
return $this->renderValue($value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
return pht(
|
return pht(
|
||||||
"%s updated the paste's language from %s to %s.",
|
"%s updated the paste's language from %s to %s.",
|
||||||
$this->renderAuthor(),
|
$this->renderAuthor(),
|
||||||
$this->renderOldValue(),
|
$this->renderLanguageValue($this->getOldValue()),
|
||||||
$this->renderNewValue());
|
$this->renderLanguageValue($this->getNewValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitleForFeed() {
|
public function getTitleForFeed() {
|
||||||
|
@ -26,8 +34,8 @@ final class PhabricatorPasteLanguageTransaction
|
||||||
'%s updated the language for %s from %s to %s.',
|
'%s updated the language for %s from %s to %s.',
|
||||||
$this->renderAuthor(),
|
$this->renderAuthor(),
|
||||||
$this->renderObject(),
|
$this->renderObject(),
|
||||||
$this->renderOldValue(),
|
$this->renderLanguageValue($this->getOldValue()),
|
||||||
$this->renderNewValue());
|
$this->renderLanguageValue($this->getNewValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PhortunePaymentProviderConfig extends PhortuneDAO
|
final class PhortunePaymentProviderConfig extends PhortuneDAO
|
||||||
implements PhabricatorPolicyInterface {
|
implements
|
||||||
|
PhabricatorPolicyInterface,
|
||||||
|
PhabricatorApplicationTransactionInterface {
|
||||||
|
|
||||||
protected $merchantPHID;
|
protected $merchantPHID;
|
||||||
protected $providerClassKey;
|
protected $providerClassKey;
|
||||||
|
@ -96,4 +98,27 @@ final class PhortunePaymentProviderConfig extends PhortuneDAO
|
||||||
return pht('Providers have the policies of their merchant.');
|
return pht('Providers have the policies of their merchant.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -( PhabricatorApplicationTransactionInterface )------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
public function getApplicationTransactionEditor() {
|
||||||
|
return new PhortunePaymentProviderConfigEditor();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getApplicationTransactionObject() {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getApplicationTransactionTemplate() {
|
||||||
|
return new PhortunePaymentProviderConfigTransaction();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function willRenderTimeline(
|
||||||
|
PhabricatorApplicationTransactionView $timeline,
|
||||||
|
AphrontRequest $request) {
|
||||||
|
|
||||||
|
return $timeline;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
final class PhabricatorPhrequentConfigOptions
|
|
||||||
extends PhabricatorApplicationConfigOptions {
|
|
||||||
|
|
||||||
public function getName() {
|
|
||||||
return pht('Phrequent');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getDescription() {
|
|
||||||
return pht('Configure Phrequent.');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getIcon() {
|
|
||||||
return 'fa-clock-o';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getGroup() {
|
|
||||||
return 'apps';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getOptions() {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -86,7 +86,7 @@ final class PhabricatorPhurlURLViewController
|
||||||
->setTag('a')
|
->setTag('a')
|
||||||
->setText(pht('Visit URL'))
|
->setText(pht('Visit URL'))
|
||||||
->setIcon('fa-external-link')
|
->setIcon('fa-external-link')
|
||||||
->setHref("u/{$id}")
|
->setHref($url->getRedirectURI())
|
||||||
->setDisabled(!$url->isValid());
|
->setDisabled(!$url->isValid());
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
|
@ -129,6 +129,10 @@ final class PhabricatorPhurlURLViewController
|
||||||
$properties = id(new PHUIPropertyListView())
|
$properties = id(new PHUIPropertyListView())
|
||||||
->setUser($viewer);
|
->setUser($viewer);
|
||||||
|
|
||||||
|
$properties->addProperty(
|
||||||
|
pht('Short URL'),
|
||||||
|
$url->getRedirectURI());
|
||||||
|
|
||||||
$properties->addProperty(
|
$properties->addProperty(
|
||||||
pht('Original URL'),
|
pht('Original URL'),
|
||||||
$url->getLongURL());
|
$url->getLongURL());
|
||||||
|
|
|
@ -99,10 +99,18 @@ final class PhabricatorPhurlURL extends PhabricatorPhurlDAO
|
||||||
|
|
||||||
public function getRedirectURI() {
|
public function getRedirectURI() {
|
||||||
if (strlen($this->getAlias())) {
|
if (strlen($this->getAlias())) {
|
||||||
return '/u/'.$this->getAlias();
|
$path = '/u/'.$this->getAlias();
|
||||||
} else {
|
} else {
|
||||||
return '/u/'.$this->getID();
|
$path = '/u/'.$this->getID();
|
||||||
}
|
}
|
||||||
|
$short_domain = PhabricatorEnv::getEnvConfig('phurl.short-uri');
|
||||||
|
if (!$short_domain) {
|
||||||
|
return $path;
|
||||||
|
}
|
||||||
|
|
||||||
|
$uri = new PhutilURI($short_domain);
|
||||||
|
$uri->setPath($path);
|
||||||
|
return (string)$uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||||
|
|
|
@ -40,4 +40,15 @@ final class PhabricatorRepositoryStatusMessage
|
||||||
return idx($this->parameters, $key, $default);
|
return idx($this->parameters, $key, $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getStatusTypeName() {
|
||||||
|
$names = array(
|
||||||
|
self::TYPE_INIT => pht('Error While Initializing Repository'),
|
||||||
|
self::TYPE_FETCH => pht('Error While Fetching Changes'),
|
||||||
|
self::TYPE_NEEDS_UPDATE => pht('Repository Needs Update'),
|
||||||
|
);
|
||||||
|
|
||||||
|
$type = $this->getStatusType();
|
||||||
|
return idx($names, $type, $type);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,40 +105,64 @@ final class PhabricatorRepositoryCommitHeraldWorker
|
||||||
private function loadRawPatchText(
|
private function loadRawPatchText(
|
||||||
PhabricatorRepository $repository,
|
PhabricatorRepository $repository,
|
||||||
PhabricatorRepositoryCommit $commit) {
|
PhabricatorRepositoryCommit $commit) {
|
||||||
|
$viewer = PhabricatorUser::getOmnipotentUser();
|
||||||
|
|
||||||
|
$identifier = $commit->getCommitIdentifier();
|
||||||
|
|
||||||
$drequest = DiffusionRequest::newFromDictionary(
|
$drequest = DiffusionRequest::newFromDictionary(
|
||||||
array(
|
array(
|
||||||
'user' => PhabricatorUser::getOmnipotentUser(),
|
'user' => $viewer,
|
||||||
'repository' => $repository,
|
'repository' => $repository,
|
||||||
'commit' => $commit->getCommitIdentifier(),
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$raw_query = DiffusionRawDiffQuery::newFromDiffusionRequest($drequest);
|
|
||||||
$raw_query->setLinesOfContext(3);
|
|
||||||
|
|
||||||
$time_key = 'metamta.diffusion.time-limit';
|
$time_key = 'metamta.diffusion.time-limit';
|
||||||
$byte_key = 'metamta.diffusion.byte-limit';
|
$byte_key = 'metamta.diffusion.byte-limit';
|
||||||
$time_limit = PhabricatorEnv::getEnvConfig($time_key);
|
$time_limit = PhabricatorEnv::getEnvConfig($time_key);
|
||||||
$byte_limit = PhabricatorEnv::getEnvConfig($byte_key);
|
$byte_limit = PhabricatorEnv::getEnvConfig($byte_key);
|
||||||
|
|
||||||
if ($time_limit) {
|
$diff_info = DiffusionQuery::callConduitWithDiffusionRequest(
|
||||||
$raw_query->setTimeout($time_limit);
|
$viewer,
|
||||||
|
$drequest,
|
||||||
|
'diffusion.rawdiffquery',
|
||||||
|
array(
|
||||||
|
'commit' => $identifier,
|
||||||
|
'linesOfContext' => 3,
|
||||||
|
'timeout' => $time_limit,
|
||||||
|
'byteLimit' => $byte_limit,
|
||||||
|
));
|
||||||
|
|
||||||
|
if ($diff_info['tooSlow']) {
|
||||||
|
throw new Exception(
|
||||||
|
pht(
|
||||||
|
'Patch generation took longer than configured limit ("%s") of '.
|
||||||
|
'%s second(s).',
|
||||||
|
$time_key,
|
||||||
|
new PhutilNumber($time_limit)));
|
||||||
}
|
}
|
||||||
|
|
||||||
$raw_diff = $raw_query->loadRawDiff();
|
if ($diff_info['tooHuge']) {
|
||||||
|
|
||||||
$size = strlen($raw_diff);
|
|
||||||
if ($byte_limit && $size > $byte_limit) {
|
|
||||||
$pretty_size = phutil_format_bytes($size);
|
|
||||||
$pretty_limit = phutil_format_bytes($byte_limit);
|
$pretty_limit = phutil_format_bytes($byte_limit);
|
||||||
throw new Exception(pht(
|
throw new Exception(
|
||||||
'Patch size of %s exceeds configured byte size limit (%s) of %s.',
|
pht(
|
||||||
$pretty_size,
|
'Patch size exceeds configured byte size limit ("%s") of %s.',
|
||||||
$byte_key,
|
$byte_key,
|
||||||
$pretty_limit));
|
$pretty_limit));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $raw_diff;
|
$file_phid = $diff_info['filePHID'];
|
||||||
|
$file = id(new PhabricatorFileQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withPHIDs(array($file_phid))
|
||||||
|
->executeOne();
|
||||||
|
if (!$file) {
|
||||||
|
throw new Exception(
|
||||||
|
pht(
|
||||||
|
'Failed to load file ("%s") returned by "%s".',
|
||||||
|
$file_phid,
|
||||||
|
'diffusion.rawdiffquery'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $file->loadFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ final class PhabricatorHovercardEngineExtensionModule
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Order'),
|
pht('Order'),
|
||||||
|
@ -46,11 +46,6 @@ final class PhabricatorHovercardEngineExtensionModule
|
||||||
'wide pri',
|
'wide pri',
|
||||||
null,
|
null,
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('HovercardEngine Extensions'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ final class PhabricatorSearchEngineExtensionModule
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Order'),
|
pht('Order'),
|
||||||
|
@ -46,11 +46,6 @@ final class PhabricatorSearchEngineExtensionModule
|
||||||
'wide pri',
|
'wide pri',
|
||||||
null,
|
null,
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('SearchEngine Extensions'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ final class PhabricatorFulltextEngineExtensionModule
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Class'),
|
pht('Class'),
|
||||||
|
@ -36,10 +36,6 @@ final class PhabricatorFulltextEngineExtensionModule
|
||||||
'wide pri',
|
'wide pri',
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('FulltextEngine Extensions'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ final class PhabricatorIndexEngineExtensionModule
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Class'),
|
pht('Class'),
|
||||||
|
@ -36,10 +36,6 @@ final class PhabricatorIndexEngineExtensionModule
|
||||||
'wide pri',
|
'wide pri',
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('IndexEngine Extensions'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ final class PhabricatorDestructionEngineExtensionModule
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Class'),
|
pht('Class'),
|
||||||
|
@ -36,10 +36,6 @@ final class PhabricatorDestructionEngineExtensionModule
|
||||||
'wide pri',
|
'wide pri',
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('DestructionEngine Extensions'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ final class PhabricatorEditEngineExtensionModule
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Priority'),
|
pht('Priority'),
|
||||||
|
@ -44,10 +44,6 @@ final class PhabricatorEditEngineExtensionModule
|
||||||
null,
|
null,
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('EditEngine Extensions'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,4 +149,8 @@ abstract class PhabricatorModularTransaction
|
||||||
return parent::renderChangeDetails($viewer);
|
return parent::renderChangeDetails($viewer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final protected function newRemarkupChanges() {
|
||||||
|
return $this->getTransactionImplementation()->newRemarkupChanges();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,10 @@ abstract class PhabricatorModularTransactionType
|
||||||
throw new PhutilMethodNotImplementedException();
|
throw new PhutilMethodNotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function newRemarkupChanges() {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
final public function setStorage(
|
final public function setStorage(
|
||||||
PhabricatorApplicationTransaction $xaction) {
|
PhabricatorApplicationTransaction $xaction) {
|
||||||
$this->storage = $xaction;
|
$this->storage = $xaction;
|
||||||
|
@ -253,4 +257,9 @@ abstract class PhabricatorModularTransactionType
|
||||||
return ($target == PhabricatorApplicationTransaction::TARGET_TEXT);
|
return ($target == PhabricatorApplicationTransaction::TARGET_TEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final protected function newRemarkupChange() {
|
||||||
|
return id(new PhabricatorTransactionRemarkupChange())
|
||||||
|
->setTransaction($this->getStorage());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,7 @@ $ ./bin/repository clusterize <repository> --service <service>
|
||||||
To migrate a repository back off a service, use this command:
|
To migrate a repository back off a service, use this command:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ ./bin/repoistory clusterize <repository> --remove-service
|
$ ./bin/repository clusterize <repository> --remove-service
|
||||||
```
|
```
|
||||||
|
|
||||||
This command only changes how Phabricator connects to the repository; it does
|
This command only changes how Phabricator connects to the repository; it does
|
||||||
|
|
|
@ -88,7 +88,7 @@ with {nav Add Build Step}.
|
||||||
|
|
||||||
Currently, the only useful type of build step is "Make HTTP Request", which you
|
Currently, the only useful type of build step is "Make HTTP Request", which you
|
||||||
can use to make a call to an external build system like Jenkins. Today, most
|
can use to make a call to an external build system like Jenkins. Today, most
|
||||||
plans should therefor look something like this:
|
plans should therefore look something like this:
|
||||||
|
|
||||||
- Use a "Make HTTP Request" step to tell Jenkins or some other similar
|
- Use a "Make HTTP Request" step to tell Jenkins or some other similar
|
||||||
external build system about the code.
|
external build system about the code.
|
||||||
|
|
|
@ -405,6 +405,12 @@ final class PhabricatorDatabaseRef
|
||||||
try {
|
try {
|
||||||
$connection->openConnection();
|
$connection->openConnection();
|
||||||
$reachable = true;
|
$reachable = true;
|
||||||
|
} catch (AphrontSchemaQueryException $ex) {
|
||||||
|
// We get one of these if the database we're trying to select does not
|
||||||
|
// exist. In this case, just re-throw the exception. This is expected
|
||||||
|
// during first-time setup, when databases like "config" will not exist
|
||||||
|
// yet.
|
||||||
|
throw $ex;
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
$reachable = false;
|
$reachable = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ final class PhabricatorContentSourceModule
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = id(new AphrontTableView($rows))
|
return id(new AphrontTableView($rows))
|
||||||
->setHeaders(
|
->setHeaders(
|
||||||
array(
|
array(
|
||||||
pht('Key'),
|
pht('Key'),
|
||||||
|
@ -43,10 +43,6 @@ final class PhabricatorContentSourceModule
|
||||||
'wide',
|
'wide',
|
||||||
));
|
));
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
|
||||||
->setHeaderText(pht('Content Sources'))
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->setTable($table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue