Compare commits
No commits in common. "master" and "v1.0.57" have entirely different histories.
143
.gitlab-ci.yml
Normal file
143
.gitlab-ci.yml
Normal file
@ -0,0 +1,143 @@
|
||||
# gitzone ci_default_private
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .npmci_cache/
|
||||
key: '$CI_BUILD_STAGE'
|
||||
|
||||
stages:
|
||||
- security
|
||||
- test
|
||||
- release
|
||||
- metadata
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --production --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=prod --production
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
|
||||
auditDevDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=dev
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
# ====================
|
||||
# test stage
|
||||
# ====================
|
||||
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
release:
|
||||
stage: release
|
||||
script:
|
||||
- npmci node install stable
|
||||
- npmci npm publish
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
# ====================
|
||||
# metadata stage
|
||||
# ====================
|
||||
codequality:
|
||||
stage: metadata
|
||||
allow_failure: true
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
trigger:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci trigger
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
pages:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- public
|
||||
allow_failure: true
|
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@ -2,10 +2,28 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"name": "current file",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
"args": [
|
||||
"${relativeFile}"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
},
|
||||
{
|
||||
"name": "test.ts",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"test/test.ts"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
58
changelog.md
58
changelog.md
@ -1,58 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
## 2024-06-27 - 1.0.74 - fix(core)
|
||||
Updated font loading strategy in index.html for improved performance
|
||||
|
||||
- Replaced multiple font loading links with a single assetbroker link.
|
||||
- Removed redundant preconnect and stylesheet links for fonts.
|
||||
|
||||
## 2024-06-26 - 1.0.73 - fix(documentation)
|
||||
Update project description and keywords in package.json and npmextra.json. Refactored documentation in readme.md.
|
||||
|
||||
- Updated project description and keywords within package.json and npmextra.json to ensure alignment.
|
||||
- Enhanced readme.md with detailed setup, installation and usage instructions including examples for importing and using components.
|
||||
|
||||
## 2024-06-26 - 1.0.72 - fix(core)
|
||||
Fixed incorrect import paths and updated configurations for package publication.
|
||||
|
||||
- Fixed import paths for various dependencies in TypeScript files.
|
||||
- Updated npm package name and scope in package.json.
|
||||
- Deleted .gitlab-ci.yml file.
|
||||
- Adjusted tsconfig.json for ESModule compatibility.
|
||||
- Adjusted npmextra.json for correct repository and license information.
|
||||
- Updated documentation links in readme.md.
|
||||
|
||||
## 2023-01-05 - 1.0.69 to 1.0.71 - core
|
||||
Multiple updates.
|
||||
|
||||
- fix(core): update
|
||||
|
||||
## 2022-03-24 - 1.0.67 to 1.0.69 - core
|
||||
Multiple updates.
|
||||
|
||||
- fix(core): update
|
||||
|
||||
## 2021-09-27 - 1.0.60 to 1.0.66 - core
|
||||
Multiple updates.
|
||||
|
||||
- fix(core): update
|
||||
|
||||
## 2021-09-24 - 1.0.59 to 1.0.60 - core
|
||||
Fixes and updates.
|
||||
|
||||
- fix(core): update
|
||||
|
||||
## 2021-09-23 - 1.0.58 to 1.0.59 - core
|
||||
Fixes and updates.
|
||||
|
||||
- fix(core): update
|
||||
|
||||
## 2020-11-29 - 1.0.57 to 1.0.58 - core
|
||||
Fixes and updates.
|
||||
|
||||
- fix(core): update
|
||||
|
||||
## 2020-09-19 - 1.0.55 to 1.0.57 - core
|
||||
Fixes and updates.
|
||||
|
||||
- fix(core): update
|
@ -1,5 +1,5 @@
|
||||
<!--gitzone element-->
|
||||
<!-- made by Task Venture Capital GmbH -->
|
||||
<!-- made by Lossless GmbH -->
|
||||
<!-- checkout https://maintainedby.lossless.com for awesome OpenSource projects -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
@ -10,10 +10,6 @@
|
||||
/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<!--Lets load standard fonts-->
|
||||
<link rel="preconnect" href="https://assetbroker.lossless.one/" crossorigin>
|
||||
<link rel="stylesheet" href="https://assetbroker.lossless.one/fonts/fonts.css">
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0px;
|
||||
@ -21,7 +17,7 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="module" src="/bundle.js"></script>
|
||||
<script src="./index.ts"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
|
@ -1,10 +1,10 @@
|
||||
// dees tools
|
||||
import * as deesWccTools from '@design.estate/dees-wcctools';
|
||||
import * as deesDomTools from '@design.estate/dees-domtools';
|
||||
import * as deesWccTools from '@designestate/dees-wcctools';
|
||||
import * as deesDomTools from '@designestate/dees-domtools';
|
||||
|
||||
// elements and pages
|
||||
import * as elements from '../ts_web/elements/index.js';
|
||||
import * as pages from '../ts_web/pages/index.js';
|
||||
import * as elements from '../ts_web/elements';
|
||||
import * as pages from '../ts_web/pages';
|
||||
|
||||
deesWccTools.setupWccTools(elements as any, pages);
|
||||
deesDomTools.elementBasic.setup();
|
||||
|
@ -2,32 +2,17 @@
|
||||
"gitzone": {
|
||||
"projectType": "wcc",
|
||||
"module": {
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "uptime.link",
|
||||
"gitrepo": "statuspage",
|
||||
"description": "A catalog of web components for the UptimeLink dashboard.",
|
||||
"npmPackagename": "@uptime.link/statuspage",
|
||||
"license": "MIT",
|
||||
"projectDomain": "uptime.link",
|
||||
"keywords": [
|
||||
"web components",
|
||||
"uptimelink",
|
||||
"dashboard",
|
||||
"status monitoring",
|
||||
"typescript",
|
||||
"incidents",
|
||||
"status",
|
||||
"performance",
|
||||
"uptime",
|
||||
"frontend",
|
||||
"UI",
|
||||
"catalog"
|
||||
]
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "uptimelink/private",
|
||||
"gitrepo": "catalog",
|
||||
"shortDescription": "a catalog with webcomponents for uptimelink dashboard",
|
||||
"npmPackagename": "@uptimelink_private/catalog",
|
||||
"license": "UNLICENSED",
|
||||
"projectDomain": "uptime.link"
|
||||
}
|
||||
},
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "private",
|
||||
"npmRegistryUrl": "verdaccio.lossless.one"
|
||||
"npmAccessLevel": "private"
|
||||
}
|
||||
}
|
10497
package-lock.json
generated
Normal file
10497
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
50
package.json
50
package.json
@ -1,33 +1,33 @@
|
||||
{
|
||||
"name": "@uptime.link/statuspage",
|
||||
"version": "1.0.74",
|
||||
"name": "@uptimelink_private/catalog",
|
||||
"version": "1.0.57",
|
||||
"private": false,
|
||||
"description": "A catalog of web components for the UptimeLink dashboard.",
|
||||
"description": "a catalog with webcomponents for uptimelink dashboard",
|
||||
"main": "dist_ts_web/index.js",
|
||||
"typings": "dist_ts_web/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "npm run build",
|
||||
"build": "tsbuild tsfolders --allowimplicitany && tsbundle element --production",
|
||||
"watch": "tswatch element",
|
||||
"buildDocs": "tsdoc"
|
||||
"build": "tsbuild element && tsbundle element --production",
|
||||
"watch": "tswatch element"
|
||||
},
|
||||
"author": "Lossless GmbH",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@design.estate/dees-domtools": "^2.0.1",
|
||||
"@design.estate/dees-element": "^2.0.4",
|
||||
"@design.estate/dees-wcctools": "^1.0.73",
|
||||
"@uptime.link/interfaces": "^2.0.21"
|
||||
"@designestate/dees-domtools": "^1.0.41",
|
||||
"@designestate/dees-wcctools": "^1.0.37",
|
||||
"@gitzone/tsrun": "^1.2.12",
|
||||
"@losslessone_private/loint-pubapi": "^1.0.9",
|
||||
"@pushrocks/smartexpress": "^3.0.76",
|
||||
"lit-element": "^2.3.1",
|
||||
"typescript": "^4.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbuild": "^2.1.61",
|
||||
"@git.zone/tsbundle": "^2.0.7",
|
||||
"@git.zone/tsrun": "^1.2.39",
|
||||
"@git.zone/tswatch": "^2.0.5",
|
||||
"@push.rocks/projectinfo": "^5.0.1",
|
||||
"@push.rocks/smartenv": "^5.0.0",
|
||||
"@types/node": "^18.11.18"
|
||||
"@gitzone/tsbuild": "^2.1.24",
|
||||
"@gitzone/tsbundle": "^1.0.72",
|
||||
"@gitzone/tswatch": "^1.0.50",
|
||||
"@pushrocks/projectinfo": "^4.0.5",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.17.0"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
@ -43,19 +43,5 @@
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 Chrome versions"
|
||||
],
|
||||
"keywords": [
|
||||
"web components",
|
||||
"uptimelink",
|
||||
"dashboard",
|
||||
"status monitoring",
|
||||
"typescript",
|
||||
"incidents",
|
||||
"status",
|
||||
"performance",
|
||||
"uptime",
|
||||
"frontend",
|
||||
"UI",
|
||||
"catalog"
|
||||
]
|
||||
}
|
||||
|
4741
pnpm-lock.yaml
generated
4741
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
221
readme.md
221
readme.md
@ -1,205 +1,34 @@
|
||||
# @uptime.link/statuspage
|
||||
# @uptimelink/private/catalog
|
||||
a catalog with webcomponents for uptimelink dashboard
|
||||
|
||||
## Install
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@uptimelink_private/catalog)
|
||||
* [gitlab.com (source)](https://gitlab.com/uptimelink/private/catalog)
|
||||
* [github.com (source mirror)](https://github.com/uptimelink/private/catalog)
|
||||
* [docs (typedoc)](https://uptimelink/private.gitlab.io/catalog/)
|
||||
|
||||
To install the `@uptime.link/statuspage` module, you can use npm. Make sure you have Node.js and npm installed, then run:
|
||||
## Status for master
|
||||
|
||||
```sh
|
||||
npm install @uptime.link/statuspage
|
||||
```
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||
npm | [](https://lossless.cloud)
|
||||
Snyk | [](https://lossless.cloud)
|
||||
TypeScript Support | [](https://lossless.cloud)
|
||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
|
||||
The `@uptime.link/statuspage` module provides a collection of web components to build a comprehensive status page for Uptime.link dashboards. This includes headers, status bars, asset selectors, status details, incident lists, and more.
|
||||
Use TypeScript for best in class intellisense
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
Here’s a detailed guide on how to use each component in your TypeScript project with ESM syntax. We will walk through creating a complete status page using the provided components.
|
||||
> UNLICENSED licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
|
||||
### Step-by-Step Example
|
||||
|
||||
1. **Setup Your Project:**
|
||||
|
||||
Ensure you have a TypeScript project setup. Here's a minimal `tsconfig.json` to get started:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. **Import Components:**
|
||||
|
||||
Create an `index.ts` file, and import the components you need:
|
||||
|
||||
```typescript
|
||||
import './elements/index.js';
|
||||
import { page1 } from './pages/index.js';
|
||||
```
|
||||
|
||||
3. **Creating a Status Page:**
|
||||
|
||||
Here, we'll create a simple status page using the imported components. We'll create individual components like headers, status bars, footers, etc., and combine them into a single page.
|
||||
|
||||
### UplStatuspageHeader
|
||||
|
||||
```typescript
|
||||
import { UplStatuspageHeader } from './elements/upl-statuspage-header.js';
|
||||
|
||||
const header: UplStatuspageHeader = document.createElement('upl-statuspage-header');
|
||||
header.pageTitle = "Uptime Link Status Page";
|
||||
document.body.appendChild(header);
|
||||
```
|
||||
|
||||
### UplStatuspageStatusbar
|
||||
|
||||
```typescript
|
||||
import { UplStatuspageStatusbar } from './elements/upl-statuspage-statusbar.js';
|
||||
|
||||
const statusBar: UplStatuspageStatusbar = document.createElement('upl-statuspage-statusbar');
|
||||
document.body.appendChild(statusBar);
|
||||
```
|
||||
|
||||
### UplStatuspageAssetsselector
|
||||
|
||||
```typescript
|
||||
import { UplStatuspageAssetsselector } from './elements/upl-statuspage-assetsselector.js';
|
||||
|
||||
const assetsSelector: UplStatuspageAssetsselector = document.createElement('upl-statuspage-assetsselector');
|
||||
document.body.appendChild(assetsSelector);
|
||||
```
|
||||
|
||||
### UplStatuspageStatusdetails
|
||||
|
||||
```typescript
|
||||
import { UplStatuspageStatusdetails } from './elements/upl-statuspage-statusdetails.js';
|
||||
|
||||
const statusDetails: UplStatuspageStatusdetails = document.createElement('upl-statuspage-statusdetails');
|
||||
document.body.appendChild(statusDetails);
|
||||
```
|
||||
|
||||
### UplStatuspageStatusmonth
|
||||
|
||||
```typescript
|
||||
import { UplStatuspageStatusmonth } from './elements/upl-statuspage-statusmonth.js';
|
||||
|
||||
const statusMonth: UplStatuspageStatusmonth = document.createElement('upl-statuspage-statusmonth');
|
||||
document.body.appendChild(statusMonth);
|
||||
```
|
||||
|
||||
### UplStatuspageIncidents
|
||||
|
||||
```typescript
|
||||
import { UplStatuspageIncidents } from './elements/upl-statuspage-incidents.js';
|
||||
import { uplInterfaces } from './plugins.js';
|
||||
|
||||
const incidents: UplStatuspageIncidents = document.createElement('upl-statuspage-incidents');
|
||||
incidents.currentIncidences = [
|
||||
// Example incident data
|
||||
{
|
||||
id: "incident1",
|
||||
title: "Server Outage",
|
||||
description: "There was an outage on the main server.",
|
||||
status: "resolved",
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString()
|
||||
}
|
||||
] as uplInterfaces.IIncident[];
|
||||
|
||||
incidents.pastIncidences = [
|
||||
// Example past incident data
|
||||
{
|
||||
id: "incident2",
|
||||
title: "Database Maintenance",
|
||||
description: "Scheduled maintenance on the database.",
|
||||
status: "completed",
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString()
|
||||
}
|
||||
] as uplInterfaces.IIncident[];
|
||||
|
||||
document.body.appendChild(incidents);
|
||||
```
|
||||
|
||||
### UplStatuspageFooter
|
||||
|
||||
```typescript
|
||||
import { UplStatuspageFooter } from './elements/upl-statuspage-footer.js';
|
||||
|
||||
const footer: UplStatuspageFooter = document.createElement('upl-statuspage-footer');
|
||||
footer.legalInfo = "https://example.com/legal";
|
||||
document.body.appendChild(footer);
|
||||
```
|
||||
|
||||
### Full Example
|
||||
|
||||
Here’s how you can put it all together to create a full status page:
|
||||
|
||||
```typescript
|
||||
import './elements/index.js';
|
||||
import { page1 } from './pages/index.js';
|
||||
import { UplStatuspageHeader } from './elements/upl-statuspage-header.js';
|
||||
import { UplStatuspageStatusbar } from './elements/upl-statuspage-statusbar.js';
|
||||
import { UplStatuspageAssetsselector } from './elements/upl-statuspage-assetsselector.js';
|
||||
import { UplStatuspageStatusdetails } from './elements/upl-statuspage-statusdetails.js';
|
||||
import { UplStatuspageStatusmonth } from './elements/upl-statuspage-statusmonth.js';
|
||||
import { UplStatuspageIncidents } from './elements/upl-statuspage-incidents.js';
|
||||
import { UplStatuspageFooter } from './elements/upl-statuspage-footer.js';
|
||||
import { uplInterfaces } from './plugins.js';
|
||||
|
||||
const header: UplStatuspageHeader = document.createElement('upl-statuspage-header');
|
||||
header.pageTitle = "Uptime Link Status Page";
|
||||
document.body.appendChild(header);
|
||||
|
||||
const statusBar: UplStatuspageStatusbar = document.createElement('upl-statuspage-statusbar');
|
||||
document.body.appendChild(statusBar);
|
||||
|
||||
const assetsSelector: UplStatuspageAssetsselector = document.createElement('upl-statuspage-assetsselector');
|
||||
document.body.appendChild(assetsSelector);
|
||||
|
||||
const statusDetails: UplStatuspageStatusdetails = document.createElement('upl-statuspage-statusdetails');
|
||||
document.body.appendChild(statusDetails);
|
||||
|
||||
const statusMonth: UplStatuspageStatusmonth = document.createElement('upl-statuspage-statusmonth');
|
||||
document.body.appendChild(statusMonth);
|
||||
|
||||
const incidents: UplStatuspageIncidents = document.createElement('upl-statuspage-incidents');
|
||||
incidents.currentIncidences = [
|
||||
{
|
||||
id: "incident1",
|
||||
title: "Server Outage",
|
||||
description: "There was an outage on the main server.",
|
||||
status: "resolved",
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString()
|
||||
}
|
||||
] as uplInterfaces.IIncident[];
|
||||
|
||||
incidents.pastIncidences = [
|
||||
{
|
||||
id: "incident2",
|
||||
title: "Database Maintenance",
|
||||
description: "Scheduled maintenance on the database.",
|
||||
status: "completed",
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString()
|
||||
}
|
||||
] as uplInterfaces.IIncident[];
|
||||
|
||||
document.body.appendChild(incidents);
|
||||
|
||||
const footer: UplStatuspageFooter = document.createElement('upl-statuspage-footer');
|
||||
footer.legalInfo = "https://example.com/legal";
|
||||
document.body.appendChild(footer);
|
||||
```
|
||||
|
||||
This example uses all the components provided by `@uptime.link/statuspage` to create a functional status page. Modify the data, styles, and structure to suit your requirements.
|
||||
undefined
|
||||
[](https://maintainedby.lossless.com)
|
||||
|
@ -1,8 +0,0 @@
|
||||
/**
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@uptime.link/statuspage',
|
||||
version: '1.0.74',
|
||||
description: 'A catalog of web components for the UptimeLink dashboard.'
|
||||
}
|
@ -1,7 +1 @@
|
||||
export * from './upl-statuspage-assetsselector.js';
|
||||
export * from './upl-statuspage-footer.js';
|
||||
export * from './upl-statuspage-header.js';
|
||||
export * from './upl-statuspage-incidents.js';
|
||||
export * from './upl-statuspage-statusbar.js';
|
||||
export * from './upl-statuspage-statusdetails.js';
|
||||
export * from './upl-statuspage-statusmonth.js';
|
||||
export * from './lele-card';
|
||||
|
@ -1,27 +0,0 @@
|
||||
import { customElement, DeesElement, html, type TemplateResult } from '@design.estate/dees-element';
|
||||
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
|
||||
@customElement('uplinternal-miniheading')
|
||||
export class UplinternalMiniheading extends DeesElement {
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
${domtools.elementBasic.styles}
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
font-family: Inter;
|
||||
}
|
||||
|
||||
h5 {
|
||||
display: block;
|
||||
max-width: 900px;
|
||||
margin: 0px auto;
|
||||
padding: 0px 0px 10px 0px;
|
||||
color: #707070;
|
||||
}
|
||||
</style>
|
||||
<h5>${this.textContent}</h5>
|
||||
`;
|
||||
}
|
||||
}
|
182
ts_web/elements/lele-card.ts
Normal file
182
ts_web/elements/lele-card.ts
Normal file
@ -0,0 +1,182 @@
|
||||
import { LitElement, property, html, customElement, TemplateResult } from 'lit-element';
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
|
||||
@customElement('lele-card')
|
||||
export class LeleCard extends LitElement {
|
||||
public static demo = () => html`
|
||||
<lele-card
|
||||
imgsrc="https://assetbroker.lossless.one/brandfiles/00general/square_lossless.svg"
|
||||
.links="${[
|
||||
{
|
||||
text: 'Visit Website',
|
||||
url: 'https://lossless.com'
|
||||
}
|
||||
]}"
|
||||
.tabledata="${[
|
||||
{
|
||||
key: 'name',
|
||||
value: 'Lossless GmbH'
|
||||
},
|
||||
{
|
||||
key: 'domain',
|
||||
value: 'https://lossless.com'
|
||||
}
|
||||
]}"
|
||||
></lele-card>
|
||||
`;
|
||||
|
||||
@property()
|
||||
public heading: string = 'loading...';
|
||||
|
||||
@property()
|
||||
public imgsrc: string = 'https://assetbroker.lossless.one/brandfiles/00general/square_lossless.svg';
|
||||
|
||||
@property({type: Array})
|
||||
public links: {text: string; url: string}[] = [];
|
||||
|
||||
@property({type: Array})
|
||||
public tabledata: {key: string, value: string}[] = [];
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
domtools.DomTools.setupDomTools();
|
||||
}
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
${domtools.elementBasic.styles}
|
||||
<style>
|
||||
|
||||
:host(:hover) .mainbox {
|
||||
border-top: 1px solid var(--lelecv-color-accent, #e4002b);
|
||||
}
|
||||
|
||||
:host(:hover) .mainbox .topimage img {
|
||||
filter: grayscale(0%);
|
||||
}
|
||||
|
||||
.mainbox {
|
||||
display: block;
|
||||
position: relative;
|
||||
max-width: 400px;
|
||||
max-height: 600px;
|
||||
background: #212121;
|
||||
transition: border-top 0.1s ease;
|
||||
border-top: 1px solid #444;
|
||||
box-sizing: border-box;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0px 0px 6px rgba(0,0,0,0.6);
|
||||
overflow: hidden;
|
||||
min-height: 100px;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.topimage {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.topimage img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
min-height: 20px;
|
||||
transition: all 0.1s;
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
.heading {
|
||||
font-size: 25px;
|
||||
font-weight: 100;
|
||||
position: absolute;
|
||||
padding: 10px;
|
||||
top: 55px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
padding: 10px;
|
||||
min-height: 100px;
|
||||
box-shadow: 0px 0px 3px rgba(0,0,0,0.1);
|
||||
border-top: 1px #444 dotted;
|
||||
border-bottom: 1px #444 dotted;
|
||||
}
|
||||
|
||||
.links {
|
||||
position: relative;
|
||||
height: 35px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.link {
|
||||
display: inline-block;
|
||||
padding: 0px 5px;
|
||||
line-height: 35px;
|
||||
height: 35px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
a {
|
||||
transition: color 0.1s ease;
|
||||
text-decoration: none;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #CCC;
|
||||
}
|
||||
|
||||
.tableline {
|
||||
margin-left: -5px;
|
||||
margin-right: -5px;
|
||||
padding: 10px;
|
||||
color: #cccccc;
|
||||
font-size: 14px;
|
||||
}
|
||||
.tableline:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.tableline:nth-child(even) {
|
||||
background: rgba(0,0,0,0.2);
|
||||
}
|
||||
.tableline .key {
|
||||
font-family: 'Roboto Mono', monospace;
|
||||
font-size: 12px;
|
||||
color: #bbbbbb;
|
||||
font-weight: bold;
|
||||
}
|
||||
.tableline .value {
|
||||
font-family: 'Roboto Mono', monospace;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="mainbox">
|
||||
<div class="topimage"><img src="${this.imgsrc}" width="100" height="100" loading="lazy"></div>
|
||||
<div class="content">
|
||||
<slot>
|
||||
${this.tabledata ? this.tabledata.map(datapoint => html`
|
||||
<div class="tableline">
|
||||
<div class="key">
|
||||
${datapoint.key}:
|
||||
</div>
|
||||
<div class="value">
|
||||
${datapoint.value}
|
||||
</div>
|
||||
</div>
|
||||
`) : null}
|
||||
</slot>
|
||||
</div>
|
||||
<div class="links">
|
||||
${this.links.map(linkArg => {
|
||||
return html`
|
||||
<div class="link"><a target="_blank" href="${linkArg.url}">${linkArg.text}</a></div>
|
||||
`;
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
`;
|
||||
}
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
import {
|
||||
DeesElement,
|
||||
property,
|
||||
html,
|
||||
customElement,
|
||||
type TemplateResult,
|
||||
cssManager,
|
||||
css,
|
||||
} from '@design.estate/dees-element';
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
|
||||
import './internal/uplinternal-miniheading.js';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'upl-statuspage-assetsselector': UplStatuspageAssetsselector;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('upl-statuspage-assetsselector')
|
||||
export class UplStatuspageAssetsselector extends DeesElement {
|
||||
public static demo = () => html`
|
||||
<upl-statuspage-assetsselector></upl-statuspage-assetsselector>
|
||||
`;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
:host {
|
||||
padding: 0px 0px 15px 0px;
|
||||
display: block;
|
||||
background: ${cssManager.bdTheme('#eeeeeb', '#222222')};
|
||||
font-family: Inter;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mainbox {
|
||||
margin: auto;
|
||||
max-width: 900px;
|
||||
text-align: center;
|
||||
height: 50px;
|
||||
border-radius: 3px;
|
||||
background: ${cssManager.bdTheme('#ffffff', '#333333')};;
|
||||
}
|
||||
`,
|
||||
]
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<uplinternal-miniheading>Monitored Assets</uplinternal-miniheading>
|
||||
<div class="mainbox">
|
||||
Hello!
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
import { DeesElement, property, html, customElement, type TemplateResult, css, cssManager } from '@design.estate/dees-element';
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'upl-statuspage-footer': UplStatuspageFooter;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('upl-statuspage-footer')
|
||||
export class UplStatuspageFooter extends DeesElement {
|
||||
// STATIC
|
||||
public static demo = () => html`
|
||||
<upl-statuspage-footer></upl-statuspage-footer>
|
||||
`;
|
||||
|
||||
// INSTANCE
|
||||
@property()
|
||||
public legalInfo: string = "https://lossless.gmbh";
|
||||
|
||||
@property({
|
||||
type: Boolean
|
||||
})
|
||||
public whitelabel = false;
|
||||
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
domtools.elementBasic.staticStyles,
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
background: ${cssManager.bdTheme('#ffffff', '#000000')};
|
||||
font-family: Inter;
|
||||
color: ${cssManager.bdTheme('#333333', '#ffffff')};
|
||||
}
|
||||
|
||||
.mainbox {
|
||||
max-width: 900px;
|
||||
margin: auto;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
`
|
||||
]
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
${domtools.elementBasic.styles}
|
||||
<style></style>
|
||||
<div class="mainbox">
|
||||
Hi there
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
public dispatchReportNewIncident() {
|
||||
this.dispatchEvent(new CustomEvent('reportNewIncident', {
|
||||
|
||||
}))
|
||||
}
|
||||
|
||||
public dispatchStatusSubscribe() {
|
||||
this.dispatchEvent(new CustomEvent('statusSubscribe', {
|
||||
|
||||
}))
|
||||
}
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
import { DeesElement, property, html, customElement, type TemplateResult, css, cssManager } from '@design.estate/dees-element';
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'upl-statuspage-header': UplStatuspageHeader;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('upl-statuspage-header')
|
||||
export class UplStatuspageHeader extends DeesElement {
|
||||
// STATIC
|
||||
public static demo = () => html`
|
||||
<upl-statuspage-header></upl-statuspage-header>
|
||||
`;
|
||||
|
||||
// INSTANCE
|
||||
@property()
|
||||
public pageTitle: string = "Statuspage Title";
|
||||
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
domtools.elementBasic.staticStyles,
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
background: ${cssManager.bdTheme('#eeeeeb', '#222222')};
|
||||
font-family: Inter;
|
||||
color: ${cssManager.bdTheme('#333333', '#ffffff')};
|
||||
}
|
||||
|
||||
.mainbox {
|
||||
margin: auto;
|
||||
max-width: 900px;
|
||||
}
|
||||
|
||||
.mainbox .actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 20px 0px 40px 0px;
|
||||
}
|
||||
|
||||
.mainbox .actions .actionButton {
|
||||
background: ${cssManager.bdTheme('#00000000', '#ffffff00')};
|
||||
|
||||
font-size: 12px;
|
||||
border: 1px solid ${cssManager.bdTheme('#333', '#CCC')};
|
||||
padding: 6px 10px 7px 10px;
|
||||
margin-left: 10px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.mainbox .actions .actionButton:hover {
|
||||
background: ${cssManager.bdTheme('#333333', '#efefef')};
|
||||
border: 1px solid ${cssManager.bdTheme('#333333', '#efefef')};
|
||||
color: ${cssManager.bdTheme('#fff', '#333333')};
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0px;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
font-size: 35px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0px;
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
}
|
||||
`
|
||||
]
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
${domtools.elementBasic.styles}
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div class="mainbox">
|
||||
<div class="actions">
|
||||
<div class="actionButton" @click=${this.dispatchReportNewIncident}>report new incident</div>
|
||||
<div class="actionButton" @click=${this.dispatchStatusSubscribe}>subscribe</div>
|
||||
</div>
|
||||
<h1>${this.pageTitle}</h1>
|
||||
<h2>STATUS BOARD</h2>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
public dispatchReportNewIncident() {
|
||||
this.dispatchEvent(new CustomEvent('reportNewIncident', {
|
||||
|
||||
}))
|
||||
}
|
||||
|
||||
public dispatchStatusSubscribe() {
|
||||
this.dispatchEvent(new CustomEvent('statusSubscribe', {
|
||||
|
||||
}))
|
||||
}
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import {
|
||||
DeesElement,
|
||||
property,
|
||||
html,
|
||||
customElement,
|
||||
type TemplateResult,
|
||||
css,
|
||||
cssManager,
|
||||
} from '@design.estate/dees-element';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'upl-statuspage-incidents': UplStatuspageIncidents;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('upl-statuspage-incidents')
|
||||
export class UplStatuspageIncidents extends DeesElement {
|
||||
// STATIC
|
||||
public static demo = () => html` <upl-statuspage-incidents></upl-statuspage-incidents> `;
|
||||
|
||||
// INSTANCE
|
||||
@property({
|
||||
type: Array,
|
||||
})
|
||||
public currentIncidences: plugins.uplInterfaces.data.IIncident[] = [];
|
||||
|
||||
@property({
|
||||
type: Array,
|
||||
})
|
||||
public pastIncidences: plugins.uplInterfaces.data.IIncident[] = [];
|
||||
|
||||
@property({
|
||||
type: Boolean,
|
||||
})
|
||||
public whitelabel = false;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
plugins.domtools.elementBasic.staticStyles,
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
background: ${cssManager.bdTheme('#eeeeeb', '#222222')};
|
||||
font-family: Inter;
|
||||
color: ${cssManager.bdTheme('#333333', '#ffffff')};
|
||||
}
|
||||
|
||||
.mainbox {
|
||||
max-width: 900px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.noIncidentBox {
|
||||
background: ${cssManager.bdTheme('#ffffff', '#333333')};;
|
||||
padding: 10px;
|
||||
margin-bottom: 15px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<style></style>
|
||||
<div class="mainbox">
|
||||
<uplinternal-miniheading> Current Incidents </uplinternal-miniheading>
|
||||
${this.currentIncidences.length
|
||||
? html``
|
||||
: html` <div class="noIncidentBox">No incidents ongoing.</div> `}
|
||||
<uplinternal-miniheading> Past Incidents </uplinternal-miniheading>
|
||||
${this.pastIncidences.length
|
||||
? html``
|
||||
: html` <div class="noIncidentBox">No past incidents in the last 90 days.</div> `}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
public dispatchReportNewIncident() {
|
||||
this.dispatchEvent(new CustomEvent('reportNewIncident', {}));
|
||||
}
|
||||
|
||||
public dispatchStatusSubscribe() {
|
||||
this.dispatchEvent(new CustomEvent('statusSubscribe', {}));
|
||||
}
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
import { DeesElement, property, html, customElement, type TemplateResult, cssManager, css } from '@design.estate/dees-element';
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'upl-statuspage-statusbar': UplStatuspageStatusbar;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('upl-statuspage-statusbar')
|
||||
export class UplStatuspageStatusbar extends DeesElement {
|
||||
public static demo = () => html`
|
||||
<upl-statuspage-statusbar></upl-statuspage-statusbar>
|
||||
`;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
:host {
|
||||
padding: 20px 0px 15px 0px;
|
||||
display: block;
|
||||
background: ${cssManager.bdTheme('#eeeeeb', '#222222')};;
|
||||
font-family: Inter;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mainbox {
|
||||
margin: auto;
|
||||
max-width: 900px;
|
||||
text-align: center;
|
||||
background: #19572E;
|
||||
line-height: 50px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
`,
|
||||
]
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<style>
|
||||
</style>
|
||||
<div class="mainbox">
|
||||
Everything is working normally!
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import {
|
||||
DeesElement,
|
||||
property,
|
||||
html,
|
||||
customElement,
|
||||
type TemplateResult,
|
||||
css,
|
||||
cssManager,
|
||||
} from '@design.estate/dees-element';
|
||||
|
||||
import './internal/uplinternal-miniheading.js';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'upl-statuspage-statusdetails': UplStatuspageStatusdetails;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('upl-statuspage-statusdetails')
|
||||
export class UplStatuspageStatusdetails extends DeesElement {
|
||||
public static demo = () => html` <upl-statuspage-statusdetails></upl-statuspage-statusdetails> `;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
plugins.domtools.elementBasic.staticStyles,
|
||||
css`
|
||||
:host {
|
||||
position: relative;
|
||||
padding: 0px 0px 15px 0px;
|
||||
display: block;
|
||||
background: ${cssManager.bdTheme('#eeeeeb', '#222222')};;
|
||||
font-family: Inter;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mainbox {
|
||||
margin: auto;
|
||||
max-width: 900px;
|
||||
text-align: right;
|
||||
background: ${cssManager.bdTheme('#ffffff', '#333333')};;
|
||||
line-height: 50px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.mainbox .barContainer {
|
||||
position: relative;
|
||||
display: flex;
|
||||
padding: 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mainbox .barContainer .bar {
|
||||
margin: 4px;
|
||||
width: 11px;
|
||||
border-radius: 3px;
|
||||
height: 40px;
|
||||
background: #2deb51;
|
||||
}
|
||||
.timeIndicator {
|
||||
position: absolute;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
background: #FF9800;
|
||||
top: 56px;
|
||||
left: 400px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<style></style>
|
||||
<uplinternal-miniheading>Yesterday & Today</uplinternal-miniheading>
|
||||
<div class="mainbox">
|
||||
<div class="barContainer">
|
||||
${(() => {
|
||||
let counter = 0;
|
||||
const returnArray: TemplateResult[] = [];
|
||||
while (counter < 48) {
|
||||
counter++;
|
||||
returnArray.push(html` <div class="bar"></div> `);
|
||||
}
|
||||
return returnArray;
|
||||
})()}
|
||||
<div class="timeIndicator"></div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
@ -1,130 +0,0 @@
|
||||
import {
|
||||
DeesElement,
|
||||
property,
|
||||
html,
|
||||
customElement,
|
||||
type TemplateResult,
|
||||
css,
|
||||
cssManager
|
||||
} from '@design.estate/dees-element';
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
|
||||
import './internal/uplinternal-miniheading.js';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'upl-statuspage-statusmonth': UplStatuspageStatusmonth;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('upl-statuspage-statusmonth')
|
||||
export class UplStatuspageStatusmonth extends DeesElement {
|
||||
public static demo = () => html` <upl-statuspage-statusmonth></upl-statuspage-statusmonth> `;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
domtools.elementBasic.staticStyles,
|
||||
css`
|
||||
:host {
|
||||
position: relative;
|
||||
padding: 0px 0px 15px 0px;
|
||||
display: block;
|
||||
background: ${cssManager.bdTheme('#eeeeeb', '#222222')};;
|
||||
font-family: Inter;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mainbox {
|
||||
margin: auto;
|
||||
max-width: 900px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, calc(100% / 5 - 80px / 5));
|
||||
grid-column-gap: 20px;
|
||||
}
|
||||
|
||||
.statusMonth {
|
||||
background: ${cssManager.bdTheme('#ffffff', '#333333')};;
|
||||
min-height: 20px;
|
||||
display: grid;
|
||||
padding: 10px;
|
||||
grid-template-columns: repeat(6, auto);
|
||||
grid-gap: 9px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.statusMonth .statusDay {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: #2deb51;
|
||||
border-radius: 3px;
|
||||
}
|
||||
`
|
||||
]
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<style></style>
|
||||
<uplinternal-miniheading>Last 150 days</uplinternal-miniheading>
|
||||
<div class="mainbox">
|
||||
<div class="statusMonth">
|
||||
${(() => {
|
||||
let counter = 0;
|
||||
const returnArray: TemplateResult[] = [];
|
||||
while (counter < 30) {
|
||||
counter++;
|
||||
returnArray.push(html` <div class="statusDay"></div> `);
|
||||
}
|
||||
return returnArray;
|
||||
})()}
|
||||
</div>
|
||||
<div class="statusMonth">
|
||||
${(() => {
|
||||
let counter = 0;
|
||||
const returnArray: TemplateResult[] = [];
|
||||
while (counter < 30) {
|
||||
counter++;
|
||||
returnArray.push(html` <div class="statusDay"></div> `);
|
||||
}
|
||||
return returnArray;
|
||||
})()}
|
||||
</div>
|
||||
<div class="statusMonth">
|
||||
${(() => {
|
||||
let counter = 0;
|
||||
const returnArray: TemplateResult[] = [];
|
||||
while (counter < 30) {
|
||||
counter++;
|
||||
returnArray.push(html` <div class="statusDay"></div> `);
|
||||
}
|
||||
return returnArray;
|
||||
})()}
|
||||
</div>
|
||||
<div class="statusMonth">
|
||||
${(() => {
|
||||
let counter = 0;
|
||||
const returnArray: TemplateResult[] = [];
|
||||
while (counter < 30) {
|
||||
counter++;
|
||||
returnArray.push(html` <div class="statusDay"></div> `);
|
||||
}
|
||||
return returnArray;
|
||||
})()}
|
||||
</div>
|
||||
<div class="statusMonth">
|
||||
${(() => {
|
||||
let counter = 0;
|
||||
const returnArray: TemplateResult[] = [];
|
||||
while (counter < 30) {
|
||||
counter++;
|
||||
returnArray.push(html` <div class="statusDay"></div> `);
|
||||
}
|
||||
return returnArray;
|
||||
})()}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
@ -1 +1,8 @@
|
||||
export * from './elements/index.js';
|
||||
export * from './elements/index';
|
||||
|
||||
import * as themelogic from './themelogic';
|
||||
|
||||
export {
|
||||
themelogic
|
||||
};
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
import * as uplInterfaces from '@uptime.link/interfaces';
|
||||
|
||||
export {
|
||||
domtools,
|
||||
uplInterfaces
|
||||
}
|
5
ts_web/themelogic/index.ts
Normal file
5
ts_web/themelogic/index.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import * as leleCv from './lelecv';
|
||||
|
||||
export {
|
||||
leleCv
|
||||
}
|
3
ts_web/themelogic/lelecv.ts
Normal file
3
ts_web/themelogic/lelecv.ts
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
export const backgroundAccent = '#303f9f';
|
||||
export const pageWidth = '1200px';
|
16
ts_web/tsconfig.json
Normal file
16
ts_web/tsconfig.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2017",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"lib": ["es2017", "dom"],
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"inlineSourceMap": true,
|
||||
"noUnusedLocals": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"outDir": "dist/",
|
||||
"skipLibCheck": true,
|
||||
"experimentalDecorators": true
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
}
|
17
tslint.json
Normal file
17
tslint.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"member-ordering": {
|
||||
"options":{
|
||||
"order": [
|
||||
"static-method"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user