diff --git a/solr/webapp/web/solrUi/.gitignore b/solr/webapp/web/solrUi/.gitignore new file mode 100644 index 00000000000..0711527ef9d --- /dev/null +++ b/solr/webapp/web/solrUi/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/solr/webapp/web/solrUi/README.md b/solr/webapp/web/solrUi/README.md new file mode 100644 index 00000000000..225c1853e10 --- /dev/null +++ b/solr/webapp/web/solrUi/README.md @@ -0,0 +1,27 @@ +# SolrUi + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.x . + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/solr/webapp/web/solrUi/angular.json b/solr/webapp/web/solrUi/angular.json new file mode 100644 index 00000000000..fa97d6d255d --- /dev/null +++ b/solr/webapp/web/solrUi/angular.json @@ -0,0 +1,108 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "solrUi": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "outputPath": "dist/solr-ui", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": [ + "zone.js" + ], + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.scss" + ], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "10kb", + "maximumError": "10kb" + } + ], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.development.ts" + } + ] + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "solrUi:build:production" + }, + "development": { + "buildTarget": "solrUi:build:development", + "proxyConfig": "src/proxy.conf.json" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "solrUi:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": [ + "zone.js", + "zone.js/testing" + ], + "tsConfig": "tsconfig.spec.json", + "inlineStyleLanguage": "scss", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.scss" + ], + "scripts": [] + } + } + } + } + } +} diff --git a/solr/webapp/web/solrUi/package.json b/solr/webapp/web/solrUi/package.json new file mode 100644 index 00000000000..6af2b13150d --- /dev/null +++ b/solr/webapp/web/solrUi/package.json @@ -0,0 +1,45 @@ +{ + "name": "solr-ui", + "version": "2.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development", + "test": "ng test" + }, + "private": true, + "dependencies": { + "@angular/animations": "18.2.8", + "@angular/common": "18.2.8", + "@angular/compiler": "18.2.8", + "@angular/core": "18.2.8", + "@angular/forms": "18.2.8", + "@angular/platform-browser": "18.2.8", + "@angular/platform-browser-dynamic": "18.2.8", + "@angular/router": "18.2.8", + "@ngx-resource/core": "n15.0.0", + "@ngx-resource/handler-ngx-http": "15.0.0", + "rxjs": "7.8.1", + "tslib": "2.7.0", + "zone.js": "0.14.10" + }, + "devDependencies": { + "@angular-devkit/build-angular": "18.2.8", + "@angular/cli": "18.2.8", + "@angular/compiler-cli": "18.2.8", + "@types/jasmine": "5.1.4", + "autoprefixer": "10.4.20", + "cssnano": "7.0.5", + "jasmine-core": "5.3.0", + "karma": "6.4.4", + "karma-chrome-launcher": "3.2.0", + "karma-coverage": "2.2.1", + "karma-jasmine": "5.1.0", + "karma-jasmine-html-reporter": "2.1.0", + "postcss": "8.4.47", + "postcss-cli": "11.0.0", + "tslombok": "^1.2.6", + "typescript": "5.5.4" + } +} diff --git a/solr/webapp/web/solrUi/postcss.config.js b/solr/webapp/web/solrUi/postcss.config.js new file mode 100644 index 00000000000..456f24ceb15 --- /dev/null +++ b/solr/webapp/web/solrUi/postcss.config.js @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +module.exports = { + plugins: [ + require('autoprefixer'), + require('cssnano')({ + preset: 'default', + }), + ], +}; diff --git a/solr/webapp/web/solrUi/src/app/app.component.html b/solr/webapp/web/solrUi/src/app/app.component.html new file mode 100644 index 00000000000..c3175bb7f8a --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/app.component.html @@ -0,0 +1,28 @@ + + +
+
+
+
+ +
+
+
+
+ diff --git a/solr/webapp/web/solrUi/src/app/app.component.scss b/solr/webapp/web/solrUi/src/app/app.component.scss new file mode 100644 index 00000000000..171e9c7846f --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/app.component.scss @@ -0,0 +1,209 @@ +/*! + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +$color_1: #c0c0c0; +$color_2: #fff; +$color_3: #4D4D4D; +$color_4: #00f; +$color_5: aqua; +$color_6: #333; +$background-color_1: #fafafa; +$background-color_2: #f00; +$background-color_3: #f0f0f0; +$border-color_1: #c0c0c0; + +#content-wrapper { + margin-left: 150px; + border: 1px solid #c0c0c0; + min-height: 500px; +} +#content { + padding: 10px; + >.loader { + background-position: 0 50%; + padding-left: 21px; + } + iframe { + border: 0; + display: block; + min-height: 400px; + width: 100%; + } + .block { + margin-bottom: 10px; + h2 { + background-color: $background-color_1; + background-position: 5px 50%; + border-bottom: 1px solid #f0f0f0; + font-weight: bold; + padding: 5px; + padding-left: 26px; + } + .message { + padding: 5px; + } + .content { + padding: 5px; + } + } + .block.disabled { + color: $color_1; + h2 { + color: $color_1; + } + } + .tree { + li.jstree-last { + background: transparent; + } + .jstree-open { + >ins { + background-position: -36px 0; + } + } + .jstree-closed { + >ins { + background-position: -18px 0; + } + } + .jstree-leaf { + >ins { + background-position: 0 0; + } + a { + .jstree-icon { + background-image: url(../../../img/ico/document-text.png ); + background-position: unset; + } + } + } + a.active { + background-color: $background-color_3; + color: $color_4; + } + a { + .jstree-icon { + background-image: url(../../../img/ico/folder.png ); + background-position: unset; + } + } + .jstree-search { + font-style: italic; + } + a.jstree-search { + color: $color_5; + } + } + .address-bar { + margin-bottom: 10px; + margin-top: 10px; + background-image: url(../../../img/ico/ui-address-bar.png ); + background-position: 5px 50%; + border: 1px solid #f0f0f0; + box-shadow: 1px 1px 0 #f0f0f0; + -moz-box-shadow: 1px 1px 0 #f0f0f0; + -webkit-box-shadow: 1px 1px 0 #f0f0f0; + color: $color_3; + display: block; + overflow: hidden; + padding: 5px; + padding-left: 26px; + white-space: nowrap; + &:focus { + border-color: $border-color_1; + box-shadow: 1px 1px 0 #d8d8d8; + -moz-box-shadow: 1px 1px 0 #d8d8d8; + -webkit-box-shadow: 1px 1px 0 #d8d8d8; + color: $color_6; + } + &:hover { + border-color: $border-color_1; + box-shadow: 1px 1px 0 #d8d8d8; + -moz-box-shadow: 1px 1px 0 #d8d8d8; + -webkit-box-shadow: 1px 1px 0 #d8d8d8; + color: $color_6; + } + } +} +.header-message { + border: 1px solid #f00; + margin-left: 150px; + margin-bottom: 20px; + h2 { + padding: 10px; + background-color: $background-color_2; + color: $color_2; + font-weight: bold; + } + ul { + padding: 10px; + } + p { + padding: 10px; + color: $color_3; + padding-top: 0; + } +} +#loading { + #http-exception { + display: none; + } +} +.clearfix { + &:after { + clear: both; + content: "."; + display: block; + font-size: 0; + height: 0; + visibility: hidden; + } + display: block; +} +#wrapper { + position: relative; + margin: 0 auto; + margin-bottom: 30px; + text-align: left; +} +#main { + min-width: 750px; + position: relative; +} +#main.error { + border: 0; + min-height: 0; + padding-top: 20px; + .message { + background-color: $background-color_2; + background-image: url(../../../img/ico/construction.png ); + background-position: 10px 50%; + color: $color_2; + font-weight: bold; + margin-left: 150px; + margin-bottom: 20px; + padding: 10px; + padding-left: 35px; + } + .code { + border: 1px solid #c0c0c0; + padding: 5px; + } +} + +@import "modules/dashboard/components/main/main.component"; diff --git a/solr/webapp/web/solrUi/src/app/app.component.ts b/solr/webapp/web/solrUi/src/app/app.component.ts new file mode 100644 index 00000000000..967b33b2506 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/app.component.ts @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import {Component} from '@angular/core'; +import {RouterOutlet} from '@angular/router'; +import {DashboardModule} from "./modules/dashboard/dashboard.module"; + +@Component({ + selector: 'app-root', + standalone: true, + imports: [RouterOutlet, DashboardModule], + templateUrl: './app.component.html', + styleUrl: './app.component.scss' +}) +export class AppComponent { + title = 'solrUi'; +} diff --git a/solr/webapp/web/solrUi/src/app/app.config.ts b/solr/webapp/web/solrUi/src/app/app.config.ts new file mode 100644 index 00000000000..78c764a065f --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/app.config.ts @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {ApplicationConfig, InjectionToken} from '@angular/core'; +import {provideRouter} from '@angular/router'; + +import {routes} from './app.routes'; +import {HttpClient, provideHttpClient, withFetch} from "@angular/common/http"; +import {ResourceHandlerHttpClient} from "@ngx-resource/handler-ngx-http"; +import {ResourceHandler} from "@ngx-resource/core"; + +export const RES_HANDLER = new InjectionToken("RES_HANDLER"); + +export function createResourceHandler(httpClient:HttpClient): ResourceHandler { + return new ResourceHandlerHttpClient(httpClient); +} + +export const appConfig: ApplicationConfig = { + providers: [provideRouter(routes), provideHttpClient(withFetch()), { provide: RES_HANDLER, useFactory: createResourceHandler, deps:[HttpClient]}] +}; diff --git a/solr/webapp/web/solrUi/src/app/app.routes.ts b/solr/webapp/web/solrUi/src/app/app.routes.ts new file mode 100644 index 00000000000..ba599bba415 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/app.routes.ts @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {Routes} from '@angular/router'; + +export const routes: Routes = []; diff --git a/solr/webapp/web/solrUi/src/app/modules/common/models/IResponseHeader.ts b/solr/webapp/web/solrUi/src/app/modules/common/models/IResponseHeader.ts new file mode 100644 index 00000000000..ce6364b69bb --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/common/models/IResponseHeader.ts @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface IResponseHeader { + status: number | undefined; + qTime: number | undefined; +} diff --git a/solr/webapp/web/solrUi/src/app/modules/common/pipes/sizeconverter/size-unit-converter-pipe.pipe.ts b/solr/webapp/web/solrUi/src/app/modules/common/pipes/sizeconverter/size-unit-converter-pipe.pipe.ts new file mode 100644 index 00000000000..89e45735652 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/common/pipes/sizeconverter/size-unit-converter-pipe.pipe.ts @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {Pipe, PipeTransform} from '@angular/core'; + + +@Pipe({ + name: 'sizeUnitConverter' +}) +export class SizeUnitConverterPipe implements PipeTransform { + private readonly unitNames: {short:string, long:string}[]= [ + {short: "B", long: "Byte/s"}, + {short: "KB", long: "Kilobyte/s"}, + {short: "MB", long: "Megabyte/s"}, + {short: "GB", long: "Gigabyte/s"}, + {short: "TB", long: "Terabyte/s"}, + {short: "PB", long: "Petabyte/s"}, + {short: "EB", long: "Exabyte/s"}, + {short: "ZB", long: "Zettabyte/s"}, + {short: "YB", long: "Yottabyte/s"} + ]; + + private readonly decimalBase = 100; + private readonly base = 1024; + + transform(sizeValue: number, isLong: boolean = false): string { + + ; + let power = Math.round(Math.log(sizeValue) / Math.log(this.base)); + let unit = isLong ? this.unitNames[power].short : this.unitNames[power].long; + let size = Math.round((sizeValue / Math.pow(this.base, power) ) * this.decimalBase) / this.decimalBase; + + return `${size} ${unit}`; + } + +} diff --git a/solr/webapp/web/solrUi/src/app/modules/common/pipes/timeconverter/time-ago.pipe.ts b/solr/webapp/web/solrUi/src/app/modules/common/pipes/timeconverter/time-ago.pipe.ts new file mode 100644 index 00000000000..139b62e7a40 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/common/pipes/timeconverter/time-ago.pipe.ts @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import {Pipe, PipeTransform} from '@angular/core'; + +@Pipe({ + name: 'timeAgo' +}) +export class TimeAgoPipe implements PipeTransform { + private static YEAR_MS: number = 1000 * 60 * 60 * 24 * 7 * 4 * 12; + private static MAPPER: {single:string, many:string, div: number}[] = [ + { single: 'a year ago', many: 'years', div: 1 }, + { single: 'a month ago', many: 'months', div: 12 }, + { single: 'a week ago', many: 'weeks', div: 4 }, + { single: 'a day ago', many: 'days', div: 7 }, + { single: 'an hour ago', many: 'hours', div: 24 }, + { single: 'a minute ago', many: 'minutes', div: 60 }, + ] + transform(value: number): string { + if (!value) { + return 'Invalid start time'; + } + + for (let i: number = 0, l = TimeAgoPipe.MAPPER.length, div: number = TimeAgoPipe.YEAR_MS; i < l; ++i) { + let elm = TimeAgoPipe.MAPPER[i]; + let unit: number = Math.floor(value / (div /= elm.div)); + + if (unit >= 1) { + return unit === 1 ? elm.single : `${unit} ${elm.many} ago`; + } + } + + return 'less than a minute'; + } + +} diff --git a/solr/webapp/web/solrUi/src/app/modules/common/shared.module.ts b/solr/webapp/web/solrUi/src/app/modules/common/shared.module.ts new file mode 100644 index 00000000000..8d8f6cca7ab --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/common/shared.module.ts @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import {NgModule} from '@angular/core'; +import {SizeUnitConverterPipe} from "./pipes/sizeconverter/size-unit-converter-pipe.pipe"; +import {TimeAgoPipe} from "./pipes/timeconverter/time-ago.pipe"; +import {CommonModule, NgClass, NgFor, NgIf} from "@angular/common"; +import {IResourceParams} from "@ngx-resource/core"; +import {environment} from "../../../environments/environment"; + + +@NgModule({ + declarations: [SizeUnitConverterPipe, TimeAgoPipe], + imports: [CommonModule, NgClass, NgFor, NgIf], + exports: [SizeUnitConverterPipe, TimeAgoPipe, NgClass, NgFor, NgIf], +}) +export class SharedModule { + + static isOdd(id: number):boolean { + return (id & 1) !== 0 + } + + static getResourceSettings(path: string): IResourceParams{ + if(environment.production){ + return { + url: environment.apiUrl, + pathPrefix: path + } + } + return { + url: environment.apiUrl, + pathPrefix: path + } + } +} diff --git a/solr/webapp/web/solrUi/src/app/modules/common/utils/DateConverter.ts b/solr/webapp/web/solrUi/src/app/modules/common/utils/DateConverter.ts new file mode 100644 index 00000000000..393bc89a6e3 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/common/utils/DateConverter.ts @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class DateConverter { + private static pattern: string = '/.* (?\d{4}-\d{2}-\d{2}) .*/'; + + public static convertDateFromServerVersion(versionInfo: string): Date { + let found: RegExpMatchArray | null = versionInfo.match(this.pattern); + + + return (found && found.groups) ? new Date(found.groups['date']) : new Date(); + } +} + diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/components/main/main.component.html b/solr/webapp/web/solrUi/src/app/modules/dashboard/components/main/main.component.html new file mode 100644 index 00000000000..4dbf5c3dc09 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/components/main/main.component.html @@ -0,0 +1,164 @@ + + +
+
+
+
+

Instance

+
+
    +
  • +
    Start
    +
    {{startTime() | timeAgo}}
    +
  • +
+
+
+
+

Versions

+
+
    +
  • +
    solr-spec
    +
    {{solrSpecificationVersion()}}
    +
  • +
  • +
    solr-impl
    +
    {{solrImplementationVersion()}}
    +
  • +
  • +
    lucene-spec
    +
    {{luceneSpecificationVersion()}}
    +
  • +
  • +
    lucene-impl
    +
    {{luceneImplementationVersion()}}
    +
  • +
+
+
+

Outdated release WARNING: This Solr release is more than a year old. Consider upgrading.

+
+
+
+
+
+

System + {{averageLoad()}} +

+ reload +
+
+

Physical Memory + {{freeJvmMemory()}} +

+
+
+ {{maxMemory()}} +
+ {{ availableMemory() | sizeUnitConverter }} +
+
+
+
+
+

Swap Space + {{swapInPercents()}} +

+
+
+ {{swapMax()}} +
+ {{ swapAvailable() | sizeUnitConverter }} +
+
+
+
+
+

File Descriptor Count + {{fileDescriptors()}} +

+
+
+ {{maxDescriptors()}} +
+ {{openedDescriptors()}} +
+
+
+
+

Sorry, no information available

+
+
+
+
+
+
+
+

JVM

+
+
    +
  • +
    Runtime
    +
    {{javaMachineInformation()}}
    +
  • +
  • +
    Processors
    +
    {{amountProcessors()}}
    +
  • +
  • +
    +
    Args
    + @for (arg of cmdArguments(); track $index){ +
    {{ arg }}
    + } @empty { +
    No arguments to display
    + } +
    +
  • +
+
+
+
+
+
+

JVM-Memory + {{javaMemoryPercentage()}}

+
+
+
+
+ {{javaMemoryMax() | sizeUnitConverter}} +
+ {{javaMemoryTotal() | sizeUnitConverter}} +
+ {{javaMemoryUsed() | sizeUnitConverter}} +
+
+
+
+
+
+
+
+ +
+
+
+
diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/components/main/main.component.scss b/solr/webapp/web/solrUi/src/app/modules/dashboard/components/main/main.component.scss new file mode 100644 index 00000000000..ff873870560 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/components/main/main.component.scss @@ -0,0 +1,246 @@ +/*! + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +$color_1: #4D4D4D; +$color_2: #8D8D8D; +$color_3: #969696; +$background-color_1: #f0f0f0; +$background-color_2: #c0c0c0; +$background-color_3: #969696; +$border-color_1: #f0f0f0; +$border-color_2: #c0c0c0; +$border-color_3: #969696; + +#content { + #index { + .bar-desc { + color: $color_1; + font-weight: normal; + margin-left: 10px; + white-space: pre; + } + .bar-holder { + box-shadow: 5px 5px 10px #c0c0c0; + -moz-box-shadow: 5px 5px 10px #c0c0c0; + -webkit-box-shadow: 5px 5px 10px #c0c0c0; + height: 35px; + .bar { + height: 100%; + position: relative; + } + div { + .val { + border-right: 1px solid #f00; + display: block; + padding-right: 5px; + position: absolute; + right: 0; + top: 35px; + white-space: nowrap; + } + } + .bar-max.bar { + background-color: $background-color_1; + } + .bar-max.val { + border-color: $border-color_1; + color: $color_2; + } + .bar-total.bar { + background-color: $background-color_2; + } + .bar-total.val { + border-color: $border-color_2; + color: $color_1; + } + .bar-used.bar { + background-color: $background-color_3; + } + .bar-used.val { + border-color: $border-color_3; + color: $color_3; + } + } + .bar-holder.bar-lvl-2 { + .bar-max.val { + padding-top: 25px; + } + .bar-total.val { + padding-top: 5px; + } + margin-bottom: 45px; + } + .bar-holder.bar-lvl-3 { + .bar-max.val { + padding-top: 45px; + } + .bar-total.val { + padding-top: 25px; + } + .bar-used.val { + padding-top: 5px; + } + margin-bottom: 65px; + } + .loader { + background-position: 0 50%; + padding-left: 21px; + } + .index-left { + float: left; + width: 55%; + } + .index-right { + float: right; + width: 40%; + } + .data { + padding-bottom: 12px; + overflow: hidden; + &:hover { + overflow-x: auto; + } + li { + padding-top: 3px; + padding-bottom: 3px; + dt { + float: left; + white-space: nowrap; + width: 20%; + } + dd { + float: right; + text-overflow: ellipsis; + white-space: nowrap; + width: 80%; + } + dd.odd { + background-color: $background-color_1; + } + } + dt { + span { + background-position: 1px 50%; + display: block; + padding-left: 22px; + font-weight: bold; + text-align: left; + } + } + } + #instance { + h2 { + background-image: url( ../../../../../../../img/ico/server.png ); + } + .start_time { + dt { + span { + background-image: url( ../../../../../../../img/ico/clock-select.png ); + } + } + } + } + #versions { + h2 { + background-image: url( ../../../../../../../img/ico/property.png ); + } + .solr { + span { + background-image: url( ../../../../../../../img/solr-ico.png ); + } + } + .lucene { + span { + background-image: url( ../../../../../../../img/lucene-ico.png ); + } + } + } + #jvm { + h2 { + background-image: url( ../../../../../../../img/ico/jar.png ); + } + .jvm_version { + dt { + span { + background-image: url( ../../../../../../../img/ico/jar.png ); + } + } + } + .processors { + dt { + span { + background-image: url( ../../../../../../../img/ico/processor.png ); + } + } + } + .command_line_args { + dt { + span { + background-image: url( ../../../../../../../img/ico/terminal.png ); + } + } + } + } + #system { + h2 { + background-image: url( ../../../../../../../img/ico/system-monitor.png ); + } + position: relative; + .reload { + background-image: url( ../../../../../../../img/ico/arrow-circle.png ); + background-position: 50% 50%; + display: block; + height: 30px; + position: absolute; + right: 0; + top: 0; + width: 30px; + span { + display: none; + } + } + .reload.loader { + padding-left: 0; + } + .content { + p { + margin-top: 10px; + margin-bottom: 5px; + } + .no-info { + color: $color_1; + display: none; + font-style: italic; + } + } + } + #jvm-memory { + h2 { + background-image: url( ../../../../../../../img/ico/memory.png ); + } + } + #jvm-memory-bar { + margin-top: 20px; + } + } +} +.warning-msg { + >img { + content: url( ../../../../../../../img/ico/exclamation-button.png ); + } +} diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/components/main/main.component.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/components/main/main.component.ts new file mode 100644 index 00000000000..a536e809c45 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/components/main/main.component.ts @@ -0,0 +1,184 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import {Component} from '@angular/core'; +import {DateConverter} from "../../../common/utils/DateConverter"; +import {SystemInformationService} from "../../services/system-information.service"; +import {ISystemInfoResponse} from "../../models/systeminfo/ISystemInfoResponse"; +import {SharedModule} from "../../../common/shared.module"; + + +@Component({ + selector: 'app-dashboard', + templateUrl: './main.component.html', + styleUrl: './main.component.scss' +}) +export class MainComponent { + + + private _info!: ISystemInfoResponse; + + constructor(private _systemInformationService: SystemInformationService) { + } + + ngOnInit() { + this._systemInformationService.getSystemInfo() + .then(r => this._info = r); + } + get info(): ISystemInfoResponse { + return this._info; + } + + averageLoad(): string { + return this._info.system.systemLoadAverage.toFixed(2); + } + + isDataAvailable(): boolean { + return !!this._info + } + + startTime(): number { + return this._info.jvm.jmx.upTimeMS + } + + solrSpecificationVersion(): string { + return this._info.lucene['solr-spec-version']; + } + + solrImplementationVersion(): string { + return this._info.lucene['solr-impl-version']; + } + + luceneSpecificationVersion(): string { + return this._info.lucene['lucene-spec-version']; + } + + luceneImplementationVersion(): string { + return this._info.lucene['lucene-impl-version']; + } + + isMemoryInformationAvailable(): boolean { + return !!(this.maxMemory() && this.freeMemory()); + } + + isSwapInformationAvailable(): boolean { + return !!(this.swapMax() && this.swapFree()); + } + + maxMemory(): number { + return this._info.system.totalPhysicalMemorySize; + } + + availableMemory(): number { + return this.maxMemory() - this.freeMemory(); + } + + freeJvmMemory(): string { + return this._info.jvm.memory.free; + } + + memoryInPercents(): string { + return this.displayValueInPercents(this.availableMemory(), this.maxMemory()); + } + + private displayValueInPercents(current: number, max: number) { + return `${(current / max * 100).toFixed(1)} %`; + } + + swapAvailable(): number { + return this.swapFree(); + } + swapMax(): number { + return this._info.system.totalSwapSpaceSize; + } + + swapInPercents(): string { + return this.displayValueInPercents(this.swapAvailable(), this.swapMax()); + } + + fileDescriptors(): string{ + return this.displayValueInPercents(this.openedDescriptors(), this.maxDescriptors()); + } + + openedDescriptors(): number { + return this._info.system.openFileDescriptorCount; + } + + maxDescriptors(): number { + return this._info.system.maxFileDescriptorCount; + } + + private freeMemory(): number { + return this._info.system.freePhysicalMemorySize; + } + + noIformationAvailable(): boolean { + return !(this.isMemoryInformationAvailable() && this.isSwapInformationAvailable() + && this.isFileDescriptorInformationAvailable()); + } + + isFileDescriptorInformationAvailable(): boolean { + return !!(this.openedDescriptors() && this.maxDescriptors()); + } + + private swapFree():number { + return this._info.system.freeSwapSpaceSize; + } + + javaMachineInformation(): string { + return `${this._info.jvm.name} ${this._info.jvm.version}`; + } + + amountProcessors(): number { + return this._info.jvm.processors; + } + + isOldRelease(): boolean { + let appDateRelease = DateConverter.convertDateFromServerVersion(this.solrImplementationVersion()); + return Date.now() - appDateRelease.getTime() > 365 + } + + upTime(): number { + return this._info.jvm.jmx.upTimeMS; + } + cmdArguments(): string[] { + return this._info.jvm.jmx.commandLineArgs + } + javaMemoryTotal(): number { + return this._info.jvm.memory.raw.total; + } + javaMemoryMax(): number { + return this._info.jvm.memory.raw.max; + } + javaMemoryUsed(): number { + return this._info.jvm.memory.raw.used; + } + javaMemoryUsedPercentage(): string { + return this._info.jvm.memory.raw["used%"].toFixed(1); + } + + javaMemoryPercentage(): string { + return this.displayValueInPercents(this.javaMemoryUsed(), this.javaMemoryMax()); + } + + javaMemoryTotalPercentage(): string { + return this.displayValueInPercents(this.javaMemoryTotal(), this.javaMemoryMax()); + } + + protected readonly isOdd = SharedModule.isOdd; +} diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/dashboard.module.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/dashboard.module.ts new file mode 100644 index 00000000000..f1821a5f223 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/dashboard.module.ts @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import {NgModule} from '@angular/core'; +import {MainComponent} from "./components/main/main.component"; +import {SharedModule} from "../common/shared.module"; +import {SystemInformationService} from "./services/system-information.service"; + + +@NgModule({ + declarations: [ MainComponent], + imports: [SharedModule], + providers:[SystemInformationService], + exports: [ MainComponent ] +}) +export class DashboardModule { } diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/IJvmInformation.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/IJvmInformation.ts new file mode 100644 index 00000000000..8e065c06e7f --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/IJvmInformation.ts @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +import {IJvmSpecification} from "./javamachine/IJvmSpecification"; +import {IVmSpecification} from "./javamachine/IVmSpecification"; +import {IMemoryInformation} from "./memoryinfo/IMemoryInformation"; +import {IJmxInformation} from "./javamachine/IJmxInformation"; +import {IJreSpecification} from "./javamachine/IJreSpecification"; + +export interface IJvmInformation { + version: string; + name: string; + spec: IJvmSpecification; + jre: IJreSpecification; + vm: IVmSpecification; + processors: number; + memory: IMemoryInformation; + jmx: IJmxInformation; +} diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/ILuceneInformation.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/ILuceneInformation.ts new file mode 100644 index 00000000000..674d5de8c6b --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/ILuceneInformation.ts @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface ILuceneInformation { + "solr-spec-version": string; + "solr-impl-version": string; + "lucene-spec-version": string; + "lucene-impl-version": string; +} diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/IOsInfo.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/IOsInfo.ts new file mode 100644 index 00000000000..e656f658673 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/IOsInfo.ts @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version number.number + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-number.number + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface IOsInfo { + name: string; + arch: string; + availableProcessors: number; + systemLoadAverage: number; + version: string; + committedVirtualMemorySize: number; + cpuLoad: number; + freeMemorySize: number; + freePhysicalMemorySize: number; + freeSwapSpaceSize: number; + processCpuLoad: number; + processCpuTime: number; + systemCpuLoad: number; + totalMemorySize: number; + totalPhysicalMemorySize: number; + totalSwapSpaceSize: number; + maxFileDescriptorCount: number; + openFileDescriptorCount: number; +} diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/ISystemInfoResponse.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/ISystemInfoResponse.ts new file mode 100644 index 00000000000..6de38b46c50 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/ISystemInfoResponse.ts @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +import {ILuceneInformation} from "./ILuceneInformation"; +import {IJvmInformation} from "./IJvmInformation"; +import {IOsInfo} from "./IOsInfo"; +import {IResponseHeader} from "../../../common/models/IResponseHeader"; + +export interface ISystemInfoResponse { + responseHeader: IResponseHeader; + mode: string; + solr_home: string; + core_root: string; + lucene: ILuceneInformation; + jvm: IJvmInformation; + security?: any; + system: IOsInfo; +} diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IJmxInformation.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IJmxInformation.ts new file mode 100644 index 00000000000..a771095cd6f --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IJmxInformation.ts @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +export interface IJmxInformation { + classPath: string; + commandLineArgs: string[]; + startTime: string; + upTimeMS: number; +} + diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IJreSpecification.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IJreSpecification.ts new file mode 100644 index 00000000000..ac449deb6ce --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IJreSpecification.ts @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export interface IJreSpecification { + vendor: string | undefined; + version: string | undefined; +} diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IJvmSpecification.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IJvmSpecification.ts new file mode 100644 index 00000000000..bdacc38b96e --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IJvmSpecification.ts @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export interface IJvmSpecification { + readonly vendor: string; + readonly name: string; + readonly version: string; +} diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IVmSpecification.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IVmSpecification.ts new file mode 100644 index 00000000000..e878c6dd152 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/javamachine/IVmSpecification.ts @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface IVmSpecification { + vendor: string; + name: string; + version: string; +} diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/memoryinfo/IMemoryInformation.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/memoryinfo/IMemoryInformation.ts new file mode 100644 index 00000000000..090673bdc14 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/memoryinfo/IMemoryInformation.ts @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {IMemoryRawInformation} from "./IMemoryRawInformation"; + +export interface IMemoryInformation { + free: string; + total: string; + max: string; + used: string; + raw: IMemoryRawInformation; +} + diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/memoryinfo/IMemoryRawInformation.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/memoryinfo/IMemoryRawInformation.ts new file mode 100644 index 00000000000..a01e05007bf --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/models/systeminfo/memoryinfo/IMemoryRawInformation.ts @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface IMemoryRawInformation { + free: number; + total: number; + max: number; + used: number; + "used%": number; +} + diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/services/Resources/SystemInfoResources.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/services/Resources/SystemInfoResources.ts new file mode 100644 index 00000000000..cc0eef9f67c --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/services/Resources/SystemInfoResources.ts @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import {IResourceActionInner, ResourceCRUDPromise, ResourceHandler} from "@ngx-resource/core"; +import {SystemInfoResponse} from "../../../models/systemInfo/SystemInfoResponse"; + +export class SystemInfoResources extends ResourceCRUDPromise{ + constructor(resourceHandler:ResourceHandler) { + super(resourceHandler); + } + + override $resultFactory(data: any, options: IResourceActionInner = {}): any { + return new SystemInfoResponse(data); + } +} diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/services/query/SystemQuery.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/services/query/SystemQuery.ts new file mode 100644 index 00000000000..a4c60058777 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/services/query/SystemQuery.ts @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + diff --git a/solr/webapp/web/solrUi/src/app/modules/dashboard/services/system-information.service.ts b/solr/webapp/web/solrUi/src/app/modules/dashboard/services/system-information.service.ts new file mode 100644 index 00000000000..ecdf43c1428 --- /dev/null +++ b/solr/webapp/web/solrUi/src/app/modules/dashboard/services/system-information.service.ts @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import {Inject, Injectable} from "@angular/core"; +import { + IResourceMethodPromise, + Resource, + ResourceAction, + ResourceActionReturnType, + ResourceHandler, + ResourceParams, + ResourceRequestMethod +} from "@ngx-resource/core"; +import {ISystemInfoResponse} from "../models/systeminfo/ISystemInfoResponse"; +import {RES_HANDLER} from "../../../app.config"; +import {SharedModule} from "../../common/shared.module"; + +@Injectable({ + providedIn: 'root' +}) +@ResourceParams( + SharedModule.getResourceSettings('api/node') +) +export class SystemInformationService extends Resource { + + constructor(@Inject(RES_HANDLER) handler: ResourceHandler) { + super(handler); + } + + @ResourceAction({ + path: '/system', + method: ResourceRequestMethod.Get, + returnAs: ResourceActionReturnType.Promise + }) + + getSystemInfo!: IResourceMethodPromise; + +} diff --git a/solr/webapp/web/solrUi/src/index.html b/solr/webapp/web/solrUi/src/index.html new file mode 100644 index 00000000000..c607a58fcb0 --- /dev/null +++ b/solr/webapp/web/solrUi/src/index.html @@ -0,0 +1,31 @@ + + + + + + + Solr User Interface + + + + + + + + diff --git a/solr/webapp/web/solrUi/src/main.ts b/solr/webapp/web/solrUi/src/main.ts new file mode 100644 index 00000000000..165be2efb05 --- /dev/null +++ b/solr/webapp/web/solrUi/src/main.ts @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import {bootstrapApplication} from '@angular/platform-browser'; +import {appConfig} from './app/app.config'; +import {AppComponent} from './app/app.component'; + +bootstrapApplication(AppComponent, appConfig) + .catch((err) => console.error(err)); diff --git a/solr/webapp/web/solrUi/src/styles.scss b/solr/webapp/web/solrUi/src/styles.scss new file mode 100644 index 00000000000..b695a8c1bdf --- /dev/null +++ b/solr/webapp/web/solrUi/src/styles.scss @@ -0,0 +1,512 @@ +/*! + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +$color_1: #333; +$color_2: #ffffff; +$color_3: #fff; +$color_4: #000; +$color_5: #998; +$color_6: #40a070; +$color_7: blue; +$color_8: firebrick; +$color_9: #d14; +$color_10: green; +$color_11: #900; +$color_12: #458; +$color_13: #000080; +$color_14: #008080; +$color_15: black; +$color_16: #009926; +$color_17: #990073; +$color_18: #0086b3; +$color_19: #999; +$color_20: #aaa; +$background-color_1: #e6e6e6; +$background-color_2: #0064cd; +$background-color_3: #57a957; +$background-color_4: #c43c35; +$background-color_5: #c37f7f; +$background-color_6: orange; +$background-color_7: #f5f5b2; +$background-color_8: #cce7cc; +$border-color_1: #f0f0f0; +$border-color_2: #0064cd #0064cd #003f81; +$border-color_3: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 ); +$border-color_4: #57a957 #57a957 #3d773d; +$border-color_5: #c43c35 #c43c35 #882a25; +$border-bottom-color_1: #bbb; + +/* syntax */ +* { + background-repeat: no-repeat; + margin: 0; + padding: 0; +} +body { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; + padding: 30px; + text-align: center; +} +h1 { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} +h2 { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} +h3 { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} +h4 { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} +h5 { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} +h6 { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} +a { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; + cursor: pointer; + text-decoration: none; +} +button { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; + cursor: pointer; + background-color: $background-color_1; + background-repeat: no-repeat; + background-image: -webkit-gradient( linear, 0 0, 0 100%, from( #ffffff ), color-stop( 25%, #ffffff ), to( #e6e6e6 ) ); + background-image: -webkit-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -moz-linear-gradient( top, #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -ms-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -o-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0 ); + border: 1px solid #ccc; + border-bottom-color: $border-bottom-color_1; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + -moz-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + color: $color_1; + cursor: pointer; + display: inline-block; + padding: 4px 7px 5px; + overflow: visible; + text-shadow: 0 1px 1px rgba( 255, 255, 255, 0.75 ); + -webkit-transition: 0.1s linear background-image; + -moz-transition: 0.1s linear background-image; + -ms-transition: 0.1s linear background-image; + -o-transition: 0.1s linear background-image; + transition: 0.1s linear background-image; + span { + background-position: 0 50%; + display: block; + padding-left: 21px; + } +} +input { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; + border: 1px solid #c0c0c0; + padding: 2px; +} +select { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; + border: 1px solid #c0c0c0; + padding: 2px; +} +option { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} +textarea { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; + border: 1px solid #c0c0c0; + padding: 2px; +} +th { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} +td { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} +div.ui-tooltip-content { + color: $color_1; + font: 12px/1.6em "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana, Arial, sans-serif; +} +input[readonly=readonly] { + border-color: $border-color_1; +} +button[type=submit] { + background-color: $background-color_2; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #049cdb ), to( #0064cd ) ); + background-image: -moz-linear-gradient( top, #049cdb, #0064cd ); + background-image: -ms-linear-gradient( top, #049cdb, #0064cd ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #049cdb ), color-stop( 100%, #0064cd ) ); + background-image: -webkit-linear-gradient( top, #049cdb, #0064cd ); + background-image: -o-linear-gradient( top, #049cdb, #0064cd ); + background-image: linear-gradient( top, #049cdb, #0064cd ); + border-color: $border-color_2; + border-color: $border-color_3; + color: $color_2; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0 ); + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +button.primary { + background-color: $background-color_2; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #049cdb ), to( #0064cd ) ); + background-image: -moz-linear-gradient( top, #049cdb, #0064cd ); + background-image: -ms-linear-gradient( top, #049cdb, #0064cd ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #049cdb ), color-stop( 100%, #0064cd ) ); + background-image: -webkit-linear-gradient( top, #049cdb, #0064cd ); + background-image: -o-linear-gradient( top, #049cdb, #0064cd ); + background-image: linear-gradient( top, #049cdb, #0064cd ); + border-color: $border-color_2; + border-color: $border-color_3; + color: $color_2; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0 ); + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +button.success { + background-color: $background-color_3; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #62c462 ), to( #57a957 ) ); + background-image: -moz-linear-gradient( top, #62c462, #57a957 ); + background-image: -ms-linear-gradient( top, #62c462, #57a957 ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #62c462 ), color-stop( 100%, #57a957 ) ); + background-image: -webkit-linear-gradient( top, #62c462, #57a957 ); + background-image: -o-linear-gradient( top, #62c462, #57a957 ); + background-image: linear-gradient( top, #62c462, #57a957 ); + border-color: $border-color_4; + border-color: $border-color_3; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#62c462', endColorstr='#57a957', GradientType=0 ); + color: $color_2; + text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.25 ); +} +button.warn { + background-color: $background-color_4; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #ee5f5b ), to( #c43c35 ) ); + background-image: -moz-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -ms-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #ee5f5b ), color-stop( 100%, #c43c35 ) ); + background-image: -webkit-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -o-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: linear-gradient( top, #ee5f5b, #c43c35 ); + border-color: $border-color_5; + border-color: $border-color_3; + color: $color_2; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0 ); + text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.25 ); +} +pre { + color: $color_1; + text-align: left; +} +abbr { + cursor: help; +} +ul { + list-style: none; +} +#environment { + background-image: url(../../img/ico/box.png ); + background-position: 5px 50%; + font-weight: bold; + padding: 5px 10px 5px 26px; +} +.has-environment { + #environment { + display: block; + } +} +#environment.prod { + background-color: $background-color_5; + color: $color_3; +} +#environment.stage { + background-color: $background-color_6; + color: $color_3; +} +#environment.test { + background-color: $background-color_7; +} +#environment.dev { + background-color: $background-color_8; +} +pre.syntax { + overflow: auto; + code { + display: block; + color: $color_4; + } + .comment { + color: $color_5; + font-style: italic; + } + .template_comment { + color: $color_5; + font-style: italic; + } + .diff { + .header { + color: $color_5; + font-style: italic; + } + .change { + background: #0086b3; + } + } + .javadoc { + color: $color_5; + font-style: italic; + } + .keyword { + color: $color_4; + font-weight: bold; + } + .css { + .rule { + .keyword { + color: $color_4; + font-weight: bold; + } + } + .keyword { + color: $color_13; + font-weight: normal; + } + } + .winutils { + color: $color_4; + font-weight: bold; + } + .javascript { + .title { + color: $color_4; + font-weight: bold; + font-weight: normal; + } + } + .lisp { + .title { + color: $color_4; + font-weight: bold; + font-weight: normal; + color: $color_18; + } + .body { + color: $color_14; + } + .keyword { + color: $color_17; + } + } + .subst { + color: $color_4; + font-weight: bold; + font-weight: normal; + } + .number { + color: $color_6; + } + .hexcolor { + color: $color_6; + } + .string { + color: $color_9; + } + .tag { + .value { + color: $color_9; + } + color: $color_13; + font-weight: normal; + .title { + color: $color_13; + font-weight: normal; + } + } + .phpdoc { + color: $color_9; + } + .tex { + .formula { + color: $color_9; + opacity: 0.5; + } + .command { + color: $color_12; + font-weight: bold; + } + .special { + color: $color_17; + } + } + .title { + color: $color_11; + font-weight: bold; + } + .id { + color: $color_11; + font-weight: bold; + } + .class { + .title { + color: $color_12; + font-weight: bold; + } + color: $color_12; + font-weight: bold; + } + .html { + .keyword { + color: $color_13; + font-weight: normal; + } + } + .django { + .tag { + .keyword { + color: $color_13; + font-weight: normal; + } + } + } + .attribute { + color: $color_14; + } + .variable { + color: $color_14; + } + .instancevar { + color: $color_14; + } + .regexp { + color: $color_16; + } + .symbol { + color: $color_17; + } + .ruby { + .symbol { + .string { + color: $color_17; + } + .keyword { + color: $color_17; + } + .keymethods { + color: $color_17; + } + } + } + .builtin { + color: $color_18; + } + .built_in { + color: $color_18; + } + .preprocessor { + color: $color_19; + font-weight: bold; + } + .pi { + color: $color_19; + font-weight: bold; + } + .doctype { + color: $color_19; + font-weight: bold; + } + .shebang { + color: $color_19; + font-weight: bold; + } + .cdata { + color: $color_19; + font-weight: bold; + } + .deletion { + background: #fdd; + } + .addition { + background: #dfd; + } + .chunk { + color: $color_20; + } +} +pre.syntax.language-json { + .number { + color: $color_7; + } + .literal { + color: $color_8; + } + .string { + color: $color_10; + } + .attribute { + color: $color_15; + font-weight: bold; + } +} +.other-ui-link { + margin: 0px; + position: absolute; + right: 0px; + top: -20px; + span { + background-image: url(../../img/ico/information-white.png ); + right: 0px; + padding-left: 16px; + } + a.ul { + text-decoration: underline; + } +} +.new-ui-warning { + span.help { + background-image: url(../../img/ico/information-white.png ); + right: 0px; + padding-left: 16px; + } +} + +@import "app/app.component"; + diff --git a/solr/webapp/web/solrUi/tsconfig.app.json b/solr/webapp/web/solrUi/tsconfig.app.json new file mode 100644 index 00000000000..14cd5522c73 --- /dev/null +++ b/solr/webapp/web/solrUi/tsconfig.app.json @@ -0,0 +1,16 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [ + "node" + ] + }, + "files": [ + "src/main.ts", + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/solr/webapp/web/solrUi/tsconfig.json b/solr/webapp/web/solrUi/tsconfig.json new file mode 100644 index 00000000000..f37b67ff027 --- /dev/null +++ b/solr/webapp/web/solrUi/tsconfig.json @@ -0,0 +1,33 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": false, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": [ + "ES2022", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/solr/webapp/web/solrUi/tsconfig.spec.json b/solr/webapp/web/solrUi/tsconfig.spec.json new file mode 100644 index 00000000000..042aaa41286 --- /dev/null +++ b/solr/webapp/web/solrUi/tsconfig.spec.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +}