Switch to unified view

a/tool/run/plugins/basic/pluginSearch.java b/tool/run/plugins/basic/pluginSearch.java
...
...
27
import ssdeep.SpamSumSignature;
27
import ssdeep.SpamSumSignature;
28
import ssdeep.ssdeep;
28
import ssdeep.ssdeep;
29
import main.core;
29
import main.core;
30
import utils.html;
30
import utils.html;
31
import www.RequestOrigin;
31
import www.RequestOrigin;
32
import www.Table;
32
import www.WebRequest;
33
import www.WebRequest;
33
34
34
35
35
/**
36
/**
36
 *
37
 *
...
...
127
            // start by looking at the components
128
            // start by looking at the components
128
//            String matchComponentName =
129
//            String matchComponentName =
129
//                searchListSPDX(core.components, searchTerm, "Library");
130
//                searchListSPDX(core.components, searchTerm, "Library");
130
            // look in products now
131
            // look in products now
131
            String matchProductName =
132
            String matchProductName =
132
                searchListSPDX(core.products, searchTerm, "Products");
133
                searchListSPDX(core.products, searchTerm, definition.nodeSoftware);
133
            
134
            
134
                    // compile all the results together
135
                    // compile all the results together
135
            output =  //matchComponentName
136
            output =  //matchComponentName
136
                     matchProductName;
137
                     matchProductName;
137
        }
138
        }
...
...
143
//            long timeElapsed = timeFinish - timeStart;
144
//            long timeElapsed = timeFinish - timeStart;
144
            
145
            
145
            // add the grey text with a short summary
146
            // add the grey text with a short summary
146
            output = 
147
            output = 
147
                      html.div() 
148
                      html.div() 
149
                    + html.br
148
                    + html.textGrey(resultCounter + " results found") 
150
                    + html.textGrey(resultCounter + " results found") 
149
//                    + utils.time.timeNumberToHumanReadable(timeElapsed)
151
//                    + utils.time.timeNumberToHumanReadable(timeElapsed)
150
                    //+ html.br 
152
                    //+ html.br 
151
                    //+ html.br
153
                    //+ html.br
152
                    + html._div
154
                    + html._div
...
...
161
    
163
    
162
     /**
164
     /**
163
     * Allows to perform the list on a specific list of
165
     * Allows to perform the list on a specific list of
164
     * SPDX array files. This is intended to make the distinction
166
     * SPDX array files. This is intended to make the distinction
165
     * between the components and products
167
     * between the components and products
168
     * @param list
169
     * @param searchTerm
170
     * @param title
171
     * @return 
166
     */
172
     */
167
    public String searchListSPDX(ArrayList list, String searchTerm,
173
    public String searchListSPDX(ArrayList list, String searchTerm,
168
            String title){
174
            String title){
169
        String result = ""; 
175
        String result = ""; 
170
        String keyword = searchTerm.toLowerCase();
176
        String keyword = searchTerm.toLowerCase();
...
...
190
           int fileCounter = fileList.size();
196
           int fileCounter = fileList.size();
191
           
197
           
192
           // do we have any files to report?
198
           // do we have any files to report?
193
           if(fileCounter > 0){
199
           if(fileCounter > 0){
194
               String fileText = "";
200
               String fileText = "";
201
               int[] size = new int[]{18, 300}; 
195
                
202
               
196
               // create the file list
203
               // create the file list
197
               for(Object fileObject : fileList){
204
               for(Object fileObject : fileList){
198
                   FileInfo file = (FileInfo) fileObject;
205
                   FileInfo file = (FileInfo) fileObject;
199
                   // do the details about this file
206
                   // do the details about this file
200
                   String fileDetails = "";
207
                   String fileDetails = "";
...
...
236
                   if(file.tagFilePath != null){
243
                   if(file.tagFilePath != null){
237
                       filePath = " "  
244
                       filePath = " "  
238
                               + html.textGrey(file.tagFilePath.toString());
245
                               + html.textGrey(file.tagFilePath.toString());
239
                   }
246
                   }
240
                   
247
                   
248
                   
249
                   String[] params = new String[]{iconFile, 
250
                       html.linkNode(
251
                               file.tagFileName.toString(),
252
                               linkFileUID)
253
                           + fileDetails
254
                   };
255
                   
256
                   
241
                   fileText = fileText.concat(
257
                   fileText = fileText.concat(
258
                           Table.alignedTable(params, size)
242
                           iconFile
259
//                           iconFile
243
                           + html.linkNode(
260
//                           + html.linkNode(
244
                           file.tagFileName.toString(),
261
//                           file.tagFileName.toString(),
245
                           linkFileUID
262
//                           linkFileUID)
246
                           )
263
                           
247
                           + fileDetails
264
                                   
248
                           + "<code>" + filePath + "</code>"
265
                           + "<code>" + filePath + "</code>"
249
                           + html.br);
266
                           + html.br
267
                           + html.br
268
                   );
250
                   
269
                   
251
                  // file.print();
270
                  // file.print();
252
               }
271
               }
253
               
272
               
254
               // use correct grammar
273
               // use correct grammar
...
...
276
                       + fileCounter 
295
                       + fileCounter 
277
                       + " "
296
                       + " "
278
                       +fileDesc
297
                       +fileDesc
279
                       +")</i> "
298
                       +")</i> "
280
                       + matchTitle
299
                       + matchTitle
300
                       + html.br
281
                       + html.br
301
                       + html.br
282
                       + "<div style=\"margin-left: 10px;\">"
302
                       + "<div style=\"margin-left: 10px;\">"
283
                       //+ "<ul>"
303
                       //+ "<ul>"
284
                       + fileText
304
                       + fileText
285
                       //+ "</ul>"
305
                       //+ "</ul>"