|
15 | 15 | */ |
16 | 16 | import { MBeanMetricsChartCard } from '@app/Dashboard/Charts/mbean/MBeanMetricsChartCard'; |
17 | 17 | import { CryostatLink } from '@app/Shared/Components/CryostatLink'; |
| 18 | +import { FeatureFlag } from '@app/Shared/Components/FeatureFlag'; |
18 | 19 | import { NotificationCategory } from '@app/Shared/Services/api.types'; |
19 | 20 | import { NotificationsContext } from '@app/Shared/Services/Notifications.service'; |
| 21 | +import { FeatureLevel } from '@app/Shared/Services/service.types'; |
20 | 22 | import { ServiceContext } from '@app/Shared/Services/Services'; |
21 | 23 | import { TargetView } from '@app/TargetView/TargetView'; |
22 | 24 | import { useSubscriptions } from '@app/utils/hooks/useSubscriptions'; |
@@ -168,66 +170,70 @@ export const CaptureDiagnostics: React.FC<CaptureDiagnosticsProps> = ({ ...props |
168 | 170 | </ActionListItem> |
169 | 171 | </ActionList> |
170 | 172 | </StackItem> |
171 | | - <StackItem> |
172 | | - <ActionList> |
173 | | - <ActionListItem> |
174 | | - <Button |
175 | | - variant="primary" |
176 | | - onClick={handleThreadDump} |
177 | | - data-quickstart-id="thread-dumps-invoke-btn" |
178 | | - spinnerAriaValueText="Invoke Thread Dump" |
179 | | - spinnerAriaLabel="invoke-thread-dump" |
180 | | - isLoading={runningThreadDump} |
181 | | - > |
182 | | - {t('DiagnosticsCard.DIAGNOSTICS_THREAD_DUMP_BUTTON')} |
183 | | - </Button> |
184 | | - </ActionListItem> |
185 | | - <ActionListItem> |
186 | | - <Tooltip content={t('DiagnosticsCard.DIAGNOSTICS_THREAD_DUMP_TABLE_TOOLTIP')}> |
187 | | - <Button |
188 | | - variant="primary" |
189 | | - isAriaDisabled={!threadDumpReady} |
190 | | - data-quickstart-id="thread-dumps-archive-btn" |
191 | | - component={(props) => <CryostatLink {...props} to="/thread-dumps" />} |
192 | | - icon={<ListIcon />} |
193 | | - /> |
194 | | - </Tooltip> |
195 | | - </ActionListItem> |
196 | | - </ActionList> |
197 | | - </StackItem> |
198 | | - <StackItem> |
199 | | - <ActionList> |
200 | | - <ActionListItem> |
201 | | - <Tooltip |
202 | | - trigger={controlEnabled ? 'manual' : 'mouseenter focus'} |
203 | | - content={t('DiagnosticsCard.DIAGNOSTICS_HEAP_DUMP_BUTTON_DISABLED')} |
204 | | - > |
| 173 | + <FeatureFlag level={FeatureLevel.BETA}> |
| 174 | + <StackItem> |
| 175 | + <ActionList> |
| 176 | + <ActionListItem> |
205 | 177 | <Button |
206 | 178 | variant="primary" |
207 | | - isAriaDisabled={!controlEnabled} |
208 | | - onClick={handleHeapDump} |
209 | | - data-quickstart-id="heap-dumps-invoke-btn" |
210 | | - spinnerAriaValueText="Invoke Heap Dump" |
211 | | - spinnerAriaLabel="invoke-heap-dump" |
212 | | - isLoading={runningHeapDump} |
| 179 | + onClick={handleThreadDump} |
| 180 | + data-quickstart-id="thread-dumps-invoke-btn" |
| 181 | + spinnerAriaValueText="Invoke Thread Dump" |
| 182 | + spinnerAriaLabel="invoke-thread-dump" |
| 183 | + isLoading={runningThreadDump} |
213 | 184 | > |
214 | | - {t('DiagnosticsCard.DIAGNOSTICS_HEAP_DUMP_BUTTON')} |
| 185 | + {t('DiagnosticsCard.DIAGNOSTICS_THREAD_DUMP_BUTTON')} |
215 | 186 | </Button> |
216 | | - </Tooltip> |
217 | | - </ActionListItem> |
218 | | - <ActionListItem> |
219 | | - <Tooltip content={t('DiagnosticsCard.DIAGNOSTICS_HEAP_REDIRECT_BUTTON')}> |
220 | | - <Button |
221 | | - variant="primary" |
222 | | - isAriaDisabled={!heapDumpReady} |
223 | | - data-quickstart-id="heap-dumps-archive-btn" |
224 | | - component={(props) => <CryostatLink {...props} to="/heapdumps" />} |
225 | | - icon={<ListIcon />} |
226 | | - /> |
227 | | - </Tooltip> |
228 | | - </ActionListItem> |
229 | | - </ActionList> |
230 | | - </StackItem> |
| 187 | + </ActionListItem> |
| 188 | + <ActionListItem> |
| 189 | + <Tooltip content={t('DiagnosticsCard.DIAGNOSTICS_THREAD_DUMP_TABLE_TOOLTIP')}> |
| 190 | + <Button |
| 191 | + variant="primary" |
| 192 | + isAriaDisabled={!threadDumpReady} |
| 193 | + data-quickstart-id="thread-dumps-archive-btn" |
| 194 | + component={(props) => <CryostatLink {...props} to="/thread-dumps" />} |
| 195 | + icon={<ListIcon />} |
| 196 | + /> |
| 197 | + </Tooltip> |
| 198 | + </ActionListItem> |
| 199 | + </ActionList> |
| 200 | + </StackItem> |
| 201 | + </FeatureFlag> |
| 202 | + <FeatureFlag level={FeatureLevel.BETA}> |
| 203 | + <StackItem> |
| 204 | + <ActionList> |
| 205 | + <ActionListItem> |
| 206 | + <Tooltip |
| 207 | + trigger={controlEnabled ? 'manual' : 'mouseenter focus'} |
| 208 | + content={t('DiagnosticsCard.DIAGNOSTICS_HEAP_DUMP_BUTTON_DISABLED')} |
| 209 | + > |
| 210 | + <Button |
| 211 | + variant="primary" |
| 212 | + isAriaDisabled={!controlEnabled} |
| 213 | + onClick={handleHeapDump} |
| 214 | + data-quickstart-id="heap-dumps-invoke-btn" |
| 215 | + spinnerAriaValueText="Invoke Heap Dump" |
| 216 | + spinnerAriaLabel="invoke-heap-dump" |
| 217 | + isLoading={runningHeapDump} |
| 218 | + > |
| 219 | + {t('DiagnosticsCard.DIAGNOSTICS_HEAP_DUMP_BUTTON')} |
| 220 | + </Button> |
| 221 | + </Tooltip> |
| 222 | + </ActionListItem> |
| 223 | + <ActionListItem> |
| 224 | + <Tooltip content={t('DiagnosticsCard.DIAGNOSTICS_HEAP_REDIRECT_BUTTON')}> |
| 225 | + <Button |
| 226 | + variant="primary" |
| 227 | + isAriaDisabled={!heapDumpReady} |
| 228 | + data-quickstart-id="heap-dumps-archive-btn" |
| 229 | + component={(props) => <CryostatLink {...props} to="/heapdumps" />} |
| 230 | + icon={<ListIcon />} |
| 231 | + /> |
| 232 | + </Tooltip> |
| 233 | + </ActionListItem> |
| 234 | + </ActionList> |
| 235 | + </StackItem> |
| 236 | + </FeatureFlag> |
231 | 237 | </Stack> |
232 | 238 | </Bullseye> |
233 | 239 | </CardBody> |
|
0 commit comments