@airporting/tech-app 0.0.170 → 0.0.172

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ export * from './compiled-types/tabs/api-docs';
2
+ export { default } from './compiled-types/tabs/api-docs';
@@ -0,0 +1,26 @@
1
+ export type ApiDocServiceItem = {
2
+ slug: string;
3
+ name: string;
4
+ description: string;
5
+ baseUrl: string;
6
+ };
7
+ export type GetApiDocServicesResponse = {
8
+ services: ApiDocServiceItem[];
9
+ };
10
+ export type GetApiDocSpecResponse = {
11
+ slug: string;
12
+ name: string;
13
+ baseUrl: string;
14
+ spec: {
15
+ openapi?: string;
16
+ info?: {
17
+ title?: string;
18
+ description?: string;
19
+ version?: string;
20
+ };
21
+ paths?: Record<string, Record<string, any>>;
22
+ components?: Record<string, any>;
23
+ };
24
+ };
25
+ export declare function useApiDocServicesQuery(): import("@tanstack/react-query").UseQueryResult<GetApiDocServicesResponse, Error>;
26
+ export declare function useApiDocSpecQuery(serviceSlug: string): import("@tanstack/react-query").UseQueryResult<GetApiDocSpecResponse, Error>;
@@ -0,0 +1,35 @@
1
+ export type MonitoringHeartbeatPoint = {
2
+ status: number;
3
+ time: string;
4
+ msg: string;
5
+ ping: number | null;
6
+ };
7
+ export type MonitoringServiceItem = {
8
+ id: number;
9
+ name: string;
10
+ type: string;
11
+ status: number;
12
+ uptime24h: number | null;
13
+ latestPing: number | null;
14
+ latestTime: string | null;
15
+ heartbeats: MonitoringHeartbeatPoint[];
16
+ };
17
+ export type MonitoringGroup = {
18
+ id: number;
19
+ name: string;
20
+ services: MonitoringServiceItem[];
21
+ };
22
+ export type GetMonitoringStatusResponse = {
23
+ title: string;
24
+ slug: string;
25
+ fetchedAt: string;
26
+ summary: {
27
+ total: number;
28
+ up: number;
29
+ down: number;
30
+ pending: number;
31
+ maintenance: number;
32
+ };
33
+ groups: MonitoringGroup[];
34
+ };
35
+ export declare function useMonitoringStatusQuery(): import("@tanstack/react-query").UseQueryResult<GetMonitoringStatusResponse, Error>;
@@ -0,0 +1 @@
1
+ export declare function ApiDocsApp(): import("react").JSX.Element;
@@ -2,10 +2,6 @@ import type { EtatSaisieReconciliationRow } from '@/src/gen/TechApi';
2
2
  export declare function ReconciliationGapBadge({ count }: {
3
3
  count: number;
4
4
  }): import("react").JSX.Element | null;
5
- export declare function ReconciliationBalanceCell({ row, historical, }: {
5
+ export declare function ReconciliationBalanceCell({ row, }: {
6
6
  row: EtatSaisieReconciliationRow;
7
- historical?: boolean;
8
- }): import("react").JSX.Element;
9
- export declare function ReconciliationBalanceNotice({ rows, }: {
10
- rows: EtatSaisieReconciliationRow[];
11
7
  }): import("react").JSX.Element;
@@ -2,5 +2,4 @@ import type { EtatSaisieBankBalanceReading, EtatSaisieReconciliationRow } from '
2
2
  export declare function balanceGap(reading: EtatSaisieBankBalanceReading | null | undefined): number | null;
3
3
  export declare function reconciliationGapAlert(row: EtatSaisieReconciliationRow): boolean;
4
4
  export declare function reconciliationGapCounts(rows: EtatSaisieReconciliationRow[]): Map<string, number>;
5
- export declare function maxReconciledGapsByCurrency(rows: EtatSaisieReconciliationRow[]): Map<string, number>;
6
5
  export declare function formatBankAmount(amount: number | null, currency: string | null): string;
@@ -0,0 +1 @@
1
+ export declare function MonitoringApp(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ProvidersProps } from '@/src/providers.tsx';
2
+ export default function ApiDocs(props: ProvidersProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ProvidersProps } from '@/src/providers.tsx';
2
+ export default function Monitoring(props: ProvidersProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './compiled-types/tabs/monitoring';
2
+ export { default } from './compiled-types/tabs/monitoring';
@@ -1,3 +1,3 @@
1
1
 
2
- export type RemoteKeys = 'REMOTE_ALIAS_IDENTIFIER/amex' | 'REMOTE_ALIAS_IDENTIFIER/bnpp' | 'REMOTE_ALIAS_IDENTIFIER/credmut' | 'REMOTE_ALIAS_IDENTIFIER/dashboard' | 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' | 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' | 'REMOTE_ALIAS_IDENTIFIER/github' | 'REMOTE_ALIAS_IDENTIFIER/mcp-access' | 'REMOTE_ALIAS_IDENTIFIER/payfit' | 'REMOTE_ALIAS_IDENTIFIER/pipeline' | 'REMOTE_ALIAS_IDENTIFIER/sales' | 'REMOTE_ALIAS_IDENTIFIER/scrapers' | 'REMOTE_ALIAS_IDENTIFIER/spendesk' | 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' | 'REMOTE_ALIAS_IDENTIFIER/synchro' | 'REMOTE_ALIAS_IDENTIFIER/usage' | 'REMOTE_ALIAS_IDENTIFIER/wise';
3
- type PackageType<T> = T extends 'REMOTE_ALIAS_IDENTIFIER/wise' ? typeof import('REMOTE_ALIAS_IDENTIFIER/wise') :T extends 'REMOTE_ALIAS_IDENTIFIER/usage' ? typeof import('REMOTE_ALIAS_IDENTIFIER/usage') :T extends 'REMOTE_ALIAS_IDENTIFIER/synchro' ? typeof import('REMOTE_ALIAS_IDENTIFIER/synchro') :T extends 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spreadsheet') :T extends 'REMOTE_ALIAS_IDENTIFIER/spendesk' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spendesk') :T extends 'REMOTE_ALIAS_IDENTIFIER/scrapers' ? typeof import('REMOTE_ALIAS_IDENTIFIER/scrapers') :T extends 'REMOTE_ALIAS_IDENTIFIER/sales' ? typeof import('REMOTE_ALIAS_IDENTIFIER/sales') :T extends 'REMOTE_ALIAS_IDENTIFIER/pipeline' ? typeof import('REMOTE_ALIAS_IDENTIFIER/pipeline') :T extends 'REMOTE_ALIAS_IDENTIFIER/payfit' ? typeof import('REMOTE_ALIAS_IDENTIFIER/payfit') :T extends 'REMOTE_ALIAS_IDENTIFIER/mcp-access' ? typeof import('REMOTE_ALIAS_IDENTIFIER/mcp-access') :T extends 'REMOTE_ALIAS_IDENTIFIER/github' ? typeof import('REMOTE_ALIAS_IDENTIFIER/github') :T extends 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' ? typeof import('REMOTE_ALIAS_IDENTIFIER/finance-jobs') :T extends 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' ? typeof import('REMOTE_ALIAS_IDENTIFIER/etat-saisie') :T extends 'REMOTE_ALIAS_IDENTIFIER/dashboard' ? typeof import('REMOTE_ALIAS_IDENTIFIER/dashboard') :T extends 'REMOTE_ALIAS_IDENTIFIER/credmut' ? typeof import('REMOTE_ALIAS_IDENTIFIER/credmut') :T extends 'REMOTE_ALIAS_IDENTIFIER/bnpp' ? typeof import('REMOTE_ALIAS_IDENTIFIER/bnpp') :T extends 'REMOTE_ALIAS_IDENTIFIER/amex' ? typeof import('REMOTE_ALIAS_IDENTIFIER/amex') :any;
2
+ export type RemoteKeys = 'REMOTE_ALIAS_IDENTIFIER/amex' | 'REMOTE_ALIAS_IDENTIFIER/api-docs' | 'REMOTE_ALIAS_IDENTIFIER/bnpp' | 'REMOTE_ALIAS_IDENTIFIER/credmut' | 'REMOTE_ALIAS_IDENTIFIER/dashboard' | 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' | 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' | 'REMOTE_ALIAS_IDENTIFIER/github' | 'REMOTE_ALIAS_IDENTIFIER/mcp-access' | 'REMOTE_ALIAS_IDENTIFIER/monitoring' | 'REMOTE_ALIAS_IDENTIFIER/payfit' | 'REMOTE_ALIAS_IDENTIFIER/pipeline' | 'REMOTE_ALIAS_IDENTIFIER/sales' | 'REMOTE_ALIAS_IDENTIFIER/scrapers' | 'REMOTE_ALIAS_IDENTIFIER/spendesk' | 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' | 'REMOTE_ALIAS_IDENTIFIER/synchro' | 'REMOTE_ALIAS_IDENTIFIER/usage' | 'REMOTE_ALIAS_IDENTIFIER/wise';
3
+ type PackageType<T> = T extends 'REMOTE_ALIAS_IDENTIFIER/wise' ? typeof import('REMOTE_ALIAS_IDENTIFIER/wise') :T extends 'REMOTE_ALIAS_IDENTIFIER/usage' ? typeof import('REMOTE_ALIAS_IDENTIFIER/usage') :T extends 'REMOTE_ALIAS_IDENTIFIER/synchro' ? typeof import('REMOTE_ALIAS_IDENTIFIER/synchro') :T extends 'REMOTE_ALIAS_IDENTIFIER/spreadsheet' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spreadsheet') :T extends 'REMOTE_ALIAS_IDENTIFIER/spendesk' ? typeof import('REMOTE_ALIAS_IDENTIFIER/spendesk') :T extends 'REMOTE_ALIAS_IDENTIFIER/scrapers' ? typeof import('REMOTE_ALIAS_IDENTIFIER/scrapers') :T extends 'REMOTE_ALIAS_IDENTIFIER/sales' ? typeof import('REMOTE_ALIAS_IDENTIFIER/sales') :T extends 'REMOTE_ALIAS_IDENTIFIER/pipeline' ? typeof import('REMOTE_ALIAS_IDENTIFIER/pipeline') :T extends 'REMOTE_ALIAS_IDENTIFIER/payfit' ? typeof import('REMOTE_ALIAS_IDENTIFIER/payfit') :T extends 'REMOTE_ALIAS_IDENTIFIER/monitoring' ? typeof import('REMOTE_ALIAS_IDENTIFIER/monitoring') :T extends 'REMOTE_ALIAS_IDENTIFIER/mcp-access' ? typeof import('REMOTE_ALIAS_IDENTIFIER/mcp-access') :T extends 'REMOTE_ALIAS_IDENTIFIER/github' ? typeof import('REMOTE_ALIAS_IDENTIFIER/github') :T extends 'REMOTE_ALIAS_IDENTIFIER/finance-jobs' ? typeof import('REMOTE_ALIAS_IDENTIFIER/finance-jobs') :T extends 'REMOTE_ALIAS_IDENTIFIER/etat-saisie' ? typeof import('REMOTE_ALIAS_IDENTIFIER/etat-saisie') :T extends 'REMOTE_ALIAS_IDENTIFIER/dashboard' ? typeof import('REMOTE_ALIAS_IDENTIFIER/dashboard') :T extends 'REMOTE_ALIAS_IDENTIFIER/credmut' ? typeof import('REMOTE_ALIAS_IDENTIFIER/credmut') :T extends 'REMOTE_ALIAS_IDENTIFIER/bnpp' ? typeof import('REMOTE_ALIAS_IDENTIFIER/bnpp') :T extends 'REMOTE_ALIAS_IDENTIFIER/api-docs' ? typeof import('REMOTE_ALIAS_IDENTIFIER/api-docs') :T extends 'REMOTE_ALIAS_IDENTIFIER/amex' ? typeof import('REMOTE_ALIAS_IDENTIFIER/amex') :any;
Binary file
@@ -0,0 +1,62 @@
1
+ .loading-progress {
2
+ width: 100%;
3
+ max-width: 560px;
4
+ color: var(--mantine-color-dimmed, #a3a3a3);
5
+ padding: 20px 0;
6
+ font-size: 14px;
7
+ }
8
+
9
+ .loading-progress progress {
10
+ appearance: none;
11
+ background: #242424;
12
+ border: 0;
13
+ border-radius: 4px;
14
+ width: 100%;
15
+ height: 4px;
16
+ margin-top: 12px;
17
+ display: block;
18
+ overflow: hidden;
19
+ }
20
+
21
+ .loading-progress progress::-webkit-progress-bar {
22
+ background: #242424;
23
+ }
24
+
25
+ .loading-progress progress:indeterminate {
26
+ background: linear-gradient(90deg, #242424 0%, #2dd4aa 50%, #242424 100%) 0 0 / 200% 100%;
27
+ animation: 1.6s linear infinite loading-progress-move;
28
+ }
29
+
30
+ .loading-progress progress:indeterminate::-webkit-progress-bar {
31
+ background: none;
32
+ }
33
+
34
+ .loading-progress progress::-moz-progress-bar {
35
+ background: #2dd4aa;
36
+ }
37
+
38
+ @keyframes loading-progress-move {
39
+ to {
40
+ background-position: -200% 0;
41
+ }
42
+ }
43
+
44
+ @media (prefers-reduced-motion: reduce) {
45
+ .loading-progress progress:indeterminate {
46
+ animation: none;
47
+ }
48
+ }
49
+
50
+ .console-query-progress {
51
+ z-index: 15;
52
+ background: var(--mantine-color-body, #080808);
53
+ padding: 0 24px;
54
+ position: sticky;
55
+ top: 0;
56
+ }
57
+
58
+ .console-query-progress .loading-progress {
59
+ max-width: none;
60
+ padding: 12px 0;
61
+ }
62
+
@@ -0,0 +1,10 @@
1
+ /*! For license information please see __federation_expose_api_docs.js.LICENSE.txt */
2
+ "use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["3687"],{7500:function(){},631:function(__unused_webpack_module,exports){/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},5893:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(631)},9561:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{_:()=>ConsoleQueryProgress});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(6197);var _LoadingProgress__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(9488);function ConsoleQueryProgress(){const fetching=(0,_tanstack_react_query__WEBPACK_IMPORTED_MODULE_1__.useIsFetching)({predicate:q=>q.getObserversCount()>0&&!q.queryKey.includes("ping")});const mutations=(0,_tanstack_react_query__WEBPACK_IMPORTED_MODULE_1__.useIsMutating)();if(!fetching&&!mutations)return null;return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div",{className:"console-query-progress",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_LoadingProgress__WEBPACK_IMPORTED_MODULE_2__.A,{label:mutations?"Mise \xe0 jour en cours…":"Chargement des donn\xe9es…"})})}},9488:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{A:()=>LoadingProgress});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);__webpack_require__(7500);function LoadingProgress({label}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{className:"loading-progress",role:"status","aria-live":"polite",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span",{children:label}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("progress",{"aria-label":label})]})}},1354:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{m:()=>PageHeader});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(207);var _tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(9632);var react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(5850);function formatRelative(now,then){const seconds=Math.max(0,Math.floor((now-then)/1e3));if(seconds<5)return"\xe0 l’instant";if(seconds<60)return`il y a ${seconds}s`;const minutes=Math.floor(seconds/60);if(minutes<60)return`il y a ${minutes} min`;const hours=Math.floor(minutes/60);return`il y a ${hours} h`}function PageHeader({title,leading,badge,updatedAt,isFetching,isError,onRefresh,actions}){const[now,setNow]=(0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(()=>Date.now());(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(()=>{if(!updatedAt)return;const id=window.setInterval(()=>setNow(Date.now()),1e3);return()=>window.clearInterval(id)},[updatedAt]);const relative=updatedAt?formatRelative(now,updatedAt):null;const color=isError?"orange":isFetching?"teal":"dimmed";return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",align:"center",mih:48,mb:"md",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[leading,/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{order:2,children:title}),badge]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[relative&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{size:"xs",c:color,fw:isFetching?600:400,"data-testid":"page-header-freshness",children:isError?"\xe9chec maj":isFetching?"maj…":relative}),onRefresh&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Tooltip,{label:"Rafra\xeechir",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{variant:"default",size:"md",onClick:onRefresh,loading:isFetching,"aria-label":"Refresh",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconRefresh,{size:16})})}),actions]})]})}},7936:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{$:()=>AppConfigProvider,M:()=>useAppConfig});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5850);const AppConfigCtx=(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);const AppConfigProvider=AppConfigCtx.Provider;function useAppConfig(){const config=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(AppConfigCtx);if(!config)throw new Error("Called `useAppConfig` outside a `<AppConfigProvider />`");return config}},7034:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{C:()=>Providers});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _airporting_app_front__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1380);var _mantine_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(207);var _mantine_modals__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(4142);var _mantine_notifications__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1455);var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(6197);var radash__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(9877);var react__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(5850);var _components_ConsoleQueryProgress__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(9561);var _hooks_useAppConfig__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(7936);const theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_2__.createTheme)((0,radash__WEBPACK_IMPORTED_MODULE_6__.assign)(_airporting_app_front__WEBPACK_IMPORTED_MODULE_1__.theme,{components:{}}));const cssVarResolver=x=>(0,radash__WEBPACK_IMPORTED_MODULE_6__.assign)(_airporting_app_front__WEBPACK_IMPORTED_MODULE_1__.cssVarResolver(x),{dark:{},light:{},variables:{}});function Providers(props){const{children,config,mantine,tanstack}=props;const[defaultClient]=(0,react__WEBPACK_IMPORTED_MODULE_7__.useState)(()=>new _tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__.QueryClient);return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_hooks_useAppConfig__WEBPACK_IMPORTED_MODULE_9__.$,{value:config,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tanstack_react_query__WEBPACK_IMPORTED_MODULE_5__.QueryClientProvider,{client:tanstack?.queryClient??defaultClient,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_2__.MantineProvider,{theme:theme,cssVariablesResolver:cssVarResolver,defaultColorScheme:mantine?.defaultColorScheme,forceColorScheme:mantine?.forceColorScheme,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_modals__WEBPACK_IMPORTED_MODULE_3__.ModalsProvider,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_notifications__WEBPACK_IMPORTED_MODULE_4__.Notifications,{position:"top-right",zIndex:400}),config.consoleLoading&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ConsoleQueryProgress__WEBPACK_IMPORTED_MODULE_8__._,{}),children]})})})})}},6127:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>ApiDocs});var jsx_runtime=__webpack_require__(5893);var consume_shared_module_default_react_strict_=__webpack_require__(5850);var index_mjs_=__webpack_require__(207);var index_js_=__webpack_require__(6197);var useAppConfig=__webpack_require__(7936);function useApiDocServicesQuery(){const config=(0,useAppConfig.M)();const baseUrl=config.api.replace(/\/$/,"");return(0,index_js_.useQuery)({queryKey:["tech","api-docs","services"],queryFn:async()=>{const res=await fetch(`${baseUrl}/v1/api-docs/services`,{credentials:"include",headers:{Accept:"application/json",From:config.owner}});if(!res.ok)throw new Error(`Erreur HTTP ${res.status}`);return await res.json()},staleTime:3e5})}function useApiDocSpecQuery(serviceSlug){const config=(0,useAppConfig.M)();const baseUrl=config.api.replace(/\/$/,"");return(0,index_js_.useQuery)({queryKey:["tech","api-docs","spec",serviceSlug],enabled:Boolean(serviceSlug),queryFn:async()=>{const res=await fetch(`${baseUrl}/v1/api-docs/spec/${encodeURIComponent(serviceSlug)}`,{credentials:"include",headers:{Accept:"application/json",From:config.owner}});if(!res.ok)throw new Error(`Erreur HTTP ${res.status}`);return await res.json()},staleTime:6e4})}var PageHeader=__webpack_require__(1354);const HTTP_METHODS=["get","post","put","patch","delete","options","head"];function methodColor(method){switch(method.toLowerCase()){case"get":return"blue";case"post":return"green";case"put":return"orange";case"patch":return"yellow";case"delete":return"red";default:return"gray"}}function ApiDocsApp(){const servicesQuery=useApiDocServicesQuery();const[selectedService,setSelectedService]=(0,consume_shared_module_default_react_strict_.useState)("tech-api");const[search,setSearch]=(0,consume_shared_module_default_react_strict_.useState)("");const specQuery=useApiDocSpecQuery(selectedService);const services=servicesQuery.data?.services??[];const currentService=services.find(s=>s.slug===selectedService);const groupedEndpoints=(0,consume_shared_module_default_react_strict_.useMemo)(()=>{const paths=specQuery.data?.spec?.paths??{};const q=search.trim().toLowerCase();const byTag=new Map;for(const[path,pathItem]of Object.entries(paths))if(pathItem&&"object"==typeof pathItem)for(const method of HTTP_METHODS){const op=pathItem[method];if(!op||"object"!=typeof op)continue;const summary="string"==typeof op.summary?op.summary:"";const description="string"==typeof op.description?op.description:"";const tags=Array.isArray(op.tags)&&op.tags.length>0?op.tags:["Default"];if(q&&!path.toLowerCase().includes(q)&&!method.toLowerCase().includes(q)&&!summary.toLowerCase().includes(q)&&!tags.some(t=>t.toLowerCase().includes(q)))continue;const entry={id:`${method.toUpperCase()} ${path}`,method:method.toUpperCase(),path,summary,description,tag:tags[0],parameters:Array.isArray(op.parameters)?op.parameters:[],requestBody:op.requestBody??null,responses:op.responses&&"object"==typeof op.responses?op.responses:{}};const list=byTag.get(entry.tag)??[];list.push(entry);byTag.set(entry.tag,list)}return Array.from(byTag.entries()).map(([tag,endpoints])=>({tag,endpoints}))},[specQuery.data,search]);const totalEndpoints=(0,consume_shared_module_default_react_strict_.useMemo)(()=>groupedEndpoints.reduce((acc,g)=>acc+g.endpoints.length,0),[groupedEndpoints]);return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Container,{fluid:true,my:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"lg",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(PageHeader.m,{title:"Documentation API (OpenAPI / Swagger)",updatedAt:specQuery.dataUpdatedAt,isFetching:specQuery.isFetching,isError:specQuery.isError,onRefresh:()=>specQuery.refetch()}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",align:"flex-end",wrap:"wrap",gap:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Select,{label:"Microservice API",data:services.map(s=>({value:s.slug,label:`${s.name} (${s.slug})`})),value:selectedService,onChange:val=>val&&setSelectedService(val),searchable:true,style:{minWidth:280,flex:1,maxWidth:420}}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{label:"Filtrer les routes",placeholder:"/v1/..., m\xe9thode, tag ou r\xe9sum\xe9...",value:search,onChange:e=>setSearch(e.currentTarget.value),style:{minWidth:280,flex:1}})]}),currentService&&/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",mt:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{size:"xs",c:"dimmed",children:[currentService.description," \xb7 Base URL :"," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Code,{children:currentService.baseUrl})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Badge,{variant:"light",color:"blue",children:[totalEndpoints," routes"]})]})]}),specQuery.isLoading?/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:56,radius:"md"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:56,radius:"md"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:56,radius:"md"})]}):specQuery.isError?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"lg",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"red",fw:600,children:["Impossible de charger le sch\xe9ma OpenAPI pour ",selectedService,"."]})}):0===groupedEndpoints.length?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"lg",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",children:"Aucune route ne correspond au filtre."})}):/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Stack,{gap:"md",children:groupedEndpoints.map(group=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",mb:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:4,children:group.tag}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{variant:"outline",color:"gray",children:group.endpoints.length})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Accordion,{variant:"separated",radius:"sm",children:group.endpoints.map(ep=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Accordion.Item,{value:ep.id,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Accordion.Control,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:"sm",wrap:"nowrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:methodColor(ep.method),variant:"filled",w:72,children:ep.method}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Code,{fw:600,children:ep.path}),ep.summary&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",c:"dimmed",lineClamp:1,children:ep.summary})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Accordion.Panel,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"sm",children:[ep.description&&/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",children:ep.description}),ep.parameters.length>0&&/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",fw:700,tt:"uppercase",mb:4,children:"Param\xe8tres"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.ScrollArea.Autosize,{mah:220,children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Code,{block:true,children:JSON.stringify(ep.parameters,null,2)})})]}),ep.requestBody&&/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",fw:700,tt:"uppercase",mb:4,children:"Corps de requ\xeate (Request Body)"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.ScrollArea.Autosize,{mah:240,children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Code,{block:true,children:JSON.stringify(ep.requestBody,null,2)})})]}),Object.keys(ep.responses).length>0&&/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",fw:700,tt:"uppercase",mb:4,children:"R\xe9ponses"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.ScrollArea.Autosize,{mah:260,children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Code,{block:true,children:JSON.stringify(ep.responses,null,2)})})]})]})})]},ep.id))})]},group.tag))})]})})}var providers=__webpack_require__(7034);function ApiDocs(props){return/*#__PURE__*/(0,jsx_runtime.jsx)(consume_shared_module_default_react_strict_.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(providers.C,{...props,children:/*#__PURE__*/(0,jsx_runtime.jsx)(ApiDocsApp,{})})})}}}]);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
@@ -1 +1 @@
1
- "use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["9777"],{2268:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{g:()=>useFinanceJobsStock});var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6197);var _useApi__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4148);function useFinanceJobsStock(filters={}){const api=(0,_useApi__WEBPACK_IMPORTED_MODULE_1__.h)();const query={...filters.period&&{period:filters.period}};return(0,_tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__.useQuery)({queryKey:["tech","finance-jobs","stock",filters],queryFn:async()=>(await api.financeJobs.getStockV1({query})).data,refetchInterval:3e4,refetchIntervalInBackground:false,refetchOnWindowFocus:true})}},3139:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{V:()=>useGithubQuery});var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6197);var _useApi__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4148);function useGithubQuery(){const api=(0,_useApi__WEBPACK_IMPORTED_MODULE_1__.h)();const query=(0,_tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__.useQuery)({queryKey:["tech","github"],queryFn:async()=>await api.github.getJobsRunnersV1().then(x=>x.data),refetchInterval:3e4,refetchIntervalInBackground:false,refetchOnWindowFocus:true,refetchOnReconnect:true});return query}},466:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{U:()=>useGsheetStock});var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6197);var _useApi__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4148);function useGsheetStock(filters={}){const api=(0,_useApi__WEBPACK_IMPORTED_MODULE_1__.h)();const query={...filters.period&&{period:filters.period}};return(0,_tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__.useQuery)({queryKey:["tech","gsheet","stock",filters],queryFn:async()=>(await api.gsheet.getStockV1({query})).data,refetchInterval:3e4,refetchIntervalInBackground:false,refetchOnWindowFocus:true})}},1354:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{m:()=>PageHeader});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(207);var _tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(9632);var react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(5850);function formatRelative(now,then){const seconds=Math.max(0,Math.floor((now-then)/1e3));if(seconds<5)return"\xe0 l’instant";if(seconds<60)return`il y a ${seconds}s`;const minutes=Math.floor(seconds/60);if(minutes<60)return`il y a ${minutes} min`;const hours=Math.floor(minutes/60);return`il y a ${hours} h`}function PageHeader({title,leading,badge,updatedAt,isFetching,isError,onRefresh,actions}){const[now,setNow]=(0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(()=>Date.now());(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(()=>{if(!updatedAt)return;const id=window.setInterval(()=>setNow(Date.now()),1e3);return()=>window.clearInterval(id)},[updatedAt]);const relative=updatedAt?formatRelative(now,updatedAt):null;const color=isError?"orange":isFetching?"teal":"dimmed";return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",align:"center",mih:48,mb:"md",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[leading,/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{order:2,children:title}),badge]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[relative&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{size:"xs",c:color,fw:isFetching?600:400,"data-testid":"page-header-freshness",children:isError?"\xe9chec maj":isFetching?"maj…":relative}),onRefresh&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Tooltip,{label:"Rafra\xeechir",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{variant:"default",size:"md",onClick:onRefresh,loading:isFetching,"aria-label":"Refresh",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconRefresh,{size:16})})}),actions]})]})}},5068:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{U:()=>IconGithub});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);function IconGithub({color="currentColor",size=20,marker,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:color,xmlns:"http://www.w3.org/2000/svg",...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M12 0.297C5.373 0.297 0 5.67 0 12.297c0 5.292 3.438 9.787 8.205 11.387.6.111.82-.261.82-.58 0-.287-.011-1.244-.016-2.255-3.338.726-4.042-1.609-4.042-1.609-.546-1.389-1.333-1.759-1.333-1.759-1.089-.745.083-.73.083-.73 1.205.085 1.84 1.236 1.84 1.236 1.07 1.834 2.807 1.304 3.492.997.107-.775.419-1.305.762-1.605-2.665-.304-5.466-1.332-5.466-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.536-1.524.116-3.176 0 0 1.008-.322 3.301 1.23a11.51 11.51 0 0 1 3.004-.404 c1.019.005 2.047.138 3.004.404 2.291-1.552 3.297-1.23 3.297-1.23.655 1.652.243 2.873.119 3.176.77.84 1.235 1.91 1.235 3.221 0 4.61-2.805 5.624-5.476 5.921.43.372.823 1.104.823 2.223 0 1.606-.015 2.896-.015 3.293 0 .321.216.697.825.578C20.565 22.08 24 17.585 24 12.297 24 5.67 18.627.297 12 .297z"})})}},1394:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>Dashboard});var jsx_runtime=__webpack_require__(5893);var consume_shared_module_default_react_strict_=__webpack_require__(5850);var index_mjs_=__webpack_require__(207);var index_js_=__webpack_require__(6197);var useApi=__webpack_require__(4148);function useDashboardQuery(){const api=(0,useApi.h)();const query=(0,index_js_.useQuery)({queryKey:["tech","dashboard"],queryFn:async()=>await api.getDashboard().then(x=>x.data),refetchInterval:3e4,refetchIntervalInBackground:false,refetchOnWindowFocus:true,refetchOnReconnect:true});return query}var IconGithub=__webpack_require__(5068);function IconHealthCross({color="#2CA01C",size=20,...props}){return/*#__PURE__*/(0,jsx_runtime.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:color,xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Sant\xe9",...props,children:[/*#__PURE__*/(0,jsx_runtime.jsx)("title",{children:"Sant\xe9"}),/*#__PURE__*/(0,jsx_runtime.jsx)("path",{d:"M9 2h6a1 1 0 0 1 1 1v5h5a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-5v5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-5H3a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h5V3a1 1 0 0 1 1-1Z"})]})}var dist_index_js_=__webpack_require__(1380);var PageHeader=__webpack_require__(1354);var financeJobsStockQuery=__webpack_require__(2268);var gsheetStockQuery=__webpack_require__(466);var githubQuery=__webpack_require__(3139);function toneColor(tone){if("bad"===tone)return"red";if("warn"===tone)return"orange";return"green"}function toneLabel(tone){if("bad"===tone)return"ALERT";if("warn"===tone)return"WARN";return"OK"}function SystemHealthStrip(){const finance=(0,financeJobsStockQuery.g)();const gsheet=(0,gsheetStockQuery.U)();const github=(0,githubQuery.V)();const loading=finance.isLoading||gsheet.isLoading||github.isLoading;if(loading)return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.SimpleGrid,{cols:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:80}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:80}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:80})]});const tiles=[];if(finance.data){const d=finance.data;const errored=d.errored??0;const stuck=d.stuck??0;tiles.push({key:"finance",title:"Finance jobs",detail:`${d.pending??0} pending \xb7 ${errored} errored`,tone:errored>0?"bad":stuck>0?"warn":"ok"})}if(gsheet.data){const d=gsheet.data;const errored=d.errored??0;const stuck=d.stuck??0;tiles.push({key:"gsheet",title:"Worksheet",detail:`${d.pending??0} pending \xb7 ${errored} errored`,tone:errored>0?"bad":stuck>0?"warn":"ok"})}if(github.data){const list=github.data.list??[];const repos=list.length;tiles.push({key:"runners",title:"Runners GitHub",detail:`${repos} repos surveill\xe9s`,tone:0===repos?"bad":"ok"})}if(0===tiles.length)return null;return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.SimpleGrid,{cols:Math.min(tiles.length,3),children:tiles.map(t=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Card,{withBorder:true,radius:"md",p:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",align:"flex-start",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:600,children:t.title}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:toneColor(t.tone),variant:"light",children:toneLabel(t.tone)})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",c:"dimmed",mt:4,children:t.detail})]},t.key))})}function App(){const dashboardResult=useDashboardQuery();const dashboard=dashboardResult.data;return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Container,{fluid:true,my:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"lg",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(PageHeader.m,{title:"Sant\xe9",leading:/*#__PURE__*/(0,jsx_runtime.jsx)(IconHealthCross,{size:26}),updatedAt:dashboardResult.dataUpdatedAt,isFetching:dashboardResult.isFetching,isError:dashboardResult.isError,onRefresh:()=>dashboardResult.refetch()}),/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,mb:"sm",children:"Sant\xe9 Syst\xe8me"}),/*#__PURE__*/(0,jsx_runtime.jsx)(SystemHealthStrip,{})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Divider,{}),/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,mb:"sm",children:"Int\xe9grations Produit"}),dashboard?/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:3,ml:dashboard.gsheet.globalProblem?-30:0,children:[dashboard.gsheet.globalProblem?/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.IconCross,{size:24,color:"red"}):/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{}),"Worksheet"]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches non termin\xe9es"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:dashboard.gsheet.pending>50?"red":dashboard.gsheet.pending>30?"orange":"green",children:[dashboard.gsheet.pending," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"onglets"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fw:700,fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{span:true,c:"dimmed",children:["Le plus ancien date du :"," "]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:"bold",c:dashboard.gsheet.isPendingTooOld?"red":"green",children:dashboard.gsheet.oldest})]})]},"gsheet_pending")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"apart",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches en cours"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.gsheet.running," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"onglets"})]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://github.com/airporting/gsheet_runner/actions",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]})},"gsheet_running")})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:3,children:"Synchro"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:"green",children:[dashboard.synchro.askedToday," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"initial",children:"aujourd'hui"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:700,c:"red",children:dashboard.synchro.errorsToday})," ","en erreur (~",((dashboard.synchro.errorsToday??0)*100/(dashboard.synchro.askedToday??1)).toFixed(2),"%)"]})]},"synchro_today")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Actuellement"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.synchro.running," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"initial",children:"en cours"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"apart",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:700,children:dashboard.synchro.waiting})," ","en attente"]}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://github.com/airporting/jobs_recipes_runner/actions/workflows/run-recipe.yml",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]})]},"synchro_running")})]})]}):/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",children:"Chargement…"})]})]})})}var providers=__webpack_require__(7034);function Dashboard(props){return/*#__PURE__*/(0,jsx_runtime.jsx)(consume_shared_module_default_react_strict_.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(providers.C,{...props,children:/*#__PURE__*/(0,jsx_runtime.jsx)(App,{})})})}}}]);
1
+ "use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["9777"],{2268:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{g:()=>useFinanceJobsStock});var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6197);var _useApi__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4148);function useFinanceJobsStock(filters={}){const api=(0,_useApi__WEBPACK_IMPORTED_MODULE_1__.h)();const query={...filters.period&&{period:filters.period}};return(0,_tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__.useQuery)({queryKey:["tech","finance-jobs","stock",filters],queryFn:async()=>(await api.financeJobs.getStockV1({query})).data,refetchInterval:3e4,refetchIntervalInBackground:false,refetchOnWindowFocus:true})}},3139:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{V:()=>useGithubQuery});var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6197);var _useApi__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4148);function useGithubQuery(){const api=(0,_useApi__WEBPACK_IMPORTED_MODULE_1__.h)();const query=(0,_tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__.useQuery)({queryKey:["tech","github"],queryFn:async()=>await api.github.getJobsRunnersV1().then(x=>x.data),refetchInterval:3e4,refetchIntervalInBackground:false,refetchOnWindowFocus:true,refetchOnReconnect:true});return query}},466:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{U:()=>useGsheetStock});var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(6197);var _useApi__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4148);function useGsheetStock(filters={}){const api=(0,_useApi__WEBPACK_IMPORTED_MODULE_1__.h)();const query={...filters.period&&{period:filters.period}};return(0,_tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__.useQuery)({queryKey:["tech","gsheet","stock",filters],queryFn:async()=>(await api.gsheet.getStockV1({query})).data,refetchInterval:3e4,refetchIntervalInBackground:false,refetchOnWindowFocus:true})}},1354:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{m:()=>PageHeader});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(207);var _tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(9632);var react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(5850);function formatRelative(now,then){const seconds=Math.max(0,Math.floor((now-then)/1e3));if(seconds<5)return"\xe0 l’instant";if(seconds<60)return`il y a ${seconds}s`;const minutes=Math.floor(seconds/60);if(minutes<60)return`il y a ${minutes} min`;const hours=Math.floor(minutes/60);return`il y a ${hours} h`}function PageHeader({title,leading,badge,updatedAt,isFetching,isError,onRefresh,actions}){const[now,setNow]=(0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(()=>Date.now());(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(()=>{if(!updatedAt)return;const id=window.setInterval(()=>setNow(Date.now()),1e3);return()=>window.clearInterval(id)},[updatedAt]);const relative=updatedAt?formatRelative(now,updatedAt):null;const color=isError?"orange":isFetching?"teal":"dimmed";return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",align:"center",mih:48,mb:"md",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[leading,/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{order:2,children:title}),badge]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"sm",align:"center",children:[relative&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{size:"xs",c:color,fw:isFetching?600:400,"data-testid":"page-header-freshness",children:isError?"\xe9chec maj":isFetching?"maj…":relative}),onRefresh&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Tooltip,{label:"Rafra\xeechir",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{variant:"default",size:"md",onClick:onRefresh,loading:isFetching,"aria-label":"Refresh",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconRefresh,{size:16})})}),actions]})]})}},5068:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{U:()=>IconGithub});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);function IconGithub({color="currentColor",size=20,marker,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:color,xmlns:"http://www.w3.org/2000/svg",...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M12 0.297C5.373 0.297 0 5.67 0 12.297c0 5.292 3.438 9.787 8.205 11.387.6.111.82-.261.82-.58 0-.287-.011-1.244-.016-2.255-3.338.726-4.042-1.609-4.042-1.609-.546-1.389-1.333-1.759-1.333-1.759-1.089-.745.083-.73.083-.73 1.205.085 1.84 1.236 1.84 1.236 1.07 1.834 2.807 1.304 3.492.997.107-.775.419-1.305.762-1.605-2.665-.304-5.466-1.332-5.466-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.536-1.524.116-3.176 0 0 1.008-.322 3.301 1.23a11.51 11.51 0 0 1 3.004-.404 c1.019.005 2.047.138 3.004.404 2.291-1.552 3.297-1.23 3.297-1.23.655 1.652.243 2.873.119 3.176.77.84 1.235 1.91 1.235 3.221 0 4.61-2.805 5.624-5.476 5.921.43.372.823 1.104.823 2.223 0 1.606-.015 2.896-.015 3.293 0 .321.216.697.825.578C20.565 22.08 24 17.585 24 12.297 24 5.67 18.627.297 12 .297z"})})}},1970:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{x:()=>IconHealthCross});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);function IconHealthCross({color="#2CA01C",size=20,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:color,xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Sant\xe9",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("title",{children:"Sant\xe9"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M9 2h6a1 1 0 0 1 1 1v5h5a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-5v5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-5H3a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h5V3a1 1 0 0 1 1-1Z"})]})}},3815:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>Dashboard});var jsx_runtime=__webpack_require__(5893);var consume_shared_module_default_react_strict_=__webpack_require__(5850);var index_mjs_=__webpack_require__(207);var index_js_=__webpack_require__(6197);var useApi=__webpack_require__(4148);function useDashboardQuery(){const api=(0,useApi.h)();const query=(0,index_js_.useQuery)({queryKey:["tech","dashboard"],queryFn:async()=>await api.getDashboard().then(x=>x.data),refetchInterval:3e4,refetchIntervalInBackground:false,refetchOnWindowFocus:true,refetchOnReconnect:true});return query}var IconGithub=__webpack_require__(5068);var IconHealthCross=__webpack_require__(1970);var dist_index_js_=__webpack_require__(1380);var PageHeader=__webpack_require__(1354);var financeJobsStockQuery=__webpack_require__(2268);var gsheetStockQuery=__webpack_require__(466);var githubQuery=__webpack_require__(3139);function toneColor(tone){if("bad"===tone)return"red";if("warn"===tone)return"orange";return"green"}function toneLabel(tone){if("bad"===tone)return"ALERT";if("warn"===tone)return"WARN";return"OK"}function SystemHealthStrip(){const finance=(0,financeJobsStockQuery.g)();const gsheet=(0,gsheetStockQuery.U)();const github=(0,githubQuery.V)();const loading=finance.isLoading||gsheet.isLoading||github.isLoading;if(loading)return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.SimpleGrid,{cols:3,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:80}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:80}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:80})]});const tiles=[];if(finance.data){const d=finance.data;const errored=d.errored??0;const stuck=d.stuck??0;tiles.push({key:"finance",title:"Finance jobs",detail:`${d.pending??0} pending \xb7 ${errored} errored`,tone:errored>0?"bad":stuck>0?"warn":"ok"})}if(gsheet.data){const d=gsheet.data;const errored=d.errored??0;const stuck=d.stuck??0;tiles.push({key:"gsheet",title:"Worksheet",detail:`${d.pending??0} pending \xb7 ${errored} errored`,tone:errored>0?"bad":stuck>0?"warn":"ok"})}if(github.data){const list=github.data.list??[];const repos=list.length;tiles.push({key:"runners",title:"Runners GitHub",detail:`${repos} repos surveill\xe9s`,tone:0===repos?"bad":"ok"})}if(0===tiles.length)return null;return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.SimpleGrid,{cols:Math.min(tiles.length,3),children:tiles.map(t=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Card,{withBorder:true,radius:"md",p:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",align:"flex-start",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:600,children:t.title}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:toneColor(t.tone),variant:"light",children:toneLabel(t.tone)})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",c:"dimmed",mt:4,children:t.detail})]},t.key))})}function App(){const dashboardResult=useDashboardQuery();const dashboard=dashboardResult.data;return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Container,{fluid:true,my:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"lg",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(PageHeader.m,{title:"Sant\xe9",leading:/*#__PURE__*/(0,jsx_runtime.jsx)(IconHealthCross.x,{size:26}),updatedAt:dashboardResult.dataUpdatedAt,isFetching:dashboardResult.isFetching,isError:dashboardResult.isError,onRefresh:()=>dashboardResult.refetch()}),/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,mb:"sm",children:"Sant\xe9 Syst\xe8me"}),/*#__PURE__*/(0,jsx_runtime.jsx)(SystemHealthStrip,{})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Divider,{}),/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,mb:"sm",children:"Int\xe9grations Produit"}),dashboard?/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:3,ml:dashboard.gsheet.globalProblem?-30:0,children:[dashboard.gsheet.globalProblem?/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.IconCross,{size:24,color:"red"}):/*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{}),"Worksheet"]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches non termin\xe9es"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:dashboard.gsheet.pending>50?"red":dashboard.gsheet.pending>30?"orange":"green",children:[dashboard.gsheet.pending," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"onglets"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fw:700,fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{span:true,c:"dimmed",children:["Le plus ancien date du :"," "]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:"bold",c:dashboard.gsheet.isPendingTooOld?"red":"green",children:dashboard.gsheet.oldest})]})]},"gsheet_pending")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"apart",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches en cours"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.gsheet.running," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,children:"onglets"})]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://github.com/airporting/gsheet_runner/actions",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]})},"gsheet_running")})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{order:3,children:"Synchro"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"T\xe2ches"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,c:"green",children:[dashboard.synchro.askedToday," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"initial",children:"aujourd'hui"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:700,c:"red",children:dashboard.synchro.errorsToday})," ","en erreur (~",((dashboard.synchro.errorsToday??0)*100/(dashboard.synchro.askedToday??1)).toFixed(2),"%)"]})]},"synchro_today")}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:6},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Paper,{withBorder:true,p:"md",radius:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"apart",children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",tt:"uppercase",fw:700,fz:"xs",children:"Actuellement"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Title,{order:4,children:[dashboard.synchro.running," ",/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,c:"initial",children:"en cours"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"apart",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"sm",mt:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{span:true,fw:700,children:dashboard.synchro.waiting})," ","en attente"]}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.AirButton,{variant:"subtle",color:"gray",href:"https://github.com/airporting/jobs_recipes_runner/actions/workflows/run-recipe.yml",children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconGithub.U,{size:20})})]})]},"synchro_running")})]})]}):/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",children:"Chargement…"})]})]})})}var providers=__webpack_require__(7034);function Dashboard(props){return/*#__PURE__*/(0,jsx_runtime.jsx)(consume_shared_module_default_react_strict_.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(providers.C,{...props,children:/*#__PURE__*/(0,jsx_runtime.jsx)(App,{})})})}}}]);