-
Notifications
You must be signed in to change notification settings - Fork 779
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
184 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/workbench/browser/src/app/shared/components/env-list/env-list.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { it_IT } from 'ng-zorro-antd/i18n'; | ||
import { StorageRes, StorageResStatus } from '../../../shared/services/storage/index.model'; | ||
import { StorageService } from '../../services/storage'; | ||
|
||
@Component({ | ||
selector: '', | ||
template: ` <span class="text-gray-400">Environment variable</span> | ||
<!-- <span class="my-2">{{ item.name }}</span> --> | ||
<div *ngFor="let it of envParams" class="flex items-center justify-between h-8"> | ||
<span class="w-1/3 text-gray-500">{{ it.name }}</span> | ||
<span class="w-2/3 text-gray-500">{{ it.description }}</span> | ||
</div>`, | ||
styleUrls: [], | ||
}) | ||
export class EnvListComponent implements OnInit { | ||
envParams: any = []; | ||
constructor(private storage: StorageService) {} | ||
async ngOnInit() { | ||
const uuid = Number(localStorage.getItem('env:selected')) || null; | ||
if (uuid == null) { | ||
this.envParams = []; | ||
return; | ||
} | ||
const envList = (await this.getAllEnv()) as []; | ||
const [env]: any[] = envList.filter((it: any) => it.uuid === uuid); | ||
console.log(env, envList); | ||
this.envParams = env.parameters.filter((it: any) => it.name && it.value); | ||
} | ||
getAllEnv(uuid?: number) { | ||
const projectID = 1; | ||
return new Promise((resolve) => { | ||
this.storage.run('environmentLoadAllByProjectID', [projectID], async (result: StorageRes) => { | ||
if (result.status === StorageResStatus.success) { | ||
return resolve(result.data || []); | ||
} | ||
return resolve([]); | ||
}); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,59 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Eoapi</title> | ||
<base href="/" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<script src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_12799_19.ba5ba4245a69248024047f0b7ba96bbb.js"></script> | ||
<link rel="icon" type="image/x-icon" href="assets/icons/icon.ico" /> | ||
</head> | ||
<!-- Angular Cli need for node modules --> | ||
<script> | ||
var global = global || window; | ||
var Buffer = Buffer || []; | ||
var process = process || { | ||
env: { DEBUG: undefined }, | ||
version: [], | ||
}; | ||
</script> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Eoapi</title> | ||
<base href="/" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<script | ||
src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_12799_18.e98aaa4d03d4378a3a2c18bfd1670872.js"></script> | ||
<link rel="icon" type="image/x-icon" href="assets/icons/icon.ico" /> | ||
</head> | ||
<!-- Angular Cli need for node modules --> | ||
<script> | ||
var global = global || window; | ||
var Buffer = Buffer || []; | ||
var process = process || { | ||
env: { DEBUG: undefined }, | ||
version: [], | ||
}; | ||
</script> | ||
|
||
<body eo-drop-root> | ||
<eo-root> | ||
<div class="loading_container f_column"> | ||
<img src="assets/images/logo.svg" /> | ||
<div class="mt10 ant-spin ant-spin-spinning ant-spin-lg"> | ||
<span class="ant-spin-dot ant-spin-dot-spin ng-star-inserted"> | ||
<i class="ant-spin-dot-item"></i> | ||
<i class="ant-spin-dot-item"></i> | ||
<i class="ant-spin-dot-item"></i> | ||
<i class="ant-spin-dot-item"></i> | ||
</span> | ||
<body eo-drop-root> | ||
<eo-root> | ||
<div class="loading_container f_column"> | ||
<img src="assets/images/logo.svg" /> | ||
<div class="mt10 ant-spin ant-spin-spinning ant-spin-lg"> | ||
<span class="ant-spin-dot ant-spin-dot-spin ng-star-inserted"> | ||
<i class="ant-spin-dot-item"></i> | ||
<i class="ant-spin-dot-item"></i> | ||
<i class="ant-spin-dot-item"></i> | ||
<i class="ant-spin-dot-item"></i> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</eo-root> | ||
<div id="mask"></div> | ||
</body> | ||
<style> | ||
#mask { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
left: 0; | ||
top: 0; | ||
z-index: 99999; | ||
display: none; | ||
} | ||
|
||
.loading_container { | ||
position: absolute; | ||
top: 40%; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
} | ||
</eo-root> | ||
<div id="mask"></div> | ||
</body> | ||
<style> | ||
#mask { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
left: 0; | ||
top: 0; | ||
z-index: 99999; | ||
display: none; | ||
} | ||
|
||
.loading_container img { | ||
width: 200px; | ||
} | ||
</style> | ||
.loading_container { | ||
position: absolute; | ||
top: 40%; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
} | ||
|
||
.loading_container img { | ||
width: 200px; | ||
} | ||
</style> | ||
</html> |