net-suite frontend
Development setup
The initial setup consists of the following steps:
- Install the following
pip
-module usinggit
to be able to generate api configurationspip3 install git+https://git.scc.kit.edu/scc-net/net-suite/api-generator.git@master#egg=net-api-generator
- Enter the
frontend
folder usingcd frontend/
- Generate API-Endpoints in
frontend/public/api.yml
usingnet-api-generator openapi --default_endpoint=devel > public/api.yml
devel
,test
can also be used. Additionally, you need generate the files for theapi-services.gen
folder using the following commandnet-api-generator es-webpack
--version=${API_VERSION}
parameter, if you need a specific version. - Create a netvs-configuration
netvs.config.js
. Seenetvs.config.js.example
for more information. In most cases it's enough to simply copy and rename the example config. -
- Set the
FONTAWESOME_NPM_AUTH_TOKEN
environment variable - Run the development server either with
docker
anddocker-compose
(recommended way)docker-compose up -d netvs-core_run
npm install npm run serve
- Set the
Local project setup
FONTAWESOME_NPM_AUTH_TOKEN=<token> npm install
Compiles and minifies for production
npm run build
Run your tests
npm run test
Lints and fixes files
npm run lint
Customize configuration
Localization
Done using Vue I18n (v8!).
Locale files are in src/locales
Simple strings
{{$t('label')}}
Using slots
<i18n path="info" tag="p">
<template #limit>
<span>{{ changeLimit }}</span>
</template>
<template #action>
<a :href="changeUrl">{{ $t('change') }}</a>
</template>
</i18n>