File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,8 +143,12 @@ export const getAllChanges = (
143143 ) ;
144144} ;
145145
146+ type ConfigDetail = ConfigItem & {
147+ agent_name : string ;
148+ } ;
149+
146150export const getConfig = ( id : string ) =>
147- resolvePostGrestRequestWithPagination < ConfigItem [ ] > (
151+ resolvePostGrestRequestWithPagination < ConfigDetail [ ] > (
148152 ConfigDB . get ( `/config_detail?id=eq.${ id } &select=*,config_scrapers(id,name)` )
149153 ) ;
150154
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { DisplayGroupedProperties } from "../../Utils/DisplayGroupedProperties";
1414import ConfigCostValue from "../ConfigCosts/ConfigCostValue" ;
1515import ConfigsTypeIcon from "../ConfigsTypeIcon" ;
1616import { formatConfigLabels } from "./Utils/formatConfigLabels" ;
17+ import { MdOutlineSupportAgent } from "react-icons/md" ;
1718
1819type Props = {
1920 configId : string ;
@@ -151,7 +152,6 @@ export function ConfigDetails({ configId }: Props) {
151152 ] }
152153 />
153154 ) }
154-
155155 < DisplayDetailsRow
156156 items = { [
157157 {
@@ -178,7 +178,6 @@ export function ConfigDetails({ configId }: Props) {
178178 }
179179 ] }
180180 />
181-
182181 < DisplayDetailsRow
183182 items = { [
184183 {
@@ -204,6 +203,27 @@ export function ConfigDetails({ configId }: Props) {
204203 ] }
205204 />
206205
206+ < DisplayDetailsRow
207+ items = { [
208+ {
209+ label : "Agent" ,
210+ value : (
211+ < div className = "flex items-center" >
212+ < Link
213+ to = { `/settings/agents?id=${ configDetails . agent_id } ` }
214+ className = "flex items-center text-blue-500 hover:underline"
215+ target = "_blank"
216+ rel = "noopener noreferrer"
217+ >
218+ < MdOutlineSupportAgent className = "mr-1 text-gray-600" />
219+ { configDetails . agent_name }
220+ </ Link >
221+ </ div >
222+ )
223+ }
224+ ] }
225+ />
226+
207227 < DisplayDetailsRow items = { types } />
208228
209229 < DisplayGroupedProperties items = { properties } />
You can’t perform that action at this time.
0 commit comments