Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ck-c8y committed Jun 12, 2023
1 parent 03c4254 commit 5a46d47
Show file tree
Hide file tree
Showing 22 changed files with 42,504 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@


# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

*.project
*.orig
.settings/

logs/
bin/
*.iml

.DS_Store
.vscode/settings.json
node_modules
dist
14 changes: 14 additions & 0 deletions app.module.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
describe('Example test', () => {
/*let testComponent;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ExampleModule]
});
testComponent = TestBed.createComponent(TestComponent);
});*/

test('Always true', () => {
expect(true).toBe(true);
});
});
24 changes: 24 additions & 0 deletions app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule as ngRouterModule } from '@angular/router';
import { BootstrapComponent, CoreModule, RouterModule } from '@c8y/ngx-components';
import { CockpitDashboardModule } from '@c8y/ngx-components/context-dashboard';
import { BsModalRef, ModalModule } from 'ngx-bootstrap/modal';
import { RaiseAlarmPluginModule } from './widget/raise-alarm-plugin.module';

// Translations
import './locales/de.po'; // <- adding additional strings to the german translation.

@NgModule({
imports: [
BrowserAnimationsModule,
ngRouterModule.forRoot([], { enableTracing: false, useHash: true }),
RouterModule.forRoot(),
CoreModule.forRoot(),
RaiseAlarmPluginModule,
CockpitDashboardModule
],
providers: [BsModalRef],
bootstrap: [BootstrapComponent]
})
export class AppModule {}
6 changes: 6 additions & 0 deletions i18n.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Internationalizing files in po format (https://en.wikipedia.org/wiki/Gettext#Translating)
* You can always add additional strings by adding your own po file. All po files are
* combined to one JSON file per language and are loaded if the specific language is needed.
*/
import './locales/de.po'; // <- adding additional strings to the german translation.
17 changes: 17 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import './polyfills';
import './i18n';

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';

declare const __MODE__: string;
if (__MODE__ === 'production') {
enableProdMode();
}

export function bootstrap() {
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.log(err));
}
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// jest.config.js
module.exports = {
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/setup-jest.js'],
transformIgnorePatterns: ['/!node_modules\\/lodash-es/']
};
10 changes: 10 additions & 0 deletions locales/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
msgid ""
msgstr ""
"Project-Id-Version: c8y.plugin\n"
"Language: de\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "Module Federation widget"
msgstr "Modul Federation Dingsbums"
Loading

0 comments on commit 5a46d47

Please sign in to comment.