Skip to content

Commit

Permalink
Merge pull request #177 from FederatedAI/develop-2.1.0
Browse files Browse the repository at this point in the history
Develop 2.1.0
  • Loading branch information
idwenwen authored Mar 6, 2024
2 parents 517da1f + a8ed51b commit e141bc8
Show file tree
Hide file tree
Showing 45 changed files with 520 additions and 465 deletions.
9 changes: 9 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Release 2.1.0

#### Major Features and Improvements
**Major Features**

* Added table targeting search for summary display
* Limit the zoom range of line charts and bar charts
* Display problem optimization

# Release 2.0.0

#### Major Features and Improvements
Expand Down
6 changes: 4 additions & 2 deletions bin/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ eval action=\$$#

main_class=org.fedai.fate.board.bootstrap.Bootstrap
module=fateboard
version=2.0.0
version=2.1.0
start_type=background

if [ $action = starting ];then
action=start
start_type=front
elif [ $action = restarting ];then
action=restart
fi
Expand Down Expand Up @@ -252,7 +254,7 @@ start() {
cmd="$JAVA_HOME/bin/java -Dspring.config.location=$configpath/application.properties -Dssh_config_file=$basepath/ssh/ -Xmx2048m -Xms2048m -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log -XX:+HeapDumpOnOutOfMemoryError -cp $libpath/*:$basepath/${module}-${version}.jar ${main_class}"
print_info "The command is: $cmd"

if [[ $1 == "front" ]]; then
if [[ ${start_type} == "front" ]]; then
exec $cmd >> ${BOARD_HOME}/logs/bootstrap.${module}.out 2>>${BOARD_HOME}/logs/bootstrap.${module}.err
else
exec $cmd >> ${BOARD_HOME}/logs/bootstrap.${module}.out 2>>${BOARD_HOME}/logs/bootstrap.${module}.err &
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fateboard</groupId>
<artifactId>fateboard</artifactId>
<version>2.0.0</version>
<version>2.1.0</version>

<parent>
<groupId>org.springframework.boot</groupId>
Expand Down
2 changes: 1 addition & 1 deletion resources-front-end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"vue": "^3.3.4"
},
"scripts": {
"dev": "lerna run dev --scope=fate-board",
"dev": "lerna run build && lerna run dev --scope=fate-board",
"build": "lerna run build"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ export default function Summary(
},
parameter: ['SummaryMetricSelection.modelValue'],
}
: tableData
: tableData,
{
needSearch: true
}
)
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,155 +1,155 @@
<template>
<section class="f-info-data-container">
<section class="f-info-data-header">
<article class="f-info-data-title">
Outputting {{ dataTotal[selected ? Number(selected) || 0 : 0] }} instance
<span>(only 100 instance are shown in the table)</span>
</article>
<FSelection
v-if="selections.length > 1"
v-model="selected"
:options="selections"
class="f-info-data-selection"
></FSelection>
</section>
<section class="f-info-data-body" :key="refresh">
<FTable
:header="dataTableHeader[selected ? Number(selected) || 0 : 0] || []"
:data="dataTableData[selected ? Number(selected) || 0 : 0] || []"
:column="true"
:index="true"
class="f-info-data-table"
></FTable>
</section>
</section>
</template>

<script lang="ts" setup>
import { onMounted, ref, watch } from 'vue';
import { useStore } from 'vuex';
const store = useStore();
const selections = ref<any>([]);
const selected = ref(selections.value[0] ? selections.value[0].value : '');
const dataTableHeader = ref<any>([]);
const dataTableData = ref<any>([]);
const dataTotal = ref([])
const refresh = ref(0)
const dataRequest = async () => {
try {
const response = await store.dispatch('dataOutput');
const { output_data } = response;
const options: any = [];
const tableHeader: any = [];
const tableData: any = [];
const total: any = []
if (output_data) {
for (let i = 0; i < output_data.length; i++) {
const each = output_data[i];
const { data, metadata } = each;
const { anonymous_summary, fields } = metadata.schema_meta;
options.push({
label: anonymous_summary.site_name,
value: i,
});
tableHeader.push(
(() => {
const list: any = [];
for (const item of fields) {
list.push({
label: item.name,
prop: item.name,
});
}
return list;
})()
);
tableData.push(
(() => {
const header = tableHeader[tableHeader.length - 1];
const list: any = [];
for (const item of data) {
const row: any = {};
for (let j = 0; j < header.length; j++) {
row[header[j].prop] = item[j];
}
list.push(row);
}
return list;
})()
);
total.push(tableData[tableData.length - 1].length)
}
}
selections.value = options;
dataTableHeader.value = tableHeader;
dataTableData.value = tableData;
dataTotal.value = total
} catch(err) {
dataTableHeader.value = []
dataTableData.value = []
dataTotal.value = []
}
refresh.value ++
};
watch(
() => selections.value,
() => {
selected.value = selections.value[0] ? selections.value[0].value : '';
},
{ deep: true }
);
watch(
() => store.state.comp.information,
() => {
dataRequest()
},
{ deep: true }
)
onMounted(async () => {
await dataRequest();
});
const refreshing = () => {
dataRequest()
}
defineExpose({
refresh: refreshing
})
</script>

<style lang="scss" scoped>
@import '@/style/index.scss';
.f-info-data-container {
@include box-stretch();
@include flex-col();
align-items: flex-start;
justify-content: flex-start;
.f-info-data-header {
width: 100%;
flex: 0 0 45px;
@include flex-row();
align-items: center;
justify-content: space-between;
margin-bottom: $pale;
}
.f-info-data-body {
position: relative;
width: 100%;
height: calc(100% - 45px);
flex: 1 1 auto;
overflow: hidden;
.f-info-data-table {
@include box-stretch();
}
}
}
</style>
<template>
<section class="f-info-data-container">
<section class="f-info-data-header">
<article class="f-info-data-title">
Outputting {{ dataTotal[selected ? Number(selected) || 0 : 0] }} instance
<span>(only 100 instance are shown in the table)</span>
</article>
<FSelection
v-if="selections.length > 1"
v-model="selected"
:options="selections"
class="f-info-data-selection"
></FSelection>
</section>
<section class="f-info-data-body" :key="refresh">
<FTable
:header="dataTableHeader[selected ? Number(selected) || 0 : 0] || []"
:data="dataTableData[selected ? Number(selected) || 0 : 0] || []"
:column="true"
:index="true"
class="f-info-data-table"
></FTable>
</section>
</section>
</template>

<script lang="ts" setup>
import { onMounted, ref, watch } from 'vue';
import { useStore } from 'vuex';
const store = useStore();
const selections = ref<any>([]);
const selected = ref(selections.value[0] ? selections.value[0].value : '');
const dataTableHeader = ref<any>([]);
const dataTableData = ref<any>([]);
const dataTotal = ref([])
const refresh = ref(0)
const dataRequest = async () => {
try {
const response = await store.dispatch('dataOutput');
const { output_data } = response;
const options: any = [];
const tableHeader: any = [];
const tableData: any = [];
const total: any = []
if (output_data) {
for (let i = 0; i < output_data.length; i++) {
const each = output_data[i];
const { data, metadata } = each;
const { anonymous_summary, fields } = metadata.schema_meta;
options.push({
label: anonymous_summary.site_name,
value: i,
});
tableHeader.push(
(() => {
const list: any = [];
for (const item of fields) {
list.push({
label: item.name,
prop: item.name,
});
}
return list;
})()
);
tableData.push(
(() => {
const header = tableHeader[tableHeader.length - 1];
const list: any = [];
for (const item of data) {
const row: any = {};
for (let j = 0; j < header.length; j++) {
row[header[j].prop] = item[j];
}
list.push(row);
}
return list;
})()
);
total.push(each.total)
}
}
selections.value = options;
dataTableHeader.value = tableHeader;
dataTableData.value = tableData;
dataTotal.value = total
} catch(err) {
dataTableHeader.value = []
dataTableData.value = []
dataTotal.value = []
}
refresh.value ++
};
watch(
() => selections.value,
() => {
selected.value = selections.value[0] ? selections.value[0].value : '';
},
{ deep: true }
);
watch(
() => store.state.comp.information,
() => {
dataRequest()
},
{ deep: true }
)
onMounted(async () => {
await dataRequest();
});
const refreshing = () => {
dataRequest()
}
defineExpose({
refresh: refreshing
})
</script>

<style lang="scss" scoped>
@import '@/style/index.scss';
.f-info-data-container {
@include box-stretch();
@include flex-col();
align-items: flex-start;
justify-content: flex-start;
.f-info-data-header {
width: 100%;
flex: 0 0 45px;
@include flex-row();
align-items: center;
justify-content: space-between;
margin-bottom: $pale;
}
.f-info-data-body {
position: relative;
width: 100%;
height: calc(100% - 45px);
flex: 1 1 auto;
overflow: hidden;
.f-info-data-table {
@include box-stretch();
}
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ onBeforeUnmount(() => {
}
:deep(.el-form-item__content) {
max-width: 140px;
width: 140px;
}
.h-filter-btn {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ const requesting = ref(true)
// table header confgiuration
const header = computed(() => {
return cols(
(content: string, { $index }: any) => data[$index].notes = content,
(content: string, { $index }: any) => {
data[$index].notes = content
},
() => dataRequest(),
() => dataRequest())
});
Expand Down
Loading

0 comments on commit e141bc8

Please sign in to comment.