Permalink
Browse files

changed folder for samples installation from bi-developers to plugin-…

…samples. If plugin.xml has an element named changelog, this info will be shown on plugin list.
  • Loading branch information...
1 parent d1ca8a9 commit 572ee53705fa2dedcf08e0153a6b9036a0f4f943 @pamval pamval committed with wgorman Jan 3, 2012
@@ -9,7 +9,7 @@
<created_user>-</created_user>
<created_date>2011&#47;10&#47;09 16:08:24.678</created_date>
<modified_user>-</modified_user>
- <modified_date>2011&#47;12&#47;29 21:52:55.450</modified_date>
+ <modified_date>2012&#47;01&#47;03 09:57:07.528</modified_date>
<parameters>
<parameter>
<name>downloadDestination</name>
@@ -540,7 +540,7 @@
<yloc>283</yloc>
</entry>
<entry>
- <name>bi-developers exist?</name>
+ <name>plugin-samples exist?</name>
<description/>
<type>FILES_EXIST</type>
<filename/>
@@ -556,16 +556,16 @@
<yloc>262</yloc>
</entry>
<entry>
- <name>Create bi-developers</name>
+ <name>Create plugin-samples</name>
<description/>
<type>CREATE_FOLDER</type>
<foldername>${samplesDir}</foldername>
<fail_of_folder_exists>Y</fail_of_folder_exists>
<parallel>N</parallel>
<draw>Y</draw>
<nr>0</nr>
- <xloc>1276</xloc>
- <yloc>258</yloc>
+ <xloc>1258</xloc>
+ <yloc>261</yloc>
</entry>
<entry>
<name>Create index.xml</name>
@@ -588,8 +588,8 @@
<createParentFolder>N</createParentFolder>
<appendFile>N</appendFile>
<content>&lt;index&gt;
- &lt;name&gt;%name&lt;&#47;name&gt;
- &lt;description&gt;%description&lt;&#47;description&gt;
+ &lt;name&gt;Plugins Samples&lt;&#47;name&gt;
+ &lt;description&gt;Plugins Samples&lt;&#47;description&gt;
&lt;icon&gt;samples.png&lt;&#47;icon&gt;
&lt;visible&gt;true&lt;&#47;visible&gt;
&lt;display-type&gt;icons&lt;&#47;display-type&gt;
@@ -602,32 +602,6 @@
<yloc>264</yloc>
</entry>
<entry>
- <name>Make Sure visible is true on index.xml</name>
- <description/>
- <type>SHELL</type>
- <filename/>
- <work_directory>${samplesDir}</work_directory>
- <arg_from_previous>N</arg_from_previous>
- <exec_per_row>N</exec_per_row>
- <set_logfile>Y</set_logfile>
- <logfile>testLog.log</logfile>
- <set_append_logfile>N</set_append_logfile>
- <logext/>
- <add_date>N</add_date>
- <add_time>N</add_time>
- <insertScript>Y</insertScript>
- <script>cat index.xml | sed &apos;s#\(&lt;visible&gt;\)false\(&lt;&#47;visible&gt;\)#\1&apos;true&apos;\2#g&apos; &gt; a.xml
-mv a.xml index.xml
-echo &quot;0&quot;
-</script>
- <loglevel>Basic</loglevel>
- <parallel>N</parallel>
- <draw>Y</draw>
- <nr>0</nr>
- <xloc>1145</xloc>
- <yloc>355</yloc>
- </entry>
- <entry>
<name>Samples url exists? 2</name>
<description/>
<type>SIMPLE_EVAL</type>
@@ -868,16 +842,16 @@ echo &quot;0&quot;
<unconditional>N</unconditional>
</hop>
<hop>
- <from>bi-developers exist?</from>
- <to>Create bi-developers</to>
+ <from>plugin-samples exist?</from>
+ <to>Create plugin-samples</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
- <from>Create bi-developers</from>
+ <from>Create plugin-samples</from>
<to>Create index.xml</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
@@ -895,57 +869,48 @@ echo &quot;0&quot;
<unconditional>N</unconditional>
</hop>
<hop>
- <from>bi-developers exist?</from>
- <to>Make Sure visible is true on index.xml</to>
+ <from>Copy to Destination</from>
+ <to>Samples url exists? 2</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
- <from>Write to index.xml</from>
- <to>Make Sure visible is true on index.xml</to>
- <from_nr>0</from_nr>
- <to_nr>0</to_nr>
- <enabled>Y</enabled>
- <evaluation>N</evaluation>
- <unconditional>Y</unconditional>
- </hop>
- <hop>
- <from>Make Sure visible is true on index.xml</from>
- <to>Does Samples Already Exist?</to>
+ <from>Samples url exists? 2</from>
+ <to>plugin-samples exist?</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
- <from>Copy to Destination</from>
- <to>Samples url exists? 2</to>
+ <from>Samples url exists? 2</from>
+ <to>Delete Staging</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
- <evaluation>Y</evaluation>
+ <evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
- <from>Samples url exists? 2</from>
- <to>bi-developers exist?</to>
+ <from>Write to index.xml</from>
+ <to>Does Samples Already Exist?</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
- <evaluation>Y</evaluation>
- <unconditional>N</unconditional>
+ <evaluation>N</evaluation>
+ <unconditional>Y</unconditional>
</hop>
<hop>
- <from>Samples url exists? 2</from>
- <to>Delete Staging</to>
+ <from>plugin-samples exist?</from>
+ <to>Does Samples Already Exist?</to>
<from_nr>0</from_nr>
<to_nr>0</to_nr>
<enabled>Y</enabled>
- <evaluation>N</evaluation>
+ <evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
</hops>
@@ -181,22 +181,25 @@
function renderPlugin(plugin) {
- var html = "<table width=\"100%\"><tr><td rowspan=\"3\"><img src=\"" + plugin.img + "\" width=\"50\" height=\"50\" style=\"width:45px;height:45px\"></td>";
+ var html = "<table width=\"100%\"><tr><td rowspan=\"4\"><img src=\"" + plugin.img + "\" width=\"50\" height=\"50\" style=\"width:45px;height:45px\"></td>";
html += "<td width=\"400\"><span style=\"font-size: 20px; font-weight: bold;\">" + plugin.name + "</span> <span style=\"font-size: 14px;\">version ";
if (!plugin.installed) {
html += plugin.availableVersion + "</span></td>";
- html += "<td rowspan=\"3\" valign=\"top\" align=\"right\"><a href=\"javascript:installNow('" + plugin.id + "')\" style=\"font-size:20px;text-decoration: none;\">Install Now</a></td></tr>";
+ html += "<td rowspan=\"4\" valign=\"top\" align=\"right\"><a href=\"javascript:installNow('" + plugin.id + "')\" style=\"font-size:20px;text-decoration: none;\">Install Now</a></td></tr>";
} else {
html += plugin.installedVersion + "</span></td>";
- html += "<td rowspan=\"3\" valign=\"top\" align=\"right\">";
+ html += "<td rowspan=\"4\" valign=\"top\" align=\"right\">";
if (plugin.installedVersion == plugin.availableVersion) {
html += "<br><br><br>";
} else {
html += "<a href=\"javascript:installNow('" + plugin.id + "')\" style=\"font-size:20px;text-decoration: none;\">Upgrade to</a><br>" + plugin.availableVersion;
}
html += "<br><br><a href=\"javascript:uninstall('" + plugin.id + "')\" style=\"font-size:20px;text-decoration: none;\">Uninstall</a></td></tr>";
}
- html += "<tr><td>" + plugin.description + " <a href=\"" + plugin.learnMoreUrl + "\">Learn More...</a></td></tr><tr><td>by <a href=\"" + plugin.companyUrl + "\">" + plugin.company + "</a></td></tr>";
+ html += "<tr><td>" + plugin.description + " <a href=\"" + plugin.learnMoreUrl + "\">Learn More...</a></td></tr>";
+ if (plugin.changelog && plugin.changelog != "")
+ html += "<tr><td><span style='font-weight:bold;'> Changelog for version " +plugin.availableVersion + ": </span><br/>" + plugin.changelog.replace(/\n/g, '<br/>') + "</td></tr>";
+ html += "<tr><td>by <a href=\"" + plugin.companyUrl + "\">" + plugin.company + "</a></td></tr>";
html += "</table>";
return html;
}
@@ -116,7 +116,7 @@ public StatusMessage uninstallPlugin(String id) throws MarketplaceSecurityExcept
job.getJobMeta().setParameterValue("uninstallLocation",PentahoSystem.getApplicationContext().getSolutionPath("system/"+ toUninstall.getId()));
job.getJobMeta().setParameterValue("uninstallBackup",PentahoSystem.getApplicationContext().getSolutionPath("system/plugin-cache/backups/" + toUninstall.getId() + "_" + new Date().getTime()));
if (toUninstall.getSamplesDownloadUrl() != null){
- job.getJobMeta().setParameterValue("samplesUninstallLocation",PentahoSystem.getApplicationContext().getSolutionPath("bi-developers/"+ toUninstall.getId()));
+ job.getJobMeta().setParameterValue("samplesUninstallLocation",PentahoSystem.getApplicationContext().getSolutionPath("plugin-samples/"+ toUninstall.getId()));
job.getJobMeta().setParameterValue("samplesUninstallBackup",PentahoSystem.getApplicationContext().getSolutionPath("system/plugin-cache/backups/" + toUninstall.getId() + "_samples_" + new Date().getTime()));
}
job.copyParametersFrom(job.getJobMeta());
@@ -178,8 +178,8 @@ public StatusMessage installPlugin(String id) throws MarketplaceSecurityExceptio
job.getJobMeta().setParameterValue("downloadUrl", toInstall.getDownloadUrl());
if (toInstall.getSamplesDownloadUrl() != null){
job.getJobMeta().setParameterValue("samplesDownloadUrl", toInstall.getSamplesDownloadUrl());
- job.getJobMeta().setParameterValue("samplesDir", PentahoSystem.getApplicationContext().getSolutionPath("bi-developers"));
- job.getJobMeta().setParameterValue("samplesTargetDestination", PentahoSystem.getApplicationContext().getSolutionPath("bi-developers/"+ toInstall.getId()));
+ job.getJobMeta().setParameterValue("samplesDir", PentahoSystem.getApplicationContext().getSolutionPath("plugin-samples"));
+ job.getJobMeta().setParameterValue("samplesTargetDestination", PentahoSystem.getApplicationContext().getSolutionPath("plugin-samples/"+ toInstall.getId()));
job.getJobMeta().setParameterValue("samplesTargetBackup", PentahoSystem.getApplicationContext().getSolutionPath("system/plugin-cache/backups/" + toInstall.getId() + "_samples_" + new Date().getTime()));
job.getJobMeta().setParameterValue("samplesDownloadDestination",PentahoSystem.getApplicationContext().getSolutionPath("system/plugin-cache/downloads/" + toInstall.getId() + "-samples-" + toInstall.getAvailableVersion() + ".zip"));
job.getJobMeta().setParameterValue("samplesStagingDestination",PentahoSystem.getApplicationContext().getSolutionPath("system/plugin-cache/staging_samples"));
@@ -382,6 +382,7 @@ protected String getInstalledVersion(String pluginId) {
plugin.setImg(getElementChildValue(element, "img"));
plugin.setLearnMoreUrl(getElementChildValue(element, "learnMoreUrl"));
plugin.setName(getElementChildValue(element, "name"));
+ plugin.setChangelog(getElementChildValue(element, "changelog"));
pluginArr[i] = plugin;
}
return pluginArr;
@@ -34,6 +34,7 @@
private String company;
private String companyUrl;
private String installedVersion;
+ private String changelog;
private boolean installed;
public Plugin() {}
@@ -145,4 +146,15 @@ public boolean isInstalled() {
public void setInstalled(boolean installed) {
this.installed = installed;
}
+
+
+ public String getChangelog() {
+ return changelog;
+ }
+
+ public void setChangelog(String changelog) {
+ this.changelog = changelog;
+ }
+
+
}

0 comments on commit 572ee53

Please sign in to comment.