Permalink
Browse files

Add the parsing for a cancelled scrub to the lp-tray

  • Loading branch information...
Ken Moore
Ken Moore committed Oct 17, 2013
1 parent 9ffd8eb commit 1d2eb8dba32b56271e7ed8a5836fff002624223e
Showing with 10 additions and 308 deletions.
  1. +10 −0 lp-tray/LPWatcher.cpp
  2. +0 −308 lp-tray/Makefile
View
@@ -421,6 +421,16 @@ void LPWatcher::checkPoolStatus(){
LOGS.insert(64, timestamp);
LOGS.insert(65, timestamp.section(" ",3,3) );
if(timer->interval() != sysCheckTime){ timer->start(sysCheckTime); }
+ }else if(zstat[i].contains(" scrub cancel")){
+ //Scrub was cancelled before finishing
+ zstat[i] = zstat[i].replace("\t"," ").simplified();
+ timestamp = zstat[i].section(" ",4,8,QString::SectionSkipEmpty);
+ LOGS.insert(60, "FINISHED");
+ LOGS.insert(61, pool);
+ LOGS.insert(62, QString(tr("Scrub cancelled for %1")).arg(pool) );
+ LOGS.insert(63, QString(tr("Scrub cancelled for %1")).arg(pool) );
+ LOGS.insert(64, timestamp);
+ LOGS.insert(65,timestamp.section(" ",3,3) );
}else{
//Scrub is running - parse the line
timestamp = zstat[i].section(" ",5,9,QString::SectionSkipEmpty);
View
@@ -1,308 +0,0 @@
-#############################################################################
-# Makefile for building: life-preserver-tray
-# Generated by qmake (2.01a) (Qt 4.8.4) on: Tue Oct 15 12:26:43 2013
-# Project: lp-tray.pro
-# Template: app
-# Command: /usr/local/bin/qmake-qt4 -o Makefile lp-tray.pro
-#############################################################################
-
-####### Compiler, tools and options
-
-CC = gcc
-CXX = g++
-DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-CFLAGS = -pipe -O2 -Wall -W -pthread -D_THREAD_SAFE $(DEFINES)
-CXXFLAGS = -pipe -O2 -Wall -W -pthread -D_THREAD_SAFE $(DEFINES)
-INCPATH = -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4 -I. -I. -I/usr/local/include/qt4 -I/usr/local/include
-LINK = g++
-LFLAGS = -Wl,-O1 -pthread -Wl,-rpath,/usr/local/lib/qt4
-LIBS = $(SUBLIBS) -L/usr/local/lib/qt4 -L/usr/local/lib -lQtSolutions_SingleApplication-head -lQtGui -L/usr/local/lib -L/usr/local/lib/qt4 -lQtCore
-AR = ar cqs
-RANLIB =
-QMAKE = /usr/local/bin/qmake-qt4
-TAR = tar -cf
-COMPRESS = gzip -9f
-COPY = cp -f
-SED = sed
-COPY_FILE = $(COPY)
-COPY_DIR = $(COPY) -R
-STRIP =
-INSTALL_FILE = $(COPY_FILE)
-INSTALL_DIR = $(COPY_DIR)
-INSTALL_PROGRAM = $(COPY_FILE)
-DEL_FILE = rm -f
-SYMLINK = ln -f -s
-DEL_DIR = rmdir
-MOVE = mv -f
-CHK_DIR_EXISTS= test -d
-MKDIR = mkdir -p
-
-####### Output directory
-
-OBJECTS_DIR = ./
-
-####### Files
-
-SOURCES = main.cpp \
- LPTray.cpp \
- LPWatcher.cpp \
- LPMessages.cpp moc_LPTray.cpp \
- moc_LPWatcher.cpp \
- moc_LPMessages.cpp \
- qrc_lPreserve.cpp
-OBJECTS = main.o \
- LPTray.o \
- LPWatcher.o \
- LPMessages.o \
- moc_LPTray.o \
- moc_LPWatcher.o \
- moc_LPMessages.o \
- qrc_lPreserve.o
-DIST = /usr/local/share/qt4/mkspecs/common/unix.conf \
- /usr/local/share/qt4/mkspecs/common/gcc-base.conf \
- /usr/local/share/qt4/mkspecs/common/gcc-base-unix.conf \
- /usr/local/share/qt4/mkspecs/common/g++-base.conf \
- /usr/local/share/qt4/mkspecs/common/g++-unix.conf \
- /usr/local/share/qt4/mkspecs/qconfig.pri \
- /usr/local/share/qt4/mkspecs/modules/qt_phonon.pri \
- /usr/local/share/qt4/mkspecs/modules/qt_webkit_version.pri \
- /usr/local/share/qt4/mkspecs/features/qt_functions.prf \
- /usr/local/share/qt4/mkspecs/features/qt_config.prf \
- /usr/local/share/qt4/mkspecs/features/exclusive_builds.prf \
- /usr/local/share/qt4/mkspecs/features/default_pre.prf \
- /usr/local/share/qt4/mkspecs/features/release.prf \
- /usr/local/share/qt4/mkspecs/features/default_post.prf \
- /usr/local/share/qt4/mkspecs/features/warn_on.prf \
- /usr/local/share/qt4/mkspecs/features/qt.prf \
- /usr/local/share/qt4/mkspecs/features/moc.prf \
- /usr/local/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
- /usr/local/share/qt4/mkspecs/features/unix/thread.prf \
- /usr/local/share/qt4/mkspecs/features/resources.prf \
- /usr/local/share/qt4/mkspecs/features/uic.prf \
- /usr/local/share/qt4/mkspecs/features/yacc.prf \
- /usr/local/share/qt4/mkspecs/features/lex.prf \
- /usr/local/share/qt4/mkspecs/features/include_source_dir.prf \
- lp-tray.pro
-QMAKE_TARGET = life-preserver-tray
-DESTDIR =
-TARGET = life-preserver-tray
-
-first: all
-####### Implicit rules
-
-.SUFFIXES: .o .c .cpp .cc .cxx .C
-
-.cpp.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.cc.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.cxx.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.C.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
-
-####### Build rules
-
-all: Makefile $(TARGET)
-
-$(TARGET): ui_LPMessages.h $(OBJECTS)
- $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
-
-Makefile: lp-tray.pro /usr/local/share/qt4/mkspecs/freebsd-g++/qmake.conf /usr/local/share/qt4/mkspecs/common/unix.conf \
- /usr/local/share/qt4/mkspecs/common/gcc-base.conf \
- /usr/local/share/qt4/mkspecs/common/gcc-base-unix.conf \
- /usr/local/share/qt4/mkspecs/common/g++-base.conf \
- /usr/local/share/qt4/mkspecs/common/g++-unix.conf \
- /usr/local/share/qt4/mkspecs/qconfig.pri \
- /usr/local/share/qt4/mkspecs/modules/qt_phonon.pri \
- /usr/local/share/qt4/mkspecs/modules/qt_webkit_version.pri \
- /usr/local/share/qt4/mkspecs/features/qt_functions.prf \
- /usr/local/share/qt4/mkspecs/features/qt_config.prf \
- /usr/local/share/qt4/mkspecs/features/exclusive_builds.prf \
- /usr/local/share/qt4/mkspecs/features/default_pre.prf \
- /usr/local/share/qt4/mkspecs/features/release.prf \
- /usr/local/share/qt4/mkspecs/features/default_post.prf \
- /usr/local/share/qt4/mkspecs/features/warn_on.prf \
- /usr/local/share/qt4/mkspecs/features/qt.prf \
- /usr/local/share/qt4/mkspecs/features/moc.prf \
- /usr/local/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
- /usr/local/share/qt4/mkspecs/features/unix/thread.prf \
- /usr/local/share/qt4/mkspecs/features/resources.prf \
- /usr/local/share/qt4/mkspecs/features/uic.prf \
- /usr/local/share/qt4/mkspecs/features/yacc.prf \
- /usr/local/share/qt4/mkspecs/features/lex.prf \
- /usr/local/share/qt4/mkspecs/features/include_source_dir.prf \
- /usr/local/lib/qt4/libQtGui.prl \
- /usr/local/lib/qt4/libQtCore.prl
- $(QMAKE) -o Makefile lp-tray.pro
-/usr/local/share/qt4/mkspecs/common/unix.conf:
-/usr/local/share/qt4/mkspecs/common/gcc-base.conf:
-/usr/local/share/qt4/mkspecs/common/gcc-base-unix.conf:
-/usr/local/share/qt4/mkspecs/common/g++-base.conf:
-/usr/local/share/qt4/mkspecs/common/g++-unix.conf:
-/usr/local/share/qt4/mkspecs/qconfig.pri:
-/usr/local/share/qt4/mkspecs/modules/qt_phonon.pri:
-/usr/local/share/qt4/mkspecs/modules/qt_webkit_version.pri:
-/usr/local/share/qt4/mkspecs/features/qt_functions.prf:
-/usr/local/share/qt4/mkspecs/features/qt_config.prf:
-/usr/local/share/qt4/mkspecs/features/exclusive_builds.prf:
-/usr/local/share/qt4/mkspecs/features/default_pre.prf:
-/usr/local/share/qt4/mkspecs/features/release.prf:
-/usr/local/share/qt4/mkspecs/features/default_post.prf:
-/usr/local/share/qt4/mkspecs/features/warn_on.prf:
-/usr/local/share/qt4/mkspecs/features/qt.prf:
-/usr/local/share/qt4/mkspecs/features/moc.prf:
-/usr/local/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
-/usr/local/share/qt4/mkspecs/features/unix/thread.prf:
-/usr/local/share/qt4/mkspecs/features/resources.prf:
-/usr/local/share/qt4/mkspecs/features/uic.prf:
-/usr/local/share/qt4/mkspecs/features/yacc.prf:
-/usr/local/share/qt4/mkspecs/features/lex.prf:
-/usr/local/share/qt4/mkspecs/features/include_source_dir.prf:
-/usr/local/lib/qt4/libQtGui.prl:
-/usr/local/lib/qt4/libQtCore.prl:
-qmake: FORCE
- @$(QMAKE) -o Makefile lp-tray.pro
-
-dist:
- @$(CHK_DIR_EXISTS) .tmp/life-preserver-tray1.0.0 || $(MKDIR) .tmp/life-preserver-tray1.0.0
- $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/life-preserver-tray1.0.0/ && $(COPY_FILE) --parents LPTray.h LPWatcher.h LPMessages.h .tmp/life-preserver-tray1.0.0/ && $(COPY_FILE) --parents lPreserve.qrc .tmp/life-preserver-tray1.0.0/ && $(COPY_FILE) --parents main.cpp LPTray.cpp LPWatcher.cpp LPMessages.cpp .tmp/life-preserver-tray1.0.0/ && $(COPY_FILE) --parents LPMessages.ui .tmp/life-preserver-tray1.0.0/ && $(COPY_FILE) --parents i18n/LifePreserverTray_af.ts i18n/LifePreserverTray_ar.ts i18n/LifePreserverTray_az.ts i18n/LifePreserverTray_bg.ts i18n/LifePreserverTray_bn.ts i18n/LifePreserverTray_bs.ts i18n/LifePreserverTray_ca.ts i18n/LifePreserverTray_cs.ts i18n/LifePreserverTray_cy.ts i18n/LifePreserverTray_da.ts i18n/LifePreserverTray_de.ts i18n/LifePreserverTray_el.ts i18n/LifePreserverTray_en_US.ts i18n/LifePreserverTray_en_GB.ts i18n/LifePreserverTray_en_ZA.ts i18n/LifePreserverTray_es.ts i18n/LifePreserverTray_et.ts i18n/LifePreserverTray_eu.ts i18n/LifePreserverTray_fa.ts i18n/LifePreserverTray_fi.ts i18n/LifePreserverTray_fr.ts i18n/LifePreserverTray_fr_CA.ts i18n/LifePreserverTray_fur.ts i18n/LifePreserverTray_gl.ts i18n/LifePreserverTray_he.ts i18n/LifePreserverTray_hi.ts i18n/LifePreserverTray_hr.ts i18n/LifePreserverTray_hu.ts i18n/LifePreserverTray_id.ts i18n/LifePreserverTray_is.ts i18n/LifePreserverTray_it.ts i18n/LifePreserverTray_ja.ts i18n/LifePreserverTray_ka.ts i18n/LifePreserverTray_ko.ts i18n/LifePreserverTray_lt.ts i18n/LifePreserverTray_lv.ts i18n/LifePreserverTray_mk.ts i18n/LifePreserverTray_mn.ts i18n/LifePreserverTray_ms.ts i18n/LifePreserverTray_mt.ts i18n/LifePreserverTray_nb.ts i18n/LifePreserverTray_ne.ts i18n/LifePreserverTray_nl.ts i18n/LifePreserverTray_pa.ts i18n/LifePreserverTray_pl.ts i18n/LifePreserverTray_pt.ts i18n/LifePreserverTray_pt_BR.ts i18n/LifePreserverTray_ro.ts i18n/LifePreserverTray_ru.ts i18n/LifePreserverTray_sa.ts i18n/LifePreserverTray_sk.ts i18n/LifePreserverTray_sl.ts i18n/LifePreserverTray_sr.ts i18n/LifePreserverTray_sv.ts i18n/LifePreserverTray_sw.ts i18n/LifePreserverTray_ta.ts i18n/LifePreserverTray_tg.ts i18n/LifePreserverTray_th.ts i18n/LifePreserverTray_tr.ts i18n/LifePreserverTray_uk.ts i18n/LifePreserverTray_uz.ts i18n/LifePreserverTray_vi.ts i18n/LifePreserverTray_zh_CN.ts i18n/LifePreserverTray_zh_HK.ts i18n/LifePreserverTray_zh_TW.ts i18n/LifePreserverTray_zu.ts .tmp/life-preserver-tray1.0.0/ && (cd `dirname .tmp/life-preserver-tray1.0.0` && $(TAR) life-preserver-tray1.0.0.tar life-preserver-tray1.0.0 && $(COMPRESS) life-preserver-tray1.0.0.tar) && $(MOVE) `dirname .tmp/life-preserver-tray1.0.0`/life-preserver-tray1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/life-preserver-tray1.0.0
-
-
-clean:compiler_clean
- -$(DEL_FILE) $(OBJECTS)
- -$(DEL_FILE) *~ core *.core
-
-
-####### Sub-libraries
-
-distclean: clean
- -$(DEL_FILE) $(TARGET)
- -$(DEL_FILE) Makefile
-
-
-check: first
-
-mocclean: compiler_moc_header_clean compiler_moc_source_clean
-
-mocables: compiler_moc_header_make_all compiler_moc_source_make_all
-
-compiler_moc_header_make_all: moc_LPTray.cpp moc_LPWatcher.cpp moc_LPMessages.cpp
-compiler_moc_header_clean:
- -$(DEL_FILE) moc_LPTray.cpp moc_LPWatcher.cpp moc_LPMessages.cpp
-moc_LPTray.cpp: LPWatcher.h \
- LPMessages.h \
- LPTray.h
- /usr/local/bin/moc-qt4 $(DEFINES) $(INCPATH) LPTray.h -o moc_LPTray.cpp
-
-moc_LPWatcher.cpp: LPWatcher.h
- /usr/local/bin/moc-qt4 $(DEFINES) $(INCPATH) LPWatcher.h -o moc_LPWatcher.cpp
-
-moc_LPMessages.cpp: LPMessages.h
- /usr/local/bin/moc-qt4 $(DEFINES) $(INCPATH) LPMessages.h -o moc_LPMessages.cpp
-
-compiler_rcc_make_all: qrc_lPreserve.cpp
-compiler_rcc_clean:
- -$(DEL_FILE) qrc_lPreserve.cpp
-qrc_lPreserve.cpp: lPreserve.qrc \
- images/backup-ok.png \
- images/configure.png \
- images/application-exit.png \
- images/tray-icon-error.png \
- images/backup-failed.png \
- images/list-remove.png \
- images/tray-icon-failed.png \
- images/tray-icon-working.png \
- images/lifepreserver.png \
- images/list-add.png \
- images/tray-icon-idle.png
- /usr/local/bin/rcc -name lPreserve lPreserve.qrc -o qrc_lPreserve.cpp
-
-compiler_image_collection_make_all: qmake_image_collection.cpp
-compiler_image_collection_clean:
- -$(DEL_FILE) qmake_image_collection.cpp
-compiler_moc_source_make_all:
-compiler_moc_source_clean:
-compiler_uic_make_all: ui_LPMessages.h
-compiler_uic_clean:
- -$(DEL_FILE) ui_LPMessages.h
-ui_LPMessages.h: LPMessages.ui
- /usr/local/bin/uic-qt4 LPMessages.ui -o ui_LPMessages.h
-
-compiler_yacc_decl_make_all:
-compiler_yacc_decl_clean:
-compiler_yacc_impl_make_all:
-compiler_yacc_impl_clean:
-compiler_lex_make_all:
-compiler_lex_clean:
-compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_uic_clean
-
-####### Compile
-
-main.o: main.cpp LPTray.h \
- LPWatcher.h \
- LPMessages.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
-
-LPTray.o: LPTray.cpp LPTray.h \
- LPWatcher.h \
- LPMessages.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o LPTray.o LPTray.cpp
-
-LPWatcher.o: LPWatcher.cpp LPWatcher.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o LPWatcher.o LPWatcher.cpp
-
-LPMessages.o: LPMessages.cpp LPMessages.h \
- ui_LPMessages.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o LPMessages.o LPMessages.cpp
-
-moc_LPTray.o: moc_LPTray.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_LPTray.o moc_LPTray.cpp
-
-moc_LPWatcher.o: moc_LPWatcher.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_LPWatcher.o moc_LPWatcher.cpp
-
-moc_LPMessages.o: moc_LPMessages.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_LPMessages.o moc_LPMessages.cpp
-
-qrc_lPreserve.o: qrc_lPreserve.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_lPreserve.o qrc_lPreserve.cpp
-
-####### Install
-
-install_target: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
- -$(INSTALL_PROGRAM) "$(QMAKE_TARGET)" "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
-
-uninstall_target: FORCE
- -$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
-
-
-install_dotrans: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/lifePreserver/i18n/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/lifePreserver/i18n/
- cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/local/share/lifePreserver/i18n/
-
-
-install_images: first FORCE
- @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/lifePreserver/images/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/lifePreserver/images/
- -$(INSTALL_FILE) /usr/home/kenmoore/Projects/pcbsd-projects/lp-tray/images/lifepreserver.png $(INSTALL_ROOT)/usr/local/share/lifePreserver/images/
-
-
-uninstall_images: FORCE
- -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/lifePreserver/images/lifepreserver.png
- -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/share/lifePreserver/images/
-
-
-install: install_target install_dotrans install_images FORCE
-
-uninstall: uninstall_target uninstall_images FORCE
-
-FORCE:
-

0 comments on commit 1d2eb8d

Please sign in to comment.