Skip to content

Commit

Permalink
init cosmos surge
Browse files Browse the repository at this point in the history
  • Loading branch information
Sun-June committed Sep 3, 2023
0 parents commit d972740
Show file tree
Hide file tree
Showing 42 changed files with 4,614 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

static/*
build/*
config/*
out/
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:alpine3.18

RUN mkdir -p /usr/cosmos-surge

COPY ./build /usr/cosmos-surge
COPY ./docker/package.json /usr/cosmos-surge
COPY ./docker/config /usr/cosmos-surge/config
COPY ./static /usr/cosmos-surge/static

WORKDIR /usr/cosmos-surge

RUN npm install

EXPOSE 9999

CMD ["npm", "run", "start"]
73 changes: 73 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
Server Side Public License (SSPL) Version 1.0

1. Definitions.

1.1. "Commercial Use" means distribution or otherwise making the Covered Software available to a third party.

1.2. "Covered Software" means the User or any sublicensor's proprietary software that is licensed under the terms of this License.

1.3. "Deploy" means to use, offer to use, run, or provide access to, Covered Software as part of providing a service, whether or not a fee is charged.

1.4. "External Deployment" means Deploying Covered Software on a Server running a system other than Covered Software that is not Licensed under this License.

1.5. "Internal Deployment" means Deploying Covered Software within the User's organization.

1.6. "Purposely Using" means Deploying the Covered Software with the primary purpose of causing it to become subject to the terms of this License.

1.7. "Service" means a set of network-accessible functions or features that are provided by a Party to a third party.

1.8. "Sublicense" means to grant a license to use, perform, display, or otherwise access or deploy the Covered Software.

1.9. "Valid License" means a license that has been authorized by User through the process communicated by the User for Deploying the Covered Software.

2. Additional Terms.

2.1. Proprietary Rights. User acknowledges that the Covered Software contains proprietary information and Intellectual Property of User. User shall use its best efforts to preserve and protect the proprietary rights of User and all intellectual property rights therein. User shall promptly notify User if User becomes aware of any unauthorized access to, or use or copying of, the Covered Software.

2.2. User Access. User shall ensure that its Users agree to comply with, and be bound by, the terms of this License, including but not limited to, the obligation not to Deploy the Covered Software except as authorized under this License.

2.3. Support Services. User shall provide sufficient contact information, preferably a valid email address, to permit Users to contact User for customer support in connection with the Covered Software. User shall respond promptly to inquiries and use commercially reasonable efforts to resolve issues. User may provide support services to Users in connection with the Covered Software. Such support services may be subject to a separate agreement.

2.4. Bug Reports. User shall provide to User any bug reports submitted by Users.

2.5. Sublicensing and External Deployment.

2.5.1. If User Sublicenses the Covered Software, User shall include a copy of this License with each such sublicense.

2.5.2. If User Deployed the Covered Software in an External Deployment, User shall make the Covered Software available for a fee that is no more than User's cost of distribution.

3. Grant of Rights.

3.1. Copyright Grant. User hereby grants to User and all Users a world-wide, royalty-free, non-exclusive license, subject to the terms of this License, to do the following:

3.1.1. to reproduce, analyze, and modify the Covered Software, as well as to reproduce, analyze, and modify any derivative works thereof,

3.1.2. to reproduce and Deploy the Covered Software and any derivative works thereof, and

3.1.3. to reproduce and sublicense the Covered Software and any derivative works thereof; and

3.1.4. User grants to User and all Users a world-wide, royalty-free, non-exclusive license, subject to the terms of this License, to do the following:

3.1.5. to use, reproduce, Deploy, reproduce and sublicense the Covered Software for the purpose of allowing Users to use the Covered Software in accordance with the terms of this License.

3.1.6. User grants to User and all Users a world-wide, royalty-free, non-exclusive license, subject to the terms of this License, to reproduce and display the Covered Software, as well as any derivative works thereof, and to reproduce and display any associated documentation.

4. Inability to Comply Due to Statute or Regulation.

If it is impossible for the User to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute or regulation, then any Licensor shall:

4.1. not be responsible for it; and

4.2. not be subject to any liability with respect to it.

5. Termination.

5.1. Termination by User. User may terminate its licenses under this License at any time by destroying or disposing of all copies of the Covered Software in User's possession, whether in physical or electronic format.

5.2. Termination by User. User may terminate any Sublicense at any time by terminating User's Subsidiary's or Users' right to Deploy the Covered Software. User may also terminate a license and/or sublicense with respect to all Users immediately upon written notice to any User if User's primary purpose for Deploying the Covered Software is to cause it to become subject to the terms of this License, regardless of the date on which User first Deployed the Covered Software.

5.3. Termination by User. User may terminate a license and/or sublicense if:

5.3.1. a User breaches any of the terms of this License; or

5.3.2. User is notified in writing
68 changes: 68 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Cosmos Surge

Cosmos Surge is a straightforward tool for managing Azure Cosmos DB instances.

## features:

* Multi-Instance Management: Seamlessly manage data from multiple Cosmos DB instances through a single interface.

* Convenient Querying: Easily query data with powerful filtering capabilities, making complex operations simple.

* Grouping by Partition: Group data by defined partitions for more efficient operations.

* Edit and Delete Records: Modify and delete data based on query results while retaining a log of changes for reference.

* Effortless Data Insertion: Quickly insert new data records with ease.

* Batch Data Import: Efficiently import query results into other containers.

* Cosmos Surge simplifies the process of working with Azure Cosmos DB, providing a user-friendly interface for managing and querying your data.

------------

## 日本語説明

Cosmos Surge は、Azure Cosmos DB データベースの操作を簡単かつ効率的に行うためのシンプルでパワフルなツールです。開発者、データベース管理者、データ分析者のいずれであっても、Cosmos Surge は Azure Cosmos DB データの管理と分析に対するニーズを満たします。

## 主要な機能

* Cosmos Surge は、Azure Cosmos DB データの管理と操作を簡単に行えるようにする多くの機能を提供します。

* マルチインスタンス管理: Cosmos Surge を使用すると、複数の Azure Cosmos DB インスタンスのデータを同時に管理できます。これにより、複数の Cosmos DB インスタンス間をスムーズに切り替えることができます。複数のアカウントでログインしたり、異なるツールを使用したりする必要はありません。

* 簡単なクエリ: Cosmos Surge は強力なクエリ機能を提供し、豊富なクエリ条件を使用して必要なデータを取得できます。ドキュメントのプロパティ、値、分区などに基づいて柔軟なクエリを実行し、必要な情報を正確に見つけることができます。

* 分组と分区: 操作を簡素化するために、Cosmos Surge ではパーティションの設定に基づいてデータをグループ化できます。これにより、データの管理とフィルタリングがより簡単になります。

* データの編集と削除: クエリ結果可視化後、データを編集または削除できます。Cosmos Surge はこれらの変更を記録し、いつでも操作履歴を確認できます。

* データの挿入: 新しいデータを Cosmos DB に挿入することはこれまでにないほど簡単です。Cosmos Surge は直感的なインターフェースを提供し、指定したコンテナにデータを挿入するのが簡単になります。

* バルクデータのインポート: 現在のクエリ結果を他のコンテナにバルクデータとしてインポートする必要がある場合、Cosmos Surge もこの機能を提供しています。データの移行や整理に役立ちます。

## 使い方ガイド

------------

## 中文说明


Cosmos Surge 是一个简单但强大的工具,旨在使 Azure Cosmos DB 数据库的操作变得轻松且高效。无论您是开发人员、数据库管理员还是数据分析师,Cosmos Surge 都可以满足您对 Cosmos DB 数据的管理和其他基本操作。

## 主要功能

* Cosmos Surge 提供了多项功能,让您更轻松地管理和操作 Azure Cosmos DB 数据。

* 多实例管理:通过 Cosmos Surge,您可以同时管理多个 Azure Cosmos DB 实例的数据。这意味着您可以轻松地在不同的 Cosmos DB 实例之间切换,无需登录多个账户或使用不同的工具。

* 便捷的查询:Cosmos Surge 提供强大的查询功能,让您可以使用丰富的查询条件来检索所需的数据。您可以根据文档的属性、值、分区等进行灵活的查询,从而精确地找到需要的信息。

* 分组和分区:为了简化操作,Cosmos Surge 允许您根据设置的分区对数据进行分组。这使得数据的管理和筛选变得更加简单,特别是对于大规模的数据集。

* 编辑和删除数据:查询结果可视化后,您可以轻松地编辑或删除数据。Cosmos Surge 会记录这些更改,以便您随时查看历史操作记录。

* 插入数据:将新数据插入 Cosmos DB 从未如此简单。Cosmos Surge 提供直观的界面,让您可以轻松地将数据插入到指定的容器。

* 批量导入数据:如果您需要将当前查询结果批量导入到其他容器,Cosmos Surge 也提供了这个功能。这对于数据的迁移和整理非常有用。

## 使用指南
1 change: 1 addition & 0 deletions docker/config/link.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions docker/config/server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"port":9999}
12 changes: 12 additions & 0 deletions docker/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "cosmos-surge",
"version": "1.0.0",
"main": "main.js",
"description": "cosmos-surge",
"scripts": {
"start": "NODE_TLS_REJECT_UNAUTHORIZED=0 node main.js"
},
"dependencies": {
"@azure/cosmos": "^3.17.3"
}
}
Binary file added favicon.ico
Binary file not shown.

0 comments on commit d972740

Please sign in to comment.