Tao Zhou | 4fd32d5 | 2020-04-06 17:23:10 +0200 | [diff] [blame] | 1 | /** |
| 2 | * @license |
| 3 | * Copyright (C) 2020 The Android Open Source Project |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | /** |
Tao Zhou | 4fd32d5 | 2020-04-06 17:23:10 +0200 | [diff] [blame] | 19 | * @desc Tab names for primary tabs on change view page. |
| 20 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 21 | export enum PrimaryTab { |
| 22 | FILES = 'files', |
Gal Paikin | e6d6e1d | 2020-05-07 18:31:22 +0200 | [diff] [blame] | 23 | /** |
| 24 | * When renaming this, the links in UrlFormatter must be updated. |
| 25 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 26 | COMMENT_THREADS = 'comments', |
| 27 | FINDINGS = 'findings', |
| 28 | } |
Tao Zhou | 4fd32d5 | 2020-04-06 17:23:10 +0200 | [diff] [blame] | 29 | |
| 30 | /** |
Tao Zhou | 4fd32d5 | 2020-04-06 17:23:10 +0200 | [diff] [blame] | 31 | * @desc Tab names for secondary tabs on change view page. |
| 32 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 33 | export enum SecondaryTab { |
| 34 | CHANGE_LOG = '_changeLog', |
| 35 | } |
Tao Zhou | 4fd32d5 | 2020-04-06 17:23:10 +0200 | [diff] [blame] | 36 | |
Tao Zhou | 0ae7596 | 2020-04-27 14:34:10 +0200 | [diff] [blame] | 37 | /** |
Tao Zhou | 0ae7596 | 2020-04-27 14:34:10 +0200 | [diff] [blame] | 38 | * @desc Tag names of change log messages. |
| 39 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 40 | export enum MessageTag { |
| 41 | TAG_DELETE_REVIEWER = 'autogenerated:gerrit:deleteReviewer', |
| 42 | TAG_NEW_PATCHSET = 'autogenerated:gerrit:newPatchSet', |
| 43 | TAG_NEW_WIP_PATCHSET = 'autogenerated:gerrit:newWipPatchSet', |
| 44 | TAG_REVIEWER_UPDATE = 'autogenerated:gerrit:reviewerUpdate', |
| 45 | TAG_SET_PRIVATE = 'autogenerated:gerrit:setPrivate', |
| 46 | TAG_UNSET_PRIVATE = 'autogenerated:gerrit:unsetPrivate', |
| 47 | TAG_SET_READY = 'autogenerated:gerrit:setReadyForReview', |
| 48 | TAG_SET_WIP = 'autogenerated:gerrit:setWorkInProgress', |
| 49 | TAG_SET_ASSIGNEE = 'autogenerated:gerrit:setAssignee', |
| 50 | TAG_UNSET_ASSIGNEE = 'autogenerated:gerrit:deleteAssignee', |
| 51 | } |
Dhruv Srivastava | 9c853fc | 2020-05-05 13:48:25 +0200 | [diff] [blame] | 52 | |
| 53 | /** |
Dhruv Srivastava | 9c853fc | 2020-05-05 13:48:25 +0200 | [diff] [blame] | 54 | * @desc Modes for gr-diff-cursor |
| 55 | * The scroll behavior for the cursor. Values are 'never' and |
| 56 | * 'keep-visible'. 'keep-visible' will only scroll if the cursor is beyond |
| 57 | * the viewport. |
| 58 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 59 | export enum ScrollMode { |
| 60 | KEEP_VISIBLE = 'keep-visible', |
| 61 | NEVER = 'never', |
| 62 | } |
Dmitrii Filippov | 4e4522e | 2020-05-06 12:50:49 +0200 | [diff] [blame] | 63 | |
| 64 | /** |
Dmitrii Filippov | 4e4522e | 2020-05-06 12:50:49 +0200 | [diff] [blame] | 65 | * @desc Specifies status for a change |
| 66 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 67 | export enum ChangeStatus { |
| 68 | ABANDONED = 'ABANDONED', |
| 69 | MERGED = 'MERGED', |
| 70 | NEW = 'NEW', |
| 71 | } |
Dhruv Srivastava | dc6739b | 2020-05-06 17:24:31 +0200 | [diff] [blame] | 72 | |
| 73 | /** |
Dhruv Srivastava | dc6739b | 2020-05-06 17:24:31 +0200 | [diff] [blame] | 74 | * @desc Special file paths |
| 75 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 76 | export enum SpecialFilePath { |
| 77 | PATCHSET_LEVEL_COMMENTS = '/PATCHSET_LEVEL', |
| 78 | COMMIT_MESSAGE = '/COMMIT_MSG', |
| 79 | MERGE_LIST = '/MERGE_LIST', |
| 80 | } |
Dmitrii Filippov | bfbd275 | 2020-07-28 14:51:25 +0200 | [diff] [blame] | 81 | |
| 82 | /** |
| 83 | * @desc The reviewer state |
| 84 | */ |
| 85 | export enum RequirementStatus { |
| 86 | OK = 'OK', |
| 87 | NOT_READY = 'NOT_READY', |
| 88 | RULE_ERROR = 'RULE_ERROR', |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * @desc The reviewer state |
| 93 | */ |
| 94 | export enum ReviewerState { |
| 95 | REVIEWER = 'REVIEWER', |
| 96 | CC = 'CC', |
| 97 | REMOVED = 'REMOVED', |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * @desc The patchset kind |
| 102 | */ |
| 103 | export enum RevisionKind { |
| 104 | REWORK = 'REWORK', |
| 105 | TRIVIAL_REBASE = 'TRIVIAL_REBASE', |
| 106 | MERGE_FIRST_PARENT_UPDATE = 'MERGE_FIRST_PARENT_UPDATE', |
| 107 | NO_CODE_CHANGE = 'NO_CODE_CHANGE', |
| 108 | NO_CHANGE = 'NO_CHANGE', |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * @desc The status of fixing the problem |
| 113 | */ |
| 114 | export enum ProblemInfoStatus { |
| 115 | FIXED = 'FIXED', |
| 116 | FIX_FAILED = 'FIX_FAILED', |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * @desc The status of the file |
| 121 | */ |
| 122 | export enum FileInfoStatus { |
| 123 | ADDED = 'A', |
| 124 | DELETED = 'D', |
| 125 | RENAMED = 'R', |
| 126 | COPIED = 'C', |
| 127 | REWRITTEN = 'W', |
Tao Zhou | 7a51422 | 2020-08-03 15:21:07 +0200 | [diff] [blame] | 128 | // Modifed = 'M', // but API not set it if the file was modified |
| 129 | UNMODIFIED = 'U', // Not returned by BE, but added by UI for certain files |
Dmitrii Filippov | bfbd275 | 2020-07-28 14:51:25 +0200 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | /** |
| 133 | * @desc The status of the file |
| 134 | */ |
| 135 | export enum GpgKeyInfoStatus { |
| 136 | BAD = 'BAD', |
| 137 | OK = 'OK', |
| 138 | TRUSTED = 'TRUSTED', |
| 139 | } |
Ben Rohlfs | ee775eb | 2020-07-31 16:10:15 +0200 | [diff] [blame] | 140 | |
| 141 | /** |
| 142 | * @desc Used for server config of accounts |
| 143 | */ |
| 144 | export enum DefaultDisplayNameConfig { |
| 145 | USERNAME = 'USERNAME', |
| 146 | FIRST_NAME = 'FIRST_NAME', |
| 147 | FULL_NAME = 'FULL_NAME', |
| 148 | } |
Dmitrii Filippov | ec5d946 | 2020-08-04 15:33:20 +0200 | [diff] [blame] | 149 | |
| 150 | /** |
| 151 | * @desc The state of the projects |
| 152 | */ |
| 153 | export enum ProjectState { |
| 154 | ACTIVE = 'ACTIVE', |
| 155 | READ_ONLY = 'READ_ONLY', |
| 156 | HIDDEN = 'HIDDEN', |
| 157 | } |
Ben Rohlfs | 5f02faa | 2020-08-06 11:02:31 +0200 | [diff] [blame] | 158 | |
| 159 | export enum Side { |
| 160 | LEFT = 'left', |
| 161 | RIGHT = 'right', |
| 162 | } |