File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 203203 status =" active"
204204 :percent =" parseFloat(getPercentUsed(entity[usageType + 'total'], entity[usageType + 'limit']))"
205205 :format =" p => entity[usageType + 'limit'] !== '-1' && entity[usageType + 'limit'] !== 'Unlimited' ? p.toFixed(0) + '%' : ''"
206- stroke-color =" #52c41a "
206+ : stroke-color =" getStrokeColor(entity[usageType + 'available']) "
207207 size =" small"
208208 />
209209 <br />
239239 status =" active"
240240 :percent =" parseFloat(getPercentUsed(entity[usageType + 'total'], entity[usageType + 'limit']))"
241241 :format =" p => entity[usageType + 'limit'] !== '-1' && entity[usageType + 'limit'] !== 'Unlimited' ? p.toFixed(0) + '%' : ''"
242- stroke-color =" #52c41a "
242+ : stroke-color =" getStrokeColor(entity[usageType + 'available']) "
243243 size =" small"
244244 />
245245 <br />
275275 status =" active"
276276 :percent =" parseFloat(getPercentUsed(entity[usageType + 'total'], entity[usageType + 'limit']))"
277277 :format =" p => entity[usageType + 'limit'] !== '-1' && entity[usageType + 'limit'] !== 'Unlimited' ? p.toFixed(0) + '%' : ''"
278- stroke-color =" #52c41a "
278+ : stroke-color =" getStrokeColor(entity[usageType + 'available']) "
279279 size =" small"
280280 />
281281 <br />
@@ -441,6 +441,9 @@ export default {
441441 }
442442 },
443443 methods: {
444+ getStrokeColor (available ) {
445+ return available <= 0 ? ' #ff4d4f' : ' #52c41a'
446+ },
444447 fetchData () {
445448 if (store .getters .project .id ) {
446449 this .listProject ()
You can’t perform that action at this time.
0 commit comments