You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
29 KiB
1 line
29 KiB
11 months ago
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[817],{6069:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/anvil",function(){return t(2693)}])},1939:function(e,n,t){"use strict";var r=t(5893),o=t(7357),i=t(7169);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){a(e,n,t[n])}))}return e}function s(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l="Decorator",u={ok:"".concat(l,"-ok"),warning:"".concat(l,"-warning"),error:"".concat(l,"-error"),off:"".concat(l,"-off")};n.Z=function(e){var n,t=e.colour,l=e.sx,d=s(e,["colour","sx"]);return(0,r.jsx)(o.Z,c({},d,{className:u[t],sx:c((n={borderRadius:i.n_,height:"100%",width:"1.4em"},a(n,"&.".concat(u.ok),{backgroundColor:i.Ej}),a(n,"&.".concat(u.warning),{backgroundColor:i.Wd}),a(n,"&.".concat(u.error),{backgroundColor:i.hM}),a(n,"&.".concat(u.off),{backgroundColor:i.s7}),n),l)}))}},6632:function(e,n,t){"use strict";var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){o(e,n,t[n])}))}return e}function a(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionProceedText,t=void 0===n?"":n,o=e.content,c=void 0===o?"":o,s=e.titleText,l=void 0===s?"":s,u=a(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:t,content:c,titleText:l},u))}},2693:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return nn}});var r=t(5893),o=t(1496),i=t(7357),a=t(9008),c=t(1163),s=t(7294),l=t(2029),u=t(7169),d={uuid:"",setAnvilUuid:function(){return null}},f=(0,s.createContext)(d),h=function(e){var n=e.children,t=(0,s.useState)(""),o=t[0],i=t[1];return(0,r.jsx)(f.Provider,{value:{uuid:o,setAnvilUuid:function(e){i(e)}},children:n})},x=t(3679),v=t(1905),m=t(2852),g=new Map([["optimal","Optimal"],["not_ready","Not Ready"],["degraded","Degraded"]]),p=t(1939),j=function(e,n){return fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},b=t(7750);function y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var w={anvilName:"".concat("SelectedAnvil","-anvilName")},Z=(0,o.ZP)(i.Z)((function(){return y({display:"flex",flexDirection:"row",width:"100%"},"& .".concat(w.anvilName),{paddingLeft:0})})),_=function(e){switch(e){case"optimal":return"ok";case"not_ready":return"warning";default:return"error"}},k=function(e){return!(-1===e.hosts.findIndex((function(e){return"offline"!==e.state})))},O=function(e){var n=e.list,t=(0,s.useContext)(f).uuid,o=n.findIndex((function(e){return e.anvil_uuid===t}));return(0,r.jsx)(Z,y({},"children",""!==t&&(0,r.jsxs)(r.Fragment,y({},"children",[(0,r.jsx)(i.Z,{p:1,children:(0,r.js
|