remove useless file

This commit is contained in:
xuziqiang
2024-05-15 17:55:39 +08:00
parent d0155dbe3c
commit e1c6868eda
4724 changed files with 0 additions and 1151969 deletions

View File

@@ -1,5 +1,3 @@
import { defineStore } from 'pinia';
import { http } from '/nerv-lib/saas';
interface AppConfig {

View File

@@ -1,8 +0,0 @@
# port
VITE_PORT = 5058
# spa-title
VITE_GLOB_APP_TITLE = nervui-noeiaasvdisk
# spa shortname
VITE_GLOB_APP_SHORT_NAME = nervui-noeiaasvdisk

View File

@@ -1,20 +0,0 @@
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /nervui-noeiaasvdisk/
# Cross-domain proxy, you can configure multiple
# Please note that no line breaks
# Delete console
VITE_DROP_CONSOLE = false
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
# File upload address optional
VITE_GLOB_UPLOAD_URL=/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=

View File

@@ -1,35 +0,0 @@
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /nervui-noeiaasvdisk/
# Delete console
VITE_DROP_CONSOLE = true
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# Whether to delete origin files when using compress, default false
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
# Basic interface address SPA
VITE_GLOB_API_URL=/app-develop
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL=/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
# Whether to enable image compression
VITE_USE_IMAGEMIN= true
# use pwa
VITE_USE_PWA = false
# Is it compatible with older browsers
VITE_LEGACY = false

View File

@@ -1 +0,0 @@
1.0.0

View File

@@ -1,74 +0,0 @@
#!/bin/bash
SOURCE="$0"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
if [ -z $WORKSPACE ];then
echo "WORKSPACE not exists"
else
set DIR=$WORKSPACE
fi
echo "current dir"
echo "$DIR"
cd "$DIR"
projectname=$(basename `pwd`)
npm run noeIaasvdisk-build
if [ -d "$DIR/dist" ];then
cd "$DIR/dist"
# copy module.json
cp ../module.json ./
# package
VERSION=$(cat ../.version)
lastdir=../release/
if [ -d ${lastdir} ];then
echo "删除旧release文件夹"
rm -rf ${lastdir}
else
echo "文件夹不存在!"
fi
mkdir -p ${lastdir}
dir=../release/nerv/$projectname/$VERSION
mkdir -p ${dir}
tar -zcvf "${dir}/$projectname-$VERSION.tgz" ./*
templatedir=../release/resources/templates/nerv/$projectname/$VERSION/$projectname
mkdir -p ${templatedir}
cp -r ../resources/templates/* ${templatedir}
cd ../
releasefile=nerv-$projectname-$VERSION.tgz
if [ -f ${releasefile} ];then
echo "删除旧包!"
rm -rf ${releasefile}
fi
tar -zcvf ${releasefile} ./release/* release.yaml
mkdir -p ./release/nervui
cp -r ./release/nerv/* ./release/nervui
if [ -f ${releasefile} ];then
echo "编译成功!"
mv ${releasefile} ./release
else
echo "编译失败!!!"
exit 1
fi
else
echo "编译失败!!!"
exit 1
fi

View File

@@ -1,13 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon-stack.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>云盘</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="./src/main.ts"></script>
</body>
</html>

View File

@@ -1,46 +0,0 @@
[
{
"catalog": "存储",
"icon": "&#xe687;",
"name": "vdisk",
"label": "云盘",
"menus": [
{
"name": "Noeflavors",
"url": "/vdisk/Noeflavors",
"label": "云盘规格",
"operation": {
"resource": "Noeflavors",
"method": "list"
}
},
{
"name": "Noevolume",
"url": "/vdisk/Noevolume",
"label": "云盘",
"operation": {
"resource": "Noevolume",
"method": "list"
}
},{
"name":"Noevolumesnapshot",
"url": "/vdisk/Noevolumesnapshot",
"label": "云盘快照",
"operation": {
"resource": "Noevolumesnapshot",
"method": "list"
}
},
{
"name":"Noebackup",
"url": "/vdisk/Noebackup",
"label": "云盘备份",
"operation": {
"resource": "Noebackup",
"method": "list"
}
}
]
}
]

View File

@@ -1,11 +0,0 @@
{
"release": [
{
"src": "nervui-noeiaasvdisk/release",
"dest": "/upload/pkg",
"include": [
"nervui-noeiaasvdisk-(\\d+).(\\d+).(\\d+)(|-\\w+).tar.gz"
]
}
]
}

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env bash
SOURCE="$0"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
cd "$DIR" || exit
VERSION=$(cat "$(pwd)"/.version)
sed "s|\${VERSION}|${VERSION}|g" "$(pwd)"/offline.tpl.yaml > "$(pwd)"/offline.yaml || exit 1
releaseDir="./release/nervui/nerv/nervui-noeiaasvdisk-offline"
rm -rf $releaseDir
version="${VERSION}-$(cat "$(pwd)"/offline.version)"
set -x
docker run --rm -i \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$(pwd)"/offline.yaml:/app/build.yaml \
-v "$(pwd)/$releaseDir":/app/output \
-e name=nervui-noeiaasvdisk \
-e version="$version" \
--pull=always \
registry.nervhub.nervstack.io/nerv3/deploy:latest
rm -rf $releaseDir/output

View File

@@ -1,5 +0,0 @@
images:
helm:
- name: nervui-noeiaasvdisk
version: "${VERSION}"
repository: "https://registry.nervhub.nervstack.io/chartrepo/nerv3-ui"

View File

@@ -1 +0,0 @@
alpha1

View File

@@ -1,113 +0,0 @@
{
"name": "NeUINoeIaasvdisk",
"version": "1.0.14",
"files": [
"dist"
],
"main": "./dist/nerv-lib.es.js",
"scripts": {
"start": "npm run dev",
"noeIaasvdisk": "vite serve ./nervui-noeIaasvdisk --config ./nervui-noeIaasvdisk/vite.config.ts",
"noeIaasvdisk-build": "cross-env NODE_ENV=production vite build ./nervui-noeIaasvdisk --config ./nervui-noeIaasvdisk/vite.config.ts",
"dev": "vite",
"lint:eslint-fix": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
"build": "cross-env NODE_ENV=production vite build ",
"serve": "vite preview",
"publish_czwh": "npm publish --registry http://100.86.17.206:31873/ --access public"
},
"dependencies": {
"@ant-design/icons-vue": "^6.1.0",
"@antv/layout": "0.3.10",
"@antv/x6": "^1.28.1",
"@antv/x6-vue-shape": "^1.2.10",
"@novnc/novnc": "^1.3.0",
"@vueuse/core": "^8.4.2",
"ant-design-vue": "^3.2.3",
"async-validator": "^4.1.1",
"axios": "^0.27.2",
"clamp": "^1.0.1",
"dayjs": "^1.11.2",
"echarts": "^5.3.2",
"echarts-gl": "^2.0.9",
"element-resize-detector": "^1.2.4",
"exceljs": "^4.3.0",
"file-saver": "^2.0.5",
"flv.js": "^1.6.2",
"html2canvas": "^1.4.1",
"i": "^0.3.7",
"js-cookie": "^3.0.1",
"json5": "^2.2.1",
"jspdf": "^2.5.1",
"jszip": "^3.9.1",
"less-vars-to-js": "^1.3.0",
"lodash-es": "^4.17.21",
"loglevel": "^1.8.0",
"loglevel-plugin-prefix": "^0.8.4",
"luckyexcel": "^1.0.1",
"md-editor-v3": "^2.2.1",
"mitt": "^3.0.0",
"moment": "^2.29.3",
"monaco-editor": "^0.33.0",
"monaco-editor-webpack-plugin": "^7.0.1",
"path-to-regexp": "^6.2.1",
"pinia": "^2.0.14",
"qrcode.vue": "^3.3.3",
"shifty": "^2.19.0",
"sortablejs": "^1.15.0",
"vant": "^3.6.3",
"vite-plugin-monaco-editor-nls": "^2.0.2",
"vue": "^3.2.33",
"vue-animate-number": "^0.4.2",
"vue-cookies": "^1.8.1",
"vue-cropper": "^0.5.8",
"vue-grid-layout": "^3.0.0-beta1",
"vue-json-viewer": "^3.0.2",
"vue-router": "^4.0.15",
"vue-ueditor-wrap": "^3.0.8",
"vue3-marquee": "^3.0.3",
"vuedraggable": "^4.1.0",
"wangeditor": "^4.7.15",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@types/js-cookie": "^3.0.2",
"@types/lodash-es": "^4.17.6",
"@types/node": "^17.0.35",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^5.23.0",
"@vitejs/plugin-legacy": "^1.8.2",
"@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"@vue/compiler-sfc": "^3.2.33",
"@web-types/vue": "^3.0.0-1",
"cross-env": "^7.0.3",
"eslint": "^8.15.0",
"eslint-config-prettier": "^8.5.0",
"eslint-define-config": "^1.4.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.7.1",
"esno": "^0.15.0",
"less": "^4.1.2",
"postcss": "^8.4.13",
"postcss-less": "^6.0.0",
"prettier": "^2.6.2",
"sass": "^1.51.0",
"stylelint": "^14.8.2",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^25.0.0",
"stylelint-order": "^5.0.0",
"stylelint-prettier": "^2.0.0",
"stylelint-scss": "^4.2.0",
"tinycolor2": "^1.4.2",
"typescript": "^4.6.4",
"unplugin-vue-components": "^0.19.9",
"vite": "^2.9.9",
"vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-theme": "^0.8.6",
"vue-eslint-parser": "^9.0.1",
"vue-tsc": "^0.34.13",
"vue3-print-nb": "^0.1.4"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,378 +0,0 @@
/** @format */
// Type definitions for Resumable.js
// Project: https://github.com/23/resumable.js
// Definitions by: Bazyli Brzóska <https://invent.life/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export declare namespace Resumable {
export interface ConfigurationHash {
/**
* The target URL for the multipart POST request. This can be a string or a function that allows you you to construct and return a value, based on supplied params. (Default: /)
**/
target?: string;
/**
* The size in bytes of each uploaded chunk of data. The last uploaded chunk will be at least this size and up to two the size, see Issue #51 for details and reasons. (Default: 1*1024*1024)
**/
chunkSize?: number;
/**
* Force all chunks to be less or equal than chunkSize. Otherwise, the last chunk will be greater than or equal to chunkSize. (Default: false)
**/
forceChunkSize?: boolean;
/**
* Number of simultaneous uploads (Default: 3)
**/
simultaneousUploads?: number;
/**
* The name of the multipart POST parameter to use for the file chunk (Default: file)
**/
fileParameterName?: string;
/**
* The name of the chunk index (base-1) in the current upload POST parameter to use for the file chunk (Default: resumableChunkNumber)
*/
chunkNumberParameterName?: string;
/**
* The name of the total number of chunks POST parameter to use for the file chunk (Default: resumableTotalChunks)
*/
totalChunksParameterName?: string;
/**
* The name of the general chunk size POST parameter to use for the file chunk (Default: resumableChunkSize)
*/
chunkSizeParameterName?: string;
/**
* The name of the total file size number POST parameter to use for the file chunk (Default: resumableTotalSize)
*/
totalSizeParameterName?: string;
/**
* The name of the unique identifier POST parameter to use for the file chunk (Default: resumableIdentifier)
*/
identifierParameterName?: string;
/**
* The name of the original file name POST parameter to use for the file chunk (Default: resumableFilename)
*/
fileNameParameterName?: string;
/**
* The name of the file's relative path POST parameter to use for the file chunk (Default: resumableRelativePath)
*/
relativePathParameterName?: string;
/**
* The name of the current chunk size POST parameter to use for the file chunk (Default: resumableCurrentChunkSize)
*/
currentChunkSizeParameterName?: string;
/**
* The name of the file type POST parameter to use for the file chunk (Default: resumableType)
*/
typeParameterName?: string;
/**
* Extra parameters to include in the multipart POST with data. This can be an object or a function. If a function, it will be passed a ResumableFile and a ResumableChunk object (Default: {})
**/
query?: Object;
/**
* Method for chunk test request. (Default: 'GET')
**/
testMethod?: 'GET' | 'POST' | 'OPTIONS' | 'PUT' | 'DELETE';
/**
* Method for chunk upload request. (Default: 'POST')
**/
uploadMethod?: 'GET' | 'POST' | 'OPTIONS' | 'PUT' | 'DELETE';
/**
* Extra prefix added before the name of each parameter included in the multipart POST or in the test GET. (Default: '')
**/
parameterNamespace?: string;
/**
* Extra headers to include in the multipart POST with data. This can be an object or a function that allows you to construct and return a value, based on supplied file (Default: {})
**/
headers?: Object | ((file) => Object);
/**
* Method to use when POSTing chunks to the server (multipart or octet) (Default: multipart)
**/
method?: 'multipart' | 'octet';
/**
* Prioritize first and last chunks of all files. This can be handy if you can determine if a file is valid for your service from only the first or last chunk. For example, photo or video meta data is usually located in the first part of a file, making it easy to test support from only the first chunk. (Default: false)
**/
prioritizeFirstAndLastChunk?: boolean;
/**
* Make a GET request to the server for each chunks to see if it already exists. If implemented on the server-side, this will allow for upload resumes even after a browser crash or even a computer restart. (Default: true)
**/
testChunks?: boolean;
/**
* Optional function to process each chunk before testing & sending. Function is passed the chunk as parameter, and should call the preprocessFinished method on the chunk when finished. (Default: null)
**/
preprocess?: (chunk: ResumableChunk) => ResumableChunk;
/**
* Optional function to process each file before testing & sending the corresponding chunks. Function is passed the file as parameter, and should call the preprocessFinished method on the file when finished. (Default: null)
**/
preprocessFile?: (file: ResumableFile) => ResumableFile;
/**
* Override the function that generates unique identifiers for each file. (Default: null)
**/
generateUniqueIdentifier?: (file: File, event: Event) => Promise<string> | string;
/**
* Indicates how many files can be uploaded in a single session. Valid values are any positive integer and undefined for no limit. (Default: undefined)
**/
maxFiles?: number;
/**
* A function which displays the please upload n file(s) at a time message. (Default: displays an alert box with the message Please n one file(s) at a time.)
**/
maxFilesErrorCallback?: (files, errorCount) => void;
/**
* The minimum allowed file size. (Default: undefined)
**/
minFileSize?: number;
/**
* A function which displays an error a selected file is smaller than allowed. (Default: displays an alert for every bad file.)
**/
minFileSizeErrorCallback?: (file, errorCount) => void;
/**
* The maximum allowed file size. (Default: undefined)
**/
maxFileSize?: number;
/**
* A function which displays an error a selected file is larger than allowed. (Default: displays an alert for every bad file.)
**/
maxFileSizeErrorCallback?: (file, errorCount) => void;
/**
* The file types allowed to upload. An empty array allow any file type. (Default: [])
**/
fileType?: Array<string>;
/**
* A function which displays an error a selected file has type not allowed. (Default: displays an alert for every bad file.)
**/
fileTypeErrorCallback?: (file, errorCount) => void;
/**
* The maximum number of retries for a chunk before the upload is failed. Valid values are any positive integer and undefined for no limit. (Default: undefined)
**/
maxChunkRetries?: number;
/**
* The number of milliseconds to wait before retrying a chunk on a non-permanent error. Valid values are any positive integer and undefined for immediate retry. (Default: undefined)
**/
chunkRetryInterval?: number;
/**
* Standard CORS requests do not send or set any cookies by default. In order to include cookies as part of the request, you need to set the withCredentials property to true. (Default: false)
**/
withCredentials?: boolean;
/**
* setChunkTypeFromFile` Set chunk content-type from original file.type. (Default: false, if false default Content-Type: application/octet-stream)
**/
setChunkTypeFromFile?: boolean;
/**
* The class name to add on drag over an assigned drop zone. (Default: dragover)
**/
dragOverClass?: string;
}
export class Resumable {
constructor(options: ConfigurationHash);
/**
* A boolean value indicator whether or not Resumable.js is supported by the current browser.
**/
support: boolean;
/**
* A hash object of the configuration of the Resumable.js instance.
**/
opts: ConfigurationHash;
/**
* An array of ResumableFile file objects added by the user (see full docs for this object type below).
**/
files: Array<ResumableFile>;
events: Array<any>;
version: number;
/**
* Assign a browse action to one or more DOM nodes. Pass in true to allow directories to be selected (Chrome only).
**/
assignBrowse(domNode: Element, isDirectory: boolean): void;
assignBrowse(domNodes: Array<Element>, isDirectory: boolean): void;
/**
* Assign one or more DOM nodes as a drop target.
**/
assignDrop(domNode: Element): void;
assignDrop(domNodes: Array<Element>): void;
unAssignDrop(domNode: Element): void;
unAssignDrop(domNodes: Array<Element>): void;
/**
* Start or resume uploading.
**/
upload(): void;
uploadNextChunk(): void;
/**
* Pause uploading.
**/
pause(): void;
/**
* Cancel upload of all ResumableFile objects and remove them from the list.
**/
cancel(): void;
fire(): void;
/**
* Returns a float between 0 and 1 indicating the current upload progress of all files.
**/
progress(): number;
/**
* Returns a boolean indicating whether or not the instance is currently uploading anything.
**/
isUploading(): boolean;
/**
* Add a HTML5 File object to the list of files.
**/
addFile(file: File): void;
/**
* Add an Array of HTML5 File objects to the list of files.
**/
addFiles(files: Array<File>): void;
/**
* Cancel upload of a specific ResumableFile object on the list from the list.
**/
removeFile(file: ResumableFile): void;
/**
* Look up a ResumableFile object by its unique identifier.
**/
getFromUniqueIdentifier(uniqueIdentifier: string): void;
/**
* Returns the total size of the upload in bytes.
**/
getSize(): number;
getOpt(o: string): any;
// Events
/**
* Listen for event from Resumable.js (see below)
**/
on(event: string, callback: Function): void;
/**
* A specific file was completed.
**/
on(event: 'fileSuccess', callback: (file: ResumableFile) => void);
void;
/**
* Uploading progressed for a specific file.
**/
on(event: 'fileProgress', callback: (file: ResumableFile) => void): void;
/**
* A new file was added. Optionally, you can use the browser event object from when the file was added.
**/
on(event: 'fileAdded', callback: (file: ResumableFile, event: DragEvent) => void): void;
/**
* New files were added.
**/
on(event: 'filesAdded', callback: (files: Array<ResumableFile>) => void): void;
/**
* Something went wrong during upload of a specific file, uploading is being retried.
**/
on(event: 'fileRetry', callback: (file: ResumableFile) => void): void;
/**
* An error occurred during upload of a specific file.
**/
on(event: 'fileError', callback: (file: ResumableFile, message: string) => void): void;
/**
* Upload has been started on the Resumable object.
**/
on(event: 'uploadStart', callback: () => void): void;
/**
* Uploading completed.
**/
on(event: 'complete', callback: () => void): void;
/**
* Uploading progress.
**/
on(event: 'progress', callback: () => void): void;
/**
* An error, including fileError, occurred.
**/
on(event: 'error', callback: (message: string, file: ResumableFile) => void): void;
/**
* Uploading was paused.
**/
on(event: 'pause', callback: () => void): void;
/**
* Triggers before the items are cancelled allowing to do any processing on uploading files.
**/
on(event: 'beforeCancel', callback: () => void): void;
/**
* Uploading was canceled.
**/
on(event: 'cancel', callback: () => void): void;
/**
* Started preparing file for upload
**/
on(event: 'chunkingStart', callback: (file: ResumableFile) => void): void;
/**
* Show progress in file preparation
**/
on(event: 'chunkingProgress', callback: (file: ResumableFile, ratio) => void): void;
/**
* File is ready for upload
**/
on(event: 'chunkingComplete', callback: (file: ResumableFile) => void): void;
/**
* Listen to all the events listed above with the same callback function.
**/
on(event: 'catchAll', callback: () => void);
}
export interface ResumableFile {
/**
* A back-reference to the parent Resumable object.
**/
resumableObj: Resumable;
/**
* The correlating HTML5 File object.
**/
file: File;
/**
* The name of the file.
**/
fileName: string;
/**
* The relative path to the file (defaults to file name if relative path doesn't exist)
**/
relativePath: string;
/**
* Size in bytes of the file.
**/
size: number;
/**
* A unique identifier assigned to this file object. This value is included in uploads to the server for reference, but can also be used in CSS classes etc when building your upload UI.
**/
uniqueIdentifier: string;
/**
* An array of ResumableChunk items. You shouldn't need to dig into these.
**/
chunks: Array<ResumableChunk>;
/**
* Returns a float between 0 and 1 indicating the current upload progress of the file. If relative is true, the value is returned relative to all files in the Resumable.js instance.
**/
progress: (relative: boolean) => number;
/**
* Abort uploading the file.
**/
abort: () => void;
/**
* Abort uploading the file and delete it from the list of files to upload.
**/
cancel: () => void;
/**
* Retry uploading the file.
**/
retry: () => void;
/**
* Rebuild the state of a ResumableFile object, including reassigning chunks and XMLHttpRequest instances.
**/
bootstrap: () => void;
/**
* Returns a boolean indicating whether file chunks is uploading.
**/
isUploading: () => boolean;
/**
* Returns a boolean indicating whether the file has completed uploading and received a server response.
**/
isComplete: () => boolean;
}
class ResumableChunk {}
}
export declare class ResumableModule {}

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +0,0 @@
# 上传release目录信息到nerv-file仓库
release:
- {src: release, dest: /upload/pkg, include: [".*(.tgz)$"]}
- {src: release/resources/templates, dest: /upload/templates}
register:
name: nervui-noeiaasvdisk
version: 1.0.0
components:
- type: nervui-noeiaasvdisk
resources:
- {type: template, relativePath: /nervui-noeiaasvdisk/deploy.json}

View File

@@ -1,31 +0,0 @@
<template>
<ns-application />
</template>
<script lang="ts" type="module">
import { defineComponent } from 'vue';
export default defineComponent({
name: 'App',
mounted() {
// this.setHead();
},
methods: {
setHead() {
/** stack和cloud平台分别设置标签页信息 */
try {
document.getElementsByTagName('title')[0].innerText = '云盘';
} catch (error) {
document.getElementsByTagName('title')[0].innerText = '云盘';
}
},
},
});
</script>
<style>
#app {
width: 100%;
height: 100%;
}
</style>

View File

@@ -1,50 +0,0 @@
/***
*配置接口 格式 module:Array<resource>
*/
export const apiModule = {
pension: [
'User',
'CurrentUser',
'Gaffer',
// 'Organizational',
// 'Device',
// 'Region',
// 'Owner',
// 'AllList',
// 'VisitorRecord',
// 'Room',
// 'Device',
// 'CommunityVisitor',
// 'AccessControlGroup',
// 'AccessControlLeft',
// 'AccessControlRight',
// 'AccessControlRightIdentity',
// 'Visitor',
// 'DeviceListByDeviceCategory',
// 'Perimeter',
// 'AccessControlRightVisitorIdentity',
// 'BedChoose',
// 'Gateway',
// 'FileUpload',
// 'User',
// 'CurrentUser',
// 'Organizational',
// 'Device',
// 'Region',
// 'Owner',
// 'AllList',
// 'VisitorRecord',
// 'Room',
// 'Device',
// 'CommunityVisitor',
// 'AccessControlGroup',
// 'AccessControlLeft',
// 'AccessControlRight',
// 'AccessControlRightIdentity',
// 'Visitor',
// 'DeviceListByDeviceCategory',
// 'BedChoose',
// 'Perimeter',
// 'OrganizationConfig',
],
};

View File

@@ -1,15 +0,0 @@
import { http } from '/nerv-lib/paas';
enum Api {
USER_LOGIN = '/api/passport/objs/login', //用户登录
USER_INFO = '/api/webui/webui/objs/PassportUserInfo', //获取用户信息
}
export const userLogin = (data: RoomListModel) => http.post(Api.USER_LOGIN, data);
export const userInfo = () => http.get(Api.USER_INFO);
/**
* @description 用户登录
* @property `[fatherRegionUuid]` 父级区域唯一标识
*/
interface RoomListModel {
data: string;
}

View File

@@ -1,6 +0,0 @@
/** @format */
export const appConfig = {
projectType: 'web',
timeout: 120 * 1000,
};

View File

@@ -1,2 +0,0 @@
import { appConfig } from '/@/config/app.config';
export { appConfig };

View File

@@ -1,17 +0,0 @@
import { createApp } from 'vue';
import App from '/@/App.vue';
import { paasInit } from '/nerv-lib/paas';
import { apiModule } from '/@/api';
import { appConfig } from '/@/config';
const modules = undefined;
const app = createApp(App);
paasInit({
app,
apiModule,
appConfig,
modules,
});
app.mount('#app');

View File

@@ -1,35 +0,0 @@
echo "=====================================================create====================================================="
#!/usr/bin/env bash
function create() {
if [ -d "$nervui_app_home" ];then
echo "$nervui_app_home exists!"
else
echo "start mkdir $nervui_app_home"
mkdir -p "$nervui_app_home"
fi
pkg_file_name=${pkg_url##*/}
pkg_file_path="$nervui_app_home$pkg_file_name"
echo "start download $pkg_url"
curl -L -o $pkg_file_path $pkg_url
echo "start install $pkg_file_path"
tar -xf $pkg_file_path -C $nervui_app_home
}
if [ "$pkg_url" == "" ]; then
echo {\"error\":\"pkg_url is empty\"}
exit 1
elif [ "$nervui_app_home" == "" ]; then
echo {\"error\":\"nervui_app_home is empty\"}
exit 1
else
create
fi

View File

@@ -1 +0,0 @@
echo "=====================================================delete====================================================="

View File

@@ -1 +0,0 @@
echo "=====================================================setup====================================================="

View File

@@ -1 +0,0 @@
echo "=====================================================start====================================================="

View File

@@ -1 +0,0 @@
echo "=====================================================stop====================================================="

View File

@@ -1,30 +0,0 @@
{
"name":"/nervui-noeiaasvdisk",
"operations": [
{
"name": "Create",
"type": "shell",
"implementor": "create.sh"
},
{
"name": "Delete",
"type": "shell",
"implementor": "delete.sh"
},
{
"name": "Setup",
"type": "shell",
"implementor": "setup.sh"
},
{
"name": "Start",
"type": "shell",
"implementor": "start.sh"
},
{
"name": "Stop",
"type": "shell",
"implementor": "stop.sh"
}
]
}

View File

@@ -1,64 +0,0 @@
{
"name": "/nervui-noeiaasvdisk",
"version": 1,
"inputs": [
{
"name": "server_ip",
"type": "string",
"required":true,
"description":"应用安装IP地址",
"inputType":"ipSelectType"
},
{
"name": "version",
"type": "string",
"required":true,
"description":"软件版本",
"inputType":"versionSelectType"
},
{
"name": "install_dir",
"type": "string",
"required": true,
"defaultValue": "/data",
"inputType": "textInputType",
"description": "安装目录"
}
],
"nodes": [
{
"name": "nervui-noeiaasvdisk",
"type": "/nerv/nerv-orchestrator/cluster/Nervui",
"parameters": [
{
"name": "file_repository",
"value": "${nerv_file_repository}"
},
{
"name": "install_dir",
"value": "${install_dir}"
},
{
"name": "pkg_url",
"value": "/api/pkg/nerv/nervui-noeiaasvdisk/${version}/nervui-noeiaasvdisk-${version}.tgz"
}
],
"dependencies": [
{
"type": "contained",
"target": "host"
}
]
},
{
"name": "host",
"type": "/nerv/nerv-orchestrator/compute/Host",
"parameters": [
{
"name": "address",
"value": "${server_ip}"
}
]
}
]
}

View File

@@ -1,11 +0,0 @@
/** @format */
const RootRoute = {
path: '/root',
name: 'root',
redirect: '/vdisk',
meta: {
title: 'Root',
},
};
export default RootRoute;

View File

@@ -1,139 +0,0 @@
import { NsViewContent, NsViewDetail, NsViewSideNav } from '/nerv-lib/paas';
const SideNav = () => Promise.resolve(NsViewSideNav);
const Base = () => Promise.resolve(NsViewContent);
const vdisk = {
path: '/vdisk',
name: 'vdisk',
component: SideNav,
redirect: { name: 'Noeflavors' },
meta: {
sideMenus: {
title: '云盘',
name: 'vdisk',
menus: [
{
name: 'Noeflavors',
label: '云盘规格',
url: '/vdisk/Noeflavors',
module: 'vm',
},
{
name: 'Noevolume',
label: '云盘',
url: '/vdisk/Noevolume/',
module: 'vm',
},
{
name: 'Noevolumesnapshot',
label: '云盘快照',
url: '/vdisk/Noevolumesnapshot',
module: 'vm',
},
{
name: 'Noebackup',
label: '云盘备份',
url: '/vdisk/Noebackup',
module: 'vm',
},
],
},
},
children: [
//云盘规格
{
path: 'Noeflavors',
name: 'NoeflavorsModule',
component: Base,
redirect: { name: 'Noeflavors' },
children: [
{
path: 'list',
name: 'Noeflavors',
// component: () => import('/@/view/noeflavors/list.vue'),
component: () => import('/@/view/component/NsList.vue'),
props: {
api: '/api/noe/forwarder/noevolumetypes',
title: '云盘规格',
},
},
],
},
//云盘
{
path: 'Noevolume',
name: 'NoevolumeModule',
component: Base,
redirect: { name: 'Noevolume' },
children: [
{
path: 'list',
name: 'Noevolume',
// component: () => import('/@/view/noevolume/list.vue'),
component: () => import('/@/view/component/NsList.vue'),
props: {
api: '/api/noe/forwarder/noevolumes',
title: '云盘',
actions: [
{
label: '云主机',
name: 'componentPreview',
openPermission: true,
dynamicDisabled: (record) => {
return !(record.status?.targets && record.status?.targets[0]?.instance_id);
},
handle: (record) => {
window.open(
`/nervui-noe/noe/Noeinstances/list?parentType=noevolumes&parentName=${
record.metadata?.name
}&childName=${encodeURIComponent('status.targets[].instance_id')}`,
);
},
},
],
},
},
],
},
//快照管理
{
path: 'Noevolumesnapshot',
name: 'NoevolumesnapshotModule',
component: Base,
redirect: { name: 'Noevolumesnapshot' },
children: [
//快照列表
{
path: 'list',
name: 'Noevolumesnapshot',
component: () => import('/@/view/component/NsList.vue'),
props: {
api: '/api/noe/forwarder/noevolumesnapshots',
title: '云盘快照',
},
// component: () => import('/@/view/noevolumesnapshot/list.vue'),
},
],
},
//备份管理
{
path: 'Noebackup',
name: 'NoebackupModule',
component: Base,
redirect: { name: 'Noebackup' },
children: [
//备份列表
{
path: 'list',
name: 'Noebackup',
component: () => import('/@/view/component/NsList.vue'),
props: {
api: '/api/noe/forwarder/noebackups',
title: '云盘备份',
},
// component: () => import('/@/view/noebackup/list.vue'),
},
],
},
],
};
export default vdisk;

View File

@@ -1 +0,0 @@

View File

@@ -1,2 +0,0 @@
@import "variable";
@import "global";

View File

@@ -1,10 +0,0 @@
// @layout-header-background:url(/asset/image/header_background.png) no-repeat;
// // @layout-sider-background:url(/asset/image/sider_background.png) no-repeat;
// @layout-nav-background:url(/asset/image/sider_background.png) no-repeat;
// @layout-header-color: #FFFFFF;
// @layout-header-link-color: #FFFFFF;
// @layout-nav-color: #FFFFFF;
// @layout-nav-check-color: #FFFFFF;
// @primary-color: #2C68FF; // 全局主色
// @link-color: #2C68FF; // 链接色
// @layout-nav-hover:linear-gradient(90deg, #2C68FF 0%, rgba(44, 104, 255, 0.4) 100%);

View File

@@ -1,215 +0,0 @@
<!-- @format -->
<template>
<ns-view-list-table v-bind="tableConfig" ref="nsTableRef" />
<drawerForm :drawerFormConfig="drawerFormConfig" />
<delModal ref="modalRef" :resourceId="resourceId" @handleOk="handleOk" />
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import drawerForm from '/@/view/component/drawerForm.vue';
import { dateUtil } from '/nerv-lib/util/date-util';
import { http } from '/nerv-lib/util/http';
import delModal from '/@/view/component/delModal.vue';
import { NsMessage } from '/nerv-lib/component/message';
import { useRouter } from 'vue-router';
export default defineComponent({
name: 'Noevolume',
components: { drawerForm, delModal },
props: {
api: {},
title: {},
actions: {
type: Array,
default: () => [],
},
},
setup(props) {
const resourceId = ref('');
const modalRef = ref();
const nsTableRef = ref();
const router = useRouter();
router.currentRoute.value.query.order = 'name desc';
// Object.keys(router.currentRoute.value.query).forEach((key) => {
// router.currentRoute.value.query[key] = encodeURIComponent(
// router.currentRoute.value.query[key],
// );
// });
const handleOk = () => {
http.delete(`${props.api}/${resourceId.value}`).then((res) => {
NsMessage.success('操作成功');
nsTableRef.value.nsTableRef?.reload();
});
};
const drawerFormConfig = ref({
visible: false,
width: '50%',
title: '详情',
placement: 'right',
schemas: '{}',
onClose: () => {
drawerFormConfig.value.visible = false;
},
onSubmit: () => {
let info;
try {
info = JSON.parse(drawerFormConfig.value.schemas);
drawerFormConfig.value.visible = false;
} catch (error) {
NsMessage.error('请输入正确的JSON');
}
if (info) {
if (drawerFormConfig.value.title === '编辑') {
http.put(`${props.api}/${info.metadata.name}`, info).then((res) => {
NsMessage.success('操作成功');
nsTableRef.value.nsTableRef?.reload();
});
} else {
http.post(props.api, info).then((res) => {
NsMessage.success('操作成功');
nsTableRef.value.nsTableRef?.reload();
});
}
}
},
});
const tableConfig = {
api: props.api,
title: props.title,
rowSelection: null,
scroll: { x: '100%' },
resultField: 'data',
params: router.currentRoute.value.query,
columns: [
{
title: 'ID',
textEllipsis: true,
width: '30%',
dataIndex: 'metadata',
customRender: (text: any) => {
return text.text?.name;
},
},
{
title: '名称',
textEllipsis: true,
width: '20%',
dataIndex: 'spec',
customRender: (text: any) => {
return text.text?.display_name;
},
},
{
title: '状态',
textEllipsis: true,
dataIndex: 'status',
width: '15%',
customRender: (text: any) => {
return text.text?.status;
},
},
{
title: '租户',
textEllipsis: true,
dataIndex: 'spec',
width: '15%',
customRender: (text: any) => {
return text.text?.tenant;
},
},
{
title: '创建时间',
dataIndex: 'metadata',
width: '20%',
customRender: (text: any) => {
return dateUtil(text.text?.creationTimestamp).format('YYYY-MM-DD HH:mm:ss');
},
},
],
columnActions: {
title: '操作',
with: 50,
fixed: 'right',
actions: [
{
label: '查看',
name: 'componentPreview',
openPermission: true,
handle: (record) => {
drawerFormConfig.value.title = '查看';
drawerFormConfig.value.readonly = true;
drawerFormConfig.value.visible = true;
drawerFormConfig.value.schemas = JSON.stringify(record);
},
},
{
label: '编辑',
name: 'componentPreview',
openPermission: true,
handle: (record) => {
drawerFormConfig.value.title = '编辑';
drawerFormConfig.value.visible = true;
drawerFormConfig.value.readonly = false;
drawerFormConfig.value.schemas = JSON.stringify(record);
},
},
{
label: '删除',
name: 'componentRemove',
openPermission: true,
handle: (record) => {
resourceId.value = record.metadata?.name;
modalRef.value.visible = true;
},
},
].concat(props.actions),
},
headerActions: [
{
label: '添加',
name: 'NoeflavorsAdd',
type: 'primary',
handle: () => {
drawerFormConfig.value.title = '添加';
drawerFormConfig.value.visible = true;
drawerFormConfig.value.schemas = '{}';
drawerFormConfig.value.readonly = false;
},
},
],
formConfig: {},
rowKey: 'index',
};
return {
resourceId,
nsTableRef,
modalRef,
handleOk,
drawerFormConfig,
tableConfig,
};
},
methods: {},
});
</script>
<style lang="less" scoped>
.status {
width: 100px;
display: flex;
align-items: center;
span {
height: 7px;
width: 7px;
border-radius: 50%;
margin-right: 5px;
}
p {
transform: translateY(6px);
}
}
</style>

View File

@@ -1,68 +0,0 @@
<template>
<ns-modal v-model:visible="visible" @ok="handleOk">
<template #title>
<div class="modal_title">警告</div>
</template>
<div class="modal_content">
<div style="display: flex">
<exclamationCircle-outlined style="color: #faad14; font-size: 20px; margin-right: 15px" />
<p>输入实例ID</p></div
>
<div style="display: flex"
><span style="width: 80px">实例ID</span><NsInput v-model:value="id"
/></div>
<div style="margin-top: 10px; margin-left: 20px; color: red">{{ errorMsg }}</div>
</div>
<template #footer>
<NsButton
key="back"
@click="
() => {
visible = false;
}
"
>取消</NsButton
>
<NsButton type="primary" :disabled="id ? false : true" @click="handleOk">确定</NsButton>
</template>
</ns-modal>
</template>
<script lang="ts">
import { defineComponent, ref, watch } from 'vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { NsMessage } from '/nerv-lib/component/message';
export default defineComponent({
components: { ExclamationCircleOutlined },
props: {
resourceId: {},
},
emits: ['handleOk'],
setup(props, context) {
const id = ref('');
const errorMsg = ref('');
const visible = ref(false);
watch(
() => visible.value,
() => {
id.value = '';
},
);
const handleOk = () => {
if (id.value === props.resourceId) {
context.emit('handleOk');
visible.value = false;
} else {
NsMessage.error('请输入正确的ID');
}
};
return {
errorMsg,
handleOk,
visible,
id,
};
},
});
</script>

View File

@@ -1,109 +0,0 @@
<template>
<a-drawer v-bind="drawerFormConfig" class="DrawerForm">
<template #footer v-if="!drawerFormConfig.readonly">
<ns-button
type="primary"
style="margin-right: 12px"
:disabled="!drawerFormConfig.schemas"
@click="drawerFormConfig.onSubmit"
>保存</ns-button
>
<ns-button @click="drawerFormConfig.onClose">取消</ns-button>
</template>
<div style="height: 100%; width: 100%">
<code-editor
v-if="drawerFormConfig.visible"
ref="editcodeform"
:readonly="drawerFormConfig.readonly"
v-model:value="drawerFormConfig.schemas"
v-model:id="editId"
@updateValue="drawerFormConfig.schemas = $event" />
</div>
</a-drawer>
</template>
<script lang="ts">
import { defineComponent, ref, provide } from 'vue';
import CodeEditor from './editor.vue';
export default defineComponent({
name: 'DrawerForm',
components: { CodeEditor },
props: {
drawerFormConfig: {
type: Object,
default: () => {
format: {
}
},
},
},
setup() {
const mainRef = ref();
return {
editId: 0,
mainRef,
};
},
});
</script>
<style lang="less" scoped>
:deep(.ant-form-item-label) {
text-align: left !important;
flex: 0 0 18% !important;
max-width: 18% !important;
}
</style>
<style lang="less">
.DrawerForm .ns-form.ns-vertical-form {
width: 100% !important;
// padding: 16px;
padding-top: 16px;
.ns-form-item {
padding: 0px 16px 0px 16px;
}
.formBox {
padding: 0px 16px 0px 16px;
border-bottom: 16px solid #e5ebf0;
.ns-form-item {
padding: 0px !important;
}
}
.formBoxEnd {
padding: 0px 16px 0px 16px;
padding-top: 16px;
.ns-form-item {
padding: 0px !important;
}
}
.ns-child-form-title {
padding: 0px 0px 16px 0px !important;
}
}
.DrawerForm {
.ant-drawer-body {
padding: 0px;
border: 16px solid #e5ebf0;
// background: #e5ebf0;
}
.ant-drawer-header-title {
.ant-drawer-title {
color: rgba(0, 0, 0, 0.95);
font-family: PingFang SC;
font-size: 16px;
font-style: normal;
font-weight: 500;
}
.ant-drawer-close {
position: absolute;
right: 0px;
}
}
.ant-col-16 {
max-width: 100% !important;
}
}
</style>

View File

@@ -1,144 +0,0 @@
<template>
<div ref="editorform" class="ace-editor"></div>
</template>
<script>
import { watch, onMounted, onBeforeUnmount, ref } from 'vue';
import ace from 'ace-builds';
// import 'ace-builds/webpack-resolver';
import 'ace-builds/src-noconflict/mode-yaml';
import 'ace-builds/src-noconflict/theme-chaos';
import 'ace-builds/src-noconflict/ext-language_tools';
import 'ace-builds/src-noconflict/ext-emmet';
import 'ace-builds/src-noconflict/snippets/yaml';
import 'ace-builds/src-noconflict/ext-beautify.js';
import 'ace-builds/src-noconflict/keybinding-vscode';
import 'ace-builds/src-noconflict/keybinding-emacs';
export default {
name: 'CodeEditor',
props: {
id: {
type: Number,
default: 0,
},
// 外部传入的内容,用于实现双向绑定
value: {
type: String,
default: '',
},
readonly: {
type: Boolean,
default: true,
},
// 外部传入的语法类型
language: {
type: String,
default: 'yaml',
},
// 编辑器主题色
theme: {
type: String,
default: 'chaos',
},
},
emits: ['updateValue', 'change'],
setup(props, { emit }) {
let editor = null;
const editorform = ref(null);
const clientHeight = document.documentElement.clientHeight;
console.log(parseInt(clientHeight / 20));
let options = {
theme: 'ace/theme/' + (props.theme ? props.theme : 'chaos'),
mode: 'ace/mode/' + (props.language ? props.language : 'yaml'),
tabSize: 2,
// maxLines: parseInt(clientHeight / 20) > 37 ? parseInt(clientHeight / 20) : 37,
minLines: 25,
showPrintMargin: false,
fontSize: 14,
// readOnly: false,
// readOnly: props.readonly ? props.readonly : false,
};
//切换语言
function initialize() {
if (editor) {
//实例销毁
editor.destroy();
}
//初始化
editor = ace.edit(editorform.value, options);
editor.getSession().setMode('ace/mode/json');
//代码提示和自动补全
editor.setOptions({
enableSnippets: true,
enableLiveAutocompletion: true,
enableBasicAutocompletion: true,
});
editor.setReadOnly(props.readonly);
editor.getSession().setUseWrapMode(true);
// 支持双向绑定
editor.on('change', () => {
if (emit) {
emit('updateValue', editor.getValue());
emit('change', editor.getValue());
}
});
//快捷键
editor.commands.addCommand({
name: 'formatter',
bindKey: { win: 'Ctrl-Shift-F', mac: 'Command-Shift-F' },
exec: () => emit('formatter', editor),
});
var formatJson = JSON.stringify(JSON.parse(props.value ? props.value : '{}'), null, 2);
editor.setValue(formatJson);
}
watch(
() => props.id,
() => {
initialize();
},
);
// watch(
// () => props.value,
// (newProps) => {
// //解决光标移动问题
// const position = editor.getCursorPosition();
// editor.getSession().setValue(newProps);
// editor.clearSelection();
// editor.moveCursorToPosition(position);
// initialize();
// },
// );
onMounted(() => {
initialize();
});
onBeforeUnmount(() => {
editor.destroy();
});
return {
editorform,
};
},
};
</script>
<style lang="less" scoped>
.ace-editor {
height: 100% !important;
min-height: 400px;
width: 100%;
min-width: 600px;
}
.ace-chaos .ace_meta.ace_tag {
color: #53a7e6 !important;
}
.ace-chaos .ace_string {
color: #c58854 !important;
}
.ace-chaos .ace_keyword {
color: #e0e0e0 !important;
}
.ace-chaos .ace_constant.ace_numeric {
color: #c5c454 !important;
}
</style>

View File

@@ -1,120 +0,0 @@
<!-- @format -->
<template>
<ns-view-list-table v-bind="tableConfig" />
<drawerForm :drawerFormConfig="drawerFormConfig" />
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import drawerForm from '/@/view/component/drawerForm.vue';
import { dateUtil } from '/nerv-lib/util/date-util';
export default defineComponent({
name: 'Noevolume',
components: { drawerForm },
setup() {
const drawerFormConfig = ref({
visible: false,
width: '50%',
title: '详情',
placement: 'right',
schemas: '{}',
// data: addFormData,
onClose: () => {
drawerFormConfig.value.visible = false;
},
onSubmit: () => {},
});
const tableConfig = {
api: '/api/noe/forwarder/noebackups',
title: '云盘备份',
rowSelection: null,
resultField: 'data',
scroll: { x: '100%' },
params: {
order: 'name desc',
},
columns: [
{
title: '实例ID',
textEllipsis: true,
width: '30%',
dataIndex: 'metadata',
customRender: (text: any) => {
return text.text?.name;
},
},
{
title: '实例名称',
textEllipsis: true,
width: '20%',
dataIndex: 'spec',
customRender: (text: any) => {
return text.text?.display_name;
},
},
{
title: '状态',
textEllipsis: true,
dataIndex: 'status',
width: '20%',
customRender: (text: any) => {
return text.text?.status;
},
},
{
title: '创建时间',
dataIndex: 'metadata',
width: '30%',
customRender: (text: any) => {
return dateUtil(text.text?.creationTimestamp).format('YYYY-MM-DD HH:mm:ss');
},
},
],
columnActions: {
title: '操作',
with: 50,
fixed: 'right',
actions: [
{
label: '查看',
name: 'componentPreview',
openPermission: true,
handle: (record) => {
drawerFormConfig.value.visible = true;
drawerFormConfig.value.schemas = JSON.stringify(record);
},
},
],
},
headerActions: [],
formConfig: {},
rowKey: 'index',
};
return {
drawerFormConfig,
tableConfig,
};
},
methods: {},
});
</script>
<style lang="less" scoped>
.status {
width: 100px;
display: flex;
align-items: center;
span {
height: 7px;
width: 7px;
border-radius: 50%;
margin-right: 5px;
}
p {
transform: translateY(6px);
}
}
</style>

View File

@@ -1,119 +0,0 @@
<!-- @format -->
<template>
<ns-view-list-table v-bind="tableConfig" />
<drawerForm :drawerFormConfig="drawerFormConfig" />
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import drawerForm from '/@/view/component/drawerForm.vue';
import { dateUtil } from '/nerv-lib/util/date-util';
export default defineComponent({
name: 'NoeflavorsList',
components: { drawerForm },
setup() {
const drawerFormConfig = ref({
visible: false,
width: '50%',
title: '详情',
placement: 'right',
schemas: '{}',
// data: addFormData,
onClose: () => {
drawerFormConfig.value.visible = false;
},
onSubmit: () => {},
});
const tableConfig = {
api: '/api/noe/forwarder/noeflavors',
title: '云盘规格',
rowSelection: null,
scroll: { x: '100%' },
resultField: 'data',
params: {
order: 'name desc',
},
columns: [
{
title: '实例ID',
textEllipsis: true,
width: '30%',
dataIndex: 'metadata',
customRender: (text: any) => {
return text.text?.name;
},
},
{
title: '实例名称',
textEllipsis: true,
width: '20%',
dataIndex: 'spec',
customRender: (text: any) => {
return text.text?.display_name;
},
},
{
title: '状态',
textEllipsis: true,
dataIndex: 'status',
width: '20%',
customRender: (text: any) => {
return text.text?.status;
},
},
{
title: '创建时间',
dataIndex: 'metadata',
width: '30%',
customRender: (text: any) => {
return dateUtil(text.text?.creationTimestamp).format('YYYY-MM-DD HH:mm:ss');
},
},
],
columnActions: {
title: '操作',
with: 50,
fixed: 'right',
actions: [
{
label: '查看',
name: 'componentPreview',
openPermission: true,
handle: (record) => {
drawerFormConfig.value.visible = true;
drawerFormConfig.value.schemas = JSON.stringify(record);
},
},
],
},
headerActions: [],
formConfig: {},
rowKey: 'index',
};
return {
drawerFormConfig,
tableConfig,
};
},
methods: {},
});
</script>
<style lang="less" scoped>
.status {
width: 100px;
display: flex;
align-items: center;
span {
height: 7px;
width: 7px;
border-radius: 50%;
margin-right: 5px;
}
p {
transform: translateY(6px);
}
}
</style>

View File

@@ -1,119 +0,0 @@
<!-- @format -->
<template>
<ns-view-list-table v-bind="tableConfig" />
<drawerForm :drawerFormConfig="drawerFormConfig" />
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import drawerForm from '/@/view/component/drawerForm.vue';
import { dateUtil } from '/nerv-lib/util/date-util';
export default defineComponent({
name: 'Noevolume',
components: { drawerForm },
setup() {
const drawerFormConfig = ref({
visible: false,
width: '50%',
title: '详情',
placement: 'right',
schemas: '{}',
// data: addFormData,
onClose: () => {
drawerFormConfig.value.visible = false;
},
onSubmit: () => {},
});
const tableConfig = {
api: '/api/noe/forwarder/noevolumes',
title: '云盘',
rowSelection: null,
resultField: 'data',
scroll: { x: '100%' },
params: {
order: 'name desc',
},
columns: [
{
title: '实例ID',
textEllipsis: true,
width: '30%',
dataIndex: 'metadata',
customRender: (text: any) => {
return text.text?.name;
},
},
{
title: '实例名称',
textEllipsis: true,
width: '20%',
dataIndex: 'spec',
customRender: (text: any) => {
return text.text?.display_name;
},
},
{
title: '状态',
textEllipsis: true,
dataIndex: 'status',
width: '20%',
customRender: (text: any) => {
return text.text?.status;
},
},
{
title: '创建时间',
dataIndex: 'metadata',
width: '30%',
customRender: (text: any) => {
return dateUtil(text.text?.creationTimestamp).format('YYYY-MM-DD HH:mm:ss');
},
},
],
columnActions: {
title: '操作',
with: 50,
fixed: 'right',
actions: [
{
label: '查看',
name: 'componentPreview',
openPermission: true,
handle: (record) => {
drawerFormConfig.value.visible = true;
drawerFormConfig.value.schemas = JSON.stringify(record);
},
},
],
},
headerActions: [],
formConfig: {},
rowKey: 'index',
};
return {
drawerFormConfig,
tableConfig,
};
},
methods: {},
});
</script>
<style lang="less" scoped>
.status {
width: 100px;
display: flex;
align-items: center;
span {
height: 7px;
width: 7px;
border-radius: 50%;
margin-right: 5px;
}
p {
transform: translateY(6px);
}
}
</style>

View File

@@ -1,119 +0,0 @@
<!-- @format -->
<template>
<ns-view-list-table v-bind="tableConfig" />
<drawerForm :drawerFormConfig="drawerFormConfig" />
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import drawerForm from '/@/view/component/drawerForm.vue';
import { dateUtil } from '/nerv-lib/util/date-util';
export default defineComponent({
name: 'Noevolume',
components: { drawerForm },
setup() {
const drawerFormConfig = ref({
visible: false,
width: '50%',
title: '详情',
placement: 'right',
schemas: '{}',
// data: addFormData,
onClose: () => {
drawerFormConfig.value.visible = false;
},
onSubmit: () => {},
});
const tableConfig = {
api: '/api/noe/forwarder/noevolumesnapshots',
title: '云盘快照',
rowSelection: null,
scroll: { x: '100%' },
resultField: 'data',
params: {
order: 'name desc',
},
columns: [
{
title: '实例ID',
textEllipsis: true,
width: '30%',
dataIndex: 'metadata',
customRender: (text: any) => {
return text.text?.name;
},
},
{
title: '实例名称',
textEllipsis: true,
width: '20%',
dataIndex: 'spec',
customRender: (text: any) => {
return text.text?.display_name;
},
},
{
title: '状态',
textEllipsis: true,
dataIndex: 'status',
width: '20%',
customRender: (text: any) => {
return text.text?.status;
},
},
{
title: '创建时间',
dataIndex: 'metadata',
width: '30%',
customRender: (text: any) => {
return dateUtil(text.text?.creationTimestamp).format('YYYY-MM-DD HH:mm:ss');
},
},
],
columnActions: {
title: '操作',
with: 50,
fixed: 'right',
actions: [
{
label: '查看',
name: 'componentPreview',
openPermission: true,
handle: (record) => {
drawerFormConfig.value.visible = true;
drawerFormConfig.value.schemas = JSON.stringify(record);
},
},
],
},
headerActions: [],
formConfig: {},
rowKey: 'index',
};
return {
drawerFormConfig,
tableConfig,
};
},
methods: {},
});
</script>
<style lang="less" scoped>
.status {
width: 100px;
display: flex;
align-items: center;
span {
height: 7px;
width: 7px;
border-radius: 50%;
margin-right: 5px;
}
p {
transform: translateY(6px);
}
}
</style>

View File

@@ -1,48 +0,0 @@
{
"compilerOptions": {
"allowJs": true,
"baseUrl": "./",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "preserve",
"lib": ["esnext", "dom"],
"module": "esnext",
"moduleResolution": "node",
"noUnusedLocals": true,
"noUnusedParameters": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"strictFunctionTypes": false,
"target": "esnext",
"types": ["vite/client"],
"typeRoots": [
"../node_modules/@types",
"../node_modules/@vue",
"../type"
],
"paths": {
"/@/*": [
"src/*"
],
"/nerv-lib/*": [
"../lib/*"
],
"/nerv-base/*": [
"../lib/paas/*"
]
}
},
"include": [
"src/**/*",
"type/**/*",
"mock/**/*",
"vite.config.ts"
, "public/resumable.d.ts", "public/resumable.js" ],
"exclude": [
"node_modules",
"dist",
"**/*.js"
]
}

View File

@@ -1,17 +0,0 @@
/** @format */
import configFun from '../build/vite-default.config';
const dirname = __dirname;
const proxy = {
'/assets/fonts': {
target: 'http://portal.devops.wh.dingcloud.com:30080/assets/fonts',
changeOrigin: true,
rewrite: (path: any) => path.replace(/^\/assets\/fonts/, ''),
},
'/api': {
target: 'http://portal.op.sh.dingcloud.com:30080',
changeOrigin: true,
},
};
export default configFun({ dirname, serviceMode: 'paas', baseDir: '../', proxy });

View File

@@ -1,8 +0,0 @@
# port
VITE_PORT = 5058
# spa-title
VITE_GLOB_APP_TITLE = nervui-noeiaasvdisk
# spa shortname
VITE_GLOB_APP_SHORT_NAME = nervui-noeiaasvdisk

View File

@@ -1,20 +0,0 @@
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /nervui-noenetwork/
# Cross-domain proxy, you can configure multiple
# Please note that no line breaks
# Delete console
VITE_DROP_CONSOLE = false
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
# File upload address optional
VITE_GLOB_UPLOAD_URL=/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=

View File

@@ -1,35 +0,0 @@
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /nervui-noenetwork/
# Delete console
VITE_DROP_CONSOLE = true
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# Whether to delete origin files when using compress, default false
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
# Basic interface address SPA
VITE_GLOB_API_URL=/app-develop
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL=/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
# Whether to enable image compression
VITE_USE_IMAGEMIN= true
# use pwa
VITE_USE_PWA = false
# Is it compatible with older browsers
VITE_LEGACY = false

View File

@@ -1 +0,0 @@
1.0.0

View File

@@ -1,74 +0,0 @@
#!/bin/bash
SOURCE="$0"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
if [ -z $WORKSPACE ];then
echo "WORKSPACE not exists"
else
set DIR=$WORKSPACE
fi
echo "current dir"
echo "$DIR"
cd "$DIR"
projectname=$(basename `pwd`)
npm run noeIaasvdisk-build
if [ -d "$DIR/dist" ];then
cd "$DIR/dist"
# copy module.json
cp ../module.json ./
# package
VERSION=$(cat ../.version)
lastdir=../release/
if [ -d ${lastdir} ];then
echo "删除旧release文件夹"
rm -rf ${lastdir}
else
echo "文件夹不存在!"
fi
mkdir -p ${lastdir}
dir=../release/nerv/$projectname/$VERSION
mkdir -p ${dir}
tar -zcvf "${dir}/$projectname-$VERSION.tgz" ./*
templatedir=../release/resources/templates/nerv/$projectname/$VERSION/$projectname
mkdir -p ${templatedir}
cp -r ../resources/templates/* ${templatedir}
cd ../
releasefile=nerv-$projectname-$VERSION.tgz
if [ -f ${releasefile} ];then
echo "删除旧包!"
rm -rf ${releasefile}
fi
tar -zcvf ${releasefile} ./release/* release.yaml
mkdir -p ./release/nervui
cp -r ./release/nerv/* ./release/nervui
if [ -f ${releasefile} ];then
echo "编译成功!"
mv ${releasefile} ./release
else
echo "编译失败!!!"
exit 1
fi
else
echo "编译失败!!!"
exit 1
fi

View File

@@ -1,13 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon-stack.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>云网络</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="./src/main.ts"></script>
</body>
</html>

View File

@@ -1,64 +0,0 @@
[
{
"catalog": "网络",
"icon": "&#xe6f9;",
"name": "network",
"label": "云网络",
"menus": [
{
"name": "Noenetwork",
"url": "/network/Noenetwork",
"label": "网络",
"operation": {
"resource": "Noenetwork",
"method": "list"
}
},
{
"name": "Noesubnet",
"url": "/network/Noesubnet",
"label": "子网",
"operation": {
"resource": "Noesubnet",
"method": "list"
}
},{
"name":"Noesecuritygroup",
"url": "/network/Noesecuritygroup",
"label": "安全组",
"operation": {
"resource": "Noesecuritygroup",
"method": "list"
}
},
{
"name":"Noeacl",
"url": "/network/Noeacl",
"label": "Acl",
"operation": {
"resource": "Noeacl",
"method": "list"
}
},
{
"name":"Noefloatingip",
"url": "/network/Noefloatingip",
"label": "浮动IP",
"operation": {
"resource": "Noefloatingip",
"method": "list"
}
},
{
"name":"Noeport",
"url": "/network/Noeport",
"label": "Port",
"operation": {
"resource": "Noeport",
"method": "list"
}
}
]
}
]

View File

@@ -1,11 +0,0 @@
{
"release": [
{
"src": "nervui-noenetwork/release",
"dest": "/upload/pkg",
"include": [
"nervui-noenetwork-(\\d+).(\\d+).(\\d+)(|-\\w+).tar.gz"
]
}
]
}

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env bash
SOURCE="$0"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
cd "$DIR" || exit
VERSION=$(cat "$(pwd)"/.version)
sed "s|\${VERSION}|${VERSION}|g" "$(pwd)"/offline.tpl.yaml > "$(pwd)"/offline.yaml || exit 1
releaseDir="./release/nervui/nerv/nervui-noenetwork-offline"
rm -rf $releaseDir
version="${VERSION}-$(cat "$(pwd)"/offline.version)"
set -x
docker run --rm -i \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$(pwd)"/offline.yaml:/app/build.yaml \
-v "$(pwd)/$releaseDir":/app/output \
-e name=nervui-noenetwork \
-e version="$version" \
--pull=always \
registry.nervhub.nervstack.io/nerv3/deploy:latest
rm -rf $releaseDir/output

View File

@@ -1,5 +0,0 @@
images:
helm:
- name: nervui-noenetwork
version: "${VERSION}"
repository: "https://registry.nervhub.nervstack.io/chartrepo/nerv3-ui"

View File

@@ -1 +0,0 @@
alpha1

View File

@@ -1,113 +0,0 @@
{
"name": "NeUINoeNetwork",
"version": "1.0.37",
"files": [
"dist"
],
"main": "./dist/nerv-lib.es.js",
"scripts": {
"start": "npm run dev",
"noeNetwork": "vite serve ./nervui-noenetwork --config ./nervui-noenetwork/vite.config.ts",
"noeNetwork-build": "cross-env NODE_ENV=production vite build ./nervui-noenetwork --config ./nervui-noenetwork/vite.config.ts",
"dev": "vite",
"lint:eslint-fix": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
"build": "cross-env NODE_ENV=production vite build ",
"serve": "vite preview",
"publish_czwh": "npm publish --registry http://100.86.17.206:31873/ --access public"
},
"dependencies": {
"@ant-design/icons-vue": "^6.1.0",
"@antv/layout": "0.3.10",
"@antv/x6": "^1.28.1",
"@antv/x6-vue-shape": "^1.2.10",
"@novnc/novnc": "^1.3.0",
"@vueuse/core": "^8.4.2",
"ant-design-vue": "^3.2.3",
"async-validator": "^4.1.1",
"axios": "^0.27.2",
"clamp": "^1.0.1",
"dayjs": "^1.11.2",
"echarts": "^5.3.2",
"echarts-gl": "^2.0.9",
"element-resize-detector": "^1.2.4",
"exceljs": "^4.3.0",
"file-saver": "^2.0.5",
"flv.js": "^1.6.2",
"html2canvas": "^1.4.1",
"i": "^0.3.7",
"js-cookie": "^3.0.1",
"json5": "^2.2.1",
"jspdf": "^2.5.1",
"jszip": "^3.9.1",
"less-vars-to-js": "^1.3.0",
"lodash-es": "^4.17.21",
"loglevel": "^1.8.0",
"loglevel-plugin-prefix": "^0.8.4",
"luckyexcel": "^1.0.1",
"md-editor-v3": "^2.2.1",
"mitt": "^3.0.0",
"moment": "^2.29.3",
"monaco-editor": "^0.33.0",
"monaco-editor-webpack-plugin": "^7.0.1",
"path-to-regexp": "^6.2.1",
"pinia": "^2.0.14",
"qrcode.vue": "^3.3.3",
"shifty": "^2.19.0",
"sortablejs": "^1.15.0",
"vant": "^3.6.3",
"vite-plugin-monaco-editor-nls": "^2.0.2",
"vue": "^3.2.33",
"vue-animate-number": "^0.4.2",
"vue-cookies": "^1.8.1",
"vue-cropper": "^0.5.8",
"vue-grid-layout": "^3.0.0-beta1",
"vue-json-viewer": "^3.0.2",
"vue-router": "^4.0.15",
"vue-ueditor-wrap": "^3.0.8",
"vue3-marquee": "^3.0.3",
"vuedraggable": "^4.1.0",
"wangeditor": "^4.7.15",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@types/js-cookie": "^3.0.2",
"@types/lodash-es": "^4.17.6",
"@types/node": "^17.0.35",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^5.23.0",
"@vitejs/plugin-legacy": "^1.8.2",
"@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue-jsx": "^1.3.10",
"@vue/compiler-sfc": "^3.2.33",
"@web-types/vue": "^3.0.0-1",
"cross-env": "^7.0.3",
"eslint": "^8.15.0",
"eslint-config-prettier": "^8.5.0",
"eslint-define-config": "^1.4.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.7.1",
"esno": "^0.15.0",
"less": "^4.1.2",
"postcss": "^8.4.13",
"postcss-less": "^6.0.0",
"prettier": "^2.6.2",
"sass": "^1.51.0",
"stylelint": "^14.8.2",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^25.0.0",
"stylelint-order": "^5.0.0",
"stylelint-prettier": "^2.0.0",
"stylelint-scss": "^4.2.0",
"tinycolor2": "^1.4.2",
"typescript": "^4.6.4",
"unplugin-vue-components": "^0.19.9",
"vite": "^2.9.9",
"vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-theme": "^0.8.6",
"vue-eslint-parser": "^9.0.1",
"vue-tsc": "^0.34.13",
"vue3-print-nb": "^0.1.4"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,378 +0,0 @@
/** @format */
// Type definitions for Resumable.js
// Project: https://github.com/23/resumable.js
// Definitions by: Bazyli Brzóska <https://invent.life/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export declare namespace Resumable {
export interface ConfigurationHash {
/**
* The target URL for the multipart POST request. This can be a string or a function that allows you you to construct and return a value, based on supplied params. (Default: /)
**/
target?: string;
/**
* The size in bytes of each uploaded chunk of data. The last uploaded chunk will be at least this size and up to two the size, see Issue #51 for details and reasons. (Default: 1*1024*1024)
**/
chunkSize?: number;
/**
* Force all chunks to be less or equal than chunkSize. Otherwise, the last chunk will be greater than or equal to chunkSize. (Default: false)
**/
forceChunkSize?: boolean;
/**
* Number of simultaneous uploads (Default: 3)
**/
simultaneousUploads?: number;
/**
* The name of the multipart POST parameter to use for the file chunk (Default: file)
**/
fileParameterName?: string;
/**
* The name of the chunk index (base-1) in the current upload POST parameter to use for the file chunk (Default: resumableChunkNumber)
*/
chunkNumberParameterName?: string;
/**
* The name of the total number of chunks POST parameter to use for the file chunk (Default: resumableTotalChunks)
*/
totalChunksParameterName?: string;
/**
* The name of the general chunk size POST parameter to use for the file chunk (Default: resumableChunkSize)
*/
chunkSizeParameterName?: string;
/**
* The name of the total file size number POST parameter to use for the file chunk (Default: resumableTotalSize)
*/
totalSizeParameterName?: string;
/**
* The name of the unique identifier POST parameter to use for the file chunk (Default: resumableIdentifier)
*/
identifierParameterName?: string;
/**
* The name of the original file name POST parameter to use for the file chunk (Default: resumableFilename)
*/
fileNameParameterName?: string;
/**
* The name of the file's relative path POST parameter to use for the file chunk (Default: resumableRelativePath)
*/
relativePathParameterName?: string;
/**
* The name of the current chunk size POST parameter to use for the file chunk (Default: resumableCurrentChunkSize)
*/
currentChunkSizeParameterName?: string;
/**
* The name of the file type POST parameter to use for the file chunk (Default: resumableType)
*/
typeParameterName?: string;
/**
* Extra parameters to include in the multipart POST with data. This can be an object or a function. If a function, it will be passed a ResumableFile and a ResumableChunk object (Default: {})
**/
query?: Object;
/**
* Method for chunk test request. (Default: 'GET')
**/
testMethod?: 'GET' | 'POST' | 'OPTIONS' | 'PUT' | 'DELETE';
/**
* Method for chunk upload request. (Default: 'POST')
**/
uploadMethod?: 'GET' | 'POST' | 'OPTIONS' | 'PUT' | 'DELETE';
/**
* Extra prefix added before the name of each parameter included in the multipart POST or in the test GET. (Default: '')
**/
parameterNamespace?: string;
/**
* Extra headers to include in the multipart POST with data. This can be an object or a function that allows you to construct and return a value, based on supplied file (Default: {})
**/
headers?: Object | ((file) => Object);
/**
* Method to use when POSTing chunks to the server (multipart or octet) (Default: multipart)
**/
method?: 'multipart' | 'octet';
/**
* Prioritize first and last chunks of all files. This can be handy if you can determine if a file is valid for your service from only the first or last chunk. For example, photo or video meta data is usually located in the first part of a file, making it easy to test support from only the first chunk. (Default: false)
**/
prioritizeFirstAndLastChunk?: boolean;
/**
* Make a GET request to the server for each chunks to see if it already exists. If implemented on the server-side, this will allow for upload resumes even after a browser crash or even a computer restart. (Default: true)
**/
testChunks?: boolean;
/**
* Optional function to process each chunk before testing & sending. Function is passed the chunk as parameter, and should call the preprocessFinished method on the chunk when finished. (Default: null)
**/
preprocess?: (chunk: ResumableChunk) => ResumableChunk;
/**
* Optional function to process each file before testing & sending the corresponding chunks. Function is passed the file as parameter, and should call the preprocessFinished method on the file when finished. (Default: null)
**/
preprocessFile?: (file: ResumableFile) => ResumableFile;
/**
* Override the function that generates unique identifiers for each file. (Default: null)
**/
generateUniqueIdentifier?: (file: File, event: Event) => Promise<string> | string;
/**
* Indicates how many files can be uploaded in a single session. Valid values are any positive integer and undefined for no limit. (Default: undefined)
**/
maxFiles?: number;
/**
* A function which displays the please upload n file(s) at a time message. (Default: displays an alert box with the message Please n one file(s) at a time.)
**/
maxFilesErrorCallback?: (files, errorCount) => void;
/**
* The minimum allowed file size. (Default: undefined)
**/
minFileSize?: number;
/**
* A function which displays an error a selected file is smaller than allowed. (Default: displays an alert for every bad file.)
**/
minFileSizeErrorCallback?: (file, errorCount) => void;
/**
* The maximum allowed file size. (Default: undefined)
**/
maxFileSize?: number;
/**
* A function which displays an error a selected file is larger than allowed. (Default: displays an alert for every bad file.)
**/
maxFileSizeErrorCallback?: (file, errorCount) => void;
/**
* The file types allowed to upload. An empty array allow any file type. (Default: [])
**/
fileType?: Array<string>;
/**
* A function which displays an error a selected file has type not allowed. (Default: displays an alert for every bad file.)
**/
fileTypeErrorCallback?: (file, errorCount) => void;
/**
* The maximum number of retries for a chunk before the upload is failed. Valid values are any positive integer and undefined for no limit. (Default: undefined)
**/
maxChunkRetries?: number;
/**
* The number of milliseconds to wait before retrying a chunk on a non-permanent error. Valid values are any positive integer and undefined for immediate retry. (Default: undefined)
**/
chunkRetryInterval?: number;
/**
* Standard CORS requests do not send or set any cookies by default. In order to include cookies as part of the request, you need to set the withCredentials property to true. (Default: false)
**/
withCredentials?: boolean;
/**
* setChunkTypeFromFile` Set chunk content-type from original file.type. (Default: false, if false default Content-Type: application/octet-stream)
**/
setChunkTypeFromFile?: boolean;
/**
* The class name to add on drag over an assigned drop zone. (Default: dragover)
**/
dragOverClass?: string;
}
export class Resumable {
constructor(options: ConfigurationHash);
/**
* A boolean value indicator whether or not Resumable.js is supported by the current browser.
**/
support: boolean;
/**
* A hash object of the configuration of the Resumable.js instance.
**/
opts: ConfigurationHash;
/**
* An array of ResumableFile file objects added by the user (see full docs for this object type below).
**/
files: Array<ResumableFile>;
events: Array<any>;
version: number;
/**
* Assign a browse action to one or more DOM nodes. Pass in true to allow directories to be selected (Chrome only).
**/
assignBrowse(domNode: Element, isDirectory: boolean): void;
assignBrowse(domNodes: Array<Element>, isDirectory: boolean): void;
/**
* Assign one or more DOM nodes as a drop target.
**/
assignDrop(domNode: Element): void;
assignDrop(domNodes: Array<Element>): void;
unAssignDrop(domNode: Element): void;
unAssignDrop(domNodes: Array<Element>): void;
/**
* Start or resume uploading.
**/
upload(): void;
uploadNextChunk(): void;
/**
* Pause uploading.
**/
pause(): void;
/**
* Cancel upload of all ResumableFile objects and remove them from the list.
**/
cancel(): void;
fire(): void;
/**
* Returns a float between 0 and 1 indicating the current upload progress of all files.
**/
progress(): number;
/**
* Returns a boolean indicating whether or not the instance is currently uploading anything.
**/
isUploading(): boolean;
/**
* Add a HTML5 File object to the list of files.
**/
addFile(file: File): void;
/**
* Add an Array of HTML5 File objects to the list of files.
**/
addFiles(files: Array<File>): void;
/**
* Cancel upload of a specific ResumableFile object on the list from the list.
**/
removeFile(file: ResumableFile): void;
/**
* Look up a ResumableFile object by its unique identifier.
**/
getFromUniqueIdentifier(uniqueIdentifier: string): void;
/**
* Returns the total size of the upload in bytes.
**/
getSize(): number;
getOpt(o: string): any;
// Events
/**
* Listen for event from Resumable.js (see below)
**/
on(event: string, callback: Function): void;
/**
* A specific file was completed.
**/
on(event: 'fileSuccess', callback: (file: ResumableFile) => void);
void;
/**
* Uploading progressed for a specific file.
**/
on(event: 'fileProgress', callback: (file: ResumableFile) => void): void;
/**
* A new file was added. Optionally, you can use the browser event object from when the file was added.
**/
on(event: 'fileAdded', callback: (file: ResumableFile, event: DragEvent) => void): void;
/**
* New files were added.
**/
on(event: 'filesAdded', callback: (files: Array<ResumableFile>) => void): void;
/**
* Something went wrong during upload of a specific file, uploading is being retried.
**/
on(event: 'fileRetry', callback: (file: ResumableFile) => void): void;
/**
* An error occurred during upload of a specific file.
**/
on(event: 'fileError', callback: (file: ResumableFile, message: string) => void): void;
/**
* Upload has been started on the Resumable object.
**/
on(event: 'uploadStart', callback: () => void): void;
/**
* Uploading completed.
**/
on(event: 'complete', callback: () => void): void;
/**
* Uploading progress.
**/
on(event: 'progress', callback: () => void): void;
/**
* An error, including fileError, occurred.
**/
on(event: 'error', callback: (message: string, file: ResumableFile) => void): void;
/**
* Uploading was paused.
**/
on(event: 'pause', callback: () => void): void;
/**
* Triggers before the items are cancelled allowing to do any processing on uploading files.
**/
on(event: 'beforeCancel', callback: () => void): void;
/**
* Uploading was canceled.
**/
on(event: 'cancel', callback: () => void): void;
/**
* Started preparing file for upload
**/
on(event: 'chunkingStart', callback: (file: ResumableFile) => void): void;
/**
* Show progress in file preparation
**/
on(event: 'chunkingProgress', callback: (file: ResumableFile, ratio) => void): void;
/**
* File is ready for upload
**/
on(event: 'chunkingComplete', callback: (file: ResumableFile) => void): void;
/**
* Listen to all the events listed above with the same callback function.
**/
on(event: 'catchAll', callback: () => void);
}
export interface ResumableFile {
/**
* A back-reference to the parent Resumable object.
**/
resumableObj: Resumable;
/**
* The correlating HTML5 File object.
**/
file: File;
/**
* The name of the file.
**/
fileName: string;
/**
* The relative path to the file (defaults to file name if relative path doesn't exist)
**/
relativePath: string;
/**
* Size in bytes of the file.
**/
size: number;
/**
* A unique identifier assigned to this file object. This value is included in uploads to the server for reference, but can also be used in CSS classes etc when building your upload UI.
**/
uniqueIdentifier: string;
/**
* An array of ResumableChunk items. You shouldn't need to dig into these.
**/
chunks: Array<ResumableChunk>;
/**
* Returns a float between 0 and 1 indicating the current upload progress of the file. If relative is true, the value is returned relative to all files in the Resumable.js instance.
**/
progress: (relative: boolean) => number;
/**
* Abort uploading the file.
**/
abort: () => void;
/**
* Abort uploading the file and delete it from the list of files to upload.
**/
cancel: () => void;
/**
* Retry uploading the file.
**/
retry: () => void;
/**
* Rebuild the state of a ResumableFile object, including reassigning chunks and XMLHttpRequest instances.
**/
bootstrap: () => void;
/**
* Returns a boolean indicating whether file chunks is uploading.
**/
isUploading: () => boolean;
/**
* Returns a boolean indicating whether the file has completed uploading and received a server response.
**/
isComplete: () => boolean;
}
class ResumableChunk {}
}
export declare class ResumableModule {}

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +0,0 @@
# 上传release目录信息到nerv-file仓库
release:
- {src: release, dest: /upload/pkg, include: [".*(.tgz)$"]}
- {src: release/resources/templates, dest: /upload/templates}
register:
name: nervui-noenetwork
version: 1.0.0
components:
- type: nervui-noenetwork
resources:
- {type: template, relativePath: /nervui-noenetwork/deploy.json}

View File

@@ -1,31 +0,0 @@
<template>
<ns-application />
</template>
<script lang="ts" type="module">
import { defineComponent } from 'vue';
export default defineComponent({
name: 'App',
mounted() {
// this.setHead();
},
methods: {
setHead() {
/** stack和cloud平台分别设置标签页信息 */
try {
document.getElementsByTagName('title')[0].innerText = '云盘';
} catch (error) {
document.getElementsByTagName('title')[0].innerText = '云盘';
}
},
},
});
</script>
<style>
#app {
width: 100%;
height: 100%;
}
</style>

View File

@@ -1,8 +0,0 @@
const acl = {
LIST: `/api/noe/forwarder/noeacls`,
ADD: `/api/noe/noe/objs/ACL`,
EDIT: `/api/noe/noe/objs/Network`,
REMOVE: `/api/noe/noe/objs/ACL`,
DETAIL: `/api/noe/noe/objs/ACL`,
};
export default acl;

View File

@@ -1,50 +0,0 @@
/***
*配置接口 格式 module:Array<resource>
*/
export const apiModule = {
pension: [
'User',
'CurrentUser',
'Gaffer',
// 'Organizational',
// 'Device',
// 'Region',
// 'Owner',
// 'AllList',
// 'VisitorRecord',
// 'Room',
// 'Device',
// 'CommunityVisitor',
// 'AccessControlGroup',
// 'AccessControlLeft',
// 'AccessControlRight',
// 'AccessControlRightIdentity',
// 'Visitor',
// 'DeviceListByDeviceCategory',
// 'Perimeter',
// 'AccessControlRightVisitorIdentity',
// 'BedChoose',
// 'Gateway',
// 'FileUpload',
// 'User',
// 'CurrentUser',
// 'Organizational',
// 'Device',
// 'Region',
// 'Owner',
// 'AllList',
// 'VisitorRecord',
// 'Room',
// 'Device',
// 'CommunityVisitor',
// 'AccessControlGroup',
// 'AccessControlLeft',
// 'AccessControlRight',
// 'AccessControlRightIdentity',
// 'Visitor',
// 'DeviceListByDeviceCategory',
// 'BedChoose',
// 'Perimeter',
// 'OrganizationConfig',
],
};

View File

@@ -1,8 +0,0 @@
const network = {
LIST: `/api/noe/forwarder/noenetworks`,
ADD: `/api/noe/objs/Network`,
EDIT: `/api/noe/noe/objs/Network`,
REMOVE: `/api/noe/noe/objs/Network`,
DETAIL: `/api/noe/noe/objs/Network`,
};
export default network;

View File

@@ -1,9 +0,0 @@
const noefloatingip = {
LIST: `/api/noe/forwarder/noefloatingips`,
ADD: `/api/noe/objs/FloatingIP`,
EDIT: `/api/noe/objs/FloatingIP`,
REMOVE: `/api/noe/objs/FloatingIP`,
DETAIL: `/api/noe/objs/FloatingIP`,
AZ: `/api/noe/noe/objs/AZ`,
};
export default noefloatingip;

View File

@@ -1,4 +0,0 @@
const noeport = {
DETAIL: `/api/noe/noe/objs/Port`,
};
export default noeport;

View File

@@ -1,8 +0,0 @@
const noesecuritygroup = {
LIST: `/api/noe/forwarder/noesecuritygroups`,
ADD: `/api/noe/objs/SecurityGroup`,
EDIT: `/api/noe/noe/objs/SecurityGroup`,
REMOVE: `/api/noe/noe/objs/SecurityGroup`,
DETAIL: `/api/noe/noe/objs/SecurityGroup`,
};
export default noesecuritygroup;

View File

@@ -1,8 +0,0 @@
const noesubnet = {
LIST: `/api/noe/forwarder/noesubnets`,
ADD: `/api/noe/objs/Subnet`,
EDIT: `/api/noe/noe/objs/Network`,
REMOVE: `/api/objs/objs/SecurityGroup `,
DETAIL: `/api/noe/noe/objs/Subnet`,
};
export default noesubnet;

View File

@@ -1,15 +0,0 @@
import { http } from '/nerv-lib/paas';
enum Api {
USER_LOGIN = '/api/passport/objs/login', //用户登录
USER_INFO = '/api/webui/webui/objs/PassportUserInfo', //获取用户信息
}
export const userLogin = (data: RoomListModel) => http.post(Api.USER_LOGIN, data);
export const userInfo = () => http.get(Api.USER_INFO);
/**
* @description 用户登录
* @property `[fatherRegionUuid]` 父级区域唯一标识
*/
interface RoomListModel {
data: string;
}

View File

@@ -1,6 +0,0 @@
/** @format */
export const appConfig = {
projectType: 'web',
timeout: 120 * 1000,
};

View File

@@ -1,2 +0,0 @@
import { appConfig } from '/@/config/app.config';
export { appConfig };

View File

@@ -1,19 +0,0 @@
import { createApp } from 'vue';
import App from '/@/App.vue';
import { paasInit } from '/nerv-lib/paas';
import { apiModule } from '/@/api';
import { appConfig } from '/@/config';
import customRadio from '/@/view/component/customRadio.vue';
import customIp from '/@/view/component/customIp.vue';
const modules = undefined;
const app = createApp(App);
app.component('CustomRadio', customRadio);
app.component('CustomIp', customIp);
paasInit({
app,
apiModule,
appConfig,
modules,
});
app.mount('#app');

View File

@@ -1,35 +0,0 @@
echo "=====================================================create====================================================="
#!/usr/bin/env bash
function create() {
if [ -d "$nervui_app_home" ];then
echo "$nervui_app_home exists!"
else
echo "start mkdir $nervui_app_home"
mkdir -p "$nervui_app_home"
fi
pkg_file_name=${pkg_url##*/}
pkg_file_path="$nervui_app_home$pkg_file_name"
echo "start download $pkg_url"
curl -L -o $pkg_file_path $pkg_url
echo "start install $pkg_file_path"
tar -xf $pkg_file_path -C $nervui_app_home
}
if [ "$pkg_url" == "" ]; then
echo {\"error\":\"pkg_url is empty\"}
exit 1
elif [ "$nervui_app_home" == "" ]; then
echo {\"error\":\"nervui_app_home is empty\"}
exit 1
else
create
fi

View File

@@ -1 +0,0 @@
echo "=====================================================delete====================================================="

View File

@@ -1 +0,0 @@
echo "=====================================================setup====================================================="

View File

@@ -1 +0,0 @@
echo "=====================================================start====================================================="

View File

@@ -1 +0,0 @@
echo "=====================================================stop====================================================="

View File

@@ -1,30 +0,0 @@
{
"name":"/nervui-noenetwork",
"operations": [
{
"name": "Create",
"type": "shell",
"implementor": "create.sh"
},
{
"name": "Delete",
"type": "shell",
"implementor": "delete.sh"
},
{
"name": "Setup",
"type": "shell",
"implementor": "setup.sh"
},
{
"name": "Start",
"type": "shell",
"implementor": "start.sh"
},
{
"name": "Stop",
"type": "shell",
"implementor": "stop.sh"
}
]
}

View File

@@ -1,64 +0,0 @@
{
"name": "/nervui-noenetwork",
"version": 1,
"inputs": [
{
"name": "server_ip",
"type": "string",
"required":true,
"description":"应用安装IP地址",
"inputType":"ipSelectType"
},
{
"name": "version",
"type": "string",
"required":true,
"description":"软件版本",
"inputType":"versionSelectType"
},
{
"name": "install_dir",
"type": "string",
"required": true,
"defaultValue": "/data",
"inputType": "textInputType",
"description": "安装目录"
}
],
"nodes": [
{
"name": "nervui-noenetwork",
"type": "/nerv/nerv-orchestrator/cluster/Nervui",
"parameters": [
{
"name": "file_repository",
"value": "${nerv_file_repository}"
},
{
"name": "install_dir",
"value": "${install_dir}"
},
{
"name": "pkg_url",
"value": "/api/pkg/nerv/nervui-noenetwork/${version}/nervui-noenetwork-${version}.tgz"
}
],
"dependencies": [
{
"type": "contained",
"target": "host"
}
]
},
{
"name": "host",
"type": "/nerv/nerv-orchestrator/compute/Host",
"parameters": [
{
"name": "address",
"value": "${server_ip}"
}
]
}
]
}

View File

@@ -1,11 +0,0 @@
/** @format */
const RootRoute = {
path: '/root',
name: 'root',
redirect: '/network',
meta: {
title: 'Root',
},
};
export default RootRoute;

View File

@@ -1,476 +0,0 @@
import { NsViewContent, NsViewDetail, NsViewSideNav } from '/nerv-lib/paas';
const SideNav = () => Promise.resolve(NsViewSideNav);
const Base = () => Promise.resolve(NsViewContent);
const ListTable = () => import('/nerv-lib/paas/view/service/list-table.vue');
const Detail = () => import('/nerv-lib/paas/view/service/detail.vue');
const AddForm = () => import('/nerv-lib/paas/view/service/add-form.vue');
const EditForm = () => import('/nerv-lib/paas/view/service/edit-form.vue');
import { get } from 'lodash-es';
import { dateUtil } from '/nerv-lib/util/date-util';
import { noeportDetailConfig } from '/@/view/Noeport/config';
import {
networkTableConfig,
networkDetailConfig,
networkEditConfig,
} from '/@/view/Noenetwork/config';
import {
noesecuritygroupTableConfig,
noesecuritygroupAddConfig,
noesecuritygroupDetailConfig,
} from '/@/view/Noesecuritygroup/config';
import { aclTableConfig, aclAddConfig, aclDetailConfig } from '/@/view/Noeacl/config';
import {
noefloatingipTableConfig,
noefloatingipAddConfig,
NoefloatingipBindingPortConfig,
noefloatingipDetailConfig,
} from '/@/view/Noefloatingip/config';
import {
noesubnetTableConfig,
noesubnetAddConfig,
noesubnetBindAclConfig,
noesubnetDetailConfig,
} from '/@/view/Noesubnet/config';
const network = {
path: '/network',
name: 'network',
component: SideNav,
redirect: { name: 'Noenetwork' },
meta: {
sideMenus: {
title: '云网络',
name: 'network',
menus: [
{
name: 'Noenetwork',
label: '网络',
url: '/network/Noenetwork',
module: 'vm',
},
{
name: 'Noesubnet',
label: '子网',
url: '/network/Noesubnet/',
module: 'vm',
},
{
name: 'Noesecuritygroup',
label: '安全组',
url: '/network/Noesecuritygroup',
module: 'vm',
},
{
name: 'Noeacl',
label: '防火墙',
url: '/network/Noeacl',
module: 'vm',
},
{
name: 'Noefloatingip',
label: '浮动IP',
url: '/network/Noefloatingip',
module: 'vm',
},
{
name: 'Noeport',
label: '弹性网卡',
url: '/network/Noeport',
module: 'vm',
},
],
},
},
children: [
//网络
{
path: 'Noenetwork',
name: 'NoenetworkModule',
component: Base,
redirect: { name: 'Noenetwork' },
children: [
{
path: 'list',
name: 'Noenetwork',
// component: () => import('/@/view/component/NsList.vue'),
component: () => import('/@/view/Noenetwork/list.vue'),
props: networkTableConfig,
},
{
path: 'add',
name: 'NoenetworkAdd',
component: () => import('/@/view/Noenetwork/add.vue'),
},
{
path: 'edit/:uid',
name: 'NoenetworkEdit',
component: EditForm,
props: networkEditConfig,
},
{
path: 'detail/:uid',
name: 'NoenetworkDetail',
component: Detail,
props: networkDetailConfig,
},
],
},
//子网
{
path: 'Noesubnet',
name: 'NoesubnetModule',
component: Base,
redirect: { name: 'Noesubnet' },
children: [
{
path: 'list',
name: 'Noesubnet',
component: () => import('/@/view/component/NsList.vue'),
props: noesubnetTableConfig,
},
{
path: 'add',
name: 'NoesubnetAdd',
component: () => import('/@/view/Noesubnet/add.vue'),
// component: AddForm,
// props: noesubnetAddConfig,
},
{
path: 'bindAcl/:id/:projectId',
name: 'NoesubnetBindAcl',
component: AddForm,
props: noesubnetBindAclConfig,
},
{
path: 'detail/:id',
name: 'NoesubnetDetail',
component: Detail,
props: noesubnetDetailConfig,
},
],
},
//安全组
{
path: 'Noesecuritygroup',
name: 'NoesecuritygroupModule',
component: Base,
redirect: { name: 'Noesecuritygroup' },
children: [
{
path: 'list',
name: 'Noesecuritygroup',
component: () => import('/@/view/component/NsList.vue'),
props: noesecuritygroupTableConfig,
},
{
path: 'add',
name: 'NoesecuritygroupAdd',
component: AddForm,
props: noesecuritygroupAddConfig,
},
{
path: 'detail/:id',
name: 'NoesecuritygroupDetail',
component: Detail,
props: noesecuritygroupDetailConfig,
},
{
path: 'updateIngressRule/:id',
name: 'NoesecuritygroupUpdateIngressRule',
component: () => import('/@/view/Noesecuritygroup/updateRule.vue'),
props: {
type: 'ingress_rules',
title: '修改入站规则',
api: '/api/noe/objs/SecurityGroup',
},
},
{
path: 'updateEgressRule/:id',
name: 'NoesecuritygroupUpdateEgressRule',
component: () => import('/@/view/Noesecuritygroup/updateRule.vue'),
props: {
type: 'egress_rules',
title: '修改出站规则',
api: '/api/noe/objs/SecurityGroup',
},
},
],
},
//Acl
{
path: 'Noeacl',
name: 'NoeaclModule',
component: Base,
redirect: { name: 'Noeacl' },
children: [
{
path: 'list',
name: 'Noeacl',
component: () => import('/@/view/component/NsList.vue'),
props: aclTableConfig,
},
{
path: 'add',
name: 'NoeaclAdd',
component: AddForm,
props: aclAddConfig,
},
{
path: 'detail/:id',
name: 'NoeaclDetail',
component: Detail,
props: aclDetailConfig,
},
{
path: 'updateIngressRule/:id',
name: 'NoeaclUpdateIngressRule',
component: () => import('/@/view/Noesecuritygroup/updateRule.vue'),
props: {
type: 'ingress_rules',
title: '修改入站规则',
api: '/api/noe/objs/ACL',
},
},
{
path: 'updateEgressRule/:id',
name: 'NoeaclUpdateEgressRule',
component: () => import('/@/view/Noesecuritygroup/updateRule.vue'),
props: {
type: 'egress_rules',
title: '修改出站规则',
api: '/api/noe/objs/ACL',
},
},
],
},
//浮动ip
{
path: 'Noefloatingip',
name: 'NoefloatingipModule',
component: Base,
redirect: { name: 'Noefloatingip' },
children: [
{
path: 'list',
name: 'Noefloatingip',
component: () => import('/@/view/component/NsList.vue'),
props: noefloatingipTableConfig,
},
{
path: 'add',
name: 'NoefloatingipAdd',
component: AddForm,
props: noefloatingipAddConfig,
},
{
path: 'bindingPort/:id/:projectId',
name: 'NoefloatingipBindingPort',
component: AddForm,
props: NoefloatingipBindingPortConfig,
},
{
path: 'detail/:id',
name: 'NoefloatingipDetail',
component: Detail,
props: noefloatingipDetailConfig,
},
],
},
{
path: 'Noeport',
name: 'NoeportModule',
component: Base,
redirect: { name: 'Noeport' },
children: [
{
path: 'list',
name: 'Noeport',
component: () => import('/@/view/component/NsList.vue'),
props: {
api: '/api/noe/forwarder/noeports',
showAction: [],
title: '弹性网卡',
columns: [
{
title: '项目',
name: 'viewInfo',
textEllipsis: true,
width: '15%',
customRender: (text: any) => {
return get(text.record, 'viewInfo.project[0]');
},
},
{
title: '弹性网卡ID',
textEllipsis: true,
width: '20%',
dataIndex: 'metadata',
customRender: (text: any) => {
return get(text.record, 'metadata.name');
},
},
{
title: '名称',
textEllipsis: true,
width: '20%',
dataIndex: 'spec',
customRender: (text: any) => {
return get(text.record, 'spec.display_name');
},
},
{
title: 'IP地址',
textEllipsis: true,
width: '20%',
dataIndex: 'spec',
customRender: (text: any) => {
let info;
if (text.text.fixed_ips && text.text.fixed_ips[0]) {
info = text.text.fixed_ips[0];
}
return info ? info['ip_address'] : '-';
},
},
{
title: '状态',
textEllipsis: true,
dataIndex: 'status',
width: '15%',
customRender: (text: any) => {
return get(text.record, 'status.status');
},
},
{
title: '租户',
textEllipsis: true,
dataIndex: 'spec',
width: '10%',
customRender: (text: any) => {
return get(text.record, 'spec.tenant');
},
},
{
title: '创建时间',
dataIndex: 'metadata',
width: '20%',
customRender: (text: any) => {
return dateUtil(text.text?.creationTimestamp).format('YYYY-MM-DD HH:mm:ss');
},
},
],
actions: [
{
label: '查看',
name: 'NoeportDetail',
openPermission: true,
handle: (record, e, { router }) => {
router.push({
name: 'NoeportDetail',
params: {
id: record.metadata?.name,
},
});
},
},
{
label: '云主机',
name: 'componentPreview',
openPermission: true,
handle: (record, e, { router }) => {
window.open(
`/nervui-iaasvm/vm/instance?selector=${encodeURIComponent(
`status.network_info[].port_id=${record.metadata?.name}`,
)}`,
);
},
},
{
label: '网络',
name: 'componentPreview',
openPermission: true,
dynamicDisabled: (record) => {
return !record.spec?.network_id;
},
handle: (record, e, { router }) => {
router.push(
`/network/Noenetwork/list?parentType=noeports&parentName=${record.metadata?.name}&childName=spec.network_id`,
);
},
},
{
label: '子网',
name: 'componentPreview',
openPermission: true,
dynamicDisabled: (record) => {
return !(record.spec?.fixed_ips && record.spec?.fixed_ips[0]?.subnet_id);
},
handle: (record, e, { router }) => {
router.push(
`/network/Noesubnet/list?parentType=noeports&parentName=${
record.metadata?.name
}&childName=${encodeURIComponent('spec.fixed_ips[].subnet_id')}`,
);
},
},
{
label: '安全组',
name: 'Noesecuritygroup',
openPermission: true,
dynamicDisabled: (record) => {
return !record.spec?.security_group_ids;
},
handle: (record, e, { router }) => {
router.push(
`/network/Noesecuritygroup/list?parentType=noeports&parentName=${
record.metadata?.name
}&childName=${encodeURIComponent('spec.security_group_ids[]')}`,
);
},
},
],
headerActions: [
{
label: '查看',
name: 'NoeportDetail',
ifShow: () => {
return false;
},
handle: (record, e, { router }) => {},
},
],
formConfig: {
keyFilter: true,
keySearch: false,
isNeedHttpGet: false,
defaultFilterList: true,
// filterList: [
// {
// componentType: 'NsInput', //组件形态 NsInput-普通输入
// defaultSearch: true, //是否是默认搜索标签
// componentProps: {
// rule: {},
// },
// label: 'IP地址', //展示的过滤标签
// notEmpty: false, //是否允许选择非空值
// key: 'selector=spec.tenant', //传入后端的key
// empty: false, //是否允许选择空值
// },
// ],
},
},
// component: () => import('/@/view/Noeport/list.vue'),
},
{
path: 'detail/:id',
name: 'NoeportDetail',
component: Detail,
props: noeportDetailConfig,
},
],
},
],
};
export default network;

View File

@@ -1 +0,0 @@

View File

@@ -1,2 +0,0 @@
@import "variable";
@import "global";

View File

@@ -1,10 +0,0 @@
// @layout-header-background:url(/asset/image/header_background.png) no-repeat;
// // @layout-sider-background:url(/asset/image/sider_background.png) no-repeat;
// @layout-nav-background:url(/asset/image/sider_background.png) no-repeat;
// @layout-header-color: #FFFFFF;
// @layout-header-link-color: #FFFFFF;
// @layout-nav-color: #FFFFFF;
// @layout-nav-check-color: #FFFFFF;
// @primary-color: #2C68FF; // 全局主色
// @link-color: #2C68FF; // 链接色
// @layout-nav-hover:linear-gradient(90deg, #2C68FF 0%, rgba(44, 104, 255, 0.4) 100%);

View File

@@ -1,420 +0,0 @@
import acl from '/@/api/acl';
import { http } from '/nerv-lib/util/http';
import { dateUtil } from '/nerv-lib/util/date-util';
import { get } from 'lodash-es';
import { useRouter } from 'vue-router';
export const aclTableConfig = {
api: acl.LIST,
title: '防火墙',
showAction: ['remove'],
columns: [
{
title: '项目',
name: 'viewInfo',
textEllipsis: true,
width: '15%',
customRender: (text: any) => {
return get(text.record, 'viewInfo.project[0]');
},
},
{
title: '防火墙ID',
textEllipsis: true,
width: '20%',
dataIndex: 'metadata',
customRender: (text: any) => {
return get(text.record, 'metadata.name');
},
},
{
title: '名称',
textEllipsis: true,
width: '20%',
dataIndex: 'spec',
customRender: (text: any) => {
return get(text.record, 'spec.display_name');
},
},
{
title: '描述',
textEllipsis: true,
dataIndex: 'spec',
customRender: (text: any) => {
return get(text.record, 'spec.display_description');
},
width: '15%',
},
{
title: '租户',
textEllipsis: true,
dataIndex: 'spec',
width: '10%',
customRender: (text: any) => {
return get(text.record, 'spec.tenant');
},
},
{
title: '创建时间',
dataIndex: 'metadata',
width: '20%',
customRender: (text: any) => {
return dateUtil(text.text?.creationTimestamp).format('YYYY-MM-DD HH:mm:ss');
},
},
],
actions: [
{
label: '查看',
name: 'NoeaclDetail',
openPermission: true,
handle: (record, e, { router }) => {
router.push({
name: 'NoeaclDetail',
params: {
id: record.metadata?.name,
},
});
},
},
{
label: '修改入站规则',
name: 'NoeaclUpdateIngressRule',
openPermission: true,
handle: (record, e, { router }) => {
router.push({
name: 'NoeaclUpdateIngressRule',
params: {
id: record.metadata?.name,
},
});
},
},
{
label: '修改出站规则',
name: 'NoeaclUpdateEgressRule',
openPermission: true,
handle: (record, e, { router }) => {
router.push({
name: 'NoeaclUpdateEgressRule',
params: {
id: record.metadata?.name,
},
});
},
},
],
headerActions: [
{
label: '添加',
name: 'NoeaclAdd',
type: 'primary',
handle: (record, e, { router }) => {
router.push({ name: 'NoeaclAdd' });
},
},
],
};
export const aclAddConfig = {
title: '添加',
formLayout: '修改',
api: acl.ADD,
schemas: [
// {
// label: '项目',
// field: 'project_id',
// component: 'NsSelectApi' /* todo 需要根据权限过滤 */,
// componentProps: {
// api: {
// url: '/api/passport/passport/objs/Authorization/CheckAuthorization',
// method: 'POST',
// },
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
// },
// // filterData: (item) => {
// // return authorizationService().checkPermission('vdisk', 'Volume', 'add', item.projectname);
// // },
// resultField: 'projects',
// labelField: 'projectname',
// valueField: 'projectid',
// immediate: true,
// placeholder: '请选择项目',
// },
// rules: [
// {
// type: 'number',
// required: true,
// message: '项目必填',
// trigger: 'blur',
// },
// ],
// },
{
label: '租户',
field: 'tenant',
component: 'NsSelectApi' /* todo 需要根据权限过滤 */,
componentProps: {
api: {
url: '/api/passport/passport/objs/Tenant?where=tenant_status=?&values=1',
method: 'GET',
},
autoSelectFirst: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
resultField: 'data',
labelField: 'tenant',
valueField: 'tenant',
immediate: true,
placeholder: '请选择租户',
},
rules: [
{
required: true,
message: '租户必填',
trigger: 'blur',
},
],
},
{
label: '项目',
field: 'project_id',
component: 'NsSelectApi' /* todo 需要根据权限过滤 */,
dynamicParams: {
tenant: 'tenant',
},
componentProps: {
api: {
url: '/api/passport/passport/objs/Tenant/Projects',
method: 'GET',
},
autoSelectFirst: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
resultField: 'projects',
labelField: 'projectName',
valueField: 'projectID',
immediate: true,
placeholder: '请选择项目',
},
rules: [
{
type: 'number',
required: true,
message: '项目必填',
trigger: 'blur',
},
],
},
{
field: 'name',
label: '防火墙名称',
component: 'NsInput',
componentProps: {
placeholder: '请输入',
},
rules: [
{
required: true,
message: '防火墙名称必填',
trigger: 'blur',
},
{
pattern: '^[a-zA-Z][a-zA-Z0-9_-]{5,31}$',
message: '以字母开头输入6-32个字符只能包含字母数字短横线(-)和下划线(_)',
trigger: 'blur',
},
],
},
{
label: '描述',
field: 'description',
component: 'NsTextarea',
componentProps: {
showCount: true,
maxlength: 255,
},
},
],
};
export const aclEditConfig = {
title: '编辑',
formLayout: '修改',
getApi: () => {
const router = useRouter();
return http.get(`${acl.DETAIL}/${router.currentRoute.value.params?.uid}`);
},
api: (record) => {
return http.put(`${acl.EDIT}/${record.uuid}`, record);
},
schemas: [
{
field: 'uuid',
component: 'NsInputText',
show: false,
},
{
field: 'name',
label: '网络名称',
component: 'NsInput',
componentProps: {
placeholder: '请输入',
},
rules: [
{
required: true,
message: '网络名称必填',
trigger: 'blur',
},
],
},
{
label: '描述',
field: 'description',
component: 'NsTextarea',
componentProps: {
showCount: true,
maxlength: 255,
},
},
],
};
export const aclDetailConfig = {
title: '详情',
showBack: true,
api: () => {
const router = useRouter();
return http.get(`${acl.DETAIL}/${router.currentRoute.value.params?.id}`);
},
dataHandle: (val) => {
return val;
},
detail: [
{
title: '',
items: [
{
label: '名称',
name: 'name',
},
{
label: '描述',
name: 'description',
},
{
label: '状态',
name: 'status',
},
{
label: '租户',
name: 'tenant',
},
{
label: '创建时间',
name: 'created_at',
format: (value) => {
return dateUtil(value).format('YYYY-MM-DD HH:mm:ss');
},
},
{
label: '修改时间',
name: 'updated_at',
format: (value) => {
return dateUtil(value).format('YYYY-MM-DD HH:mm:ss');
},
},
],
},
{
title: '',
items: [
{
label: '入站规则',
name: 'ingress_rules',
type: 'table',
props: {
listField: 'ingress_rules',
columns: [
{
title: '协议',
dataIndex: 'protocol',
},
{
title: '名称',
dataIndex: 'name',
},
{
title: 'IP协议',
dataIndex: 'ether_type',
},
{
title: '端口范围',
dataIndex: 'ether_type',
customRender: (text: any) => {
if (text.record['port_range_min'] && text.record['port_range_max']) {
return `${text.record['port_range_min']}-${text.record['port_range_max']}`;
} else {
return 'any';
}
},
},
{
title: '远端IP前缀',
dataIndex: 'remote_ip_prefix',
},
],
},
},
],
},
{
title: '',
items: [
{
label: '出站规则',
name: 'egress_rules',
type: 'table',
props: {
listField: 'egress_rules',
columns: [
{
title: '协议',
dataIndex: 'protocol',
},
{
title: '名称',
dataIndex: 'name',
},
{
title: 'IP协议',
dataIndex: 'ether_type',
},
{
title: '端口范围',
dataIndex: 'ether_type',
customRender: (text: any) => {
if (text.record['port_range_min'] && text.record['port_range_max']) {
return `${text.record['port_range_min']}-${text.record['port_range_max']}`;
} else {
return 'any';
}
},
},
{
title: '远端IP前缀',
dataIndex: 'remote_ip_prefix',
},
],
},
},
],
},
],
};

Some files were not shown because too many files have changed in this diff Show More