Skip to content

Commit

Permalink
Merge branch 'feat/stateless-api' of github.com:kubernetes/dashboard …
Browse files Browse the repository at this point in the history
…into feat/stateless-api
  • Loading branch information
floreks committed Mar 1, 2024
2 parents 4409722 + eafe488 commit cf4f78d
Show file tree
Hide file tree
Showing 169 changed files with 11,023 additions and 5,723 deletions.
1 change: 1 addition & 0 deletions modules/web/.prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
module.exports = {
bracketSpacing: false,
singleAttributePerLine: true,
singleQuote: true,
trailingComma: "es5",
arrowParens: "avoid",
Expand Down
2 changes: 2 additions & 0 deletions modules/web/.stylelintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
#
extends:
- stylelint-config-standard-scss
- stylelint-prettier/recommended
plugins:
- stylelint-order
- stylelint-prettier
rules:
alpha-value-notation: number
no-descending-specificity:
Expand Down
30 changes: 0 additions & 30 deletions modules/web/hack/check-html.sh

This file was deleted.

44 changes: 23 additions & 21 deletions modules/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"build:prod": "make build",
"fix": "yarn fix:i18n && yarn fix:html && yarn fix:scss && yarn fix:ts",
"fix:i18n": "ng run kubernetes-dashboard:extract-i18n-merge",
"fix:html": "npx html-beautify -f src/**/*.html",
"fix:scss": "stylelint src/**/*.scss",
"fix:html": "prettier **.html --write",
"fix:scss": "stylelint **/*.{css,scss} --fix",
"fix:ts": "eslint . --fix",
"check": "yarn check:i18n && yarn check:html && yarn check:scss && yarn check:ts",
"check:i18n": "yarn fix:i18n",
"check:html": "./hack/check-html.sh",
"check:scss": "stylelint src/**/*.scss --fix",
"check:html": "prettier **.html --check",
"check:scss": "stylelint **/*.{css,scss}",
"check:ts": "eslint .",
"test": "npx jest -c jest.config.js",
"coverage": "npx jest -c jest.config.js --coverage",
Expand All @@ -40,7 +40,9 @@
"src/**/*.scss": [
"stylelint --fix"
],
"src/**/*.html": []
"src/**/*.html": [
"prettier --write"
]
},
"dependencies": {
"@angular/animations": "16.2.1",
Expand All @@ -62,11 +64,11 @@
"d3-shape": "3.2.0",
"d3-time-format": "4.1.0",
"file-saver": "2.0.5",
"js-base64": "3.7.6",
"js-base64": "3.7.7",
"js-yaml": "4.1.0",
"jwt-decode": "4.0.0",
"material-design-icons": "3.0.1",
"ngx-cookie-service": "16.1.0",
"ngx-cookie-service": "17.1.0",
"ngx-pipes": "3.2.2",
"normalize.css": "8.0.1",
"roboto-fontface": "0.10.0",
Expand All @@ -87,8 +89,8 @@
"@angular/cli": "16.2.0",
"@angular/compiler-cli": "16.2.1",
"@angular/language-service": "16.2.1",
"@babel/core": "7.23.9",
"@babel/preset-env": "7.23.9",
"@babel/core": "7.24.0",
"@babel/preset-env": "7.24.0",
"@babel/register": "7.23.7",
"@cypress/webpack-preprocessor": "6.0.1",
"@types/d3": "7.4.3",
Expand All @@ -99,16 +101,16 @@
"@types/jest": "29.5.12",
"@types/js-yaml": "4.0.9",
"@types/lodash-es": "4.17.12",
"@types/node": "20.11.19",
"@typescript-eslint/eslint-plugin": "7.0.1",
"@typescript-eslint/parser": "7.0.1",
"@types/node": "20.11.24",
"@typescript-eslint/eslint-plugin": "7.1.0",
"@typescript-eslint/parser": "7.1.0",
"codelyzer": "6.0.2",
"concurrently": "8.2.2",
"cypress": "13.6.4",
"cypress": "13.6.6",
"cypress-fail-fast": "7.1.0",
"del": "7.1.0",
"eslint": "8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-rxjs": "5.0.3",
Expand All @@ -117,27 +119,27 @@
"jasmine-core": "5.1.2",
"jasmine-spec-reporter": "7.0.0",
"jest": "29.7.0",
"jest-preset-angular": "14.0.2",
"js-beautify": "1.15.0",
"jest-preset-angular": "14.0.3",
"license-check-and-add": "4.0.5",
"lint-staged": "15.2.2",
"lodash-es": "4.17.21",
"minimatch": "9.0.3",
"minimist": "1.2.8",
"ng-extract-i18n-merge": "2.10.0",
"node-gyp": "10.0.1",
"prettier": "^3.2.5",
"prettier": "3.2.5",
"q": "1.5.1",
"raw-loader": "4.0.2",
"run-node": "2.0.0",
"sass": "1.71.0",
"sass-loader": "14.1.0",
"sass": "1.71.1",
"sass-loader": "14.1.1",
"semver": "7.6.0",
"source-map-explorer": "2.5.3",
"stylelint": "16.2.1",
"stylelint-config-standard-scss": "13.0.0",
"stylelint-no-unsupported-browser-features": "8.0.1",
"stylelint-order": "6.0.4",
"stylelint-prettier": "5.0.0",
"tar": "6.2.0",
"through2": "4.0.2",
"ts-jest": "29.1.2",
Expand All @@ -146,7 +148,7 @@
"typescript": "5.1.6",
"wait-on": "7.2.0",
"webpack-bundle-analyzer": "4.10.1",
"webpack-dev-server": "5.0.1"
"webpack-dev-server": "5.0.2"
},
"overrides": {
"colors": "1.4.0"
Expand Down
42 changes: 36 additions & 6 deletions modules/web/src/_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,48 @@ $colors-dark: (
log-viewer-scrollbar: rgb(200 200 200 / 0.66),
scrollbar: rgb(100 100 100 / 0.33),
);
$kd-blue: map_merge(mat-theming.$mat-blue, (500: #327df4));
$kd-blue: map_merge(
mat-theming.$mat-blue,
(
500: #327df4,
)
);
$theme-dark: mat-theming.mat-dark-theme(
mat-theming.mat-palette($kd-blue),
mat-theming.mat-palette($kd-blue),
mat-theming.mat-palette($kd-blue)
);
$background: map.get($theme-dark, background);
$background: map_merge($background, (background: #1d1d1d));
$background: map_merge($background, (app-bar: #1d1d1d));
$background: map_merge($background, (card: #2d2d2d));
$background: map_merge($background, (dialog: #2d2d2d));
$theme-dark: map_merge($theme-dark, (background: $background));
$background: map_merge(
$background,
(
background: #1d1d1d,
)
);
$background: map_merge(
$background,
(
app-bar: #1d1d1d,
)
);
$background: map_merge(
$background,
(
card: #2d2d2d,
)
);
$background: map_merge(
$background,
(
dialog: #2d2d2d,
)
);
$theme-dark: map_merge(
$theme-dark,
(
background: $background,
)
);

.kd-dark-theme {
@include mat-theming.angular-material-theme($theme-dark);
Expand Down
21 changes: 18 additions & 3 deletions modules/web/src/_light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,30 @@ $colors-light: (
log-viewer-scrollbar: rgb(200 200 200 / 0.66),
scrollbar: rgb(100 100 100 / 0.33),
);
$kd-blue: map_merge(mat-theming.$mat-blue, (500: #326de6));
$kd-blue: map_merge(
mat-theming.$mat-blue,
(
500: #326de6,
)
);
$theme-light: mat-theming.mat-light-theme(
mat-theming.mat-palette($kd-blue),
mat-theming.mat-palette($kd-blue),
mat-theming.mat-palette($kd-blue)
);
$background: map.get($theme-light, background);
$background: map_merge($background, (background: #edeff0));
$theme-light: map_merge($theme-light, (background: $background));
$background: map_merge(
$background,
(
background: #edeff0,
)
);
$theme-light: map_merge(
$theme-light,
(
background: $background,
)
);

.kd-light-theme {
@include mat-theming.angular-material-theme($theme-light);
Expand Down
8 changes: 6 additions & 2 deletions modules/web/src/_theming.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
$box-shadow-1: rgb(0 0 0 / 0.2);
$box-shadow-2: rgb(0 0 0 / 0.14);
$box-shadow-3: rgb(0 0 0 / 0.12);
$box-shadow: 0 3px 1px -2px $box-shadow-1, 0 2px 2px 0 $box-shadow-2, 0 1px 5px 0 $box-shadow-3;
$box-shadow:
0 3px 1px -2px $box-shadow-1,
0 2px 2px 0 $box-shadow-2,
0 1px 5px 0 $box-shadow-3;
$white: #fff;

// Global style overrides.
Expand Down Expand Up @@ -337,7 +340,8 @@
background-color: map.get($colors, log-viewer-scrollbar);
}

.kd-logs-element, .kd-logs-element-compact {
.kd-logs-element,
.kd-logs-element-compact {
&:hover {
background: color.adjust(map.get($colors, log-viewer-bg), $lightness: 20%);
}
Expand Down
5 changes: 4 additions & 1 deletion modules/web/src/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ $font-family-monospace: 'Roboto Mono Regular', monospace;
$font-family-sans: roboto, 'Helvetica Neue', sans-serif;
$regular-font-weight: 400;
$bold-font-weight: 500;
$whiteframe-shadow-1dp: 0 1px 3px 0 rgb(0 0 0 / 0.2), 0 1px 1px 0 rgb(0 0 0 / 0.14), 0 2px 1px -1px rgb(0 0 0 / 0.12);
$whiteframe-shadow-1dp:
0 1px 3px 0 rgb(0 0 0 / 0.2),
0 1px 1px 0 rgb(0 0 0 / 0.14),
0 2px 1px -1px rgb(0 0 0 / 0.12);
$baseline-grid: 8px;
$primary-toolbar-height: 60px;
$secondary-toolbar-height: 48px;
Expand Down
69 changes: 47 additions & 22 deletions modules/web/src/chrome/footer/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,55 @@
limitations under the License.
-->

<div class="kd-muted-xlight"
fxFlex
fxLayout="column"
fxLayoutAlign="end ">
<div fxLayout="row"
fxLayoutAlign="space-between ">
<div fxLayoutGap="16px"
i18n>
{{ userAgent }}
© {{ copyrightYear }} The Kubernetes Authors
<div
class="kd-muted-xlight"
fxFlex
fxLayout="column"
fxLayoutAlign="end "
>
<div
fxLayout="row"
fxLayoutAlign="space-between "
>
<div
fxLayoutGap="16px"
i18n
>
{{ userAgent }} © {{ copyrightYear }} The Kubernetes Authors
</div>
<div fxLayoutGap="16px">
<span i18n><a href="https://github.com/kubernetes/dashboard/tree/master/docs"
target="_blank"
class="kd-muted-xlight">Documentation</a></span>
<span i18n><a href="https://github.com/kubernetes/dashboard/graphs/contributors"
target="_blank"
class="kd-muted-xlight">Community</a></span>
<span i18n><a href="https://github.com/kubernetes/dashboard/issues/new/choose"
target="_blank"
class="kd-muted-xlight">Feedback</a></span>
<span i18n><a href="https://kubernetes.slack.com/archives/C09R1JVU6"
target="_blank"
class="kd-muted-xlight">Slack</a></span>
<span i18n
><a
href="https://github.com/kubernetes/dashboard/tree/master/docs"
target="_blank"
class="kd-muted-xlight"
>Documentation</a
></span
>
<span i18n
><a
href="https://github.com/kubernetes/dashboard/graphs/contributors"
target="_blank"
class="kd-muted-xlight"
>Community</a
></span
>
<span i18n
><a
href="https://github.com/kubernetes/dashboard/issues/new/choose"
target="_blank"
class="kd-muted-xlight"
>Feedback</a
></span
>
<span i18n
><a
href="https://kubernetes.slack.com/archives/C09R1JVU6"
target="_blank"
class="kd-muted-xlight"
>Slack</a
></span
>
</div>
</div>
</div>
8 changes: 5 additions & 3 deletions modules/web/src/chrome/nav/hamburger/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
limitations under the License.
-->

<button (click)="toggle()"
mat-icon-button
class="kd-accent">
<button
(click)="toggle()"
mat-icon-button
class="kd-accent"
>
<mat-icon>menu</mat-icon>
</button>
Loading

0 comments on commit cf4f78d

Please sign in to comment.