Changeset 420 for gssim_ui/branches


Ignore:
Timestamp:
08/21/12 12:16:49 (13 years ago)
Author:
mcichenski
Message:
 
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  
    5454                        gannt.init(); 
    5555                        //ganntChart.addChild(gannt); 
     56                         
     57                        gannt.service.getImageURLs(i); 
    5658                } 
    5759                 
     
    140142                                <charts:GanntChart scheduleViewerHeight="{this.height - 200}" scheduleViewerWidth="{this.width - 220}" id="gannt" /> 
    141143                        </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> 
    146151                        </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>--> 
    151152                </mx:TabNavigator> 
    152153                 
    153                 <s:Button label="LOAD" click="setCurrentExperiment()"/> 
     154                <s:Button label="LOAD" click="setCurrentExperiment()" visible="false" includeInLayout="false"/> 
    154155        </mx:Canvas> 
    155156</mx:VBox> 
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudio.java

    r416 r420  
    11961196        } 
    11971197         
     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         
    11981205        protected GSSimStudioModel delegateGannt(Object[] parameters, Integer index) { 
    11991206                GSSimStudioModel gssimStudioModel = getModel(); 
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GanntChart.java

    r391 r420  
    105105    private ServiceLog log = ServiceLog.getInstance(GanntChart.class); 
    106106     
     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     
    107210    @BlazeDsMethod() 
    108211        public GanntChartModel getTasksAllocationsFromDb(Integer expId) { 
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GanntChartModel.java

    r22 r420  
    4141        private String error; 
    4242        private List allocationList; 
     43        private ArrayList imageFileList = new ArrayList(); 
    4344        /* END OF DB DATA */ 
    4445         
     
    5960                this.allocationList = allocationList; 
    6061        } 
     62         
     63        public ArrayList getImageFileList(){ 
     64        return imageFileList; 
     65    } 
     66 
     67    public void setImageFileList(ArrayList imageFileList){ 
     68        this.imageFileList=imageFileList; 
     69    } 
    6170} 
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/en_US/ArchiveViewer.properties

    r416 r420  
    1616 
    1717Basic=Basic info 
    18 Resource=Resource chart 
     18Resource=Column chart 
    1919Task=Gannt chart 
    2020Line=Line chart 
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/pl_PL/ArchiveViewer.properties

    r416 r420  
    2020 
    2121Basic=Informacje podstawowe 
    22 Resource=Wykres zasobów 
     22Resource=Wykres słupkowy 
    2323Task=Wykres zadań (Gannt) 
    2424Line=Wykres liniowy 
Note: See TracChangeset for help on using the changeset viewer.