/** 초기 데이터를 로드합니다. */ private void initData() { compositeServerStatus.initMongoDBInfoData(commandResult); compositeCollectionSummary.initData(userDB); // google analytic AnalyticCaller.track(MongoDBInfosEditor.ID); }
@Override public void createPartControl(Composite parent) { GridLayout gl_parent = new GridLayout(1, false); gl_parent.marginHeight = 2; gl_parent.verticalSpacing = 2; gl_parent.horizontalSpacing = 2; gl_parent.marginWidth = 2; parent.setLayout(gl_parent); try { commandResult = MongoDBQuery.serverStatusCommandResult(userDB); } catch (Exception e1) { logger.error("Get status command", e1); } CTabFolder tabFolder = new CTabFolder(parent, SWT.NONE); tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); tabFolder.setBorderVisible(false); tabFolder.setSelectionBackground( TadpoleWidgetUtils.getTabFolderBackgroundColor(), TadpoleWidgetUtils.getTabFolderPercents()); CTabItem tbtmServerStatus = new CTabItem(tabFolder, SWT.NONE); tbtmServerStatus.setText(Messages.get().MongoDBInfosEditor_0); compositeServerStatus = new InstanceInformationComposite(tabFolder, SWT.NONE, userDB, commandResult); tbtmServerStatus.setControl(compositeServerStatus); compositeServerStatus.setLayout(new GridLayout(2, false)); new Label(compositeServerStatus, SWT.NONE); CTabItem tbtmCollectionSummary = new CTabItem(tabFolder, SWT.NONE); tbtmCollectionSummary.setText(Messages.get().MongoDBInfosEditor_1); compositeCollectionSummary = new CollectionInformationComposite(tabFolder, SWT.NONE); tbtmCollectionSummary.setControl(compositeCollectionSummary); GridLayout gl_compositeCollectionSummary = new GridLayout(1, false); gl_compositeCollectionSummary.verticalSpacing = 2; gl_compositeCollectionSummary.horizontalSpacing = 2; gl_compositeCollectionSummary.marginHeight = 2; gl_compositeCollectionSummary.marginWidth = 2; compositeCollectionSummary.setLayout(gl_compositeCollectionSummary); CTabItem tbtmLocaks = new CTabItem(tabFolder, SWT.NONE); tbtmLocaks.setText(Messages.get().MongoDBInfosEditor_2); LockComposite compositeLock = new LockComposite(tabFolder, SWT.NONE, userDB, commandResult); tbtmLocaks.setControl(compositeLock); compositeLock.setLayout(gl_compositeCollectionSummary); CTabItem tbtmReplicaInformation = new CTabItem(tabFolder, SWT.NONE); tbtmReplicaInformation.setText(Messages.get().MongoDBInfosEditor_3); ReplicaSetComposite compositeReplicaSet = new ReplicaSetComposite(tabFolder, SWT.NONE, userDB, commandResult); tbtmReplicaInformation.setControl(compositeReplicaSet); compositeReplicaSet.setLayout(gl_compositeCollectionSummary); CTabItem tbtmShardingInformation = new CTabItem(tabFolder, SWT.NONE); tbtmShardingInformation.setText(Messages.get().MongoDBInfosEditor_4); ShardingComposite compositeSharding = new ShardingComposite(tabFolder, SWT.NONE, userDB); tbtmShardingInformation.setControl(compositeSharding); compositeSharding.setLayout(gl_compositeCollectionSummary); if (defaultPage == PAGES.INSTANCE_INFORMATION) tabFolder.setSelection(0); else if (defaultPage == PAGES.COLLECTION_SUMMERY) tabFolder.setSelection(1); else if (defaultPage == PAGES.DB_LOCKS) tabFolder.setSelection(2); else if (defaultPage == PAGES.REPLACA_SET) tabFolder.setSelection(3); else tabFolder.setSelection(4); initData(); }