Giter Site home page Giter Site logo

website's Introduction

Hatohol Web Site

This repository includes source code of Hatohol web site

Dependency

You have to compile files to generate HTML files. gen.py compile files automatically.

It requires following libraries:

  • Python 3
  • python-markdown
  • unoconv
  • Sass
    sudo apt-get install python3 python3-markdown unoconv ruby-dev
    sudo gem install sass

How to compile

gen.py automatically generates output files including HTML, CSS, images, and so on.
BE CAREFUL AS ALL THE FILES IN THE DIRECTORY WILL BE DELETED.

./gen.py --output /path/to/output/directory

Stop all LibreOffice instance to avoid conversion error by unoconv.

How to deploy

Currently we use sourceforge.jp's hosting server. See sourceforge.jp's official documents for details.

  1. Add your SSH key on sourceforge.jp's config page.

  2. Login to sftp://shell.sourceforge.jp and open /home/groups/h/ha/hatohol/htdocs

  3. Put the generated HTMLs there.

Source code

Directory structure

├── contents
│   ├── assets
│   │   ├── images
│   │   │   ├── diagrams     - diagram images (mainly ODG format)
│   │   │   │   └── …
│   │   │   ├── hatohol.png  - logo
│   │   │   └── screenshots
│   │   │       └── …
│   │   ├── javascripts
│   │   │   └── …
│   │   └── stylesheets
│   │       ├── bootstrap    - SCSS files of Bootstrap
│   │       │   └…
│   │       └── styles.scss  - Style files
│   ├── docs
│   │   ├── index.md         - /docs/
│   │   ├── install          - Document files. URL structure is: /docs/[hatohol version]/[language]/
│   │   │   ├── 13.12
│   │   │   │   ├── en
│   │   │   │   │   └── index.md
│   │   │   │   └── ja
│   │   │   │       └── index.md
│   │   │   └── …
│   │   └── markdown-checker - Legacy scripts for markdown conversion; Maybe not required?
│   ├── 404.md               - 404 page
│   ├── about.tpl            - /about/
│   ├── commercial.tpl       - /commercial/
│   ├── contrib.tpl          - /contrib/
│   ├── download.tpl         - /download/
│   ├── index.tpl            - /
│   ├── screenshots.tpl      - /screenshots/
│   └── updates.tpl          - /updates/
├── gen.py                   - HTML generation script
├── layouts                  - template files: common header and footer for each HTML files
└── README.md

Each [filename].tpl and [filename].md files are converted to [filename]/index.html

In this repository, there are some kinds of files to be compiled.

  • .tpl: HTML template files. .tpl files under content directory only have body content. They are merged with layout/header.tpl and layout/footer.tpl. Content of first h1 tag is assigned to page title.
  • .md: Markdown files. They are compiled by python-markdown, then merged with layout/header.tpl and layout/footer.tpl.
  • .scss: Sass files. They are compiled to CSS files by sass command.
  • .odg: OpenDocument Graphics files. They are converted to PNG by unoconv.

website's People

Contributors

a24-yamaguchi avatar ashie avatar blueskydetector avatar clonezilla-at-jp avatar cosmo0920 avatar iwaim avatar kou avatar kz0817 avatar masa0612 avatar noriki-nakamura avatar okkez avatar phanect avatar robertarm avatar robertclonez avatar ytooyama avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

イベント画面をホスト名でフィルタするとエラー発生@15.03リリース確認

ファイル:15.03向けpre1パッケージ(多分3/18時点のMaseterでも発生)
発生事象:”エラー 例外が発生しました”のダイアログが表示される
実施内容:
1.WebUIで”イベント"画面を選択
2.監視サーバーを選択(これは何でもいい)
3.グループを選択 <- してもしなくてもいい
4.ホストを選択
 →ここでダメ

【ログ】
[INFO] FaceRest.cc:881 reply error: 4, HTERR_GOT_EXCEPTION: DBAgentMySQL.cc:625 Failed to query: SELECT events.unified_id,events.server_id,events.id,events.time_sec,events.time_ns,events.event_value,events.trigger_id,events.status,events.severity,events.global_host_id,events.host_id_in_server,events.hostname,events.brief,events.extended_info FROM events WHERE events.server_id IN (3,5,7) AND events.server_id=7 AND triggers.host_id_in_server='59' ORDER BY time_sec DESC, time_ns DESC, unified_id DESC LIMIT 50 : (1054) Unknown column 'triggers.host_id_in_server' in 'where clause'#12#012

WHEREの後で渡してるパラメータで”triggers.host_id_in_server”がおかしい??

Hatohol 15.06のインストール手順書の問題点2つ

ファイアウォールの設定とサービスの自動起動の設定について、変更前の手順書通りではアクセス不可の問題が発生するため、次の変更をしてPullしました。
#37

firewall-cmdによるポート開放は--parmanentなしコマンド列を実行するか、 --parmanent付きコマンド列実行後に firewall-cmd --reload を実行しないとポートがあかないので修正。
2.修正前の手順ではhatoholとhttpdがシステム再起動後に起動しないので、各種サービスのOS起動時に自動起動するようにsystemctl enable列を追加。

[unoconv] Conversion from odg to png file fails

Webサイト更新手順の中にodgからpngの変換としてunoconvが使われているが、ErrCode2074を吐いて
失敗している。
このため、次のURLのpngファイルが404になる。
http://www.hatohol.org/assets/images/diagrams/distributed-monitoring.png
http://www.hatohol.org/assets/images/diagrams/integrated-monitoring.png
※現状バックアップから手コピーで復元

発生するエラー。

unoconv: UnoException during export phase:
Unable to store document to file:///path/to/work/src/web_compiled/assets/images/diagrams.png (ErrCode 2074)

Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle = (long)0x0, Value = (any){ (string)"impress_png_Export" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (any){ (com.sun.star.uno.XInterface)0x225c258{, supportedInterfaces={com.sun.star.lang.XTypeProvider,com.sun.star.io.XOutputStream}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE })
Failed to copy /path/to/work/src/website/contents/assets/images/diagrams/distributed-monitoring.odg to /path/to/work/src/web_compiled/assets/images/diagrams/distributed-monitoring.png

環境

$ uname -a
Linux server09 4.8.15-040815-generic #201612151231 SMP Thu Dec 15 17:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

$ dpkg -l | grep -i libreoffice
ii  hyphen-en-us                                2.8.8-2ubuntu1                                all          US English hyphenation patterns for LibreOffice/OpenOffice.org
ii  libreoffice-avmedia-backend-gstreamer       1:5.1.4-0ubuntu1                              amd64        GStreamer backend for LibreOffice
ii  libreoffice-base-core                       1:5.1.4-0ubuntu1                              amd64        office productivity suite -- shared library
ii  libreoffice-calc                            1:5.1.4-0ubuntu1                              amd64        office productivity suite -- spreadsheet
ii  libreoffice-common                          1:5.1.4-0ubuntu1                              all          office productivity suite -- arch-independent files
ii  libreoffice-core                            1:5.1.4-0ubuntu1                              amd64        office productivity suite -- arch-dependent files
ii  libreoffice-draw                            1:5.1.4-0ubuntu1                              amd64        office productivity suite -- drawing
ii  libreoffice-gnome                           1:5.1.4-0ubuntu1                              amd64        office productivity suite -- GNOME integration
ii  libreoffice-gtk                             1:5.1.4-0ubuntu1                              amd64        office productivity suite -- GTK+ integration
ii  libreoffice-help-en-us                      1:5.1.4-0ubuntu1                              all          office productivity suite -- English_american help
ii  libreoffice-help-ja                         1:5.1.4-0ubuntu1                              all          office productivity suite -- Japanese help
ii  libreoffice-impress                         1:5.1.4-0ubuntu1                              amd64        office productivity suite -- presentation
ii  libreoffice-l10n-ja                         1:5.1.4-0ubuntu1                              all          office productivity suite -- Japanese language package
ii  libreoffice-math                            1:5.1.4-0ubuntu1                              amd64        office productivity suite -- equation editor
ii  libreoffice-ogltrans                        1:5.1.4-0ubuntu1                              amd64        LibreOffice Impress extension for slide transitions using OpenGL
ii  libreoffice-pdfimport                       1:5.1.4-0ubuntu1                              amd64        PDF Import component for LibreOffice
ii  libreoffice-style-breeze                    1:5.1.4-0ubuntu1                              all          office productivity suite -- Breeze symbol style
ii  libreoffice-style-elementary                1:5.1.4-0ubuntu1                              all          office productivity suite -- Elementary symbol style
ii  libreoffice-style-galaxy                    1:5.1.4-0ubuntu1                              all          office productivity suite -- Galaxy (Default) symbol style
ii  libreoffice-style-human                     1:5.1.4-0ubuntu1                              all          office productivity suite -- Human symbol style
ii  libreoffice-writer                          1:5.1.4-0ubuntu1                              amd64        office productivity suite -- word processor
ii  mythes-en-us                                1:5.1.0-1ubuntu2.2                            all          English (USA) Thesaurus for LibreOffice
ii  ubuntu-mate-libreoffice-draw-icons          16.04.5.3                                     all          Ubuntu MATE desktop icons for LibreOffice draw
ii  uno-libs3                                   5.1.4-0ubuntu1                                amd64        LibreOffice UNO runtime environment -- public shared libraries
ii  unoconv                                     0.7-1.1                                       all          converter between LibreOffice document formats
ii  ure                                         5.1.4-0ubuntu1                                amd64        LibreOffice UNO runtime environment

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.