Skip to content

Commit

Permalink
2.3.1
Browse files Browse the repository at this point in the history
#### Changelog:
* Fix: Execution output now works as expected (probably).
* Chore: Update frontend dependencies.
* Chore: Add babel config.
* Chore: Update eslint config.
* Chore: Add vue and corejs dev dependencies.
* Chore(docs): Migrate to `sphinxcontrib-openapi` for building schema docs.
* Chore(docs): Add information about admin in installation.rst
* Refactor: Remove `OldLinesMixin`, use script setup and use `useAutoUpdate`.

See merge request polemarch/ce!296
  • Loading branch information
onegreyonewhite committed Jan 10, 2023
2 parents 64c0f73 + 3e6e9d3 commit 51b5713
Show file tree
Hide file tree
Showing 17 changed files with 369 additions and 440 deletions.
4 changes: 2 additions & 2 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ because our GUI also uses this API to work. Below there is an information about
entity we have in Polemarch and methods applicable to it.

This is an example of api schema, but you can find actual schema on Polemarch host at
``/api/v2/openapi/``.
``/api/v3/openapi/``.

.. _structure:

Expand All @@ -26,4 +26,4 @@ In Polemarch we have some entities that can be nested to another entities. Below

To add entities into another, you only need send ``[{"id": [instance_id]}, ...]`` to subpath. Also you can insert instead of data results of bulk request, inner mechanism add all entities in result to parent entity.

.. vst_openapi:: ./api_schema.yaml
.. openapi:: api_schema.yaml
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
'sphinx.ext.autodoc',
'sphinx_autodoc_typehints',
'sphinxcontrib.httpdomain',
'vstutils.api.doc_generator',
'sphinx.ext.autosectionlabel',
'sphinx.ext.intersphinx',
'sphinx.ext.extlinks',
'sphinxcontrib.openapi',
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -63,7 +63,7 @@

# General information about the project.
project = 'Polemarch'
copyright = 'VST Consulting, 2019-2022'
copyright = 'VST Consulting, 2019-2023'
author = 'VST Consulting'

# The version info for the project you're documenting, acts as replacement for
Expand Down
2 changes: 1 addition & 1 deletion doc/gui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ As you can see, the form of new group creation consists of following fields:
.. warning::
By default SQLite's maximum expression tree depth is 1000. This could create
problems with very nested groups. If you encounter so, please refer to
`documentation https://www.sqlite.org/limits.html#max_expr_depth`_.
`documentation <https://www.sqlite.org/limits.html#max_expr_depth>`_.

After group creation you will see the next page:

Expand Down
4 changes: 4 additions & 0 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ Install from PyPI

polemarchctl migrate

.. note::
The first time run this command, the first superuser ``admin`` will be created in the database with the same password.
We recommend changing the user's password immediately after the first login.

#. Start Polemarch:

.. sourcecode:: bash
Expand Down
42 changes: 36 additions & 6 deletions frontend_src/.babelrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
module.exports = {
presets: ['@babel/preset-env'],
plugins: [
'@babel/plugin-transform-runtime',
],
};
if (process.env.APP_ENV === 'prod') {
module.exports = {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'usage',
corejs: { version: '3.26.1', proposals: true },
},
],
],
plugins: [
[
'@babel/plugin-transform-runtime',
{
'corejs': false,
'regenerator': false,
'version': '^7.19.6'
}
],
],
}
} else {
module.exports = {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'usage',
corejs: { version: '3.26.1', proposals: true },
targets: 'last 1 Chrome versions',
},
],
],
}
}
1 change: 1 addition & 0 deletions frontend_src/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
commonjs: true,
es6: true,
node: true,
'vue/setup-compiler-macros': true,
},
rules: {
'no-debugger': 'warn',
Expand Down
16 changes: 16 additions & 0 deletions frontend_src/history/HistoryLine.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<!-- eslint-disable-next-line vue/no-v-html -->
<span v-html="htmlContent" />
</template>

<script setup>
import { computed } from 'vue';
const props = defineProps({
content: { type: String, required: true },
});
const htmlContent = computed(() => {
return spa.colors.ansiToHTML(props.content);
});
</script>
Loading

0 comments on commit 51b5713

Please sign in to comment.