diff --git a/polemarch/__init__.py b/polemarch/__init__.py index 6579c407..136a9157 100644 --- a/polemarch/__init__.py +++ b/polemarch/__init__.py @@ -31,6 +31,6 @@ "VST_ROOT_URLCONF": os.getenv("VST_ROOT_URLCONF", 'vstutils.urls'), } -__version__ = "1.2.2" +__version__ = "1.2.3" prepare_environment(**default_settings) diff --git a/polemarch/main/settings.py b/polemarch/main/settings.py index 8e9d9a3b..eb35d134 100644 --- a/polemarch/main/settings.py +++ b/polemarch/main/settings.py @@ -110,17 +110,17 @@ OPENAPI_EXTRA_LINKS['Request'] = [ { 'url': ( - 'https://gitlab.com/vstconsulting/polemarch/issues/new?' - 'issuable_template%5D=Ask&issue%5Btitle%5D=Ask%20about%20version%20' - +str(POLEMARCH_VERSION) + 'https://gitlab.com/vstconsulting/polemarch/issues/new?' + 'issuable_template%5D=Ask&issue%5Btitle%5D=Ask%20about%20version%20' + +str(POLEMARCH_VERSION) ), 'name': 'Question' }, { 'url': ( - 'https://gitlab.com/vstconsulting/polemarch/issues/new?' - 'issuable_template%5D=Bug&issue%5Btitle%5D=Bug%20in%20version%20' - + str(POLEMARCH_VERSION) + 'https://gitlab.com/vstconsulting/polemarch/issues/new?' + 'issuable_template%5D=Bug&issue%5Btitle%5D=Bug%20in%20version%20' + + str(POLEMARCH_VERSION) ), 'name': 'Bug report' }, @@ -262,6 +262,45 @@ class GitSectionConfig(SectionConfig): dict(forks=4, timeout=30, fact_caching_timeout=3600, poll_interval=5) ).all() +__PWA_ICONS_SIZES = [ + "36x36", "48x48", "72x72", "96x96", "120x120", "128x128", "144x144", + "150x150", "152x152", "180x180", "192x192", "310x310", "512x512" +] + +PWA_MANIFEST = { + "description": "Ansible based service for IT infrastructure management", + "icons": list( + map(lambda icon_size : { + "src": "{0}img/logo/logo_{1}.png".format(STATIC_URL, icon_size), + "sizes": icon_size, + "type": "image/png" + }, __PWA_ICONS_SIZES) + ), +} + +SPA_STATIC += [ + {'priority': 200, 'type': 'tpl', 'name': 'templates/pmFields.html', 'spa': True, 'api': False}, + {'priority': 200, 'type': 'tpl', 'name': 'templates/pmItems.html', 'spa': True, 'api': True}, + {'priority': 200, 'type': 'tpl', 'name': 'templates/pmProjects.html', 'spa': True, 'api': False}, + {'priority': 200, 'type': 'tpl', 'name': 'templates/pmHistory.html', 'spa': True, 'api': False}, + {'priority': 150, 'type': 'js', 'name': 'js/libs/ansi_up.js', 'spa': True, 'api': True}, + {'priority': 150, 'type': 'js', 'name': 'js/pmCustomizer.js', 'spa': True, 'api': True}, + {'priority': 160, 'type': 'js', 'name': 'js/common.js', 'spa': True, 'api': True}, + {'priority': 182, 'type': 'js', 'name': 'js/pmFields.js', 'spa': True, 'api': False}, + {'priority': 182, 'type': 'js', 'name': 'js/pmFieldsMixins.js', 'spa': True, 'api': False}, + {'priority': 183, 'type': 'js', 'name': 'js/pmItems.js', 'spa': True, 'api': True}, + {'priority': 184, 'type': 'js', 'name': 'js/pmHosts.js', 'spa': True, 'api': False}, + {'priority': 184.5, 'type': 'js', 'name': 'js/pmGroups.js', 'spa': True, 'api': False}, + {'priority': 185, 'type': 'js', 'name': 'js/pmInventories.js', 'spa': True, 'api': False}, + {'priority': 186, 'type': 'js', 'name': 'js/pmProjects.js', 'spa': True, 'api': False}, + {'priority': 187, 'type': 'js', 'name': 'js/pmHistory.js', 'spa': True, 'api': False}, + {'priority': 190, 'type': 'js', 'name': 'js/pmTemplates.js', 'spa': True, 'api': False}, + {'priority': 191, 'type': 'js', 'name': 'js/pmPeriodicTasks.js', 'spa': True, 'api': False}, + {'priority': 183, 'type': 'js', 'name': 'js/pmUsers.js', 'spa': True, 'api': False}, + {'priority': 400, 'type': 'js', 'name': 'js/pmDashboard.js', 'spa': True, 'api': False}, + {'priority': 200, 'type': 'css', 'name': 'css/polemarch-gui.css', 'spa': True, 'api': True}, + {'priority': 200, 'type': 'css', 'name': 'css/ansi-colors.css', 'spa': True, 'api': True}, +] # TEST settings if "test" in sys.argv: diff --git a/polemarch/static/img/logo/logo_120x120.png b/polemarch/static/img/logo/logo_120x120.png new file mode 100644 index 00000000..ad26bccc Binary files /dev/null and b/polemarch/static/img/logo/logo_120x120.png differ diff --git a/polemarch/static/img/logo/logo_128x128.png b/polemarch/static/img/logo/logo_128x128.png new file mode 100644 index 00000000..6085ecf6 Binary files /dev/null and b/polemarch/static/img/logo/logo_128x128.png differ diff --git a/polemarch/static/img/logo/logo_144x144.png b/polemarch/static/img/logo/logo_144x144.png new file mode 100644 index 00000000..cd849403 Binary files /dev/null and b/polemarch/static/img/logo/logo_144x144.png differ diff --git a/polemarch/static/img/logo/logo_150x150.png b/polemarch/static/img/logo/logo_150x150.png new file mode 100644 index 00000000..df9e8c79 Binary files /dev/null and b/polemarch/static/img/logo/logo_150x150.png differ diff --git a/polemarch/static/img/logo/logo_152x152.png b/polemarch/static/img/logo/logo_152x152.png new file mode 100644 index 00000000..fc32a84e Binary files /dev/null and b/polemarch/static/img/logo/logo_152x152.png differ diff --git a/polemarch/static/img/logo/logo_180x180.png b/polemarch/static/img/logo/logo_180x180.png new file mode 100644 index 00000000..a373c318 Binary files /dev/null and b/polemarch/static/img/logo/logo_180x180.png differ diff --git a/polemarch/static/img/logo/logo_192x192.png b/polemarch/static/img/logo/logo_192x192.png new file mode 100644 index 00000000..c7db0eeb Binary files /dev/null and b/polemarch/static/img/logo/logo_192x192.png differ diff --git a/polemarch/static/img/logo/logo_310x310.png b/polemarch/static/img/logo/logo_310x310.png new file mode 100644 index 00000000..c5528421 Binary files /dev/null and b/polemarch/static/img/logo/logo_310x310.png differ diff --git a/polemarch/static/img/logo/logo_36x36.png b/polemarch/static/img/logo/logo_36x36.png new file mode 100644 index 00000000..82e74645 Binary files /dev/null and b/polemarch/static/img/logo/logo_36x36.png differ diff --git a/polemarch/static/img/logo/logo_48x48.png b/polemarch/static/img/logo/logo_48x48.png new file mode 100644 index 00000000..4ac47f43 Binary files /dev/null and b/polemarch/static/img/logo/logo_48x48.png differ diff --git a/polemarch/static/img/logo/logo_512x512.png b/polemarch/static/img/logo/logo_512x512.png new file mode 100644 index 00000000..8ec1de59 Binary files /dev/null and b/polemarch/static/img/logo/logo_512x512.png differ diff --git a/polemarch/static/img/logo/logo_72x72.png b/polemarch/static/img/logo/logo_72x72.png new file mode 100644 index 00000000..4928a121 Binary files /dev/null and b/polemarch/static/img/logo/logo_72x72.png differ diff --git a/polemarch/static/img/logo/logo_96x96.png b/polemarch/static/img/logo/logo_96x96.png new file mode 100644 index 00000000..ca80224f Binary files /dev/null and b/polemarch/static/img/logo/logo_96x96.png differ diff --git a/polemarch/static/js/pmHistory.js b/polemarch/static/js/pmHistory.js index 679d367c..b5d5a1cc 100644 --- a/polemarch/static/js/pmHistory.js +++ b/polemarch/static/js/pmHistory.js @@ -494,23 +494,7 @@ var history_pk_mixin = { * Method, that gets lines and set them to this.lines async. */ getLines() { - if(app.files_cache.use_cache) { - return this.getLinesFromCache(); - } else { - return this.loadLines(); - } - }, - - /** - * Method, that gets lines from cache (if they exist there) or loads them from API. - */ - getLinesFromCache() { - return app.files_cache.getFile(this.lines_url).then(response => { - this.lines = JSON.parse(response.data); - return response; - }).catch(error => { - return this.loadLines(); - }); + return this.loadLines(); }, /** @@ -597,10 +581,6 @@ var history_pk_mixin = { this.lines.push(new_line); } } - - if(app.files_cache.use_cache) { - app.files_cache.setFile(this.lines_url, JSON.stringify(this.lines)); - } }, /** * Method, that returns html (line content with ansi_up classes). diff --git a/polemarch/static/templates/pmItems.html b/polemarch/static/templates/pmItems.html index f3c9280d..b54c684f 100644 --- a/polemarch/static/templates/pmItems.html +++ b/polemarch/static/templates/pmItems.html @@ -94,9 +94,9 @@

- -