You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/06/13 08:17:56 UTC

[cloudstack-primate] branch master updated (a608b37 -> 80cb0e0)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git.


    from a608b37  config: fix translation key usage for API actions and elsewhere (#407)
     new f117a08  listview: show buttons with labels
     new 80cb0e0  infra: embed host-info into details tab

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/components/view/ActionButton.vue              | 16 +++--
 src/components/view/DetailsTab.vue                |  3 +
 src/components/view/ListView.vue                  |  2 +-
 src/config/section/infra/hosts.js                 |  3 -
 src/locales/en.json                               |  4 +-
 src/views/AutogenView.vue                         | 86 +++++++++++------------
 src/views/infra/{HostInfoTab.vue => HostInfo.vue} | 15 ++--
 src/views/network/CreateNetwork.vue               |  9 ++-
 8 files changed, 75 insertions(+), 63 deletions(-)
 rename src/views/infra/{HostInfoTab.vue => HostInfo.vue} (90%)


[cloudstack-primate] 02/02: infra: embed host-info into details tab

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git

commit 80cb0e0275bea54f2246900ce5ada7294cbf1c5d
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Sat Jun 13 13:47:09 2020 +0530

    infra: embed host-info into details tab
    
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
 src/components/view/DetailsTab.vue                |  3 +++
 src/config/section/infra/hosts.js                 |  3 ---
 src/views/infra/{HostInfoTab.vue => HostInfo.vue} | 15 ++++++++++-----
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/components/view/DetailsTab.vue b/src/components/view/DetailsTab.vue
index 250eace..cfa340f 100644
--- a/src/components/view/DetailsTab.vue
+++ b/src/components/view/DetailsTab.vue
@@ -38,6 +38,7 @@
         </div>
       </div>
     </a-list-item>
+    <HostInfo :resource="resource" v-if="$route.meta.name === 'host' && 'listHosts' in $store.getters.apis" />
     <DedicateData :resource="resource" v-if="dedicatedSectionActive" />
     <VmwareData :resource="resource" v-if="$route.meta.name === 'zone' && 'listVmwareDcs' in $store.getters.apis" />
   </a-list>
@@ -45,12 +46,14 @@
 
 <script>
 import DedicateData from './DedicateData'
+import HostInfo from '@/views/infra/HostInfo'
 import VmwareData from './VmwareData'
 
 export default {
   name: 'DetailsTab',
   components: {
     DedicateData,
+    HostInfo,
     VmwareData
   },
   props: {
diff --git a/src/config/section/infra/hosts.js b/src/config/section/infra/hosts.js
index e06a7d7..de1e827 100644
--- a/src/config/section/infra/hosts.js
+++ b/src/config/section/infra/hosts.js
@@ -27,9 +27,6 @@ export default {
   tabs: [{
     name: 'details',
     component: () => import('@/components/view/DetailsTab.vue')
-  }, {
-    name: 'config',
-    component: () => import('@/views/infra/HostInfoTab.vue')
   }],
   related: [{
     name: 'vm',
diff --git a/src/views/infra/HostInfoTab.vue b/src/views/infra/HostInfo.vue
similarity index 90%
rename from src/views/infra/HostInfoTab.vue
rename to src/views/infra/HostInfo.vue
index aeb3b76..627f6ff 100644
--- a/src/views/infra/HostInfoTab.vue
+++ b/src/views/infra/HostInfo.vue
@@ -21,9 +21,14 @@
       <a-list-item>
         <div>
           <strong>{{ $t('label.hypervisorversion') }}</strong>
-          <div v-if="host.details">
+          <div>
             {{ host.hypervisor }}
-            {{ host.details['Host.OS'] + ' ' + host.details['Host.OS.Version'] }}
+            <span v-if="host.details">
+              {{ host.details['Host.OS'] + ' ' + host.details['Host.OS.Version'] }}
+            </span>
+            <span v-else>
+              {{ host.version }}
+            </span>
           </div>
         </div>
       </a-list-item>
@@ -100,7 +105,7 @@
 import { api } from '@/api'
 
 export default {
-  name: 'HostInfoTab',
+  name: 'HostInfo',
   props: {
     resource: {
       type: Object,
@@ -121,8 +126,8 @@ export default {
     this.fetchData()
   },
   watch: {
-    loading (newData, oldData) {
-      if (!newData && this.resource.id) {
+    resource (newItem, oldItem) {
+      if (this.resource && this.resource.id && newItem && newItem.id !== oldItem.id) {
         this.fetchData()
       }
     }


[cloudstack-primate] 01/02: listview: show buttons with labels

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git

commit f117a08270af8a815cac387bcd988efb5eb81ab8
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Sat Jun 13 13:04:49 2020 +0530

    listview: show buttons with labels
    
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
 src/components/view/ActionButton.vue | 16 +++++--
 src/components/view/ListView.vue     |  2 +-
 src/locales/en.json                  |  4 +-
 src/views/AutogenView.vue            | 86 ++++++++++++++++++------------------
 src/views/network/CreateNetwork.vue  |  9 ++--
 5 files changed, 62 insertions(+), 55 deletions(-)

diff --git a/src/components/view/ActionButton.vue b/src/components/view/ActionButton.vue
index dfd1023..63985b0 100644
--- a/src/components/view/ActionButton.vue
+++ b/src/components/view/ActionButton.vue
@@ -37,9 +37,13 @@
         <a-button
           :icon="action.icon"
           :type="action.icon === 'delete' ? 'danger' : (action.icon === 'plus' ? 'primary' : 'default')"
-          shape="circle"
+          :shape="!dataView && action.icon === 'plus' ? 'round' : 'circle'"
           style="margin-left: 5px"
-          @click="execAction(action)" />
+          @click="execAction(action)">
+          <span v-if="!dataView && action.icon === 'plus'">
+            {{ $t(action.label) }}
+          </span>
+        </a-button>
       </a-badge>
       <a-button
         v-if="action.api in $store.getters.apis &&
@@ -48,9 +52,13 @@
           ('show' in action ? action.show(resource, $store.getters) : true)"
         :icon="action.icon"
         :type="action.icon === 'delete' ? 'danger' : (action.icon === 'plus' ? 'primary' : 'default')"
-        shape="circle"
+        :shape="!dataView && action.icon === 'plus' ? 'round' : 'circle'"
         style="margin-left: 5px"
-        @click="execAction(action)" />
+        @click="execAction(action)">
+        <span v-if="!dataView && action.icon === 'plus'">
+          {{ $t(action.label) }}
+        </span>
+      </a-button>
     </a-tooltip>
   </span>
 </template>
diff --git a/src/components/view/ListView.vue b/src/components/view/ListView.vue
index a31c177..33e18e3 100644
--- a/src/components/view/ListView.vue
+++ b/src/components/view/ListView.vue
@@ -68,7 +68,7 @@
         <os-logo v-if="record.ostypename" :osName="record.ostypename" size="1x" style="margin-right: 5px" />
         <console :resource="record" size="small" style="margin-right: 5px" />
 
-        <span v-if="$route.name === 'globalsetting'">{{ text }}</span>
+        <span v-if="$route.path.startsWith('/globalsetting')">{{ text }}</span>
         <span v-else>
           <router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id">{{ text }}</router-link>
           <router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ text }}</router-link>
diff --git a/src/locales/en.json b/src/locales/en.json
index c93f111..5c269d1 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -273,7 +273,7 @@
 "label.add.certificate": "Add Certificate",
 "label.add.ciscoasa1000v": "Add CiscoASA1000v Resource",
 "label.add.cluster": "Add Cluster",
-"label.add.compute.offering": "Add compute offering",
+"label.add.compute.offering": "Add Compute Offering",
 "label.add.direct.iprange": "Add Direct Ip Range",
 "label.add.disk.offering": "Add Disk Offering",
 "label.add.domain": "Add Domain",
@@ -304,7 +304,7 @@
 "label.add.network.acl": "Add network ACL",
 "label.add.network.acl.list": "Add Network ACL List",
 "label.add.network.device": "Add Network Device",
-"label.add.network.offering": "Add network offering",
+"label.add.network.offering": "Add Network Offering",
 "label.add.new.f5": "Add new F5",
 "label.add.new.gateway": "Add new gateway",
 "label.add.new.iso": "Add new ISO",
diff --git a/src/views/AutogenView.vue b/src/views/AutogenView.vue
index b8a6280..4fb3d31 100644
--- a/src/views/AutogenView.vue
+++ b/src/views/AutogenView.vue
@@ -21,53 +21,53 @@
       <a-row>
         <a-col :span="device === 'mobile' ? 24 : 12" style="padding-left: 12px">
           <breadcrumb :resource="resource">
-            <a-tooltip placement="bottom" slot="end">
-              <template slot="title">
-                {{ $t('label.refresh') }}
-              </template>
-              <a-button
-                style="margin-top: 4px"
-                :loading="loading"
-                shape="round"
-                size="small"
-                icon="reload"
-                @click="fetchData()">
-                {{ $t('label.refresh') }}
-              </a-button>
-            </a-tooltip>
+            <span slot="end">
+              <a-tooltip placement="bottom">
+                <template slot="title">
+                  {{ $t('label.refresh') }}
+                </template>
+                <a-button
+                  style="margin-top: 4px"
+                  :loading="loading"
+                  shape="round"
+                  size="small"
+                  icon="reload"
+                  @click="fetchData()">
+                  {{ $t('label.refresh') }}
+                </a-button>
+              </a-tooltip>
+              <a-select
+                v-if="filters && filters.length > 0"
+                :placeholder="$t('label.filterby')"
+                :value="$t('label.' + selectedFilter)"
+                style="min-width: 100px; margin-left: 10px"
+                @change="changeFilter">
+                <a-icon slot="suffixIcon" type="filter" />
+                <a-select-option v-for="filter in filters" :key="filter">
+                  {{ $t('label.' + filter) }}
+                </a-select-option>
+              </a-select>
+            </span>
           </breadcrumb>
         </a-col>
         <a-col
           :span="device === 'mobile' ? 24 : 12"
-          :style="device !== 'mobile' ? { 'margin-bottom': '-6px' } : { 'margin-top': '12px', 'margin-bottom': '-6px' }">
-          <span :style="device !== 'mobile' ? { float: 'right' } : {}">
-            <action-button
-              style="margin-bottom: 5px"
-              :loading="loading"
-              :actions="actions"
-              :selectedRowKeys="selectedRowKeys"
-              :dataView="dataView"
-              :resource="resource"
-              @exec-action="execAction"/>
-            <a-select
-              v-if="filters && filters.length > 0"
-              :placeholder="$t('label.filterby')"
-              :value="$t('label.' + selectedFilter)"
-              style="min-width: 100px; margin-left: 10px"
-              @change="changeFilter">
-              <a-icon slot="suffixIcon" type="filter" />
-              <a-select-option v-for="filter in filters" :key="filter">
-                {{ $t('label.' + filter) }}
-              </a-select-option>
-            </a-select>
-            <a-input-search
-              style="width: 20vw; margin-left: 10px"
-              :placeholder="$t('label.search')"
-              v-model="searchQuery"
-              v-if="!dataView && !treeView"
-              allowClear
-              @search="onSearch" />
-          </span>
+          :style="device === 'mobile' ? { float: 'right', 'margin-top': '12px', 'margin-bottom': '-6px', display: 'table' } : { float: 'right', display: 'table', 'margin-bottom': '-6px' }" >
+          <action-button
+            :style="dataView || treeView ? { float: device === 'mobile' ? 'left' : 'right' } : { 'margin-right': '10px', display: 'inline-flex' }"
+            :loading="loading"
+            :actions="actions"
+            :selectedRowKeys="selectedRowKeys"
+            :dataView="dataView"
+            :resource="resource"
+            @exec-action="execAction"/>
+          <a-input-search
+            style="width: 100%; display: table-cell"
+            :placeholder="$t('label.search')"
+            v-if="!dataView && !treeView"
+            v-model="searchQuery"
+            allowClear
+            @search="onSearch" />
         </a-col>
       </a-row>
     </a-card>
diff --git a/src/views/network/CreateNetwork.vue b/src/views/network/CreateNetwork.vue
index 88f98fe..ef47afb 100644
--- a/src/views/network/CreateNetwork.vue
+++ b/src/views/network/CreateNetwork.vue
@@ -116,11 +116,10 @@ export default {
 
 <style scoped lang="scss">
   .form-layout {
-    width: 600px;
-  }
-
-  .random {
-    width: 80%;
+    width: 80vw;
+    @media (min-width: 700px) {
+      width: 600px;
+    }
   }
 
   .action-button {