expressa 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -117,13 +117,7 @@
|
|
|
117
117
|
</el-checkbox>
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
|
-
<
|
|
121
|
-
{{ getPath(scope.row, name) }}
|
|
122
|
-
</router-link>
|
|
123
|
-
<router-link v-if="i === 0 && collectionName === 'requestlog'" :to="'/dev/viewrequest/'+scope.row._id">
|
|
124
|
-
{{ getPath(scope.row, name) }}
|
|
125
|
-
</router-link>
|
|
126
|
-
<span v-if="i !== 0">{{ getPath(scope.row, name) }}</span>
|
|
120
|
+
<span>{{ getPath(scope.row, name) }}</span>
|
|
127
121
|
</div>
|
|
128
122
|
</template>
|
|
129
123
|
</el-table-column>
|
|
@@ -196,7 +190,29 @@ export default {
|
|
|
196
190
|
}
|
|
197
191
|
|
|
198
192
|
const url = this.customParams ? `/${this.apiSuffix}?${this.customParams}` : `/${this.apiSuffix}`
|
|
199
|
-
|
|
193
|
+
let info = (await request({ url, params, baseURL: this.apiBaseUrl })).data
|
|
194
|
+
|
|
195
|
+
const isNotPaged = !info.page && !info.itemsTotal
|
|
196
|
+
|
|
197
|
+
if (isNotPaged) {
|
|
198
|
+
if (!Array.isArray(info)) {
|
|
199
|
+
if (typeof info !== 'object') {
|
|
200
|
+
// If response is primitive type
|
|
201
|
+
info = [{
|
|
202
|
+
result: info
|
|
203
|
+
}]
|
|
204
|
+
} else {
|
|
205
|
+
// If response is an object
|
|
206
|
+
info = [info]
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
info = {
|
|
211
|
+
data: info,
|
|
212
|
+
itemsTotal: 1
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
200
216
|
this.count = info.itemsTotal
|
|
201
217
|
this.data = this.applyCustomColumnFilter(info.data)
|
|
202
218
|
|
|
@@ -205,6 +205,9 @@ export default {
|
|
|
205
205
|
]
|
|
206
206
|
}),
|
|
207
207
|
computed: {
|
|
208
|
+
isEndpointsPage() {
|
|
209
|
+
return this.$options.name === 'Endpoints'
|
|
210
|
+
},
|
|
208
211
|
tableRows() {
|
|
209
212
|
if (!this.isFiltersVisible) {
|
|
210
213
|
return this.data
|
|
@@ -235,7 +238,7 @@ export default {
|
|
|
235
238
|
}, {})
|
|
236
239
|
},
|
|
237
240
|
allFilters() {
|
|
238
|
-
let orderby
|
|
241
|
+
let orderby = this.isEndpointsPage ? undefined : '{"meta.created":-1}'
|
|
239
242
|
|
|
240
243
|
if (!!this.orderBy.prop && !!this.orderBy.order) {
|
|
241
244
|
const propName = this.orderBy.prop
|