diff --git a/nezha-fronted/src/assets/css/main.css b/nezha-fronted/src/assets/css/main.css
index e12c91626..e12fbfa45 100644
--- a/nezha-fronted/src/assets/css/main.css
+++ b/nezha-fronted/src/assets/css/main.css
@@ -37,6 +37,11 @@ html {
.margin-b-10 {
margin-bottom: 10px !important;
}
+.line-100 {
+ width: 100%;
+ height: 1px;
+ background: #C0C4CC;
+}
/*侧滑文字*/
.el-form-item .el-form-item__label{
font-size: 10px;
@@ -74,20 +79,24 @@ html {
height: calc(90vh - 55px);
width: 100%;
}
-.sidebar-info-top {
+.sidebar-info-item:first-of-type {
border-radius: 6px 6px 0 0;
}
.sidebar-info-item {
-height: 39px;
-line-height: 39px;
-padding: 0 8px 0 32px;
-border-bottom: 1px solid #cacaca;
-cursor: pointer;
-color: #5e5e5e;
+ height: 39px;
+ line-height: 39px;
+ padding: 0 8px 0 32px;
+ border-bottom: 1px solid #cacaca;
+ cursor: pointer;
+ color: #5e5e5e;
+}
+.side-bar-menu-edit {
+ line-height: 40px;
+ float: right;
}
.sidebar-info-item-active {
-background-color: #5e5e5e;
-color: white;
+ background-color: #5e5e5e;
+ color: white;
}
.sidebar-info-foot {
border-radius: 6px 6px 0 0;
@@ -240,10 +249,10 @@ color: white;
display: inline-block;
}
.right-box-form {
- margin-top: 35px;
+ margin-top: 30px;
}
.right-box-form-row {
- margin-top: 20px;
+ margin-top: 16px;
}
.right-box-form-label {
margin-bottom: 8px;
@@ -257,6 +266,12 @@ color: white;
.right-box-form-content-txt {
padding-left: 11px;
}
+.right-box-form-tip {
+ color: #d0d4dC;
+ font-size: 14px;
+ line-height: 20px;
+ min-height: 64px;
+}
.right-box-form-content .el-select {
width: 100%;
}
diff --git a/nezha-fronted/src/components/common/header.vue b/nezha-fronted/src/components/common/header.vue
index fb2893d07..7876e0637 100644
--- a/nezha-fronted/src/components/common/header.vue
+++ b/nezha-fronted/src/components/common/header.vue
@@ -14,16 +14,24 @@
- {{$t('overall.project')}}
+ {{$t('overall.project')}}
+
+
+
+
+ {{item.name}}
+
+
+
- {{$t('overall.asset')}}
+ {{$t('overall.asset')}}
- {{item.name}}
+ {{item.name}}
@@ -46,7 +54,7 @@
{{$t('config.account.account')}}
- Prometheus Server
+ {{$t('config.promServer.promServerList')}}
@@ -92,13 +100,12 @@ export default {
data() {
return {
language: localStorage.getItem("language"),
- assetData: []
+ assetData: [],
+ projectData: []
}
},
methods: {
- jumpTo(data,id) {
- this.$store.state.assetData.moduleData = data
- this.$store.state.assetData.selectedData = id
+ jumpTo(data) {
this.$router.push({
path: "/" + data,
query: {
@@ -106,6 +113,15 @@ export default {
}
});
},
+ jumpToAsset(data, id) {
+ this.$store.state.assetData.moduleData = data;
+ this.$store.state.assetData.selectedData = id;
+ this.jumpTo(data);
+ },
+ jumpToProject(data, p) {
+ this.$store.commit('setProject', p);
+ this.jumpTo(data);
+ },
changeLocal(lang) {
localStorage.setItem("language", lang);
window.location.reload();
@@ -117,9 +133,35 @@ export default {
}
})
},
+ getProjectData() {
+ this.$get('project', this.pageObj).then(response => {
+ if (response.code == 200) {
+ this.projectData = response.data.list;
+ }
+ })
+ },
+ toEditProject(p) {
+ this.$store.commit('setProject', p);
+ this.$store.commit('projectRightBoxShow', true);
+ this.jumpTo('project');
+ }
},
mounted() {
- this.getAssetData()
+ this.getAssetData();
+ this.getProjectData();
+ },
+ computed: {
+ projectListReload() {
+ return this.$store.state.projectListReload;
+ }
+ },
+ watch: {
+ projectListReloadWatch(n, o) {
+ if (n) {
+ this.getProjectData();
+ this.$store.commit('projectListReload', false);
+ }
+ }
}
}
@@ -224,4 +266,8 @@ export default {
.header-name-jiantou {
position: static !important;
}
+.menu-edit {
+ line-height: 36px;
+ float: right;
+}
diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js
index 6f6a15794..67790d7c0 100644
--- a/nezha-fronted/src/components/common/language/en.js
+++ b/nezha-fronted/src/components/common/language/en.js
@@ -105,10 +105,20 @@ const en = {
},
project: {
project: {
- project: "Project"
+ project: "Project",
+ projectName: "Project Name",
+ editProject: "Edit Project",
+ description: "Description"
},
module: {
- module: "Module"
+ module: "Module",
+ moduleName: "Module Name",
+ editModule: "Edit Module",
+ description: "Description",
+ tip: {
+ defaultEndpointSet: "Default Endpoint Set",
+ relation: "Endpoints associated with Module will reference Port/Path/Param/Params by default"
+ }
},
endpoint: {
createEndpoint: "Create Endpoint",
diff --git a/nezha-fronted/src/components/page/project/project.vue b/nezha-fronted/src/components/page/project/project.vue
index c3e4247d0..4d61bbf3a 100644
--- a/nezha-fronted/src/components/page/project/project.vue
+++ b/nezha-fronted/src/components/page/project/project.vue
@@ -46,11 +46,16 @@
}
.param-box {
- height: 303px;
border: 1px solid #DCDFE6;
border-radius: 4px;
padding: 0 10px;
}
+.param-box-endpoint {
+ height: 325px;
+}
+.param-box-module {
+ height: 227px;
+}
.param-box-row {
padding: 7px 0 0 0;
position: relative;
@@ -92,18 +97,20 @@
/* begin--子弹框*/
.right-sub-box {
- width: 330px;
- height: calc(50%);
+ width: 380px;
+ height: 520px;
position: absolute;
top: 380px;
right: 100px;
z-index: 2;
+ padding: 0 10px;
}
.right-sub-box .el-input-group {
- width: 60%;
+ width: 227px;
float: right;
margin: 7px 0 0 0;
}
+ /* begin--搜索框*/
.endpoint-asset-prepend {
border-radius: 4px 0 0 4px;
}
@@ -128,6 +135,7 @@
.endpoint-asset-label-txt {
display: inline-block;
width: 19px;
+ text-align: center;
}
.endpoint-asset-dropdown-item:first-of-type {
border-radius: 4px 4px 0 0;
@@ -138,15 +146,104 @@
.endpoint-asset-dropdown-item:hover {
background-color: #3a8ee6;
}
+ /* end--搜索框*/
+ /* begin--table*/
+.endpoint-sub-table {
+ margin-top: 25px;
+}
+.line-100 {
+ margin-bottom: 3px;
+}
+.endpoint-sub-table-head {
+ line-height: 28px;
+ height: 30px;
+}
+.endpoint-sub-table-row {
+ line-height: 28px;
+ height: 30px;
+ color: #656565;
+}
+.endpoint-sub-table-row-active {
+ background-color: #dadada;
+}
+.endpoint-sub-table-col {
+ display: inline-block;
+ width: 45%;
+ padding-left: 10px;
+}
+.endpoint-sub-table-paginate-all {
+ position: absolute;
+ left: 10px;
+ bottom: 17px;
+ color: #5a5a5a;
+}
+.endpoint-sub-table-body {
+ font-size: 15px;
+}
+ /* end--table*/
+
/* end--子弹框*/
+
+