6 |
7 | ## Project Status
8 | This project is currently in its beta stage and may not be suitable for production use.
9 |
10 | ## Introduction
11 | OpenVox View is a viewer for openvoxdb/puppetdb, inspired by [Puppetboard](https://github.com/voxpupuli/puppetboard).
12 |
13 | ## Features
14 | - Overview of reports
15 | - Overview of facts
16 | - Overview of nodes
17 | - Predefined views
18 | - Ability to perform multiple queries
19 | - Query history
20 | - Predefined queries
21 |
22 | ## Container
23 | You can build a container with the Containerfile
24 |
25 | ```bash
26 | podman build -t openvoxview .
27 | ```
28 |
29 | or for Docker
30 | ```bash
31 | docker build -t openvoxview -f Containerfile .
32 | ```
33 |
34 | ## Configuration
35 | See [CONFIGURATION.md](./CONFIGURATION.md)
36 |
37 |
38 | ## Screenshots
39 | ### Reports Overview
40 | 
41 |
42 | ### Node Detail
43 | 
44 |
45 | ### Query Execution
46 | 
47 |
48 | ### Query History
49 | 
50 |
51 | ## Contribution
52 | We welcome you to create issues or submit pull requests. Most important be excellent to each other.
53 |
54 | For more infos, see [DEVELOPMENT.md](./DEVELOPMENT.md)
55 |
56 | ## OpenVox/Puppet Module
57 | There is also a openvox module for deployment of openvoxview see [puppet-openvoxview](https://github.com/voxpupuli/puppet-openvoxview)
58 |
59 |
60 | ## Special Thanks
61 | We extend our gratitude for the remarkable work on [Puppetboard](https://github.com/voxpupuli/puppetboard).
62 |
--------------------------------------------------------------------------------
/ui/src/boot/i18n.ts:
--------------------------------------------------------------------------------
1 | import { defineBoot } from '#q-app/wrappers';
2 | import { createI18n } from 'vue-i18n';
3 |
4 | import messages from 'src/i18n';
5 |
6 | export type MessageLanguages = keyof typeof messages;
7 | // Type-define 'en-US' as the master schema for the resource
8 | export type MessageSchema = (typeof messages)['en-US'];
9 |
10 | // See https://vue-i18n.intlify.dev/guide/advanced/typescript.html#global-resource-schema-type-definition
11 | /* eslint-disable @typescript-eslint/no-empty-object-type */
12 | declare module 'vue-i18n' {
13 | // define the locale messages schema
14 | export interface DefineLocaleMessage extends MessageSchema {}
15 |
16 | // define the datetime format schema
17 | export interface DefineDateTimeFormat {}
18 |
19 | // define the number format schema
20 | export interface DefineNumberFormat {}
21 | }
22 | /* eslint-enable @typescript-eslint/no-empty-object-type */
23 | export default defineBoot(({ app }) => {
24 | const i18n = createI18n<{ message: MessageSchema }, MessageLanguages>({
25 | locale: getBrowserLocale(),
26 | legacy: false,
27 | messages,
28 | });
29 |
30 | // Set i18n instance on app
31 | app.use(i18n);
32 | });
33 |
34 | export function getBrowserLocale(): MessageLanguages {
35 | const availableLocales: MessageLanguages[] = Object.keys(messages) as MessageLanguages[];
36 | const fallbackLocale: MessageLanguages = 'en-US';
37 |
38 | if (navigator.languages) {
39 | for (const lang of navigator.languages) {
40 | // Try an exact match
41 | if (availableLocales.includes(lang as MessageLanguages)) {
42 | return lang as MessageLanguages;
43 | }
44 |
45 | // Otherwise try to split language code and try to compare the first part only
46 | const langCode = lang.split('-')[0];
47 | const match = availableLocales.find(
48 | (loc) => loc.split('-')[0] === langCode,
49 | );
50 | if (match) {
51 | return match;
52 | }
53 | }
54 | }
55 |
56 | return fallbackLocale;
57 | }
58 |
--------------------------------------------------------------------------------
/ui/src/puppet/models.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/no-explicit-any */
2 |
3 | import { autoImplement } from 'src/helper/functions';
4 |
5 | export interface PuppetEnvironment {
6 | name: string;
7 | }
8 |
9 | export interface ApiPuppetFact {
10 | certname: string;
11 | environment: string;
12 | name: string;
13 | value: any;
14 | }
15 |
16 | export class PuppetFact extends autoImplement{{ col.value }}
138 | {{ col.value }}
165 |