Search in sources :

Example 1 with EditMultiHostStatisticItemDialog

use of com.cubrid.cubridmanager.ui.monstatistic.dialog.EditMultiHostStatisticItemDialog in project cubrid-manager by CUBRID.

the class MonitorStatisticEditor method openEditStatisticItemDialog.

public void openEditStatisticItemDialog() {
    if (isMultiHost) {
        EditMultiHostStatisticItemDialog dialog = new EditMultiHostStatisticItemDialog(getSite().getShell(), this);
        if (dialog.open() == Dialog.OK) {
            StatisticChartItem item = dialog.getStatisticChartItem();
            item.setSeries(statisticItemList.size());
            addNewDataChart(item);
            monitorStatisticPersistManager.saveStatistic();
        }
    } else {
        EditSingleHostStatisticItemDialog dialog = new EditSingleHostStatisticItemDialog(getSite().getShell(), this, serverInfo);
        if (dialog.open() == Dialog.OK) {
            StatisticChartItem item = dialog.getStatisticChartItem();
            item.setSeries(statisticItemList.size());
            addNewDataChart(item);
            monitorStatisticPersistManager.saveStatistic();
        }
    }
}
Also used : EditSingleHostStatisticItemDialog(com.cubrid.cubridmanager.ui.monstatistic.dialog.EditSingleHostStatisticItemDialog) EditMultiHostStatisticItemDialog(com.cubrid.cubridmanager.ui.monstatistic.dialog.EditMultiHostStatisticItemDialog) StatisticChartItem(com.cubrid.cubridmanager.core.monstatistic.model.StatisticChartItem)

Example 2 with EditMultiHostStatisticItemDialog

use of com.cubrid.cubridmanager.ui.monstatistic.dialog.EditMultiHostStatisticItemDialog in project cubrid-manager by CUBRID.

the class MonitorStatisticChart method openEditStatisticItemDialog.

private void openEditStatisticItemDialog() {
    if (isMultiHost) {
        EditMultiHostStatisticItemDialog dialog = new EditMultiHostStatisticItemDialog(editor.getSite().getShell(), editor);
        dialog.setNew(false);
        dialog.setStatisticChartItem((StatisticChartItem) statisticChartItem.clone());
        if (dialog.open() == Dialog.OK) {
            statisticChartItem = dialog.getStatisticChartItem();
            editor.updateStatisticItem(statisticChartItem);
        }
    } else {
        EditSingleHostStatisticItemDialog dialog = new EditSingleHostStatisticItemDialog(editor.getSite().getShell(), editor, editor.getServerInfo());
        dialog.setNew(false);
        dialog.setStatisticChartItem((StatisticChartItem) statisticChartItem.clone());
        if (dialog.open() == Dialog.OK) {
            statisticChartItem = dialog.getStatisticChartItem();
            editor.updateStatisticItem(statisticChartItem);
        }
    }
}
Also used : EditSingleHostStatisticItemDialog(com.cubrid.cubridmanager.ui.monstatistic.dialog.EditSingleHostStatisticItemDialog) EditMultiHostStatisticItemDialog(com.cubrid.cubridmanager.ui.monstatistic.dialog.EditMultiHostStatisticItemDialog)

Aggregations

EditMultiHostStatisticItemDialog (com.cubrid.cubridmanager.ui.monstatistic.dialog.EditMultiHostStatisticItemDialog)2 EditSingleHostStatisticItemDialog (com.cubrid.cubridmanager.ui.monstatistic.dialog.EditSingleHostStatisticItemDialog)2 StatisticChartItem (com.cubrid.cubridmanager.core.monstatistic.model.StatisticChartItem)1