I have been playing with plugins for a while. Due to frequent plugin updates I missed information on deployed plugin assembly version.
A simple solution follows:
Additional column is added in /Schema/PagePlugin.xml
Code: ...
<column Name="Description" Label="Assembly version" DataIndexInList="Description">
<list width="200" sortable="false"/>
</column>
</columns>
</schema>
PagePluginController (Everest.CmsServices.Controllers) GetFiles method returs an extra column with assembly version info:
Code: [PermissionFilter(Permission = FolderType.PagePlugin)]
public ActionResult GetFiles()
{
string applicationName = Request.Form["application"];
List<FolderFile> folderFiles = AssemblyFileManager.GetAssemblyFiles(applicationName);
ExtJsonReaderObject jsonReader = new ExtJsonReaderObject(folderFiles.Select(a => new {
FileName = a.FileName,
FilePath = a.FilePath,
Application = a.Application,
Description = GetAssemblyFileDescription(CmsGlobal.ToAbsolutePath(a.FilePath))
}), folderFiles.Count());
// ExtJsonReaderObject jsonReader = new ExtJsonReaderObject(folderFiles, folderFiles.Count);
return Json(jsonReader);
}
... using helper method:
Code: /// <summary> Get assembly description without locking the file </summary>
/// <param name="fullFilename"> Assembly filename </param>
private string GetAssemblyFileDescription(string fullFilename)
{
try
{
System.Reflection.AssemblyName name = System.Reflection.AssemblyName.GetAssemblyName(fullFilename);
return string.Format("{0}", name.Version);
}
catch
{
return "??";
}
}