Skip to content

Commit

Permalink
Fixes #17093: Add \"technical preview\" status for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
ElaadF committed Apr 15, 2020
1 parent 20e7000 commit 2d82e70
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ class Boot extends Loggable {
override val shortName: String = sn
override val description: NodeSeq = <p>{p.name}</p>
override val version: PluginVersion = p.version
override val versionInfo: Option[String] = None
override val status: PluginStatus = AlwaysEnabledPluginStatus
override val init = ()
override val basePackage: String = p.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ trait DefaultPluginDef extends RudderPluginDef {
PluginVersion(0,0,1, s"ERROR-PARSING-VERSION: ${versionString}")
)
}
override lazy val versionInfo = {
try {
Some(buildConf.getString("version-info"))
} catch {
case e:ConfigException.Missing => None
}
}


override def description : NodeSeq = (
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ trait RudderPluginDef {
*/
def version : PluginVersion

/**
* Additional information about the version. I.E : "technical preview"
*/
def versionInfo : Option[String]




/*
* Information about the plugin activation status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,17 @@ class PluginManagement extends DispatchSnippet with Loggable {

private[this] def displayPlugin(p:RudderPluginDef)(xml:NodeSeq) : NodeSeq = {
(
"data-plugin=name *" #> p.displayName &
"data-plugin=name *" #> {
p.versionInfo match {
case Some(info) =>
<h4 class="page-subtitle">
{p.displayName}
<span class="badge-plugin-version">{info}</span>
</h4>
case None =>
<h4 class="page-subtitle">{p.displayName}</h4>
}
} &
"data-plugin=fullid" #> p.name.value &
"data-plugin=baseclass" #> p.id &
"data-plugin=version" #> p.version.toString &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ <h3 class="page-title">Plugins</h3>

<div class="lift:administration.PluginManagement.display">
<div class="inner-portlet">
<h4 class="page-subtitle" data-plugin="name">[Here comes the plugins name]</h4>
<div data-plugin="name"></div>


<div class="col-xs-12 callout-fade callout-info">
<div class="marker">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,16 @@ table .innerDetails li{
padding: 0 10px;
}

.badge-plugin-version{
margin-left:15px;
display: inline-block;
background-color: #FFEAD1;
color: #f08004;
padding: 5px;
border-radius: 3px;
font-size:12px;
font-weight:bold;
}
/*************************
* Misc
**************************/
Expand Down

0 comments on commit 2d82e70

Please sign in to comment.