Explorar el Código

Fix Typescript errors

As a result of upgrading the Typescript library, new errors were
identified.
Sergiu Miclea hace 4 años
padre
commit
0605bd7394

+ 1 - 1
server/api/LogosApi.ts

@@ -28,7 +28,7 @@ const getModJsonProviders = (jsonPath: string) => {
 const getOptimalLogoHeightKey = (
   availableHeightKeys: string[],
   requestedHeight: number,
-  style: string | null,
+  style?: string | null,
 ): string => {
   let heightKeys = availableHeightKeys
   if (style) {

+ 1 - 1
src/components/modules/DetailsModule/DetailsPageHeader/DetailsPageHeader.tsx

@@ -106,7 +106,7 @@ class DetailsPageHeader extends React.Component<Props, State> {
     }
 
     await notificationStore.loadData(showLoading)
-    this.pollTimeout = setTimeout(() => { this.pollData() }, 15000)
+    this.pollTimeout = window.setTimeout(() => { this.pollData() }, 15000)
   }
 
   render() {

+ 1 - 1
src/components/modules/EndpointModule/EndpointModal/EndpointModal.tsx

@@ -489,7 +489,7 @@ class EndpointModal extends React.Component<Props, State> {
   render() {
     if (endpointStore.validation && endpointStore.validation.valid
       && !this.closeTimeout) {
-      this.closeTimeout = setTimeout(() => {
+      this.closeTimeout = window.setTimeout(() => {
         this.props.onCancelClick({ autoClose: true })
       }, 2000)
     }

+ 1 - 1
src/components/modules/NavigationModule/Navigation/Navigation.tsx

@@ -305,7 +305,7 @@ class Navigation extends React.Component<Props> {
       return
     }
 
-    this.resizeTimeout = setTimeout(() => {
+    this.resizeTimeout = window.setTimeout(() => {
       this.resizeTimeout = null
       this.toggleMenu(window.outerWidth <= ThemeProps.mobileMaxWidth)
     }, 100)

+ 1 - 1
src/components/modules/WizardModule/WizardInstances/WizardInstances.tsx

@@ -192,7 +192,7 @@ class WizardInstances extends React.Component<Props, State> {
   handleSeachInputChange(searchText: string) {
     clearTimeout(this.timeout)
     this.setState({ searchText })
-    this.timeout = setTimeout(() => {
+    this.timeout = window.setTimeout(() => {
       this.props.onSearchInputChange(searchText)
     }, 500)
   }

+ 2 - 2
src/components/smart/AssessmentsPage/AssessmentsPage.tsx

@@ -182,7 +182,7 @@ class AssessmentsPage extends React.Component<Props, State> {
 
     if (!connectionInfo || !connectionInfo.subscription_id
       || !selectedResourceGroup || !selectedResourceGroup.name) {
-      this.pollTimeout = setTimeout(() => {
+      this.pollTimeout = window.setTimeout(() => {
         this.pollData()
       }, configLoader.config.requestPollTimeout)
       return
@@ -195,7 +195,7 @@ class AssessmentsPage extends React.Component<Props, State> {
       userStore.loggedUser ? userStore.loggedUser.project.id : '',
       { backgroundLoading: true, skipLog: true },
     ).then(() => {
-      this.pollTimeout = setTimeout(() => {
+      this.pollTimeout = window.setTimeout(() => {
         this.pollData()
       }, configLoader.config.requestPollTimeout)
     })

+ 1 - 1
src/components/smart/DashboardPage/DashboardPage.tsx

@@ -92,7 +92,7 @@ class ProjectsPage extends React.Component<{ history: any }, State> {
     }
 
     await this.loadData(showLoading)
-    this.pollTimeout = setTimeout(() => {
+    this.pollTimeout = window.setTimeout(() => {
       this.pollData(false)
     }, configLoader.config.requestPollTimeout)
   }

+ 1 - 1
src/components/smart/EndpointsPage/EndpointsPage.tsx

@@ -245,7 +245,7 @@ class EndpointsPage extends React.Component<{ history: any }, State> {
       migrationStore.getMigrations({ skipLog: true }),
       replicaStore.getReplicas({ skipLog: true }),
     ])
-    this.pollTimeout = setTimeout(() => { this.pollData() }, configLoader.config.requestPollTimeout)
+    this.pollTimeout = window.setTimeout(() => { this.pollData() }, configLoader.config.requestPollTimeout)
   }
 
   itemFilterFunction(item: any, filterItem?: string | null, filterText?: string) {

+ 1 - 1
src/components/smart/MigrationsPage/MigrationsPage.tsx

@@ -209,7 +209,7 @@ class MigrationsPage extends React.Component<{ history: any }, State> {
       endpointStore.getEndpoints({ skipLog: true }),
       userStore.getAllUsers({ skipLog: true, quietError: true }),
     ])
-    this.pollTimeout = setTimeout(() => { this.pollData() }, configLoader.config.requestPollTimeout)
+    this.pollTimeout = window.setTimeout(() => { this.pollData() }, configLoader.config.requestPollTimeout)
   }
 
   render() {

+ 1 - 1
src/components/smart/MinionPoolsPage/MinionPoolsPage.tsx

@@ -127,7 +127,7 @@ class MinionPoolsPage extends React.Component<RouteComponentProps, State> {
       minionPoolStore.loadMinionPools({ showLoading }),
     ])
 
-    this.pollTimeout = setTimeout(() => {
+    this.pollTimeout = window.setTimeout(() => {
       this.pollData(false)
     }, configLoader.config.requestPollTimeout)
   }

+ 1 - 1
src/components/smart/ProjectsPage/ProjectsPage.tsx

@@ -102,7 +102,7 @@ class ProjectsPage extends React.Component<{ history: any }, State> {
       projectStore.getProjects({ showLoading, skipLog: true }),
       projectStore.getRoleAssignments({ skipLog: true }),
     ])
-    this.pollTimeout = setTimeout(() => { this.pollData() }, configLoader.config.requestPollTimeout)
+    this.pollTimeout = window.setTimeout(() => { this.pollData() }, configLoader.config.requestPollTimeout)
   }
 
   itemFilterFunction(item: Project, _?: string | null, filterText?: string): boolean {

+ 2 - 2
src/components/smart/ReplicasPage/ReplicasPage.tsx

@@ -255,7 +255,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
     if (!this.schedulePolling) {
       this.pollSchedule()
     }
-    this.pollTimeout = setTimeout(() => { this.pollData() }, configLoader.config.requestPollTimeout)
+    this.pollTimeout = window.setTimeout(() => { this.pollData() }, configLoader.config.requestPollTimeout)
   }
 
   async pollSchedule() {
@@ -264,7 +264,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
     }
     this.schedulePolling = true
     await scheduleStore.getSchedulesBulk(this.paginatedReplicaIds)
-    this.schedulePollTimeout = setTimeout(() => {
+    this.schedulePollTimeout = window.setTimeout(() => {
       this.pollSchedule()
     }, SCHEDULE_POLL_TIMEOUT)
   }

+ 1 - 1
src/components/smart/UsersPage/UsersPage.tsx

@@ -87,7 +87,7 @@ class UsersPage extends React.Component<{ history: any }, State> {
     }
 
     await userStore.getAllUsers({ showLoading, skipLog: true })
-    this.pollTimeout = setTimeout(() => { this.pollData() }, configLoader.config.requestPollTimeout)
+    this.pollTimeout = window.setTimeout(() => { this.pollData() }, configLoader.config.requestPollTimeout)
   }
 
   itemFilterFunction(item: User, filterItem?: string | null, filterText?: string): boolean {

+ 1 - 1
src/components/ui/PageHeader/PageHeader.tsx

@@ -337,7 +337,7 @@ class PageHeader extends React.Component<Props, State> {
     }
 
     await notificationStore.loadData(showLoading)
-    this.pollTimeout = setTimeout(() => { this.pollData() }, 15000)
+    this.pollTimeout = window.setTimeout(() => { this.pollData() }, 15000)
   }
 
   render() {

+ 1 - 1
src/components/ui/ReloadButton/ReloadButton.tsx

@@ -58,7 +58,7 @@ class ReloadButton extends React.Component<Props> {
     }
 
     nonNullWrapper.className += ' reload-animation'
-    this.timeout = setTimeout(() => {
+    this.timeout = window.setTimeout(() => {
       nonNullWrapper.className = nonNullWrapper.className.substr(0, nonNullWrapper.className.indexOf(' reload-animation'))
       this.timeout = null
     }, 1000)

+ 1 - 1
src/components/ui/Tooltip/Tooltip.tsx

@@ -73,7 +73,7 @@ class Tooltip extends React.Component<{}> {
     if (this.intervalId) {
       return
     }
-    this.intervalId = setInterval(() => {
+    this.intervalId = window.setInterval(() => {
       ReactTooltip.rebuild()
     }, 1000)
   }

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 517 - 600
yarn.lock


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio