-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Tableau Log Viewer 1.0 release! (dev>master, #24)
- Loading branch information
1 parent
2c483c4
commit a0563f9
Showing
34 changed files
with
740 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# Building Tableau Log Viewer | ||
|
||
TLV is built using C++ and Qt libraries and can be build in different platforms. | ||
|
||
You can get the Qt libraries from the [Qt Site](https://www.qt.io/download/). It is fine to use the Open Source version. | ||
|
||
**Note:** When installing Qt make sure you get the following components: `Qt WebView` and `Qt WebEngine`. | ||
|
||
## Building on Mac (using command line) | ||
The following instructions use Qt 5.7 and the clang compiler to compile a 64-bit binary. | ||
Building TLV with a different Qt version or compiler should be fairly similar. | ||
|
||
```bash | ||
# Start by cloning the repository | ||
git clone https://github.com/tableau/tableau-log-viewer.git | ||
cd tableau-log-viewer | ||
|
||
# Find out where the Qt libraries are stored in your disk drive, and add the directory to the PATH | ||
export PATH="~/Qt/5.7/clang_64/bin":$PATH | ||
|
||
# Create a directory to compile | ||
mkdir build-release && cd build-release | ||
|
||
# Build | ||
qmake -spec macx-clang CONFIG+=x86_64 -Wall ../src/tableau-log-viewer.pro | ||
make | ||
|
||
# Make a self-contained app | ||
macdeployqt tlv.app | ||
|
||
# Run the application | ||
open tlv.app | ||
``` | ||
|
||
|
||
## Building on Windows (using command line) | ||
The following instructions use Qt 5.6 and the Visual Studio 2013 compiler (mscv2013) to compile a 64-bit binary. | ||
Building TLV with a different Qt version or compiler should be fairly similar. | ||
|
||
The following instructions use two command line windows: | ||
* The **Git Bash** terminal that you get from a standard Git installation on Windows. Search for "Git Bash" in the start menu. | ||
* The **Visual Studio Tools Command Prompt** that you get from a Visual Studio installation. | ||
There's a link from the Start Menu -> Visual Studio 2013 -> Visual Studio Tools. | ||
It is called "VS2013 x64 Native Tools Command Prompt". | ||
|
||
**From Git Bash:** | ||
```bash | ||
# Start by cloning the repository | ||
git clone https://github.com/tableau/tableau-log-viewer.git | ||
cd tableau-log-viewer | ||
|
||
# Find out where the Qt libraries are stored in your disk drive, and add the directory to the PATH | ||
export PATH=$PATH:"/c/Qt/5.6/msvc2013_64/bin" | ||
|
||
# Make build directory and run QMake | ||
mkdir build-release | ||
cd build-release | ||
qmake -spec win32-msvc2013 CONFIG+=x86_64 -Wall ../src/tableau-log-viewer.pro | ||
``` | ||
To compile, the enviroment has to be set up to use the correct tools. The easiest way is to use the Visual Studio prompt. | ||
|
||
**From the Visual Studio command prompt:** | ||
```cmd | ||
cd \path\to\tableau-log-viewer\build-release | ||
nmake | ||
``` | ||
The binary will appear under build-release/release. | ||
The executable needs the Qt libraries to run. The Git Bash command prompt already had the Qt libraries on the PATH. | ||
|
||
**Back to the Git Bash:** | ||
```bash | ||
# Run the executable | ||
cd release | ||
./tlv.exe | ||
``` | ||
|
||
## Buiding using Qt Creator | ||
Start by cloning the repository | ||
```bash | ||
git clone https://github.com/tableau/tableau-log-viewer.git | ||
``` | ||
|
||
1. Launch Qt Creator and open the project file, it should be under *src/tableau-log-viewer.pro* | ||
2. Configure the new project. The default configuration might be good enough, if you have problems see the section "Fixing configuration" | ||
3. Click on the Build button (the one with the Hammer) | ||
4. Click on the Run button | ||
|
||
If everything went well, TLV should be up and running! | ||
|
||
### Fixing configuration | ||
The project can be configured with different compiler and targets. | ||
|
||
To change the configuration: | ||
|
||
1. Click on the Projects button (the one with a wrench) | ||
2. On the "Build & Run" section, click on "Manage kits..." | ||
|
||
We have only tried a handful of configurations. Here are some that are known to work (strings as displayed by Qt creator) | ||
|
||
#### Windows, Visual Studio 2013 compiler, 64 bit | ||
* Compiler: Microsoft Visual C++ Compiler 12.0 (amd64) | ||
* Qt Version: Qt 5.X.X MSVC2013 64bit | ||
* [Optional but recommended] Add a 64 bit debugger | ||
1. Switch to the "Debuggers" tab. | ||
2. Click on the "Add" button | ||
3. Give a name you can recognize later like "CDB 64 bit" | ||
4. Find the 64 bit binary. It should be under `C:\debuggers\x64\cdb.exe` or similar | ||
5. Save the changes clicking the "Apply" button | ||
6. Go back to the "Kits" tab and choose the debugger configuration just created | ||
|
||
#### Mac OS X, clang compiler, 64 bit | ||
* Compiler: Clang (x86 64 bit in /usr/bin) | ||
* Debugger: System LLDB at /usr/bin/lldb | ||
* Qt Version: Qt 5.X.X clang 64bit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Saved Filters | ||
|
||
Share your filters with other users and give better default options to new users. The json files in the filters folder will be copied into the saved filter location and accessed from the Load Filters menu. | ||
|
||
### How To Install Filters | ||
On Windows, run the `install_all.bat` batch script. On Mac, run the `install_all.sh` script. | ||
|
||
### Submit your own filter | ||
To submit a filter of your own, find the filter in the ` %LOCALAPPDATA%\Tableau\TLV\filters\` folder on windows and `~/Library/Preferences/Tableau/TLV/filters` on Mac. Copy that filter json file into the `./default_filters/filters` folder and submit a pull request to github. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[ | ||
{ | ||
"backgroundColor": [ | ||
191, | ||
228, | ||
243 | ||
], | ||
"keys": [ | ||
"Key" | ||
], | ||
"matchCase": false, | ||
"useRegex": false, | ||
"value": "web-data-connector" | ||
}, | ||
{ | ||
"backgroundColor": [ | ||
242, | ||
236, | ||
153 | ||
], | ||
"keys": [ | ||
"Value" | ||
], | ||
"matchCase": false, | ||
"useRegex": true, | ||
"value": "^(http.*)" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
for /r %%i in (filters\*.json) do ( | ||
SET _dest=%LOCALAPPDATA%\Tableau\TLV\filters\ | ||
xcopy /i /e %%i %_dest% | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# find the location the filters live | ||
BASEDIR=$(dirname "$0") | ||
FILES=/filters/* | ||
FILTERS=$BASEDIR$FILES | ||
|
||
# make the filters directory if it doesn't exist | ||
DEST=~/Library/Preferences/Tableau/TLV/filters/ | ||
mkdir -p $DEST | ||
|
||
# go through and copy all the filters | ||
for f in $FILTERS | ||
do | ||
cp "$f" "$DEST" | ||
echo "$f" | ||
done |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,60 @@ | ||
#include "colorlibrary.h" | ||
|
||
const static QVector<QColor> DefaultColors = | ||
{ | ||
QColor("#f2ec99"), | ||
QColor("#bfe4f3"), | ||
QColor("#bfe968"), | ||
QColor("#c6caf8"), | ||
QColor("#eec757"), | ||
QColor("#9994f1"), | ||
QColor("#edb0e8"), | ||
QColor("#cebff3"), | ||
QColor("#a5f0c6"), | ||
QColor("#f5b0b4") | ||
}; | ||
|
||
ColorLibrary::ColorLibrary() | ||
{ | ||
m_colorLibrary = new QQueue<QColor>(); | ||
m_colorLibrary->enqueue(QColor("#f2ec99")); | ||
m_colorLibrary->enqueue(QColor("#bfe4f3")); | ||
m_colorLibrary->enqueue(QColor("#bfe968")); | ||
m_colorLibrary->enqueue(QColor("#c6caf8")); | ||
m_colorLibrary->enqueue(QColor("#eec757")); | ||
m_colorLibrary->enqueue(QColor("#9994f1")); | ||
m_colorLibrary->enqueue(QColor("#edb0e8")); | ||
m_colorLibrary->enqueue(QColor("#cebff3")); | ||
m_colorLibrary->enqueue(QColor("#a5f0c6")); | ||
m_colorLibrary->enqueue(QColor("#f5b0b4")); | ||
AddColors(DefaultColors); | ||
} | ||
|
||
ColorLibrary::ColorLibrary(const QVector<QColor>& usedColors) | ||
{ | ||
Exclude(usedColors); | ||
} | ||
|
||
void ColorLibrary::Exclude(const QVector<QColor>& usedColors) | ||
{ | ||
m_colorLibrary.clear(); | ||
|
||
QVector<QColor> colorsToAdd; | ||
QVector<QColor> colorsToAddToEnd; | ||
for(const auto& color : DefaultColors) | ||
{ | ||
if (!usedColors.contains(color)) | ||
colorsToAdd.push_back(color); | ||
else | ||
colorsToAddToEnd.push_back(color); | ||
} | ||
AddColors(colorsToAdd); | ||
AddColors(colorsToAddToEnd); | ||
} | ||
|
||
void ColorLibrary::AddColors(const QVector<QColor>& colors) | ||
{ | ||
for (const auto& color : colors) | ||
{ | ||
m_colorLibrary.enqueue(color); | ||
} | ||
} | ||
|
||
QColor ColorLibrary::GetNextColor() | ||
{ | ||
QColor result = m_colorLibrary->head(); | ||
auto color = m_colorLibrary->dequeue(); | ||
m_colorLibrary->enqueue(color); | ||
QColor result = m_colorLibrary.head(); | ||
auto color = m_colorLibrary.dequeue(); | ||
m_colorLibrary.enqueue(color); | ||
return result; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
#ifndef COLORLIBRARY_H | ||
#define COLORLIBRARY_H | ||
|
||
#include <QVector> | ||
#include <QColor> | ||
#include <QQueue> | ||
|
||
// The purpose of this class is to provide some default colors for highlight filters. | ||
// Default colors are stored in a queue and once a color is used, it is enqueued again. | ||
// If a color is being used from a loaded filter, it will be moved to the end of the queue. | ||
class ColorLibrary | ||
{ | ||
public: | ||
ColorLibrary(); | ||
ColorLibrary(const QVector<QColor>& usedColors); | ||
|
||
void Exclude(const QVector<QColor>& usedColors); | ||
QColor GetNextColor(); | ||
void AddColor(QColor color); | ||
|
||
private: | ||
QQueue<QColor> * m_colorLibrary; | ||
QQueue<QColor> m_colorLibrary; | ||
void AddColors(const QVector<QColor>& colors); | ||
}; | ||
#endif // COLORLIBRARY_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.