v++
Разобрался с форматами ячеек. числа надо было писать не переводя в String, тогда ошибки не показывает. Матрицы закинул в кавычки.
This commit is contained in:
1
.idea/workspace.xml
generated
1
.idea/workspace.xml
generated
@@ -8,6 +8,7 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/Repository/Component/Visualiser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Visualiser.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ExportTasksPackageToExcel.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ExportTasksPackageToExcel.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ExportTasksPackageToExcel.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ExportTasksPackageToExcel.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class Visualiser extends Component {
|
|||||||
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
||||||
@Override
|
@Override
|
||||||
public void GetVersionInfo() {
|
public void GetVersionInfo() {
|
||||||
version = 1047;
|
version = 1048;
|
||||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||||
date_text = df.format(getClassBuildTime());
|
date_text = df.format(getClassBuildTime());
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package Visual_DVM_2021.Passes.All;
|
package Visual_DVM_2021.Passes.All;
|
||||||
import Common.Current;
|
import Common.Current;
|
||||||
import Common.Global;
|
import Common.Global;
|
||||||
|
import Common.UI.Themes.FreeFortranSPFTokenMaker;
|
||||||
import Common.UI.UI;
|
import Common.UI.UI;
|
||||||
import Common.Utils.Files.VDirectoryChooser;
|
import Common.Utils.Files.VDirectoryChooser;
|
||||||
import Common.Utils.Index;
|
import Common.Utils.Index;
|
||||||
@@ -32,7 +33,6 @@ public class ExportTasksPackageToExcel extends Pass_2021<Vector<TasksPackage>> {
|
|||||||
Vector<CellStyle> styles;
|
Vector<CellStyle> styles;
|
||||||
//--
|
//--
|
||||||
Workbook book = null;
|
Workbook book = null;
|
||||||
// DataFormat format = null;
|
|
||||||
Sheet sheet = null;
|
Sheet sheet = null;
|
||||||
//--
|
//--
|
||||||
LinkedHashMap<Long, Vector<TestRunTask>> packages_tasks = null;
|
LinkedHashMap<Long, Vector<TestRunTask>> packages_tasks = null;
|
||||||
@@ -54,7 +54,6 @@ public class ExportTasksPackageToExcel extends Pass_2021<Vector<TasksPackage>> {
|
|||||||
book = null;
|
book = null;
|
||||||
sheet = null;
|
sheet = null;
|
||||||
styles = null;
|
styles = null;
|
||||||
// format = null;
|
|
||||||
packages_tasks = new LinkedHashMap<>();
|
packages_tasks = new LinkedHashMap<>();
|
||||||
target = null;
|
target = null;
|
||||||
//--
|
//--
|
||||||
@@ -133,14 +132,13 @@ public class ExportTasksPackageToExcel extends Pass_2021<Vector<TasksPackage>> {
|
|||||||
Row row = sheet.createRow(row_num);
|
Row row = sheet.createRow(row_num);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (Object value : values) {
|
for (Object value : values) {
|
||||||
String cell_text = value.toString();
|
// String cell_text = value.toString();
|
||||||
Cell cell = row.createCell(i);
|
Cell cell = row.createCell(i);
|
||||||
int style_index = 1;
|
int style_index = 1;
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 4:
|
case 4:
|
||||||
case 5:
|
case 5:
|
||||||
TaskState state = (TaskState) value;
|
TaskState state = (TaskState) value;
|
||||||
cell_text = state.getDescription();
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case FailedToQueue:
|
case FailedToQueue:
|
||||||
case NoSuchTask:
|
case NoSuchTask:
|
||||||
@@ -166,10 +164,24 @@ public class ExportTasksPackageToExcel extends Pass_2021<Vector<TasksPackage>> {
|
|||||||
style_index = 6;
|
style_index = 6;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
cell.setCellValue(state.getDescription());
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
case 8:
|
||||||
|
case 15:
|
||||||
|
cell.setCellValue((int)value);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
case 13:
|
||||||
|
case 14:
|
||||||
|
cell.setCellValue((double) value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
cell.setCellValue(value.toString());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
cell.setCellStyle(styles.get(style_index));
|
cell.setCellStyle(styles.get(style_index));
|
||||||
cell.setCellValue(cell_text);
|
|
||||||
//--
|
//--
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
@@ -205,6 +217,9 @@ public class ExportTasksPackageToExcel extends Pass_2021<Vector<TasksPackage>> {
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
String formatMatrix(String matrix){
|
||||||
|
return Utils.DQuotes(matrix.trim());
|
||||||
|
}
|
||||||
void createStyles() {
|
void createStyles() {
|
||||||
styles = new Vector<>();
|
styles = new Vector<>();
|
||||||
//0 - заголовок
|
//0 - заголовок
|
||||||
@@ -216,7 +231,7 @@ public class ExportTasksPackageToExcel extends Pass_2021<Vector<TasksPackage>> {
|
|||||||
//6 - серый
|
//6 - серый
|
||||||
for (int i = 0; i < 6; ++i) {
|
for (int i = 0; i < 6; ++i) {
|
||||||
CellStyle style = book.createCellStyle();
|
CellStyle style = book.createCellStyle();
|
||||||
// style.setDataFormat(format.getFormat("@"));
|
style.setAlignment(CellStyle.ALIGN_LEFT);
|
||||||
Font font = book.createFont();
|
Font font = book.createFont();
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -287,22 +302,22 @@ public class ExportTasksPackageToExcel extends Pass_2021<Vector<TasksPackage>> {
|
|||||||
Object total_threads = (NUM_THREADS != null) ? NUM_THREADS * Utils.getMatrixProcessors(task.matrix) : "undef";
|
Object total_threads = (NUM_THREADS != null) ? NUM_THREADS * Utils.getMatrixProcessors(task.matrix) : "undef";
|
||||||
//--
|
//--
|
||||||
addTaskRow(offset.getValue(),
|
addTaskRow(offset.getValue(),
|
||||||
task.group_description,
|
task.group_description, //0
|
||||||
task.test_description,
|
task.test_description,//1
|
||||||
task.language.getDescription(),
|
task.language.getDescription(), //2
|
||||||
task.flags,
|
task.flags, //3
|
||||||
task.compilation_state,
|
task.compilation_state, //4
|
||||||
task.state,
|
task.state, //5
|
||||||
num_threads,
|
num_threads, //6
|
||||||
num_cudas,
|
num_cudas, //7
|
||||||
total_threads,
|
total_threads, //8
|
||||||
task.matrix,
|
formatMatrix(task.matrix), //9
|
||||||
task.environments,
|
task.environments, //10
|
||||||
task.usr_par,
|
task.usr_par, //11
|
||||||
task.compilation_time,
|
task.compilation_time, //12
|
||||||
task.Time,
|
task.Time,//13
|
||||||
task.CleanTime,
|
task.CleanTime, //14
|
||||||
task.progress
|
task.progress //15
|
||||||
);
|
);
|
||||||
offset.Inc();
|
offset.Inc();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user