Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #15148: Add search/pagination to eventlogs UI #2465

Conversation

ElaadF
Copy link
Member

@ElaadF ElaadF commented Sep 17, 2019

@ElaadF
Copy link
Member Author

ElaadF commented Sep 20, 2019

PR rebased

@ElaadF ElaadF force-pushed the ust_15148/add_search_pagination_to_eventlogs_ui branch from 92067f2 to a0ad2fa Compare September 20, 2019 08:32
@@ -374,6 +374,8 @@ trait EventLogRepository {
*/
def getEventLogByCriteria(criteria: Option[String], limit :Option[Int] = None, orderBy: Option[String] = None) : IOResult[Vector[EventLog]]

def count: IOResult[Long]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename method to getEventLogCount

* For now, config properties can only be loaded from either
* a file in the classpath, or a file in the file system.
*/
sealed trait ConfigResource
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don'tthink this should be here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you don't need that file

import com.normation.rudder.domain.policies._
import com.normation.rudder.repository.ldap.{LDAPEntityMapper, RoLDAPNodeGroupRepository, RoLDAPRuleRepository, ScalaLock}
import com.normation.rudder.web.model.LinkUtil
import RudderProperties._
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should use properties here, what is used in RudderProperties ?

@@ -0,0 +1,257 @@
/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That code should be removed from Rudder-web

@@ -98,6 +98,11 @@ along with Rudder. If not, see <http://www.gnu.org/licenses/>.
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.security</groupId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is used By RUdderProperties but i do feel we shouldn't have RudderProperties in Rudder-rest only in Rudder-web

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ElaadF is it compiling without that dependency ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok it's a dependency used in CurrentUserService

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be remvoed from rudder-web/pom.xml (if no compilation problem)

@@ -80,6 +80,7 @@ import com.normation.rudder.rule.category.RoRuleCategoryRepository
import org.joda.time.format.DateTimeFormat
import com.normation.rudder.web.model.LinkUtil
import org.joda.time.format.ISODateTimeFormat
import scala.concurrent.Future
import com.normation.box._

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to delete the code that is not used anymore to display a events here

@ElaadF ElaadF force-pushed the ust_15148/add_search_pagination_to_eventlogs_ui branch from a0ad2fa to bcccff8 Compare September 26, 2019 14:13
@ElaadF
Copy link
Member Author

ElaadF commented Sep 26, 2019

Commit modified

@ElaadF ElaadF force-pushed the ust_15148/add_search_pagination_to_eventlogs_ui branch from bcccff8 to 3a93653 Compare September 26, 2019 14:23
@ElaadF
Copy link
Member Author

ElaadF commented Sep 26, 2019

Commit modified

@@ -0,0 +1,1567 @@
/*
*************************************************************************************
* Copyright 2011 Normation SAS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the year to 2019 ?

@@ -0,0 +1,64 @@
package com.normation.rudder.web.services
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can You add the License ?

@@ -0,0 +1,71 @@
/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you deleted the original file in rudder-web ? it should have been a git mv command ! just rm JsTableData.scala file in rudder-web it should link it

@ElaadF ElaadF force-pushed the ust_15148/add_search_pagination_to_eventlogs_ui branch from 3a93653 to 6d1ce91 Compare September 26, 2019 16:26
@ElaadF
Copy link
Member Author

ElaadF commented Sep 26, 2019

Commit modified

@ElaadF
Copy link
Member Author

ElaadF commented Sep 26, 2019

PR rebased

@ElaadF ElaadF force-pushed the ust_15148/add_search_pagination_to_eventlogs_ui branch from 6d1ce91 to b85d6f6 Compare September 26, 2019 16:27
@ElaadF ElaadF force-pushed the ust_15148/add_search_pagination_to_eventlogs_ui branch from b85d6f6 to d30aef2 Compare September 26, 2019 16:36
@ElaadF
Copy link
Member Author

ElaadF commented Sep 26, 2019

Commit modified

@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit d30aef2 into Normation:branches/rudder/5.1 Sep 26, 2019
case _ => None
})
val htmlDetails = eventLogDetail.displayDetails(eventLog, crid)
toJsonResponse(None, "content" -> htmlDetails.toString())("eventdetails", prettify = false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toString here breaks JS script that used to be returned along with the HTML to diplay diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants