Changeset 420 for gssim_ui/branches
- Timestamp:
- 08/21/12 12:16:49 (13 years ago)
- Location:
- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/gssim/editors/archive/ExperimentStatisticsWindow.mxml
r237 r420 54 54 gannt.init(); 55 55 //ganntChart.addChild(gannt); 56 57 gannt.service.getImageURLs(i); 56 58 } 57 59 … … 140 142 <charts:GanntChart scheduleViewerHeight="{this.height - 200}" scheduleViewerWidth="{this.width - 220}" id="gannt" /> 141 143 </mx:VBox> 142 <!-- 143 <mx:VBox width="100%" height="100%" id="lineChart" label="{resourceManager.getString('ArchiveViewer', 'Line')}"> 144 <charts:ScheduleViewer width="100%" height="100%" /> 145 <mx:Label text="line chart"/> 144 <mx:VBox width="100%" height="100%" id="ganntImgChart" label="{resourceManager.getString('ArchiveViewer', 'Task')}"> 145 <mx:HBox> 146 <mx:Canvas width="100%" height="100%" backgroundColor="white" id="canvas"> 147 <components:MultiImageContainer id="mimg" /> 148 </mx:Canvas> 149 <components:MultiImageNavigator id="nav" width="300" height="300" /> 150 </mx:HBox> 146 151 </mx:VBox> 147 <mx:VBox width="100%" height="100%" id="anyChart" label="{resourceManager.getString('ArchiveViewer', 'Other')}">148 <charts:ScheduleViewer width="100%" height="100%" />149 <mx:Label text="other chart"/>150 </mx:VBox>-->151 152 </mx:TabNavigator> 152 153 153 <s:Button label="LOAD" click="setCurrentExperiment()" />154 <s:Button label="LOAD" click="setCurrentExperiment()" visible="false" includeInLayout="false"/> 154 155 </mx:Canvas> 155 156 </mx:VBox> -
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudio.java
r416 r420 1196 1196 } 1197 1197 1198 @BlazeDsMethod() 1199 public GSSimStudioModel getImageURLs(int index, Integer expId) { 1200 ServiceContext serviceContext = VineFlexUtilClass.getServiceContext(); 1201 FileResourceManager fileResourceManager = getFileResourceManager(serviceContext); 1202 return delegateGannt(new Object[]{expId, fileResoureceManager}, index); 1203 } 1204 1198 1205 protected GSSimStudioModel delegateGannt(Object[] parameters, Integer index) { 1199 1206 GSSimStudioModel gssimStudioModel = getModel(); -
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GanntChart.java
r391 r420 105 105 private ServiceLog log = ServiceLog.getInstance(GanntChart.class); 106 106 107 public GanntChartModel getImageURLs(Integer expId, FileResourceManager fileResourceManager) throws IOException { 108 GanntChartModel model = (GanntChartModel) VineFlexUtilClass.getUIModel(); 109 log.debug("loadFileLocationItems images"); 110 111 String url = "gsiftp://gssim.man.poznan.pl:2811/usr/local/admin/gssim/images/"+ expId + "/?filetype=directory"; 112 113 // Create file location for url 114 FileLocation folderLocation = new FileLocation(url); 115 116 // Get file manager for given location 117 FileManager fileManager = fileResourceManager.createFileManager(folderLocation); 118 119 // List workload files 120 ArrayList<HashMap> fileLocationItemList = new ArrayList<HashMap>(); 121 model.setImageFileList(fileLocationItemList); 122 loadFileLocationItemsForCurrentLocation(model, fileManager, fileLocationItemList); 123 124 return model; 125 } 126 127 public void loadFileLocationItemsForCurrentLocation(GanntChartModel fileListComModel, FileManager fileManager, ArrayList<HashMap> fileLocationItemList) throws IOException { 128 129 log.debug("loadFileLocationItemsForCurrentLocation images"); 130 131 try { 132 133 134 // Update current folder location 135 /*FileLocation folderLocation = fileManager.getCurrentLocation(); 136 137 // Current location item 138 HashMap<String, String> currentLocationItem = new HashMap<String, String>(); 139 fileListComModel.setCurrentLocationItem(currentLocationItem); 140 141 currentLocationItem.put("real_path", folderLocation.getFilePath()); 142 currentLocationItem.put("path", fileManager.getCurrentDirectory()); 143 currentLocationItem.put("url", folderLocation.getUrl()); 144 currentLocationItem.put("downloadUrl", VineFlexUtilClass.getDownloadURL(folderLocation)); 145 */ 146 // List files in defafult directory 147 List<? extends FileLocation> fileLocationList; 148 try { 149 150 fileLocationList = fileManager.list(); 151 152 } catch (Exception e) { 153 log.error("Error occured during list", e); 154 return; 155 } 156 157 //String fileDownloadServletUrl = FileDownloadServlet.getResourceUrl(); 158 159 for (FileLocation fileLocation : fileLocationList) { 160 161 HashMap<String, String> fileLocationItem = new HashMap<String, String>(); 162 fileLocationItemList.add(fileLocationItem); 163 164 // File url (not displayed?) 165 String fileUrl = fileLocation.getUrl(); 166 fileLocationItem.put("fileUrl", fileUrl); 167 168 String fileUrlWithoutQuery = fileLocation.getUrlWithoutQuery(); 169 fileLocationItem.put("fileUrlWithoutQuery", fileUrlWithoutQuery); 170 171 // File name 172 String fileName = fileLocation.getFileName(); 173 fileLocationItem.put("fileName", fileName); 174 175 // File type 176 FileType fileType = fileLocation.getFileType(); 177 fileLocationItem.put("fileType", fileType.getName()); 178 179 // Date modified column 180 181 long dateLastModified = fileLocation.getDateLastModified(); 182 183 fileLocationItem.put("dateModified", String.valueOf(dateLastModified)); 184 185 // Date modified column 186 //fileLocationItem.put("dateModifiedText", DateUtil.getLocalizedDate(dateLastModified, DateFormat.MEDIUM, DateFormat.MEDIUM)); 187 188 // File size column 189 long fileSize = fileLocation.getFileSize(); 190 fileLocationItem.put("fileSize", String.valueOf(fileSize)); 191 192 // File size column 193 fileLocationItem.put("fileSizeText", String.valueOf(fileSize) + " bytes"); 194 195 fileLocationItem.put("folderUrl", folderLocation.getUrl()); 196 197 // Download url 198 if (fileType.equals(FileType.FILE)) { 199 //fileLocationItem.put("fileDownloadUrl", FileDownloadServlet.getResourceUrlForFileLocation(fileLocation, false)); 200 } 201 } 202 203 log.debug("done"); 204 205 } catch (Exception e) { 206 log.error("Exception occurred during loadFileLocationGrid", e); 207 } 208 } 209 107 210 @BlazeDsMethod() 108 211 public GanntChartModel getTasksAllocationsFromDb(Integer expId) { -
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GanntChartModel.java
r22 r420 41 41 private String error; 42 42 private List allocationList; 43 private ArrayList imageFileList = new ArrayList(); 43 44 /* END OF DB DATA */ 44 45 … … 59 60 this.allocationList = allocationList; 60 61 } 62 63 public ArrayList getImageFileList(){ 64 return imageFileList; 65 } 66 67 public void setImageFileList(ArrayList imageFileList){ 68 this.imageFileList=imageFileList; 69 } 61 70 } -
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/en_US/ArchiveViewer.properties
r416 r420 16 16 17 17 Basic=Basic info 18 Resource= Resourcechart18 Resource=Column chart 19 19 Task=Gannt chart 20 20 Line=Line chart -
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/pl_PL/ArchiveViewer.properties
r416 r420 20 20 21 21 Basic=Informacje podstawowe 22 Resource=Wykres zasobów22 Resource=Wykres sÅupkowy 23 23 Task=Wykres zadaÅ (Gannt) 24 24 Line=Wykres liniowy
Note: See TracChangeset
for help on using the changeset viewer.